@capillarytech/creatives-library 6.12.8 → 6.12.11

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 (41) hide show
  1. package/config/app.js +1 -1
  2. package/package.json +1 -1
  3. package/services/api.js +3 -2
  4. package/telepresence.log +57 -0
  5. package/v2Components/BeeEditor/index.js +263 -0
  6. package/v2Components/BeeEditor/index.scss +11 -0
  7. package/v2Components/BeeEditor/messages.js +71 -0
  8. package/v2Components/BeeEditor/tests/index.test.js +10 -0
  9. package/v2Components/FormBuilder/index.js +8 -0
  10. package/v2Containers/CreativesContainer/SlideBoxContent.js +2 -6
  11. package/v2Containers/CreativesContainer/index.js +4 -5
  12. package/v2Containers/Email/actions.js +1 -2
  13. package/v2Containers/Email/index.js +29 -44
  14. package/v2Containers/Email/sagas.js +2 -2
  15. package/v2Containers/EmailWrapper/index.js +0 -2
  16. package/v2Containers/Line/Create/_lineCreate.scss +64 -0
  17. package/v2Containers/Line/Create/actions.js +94 -0
  18. package/v2Containers/Line/Create/constants.js +43 -0
  19. package/v2Containers/Line/Create/index.js +1132 -0
  20. package/v2Containers/Line/Create/initialSchema.js +378 -0
  21. package/v2Containers/Line/Create/messages.js +229 -0
  22. package/v2Containers/Line/Create/reducer.js +99 -0
  23. package/v2Containers/Line/Create/sagas.js +113 -0
  24. package/v2Containers/Line/Create/selectors.js +30 -0
  25. package/v2Containers/Line/CreateWrapper/constants.js +2 -0
  26. package/v2Containers/Line/CreateWrapper/index.js +117 -0
  27. package/v2Containers/Line/CreateWrapper/messages.js +55 -0
  28. package/v2Containers/Line/Edit/_lineEdit.scss +23 -0
  29. package/v2Containers/Line/Edit/actions.js +79 -0
  30. package/v2Containers/Line/Edit/constants.js +27 -0
  31. package/v2Containers/Line/Edit/index.js +1051 -0
  32. package/v2Containers/Line/Edit/messages.js +173 -0
  33. package/v2Containers/Line/Edit/reducer.js +83 -0
  34. package/v2Containers/Line/Edit/sagas.js +81 -0
  35. package/v2Containers/Line/Edit/selectors.js +29 -0
  36. package/v2Containers/Line/Edit/tests/actions.test.js +18 -0
  37. package/v2Containers/Line/Edit/tests/index.test.js +10 -0
  38. package/v2Containers/Line/Edit/tests/reducer.test.js +9 -0
  39. package/v2Containers/Line/Edit/tests/sagas.test.js +15 -0
  40. package/v2Containers/Line/Edit/tests/selectors.test.js +10 -0
  41. package/v2Containers/TemplatesV2/index.js +6 -5
@@ -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,7 +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
- if (nextProps.Email.templateDetails.versions.base[base.activeTab].is_drag_drop && this.checkBeeEditorAllowedForLibrary()) {
518
+ if (nextProps.Email.templateDetails.versions.base[base.activeTab].is_drag_drop) {
530
519
  this.setState({isDragDrop: true});
531
520
  }
532
521
  }
@@ -591,7 +580,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
591
580
  //this.resetCkEditorInstance(data, formData);
592
581
  const schema = _.cloneDeep(this.state.schema);
593
582
  const container = schema.containers[`${data - 1}`];
