@capillarytech/creatives-library 8.0.125-alpha.6 → 8.0.126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/app.js +6 -0
- package/containers/App/constants.js +0 -1
- package/containers/Email/index.js +5 -5
- package/containers/WeChat/RichmediaTemplates/Create/index.js +1 -1
- package/initialReducer.js +2 -0
- package/package.json +1 -1
- package/services/api.js +94 -1
- package/services/tests/api.test.js +191 -0
- package/tests/integration/TemplateCreation/TemplateCreation.integration.test.js +3 -8
- package/tests/integration/TemplateCreation/api-response.js +0 -5
- package/tests/integration/TemplateCreation/msw-handler.js +63 -42
- package/utils/common.js +0 -7
- package/utils/commonUtils.js +6 -2
- package/v2Components/CapImageUpload/index.js +45 -51
- package/v2Components/CapInAppCTA/index.js +0 -1
- package/v2Components/CapTagList/index.js +120 -177
- package/v2Components/CapVideoUpload/constants.js +0 -3
- package/v2Components/CapVideoUpload/index.js +110 -167
- package/v2Components/CapVideoUpload/messages.js +0 -16
- package/v2Components/Carousel/index.js +13 -15
- package/v2Components/CustomerSearchSection/_customerSearch.scss +309 -0
- package/v2Components/CustomerSearchSection/constants.js +5 -0
- package/v2Components/CustomerSearchSection/index.js +362 -0
- package/v2Components/CustomerSearchSection/messages.js +20 -0
- package/v2Components/CustomerSearchSection/tests/utils.test.js +334 -0
- package/v2Components/CustomerSearchSection/utils.js +49 -0
- package/v2Components/ErrorInfoNote/style.scss +0 -1
- package/v2Components/MobilePushPreviewV2/index.js +5 -37
- package/v2Components/TemplatePreview/_templatePreview.scss +72 -114
- package/v2Components/TemplatePreview/index.js +50 -178
- package/v2Components/TemplatePreview/messages.js +0 -4
- package/v2Components/TestAndPreviewSlidebox/_testAndPreviewSlidebox.scss +543 -0
- package/v2Components/TestAndPreviewSlidebox/actions.js +67 -0
- package/v2Components/TestAndPreviewSlidebox/constants.js +67 -0
- package/v2Components/TestAndPreviewSlidebox/index.js +771 -0
- package/v2Components/TestAndPreviewSlidebox/messages.js +147 -0
- package/v2Components/TestAndPreviewSlidebox/reducer.js +233 -0
- package/v2Components/TestAndPreviewSlidebox/sagas.js +258 -0
- package/v2Components/TestAndPreviewSlidebox/selectors.js +142 -0
- package/v2Components/TestAndPreviewSlidebox/tests/actions.test.js +80 -0
- package/v2Components/TestAndPreviewSlidebox/tests/reducer.test.js +367 -0
- package/v2Components/TestAndPreviewSlidebox/tests/saga.rtl.test.js +192 -0
- package/v2Components/TestAndPreviewSlidebox/tests/saga.test.js +652 -0
- package/v2Components/TestAndPreviewSlidebox/tests/selector.test.js +182 -0
- package/v2Containers/CreativesContainer/SlideBoxContent.js +21 -9
- package/v2Containers/CreativesContainer/SlideBoxFooter.js +23 -2
- package/v2Containers/CreativesContainer/index.js +160 -195
- package/v2Containers/CreativesContainer/messages.js +4 -0
- package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +21 -0
- package/v2Containers/Email/index.js +18 -6
- package/v2Containers/EmailWrapper/hooks/useEmailWrapper.js +10 -0
- package/v2Containers/EmailWrapper/index.js +6 -0
- package/v2Containers/InApp/constants.js +0 -1
- package/v2Containers/InApp/index.js +13 -13
- package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +3 -0
- package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +2 -0
- package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +2 -0
- package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +9 -0
- package/v2Containers/MobilePush/Create/index.js +0 -1
- package/v2Containers/MobilePush/commonMethods.js +14 -7
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +23 -5
- package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +4 -0
- package/v2Containers/TagList/index.js +10 -56
- package/v2Containers/Templates/_templates.scss +1 -101
- package/v2Containers/Templates/index.js +35 -147
- package/v2Containers/Templates/messages.js +0 -8
- package/v2Containers/Templates/sagas.js +0 -2
- package/v2Containers/WeChat/RichmediaTemplates/Create/index.js +1 -1
- package/v2Containers/Whatsapp/constants.js +0 -1
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +35 -0
- package/utils/createPayload.js +0 -270
- package/utils/tests/createPayload.test.js +0 -761
- package/v2Components/CapMpushCTA/constants.js +0 -25
- package/v2Components/CapMpushCTA/index.js +0 -332
- package/v2Components/CapMpushCTA/index.scss +0 -95
- package/v2Components/CapMpushCTA/messages.js +0 -89
- package/v2Components/TemplatePreview/assets/images/Android _ With date and time.svg +0 -29
- package/v2Components/TemplatePreview/assets/images/android.svg +0 -9
- package/v2Components/TemplatePreview/assets/images/iOS _ With date and time.svg +0 -26
- package/v2Components/TemplatePreview/assets/images/ios.svg +0 -9
- package/v2Containers/Email/tests/index.test.js +0 -35
- package/v2Containers/MobilePushNew/actions.js +0 -116
- package/v2Containers/MobilePushNew/components/CtaButtons.js +0 -170
- package/v2Containers/MobilePushNew/components/MediaUploaders.js +0 -686
- package/v2Containers/MobilePushNew/components/PlatformContentFields.js +0 -279
- package/v2Containers/MobilePushNew/components/index.js +0 -5
- package/v2Containers/MobilePushNew/components/tests/CtaButtons.test.js +0 -779
- package/v2Containers/MobilePushNew/components/tests/MediaUploaders.test.js +0 -2114
- package/v2Containers/MobilePushNew/components/tests/PlatformContentFields.test.js +0 -343
- package/v2Containers/MobilePushNew/constants.js +0 -115
- package/v2Containers/MobilePushNew/hooks/tests/usePlatformSync.test.js +0 -1299
- package/v2Containers/MobilePushNew/hooks/tests/useUpload.test.js +0 -1223
- package/v2Containers/MobilePushNew/hooks/usePlatformSync.js +0 -246
- package/v2Containers/MobilePushNew/hooks/useUpload.js +0 -709
- package/v2Containers/MobilePushNew/index.js +0 -2170
- package/v2Containers/MobilePushNew/index.scss +0 -308
- package/v2Containers/MobilePushNew/messages.js +0 -226
- package/v2Containers/MobilePushNew/reducer.js +0 -160
- package/v2Containers/MobilePushNew/sagas.js +0 -198
- package/v2Containers/MobilePushNew/selectors.js +0 -55
- package/v2Containers/MobilePushNew/tests/reducer.test.js +0 -741
- package/v2Containers/MobilePushNew/tests/sagas.test.js +0 -863
- package/v2Containers/MobilePushNew/tests/selectors.test.js +0 -425
- package/v2Containers/MobilePushNew/tests/utils.test.js +0 -322
- package/v2Containers/MobilePushNew/utils.js +0 -33
|
@@ -14,6 +14,8 @@ exports[`Test SlideBoxContent container campaign message, add creative click rcs
|
|
|
14
14
|
currentChannel="RCS"
|
|
15
15
|
getFormData={[Function]}
|
|
16
16
|
handleClose={[Function]}
|
|
17
|
+
handleCloseTestAndPreview={[Function]}
|
|
18
|
+
handleTestAndPreview={[Function]}
|
|
17
19
|
hostName=""
|
|
18
20
|
loyaltyMetaData={
|
|
19
21
|
Object {
|
|
@@ -42,6 +44,7 @@ exports[`Test SlideBoxContent container campaign message, add creative click rcs
|
|
|
42
44
|
setIsLoadingContent={[Function]}
|
|
43
45
|
showLiquidErrorInFooter={[Function]}
|
|
44
46
|
showTemplateName={[Function]}
|
|
47
|
+
showTestAndPreviewSlidebox={false}
|
|
45
48
|
slidBoxContent="templates"
|
|
46
49
|
templateData={
|
|
47
50
|
Object {
|
|
@@ -96,6 +99,8 @@ exports[`Test SlideBoxContent container campaign message, add creative click wha
|
|
|
96
99
|
currentChannel="WHATSAPP"
|
|
97
100
|
getFormData={[Function]}
|
|
98
101
|
handleClose={[Function]}
|
|
102
|
+
handleCloseTestAndPreview={[Function]}
|
|
103
|
+
handleTestAndPreview={[Function]}
|
|
99
104
|
hostName=""
|
|
100
105
|
loyaltyMetaData={
|
|
101
106
|
Object {
|
|
@@ -124,6 +129,7 @@ exports[`Test SlideBoxContent container campaign message, add creative click wha
|
|
|
124
129
|
setIsLoadingContent={[Function]}
|
|
125
130
|
showLiquidErrorInFooter={[Function]}
|
|
126
131
|
showTemplateName={[Function]}
|
|
132
|
+
showTestAndPreviewSlidebox={false}
|
|
127
133
|
slidBoxContent="templates"
|
|
128
134
|
templateData={
|
|
129
135
|
Object {
|
|
@@ -178,6 +184,8 @@ exports[`Test SlideBoxContent container campaign message, whatsapp edit all data
|
|
|
178
184
|
currentChannel="WHATSAPP"
|
|
179
185
|
getFormData={[Function]}
|
|
180
186
|
handleClose={[Function]}
|
|
187
|
+
handleCloseTestAndPreview={[Function]}
|
|
188
|
+
handleTestAndPreview={[Function]}
|
|
181
189
|
hostName=""
|
|
182
190
|
loyaltyMetaData={
|
|
183
191
|
Object {
|
|
@@ -206,6 +214,7 @@ exports[`Test SlideBoxContent container campaign message, whatsapp edit all data
|
|
|
206
214
|
setIsLoadingContent={[Function]}
|
|
207
215
|
showLiquidErrorInFooter={[Function]}
|
|
208
216
|
showTemplateName={[Function]}
|
|
217
|
+
showTestAndPreviewSlidebox={false}
|
|
209
218
|
slidBoxContent="editTemplate"
|
|
210
219
|
templateStep="modeSelection"
|
|
211
220
|
weChatMaptemplateStep={0}
|
|
@@ -227,8 +236,10 @@ exports[`Test SlideBoxContent container campaign message, whatsapp edit all data
|
|
|
227
236
|
onDiscard={[Function]}
|
|
228
237
|
onEditTemplate={[Function]}
|
|
229
238
|
onSave={[Function]}
|
|
239
|
+
onTestAndPreview={[Function]}
|
|
230
240
|
shouldShowContinueFooter={[Function]}
|
|
231
241
|
shouldShowDoneFooter={[Function]}
|
|
242
|
+
showTestAndPreviewButton={false}
|
|
232
243
|
slidBoxContent="editTemplate"
|
|
233
244
|
templateStep="modeSelection"
|
|
234
245
|
/>
|
|
@@ -270,6 +281,8 @@ exports[`Test SlideBoxContent container campaign message, whatsapp edit min data
|
|
|
270
281
|
currentChannel="WHATSAPP"
|
|
271
282
|
getFormData={[Function]}
|
|
272
283
|
handleClose={[Function]}
|
|
284
|
+
handleCloseTestAndPreview={[Function]}
|
|
285
|
+
handleTestAndPreview={[Function]}
|
|
273
286
|
hostName=""
|
|
274
287
|
loyaltyMetaData={
|
|
275
288
|
Object {
|
|
@@ -298,6 +311,7 @@ exports[`Test SlideBoxContent container campaign message, whatsapp edit min data
|
|
|
298
311
|
setIsLoadingContent={[Function]}
|
|
299
312
|
showLiquidErrorInFooter={[Function]}
|
|
300
313
|
showTemplateName={[Function]}
|
|
314
|
+
showTestAndPreviewSlidebox={false}
|
|
301
315
|
slidBoxContent="editTemplate"
|
|
302
316
|
templateStep="modeSelection"
|
|
303
317
|
weChatMaptemplateStep={0}
|
|
@@ -319,8 +333,10 @@ exports[`Test SlideBoxContent container campaign message, whatsapp edit min data
|
|
|
319
333
|
onDiscard={[Function]}
|
|
320
334
|
onEditTemplate={[Function]}
|
|
321
335
|
onSave={[Function]}
|
|
336
|
+
onTestAndPreview={[Function]}
|
|
322
337
|
shouldShowContinueFooter={[Function]}
|
|
323
338
|
shouldShowDoneFooter={[Function]}
|
|
339
|
+
showTestAndPreviewButton={false}
|
|
324
340
|
slidBoxContent="editTemplate"
|
|
325
341
|
templateStep="modeSelection"
|
|
326
342
|
/>
|
|
@@ -362,6 +378,8 @@ exports[`Test SlideBoxContent container it should clear the url, on channel chan
|
|
|
362
378
|
currentChannel="WHATSAPP"
|
|
363
379
|
getFormData={[Function]}
|
|
364
380
|
handleClose={[Function]}
|
|
381
|
+
handleCloseTestAndPreview={[Function]}
|
|
382
|
+
handleTestAndPreview={[Function]}
|
|
365
383
|
hostName=""
|
|
366
384
|
loyaltyMetaData={
|
|
367
385
|
Object {
|
|
@@ -390,6 +408,7 @@ exports[`Test SlideBoxContent container it should clear the url, on channel chan
|
|
|
390
408
|
setIsLoadingContent={[Function]}
|
|
391
409
|
showLiquidErrorInFooter={[Function]}
|
|
392
410
|
showTemplateName={[Function]}
|
|
411
|
+
showTestAndPreviewSlidebox={false}
|
|
393
412
|
slidBoxContent="editTemplate"
|
|
394
413
|
templateStep="modeSelection"
|
|
395
414
|
weChatMaptemplateStep={0}
|
|
@@ -411,8 +430,10 @@ exports[`Test SlideBoxContent container it should clear the url, on channel chan
|
|
|
411
430
|
onDiscard={[Function]}
|
|
412
431
|
onEditTemplate={[Function]}
|
|
413
432
|
onSave={[Function]}
|
|
433
|
+
onTestAndPreview={[Function]}
|
|
414
434
|
shouldShowContinueFooter={[Function]}
|
|
415
435
|
shouldShowDoneFooter={[Function]}
|
|
436
|
+
showTestAndPreviewButton={false}
|
|
416
437
|
slidBoxContent="editTemplate"
|
|
417
438
|
templateStep="modeSelection"
|
|
418
439
|
/>
|
|
@@ -42,6 +42,7 @@ import injectReducer from '../../utils/injectReducer';
|
|
|
42
42
|
import v2EmailReducer from './reducer';
|
|
43
43
|
import { v2EmailSagas } from './sagas';
|
|
44
44
|
import injectSaga from '../../utils/injectSaga';
|
|
45
|
+
import TestAndPreviewSlidebox from '../../v2Components/TestAndPreviewSlidebox';
|
|
45
46
|
|
|
46
47
|
export class Email extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
47
48
|
constructor(props) {
|
|
@@ -521,7 +522,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
521
522
|
}
|
|
522
523
|
this.edmEvent = undefined;
|
|
523
524
|
} else if (this.state.editorInstanse) {
|
|
524
|
-
this.state.editorInstanse.insertHtml(`<img src='${nextProps.Email.uploadedAssetData.metaInfo.secure_file_path}' alt='
|
|
525
|
+
this.state.editorInstanse.insertHtml(`<img src='${nextProps.Email.uploadedAssetData.metaInfo.secure_file_path}' alt='Image'>`);
|
|
525
526
|
//this.resetCkEditorInstance(this.state.currentTab, this.state.formData, true, nextProps.Email.uploadedAssetData, true);
|
|
526
527
|
}
|
|
527
528
|
this.setState({showImageSelectionBox: false});
|
|
@@ -1112,7 +1113,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
1112
1113
|
if (onInsert && !isImage) {
|
|
1113
1114
|
this.state.editorInstanse.insertHtml(`{{${value}}}`);
|
|
1114
1115
|
} else if (onInsert) {
|
|
1115
|
-
this.state.editorInstanse.insertHtml(`<img src='${value.metaInfo.secure_file_path}' alt='
|
|
1116
|
+
this.state.editorInstanse.insertHtml(`<img src='${value.metaInfo.secure_file_path}' alt='Image'>`);
|
|
1116
1117
|
}
|
|
1117
1118
|
}
|
|
1118
1119
|
});
|
|
@@ -1450,7 +1451,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
1450
1451
|
// if (this.state.isDragDrop) {
|
|
1451
1452
|
//
|
|
1452
1453
|
// } else {
|
|
1453
|
-
// this.state.editorInstanse.insertHtml(`<CapImage src='${data.metaInfo.public_url}' alt='
|
|
1454
|
+
// this.state.editorInstanse.insertHtml(`<CapImage src='${data.metaInfo.public_url}' alt='Image'>`);
|
|
1454
1455
|
// }
|
|
1455
1456
|
// }
|
|
1456
1457
|
}
|
|
@@ -1544,7 +1545,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
1544
1545
|
}
|
|
1545
1546
|
this.edmEvent = undefined;
|
|
1546
1547
|
} else if (this.state.editorInstanse) {
|
|
1547
|
-
this.state.editorInstanse.insertHtml(`<img src='${data.metaInfo.secure_file_path}' alt='
|
|
1548
|
+
this.state.editorInstanse.insertHtml(`<img src='${data.metaInfo.secure_file_path}' alt='Image'>`);
|
|
1548
1549
|
//this.resetCkEditorInstance(this.state.currentTab, this.state.formData, true, data, true);
|
|
1549
1550
|
}
|
|
1550
1551
|
}
|
|
@@ -1884,7 +1885,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
1884
1885
|
|
|
1885
1886
|
selectAsset = (asset) => {
|
|
1886
1887
|
if (this.state.editorInstanse) {
|
|
1887
|
-
this.state.editorInstanse.insertHtml(`<img src='${asset}' alt='
|
|
1888
|
+
this.state.editorInstanse.insertHtml(`<img src='${asset}' alt='Image'>`);
|
|
1888
1889
|
}
|
|
1889
1890
|
}
|
|
1890
1891
|
|
|
@@ -2674,7 +2675,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2674
2675
|
const previewHeader = (<h3>{this.props.intl.formatMessage(messages.h3emailPreview)}</h3>);
|
|
2675
2676
|
const imagePreviewHeader = (<h3>{this.props.intl.formatMessage(messages.h3imageSelection)}</h3>);
|
|
2676
2677
|
const imagePreviewContent = this.getImagePreviewContent();
|
|
2677
|
-
const { selectedOfferDetails, getDefaultTags, Email: { CmsSettings = {} } = {}, moduleType = '' } = this.props;
|
|
2678
|
+
const { selectedOfferDetails, getDefaultTags, Email: { CmsSettings = {} } = {}, moduleType = '', showTestAndPreviewSlidebox, handleTestAndPreview, handleCloseTestAndPreview } = this.props;
|
|
2678
2679
|
if (!this.props.currentOrgDetails || !this.props.currentOrgDetails.basic_details) {
|
|
2679
2680
|
return (<div>Loading...</div>);
|
|
2680
2681
|
}
|
|
@@ -2768,6 +2769,14 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2768
2769
|
size="size-xl"
|
|
2769
2770
|
/>
|
|
2770
2771
|
{this.state.showConfirmationModal && this.renderConfirmationModal()}
|
|
2772
|
+
{/* NEW: Test and Preview Slidebox */}
|
|
2773
|
+
<TestAndPreviewSlidebox
|
|
2774
|
+
show={showTestAndPreviewSlidebox}
|
|
2775
|
+
onClose={handleCloseTestAndPreview}
|
|
2776
|
+
formData={this.state.formData}
|
|
2777
|
+
content={this.state.formData[(this.state.currentTab - 1)][this.state.formData[(this.state.currentTab - 1)].activeTab] ? this.state.formData[(this.state.currentTab - 1)][this.state.formData[(this.state.currentTab - 1)].activeTab][`template-content`] : ''}
|
|
2778
|
+
currentChannel={EMAIL}
|
|
2779
|
+
/>
|
|
2771
2780
|
</div>
|
|
2772
2781
|
);
|
|
2773
2782
|
}
|
|
@@ -2804,6 +2813,9 @@ Email.propTypes = {
|
|
|
2804
2813
|
onTestContentClicked: PropTypes.func,
|
|
2805
2814
|
moduleType: PropTypes.string,
|
|
2806
2815
|
showLiquidErrorInFooter: PropTypes.func,
|
|
2816
|
+
showTestAndPreviewSlidebox: PropTypes.bool,
|
|
2817
|
+
handleTestAndPreview: PropTypes.func,
|
|
2818
|
+
handleCloseTestAndPreview: PropTypes.func,
|
|
2807
2819
|
};
|
|
2808
2820
|
|
|
2809
2821
|
const mapStateToProps = (state, props) => createStructuredSelector({
|
|
@@ -50,6 +50,10 @@ const useEmailWrapper = ({
|
|
|
50
50
|
// Props for CmsTemplates component
|
|
51
51
|
cmsTemplatesLoader,
|
|
52
52
|
currentOrgDetails,
|
|
53
|
+
// Props for Test and Preview Slidebox
|
|
54
|
+
showTestAndPreviewSlidebox,
|
|
55
|
+
handleTestAndPreview,
|
|
56
|
+
handleCloseTestAndPreview,
|
|
53
57
|
}) => {
|
|
54
58
|
// State management
|
|
55
59
|
const [templateName, setTemplateName] = useState('');
|
|
@@ -287,6 +291,9 @@ const useEmailWrapper = ({
|
|
|
287
291
|
moduleType,
|
|
288
292
|
eventContextTags,
|
|
289
293
|
isLoyaltyModule,
|
|
294
|
+
showTestAndPreviewSlidebox,
|
|
295
|
+
handleTestAndPreview,
|
|
296
|
+
handleCloseTestAndPreview,
|
|
290
297
|
}), [
|
|
291
298
|
setIsLoadingContent,
|
|
292
299
|
routeParams,
|
|
@@ -307,6 +314,9 @@ const useEmailWrapper = ({
|
|
|
307
314
|
moduleType,
|
|
308
315
|
eventContextTags,
|
|
309
316
|
isLoyaltyModule,
|
|
317
|
+
showTestAndPreviewSlidebox,
|
|
318
|
+
handleTestAndPreview,
|
|
319
|
+
handleCloseTestAndPreview,
|
|
310
320
|
]);
|
|
311
321
|
|
|
312
322
|
// Prepare props for CmsTemplatesComponent
|
|
@@ -58,6 +58,9 @@ const EmailWrapper = (props) => {
|
|
|
58
58
|
onPreviewContentClicked,
|
|
59
59
|
onTestContentClicked,
|
|
60
60
|
editor,
|
|
61
|
+
showTestAndPreviewSlidebox,
|
|
62
|
+
handleTestAndPreview,
|
|
63
|
+
handleCloseTestAndPreview,
|
|
61
64
|
} = props;
|
|
62
65
|
|
|
63
66
|
// Pass destructured props to the custom hook
|
|
@@ -107,6 +110,9 @@ const EmailWrapper = (props) => {
|
|
|
107
110
|
onPreviewContentClicked,
|
|
108
111
|
onTestContentClicked,
|
|
109
112
|
editor,
|
|
113
|
+
showTestAndPreviewSlidebox,
|
|
114
|
+
handleTestAndPreview,
|
|
115
|
+
handleCloseTestAndPreview,
|
|
110
116
|
});
|
|
111
117
|
|
|
112
118
|
// Render using the presentation component with data from the hook
|
|
@@ -46,12 +46,10 @@ import {
|
|
|
46
46
|
INITIAL_CTA_DATA,
|
|
47
47
|
IOS,
|
|
48
48
|
LAYOUT_RADIO_OPTIONS,
|
|
49
|
-
AI_CONTENT_BOT_DISABLED
|
|
49
|
+
AI_CONTENT_BOT_DISABLED
|
|
50
50
|
} from "./constants";
|
|
51
51
|
import { INAPP, SMS } from "../CreativesContainer/constants";
|
|
52
|
-
import {
|
|
53
|
-
ALL, TAG, EMBEDDED, DEFAULT, FULL, LIBRARY,
|
|
54
|
-
} from "../Whatsapp/constants";
|
|
52
|
+
import { ALL, TAG, EMBEDDED, DEFAULT, FULL, LIBRARY } from "../Whatsapp/constants";
|
|
55
53
|
import CapDeviceContent from "../../v2Components/CapDeviceContent";
|
|
56
54
|
import { getCdnUrl } from "../../utils/cdnTransformation";
|
|
57
55
|
import { getCtaObject, hasAnyErrors, getSingleTab } from "./utils";
|
|
@@ -299,13 +297,14 @@ export const InApp = (props) => {
|
|
|
299
297
|
|
|
300
298
|
const templateDescErrorHandler = (value) => {
|
|
301
299
|
let errorMessage = false;
|
|
302
|
-
const { unsupportedTags, isBraceError } =
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
300
|
+
const { unsupportedTags, isBraceError } =
|
|
301
|
+
validateTags({
|
|
302
|
+
content: value,
|
|
303
|
+
tagsParam: tags,
|
|
304
|
+
injectedTagsParams: injectedTags,
|
|
305
|
+
location,
|
|
306
|
+
tagModule: getDefaultTags,
|
|
307
|
+
}) || {};
|
|
309
308
|
if (value === '' && INAPP_MEDIA_TYPES.NONE) {
|
|
310
309
|
errorMessage = formatMessage(messages.emptyTemplateDescErrorMessage);
|
|
311
310
|
} else if (unsupportedTags?.length > 0) {
|
|
@@ -473,7 +472,7 @@ export const InApp = (props) => {
|
|
|
473
472
|
placeholder={formatMessage(globalMessages.templateNamePlaceholder)}
|
|
474
473
|
value={templateName}
|
|
475
474
|
size="default"
|
|
476
|
-
|
|
475
|
+
/>
|
|
477
476
|
</CapRow>
|
|
478
477
|
);
|
|
479
478
|
//create methods end
|
|
@@ -583,7 +582,8 @@ export const InApp = (props) => {
|
|
|
583
582
|
return false;
|
|
584
583
|
};
|
|
585
584
|
|
|
586
|
-
const getCtaPayload = (type) =>
|
|
585
|
+
const getCtaPayload = (type) =>
|
|
586
|
+
(type === ANDROID ? ctaDataAndroid : ctaDataIos).map((cta) => {
|
|
587
587
|
const { text, urlType, url } = cta;
|
|
588
588
|
return {
|
|
589
589
|
type: urlType,
|
|
@@ -2282,6 +2282,7 @@ new message content.",
|
|
|
2282
2282
|
"gallery": [Function],
|
|
2283
2283
|
"language": [Function],
|
|
2284
2284
|
"navigationConfig": [Function],
|
|
2285
|
+
"previewAndTest": [Function],
|
|
2285
2286
|
"tagList": [Function],
|
|
2286
2287
|
"templates": [Function],
|
|
2287
2288
|
},
|
|
@@ -5963,6 +5964,7 @@ new message content.",
|
|
|
5963
5964
|
"gallery": [Function],
|
|
5964
5965
|
"language": [Function],
|
|
5965
5966
|
"navigationConfig": [Function],
|
|
5967
|
+
"previewAndTest": [Function],
|
|
5966
5968
|
"tagList": [Function],
|
|
5967
5969
|
"templates": [Function],
|
|
5968
5970
|
},
|
|
@@ -9783,6 +9785,7 @@ new message content.",
|
|
|
9783
9785
|
"gallery": [Function],
|
|
9784
9786
|
"language": [Function],
|
|
9785
9787
|
"navigationConfig": [Function],
|
|
9788
|
+
"previewAndTest": [Function],
|
|
9786
9789
|
"tagList": [Function],
|
|
9787
9790
|
"templates": [Function],
|
|
9788
9791
|
},
|
|
@@ -2282,6 +2282,7 @@ new message content.",
|
|
|
2282
2282
|
"gallery": [Function],
|
|
2283
2283
|
"language": [Function],
|
|
2284
2284
|
"navigationConfig": [Function],
|
|
2285
|
+
"previewAndTest": [Function],
|
|
2285
2286
|
"tagList": [Function],
|
|
2286
2287
|
"templates": [Function],
|
|
2287
2288
|
},
|
|
@@ -21553,6 +21554,7 @@ new message content.",
|
|
|
21553
21554
|
"gallery": [Function],
|
|
21554
21555
|
"language": [Function],
|
|
21555
21556
|
"navigationConfig": [Function],
|
|
21557
|
+
"previewAndTest": [Function],
|
|
21556
21558
|
"tagList": [Function],
|
|
21557
21559
|
"templates": [Function],
|
|
21558
21560
|
},
|
|
@@ -2282,6 +2282,7 @@ new message content.",
|
|
|
2282
2282
|
"gallery": [Function],
|
|
2283
2283
|
"language": [Function],
|
|
2284
2284
|
"navigationConfig": [Function],
|
|
2285
|
+
"previewAndTest": [Function],
|
|
2285
2286
|
"tagList": [Function],
|
|
2286
2287
|
"templates": [Function],
|
|
2287
2288
|
},
|
|
@@ -34878,6 +34879,7 @@ new message content.",
|
|
|
34878
34879
|
"gallery": [Function],
|
|
34879
34880
|
"language": [Function],
|
|
34880
34881
|
"navigationConfig": [Function],
|
|
34882
|
+
"previewAndTest": [Function],
|
|
34881
34883
|
"tagList": [Function],
|
|
34882
34884
|
"templates": [Function],
|
|
34883
34885
|
},
|
|
@@ -2282,6 +2282,7 @@ new message content.",
|
|
|
2282
2282
|
"gallery": [Function],
|
|
2283
2283
|
"language": [Function],
|
|
2284
2284
|
"navigationConfig": [Function],
|
|
2285
|
+
"previewAndTest": [Function],
|
|
2285
2286
|
"tagList": [Function],
|
|
2286
2287
|
"templates": [Function],
|
|
2287
2288
|
},
|
|
@@ -11287,6 +11288,7 @@ new message content.",
|
|
|
11287
11288
|
"gallery": [Function],
|
|
11288
11289
|
"language": [Function],
|
|
11289
11290
|
"navigationConfig": [Function],
|
|
11291
|
+
"previewAndTest": [Function],
|
|
11290
11292
|
"tagList": [Function],
|
|
11291
11293
|
"templates": [Function],
|
|
11292
11294
|
},
|
|
@@ -20476,6 +20478,7 @@ new message content.",
|
|
|
20476
20478
|
"gallery": [Function],
|
|
20477
20479
|
"language": [Function],
|
|
20478
20480
|
"navigationConfig": [Function],
|
|
20481
|
+
"previewAndTest": [Function],
|
|
20479
20482
|
"tagList": [Function],
|
|
20480
20483
|
"templates": [Function],
|
|
20481
20484
|
},
|
|
@@ -29942,6 +29945,7 @@ new message content.",
|
|
|
29942
29945
|
"gallery": [Function],
|
|
29943
29946
|
"language": [Function],
|
|
29944
29947
|
"navigationConfig": [Function],
|
|
29948
|
+
"previewAndTest": [Function],
|
|
29945
29949
|
"tagList": [Function],
|
|
29946
29950
|
"templates": [Function],
|
|
29947
29951
|
},
|
|
@@ -41629,6 +41633,7 @@ new message content.",
|
|
|
41629
41633
|
"gallery": [Function],
|
|
41630
41634
|
"language": [Function],
|
|
41631
41635
|
"navigationConfig": [Function],
|
|
41636
|
+
"previewAndTest": [Function],
|
|
41632
41637
|
"tagList": [Function],
|
|
41633
41638
|
"templates": [Function],
|
|
41634
41639
|
},
|
|
@@ -53358,6 +53363,7 @@ new message content.",
|
|
|
53358
53363
|
"gallery": [Function],
|
|
53359
53364
|
"language": [Function],
|
|
53360
53365
|
"navigationConfig": [Function],
|
|
53366
|
+
"previewAndTest": [Function],
|
|
53361
53367
|
"tagList": [Function],
|
|
53362
53368
|
"templates": [Function],
|
|
53363
53369
|
},
|
|
@@ -61137,6 +61143,7 @@ new message content.",
|
|
|
61137
61143
|
"gallery": [Function],
|
|
61138
61144
|
"language": [Function],
|
|
61139
61145
|
"navigationConfig": [Function],
|
|
61146
|
+
"previewAndTest": [Function],
|
|
61140
61147
|
"tagList": [Function],
|
|
61141
61148
|
"templates": [Function],
|
|
61142
61149
|
},
|
|
@@ -69334,6 +69341,7 @@ new message content.",
|
|
|
69334
69341
|
"gallery": [Function],
|
|
69335
69342
|
"language": [Function],
|
|
69336
69343
|
"navigationConfig": [Function],
|
|
69344
|
+
"previewAndTest": [Function],
|
|
69337
69345
|
"tagList": [Function],
|
|
69338
69346
|
"templates": [Function],
|
|
69339
69347
|
},
|
|
@@ -77808,6 +77816,7 @@ new message content.",
|
|
|
77808
77816
|
"gallery": [Function],
|
|
77809
77817
|
"language": [Function],
|
|
77810
77818
|
"navigationConfig": [Function],
|
|
77819
|
+
"previewAndTest": [Function],
|
|
77811
77820
|
"tagList": [Function],
|
|
77812
77821
|
"templates": [Function],
|
|
77813
77822
|
},
|
|
@@ -239,7 +239,6 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
239
239
|
onLinkTypeChange = (eventTriggered, formData, field) => {
|
|
240
240
|
let schema = cloneDeep(this.state.schema);
|
|
241
241
|
const inputFields = get(schema, `containers[0].panes[${this.state.currentTab - 1}].sections[0].childSections[0].childSections[0].inputFields`);
|
|
242
|
-
|
|
243
242
|
forEach(inputFields, (inputField, fieldIndex) => {
|
|
244
243
|
if (inputField) {
|
|
245
244
|
forEach(inputField.cols, (col) => {
|
|
@@ -248,13 +248,20 @@ function getLinkTypeFields({inputFieldsArgs, fieldIndex, deepLinkOptions, formDa
|
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
function getContent(obj) {
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
251
|
+
const {
|
|
252
|
+
versions : {
|
|
253
|
+
base: {
|
|
254
|
+
ANDROID: {
|
|
255
|
+
title : androidTitle,
|
|
256
|
+
message : androidMessage
|
|
257
|
+
} = {},
|
|
258
|
+
IOS: {
|
|
259
|
+
title: iosTitle,
|
|
260
|
+
message: iosMessage
|
|
261
|
+
} = {}
|
|
262
|
+
} = {}
|
|
263
|
+
} = {}
|
|
264
|
+
} = obj;
|
|
258
265
|
return `${androidTitle} ${androidMessage} ${iosTitle} ${iosMessage}`;
|
|
259
266
|
}
|
|
260
267
|
export {
|
|
@@ -2282,6 +2282,7 @@ new message content.",
|
|
|
2282
2282
|
"gallery": [Function],
|
|
2283
2283
|
"language": [Function],
|
|
2284
2284
|
"navigationConfig": [Function],
|
|
2285
|
+
"previewAndTest": [Function],
|
|
2285
2286
|
"tagList": [Function],
|
|
2286
2287
|
"templates": [Function],
|
|
2287
2288
|
},
|
|
@@ -26264,6 +26265,7 @@ new message content.",
|
|
|
26264
26265
|
"gallery": [Function],
|
|
26265
26266
|
"language": [Function],
|
|
26266
26267
|
"navigationConfig": [Function],
|
|
26268
|
+
"previewAndTest": [Function],
|
|
26267
26269
|
"tagList": [Function],
|
|
26268
26270
|
"templates": [Function],
|
|
26269
26271
|
},
|
|
@@ -50629,6 +50631,7 @@ new message content.",
|
|
|
50629
50631
|
"gallery": [Function],
|
|
50630
50632
|
"language": [Function],
|
|
50631
50633
|
"navigationConfig": [Function],
|
|
50634
|
+
"previewAndTest": [Function],
|
|
50632
50635
|
"tagList": [Function],
|
|
50633
50636
|
"templates": [Function],
|
|
50634
50637
|
},
|
|
@@ -70991,6 +70994,7 @@ new message content.",
|
|
|
70991
70994
|
"gallery": [Function],
|
|
70992
70995
|
"language": [Function],
|
|
70993
70996
|
"navigationConfig": [Function],
|
|
70997
|
+
"previewAndTest": [Function],
|
|
70994
70998
|
"tagList": [Function],
|
|
70995
70999
|
"templates": [Function],
|
|
70996
71000
|
},
|
|
@@ -91630,6 +91634,7 @@ new message content.",
|
|
|
91630
91634
|
"gallery": [Function],
|
|
91631
91635
|
"language": [Function],
|
|
91632
91636
|
"navigationConfig": [Function],
|
|
91637
|
+
"previewAndTest": [Function],
|
|
91633
91638
|
"tagList": [Function],
|
|
91634
91639
|
"templates": [Function],
|
|
91635
91640
|
},
|
|
@@ -95634,7 +95639,7 @@ new message content.",
|
|
|
95634
95639
|
>
|
|
95635
95640
|
<input
|
|
95636
95641
|
accept="image/*"
|
|
95637
|
-
id="
|
|
95642
|
+
id="fileName"
|
|
95638
95643
|
key="imgFile"
|
|
95639
95644
|
onChange={[Function]}
|
|
95640
95645
|
style={
|
|
@@ -112445,6 +112450,7 @@ new message content.",
|
|
|
112445
112450
|
"gallery": [Function],
|
|
112446
112451
|
"language": [Function],
|
|
112447
112452
|
"navigationConfig": [Function],
|
|
112453
|
+
"previewAndTest": [Function],
|
|
112448
112454
|
"tagList": [Function],
|
|
112449
112455
|
"templates": [Function],
|
|
112450
112456
|
},
|
|
@@ -116555,7 +116561,7 @@ new message content.",
|
|
|
116555
116561
|
>
|
|
116556
116562
|
<input
|
|
116557
116563
|
accept="image/*"
|
|
116558
|
-
id="
|
|
116564
|
+
id="fileName"
|
|
116559
116565
|
key="imgFile"
|
|
116560
116566
|
onChange={[Function]}
|
|
116561
116567
|
style={
|
|
@@ -133366,6 +133372,7 @@ new message content.",
|
|
|
133366
133372
|
"gallery": [Function],
|
|
133367
133373
|
"language": [Function],
|
|
133368
133374
|
"navigationConfig": [Function],
|
|
133375
|
+
"previewAndTest": [Function],
|
|
133369
133376
|
"tagList": [Function],
|
|
133370
133377
|
"templates": [Function],
|
|
133371
133378
|
},
|
|
@@ -137370,7 +137377,7 @@ new message content.",
|
|
|
137370
137377
|
>
|
|
137371
137378
|
<input
|
|
137372
137379
|
accept="image/*"
|
|
137373
|
-
id="
|
|
137380
|
+
id="fileName"
|
|
137374
137381
|
key="imgFile"
|
|
137375
137382
|
onChange={[Function]}
|
|
137376
137383
|
style={
|
|
@@ -154181,6 +154188,7 @@ new message content.",
|
|
|
154181
154188
|
"gallery": [Function],
|
|
154182
154189
|
"language": [Function],
|
|
154183
154190
|
"navigationConfig": [Function],
|
|
154191
|
+
"previewAndTest": [Function],
|
|
154184
154192
|
"tagList": [Function],
|
|
154185
154193
|
"templates": [Function],
|
|
154186
154194
|
},
|
|
@@ -158291,7 +158299,7 @@ new message content.",
|
|
|
158291
158299
|
>
|
|
158292
158300
|
<input
|
|
158293
158301
|
accept="image/*"
|
|
158294
|
-
id="
|
|
158302
|
+
id="fileName"
|
|
158295
158303
|
key="imgFile"
|
|
158296
158304
|
onChange={[Function]}
|
|
158297
158305
|
style={
|
|
@@ -175102,6 +175110,7 @@ new message content.",
|
|
|
175102
175110
|
"gallery": [Function],
|
|
175103
175111
|
"language": [Function],
|
|
175104
175112
|
"navigationConfig": [Function],
|
|
175113
|
+
"previewAndTest": [Function],
|
|
175105
175114
|
"tagList": [Function],
|
|
175106
175115
|
"templates": [Function],
|
|
175107
175116
|
},
|
|
@@ -195187,6 +195196,7 @@ new message content.",
|
|
|
195187
195196
|
"gallery": [Function],
|
|
195188
195197
|
"language": [Function],
|
|
195189
195198
|
"navigationConfig": [Function],
|
|
195199
|
+
"previewAndTest": [Function],
|
|
195190
195200
|
"tagList": [Function],
|
|
195191
195201
|
"templates": [Function],
|
|
195192
195202
|
},
|
|
@@ -199200,7 +199210,7 @@ new message content.",
|
|
|
199200
199210
|
>
|
|
199201
199211
|
<input
|
|
199202
199212
|
accept="image/*"
|
|
199203
|
-
id="
|
|
199213
|
+
id="fileName"
|
|
199204
199214
|
key="imgFile"
|
|
199205
199215
|
onChange={[Function]}
|
|
199206
199216
|
style={
|
|
@@ -221338,6 +221348,7 @@ new message content.",
|
|
|
221338
221348
|
"gallery": [Function],
|
|
221339
221349
|
"language": [Function],
|
|
221340
221350
|
"navigationConfig": [Function],
|
|
221351
|
+
"previewAndTest": [Function],
|
|
221341
221352
|
"tagList": [Function],
|
|
221342
221353
|
"templates": [Function],
|
|
221343
221354
|
},
|
|
@@ -239549,6 +239560,7 @@ new message content.",
|
|
|
239549
239560
|
"gallery": [Function],
|
|
239550
239561
|
"language": [Function],
|
|
239551
239562
|
"navigationConfig": [Function],
|
|
239563
|
+
"previewAndTest": [Function],
|
|
239552
239564
|
"tagList": [Function],
|
|
239553
239565
|
"templates": [Function],
|
|
239554
239566
|
},
|
|
@@ -259923,6 +259935,7 @@ new message content.",
|
|
|
259923
259935
|
"gallery": [Function],
|
|
259924
259936
|
"language": [Function],
|
|
259925
259937
|
"navigationConfig": [Function],
|
|
259938
|
+
"previewAndTest": [Function],
|
|
259926
259939
|
"tagList": [Function],
|
|
259927
259940
|
"templates": [Function],
|
|
259928
259941
|
},
|
|
@@ -280565,6 +280578,7 @@ new message content.",
|
|
|
280565
280578
|
"gallery": [Function],
|
|
280566
280579
|
"language": [Function],
|
|
280567
280580
|
"navigationConfig": [Function],
|
|
280581
|
+
"previewAndTest": [Function],
|
|
280568
280582
|
"tagList": [Function],
|
|
280569
280583
|
"templates": [Function],
|
|
280570
280584
|
},
|
|
@@ -300650,6 +300664,7 @@ new message content.",
|
|
|
300650
300664
|
"gallery": [Function],
|
|
300651
300665
|
"language": [Function],
|
|
300652
300666
|
"navigationConfig": [Function],
|
|
300667
|
+
"previewAndTest": [Function],
|
|
300653
300668
|
"tagList": [Function],
|
|
300654
300669
|
"templates": [Function],
|
|
300655
300670
|
},
|
|
@@ -321012,6 +321027,7 @@ new message content.",
|
|
|
321012
321027
|
"gallery": [Function],
|
|
321013
321028
|
"language": [Function],
|
|
321014
321029
|
"navigationConfig": [Function],
|
|
321030
|
+
"previewAndTest": [Function],
|
|
321015
321031
|
"tagList": [Function],
|
|
321016
321032
|
"templates": [Function],
|
|
321017
321033
|
},
|
|
@@ -341657,6 +341673,7 @@ new message content.",
|
|
|
341657
341673
|
"gallery": [Function],
|
|
341658
341674
|
"language": [Function],
|
|
341659
341675
|
"navigationConfig": [Function],
|
|
341676
|
+
"previewAndTest": [Function],
|
|
341660
341677
|
"tagList": [Function],
|
|
341661
341678
|
"templates": [Function],
|
|
341662
341679
|
},
|
|
@@ -362033,6 +362050,7 @@ new message content.",
|
|
|
362033
362050
|
"gallery": [Function],
|
|
362034
362051
|
"language": [Function],
|
|
362035
362052
|
"navigationConfig": [Function],
|
|
362053
|
+
"previewAndTest": [Function],
|
|
362036
362054
|
"tagList": [Function],
|
|
362037
362055
|
"templates": [Function],
|
|
362038
362056
|
},
|