@capillarytech/creatives-library 6.14.1 → 6.15.2

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 (94) hide show
  1. package/app.js +5 -2
  2. package/config/app.js +0 -2
  3. package/containers/Templates/index.js +0 -3
  4. package/index.js +0 -7
  5. package/package.json +2 -2
  6. package/reducers.js +1 -2
  7. package/services/api.js +0 -7
  8. package/utils/common.js +0 -118
  9. package/utils/ignoredErrorMessages.js +4 -0
  10. package/v2Components/BeeEditor/index.js +263 -0
  11. package/v2Components/BeeEditor/index.scss +11 -0
  12. package/v2Components/BeeEditor/messages.js +71 -0
  13. package/v2Components/BeeEditor/tests/index.test.js +10 -0
  14. package/v2Components/FormBuilder/index.js +4 -2
  15. package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/_wechatRichmediaTemplatePrev.scss +151 -151
  16. package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +33 -33
  17. package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/tests/index.test.js +10 -10
  18. package/v2Components/TemplatePreview/assets/images/androidPushMessage.svg +44 -44
  19. package/v2Components/TemplatePreview/assets/images/home-screen-android.svg +21 -21
  20. package/v2Components/TemplatePreview/assets/images/home-screen-ios.svg +16 -16
  21. package/v2Components/TemplatePreview/assets/images/iPhonePushMessage.svg +134 -134
  22. package/v2Components/TemplatePreview/assets/images/mobile.svg +23 -23
  23. package/v2Components/TemplatePreview/assets/images/sms_mobile_android.svg +22 -22
  24. package/v2Components/TemplatePreview/assets/images/user-icon.svg +18 -18
  25. package/v2Components/TemplatePreview/assets/images/wechat-home-screen-android.svg +21 -21
  26. package/v2Components/TemplatePreview/assets/images/wechat-mobile.svg +77 -77
  27. package/v2Components/TemplatePreview/assets/images/wechat_mobile_android.svg +20 -20
  28. package/v2Components/TemplatePreview/tests/index.test.js +10 -10
  29. package/v2Containers/App/constants.js +1 -1
  30. package/v2Containers/CreativesContainer/SlideBoxContent.js +1 -17
  31. package/v2Containers/CreativesContainer/SlideBoxHeader.js +0 -2
  32. package/v2Containers/CreativesContainer/actions.js +27 -27
  33. package/v2Containers/CreativesContainer/constants.js +0 -2
  34. package/v2Containers/CreativesContainer/index.js +0 -8
  35. package/v2Containers/CreativesContainer/index.scss +44 -44
  36. package/v2Containers/CreativesContainer/messages.js +305 -305
  37. package/v2Containers/CreativesContainer/reducer.js +29 -29
  38. package/v2Containers/CreativesContainer/sagas.js +11 -11
  39. package/v2Containers/CreativesContainer/selectors.js +30 -30
  40. package/v2Containers/CreativesContainer/tests/actions.test.js +18 -18
  41. package/v2Containers/CreativesContainer/tests/index.test.js +10 -10
  42. package/v2Containers/CreativesContainer/tests/reducer.test.js +9 -9
  43. package/v2Containers/CreativesContainer/tests/sagas.test.js +15 -15
  44. package/v2Containers/CreativesContainer/tests/selectors.test.js +10 -10
  45. package/v2Containers/Line/Create/_lineCreate.scss +64 -0
  46. package/v2Containers/Line/Create/actions.js +94 -0
  47. package/v2Containers/Line/Create/constants.js +43 -0
  48. package/v2Containers/Line/Create/index.js +1132 -0
  49. package/v2Containers/Line/Create/initialSchema.js +378 -0
  50. package/v2Containers/Line/Create/messages.js +229 -0
  51. package/v2Containers/Line/Create/reducer.js +99 -0
  52. package/v2Containers/Line/Create/sagas.js +113 -0
  53. package/v2Containers/Line/Create/selectors.js +30 -0
  54. package/v2Containers/Line/CreateWrapper/constants.js +2 -0
  55. package/v2Containers/Line/CreateWrapper/index.js +117 -0
  56. package/v2Containers/Line/CreateWrapper/messages.js +55 -0
  57. package/v2Containers/Line/Edit/_lineEdit.scss +23 -0
  58. package/v2Containers/Line/Edit/actions.js +79 -0
  59. package/v2Containers/Line/Edit/constants.js +27 -0
  60. package/v2Containers/Line/Edit/index.js +1051 -0
  61. package/v2Containers/Line/Edit/messages.js +173 -0
  62. package/v2Containers/Line/Edit/reducer.js +83 -0
  63. package/v2Containers/Line/Edit/sagas.js +81 -0
  64. package/v2Containers/Line/Edit/selectors.js +29 -0
  65. package/v2Containers/Line/Edit/tests/actions.test.js +18 -0
  66. package/v2Containers/Line/Edit/tests/index.test.js +10 -0
  67. package/v2Containers/Line/Edit/tests/reducer.test.js +9 -0
  68. package/v2Containers/Line/Edit/tests/sagas.test.js +15 -0
  69. package/v2Containers/Line/Edit/tests/selectors.test.js +10 -0
  70. package/v2Containers/Templates/tests/actions.test.js +18 -18
  71. package/v2Containers/Templates/tests/index.test.js +10 -10
  72. package/v2Containers/Templates/tests/reducer.test.js +9 -9
  73. package/v2Containers/Templates/tests/sagas.test.js +15 -15
  74. package/v2Containers/Templates/tests/selectors.test.js +10 -10
  75. package/v2Containers/TemplatesV2/TemplatesV2.style.js +29 -29
  76. package/v2Containers/TemplatesV2/actions.js +16 -16
  77. package/v2Containers/TemplatesV2/constants.js +10 -10
  78. package/v2Containers/TemplatesV2/index.js +0 -13
  79. package/v2Containers/TemplatesV2/messages.js +0 -4
  80. package/v2Containers/TemplatesV2/selectors.js +25 -25
  81. package/v2Containers/TemplatesV2/tests/actions.test.js +18 -18
  82. package/v2Containers/TemplatesV2/tests/index.test.js +10 -10
  83. package/v2Containers/TemplatesV2/tests/reducer.test.js +9 -9
  84. package/v2Containers/TemplatesV2/tests/sagas.test.js +15 -15
  85. package/v2Containers/TemplatesV2/tests/selectors.test.js +10 -10
  86. package/v2Containers/WeChat/MapTemplates/index.js +1 -1
  87. package/v2Containers/FTP/_FTP.scss +0 -92
  88. package/v2Containers/FTP/actions.js +0 -7
  89. package/v2Containers/FTP/constants.js +0 -3
  90. package/v2Containers/FTP/index.js +0 -517
  91. package/v2Containers/FTP/messages.js +0 -60
  92. package/v2Containers/FTP/reducer.js +0 -32
  93. package/v2Containers/FTP/sagas.js +0 -26
  94. package/v2Containers/FTP/selectors.js +0 -20
