@capillarytech/creatives-library 8.0.6 → 8.0.8
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.
- package/package.json +1 -1
- package/v2Containers/Cap/index.js +2 -2
- package/v2Containers/CreativesContainer/index.js +3 -1
- package/v2Containers/Email/index.js +4 -0
- package/v2Containers/Email/sagas.js +5 -0
- package/v2Containers/MobilePush/Create/index.js +4 -0
- package/v2Containers/MobilePush/Create/sagas.js +6 -1
- package/v2Containers/Templates/sagas.js +7 -2
package/package.json
CHANGED
|
@@ -43,7 +43,7 @@ import reducer from './reducer';
|
|
|
43
43
|
import { v2CapSagas } from './sagas';
|
|
44
44
|
import { v2SmsCreateSagas } from '../Sms/Create/sagas';
|
|
45
45
|
import { v2EbillSagas } from '../Ebill/sagas';
|
|
46
|
-
import {
|
|
46
|
+
import { v2EmailDuplicateTemplateSaga } from '../Email/sagas';
|
|
47
47
|
import { v2LineContainerSagas } from '../Line/Container/sagas'
|
|
48
48
|
import { v2MobilePushCreateSagas } from '../MobilePush/Create/sagas';
|
|
49
49
|
import { v2WechatMapTemplatesSagas } from '../WeChat/MapTemplates/sagas';
|
|
@@ -609,7 +609,7 @@ const withReducer = injectReducer({ key: 'cap', reducer });
|
|
|
609
609
|
const withSaga = injectSaga({ key: 'cap', saga: v2CapSagas });
|
|
610
610
|
const withSmsCreateSaga = injectSaga({ key: 'create', saga: v2SmsCreateSagas });
|
|
611
611
|
const withEbillSaga = injectSaga({ key: 'ebill', saga: v2EbillSagas });
|
|
612
|
-
const withEmailSaga = injectSaga({ key: 'email', saga:
|
|
612
|
+
const withEmailSaga = injectSaga({ key: 'email', saga: v2EmailDuplicateTemplateSaga });
|
|
613
613
|
const withLineContainerSaga = injectSaga({ key: 'lineCreate', saga: v2LineContainerSagas });
|
|
614
614
|
const withMobilePushCreateSaga = injectSaga({ key: 'mobileCreate', saga: v2MobilePushCreateSagas });
|
|
615
615
|
const withWechatMapTemplatesSaga = injectSaga({ key: 'weChatMapTemplate', saga: v2WechatMapTemplatesSagas });
|
|
@@ -46,6 +46,7 @@ import injectSaga from '../../utils/injectSaga';
|
|
|
46
46
|
import creativesContainerReducer from './reducer';
|
|
47
47
|
import { compose } from 'redux';
|
|
48
48
|
import { capSagaForFetchSchemaForEntity } from '../Cap/sagas';
|
|
49
|
+
import { v2TemplateSagaWatchGetDefaultBeeTemplates } from '../Templates/sagas';
|
|
49
50
|
|
|
50
51
|
const classPrefix = 'add-creatives-section';
|
|
51
52
|
const CREATIVES_CONTAINER = 'creativesContainer';
|
|
@@ -1356,5 +1357,6 @@ function mapDispatchToProps(dispatch) {
|
|
|
1356
1357
|
const withConnect = connect(mapStatesToProps, mapDispatchToProps);
|
|
1357
1358
|
const withReducer = injectReducer({ key: 'creativesContainer', reducer: creativesContainerReducer });
|
|
1358
1359
|
const withSaga = injectSaga({ key: 'cap', saga: capSagaForFetchSchemaForEntity });
|
|
1360
|
+
const withDefaultTempSaga = injectSaga({ key: 'templates', saga: v2TemplateSagaWatchGetDefaultBeeTemplates });
|
|
1359
1361
|
|
|
1360
|
-
export default compose(withSaga, withReducer, withConnect)(injectIntl(Creatives));
|
|
1362
|
+
export default compose(withSaga, withDefaultTempSaga, withReducer, withConnect)(injectIntl(Creatives));
|
|
@@ -41,6 +41,8 @@ import {transformEmailTemplates, storeS3FileSizeDetails, CREATIVES_S3_ASSET_FILE
|
|
|
41
41
|
import { CUSTOMER_BARCODE_TAG } from '../../containers/App/constants';
|
|
42
42
|
import injectReducer from '../../utils/injectReducer';
|
|
43
43
|
import v2EmailReducer from './reducer';
|
|
44
|
+
import { v2EmailSagas } from './sagas';
|
|
45
|
+
import injectSaga from '../../utils/injectSaga';
|
|
44
46
|
|
|
45
47
|
export class Email extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
46
48
|
constructor(props) {
|
|
@@ -2813,11 +2815,13 @@ function mapDispatchToProps(dispatch) {
|
|
|
2813
2815
|
}
|
|
2814
2816
|
|
|
2815
2817
|
const withReducer = injectReducer({ key: 'email', reducer: v2EmailReducer });
|
|
2818
|
+
const withEmailSaga = injectSaga({ key: 'email', saga: v2EmailSagas });
|
|
2816
2819
|
|
|
2817
2820
|
export default withCreatives({
|
|
2818
2821
|
WrappedComponent: Email,
|
|
2819
2822
|
mapStateToProps,
|
|
2820
2823
|
mapDispatchToProps,
|
|
2821
2824
|
userAuth: true,
|
|
2825
|
+
sagas: [withEmailSaga],
|
|
2822
2826
|
reducers: [withReducer],
|
|
2823
2827
|
});
|
|
@@ -33,7 +33,9 @@ import { MOBILE_PUSH } from '../../CreativesContainer/constants';
|
|
|
33
33
|
import { getContent } from '../commonMethods';
|
|
34
34
|
import { getCdnUrl } from '../../../utils/cdnTransformation';
|
|
35
35
|
import injectReducer from '../../../utils/injectReducer';
|
|
36
|
+
import injectSaga from '../../../utils/injectSaga';
|
|
36
37
|
import v2MobilePushCreateReducer from './reducer';
|
|
38
|
+
import { v2MobilePushWatchDuplicateTemplateSaga } from './sagas';
|
|
37
39
|
|
|
38
40
|
const PrefixWrapper = styled.div`
|
|
39
41
|
margin-right: 16px;
|
|
@@ -1901,11 +1903,13 @@ function mapDispatchToProps(dispatch) {
|
|
|
1901
1903
|
}
|
|
1902
1904
|
|
|
1903
1905
|
const withReducer = injectReducer({ key: 'mobileCreate', reducer: v2MobilePushCreateReducer });
|
|
1906
|
+
const withSaga = injectSaga({ key: 'mobileCreate', saga: v2MobilePushWatchDuplicateTemplateSaga});
|
|
1904
1907
|
|
|
1905
1908
|
export default withCreatives({
|
|
1906
1909
|
WrappedComponent: Create,
|
|
1907
1910
|
mapStateToProps,
|
|
1908
1911
|
mapDispatchToProps,
|
|
1909
1912
|
userAuth: false,
|
|
1913
|
+
sagas: [withSaga],
|
|
1910
1914
|
reducers: [withReducer],
|
|
1911
1915
|
});
|
|
@@ -66,7 +66,12 @@ export default [
|
|
|
66
66
|
export function* v2MobilePushCreateSagas() {
|
|
67
67
|
yield all([
|
|
68
68
|
watchCreateTemplate(),
|
|
69
|
-
|
|
69
|
+
]);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function* v2MobilePushWatchDuplicateTemplateSaga() {
|
|
73
|
+
yield all([
|
|
70
74
|
watchGetIosCtas(),
|
|
75
|
+
watchUploadAsset(),
|
|
71
76
|
]);
|
|
72
77
|
}
|
|
@@ -254,11 +254,16 @@ export function* v2TemplateSaga() {
|
|
|
254
254
|
watchDeleteTemplate(),
|
|
255
255
|
watchGetUserList(),
|
|
256
256
|
watchFetchWeCrmAccounts(),
|
|
257
|
-
watchSendingFile(),
|
|
258
|
-
watchGetDefaultBeeTemplates(),
|
|
259
257
|
watchGetTemplateDetails(),
|
|
260
258
|
watchGetOrgLevelCampaignSettings(),
|
|
261
259
|
watchGetSenderDetails(),
|
|
262
260
|
watchGetCdnTransformationConfig(),
|
|
263
261
|
]);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export function* v2TemplateSagaWatchGetDefaultBeeTemplates() {
|
|
265
|
+
yield all([
|
|
266
|
+
watchSendingFile(),
|
|
267
|
+
watchGetDefaultBeeTemplates(),
|
|
268
|
+
]);
|
|
264
269
|
}
|