@capillarytech/creatives-library 2.0.75 → 2.0.76
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/EmailPreview/assets/images/iPad.svg +10 -0
- package/components/EmailPreview/assets/images/mobile.png +0 -0
- package/components/FormBuilder/test +1845 -0
- package/containers/CallTask/_callTask.scss +5 -0
- package/containers/CallTask/actions.js +15 -0
- package/containers/CallTask/constants.js +7 -0
- package/containers/CallTask/index.js +141 -0
- package/containers/CallTask/messages.js +21 -0
- package/containers/CallTask/reducer.js +23 -0
- package/containers/CallTask/sagas.js +11 -0
- package/containers/CallTask/selectors.js +25 -0
- package/containers/CallTask/tests/actions.test.js +18 -0
- package/containers/CallTask/tests/index.test.js +10 -0
- package/containers/CallTask/tests/reducer.test.js +9 -0
- package/containers/CallTask/tests/sagas.test.js +15 -0
- package/containers/CallTask/tests/selectors.test.js +10 -0
- package/containers/ChannelTemplates/actions.js +20 -0
- package/containers/ChannelTemplates/constants.js +8 -0
- package/containers/ChannelTemplates/index.js +48 -0
- package/containers/ChannelTemplates/messages.js +13 -0
- package/containers/ChannelTemplates/reducer.js +34 -0
- package/containers/ChannelTemplates/sagas.js +32 -0
- package/containers/ChannelTemplates/selectors.js +25 -0
- package/containers/ChannelTemplates/tests/actions.test.js +18 -0
- package/containers/ChannelTemplates/tests/index.test.js +10 -0
- package/containers/ChannelTemplates/tests/reducer.test.js +9 -0
- package/containers/ChannelTemplates/tests/sagas.test.js +15 -0
- package/containers/ChannelTemplates/tests/selectors.test.js +10 -0
- package/containers/CreativesContainer/SlideBoxContent.js +248 -0
- package/containers/CreativesContainer/SlideBoxFooter.js +38 -0
- package/containers/CreativesContainer/SlideBoxHeader.js +65 -0
- package/containers/CreativesContainer/actions.js +27 -0
- package/containers/CreativesContainer/constants.js +13 -0
- package/containers/CreativesContainer/index.js +418 -0
- package/containers/CreativesContainer/index.scss +27 -0
- package/containers/CreativesContainer/messages.js +17 -0
- package/containers/CreativesContainer/reducer.js +29 -0
- package/containers/CreativesContainer/sagas.js +11 -0
- package/containers/CreativesContainer/selectors.js +30 -0
- package/containers/CreativesContainer/tests/actions.test.js +18 -0
- package/containers/CreativesContainer/tests/index.test.js +10 -0
- package/containers/CreativesContainer/tests/reducer.test.js +9 -0
- package/containers/CreativesContainer/tests/sagas.test.js +15 -0
- package/containers/CreativesContainer/tests/selectors.test.js +10 -0
- package/containers/EmailWrapper/actions.js +15 -0
- package/containers/EmailWrapper/constants.js +7 -0
- package/containers/EmailWrapper/index.js +238 -0
- package/containers/EmailWrapper/messages.js +57 -0
- package/containers/EmailWrapper/reducer.js +23 -0
- package/containers/EmailWrapper/sagas.js +11 -0
- package/containers/EmailWrapper/selectors.js +25 -0
- package/containers/EmailWrapper/tests/actions.test.js +18 -0
- package/containers/EmailWrapper/tests/index.test.js +10 -0
- package/containers/EmailWrapper/tests/reducer.test.js +9 -0
- package/containers/EmailWrapper/tests/sagas.test.js +15 -0
- package/containers/EmailWrapper/tests/selectors.test.js +10 -0
- package/containers/MobilePush/commonMethods.js +249 -0
- package/containers/MobilePush/eventsMap.js +127 -0
- package/containers/MobilePush/initialSchema.js +1739 -0
- package/containers/MobilepushWrapper/_mobilepushWrapper.scss +18 -0
- package/containers/MobilepushWrapper/index.js +97 -0
- package/containers/MobilepushWrapper/messages.js +25 -0
- package/containers/MobilepushWrapper/tests/index.test.js +10 -0
- package/containers/TemplatesV2/_templatesV2.scss +5 -0
- package/containers/TemplatesV2/actions.js +16 -0
- package/containers/TemplatesV2/constants.js +10 -0
- package/containers/TemplatesV2/index.js +207 -0
- package/containers/TemplatesV2/messages.js +29 -0
- package/containers/TemplatesV2/selectors.js +25 -0
- package/containers/TemplatesV2/tests/actions.test.js +18 -0
- package/containers/TemplatesV2/tests/index.test.js +10 -0
- package/containers/TemplatesV2/tests/reducer.test.js +9 -0
- package/containers/TemplatesV2/tests/sagas.test.js +15 -0
- package/containers/TemplatesV2/tests/selectors.test.js +10 -0
- package/containers/WeChat/RichmediaTemplates/Create/testschema.js +379 -0
- package/containers/WeChat/_wechat.scss +8 -0
- package/containers/WeChat/actions.js +52 -0
- package/containers/WeChat/constants.js +28 -0
- package/containers/WeChat/index.js +1635 -0
- package/containers/WeChat/messages.js +73 -0
- package/containers/WeChat/reducer.js +74 -0
- package/containers/WeChat/sagas.js +86 -0
- package/containers/WeChat/selectors.js +25 -0
- package/containers/WeChat/tests/actions.test.js +18 -0
- package/containers/WeChat/tests/index.test.js +10 -0
- package/containers/WeChat/tests/reducer.test.js +9 -0
- package/containers/WeChat/tests/sagas.test.js +15 -0
- package/containers/WeChat/tests/selectors.test.js +10 -0
- package/package.json +1 -1
- package/routes.js +1 -1
- package/v2Containers/CreativesContainer/SlideBoxContent.js +1 -0
- package/v2Containers/CreativesContainer/SlideBoxHeader.js +11 -2
- package/v2Containers/CreativesContainer/index.js +4 -0
- package/v2Containers/CreativesContainer/messages.js +1 -1
- package/v2Containers/MobilePush/Edit/index.js +1 -3
- package/v2Containers/MobilepushWrapper/index.js +3 -1
- package/v2Containers/Templates/_templates.scss +1 -3
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* WeChat Messages
|
|
3
|
+
*
|
|
4
|
+
* This contains all the text for the WeChat component.
|
|
5
|
+
*/
|
|
6
|
+
import { defineMessages } from 'react-intl';
|
|
7
|
+
|
|
8
|
+
export default defineMessages({
|
|
9
|
+
header: {
|
|
10
|
+
id: 'app.containers.WeChat.header',
|
|
11
|
+
defaultMessage: 'WeChat',
|
|
12
|
+
},
|
|
13
|
+
'Template mapping': {
|
|
14
|
+
id: 'app.containers.WeChat.templateMapping',
|
|
15
|
+
defaultMessage: 'Template mapping',
|
|
16
|
+
},
|
|
17
|
+
'Discard': {
|
|
18
|
+
id: 'app.containers.WeChat.discard',
|
|
19
|
+
defaultMessage: 'Discard',
|
|
20
|
+
},
|
|
21
|
+
'Cancel': {
|
|
22
|
+
id: 'app.containers.WeChat.cancel',
|
|
23
|
+
defaultMessage: 'Cancel',
|
|
24
|
+
},
|
|
25
|
+
'Save': {
|
|
26
|
+
id: 'app.containers.WeChat.save',
|
|
27
|
+
defaultMessage: 'Save',
|
|
28
|
+
},
|
|
29
|
+
'Account Id': {
|
|
30
|
+
id: 'app.containers.WeChat.accountId',
|
|
31
|
+
defaultMessage: 'Account Id',
|
|
32
|
+
},
|
|
33
|
+
'Select Wechat Account': {
|
|
34
|
+
id: 'app.containers.WeChat.selectWechatAccount',
|
|
35
|
+
defaultMessage: 'Select Wechat Account',
|
|
36
|
+
},
|
|
37
|
+
'Template': {
|
|
38
|
+
id: 'app.containers.WeChat.template',
|
|
39
|
+
defaultMessage: 'Template',
|
|
40
|
+
},
|
|
41
|
+
'Select Wechat Template': {
|
|
42
|
+
id: 'app.containers.WeChat.selectWechatTemplate',
|
|
43
|
+
defaultMessage: 'Select Wechat Template',
|
|
44
|
+
},
|
|
45
|
+
'Link': {
|
|
46
|
+
id: 'app.containers.WeChat.link',
|
|
47
|
+
defaultMessage: 'Link',
|
|
48
|
+
},
|
|
49
|
+
'Is this internal url': {
|
|
50
|
+
id: 'app.containers.WeChat.isInternalUrl',
|
|
51
|
+
defaultMessage: 'Is this internal url',
|
|
52
|
+
},
|
|
53
|
+
"Tags": {
|
|
54
|
+
id: 'app.containers.WeChat.tagsLabel',
|
|
55
|
+
defaultMessage: "Tags",
|
|
56
|
+
},
|
|
57
|
+
"gettingTemplateData": {
|
|
58
|
+
id: 'app.containers.WeChat.gettingTemplateData',
|
|
59
|
+
defaultMessage: "Getting Template Data..",
|
|
60
|
+
},
|
|
61
|
+
"wechatEditSuccess": {
|
|
62
|
+
id: 'app.containers.WeChat.wechatEditSuccess',
|
|
63
|
+
defaultMessage: "WeChat template unmapped successfully",
|
|
64
|
+
},
|
|
65
|
+
"wechatCreateSuccess": {
|
|
66
|
+
id: 'app.containers.WeChat.wechatCreateSuccess',
|
|
67
|
+
defaultMessage: "WeChat template mapped successfully",
|
|
68
|
+
},
|
|
69
|
+
"somethingWentWrong": {
|
|
70
|
+
id: 'app.containers.WeChat.somethingWentWrong',
|
|
71
|
+
defaultMessage: "Something Went Wrong!!",
|
|
72
|
+
},
|
|
73
|
+
});
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* WeChat reducer
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { fromJS } from 'immutable';
|
|
8
|
+
import * as types from './constants';
|
|
9
|
+
|
|
10
|
+
const initialState = fromJS({
|
|
11
|
+
weChatDefaultTemplate: fromJS({}),
|
|
12
|
+
fetchingDefaultTemplates: false,
|
|
13
|
+
errorFetchingDefaultTempalte: false,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
function weChatReducer(state = initialState, action) {
|
|
17
|
+
switch (action.type) {
|
|
18
|
+
case types.GET_WECHAT_DEFAULT_TEMPLATES_REQUEST:
|
|
19
|
+
return state
|
|
20
|
+
.set('fetchingDefaultTemplates', true)
|
|
21
|
+
.set('weChatDefaultTemplate', fromJS({}))
|
|
22
|
+
.set('weChatTemplates', fromJS({}))
|
|
23
|
+
.set('errorFetchingDefaultTempalte', false);
|
|
24
|
+
case types.GET_WECHAT_DEFAULT_TEMPLATES_SUCCESS:
|
|
25
|
+
return state
|
|
26
|
+
.set('fetchingDefaultTemplates', false)
|
|
27
|
+
.set('weChatDefaultTemplate', fromJS(action.data))
|
|
28
|
+
.set('weChatTemplates', fromJS(action.templateData));
|
|
29
|
+
case types.GET_WECHAT_DEFAULT_TEMPLATES_FAILURE:
|
|
30
|
+
return state
|
|
31
|
+
.set('fetchingDefaultTemplates', false)
|
|
32
|
+
.set('errorFetchingDefaultTempalte', true);
|
|
33
|
+
case types.CREATE_TEMPLATE_REQUEST:
|
|
34
|
+
return state
|
|
35
|
+
.set('createTemplateInProgress', true)
|
|
36
|
+
.set('createTemplateError', false);
|
|
37
|
+
case types.CREATE_TEMPLATE_SUCCESS:
|
|
38
|
+
return state.set('createTemplateInProgress', false)
|
|
39
|
+
.set('createResponse', action.data)
|
|
40
|
+
.set('createTemplateError', (action.statusCode !== undefined && action.statusCode > 300));
|
|
41
|
+
case types.CREATE_TEMPLATE_FAILURE:
|
|
42
|
+
return state
|
|
43
|
+
.set('createTemplateInProgress', false)
|
|
44
|
+
.set('createTemplateError', true);
|
|
45
|
+
case types.CLEAR_CREATE_RESPONSE_REQUEST:
|
|
46
|
+
return state.set('createResponse', {});
|
|
47
|
+
case types.GET_WECRM_ACCOUNTS_REQUEST:
|
|
48
|
+
return state
|
|
49
|
+
.set('fetchingWeCrmAccounts', true)
|
|
50
|
+
.set('weCrmAccountFetchingError', false);
|
|
51
|
+
case types.GET_WECRM_ACCOUNTS_SUCCESS:
|
|
52
|
+
return state
|
|
53
|
+
.set('fetchingWeCrmAccounts', false)
|
|
54
|
+
.set('weCrmAccounts', fromJS(action.data));
|
|
55
|
+
case types.GET_WECRM_ACCOUNTS_FAILURE:
|
|
56
|
+
return state
|
|
57
|
+
.set('fetchingWeCrmAccounts', false)
|
|
58
|
+
.set('weCrmAccountFetchingError', true);
|
|
59
|
+
case types.GET_TEMPLATE_DETAILS_REQUEST:
|
|
60
|
+
return state.set('getTemplateDetailsInProgress', true);
|
|
61
|
+
case types.GET_TEMPLATE_DETAILS_SUCCESS:
|
|
62
|
+
return state.set('getTemplateDetailsInProgress', false)
|
|
63
|
+
.set('templateDetails', action.data);
|
|
64
|
+
case types.GET_TEMPLATE_DETAILS_FAILURE:
|
|
65
|
+
return state.set('getTemplateDetailsInProgress', false);
|
|
66
|
+
case types.SET_WECHAT_ACCOUNT:
|
|
67
|
+
return state
|
|
68
|
+
.set('selectedWeChatAccount', fromJS(action.weChatAccount));
|
|
69
|
+
default:
|
|
70
|
+
return state;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export default weChatReducer;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { take, call, put, takeLatest, cancel } from 'redux-saga/effects';
|
|
2
|
+
import { LOCATION_CHANGE } from 'react-router-redux';
|
|
3
|
+
import * as Api from '../../services/api';
|
|
4
|
+
import * as types from './constants';
|
|
5
|
+
|
|
6
|
+
export function* getDefaultWeChatTemplates(params) {
|
|
7
|
+
try {
|
|
8
|
+
console.log('Saga param ', params.channel, params.queryParams);
|
|
9
|
+
const result = yield call(Api.getAllTemplates, {channel: params.channel, queryParams: params.queryParams});
|
|
10
|
+
yield put({ type: types.GET_WECHAT_DEFAULT_TEMPLATES_SUCCESS, data: result.response.unMapped, templateData: result.response.mapped});
|
|
11
|
+
} catch (error) {
|
|
12
|
+
yield put({ type: types.GET_WECHAT_DEFAULT_TEMPLATES_FAILURE, error });
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function* createTemplate(template) {
|
|
17
|
+
try {
|
|
18
|
+
const result = yield call(Api.createWeChatTemplate, template);
|
|
19
|
+
// const sidebar = result.response.sidebar;
|
|
20
|
+
yield put({ type: types.CREATE_TEMPLATE_SUCCESS, data: result.response, statusCode: result.status ? result.status.code : '' });
|
|
21
|
+
} catch (error) {
|
|
22
|
+
yield put({ type: types.CREATE_TEMPLATE_FAILURE, error });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function* fetchWeCrmAccounts() {
|
|
27
|
+
try {
|
|
28
|
+
const result = yield call(Api.fetchWeCrmAccounts);
|
|
29
|
+
yield [
|
|
30
|
+
put({
|
|
31
|
+
type: types.GET_WECRM_ACCOUNTS_SUCCESS,
|
|
32
|
+
data: result.response,
|
|
33
|
+
}),
|
|
34
|
+
];
|
|
35
|
+
} catch (error) {
|
|
36
|
+
yield [
|
|
37
|
+
put({
|
|
38
|
+
type: types.GET_WECRM_ACCOUNTS_FAILURE,
|
|
39
|
+
data: error,
|
|
40
|
+
}),
|
|
41
|
+
];
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function* getTemplateDetails(id) {
|
|
46
|
+
try {
|
|
47
|
+
console.log('saga get Template details', id);
|
|
48
|
+
const result = yield call(Api.getTemplateDetails, id);
|
|
49
|
+
// const sidebar = result.response.sidebar;
|
|
50
|
+
yield put({ type: types.GET_TEMPLATE_DETAILS_SUCCESS, data: result.response });
|
|
51
|
+
} catch (error) {
|
|
52
|
+
yield put({ type: types.GET_TEMPLATE_DETAILS_FAILURE, error });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function* watchGetDefaultWechatTemplates() {
|
|
57
|
+
const watcher = yield takeLatest(types.GET_WECHAT_DEFAULT_TEMPLATES_REQUEST, getDefaultWeChatTemplates);
|
|
58
|
+
yield take(LOCATION_CHANGE);
|
|
59
|
+
yield cancel(watcher);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function* watchCreateTemplate() {
|
|
63
|
+
const watcher = yield takeLatest(types.CREATE_TEMPLATE_REQUEST, createTemplate);
|
|
64
|
+
yield take(LOCATION_CHANGE);
|
|
65
|
+
yield cancel(watcher);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function* watchFetchWeCrmAccounts() {
|
|
69
|
+
const watcher = yield takeLatest(types.GET_WECRM_ACCOUNTS_REQUEST, fetchWeCrmAccounts);
|
|
70
|
+
yield take(LOCATION_CHANGE);
|
|
71
|
+
yield cancel(watcher);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function* watchGetTemplateDetails() {
|
|
75
|
+
const watcher = yield takeLatest(types.GET_TEMPLATE_DETAILS_REQUEST, getTemplateDetails);
|
|
76
|
+
yield take(LOCATION_CHANGE);
|
|
77
|
+
yield cancel(watcher);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// All sagas to be loaded
|
|
81
|
+
export default [
|
|
82
|
+
watchGetDefaultWechatTemplates,
|
|
83
|
+
watchCreateTemplate,
|
|
84
|
+
watchFetchWeCrmAccounts,
|
|
85
|
+
watchGetTemplateDetails,
|
|
86
|
+
];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { createSelector } from 'reselect';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Direct selector to the weChat state domain
|
|
5
|
+
*/
|
|
6
|
+
const selectWeChatDomain = () => (state) => state.get('weChat');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Other specific selectors
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Default selector used by WeChat
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const makeSelectWeChat = () => createSelector(
|
|
18
|
+
selectWeChatDomain(),
|
|
19
|
+
(substate) => substate.toJS()
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
export default makeSelectWeChat;
|
|
23
|
+
export {
|
|
24
|
+
selectWeChatDomain,
|
|
25
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
import {
|
|
3
|
+
defaultAction,
|
|
4
|
+
} from '../actions';
|
|
5
|
+
import {
|
|
6
|
+
DEFAULT_ACTION,
|
|
7
|
+
} from '../constants';
|
|
8
|
+
|
|
9
|
+
describe('WeChat actions', () => {
|
|
10
|
+
describe('Default Action', () => {
|
|
11
|
+
it('has a type of DEFAULT_ACTION', () => {
|
|
12
|
+
const expected = {
|
|
13
|
+
type: DEFAULT_ACTION,
|
|
14
|
+
};
|
|
15
|
+
expect(defaultAction()).toEqual(expected);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test sagas
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/* eslint-disable redux-saga/yield-effects */
|
|
6
|
+
// import { take, call, put, select } from 'redux-saga/effects';
|
|
7
|
+
// import { defaultSaga } from '../sagas';
|
|
8
|
+
|
|
9
|
+
// const generator = defaultSaga();
|
|
10
|
+
|
|
11
|
+
describe('defaultSaga Saga', () => {
|
|
12
|
+
it('Expect to have unit tests specified', () => {
|
|
13
|
+
expect(true).toEqual(false);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// import { fromJS } from 'immutable';
|
|
2
|
+
// import { makeSelectWeChatDomain } from '../selectors';
|
|
3
|
+
|
|
4
|
+
// const selector = makeSelectWeChatDomain();
|
|
5
|
+
|
|
6
|
+
describe('makeSelectWeChatDomain', () => {
|
|
7
|
+
it('Expect to have unit tests specified', () => {
|
|
8
|
+
expect(true).toEqual(false);
|
|
9
|
+
});
|
|
10
|
+
});
|
package/package.json
CHANGED
package/routes.js
CHANGED
|
@@ -616,7 +616,7 @@ export default function createRoutes(store) {
|
|
|
616
616
|
import('v2Containers/Mobilepush/Create/reducer'),
|
|
617
617
|
import('v2Containers/Mobilepush/Edit/sagas'),
|
|
618
618
|
import('v2Containers/Mobilepush/Edit/reducer'),
|
|
619
|
-
import('
|
|
619
|
+
import('v2Containers/Assets/Gallery/reducer'),
|
|
620
620
|
import('v2Containers/Assets/Gallery/sagas'),
|
|
621
621
|
]);
|
|
622
622
|
|
|
@@ -8,8 +8,16 @@ import messages from './messages';
|
|
|
8
8
|
const PrefixWrapper = styled.div`
|
|
9
9
|
margin-right: 16px;
|
|
10
10
|
`;
|
|
11
|
+
function getChannelLabel(channel) {
|
|
12
|
+
const labels = {
|
|
13
|
+
sms: 'SMS',
|
|
14
|
+
email: 'Email',
|
|
15
|
+
mobilepush: 'Push notification',
|
|
16
|
+
};
|
|
17
|
+
return labels[channel.toLowerCase()];
|
|
18
|
+
}
|
|
11
19
|
function SlideBoxHeader(props) {
|
|
12
|
-
const { slidBoxContent, templateData, onShowTemplates, creativesMode, isFullMode, showPrefix, showTemplateName } = props;
|
|
20
|
+
const { slidBoxContent, templateData, onShowTemplates, creativesMode, isFullMode, showPrefix, showTemplateName, channel } = props;
|
|
13
21
|
const TemplateName = isFullMode && showTemplateName;
|
|
14
22
|
return (
|
|
15
23
|
<div key="creatives-container-slidebox-header-content">
|
|
@@ -47,7 +55,7 @@ function SlideBoxHeader(props) {
|
|
|
47
55
|
)}
|
|
48
56
|
{!TemplateName && slidBoxContent === 'createTemplate' && (
|
|
49
57
|
<CapHeader
|
|
50
|
-
title={<FormattedMessage {...messages.createMessageContent} />}
|
|
58
|
+
title={<FormattedMessage {...messages.createMessageContent} values={{channel: getChannelLabel(channel)}}/>}
|
|
51
59
|
prefix={!isFullMode && showPrefix &&
|
|
52
60
|
<PrefixWrapper>
|
|
53
61
|
<CapIcons.backIcon onClick={onShowTemplates} />
|
|
@@ -66,5 +74,6 @@ SlideBoxHeader.propTypes = {
|
|
|
66
74
|
isFullMode: PropTypes.bool,
|
|
67
75
|
showPrefix: PropTypes.bool,
|
|
68
76
|
showTemplateName: PropTypes.func,
|
|
77
|
+
channel: PropTypes.string,
|
|
69
78
|
};
|
|
70
79
|
export default SlideBoxHeader;
|
|
@@ -30,6 +30,9 @@ const SlideBoxWrapper = styled.div`
|
|
|
30
30
|
.cap-slide-box-v2-container{
|
|
31
31
|
.slidebox-header, .slidebox-content-container, .slidebox-footer{
|
|
32
32
|
padding: 0 32px;
|
|
33
|
+
&.has-footer{
|
|
34
|
+
overflow-x: hidden;
|
|
35
|
+
}
|
|
33
36
|
}
|
|
34
37
|
}
|
|
35
38
|
`;
|
|
@@ -384,6 +387,7 @@ class Creatives extends React.Component {
|
|
|
384
387
|
header={
|
|
385
388
|
<SlideBoxHeader
|
|
386
389
|
key="creatives-container-slidebox-header"
|
|
390
|
+
channel={currentChannel}
|
|
387
391
|
messages={this.props.messages}
|
|
388
392
|
slidBoxContent={this.state.slidBoxContent}
|
|
389
393
|
templateData={templateData}
|
|
@@ -260,7 +260,7 @@ export default defineMessages({
|
|
|
260
260
|
},
|
|
261
261
|
"createMessageContent": {
|
|
262
262
|
id: `${scope}.editMessageContent`,
|
|
263
|
-
defaultMessage: `New message`,
|
|
263
|
+
defaultMessage: `New {channel} message`,
|
|
264
264
|
},
|
|
265
265
|
"creativeTemplatesDesc": {
|
|
266
266
|
id: `${scope}.creativeTemplatesDesc`,
|
|
@@ -1388,9 +1388,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
1388
1388
|
}
|
|
1389
1389
|
temp.injectedEvents = {};
|
|
1390
1390
|
temp.className = temp.className ? temp.className : '';
|
|
1391
|
-
|
|
1392
|
-
temp.className = `${temp.className} hide`;
|
|
1393
|
-
}
|
|
1391
|
+
|
|
1394
1392
|
// if (this.props.location.query.type === 'embedded' && (temp.type === "input" || temp.type === "textarea" || temp.type === "radioGroup") && this.props.location.query.module !== "dvs") {
|
|
1395
1393
|
// temp.className = `${temp.className} disabled`;
|
|
1396
1394
|
// temp.disabled = true;
|
|
@@ -63,7 +63,7 @@ export class MobilepushWrapper extends React.Component { // eslint-disable-line
|
|
|
63
63
|
this.setState({templateName: ev.target.value});
|
|
64
64
|
}
|
|
65
65
|
render() {
|
|
66
|
-
const {mobilePushCreateMode, step, getFormData, setIsLoadingContent, isGetFormData, query, isFullMode, showTemplateName} = this.props;
|
|
66
|
+
const {mobilePushCreateMode, step, getFormData, setIsLoadingContent, isGetFormData, query, isFullMode, showTemplateName, type} = this.props;
|
|
67
67
|
const {templateName} = this.state;
|
|
68
68
|
const isShowMobilepushCreate = !isEmpty(mobilePushCreateMode);
|
|
69
69
|
return (
|
|
@@ -103,6 +103,7 @@ export class MobilepushWrapper extends React.Component { // eslint-disable-line
|
|
|
103
103
|
isGetFormData={isGetFormData}
|
|
104
104
|
showTemplateName={showTemplateName}
|
|
105
105
|
route={{ name: 'mobilepush' }}
|
|
106
|
+
getDefaultTags={type}
|
|
106
107
|
/>
|
|
107
108
|
|
|
108
109
|
|
|
@@ -124,6 +125,7 @@ MobilepushWrapper.propTypes = {
|
|
|
124
125
|
query: PropTypes.object,
|
|
125
126
|
isFullMode: PropTypes.bool,
|
|
126
127
|
showTemplateName: PropTypes.func,
|
|
128
|
+
type: PropTypes.string,
|
|
127
129
|
};
|
|
128
130
|
|
|
129
131
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
.pagination-container {
|
|
9
9
|
.cap-custom-card-list-row {
|
|
10
10
|
.cap-custom-card-list-col{
|
|
11
|
-
&:nth-child(4n+4) {
|
|
11
|
+
&:nth-child(4n+4) { //every 4th child
|
|
12
12
|
margin-right: unset;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -16,8 +16,6 @@
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
19
|
.card-title {
|
|
22
20
|
line-height: 24px;
|
|
23
21
|
font-size: 14px;
|