@capillarytech/creatives-library 6.10.2 → 6.10.4

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 (47) hide show
  1. package/package.json +1 -1
  2. package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/_wechatRichmediaTemplatePrev.scss +151 -151
  3. package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +33 -33
  4. package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/tests/index.test.js +10 -10
  5. package/v2Components/TemplatePreview/assets/images/androidPushMessage.svg +44 -44
  6. package/v2Components/TemplatePreview/assets/images/home-screen-android.svg +21 -21
  7. package/v2Components/TemplatePreview/assets/images/home-screen-ios.svg +16 -16
  8. package/v2Components/TemplatePreview/assets/images/iPhonePushMessage.svg +134 -134
  9. package/v2Components/TemplatePreview/assets/images/mobile.svg +23 -23
  10. package/v2Components/TemplatePreview/assets/images/sms_mobile_android.svg +22 -22
  11. package/v2Components/TemplatePreview/assets/images/user-icon.svg +18 -18
  12. package/v2Components/TemplatePreview/assets/images/wechat-home-screen-android.svg +21 -21
  13. package/v2Components/TemplatePreview/assets/images/wechat-mobile.svg +77 -77
  14. package/v2Components/TemplatePreview/assets/images/wechat_mobile_android.svg +20 -20
  15. package/v2Components/TemplatePreview/tests/index.test.js +10 -10
  16. package/v2Containers/CreativesContainer/actions.js +27 -27
  17. package/v2Containers/CreativesContainer/constants.js +17 -17
  18. package/v2Containers/CreativesContainer/index.scss +44 -44
  19. package/v2Containers/CreativesContainer/messages.js +305 -305
  20. package/v2Containers/CreativesContainer/reducer.js +29 -29
  21. package/v2Containers/CreativesContainer/sagas.js +11 -11
  22. package/v2Containers/CreativesContainer/selectors.js +30 -30
  23. package/v2Containers/CreativesContainer/tests/actions.test.js +18 -18
  24. package/v2Containers/CreativesContainer/tests/index.test.js +10 -10
  25. package/v2Containers/CreativesContainer/tests/reducer.test.js +9 -9
  26. package/v2Containers/CreativesContainer/tests/sagas.test.js +15 -15
  27. package/v2Containers/CreativesContainer/tests/selectors.test.js +10 -10
  28. package/v2Containers/Line/Container/Image/index.js +8 -6
  29. package/v2Containers/Line/Container/ImageCarousel/Content.js +5 -5
  30. package/v2Containers/Line/Container/ImageCarousel/index.js +1 -1
  31. package/v2Containers/Line/Container/ImageMap/index.js +24 -6
  32. package/v2Containers/Line/Container/reducer.js +2 -2
  33. package/v2Containers/Templates/tests/actions.test.js +18 -18
  34. package/v2Containers/Templates/tests/index.test.js +10 -10
  35. package/v2Containers/Templates/tests/reducer.test.js +9 -9
  36. package/v2Containers/Templates/tests/sagas.test.js +15 -15
  37. package/v2Containers/Templates/tests/selectors.test.js +10 -10
  38. package/v2Containers/TemplatesV2/TemplatesV2.style.js +29 -29
  39. package/v2Containers/TemplatesV2/actions.js +16 -16
  40. package/v2Containers/TemplatesV2/constants.js +10 -10
  41. package/v2Containers/TemplatesV2/messages.js +61 -61
  42. package/v2Containers/TemplatesV2/selectors.js +25 -25
  43. package/v2Containers/TemplatesV2/tests/actions.test.js +18 -18
  44. package/v2Containers/TemplatesV2/tests/index.test.js +10 -10
  45. package/v2Containers/TemplatesV2/tests/reducer.test.js +9 -9
  46. package/v2Containers/TemplatesV2/tests/sagas.test.js +15 -15
  47. package/v2Containers/TemplatesV2/tests/selectors.test.js +10 -10
@@ -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
+ });
@@ -84,9 +84,10 @@ export const LineImage = ({
84
84
  }, [errorMessageTitle, imageSrc, messageTitle, isImageError]);
85
85
 
