@capillarytech/creatives-library 6.9.1 → 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 +3 -3
  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 -117
  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 +108 -210
  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 +42 -34
  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 -278
  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
@@ -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;
@@ -616,4 +616,10 @@
616
616
  display: inline-block;
617
617
  background-color: #333333;
618
618
  margin-right: 4px;
619
+ }
620
+
621
+ .template-carousel.single-img {
622
+ .slick-track {
623
+ margin-left: 0;
624
+ }
619
625
  }
@@ -11,6 +11,7 @@ import _ from 'lodash';
11
11
  import { injectIntl, intlShape, FormattedMessage} from 'react-intl';
12
12
  import {CapColumn, CapTab, CapIcon, CapLabel, CapImage, CapTooltip} from '@capillarytech/cap-ui-library';
13
13
  import './_templatePreview.scss';
14
+ import Carousel from '../../v2Components/Carousel';
14
15
  import {updateCharCount} from '../../utils/smsCharCountV2';
15
16
  import messages from './messages';
16
17
  const smsIcon = require('./assets/images/user-icon.svg');
@@ -27,6 +28,7 @@ const smsBody = require('./assets/images/mobile.svg');
27
28
  const androidPushMessagePhone = require('./assets/images/androidPushMessage.svg');
28
29
  const iPhonePushMessagePhone = require('./assets/images/iPhonePushMessage.svg');
29
30
  import { CAP_COLOR_03, CAP_WHITE, FONT_COLOR_01, CAP_G08 } from '@capillarytech/cap-ui-library/styled/variables';
31
+ import { TEMPLATE, IMAGE_CAROUSEL, IMAGE_MAP_CAMEL_CASE, IMAGE, STICKER, TEXT } from '../../v2Containers/Line/Container/constants';
30
32
 
