@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,10 +1,10 @@
1
- /*
2
- *
3
- * TemplatesV2 constants
4
- *
5
- */
6
-
7
- export const DEFAULT_ACTION = 'app/TemplatesV2/DEFAULT_ACTION';
8
- export const GET_TEMPLATES_REQUEST = 'app/TemplatesV2/GET_TEMPLATES_REQUEST';
9
- export const GET_TEMPLATES_SUCESS = 'app/TemplatesV2/GET_TEMPLATES_SUCESS';
10
- export const GET_TEMPLATES_FAILURE = 'app/TemplatesV2/GET_TEMPLATES_FAILURE';
1
+ /*
2
+ *
3
+ * TemplatesV2 constants
4
+ *
5
+ */
6
+
7
+ export const DEFAULT_ACTION = 'app/TemplatesV2/DEFAULT_ACTION';
8
+ export const GET_TEMPLATES_REQUEST = 'app/TemplatesV2/GET_TEMPLATES_REQUEST';
9
+ export const GET_TEMPLATES_SUCESS = 'app/TemplatesV2/GET_TEMPLATES_SUCESS';
10
+ export const GET_TEMPLATES_FAILURE = 'app/TemplatesV2/GET_TEMPLATES_FAILURE';
@@ -23,7 +23,6 @@ import Templates from '../Templates';
23
23
  import CallTask from '../CallTask';
24
24
  import Facebook from '../Facebook';
25
25
  import Line from '../Line/Container';
26
- import FTP from '../FTP';
27
26
  import Gallery from '../Assets/Gallery';
28
27
  import withStyles from '../../hoc/withStyles';
29
28
  import styles, { CapTabStyle } from './TemplatesV2.style';
@@ -70,10 +69,6 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
70
69
  if (!channelsToHide.includes('facebook')) {
71
70
  filteredPanes.push({content: <div></div>, tab: intl.formatMessage(messages.facebook), key: 'facebook'});
72
71
  }
73
- if (!channelsToHide.includes('FTP')) {
74
- filteredPanes.push({content: <></>, tab: intl.formatMessage(messages.FTP), key: 'ftp'});
75
- defaultChannel = 'FTP';
76
- }
77
72
  }
78
73
 
