@capillarytech/creatives-library 6.13.5 → 6.13.6

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 (51) hide show
  1. package/app.js +3 -3
  2. package/containers/Templates/index.js +3 -0
  3. package/index.js +1 -8
  4. package/package.json +2 -2
  5. package/reducers.js +0 -2
  6. package/routes.js +1 -7
  7. package/services/api.js +0 -5
  8. package/v2Components/TemplatePreview/_templatePreview.scss +2 -8
  9. package/v2Components/TemplatePreview/index.js +18 -104
  10. package/v2Containers/App/constants.js +1 -1
  11. package/v2Containers/CreativesContainer/SlideBoxContent.js +2 -65
  12. package/v2Containers/CreativesContainer/constants.js +0 -2
  13. package/v2Containers/CreativesContainer/index.js +2 -29
  14. package/v2Containers/Line/Create/_lineCreate.scss +64 -0
  15. package/v2Containers/Line/Create/actions.js +94 -0
  16. package/v2Containers/Line/Create/constants.js +43 -0
  17. package/v2Containers/Line/Create/index.js +1112 -0
  18. package/v2Containers/Line/Create/initialSchema.js +378 -0
  19. package/v2Containers/Line/Create/messages.js +229 -0
  20. package/v2Containers/Line/Create/reducer.js +99 -0
  21. package/v2Containers/Line/Create/sagas.js +113 -0
  22. package/v2Containers/Line/Create/selectors.js +30 -0
  23. package/v2Containers/Line/CreateWrapper/constants.js +2 -0
  24. package/v2Containers/Line/CreateWrapper/index.js +117 -0
  25. package/v2Containers/Line/CreateWrapper/messages.js +55 -0
  26. package/v2Containers/Line/Edit/_lineEdit.scss +23 -0
  27. package/v2Containers/Line/Edit/actions.js +79 -0
  28. package/v2Containers/Line/Edit/constants.js +27 -0
  29. package/v2Containers/Line/Edit/index.js +1051 -0
  30. package/v2Containers/Line/Edit/messages.js +173 -0
  31. package/v2Containers/Line/Edit/reducer.js +83 -0
  32. package/v2Containers/Line/Edit/sagas.js +81 -0
  33. package/v2Containers/Line/Edit/selectors.js +29 -0
  34. package/v2Containers/Line/Edit/tests/actions.test.js +18 -0
  35. package/v2Containers/Line/Edit/tests/index.test.js +10 -0
  36. package/v2Containers/Line/Edit/tests/reducer.test.js +9 -0
  37. package/v2Containers/Line/Edit/tests/sagas.test.js +15 -0
  38. package/v2Containers/Line/Edit/tests/selectors.test.js +10 -0
  39. package/v2Containers/Templates/_templates.scss +0 -57
  40. package/v2Containers/Templates/index.js +6 -59
  41. package/v2Containers/TemplatesV2/index.js +1 -9
  42. package/v2Containers/TemplatesV2/messages.js +0 -4
  43. package/assets/viber.png +0 -0
  44. package/v2Containers/Viber/_viber.scss +0 -3
  45. package/v2Containers/Viber/actions.js +0 -74
  46. package/v2Containers/Viber/constants.js +0 -30
  47. package/v2Containers/Viber/index.js +0 -707
  48. package/v2Containers/Viber/messages.js +0 -137
  49. package/v2Containers/Viber/reducer.js +0 -84
  50. package/v2Containers/Viber/sagas.js +0 -107
  51. package/v2Containers/Viber/selectors.js +0 -21
package/app.js CHANGED
@@ -39,12 +39,12 @@ const history = syncHistoryWithStore(browserHistory, store, {
39
39
  });
40
40
 
41
41
  const bugSnagErrorCallback = (event) => {
42
- const { app: { releaseStage } = {}, originalError } = event || {};
43
- const errorMessage = originalError && originalError.message;
42
+ const { app: { releaseStage } = {}, error } = event || {};
43
+ const errorMessage = error && error.message;
44
44
  if (
45
45
  (releaseStage || '').includes('nightly') ||
46
46
  process.env.NODE_ENV !== 'production' ||
47
- ignoredErrorMessages.includes(errorMessage)
47
+ ignoredErrorMessages.include[errorMessage]
48
48
  ) {
49
49
  return false;
50
50
  }
@@ -721,6 +721,9 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
721
721
  }
