@capillarytech/creatives-library 6.9.2 → 6.9.5

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 (101) 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/components/TemplatePreview/_templatePreview.scss +6 -0
  5. package/components/TemplatePreview/index.js +35 -28
  6. package/config/app.js +1 -1
  7. package/containers/TagList/index.js +4 -5
  8. package/index.html +0 -5
  9. package/package.json +1 -2
  10. package/services/api.js +1 -16
  11. package/v2Components/CapTagList/index.js +26 -55
  12. package/v2Components/Carousel/index.js +120 -0
  13. package/v2Components/Carousel/style.scss +40 -0
  14. package/v2Components/CmsTemplatesComponent/index.js +4 -4
  15. package/v2Components/Edmeditor/index.js +1 -1
  16. package/v2Components/EmailPreview/_emailPreview.scss +2 -2
  17. package/v2Components/FormBuilder/index.js +43 -79
  18. package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/_wechatRichmediaTemplatePrev.scss +151 -151
  19. package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +33 -33
  20. package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/tests/index.test.js +10 -10
  21. package/v2Components/TemplatePreview/_templatePreview.scss +1 -0
  22. package/v2Components/TemplatePreview/assets/images/androidPushMessage.svg +44 -44
  23. package/v2Components/TemplatePreview/assets/images/home-screen-android.svg +21 -21
  24. package/v2Components/TemplatePreview/assets/images/home-screen-ios.svg +16 -16
  25. package/v2Components/TemplatePreview/assets/images/iPhonePushMessage.svg +134 -134
  26. package/v2Components/TemplatePreview/assets/images/mobile.svg +23 -23
  27. package/v2Components/TemplatePreview/assets/images/sms_mobile_android.svg +22 -22
  28. package/v2Components/TemplatePreview/assets/images/user-icon.svg +18 -18
  29. package/v2Components/TemplatePreview/assets/images/wechat-home-screen-android.svg +21 -21
  30. package/v2Components/TemplatePreview/assets/images/wechat-mobile.svg +77 -77
  31. package/v2Components/TemplatePreview/assets/images/wechat_mobile_android.svg +20 -20
  32. package/v2Components/TemplatePreview/index.js +36 -29
  33. package/v2Components/TemplatePreview/tests/index.test.js +10 -10
  34. package/v2Containers/CreativesContainer/SlideBoxContent.js +7 -1
  35. package/v2Containers/CreativesContainer/SlideBoxFooter.js +51 -51
  36. package/v2Containers/CreativesContainer/actions.js +27 -27
  37. package/v2Containers/CreativesContainer/constants.js +17 -17
  38. package/v2Containers/CreativesContainer/index.js +2 -7
  39. package/v2Containers/CreativesContainer/index.scss +44 -44
  40. package/v2Containers/CreativesContainer/messages.js +305 -305
  41. package/v2Containers/CreativesContainer/reducer.js +29 -29
  42. package/v2Containers/CreativesContainer/sagas.js +11 -11
  43. package/v2Containers/CreativesContainer/selectors.js +30 -30
  44. package/v2Containers/CreativesContainer/tests/actions.test.js +18 -18
  45. package/v2Containers/CreativesContainer/tests/index.test.js +10 -10
  46. package/v2Containers/CreativesContainer/tests/reducer.test.js +9 -9
  47. package/v2Containers/CreativesContainer/tests/sagas.test.js +15 -15
  48. package/v2Containers/CreativesContainer/tests/selectors.test.js +10 -10
  49. package/v2Containers/Email/constants.js +0 -1
  50. package/v2Containers/Email/index.js +115 -169
  51. package/v2Containers/Email/initialSchema.js +3 -18
  52. package/v2Containers/Email/sagas.js +2 -2
  53. package/v2Containers/Email/selectors.js +0 -5
  54. package/v2Containers/EmailWrapper/index.js +3 -19
  55. package/v2Containers/Line/Container/Image/index.js +21 -19
  56. package/v2Containers/Line/Container/ImageCarousel/Content.js +554 -0
  57. package/v2Containers/Line/Container/ImageCarousel/constants.js +10 -0
  58. package/v2Containers/Line/Container/ImageCarousel/index.js +526 -0
  59. package/v2Containers/Line/Container/ImageCarousel/messages.js +178 -0
  60. package/v2Containers/Line/Container/ImageCarousel/style.js +61 -0
  61. package/v2Containers/Line/Container/ImageMap/constants.js +2 -1
  62. package/v2Containers/Line/Container/ImageMap/index.js +31 -6
  63. package/v2Containers/Line/Container/ImageMap/messages.js +12 -0
  64. package/v2Containers/Line/Container/Wrapper/index.js +5 -1
  65. package/v2Containers/Line/Container/Wrapper/messages.js +4 -0
  66. package/v2Containers/Line/Container/Wrapper/utils.js +15 -16
  67. package/v2Containers/Line/Container/_lineCreate.scss +2 -2
  68. package/v2Containers/Line/Container/actions.js +4 -2
  69. package/v2Containers/Line/Container/constants.js +3 -0
  70. package/v2Containers/Line/Container/index.js +49 -11
  71. package/v2Containers/Line/Container/reducer.js +2 -2
  72. package/v2Containers/Line/Container/sagas.js +2 -2
  73. package/v2Containers/Line/Container/style.js +2 -1
  74. package/v2Containers/TagList/index.js +0 -6
  75. package/v2Containers/Templates/_templates.scss +9 -0
  76. package/v2Containers/Templates/actions.js +117 -122
  77. package/v2Containers/Templates/constants.js +47 -49
  78. package/v2Containers/Templates/index.js +47 -36
  79. package/v2Containers/Templates/messages.js +4 -8
  80. package/v2Containers/Templates/reducer.js +145 -153
  81. package/v2Containers/Templates/sagas.js +179 -179
  82. package/v2Containers/Templates/selectors.js +1 -19
  83. package/v2Containers/Templates/tests/actions.test.js +18 -18
  84. package/v2Containers/Templates/tests/index.test.js +10 -10
  85. package/v2Containers/Templates/tests/reducer.test.js +9 -9
  86. package/v2Containers/Templates/tests/sagas.test.js +15 -15
  87. package/v2Containers/Templates/tests/selectors.test.js +10 -10
  88. package/v2Containers/TemplatesV2/TemplatesV2.style.js +29 -29
  89. package/v2Containers/TemplatesV2/actions.js +16 -16
  90. package/v2Containers/TemplatesV2/constants.js +10 -10
  91. package/v2Containers/TemplatesV2/messages.js +61 -61
  92. package/v2Containers/TemplatesV2/selectors.js +25 -25
  93. package/v2Containers/TemplatesV2/tests/actions.test.js +18 -18
  94. package/v2Containers/TemplatesV2/tests/index.test.js +10 -10
  95. package/v2Containers/TemplatesV2/tests/reducer.test.js +9 -9
  96. package/v2Containers/TemplatesV2/tests/sagas.test.js +15 -15
  97. package/v2Containers/TemplatesV2/tests/selectors.test.js +10 -10
  98. package/v2Components/BeeEditor/index.js +0 -272
  99. package/v2Components/BeeEditor/index.scss +0 -11
  100. package/v2Components/BeeEditor/messages.js +0 -47
  101. package/v2Components/BeeEditor/tests/index.test.js +0 -10
