@capillarytech/creatives-library 8.0.136-alpha.4 → 8.0.136-beta.3
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/components/BreadCrumbs/index.js +65 -0
- package/components/BreadCrumbs/messages.js +13 -0
- package/components/CapTagList/index.js +235 -0
- package/components/CapTagList/messages.js +45 -0
- package/components/Card/_customCard.scss +40 -0
- package/components/Card/index.js +78 -0
- package/components/Card/tests/__snapshots__/index.test.js.snap +22 -0
- package/components/Card/tests/index.test.js +20 -0
- package/components/CardGrid/index.js +71 -0
- package/components/Ckeditor/index.js +238 -0
- package/components/Ckeditor/messages.js +13 -0
- package/components/Ckeditor/style.scss +3 -0
- package/components/Component/index.js +29 -0
- package/components/CustomPopOver/index.js +81 -0
- package/components/CustomPopOver/messages.js +17 -0
- package/components/DateFilter/index.js +349 -0
- package/components/DateFilter/messages.js +57 -0
- package/components/DateRange/index.js +114 -0
- package/components/DateRange/messages.js +25 -0
- package/components/Edmeditor/index.js +65 -0
- package/components/Edmeditor/messages.js +13 -0
- package/components/EmailPreview/_emailPreview.scss +119 -0
- package/components/EmailPreview/assets/images/iPad.svg +10 -0
- package/components/EmailPreview/assets/images/mobile.png +0 -0
- package/components/EmailPreview/index.js +107 -0
- package/components/EmailPreview/messages.js +33 -0
- package/components/Footer/index.js +27 -0
- package/components/Footer/messages.js +13 -0
- package/components/FormBuilder/_formBuilder.scss +83 -0
- package/components/FormBuilder/index.js +3279 -0
- package/components/FormBuilder/messages.js +61 -0
- package/components/Header/index.js +44 -0
- package/components/Header/messages.js +29 -0
- package/components/ImagePreview/_imagePreview.scss +63 -0
- package/components/ImagePreview/index.js +52 -0
- package/components/ImagePreview/messages.js +17 -0
- package/components/PageHeader/_pageHeader.scss +22 -0
- package/components/PageHeader/index.js +37 -0
- package/components/PageHeader/messages.js +13 -0
- package/components/Pagination/_pagination.scss +5 -0
- package/components/Pagination/index.js +49 -0
- package/components/PreviewSideBar/_previewsidebar.scss +28 -0
- package/components/PreviewSideBar/index.js +152 -0
- package/components/PreviewSideBar/messages.js +41 -0
- package/components/Sidebar/_sidebar.scss +115 -0
- package/components/Sidebar/index.js +214 -0
- package/components/Sidebar/messages.js +21 -0
- package/components/SlideBox/_slideBox.scss +63 -0
- package/components/SlideBox/index.js +47 -0
- package/components/SlideBox/tests/index.test.js +103 -0
- package/components/SmsEditor/index.js +55 -0
- package/components/SmsTest/index.js +117 -0
- package/components/SmsTest/messages.js +21 -0
- package/components/TemplatePreview/WechatRichmediaTemplatePreview/_wechatRichmediaTemplatePrev.scss +42 -0
- package/components/TemplatePreview/WechatRichmediaTemplatePreview/index.js +141 -0
- package/components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +21 -0
- package/components/TemplatePreview/_templatePreview.scss +642 -0
- package/components/TemplatePreview/assets/images/WECHAT_5x.png +0 -0
- package/components/TemplatePreview/assets/images/androidPushMessage.svg +45 -0
- package/components/TemplatePreview/assets/images/home-screen-android.svg +21 -0
- package/components/TemplatePreview/assets/images/home-screen-ios.svg +16 -0
- package/components/TemplatePreview/assets/images/iPhonePushMessage.svg +135 -0
- package/components/TemplatePreview/assets/images/mobile.svg +24 -0
- package/components/TemplatePreview/assets/images/sms-body.png +0 -0
- package/components/TemplatePreview/assets/images/sms-icon.png +0 -0
- package/components/TemplatePreview/assets/images/sms_mobile.png +0 -0
- package/components/TemplatePreview/assets/images/sms_mobile_android.svg +22 -0
- package/components/TemplatePreview/assets/images/sms_mobile_ios.svg +16 -0
- package/components/TemplatePreview/assets/images/user-icon.svg +19 -0
- package/components/TemplatePreview/assets/images/wechat-mobile.svg +78 -0
- package/components/TemplatePreview/assets/images/wechat_mobile_android.svg +20 -0
- package/components/TemplatePreview/index.js +617 -0
- package/components/TemplatePreview/messages.js +78 -0
- package/components/Toastr/index.js +60 -0
- package/components/Toastr/messages.js +13 -0
- package/components/ToastrMessage/index.js +113 -0
- package/components/ToastrMessage/messages.js +17 -0
- package/components/TopBar/_topbar.scss +46 -0
- package/components/TopBar/assets/images/capillary_logo.png +0 -0
- package/components/TopBar/assets/images/old_capillary_logo.png +0 -0
- package/components/TopBar/index.js +113 -0
- package/components/TopBar/messages.js +29 -0
- package/containers/App/actions.js +7 -0
- package/containers/App/constants.js +114 -0
- package/containers/App/index.js +52 -0
- package/containers/App/reducer.js +19 -0
- package/containers/App/sagas.js +31 -0
- package/containers/App/selectors.js +25 -0
- package/containers/App/test/saga.test.js +11 -0
- package/containers/Assets/Gallery/_gallery.scss +126 -0
- package/containers/Assets/Gallery/actions.js +37 -0
- package/containers/Assets/Gallery/constants.js +23 -0
- package/containers/Assets/Gallery/index.js +473 -0
- package/containers/Assets/Gallery/messages.js +93 -0
- package/containers/Assets/Gallery/reducer.js +81 -0
- package/containers/Assets/Gallery/sagas.js +80 -0
- package/containers/Assets/Gallery/selectors.js +25 -0
- package/containers/Assets/Gallery/tests/__snapshots__/reducer.test.js.snap +9 -0
- package/containers/Assets/Gallery/tests/actions.test.js +25 -0
- package/containers/Assets/Gallery/tests/reducer.test.js +96 -0
- package/containers/Assets/Gallery/tests/saga.test.js +157 -0
- package/containers/Cap/actions.js +66 -0
- package/containers/Cap/constants.js +25 -0
- package/containers/Cap/index.js +402 -0
- package/containers/Cap/messages.js +75 -0
- package/containers/Cap/reducer.js +113 -0
- package/containers/Cap/sagas.js +159 -0
- package/containers/Cap/selectors.js +75 -0
- package/containers/Cap/tests/__snapshots__/index.test.js.snap +2269 -0
- package/containers/Cap/tests/index.test.js +22 -0
- package/containers/Cap/tests/saga.test.js +284 -0
- package/containers/Dashboard/actions.js +15 -0
- package/containers/Dashboard/constants.js +7 -0
- package/containers/Dashboard/index.js +76 -0
- package/containers/Dashboard/messages.js +13 -0
- package/containers/Dashboard/reducer.js +21 -0
- package/containers/Dashboard/sagas.js +17 -0
- package/containers/Dashboard/selectors.js +25 -0
- package/containers/Dashboard/test/saga.test.js +9 -0
- package/containers/Ebill/_ebill.scss +5 -0
- package/containers/Ebill/actions.js +43 -0
- package/containers/Ebill/constants.js +20 -0
- package/containers/Ebill/index.js +1278 -0
- package/containers/Ebill/messages.js +77 -0
- package/containers/Ebill/reducer.js +72 -0
- package/containers/Ebill/sagas.js +74 -0
- package/containers/Ebill/selectors.js +25 -0
- package/containers/Ebill/test/saga.test.js +11 -0
- package/containers/Email/_email.scss +141 -0
- package/containers/Email/actions.js +81 -0
- package/containers/Email/constants.js +36 -0
- package/containers/Email/index.js +3325 -0
- package/containers/Email/messages.js +289 -0
- package/containers/Email/reducer.js +142 -0
- package/containers/Email/sagas.js +135 -0
- package/containers/Email/selectors.js +31 -0
- package/containers/Email/test/saga.test.js +671 -0
- package/containers/LanguageProvider/actions.js +17 -0
- package/containers/LanguageProvider/constants.js +8 -0
- package/containers/LanguageProvider/index.js +80 -0
- package/containers/LanguageProvider/reducer.js +30 -0
- package/containers/LanguageProvider/selectors.js +20 -0
- package/containers/LanguageProvider/tests/actions.test.js +19 -0
- package/containers/LanguageProvider/tests/index.test.js +78 -0
- package/containers/LanguageProvider/tests/reducer.test.js +20 -0
- package/containers/LanguageProvider/tests/selectors.test.js +15 -0
- package/containers/Line/Create/_lineCreate.scss +54 -0
- package/containers/Line/Create/actions.js +90 -0
- package/containers/Line/Create/constants.js +39 -0
- package/containers/Line/Create/index.js +836 -0
- package/containers/Line/Create/messages.js +189 -0
- package/containers/Line/Create/reducer.js +99 -0
- package/containers/Line/Create/sagas.js +121 -0
- package/containers/Line/Create/selectors.js +36 -0
- package/containers/Line/Create/tests/saga.test.js +202 -0
- package/containers/Line/Edit/_lineEdit.scss +35 -0
- package/containers/Line/Edit/actions.js +79 -0
- package/containers/Line/Edit/constants.js +27 -0
- package/containers/Line/Edit/index.js +1050 -0
- package/containers/Line/Edit/messages.js +177 -0
- package/containers/Line/Edit/reducer.js +83 -0
- package/containers/Line/Edit/sagas.js +80 -0
- package/containers/Line/Edit/selectors.js +29 -0
- package/containers/Line/Edit/test/saga.test.js +160 -0
- package/containers/Login/assets/images/capillary_logo.png +0 -0
- package/containers/Login/components/LoginForm/index.js +62 -0
- package/containers/Login/components/LoginForm/messages.js +33 -0
- package/containers/Login/index.js +130 -0
- package/containers/Login/messages.js +25 -0
- package/containers/Login/selectors.js +25 -0
- package/containers/MobilePush/Create/_mobilePushCreate.scss +39 -0
- package/containers/MobilePush/Create/actions.js +46 -0
- package/containers/MobilePush/Create/constants.js +23 -0
- package/containers/MobilePush/Create/index.js +2303 -0
- package/containers/MobilePush/Create/messages.js +269 -0
- package/containers/MobilePush/Create/reducer.js +70 -0
- package/containers/MobilePush/Create/sagas.js +74 -0
- package/containers/MobilePush/Create/selectors.js +28 -0
- package/containers/MobilePush/Create/test/saga.test.js +19 -0
- package/containers/MobilePush/Edit/_mobilePushCreate.scss +39 -0
- package/containers/MobilePush/Edit/actions.js +91 -0
- package/containers/MobilePush/Edit/constants.js +35 -0
- package/containers/MobilePush/Edit/index.js +2601 -0
- package/containers/MobilePush/Edit/messages.js +266 -0
- package/containers/MobilePush/Edit/reducer.js +112 -0
- package/containers/MobilePush/Edit/sagas.js +126 -0
- package/containers/MobilePush/Edit/selectors.js +29 -0
- package/containers/MobilePush/Edit/tests/saga.test.js +255 -0
- package/containers/NotFoundPage/index.js +25 -0
- package/containers/NotFoundPage/messages.js +13 -0
- package/containers/NotFoundPage/tests/index.test.js +17 -0
- package/containers/Sms/Create/_smsCreate.scss +42 -0
- package/containers/Sms/Create/actions.js +27 -0
- package/containers/Sms/Create/constants.js +16 -0
- package/containers/Sms/Create/index.js +1488 -0
- package/containers/Sms/Create/messages.js +109 -0
- package/containers/Sms/Create/reducer.js +41 -0
- package/containers/Sms/Create/sagas.js +40 -0
- package/containers/Sms/Create/selectors.js +28 -0
- package/containers/Sms/Create/test/saga.test.js +11 -0
- package/containers/Sms/Edit/actions.js +40 -0
- package/containers/Sms/Edit/constants.js +17 -0
- package/containers/Sms/Edit/index.js +1472 -0
- package/containers/Sms/Edit/messages.js +105 -0
- package/containers/Sms/Edit/reducer.js +50 -0
- package/containers/Sms/Edit/sagas.js +60 -0
- package/containers/Sms/Edit/selectors.js +32 -0
- package/containers/Sms/Edit/test/saga.test.js +13 -0
- package/containers/TagList/_tagList.scss +8 -0
- package/containers/TagList/actions.js +15 -0
- package/containers/TagList/constants.js +32 -0
- package/containers/TagList/index.js +236 -0
- package/containers/TagList/messages.js +13 -0
- package/containers/TagList/reducer.js +23 -0
- package/containers/TagList/sagas.js +11 -0
- package/containers/TagList/selectors.js +25 -0
- package/containers/Templates/_templates.scss +333 -0
- package/containers/Templates/actions.js +103 -0
- package/containers/Templates/constants.js +60 -0
- package/containers/Templates/index.js +1756 -0
- package/containers/Templates/messages.js +337 -0
- package/containers/Templates/reducer.js +142 -0
- package/containers/Templates/sagas.js +163 -0
- package/containers/Templates/selectors.js +28 -0
- package/containers/Templates/test/saga.test.js +241 -0
- package/containers/WeChat/MapTemplates/_mapTemplates.scss +8 -0
- package/containers/WeChat/MapTemplates/actions.js +52 -0
- package/containers/WeChat/MapTemplates/constants.js +28 -0
- package/containers/WeChat/MapTemplates/index.js +1610 -0
- package/containers/WeChat/MapTemplates/messages.js +157 -0
- package/containers/WeChat/MapTemplates/reducer.js +74 -0
- package/containers/WeChat/MapTemplates/sagas.js +84 -0
- package/containers/WeChat/MapTemplates/selectors.js +25 -0
- package/containers/WeChat/MapTemplates/test/saga.test.js +155 -0
- package/containers/WeChat/RichmediaTemplates/Create/_createRichmedia.scss +57 -0
- package/containers/WeChat/RichmediaTemplates/Create/actions.js +36 -0
- package/containers/WeChat/RichmediaTemplates/Create/constants.js +15 -0
- package/containers/WeChat/RichmediaTemplates/Create/index.js +1071 -0
- package/containers/WeChat/RichmediaTemplates/Create/messages.js +165 -0
- package/containers/WeChat/RichmediaTemplates/Create/reducer.js +60 -0
- package/containers/WeChat/RichmediaTemplates/Create/richmediaschema.js +497 -0
- package/containers/WeChat/RichmediaTemplates/Create/sagas.js +51 -0
- package/containers/WeChat/RichmediaTemplates/Create/selectors.js +37 -0
- package/containers/WeChat/RichmediaTemplates/Create/test/saga.test.js +13 -0
- package/containers/WeChat/RichmediaTemplates/Edit/actions.js +20 -0
- package/containers/WeChat/RichmediaTemplates/Edit/constants.js +10 -0
- package/containers/WeChat/RichmediaTemplates/Edit/index.js +136 -0
- package/containers/WeChat/RichmediaTemplates/Edit/messages.js +13 -0
- package/containers/WeChat/RichmediaTemplates/Edit/reducer.js +28 -0
- package/containers/WeChat/RichmediaTemplates/Edit/sagas.js +36 -0
- package/containers/WeChat/RichmediaTemplates/Edit/selectors.js +30 -0
- package/containers/WeChat/RichmediaTemplates/Edit/test/saga.test.js +12 -0
- package/containers/WeChat/RichmediaTemplates/View/actions.js +15 -0
- package/containers/WeChat/RichmediaTemplates/View/constants.js +7 -0
- package/containers/WeChat/RichmediaTemplates/View/index.js +47 -0
- package/containers/WeChat/RichmediaTemplates/View/messages.js +21 -0
- package/containers/WeChat/RichmediaTemplates/View/reducer.js +23 -0
- package/containers/WeChat/RichmediaTemplates/View/sagas.js +11 -0
- package/containers/WeChat/RichmediaTemplates/View/selectors.js +25 -0
- package/index.js +2 -4
- package/package.json +1 -1
- package/routes.js +202 -136
- package/services/getSchema.js +1 -1
- package/services/localStorageApi.js +0 -1
- package/tests/i18n.test.js +1 -1
- package/utils/asyncInjectors.js +78 -0
- package/utils/authWrapper.js +1 -1
- package/utils/callNativeEvent.js +16 -0
- package/utils/checkStore.js +21 -0
- package/utils/common.js +2 -2
- package/utils/customAuthWrapper.js +62 -0
- package/utils/customConnectedAuthWrapper.js +26 -0
- package/utils/tagValidations.js +1 -1
- package/utils/tests/checkStore.test.js +1 -1
- package/utils/tests/customAuth.test.js +1 -1
- package/utils/transformerUtils.js +195 -1
- package/v2Components/CapTagList/index.js +14 -9
- package/v2Components/Carousel/style.scss +1 -1
- package/v2Components/EmailMobilePreview/index.js +2 -2
- package/v2Components/FormBuilder/index.js +2 -2
- package/v2Components/TemplatePreview/index.js +1 -2
- package/v2Containers/Cap/tests/saga.test.js +1 -1
- package/v2Containers/Email/index.js +1 -1
- package/v2Containers/FTP/index.js +1 -1
- package/v2Containers/Line/Container/Text/index.js +6 -6
- package/v2Containers/Sms/Create/index.js +2 -2
- package/v2Containers/Sms/Edit/index.js +1 -1
- package/v2Containers/TagList/index.js +1 -1
- package/v2Containers/TagList/utils.js +1 -1
- package/v2Containers/Templates/index.js +1 -1
- package/v2Containers/Templates/sagas.js +1 -1
- package/constants/unified.js +0 -189
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Helmet from 'react-helmet';
|
|
4
|
+
import { connect } from 'react-redux';
|
|
5
|
+
import { withRouter } from 'react-router-dom';
|
|
6
|
+
import { Switch } from 'react-router';
|
|
7
|
+
import { compose, bindActionCreators } from 'redux';
|
|
8
|
+
import styled from 'styled-components';
|
|
9
|
+
import { createStructuredSelector } from 'reselect';
|
|
10
|
+
import _ from 'lodash';
|
|
11
|
+
import moment from 'moment';
|
|
12
|
+
import injectSaga from 'utils/injectSaga';
|
|
13
|
+
import injectReducer from 'utils/injectReducer';
|
|
14
|
+
import { getIsLoggedIn } from '../../utils/authWrapper';
|
|
15
|
+
import { appSaga } from '../App/sagas';
|
|
16
|
+
import { capSaga } from './sagas';
|
|
17
|
+
import componentRoutes from '../../routes';
|
|
18
|
+
import 'moment/locale/zh-cn';
|
|
19
|
+
import { injectIntl, intlShape } from 'react-intl';
|
|
20
|
+
import TopBar from '../../components/TopBar';
|
|
21
|
+
// import 'moment/locale/en-us';
|
|
22
|
+
import Sidebar from '../../components/Sidebar';
|
|
23
|
+
import { makeSelectAuthenticated, makeSelectUser } from './selectors';
|
|
24
|
+
import * as actions from './actions';
|
|
25
|
+
import * as locationActions from '../LanguageProvider/actions';
|
|
26
|
+
import * as appActions from '../App/actions';
|
|
27
|
+
import config from '../../config/app';
|
|
28
|
+
import Toastr from '../../components/Toastr';
|
|
29
|
+
import messages from './messages';
|
|
30
|
+
import { makeSelectLocale } from '../../v2Containers/LanguageProvider/selectors';
|
|
31
|
+
import { CREATIVES_UI_VIEW } from '../../v2Containers/App/constants';
|
|
32
|
+
import AccessForbidden from '../../v2Components/AccessForbidden';
|
|
33
|
+
import reducer from './reducer';
|
|
34
|
+
import RenderRoute from '../../v2Components/RenderRoute';
|
|
35
|
+
import { EMBEDDED } from '../../v2Containers/SmsTrai/Edit/constants';
|
|
36
|
+
|
|
37
|
+
const gtm = window.dataLayer || [];
|
|
38
|
+
|
|
39
|
+
const CapWrapper = styled.div`
|
|
40
|
+
margin: 0 auto;
|
|
41
|
+
display: flex;
|
|
42
|
+
min-height: 100%;
|
|
43
|
+
padding: 0;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
`;
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
export class Cap extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
49
|
+
|
|
50
|
+
constructor(props) {
|
|
51
|
+
super(props);
|
|
52
|
+
this.state = {
|
|
53
|
+
menuData: [],
|
|
54
|
+
switchedOrg: false,
|
|
55
|
+
isCreativesAccessible: true,
|
|
56
|
+
};
|
|
57
|
+
this.changeOrg = this.changeOrg.bind(this);
|
|
58
|
+
this.logout = this.logout.bind(this);
|
|
59
|
+
this.handleRemoveMessage = this.handleRemoveMessage.bind(this);
|
|
60
|
+
this.getMappedLocale = this.getMappedLocale.bind(this);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
componentWillMount() {
|
|
64
|
+
this.props.actions.getUserData((userData) => {
|
|
65
|
+
if (!userData.accessiblePermissions.includes(CREATIVES_UI_VIEW)) {
|
|
66
|
+
this.setState({ isCreativesAccessible: false });
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
if (this.props.Global.user) {
|
|
70
|
+
const userGtmData = this.getUserGtmData(this.props);
|
|
71
|
+
if (userGtmData?.userId) {
|
|
72
|
+
gtm.push({ ...userGtmData, event: 'userAuthenticated' });
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (!_.isEmpty(this.props?.Global?.orgID)) {
|
|
76
|
+
gtm.push({ orgId: this.props.Global.orgID });
|
|
77
|
+
}
|
|
78
|
+
if (this.props.Global.isLoggedIn) {
|
|
79
|
+
if (this.props.Global.user && Object.keys(this.props.Global.user).length) {
|
|
80
|
+
this.props.appActions.getSidebar();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
componentDidMount() {
|
|
86
|
+
const user = localStorage.getItem('user');
|
|
87
|
+
let locale = 'en';
|
|
88
|
+
if (user) {
|
|
89
|
+
locale = JSON.parse(user).lang;
|
|
90
|
+
}
|
|
91
|
+
locale = this.getMappedLocale(locale);
|
|
92
|
+
//locale = 'zh';
|
|
93
|
+
moment.locale(locale);
|
|
94
|
+
this.props.locationActions.changeLocale(locale);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
componentWillReceiveProps(nextProps) {
|
|
99
|
+
const user = this.props.Global.user;
|
|
100
|
+
const nextPropsUser = nextProps.Global.user;
|
|
101
|
+
if (!nextProps.Global.settingProxyOrg && nextProps.Global.changeProxyOrgSuccess &&
|
|
102
|
+
!_.isEqual(nextProps.Global.changeProxyOrgSuccess, this.props.Global.changeProxyOrgSuccess) && !this.state.switchedOrg) {
|
|
103
|
+
this.navigateToDashboard();
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const callBack = nextProps?.routeParams?.callbackUrl ? decodeURIComponent(nextProps?.routeParams?.callbackUrl) : "";
|
|
107
|
+
if (nextProps.Global.error) {
|
|
108
|
+
const locationValue = `${window.location.origin}${callBack}?flash=${nextProps.Global.error}`;
|
|
109
|
+
window.location.replace(locationValue);
|
|
110
|
+
window.location.reload();
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (nextPropsUser && user && nextProps.Global.isLoggedIn && nextProps.Global.isLoggedIn !== this.props.Global.isLoggedIn) {
|
|
114
|
+
this.props.appActions.getSidebar();
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (nextProps.Global.user && this.props.Global.user && (nextProps.Global.user.refID !== this.props.Global.user.refID)) {
|
|
118
|
+
const userGtmData = this.getUserGtmData(nextProps);
|
|
119
|
+
if (userGtmData?.userId) {
|
|
120
|
+
gtm.push({ ...userGtmData, event: 'userAuthenticated' });
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (nextProps.Global.isLoggedIn && nextProps.Global.isLoggedIn !== this.props.Global.isLoggedIn) {
|
|
125
|
+
if (nextProps.Global.orgID !== undefined && !_.isEqual(nextProps.Global.orgID, this.props.Global.orgID)) {
|
|
126
|
+
const userGtmData = this.getUserGtmData(nextProps);
|
|
127
|
+
if (userGtmData?.userId) {
|
|
128
|
+
gtm.push({ ...userGtmData, event: 'userAuthenticated' });
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
componentWillUnmount() {
|
|
135
|
+
this.setState({ switchedOrg: false });
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// getSideBarData(reportData) {
|
|
139
|
+
// const tmpMenuData = [];
|
|
140
|
+
// const categoryId = reportData.categories ? Object.keys(reportData.categories) : [];
|
|
141
|
+
// _.forEach(categoryId, (id) => {
|
|
142
|
+
// const groupReport = {
|
|
143
|
+
// group: reportData.categories[id].name,
|
|
144
|
+
// items: [],
|
|
145
|
+
// };
|
|
146
|
+
// _.forEach(reportData.reportList, (report, reportId) => {
|
|
147
|
+
// if (report.category === id) {
|
|
148
|
+
// groupReport.items.push({
|
|
149
|
+
// link: `/report/${reportId}`,
|
|
150
|
+
// text: report.name,
|
|
151
|
+
// });
|
|
152
|
+
// }
|
|
153
|
+
// });
|
|
154
|
+
// tmpMenuData.push(groupReport);
|
|
155
|
+
// });
|
|
156
|
+
// const menuLibrary = {
|
|
157
|
+
// group: 'Library',
|
|
158
|
+
// items: [
|
|
159
|
+
// {
|
|
160
|
+
// link: '/library/charts',
|
|
161
|
+
// text: 'Charts',
|
|
162
|
+
// },
|
|
163
|
+
// {
|
|
164
|
+
// link: '/library/dimension',
|
|
165
|
+
// text: 'Dimensions',
|
|
166
|
+
// },
|
|
167
|
+
// ],
|
|
168
|
+
// };
|
|
169
|
+
// tmpMenuData.push(menuLibrary);
|
|
170
|
+
// this.setState({ menuData: tmpMenuData });
|
|
171
|
+
// }
|
|
172
|
+
|
|
173
|
+
getUserGtmData = (props) => {
|
|
174
|
+
const { user: userData } = props.Global;
|
|
175
|
+
const userName = userData.attributes.USERNAME;
|
|
176
|
+
const userEmail = userData.attributes.EMAIL;
|
|
177
|
+
const orgObj = _.find(userData?.proxyOrgList, { orgID: props?.Global?.orgID });
|
|
178
|
+
const gtmData = {
|
|
179
|
+
orgId: props.Global.orgID,
|
|
180
|
+
orgName: orgObj && orgObj.orgName,
|
|
181
|
+
userId: userData.refID,
|
|
182
|
+
userName: userName && userName.value,
|
|
183
|
+
userEmail: userEmail && userEmail.value,
|
|
184
|
+
isCapUser: userData.isCapUser,
|
|
185
|
+
};
|
|
186
|
+
return gtmData;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
getMappedLocale(locale) {
|
|
190
|
+
const map = {
|
|
191
|
+
'en': 'en-US',
|
|
192
|
+
'zh-cn': 'zh',
|
|
193
|
+
'en-US': 'en-US',
|
|
194
|
+
'zh': 'zh',
|
|
195
|
+
};
|
|
196
|
+
return map[locale];
|
|
197
|
+
}
|
|
198
|
+
handleRemoveMessage(messageIndex) {
|
|
199
|
+
this.props.actions.removeMessageFromQueue(messageIndex);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
navigateToDashboard() {
|
|
203
|
+
const dashboardUrl = process.env.NODE_ENV === 'production' ? config.production.dashboard_url : config.development.dashboard_url;
|
|
204
|
+
this.props.router.push({ pathname: dashboardUrl, state: {} });
|
|
205
|
+
this.props.router.go();
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
logout() {
|
|
209
|
+
this.props.actions.logout();
|
|
210
|
+
}
|
|
211
|
+
changeOrg(orgId) {
|
|
212
|
+
this.props.actions.changeOrg(orgId);
|
|
213
|
+
//this.navigateToDashboard();
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
render() {
|
|
217
|
+
const userData = this.props.Global;
|
|
218
|
+
const { pathname, search, hash } = this.props.location;
|
|
219
|
+
const fullURL = `${window.location.origin}${pathname}${search}${hash}`;
|
|
220
|
+
const url = new URL(fullURL);
|
|
221
|
+
const params = new URLSearchParams(url.search);
|
|
222
|
+
// Extract parameters
|
|
223
|
+
const type = params.get("type");
|
|
224
|
+
// const changeOrg = this.props.actions.changeOrg;
|
|
225
|
+
// const logout = this.props.actions.logout;
|
|
226
|
+
const proxyOrgList = [];
|
|
227
|
+
let defaultOrgName = '';
|
|
228
|
+
let defaultOrgId = '';
|
|
229
|
+
let userName = '';
|
|
230
|
+
const { navigateToDashboard } = this;
|
|
231
|
+
if (userData && userData.user && userData.user !== '') {
|
|
232
|
+
defaultOrgName = userData.user.orgName;
|
|
233
|
+
defaultOrgId = userData.user.orgID;
|
|
234
|
+
proxyOrgList.push({ text: defaultOrgName, value: defaultOrgId });
|
|
235
|
+
const orgList = userData.user.proxyOrgList;
|
|
236
|
+
if (!_.isEmpty(orgList)) {
|
|
237
|
+
_.forEach(orgList, (item) => {
|
|
238
|
+
const id = item.orgID;
|
|
239
|
+
const name = item.orgName;
|
|
240
|
+
proxyOrgList.push({ key: id, text: name, value: id });
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
userName = userData.user.firstName;
|
|
244
|
+
}
|
|
245
|
+
const actionComponents = "";
|
|
246
|
+
const toastMessages = this.props.Global.messages;
|
|
247
|
+
const loggedIn = this.props.Global.isLoggedIn;
|
|
248
|
+
const menuData = [
|
|
249
|
+
{
|
|
250
|
+
group: this.props.intl.formatMessage(messages.creativesDashboard),
|
|
251
|
+
items: [
|
|
252
|
+
{
|
|
253
|
+
link: '/sms',
|
|
254
|
+
text: this.props.intl.formatMessage(messages.sms),
|
|
255
|
+
value: 'SMS',
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
link: '/wechat',
|
|
259
|
+
text: this.props.intl.formatMessage(messages.wechat),
|
|
260
|
+
value: 'WECHAT',
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
link: '/mobilepush',
|
|
264
|
+
text: this.props.intl.formatMessage(messages.mobilepush),
|
|
265
|
+
value: 'MOBILEPUSH',
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
link: '/assets',
|
|
269
|
+
text: this.props.intl.formatMessage(messages.gallery),
|
|
270
|
+
value: 'GALLERY',
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
link: '/email',
|
|
274
|
+
text: this.props.intl.formatMessage(messages.email),
|
|
275
|
+
value: 'EMAIL',
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
link: '/ebill',
|
|
279
|
+
text: this.props.intl.formatMessage(messages.ebill),
|
|
280
|
+
value: 'EBILL',
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
link: '/line',
|
|
284
|
+
text: this.props.intl.formatMessage(messages.line),
|
|
285
|
+
value: 'LINE',
|
|
286
|
+
},
|
|
287
|
+
],
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
group: this.props.intl.formatMessage(messages.campaignsDashboard),
|
|
291
|
+
items: [
|
|
292
|
+
{
|
|
293
|
+
link: '/campaign/index',
|
|
294
|
+
text: this.props.intl.formatMessage(messages.campaignsHome),
|
|
295
|
+
value: 'Campaigns Home',
|
|
296
|
+
external: true,
|
|
297
|
+
},
|
|
298
|
+
],
|
|
299
|
+
},
|
|
300
|
+
];
|
|
301
|
+
const { isCreativesAccessible } = this.state;
|
|
302
|
+
return (
|
|
303
|
+
<CapWrapper>
|
|
304
|
+
{this.props?.loader?.localeLoading || this.props?.Global?.fetching_userdata ?
|
|
305
|
+
<div className="cap-loader-box">
|
|
306
|
+
<img
|
|
307
|
+
className="loader-image"
|
|
308
|
+
src="https://s3.amazonaws.com/fileservice.in/intouch_creative_assets/88561f46de9407021cad.gif"
|
|
309
|
+
alt="Capillary" />
|
|
310
|
+
</div> : <>
|
|
311
|
+
|
|
312
|
+
<Helmet
|
|
313
|
+
titleTemplate="Capillary - %s"
|
|
314
|
+
defaultTitle={this.props.intl.formatMessage(messages.appName)}
|
|
315
|
+
meta={[
|
|
316
|
+
{ name: 'description', content: this.props.intl.formatMessage(messages.appName) },
|
|
317
|
+
]}
|
|
318
|
+
/>
|
|
319
|
+
<div className="wrapper">
|
|
320
|
+
{loggedIn && type !== EMBEDDED ?
|
|
321
|
+
<TopBar
|
|
322
|
+
proxyOrgList={proxyOrgList}
|
|
323
|
+
userName={userName}
|
|
324
|
+
orgName={defaultOrgName}
|
|
325
|
+
orgID={defaultOrgId}
|
|
326
|
+
changeOrg={this.changeOrg}
|
|
327
|
+
navigateToDashboard={navigateToDashboard}
|
|
328
|
+
logout={this.logout}
|
|
329
|
+
/> : ''}
|
|
330
|
+
<div className="main">
|
|
331
|
+
{isCreativesAccessible && loggedIn && type !== 'embedded' && this.props.location.pathname.indexOf('v2') === -1 ? <div id="cap-sidebar" className={'sidebar'}>
|
|
332
|
+
<Sidebar
|
|
333
|
+
menuData={menuData}
|
|
334
|
+
actionComponents={actionComponents}
|
|
335
|
+
router={this.props.router}
|
|
336
|
+
/>
|
|
337
|
+
</div> : ''}
|
|
338
|
+
<div className="main-content">
|
|
339
|
+
{!isCreativesAccessible ? <AccessForbidden /> : (
|
|
340
|
+
<Switch>
|
|
341
|
+
{componentRoutes.map(routeProps => (
|
|
342
|
+
<RenderRoute
|
|
343
|
+
{...routeProps}
|
|
344
|
+
key={routeProps.path}
|
|
345
|
+
isLoggedIn={loggedIn}
|
|
346
|
+
/>
|
|
347
|
+
))}
|
|
348
|
+
</Switch>
|
|
349
|
+
)}
|
|
350
|
+
</div>
|
|
351
|
+
</div>
|
|
352
|
+
</div>
|
|
353
|
+
{(toastMessages && toastMessages.length > 0) ?
|
|
354
|
+
<Toastr timeout={4000} messagesList={toastMessages} position="top-right" handleRemoveMessage={this.handleRemoveMessage} />
|
|
355
|
+
: ''}
|
|
356
|
+
</>}
|
|
357
|
+
</CapWrapper>
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
Cap.propTypes = {
|
|
363
|
+
children: PropTypes.node,
|
|
364
|
+
actions: PropTypes.object.isRequired,
|
|
365
|
+
Global: PropTypes.object,
|
|
366
|
+
router: PropTypes.object,
|
|
367
|
+
appActions: PropTypes.object,
|
|
368
|
+
locationActions: PropTypes.object,
|
|
369
|
+
location: PropTypes.object,
|
|
370
|
+
intl: intlShape.isRequired,
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
const mapStateToProps = createStructuredSelector({
|
|
374
|
+
Global: makeSelectAuthenticated(),
|
|
375
|
+
User: makeSelectUser(),
|
|
376
|
+
loader: makeSelectLocale(),
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
function mapDispatchToProps(dispatch) {
|
|
380
|
+
return {
|
|
381
|
+
actions: bindActionCreators(actions, dispatch),
|
|
382
|
+
appActions: bindActionCreators(appActions, dispatch),
|
|
383
|
+
locationActions: bindActionCreators(locationActions, dispatch),
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
const withConnect = connect(
|
|
388
|
+
mapStateToProps,
|
|
389
|
+
mapDispatchToProps,
|
|
390
|
+
);
|
|
391
|
+
|
|
392
|
+
const withAppSaga = injectSaga({ key: 'app', saga: appSaga });
|
|
393
|
+
const withCapSaga = injectSaga({ key: 'cap', saga: capSaga });
|
|
394
|
+
const withReducer = injectReducer({ key: 'cap', reducer });
|
|
395
|
+
|
|
396
|
+
export default compose(
|
|
397
|
+
withRouter,
|
|
398
|
+
withReducer,
|
|
399
|
+
withAppSaga,
|
|
400
|
+
withCapSaga,
|
|
401
|
+
withConnect,
|
|
402
|
+
)(injectIntl(Cap));
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl';
|
|
2
|
+
export default defineMessages({
|
|
3
|
+
"sms": {
|
|
4
|
+
id: 'reon.components.Cap.sms',
|
|
5
|
+
defaultMessage: 'SMS',
|
|
6
|
+
},
|
|
7
|
+
"wechat": {
|
|
8
|
+
id: 'reon.components.Cap.wechat',
|
|
9
|
+
defaultMessage: 'WeChat',
|
|
10
|
+
},
|
|
11
|
+
"gallery": {
|
|
12
|
+
id: 'reon.components.Cap.gallery',
|
|
13
|
+
defaultMessage: 'Gallery',
|
|
14
|
+
},
|
|
15
|
+
"creativesDashboard": {
|
|
16
|
+
id: 'reon.components.Cap.creativesDashboard',
|
|
17
|
+
defaultMessage: 'Creatives',
|
|
18
|
+
},
|
|
19
|
+
"creatives": {
|
|
20
|
+
id: 'reon.components.Cap.creatives',
|
|
21
|
+
defaultMessage: 'Creatives',
|
|
22
|
+
},
|
|
23
|
+
"campaigns": {
|
|
24
|
+
id: 'reon.components.Cap.campaigns',
|
|
25
|
+
defaultMessage: 'Campaigns',
|
|
26
|
+
},
|
|
27
|
+
"loyalty": {
|
|
28
|
+
id: 'reon.components.Cap.loyalty',
|
|
29
|
+
defaultMessage: 'Loyalty',
|
|
30
|
+
},
|
|
31
|
+
"member care": {
|
|
32
|
+
id: 'reon.components.Cap.memberCare',
|
|
33
|
+
defaultMessage: 'Member Care',
|
|
34
|
+
},
|
|
35
|
+
"workbench": {
|
|
36
|
+
id: 'reon.components.Cap.Workbench',
|
|
37
|
+
defaultMessage: 'WorkBench',
|
|
38
|
+
},
|
|
39
|
+
"store care": {
|
|
40
|
+
id: 'reon.components.Cap.storeCare',
|
|
41
|
+
defaultMessage: 'Store Care',
|
|
42
|
+
},
|
|
43
|
+
"store performance": {
|
|
44
|
+
id: 'reon.components.Cap.storePerformance',
|
|
45
|
+
defaultMessage: 'Store Performance',
|
|
46
|
+
},
|
|
47
|
+
"email": {
|
|
48
|
+
id: 'reon.components.Cap.email',
|
|
49
|
+
defaultMessage: 'Email',
|
|
50
|
+
},
|
|
51
|
+
"ebill": {
|
|
52
|
+
id: 'reon.components.Cap.ebill',
|
|
53
|
+
defaultMessage: 'Ebill',
|
|
54
|
+
},
|
|
55
|
+
"campaignsDashboard": {
|
|
56
|
+
id: 'reon.components.campaignsDashboard',
|
|
57
|
+
defaultMessage: 'Campaigns',
|
|
58
|
+
},
|
|
59
|
+
"campaignsHome": {
|
|
60
|
+
id: 'reon.components.campaignsHome',
|
|
61
|
+
defaultMessage: "Campaigns Home",
|
|
62
|
+
},
|
|
63
|
+
"line": {
|
|
64
|
+
id: 'reon.components.Cap.line',
|
|
65
|
+
defaultMessage: 'Line',
|
|
66
|
+
},
|
|
67
|
+
"mobilepush": {
|
|
68
|
+
id: 'reon.components.Cap.mobilepush',
|
|
69
|
+
defaultMessage: 'Mobile Push',
|
|
70
|
+
},
|
|
71
|
+
"appName": {
|
|
72
|
+
id: 'reon.components.Cap.appName',
|
|
73
|
+
defaultMessage: 'App Name',
|
|
74
|
+
},
|
|
75
|
+
});
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Created by vivek on 22/5/17.
|
|
3
|
+
*/
|
|
4
|
+
import { fromJS } from 'immutable';
|
|
5
|
+
import _ from 'lodash';
|
|
6
|
+
import * as types from './constants';
|
|
7
|
+
import initialState from '../../initialState';
|
|
8
|
+
|
|
9
|
+
function capReducer(state = fromJS(initialState), action) {
|
|
10
|
+
switch (action.type) {
|
|
11
|
+
case types.LOGIN_REQUEST:
|
|
12
|
+
return state.set('login_progress', true);
|
|
13
|
+
case types.LOGIN_SUCCESS:
|
|
14
|
+
return state
|
|
15
|
+
.set('login_progress', false)
|
|
16
|
+
.set('token', action.res.token)
|
|
17
|
+
.set('user', fromJS(action.res.user))
|
|
18
|
+
.set('message', '')
|
|
19
|
+
.set('authenticated', true)
|
|
20
|
+
.set('isLoggedIn', true);
|
|
21
|
+
case types.LOGIN_FAILURE:
|
|
22
|
+
return state
|
|
23
|
+
.set('login_progress', false)
|
|
24
|
+
.set('message', action.error.message);
|
|
25
|
+
case types.LOGOUT_REQUEST:
|
|
26
|
+
return state.set('login_progress', false);
|
|
27
|
+
case types.LOGOUT_SUCCESS:
|
|
28
|
+
return state;
|
|
29
|
+
case types.LOGOUT_FAILURE:
|
|
30
|
+
return state;
|
|
31
|
+
case types.SWITCH_ORG_REQUEST:
|
|
32
|
+
return state
|
|
33
|
+
.set('settingProxyOrg', true)
|
|
34
|
+
.set('changeProxyOrgSuccess', false);
|
|
35
|
+
case types.SWITCH_ORG_SUCCESS:
|
|
36
|
+
return state
|
|
37
|
+
.set('orgID', action.orgID)
|
|
38
|
+
.set('settingProxyOrg', false)
|
|
39
|
+
.set('changeProxyOrgSuccess', action.isSuccess);
|
|
40
|
+
case types.SWITCH_ORG_FAILURE:
|
|
41
|
+
return state
|
|
42
|
+
.set('settingProxyOrg', false)
|
|
43
|
+
.set('changeProxyOrgSuccess', false);
|
|
44
|
+
case types.ADD_MESSAGE: {
|
|
45
|
+
const message = {
|
|
46
|
+
messageId: action.message.id,
|
|
47
|
+
title: action.message.title,
|
|
48
|
+
text: action.message.text,
|
|
49
|
+
type: action.message.type,
|
|
50
|
+
hideProgressBar: action.message.hideProgressBar,
|
|
51
|
+
};
|
|
52
|
+
return state
|
|
53
|
+
.set('messages', fromJS(state.get('messages').concat(message)));
|
|
54
|
+
}
|
|
55
|
+
case types.REMOVE_MESSAGE: {
|
|
56
|
+
const messageQueue = state.get('messages').toJS();
|
|
57
|
+
const messageIndex = _.findIndex(messageQueue, { messageId: action.messageIndex });
|
|
58
|
+
messageQueue.splice(messageIndex, 1);
|
|
59
|
+
return state
|
|
60
|
+
.set('messages', fromJS(messageQueue));
|
|
61
|
+
}
|
|
62
|
+
case types.GET_USER_DATA_REQUEST:
|
|
63
|
+
return state
|
|
64
|
+
.set('fetching_userdata', true)
|
|
65
|
+
.set('isLoggedIn', false);
|
|
66
|
+
case types.GET_USER_DATA_SUCCESS:
|
|
67
|
+
return state
|
|
68
|
+
.set('fetching_userdata', false)
|
|
69
|
+
.set('user', fromJS(action.userData))
|
|
70
|
+
.set('currentOrgDetails', fromJS(action.currentOrgDetails))
|
|
71
|
+
.set('isLoggedIn', true)
|
|
72
|
+
.set('orgID', action.currentOrgId);
|
|
73
|
+
case types.GET_USER_DATA_FAILURE:
|
|
74
|
+
return state
|
|
75
|
+
.set('fetching_userdata', false)
|
|
76
|
+
.set('isLoggedIn', false);
|
|
77
|
+
case types.GET_SCHEMA_FOR_ENTITY_REQUEST:
|
|
78
|
+
return state
|
|
79
|
+
.set('fetchingSchema', true);
|
|
80
|
+
case types.GET_SCHEMA_FOR_ENTITY_FAILURE:
|
|
81
|
+
return state
|
|
82
|
+
.set('fetchingSchema', false);
|
|
83
|
+
case types.GET_SCHEMA_FOR_ENTITY_SUCCESS: {
|
|
84
|
+
const stateMeta = state.get('metaEntities');
|
|
85
|
+
|
|
86
|
+
return state
|
|
87
|
+
.set('fetchingSchema', false)
|
|
88
|
+
.set('metaEntities', {
|
|
89
|
+
layouts: action.data && action.entityType === 'LAYOUT' ? action.data.metaEntities : stateMeta.layouts,
|
|
90
|
+
tags: action.data && action.entityType === 'TAG' ? action.data.metaEntities : stateMeta.tags,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
case types.ROMOVE_ENTITY_SCHEMA:
|
|
94
|
+
return state.set('metaEntities', {});
|
|
95
|
+
case types.CLEAR_META_ENTITIES:
|
|
96
|
+
return state.set('metaEntities', {
|
|
97
|
+
layouts: [],
|
|
98
|
+
tags: [],
|
|
99
|
+
});
|
|
100
|
+
// eslint-disable-next-line no-case-declarations
|
|
101
|
+
case types.HIDE_TAGS:
|
|
102
|
+
const metaEntities = {tags: {}, layouts: state.get('metaEntities').layouts};
|
|
103
|
+
metaEntities.tags.standard = _.filter(state.get('metaEntities').tags.standard, (tag) => action.tagList.indexOf(tag.definition.value) === -1);
|
|
104
|
+
metaEntities.tags.custom = _.filter(state.get('metaEntities').tags.custom, (tag) => action.tagList.indexOf(tag.name) === -1);
|
|
105
|
+
return state.setIn(['metaEntities'], metaEntities);
|
|
106
|
+
case types.SET_INJECTED_TAGS:
|
|
107
|
+
return state.set('injectedTags', action.injectedTags);
|
|
108
|
+
default:
|
|
109
|
+
return state;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export default capReducer;
|