722
722
  }
723
723
  switch (type) {
724
+ case "getFormData":
725
+ this.getFormData(e);
726
+ break;
724
727
  case "startTemplateCreation":
725
728
  console.log('Starting to create template');
726
729
  //this.getFormData(e);
package/index.js CHANGED
@@ -65,10 +65,6 @@ import LineCreate from './v2Containers/Line/Container';
65
65
  import lineCreateReducer from './v2Containers/Line/Container/reducer';
66
66
  import lineCreateSaga from './v2Containers/Line/Container/sagas';
67
67
 
68
- import Viber from './v2Containers/Viber';
69
- import viberReducer from './v2Containers/Viber/reducer';
70
- import viberSaga from './v2Containers/Viber/sagas';
71
-
72
68
  import TemplatesV2 from './v2Containers/TemplatesV2/index';
73
69
 
74
70
  import CreativesContainer from './v2Containers/CreativesContainer';
@@ -86,7 +82,7 @@ const TemplatesContainer = {Templates, templateReducer, templateSaga};
86
82
  const SmsCreateContainer = {SmsCreate, smsCreateReducer, smsCreateSaga};
87
83
  const SmsEditContainer = {SmsEdit, smsEditReducer, smsEditSaga};
88
84
  const EmailContainer = {Email, emailReducer, emailSaga};
89
- const BeeContainer = { BeeEditor, beeReducer, beeSaga};
85
+ const BeeContainer ={ BeeEditor,beeReducer,beeSaga}
90
86
  const CallTaskContainer = {CallTask, callTaskReducer, callTaskSaga};
91
87
  const WeChatMapTemplateContainer = {WeChatMapTemplate, weChatMapTemplateReducer, weChatMapTemplateSaga};
92
88
  const WeChatRichMediaCreateContainer = {WeChatRichMediaCreate, weChatRichMediaCreateReducer, weChatRichMediaCreateSaga};
@@ -96,8 +92,6 @@ const MobilePushEditContainer = {MobilepushEdit, mobilepushEditReducer, mobilepu
96
92
  const LineCreateContainer = {LineCreate, lineCreateReducer, lineCreateSaga};
97
93
  const TemplatesV2Container = {TemplatesV2, templateReducer, templateSaga};
98
94
  const FacebookContainer = {Facebook, facebookReducer, facebookSaga};
99
- const ViberContainer = {Viber, viberReducer, viberSaga};
100
-
101
95
  const GalleryContainer = {Gallery, galleryReducer, gallerySagas};
102
96
 
103
97
  export {default as TagList} from './v2Containers/TagList/index';
@@ -137,5 +131,4 @@ export { CapContainer,
137
131
  updateCharCount,
138
132
  FacebookContainer,
139
133
  GalleryContainer,
140
- ViberContainer,
141
134
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "6.13.5",
4
+ "version": "6.13.6",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -15,7 +15,7 @@
15
15
  "@babel/polyfill": "7.4.3",
16
16
  "@bugsnag/js": "^7.2.1",
17
17
  "@bugsnag/plugin-react": "^7.2.1",
18
- "@capillarytech/cap-ui-utils": "1.3.4",
18
+ "@capillarytech/cap-ui-utils": "1.3.3",
19
19
  "@mailupinc/bee-plugin": "^1.2.0",
20
20
  "babel-cli": "^6.26.0",
21
21
  "chalk": "1.1.3",
package/reducers.js CHANGED
@@ -9,8 +9,6 @@ import { LOCATION_CHANGE } from 'react-router-redux';
9
9
 
10
10
  import languageProviderReducer from 'v2Containers/LanguageProvider/reducer';
11
11
  import beeEditorReducer from 'v2Containers/BeeEditor/reducer';
12
-
13
-
14
12
  import capReducer from 'containers/Cap/reducer';
15
13
  import appReducer from 'containers/App/reducer';
16
14
  import createSmsReducer from 'containers/Sms/Create/reducer';
package/routes.js CHANGED
@@ -598,8 +598,7 @@ export default function createRoutes(store) {
598
598
 
599
599
  importModules.catch(errorLoading);
600
600
  },
601
- },
602
- {
601
+ }, {
603
602
  path: '/v2(/:channel)',
604
603
  name: 'templatesV2',
605
604
  getComponent(nextState, cb) {
@@ -635,8 +634,6 @@ export default function createRoutes(store) {
635
634
  import('v2Containers/Facebook/reducer'),
636
635
  import('v2Containers/Line/Container/sagas'),
637
636
  import('v2Containers/Line/Container/reducer'),
638
- import('v2Containers/Viber/sagas'),
639
- import('v2Containers/Viber/reducer'),
640
637
  ]);
641
638
 
642
639
  const renderRoute = loadModule(cb);
@@ -657,7 +654,6 @@ export default function createRoutes(store) {
657
654
  galleryReducer, gallerySagas,
658
655
  facebookSagas, facebookReducer,
659
656
  lineCreateSagas, lineCreateReducer,
660
- viberSagas, viberReducer,
661
657
  ]) => {
662
658
  injectReducer('templates', reducer.default);
663
659
  injectReducer('cap', capReducer.default);
@@ -674,7 +670,6 @@ export default function createRoutes(store) {
674
670
  injectReducer('gallery', galleryReducer.default);
675
671
  injectReducer('facebook', facebookReducer.default);
676
672
  injectReducer('lineCreate', lineCreateReducer.default);
677
- injectReducer('viber', viberReducer.default);
678
673
  injectSagas(gallerySagas.default);
679
674
  injectSagas(sagas.default);
680
675
  injectSagas(capSagas.default);
@@ -690,7 +685,6 @@ export default function createRoutes(store) {
690
685
  injectSagas(weChatRichmediaTemplatesEditSagas.default);
691
686
  injectSagas(facebookSagas.default);
692
687
  injectSagas(lineCreateSagas.default);
693
- injectSagas(viberSagas.default);
694
688
  renderRoute(component);
695
689
  });
696
690
  importModules.catch(errorLoading);
package/services/api.js CHANGED
@@ -358,11 +358,6 @@ export const createLineTemplate = ({template}) => {
358
358
  return request(url, getAPICallObject('POST', template));
359
359
  };
360
360
 
361
- export const createViberTemplate = ({template}) => {
362
- const url = `${API_ENDPOINT}/templates/VIBER`;
363
- return request(url, getAPICallObject('POST', template));
364
- };
365
-
366
361
  export const getLocizMessage = async (locale) => {
367
362
  const appName = 'creatives_v2';
368
363
  const url = `${ARYA_ENDPOINT}/translations/${appName}/${locale}`;
@@ -21,6 +21,8 @@
21
21
  left: 23%;
22
22
  width: 42%;
23
23
  height: 336px;
24
+ display: -webkit-box;
25
+ display: -ms-flexbox;
24
26
  display: flex;
25
27
 
26
28
  .sms-icon{
@@ -49,14 +51,6 @@
49
51
  left: 36px;
50
52
  margin-top: -6px;
51
53
  }
52
- }
53
- &.viber-preview{
54
- width: 43%;
55
- .message-pop {
56
- width: 80%;
57
- left: 36px;
58
- margin-top: -6px;
59
- }
60
54
  }
61
55
 
62
56
  .message-pop{
@@ -16,19 +16,15 @@ import {updateCharCount} from '../../utils/smsCharCountV2';
16
16
  import messages from './messages';
17
17
  import { WECHAT } from '../../v2Containers/CreativesContainer/constants';
18
18
  import Carousel from '../Carousel';
19
- import { VIBER } from '../../v2Containers/App/constants';
20
19
  const wechatBodyNew = require('./assets/images/wechat_mobile_android.svg');
21
20
  const smsMobileAndroid = require('./assets/images/sms_mobile_android.svg');
22
21
  const lineMobileAndroid = require('../../assets/line.png');
23
- const viberMobileAndroid = require('../../assets/viber.png');
24
-
25
22
  const lineImgPlaceholder = require('../../assets/line-image-placeholder.svg');
26
23
  const lineStickerPlaceholder = require('../../assets/smiley-placeholder.svg');
27
24
  const lineVideoPlaceholder = require('../../assets/rich-video-placeholder.svg');
28
25
  const androidPushMessagePhone = require('./assets/images/androidPushMessage.svg');
29
26
  const iPhonePushMessagePhone = require('./assets/images/iPhonePushMessage.svg');
30
-
31
- import { CAP_COLOR_03, CAP_WHITE, FONT_COLOR_01, CAP_G08, CAP_G06, CAP_G15, CAP_PURPLE01, CAP_G16 } from '@capillarytech/cap-ui-library/styled/variables';
27
+ import { CAP_COLOR_03, CAP_WHITE, FONT_COLOR_01, CAP_G08, CAP_G06 } from '@capillarytech/cap-ui-library/styled/variables';
32
28
  import { TEMPLATE, IMAGE_CAROUSEL, IMAGE, STICKER, TEXT, IMAGE_MAP, VIDEO } from '../../v2Containers/Line/Container/constants';
33
29
 
34
30
  class TemplatePreview extends React.Component { // eslint-disable-line react/prefer-stateless-function
@@ -131,8 +127,7 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
131
127
 
132
128
  render() {
133
129
  let content = channel && channel.toLowerCase() === 'sms' ? [this.props.content] : this.props.content;
134
- const { channel, showTestAndPreviewIcon, module } = this.props;
135
- const { buttonText, imageURL, messageContent: viberMessageContent } = content || {};
130
+ const { channel, showTestAndPreviewIcon, module} = this.props;
136
131
  let smsDetails = {};
137
132
  // let smsText = '';
138
133
  if (this.props.content && this.props.charCounterEnabled) {
@@ -160,11 +155,11 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
160
155
  });
161
156
  }
162
157
  const disablePreviewAndTest = this.props.channel === 'MOBILEPUSH' ? !this.props.content.header : (this.props.channel === 'SMS' ? !this.props.content : false);
163
- const showTestAndPreview = showTestAndPreviewIcon &&
158
+ const showTestAndPreview = showTestAndPreviewIcon &&
164
159
  channel !== WECHAT &&
165
160
  ['outbound', 'library'].includes(module);
166
161
 
167
- const renderLineMultiText = (content) => {
162
+ const renderLineMultiText = (content) => {
168
163
  let textCount = 0;
169
164
  return content.map((item) => {
170
165
  const { type, messageContent = '' } = item || {};
@@ -175,17 +170,12 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
175
170
  {this.props.intl.formatMessage(messages.textMessageLabel)}
176
171
  {textCount}: ({messageContent.length}/{1600} {this.props.intl.formatMessage(messages.textMessageCharacter)})
177
172
  </p>
178
- );
173
+ )
179
174
  }
180
- return null;
175
+ return null
181
176
  });
182
- };
183
- const viberSectionStyle = {
184
- "padding": '3.5px 0 0',
185
- 'border-radius': '8px',
186
- 'background-color': CAP_G15,
187
- 'width': '79%',
188
- };
177
+ }
178
+
189
179
  const getVideoContent = ({
190
180
  video,
191
181
  actionUrl,
@@ -255,7 +245,7 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
255
245
  />
256
246
  )
257
247
  }
258
- </div>
248
+ </div>
259
249
  );
