@capillarytech/creatives-library 6.14.0 → 6.15.1

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.
Files changed (44) hide show
  1. package/app.js +5 -2
  2. package/components/FormBuilder/index.js +6 -2
  3. package/containers/Ebill/index.js +3 -0
  4. package/containers/Email/index.js +16 -8
  5. package/containers/Sms/Create/index.js +2 -1
  6. package/package.json +1 -1
  7. package/services/api.js +2 -3
  8. package/translations/en.json +50 -107
  9. package/translations/zh.json +50 -107
  10. package/utils/ignoredErrorMessages.js +4 -0
  11. package/v2Components/FormBuilder/index.js +5 -11
  12. package/v2Containers/CreativesContainer/SlideBoxContent.js +6 -2
  13. package/v2Containers/CreativesContainer/index.js +2 -1
  14. package/v2Containers/Email/actions.js +2 -1
  15. package/v2Containers/Email/index.js +45 -29
  16. package/v2Containers/Email/sagas.js +2 -2
  17. package/v2Containers/EmailWrapper/index.js +2 -0
  18. package/v2Containers/Line/Create/_lineCreate.scss +64 -0
  19. package/v2Containers/Line/Create/actions.js +94 -0
  20. package/v2Containers/Line/Create/constants.js +43 -0
  21. package/v2Containers/Line/Create/index.js +1112 -0
  22. package/v2Containers/Line/Create/initialSchema.js +378 -0
  23. package/v2Containers/Line/Create/messages.js +229 -0
  24. package/v2Containers/Line/Create/reducer.js +99 -0
  25. package/v2Containers/Line/Create/sagas.js +113 -0
  26. package/v2Containers/Line/Create/selectors.js +30 -0
  27. package/v2Containers/Line/CreateWrapper/constants.js +2 -0
  28. package/v2Containers/Line/CreateWrapper/index.js +117 -0
  29. package/v2Containers/Line/CreateWrapper/messages.js +55 -0
  30. package/v2Containers/Line/Edit/_lineEdit.scss +23 -0
  31. package/v2Containers/Line/Edit/actions.js +79 -0
  32. package/v2Containers/Line/Edit/constants.js +27 -0
  33. package/v2Containers/Line/Edit/index.js +1051 -0
  34. package/v2Containers/Line/Edit/messages.js +173 -0
  35. package/v2Containers/Line/Edit/reducer.js +83 -0
  36. package/v2Containers/Line/Edit/sagas.js +81 -0
  37. package/v2Containers/Line/Edit/selectors.js +29 -0
  38. package/v2Containers/Line/Edit/tests/actions.test.js +18 -0
  39. package/v2Containers/Line/Edit/tests/index.test.js +10 -0
  40. package/v2Containers/Line/Edit/tests/reducer.test.js +9 -0
  41. package/v2Containers/Line/Edit/tests/sagas.test.js +15 -0
  42. package/v2Containers/Line/Edit/tests/selectors.test.js +10 -0
  43. package/v2Containers/TemplatesV2/index.js +5 -6
  44. package/v2Containers/WeChat/MapTemplates/index.js +1 -1
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "app.components.TemplatePreview.includesOptoutTag": "",
3
3
  "app.components.TemplatePreview.optoutCharactersTotal": "",
4
+ "creatives.components.AccessForbidden.forbiddenDesc": "",
5
+ "creatives.components.AccessForbidden.forbiddenHeader": "",
4
6
  "creatives.components.BreadCrumbs.header": "",
5
7
  "creatives.components.CapTagList.Cancel": "",
6
8
  "creatives.components.CapTagList.Ok": "",
@@ -143,7 +145,7 @@
143
145
  "creatives.componentsV2.ImagePreview.close": "",
144
146
  "creatives.componentsV2.ImagePreview.loadingImage": "",
145
147
  "creatives.componentsV2.NavigationBar.businessProcesses": "",
146
- "creatives.componentsV2.NavigationBar.campaign": "",
148
+ "creatives.componentsV2.NavigationBar.campaigns/ui/list": "",
147
149
  "creatives.componentsV2.NavigationBar.header": "",
148
150
  "creatives.componentsV2.NavigationBar.insights": "",
149
151
  "creatives.componentsV2.NavigationBar.logout": "",
@@ -172,9 +174,11 @@
172
174
  "creatives.componentsV2.TemplatePreview.charactersPerSms": "",
173
175
  "creatives.componentsV2.TemplatePreview.charactersTotal": "",
174
176
  "creatives.componentsV2.TemplatePreview.close": "",
177
+ "creatives.componentsV2.TemplatePreview.playVideo": "",
175
178
  "creatives.componentsV2.TemplatePreview.preview": "",
176
179
  "creatives.componentsV2.TemplatePreview.previewGenerated": "",
177
180
  "creatives.componentsV2.TemplatePreview.previewGenerationMessage": "",
181
+ "creatives.componentsV2.TemplatePreview.showDetails": "",
178
182
  "creatives.componentsV2.TemplatePreview.sms": "",
179
183
  "creatives.componentsV2.TemplatePreview.smsFormatType": "",
180
184
  "creatives.componentsV2.TemplatePreview.smsIcon": "",
@@ -247,8 +251,6 @@
247
251
  "creatives.containers.Create.graphic_details_page": "",
248
252
  "creatives.containers.Create.header": "",
249
253
  "creatives.containers.Create.http_example": "",
250
- "creatives.containers.Create.imageGallery": "",
251
- "creatives.containers.Create.lineImageIncorrectSize": "",
252
254
  "creatives.containers.Create.markFinalVersionLabel": "",
253
255
  "creatives.containers.Create.maxContentCount": "",
254
256
  "creatives.containers.Create.messageLabel": "",
@@ -266,17 +268,9 @@
266
268
  "creatives.containers.Create.sourceLinkEmpty": "",
267
269
  "creatives.containers.Create.tagsErrorMessage": "",
268
270
  "creatives.containers.Create.tagsLabel": "",
