@capillarytech/creatives-library 6.14.0 → 6.14.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.
@@ -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": "",
package/utils/common.js CHANGED
@@ -37,3 +37,121 @@ export const hasStore2DoorFeature = Auth.hasFeatureAccess.bind(
37
37
  null,
38
38
  STORE2DOOR_PLUS_ENABLED,
39
39
  );
40
+
41
+ export function getTreeStructuredTags(tagsList, userLocale = 'en') {
42
+ console.log('populating tags', (tagsList || []).length);
43
+ const mainTags = {};
44
+
45
+ //Form tags object with tag headers
46
+ _.forEach(tagsList, (temp) => {
47
+ const tag = temp.definition;
48
+ if (!tag['tag-header']) {
49
+ mainTags[tag.value] = {
50
+ name: tag.label[userLocale] ? tag.label[userLocale] : tag.label.en,
51
+ value: tag.value,
52
+ };
53
+ } else if (tag['tag-header'] && mainTags[tag.value]) {
54
+ mainTags[tag.value].subtags = _.concat(mainTags[tag.value].subtags, tag.subtags);
55
+ } else if (!mainTags[tag.value]) {
56
+ // console.log('Inside ', tag.label);
57
+ mainTags[tag.value] = {
58
+ 'tag-header': true,
59
+ "name": tag.label[userLocale] ? tag.label[userLocale] : tag.label.en,
60
+ "subtags": tag.subtags,
61
+ "value": tag.value,
62
+ };
63
+ }
64
+ });
65
+
66
+ const mainTagsCloned = _.cloneDeep(mainTags);
67
+ //Insert subtags in tag headers and reomve them from top level
68
+ const result = {};
69
+ _.forEach(mainTagsCloned, (tag, key) => {
70
+ if (tag['tag-header']) {
71
+ const tagWithChildren = populateTagForChildren(tag, mainTagsCloned, key);
72
+ tagWithChildren.resolved = true;
73
+ result[key] = tagWithChildren;
74
+ } else {
75
+ result[key] = tag;
76
+ }
77
+ });
78
+
79
+ //Delete extra tag headers
80
+ _.forEach(result, (tag) => {
81
+ if (tag['tag-header']) {
82
+ _.forEach(tag.subtags, (subtag, key) => {
83
+ if (result[key]) {
84
+ result[key].deleted = true;
85
+ }
86
+ });
87
+ }
88
+ });
89
+ //Actually delete them
90
+ _.forEach(result, (tag, key) => {
91
+ if (tag.deleted) {
92
+ delete result[key];
93
+ }
94
+ });
95
+ return getTreeStructureData(result);
96
+ }
97
+
98
+ function populateTagForChildren(targetTag, tagsObject, tagValue) {
99
+ const tag = targetTag;
100
+ if (tag && tag['tag-header'] && !tag.resolved) {
101
+ const tempSubTags = {};
102
+ _.forEach(tag.subtags, (subtag) => {
103
+ if (tagsObject[subtag]) {
104
+ const children = populateTagForChildren(tagsObject[subtag], tagsObject, subtag);
105
+ children.resolved = true;
106
+ tempSubTags[subtag] = children;
107
+ }
108
+ });
109
+ tag.subtags = tempSubTags;
110
+ return tag;
111
+ }
112
+ return tagsObject[tagValue];
113
+ }
114
+
115
+ function getTreeStructureData(data) {
116
+ const result = [];
117
+ _.forOwn(data, (mainTag) => {
118
+ const { name, value, subtags = [] } = mainTag;
119
+ if (!mainTag['tag-header']) {
120
+ result.push({
121
+ title: name,
122
+ value: `{{${value}}}`,
123
+ });
124
+ } else {
125
+ const obj = {
126
+ title: name,
127
+ value: `{{${value}}}`,
128
+ selectable: false,
129
+ };
130
+ obj.children = getSubTags(subtags);
131
+ result.push(obj);
132
+ }
133
+ });
134
+ return result;
135
+ }
136
+
137
+ function getSubTags(subtagsParam) {
138
+ const result = [];
139
+ _.forOwn(subtagsParam, (subTag) => {
140
+ const { name, value, subtags = [] } = subTag;
141
+ if (_.isEmpty(subtags)) {
142
+ result.push({
143
+ title: name,
144
+ value: `{{${value}}}`,
145
+ });
146
+ } else {
147
+ const obj = {
148
+ title: name,
149
+ value: `{{${value}}}`,
150
+ selectable: false,
151
+ };
152
+ obj.children = getSubTags(subtags);
153
+ result.push(obj);
154
+ }
155
+ });
156
+ return result;
157
+ }
@@ -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') {
@@ -3179,11 +3175,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
3179
3175
  }
3180
3176
  console.log('CKEditor Data 2', this.state.formData, this.state.formData[`${this.state.currentTab - 1}`], val, this.state.currentTab, this.state.currentLangTab, langIndex);