260
250
 
261
251
  return (
@@ -403,8 +393,7 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
403
393
  marginLeft: 40,
404
394
  }}
405
395
  >
406
- <div
407
- className="sms-icon"
396
+ <div className="sms-icon"
408
397
  style={{
409
398
  left: 0,
410
399
  top: 8,
@@ -412,7 +401,7 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
412
401
  width: 20,
413
402
  height: 20,
414
403
  background: CAP_COLOR_03,
415
- paddingRight: 5,
404
+ paddingRight: 5
416
405
  }}
417
406
  >
418
407
  {this.props.LineAccountName}
@@ -475,7 +464,7 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
475
464
  },
476
465
  }}
477
466
  />
478
- </div>
467
+ </div>
479
468
  );
480
469
  }
481
470
  if (type === VIDEO) {
@@ -506,7 +495,7 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
506
495
  },
507
496
  }}
508
497
  />
509
- </div>
498
+ </div>
510
499
  );
511
500
  }
512
501
  if (type === STICKER && selectedSticker) {
@@ -521,7 +510,7 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
521
510
  alignItems: 'center',
522
511
  }}
523
512
  >
524
- <CapImage
513
+ <CapImage
525
514
  src={selectedSticker.stickerUrl}
526
515
  style={{maxWidth: '100%', marginBottom: 5 }}