79
74
  filteredPanes = filteredPanes.map( (pane) => {
@@ -165,10 +160,6 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
165
160
  />
166
161
  )
167
162
 
168
- getFTPComponent = () => (
169
- <FTP mode={this.props.FTPMode} {...this.props} />
170
- );
171
-
172
163
  getTemplatesComponent(channel) {
173
164
  // const templates = this.props.Templates[`${channel}Templates`];
174
165
  let query = {};
@@ -177,9 +168,6 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
177
168
  if (channel === 'line') {
178
169
  return this.getLineComponent();
179
170
  }
180
- if (channel === 'ftp') {
181
- return this.getFTPComponent();
182
- }
183
171
  }
184
172
  const location = {pathname: `/${channel}`, search: '', query};
185
173
  switch (channel) {
@@ -278,7 +266,6 @@ TemplatesV2.propTypes = {
278
266
  messageDetails: PropTypes.object,
279
267
  cap: PropTypes.object,
280
268
  authData: PropTypes.object,
281
- FTPMode: PropTypes.string,
282
269
  };
283
270
 
284
271
  TemplatesV2.defaultProps = {
@@ -34,10 +34,6 @@ export default defineMessages({
34
34
  id: 'creatives.containersV2.TemplatesV2.email',
35
35
  defaultMessage: 'Email',
36
36
  },
37
- FTP: {
38
- id: 'creatives.containersV2.TemplatesV2.FTP',
39
- defaultMessage: 'FTP',
40
- },
41
37
  pushNotification: {
42
38
  id: 'creatives.containersV2.TemplatesV2.pushNotification',
43
39
  defaultMessage: 'Push notification',
@@ -1,25 +1,25 @@
1
- import { createSelector } from 'reselect';
2
-
3
- /**
4
- * Direct selector to the templatesV2 state domain
5
- */
6
- const selectTemplatesV2Domain = () => (state) => state.get('templatesV2');
7
-
8
- /**
9
- * Other specific selectors
10
- */
11
-
12
-
13
- /**
14
- * Default selector used by TemplatesV2
15
- */
16
-
17
- const makeSelectTemplatesV2 = () => createSelector(
18
- selectTemplatesV2Domain(),
19
- (substate) => substate.toJS()
20
- );
21
-
22
- export default makeSelectTemplatesV2;
23
- export {
24
- selectTemplatesV2Domain,
25
- };
1
+ import { createSelector } from 'reselect';
2
+
3
+ /**
4
+ * Direct selector to the templatesV2 state domain
5
+ */
6
+ const selectTemplatesV2Domain = () => (state) => state.get('templatesV2');
7
+
8
+ /**
9
+ * Other specific selectors
10
+ */
11
+
12
+
13
+ /**
14
+ * Default selector used by TemplatesV2
15
+ */
16
+
17
+ const makeSelectTemplatesV2 = () => createSelector(
18
+ selectTemplatesV2Domain(),
19
+ (substate) => substate.toJS()
20
+ );
21
+
22
+ export default makeSelectTemplatesV2;
23
+ export {
24
+ selectTemplatesV2Domain,
25
+ };
@@ -1,18 +1,18 @@
1
-
2
- import {
3
- defaultAction,
4
- } from '../actions';
5
- import {
6
- DEFAULT_ACTION,
7
- } from '../constants';
8
-
9
- describe('TemplatesV2 actions', () => {
10
- describe('Default Action', () => {
11
- it('has a type of DEFAULT_ACTION', () => {
12
- const expected = {
13
- type: DEFAULT_ACTION,
14
- };
15
- expect(defaultAction()).toEqual(expected);
16
- });
17
- });
18
- });
1
+
2
+ import {
3
+ defaultAction,
4
+ } from '../actions';
5
+ import {
6
+ DEFAULT_ACTION,
7
+ } from '../constants';
8
+
9
+ describe('TemplatesV2 actions', () => {
10
+ describe('Default Action', () => {
11
+ it('has a type of DEFAULT_ACTION', () => {
12
+ const expected = {
13
+ type: DEFAULT_ACTION,
14
+ };
15
+ expect(defaultAction()).toEqual(expected);
16
+ });
17
+ });
18
+ });
@@ -1,10 +1,10 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import { TemplatesV2 } from '../index';
5
-
6
- describe('<TemplatesV2 />', () => {
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 { TemplatesV2 } from '../index';
5
+
6
+ describe('<TemplatesV2 />', () => {
7
+ it('Expect to have unit tests specified', () => {
8
+ expect(true).toEqual(false);
9
+ });
10
+ });
@@ -1,9 +1,9 @@
1
-
2
- import { fromJS } from 'immutable';
3
- import templatesV2Reducer from '../reducer';
4
-
5
- describe('templatesV2Reducer', () => {
6
- it('returns the initial state', () => {
7
- expect(templatesV2Reducer(undefined, {})).toEqual(fromJS({}));
8
- });
9
- });
1
+
2
+ import { fromJS } from 'immutable';
3
+ import templatesV2Reducer from '../reducer';
4
+
5
+ describe('templatesV2Reducer', () => {
6
+ it('returns the initial state', () => {
7
+ expect(templatesV2Reducer(undefined, {})).toEqual(fromJS({}));
8
+ });
9
+ });
@@ -1,15 +1,15 @@
1
- /**
2
- * Test sagas
3
- */
4
-
5
- /* eslint-disable redux-saga/yield-effects */
6
- // import { take, call, put, select } from 'redux-saga/effects';
7
- // import { defaultSaga } from '../sagas';
8
-
9
- // const generator = defaultSaga();
10
-
11
- describe('defaultSaga Saga', () => {
12
- it('Expect to have unit tests specified', () => {
13
- expect(true).toEqual(false);
14
- });
15
- });
1
+ /**
2
+ * Test sagas
3
+ */
4
+
5
+ /* eslint-disable redux-saga/yield-effects */
6
+ // import { take, call, put, select } from 'redux-saga/effects';
7
+ // import { defaultSaga } from '../sagas';
8
+
9
+ // const generator = defaultSaga();
10
+
11
+ describe('defaultSaga Saga', () => {
12
+ it('Expect to have unit tests specified', () => {
13
+ expect(true).toEqual(false);
14
+ });
15
+ });
@@ -1,10 +1,10 @@
1
- // import { fromJS } from 'immutable';
2
- // import { makeSelectTemplatesV2Domain } from '../selectors';
3
-
4
- // const selector = makeSelectTemplatesV2Domain();
5
-
6
- describe('makeSelectTemplatesV2Domain', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });
1
+ // import { fromJS } from 'immutable';
2
+ // import { makeSelectTemplatesV2Domain } from '../selectors';
3
+
4
+ // const selector = makeSelectTemplatesV2Domain();
5
+
6
+ describe('makeSelectTemplatesV2Domain', () => {
7
+ it('Expect to have unit tests specified', () => {
8
+ expect(true).toEqual(false);
9
+ });
10
+ });
@@ -876,7 +876,7 @@ export class MapTemplates extends React.Component { // eslint-disable-line react
876
876
  }
877
877
 
878
878
  getMappedEvent(id, event) {
879
- return this.state.map[id][event];
879
+ return (this.state.map[id] && this.state.map[id][event] ? this.state.map[id][event] : () => {});
880
880
  }
881
881
 
882
882
  handleOnTagsContextChange = (data) => {
@@ -1,92 +0,0 @@
1
- @import '~@capillarytech/cap-ui-library/styles/_variables.scss';
2
-
3
- .selected-server-name{
4
- margin-top: $CAP_SPACE_16;
5
- .server-avtar, .server-name, .server-change{
6
- display: inline-block;
7
- }
8
- .server-change{
9
- margin-left: $CAP_SPACE_24;
10
- }
11
- }
12
- .select-server{
13
- display: inline-block;
14
- }
15
- .configure-csv-container{
16
- margin-top: $CAP_SPACE_32;
17
- .configure-csv, .add-column{
18
- display: inline-block;
19
- }
20
- }
21
- .column-selection-container{
22
- width: 200px;
23
- display: inline-block;
24
- margin: $CAP_SPACE_04;
25
- }
26
- .column-selection-container-cid{
27
- width: 120px;
28
- display: inline-block;
29
- }
30
- .select-csv-column{
31
- width: 80%;
32
- border: 1px solid #d9d9d9 !important;
33
- border-radius: 4px !important;
34
- display: inline-block;
35
- }
36
- .select-csv-col-dropdown ul{
37
- padding: 0 $CAP_SPACE_04;
38
- }
39
- .select-csv-col-dropdown ul li{
40
- margin: $CAP_SPACE_08 0 !important;
41
- padding: 0;
42
- white-space: nowrap;
43
- list-style: none;
44
- outline: 0;
45
- }
46
- .select-csv-col-dropdown {
47
- .ant-select-tree-switcher-noop, .ant-select-tree-node-content-wrapper{
48
- display: inline-block !important;
49
- margin: 0 !important;
50
- }
51
- .ant-select-tree-child-tree-open {
52
- display: block !important;
53
- padding: 0 0 0 $CAP_SPACE_16 !important;
54
- }
55
- }
56
- .remove-csv-column{
57
- display: inline-block;
58
- margin-left: $CAP_SPACE_08;
59
- }
60
- .scrollable-section{
61
- height: calc(100vh - 220px);
62
- overflow-y: auto;
63
- }
64
- .FTP-tagList {
65
- position: absolute;
66
- right: 0;
67
- top: -10px;
68
- }
69
- .ftp-message-container{
70
- margin-top: $CAP_SPACE_32;
71
- .message-content-title{
72
- margin-top: $CAP_SPACE_24;
73
- position: relative;
74
- }
75
- }
76
-
77
- .ftp-preview-container{
78
- .ftp-preview-message-title{
79
- margin-top: $CAP_SPACE_16;
80
- }
81
- .ftp-preview-message-content{
82
- max-width: 450px;
83
- margin-top: 4px;
84
- color: $FONT_COLOR_02;
85
- }
86
- .ftp-preview-data-title{
87
- margin-top: $CAP_SPACE_40;
88
- }
89
- .ftp-preview-data-col-container{
90
- margin-top: $CAP_SPACE_16;
91
- }
92
- }
@@ -1,7 +0,0 @@
1
- import * as types from './constants';
2
-
3
- export function getFTPServers() {
4
- return {
5
- type: types.GET_FTP_SERVERS_REQUEST,
6
- };
7
- }
@@ -1,3 +0,0 @@
1
- export const GET_FTP_SERVERS_REQUEST = 'app/v2Containers/FTP/GET_FTP_SERVERS_REQUEST';
2
- export const GET_FTP_SERVERS_SUCCESS = 'app/v2Containers/FTP/GET_FTP_SERVERS_SUCCESS';
3
- export const GET_FTP_SERVERS_FAILURE = 'app/v2Containers/FTP/GET_FTP_SERVERS_FAILURE';