269
- "creatives.containers.Create.templateAddTag": "",
270
271
  "creatives.containers.Create.templateDataNotValid": "",
271
272
  "creatives.containers.Create.templateMarkedFinal": "",
272
- "creatives.containers.Create.templateMessageError": "",
273
- "creatives.containers.Create.templateMessagePlaceholder": "",
274
- "creatives.containers.Create.templateMessagePreviewPropsError": "",
275
- "creatives.containers.Create.templateMessagePreviewPropsInductiveText": "",
276
- "creatives.containers.Create.templateMessagePreviewPropsLabel": "",
277
- "creatives.containers.Create.templateNameErrorPlaceholder": "",
278
273
  "creatives.containers.Create.templateNamePlaceHolder": "",
279
- "creatives.containers.Create.templatePlaceholder": "",
280
274
  "creatives.containers.Create.titleCharacterCount": "",
281
275
  "creatives.containers.Create.titleEmpty": "",
282
276
  "creatives.containers.Create.titleNameRepeated": "",
@@ -1089,102 +1083,6 @@
1089
1083
  "creatives.containersV2.FacebookMarketingObjective.fbMarketingObjectiveDescription": "",
1090
1084
  "creatives.containersV2.FacebookMarketingObjective.fbMarketingObjectiveDone": "",
1091
1085
  "creatives.containersV2.FacebookMarketingObjective.fbMarketingObjectiveTitle": "",
1092
- "creatives.containersV2.Line.Create.Campaigns": "",
1093
- "creatives.containersV2.Line.Create.Creatives": "",
1094
- "creatives.containersV2.Line.Create.Image": "",
1095
- "creatives.containersV2.Line.Create.ImageUploadLabel": "",
1096
- "creatives.containersV2.Line.Create.Tags": "",
1097
- "creatives.containersV2.Line.Create.accountId": "",
1098
- "creatives.containersV2.Line.Create.alertMessage": "",
1099
- "creatives.containersV2.Line.Create.button1": "",
1100
- "creatives.containersV2.Line.Create.button2": "",
1101
- "creatives.containersV2.Line.Create.cancel": "",
1102
- "creatives.containersV2.Line.Create.discardChanges": "",
1103
- "creatives.containersV2.Line.Create.enterTemplateName": "",
1104
- "creatives.containersV2.Line.Create.enterTemplateNameImportant": "",
1105
- "creatives.containersV2.Line.Create.goBackTemporaryLost": "",
1106
- "creatives.containersV2.Line.Create.image": "",
1107
- "creatives.containersV2.Line.Create.inputLineTemplateContent": "",
1108
- "creatives.containersV2.Line.Create.line": "",
1109
- "creatives.containersV2.Line.Create.lineTemplateCreatedSuccessfully": "",
1110
- "creatives.containersV2.Line.Create.maxUploadFileSize": "",
1111
- "creatives.containersV2.Line.Create.maximumCharacterLengthExceeds": "",
1112
- "creatives.containersV2.Line.Create.message": "",
1113
- "creatives.containersV2.Line.Create.messageHasUnsupportedTag": "",
1114
- "creatives.containersV2.Line.Create.messageLabel": "",
1115
- "creatives.containersV2.Line.Create.messageTitleWithUnsupportedTag": "",
1116
- "creatives.containersV2.Line.Create.nameAndDescription": "",
1117
- "creatives.containersV2.Line.Create.pleaseUploadImage": "",
1118
- "creatives.containersV2.Line.Create.save": "",
1119
- "creatives.containersV2.Line.Create.selectLineAccount": "",
1120
- "creatives.containersV2.Line.Create.selectLineTemplate": "",
1121
- "creatives.containersV2.Line.Create.somethingWentWrong": "",
1122
- "creatives.containersV2.Line.Create.template": "",
1123
- "creatives.containersV2.Line.Create.templateCantEmpty": "",
1124
- "creatives.containersV2.Line.Create.templateEditedSuccessfully": "",
1125
- "creatives.containersV2.Line.Create.templateNameNotEmpty": "",
1126
- "creatives.containersV2.Line.Create.templateNotConfigured": "",
1127
- "creatives.containersV2.Line.Create.title": "",
1128
- "creatives.containersV2.Line.Create.titleHasUnsupportedTag": "",
1129
- "creatives.containersV2.Line.Create.titleLabel": "",
1130
- "creatives.containersV2.Line.Create.titleNameInvalid": "",
1131
- "creatives.containersV2.Line.Create.uploadFileSizeError": "",
1132
- "creatives.containersV2.Line.Create.uploadImage": "",
1133
- "creatives.containersV2.Line.Create.uploadSuccess": "",
1134
- "creatives.containersV2.Line.Create.uploadingImage": "",
1135
- "creatives.containersV2.Line.Create.valueCantEmpty": "",
1136
- "creatives.containersV2.Line.CreateWrapper.accountLineListDescription": "",
1137
- "creatives.containersV2.Line.CreateWrapper.accountLineListTitle": "",
1138
- "creatives.containersV2.Line.CreateWrapper.accountLineNoListTitle": "",
1139
- "creatives.containersV2.Line.CreateWrapper.continue": "",
1140
- "creatives.containersV2.Line.CreateWrapper.hybridTemplateDescription": "",
1141
- "creatives.containersV2.Line.CreateWrapper.hybridTemplateTitle": "",
1142
- "creatives.containersV2.Line.CreateWrapper.imageTemplateDescription": "",
1143
- "creatives.containersV2.Line.CreateWrapper.imageTemplateTitle": "",
1144
- "creatives.containersV2.Line.CreateWrapper.templateType": "",
1145
- "creatives.containersV2.Line.CreateWrapper.textTemplateDescription": "",
1146
- "creatives.containersV2.Line.CreateWrapper.textTemplateTitle": "",
1147
- "creatives.containersV2.Line.Edit.Campaigns": "",
1148
- "creatives.containersV2.Line.Edit.Creatives": "",
1149
- "creatives.containersV2.Line.Edit.Image": "",
1150
- "creatives.containersV2.Line.Edit.ImageUploadLabel": "",
1151
- "creatives.containersV2.Line.Edit.Tags": "",
1152
- "creatives.containersV2.Line.Edit.alertMessage": "",
1153
- "creatives.containersV2.Line.Edit.androidNotConfigured": "",
1154
- "creatives.containersV2.Line.Edit.button1": "",
1155
- "creatives.containersV2.Line.Edit.button2": "",
1156
- "creatives.containersV2.Line.Edit.cancel": "",
1157
- "creatives.containersV2.Line.Edit.discardChanges": "",
1158
- "creatives.containersV2.Line.Edit.enterTemplateName": "",
1159
- "creatives.containersV2.Line.Edit.enterTemplateNameImportant": "",
1160
- "creatives.containersV2.Line.Edit.goBackConfirmation": "",
1161
- "creatives.containersV2.Line.Edit.goBackTemporaryChangesLost": "",
1162
- "creatives.containersV2.Line.Edit.inputLineTemplateContent": "",
1163
- "creatives.containersV2.Line.Edit.iosNotConfigured": "",
1164
- "creatives.containersV2.Line.Edit.maxUploadFileSize": "",
1165
- "creatives.containersV2.Line.Edit.message": "",
1166
- "creatives.containersV2.Line.Edit.messageHasUnsupportedTag": "",
1167
- "creatives.containersV2.Line.Edit.messageLabel": "",
1168
- "creatives.containersV2.Line.Edit.messageTitleWithUnsupportedTag": "",
1169
- "creatives.containersV2.Line.Edit.mobilePush": "",
1170
- "creatives.containersV2.Line.Edit.nameAndDescription": "",
1171
- "creatives.containersV2.Line.Edit.pleaseUploadImage": "",
1172
- "creatives.containersV2.Line.Edit.save": "",
1173
- "creatives.containersV2.Line.Edit.selectLineTemplate": "",
1174
- "creatives.containersV2.Line.Edit.somethingWentWrong": "",
1175
- "creatives.containersV2.Line.Edit.template": "",
1176
- "creatives.containersV2.Line.Edit.templateCantEmpty": "",
1177
- "creatives.containersV2.Line.Edit.templateEditedSuccessfully": "",
1178
- "creatives.containersV2.Line.Edit.templateNameNotEmpty": "",
1179
- "creatives.containersV2.Line.Edit.templateNotConfigured": "",
1180
- "creatives.containersV2.Line.Edit.title": "",
1181
- "creatives.containersV2.Line.Edit.titleHasUnsupportedTag": "",
1182
- "creatives.containersV2.Line.Edit.titleLabel": "",
1183
- "creatives.containersV2.Line.Edit.titleNameInvalid": "",
1184
- "creatives.containersV2.Line.Edit.uploadFileSizeError": "",
1185
- "creatives.containersV2.Line.Edit.uploadImage": "",
1186
- "creatives.containersV2.Line.Edit.uploadingImage": "",
1187
- "creatives.containersV2.Line.Edit.valueCantEmpty": "",
1188
1086
  "creatives.containersV2.LineContainer.addMessageButtonLabel": "",
