@capillarytech/creatives-library 8.0.5 → 8.0.7
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/Ebill/index.js +2 -1
- package/v2Containers/Email/index.js +6 -0
- package/v2Containers/Email/sagas.js +5 -0
- package/v2Containers/InApp/index.js +2 -0
- package/v2Containers/Line/Container/index.js +2 -1
- package/v2Containers/MobilePush/Create/index.js +2 -1
- package/v2Containers/MobilePush/Edit/index.js +2 -1
- package/v2Containers/Rcs/index.js +2 -0
- package/v2Containers/SmsTrai/Edit/index.js +2 -0
- package/v2Containers/Templates/sagas.js +7 -2
- package/v2Containers/Viber/index.js +2 -0
- package/v2Containers/WeChat/MapTemplates/index.js +2 -1
- package/v2Containers/Whatsapp/index.js +2 -1
- package/v2Containers/Zalo/index.js +2 -1
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));
|
|
@@ -25,7 +25,7 @@ import './_ebill.scss';
|
|
|
25
25
|
import withCreatives from '../../hoc/withCreatives';
|
|
26
26
|
import injectReducer from '../../utils/injectReducer';
|
|
27
27
|
import v2EbillReducer from './reducer';
|
|
28
|
-
|
|
28
|
+
import * as globalActions from '../Cap/actions';
|
|
29
29
|
|
|
30
30
|
const BreadcrumbItem = Breadcrumb.Item;
|
|
31
31
|
|
|
@@ -1255,6 +1255,7 @@ const mapStateToProps = createStructuredSelector({
|
|
|
1255
1255
|
function mapDispatchToProps(dispatch) {
|
|
1256
1256
|
return {
|
|
1257
1257
|
actions: bindActionCreators(actions, dispatch),
|
|
1258
|
+
globalActions: bindActionCreators(globalActions, dispatch),
|
|
1258
1259
|
};
|
|
1259
1260
|
}
|
|
1260
1261
|
|
|
@@ -21,6 +21,7 @@ import * as templatesActions from '../Templates/actions';
|
|
|
21
21
|
import {makeSelectEmail} from './selectors';
|
|
22
22
|
import { makeSelectTemplates } from '../Templates/selectors';
|
|
23
23
|
import messages from './messages';
|
|
24
|
+
import * as globalActions from '../Cap/actions';
|
|
24
25
|
// import PageHeader from '../../v2Components/PageHeader';
|
|
25
26
|
import './_email.scss';
|
|
26
27
|
import {getMessageObject} from '../../utils/messageUtils';
|
|
@@ -40,6 +41,8 @@ import {transformEmailTemplates, storeS3FileSizeDetails, CREATIVES_S3_ASSET_FILE
|
|
|
40
41
|
import { CUSTOMER_BARCODE_TAG } from '../../containers/App/constants';
|
|
41
42
|
import injectReducer from '../../utils/injectReducer';
|
|
42
43
|
import v2EmailReducer from './reducer';
|
|
44
|
+
import { v2EmailSagas } from './sagas';
|
|
45
|
+
import injectSaga from '../../utils/injectSaga';
|
|
43
46
|
|
|
44
47
|
export class Email extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
45
48
|
constructor(props) {
|
|
@@ -2807,15 +2810,18 @@ function mapDispatchToProps(dispatch) {
|
|
|
2807
2810
|
actions: bindActionCreators(actions, dispatch),
|
|
2808
2811
|
templatesActions: bindActionCreators(templatesActions, dispatch),
|
|
2809
2812
|
creativesContainerActions: bindActionCreators(creativesContainerActions, dispatch),
|
|
2813
|
+
globalActions: bindActionCreators(globalActions, dispatch),
|
|
2810
2814
|
};
|
|
2811
2815
|
}
|
|
2812
2816
|
|
|
2813
2817
|
const withReducer = injectReducer({ key: 'email', reducer: v2EmailReducer });
|
|
2818
|
+
const withEmailSaga = injectSaga({ key: 'email', saga: v2EmailSagas });
|
|
2814
2819
|
|
|
2815
2820
|
export default withCreatives({
|
|
2816
2821
|
WrappedComponent: Email,
|
|
2817
2822
|
mapStateToProps,
|
|
2818
2823
|
mapDispatchToProps,
|
|
2819
2824
|
userAuth: true,
|
|
2825
|
+
sagas: [withEmailSaga],
|
|
2820
2826
|
reducers: [withReducer],
|
|
2821
2827
|
});
|
|
@@ -14,6 +14,7 @@ import CapButton from "@capillarytech/cap-ui-library/CapButton";
|
|
|
14
14
|
import CapTab from "@capillarytech/cap-ui-library/CapTab";
|
|
15
15
|
import CapNotification from "@capillarytech/cap-ui-library/CapNotification";
|
|
16
16
|
import { makeSelectInApp, makeSelectAccount } from "./selectors";
|
|
17
|
+
import * as globalActions from '../Cap/actions';
|
|
17
18
|
import {
|
|
18
19
|
isLoadingMetaEntities,
|
|
19
20
|
makeSelectMetaEntities,
|
|
@@ -794,6 +795,7 @@ const mapStateToProps = createStructuredSelector({
|
|
|
794
795
|
|
|
795
796
|
const mapDispatchToProps = (dispatch) => ({
|
|
796
797
|
actions: bindActionCreators(inAppActions, dispatch),
|
|
798
|
+
globalActions: bindActionCreators(globalActions, dispatch),
|
|
797
799
|
});
|
|
798
800
|
|
|
799
801
|
const withReducer = injectReducer({ key: 'inapp', reducer: v2InAppReducer });
|
|
@@ -7,7 +7,7 @@ import isEmpty from 'lodash/isEmpty';
|
|
|
7
7
|
import style from './style';
|
|
8
8
|
import withStyles from '../../../hoc/withStyles';
|
|
9
9
|
import './_lineCreate.scss';
|
|
10
|
-
|
|
10
|
+
import * as globalActions from '../../Cap/actions';
|
|
11
11
|
import CapButton from '@capillarytech/cap-ui-library/CapButton';
|
|
12
12
|
import CapNotification from '@capillarytech/cap-ui-library/CapNotification';
|
|
13
13
|
import CapSpin from '@capillarytech/cap-ui-library/CapSpin';
|
|
@@ -880,6 +880,7 @@ function mapDispatchToProps(dispatch) {
|
|
|
880
880
|
return {
|
|
881
881
|
actions: bindActionCreators(compActions, dispatch),
|
|
882
882
|
templateActions: bindActionCreators(templateActionsConfig, dispatch),
|
|
883
|
+
globalActions: bindActionCreators(globalActions, dispatch),
|
|
883
884
|
};
|
|
884
885
|
}
|
|
885
886
|
|
|
@@ -20,7 +20,7 @@ import FormBuilder from '../../../v2Components/FormBuilder';
|
|
|
20
20
|
import './_mobilePushCreate.scss';
|
|
21
21
|
import * as actions from './actions';
|
|
22
22
|
import withCreatives from '../../../hoc/withCreatives';
|
|
23
|
-
|
|
23
|
+
import * as globalActions from '../../Cap/actions';
|
|
24
24
|
import {getMessageObject} from '../../../utils/messageUtils';
|
|
25
25
|
import { gtmPush } from '../../../utils/gtmTrackers';
|
|
26
26
|
|
|
@@ -1896,6 +1896,7 @@ const mapStateToProps = createStructuredSelector({
|
|
|
1896
1896
|
function mapDispatchToProps(dispatch) {
|
|
1897
1897
|
return {
|
|
1898
1898
|
actions: bindActionCreators(actions, dispatch),
|
|
1899
|
+
globalActions: bindActionCreators(globalActions, dispatch),
|
|
1899
1900
|
};
|
|
1900
1901
|
}
|
|
1901
1902
|
|
|
@@ -38,7 +38,7 @@ import injectSaga from '../../../utils/injectSaga';
|
|
|
38
38
|
import injectReducer from '../../../utils/injectReducer';
|
|
39
39
|
import { v2MobilePushEditSagas } from './sagas';
|
|
40
40
|
import v2MobilePushEditReducer from './reducer';
|
|
41
|
-
|
|
41
|
+
import * as globalActions from '../../Cap/actions';
|
|
42
42
|
const PrefixWrapper = styled.div`
|
|
43
43
|
margin-right: 16px;
|
|
44
44
|
`;
|
|
@@ -1975,6 +1975,7 @@ function mapDispatchToProps(dispatch) {
|
|
|
1975
1975
|
return {
|
|
1976
1976
|
actions: bindActionCreators(actions, dispatch),
|
|
1977
1977
|
templatesActions: bindActionCreators(templatesActions, dispatch),
|
|
1978
|
+
globalActions: bindActionCreators(globalActions, dispatch),
|
|
1978
1979
|
};
|
|
1979
1980
|
}
|
|
1980
1981
|
|
|
@@ -28,6 +28,7 @@ import CapTooltipWithInfo from '@capillarytech/cap-ui-library/CapTooltipWithInfo
|
|
|
28
28
|
import CapError from '@capillarytech/cap-ui-library/CapError';
|
|
29
29
|
import CapCheckbox from '@capillarytech/cap-ui-library/CapCheckbox';
|
|
30
30
|
import CapAskAira from '@capillarytech/cap-ui-library/CapAskAira';
|
|
31
|
+
import * as globalActions from '../Cap/actions';
|
|
31
32
|
import {
|
|
32
33
|
CAP_G01,
|
|
33
34
|
CAP_SPACE_16,
|
|
@@ -1215,6 +1216,7 @@ const mapStateToProps = createStructuredSelector({
|
|
|
1215
1216
|
|
|
1216
1217
|
const mapDispatchToProps = (dispatch) => ({
|
|
1217
1218
|
actions: bindActionCreators(RcsActions, dispatch),
|
|
1219
|
+
globalActions: bindActionCreators(globalActions, dispatch),
|
|
1218
1220
|
templatesActions: bindActionCreators(TemplatesActions, dispatch),
|
|
1219
1221
|
});
|
|
1220
1222
|
|
|
@@ -18,6 +18,7 @@ import CapNotification from '@capillarytech/cap-ui-library/CapNotification';
|
|
|
18
18
|
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
|
+
import * as globalActions from '../../Cap/actions';
|
|
21
22
|
import {
|
|
22
23
|
CAP_SPACE_16,
|
|
23
24
|
CAP_SPACE_12,
|
|
@@ -628,6 +629,7 @@ const mapStateToProps = createStructuredSelector({
|
|
|
628
629
|
|
|
629
630
|
const mapDispatchToProps = (dispatch) => ({
|
|
630
631
|
actions: bindActionCreators(smsEditActions, dispatch),
|
|
632
|
+
globalActions: bindActionCreators(globalActions, dispatch),
|
|
631
633
|
});
|
|
632
634
|
|
|
633
635
|
export default withCreatives({
|
|
@@ -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
|
}
|
|
@@ -4,6 +4,7 @@ import { createStructuredSelector } from 'reselect';
|
|
|
4
4
|
import { injectIntl, FormattedMessage } from 'react-intl';
|
|
5
5
|
import isEmpty from 'lodash/isEmpty';
|
|
6
6
|
import get from 'lodash/get';
|
|
7
|
+
import * as globalActions from '../Cap/actions';
|
|
7
8
|
import CapHeader from '@capillarytech/cap-ui-library/CapHeader';
|
|
8
9
|
import CapRow from '@capillarytech/cap-ui-library/CapRow';
|
|
9
10
|
import CapColumn from '@capillarytech/cap-ui-library/CapColumn';
|
|
@@ -773,6 +774,7 @@ const mapStateToProps = createStructuredSelector({
|
|
|
773
774
|
|
|
774
775
|
const mapDispatchToProps = (dispatch) => ({
|
|
775
776
|
actions: bindActionCreators(viberActions, dispatch),
|
|
777
|
+
globalActions: bindActionCreators(globalActions, dispatch),
|
|
776
778
|
});
|
|
777
779
|
|
|
778
780
|
const withReducer = injectReducer({ key: 'viber', reducer: v2ViberReducer });
|
|
@@ -35,7 +35,7 @@ import { gtmPush } from '../../../utils/gtmTrackers';
|
|
|
35
35
|
import { WECHAT } from '../../CreativesContainer/constants';
|
|
36
36
|
import injectReducer from '../../../utils/injectReducer';
|
|
37
37
|
import v2WechatMapTemplatesReducer from './reducer';
|
|
38
|
-
|
|
38
|
+
import * as globalActions from '../../Cap/actions';
|
|
39
39
|
const SELECT_TEMPLATE_MODE = "selectTemplate";
|
|
40
40
|
const MAP_TEMPLATE_MODE = "mapTemplateMode";
|
|
41
41
|
const URL = "URL";
|
|
@@ -1490,6 +1490,7 @@ function mapDispatchToProps(dispatch) {
|
|
|
1490
1490
|
return {
|
|
1491
1491
|
actions: bindActionCreators(actions, dispatch),
|
|
1492
1492
|
templateActions: bindActionCreators(templateActions, dispatch),
|
|
1493
|
+
globalActions: bindActionCreators(globalActions, dispatch),
|
|
1493
1494
|
};
|
|
1494
1495
|
}
|
|
1495
1496
|
|
|
@@ -107,7 +107,7 @@ import injectReducer from '../../utils/injectReducer';
|
|
|
107
107
|
|
|
108
108
|
import { v2WhatsappSagas } from './sagas';
|
|
109
109
|
import v2WhatsappReducer from './reducer';
|
|
110
|
-
|
|
110
|
+
import * as globalActions from '../Cap/actions';
|
|
111
111
|
let varMap = {};
|
|
112
112
|
let editContent = {};
|
|
113
113
|
let tagValidationResponse = {};
|
|
@@ -2317,6 +2317,7 @@ const mapStateToProps = createStructuredSelector({
|
|
|
2317
2317
|
|
|
2318
2318
|
const mapDispatchToProps = (dispatch) => ({
|
|
2319
2319
|
actions: bindActionCreators(WhatsappActions, dispatch),
|
|
2320
|
+
globalActions: bindActionCreators(globalActions, dispatch),
|
|
2320
2321
|
});
|
|
2321
2322
|
|
|
2322
2323
|
|
|
@@ -50,7 +50,7 @@ import { validateTags } from '../../utils/tagValidations';
|
|
|
50
50
|
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
54
|
import { v2ZaloSagas } from './saga';
|
|
55
55
|
import v2ZaloReducer from './reducer';
|
|
56
56
|
|
|
@@ -497,6 +497,7 @@ const mapStateToProps = createStructuredSelector({
|
|
|
497
497
|
|
|
498
498
|
const mapDispatchToProps = (dispatch) => ({
|
|
499
499
|
actions: bindActionCreators(zaloActions, dispatch),
|
|
500
|
+
globalActions: bindActionCreators(globalActions, dispatch),
|
|
500
501
|
});
|
|
501
502
|
|
|
502
503
|
|