@capillarytech/creatives-library 6.13.9 → 6.14.0

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 (43) hide show
  1. package/app.js +2 -5
  2. package/components/FormBuilder/index.js +2 -6
  3. package/containers/Ebill/index.js +0 -3
  4. package/containers/Email/index.js +8 -16
  5. package/containers/Sms/Create/index.js +1 -2
  6. package/containers/Templates/index.js +3 -0
  7. package/index.js +1 -8
  8. package/package.json +2 -2
  9. package/reducers.js +0 -2
  10. package/routes.js +1 -7
  11. package/services/api.js +3 -7
  12. package/translations/en.json +107 -50
  13. package/translations/zh.json +107 -50
  14. package/v2Components/FormBuilder/index.js +11 -5
  15. package/v2Components/TemplatePreview/_templatePreview.scss +2 -8
  16. package/v2Components/TemplatePreview/index.js +18 -104
  17. package/v2Containers/App/constants.js +1 -1
  18. package/v2Containers/CreativesContainer/SlideBoxContent.js +4 -71
  19. package/v2Containers/CreativesContainer/constants.js +0 -2
  20. package/v2Containers/CreativesContainer/index.js +5 -40
  21. package/v2Containers/Email/actions.js +1 -2
  22. package/v2Containers/Email/index.js +29 -45
  23. package/v2Containers/Email/sagas.js +2 -2
  24. package/v2Containers/EmailWrapper/index.js +0 -2
  25. package/v2Containers/Templates/_templates.scss +0 -57
  26. package/v2Containers/Templates/actions.js +110 -117
  27. package/v2Containers/Templates/constants.js +0 -2
  28. package/v2Containers/Templates/index.js +6 -86
  29. package/v2Containers/Templates/messages.js +0 -4
  30. package/v2Containers/Templates/reducer.js +0 -2
  31. package/v2Containers/TemplatesV2/index.js +7 -14
  32. package/v2Containers/TemplatesV2/messages.js +0 -4
  33. package/v2Containers/WeChat/MapTemplates/index.js +1 -1
  34. package/assets/viber.png +0 -0
  35. package/utils/ignoredErrorMessages.js +0 -4
  36. package/v2Containers/Viber/_viber.scss +0 -3
  37. package/v2Containers/Viber/actions.js +0 -74
  38. package/v2Containers/Viber/constants.js +0 -30
  39. package/v2Containers/Viber/index.js +0 -707
  40. package/v2Containers/Viber/messages.js +0 -137
  41. package/v2Containers/Viber/reducer.js +0 -84
  42. package/v2Containers/Viber/sagas.js +0 -107
  43. package/v2Containers/Viber/selectors.js +0 -21
@@ -2,7 +2,6 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import styled from 'styled-components';
4
4
  import get from 'lodash/get';
5
- import cloneDeep from 'lodash/cloneDeep';
6
5
  import TemplatesV2 from '../TemplatesV2';
7
6
  import TemplatePreview from '../../v2Components/TemplatePreview';
8
7
  import SmsCreate from '../Sms/Create';
@@ -19,7 +18,6 @@ import CallTask from '../CallTask';
19
18
  import MobliPushEdit from '../MobilePush/Edit';
20
19
  import * as constants from './constants';
21
20
  import LineContainer from '../Line/Container';