1189
1087
  "creatives.containersV2.LineContainer.cancelButtonLabel": "",
1190
1088
  "creatives.containersV2.LineContainer.changeAccount": "",
@@ -1193,6 +1091,7 @@
1193
1091
  "creatives.containersV2.LineContainer.lineAccount": "",
1194
1092
  "creatives.containersV2.LineContainer.lineAccountHeading": "",
1195
1093
  "creatives.containersV2.LineContainer.lineAccountHeadingChangeLabel": "",
1094
+ "creatives.containersV2.LineContainer.lineAccountLabel": "",
1196
1095
  "creatives.containersV2.LineContainer.lineCreateNotification": "",
1197
1096
  "creatives.containersV2.LineContainer.lineCreativeDescription": "",
1198
1097
  "creatives.containersV2.LineContainer.lineCreativeTitle": "",
@@ -1284,6 +1183,39 @@
1284
1183
  "creatives.containersV2.LineText.textMessageSelectTemplate": "",
1285
1184
  "creatives.containersV2.LineText.textMessageTitleLabel": "",
1286
1185
  "creatives.containersV2.LineText.textMessageTitlePlaceholder": "",
1186
+ "creatives.containersV2.LineVideo.actionButtonLabel": "",
1187
+ "creatives.containersV2.LineVideo.actionLabelInductiveTitle": "",
1188
+ "creatives.containersV2.LineVideo.actionLabelPlaceholder": "",
1189
+ "creatives.containersV2.LineVideo.actionLabelTitle": "",
1190
+ "creatives.containersV2.LineVideo.actionUrlPlaceholder": "",
1191
+ "creatives.containersV2.LineVideo.actionUrlTitle": "",
1192
+ "creatives.containersV2.LineVideo.dragAndDrop": "",
1193
+ "creatives.containersV2.LineVideo.emptyAltTextErrorMessage": "",
1194
+ "creatives.containersV2.LineVideo.emptyLabelErrorMessage": "",
1195
+ "creatives.containersV2.LineVideo.emptyTitleErrorMessage": "",
1196
+ "creatives.containersV2.LineVideo.emptyUrlErrorMessage": "",
1197
+ "creatives.containersV2.LineVideo.imageGallery": "",
1198
+ "creatives.containersV2.LineVideo.imageReUpload": "",
1199
+ "creatives.containersV2.LineVideo.inValidUrlErrorMessage": "",
1200
+ "creatives.containersV2.LineVideo.lineTemplateImage": "",
1201
+ "creatives.containersV2.LineVideo.lineVideoIncorrectSize": "",
1202
+ "creatives.containersV2.LineVideo.maxActionLabelErrorMessage": "",
1203
+ "creatives.containersV2.LineVideo.or": "",
1204
+ "creatives.containersV2.LineVideo.searchImages": "",
1205
+ "creatives.containersV2.LineVideo.select": "",
1206
+ "creatives.containersV2.LineVideo.textMessageAddLabel": "",
1207
+ "creatives.containersV2.LineVideo.textMessageCreateNew": "",
1208
+ "creatives.containersV2.LineVideo.textMessageORLabel": "",
1209
+ "creatives.containersV2.LineVideo.textMessageSelectTemplate": "",
1210
+ "creatives.containersV2.LineVideo.textMessageTitleLabel": "",
1211
+ "creatives.containersV2.LineVideo.textMessageTitlePlaceholder": "",
1212
+ "creatives.containersV2.LineVideo.titleDescription": "",
1213
+ "creatives.containersV2.LineVideo.titleLabel": "",
1214
+ "creatives.containersV2.LineVideo.uploadComputer": "",
1215
+ "creatives.containersV2.LineVideo.uploadGallery": "",
1216
+ "creatives.containersV2.LineVideo.uploadVideoLabel": "",
1217
+ "creatives.containersV2.LineVideo.videoFormatDescription": "",
1218
+ "creatives.containersV2.LineVideo.videoSizeDescription": "",
1287
1219
  "creatives.containersV2.LineWrapper.changeModalDescription": "",