3181
3177
  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
- }
3178
+ 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
3179
  columns.push(
3188
3180
  <CapColumn style={val.colStyle ? val.colStyle : {}} span={val.width}>
3189
3181
  <CKEditor
@@ -3206,7 +3198,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
3206
3198
  }
3207
3199
  }
3208
3200
  const { currentTab, formData } = this.state;
3209
- const supportedLanguages = formData[currentTab - 1].selectedLanguages;
3201
+ const supportedLanguages = (formData[currentTab - 1] || {}).selectedLanguages;
3210
3202
  const currentLang = supportedLanguages[langTab - 1];
3211
3203
 
3212
3204
  let beeJson = '',
@@ -47,5 +47,5 @@ export const CHANNEL_EDIT_TRACK_MAPPING = {
47
47
  };
48
48
  export const GTM_TRACKING_ID = 'UA-110024621-2';
49
49
  export const BEE_PLUGIN = 'BEE_PLUGIN';
50
-
50
+ export const NO_COMMUNICATION = 'NO_COMMUNICATION';
51
51
  export const CREATIVES_UI_VIEW = 'CREATIVES_UI_VIEW';
@@ -18,6 +18,7 @@ import CallTask from '../CallTask';
18
18
  import MobliPushEdit from '../MobilePush/Edit';
19
19
  import * as constants from './constants';
20
20
  import LineContainer from '../Line/Container';