527
516
  rest={{
@@ -530,11 +519,11 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
530
519
  marginBottom: 5,
531
520
  },
532
521
  height: 70,
533
- onMouseOut: (e) => (e.currentTarget.src = selectedSticker.stickerUrl),
534
- onMouseOver: (e) => (e.currentTarget.src = selectedSticker.animatedStickerUrl || selectedSticker.stickerUrl),
522
+ onMouseOut: e => (e.currentTarget.src = selectedSticker.stickerUrl),
523
+ onMouseOver: e => (e.currentTarget.src = selectedSticker.animatedStickerUrl || selectedSticker.stickerUrl),
535
524
  }}
536
525
  />
537
- </div>
526
+ </div>
538
527
  );
539
528
  }
540
529
  if ((type === IMAGE_CAROUSEL || type === TEMPLATE) && imageCarousel) {
@@ -546,7 +535,7 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
546
535
  >
547
536
  <Carousel imageCarousel={imageCarousel}/>
548
537
  </div>
549
- );
538
+ )
550
539
  }
551
540
  return null;
552
541
  })
@@ -557,82 +546,7 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
557
546
  </div>
558
547
  ) : ''
559
548
  }
560
- {
561
- channel && channel.toLowerCase() === VIBER ? (
562
- <div className="shell-v2 align-center" id="sms-preview">
563
- <CapImage className="preview-image" src={viberMobileAndroid} alt={this.props.intl.formatMessage(messages.previewGenerated)}/>
564
- <div
565
- className="msgContainer viber-preview"
566
- style={{
567
- maxHeight: 292,
568
- marginLeft: 28,
569
- }}
570
- >
571
- <div
572
- className="sms-icon"
573
- style={{
574
- "width": 20,
575
- "height": 20,
576
- "margin": '0 4px 277px 0',
577
- "padding": '6px 2px 7px 3px',
578
- 'border-radius': '4px',
579
- 'background-color': CAP_PURPLE01,
580
- 'font-size': '6px',
581
- 'font-weight': 900,
582
- "color": CAP_WHITE,
583
- }}
584
- >
585
- {this.props.viberAccountName}
586
- </div>
587
- <div
588
- className="message-pop align-left"
589
- style={viberSectionStyle}>
590
- {/* Text Viber preview */}
591
- <p
592
- style={{
593
- 'font-size': '10px',
594
- "color": CAP_G16,
595
- "margin": '1.5px 6px 1px 7px',
596
- }}>{viberMessageContent || ''}
597
- </p>
598
- {/* Image Viber preview */}
599
- {imageURL && <CapImage
600
- src={imageURL}
601
- alt="brand-name"
602
- rest={{
603
- style: {
604
- maxWidth: '100%',
605
- marginBottom: 5,
606
- },
607
- }}
608
- />
609
- }
610
- {/* button viber preview */}
611
- {buttonText && <div
612
- style={{
613
- 'border-radius': '16px',
614
- 'background-color': CAP_PURPLE01,
615
- "margin-top": '14px',
616
- 'text-align': 'center',
617
- "width": '132px',
618
- "height": '20px',
619
- "margin-left": "5px",
620
- }}>
621
- <p
622
- style={{ 'font-size': '12px',
623
- 'font-weight': '500',
624
- "color": CAP_WHITE }}
625
- >
626
- {buttonText || ''}</p>
627
- </div>
628
- }
629
- <div style={{ paddingBottom: 32}}></div>
630
- </div>
631
549
 
632
- </div>
633
- </div>
634
- ) : ''
635
- }
636
550
  </div>