31
33
  class TemplatePreview extends React.Component { // eslint-disable-line react/prefer-stateless-function
32
34
  getWechatAndroidPreview = (content) => (
@@ -349,35 +351,36 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
349
351
  selectedSticker = {
350
352
  stickerUrl: lineStickerPlaceholder,
351
353
  },
354
+ imageCarousel = [lineImgPlaceholder],
352
355
  } = item || {};
353
- if (type === 'text') {
356
+ const sectionStyle = {
357
+ background: CAP_WHITE,
358
+ color: FONT_COLOR_01,
359
+ borderRadius: 8,
360
+ position: 'static',
361
+ margin: '6px 0 20px 28px',
362
+ height: 'auto',
363
+ minHeight: 'auto',
364
+ overflow: 'initial',
365
+ maxHeight: 'initial',
366
+ };
367
+ if (type === TEXT) {
354
368
  return (
355
369
  <div
356
370
  className="message-pop align-left"
357
- style={{
358
- background: CAP_WHITE,
359
- color: FONT_COLOR_01,
360
- borderRadius: 8,
361
- position: 'static',
362
- margin: '6px 0 20px 28px',
363
- height: 'auto'
364
- }}
371
+ style={sectionStyle}
365
372
  >
366
373
  <p style={{ marginBottom: 5 }}>{messageContent || ''}</p>
367
374
  </div>
368
375
  );
369
376
  }
370
- if ((type === 'image' && previewImageUrl)) {
377
+ if ((type === IMAGE && previewImageUrl)) {
371
378
  return (
372
379
  <div
373
380
  className="message-pop align-left"
374
381
  style={{
375
- background: CAP_G08,
376
- color: FONT_COLOR_01,
377
- borderRadius: 8,
378
- position: 'static',
379
- margin: '6px 0 20px 28px',
380
- height: 184,
382
+ ...sectionStyle,
383
+ minHeight: 184,
381
384
  display: 'flex',
382
385
  justifyContent: 'center',
383
386
  alignItems: 'center',
@@ -396,17 +399,13 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
396
399
  </div>
397
400
  );
398
401
  }
399
- if ((type === 'imageMap' && baseUrl)) {
402
+ if ((type === IMAGE_MAP_CAMEL_CASE && baseUrl)) {
400
403
  return (
401
404
  <div
402
405
  className="message-pop align-left"
403
406
  style={{
404
- background: CAP_G08,
405
- color: FONT_COLOR_01,
406
- borderRadius: 8,
407
- position: 'static',
408
- margin: '6px 0 20px 28px',
409
- height: 184,
407
+ ...sectionStyle,
408
+ minHeight: 184,
410
409
  display: 'flex',
411
410
  justifyContent: 'center',
412
411
  alignItems: 'center',
@@ -425,16 +424,13 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
425
424
  </div>
426
425
  );
427
426
  }
428
- if (type === 'sticker' && selectedSticker) {
427
+ if (type === STICKER && selectedSticker) {
429
428
  return (
430
429
  <div
431
430
  className="message-pop align-left"
432
431
  style={{
432
+ ...sectionStyle,
433
433
  background: 'transparent',
434
- color: FONT_COLOR_01,
435
- color: FONT_COLOR_01,
436
- position: 'static',
437
- margin: '6px 0 20px 28px',
438
434
  display: 'flex',
439
435
  justifyContent: 'center',
440
436
  alignItems: 'center',
@@ -456,6 +452,17 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
456
452
  </div>
457
453
  );
458
454
  }
455
+ if ((type === IMAGE_CAROUSEL || type === TEMPLATE) && imageCarousel) {
456
+ return (
457
+ <div
458
+ style={{
459
+ margin: '40px 0 8px',
460
+ }}
461
+ >
462
+ <Carousel imageCarousel={imageCarousel}/>
463
+ </div>
464
+ )
465
+ }
459
466
  return null;
460
467
  })
461
468
  }
package/config/app.js CHANGED
@@ -14,7 +14,7 @@ const config = {
14
14
  accountConfig: (strs, accountId) => `${window.location.origin}/org/config/AccountAdd?q=a&channelId=2&accountId=${accountId}&edit=1`,
15
15
  },
16
16
  development: {
17
- api_endpoint: 'http://localhost:2022/arya/api/v1/creatives',
17
+ api_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/creatives',
18
18
  campaigns_api_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/iris/v2/campaigns',
19
19
  auth_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/auth',
20
20
  arya_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1',
@@ -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,11 +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
- <!-- Roboto Font -->
17
- <link href="https://fonts.googleapis.com/css?family=Roboto:400,500" rel="stylesheet">
18
-
19
14
  <!-- Google Tag Manager -->
20
15
  <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
21
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.1",
4
+ "version": "6.9.5",
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);
@@ -0,0 +1,120 @@
1
+ import React, { Component } from "react";
2
+ import { Carousel, Icon } from 'antd';
3
+ import './style.scss';
4
+ import CapImage from '@capillarytech/cap-ui-library/CapImage';
5
+ import CapButton from '@capillarytech/cap-ui-library/CapButton';
6
+ import CapIcon from '@capillarytech/cap-ui-library/CapIcon';
7
+ const lineImgPlaceholder = require('../../assets/line-image-placeholder.svg');
8
+ import { CAP_WHITE, CAP_G08 } from '@capillarytech/cap-ui-library/styled/variables';
9
+
10
+ const arrowStyle = {
11
+ background: 'rgba(0, 0, 0, 0.1)',
12
+ display: 'block',
13
+ position: 'absolute',
14
+ color: CAP_WHITE,
15
+ padding: 0,
16
+ height: 24,
17
+ width: 24,
18
+ borderRadius: '50%',
19
+ }
20
+
21
+ const Arrow = props => {
22
+ const { className, style, onClick, extraStyle, type } = props
23
+ return (
24
+ <CapButton
25
+ className={className}
26
+ onClick={onClick}
27
+ type="flat"
28
+ style={{
29
+ ...style,
30
+ ...arrowStyle,
31
+ ...extraStyle,
32
+ }}
33
+ >
34
+ <CapIcon
35
+ type={type}
36
+ />
37
+ </CapButton>
38
+ )
39
+ }
40
+
41
+ const settings = {
42
+ nextArrow: (
43
+ <Arrow
44
+ extraStyle={{
45
+ right: 10,
46
+ }}
47
+ type="chevron-right"
48
+ />
49
+ ),
50
+ prevArrow: (
51
+ <Arrow
52
+ extraStyle={{
53
+ left: 8,
54
+ zIndex: 1,
55
+ }}
56
+ type="chevron-left"
57
+ />
58
+ ),
59
+ }
60
+
61
+ const CarouselComponent = ({
62
+ imageCarousel,
63
+ }) => {
64
+ let carousel = React.createRef();
65
+ const next = () => carousel.next();
66
+ const previous = () => carousel.prev();
67
+
68
+ const prop = {
69
+ dots: false,
70
+ infinite: true,
71
+ speed: 500,
72
+ slidesToShow: 1,
73
+ slidesToScroll: 0.5,
74
+ arrows: true,
75
+ swipeToSlide: true,
76
+ focusOnSelect: true,
77
+ rows: 1,
78
+ };
79
+
80
+ const imageCarouselLength = imageCarousel.length;
81
+
82
+ return (
83
+ <div style={{ position: 'relative' }} className={`template-carousel ${imageCarouselLength ? 'single-img' : ''}`}>
84
+ <Carousel ref={node => (carousel = node)} {...prop} {...settings}>
85
+ {
86
+ imageCarousel.map(({
87
+ actionLabel,
88
+ imageUrl = lineImgPlaceholder
89
+ }) => (
90
+ <div className="carousel-section">
91
+ <CapImage
92
+ src={imageUrl}
93
+ alt="brand-name"
94
+ rest={{
95
+ style: {
96
+ maxWidth: '100%',
97
+ },
98
+ }}
99
+ />
100
+ <span
101
+ style={{
102
+ position: 'relative',
103
+ bottom: 90,
104
+ background: 'rgba(94, 108, 132, 0.33)',
105
+ borderRadius: '42%',
106
+ padding: '0 12px',
107
+ color: CAP_WHITE,
108
+ }}
109
+ >
110
+ {actionLabel}
111
+ </span>
112
+ </div>
113
+ ))
114
+ }
115
+ </Carousel>
116
+ </div>
117
+ );
118
+ }
119
+
120
+ export default CarouselComponent;
@@ -0,0 +1,40 @@
1
+ @import '~@capillarytech/cap-ui-library/styles/_variables.scss';
2
+
3
+ .template-carousel {
4
+ .slick-slide {
5
+ width: 120px !important;
6
+ margin-right: 6px;
7
+ }
8
+
9
+ .slick-track {
10
+ margin-left: 56px;
11
+ }
12
+
13
+ &.single-img {
14
+ .slick-track {
15
+ margin-left: 0;
16
+ }
17
+ }
18
+
19
+ .slick-list {
20
+ height: 180px;
21
+ }
22
+
23
+ .carousel-section {
24
+ height: 160px;
25
+ line-height: 160px;
26
+ text-align: center;
27
+ width: 120px !important;
28
+ border-radius: 12px;
29
+ background-color: $CAP_G09,
30
+ }
31
+
32
+ .ant-carousel .slick-slide {
33
+ .carousel-section {
34
+ img {
35
+ display: inline-block;
36
+ padding: 0 4px;
37
+ }
38
+ }
39
+ }
40
+ }
@@ -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;