86
86
  useEffect(() => {
87
- if (Line.uploadedAssetData && Object.keys(Line.uploadedAssetData).length) {
88
- const imgSrc = get(Line, 'uploadedAssetData.metaInfo.secure_file_path', '');
89
- const imgPreview = get(Line, 'uploadedAssetData.metaInfo.secure_file_path_preview', '');
87
+ if (Line[`uploadedAssetData${index}`] && Object.keys(Line[`uploadedAssetData${index}`]).length) {
88
+ const imgSrc = get(Line, `uploadedAssetData${index}.metaInfo.secure_file_path`, '');
89
+ const imgPreview = get(Line, `uploadedAssetData${index}.metaInfo.secure_file_path_preview`, '');
90
+ actions.clearAsset(index);
90
91
  if (imgSrc) {
91
92
  updateUploadedAssetList({
92
93
  ...uploadedAssetList,
@@ -95,16 +96,16 @@ export const LineImage = ({
95
96
  imgSrc,
96
97
  },
97
98
  });
98
- actions.clearAsset();
99
99
  }
100
100
  }
101
- }, [Line.uploadedAssetData]);
101
+ }, [Line[`uploadedAssetData${index}`]]);
102
102
 
103
103
  useEffect(() => {
104
104
  const imgSrc = get(uploadedAssetList[index], 'imgSrc', '');
105
105
  const imgPreview = get(uploadedAssetList[index], 'imgPreview', '');
106
+ const { type } = content;
106
107
 
107
- if (imgSrc) {
108
+ if (imgSrc && type === 'image') {
108
109
  updateImageSrc(imgSrc);
109
110
  updateImageStatus(true);
110
111
  updateImagePreview(imgPreview);
@@ -141,6 +142,7 @@ export const LineImage = ({
141
142
  data.file,
142
143
  data.type,
143
144
  data.fileParams,
145
+ index,
144
146
  );
145
147
  }
146
148
  }
@@ -89,8 +89,8 @@ export const LineImageCarouselContent = ({
89
89
  }, [imageSrc, isImageError]);
90
90
 
91
91
  useEffect(() => {
92
- if (Line.uploadedAssetDataImageCarousel && Object.keys(Line.uploadedAssetDataImageCarousel).length) {
93
- const imgSrc = get(Line, 'uploadedAssetDataImageCarousel.metaInfo.secure_file_path', '');
92
+ if (Line[`uploadedAssetDataImageCarousel${index}`] && Object.keys(Line[`uploadedAssetDataImageCarousel${index}`]).length) {
93
+ const imgSrc = get(Line, `uploadedAssetDataImageCarousel${index}.metaInfo.secure_file_path`, '');
94
94
  if (imgSrc) {
95
95
  updateUploadedAssetList({
96
96
  ...uploadedAssetList,
@@ -101,10 +101,10 @@ export const LineImageCarouselContent = ({
101
101
  }
102
102
  },
103
103
  });
104
- actions.clearAsset('ImageCarousel');
104
+ actions.clearAsset(`ImageCarousel${index}`);
105
105
  }
106
106
  }
107
- }, [Line.uploadedAssetDataImageCarousel]);
107
+ }, [Line[`uploadedAssetDataImageCarousel${index}`]]);
108
108
 
109
109
  useEffect(() => {
110
110
  const imgSrc = get(uploadedAssetList[index], `${activeIndex}.imgSrc`, '');
@@ -148,7 +148,7 @@ export const LineImageCarouselContent = ({
148
148
  data.file,
149
149
  data.type,
150
150
  data.fileParams,
151
- 'ImageCarousel',
151
+ `ImageCarousel${index}`,
152
152
  );
153
153
  }
154
154
  }
@@ -120,7 +120,7 @@ export const LineImageCarousel = (props) => {
120
120
  actionLabelErrorMessage,
121
121
  activeIndex,
122
122
  }) => {
123
- isErrorIndex = (isErrorIndex !== undefined)
123
+ isErrorIndex = (isErrorIndex !== undefined && isErrorIndex !== false)
124
124
  ? isErrorIndex
125
125
  : ((!originalContentUrl || !selectedActionType || actionContentErrorMessage || actionLabelErrorMessage || !actionContent) && activeIndex);
126
126
  columns.push({
@@ -54,7 +54,10 @@ export const LineImageMap = ({
54
54
  content,
55
55
  activeKey,
56
56
  Templates,
57
- getAllTemplates
57
+ getAllTemplates,
58
+ uploadedAssetList,
59
+ updateUploadedAssetList,
60
+ deleteUploadedImgList,
58
61
  }) => {
59
62
  if (activeKey !== IMAGE_MAP) {
60
63
  return null;
@@ -90,7 +93,7 @@ export const LineImageMap = ({
90
93
  baseSize = {},
91
94
  selectedTemplate,
92
95
  assetType,
93
- actionLinks,
96
+ actionLinks = {},
94
97
  altText,
95
98
  } = content;
96
99
  if ( baseUrl && type === IMAGE_MAP) {
@@ -127,13 +130,26 @@ export const LineImageMap = ({
127
130
  }, [errorMessageTitle, imageSrc, messageTitle, isImageError, imageMapTemplate, actionLinks, assetType, isImage, templateSchema, altText]);
128
131
 
129
132
  useEffect(() => {
130
- const imgSrc = get(Line, 'uploadedAssetData', false);
133
+ const imgSrc = get(Line, `uploadedAssetData${index}`, false);
131
134
  if (imgSrc && typeof imgSrc !== 'object') {
132
- updateImageSrc(imgSrc.slice(0, -5));
135
+ updateUploadedAssetList({
136
+ ...uploadedAssetList,
137
+ [index]: {
138
+ imgSrc: imgSrc.slice(0, -5),
139
+ },
140
+ });
141
+ actions.clearAsset(index);
142
+ }
143
+ }, [Line[`uploadedAssetData${index}`]]);
144
+
145
+ useEffect(() => {
146
+ const imgSrc = get(uploadedAssetList[index], 'imgSrc', '');
147
+
148
+ if (imgSrc) {
149
+ updateImageSrc(imgSrc);
133
150
  updateImageStatus(true);
134
- actions.clearAsset()
135
151
  }
136
- }, [Line]);
152
+ }, [uploadedAssetList]);
137
153
 
138
154
  const getActions = () => {
139
155
  const actionsMap = [];
@@ -187,6 +203,7 @@ export const LineImageMap = ({
187
203
  data.file,
188
204
  data.type,
189
205
  data.fileParams,
206
+ index,
190
207
  );
191
208
  }
192
209
  }
@@ -323,6 +340,7 @@ export const LineImageMap = ({
323
340
 
324
341
  const onReUpload = () => {
325
342
  updateImageStatus(false);
343
+ deleteUploadedImgList(index);
326
344
  updateImageSrc('');
327
345
  }
328
346
 
@@ -42,14 +42,14 @@ function createReducer(state = initialState, action) {
42
42
  return state
43
43
  .set('uploadAssetSuccess', (action.statusCode !== undefined && action.statusCode !== '' && action.statusCode < 300))
44
44
  .set('assetUploading', false)
45
- .set(action.templateType ? `uploadedAssetData${action.templateType}` : 'uploadedAssetData', action.data);
45
+ .set(action.templateType !== undefined ? `uploadedAssetData${action.templateType}` : 'uploadedAssetData', action.data);
46
46
  case types.UPLOAD_ASSET_FAILURE:
47
47
  return state
48
48
  .set('uploadAssetSuccess', false)
49
49
  .set('assetUploading', false);
50
50
  case types.CLEAR_ASSET:
51
51
  return state
52
- .delete(action.templateType ? `uploadedAssetData${action.templateType}` : 'uploadedAssetData');
52
+ .delete(action.templateType !== undefined ? `uploadedAssetData${action.templateType}` : 'uploadedAssetData');
53
53
  // FOR EDIT
54
54
  case types.EDIT_TEMPLATE_REQUEST:
55
55
  return state
@@ -1,18 +1,18 @@
1
-
2
- import {
3
- defaultAction,
4
- } from '../actions';
5
- import {
6
- DEFAULT_ACTION,
7
- } from '../constants';
8
-
9
- describe('Templates 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('Templates 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 { Templates } from '../index';
5
-
6
- describe('<Templates />', () => {
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 { Templates } from '../index';
5
+
6
+ describe('<Templates />', () => {
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 templatesReducer from '../reducer';
4
-
5
- describe('templatesReducer', () => {
6
- it('returns the initial state', () => {
7
- expect(templatesReducer(undefined, {})).toEqual(fromJS({}));
8
- });
9
- });
1
+
2
+ import { fromJS } from 'immutable';
3
+ import templatesReducer from '../reducer';
4
+
5
+ describe('templatesReducer', () => {
6
+ it('returns the initial state', () => {
7
+ expect(templatesReducer(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 { makeSelectTemplatesDomain } from '../selectors';
3
-
4
- // const selector = makeSelectTemplatesDomain();
5
-
6
- describe('makeSelectTemplatesDomain', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });
1
+ // import { fromJS } from 'immutable';
2
+ // import { makeSelectTemplatesDomain } from '../selectors';
3
+
4
+ // const selector = makeSelectTemplatesDomain();
5
+
6
+ describe('makeSelectTemplatesDomain', () => {
7
+ it('Expect to have unit tests specified', () => {
8
+ expect(true).toEqual(false);
9
+ });
10
+ });
@@ -1,29 +1,29 @@
1
- import { css } from 'styled-components';
2
- import {CAP_SPACE_24, CAP_SPACE_16} from '@capillarytech/cap-ui-library/styled/variables';
3
-
4
- export default css`
5
- .cap-tab-v2-wrapper{
6
- .ant-tabs-tabpane {
7
- border: none;
8
- }
9
- }
10
-
11
- .component-wrapper {
12
- ${(props) => props.isFullMode ? `
13
- max-width: 1140px;
14
- margin: 0 auto;
15
- width: 100%;
16
- padding: ${CAP_SPACE_24} 0;
17
- .ant-tabs-content{
18
- margin-top: ${CAP_SPACE_16}
19
- }
20
- ` : `.cap-tab-v2 {
21
- height: calc(100vh - 118px);
22
- } `}
23
- }
24
- `;
25
-
26
- export const CapTabStyle = css`
27
- ${(props) => props.isFullMode ? `margin-top: ${CAP_SPACE_24}` : ``
28
- }
29
- `;
1
+ import { css } from 'styled-components';
2
+ import {CAP_SPACE_24, CAP_SPACE_16} from '@capillarytech/cap-ui-library/styled/variables';
3
+
4
+ export default css`
5
+ .cap-tab-v2-wrapper{
6
+ .ant-tabs-tabpane {
7
+ border: none;
8
+ }
9
+ }
10
+
11
+ .component-wrapper {
12
+ ${(props) => props.isFullMode ? `
13
+ max-width: 1140px;
14
+ margin: 0 auto;
15
+ width: 100%;
16
+ padding: ${CAP_SPACE_24} 0;
17
+ .ant-tabs-content{
18
+ margin-top: ${CAP_SPACE_16}
19
+ }
20
+ ` : `.cap-tab-v2 {
21
+ height: calc(100vh - 118px);
22
+ } `}
23
+ }
24
+ `;
25
+
26
+ export const CapTabStyle = css`
27
+ ${(props) => props.isFullMode ? `margin-top: ${CAP_SPACE_24}` : ``
28
+ }
29
+ `;
@@ -1,16 +1,16 @@
1
-
2
- import * as types from './constants';
3
-
4
- export function defaultAction() {
5
- return {
6
- type: types.DEFAULT_ACTION,
7
- };
8
- }
9
-
10
- export function getTemplates({channel, query}) {
11
- return {
12
- type: types.GET_TEMPLATES_REQUEST,
13
- channel,
14
- query,
15
- };
16
- }
1
+
2
+ import * as types from './constants';
3
+
4
+ export function defaultAction() {
5
+ return {
6
+ type: types.DEFAULT_ACTION,
7
+ };
8
+ }
9
+
10
+ export function getTemplates({channel, query}) {
11
+ return {
12
+ type: types.GET_TEMPLATES_REQUEST,
13
+ channel,
14
+ query,
15
+ };
16
+ }
@@ -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';