594
- 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) {
595
584
  container.tabBarExtraContent.sections[0].inputFields[0].cols[4].content.sections[0].inputFields[3].cols[0].style = {display: ""};
596
585
  container.tabBarExtraContent.sections[0].inputFields[0].cols[2].style.display = "none";
597
586
  } else {
@@ -616,7 +605,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
616
605
  const formData = _.cloneDeep(this.state.formData);
617
606
  const isBEESupport = (this.props.location.query.isBEESupport !== "false") || false;
618
607
 
619
- if (isDragDrop && isBEESupport && this.checkBeeEditorAllowedForLibrary()) {
608
+ if (isDragDrop && isBEESupport) {
620
609
  let msg = {};
621
610
  if (data === "unsubscribe") {
622
611
  const anchor = `<a href='{{${data}}}'>${data}</a>`;
@@ -659,9 +648,9 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
659
648
  const base = formData.base || {};
660
649
  const isDragDrop = _.get(base[base.activeTab], 'is_drag_drop');
661
650
  let editorType = '';
662
- if ( isDragDrop === true && this.checkBeeEditorAllowedForLibrary()) {
651
+ if ( isDragDrop === true) {
663
652
  editorType = 'edmEditor';
664
- } else if (isDragDrop === false && !this.checkBeeEditorAllowedForLibrary()) {
653
+ } else if (isDragDrop === false) {
665
654
  editorType = 'ckEditor';
666
655
  }
667
656
  GA.timeTracker.stopTimer(isEdit ? TRACK_EDIT_EMAIL : TRACK_CREATE_EMAIL, {
@@ -716,7 +705,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
716
705
  _.forEach(formData, (val, index) => {
717
706
  if (!isNaN(index)) {
718
707
  _.forEach(val.selectedLanguages, (language) => {
719
- if (val[language].is_drag_drop && this.checkBeeEditorAllowedForLibrary()) {
708
+ if (val[language].is_drag_drop) {
720
709
  that.props.actions.getCmsData(BEE_PLUGIN, id, language);
721
710
  }
722
711
  });
@@ -917,7 +906,6 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
917
906
  if (this.props.isFullMode) {
918
907
  this.props.showTemplateName({formData, onFormDataChange: this.onFormDataChange});
919
908
  }
920
- const isBEEAppEnable = this.checkBeeEditorAllowedForLibrary();
921
909
  _.forEach((editData.versions.base.selectedLanguages), (language) => {
922
910
  // if (formData[this.state.currentTab - 1].tabKey === formData[this.state.currentTab - 1][language].tabKey) {
923
911
  // formData[this.state.currentTab - 1].activeTab = language;
@@ -925,8 +913,8 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
925
913
  // if (formData.base.tabKey === formData.base[language].tabKey) {
926
914
  // formData.base.activeTab = language;
927
915
  // }
928
- if (language && editData.versions.base[language].is_drag_drop && isBEEAppEnable) {
929
- 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);
930
918
  }
931
919
  });
932
920
 
@@ -1009,12 +997,11 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
1009
997
  }
1010
998
  saveValidationData = () => {
1011
999
  let saveCount = 0;
1012
- const isBeeEnable = this.checkBeeEditorAllowedForLibrary();
1013
1000
  this.setState({saveEdmDataMode: 'validation', saveCount: 0, cmsDataCount: 0}, () => {
1014
1001
  _.forEach(this.state.formData, (newdata, index) => {
1015
1002
  if (!isNaN(index)) {
1016
1003
  _.forEach(newdata.selectedLanguages, (language) => {
1017
- 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)) {
1018
1005
  saveCount += 1;
1019
1006
  }
1020
1007
  });
@@ -1131,14 +1118,14 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
1131
1118
 
1132
1119
  copyPrimaryLanguage = () => {
1133
1120
  const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
1134
- const isBEEAppEnable = this.checkBeeEditorAllowedForLibrary();
1121
+
1135
1122
  this.setState({addLanguageType: "copyPrimaryLanguage"}, () => {
1136
1123
  this.setState({showModal: false});
1137
1124
  const formData = _.cloneDeep(this.state.formData);
1138
1125
  const currentTab = this.state.currentTab - 1;
1139
1126
  const baseLanguage = this.props.currentOrgDetails.basic_details.base_language ? this.props.currentOrgDetails.basic_details.base_language : 'en';
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);
1127
+ if (formData[currentTab][baseLanguage].is_drag_drop) {
1128
+ this.props.actions.getCmsSetting(BEE_PLUGIN, formData[currentTab][baseLanguage].drag_drop_id, 'duplicate', baseLanguage, isEdmSupport);
1142
1129
  }
1143
1130
  });
1144
1131
  }
@@ -1525,7 +1512,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
1525
1512
  const data = _.find(this.props.Email.assetList, {_id: id});
1526
1513
 
1527
1514
  if (data) {
1528
- if (isDragDrop && isEdmSupport && this.checkBeeEditorAllowedForLibrary()) {
1515
+ if (isDragDrop && isEdmSupport) {
1529
1516
  const evtData = JSON.parse(this.edmEvent.data);
1530
1517
  if (evtData.action === 'editBackground') {
1531
1518
  this.edmEvent.source.postMessage(JSON.stringify({
@@ -1560,7 +1547,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
1560
1547
 
1561
1548
  toggleEmailPreview = () => {
1562
1549
  const isDragDrop = this.state.formData[`${this.state.currentTab - 1}`][this.state.formData[`${this.state.currentTab - 1}`].activeTab].is_drag_drop;
1563
- if (isDragDrop && !this.state.showEmailPreview && this.checkBeeEditorAllowedForLibrary()) {
1550
+ if (isDragDrop && !this.state.showEmailPreview) {
1564
1551
  this.handleEdmSave();
1565
1552
  this.setState({mode: "preview", gettingPreviewData: true});
1566
1553
  } else if (this.state.showEmailPreview) {
@@ -2139,10 +2126,9 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
2139
2126
  "language": this.supportedLanguages[languageIndex].language,
2140
2127
  "template-content": templates.html_content,
2141
2128
  };
2142
- const isBEEAppEnable = this.checkBeeEditorAllowedForLibrary();
2143
- if (templates.drag_drop_id && isBEEAppEnable) {
2129
+ if (templates.drag_drop_id) {
2144
2130
  tempData.drag_drop_id = templates.drag_drop_id;
2145
- this.props.actions.getCmsSetting(BEE_PLUGIN, tempData._id, 'open', tempData.iso_code, isEdmSupport, isBEEAppEnable);
2131
+ this.props.actions.getCmsSetting(BEE_PLUGIN, tempData._id, 'open', tempData.iso_code, isEdmSupport);
2146
2132
  }
2147
2133
  // formData.usingTabContainer = true;
2148
2134
  // formData.tabCount = 1;
@@ -2166,10 +2152,9 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
2166
2152
 
2167
2153
  this.setState({formData, loading: false, injectedTags: data.tags, tabKey, isDragDrop: (data.base.is_drag_drop !== 0 )}, () => {
2168
2154
  // this.setState({tabKey: ''});
2169
- const isBEEEnable = this.checkBeeEditorAllowedForLibrary();
2170
2155
  _.forEach(formData[0].selectedLanguages, (language) => {
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);
2156
+ if (formData[0][language].is_drag_drop) {
2157
+ this.props.actions.getCmsSetting(BEE_PLUGIN, formData[0][language].drag_drop_id, 'open', language, isEdmSupport);
2173
2158
  }
2174
2159
  });
2175
2160
  });
@@ -2506,8 +2491,8 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
2506
2491
  // const isEdmSupport = (this.props.location.query.isEdmSupport) ? this.props.location.query.isEdmSupport : true;
2507
2492
  // let getQuery = '';
2508
2493
  const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
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);
2494
+
2495
+ this.props.actions.getCmsSetting(BEE_PLUGIN, data._id, 'create', this.state.formData[this.state.currentTab - 1].activeTab, isEdmSupport);
2511
2496
  // this.props.templatesActions.setEdmTemplate(data);
2512
2497
  this.toggleEdmEmailTemplateSelection();
2513
2498
  // 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, disableBEE}) {
54
+ export function* getCmsSetting({cmsType, projectId, cmsMode, langId, isEdmSupport}) {
55
55
  try {
56
- const result = yield call(Api.getCmsTemplateSettingsV2, cmsType, projectId, cmsMode, langId, isEdmSupport, disableBEE);
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
@@ -0,0 +1,64 @@
1
+ @import '~@capillarytech/cap-ui-library/styles/_variables.scss';
2
+
3
+ .line-row{
4
+ margin-bottom: 16px;
5
+ }
6
+ .slidebox-content-container {
7
+ overflow-x: hidden;
8
+ }
9
+ .line-image {
10
+ position: relative;
11
+ }
12
+ .image-container {
13
+ display: flex;
14
+ & > div {
15
+ min-width: 516px;
16
+ }
17
+ border-radius: 5px;
18
+ .image-placeholder{
19
+ line-height: 150px;
20
+ }
21
+ img {
22
+ object-fit: cover;
23
+ max-width: 100%;
24
+ max-height: 100%;
25
+ height: auto !important;
26
+ width: auto !important;
27
+ }
28
+ }
29
+
30
+ .pagination-container.gallery-upload {
31
+ height: calc(100vh - 60px);
32
+
33
+ .cap-custom-card-list-col {
34
+ max-width: 156px;
35
+ max-height: 156px;
36
+ display: inline-block;
37
+ margin-left: $CAP_SPACE_04;
38
+ margin-right: $CAP_SPACE_04;
39
+ }
40
+
41
+ .ant-card-body {
42
+ padding-top: 0;
43
+
44
+ .ant-card-meta-description img {
45
+ height: 80px;
46
+ width: auto;
47
+ }
48
+ }
49
+ }
50
+
51
+ .gallery-image {
52
+ height: 156px;
53
+ width: 156px;
54
+ border-radius: 4px;
55
+ margin: 3px;
56
+ }
57
+
58
+ .sms-text {
59
+ img {
60
+ display: block;
61
+ max-width: 100%;
62
+ object-fit: cover;
63
+ }
64
+ }
@@ -0,0 +1,94 @@
1
+ /*
2
+ *
3
+ * Create actions
4
+ *
5
+ */
6
+
7
+ import * as types from './constants';
8
+
9
+ export function createTemplate(template, callback) {
10
+ console.log('action trigereed createtemplate');
11
+ return {
12
+ type: types.CREATE_TEMPLATE_REQUEST,
13
+ template,
14
+ callback,
15
+ };
16
+ }
17
+
18
+ export function clearCreateResponse() {
19
+ console.log('clearCreateResponse');
20
+ return {
21
+ type: types.CLEAR_CREATE_RESPONSE_REQUEST,
22
+ };
23
+ }
24
+
25
+ export function defaultAction() {
26
+ return {
27
+ type: types.DEFAULT_ACTION,
28
+ };
29
+ }
30
+
31
+ export function uploadAsset(file, assetType, fileParams) {
32
+ return {
33
+ type: types.UPLOAD_ASSET_REQUEST,
34
+ file,
35
+ assetType,
36
+ fileParams,
37
+ };
38
+ }
39
+
40
+ export function clearAsset() {
41
+ return {
42
+ type: types.CLEAR_ASSET,
43
+ };
44
+ }
45
+
46
+
47
+ // FOR EDIT
48
+
49
+
50
+ export function editTemplate(template, callback) {
51
+ console.log('action trigereed editTemplate line @@@');
52
+ return {
53
+ type: types.EDIT_TEMPLATE_REQUEST,
54
+ template,
55
+ callback,
56
+ };
57
+ }
58
+
59
+ export function getTemplateDetails(id) {
60
+ console.log('getting template line @@@', id);
61
+ return {
62
+ type: types.GET_TEMPLATE_DETAILS_REQUEST,
63
+ id,
64
+ channel: 'LINE',
65
+ };
66
+ }
67
+
68
+ export function clearEditResponse() {
69
+ console.log('clearEditResponse');
70
+ return {
71
+ type: types.CLEAR_EDIT_RESPONSE_REQUEST,
72
+ };
73
+ }
74
+
75
+ export function clearData() {
76
+ return {
77
+ type: types.CLEAR_DATA,
78
+ };
79
+ }
80
+
81
+ export function getLineTemplatesList(channel, queryParams) {
82
+ return {
83
+ type: types.GET_LINE_TEMPLATES_LIST_REQUEST,
84
+ channel,
85
+ queryParams,
86
+ };
87
+ }
88
+
89
+ export function setSelectedTemplate(templateData) {
90
+ return {
91
+ type: types.SET_SELECTED_TEMPLATE,
92
+ data: templateData,
93
+ };
94
+ }
@@ -0,0 +1,43 @@
1
+ /*
2
+ *
3
+ * Create constants
4
+ *
5
+ */
6
+
7
+ export const DEFAULT_ACTION = 'app/Create/DEFAULT_ACTION';
8
+
9
+
10
+ export const CREATE_TEMPLATE_REQUEST = 'app/v2Containers/Line/Create/CREATE_TEMPLATE_REQUEST';
11
+ export const CREATE_TEMPLATE_SUCCESS = 'app/v2Containers/Line/Create/CREATE_TEMPLATE_SUCCESS';
12
+ export const CREATE_TEMPLATE_FAILURE = 'app/v2Containers/Line/Create/CREATE_TEMPLATE_FAILURE';
13
+ export const UPLOAD_ASSET_REQUEST = 'app/v2Containers/Line/Create/UPLOAD_ASSET_REQUEST';
14
+ export const UPLOAD_ASSET_SUCCESS = 'app/v2Containers/Line/Create/UPLOAD_ASSET_SUCCESS';
15
+ export const UPLOAD_ASSET_FAILURE = 'app/v2Containers/Line/Create/UPLOAD_ASSET_FAILURE';
16
+ export const CLEAR_ASSET = 'app/v2Containers/Line/Create/CLEAR_ASSET';
17
+
18
+ export const CLEAR_CREATE_RESPONSE_REQUEST = 'app/v2Containers/Line/Create/CLEAR_CREATE_RESPONSE_REQUEST';
19
+ export const CLEAR_CREATE_RESPONSE_SUCCESS = 'app/v2Containers/Line/Create/CLEAR_CREATE_RESPONSE_SUCCESS';
20
+ export const CLEAR_CREATE_RESPONSE_FAILURE = 'app/v2Containers/Line/Create/CLEAR_CREATE_RESPONSE_FAILURE';
21
+
22
+ export const LINE_IMG_HEIGHT = 400;
23
+ export const LINE_IMG_WIDTH = 300;
24
+ export const LINE_IMG_SIZE = 30000000;
25
+
26
+
27
+ // edit
28
+
29
+ export const GET_TEMPLATE_DETAILS_REQUEST = 'app/v2Containers/line/Edit/GET_TEMPLATE_DETAILS_REQUEST';
30
+ export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/v2Containers/line/Edit/GET_TEMPLATE_DETAILS_SUCCESS';
31
+ export const GET_TEMPLATE_DETAILS_FAILURE = 'app/v2Containers/line/Edit/GET_TEMPLATE_DETAILS_FAILURE';
32
+
33
+ export const EDIT_TEMPLATE_REQUEST = 'app/v2Containers/line/Edit/EDIT_TEMPLATE_REQUEST';
34
+ export const EDIT_TEMPLATE_SUCCESS = 'app/v2Containers/line/Edit/EDIT_TEMPLATE_SUCCESS';
35
+ export const EDIT_TEMPLATE_FAILURE = 'app/v2Containers/line/Edit/EDIT_TEMPLATE_FAILURE';
36
+
37
+ export const CLEAR_EDIT_RESPONSE_REQUEST = 'app/v2Containers/line/Edit/CLEAR_EDIT_RESPONSE_REQUEST';
38
+ export const CLEAR_DATA = 'app/v2Containers/Line/Edit/CLEAR_DATA';
39
+ export const SET_SELECTED_TEMPLATE = 'app/v2Containers/Line/Edit/SET_SELECTED_TEMPLATE';
40
+
41
+ export const GET_LINE_TEMPLATES_LIST_REQUEST = 'app/v2Containers/Line/GET_LINE_TEMPLATES_LIST_REQUEST';
42
+ export const GET_LINE_TEMPLATES_LIST_SUCCESS = 'app/v2Containers/Line/GET_LINE_TEMPLATES_LIST_SUCCESS';
43
+ export const GET_LINE_TEMPLATES_LIST_FAILURE = 'app/v2Containers/Line/GET_LINE_TEMPLATES_LIST_FAILURE';