@capillarytech/creatives-library 6.11.5 → 6.11.6
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/app.js +3 -3
- package/config/app.js +2 -2
- package/containers/Cap/sagas.js +2 -3
- package/package.json +1 -1
- package/translations/en.json +14 -15
- package/translations/zh.json +14 -15
- package/v2Containers/BeeEditor/index.js +1 -1
- package/v2Containers/Cap/actions.js +1 -1
- package/v2Containers/Cap/constants.js +3 -3
- package/v2Containers/Cap/reducer.js +3 -3
- package/v2Containers/Cap/sagas.js +8 -8
- package/v2Containers/LanguageProvider/index.js +1 -1
package/app.js
CHANGED
|
@@ -37,7 +37,7 @@ const history = syncHistoryWithStore(browserHistory, store, {
|
|
|
37
37
|
selectLocationState: makeSelectLocationState(),
|
|
38
38
|
});
|
|
39
39
|
|
|
40
|
-
const bugSnagErrorCallback = event => {
|
|
40
|
+
const bugSnagErrorCallback = (event) => {
|
|
41
41
|
let userId;
|
|
42
42
|
let userName;
|
|
43
43
|
let userEmail;
|
|
@@ -66,7 +66,7 @@ const bugSnagErrorCallback = event => {
|
|
|
66
66
|
event.addMetadata('org', {
|
|
67
67
|
name: orgName,
|
|
68
68
|
id: orgId,
|
|
69
|
-
})
|
|
69
|
+
});
|
|
70
70
|
event.setUser(userId, userEmail, userName);
|
|
71
71
|
};
|
|
72
72
|
|
|
@@ -87,7 +87,7 @@ export const BugsnagClient = Bugsnag;
|
|
|
87
87
|
const rootRoute = {
|
|
88
88
|
component: (props) => {
|
|
89
89
|
// eslint-disable-next-line react/prop-types
|
|
90
|
-
if (props.location.pathname === 'v2') {
|
|
90
|
+
if (props.location.pathname === 'v2' || props.location.pathname === 'v2/') {
|
|
91
91
|
return <CapV2 {...props} />;
|
|
92
92
|
}
|
|
93
93
|
return <Cap {...props} />;
|
package/config/app.js
CHANGED
|
@@ -7,7 +7,7 @@ const config = {
|
|
|
7
7
|
campaigns_api_endpoint: '/iris/v2/campaigns',
|
|
8
8
|
auth_endpoint: '/arya/api/v1/auth',
|
|
9
9
|
arya_endpoint: '/arya/api/v1',
|
|
10
|
-
login_url: 'auth/login',
|
|
10
|
+
login_url: '/auth/login',
|
|
11
11
|
dashboard_url: '/sms',
|
|
12
12
|
dashboard_url_v2: '/v2',
|
|
13
13
|
subscription_api_endpoint: '/arya/api/v1/org-settings/subscription',
|
|
@@ -19,7 +19,7 @@ const config = {
|
|
|
19
19
|
auth_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/auth',
|
|
20
20
|
arya_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1',
|
|
21
21
|
subscription_api_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/org-settings/subscription',
|
|
22
|
-
login_url: 'auth/login',
|
|
22
|
+
login_url: '/auth/login',
|
|
23
23
|
dashboard_url: '/sms',
|
|
24
24
|
dashboard_url_v2: '/v2',
|
|
25
25
|
},
|
package/containers/Cap/sagas.js
CHANGED
|
@@ -5,7 +5,6 @@ import * as Api from '../../services/api';
|
|
|
5
5
|
import * as LocalStorage from '../../services/localStorageApi';
|
|
6
6
|
import * as types from './constants';
|
|
7
7
|
import config from '../../config/app';
|
|
8
|
-
import pathConfig from '../../config/path';
|
|
9
8
|
// import {makeSelectOrgId} from './selectors';
|
|
10
9
|
|
|
11
10
|
function* authorize(user) {
|
|
@@ -56,13 +55,13 @@ function* logoutFlow() {
|
|
|
56
55
|
const serverLogout = yield call(Api.logout);
|
|
57
56
|
if (serverLogout.success && serverLogout.success === true) {
|
|
58
57
|
const loginUrl = (process.env.NODE_ENV === 'production') ?
|
|
59
|
-
`${
|
|
58
|
+
`${config.production.login_url}` : `${config.development.login_url}`;
|
|
60
59
|
yield [put({type: types.LOGOUT_SUCCESS})];
|
|
61
60
|
yield call(LocalStorage.clearItem, 'token');
|
|
62
61
|
yield call(LocalStorage.clearItem, 'orgID');
|
|
63
62
|
yield call(LocalStorage.clearItem, 'user');
|
|
64
63
|
yield call(LocalStorage.clearItem, 'isLoggedIn');
|
|
65
|
-
window.location.href = loginUrl
|
|
64
|
+
window.location.href = `${window.location.origin}${loginUrl}`;
|
|
66
65
|
}
|
|
67
66
|
} catch (error) {
|
|
68
67
|
yield put({ type: types.LOGOUT_FAILURE, error });
|
package/package.json
CHANGED
package/translations/en.json
CHANGED
|
@@ -86,21 +86,6 @@
|
|
|
86
86
|
"creatives.components.WechatRichmediaTemplatePreview.header": "This is the WechatRichmediaTemplatePreview component !",
|
|
87
87
|
"creatives.components.WechatRichmediaTemplatePreview.reply": "Reply",
|
|
88
88
|
"creatives.components.WechatRichmediaTemplatePreview.select": "Select",
|
|
89
|
-
"creatives.componentsV2.BeeEditor.addLabel": "Add label",
|
|
90
|
-
"creatives.componentsV2.BeeEditor.cancel": "Cancel",
|
|
91
|
-
"creatives.componentsV2.BeeEditor.cta": "CTA",
|
|
92
|
-
"creatives.componentsV2.BeeEditor.customRows": "Custom rows",
|
|
93
|
-
"creatives.componentsV2.BeeEditor.footer": "Footer",
|
|
94
|
-
"creatives.componentsV2.BeeEditor.header": "Header",
|
|
95
|
-
"creatives.componentsV2.BeeEditor.others": "Others",
|
|
96
|
-
"creatives.componentsV2.BeeEditor.rowName": "Row name",
|
|
97
|
-
"creatives.componentsV2.BeeEditor.rowPlaceHolder": "Enter Row name",
|
|
98
|
-
"creatives.componentsV2.BeeEditor.save": "Save",
|
|
99
|
-
"creatives.componentsV2.BeeEditor.select": "Select",
|
|
100
|
-
"creatives.componentsV2.BeeEditor.selectCategoyPlaceholder": "Select category",
|
|
101
|
-
"creatives.componentsV2.BeeEditor.socialPlatform": "Social platform",
|
|
102
|
-
"creatives.componentsV2.BeeEditor.tagPlaceHolder": "Enter tags",
|
|
103
|
-
"creatives.componentsV2.BeeEditor.tags": "Tags (optional)",
|
|
104
89
|
"creatives.componentsV2.BreadCrumbs.header": "This is the BreadCrumbs component !",
|
|
105
90
|
"creatives.componentsV2.CallTaskPreview.header": "This is the CallTaskPreview component !",
|
|
106
91
|
"creatives.componentsV2.CapTagList.Cancel": "Cancel",
|
|
@@ -793,6 +778,20 @@
|
|
|
793
778
|
"creatives.containersV2.Assets.Gallery.uploadedAt": "Uploaded at",
|
|
794
779
|
"creatives.containersV2.Assets.Gallery.uploadedBy": "Uploaded by",
|
|
795
780
|
"creatives.containersV2.Assets.Gallery.uploadedOn": "Uploaded on",
|
|
781
|
+
"creatives.containersV2.BeeEditor.addLabel": "Add label",
|
|
782
|
+
"creatives.containersV2.BeeEditor.cta": "CTA",
|
|
783
|
+
"creatives.containersV2.BeeEditor.customRows": "Create new row",
|
|
784
|
+
"creatives.containersV2.BeeEditor.done": "Done",
|
|
785
|
+
"creatives.containersV2.BeeEditor.footer": "Footer",
|
|
786
|
+
"creatives.containersV2.BeeEditor.header": "Header",
|
|
787
|
+
"creatives.containersV2.BeeEditor.others": "Others",
|
|
788
|
+
"creatives.containersV2.BeeEditor.rowCreationFailureMgs": "Error in row creation",
|
|
789
|
+
"creatives.containersV2.BeeEditor.rowCreationSuccessMgs": "Row created successfully",
|
|
790
|
+
"creatives.containersV2.BeeEditor.rowName": "Row name",
|
|
791
|
+
"creatives.containersV2.BeeEditor.rowPlaceHolder": "Enter Row name",
|
|
792
|
+
"creatives.containersV2.BeeEditor.select": "Select",
|
|
793
|
+
"creatives.containersV2.BeeEditor.selectCategoyPlaceholder": "Select category",
|
|
794
|
+
"creatives.containersV2.BeeEditor.socialPlatform": "Social platform",
|
|
796
795
|
"creatives.containersV2.CallTask.addNewCallTask": "Add new call task",
|
|
797
796
|
"creatives.containersV2.CallTask.callTaskInfo": "Call Tasks are message sent to store staff. The messages are displayed on the Point of Sale (POS) machines for store staff to take action.",
|
|
798
797
|
"creatives.containersV2.CallTask.callTaskTitleIllustartion": "Create a Call Task {templateText}",
|
package/translations/zh.json
CHANGED
|
@@ -86,21 +86,6 @@
|
|
|
86
86
|
"creatives.components.WechatRichmediaTemplatePreview.header": "",
|
|
87
87
|
"creatives.components.WechatRichmediaTemplatePreview.reply": "",
|
|
88
88
|
"creatives.components.WechatRichmediaTemplatePreview.select": "",
|
|
89
|
-
"creatives.componentsV2.BeeEditor.addLabel": "",
|
|
90
|
-
"creatives.componentsV2.BeeEditor.cancel": "",
|
|
91
|
-
"creatives.componentsV2.BeeEditor.cta": "",
|
|
92
|
-
"creatives.componentsV2.BeeEditor.customRows": "",
|
|
93
|
-
"creatives.componentsV2.BeeEditor.footer": "",
|
|
94
|
-
"creatives.componentsV2.BeeEditor.header": "",
|
|
95
|
-
"creatives.componentsV2.BeeEditor.others": "",
|
|
96
|
-
"creatives.componentsV2.BeeEditor.rowName": "",
|
|
97
|
-
"creatives.componentsV2.BeeEditor.rowPlaceHolder": "",
|
|
98
|
-
"creatives.componentsV2.BeeEditor.save": "",
|
|
99
|
-
"creatives.componentsV2.BeeEditor.select": "",
|
|
100
|
-
"creatives.componentsV2.BeeEditor.selectCategoyPlaceholder": "",
|
|
101
|
-
"creatives.componentsV2.BeeEditor.socialPlatform": "",
|
|
102
|
-
"creatives.componentsV2.BeeEditor.tagPlaceHolder": "",
|
|
103
|
-
"creatives.componentsV2.BeeEditor.tags": "",
|
|
104
89
|
"creatives.componentsV2.BreadCrumbs.header": "",
|
|
105
90
|
"creatives.componentsV2.CallTaskPreview.header": "",
|
|
106
91
|
"creatives.componentsV2.CapTagList.Cancel": "",
|
|
@@ -793,6 +778,20 @@
|
|
|
793
778
|
"creatives.containersV2.Assets.Gallery.uploadedAt": "",
|
|
794
779
|
"creatives.containersV2.Assets.Gallery.uploadedBy": "",
|
|
795
780
|
"creatives.containersV2.Assets.Gallery.uploadedOn": "",
|
|
781
|
+
"creatives.containersV2.BeeEditor.addLabel": "",
|
|
782
|
+
"creatives.containersV2.BeeEditor.cta": "",
|
|
783
|
+
"creatives.containersV2.BeeEditor.customRows": "",
|
|
784
|
+
"creatives.containersV2.BeeEditor.done": "",
|
|
785
|
+
"creatives.containersV2.BeeEditor.footer": "",
|
|
786
|
+
"creatives.containersV2.BeeEditor.header": "",
|
|
787
|
+
"creatives.containersV2.BeeEditor.others": "",
|
|
788
|
+
"creatives.containersV2.BeeEditor.rowCreationFailureMgs": "",
|
|
789
|
+
"creatives.containersV2.BeeEditor.rowCreationSuccessMgs": "",
|
|
790
|
+
"creatives.containersV2.BeeEditor.rowName": "",
|
|
791
|
+
"creatives.containersV2.BeeEditor.rowPlaceHolder": "",
|
|
792
|
+
"creatives.containersV2.BeeEditor.select": "",
|
|
793
|
+
"creatives.containersV2.BeeEditor.selectCategoyPlaceholder": "",
|
|
794
|
+
"creatives.containersV2.BeeEditor.socialPlatform": "",
|
|
796
795
|
"creatives.containersV2.CallTask.addNewCallTask": "",
|
|
797
796
|
"creatives.containersV2.CallTask.callTaskInfo": "",
|
|
798
797
|
"creatives.containersV2.CallTask.callTaskTitleIllustartion": "",
|
|
@@ -256,7 +256,7 @@ function BeeEditor(props) {
|
|
|
256
256
|
</>;
|
|
257
257
|
return (
|
|
258
258
|
<CapSpin spinning={saveRowRequest || false}>
|
|
259
|
-
<div id="bee-plugin-container" style={{ height: '
|
|
259
|
+
<div id="bee-plugin-container" style={{ height: '650px'}}>
|
|
260
260
|
</div>
|
|
261
261
|
<TagList
|
|
262
262
|
moduleFilterEnabled={moduleFilterEnabled}
|
|
@@ -6,9 +6,9 @@ export const LOGIN_REQUEST = 'cap/LOGIN_REQUEST';
|
|
|
6
6
|
export const LOGIN_SUCCESS = 'cap/LOGIN_SUCCESS';
|
|
7
7
|
export const LOGIN_FAILURE = 'cap/LOGIN_FAILURE';
|
|
8
8
|
|
|
9
|
-
export const
|
|
10
|
-
export const
|
|
11
|
-
export const
|
|
9
|
+
export const LOGOUT_REQUEST_V2 = 'cap/LOGOUT_REQUEST_V2';
|
|
10
|
+
export const LOGOUT_SUCCESS_V2 = 'cap/LOGOUT_SUCCESS_V2';
|
|
11
|
+
export const LOGOUT_FAILURE_V2 = 'cap/LOGOUT_FAILURE_V2';
|
|
12
12
|
export const ADD_MESSAGE = 'cap/ADD_MESSAGE';
|
|
13
13
|
export const REMOVE_MESSAGE = 'cap/REMOVE_MESSAGE';
|
|
14
14
|
export const GET_USER_DATA_REQUEST = 'cap/GET_USER_DATA_REQUEST';
|
|
@@ -22,11 +22,11 @@ function capReducer(state = fromJS(initialState.cap), action) {
|
|
|
22
22
|
return state
|
|
23
23
|
.set('login_progress', false)
|
|
24
24
|
.set('message', action.error.message);
|
|
25
|
-
case types.
|
|
25
|
+
case types.LOGOUT_REQUEST_V2:
|
|
26
26
|
return state.set('login_progress', false);
|
|
27
|
-
case types.
|
|
27
|
+
case types.LOGOUT_SUCCESS_V2:
|
|
28
28
|
return state;
|
|
29
|
-
case types.
|
|
29
|
+
case types.LOGOUT_FAILURE_V2:
|
|
30
30
|
return state;
|
|
31
31
|
case types.SWITCH_ORG_REQUEST:
|
|
32
32
|
return state
|
|
@@ -5,7 +5,7 @@ import * as Api from '../../services/api';
|
|
|
5
5
|
import * as LocalStorage from '../../services/localStorageApi';
|
|
6
6
|
import * as types from './constants';
|
|
7
7
|
import config from '../../config/app';
|
|
8
|
-
import pathConfig from '../../config/path';
|
|
8
|
+
//import pathConfig from '../../config/path';
|
|
9
9
|
import { getTopbarMenuDataValue } from '../../v2Containers/App/constants';
|
|
10
10
|
// import {makeSelectOrgId} from './selectors';
|
|
11
11
|
|
|
@@ -42,8 +42,8 @@ function* loginFlow() {
|
|
|
42
42
|
while (condition) {
|
|
43
43
|
const { user } = yield take(types.LOGIN_REQUEST);
|
|
44
44
|
const task = yield fork(authorize, user);
|
|
45
|
-
const action = yield take([types.
|
|
46
|
-
if (action.type === types.
|
|
45
|
+
const action = yield take([types.LOGOUT_REQUEST_V2, types.LOGIN_FAILURE]);
|
|
46
|
+
if (action.type === types.LOGOUT_REQUEST_V2) {
|
|
47
47
|
yield cancel(task);
|
|
48
48
|
}
|
|
49
49
|
// yield call(LocalStorage.clearItem, 'token');
|
|
@@ -57,16 +57,16 @@ function* logoutFlow() {
|
|
|
57
57
|
const serverLogout = yield call(Api.logout);
|
|
58
58
|
if (serverLogout.success && serverLogout.success === true) {
|
|
59
59
|
const loginUrl = (process.env.NODE_ENV === 'production') ?
|
|
60
|
-
`${
|
|
61
|
-
yield [put({type: types.
|
|
60
|
+
`${config.production.login_url}` : `${config.development.login_url}`;
|
|
61
|
+
yield [put({type: types.LOGOUT_SUCCESS_V2})];
|
|
62
62
|
yield call(LocalStorage.clearItem, 'token');
|
|
63
63
|
yield call(LocalStorage.clearItem, 'orgID');
|
|
64
64
|
yield call(LocalStorage.clearItem, 'user');
|
|
65
65
|
yield call(LocalStorage.clearItem, 'isLoggedIn');
|
|
66
|
-
window.location.href = loginUrl
|
|
66
|
+
window.location.href = `${window.location.origin}${loginUrl}`;
|
|
67
67
|
}
|
|
68
68
|
} catch (error) {
|
|
69
|
-
yield put({ type: types.
|
|
69
|
+
yield put({ type: types.LOGOUT_FAILURE_V2, error });
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -141,7 +141,7 @@ function* watchForOrgChange() {
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
function* watchForLogoutFlow() {
|
|
144
|
-
yield takeLatest(types.
|
|
144
|
+
yield takeLatest(types.LOGOUT_REQUEST_V2, logoutFlow);
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
function* watchForFetchUserInfo() {
|
|
@@ -45,7 +45,7 @@ export class LanguageProvider extends React.PureComponent { // eslint-disable-li
|
|
|
45
45
|
let locale = localStorage.getItem('jlocale') || 'en';
|
|
46
46
|
moment.locale(locale);
|
|
47
47
|
if (user) {
|
|
48
|
-
locale = JSON.parse(user).lang;
|
|
48
|
+
locale = JSON.parse(user).lang || locale;
|
|
49
49
|
}
|
|
50
50
|
locale = this.getMappedLocale(locale);
|
|
51
51
|
this.props.actions.getLocizMessage(locale);
|