@capillarytech/creatives-library 8.0.7 → 8.0.9
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/containers/Email/sagas.js +1 -1
- package/containers/MobilePush/Create/sagas.js +6 -0
- package/containers/Templates/index.js +3 -0
- package/package.json +1 -1
- package/v2Containers/Assets/Gallery/sagas.js +1 -1
- package/v2Containers/Cap/index.js +6 -0
- package/v2Containers/Email/index.js +4 -1
- package/v2Containers/Email/sagas.js +1 -1
- package/v2Containers/Line/Container/sagas.js +1 -1
- package/v2Containers/MobilePush/Create/index.js +4 -0
- package/v2Containers/MobilePush/Create/sagas.js +6 -1
- package/v2Containers/SmsTrai/Edit/index.js +9 -1
- package/v2Containers/Zalo/index.js +0 -3
|
@@ -45,7 +45,7 @@ export function* getTemplateDetails(id) {
|
|
|
45
45
|
export function* getAllAssets(assetType, queryParams) {
|
|
46
46
|
try {
|
|
47
47
|
const result = yield call(Api.getAllAssets, assetType, queryParams);
|
|
48
|
-
yield put({ type: types.GET_ALL_ASSETS_SUCCESS, data: result
|
|
48
|
+
yield put({ type: types.GET_ALL_ASSETS_SUCCESS, data: result?.response, isReset: assetType.queryParams.page === 1 });
|
|
49
49
|
} catch (error) {
|
|
50
50
|
yield put({ type: types.GET_ALL_ASSETS_FAILURE, error });
|
|
51
51
|
}
|
|
@@ -56,6 +56,7 @@ import mobilePushCreateReducer from '../MobilePush/Create/reducer';
|
|
|
56
56
|
import lineCreateReducer from '../Line/Create/reducer';
|
|
57
57
|
import { ebillSaga } from '../Ebill/sagas';
|
|
58
58
|
import { lineCreateSaga } from '../Line/Create/sagas';
|
|
59
|
+
import { duplicateMPushSaga } from '../MobilePush/Create/sagas';
|
|
59
60
|
|
|
60
61
|
const MenuItem = Menu.Item;
|
|
61
62
|
const Option = Select.Option;
|
|
@@ -1709,6 +1710,7 @@ const withCreateSmsSaga = injectSaga({ key: 'create', saga: createSmsSaga });
|
|
|
1709
1710
|
const withEditSmsSaga = injectSaga({ key: 'edit', saga: editSmsSaga });
|
|
1710
1711
|
const withEmailSaga = injectSaga({ key: 'email', saga: emailSaga });
|
|
1711
1712
|
const withEbillSaga = injectSaga({ key: 'ebill', saga: ebillSaga });
|
|
1713
|
+
const withMpushSaga = injectSaga({ key: 'mobileCreate', saga: duplicateMPushSaga });
|
|
1712
1714
|
const withLineCreateSaga = injectSaga({ key: 'line', saga: lineCreateSaga });
|
|
1713
1715
|
const withReducer = injectReducer({ key: 'templates', reducer });
|
|
1714
1716
|
const withMPushCreateReducer = injectReducer({ key: 'mobileCreate', reducer: mobilePushCreateReducer });
|
|
@@ -1721,6 +1723,7 @@ export default compose(
|
|
|
1721
1723
|
withCreateSmsSaga,
|
|
1722
1724
|
withEditSmsSaga,
|
|
1723
1725
|
withEmailSaga,
|
|
1726
|
+
withMpushSaga,
|
|
1724
1727
|
withEbillSaga,
|
|
1725
1728
|
withLineCreateSaga,
|
|
1726
1729
|
withReducer,
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ import * as types from './constants';
|
|
|
5
5
|
export function* getAllAssets(assetType, queryParams) {
|
|
6
6
|
try {
|
|
7
7
|
const result = yield call(Api.getAllAssets, assetType, queryParams);
|
|
8
|
-
yield put({ type: types.GET_ALL_ASSETS_SUCCESS, data: result
|
|
8
|
+
yield put({ type: types.GET_ALL_ASSETS_SUCCESS, data: result?.response, isReset: assetType.queryParams.page === 1 });
|
|
9
9
|
} catch (error) {
|
|
10
10
|
yield put({ type: types.GET_ALL_ASSETS_FAILURE, error });
|
|
11
11
|
}
|
|
@@ -40,11 +40,13 @@ import RenderRoute from '../../v2Components/RenderRoute';
|
|
|
40
40
|
import injectReducer from '../../utils/injectReducer';
|
|
41
41
|
import injectSaga from '../../utils/injectSaga';
|
|
42
42
|
import reducer from './reducer';
|
|
43
|
+
import zaloReducer from '../Zalo/reducer';
|
|
43
44
|
import { v2CapSagas } from './sagas';
|
|
44
45
|
import { v2SmsCreateSagas } from '../Sms/Create/sagas';
|
|
45
46
|
import { v2EbillSagas } from '../Ebill/sagas';
|
|
46
47
|
import { v2EmailDuplicateTemplateSaga } from '../Email/sagas';
|
|
47
48
|
import { v2LineContainerSagas } from '../Line/Container/sagas'
|
|
49
|
+
import { v2ZaloSagas } from '../Zalo/saga';
|
|
48
50
|
import { v2MobilePushCreateSagas } from '../MobilePush/Create/sagas';
|
|
49
51
|
import { v2WechatMapTemplatesSagas } from '../WeChat/MapTemplates/sagas';
|
|
50
52
|
import { v2RcsSagas } from '../Rcs/sagas';
|
|
@@ -606,6 +608,7 @@ function mapDispatchToProps(dispatch) {
|
|
|
606
608
|
|
|
607
609
|
const withConnect = connect(mapStateToProps, mapDispatchToProps);
|
|
608
610
|
const withReducer = injectReducer({ key: 'cap', reducer });
|
|
611
|
+
const withZaloReducer = injectReducer({ key: 'zalo', reducer: zaloReducer });
|
|
609
612
|
const withSaga = injectSaga({ key: 'cap', saga: v2CapSagas });
|
|
610
613
|
const withSmsCreateSaga = injectSaga({ key: 'create', saga: v2SmsCreateSagas });
|
|
611
614
|
const withEbillSaga = injectSaga({ key: 'ebill', saga: v2EbillSagas });
|
|
@@ -613,6 +616,7 @@ const withEmailSaga = injectSaga({ key: 'email', saga: v2EmailDuplicateTemplateS
|
|
|
613
616
|
const withLineContainerSaga = injectSaga({ key: 'lineCreate', saga: v2LineContainerSagas });
|
|
614
617
|
const withMobilePushCreateSaga = injectSaga({ key: 'mobileCreate', saga: v2MobilePushCreateSagas });
|
|
615
618
|
const withWechatMapTemplatesSaga = injectSaga({ key: 'weChatMapTemplate', saga: v2WechatMapTemplatesSagas });
|
|
619
|
+
const withZaloSaga = injectSaga({ key: 'zalo', saga: v2ZaloSagas });
|
|
616
620
|
const withRcsSaga = injectSaga({ key: 'rcs', saga: v2RcsSagas });
|
|
617
621
|
const withInAppSaga = injectSaga({ key: 'inapp', saga: v2InAppSagas });
|
|
618
622
|
const withViberSaga = injectSaga({ key: 'viber', saga: v2ViberSagas });
|
|
@@ -626,9 +630,11 @@ export default compose(
|
|
|
626
630
|
withMobilePushCreateSaga,
|
|
627
631
|
withWechatMapTemplatesSaga,
|
|
628
632
|
withRcsSaga,
|
|
633
|
+
withZaloSaga,
|
|
629
634
|
withInAppSaga,
|
|
630
635
|
withViberSaga,
|
|
631
636
|
withFacebookSaga,
|
|
632
637
|
withReducer,
|
|
638
|
+
withZaloReducer,
|
|
633
639
|
withConnect,
|
|
634
640
|
)(injectIntl(Cap));
|
|
@@ -431,7 +431,10 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
431
431
|
|
|
432
432
|
this.setState({ formData }, () => {
|
|
433
433
|
const isDragDrop = this.checkBeeEditorAllowedForLibrary() && nextProps.Email.CmsSettings.isDragDrop;
|
|
434
|
-
this
|
|
434
|
+
//hiding this after entire dom is rendered
|
|
435
|
+
setTimeout(() => {
|
|
436
|
+
this.hideEdmOptions(isDragDrop);
|
|
437
|
+
},0);
|
|
435
438
|
});
|
|
436
439
|
}
|
|
437
440
|
if (nextProps.Email.createTemplateError && !_.isEqual(nextProps.Email.createTemplateError, this.props.Email.createTemplateError)) {
|
|
@@ -59,7 +59,7 @@ export function* getTemplateDetails(id) {
|
|
|
59
59
|
export function* getAllAssets(assetType, queryParams) {
|
|
60
60
|
try {
|
|
61
61
|
const result = yield call(Api.getAllAssets, assetType, queryParams);
|
|
62
|
-
yield put({ type: types.GET_ALL_ASSETS_SUCCESS, data: result
|
|
62
|
+
yield put({ type: types.GET_ALL_ASSETS_SUCCESS, data: result?.response, isReset: assetType.queryParams.page === 1 });
|
|
63
63
|
} catch (error) {
|
|
64
64
|
yield put({ type: types.GET_ALL_ASSETS_FAILURE, error });
|
|
65
65
|
}
|
|
@@ -7,7 +7,7 @@ import * as types from './constants';
|
|
|
7
7
|
export function* createTemplate({ template, callback }) {
|
|
8
8
|
let errorMsg;
|
|
9
9
|
try {
|
|
10
|
-
const result = yield call(Api.createLineTemplate,
|
|
10
|
+
const result = yield call(Api.createLineTemplate, template);
|
|
11
11
|
if (result.status.code >= 400) {
|
|
12
12
|
errorMsg = result.message;
|
|
13
13
|
throw errorMsg;
|
|
@@ -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
|
}
|
|
@@ -19,6 +19,8 @@ import CapError from '@capillarytech/cap-ui-library/CapError';
|
|
|
19
19
|
import CapCheckbox from '@capillarytech/cap-ui-library/CapCheckbox';
|
|
20
20
|
import CapInfoNote from '@capillarytech/cap-ui-library/CapInfoNote';
|
|
21
21
|
import * as globalActions from '../../Cap/actions';
|
|
22
|
+
import injectSaga from '../../../utils/injectSaga';
|
|
23
|
+
import injectReducer from '../../../utils/injectReducer';
|
|
22
24
|
import {
|
|
23
25
|
CAP_SPACE_16,
|
|
24
26
|
CAP_SPACE_12,
|
|
@@ -47,7 +49,8 @@ import {
|
|
|
47
49
|
ALL,
|
|
48
50
|
LIBRARY,
|
|
49
51
|
} from './constants';
|
|
50
|
-
|
|
52
|
+
import v2EditSmsReducer from '../../Sms/Edit/reducer';
|
|
53
|
+
import { v2SmsEditSagas } from '../../Sms/Edit/sagas';
|
|
51
54
|
let varMap = {};
|
|
52
55
|
let traiData = {};
|
|
53
56
|
let tagValidationResponse = {};
|
|
@@ -632,9 +635,14 @@ const mapDispatchToProps = (dispatch) => ({
|
|
|
632
635
|
globalActions: bindActionCreators(globalActions, dispatch),
|
|
633
636
|
});
|
|
634
637
|
|
|
638
|
+
const withSaga = injectSaga({ key: 'edit', saga: v2SmsEditSagas });
|
|
639
|
+
const withReducer = injectReducer({ key: 'edit', reducer: v2EditSmsReducer });
|
|
640
|
+
|
|
635
641
|
export default withCreatives({
|
|
636
642
|
WrappedComponent: SmsTraiEdit,
|
|
637
643
|
mapStateToProps,
|
|
638
644
|
mapDispatchToProps,
|
|
639
645
|
userAuth: true,
|
|
646
|
+
sagas: [withSaga],
|
|
647
|
+
reducers: [withReducer],
|
|
640
648
|
});
|
|
@@ -51,7 +51,6 @@ import TemplatePreview from '../../v2Components/TemplatePreview';
|
|
|
51
51
|
import injectSaga from '../../utils/injectSaga';
|
|
52
52
|
import injectReducer from '../../utils/injectReducer';
|
|
53
53
|
import * as globalActions from '../Cap/actions';
|
|
54
|
-
import { v2ZaloSagas } from './saga';
|
|
55
54
|
import v2ZaloReducer from './reducer';
|
|
56
55
|
|
|
57
56
|
export const Zalo = (props) => {
|
|
@@ -501,7 +500,6 @@ const mapDispatchToProps = (dispatch) => ({
|
|
|
501
500
|
});
|
|
502
501
|
|
|
503
502
|
|
|
504
|
-
const withSaga = injectSaga({ key: 'zalo', saga: v2ZaloSagas });
|
|
505
503
|
const withReducer = injectReducer({ key: 'zalo', reducer: v2ZaloReducer });
|
|
506
504
|
|
|
507
505
|
export default withCreatives({
|
|
@@ -509,6 +507,5 @@ export default withCreatives({
|
|
|
509
507
|
mapStateToProps,
|
|
510
508
|
mapDispatchToProps,
|
|
511
509
|
userAuth: true,
|
|
512
|
-
sagas: [withSaga],
|
|
513
510
|
reducers: [withReducer],
|
|
514
511
|
});
|