@capillarytech/creatives-library 8.0.136 → 8.0.137-alpha.0
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/constants/unified.js +189 -0
- package/package.json +1 -1
- package/services/getSchema.js +1 -1
- package/services/localStorageApi.js +1 -0
- package/tests/i18n.test.js +1 -1
- package/utils/common.js +2 -2
- 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 +1 -1
- package/v2Components/CapTagList/index.js +9 -14
- 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 +2 -1
- 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 +1 -1
- package/v2Containers/MobilePushNew/components/MediaUploaders.js +0 -1
- package/v2Containers/MobilePushNew/components/tests/MediaUploaders.test.js +271 -0
- package/v2Containers/MobilePushNew/components/tests/PlatformContentFields.test.js +189 -0
- package/v2Containers/MobilePushNew/index.scss +0 -7
- 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/components/BreadCrumbs/index.js +0 -65
- package/components/BreadCrumbs/messages.js +0 -13
- package/components/CapTagList/index.js +0 -235
- package/components/CapTagList/messages.js +0 -45
- package/components/Card/_customCard.scss +0 -40
- package/components/Card/index.js +0 -78
- package/components/Card/tests/__snapshots__/index.test.js.snap +0 -22
- package/components/Card/tests/index.test.js +0 -20
- package/components/CardGrid/index.js +0 -71
- package/components/Ckeditor/index.js +0 -238
- package/components/Ckeditor/messages.js +0 -13
- package/components/Ckeditor/style.scss +0 -3
- package/components/Component/index.js +0 -29
- package/components/CustomPopOver/index.js +0 -81
- package/components/CustomPopOver/messages.js +0 -17
- package/components/DateFilter/index.js +0 -349
- package/components/DateFilter/messages.js +0 -57
- package/components/DateRange/index.js +0 -114
- package/components/DateRange/messages.js +0 -25
- package/components/Edmeditor/index.js +0 -65
- package/components/Edmeditor/messages.js +0 -13
- package/components/EmailPreview/_emailPreview.scss +0 -119
- package/components/EmailPreview/assets/images/iPad.svg +0 -10
- package/components/EmailPreview/assets/images/mobile.png +0 -0
- package/components/EmailPreview/index.js +0 -107
- package/components/EmailPreview/messages.js +0 -33
- package/components/Footer/index.js +0 -27
- package/components/Footer/messages.js +0 -13
- package/components/FormBuilder/_formBuilder.scss +0 -83
- package/components/FormBuilder/index.js +0 -3279
- package/components/FormBuilder/messages.js +0 -61
- package/components/Header/index.js +0 -44
- package/components/Header/messages.js +0 -29
- package/components/ImagePreview/_imagePreview.scss +0 -63
- package/components/ImagePreview/index.js +0 -52
- package/components/ImagePreview/messages.js +0 -17
- package/components/PageHeader/_pageHeader.scss +0 -22
- package/components/PageHeader/index.js +0 -37
- package/components/PageHeader/messages.js +0 -13
- package/components/Pagination/_pagination.scss +0 -5
- package/components/Pagination/index.js +0 -49
- package/components/PreviewSideBar/_previewsidebar.scss +0 -28
- package/components/PreviewSideBar/index.js +0 -152
- package/components/PreviewSideBar/messages.js +0 -41
- package/components/Sidebar/_sidebar.scss +0 -115
- package/components/Sidebar/index.js +0 -214
- package/components/Sidebar/messages.js +0 -21
- package/components/SlideBox/_slideBox.scss +0 -63
- package/components/SlideBox/index.js +0 -47
- package/components/SlideBox/tests/index.test.js +0 -103
- package/components/SmsEditor/index.js +0 -55
- package/components/SmsTest/index.js +0 -117
- package/components/SmsTest/messages.js +0 -21
- package/components/TemplatePreview/WechatRichmediaTemplatePreview/_wechatRichmediaTemplatePrev.scss +0 -42
- package/components/TemplatePreview/WechatRichmediaTemplatePreview/index.js +0 -141
- package/components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +0 -21
- package/components/TemplatePreview/_templatePreview.scss +0 -642
- package/components/TemplatePreview/assets/images/WECHAT_5x.png +0 -0
- package/components/TemplatePreview/assets/images/androidPushMessage.svg +0 -45
- package/components/TemplatePreview/assets/images/home-screen-android.svg +0 -21
- package/components/TemplatePreview/assets/images/home-screen-ios.svg +0 -16
- package/components/TemplatePreview/assets/images/iPhonePushMessage.svg +0 -135
- package/components/TemplatePreview/assets/images/mobile.svg +0 -24
- 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 +0 -22
- package/components/TemplatePreview/assets/images/sms_mobile_ios.svg +0 -16
- package/components/TemplatePreview/assets/images/user-icon.svg +0 -19
- package/components/TemplatePreview/assets/images/wechat-mobile.svg +0 -78
- package/components/TemplatePreview/assets/images/wechat_mobile_android.svg +0 -20
- package/components/TemplatePreview/index.js +0 -617
- package/components/TemplatePreview/messages.js +0 -78
- package/components/Toastr/index.js +0 -60
- package/components/Toastr/messages.js +0 -13
- package/components/ToastrMessage/index.js +0 -113
- package/components/ToastrMessage/messages.js +0 -17
- package/components/TopBar/_topbar.scss +0 -46
- 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 +0 -113
- package/components/TopBar/messages.js +0 -29
- package/containers/App/actions.js +0 -7
- package/containers/App/constants.js +0 -114
- package/containers/App/index.js +0 -52
- package/containers/App/reducer.js +0 -19
- package/containers/App/sagas.js +0 -31
- package/containers/App/selectors.js +0 -25
- package/containers/App/test/saga.test.js +0 -11
- package/containers/Assets/Gallery/_gallery.scss +0 -126
- package/containers/Assets/Gallery/actions.js +0 -37
- package/containers/Assets/Gallery/constants.js +0 -23
- package/containers/Assets/Gallery/index.js +0 -473
- package/containers/Assets/Gallery/messages.js +0 -93
- package/containers/Assets/Gallery/reducer.js +0 -81
- package/containers/Assets/Gallery/sagas.js +0 -80
- package/containers/Assets/Gallery/selectors.js +0 -25
- package/containers/Assets/Gallery/tests/__snapshots__/reducer.test.js.snap +0 -9
- package/containers/Assets/Gallery/tests/actions.test.js +0 -25
- package/containers/Assets/Gallery/tests/reducer.test.js +0 -96
- package/containers/Assets/Gallery/tests/saga.test.js +0 -157
- package/containers/Cap/actions.js +0 -66
- package/containers/Cap/constants.js +0 -25
- package/containers/Cap/index.js +0 -402
- package/containers/Cap/messages.js +0 -75
- package/containers/Cap/reducer.js +0 -113
- package/containers/Cap/sagas.js +0 -159
- package/containers/Cap/selectors.js +0 -75
- package/containers/Cap/tests/__snapshots__/index.test.js.snap +0 -2269
- package/containers/Cap/tests/index.test.js +0 -22
- package/containers/Cap/tests/saga.test.js +0 -284
- package/containers/Dashboard/actions.js +0 -15
- package/containers/Dashboard/constants.js +0 -7
- package/containers/Dashboard/index.js +0 -76
- package/containers/Dashboard/messages.js +0 -13
- package/containers/Dashboard/reducer.js +0 -21
- package/containers/Dashboard/sagas.js +0 -17
- package/containers/Dashboard/selectors.js +0 -25
- package/containers/Dashboard/test/saga.test.js +0 -9
- package/containers/Ebill/_ebill.scss +0 -5
- package/containers/Ebill/actions.js +0 -43
- package/containers/Ebill/constants.js +0 -20
- package/containers/Ebill/index.js +0 -1278
- package/containers/Ebill/messages.js +0 -77
- package/containers/Ebill/reducer.js +0 -72
- package/containers/Ebill/sagas.js +0 -74
- package/containers/Ebill/selectors.js +0 -25
- package/containers/Ebill/test/saga.test.js +0 -11
- package/containers/Email/_email.scss +0 -141
- package/containers/Email/actions.js +0 -81
- package/containers/Email/constants.js +0 -36
- package/containers/Email/index.js +0 -3325
- package/containers/Email/messages.js +0 -289
- package/containers/Email/reducer.js +0 -142
- package/containers/Email/sagas.js +0 -135
- package/containers/Email/selectors.js +0 -31
- package/containers/Email/test/saga.test.js +0 -671
- package/containers/LanguageProvider/actions.js +0 -17
- package/containers/LanguageProvider/constants.js +0 -8
- package/containers/LanguageProvider/index.js +0 -80
- package/containers/LanguageProvider/reducer.js +0 -30
- package/containers/LanguageProvider/selectors.js +0 -20
- package/containers/LanguageProvider/tests/actions.test.js +0 -19
- package/containers/LanguageProvider/tests/index.test.js +0 -78
- package/containers/LanguageProvider/tests/reducer.test.js +0 -20
- package/containers/LanguageProvider/tests/selectors.test.js +0 -15
- package/containers/Line/Create/_lineCreate.scss +0 -54
- package/containers/Line/Create/actions.js +0 -90
- package/containers/Line/Create/constants.js +0 -39
- package/containers/Line/Create/index.js +0 -836
- package/containers/Line/Create/messages.js +0 -189
- package/containers/Line/Create/reducer.js +0 -99
- package/containers/Line/Create/sagas.js +0 -121
- package/containers/Line/Create/selectors.js +0 -36
- package/containers/Line/Create/tests/saga.test.js +0 -202
- package/containers/Line/Edit/_lineEdit.scss +0 -35
- package/containers/Line/Edit/actions.js +0 -79
- package/containers/Line/Edit/constants.js +0 -27
- package/containers/Line/Edit/index.js +0 -1050
- package/containers/Line/Edit/messages.js +0 -177
- package/containers/Line/Edit/reducer.js +0 -83
- package/containers/Line/Edit/sagas.js +0 -80
- package/containers/Line/Edit/selectors.js +0 -29
- package/containers/Line/Edit/test/saga.test.js +0 -160
- package/containers/Login/assets/images/capillary_logo.png +0 -0
- package/containers/Login/components/LoginForm/index.js +0 -62
- package/containers/Login/components/LoginForm/messages.js +0 -33
- package/containers/Login/index.js +0 -130
- package/containers/Login/messages.js +0 -25
- package/containers/Login/selectors.js +0 -25
- package/containers/MobilePush/Create/_mobilePushCreate.scss +0 -39
- package/containers/MobilePush/Create/actions.js +0 -46
- package/containers/MobilePush/Create/constants.js +0 -23
- package/containers/MobilePush/Create/index.js +0 -2303
- package/containers/MobilePush/Create/messages.js +0 -269
- package/containers/MobilePush/Create/reducer.js +0 -70
- package/containers/MobilePush/Create/sagas.js +0 -74
- package/containers/MobilePush/Create/selectors.js +0 -28
- package/containers/MobilePush/Create/test/saga.test.js +0 -19
- package/containers/MobilePush/Edit/_mobilePushCreate.scss +0 -39
- package/containers/MobilePush/Edit/actions.js +0 -91
- package/containers/MobilePush/Edit/constants.js +0 -35
- package/containers/MobilePush/Edit/index.js +0 -2601
- package/containers/MobilePush/Edit/messages.js +0 -266
- package/containers/MobilePush/Edit/reducer.js +0 -112
- package/containers/MobilePush/Edit/sagas.js +0 -126
- package/containers/MobilePush/Edit/selectors.js +0 -29
- package/containers/MobilePush/Edit/tests/saga.test.js +0 -255
- package/containers/NotFoundPage/index.js +0 -25
- package/containers/NotFoundPage/messages.js +0 -13
- package/containers/NotFoundPage/tests/index.test.js +0 -17
- package/containers/Sms/Create/_smsCreate.scss +0 -42
- package/containers/Sms/Create/actions.js +0 -27
- package/containers/Sms/Create/constants.js +0 -16
- package/containers/Sms/Create/index.js +0 -1488
- package/containers/Sms/Create/messages.js +0 -109
- package/containers/Sms/Create/reducer.js +0 -41
- package/containers/Sms/Create/sagas.js +0 -40
- package/containers/Sms/Create/selectors.js +0 -28
- package/containers/Sms/Create/test/saga.test.js +0 -11
- package/containers/Sms/Edit/actions.js +0 -40
- package/containers/Sms/Edit/constants.js +0 -17
- package/containers/Sms/Edit/index.js +0 -1472
- package/containers/Sms/Edit/messages.js +0 -105
- package/containers/Sms/Edit/reducer.js +0 -50
- package/containers/Sms/Edit/sagas.js +0 -60
- package/containers/Sms/Edit/selectors.js +0 -32
- package/containers/Sms/Edit/test/saga.test.js +0 -13
- package/containers/TagList/_tagList.scss +0 -8
- package/containers/TagList/actions.js +0 -15
- package/containers/TagList/constants.js +0 -32
- package/containers/TagList/index.js +0 -236
- package/containers/TagList/messages.js +0 -13
- package/containers/TagList/reducer.js +0 -23
- package/containers/TagList/sagas.js +0 -11
- package/containers/TagList/selectors.js +0 -25
- package/containers/Templates/_templates.scss +0 -333
- package/containers/Templates/actions.js +0 -103
- package/containers/Templates/constants.js +0 -60
- package/containers/Templates/index.js +0 -1756
- package/containers/Templates/messages.js +0 -337
- package/containers/Templates/reducer.js +0 -142
- package/containers/Templates/sagas.js +0 -163
- package/containers/Templates/selectors.js +0 -28
- package/containers/Templates/test/saga.test.js +0 -241
- package/containers/WeChat/MapTemplates/_mapTemplates.scss +0 -8
- package/containers/WeChat/MapTemplates/actions.js +0 -52
- package/containers/WeChat/MapTemplates/constants.js +0 -28
- package/containers/WeChat/MapTemplates/index.js +0 -1610
- package/containers/WeChat/MapTemplates/messages.js +0 -157
- package/containers/WeChat/MapTemplates/reducer.js +0 -74
- package/containers/WeChat/MapTemplates/sagas.js +0 -84
- package/containers/WeChat/MapTemplates/selectors.js +0 -25
- package/containers/WeChat/MapTemplates/test/saga.test.js +0 -155
- package/containers/WeChat/RichmediaTemplates/Create/_createRichmedia.scss +0 -57
- package/containers/WeChat/RichmediaTemplates/Create/actions.js +0 -36
- package/containers/WeChat/RichmediaTemplates/Create/constants.js +0 -15
- package/containers/WeChat/RichmediaTemplates/Create/index.js +0 -1071
- package/containers/WeChat/RichmediaTemplates/Create/messages.js +0 -165
- package/containers/WeChat/RichmediaTemplates/Create/reducer.js +0 -60
- package/containers/WeChat/RichmediaTemplates/Create/richmediaschema.js +0 -497
- package/containers/WeChat/RichmediaTemplates/Create/sagas.js +0 -51
- package/containers/WeChat/RichmediaTemplates/Create/selectors.js +0 -37
- package/containers/WeChat/RichmediaTemplates/Create/test/saga.test.js +0 -13
- package/containers/WeChat/RichmediaTemplates/Edit/actions.js +0 -20
- package/containers/WeChat/RichmediaTemplates/Edit/constants.js +0 -10
- package/containers/WeChat/RichmediaTemplates/Edit/index.js +0 -136
- package/containers/WeChat/RichmediaTemplates/Edit/messages.js +0 -13
- package/containers/WeChat/RichmediaTemplates/Edit/reducer.js +0 -28
- package/containers/WeChat/RichmediaTemplates/Edit/sagas.js +0 -36
- package/containers/WeChat/RichmediaTemplates/Edit/selectors.js +0 -30
- package/containers/WeChat/RichmediaTemplates/Edit/test/saga.test.js +0 -12
- package/containers/WeChat/RichmediaTemplates/View/actions.js +0 -15
- package/containers/WeChat/RichmediaTemplates/View/constants.js +0 -7
- package/containers/WeChat/RichmediaTemplates/View/index.js +0 -47
- package/containers/WeChat/RichmediaTemplates/View/messages.js +0 -21
- package/containers/WeChat/RichmediaTemplates/View/reducer.js +0 -23
- package/containers/WeChat/RichmediaTemplates/View/sagas.js +0 -11
- package/containers/WeChat/RichmediaTemplates/View/selectors.js +0 -25
- package/utils/asyncInjectors.js +0 -78
- package/utils/callNativeEvent.js +0 -16
- package/utils/checkStore.js +0 -21
- package/utils/customAuthWrapper.js +0 -62
- package/utils/customConnectedAuthWrapper.js +0 -26
- package/utils/jed.js +0 -1497
- package/utils/smsCharCount.js +0 -351
package/containers/Cap/index.js
DELETED
|
@@ -1,402 +0,0 @@
|
|
|
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));
|
|
@@ -1,75 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,113 +0,0 @@
|
|
|
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;
|