@capillarytech/creatives-library 6.12.18 → 6.12.22

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 CHANGED
@@ -14,7 +14,7 @@ const config = {
14
14
  accountConfig: (strs, accountId) => `${window.location.origin}/org/config/AccountAdd?q=a&channelId=2&accountId=${accountId}&edit=1`,
15
15
  },
16
16
  development: {
17
- api_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/creatives',
17
+ api_endpoint: 'http://localhost:2022/arya/api/v1/creatives',
18
18
  campaigns_api_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/iris/v2/campaigns',
19
19
  auth_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/auth',
20
20
  arya_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "6.12.18",
4
+ "version": "6.12.22",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
package/services/api.js CHANGED
@@ -319,12 +319,11 @@ export const getCmsTemplateSettings = (cmsType, projectId, cmsMode, langId, isEd
319
319
  return API.get(url);
320
320
  };
321
321
 
322
- export const getCmsTemplateSettingsV2 = (cmsType, projectId, cmsMode, langId, isEdmSupport) => {
323
- const url = `${API_ENDPOINT}/cms/v2/getDetails/?type=${cmsType}&projectId=${projectId}&cmsMode=${cmsMode}&langId=${langId}&isEdmSupport=${isEdmSupport ? 1 : 0}`;
322
+ export const getCmsTemplateSettingsV2 = (cmsType, projectId, cmsMode, langId, isEdmSupport, disableBEE) => {
323
+ const url = `${API_ENDPOINT}/cms/v2/getDetails/?type=${cmsType}&projectId=${projectId}&cmsMode=${cmsMode}&langId=${langId}&isEdmSupport=${isEdmSupport ? 1 : 0}&disableBEE=${disableBEE}`;
324
324
  return API.get(url);
325
325
  };
326
326
 
327
-
328
327
  export const getCmsTemplateData = (cmsType, projectId, langId) => {
329
328
  const url = `${API_ENDPOINT}/cms/getContent?type=${cmsType}&projectId=${projectId}&langId=${langId}`;
330
329
  return API.get(url);
@@ -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') {
@@ -3180,10 +3176,6 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
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
3178
  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
- }
3187
3179
  columns.push(
3188
3180
  <CapColumn style={val.colStyle ? val.colStyle : {}} span={val.width}>
3189
3181
  <CKEditor
@@ -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
  }
@@ -225,9 +225,9 @@ class Creatives extends React.Component {
225
225
  const messagesDefinition = JSON.parse(messages);
226
226
  let lineContent = JSON.parse(messageBody || '{}').messages || [{}];
227
227
  lineContent = lineContent.map((content, index) => ({
228
- ...content,
229
- ...(messagesDefinition[index] || {})
230
- }));
228
+ ...content,
229
+ ...(messagesDefinition[index] || {}),
230
+ }));
231
231
  creativesTemplateData = {
232
232
  type: constants.LINE,
233
233
  isDefault,
@@ -529,7 +529,7 @@ class Creatives extends React.Component {
529
529
  }
530
530
  render() {
531
531
  const {slidBoxContent, isGetFormData, showSlideBox, templateData, currentChannel, emailCreateMode, templateStep, isLoadingContent, mobilePushCreateMode, isDiscardMessage, weChatTemplateType, weChatMaptemplateStep} = this.state;
532
- const {isFullMode, creativesMode, cap, isUploading, channelsToHide, selectedWeChatAccount, forwardedTags, channelsToDisable, selectedOfferDetails, onTestContentClicked, onPreviewContentClicked, getCreativesData, fetchingCmsData} = this.props;
532
+ const {isFullMode, creativesMode, cap, isUploading, channelsToHide, selectedWeChatAccount, forwardedTags, channelsToDisable, selectedOfferDetails, onTestContentClicked, onPreviewContentClicked, getCreativesData, fetchingCmsData, editor} = this.props;
533
533
  const mapTemplateCreate = slidBoxContent === 'createTemplate' && weChatTemplateType === MAP_TEMPLATE && templateStep !== 'modeSelection';
534
534
  /* TODO: Instead of passing down same props separately to each component down, write common function to these props and pass it accordingly */
535
535
  return (
@@ -602,6 +602,7 @@ class Creatives extends React.Component {
602
602
  selectedAccount={this.props.selectedAccount}
603
603
  onShowTemplates={this.onShowTemplates}
604
604
  handleClose={this.handleCloseSlideBox}
605
+ editor={editor}
605
606
  />
606
607
  }
607
608
  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, disableBEE) {
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
+ disableBEE,
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,7 @@ 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
+ if (nextProps.Email.templateDetails.versions.base[base.activeTab].is_drag_drop && this.checkBeeEditorAllowedForLibrary()) {
519
530
  this.setState({isDragDrop: true});
520
531
  }
521
532
  }
@@ -580,7 +591,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
580
591
  //this.resetCkEditorInstance(data, formData);
581
592
  const schema = _.cloneDeep(this.state.schema);
582
593
  const container = schema.containers[`${data - 1}`];
583
- if (formData[`${data - 1}`][formData[`${data - 1}`].activeTab].is_drag_drop) {
594
+ if (formData[`${data - 1}`][formData[`${data - 1}`].activeTab].is_drag_drop && this.checkBeeEditorAllowedForLibrary()) {
584
595
  container.tabBarExtraContent.sections[0].inputFields[0].cols[4].content.sections[0].inputFields[3].cols[0].style = {display: ""};
585
596
  container.tabBarExtraContent.sections[0].inputFields[0].cols[2].style.display = "none";
586
597
  } else {
@@ -605,7 +616,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
605
616
  const formData = _.cloneDeep(this.state.formData);
606
617
  const isBEESupport = (this.props.location.query.isBEESupport !== "false") || false;
607
618
 
608
- if (isDragDrop && isBEESupport) {
619
+ if (isDragDrop && isBEESupport && this.checkBeeEditorAllowedForLibrary()) {
609
620
  let msg = {};
610
621
  if (data === "unsubscribe") {
611
622
  const anchor = `<a href='{{${data}}}'>${data}</a>`;
@@ -648,9 +659,9 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
648
659
  const base = formData.base || {};
649
660
  const isDragDrop = _.get(base[base.activeTab], 'is_drag_drop');
650
661
  let editorType = '';
651
- if ( isDragDrop === true) {
662
+ if ( isDragDrop === true && this.checkBeeEditorAllowedForLibrary()) {
652
663
  editorType = 'edmEditor';
653
- } else if (isDragDrop === false) {
664
+ } else if (isDragDrop === false && !this.checkBeeEditorAllowedForLibrary()) {
654
665
  editorType = 'ckEditor';
655
666
  }
656
667
  GA.timeTracker.stopTimer(isEdit ? TRACK_EDIT_EMAIL : TRACK_CREATE_EMAIL, {
@@ -705,7 +716,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
705
716
  _.forEach(formData, (val, index) => {
706
717
  if (!isNaN(index)) {
707
718
  _.forEach(val.selectedLanguages, (language) => {
708
- if (val[language].is_drag_drop) {
719
+ if (val[language].is_drag_drop && this.checkBeeEditorAllowedForLibrary()) {
709
720
  that.props.actions.getCmsData(BEE_PLUGIN, id, language);
710
721
  }
711
722
  });
@@ -906,6 +917,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
906
917
  if (this.props.isFullMode) {
907
918
  this.props.showTemplateName({formData, onFormDataChange: this.onFormDataChange});
908
919
  }
920
+ const isBEEAppEnable = this.checkBeeEditorAllowedForLibrary();
909
921
  _.forEach((editData.versions.base.selectedLanguages), (language) => {
910
922
  // if (formData[this.state.currentTab - 1].tabKey === formData[this.state.currentTab - 1][language].tabKey) {
911
923
  // formData[this.state.currentTab - 1].activeTab = language;
@@ -913,8 +925,8 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
913
925
  // if (formData.base.tabKey === formData.base[language].tabKey) {
914
926
  // formData.base.activeTab = language;
915
927
  // }
916
- if (language && editData.versions.base[language].is_drag_drop) {
917
- this.props.actions.getCmsSetting(BEE_PLUGIN, editData._id, 'open', language, isBEESupport);
928
+ if (language && editData.versions.base[language].is_drag_drop && isBEEAppEnable) {
929
+ this.props.actions.getCmsSetting(BEE_PLUGIN, editData._id, 'open', language, isBEESupport, isBEEAppEnable);
918
930
  }
919
931
  });
920
932
 
@@ -997,11 +1009,12 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
997
1009
  }
998
1010
  saveValidationData = () => {
999
1011
  let saveCount = 0;
1012
+ const isBeeEnable = this.checkBeeEditorAllowedForLibrary();
1000
1013
  this.setState({saveEdmDataMode: 'validation', saveCount: 0, cmsDataCount: 0}, () => {
1001
1014
  _.forEach(this.state.formData, (newdata, index) => {
1002
1015
  if (!isNaN(index)) {
1003
1016
  _.forEach(newdata.selectedLanguages, (language) => {
1004
- if (newdata[language].is_drag_drop && ((parseInt(index, 10) + 1) === this.state.currentTab)) {
1017
+ if (newdata[language].is_drag_drop && isBeeEnable && ((parseInt(index, 10) + 1) === this.state.currentTab)) {
1005
1018
  saveCount += 1;
1006
1019
  }
1007
1020
  });
@@ -1118,14 +1131,14 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
1118
1131
 
1119
1132
  copyPrimaryLanguage = () => {
1120
1133
  const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
1121
-
1134
+ const isBEEAppEnable = this.checkBeeEditorAllowedForLibrary();
1122
1135
  this.setState({addLanguageType: "copyPrimaryLanguage"}, () => {
1123
1136
  this.setState({showModal: false});
1124
1137
  const formData = _.cloneDeep(this.state.formData);
1125
1138
  const currentTab = this.state.currentTab - 1;
1126
1139
  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);
1140
+ if (formData[currentTab][baseLanguage].is_drag_drop && isBEEAppEnable) {
1141
+ this.props.actions.getCmsSetting(BEE_PLUGIN, formData[currentTab][baseLanguage].drag_drop_id, 'duplicate', baseLanguage, isEdmSupport, isBEEAppEnable);
1129
1142
  }
1130
1143
  });
1131
1144
  }
@@ -1512,7 +1525,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
1512
1525
  const data = _.find(this.props.Email.assetList, {_id: id});
1513
1526
 
1514
1527
  if (data) {
1515
- if (isDragDrop && isEdmSupport) {
1528
+ if (isDragDrop && isEdmSupport && this.checkBeeEditorAllowedForLibrary()) {
1516
1529
  const evtData = JSON.parse(this.edmEvent.data);
1517
1530
  if (evtData.action === 'editBackground') {
1518
1531
  this.edmEvent.source.postMessage(JSON.stringify({
@@ -1547,7 +1560,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
1547
1560
 
1548
1561
  toggleEmailPreview = () => {
1549
1562
  const isDragDrop = this.state.formData[`${this.state.currentTab - 1}`][this.state.formData[`${this.state.currentTab - 1}`].activeTab].is_drag_drop;
1550
- if (isDragDrop && !this.state.showEmailPreview) {
1563
+ if (isDragDrop && !this.state.showEmailPreview && this.checkBeeEditorAllowedForLibrary()) {
1551
1564
  this.handleEdmSave();
1552
1565
  this.setState({mode: "preview", gettingPreviewData: true});
1553
1566
  } else if (this.state.showEmailPreview) {
@@ -2126,9 +2139,10 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
2126
2139
  "language": this.supportedLanguages[languageIndex].language,
2127
2140
  "template-content": templates.html_content,
2128
2141
  };
2129
- if (templates.drag_drop_id) {
2142
+ const isBEEAppEnable = this.checkBeeEditorAllowedForLibrary();
2143
+ if (templates.drag_drop_id && isBEEAppEnable) {
2130
2144
  tempData.drag_drop_id = templates.drag_drop_id;
2131
- this.props.actions.getCmsSetting(BEE_PLUGIN, tempData._id, 'open', tempData.iso_code, isEdmSupport);
2145
+ this.props.actions.getCmsSetting(BEE_PLUGIN, tempData._id, 'open', tempData.iso_code, isEdmSupport, isBEEAppEnable);
2132
2146
  }
2133
2147
  // formData.usingTabContainer = true;
2134
2148
  // formData.tabCount = 1;
@@ -2152,9 +2166,10 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
2152
2166
 
2153
2167
  this.setState({formData, loading: false, injectedTags: data.tags, tabKey, isDragDrop: (data.base.is_drag_drop !== 0 )}, () => {
2154
2168
  // this.setState({tabKey: ''});
2169
+ const isBEEEnable = this.checkBeeEditorAllowedForLibrary();
2155
2170
  _.forEach(formData[0].selectedLanguages, (language) => {
2156
- if (formData[0][language].is_drag_drop) {
2157
- this.props.actions.getCmsSetting(BEE_PLUGIN, formData[0][language].drag_drop_id, 'open', language, isEdmSupport);
2171
+ if (formData[0][language].is_drag_drop && isBEEEnable) {
2172
+ this.props.actions.getCmsSetting(BEE_PLUGIN, formData[0][language].drag_drop_id, 'open', language, isEdmSupport, isBEEEnable);
2158
2173
  }
2159
2174
  });
2160
2175
  });
@@ -2491,8 +2506,8 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
2491
2506
  // const isEdmSupport = (this.props.location.query.isEdmSupport) ? this.props.location.query.isEdmSupport : true;
2492
2507
  // let getQuery = '';
2493
2508
  const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
2494
-
2495
- this.props.actions.getCmsSetting(BEE_PLUGIN, data._id, 'create', this.state.formData[this.state.currentTab - 1].activeTab, isEdmSupport);
2509
+ const isBEEAppEnable = this.checkBeeEditorAllowedForLibrary();
2510
+ this.props.actions.getCmsSetting(BEE_PLUGIN, data._id, 'create', this.state.formData[this.state.currentTab - 1].activeTab, isEdmSupport, isBEEAppEnable);
2496
2511
  // this.props.templatesActions.setEdmTemplate(data);
2497
2512
  this.toggleEdmEmailTemplateSelection();
2498
2513
  // 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, disableBEE}) {
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, disableBEE);
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
@@ -52,6 +52,7 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
52
52
  //'wechat': {content: this.getTemplatesComponent('wechat'), tab: 'Wechat', key: 'wechat'},
53
53
  mPush: {content: <></>, tab: intl.formatMessage(messages.pushNotification), key: 'mobilepush'},
54
54
  line: {content: <></>, tab: intl.formatMessage(messages.line), key: 'line'},
55
+
55
56
  };
56
57
  let filteredPanes = Object.keys(defaultPanes)
57
58
  .filter((key) => !channelsToHide.includes(key)).reduce((obj = [], key) => {
@@ -152,14 +153,12 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
152
153
  );
153
154
  }
154
155
 
155
- getLineComponent = () => {
156
- return (
157
- <Line
158
- {...this.props}
159
- isCreateFlow
156
+ getLineComponent = () => (
157
+ <Line
158
+ {...this.props}
159
+ isCreateFlow
160
160
  />
161
161
  )
162
- }
163
162
 
164
163
  getTemplatesComponent(channel) {
165
164
  // const templates = this.props.Templates[`${channel}Templates`];