@@ -1,20 +1,20 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="220" height="472" viewBox="0 0 220 472">
2
- <g fill="none" fill-rule="evenodd">
3
- <rect width="220" height="472" fill="#101211" rx="26"/>
4
- <rect width="202" height="404" x="9" y="36" fill="#F4F5F7" rx="9"/>
5
- <rect width="182" height="136" x="19" y="112" fill="#F4F5F7" rx="17.5"/>
6
- <path fill="#F4F5F7" d="M18 36h184c4.97 0 9 4.03 9 9v6H9v-6c0-4.97 4.03-9 9-9z"/>
7
- <path fill="#F4F5F7" d="M9 51H211V82H9z" transform="matrix(1 0 0 -1 0 133)"/>
8
- <rect width="52" height="5" x="84" y="14" fill="#2E2E2E" rx="2.5"/>
9
- <rect width="52" height="5" x="84" y="455" fill="#2E2E2E" rx="2.5"/>
10
- <circle cx="45.5" cy="19.5" r="5.5" fill="#2E2E2E"/>
11
- <circle cx="65.5" cy="19.5" r="3.5" fill="#2E2E2E"/>
12
- <text fill="#000" font-family="Roboto-Regular, Roboto" font-size="12" letter-spacing=".175">
13
- <tspan x="49.5" y="71">Muji India</tspan>
14
- </text>
15
- <circle cx="199" cy="63" r="1" fill="#000"/>
16
- <circle cx="199" cy="70" r="1" fill="#000"/>
17
- <circle cx="199" cy="66.5" r="1" fill="#000"/>
18
- <path fill="#000" d="M28 66c0 .279-.226.505-.505.505h-5.556l2.42 2.42c.198.197.198.518 0 .716-.198.198-.52.198-.718 0l-2.934-2.934c-.39-.39-.39-1.024 0-1.414l2.934-2.934c.198-.198.52-.198.718 0 .198.198.198.519 0 .717l-2.42 2.419h5.556c.279 0 .505.226.505.505z"/>
19
- </g>
20
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="220" height="472" viewBox="0 0 220 472">
2
+ <g fill="none" fill-rule="evenodd">
3
+ <rect width="220" height="472" fill="#101211" rx="26"/>
4
+ <rect width="202" height="404" x="9" y="36" fill="#F4F5F7" rx="9"/>
5
+ <rect width="182" height="136" x="19" y="112" fill="#F4F5F7" rx="17.5"/>
6
+ <path fill="#F4F5F7" d="M18 36h184c4.97 0 9 4.03 9 9v6H9v-6c0-4.97 4.03-9 9-9z"/>
7
+ <path fill="#F4F5F7" d="M9 51H211V82H9z" transform="matrix(1 0 0 -1 0 133)"/>
8
+ <rect width="52" height="5" x="84" y="14" fill="#2E2E2E" rx="2.5"/>
9
+ <rect width="52" height="5" x="84" y="455" fill="#2E2E2E" rx="2.5"/>
10
+ <circle cx="45.5" cy="19.5" r="5.5" fill="#2E2E2E"/>
11
+ <circle cx="65.5" cy="19.5" r="3.5" fill="#2E2E2E"/>
12
+ <text fill="#000" font-family="Roboto-Regular, Roboto" font-size="12" letter-spacing=".175">
13
+ <tspan x="49.5" y="71">Muji India</tspan>
14
+ </text>
15
+ <circle cx="199" cy="63" r="1" fill="#000"/>
16
+ <circle cx="199" cy="70" r="1" fill="#000"/>
17
+ <circle cx="199" cy="66.5" r="1" fill="#000"/>
18
+ <path fill="#000" d="M28 66c0 .279-.226.505-.505.505h-5.556l2.42 2.42c.198.197.198.518 0 .716-.198.198-.52.198-.718 0l-2.934-2.934c-.39-.39-.39-1.024 0-1.414l2.934-2.934c.198-.198.52-.198.718 0 .198.198.198.519 0 .717l-2.42 2.419h5.556c.279 0 .505.226.505.505z"/>
19
+ </g>
20
+ </svg>
@@ -15,6 +15,7 @@ import './_templatePreview.scss';
15
15
  import {updateCharCount} from '../../utils/smsCharCountV2';