1288
1220
  "creatives.containersV2.LineWrapper.changeModalLabel": "",
1289
1221
  "creatives.containersV2.LineWrapper.changeModalTitle": "",
@@ -1294,6 +1226,7 @@
1294
1226
  "creatives.containersV2.LineWrapper.stickerLabel": "",
1295
1227
  "creatives.containersV2.LineWrapper.templateLabel": "",
1296
1228
  "creatives.containersV2.LineWrapper.textLabel": "",
1229
+ "creatives.containersV2.LineWrapper.videoLabel": "",
1297
1230
  "creatives.containersV2.Login.header": "",
1298
1231
  "creatives.containersV2.Login.invalidCredential": "",
1299
1232
  "creatives.containersV2.Login.loginPage": "",
@@ -1481,6 +1414,7 @@
1481
1414
  "creatives.containersV2.Templates.header": "",
1482
1415
  "creatives.containersV2.Templates.imageCarouselTemplate": "",
1483
1416
  "creatives.containersV2.Templates.imageMapTemplate": "",
1417
+ "creatives.containersV2.Templates.imageMapVideoTemplate": "",
1484
1418
  "creatives.containersV2.Templates.imageTemplate": "",
1485
1419
  "creatives.containersV2.Templates.invalidUploadFileError": "",
1486
1420
  "creatives.containersV2.Templates.layoutSelection": "",
@@ -1597,10 +1531,19 @@
1597
1531
  "creatives.containersV2.WeChat.wechatCreateSuccess": "",
1598
1532
  "creatives.containersV2.WeChat.wechatEditSuccess": "",
1599
1533
  "creatives.containersV2.appName": "",
1534
+ "creatives.containersV2.areYouSureText": "",
1600
1535
  "creatives.containersV2.audience": "",
1601
1536
  "creatives.containersV2.campaignsDashboard": "",
1602
1537
  "creatives.containersV2.campaignsHome": "",
1538
+ "creatives.containersV2.cancel": "",
1539
+ "creatives.containersV2.changeOk": "",
1603
1540
  "creatives.containersV2.incentive": "",
1541
+ "creatives.containersV2.newOrgName": "",
1542
+ "creatives.containersV2.orgChangeText": "",
1543
+ "creatives.containersV2.orgChangedText": "",
1544
+ "creatives.containersV2.orgRefreshHeading": "",
1545
+ "creatives.containersV2.refreshOrgText": "",
1546
+ "creatives.containersV2.refreshText": "",
1604
1547
  "creatives.containersV2.richMedia.Create.Anyone": "",
1605
1548
  "creatives.containersV2.richMedia.Create.Author": "",
1606
1549
  "creatives.containersV2.richMedia.Create.Content": "",
