@capillarytech/creatives-library 6.9.9 → 6.10.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 (33) hide show
  1. package/components/CapTagList/index.js +1 -1
  2. package/components/Edmeditor/index.js +1 -1
  3. package/components/FormBuilder/index.js +1 -0
  4. package/containers/TagList/index.js +3 -3
  5. package/index.html +0 -3
  6. package/package.json +1 -2
  7. package/services/api.js +1 -16
  8. package/v2Components/CapTagList/index.js +26 -55
  9. package/v2Components/CmsTemplatesComponent/index.js +4 -4
  10. package/v2Components/Edmeditor/index.js +1 -1
  11. package/v2Components/EmailPreview/_emailPreview.scss +2 -2
  12. package/v2Components/FormBuilder/index.js +43 -78
  13. package/v2Containers/App/constants.js +0 -1
  14. package/v2Containers/CreativesContainer/SlideBoxFooter.js +2 -2
  15. package/v2Containers/CreativesContainer/index.js +2 -7
  16. package/v2Containers/Email/constants.js +0 -1
  17. package/v2Containers/Email/index.js +116 -170
  18. package/v2Containers/Email/initialSchema.js +3 -18
  19. package/v2Containers/Email/sagas.js +2 -2
  20. package/v2Containers/Email/selectors.js +0 -5
  21. package/v2Containers/EmailWrapper/index.js +3 -19
  22. package/v2Containers/TagList/index.js +6 -13
  23. package/v2Containers/Templates/actions.js +3 -8
  24. package/v2Containers/Templates/constants.js +4 -6
  25. package/v2Containers/Templates/index.js +20 -36
  26. package/v2Containers/Templates/messages.js +0 -8
  27. package/v2Containers/Templates/reducer.js +5 -13
  28. package/v2Containers/Templates/sagas.js +7 -7
  29. package/v2Containers/Templates/selectors.js +1 -19
  30. package/v2Components/BeeEditor/index.js +0 -280
  31. package/v2Components/BeeEditor/index.scss +0 -11
  32. package/v2Components/BeeEditor/messages.js +0 -71
  33. package/v2Components/BeeEditor/tests/index.test.js +0 -10
@@ -187,7 +187,7 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
187
187
  {this.props.moduleFilterEnabled ? <CapSelect getPopupContainer={(triggerNode) => triggerNode.parentNode} style={{width: '250px', marginBottom: '16px', minWidth: 'initial', display: 'inherit'}} onChange={this.props.onContextChange} defaultValue="All" options={options}>
188
188
  </CapSelect> : ''}
189
189
  <Tree
190
- styling={{height: '350px', overflow: 'auto'}}
190
+ styling={{'height': '350px', 'overflow': 'auto'}}
191
191
  onSelect={this.handleOnSelect}
192
192
  selectedKeys={this.state.tagValue}
193
193
  expandedKeys={this.state.expandedKeys}
@@ -44,7 +44,7 @@ class Edmeditor extends React.Component { // eslint-disable-line react/prefer-st
44
44
  console.log('current language edm editor loading', this.props.id, this.props.edmSrc);
45
45
  return (
46
46
  this.props.edmSrc ?
47
- (<iframe id={this.props.id} className={this.props.activeClass} src={this.props.edmSrc} height="460" width="100%" style={{height: "calc(100vh - 180px)"}}></iframe>)
47
+ (<iframe id={this.props.id} className={this.props.activeClass} src={this.props.edmSrc} height="460" width="100%" style={{"height": "calc(100vh - 180px)"}}></iframe>)
48
48
  : 'aaasass'
49
49
  );
50
50
  }
@@ -912,6 +912,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
912
912
 
913
913
  };
914
914
  saveForm(saveForm) {
915
+
915
916
  if (this.props.isNewVersionFlow && !saveForm) {
916
917
  this.props.getValidationData();
917
918
  return;
@@ -82,9 +82,9 @@ export class TagList extends React.Component { // eslint-disable-line react/pref
82
82
  console.log('Inside ', tag.label);
83
83
  mainTags[tag.value] = {
84
84
  'tag-header': true,
85
- "name": tag.label[this.props.userLocale] ? tag.label[this.props.userLocale] : tag.label.en,
86
- "desc": tag.desc ? tag.desc : tag.label.en,
87
- "subtags": tag.subtags,
85
+ name: tag.label[this.props.userLocale] ? tag.label[this.props.userLocale] : tag.label.en,
86
+ desc: tag.desc ? tag.desc : tag.label.en,
87
+ subtags: tag.subtags,
88
88
  };
89
89
  }
90
90
  });
