@capillarytech/creatives-library 2.0.77 → 2.0.78
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/{components/SmsPreviewV2 → containers/WeChat}/tests/index.test.js +2 -2
- 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/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/assets/android-message-gui-2.svg +0 -55
- package/components/SmsPreviewV2/_smsPreviewV2.scss +0 -353
- package/components/SmsPreviewV2/index.js +0 -69
- package/components/SmsPreviewV2/messages.js +0 -13
|
@@ -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
|
+
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// import React from 'react';
|
|
2
2
|
// import { shallow } from 'enzyme';
|
|
3
3
|
|
|
4
|
-
// import
|
|
4
|
+
// import { WeChat } from '../index';
|
|
5
5
|
|
|
6
|
-
describe('<
|
|
6
|
+
describe('<WeChat />', () => {
|
|
7
7
|
it('Expect to have unit tests specified', () => {
|
|
8
8
|
expect(true).toEqual(false);
|
|
9
9
|
});
|
|
@@ -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
|
@@ -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
|
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="360px" height="725px" viewBox="0 0 360 725" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
-
<!-- Generator: Sketch 55.2 (78181) - https://sketchapp.com -->
|
|
4
|
-
<title>Artboard Copy 3</title>
|
|
5
|
-
<desc>Created with Sketch.</desc>
|
|
6
|
-
<g id="Artboard-Copy-3" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
7
|
-
<rect id="Rectangle" fill="#FFFFFF" x="0" y="660" width="360" height="65"></rect>
|
|
8
|
-
<g id="Organisms/ui/android/screenshots/wallpaper" transform="translate(120.000000, 0.000000)"></g>
|
|
9
|
-
<g id="Group-5" transform="translate(16.000000, 680.000000)">
|
|
10
|
-
<polygon id="Stroke-1" stroke-opacity="0.0117647061" stroke="#000000" stroke-width="1.33333336e-11" points="0 0 23.999999 0 23.999999 23.999999 0 23.999999"></polygon>
|
|
11
|
-
<polygon id="Fill-3" fill="#7F7F7F" points="18.9999989 12.9999992 12.9999992 12.9999992 12.9999992 18.9999989 10.9999993 18.9999989 10.9999993 12.9999992 4.9999997 12.9999992 4.9999997 10.9999993 10.9999993 10.9999993 10.9999993 4.9999997 12.9999992 4.9999997 12.9999992 10.9999993 18.9999989 10.9999993"></polygon>
|
|
12
|
-
</g>
|
|
13
|
-
<text id="Add-text-to-this-mes" font-family="Roboto-Regular, Roboto" font-size="15" font-weight="normal" letter-spacing="0.3" fill="#959595">
|
|
14
|
-
<tspan x="53" y="697">Add text to this message</tspan>
|
|
15
|
-
</text>
|
|
16
|
-
<g id="Group-5" transform="translate(320.000000, 679.000000)">
|
|
17
|
-
<polygon id="Stroke-1" stroke-opacity="0.0117647061" stroke="#000000" stroke-width="1.33333336e-11" points="0 0 23.999999 0 23.999999 23.999999 0 23.999999"></polygon>
|
|
18
|
-
<polygon id="Fill-3" fill="#757575" points="2.00999988 20.9999987 22.9999986 11.9999993 2.00999988 2.99999982 1.99999988 9.9999994 16.999999 11.9999993 1.99999988 13.9999992"></polygon>
|
|
19
|
-
</g>
|
|
20
|
-
<rect id="Rectangle" stroke="#E6E6E6" fill="#F4F5F7" x="0.5" y="86.5" width="359" height="573"></rect>
|
|
21
|
-
<g id="Group">
|
|
22
|
-
<g id="Toolbar">
|
|
23
|
-
<polygon id="Toolbar-bg" fill="#E51FA3" points="360 0 0 0 0 86 360 86"></polygon>
|
|
24
|
-
<g id="Toolbar-contents" transform="translate(16.000000, 40.000000)">
|
|
25
|
-
<g id="Back">
|
|
26
|
-
<rect id="Bounds" x="0" y="0" width="24" height="24"></rect>
|
|
27
|
-
<polygon id="Shape" fill="#FFFFFF" points="20 11 7.8 11 13.4 5.4 12 4 4 12 12 20 13.4 18.6 7.8 13 20 13"></polygon>
|
|
28
|
-
</g>
|
|
29
|
-
</g>
|
|
30
|
-
</g>
|
|
31
|
-
<g id="Status-bar">
|
|
32
|
-
<rect id="Status-bar-bg" fill="#CF0E8F" x="0" y="0" width="360" height="24"></rect>
|
|
33
|
-
<rect id="bounds" x="242" y="0" width="118" height="24"></rect>
|
|
34
|
-
<g id="battery" transform="translate(337.000000, 4.000000)">
|
|
35
|
-
<polygon id="bounds" points="0 0 16 0 16 16 0 16"></polygon>
|
|
36
|
-
<polygon id="Shape" fill="#FFFFFF" points="9 1.875 9 1 6 1 6 1.875 3 1.875 3 15 12 15 12 1.875"></polygon>
|
|
37
|
-
</g>
|
|
38
|
-
<g id="cellular" transform="translate(317.000000, 4.000000)">
|
|
39
|
-
<polygon id="bounds" points="0 0 16 0 16 16 0 16"></polygon>
|
|
40
|
-
<polygon id="Shape" fill="#FFFFFF" points="0 15 14 15 14 1"></polygon>
|
|
41
|
-
</g>
|
|
42
|
-
<g id="wifi" transform="translate(296.000000, 4.000000)">
|
|
43
|
-
<polygon id="bounds" points="2 0 18 0 18 16 2 16"></polygon>
|
|
44
|
-
<path d="M0.977372085,4.01593123 C3.48821908,2.12256382 6.61301513,1 10,1 C13.3869849,1 16.5117809,2.12256382 19.0226279,4.01593123 L10,15 L0.977372085,4.01593123 Z" id="Shape" fill="#FFFFFF"></path>
|
|
45
|
-
</g>
|
|
46
|
-
</g>
|
|
47
|
-
<g id="Icons-/-Navigation-24px-/-White-/-More" transform="translate(332.000000, 42.000000)">
|
|
48
|
-
<g id="More">
|
|
49
|
-
<rect id="Bounds" x="0" y="0" width="12" height="24"></rect>
|
|
50
|
-
<path d="M6,8 C7.1,8 8,7.1 8,6 C8,4.9 7.1,4 6,4 C4.9,4 4,4.9 4,6 C4,7.1 4.9,8 6,8 L6,8 Z M6,10 C4.9,10 4,10.9 4,12 C4,13.1 4.9,14 6,14 C7.1,14 8,13.1 8,12 C8,10.9 7.1,10 6,10 L6,10 Z M6,16 C4.9,16 4,16.9 4,18 C4,19.1 4.9,20 6,20 C7.1,20 8,19.1 8,18 C8,16.9 7.1,16 6,16 L6,16 Z" id="Shape" fill="#FFFFFF"></path>
|
|
51
|
-
</g>
|
|
52
|
-
</g>
|
|
53
|
-
</g>
|
|
54
|
-
</g>
|
|
55
|
-
</svg>
|