@@ -0,0 +1,4 @@
1
+ export default [
2
+ // ref: https://stackoverflow.com/questions/49384120/resizeobserver-loop-limit-exceeded
3
+ 'ResizeObserver loop limit exceeded'
4
+ ];
@@ -1470,10 +1470,6 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
1470
1470
  } else if (key === this.props.baseLanguage) {
1471
1471
  formData[newTabIndex][key] = {};
1472
1472
  _.forEach(val, (subVal, index) => {
1473
- // if (subVal === 'is_drag_drop' || subVal === 'lang_id' || subVal === 'iso_code' === 'language') {
1474
- //
1475
- // formData[newTabIndex][key][index] = formData[0][this.props.baseLanguage][subVal];
1476
- // } else {
1477
1473
  if (index === 'tabKey') {
1478
1474
  formData[newTabIndex][key][index] = _.uniqueId();
1479
1475
  } else if (index === 'template-content') {
@@ -2366,7 +2362,9 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
2366
2362
  this.renderTextAreaContent(styling, columns, val, isVersionEnable, rows, cols, val.offset);
2367
2363
  break;
2368
2364
  case "contentPreview":
2369
- content = isVersionEnable ? this.state.formData[this.state.currentTab - 1]['sms-editor'] : this.state.formData['sms-editor'];
2365
+ const { formData , currentTab } = this.state || {};
2366
+ const tab = formData && formData[currentTab - 1];
2367
+ content = isVersionEnable ? tab && tab['sms-editor'] : formData && formData['sms-editor'];
2370
2368
  charList = updateCharCount(content).char_list;
2371
2369
  columns.push(<CapColumn id={val.id} className={"preview-chars"} span={val.width}>
2372
2370
  {charList.map((char) => char)}
@@ -3179,11 +3177,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
3179
3177
  }
3180
3178
  console.log('CKEditor Data 2', this.state.formData, this.state.formData[`${this.state.currentTab - 1}`], val, this.state.currentTab, this.state.currentLangTab, langIndex);
3181
3179
  const currentLang = ((!_.isEmpty(this.state.formData) && !_.isEmpty(this.state.formData[`${this.state.currentTab - 1}`]) && !_.isEmpty(this.state.formData[`${this.state.currentTab - 1}`].selectedLanguages) && this.state.formData[`${this.state.currentTab - 1}`].selectedLanguages[langIndex]) ? this.state.formData[`${this.state.currentTab - 1}`].selectedLanguages[langIndex] : this.props.baseLanguage) || 'en';
3182
- const content = (!_.isEmpty(this.state.formData) && this.state.formData[`${this.state.currentTab - 1}`][currentLang]['template-content'] ? this.state.formData[`${this.state.currentTab - 1}`][currentLang]['template-content'] : '');
3183
- console.log('ckeditor current lang', currentLang, content);
3184
- if (this.state.formData[`${this.state.currentTab - 1}`][currentLang].is_drag_drop) {
3185
- // content = "";
3186
- }
3180
+ const content = (!_.isEmpty(this.state.formData) && this.state.formData[`${this.state.currentTab - 1}`] && this.state.formData[`${this.state.currentTab - 1}`][currentLang] && this.state.formData[`${this.state.currentTab - 1}`][currentLang]['template-content'] || '');
3187
3181
  columns.push(
3188
3182
  <CapColumn style={val.colStyle ? val.colStyle : {}} span={val.width}>
3189
3183
  <CKEditor
@@ -3206,7 +3200,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
3206
3200
  }
3207
3201
  }
3208
3202
  const { currentTab, formData } = this.state;
3209
- const supportedLanguages = formData[currentTab - 1].selectedLanguages;
3203
+ const supportedLanguages = (formData[currentTab - 1] || {}).selectedLanguages || {};
3210
3204
  const currentLang = supportedLanguages[langTab - 1];
3211
3205
 
3212
3206
  let beeJson = '',
@@ -69,7 +69,7 @@ const getLineType = ({
69
69
  }
70
70
  }
71
71
  return {};
72
- }
72
+ };
73
73
 
74
74
  function SlideBoxContent(props) {
75
75
  const {
@@ -96,6 +96,7 @@ function SlideBoxContent(props) {
96
96
  cap,
97
97
  onResetStep,
98
98
  isFullMode,
99
+ editor,
99
100
  onCallTaskSubmit,
100
101
  setIsLoadingContent,
101
102
  showTemplateName,
@@ -184,7 +185,7 @@ function SlideBoxContent(props) {
184
185
  } = {},
185
186
  template,
186
187
  }) => {
187
- let previewContent = {};
188
+ const previewContent = {};
188
189
  previewContent.messageContent = text;
189
190
  previewContent.previewImageUrl = previewImageUrl;
190
191
  previewContent.selectedSticker = selectedSticker || {
@@ -366,6 +367,7 @@ function SlideBoxContent(props) {
366
367
  step={templateStep}
367
368
  showNextStep={onCreateNextStep}
368
369
  isFullMode={isFullMode}
370
+ editor={editor}
369
371
  cap={cap}
370
372
  onResetStep={onResetStep}
371
373
  showTemplateName={showTemplateName}
@@ -392,6 +394,7 @@ function SlideBoxContent(props) {
392
394
  getFormSubscriptionData={getFormData}
393
395
  getDefaultTags={type}
394
396
  isFullMode={isFullMode}
397
+ editor={editor}
395
398
  cap={cap}
396
399
  showTemplateName={showTemplateName}
397
400
  onValidationFail={onValidationFail}
@@ -456,6 +459,7 @@ function SlideBoxContent(props) {
456
459
  messageDetails={messageDetails}
457
460
  cap={cap}
458
461
  onFacebookSubmit={onFacebookSubmit}
462
+ isFullMode={isFullMode}
459
463
  />
460
464
  )
461
465
  }
@@ -533,7 +533,7 @@ class Creatives extends React.Component {
533
533
  }
534
534
  render() {
535
535
  const {slidBoxContent, isGetFormData, showSlideBox, templateData, currentChannel, emailCreateMode, templateStep, isLoadingContent, mobilePushCreateMode, isDiscardMessage, weChatTemplateType, weChatMaptemplateStep} = this.state;
536
- const {isFullMode, creativesMode, cap, isUploading, channelsToHide, selectedWeChatAccount, forwardedTags, channelsToDisable, selectedOfferDetails, onTestContentClicked, onPreviewContentClicked, getCreativesData, fetchingCmsData} = this.props;
536
+ const {isFullMode, creativesMode, cap, isUploading, channelsToHide, selectedWeChatAccount, forwardedTags, channelsToDisable, selectedOfferDetails, onTestContentClicked, onPreviewContentClicked, getCreativesData, fetchingCmsData, editor} = this.props;
537
537
  const mapTemplateCreate = slidBoxContent === 'createTemplate' && weChatTemplateType === MAP_TEMPLATE && templateStep !== 'modeSelection';
538
538
  /* TODO: Instead of passing down same props separately to each component down, write common function to these props and pass it accordingly */
539
539
  return (
@@ -606,6 +606,7 @@ class Creatives extends React.Component {
606
606
  selectedAccount={this.props.selectedAccount}
607
607
  onShowTemplates={this.onShowTemplates}
608
608
  handleClose={this.handleCloseSlideBox}
609
+ editor={editor}
609
610
  />
610
611
  }
611
612
  footer={this.shouldShowFooter() &&
@@ -38,7 +38,7 @@ export function getAllAssets(assetType, queryParams) {
38
38
  };
39
39
  }
40
40
 
41
- export function getCmsSetting(cmsType, projectId, cmsMode, langId, isEdmSupport) {
41
+ export function getCmsSetting(cmsType, projectId, cmsMode, langId, isEdmSupport, isBEEAppEnable) {
42
42
  return {
43
43
  type: types.GET_CMS_EDITOR_DETAILS_REQUEST,
44
44
  cmsType,
@@ -46,6 +46,7 @@ export function getCmsSetting(cmsType, projectId, cmsMode, langId, isEdmSupport)
46
46
  cmsMode,
47
47
  langId,
48
48
  isEdmSupport,
49
+ isBEEAppEnable,
49
50
  };
50
51
  }
51
52
 
@@ -183,15 +183,15 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
183
183
  this.props.templatesActions.resetTemplateData();
184
184
  }
185
185
  const isBEESupport = (this.props.location.query.isBEESupport !== "false") || false;
186
-
187
- if (!_.isEmpty(this.props.Templates.BEETemplate) ) {
188
- if (this.props.Templates.BEETemplate.versions.base.is_drag_drop) {
186
+ const isBEEAppEnable = this.checkBeeEditorAllowedForLibrary();
187
+ if (!_.isEmpty(this.props.Templates.BEETemplate)) {
188
+ if (this.props.Templates.BEETemplate.versions.base.is_drag_drop && isBEEAppEnable ) {
189
189
  this.setState({isDragDrop: true});
190
190
  }
191
191
  if (this.props.params.id) {
192
- this.props.actions.getCmsSetting(BEE_PLUGIN, this.props.Templates.BEETemplate._id, 'open', undefined, isBEESupport);
192
+ this.props.actions.getCmsSetting(BEE_PLUGIN, this.props.Templates.BEETemplate._id, 'open', undefined, isBEESupport, isBEEAppEnable);
193
193
  } else if (this.props.location.query.module !== "library" || (this.props.location.query.module === "library" && !this.props.templateData)) {
194
- this.props.actions.getCmsSetting(BEE_PLUGIN, this.props.Templates.BEETemplate._id, 'create', undefined, isBEESupport);
194
+ this.props.actions.getCmsSetting(BEE_PLUGIN, this.props.Templates.BEETemplate._id, 'create', undefined, isBEESupport, isBEEAppEnable);
195
195
  }
196
196
  }
197
197
  this.setState({ content: (this.props.Templates.selectedEmailLayout ? this.props.Templates.selectedEmailLayout : ''), formData});
@@ -214,6 +214,15 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
214
214
  this.showNext();
215
215
  }
216
216
  }
217
+
218
+ checkBeeEditorAllowedForLibrary = () => {
219
+ const { isFullMode = false, editor } = this.props || {};
220
+ if (editor === "BEE" && !isFullMode) {
221
+ return true;
222
+ }
223
+ return false;
224
+ }
225
+
217
226
  componentWillReceiveProps(nextProps) {
218
227
  // if (this.props.location.query.type === 'embedded') {
219
228
  // this.showNext();
@@ -315,8 +324,9 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
315
324
  if (nextProps.location.query.module === 'library' && nextProps.isGetFormData) {
316
325
  const formData = this.state.formData;
317
326
  let isBeeEditor = false;
327
+ const isBEEEnable = this.checkBeeEditorAllowedForLibrary();
318
328
  _.forEach(formData[0].selectedLanguages, (language) => {
319
- if (formData[0][language].is_drag_drop) {
329
+ if (formData[0][language].is_drag_drop && isBEEEnable) {
320
330
  isBeeEditor = true;
321
331
  }
322
332
  });
@@ -349,7 +359,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
349
359
  const temp = (schema.containers || {})[this.state.currentTab - 1];
350
360
 
351
361
  const { currentTab } = this.state;
352
- if (nextProps.Email.CmsSettings.isDragDrop) {
362
+ if (nextProps.Email.CmsSettings.isDragDrop && this.checkBeeEditorAllowedForLibrary()) {
353
363
  const beeJson = `BEEeditor${currentTab > 1 ? currentTab : ''}json`;
354
364
  const beeToken = `BEEeditor${currentTab > 1 ? currentTab : ''}token`;
355
365
  let beeJsonValue = _.get(nextProps, 'Templates.BEETemplate.versions.base.json-content', '');
@@ -409,7 +419,8 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
409
419
  }
410
420
 
411
421
  this.setState({ formData }, () => {
412
- this.hideEdmOptions(nextProps.Email.CmsSettings.isDragDrop);
422
+ const isDragDrop = this.checkBeeEditorAllowedForLibrary() && nextProps.Email.CmsSettings.isDragDrop;
423
+ this.hideEdmOptions(isDragDrop);
413
424
  });
414
425
  }
415
426
  if (nextProps.Email.createTemplateError && !_.isEqual(nextProps.Email.createTemplateError, this.props.Email.createTemplateError)) {
@@ -469,7 +480,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
469
480
  if ( !_.isEqual(nextProps.Email.uploadAssetSuccess, this.props.Email.uploadAssetSuccess) && nextProps.Email.uploadAssetSuccess) {
470
481
  const isDragDrop = this.state.formData[`${this.state.currentTab - 1}`][this.state.formData[`${this.state.currentTab - 1}`].activeTab].is_drag_drop;
471
482
  const isBEESupport = (this.props.location.query.isBEESupport !== "false") || false;
472
- if (isDragDrop && isBEESupport) {
483
+ if (isDragDrop && isBEESupport && this.checkBeeEditorAllowedForLibrary()) {
473
484
  const evtData = JSON.parse(this.edmEvent.data);
474
485
  if (evtData.action === 'editBackground') {
475
486
  this.edmEvent.source.postMessage(JSON.stringify({
@@ -515,7 +526,8 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
515
526
  }
516
527
  if (!_.isEmpty(nextProps.Email.templateDetails) && _.isEmpty(this.props.Email.templateDetails) ) {
517
528
  const base = nextProps.Email.templateDetails.versions.base;
518
- if (nextProps.Email.templateDetails.versions.base[base.activeTab].is_drag_drop) {
529
+ const activeBase = nextProps.Email.templateDetails.versions.base[base.activeTab];
530
+ if (activeBase && activeBase.is_drag_drop && this.checkBeeEditorAllowedForLibrary()) {
519
531
  this.setState({isDragDrop: true});
520
532
  }
521
533
  }
@@ -580,7 +592,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
580
592
  //this.resetCkEditorInstance(data, formData);
581
593
  const schema = _.cloneDeep(this.state.schema);
582
594
  const container = schema.containers[`${data - 1}`];
583
- if (formData[`${data - 1}`][formData[`${data - 1}`].activeTab].is_drag_drop) {
595
+ if (formData[`${data - 1}`][formData[`${data - 1}`].activeTab].is_drag_drop && this.checkBeeEditorAllowedForLibrary()) {
584
596
  container.tabBarExtraContent.sections[0].inputFields[0].cols[4].content.sections[0].inputFields[3].cols[0].style = {display: ""};
585
597
  container.tabBarExtraContent.sections[0].inputFields[0].cols[2].style.display = "none";
586
598
  } else {
@@ -605,7 +617,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
605
617
  const formData = _.cloneDeep(this.state.formData);
606
618
  const isBEESupport = (this.props.location.query.isBEESupport !== "false") || false;
607
619
 
608
- if (isDragDrop && isBEESupport) {
620
+ if (isDragDrop && isBEESupport && this.checkBeeEditorAllowedForLibrary()) {
609
621
  let msg = {};
610
622
  if (data === "unsubscribe") {
611
623
  const anchor = `<a href='{{${data}}}'>${data}</a>`;
@@ -648,9 +660,9 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
648
660
  const base = formData.base || {};
649
661
  const isDragDrop = _.get(base[base.activeTab], 'is_drag_drop');
650
662
  let editorType = '';
651
- if ( isDragDrop === true) {
663
+ if ( isDragDrop === true && this.checkBeeEditorAllowedForLibrary()) {
652
664
  editorType = 'edmEditor';
653
- } else if (isDragDrop === false) {
665
+ } else if (isDragDrop === false && !this.checkBeeEditorAllowedForLibrary()) {
654
666
  editorType = 'ckEditor';
655
667
  }
656
668
  GA.timeTracker.stopTimer(isEdit ? TRACK_EDIT_EMAIL : TRACK_CREATE_EMAIL, {
@@ -705,7 +717,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
705
717
  _.forEach(formData, (val, index) => {
706
718
  if (!isNaN(index)) {
707
719
  _.forEach(val.selectedLanguages, (language) => {
708
- if (val[language].is_drag_drop) {
720
+ if (val[language].is_drag_drop && this.checkBeeEditorAllowedForLibrary()) {
709
721
  that.props.actions.getCmsData(BEE_PLUGIN, id, language);
710
722
  }
711
723
  });
@@ -906,6 +918,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
906
918
  if (this.props.isFullMode) {
907
919
  this.props.showTemplateName({formData, onFormDataChange: this.onFormDataChange});
908
920
  }
921
+ const isBEEAppEnable = this.checkBeeEditorAllowedForLibrary();
909
922
  _.forEach((editData.versions.base.selectedLanguages), (language) => {
910
923
  // if (formData[this.state.currentTab - 1].tabKey === formData[this.state.currentTab - 1][language].tabKey) {
911
924
  // formData[this.state.currentTab - 1].activeTab = language;
@@ -913,8 +926,8 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
913
926
  // if (formData.base.tabKey === formData.base[language].tabKey) {
914
927
  // formData.base.activeTab = language;
915
928
  // }
916
- if (language && editData.versions.base[language].is_drag_drop) {
917
- this.props.actions.getCmsSetting(BEE_PLUGIN, editData._id, 'open', language, isBEESupport);
929
+ if (language && editData.versions.base[language].is_drag_drop && isBEEAppEnable) {
930
+ this.props.actions.getCmsSetting(BEE_PLUGIN, editData._id, 'open', language, isBEESupport, isBEEAppEnable);
918
931
  }
919
932
  });
920
933
 
@@ -997,11 +1010,12 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
997
1010
  }
998
1011
  saveValidationData = () => {
999
1012
  let saveCount = 0;
1013
+ const isBeeEnable = this.checkBeeEditorAllowedForLibrary();
1000
1014
  this.setState({saveEdmDataMode: 'validation', saveCount: 0, cmsDataCount: 0}, () => {
1001
1015
  _.forEach(this.state.formData, (newdata, index) => {
1002
1016
  if (!isNaN(index)) {
1003
1017
  _.forEach(newdata.selectedLanguages, (language) => {
1004
- if (newdata[language].is_drag_drop && ((parseInt(index, 10) + 1) === this.state.currentTab)) {
1018
+ if (newdata[language].is_drag_drop && isBeeEnable && ((parseInt(index, 10) + 1) === this.state.currentTab)) {
1005
1019
  saveCount += 1;
1006
1020
  }
1007
1021
  });
@@ -1118,14 +1132,14 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
1118
1132
 
1119
1133
  copyPrimaryLanguage = () => {
1120
1134
  const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
1121
-
1135
+ const isBEEAppEnable = this.checkBeeEditorAllowedForLibrary();
1122
1136
  this.setState({addLanguageType: "copyPrimaryLanguage"}, () => {
1123
1137
  this.setState({showModal: false});
1124
1138
  const formData = _.cloneDeep(this.state.formData);
1125
1139
  const currentTab = this.state.currentTab - 1;
1126
1140
  const baseLanguage = this.props.currentOrgDetails.basic_details.base_language ? this.props.currentOrgDetails.basic_details.base_language : 'en';
1127
- if (formData[currentTab][baseLanguage].is_drag_drop) {
1128
- this.props.actions.getCmsSetting(BEE_PLUGIN, formData[currentTab][baseLanguage].drag_drop_id, 'duplicate', baseLanguage, isEdmSupport);
1141
+ if (formData[currentTab][baseLanguage].is_drag_drop && isBEEAppEnable) {
1142
+ this.props.actions.getCmsSetting(BEE_PLUGIN, formData[currentTab][baseLanguage].drag_drop_id, 'duplicate', baseLanguage, isEdmSupport, isBEEAppEnable);
1129
1143
  }
1130
1144
  });
1131
1145
  }
@@ -1503,7 +1517,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
1503
1517
  const data = _.find(this.props.Email.assetList, {_id: id});
1504
1518
 
1505
1519
  if (data) {
1506
- if (isDragDrop && isEdmSupport) {
1520
+ if (isDragDrop && isEdmSupport && this.checkBeeEditorAllowedForLibrary()) {
1507
1521
  const evtData = JSON.parse(this.edmEvent.data);
1508
1522
  if (evtData.action === 'editBackground') {
1509
1523
  this.edmEvent.source.postMessage(JSON.stringify({
@@ -1538,7 +1552,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
1538
1552
 
1539
1553
  toggleEmailPreview = () => {
1540
1554
  const isDragDrop = this.state.formData[`${this.state.currentTab - 1}`][this.state.formData[`${this.state.currentTab - 1}`].activeTab].is_drag_drop;
1541
- if (isDragDrop && !this.state.showEmailPreview) {
1555
+ if (isDragDrop && !this.state.showEmailPreview && this.checkBeeEditorAllowedForLibrary()) {
1542
1556
  this.handleEdmSave();
1543
1557
  this.setState({mode: "preview", gettingPreviewData: true});
1544
1558
  } else if (this.state.showEmailPreview) {
@@ -2117,9 +2131,10 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
2117
2131
  "language": this.supportedLanguages[languageIndex].language,
2118
2132
  "template-content": templates.html_content,
2119
2133
  };
2120
- if (templates.drag_drop_id) {
2134
+ const isBEEAppEnable = this.checkBeeEditorAllowedForLibrary();
2135
+ if (templates.drag_drop_id && isBEEAppEnable) {
2121
2136
  tempData.drag_drop_id = templates.drag_drop_id;
2122
- this.props.actions.getCmsSetting(BEE_PLUGIN, tempData._id, 'open', tempData.iso_code, isEdmSupport);
2137
+ this.props.actions.getCmsSetting(BEE_PLUGIN, tempData._id, 'open', tempData.iso_code, isEdmSupport, isBEEAppEnable);
2123
2138
  }
2124
2139
  // formData.usingTabContainer = true;
2125
2140
  // formData.tabCount = 1;
@@ -2143,9 +2158,10 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
2143
2158
 
2144
2159
  this.setState({formData, loading: false, injectedTags: data.tags, tabKey, isDragDrop: (data.base.is_drag_drop !== 0 )}, () => {
2145
2160
  // this.setState({tabKey: ''});
2161
+ const isBEEEnable = this.checkBeeEditorAllowedForLibrary();
2146
2162
  _.forEach(formData[0].selectedLanguages, (language) => {
2147
- if (formData[0][language].is_drag_drop) {
2148
- this.props.actions.getCmsSetting(BEE_PLUGIN, formData[0][language].drag_drop_id, 'open', language, isEdmSupport);
2163
+ if (formData[0][language].is_drag_drop && isBEEEnable) {
2164
+ this.props.actions.getCmsSetting(BEE_PLUGIN, formData[0][language].drag_drop_id, 'open', language, isEdmSupport, isBEEEnable);
2149
2165
  }
2150
2166
  });
2151
2167
  });
@@ -2482,8 +2498,8 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
2482
2498
  // const isEdmSupport = (this.props.location.query.isEdmSupport) ? this.props.location.query.isEdmSupport : true;
2483
2499
  // let getQuery = '';
2484
2500
  const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
2485
-
2486
- this.props.actions.getCmsSetting(BEE_PLUGIN, data._id, 'create', this.state.formData[this.state.currentTab - 1].activeTab, isEdmSupport);
2501
+ const isBEEAppEnable = this.checkBeeEditorAllowedForLibrary();
2502
+ this.props.actions.getCmsSetting(BEE_PLUGIN, data._id, 'create', this.state.formData[this.state.currentTab - 1].activeTab, isEdmSupport, isBEEAppEnable);
2487
2503
  // this.props.templatesActions.setEdmTemplate(data);
2488
2504
  this.toggleEdmEmailTemplateSelection();
2489
2505
  // if (type && type.toLowerCase() === 'email') {
@@ -51,9 +51,9 @@ export function* getAllAssets(assetType, queryParams) {
51
51
  }
52
52
  }
53
53
 
54
- export function* getCmsSetting({cmsType, projectId, cmsMode, langId, isEdmSupport}) {
54
+ export function* getCmsSetting({cmsType, projectId, cmsMode, langId, isEdmSupport, isBEEAppEnable}) {
55
55
  try {
56
- const result = yield call(Api.getCmsTemplateSettingsV2, cmsType, projectId, cmsMode, langId, isEdmSupport);
56
+ const result = yield call(Api.getCmsTemplateSettingsV2, cmsType, projectId, cmsMode, langId, isEdmSupport, isBEEAppEnable);
57
57
 
58
58
  yield put({ type: types.GET_CMS_EDITOR_DETAILS_SUCCESS, settings: result.data.response.cmsDetails });
59
59
  } catch (error) {
@@ -196,6 +196,7 @@ export class EmailWrapper extends React.Component { // eslint-disable-line react
196
196
  onPreviewContentClicked,
197
197
  onTestContentClicked,
198
198
  cmsTemplatesLoader,
199
+ editor,
199
200
  } = this.props;
200
201
  const {
201
202
  templateName,
@@ -259,6 +260,7 @@ export class EmailWrapper extends React.Component { // eslint-disable-line react
259
260
  selectedOfferDetails={selectedOfferDetails}
260
261
  onPreviewContentClicked={onPreviewContentClicked}
261
262
  onTestContentClicked={onTestContentClicked}
263
+ editor={editor}
262
264
  />}
263
265
  {!isShowEmailCreate && (
264
266
  <CmsTemplatesComponent