package/index.html CHANGED
@@ -11,9 +11,6 @@
11
11
  <meta http-equiv="Pragma" content="no-cache" />
12
12
  <meta http-equiv="Expires" content="0" />
13
13
  <script src="https://use.typekit.net/ifw1ntv.js"></script>
14
-
15
- <script src="https://app-rsrc.getbee.io/plugin/BeePlugin.js" type="text/javascript"></script>
16
-
17
14
  <!-- Google Tag Manager -->
18
15
  <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
19
16
  new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "6.9.9",
4
+ "version": "6.10.0",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -16,7 +16,6 @@
16
16
  "@bugsnag/js": "^7.2.1",
17
17
  "@bugsnag/plugin-react": "^7.2.1",
18
18
  "@capillarytech/cap-ui-utils": "1.2.6",
19
- "@mailupinc/bee-plugin": "^1.2.0",
20
19
  "babel-cli": "^6.26.0",
21
20
  "chalk": "1.1.3",
22
21
  "jquery": "^3.3.1",
package/services/api.js CHANGED
@@ -319,38 +319,23 @@ 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}`;
324
- return API.get(url);
325
- };
326
-
327
-
328
322
  export const getCmsTemplateData = (cmsType, projectId, langId) => {
329
323
  const url = `${API_ENDPOINT}/cms/getContent?type=${cmsType}&projectId=${projectId}&langId=${langId}`;
330
324
  return API.get(url);
331
325
  };
332
326
 
333
- export const getCmsTemplateDataV2 = (cmsType, projectId, langId) => {
334
- const url = `${API_ENDPOINT}/cms/v2/getContent?type=${cmsType}&projectId=${projectId}&langId=${langId}`;
335
- return API.get(url);
336
- };
337
-
338
327
  export const getCmsData = (cmsType, projectId, langId) => {
339
328
  const url = `${API_ENDPOINT}/cms/getCmsData?type=${cmsType}&projectId=${projectId}&langId=${langId}`;
340
329
  return API.get(url);
341
330
  };
342
331
 
332
+
343
333
  export const getEdmTemplates = () => {
344
334
  console.log('in api.js');
345
335
  const url = `${API_ENDPOINT}/templates/email/default`;
346
336
  return request(url, getAPICallObject('GET'));
347
337
  };
348
338
 
349
- export const getDefaultBeeTemplates = () => {
350
- const url = `${API_ENDPOINT}/templates/v2/email/default`;
351
- return request(url, getAPICallObject('GET'));
352
- }
353
-
354
339
  // All about line
355
340
 
356
341
  export const createLineTemplate = ({template}) => {
@@ -156,72 +156,50 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
156
156
  }
157
157
 
158
158
  render() {
159
- const { hidePopover = false, tags = {}, intl = {}, moduleFilterEnabled, label, modalProps } = this.props;
160
- const tg = tags;
161
- const {formatMessage} = intl;
162
- const { tagValue, expandedKeys, autoExpandParent, searchValue, visible } = this.state;
159
+ const tg = this.props.tags;
163
160
  const options = [
164
161
  {
165
162
  value: "All",
166
- label: formatMessage(messages.all),
163
+ label: this.props.intl.formatMessage(messages.all),
167
164
  key: 'all',
168
165
  },
169
166
  {
170
167
  value: "Outbound",
171
- label: formatMessage(messages.outbound),
168
+ label: this.props.intl.formatMessage(messages.outbound),
172
169
  key: 'outbound',
173
170
  },
174
171
  {
175
172
  value: "Loyalty",
176
- label: formatMessage(messages.loyalty),
173
+ label: this.props.intl.formatMessage(messages.loyalty),
177
174
  key: 'loyalty',
178
175
  },
179
176
  ];
180
- const contentSection = (<div>
181
- <CapSpin tip={formatMessage(messages.gettingTags)} spinning={this.props.loading}>
182
- <Search
183
- style={{ marginBottom: 8, width: '250px'}}
184
- placeholder={formatMessage(messages.search)}
185
- onChange={this.onChange} />
186
- {moduleFilterEnabled ?
187
- <CapSelect
188
- getPopupContainer={(triggerNode) => triggerNode.parentNode}
189
- style={{width: '250px', marginBottom: '16px', minWidth: 'initial', display: 'inherit'}}
190
- onChange={this.props.onContextChange}
191
- defaultValue={formatMessage(messages.all)}
192
- options={options}>
193
- </CapSelect> : ''}
194
- <CapTree
195
- styling={{height: '350px', overflow: 'auto'}}
196
- onSelect={this.handleOnSelect}
197
- selectedKeys={tagValue}
198
- expandedKeys={expandedKeys}
199
- autoExpandParent={autoExpandParent}
200
- onExpand={this.onExpand}
201
- >
202
- {this.renderTags(tg, searchValue)}
203
- </CapTree>
204
- </CapSpin>
205
- </div>);
206
177
  return (
207
- <>
208
- {hidePopover ? <CapModal
209
- visible={this.props.visibleTaglist}
210
- footer={[]}
211
- {...modalProps}
212
- >
213
- {contentSection}
214
- </CapModal> :
178
+ <div>
215
179
  <CapPopover
216
- visible={visible}
180
+ visible={this.state.visible}
217
181
  onVisibleChange={this.togglePopoverVisibility}
218
- content={contentSection}
182
+ content={<div>
183
+ <CapSpin tip={this.props.intl.formatMessage(messages.gettingTags)} spinning={this.props.loading}>
184
+ <Search style={{ marginBottom: 8, width: '250px'}} placeholder={this.props.intl.formatMessage(messages.search)} onChange={this.onChange} />
185
+ {this.props.moduleFilterEnabled ? <CapSelect getPopupContainer={(triggerNode) => triggerNode.parentNode} style={{width: '250px', marginBottom: '16px', minWidth: 'initial', display: 'inherit'}} onChange={this.props.onContextChange} defaultValue={this.props.intl.formatMessage(messages.all)} options={options}>
186
+ </CapSelect> : ''}
187
+ <CapTree
188
+ styling={{height: '350px', overflow: 'auto'}}
189
+ onSelect={this.handleOnSelect}
190
+ selectedKeys={this.state.tagValue}
191
+ expandedKeys={this.state.expandedKeys}
192
+ autoExpandParent={this.state.autoExpandParent}
193
+ onExpand={this.onExpand}
194
+ >
195
+ {this.renderTags(tg, this.state.searchValue)}
196
+ </CapTree>
197
+ </CapSpin>
198
+ </div>}
219
199
  trigger="click"
220
- placement="topLeft"
221
- >
222
- <CapButton isAddBtn type="flat">{label || ''}</CapButton>
200
+ placement="bottomRight">
201
+ <CapButton isAddBtn type="flat">{this.props.label !== '' ? this.props.label : ''}</CapButton>
223
202
  </CapPopover>
224
- }
225
203
  <CapModal
226
204
  visible={this.state.showModal}
227
205
  title={this.props.intl.formatMessage(messages["Dynamic Days before Expiry"])}
@@ -237,7 +215,7 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
237
215
  <p>{this.props.intl.formatMessage(messages.numberOfDaysBeforeExpiry)}</p>
238
216
  <CapInput onChange={this.handleDynamicDateChange} value={this.state.dynamicDateValue} size="default"></CapInput>
239
217
  </CapModal>
240
- </>
218
+ </div>
241
219
  );
242
220
  }
243
221
  }
@@ -250,13 +228,6 @@ CapTagList.propTypes = {
250
228
  loading: PropTypes.bool,
251
229
  moduleFilterEnabled: PropTypes.bool,
252
230
  intl: intlShape.isRequired,
253
- visibleTaglist: PropTypes.bool,
254
- hidePopover: PropTypes.bool,
255
- modalProps: PropTypes.any,
256
- };
257
-
258
- CapTagList.defaultValue = {
259
- hidePopover: false,
260
231
  };
261
232
 
262
233
  export default injectIntl(CapTagList);
@@ -7,23 +7,23 @@
7
7
  import React from 'react';
8
8
  import PropTypes from 'prop-types';
9
9
  // import styled from 'styled-components';
10
- import {CapButton, CapCustomCard, CapSpin} from '@capillarytech/cap-ui-library';
10
+ import {CapButton, CapCustomCard} from '@capillarytech/cap-ui-library';
11
11
  import { FormattedMessage } from 'react-intl';
12
12
  import messages from './messages';
13
13
  const {CapCustomCardList} = CapCustomCard;
14
14
  function CmsTemplatesComponent(props) {
15
- const cardDataList = (props.cmsTemplates || []).map((template) => (
15
+ const cardDataList = props.cmsTemplates.map((template) => (
16
16
  {
17
17
  key: template.name,
18
18
  title: template.name,
19
19
  url: template.versions.base.preview_http_url,
20
20
  hoverOption: <CapButton onClick={() => props.handleEdmDefaultTemplateSelection(template._id)}><FormattedMessage {...messages.select}/></CapButton>,
21
21
  }));
22
- return (<CapSpin spinning={props.cmsTemplatesLoader}>
22
+ return (<div>
23
23
  <div className="pagination-container">
24
24
  <CapCustomCardList cardList={cardDataList} type="Email" />
25
25
  </div>
26
- </CapSpin>);
26
+ </div>);
27
27
  }
28
28
 
29
29
  CmsTemplatesComponent.propTypes = {
@@ -44,7 +44,7 @@ class Edmeditor extends React.Component { // eslint-disable-line react/prefer-st
44
44
  console.log('current language edm editor loading', this.props.id, this.props.edmSrc);
45
45
  return (
46
46
  this.props.edmSrc ?
47
- (<iframe id={this.props.id} className={this.props.activeClass} src={this.props.edmSrc} height="460" width="100%" style={{height: "calc(100vh - 180px)"}}></iframe>)
47
+ (<iframe id={this.props.id} className={this.props.activeClass} src={this.props.edmSrc} height="460" width="100%" style={{"height": "calc(100vh - 180px)"}}></iframe>)
48
48
  : 'aaasass'
49
49
  );
50
50
  }
@@ -9,8 +9,8 @@
9
9
 
10
10
  #emailPreivew-container {
11
11
  position: relative;
12
- left: 18vw;
13
- width: 82vw;
12
+ left: 20vw;
13
+ width: 80vw;
14
14
  height: 100vh;
15
15
  background: rgba(255,255,255,1);
16
16
  // padding: 0 24px 0 24px;
@@ -11,7 +11,7 @@ import PropTypes from 'prop-types';
11
11
  import React from 'react';
12
12
  import _ from 'lodash';
13
13
  import { Tabs, Table, Modal} from 'antd';
14
- import { CapSpin, CapDrawer, CapButton, CapInput, CapPopover, CapImage, CapCheckbox, CapRadio, CapSelect, CapTable, CapRow, CapColumn, CapNotification, CapUploader, CapHeading, CapIcon} from '@capillarytech/cap-ui-library';
14
+ import { CapDrawer, CapButton, CapInput, CapPopover, CapImage, CapCheckbox, CapRadio, CapSelect, CapTable, CapRow, CapColumn, CapNotification, CapUploader, CapHeading, CapIcon} from '@capillarytech/cap-ui-library';
15
15
  import { injectIntl, intlShape, FormattedMessage } from 'react-intl';
16
16
  import LabelHOC from '@capillarytech/cap-ui-library/assets/HOCs/ComponentWithLabelHOC';
17
17
  import { CAP_SPACE_12, CAP_SPACE_08, FONT_COLOR_05, FONT_COLOR_04 } from '@capillarytech/cap-ui-library/styled/variables';
@@ -21,7 +21,6 @@ import SlideBox from '../SlideBox';
21
21
  import CardGrid from '../CardGrid';
22
22
  import CKEditor from "../Ckeditor/";
23
23
  import EDMEditor from "../Edmeditor";
24
- import BeeEditor from '../BeeEditor';
25
24
  import CustomPopOver from '../CustomPopOver';
26
25
  import messages from './messages';
27
26
  import './_formBuilder.scss';
@@ -276,6 +275,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
276
275
  onEdit() {
277
276
 
278
277
  }
278
+
279
279
  getModal = () => {
280
280
  let modal;
281
281
  if (this.state.modal) {
@@ -925,10 +925,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
925
925
  for (var i = 0; i < data.selectedLanguages.length; i+= 1) {
926
926
  const currentLang = data.selectedLanguages[i];
927
927
  const content = data[currentLang]['template-content'];
928
- if (!content) {
929
- return false;
930
- }
931
- const tagValidationResponse = this.validateTags(content, tags, injectedTags);;
928
+ const tagValidationResponse = this.validateTags(content, tags, injectedTags);
932
929
  if (errorData[index][currentLang] === undefined) {
933
930
  errorData[index][currentLang] = {};
934
931
  }
@@ -2956,28 +2953,24 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
2956
2953
  if (channel === 'EMAIL') {
2957
2954
  moduleFilterEnabled = this.props.isFullMode;
2958
2955
  }
2959
- const langIndex = 0;
2960
- 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;
2961
- if (!(_.get(this.state, `formData[${this.state.currentTab - 1}][${currentLang}].is_drag_drop`, false)) || channel !== 'EMAIL') {
2962
- columns.push(
2963
- <CapColumn key={`input-${val.id}`} offset={val.offset} span={val.width ? val.width : ''} style={val.style ? val.style : {marginBottom: '16px'}}>
2964
- <TagList
2965
- key={`input-${val.id}`}
2966
- moduleFilterEnabled={moduleFilterEnabled}
2967
- label={val.label ? val.label : ''}
2968
- onTagSelect={(data) => this.callChildEvent(data, val, 'onTagSelect')}
2969
- onContextChange={this.props.onContextChange}
2970
- location={this.props.location}
2971
- tags={this.props.tags ? this.props.tags : []}
2972
- injectedTags={this.props.injectedTags ? this.props.injectedTags : {}}
2973
- className={val.className ? val.className : ''}
2974
- id={val.id}
2975
- userLocale={this.props.userLocale}
2976
- selectedOfferDetails={this.props.selectedOfferDetails}
2977
- />
2978
- </CapColumn>
2979
- );
2980
- }
2956
+ columns.push(
2957
+ <CapColumn key={`input-${val.id}`} offset={val.offset} span={val.width ? val.width : ''} style={val.style ? val.style : {marginBottom: '16px'}}>
2958
+ <TagList
2959
+ key={`input-${val.id}`}
2960
+ moduleFilterEnabled={moduleFilterEnabled}
2961
+ label={val.label ? val.label : ''}
2962
+ onTagSelect={(data) => this.callChildEvent(data, val, 'onTagSelect')}
2963
+ onContextChange={this.props.onContextChange}
2964
+ location={this.props.location}
2965
+ tags={this.props.tags ? this.props.tags : []}
2966
+ injectedTags={this.props.injectedTags ? this.props.injectedTags : {}}
2967
+ className={val.className ? val.className : ''}
2968
+ id={val.id}
2969
+ userLocale={this.props.userLocale}
2970
+ selectedOfferDetails={this.props.selectedOfferDetails}
2971
+ />
2972
+ </CapColumn>
2973
+ );
2981
2974
  break;
2982
2975
  case "button":
2983
2976
  if (styling === 'semantic' && val.metaType === 'submit-button') {
@@ -3198,53 +3191,38 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
3198
3191
  }
3199
3192
  }
3200
3193
  break;
3201
- case "BEEeditor": {
3194
+ case "edmeditor": {
3195
+ // if (!this.state.formData[`${this.state.currentTab - 1}`]) {
3196
+ // return true;
3197
+ // }
3202
3198
  let langTab = 1;
3203
- if (val.id.match(/BEEeditor/g)) {
3199
+ if (val.id.match(/edmeditor/g)) {
3204
3200
  if (val.id.length > 9 && val.id.charAt(9)) {
3205
3201
  langTab = val.id.charAt(9);
3206
3202
  }
3207
3203
  }
3208
- const { currentTab, formData } = this.state;
3209
- const supportedLanguages = formData[currentTab - 1].selectedLanguages;
3204
+ const supportedLanguages = this.state.formData[this.state.currentTab - 1].selectedLanguages;
3205
+ // let langIndex = 0;
3206
+ // if (val.id.indexOf('edmeditor') > -1 && val.id !== 'edmeditorsrc') {
3207
+ // const test = val.id.replace('src', '');
3208
+ // langIndex = parseInt(test.replace('edmeditor', ''), 10) - 1;
3209
+ // }
3210
+ // 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;
3210
3211
  const currentLang = supportedLanguages[langTab - 1];
3212
+ const edmSrc = this.state.formData[`${this.state.currentTab - 1}`][currentLang] && this.state.formData[`${this.state.currentTab - 1}`][currentLang][`edmeditor${this.state.currentTab > 1 ? this.state.currentTab : ''}src`];
3211
3213
 
3212
- let beeJson = '',
3213
- beeToken = '',
3214
- uuid = '';
3215
- const data = formData[`${currentTab - 1}`][currentLang];
3216
- if (data) {
3217
- beeJson = data[`BEEeditor${currentTab > 1 ? currentTab : ''}json`];
3218
- beeToken = data[`BEEeditor${currentTab > 1 ? currentTab : ''}token`];
3219
- uuid = this.props.uuid;
3220
- }
3221
- if (!beeJson || !beeToken) {
3214
+
3215
+ if (!edmSrc) {
3222
3216
  return false;
3223
3217
  }
3224
- let isModuleFilterEnabled = _.get(this.props.location, 'query.type', '') !== 'embedded';
3225
- const schemaChannel = _.get(this.props.schema, 'channel', "");
3226
- if (schemaChannel === 'EMAIL') {
3227
- isModuleFilterEnabled = this.props.isFullMode;
3228
- }
3218
+
3219
+
3229
3220
  columns.push(
3230
3221
  <CapColumn style={val.colStyle ? val.colStyle : {}} span={val.width}>
3231
- <BeeEditor
3232
- uid={uuid}
3233
- tokenData={beeToken}
3222
+ <EDMEditor
3234
3223
  id={val.id}
3235
- beeJson={beeJson}
3236
- showTagsPopover={this.showTagsPopover}
3237
- location={this.props.location}
3238
- label={val.label || ''}
3239
- className={val.className || ''}
3240
- userLocale={this.props.userLocale}
3241
- selectedOfferDetails={this.props.selectedOfferDetails}
3242
- tags={this.props.tags || []}
3243
- injectedTags={this.props.injectedTags ? this.props.injectedTags : {}}
3244
- saveBeeInstance={this.props.saveBeeInstance}
3245
- saveBeeData={this.props.saveBeeData}
3246
- onContextChange={this.props.onContextChange}
3247
- moduleFilterEnabled={isModuleFilterEnabled}
3224
+ getEditorInstanse={this.getEditorInstanse}
3225
+ edmSrc={edmSrc}
3248
3226
  />
3249
3227
  </CapColumn>
3250
3228
  );
@@ -3285,9 +3263,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
3285
3263
  }
3286
3264
  </CapRow>
3287
3265
  );
3288
- if (columns.length) {
3289
- fields.push(row);
3290
- }
3266
+ fields.push(row);
3291
3267
  });
3292
3268
 
3293
3269
  _.forEach(section.actionFields, (field) => {
@@ -3327,18 +3303,8 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
3327
3303
  }
3328
3304
  </CapRow>
3329
3305
  );
3330
- if (columns.length) {
3331
- fields.push(row);
3332
- }
3333
-
3306
+ fields.push(row);
3334
3307
  });
3335
- if(!this.props.isEmailLoading && this.props.schema.channel.toUpperCase() === 'EMAIL' && !fields.length) {
3336
- return (
3337
- <div style={{ textAlign: 'center' }}>
3338
- <CapSpin spinning />
3339
- </div>
3340
- );
3341
- }
3342
3308
  return fields;
3343
3309
  }
3344
3310
 
@@ -3572,7 +3538,6 @@ FormBuilder.propTypes = {
3572
3538
  setDrawerVisibility: PropTypes.bool,
3573
3539
  capDrawerContent: PropTypes.array,
3574
3540
  isFullMode: PropTypes.bool,
3575
-
3576
3541
  };
3577
3542
 
3578
3543
  export default injectIntl(FormBuilder);
@@ -46,4 +46,3 @@ export const CHANNEL_EDIT_TRACK_MAPPING = {
46
46
  line: TRACK_EDIT_LINE,
47
47
  };
48
48
  export const GTM_TRACKING_ID = 'UA-110024621-2';
49
- export const BEE_PLUGIN = 'BEE_PLUGIN';
@@ -10,13 +10,13 @@ function getFullModeSaveBtn(slidBoxContent) {
10
10
  <FormattedMessage {...messages.creativesTemplatesSaveFullMode}/>;
11
11
  }
12
12
  function SlideBoxFooter(props) {
13
- const { slidBoxContent, onSave, onEditTemplate, onCreateNextStep, isFullMode, fetchingCmsData} = props;
13
+ const { slidBoxContent, onSave, onEditTemplate, onCreateNextStep, isFullMode} = props;
14
14
  return (
15
15
  <div>
16
16
  <div>
17
17
  {props.shouldShowDoneFooter() && (
18
18
  <div>
19
- <CapButton onClick={onSave} disabled={fetchingCmsData || false}>
19
+ <CapButton onClick={onSave}>
20
20
  {isFullMode ?
21
21
  getFullModeSaveBtn(slidBoxContent)
22
22
  :
@@ -25,7 +25,6 @@ import * as globalActions from '../Cap/actions';
25
25
  import {isLoading as isLoadingSelector} from './selectors';
26
26
  import messages from './messages';
27
27
  import { MAP_TEMPLATE } from '../WeChat/Wrapper/constants';
28
- import { makeSelectFetchingCmsData } from '../Email/selectors';
29
28
 
30
29
  const classPrefix = 'add-creatives-section';
31
30
 
@@ -166,8 +165,6 @@ class Creatives extends React.Component {
166
165
  iso_code: templateData.iso_code,
167
166
  language: templateData.language,
168
167
  drag_drop_id: templateData.drag_drop_id,
169
- json_content: templateData.json_content,
170
- id: templateData.id,
171
168
  };
172
169
  creativesTemplateData = {
173
170
  base: formData,
@@ -531,7 +528,7 @@ class Creatives extends React.Component {
531
528
  }
532
529
  render() {
533
530
  const {slidBoxContent, isGetFormData, showSlideBox, templateData, currentChannel, emailCreateMode, templateStep, isLoadingContent, mobilePushCreateMode, isDiscardMessage, weChatTemplateType, weChatMaptemplateStep} = this.state;
534
- const {isFullMode, creativesMode, cap, isUploading, channelsToHide, selectedWeChatAccount, forwardedTags, channelsToDisable, selectedOfferDetails, onTestContentClicked, onPreviewContentClicked, getCreativesData, fetchingCmsData} = this.props;
531
+ const {isFullMode, creativesMode, cap, isUploading, channelsToHide, selectedWeChatAccount, forwardedTags, channelsToDisable, selectedOfferDetails, onTestContentClicked, onPreviewContentClicked, getCreativesData} = this.props;
535
532
  const mapTemplateCreate = slidBoxContent === 'createTemplate' && weChatTemplateType === MAP_TEMPLATE && templateStep !== 'modeSelection';
536
533
  /* TODO: Instead of passing down same props separately to each component down, write common function to these props and pass it accordingly */
537
534
  return (
@@ -620,12 +617,11 @@ class Creatives extends React.Component {
620
617
  emailCreateMode={emailCreateMode}
621
618
  shouldShowContinueFooter={this.shouldShowContinueFooter}
622
619
  shouldShowDoneFooter={this.shouldShowDoneFooter}
623
- fetchingCmsData={fetchingCmsData}
624
620
  />
625
621
  }
626
622
  handleClose={this.handleCloseSlideBox}
627
623
  show={showSlideBox}
628
- size="size-xl"
624
+ size="size-l"
629
625
  />
630
626
  </SlideBoxWrapper>
631
627
  );
@@ -663,7 +659,6 @@ const mapStatesToProps = () => createStructuredSelector({
663
659
  EmailLayout: selectEmailLayout(),
664
660
  isUploading: uploadSelector(),
665
661
  Templates: makeSelectTemplates(),
666
- fetchingCmsData: makeSelectFetchingCmsData(),
667
662
  });
668
663
  function mapDispatchToProps(dispatch) {
669
664
  return {
@@ -35,4 +35,3 @@ export const CLEAR_ALL_VALUES = "app/v2Containers/Email/CLEAR_ALL_VALUES";
35
35
  export const DUPLICATE_TEMPLATE_REQUEST = 'app/v2Containers/Email/DUPLICATE_TEMPLATE_REQUEST';
36
36
  export const DUPLICATE_TEMPLATE_SUCCESS = 'app/v2Containers/Email/DUPLICATE_TEMPLATE_SUCCESS';
37
37
  export const DUPLICATE_TEMPLATE_FAILURE = 'app/v2Containers/Email/DUPLICATE_TEMPLATE_FAILURE';
38
-