637
551
 
638
552
  </CapColumn>
@@ -20,7 +20,7 @@ export const TRACK_CREATE_WECHAT = 'createWeChat';
20
20
  export const TRACK_CREATE_IMAGE = 'createImage';
21
21
  export const TRACK_CREATE_LINE = 'createLine';
22
22
 
23
- export const VIBER = 'viber';
23
+
24
24
  export const TRACK_EDIT_SMS = 'editSms';
25
25
  export const TRACK_EDIT_EMAIL = 'editEmail';
26
26
  export const TRACK_EDIT_MPUSH = 'editMpush';
@@ -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,
@@ -71,22 +70,6 @@ const getLineType = ({
71
70
  }
72
71
  return {};
73
72
  };
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
- };
90
73
 
91
74
  function SlideBoxContent(props) {
92
75
  const {
@@ -152,15 +135,6 @@ function SlideBoxContent(props) {
152
135
  isFullMode,
153
136
  templateData,
154
137
  });
155
- const {isCreate: isCreateViber = false,
156
- isEdit: isEditViber = false } = getViber({
157
- slidBoxContent,
158
- channel,
159
- isFullMode,
160
- templateData,
161
- });
162
-
163
-
164
138
  const isCreateSms = slidBoxContent === 'createTemplate' && channel === constants.SMS;
165
139
  const isCreateMPush = slidBoxContent === 'createTemplate' && channel === constants.MOBILE_PUSH;
166
140
  const isCreateCallTask = slidBoxContent === 'createTemplate' && channel === constants.CALL_TASK;
@@ -182,7 +156,7 @@ function SlideBoxContent(props) {
182
156
  isEditEmailWithId = slidBoxContent === 'editTemplate' && channel === constants.EMAIL && templateData._id;
183
157
  isEmailEditWithContent = slidBoxContent === 'editTemplate' && channel === constants.EMAIL && !templateData._id;
184
158
  isEditFacebook = slidBoxContent === 'editTemplate' && channel === constants.FACEBOOK;
185
- isPreview = slidBoxContent === 'preview' && (channel === constants.SMS || channel === constants.LINE || channel === constants.VIBER);
159
+ isPreview = slidBoxContent === 'preview' && (channel === constants.SMS || channel === constants.LINE);
186
160
  isEmailPreview = slidBoxContent === 'preview' && channel === constants.EMAIL;
187
161
  isMpushPreview = slidBoxContent === 'preview' && channel === constants.MOBILE_PUSH;
188
162
  }
@@ -249,16 +223,6 @@ function SlideBoxContent(props) {
249
223
  return previewContent;
250
224
  });