16
16
  import messages from './messages';
17
17
  import { WECHAT } from '../../v2Containers/CreativesContainer/constants';
18
+ import Carousel from '../Carousel';
18
19
  const wechatBodyNew = require('./assets/images/wechat_mobile_android.svg');
19
20
  const smsMobileAndroid = require('./assets/images/sms_mobile_android.svg');
20
21
  const lineMobileAndroid = require('../../assets/line.png');
@@ -23,6 +24,7 @@ const lineStickerPlaceholder = require('../../assets/smiley-placeholder.svg');
23
24
  const androidPushMessagePhone = require('./assets/images/androidPushMessage.svg');
24
25
  const iPhonePushMessagePhone = require('./assets/images/iPhonePushMessage.svg');
25
26
  import { CAP_COLOR_03, CAP_WHITE, FONT_COLOR_01, CAP_G08 } from '@capillarytech/cap-ui-library/styled/variables';
27
+ import { TEMPLATE, IMAGE_CAROUSEL, IMAGE, STICKER, TEXT, IMAGE_MAP } from '../../v2Containers/Line/Container/constants';
26
28
 
27
29
  class TemplatePreview extends React.Component { // eslint-disable-line react/prefer-stateless-function
28
30
  onPreviewContentClicked = (channel) => {
@@ -313,7 +315,7 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
313
315
  <div
314
316
  className="msgContainer line-preview"
315
317
  style={{
316
- maxHeight: 300,
318
+ maxHeight: 330,
317
319
  overflow: 'scroll',
318
320
  flexDirection: 'column',
319
321
  marginLeft: 40,
@@ -343,35 +345,36 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
343
345
  selectedSticker = {
344
346
  stickerUrl: lineStickerPlaceholder,
345
347
  },
348
+ imageCarousel = [lineImgPlaceholder],
346
349
  } = item || {};
347
- if (type === 'text') {
350
+ const sectionStyle = {
351
+ background: CAP_WHITE,
352
+ color: FONT_COLOR_01,
353
+ borderRadius: 8,
354
+ position: 'static',
355
+ margin: '6px 0 20px 28px',
356
+ height: 'auto',
357
+ minHeight: 'auto',
358
+ overflow: 'initial',
359
+ maxHeight: 'initial',
360
+ };
361
+ if (type === TEXT) {
348
362
  return (
349
363
  <div
350
364
  className="message-pop align-left"
351
- style={{
352
- background: CAP_WHITE,
353
- color: FONT_COLOR_01,
354
- borderRadius: 8,
355
- position: 'static',
356
- margin: '6px 0 20px 28px',
357
- height: 'auto'
358
- }}
365
+ style={sectionStyle}
359
366
  >
360
367
  <p style={{ marginBottom: 5 }}>{messageContent || ''}</p>
361
368
  </div>
362
369
  );
363
370
  }
364
- if ((type === 'image' && previewImageUrl)) {
371
+ if ((type === IMAGE && previewImageUrl)) {
365
372
  return (
366
373
  <div
367
374
  className="message-pop align-left"
368
375
  style={{
369
- background: CAP_G08,
370
- color: FONT_COLOR_01,
371
- borderRadius: 8,
372
- position: 'static',
373
- margin: '6px 0 20px 28px',
374
- height: 184,
376
+ ...sectionStyle,
377
+ minHeight: 184,
375
378
  display: 'flex',
376
379
  justifyContent: 'center',
377
380
  alignItems: 'center',
@@ -390,17 +393,13 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
390
393
  </div>
391
394
  );
392
395
  }
393
- if ((type === 'imagemap' && baseUrl)) {
396
+ if ((type === IMAGE_MAP && baseUrl)) {
394
397
  return (
395
398
  <div
396
399
  className="message-pop align-left"
397
400
  style={{
398
- background: CAP_G08,
399
- color: FONT_COLOR_01,
400
- borderRadius: 8,
401
- position: 'static',
402
- margin: '6px 0 20px 28px',
403
- height: 184,
401
+ ...sectionStyle,
402
+ minHeight: 184,
404
403
  display: 'flex',
405
404
  justifyContent: 'center',
406
405
  alignItems: 'center',
@@ -419,16 +418,13 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
419
418
  </div>
420
419
  );
421
420
  }
422
- if (type === 'sticker' && selectedSticker) {
421
+ if (type === STICKER && selectedSticker) {
423
422
  return (
424
423
  <div
425
424
  className="message-pop align-left"
426
425
  style={{
426
+ ...sectionStyle,
427
427
  background: 'transparent',
428
- color: FONT_COLOR_01,
429
- color: FONT_COLOR_01,
430
- position: 'static',
431
- margin: '6px 0 20px 10px',
432
428
  display: 'flex',
433
429
  justifyContent: 'center',
434
430
  alignItems: 'center',
@@ -450,6 +446,17 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
450
446
  </div>
451
447
  );
452
448
  }
449
+ if ((type === IMAGE_CAROUSEL || type === TEMPLATE) && imageCarousel) {
450
+ return (
451
+ <div
452
+ style={{
453
+ margin: '32px 0',
454
+ }}
455
+ >
456
+ <Carousel imageCarousel={imageCarousel}/>
457
+ </div>
458
+ )
459
+ }
453
460
  return null;
454
461
  })
455
462
  }
@@ -1,10 +1,10 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import TemplatePreview from '../index';
5
-
6
- describe('<TemplatePreview />', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });
1
+ // import React from 'react';
2
+ // import { shallow } from 'enzyme';
3
+
4
+ // import TemplatePreview from '../index';
5
+
6
+ describe('<TemplatePreview />', () => {
7
+ it('Expect to have unit tests specified', () => {
8
+ expect(true).toEqual(false);
9
+ });
10
+ });
@@ -175,7 +175,8 @@ function SlideBoxContent(props) {
175
175
  animatedStickerUrl,
176
176
  stickerId,
177
177
  packageId,
178
- baseUrl
178
+ baseUrl,
179
+ template,
179
180
  }) => {
180
181
  let previewContent = {};
181
182
  previewContent.messageContent = text;
@@ -187,6 +188,8 @@ function SlideBoxContent(props) {
187
188
  packageId,
188
189
  };
189
190
  previewContent.baseUrl = baseUrl;
191
+ previewContent.imageCarousel = get(template, 'columns', [{}]).map(({ imageUrl, action: { label: actionLabel } = {} }) => ({ imageUrl, actionLabel }) );
192
+
190
193
  const getType = () => {
191
194
  if (text) {
192
195
  return 'text';
@@ -200,6 +203,9 @@ function SlideBoxContent(props) {
200
203
  if (baseUrl) {
201
204
  return 'imagemap';
202
205
  }
206
+ if (template) {
207
+ return 'image_carousel';
208
+ }
203
209
  };
204
210
  previewContent.type = getType();
205
211
  return previewContent;
@@ -1,51 +1,51 @@
1
- import React from 'react';
2
- import { FormattedMessage } from 'react-intl';
3
- import { CapButton } from '@capillarytech/cap-ui-library';
4
- import PropTypes from 'prop-types';
5
- import messages from './messages';
6
- function getFullModeSaveBtn(slidBoxContent) {
7
- return slidBoxContent === "editTemplate" ?
8
- <FormattedMessage {...messages.creativesTemplatesUpdate}/>
9
- :
10
- <FormattedMessage {...messages.creativesTemplatesSaveFullMode}/>;
11
- }
12
- function SlideBoxFooter(props) {
13
- const { slidBoxContent, onSave, onEditTemplate, onCreateNextStep, isFullMode, fetchingCmsData} = props;
14
- return (
15
- <div>
16
- <div>
17
- {props.shouldShowDoneFooter() && (
18
- <div>
19
- <CapButton onClick={onSave} disabled={fetchingCmsData || false}>
20
- {isFullMode ?
21
- getFullModeSaveBtn(slidBoxContent)
22
- :
23
- <FormattedMessage {...messages.creativesTemplatesSave} />
24
- }
25
- </CapButton>
26
- {/* {isFullMode && <CapButton type="secondary" onClick={onDiscard}><FormattedMessage {...messages.creativesTemplatesDiscard}/></CapButton>} */}
27
- </div>)}
28
- {props.shouldShowContinueFooter() &&
29
- <CapButton onClick={onCreateNextStep}>
30
- <FormattedMessage {...messages.continue} />
31
- </CapButton>
32
- }
33
- {slidBoxContent === 'preview' && (
34
- <CapButton onClick={onEditTemplate} type="secondary">
35
- <FormattedMessage {...messages.creativesTemplatesEdit} />
36
- </CapButton>
37
- )}
38
- </div>
39
- </div>
40
- );
41
- }
42
- SlideBoxFooter.propTypes = {
43
- slidBoxContent: PropTypes.node,
44
- onSave: PropTypes.func,
45
- onEditTemplate: PropTypes.func,
46
- onCreateNextStep: PropTypes.func,
47
- shouldShowContinueFooter: PropTypes.func,
48
- shouldShowDoneFooter: PropTypes.func,
49
- isFullMode: PropTypes.bool,
50
- };
51
- export default SlideBoxFooter;
1
+ import React from 'react';
2
+ import { FormattedMessage } from 'react-intl';
3
+ import { CapButton } from '@capillarytech/cap-ui-library';
4
+ import PropTypes from 'prop-types';
5
+ import messages from './messages';
6
+ function getFullModeSaveBtn(slidBoxContent) {
7
+ return slidBoxContent === "editTemplate" ?
8
+ <FormattedMessage {...messages.creativesTemplatesUpdate}/>
9
+ :
10
+ <FormattedMessage {...messages.creativesTemplatesSaveFullMode}/>;
11
+ }
12
+ function SlideBoxFooter(props) {
13
+ const { slidBoxContent, onSave, onEditTemplate, onCreateNextStep, isFullMode} = props;
14
+ return (
15
+ <div>
16
+ <div>
17
+ {props.shouldShowDoneFooter() && (
18
+ <div>
19
+ <CapButton onClick={onSave}>
20
+ {isFullMode ?
21
+ getFullModeSaveBtn(slidBoxContent)
22
+ :
23
+ <FormattedMessage {...messages.creativesTemplatesSave} />
24
+ }
25
+ </CapButton>
26
+ {/* {isFullMode && <CapButton type="secondary" onClick={onDiscard}><FormattedMessage {...messages.creativesTemplatesDiscard}/></CapButton>} */}
27
+ </div>)}
28
+ {props.shouldShowContinueFooter() &&
29
+ <CapButton onClick={onCreateNextStep}>
30
+ <FormattedMessage {...messages.continue} />
31
+ </CapButton>
32
+ }
33
+ {slidBoxContent === 'preview' && (
34
+ <CapButton onClick={onEditTemplate} type="secondary">
35
+ <FormattedMessage {...messages.creativesTemplatesEdit} />
36
+ </CapButton>
37
+ )}
38
+ </div>
39
+ </div>
40
+ );
41
+ }
42
+ SlideBoxFooter.propTypes = {
43
+ slidBoxContent: PropTypes.node,
44
+ onSave: PropTypes.func,
45
+ onEditTemplate: PropTypes.func,
46
+ onCreateNextStep: PropTypes.func,
47
+ shouldShowContinueFooter: PropTypes.func,
48
+ shouldShowDoneFooter: PropTypes.func,
49
+ isFullMode: PropTypes.bool,
50
+ };
51
+ export default SlideBoxFooter;
@@ -1,27 +1,27 @@
1
- /*
2
- *
3
- * CreativesContainer actions
4
- *
5
- */
6
-
7
- import {
8
- DEFAULT_ACTION,
9
- HIDE_CONTAINER_LOADER,
10
- SHOW_CONTANER_LOADER,
11
- } from './constants';
12
-
13
- export function defaultAction() {
14
- return {
15
- type: DEFAULT_ACTION,
16
- };
17
- }
18
- export function showCreativesContainerLoader() {
19
- return {
20
- type: SHOW_CONTANER_LOADER,
21
- };
22
- }
23
- export function hideCreativesContanerLoader() {
24
- return {
25
- type: HIDE_CONTAINER_LOADER,
26
- };
27
- }
1
+ /*
2
+ *
3
+ * CreativesContainer actions
4
+ *
5
+ */
6
+
7
+ import {
8
+ DEFAULT_ACTION,
9
+ HIDE_CONTAINER_LOADER,
10
+ SHOW_CONTANER_LOADER,
11
+ } from './constants';
12
+
13
+ export function defaultAction() {
14
+ return {
15
+ type: DEFAULT_ACTION,
16
+ };
17
+ }
18
+ export function showCreativesContainerLoader() {
19
+ return {
20
+ type: SHOW_CONTANER_LOADER,
21
+ };
22
+ }
23
+ export function hideCreativesContanerLoader() {
24
+ return {
25
+ type: HIDE_CONTAINER_LOADER,
26
+ };
27
+ }
@@ -1,17 +1,17 @@
1
- /*
2
- *
3
- * CreativesContainer constants
4
- *
5
- */
6
-
7
- export const DEFAULT_ACTION = 'app/CreativesContainer/DEFAULT_ACTION';
8
- export const EMAIL = "EMAIL";
9
- export const SMS = "SMS";
10
- export const EBILL = "EBILL";
11
- export const LINE = "LINE";
12
- export const CALL_TASK = "CALL_TASK";
13
- export const MOBILE_PUSH = "MOBILEPUSH";
14
- export const WECHAT = "WECHAT";
15
- export const FACEBOOK = "FACEBOOK";
16
- export const SHOW_CONTANER_LOADER = "app/CreativesContainer/SHOW_CONTANER_LOADER";
17
- export const HIDE_CONTAINER_LOADER = "app/CreativesContainer/HIDE_CONTAINER_LOADER";
1
+ /*
2
+ *
3
+ * CreativesContainer constants
4
+ *
5
+ */
6
+
7
+ export const DEFAULT_ACTION = 'app/CreativesContainer/DEFAULT_ACTION';
8
+ export const EMAIL = "EMAIL";
9
+ export const SMS = "SMS";
10
+ export const EBILL = "EBILL";
11
+ export const LINE = "LINE";
12
+ export const CALL_TASK = "CALL_TASK";
13
+ export const MOBILE_PUSH = "MOBILEPUSH";
14
+ export const WECHAT = "WECHAT";
15
+ export const FACEBOOK = "FACEBOOK";
16
+ export const SHOW_CONTANER_LOADER = "app/CreativesContainer/SHOW_CONTANER_LOADER";
17
+ export const HIDE_CONTAINER_LOADER = "app/CreativesContainer/HIDE_CONTAINER_LOADER";
@@ -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 {
@@ -1,45 +1,45 @@
1
- @import '~@capillarytech/cap-ui-library/styles/_variables.scss';
2
-
3
- $classPrefix: add-creatives-section;
4
-
5
- .#{$classPrefix} {
6
- &.creatives-library-mode{
7
- .sms-create-container, .sms-email-container{
8
- .ant-tabs-top-bar{
9
- display: none;
10
- }
11
- }
12
- }
13
- .#{$classPrefix}-footer {
14
- position: absolute;
15
- bottom: 0;
16
- left: 1px;
17
- padding: 0 12px;
18
- display: flex;
19
- align-items: center;
20
- height: 48px;
21
- border-top: 1px solid $CAP_G07;
22
-
23
- &.with-creative {
24
- width: 100%;
25
- }
26
- }
27
- .wechat-steps {
28
- width: 40% !important;
29
- left: 20%;
30
- position: relative;
31
- .ant-steps-item-title::after {
32
- top: 8px;
33
- }
34
- .ant-steps-item-content {
35
- vertical-align: middle;
36
- padding-top: 4px;
37
- }
38
- }
39
- }
40
-
41
- .map-template-create {
42
- .slidebox-header div:first-child {
43
- width: 100%;
44
- }
1
+ @import '~@capillarytech/cap-ui-library/styles/_variables.scss';
2
+
3
+ $classPrefix: add-creatives-section;
4
+
5
+ .#{$classPrefix} {
6
+ &.creatives-library-mode{
7
+ .sms-create-container, .sms-email-container{
8
+ .ant-tabs-top-bar{
9
+ display: none;
10
+ }
11
+ }
12
+ }
13
+ .#{$classPrefix}-footer {
14
+ position: absolute;
15
+ bottom: 0;
16
+ left: 1px;
17
+ padding: 0 12px;
18
+ display: flex;
19
+ align-items: center;
20
+ height: 48px;
21
+ border-top: 1px solid $CAP_G07;
22
+
23
+ &.with-creative {
24
+ width: 100%;
25
+ }
26
+ }
27
+ .wechat-steps {
28
+ width: 40% !important;
29
+ left: 20%;
30
+ position: relative;
31
+ .ant-steps-item-title::after {
32
+ top: 8px;
33
+ }
34
+ .ant-steps-item-content {
35
+ vertical-align: middle;
36
+ padding-top: 4px;
37
+ }
38
+ }
39
+ }
40
+
41
+ .map-template-create {
42
+ .slidebox-header div:first-child {
43
+ width: 100%;
44
+ }
45
45
  }