Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/word-wrap-1.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
ericnewcomer authored Sep 26, 2023
2 parents 4ec9409 + c8dd591 commit d4c4f79
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 45 deletions.
10 changes: 10 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM "mcr.microsoft.com/devcontainers/typescript-node:1-16-bullseye"

RUN apt-get update \
&& apt-get install chromium fonts-noto-color-emoji -y --no-install-recommends -qq

# The rest of our environment
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
ENV CHROME_PATH=/usr/bin/chromium
ENV DEBIAN_FRONTEND=noninteractive
18 changes: 18 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "floweditor",
"build": {
"dockerfile": "Dockerfile"
},
"forwardPorts": [
3000,
6000
],
"runArgs": [
"--network=textit_default",
"--hostname=floweditor"
],
"remoteUser": "node",
"postCreateCommand": "sudo chown node /workspaces/floweditor && yarn install"
// "features": {},
// "customizations": {},
}
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v1.22.3](https://github.com/nyaruka/floweditor/compare/v1.22.1...v1.22.3)

> 12 September 2023
- Localized attachments [`#1196`](https://github.com/nyaruka/floweditor/pull/1196)
- Add devcontainer [`#1195`](https://github.com/nyaruka/floweditor/pull/1195)
- Update cases on result router like expression router [`#1193`](https://github.com/nyaruka/floweditor/pull/1193)
- Allow attachments to be localized even if base doesn't define them [`e945d1e`](https://github.com/nyaruka/floweditor/commit/e945d1ef171d30bb86dc235963b0d1132a1e1083)
- Update fsevents version [`ff257fd`](https://github.com/nyaruka/floweditor/commit/ff257fd44b8215b90942492b6a5a67e9ebb96d32)
- Remove debug [`ad0a1ff`](https://github.com/nyaruka/floweditor/commit/ad0a1ffd66e6a4e7b00887f9a40993ef594d31a7)

#### [v1.22.1](https://github.com/nyaruka/floweditor/compare/v1.22.0...v1.22.1)

> 7 July 2023
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@nyaruka/flow-editor",
"license": "AGPL-3.0",
"repository": "git://github.com/nyaruka/floweditor.git",
"version": "1.22.1",
"version": "1.22.3",
"description": "'Standalone flow editing tool designed for use within the RapidPro suite of messaging tools but can be adopted for use outside of that ecosystem.'",
"browser": "umd/flow-editor.min.js",
"unpkg": "umd/flow-editor.min.js",
Expand All @@ -13,7 +13,6 @@
],
"private": false,
"dependencies": {
"fsevents": "2.3.2",
"react": "^16.8.6",
"react-dom": "^16.8.6"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ export default class MsgLocalizationForm extends React.Component<
const attachments: any = mutate(this.state.attachments, {
$push: [{ type: response.data.type, url: response.data.url, uploaded: true }]
});
console.log(attachments);
this.setState({ attachments });

const uploadError: string = '';
Expand Down
5 changes: 4 additions & 1 deletion src/services/Localization.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { Action, Case, Category, Language, MsgTemplating } from 'flowTypes';
import { Asset } from 'store/flowContext';

// list of keys that should always be treated as an array
const ARRAY_KEYS = ['attachments'];

export class LocalizedObject {
public localizedKeys: { [key: string]: boolean } = {};

Expand Down Expand Up @@ -40,7 +43,7 @@ export class LocalizedObject {
this.localized = true;
}

if (Array.isArray(this.localizedObject[key])) {
if (Array.isArray(this.localizedObject[key]) || ARRAY_KEYS.includes(key)) {
this.localizedObject[key] = value;
} else {
if (value.length === 1) {
Expand Down
6 changes: 0 additions & 6 deletions src/temba/TembaSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,6 @@ export default class TembaSelect extends React.Component<TembaSelectProps, Temba
}
return result;
});

resolved.forEach((option: any) => {
if (!option) {
throw new Error('No option found for selection');
}
});
}

if (this.props.onChange) {
Expand Down
35 changes: 0 additions & 35 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2981,13 +2981,6 @@ binary-extensions@^2.0.0:
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c"
integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==

bindings@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df"
integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==
dependencies:
file-uri-to-path "1.0.0"

bluebird@^3.5.5:
version "3.7.2"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
Expand Down Expand Up @@ -5558,11 +5551,6 @@ [email protected]:
loader-utils "^1.2.3"
schema-utils "^2.5.0"

[email protected]:
version "1.0.0"
resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd"
integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==

[email protected]:
version "6.0.1"
resolved "https://registry.yarnpkg.com/filesize/-/filesize-6.0.1.tgz#f850b509909c7c86f7e450ea19006c31c2ed3d2f"
Expand Down Expand Up @@ -5829,24 +5817,6 @@ fs.realpath@^1.0.0:
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=

[email protected], fsevents@~2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805"
integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==

[email protected], fsevents@~2.3.1:
version "2.3.2"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==

fsevents@^1.2.7:
version "1.2.12"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.12.tgz#db7e0d8ec3b0b45724fd4d83d43554a8f1f0de5c"
integrity sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q==
dependencies:
bindings "^1.5.0"
nan "^2.12.1"

function-bind@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
Expand Down Expand Up @@ -8772,11 +8742,6 @@ [email protected]:
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==

nan@^2.12.1:
version "2.14.0"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c"
integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==

nanomatch@^1.2.9:
version "1.2.13"
resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
Expand Down

0 comments on commit d4c4f79

Please sign in to comment.