21
+ import FTP from '../FTP';
21
22
  const CreativesWrapper = styled.div`
22
23
  .ant-popover,
23
24
  .ant-notification,
@@ -69,7 +70,7 @@ const getLineType = ({
69
70
  }
70
71
  }
71
72
  return {};
72
- }
73
+ };
73
74
 
74
75
  function SlideBoxContent(props) {
75
76
  const {
@@ -96,6 +97,7 @@ function SlideBoxContent(props) {
96
97
  cap,
97
98
  onResetStep,
98
99
  isFullMode,
100
+ editor,
99
101
  onCallTaskSubmit,
100
102
  setIsLoadingContent,
101
103
  showTemplateName,
@@ -116,6 +118,7 @@ function SlideBoxContent(props) {
116
118
  selectedAccount,
117
119
  onShowTemplates,
118
120
  handleClose,
121
+ onFTPSubmit,
119
122
  } = props;
120
123
  const type = (messageDetails.type || '').toLowerCase(); // type is context in get tags values : outbound | dvs | referral | loyalty | coupons
121
124
  const query = { type: !isFullMode && 'embedded', module: isFullMode ? 'default' : 'library', isEditFromCampaigns: (templateData || {}).isEditFromCampaigns};
@@ -146,6 +149,7 @@ function SlideBoxContent(props) {
146
149
  let isEditCallTask = false;
147
150
  let isEditMPush = false;
148
151
  let isEditFacebook = false;
152
+ let isEditFTP = false;
149
153
  const isEmailCreate = slidBoxContent === 'createTemplate' && channel === constants.EMAIL;
150
154
  if (templateData && channel) {
151
155
  channel = templateData.type;// for edit mode with template data
@@ -158,6 +162,7 @@ function SlideBoxContent(props) {
158
162
  isPreview = slidBoxContent === 'preview' && (channel === constants.SMS || channel === constants.LINE);
159
163
  isEmailPreview = slidBoxContent === 'preview' && channel === constants.EMAIL;
160
164
  isMpushPreview = slidBoxContent === 'preview' && channel === constants.MOBILE_PUSH;
165
+ isEditFTP = slidBoxContent === 'editTemplate' && [constants.NO_COMMUNICATION, constants.FTP].includes(channel);
161
166
  }
162
167
 
163
168
  const getChannelPreviewContent = (templateDataObject) => {
@@ -184,7 +189,7 @@ function SlideBoxContent(props) {
184
189
  } = {},
185
190
  template,
186
191
  }) => {
187
- let previewContent = {};
192
+ const previewContent = {};
188
193
  previewContent.messageContent = text;
189
194
  previewContent.previewImageUrl = previewImageUrl;
190
195
  previewContent.selectedSticker = selectedSticker || {
@@ -226,7 +231,6 @@ function SlideBoxContent(props) {
226
231
  return get(templateDataObject, `versions.base.content`);
227
232
  }
228
233
  };
229
-
230
234
  return (
231
235
  <CreativesWrapper>
232
236
  {!isFullMode && slidBoxContent === 'templates' && (
@@ -249,6 +253,10 @@ function SlideBoxContent(props) {
249
253
  onCreateComplete={onCreateComplete}
250
254
  getFormSubscriptionData={getFormData}
251
255
  handleClose={handleClose}
256
+ onFTPSubmit={onFTPSubmit}
257
+ slidBoxContent={slidBoxContent}
258
+ FTPMode="create"
259
+ selectedOfferDetails={selectedOfferDetails}
252
260
  />
253
261
  )}
254
262
  {isPreview && (
@@ -315,6 +323,14 @@ function SlideBoxContent(props) {
315
323
  onTestContentClicked={onTestContentClicked}
316
324
  />
317
325
  )}
326
+ {isEditFTP && (
327
+ <FTP
328
+ mode="edit"
329
+ onFTPSubmit={onFTPSubmit}
330
+ messageDetails={messageDetails}
331
+ selectedOfferDetails={selectedOfferDetails}
332
+ />
333
+ )}
318
334
  {
319
335
  isEditCallTask &&
320
336
  <CallTask
@@ -366,6 +382,7 @@ function SlideBoxContent(props) {
366
382
  step={templateStep}
367
383
  showNextStep={onCreateNextStep}
368
384
  isFullMode={isFullMode}
385
+ editor={editor}
369
386
  cap={cap}
370
387
  onResetStep={onResetStep}
371
388
  showTemplateName={showTemplateName}
@@ -392,6 +409,7 @@ function SlideBoxContent(props) {
392
409
  getFormSubscriptionData={getFormData}
393
410
  getDefaultTags={type}
394
411
  isFullMode={isFullMode}
412
+ editor={editor}
395
413
  cap={cap}
396
414
  showTemplateName={showTemplateName}
397
415
  onValidationFail={onValidationFail}
@@ -456,6 +474,7 @@ function SlideBoxContent(props) {
456
474
  messageDetails={messageDetails}
457
475
  cap={cap}
458
476
  onFacebookSubmit={onFacebookSubmit}
477
+ isFullMode={isFullMode}
459
478
  />
460
479
  )
461
480
  }
@@ -539,5 +558,6 @@ SlideBoxContent.propTypes = {
539
558
  onCreateComplete: PropTypes.func,
540
559
  saveMessage: PropTypes.func,
541
560
  selectedAccount: PropTypes.object,
561
+ onFTPSubmit: PropTypes.func,
542
562
  };
543
563
  export default SlideBoxContent;
@@ -15,6 +15,8 @@ function getChannelLabel(channel = '') {
15
15
  email: 'Email',
16
16
  mobilepush: 'Push notification',
17
17
  wechat: 'Wechat',
18
+ no_communication: 'NO_COMMUNICATION',
19
+ ftp: 'FTP',
18
20
  };
19
21
  return labels[channel.toLowerCase()];
20
22
  }
@@ -13,5 +13,7 @@ export const CALL_TASK = "CALL_TASK";
13
13
  export const MOBILE_PUSH = "MOBILEPUSH";
14
14
  export const WECHAT = "WECHAT";
15
15
  export const FACEBOOK = "FACEBOOK";
16
+ export const FTP = "FTP";
17
+ export const NO_COMMUNICATION = "NO_COMMUNICATION";
16
18
  export const SHOW_CONTANER_LOADER = "app/CreativesContainer/SHOW_CONTANER_LOADER";
17
19
  export const HIDE_CONTAINER_LOADER = "app/CreativesContainer/HIDE_CONTAINER_LOADER";
@@ -143,6 +143,13 @@ class Creatives extends React.Component {
143
143
  const {channel} = templateData;
144
144
  let creativesTemplateData = {type: channel };
145
145
  switch (channel) {
146
+ case constants.NO_COMMUNICATION: {
147
+ creativesTemplateData = {
148
+ type: channel,
149
+ ...templateData,
150
+ };
151
+ break;
152
+ }
146
153
  case constants.SMS: {
147
154
  const formData = {
148
155
  "sms-editor": templateData.messageBody,
@@ -533,7 +540,7 @@ class Creatives extends React.Component {
533
540
  }
534
541
  render() {
535
542
  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;
543
+ const {isFullMode, creativesMode, cap, isUploading, channelsToHide, selectedWeChatAccount, forwardedTags, channelsToDisable, selectedOfferDetails, onTestContentClicked, onPreviewContentClicked, getCreativesData, fetchingCmsData, editor} = this.props;
537
544
  const mapTemplateCreate = slidBoxContent === 'createTemplate' && weChatTemplateType === MAP_TEMPLATE && templateStep !== 'modeSelection';
538
545
  /* TODO: Instead of passing down same props separately to each component down, write common function to these props and pass it accordingly */
539
546
  return (
@@ -606,6 +613,8 @@ class Creatives extends React.Component {
606
613
  selectedAccount={this.props.selectedAccount}
607
614
  onShowTemplates={this.onShowTemplates}
608
615
  handleClose={this.handleCloseSlideBox}
616
+ onFTPSubmit={getCreativesData}
617
+ editor={editor}
609
618
  />
610
619
  }
611
620
  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