22
- import Viber from '../Viber';
23
21
  const CreativesWrapper = styled.div`
24
22
  .ant-popover,
25
23
  .ant-notification,
@@ -34,6 +32,7 @@ function getWechatTemplateType(mode, templateData, weChatTemplateType = '') {
34
32
  }
35
33
  return weChatTemplateType;
36
34
  }
35
+
37
36
  const getLineType = ({
38
37
  slidBoxContent,
39
38
  channel,
@@ -70,23 +69,7 @@ const getLineType = ({
70
69
  }
71
70
  }
72
71
  return {};
73
- };
74
- const getViber = ({
75
- slidBoxContent,
76
- channel,
77
- isFullMode,
78
- templateData,
79
- }) => {
80
- if ((channel === constants.VIBER || (slidBoxContent === 'editTemplate' && templateData && templateData.type === constants.VIBER)) && slidBoxContent !== 'templates') {
81
- const isCreate = slidBoxContent === 'createTemplate';
82
- const isEdit = slidBoxContent === 'editTemplate';
83
- return {
84
- isCreate,
85
- isEdit,
86
- };
87
- }
88
- return {};
89
- };
72
+ }
90
73
 
91
74
  function SlideBoxContent(props) {
92
75
  const {
@@ -113,7 +96,6 @@ function SlideBoxContent(props) {
113
96
  cap,
114
97
  onResetStep,
115
98
  isFullMode,
116
- editor,
117
99
  onCallTaskSubmit,
118
100
  setIsLoadingContent,
119
101
  showTemplateName,
@@ -152,15 +134,6 @@ function SlideBoxContent(props) {
152
134
  isFullMode,
153
135
  templateData,
154
136
  });
155
- const {isCreate: isCreateViber = false,
156
- isEdit: isEditViber = false } = getViber({
157
- slidBoxContent,
158
- channel,
159
- isFullMode,
160
- templateData,
161
- });
162
-
163
-
164
137
  const isCreateSms = slidBoxContent === 'createTemplate' && channel === constants.SMS;
165
138
  const isCreateMPush = slidBoxContent === 'createTemplate' && channel === constants.MOBILE_PUSH;
166
139
  const isCreateCallTask = slidBoxContent === 'createTemplate' && channel === constants.CALL_TASK;
@@ -182,7 +155,7 @@ function SlideBoxContent(props) {
182
155
  isEditEmailWithId = slidBoxContent === 'editTemplate' && channel === constants.EMAIL && templateData._id;
183
156
  isEmailEditWithContent = slidBoxContent === 'editTemplate' && channel === constants.EMAIL && !templateData._id;
184
157
  isEditFacebook = slidBoxContent === 'editTemplate' && channel === constants.FACEBOOK;
185
- isPreview = slidBoxContent === 'preview' && (channel === constants.SMS || channel === constants.LINE || channel === constants.VIBER);
158
+ isPreview = slidBoxContent === 'preview' && (channel === constants.SMS || channel === constants.LINE);
186
159
  isEmailPreview = slidBoxContent === 'preview' && channel === constants.EMAIL;
187
160
  isMpushPreview = slidBoxContent === 'preview' && channel === constants.MOBILE_PUSH;
188
161
  }
@@ -211,7 +184,7 @@ function SlideBoxContent(props) {
211
184
  } = {},
212
185
  template,
213
186
  }) => {
214
- const previewContent = {};
187
+ let previewContent = {};
215
188
  previewContent.messageContent = text;
216
189
  previewContent.previewImageUrl = previewImageUrl;
217
190
  previewContent.selectedSticker = selectedSticker || {
@@ -249,16 +222,6 @@ function SlideBoxContent(props) {
249
222
  return previewContent;
250
223
  });
251
224
  }
252
- case constants.VIBER: {
253
- const template = cloneDeep(templateDataObject);
254
- const { text = "", imageURL = "", buttonText = "" } = get(template, 'versions.base.content.viber', {});
255
- template.content = {
256
- messageContent: text,
257
- imageURL,
258
- buttonText,
259
- };
260
- return template.content;
261
- }
262
225
  default:
263
226
  return get(templateDataObject, `versions.base.content`);
264
227
  }
@@ -403,7 +366,6 @@ function SlideBoxContent(props) {
403
366
  step={templateStep}
404
367
  showNextStep={onCreateNextStep}
405
368
  isFullMode={isFullMode}
406
- editor={editor}
407
369
  cap={cap}
408
370
  onResetStep={onResetStep}
409
371
  showTemplateName={showTemplateName}
@@ -430,7 +392,6 @@ function SlideBoxContent(props) {
430
392
  getFormSubscriptionData={getFormData}
431
393
  getDefaultTags={type}
432
394
  isFullMode={isFullMode}
433
- editor={editor}
434
395
  cap={cap}
435
396
  showTemplateName={showTemplateName}
436
397
  onValidationFail={onValidationFail}
@@ -495,7 +456,6 @@ function SlideBoxContent(props) {
495
456
  messageDetails={messageDetails}
496
457
  cap={cap}
497
458
  onFacebookSubmit={onFacebookSubmit}
498
- isFullMode={isFullMode}
499
459
  />
500
460
  )
501
461
  }
@@ -536,33 +496,6 @@ function SlideBoxContent(props) {
536
496
  />
537
497
  )
538
498
  }
539
- {isCreateViber && (
540
- <Viber
541
- location={creativesLocationProps}
542
- onCreateComplete={onCreateComplete}
543
- isFullMode={isFullMode}
544
- handleClose={handleClose}
545
- isGetFormData={isGetFormData}
546
- getFormSubscriptionData={getFormData}
547
- onShowTemplates={onShowTemplates}
548
- templateData={templateData}
549
- createNew/>
550
- )}
551
-
552
- {isEditViber && <Viber
553
- location={creativesLocationProps}
554
- params={{
555
- id: templateData._id,
556
- }}
557
- onCreateComplete={onCreateComplete}
558
- isFullMode={isFullMode}
559
- handleClose={handleClose}
560
- isGetFormData={isGetFormData}
561
- getFormSubscriptionData={getFormData}
562
- onShowTemplates={onShowTemplates}
563
- templateData={templateData}
564
- createNew/> }
565
-
566
499
  </CreativesWrapper>
567
500
  );
568
501
  }
@@ -13,7 +13,5 @@ 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 VIBER = "VIBER";
17
-
18
16
  export const SHOW_CONTANER_LOADER = "app/CreativesContainer/SHOW_CONTANER_LOADER";
19
17
  export const HIDE_CONTAINER_LOADER = "app/CreativesContainer/HIDE_CONTAINER_LOADER";
@@ -5,7 +5,7 @@ import {
5
5
  } from '@capillarytech/cap-ui-library';
6
6
  import { injectIntl, FormattedMessage } from 'react-intl';
7
7
  import classnames from 'classnames';
8
- import {isEmpty, get, forEach, cloneDeep} from 'lodash';
8
+ import {isEmpty, get, forEach} from 'lodash';
9
9
  import { connect } from 'react-redux';
10
10
  import { createStructuredSelector } from 'reselect';
11
11
  import { bindActionCreators } from 'redux';
@@ -18,6 +18,7 @@ import SlideBoxHeader from './SlideBoxHeader';
18
18
  import SlideBoxFooter from './SlideBoxFooter';
19
19
  import * as constants from './constants';
20
20
  import * as commonUtil from '../../utils/common';
21
+
21
22
  import './index.scss';
22
23
  import * as templateActions from '../Templates/actions';
23
24
  import * as globalActions from '../Cap/actions';
@@ -246,24 +247,6 @@ class Creatives extends React.Component {
246
247
  };
247
248
  break;
248
249
  }
249
- case constants.VIBER: {
250
- const { messageBody, isDefault } = templateData;
251
- const viber = JSON.parse(messageBody || '{}');
252
- creativesTemplateData = {
253
- type: constants.VIBER,
254
- isDefault,
255
- edit: true,
256
- name: "",
257
- versions: {
258
- base: {
259
- content: {
260
- ...viber,
261
- },
262
- },
263
- },
264
- };
265
- break;
266
- }
267
250
  default:
268
251
  break;
269
252
  }
@@ -349,23 +332,6 @@ class Creatives extends React.Component {
349
332
  };
350
333
  }
351
334
  break;
352
- case constants.VIBER:
353
- if (template.value) {
354
- const { Templates = {} } = this.props || {};
355
- const selectedViberAccount = Templates && Templates.selectedViberAccount;
356
- const accountDetails = selectedViberAccount || '';
357
- const accountId = selectedViberAccount ? selectedViberAccount.id : '';
358
- const { versions } = template.value;
359
- const content = cloneDeep(versions.base.content);
360
- content.scenarioKey = get(accountDetails, 'configs.scenario_key');
361
- templateData = {
362
- channel,
363
- accountId,
364
- accountDetails,
365
- messageBody: JSON.stringify(content),
366
- };
367
- }
368
- break;
369
335
  default:
370
336
  break;
371
337
  }
@@ -480,8 +446,8 @@ class Creatives extends React.Component {
480
446
  }
481
447
  }
482
448
 
483
- const isLineViberChannel = templateData && [constants.LINE, constants.VIBER].includes(templateData);
484
- if ([constants.LINE, constants.VIBER].includes(channel) || isLineViberChannel) {
449
+ const isLineChannel = templateData && templateData.type === constants.LINE;
450
+ if (channel === constants.LINE || isLineChannel) {
485
451
  showFooter = false;
486
452
  }
487
453
 
@@ -567,7 +533,7 @@ class Creatives extends React.Component {
567
533
  }
568
534
  render() {
569
535
  const {slidBoxContent, isGetFormData, showSlideBox, templateData, currentChannel, emailCreateMode, templateStep, isLoadingContent, mobilePushCreateMode, isDiscardMessage, weChatTemplateType, weChatMaptemplateStep} = this.state;
570
- const {isFullMode, creativesMode, cap, isUploading, channelsToHide, selectedWeChatAccount, forwardedTags, channelsToDisable, selectedOfferDetails, onTestContentClicked, onPreviewContentClicked, getCreativesData, fetchingCmsData, editor} = this.props;
536
+ const {isFullMode, creativesMode, cap, isUploading, channelsToHide, selectedWeChatAccount, forwardedTags, channelsToDisable, selectedOfferDetails, onTestContentClicked, onPreviewContentClicked, getCreativesData, fetchingCmsData} = this.props;
571
537
  const mapTemplateCreate = slidBoxContent === 'createTemplate' && weChatTemplateType === MAP_TEMPLATE && templateStep !== 'modeSelection';
572
538
  /* TODO: Instead of passing down same props separately to each component down, write common function to these props and pass it accordingly */
573
539
  return (
@@ -640,7 +606,6 @@ class Creatives extends React.Component {
640
606
  selectedAccount={this.props.selectedAccount}
641
607
  onShowTemplates={this.onShowTemplates}
642
608
  handleClose={this.handleCloseSlideBox}
643
- editor={editor}
644
609
  />
645
610
  }
646
611
  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, isBEEAppEnable) {
41
+ export function getCmsSetting(cmsType, projectId, cmsMode, langId, isEdmSupport) {
42
42
  return {
43
43
  type: types.GET_CMS_EDITOR_DETAILS_REQUEST,
44
44
  cmsType,
@@ -46,7 +46,6 @@ export function getCmsSetting(cmsType, projectId, cmsMode, langId, isEdmSupport,
46
46
  cmsMode,
47
47
  langId,
48
48
  isEdmSupport,
49
- isBEEAppEnable,
50
49
  };
51
50
  }
52
51
 
@@ -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
- const isBEEAppEnable = this.checkBeeEditorAllowedForLibrary();
187
- if (!_.isEmpty(this.props.Templates.BEETemplate)) {
188
- if (this.props.Templates.BEETemplate.versions.base.is_drag_drop && isBEEAppEnable ) {
186
+
187
+ if (!_.isEmpty(this.props.Templates.BEETemplate) ) {
188
+ if (this.props.Templates.BEETemplate.versions.base.is_drag_drop) {
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, isBEEAppEnable);
192
+ this.props.actions.getCmsSetting(BEE_PLUGIN, this.props.Templates.BEETemplate._id, 'open', undefined, isBEESupport);
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, isBEEAppEnable);
194
+ this.props.actions.getCmsSetting(BEE_PLUGIN, this.props.Templates.BEETemplate._id, 'create', undefined, isBEESupport);
195
195
  }
196
196
  }
197
197
  this.setState({ content: (this.props.Templates.selectedEmailLayout ? this.props.Templates.selectedEmailLayout : ''), formData});
@@ -214,15 +214,6 @@ 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
-
226
217
  componentWillReceiveProps(nextProps) {
227
218
  // if (this.props.location.query.type === 'embedded') {
228
219
  // this.showNext();
@@ -324,9 +315,8 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
324
315
  if (nextProps.location.query.module === 'library' && nextProps.isGetFormData) {
325
316
  const formData = this.state.formData;
326
317
  let isBeeEditor = false;
327
- const isBEEEnable = this.checkBeeEditorAllowedForLibrary();
328
318
  _.forEach(formData[0].selectedLanguages, (language) => {
329
- if (formData[0][language].is_drag_drop && isBEEEnable) {
319
+ if (formData[0][language].is_drag_drop) {
330
320
  isBeeEditor = true;
331
321
  }
332
322
  });
@@ -359,7 +349,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
359
349
  const temp = (schema.containers || {})[this.state.currentTab - 1];
360
350
 
361
351
  const { currentTab } = this.state;
362
- if (nextProps.Email.CmsSettings.isDragDrop && this.checkBeeEditorAllowedForLibrary()) {
352
+ if (nextProps.Email.CmsSettings.isDragDrop) {
363
353
  const beeJson = `BEEeditor${currentTab > 1 ? currentTab : ''}json`;
364
354
  const beeToken = `BEEeditor${currentTab > 1 ? currentTab : ''}token`;
365
355
  let beeJsonValue = _.get(nextProps, 'Templates.BEETemplate.versions.base.json-content', '');
@@ -419,8 +409,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
419
409
  }
420
410
 
421
411
  this.setState({ formData }, () => {
422
- const isDragDrop = this.checkBeeEditorAllowedForLibrary() && nextProps.Email.CmsSettings.isDragDrop;
423
- this.hideEdmOptions(isDragDrop);
412
+ this.hideEdmOptions(nextProps.Email.CmsSettings.isDragDrop);
424
413
  });
425
414
  }
426
415
  if (nextProps.Email.createTemplateError && !_.isEqual(nextProps.Email.createTemplateError, this.props.Email.createTemplateError)) {
@@ -480,7 +469,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
480
469
  if ( !_.isEqual(nextProps.Email.uploadAssetSuccess, this.props.Email.uploadAssetSuccess) && nextProps.Email.uploadAssetSuccess) {
481
470
  const isDragDrop = this.state.formData[`${this.state.currentTab - 1}`][this.state.formData[`${this.state.currentTab - 1}`].activeTab].is_drag_drop;
482
471
  const isBEESupport = (this.props.location.query.isBEESupport !== "false") || false;
483
- if (isDragDrop && isBEESupport && this.checkBeeEditorAllowedForLibrary()) {
472
+ if (isDragDrop && isBEESupport) {
484
473
  const evtData = JSON.parse(this.edmEvent.data);
485
474
  if (evtData.action === 'editBackground') {
486
475
  this.edmEvent.source.postMessage(JSON.stringify({
@@ -526,8 +515,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
526
515
  }
527
516
  if (!_.isEmpty(nextProps.Email.templateDetails) && _.isEmpty(this.props.Email.templateDetails) ) {
528
517
  const base = nextProps.Email.templateDetails.versions.base;
529
- const activeBase = nextProps.Email.templateDetails.versions.base[base.activeTab];
530
- if (activeBase && activeBase.is_drag_drop && this.checkBeeEditorAllowedForLibrary()) {
518
+ if (nextProps.Email.templateDetails.versions.base[base.activeTab].is_drag_drop) {
531
519
  this.setState({isDragDrop: true});
532
520
  }
533
521
  }
@@ -592,7 +580,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
592
580
  //this.resetCkEditorInstance(data, formData);
593
581
  const schema = _.cloneDeep(this.state.schema);
594
582
  const container = schema.containers[`${data - 1}`];
595
- if (formData[`${data - 1}`][formData[`${data - 1}`].activeTab].is_drag_drop && this.checkBeeEditorAllowedForLibrary()) {
583
+ if (formData[`${data - 1}`][formData[`${data - 1}`].activeTab].is_drag_drop) {
596
584
  container.tabBarExtraContent.sections[0].inputFields[0].cols[4].content.sections[0].inputFields[3].cols[0].style = {display: ""};
597
585
  container.tabBarExtraContent.sections[0].inputFields[0].cols[2].style.display = "none";
598
586
  } else {
@@ -617,7 +605,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
617
605
  const formData = _.cloneDeep(this.state.formData);
618
606
  const isBEESupport = (this.props.location.query.isBEESupport !== "false") || false;
619
607
 
620
- if (isDragDrop && isBEESupport && this.checkBeeEditorAllowedForLibrary()) {
608
+ if (isDragDrop && isBEESupport) {
621
609
  let msg = {};
622
610
  if (data === "unsubscribe") {
623
611
  const anchor = `<a href='{{${data}}}'>${data}</a>`;
@@ -660,9 +648,9 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
660
648
  const base = formData.base || {};
661
649
  const isDragDrop = _.get(base[base.activeTab], 'is_drag_drop');
662
650
  let editorType = '';
663
- if ( isDragDrop === true && this.checkBeeEditorAllowedForLibrary()) {
651
+ if ( isDragDrop === true) {
664
652
  editorType = 'edmEditor';
665
- } else if (isDragDrop === false && !this.checkBeeEditorAllowedForLibrary()) {
653
+ } else if (isDragDrop === false) {
666
654
  editorType = 'ckEditor';
667
655
  }
668
656
  GA.timeTracker.stopTimer(isEdit ? TRACK_EDIT_EMAIL : TRACK_CREATE_EMAIL, {
@@ -717,7 +705,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
717
705
  _.forEach(formData, (val, index) => {
718
706
  if (!isNaN(index)) {
719
707
  _.forEach(val.selectedLanguages, (language) => {
720
- if (val[language].is_drag_drop && this.checkBeeEditorAllowedForLibrary()) {
708
+ if (val[language].is_drag_drop) {
721
709
  that.props.actions.getCmsData(BEE_PLUGIN, id, language);
722
710
  }
723
711
  });
@@ -918,7 +906,6 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
918
906
  if (this.props.isFullMode) {
919
907
  this.props.showTemplateName({formData, onFormDataChange: this.onFormDataChange});
920
908
  }
921
- const isBEEAppEnable = this.checkBeeEditorAllowedForLibrary();
922
909
  _.forEach((editData.versions.base.selectedLanguages), (language) => {
923
910
  // if (formData[this.state.currentTab - 1].tabKey === formData[this.state.currentTab - 1][language].tabKey) {
924
911
  // formData[this.state.currentTab - 1].activeTab = language;
@@ -926,8 +913,8 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
926
913
  // if (formData.base.tabKey === formData.base[language].tabKey) {
927
914
  // formData.base.activeTab = language;
928
915
  // }
929
- if (language && editData.versions.base[language].is_drag_drop && isBEEAppEnable) {
930
- this.props.actions.getCmsSetting(BEE_PLUGIN, editData._id, 'open', language, isBEESupport, isBEEAppEnable);
916
+ if (language && editData.versions.base[language].is_drag_drop) {
917
+ this.props.actions.getCmsSetting(BEE_PLUGIN, editData._id, 'open', language, isBEESupport);
931
918
  }
932
919
  });
933
920
 
@@ -1010,12 +997,11 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
1010
997
  }
1011
998
  saveValidationData = () => {
1012
999
  let saveCount = 0;
1013
- const isBeeEnable = this.checkBeeEditorAllowedForLibrary();
1014
1000
  this.setState({saveEdmDataMode: 'validation', saveCount: 0, cmsDataCount: 0}, () => {
1015
1001
  _.forEach(this.state.formData, (newdata, index) => {
1016
1002
  if (!isNaN(index)) {
1017
1003
  _.forEach(newdata.selectedLanguages, (language) => {
1018
- if (newdata[language].is_drag_drop && isBeeEnable && ((parseInt(index, 10) + 1) === this.state.currentTab)) {
1004
+ if (newdata[language].is_drag_drop && ((parseInt(index, 10) + 1) === this.state.currentTab)) {
1019
1005
  saveCount += 1;
1020
1006
  }
1021
1007
  });
@@ -1132,14 +1118,14 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
1132
1118
 
1133
1119
  copyPrimaryLanguage = () => {
1134
1120
  const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
1135
- const isBEEAppEnable = this.checkBeeEditorAllowedForLibrary();
1121
+
1136
1122
  this.setState({addLanguageType: "copyPrimaryLanguage"}, () => {
1137
1123
  this.setState({showModal: false});
1138
1124
  const formData = _.cloneDeep(this.state.formData);
1139
1125
  const currentTab = this.state.currentTab - 1;
1140
1126
  const baseLanguage = this.props.currentOrgDetails.basic_details.base_language ? this.props.currentOrgDetails.basic_details.base_language : 'en';
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);
1127
+ if (formData[currentTab][baseLanguage].is_drag_drop) {
1128
+ this.props.actions.getCmsSetting(BEE_PLUGIN, formData[currentTab][baseLanguage].drag_drop_id, 'duplicate', baseLanguage, isEdmSupport);
1143
1129
  }
1144
1130
  });
1145
1131
  }
@@ -1517,7 +1503,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
1517
1503
  const data = _.find(this.props.Email.assetList, {_id: id});
1518
1504
 
1519
1505
  if (data) {
1520
- if (isDragDrop && isEdmSupport && this.checkBeeEditorAllowedForLibrary()) {
1506
+ if (isDragDrop && isEdmSupport) {
1521
1507
  const evtData = JSON.parse(this.edmEvent.data);
1522
1508
  if (evtData.action === 'editBackground') {
1523
1509
  this.edmEvent.source.postMessage(JSON.stringify({
@@ -1552,7 +1538,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
1552
1538
 
1553
1539
  toggleEmailPreview = () => {
1554
1540
  const isDragDrop = this.state.formData[`${this.state.currentTab - 1}`][this.state.formData[`${this.state.currentTab - 1}`].activeTab].is_drag_drop;
1555
- if (isDragDrop && !this.state.showEmailPreview && this.checkBeeEditorAllowedForLibrary()) {
1541
+ if (isDragDrop && !this.state.showEmailPreview) {
1556
1542
  this.handleEdmSave();
1557
1543
  this.setState({mode: "preview", gettingPreviewData: true});
1558
1544
  } else if (this.state.showEmailPreview) {
@@ -2131,10 +2117,9 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
2131
2117
  "language": this.supportedLanguages[languageIndex].language,
2132
2118
  "template-content": templates.html_content,
2133
2119
  };
2134
- const isBEEAppEnable = this.checkBeeEditorAllowedForLibrary();
2135
- if (templates.drag_drop_id && isBEEAppEnable) {
2120
+ if (templates.drag_drop_id) {
2136
2121
  tempData.drag_drop_id = templates.drag_drop_id;
2137
- this.props.actions.getCmsSetting(BEE_PLUGIN, tempData._id, 'open', tempData.iso_code, isEdmSupport, isBEEAppEnable);
2122
+ this.props.actions.getCmsSetting(BEE_PLUGIN, tempData._id, 'open', tempData.iso_code, isEdmSupport);
2138
2123
  }
2139
2124
  // formData.usingTabContainer = true;
2140
2125
  // formData.tabCount = 1;
@@ -2158,10 +2143,9 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
2158
2143
 
2159
2144
  this.setState({formData, loading: false, injectedTags: data.tags, tabKey, isDragDrop: (data.base.is_drag_drop !== 0 )}, () => {
2160
2145
  // this.setState({tabKey: ''});
2161
- const isBEEEnable = this.checkBeeEditorAllowedForLibrary();
2162
2146
  _.forEach(formData[0].selectedLanguages, (language) => {
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);
2147
+ if (formData[0][language].is_drag_drop) {
2148
+ this.props.actions.getCmsSetting(BEE_PLUGIN, formData[0][language].drag_drop_id, 'open', language, isEdmSupport);
2165
2149
  }
2166
2150
  });
2167
2151
  });
@@ -2498,8 +2482,8 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
2498
2482
  // const isEdmSupport = (this.props.location.query.isEdmSupport) ? this.props.location.query.isEdmSupport : true;
2499
2483
  // let getQuery = '';
2500
2484
  const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
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);
2485
+
2486
+ this.props.actions.getCmsSetting(BEE_PLUGIN, data._id, 'create', this.state.formData[this.state.currentTab - 1].activeTab, isEdmSupport);
2503
2487
  // this.props.templatesActions.setEdmTemplate(data);
2504
2488
  this.toggleEdmEmailTemplateSelection();
2505
2489
  // 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, isBEEAppEnable}) {
54
+ export function* getCmsSetting({cmsType, projectId, cmsMode, langId, isEdmSupport}) {
55
55
  try {
56
- const result = yield call(Api.getCmsTemplateSettingsV2, cmsType, projectId, cmsMode, langId, isEdmSupport, isBEEAppEnable);
56
+ const result = yield call(Api.getCmsTemplateSettingsV2, cmsType, projectId, cmsMode, langId, isEdmSupport);
57
57
 
58
58
  yield put({ type: types.GET_CMS_EDITOR_DETAILS_SUCCESS, settings: result.data.response.cmsDetails });
59
59
  } catch (error) {
@@ -196,7 +196,6 @@ export class EmailWrapper extends React.Component { // eslint-disable-line react
196
196
  onPreviewContentClicked,
197
197
  onTestContentClicked,
198
198
  cmsTemplatesLoader,
199
- editor,
200
199
  } = this.props;
201
200
  const {
202
201
  templateName,
@@ -260,7 +259,6 @@ export class EmailWrapper extends React.Component { // eslint-disable-line react
260
259
  selectedOfferDetails={selectedOfferDetails}
261
260
  onPreviewContentClicked={onPreviewContentClicked}
262
261
  onTestContentClicked={onTestContentClicked}
263
- editor={editor}
264
262
  />}
265
263
  {!isShowEmailCreate && (
266
264
  <CmsTemplatesComponent
@@ -46,63 +46,6 @@
46
46
  }
47
47
  }
48
48
  }
49
- .VIBER {
50
- &.cap-custom-card{
51
- height: 241px;
52
- .ant-card-body {
53
- padding:0px 24px 0px;
54
- .button-content {
55
- .ant-card-meta-description {
56
- min-width: 108px;
57
- max-width: 160px;
58
- height: 24px;
59
- padding: 1px 23px 2px 22px;
60
- border-radius: 16px;
61
- font-size: 14px;
62
- font-weight: 500;
63
- background-color:$CAP_PURPLE01;
64
- color:$CAP_WHITE;
65
- text-align:center;
66
- }
67
- }
68
- .truncate-text-viber{
69
- .ant-card-meta-description{
70
- display: -webkit-box;
71
- -webkit-line-clamp: 9;
72
- -webkit-box-orient: vertical;
73
- }
74
- }
75
- .truncate-text-with-button{
76
- .ant-card-meta-description{
77
- -webkit-line-clamp: 8;
78
- }
79
- }
80
- .truncate-text-with-image{
81
- .ant-card-meta-description{
82
- -webkit-line-clamp: 2;
83
- }
84
- }
85
-
86
- }
87
-
88
- &.no-image .ant-card-meta {
89
- .ant-card-meta-description {
90
- word-wrap: break-word;
91
- }
92
- }
93
-
94
-
95
- &.carousel-img-section {
96
- .ant-card-body {
97
- padding: $CAP_SPACE_24 0;
98
- }
99
- .ant-card-meta {
100
- padding: 0;
101
- }
102
- }
103
- }
104
-
105
- }
106
49
  }
107
50
  }
108
51