251
225
  }
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
226
  default:
263
227
  return get(templateDataObject, `versions.base.content`);
264
228
  }
@@ -536,33 +500,6 @@ function SlideBoxContent(props) {
536
500
  />
537
501
  )
538
502
  }
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
503
  </CreativesWrapper>
567
504
  );
568
505
  }
@@ -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";
@@ -247,24 +247,6 @@ class Creatives extends React.Component {
247
247
  };
248
248
  break;
249
249
  }
250
- case constants.VIBER: {
251
- const { messageBody, isDefault } = templateData;
252
- const viberContent = JSON.parse(messageBody || '{}').messages || [{}];
253
- creativesTemplateData = {
254
- type: constants.VIBER,
255
- isDefault,
256
- edit: true,
257
- name: "",
258
- versions: {
259
- base: {
260
- content: {
261
- viber: viberContent,
262
- },
263
- },
264
- },
265
- };
266
- break;
267
- }
268
250
  default:
269
251
  break;
270
252
  }
@@ -350,15 +332,6 @@ class Creatives extends React.Component {
350
332
  };
351
333
  }
352
334
  break;
353
- case constants.VIBER:
354
- if (template.value) {
355
- const { versions } = template.value;
356
- templateData = {
357
- channel,
358
- messageBody: JSON.stringify(versions.base.content),
359
- };
360
- }
361
- break;
362
335
  default:
363
336
  break;
364
337
  }
@@ -473,8 +446,8 @@ class Creatives extends React.Component {
473
446
  }
474
447
  }
475
448
 
476
- const isLineViberChannel = templateData && [constants.LINE, constants.VIBER].includes(templateData);
477
- if ([constants.LINE, constants.VIBER].includes(channel) || isLineViberChannel) {
449
+ const isLineChannel = templateData && templateData.type === constants.LINE;
450
+ if (channel === constants.LINE || isLineChannel) {
478
451
  showFooter = false;
479
452
  }
480
453
 
@@ -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
+ }