Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SendBroadcast with latest version of compose #1203

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"@babel/core": "^7.4.4",
"@babel/preset-env": "^7.4.4",
"@babel/preset-react": "7.0.0",
"@nyaruka/temba-components": "0.54.2",
"@nyaruka/temba-components": "0.62.3",
"@testing-library/jest-dom": "4.0.0",
"@testing-library/react": "8.0.1",
"@types/common-tags": "^1.8.0",
Expand Down
3 changes: 2 additions & 1 deletion src/components/flow/actions/helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,5 +267,6 @@ export const getRecipientsByAsset = (assets: Asset[], type: AssetType): any[] =>
};

export const getComposeByAsset = (value: string, asset: string): any | any[] => {
return JSON.parse(value)[asset];
const compose = JSON.parse(value);
return compose['und'][asset];
};
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@
}

.attachment {
margin-top: 10px;
padding-left: 5px;
color: $gray;
transform: rotate(30deg);
transform: rotate(0deg);
display: inline-block;
}
}
5 changes: 4 additions & 1 deletion src/components/flow/actions/sendbroadcast/SendBroadcast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ const SendBroadcastComp: React.SFC<BroadcastMsg> = (
<div className="placeholder">{PLACEHOLDER}</div>
)}
{action.attachments && action.attachments.length > 0 ? (
<div className={`${styles.attachment} fe-paperclip`} />
<temba-icon
name="attachment"
style={{ marginTop: '0.4em', display: 'block' }}
></temba-icon>
) : null}
</div>
</div>
Expand Down
8 changes: 5 additions & 3 deletions src/components/form/compose/ComposeElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ export default class ComposeElement extends React.Component<ComposeProps> {
}

public handleChange(event: any): void {
if (this.props.onChange) {
this.props.onChange(event.target.value);
}
window.setTimeout(() => {
if (this.props.onChange) {
this.props.onChange(event.target.value);
}
}, 0);
}

public render(): JSX.Element {
Expand Down
48 changes: 44 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1376,10 +1376,10 @@
"@nodelib/fs.scandir" "2.1.3"
fastq "^1.6.0"

"@nyaruka/temba-components@0.54.2":
version "0.54.2"
resolved "https://registry.npmjs.org/@nyaruka/temba-components/-/temba-components-0.54.2.tgz#c296a1407dc9c61c26fa321c260a8b0ffd466883"
integrity sha512-03E7Xe4g+HWNa1etFVKThJ3A6BOnLZWbNZy33BJQE+9T/SNeB63AlEus23t+JVVoJpGGWt5Ge7+v1vK8svjR9g==
"@nyaruka/temba-components@0.62.3":
version "0.62.3"
resolved "https://registry.yarnpkg.com/@nyaruka/temba-components/-/temba-components-0.62.3.tgz#656c3c50a584f11dadf378775cfa3d1fd8d0cbe3"
integrity sha512-2eLpoZjbdu/5f9T6NmaZLuef/rHkl9I+yG2PqkAx/Sk1eo14lns71M1EXnBsf718CFXHCkvGxblXh0X3mtFa6Q==
dependencies:
"@lit/localize" "^0.11.4"
color-hash "^2.0.2"
Expand Down Expand Up @@ -2981,6 +2981,13 @@ 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 @@ -5551,6 +5558,11 @@ [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 @@ -5817,6 +5829,29 @@ fs.realpath@^1.0.0:
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=

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

fsevents@^1.2.7:
version "1.2.13"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38"
integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==
dependencies:
bindings "^1.5.0"
nan "^2.12.1"

fsevents@~2.1.2:
version "2.1.3"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e"
integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==

fsevents@~2.3.1:
version "2.3.3"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==

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 @@ -8742,6 +8777,11 @@ [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.18.0"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.18.0.tgz#26a6faae7ffbeb293a39660e88a76b82e30b7554"
integrity sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==

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