@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,11 +1,11 @@
1
- // import { take, call, put, select } from 'redux-saga/effects';
2
-
3
- // Individual exports for testing
4
- export function* defaultSaga() {
5
- // See example in v2Containers/HomePage/sagas.js
6
- }
7
-
8
- // All sagas to be loaded
9
- export default [
10
- defaultSaga,
11
- ];
1
+ // import { take, call, put, select } from 'redux-saga/effects';
2
+
3
+ // Individual exports for testing
4
+ export function* defaultSaga() {
5
+ // See example in v2Containers/HomePage/sagas.js
6
+ }
7
+
8
+ // All sagas to be loaded
9
+ export default [
10
+ defaultSaga,
11
+ ];
@@ -1,30 +1,30 @@
1
- import { createSelector } from 'reselect';
2
-
3
- /**
4
- * Direct selector to the creativesContainer state domain
5
- */
6
- const selectCreativesContainerDomain = () => (state) => state.get('creativesContainer');
7
-
8
- /**
9
- * Other specific selectors
10
- */
11
-
12
-
13
- /**
14
- * Default selector used by CreativesContainer
15
- */
16
-
17
- const makeSelectCreativesContainer = () => createSelector(
18
- selectCreativesContainerDomain(),
19
- (substate) => substate.toJS()
20
- );
21
- const isLoading = () => createSelector(
22
- makeSelectCreativesContainer(),
23
- (substate) => substate.containerLoader
24
- );
25
-
26
- export default makeSelectCreativesContainer;
27
- export {
28
- selectCreativesContainerDomain,
29
- isLoading,
30
- };
1
+ import { createSelector } from 'reselect';
2
+
3
+ /**
4
+ * Direct selector to the creativesContainer state domain
5
+ */
6
+ const selectCreativesContainerDomain = () => (state) => state.get('creativesContainer');
7
+
8
+ /**
9
+ * Other specific selectors
10
+ */
11
+
12
+
13
+ /**
14
+ * Default selector used by CreativesContainer
15
+ */
16
+
17
+ const makeSelectCreativesContainer = () => createSelector(
18
+ selectCreativesContainerDomain(),
19
+ (substate) => substate.toJS()
20
+ );
21
+ const isLoading = () => createSelector(
22
+ makeSelectCreativesContainer(),
23
+ (substate) => substate.containerLoader
24
+ );
25
+
26
+ export default makeSelectCreativesContainer;
27
+ export {
28
+ selectCreativesContainerDomain,
29
+ isLoading,
30
+ };
@@ -1,18 +1,18 @@
1
-
2
- import {
3
- defaultAction,
4
- } from '../actions';
5
- import {
6
- DEFAULT_ACTION,
7
- } from '../constants';
8
-
9
- describe('CreativesContainer 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('CreativesContainer 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 { CreativesContainer } from '../index';
5
-
6
- describe('<CreativesContainer />', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(true);
9
- });
10
- });
1
+ // import React from 'react';
2
+ // import { shallow } from 'enzyme';
3
+
4
+ // import { CreativesContainer } from '../index';
5
+
6
+ describe('<CreativesContainer />', () => {
7
+ it('Expect to have unit tests specified', () => {
8
+ expect(true).toEqual(true);
9
+ });
10
+ });
@@ -1,9 +1,9 @@
1
-
2
- import { fromJS } from 'immutable';
3
- import creativesContainerReducer from '../reducer';
4
-
5
- describe('creativesContainerReducer', () => {
6
- it('returns the initial state', () => {
7
- expect(creativesContainerReducer(undefined, {})).toEqual(fromJS({}));
8
- });
9
- });
1
+
2
+ import { fromJS } from 'immutable';
3
+ import creativesContainerReducer from '../reducer';
4
+
5
+ describe('creativesContainerReducer', () => {
6
+ it('returns the initial state', () => {
7
+ expect(creativesContainerReducer(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(true);
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(true);
14
+ });
15
+ });
@@ -1,10 +1,10 @@
1
- // import { fromJS } from 'immutable';
2
- // import { makeSelectCreativesContainerDomain } from '../selectors';
3
-
4
- // const selector = makeSelectCreativesContainerDomain();
5
-
6
- describe('makeSelectCreativesContainerDomain', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(true);
9
- });
10
- });
1
+ // import { fromJS } from 'immutable';
2
+ // import { makeSelectCreativesContainerDomain } from '../selectors';
3
+
4
+ // const selector = makeSelectCreativesContainerDomain();
5
+
6
+ describe('makeSelectCreativesContainerDomain', () => {
7
+ it('Expect to have unit tests specified', () => {
8
+ expect(true).toEqual(true);
9
+ });
10
+ });
@@ -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
+ }
@@ -0,0 +1,94 @@
1
+ /*
2
+ *
3
+ * Create actions
4
+ *
5
+ */
6
+
7
+ import * as types from './constants';
8
+
9
+ export function createTemplate(template, callback) {
10
+ console.log('action trigereed createtemplate');
11
+ return {
12
+ type: types.CREATE_TEMPLATE_REQUEST,
13
+ template,
14
+ callback,
15
+ };
16
+ }
17
+
18
+ export function clearCreateResponse() {
19
+ console.log('clearCreateResponse');
20
+ return {
21
+ type: types.CLEAR_CREATE_RESPONSE_REQUEST,
22
+ };
23
+ }
24
+
25
+ export function defaultAction() {
26
+ return {
27
+ type: types.DEFAULT_ACTION,
28
+ };
29
+ }
30
+
31
+ export function uploadAsset(file, assetType, fileParams) {
32
+ return {
33
+ type: types.UPLOAD_ASSET_REQUEST,
34
+ file,
35
+ assetType,
36
+ fileParams,
37
+ };
38
+ }
39
+
40
+ export function clearAsset() {
41
+ return {
42
+ type: types.CLEAR_ASSET,
43
+ };
44
+ }
45
+
46
+
47
+ // FOR EDIT
48
+
49
+
50
+ export function editTemplate(template, callback) {
51
+ console.log('action trigereed editTemplate line @@@');
52
+ return {
53
+ type: types.EDIT_TEMPLATE_REQUEST,
54
+ template,
55
+ callback,
56
+ };
57
+ }
58
+
59
+ export function getTemplateDetails(id) {
60
+ console.log('getting template line @@@', id);
61
+ return {
62
+ type: types.GET_TEMPLATE_DETAILS_REQUEST,
63
+ id,
64
+ channel: 'LINE',
65
+ };
66
+ }
67
+
68
+ export function clearEditResponse() {
69
+ console.log('clearEditResponse');
70
+ return {
71
+ type: types.CLEAR_EDIT_RESPONSE_REQUEST,
72
+ };
73
+ }
74
+
75
+ export function clearData() {
76
+ return {
77
+ type: types.CLEAR_DATA,
78
+ };
79
+ }
80
+
81
+ export function getLineTemplatesList(channel, queryParams) {
82
+ return {
83
+ type: types.GET_LINE_TEMPLATES_LIST_REQUEST,
84
+ channel,
85
+ queryParams,
86
+ };
87
+ }
88
+
89
+ export function setSelectedTemplate(templateData) {
90
+ return {
91
+ type: types.SET_SELECTED_TEMPLATE,
92
+ data: templateData,
93
+ };
94
+ }
@@ -0,0 +1,43 @@
1
+ /*
2
+ *
3
+ * Create constants
4
+ *
5
+ */
6
+
7
+ export const DEFAULT_ACTION = 'app/Create/DEFAULT_ACTION';
8
+
9
+
10
+ export const CREATE_TEMPLATE_REQUEST = 'app/v2Containers/Line/Create/CREATE_TEMPLATE_REQUEST';
11
+ export const CREATE_TEMPLATE_SUCCESS = 'app/v2Containers/Line/Create/CREATE_TEMPLATE_SUCCESS';
12
+ export const CREATE_TEMPLATE_FAILURE = 'app/v2Containers/Line/Create/CREATE_TEMPLATE_FAILURE';
13
+ export const UPLOAD_ASSET_REQUEST = 'app/v2Containers/Line/Create/UPLOAD_ASSET_REQUEST';
14
+ export const UPLOAD_ASSET_SUCCESS = 'app/v2Containers/Line/Create/UPLOAD_ASSET_SUCCESS';
15
+ export const UPLOAD_ASSET_FAILURE = 'app/v2Containers/Line/Create/UPLOAD_ASSET_FAILURE';
16
+ export const CLEAR_ASSET = 'app/v2Containers/Line/Create/CLEAR_ASSET';
17
+
18
+ export const CLEAR_CREATE_RESPONSE_REQUEST = 'app/v2Containers/Line/Create/CLEAR_CREATE_RESPONSE_REQUEST';
19
+ export const CLEAR_CREATE_RESPONSE_SUCCESS = 'app/v2Containers/Line/Create/CLEAR_CREATE_RESPONSE_SUCCESS';
20
+ export const CLEAR_CREATE_RESPONSE_FAILURE = 'app/v2Containers/Line/Create/CLEAR_CREATE_RESPONSE_FAILURE';
21
+
22
+ export const LINE_IMG_HEIGHT = 400;
23
+ export const LINE_IMG_WIDTH = 300;
24
+ export const LINE_IMG_SIZE = 30000000;
25
+
26
+
27
+ // edit
28
+
29
+ export const GET_TEMPLATE_DETAILS_REQUEST = 'app/v2Containers/line/Edit/GET_TEMPLATE_DETAILS_REQUEST';
30
+ export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/v2Containers/line/Edit/GET_TEMPLATE_DETAILS_SUCCESS';
31
+ export const GET_TEMPLATE_DETAILS_FAILURE = 'app/v2Containers/line/Edit/GET_TEMPLATE_DETAILS_FAILURE';
32
+
33
+ export const EDIT_TEMPLATE_REQUEST = 'app/v2Containers/line/Edit/EDIT_TEMPLATE_REQUEST';
34
+ export const EDIT_TEMPLATE_SUCCESS = 'app/v2Containers/line/Edit/EDIT_TEMPLATE_SUCCESS';
35
+ export const EDIT_TEMPLATE_FAILURE = 'app/v2Containers/line/Edit/EDIT_TEMPLATE_FAILURE';
36
+
37
+ export const CLEAR_EDIT_RESPONSE_REQUEST = 'app/v2Containers/line/Edit/CLEAR_EDIT_RESPONSE_REQUEST';
38
+ export const CLEAR_DATA = 'app/v2Containers/Line/Edit/CLEAR_DATA';
39
+ export const SET_SELECTED_TEMPLATE = 'app/v2Containers/Line/Edit/SET_SELECTED_TEMPLATE';
40
+
41
+ export const GET_LINE_TEMPLATES_LIST_REQUEST = 'app/v2Containers/Line/GET_LINE_TEMPLATES_LIST_REQUEST';
42
+ export const GET_LINE_TEMPLATES_LIST_SUCCESS = 'app/v2Containers/Line/GET_LINE_TEMPLATES_LIST_SUCCESS';
43
+ export const GET_LINE_TEMPLATES_LIST_FAILURE = 'app/v2Containers/Line/GET_LINE_TEMPLATES_LIST_FAILURE';