@@ -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>
@@ -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
+ });
@@ -47,5 +47,5 @@ export const CHANNEL_EDIT_TRACK_MAPPING = {
47
47
  };
48
48
  export const GTM_TRACKING_ID = 'UA-110024621-2';
49
49
  export const BEE_PLUGIN = 'BEE_PLUGIN';
50
- export const NO_COMMUNICATION = 'NO_COMMUNICATION';
50
+
51
51
  export const CREATIVES_UI_VIEW = 'CREATIVES_UI_VIEW';
@@ -18,7 +18,6 @@ import CallTask from '../CallTask';
18
18
  import MobliPushEdit from '../MobilePush/Edit';
19
19
  import * as constants from './constants';
20
20
  import LineContainer from '../Line/Container';
21
- import FTP from '../FTP';
22
21
  const CreativesWrapper = styled.div`
23
22
  .ant-popover,
24
23
  .ant-notification,
@@ -118,7 +117,6 @@ function SlideBoxContent(props) {
118
117
  selectedAccount,
119
118
  onShowTemplates,
120
119
  handleClose,
121
- onFTPSubmit,
122
120
  } = props;
123
121
  const type = (messageDetails.type || '').toLowerCase(); // type is context in get tags values : outbound | dvs | referral | loyalty | coupons
124
122
  const query = { type: !isFullMode && 'embedded', module: isFullMode ? 'default' : 'library', isEditFromCampaigns: (templateData || {}).isEditFromCampaigns};
@@ -149,7 +147,6 @@ function SlideBoxContent(props) {
149
147
  let isEditCallTask = false;
150
148
  let isEditMPush = false;
151
149
  let isEditFacebook = false;
152
- let isEditFTP = false;
153
150
  const isEmailCreate = slidBoxContent === 'createTemplate' && channel === constants.EMAIL;
154
151
  if (templateData && channel) {
155
152
  channel = templateData.type;// for edit mode with template data
@@ -162,7 +159,6 @@ function SlideBoxContent(props) {
162
159
  isPreview = slidBoxContent === 'preview' && (channel === constants.SMS || channel === constants.LINE);
163
160
  isEmailPreview = slidBoxContent === 'preview' && channel === constants.EMAIL;
164
161
  isMpushPreview = slidBoxContent === 'preview' && channel === constants.MOBILE_PUSH;
165
- isEditFTP = slidBoxContent === 'editTemplate' && [constants.NO_COMMUNICATION, constants.FTP].includes(channel);
166
162
  }
167
163
 
168
164
  const getChannelPreviewContent = (templateDataObject) => {
@@ -231,6 +227,7 @@ function SlideBoxContent(props) {
231
227
  return get(templateDataObject, `versions.base.content`);
232
228
  }
233
229
  };
230
+
234
231
  return (
235
232
  <CreativesWrapper>
236
233
  {!isFullMode && slidBoxContent === 'templates' && (
@@ -253,10 +250,6 @@ function SlideBoxContent(props) {
253
250
  onCreateComplete={onCreateComplete}
254
251
  getFormSubscriptionData={getFormData}
255
252
  handleClose={handleClose}
256
- onFTPSubmit={onFTPSubmit}
257
- slidBoxContent={slidBoxContent}
258
- FTPMode="create"
259
- selectedOfferDetails={selectedOfferDetails}
260
253
  />
261
254
  )}
262
255
  {isPreview && (
@@ -323,14 +316,6 @@ function SlideBoxContent(props) {
323
316
  onTestContentClicked={onTestContentClicked}
324
317
  />
325
318
  )}
326
- {isEditFTP && (
327
- <FTP
328
- mode="edit"
329
- onFTPSubmit={onFTPSubmit}
330
- messageDetails={messageDetails}
331
- selectedOfferDetails={selectedOfferDetails}
332
- />
333
- )}
334
319
  {
335
320
  isEditCallTask &&
336
321
  <CallTask
@@ -558,6 +543,5 @@ SlideBoxContent.propTypes = {
558
543
  onCreateComplete: PropTypes.func,
559
544
  saveMessage: PropTypes.func,
560
545
  selectedAccount: PropTypes.object,
561
- onFTPSubmit: PropTypes.func,
562
546
  };
563
547
  export default SlideBoxContent;
@@ -15,8 +15,6 @@ function getChannelLabel(channel = '') {
15
15
  email: 'Email',
16
16
  mobilepush: 'Push notification',
17
17
  wechat: 'Wechat',
18
- no_communication: 'NO_COMMUNICATION',
19
- ftp: 'FTP',
20
18
  };
21
19
  return labels[channel.toLowerCase()];
22
20
  }
@@ -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
+ }
@@ -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 FTP = "FTP";
17
- export const NO_COMMUNICATION = "NO_COMMUNICATION";
18
16
  export const SHOW_CONTANER_LOADER = "app/CreativesContainer/SHOW_CONTANER_LOADER";
19
17
  export const HIDE_CONTAINER_LOADER = "app/CreativesContainer/HIDE_CONTAINER_LOADER";
@@ -143,13 +143,6 @@ class Creatives extends React.Component {
143
143
  const {channel} = templateData;
144
144
  let creativesTemplateData = {type: channel };
145
145
  switch (channel) {
146
- case constants.NO_COMMUNICATION: {
147
- creativesTemplateData = {
148
- type: channel,
149
- ...templateData,
150
- };
151
- break;
152
- }
153
146
  case constants.SMS: {
154
147
  const formData = {
155
148
  "sms-editor": templateData.messageBody,
@@ -613,7 +606,6 @@ class Creatives extends React.Component {
613
606
  selectedAccount={this.props.selectedAccount}
614
607
  onShowTemplates={this.onShowTemplates}
615
608
  handleClose={this.handleCloseSlideBox}
616
- onFTPSubmit={getCreativesData}
617
609
  editor={editor}
618
610
  />
619
611
  }
@@ -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
  }