@capillarytech/creatives-library 7.6.13 → 7.7.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/app.js +0 -5
- package/index.html +2 -2
- package/index.js +3 -3
- package/package.json +2 -2
- package/services/api.js +0 -2
- package/v2Components/TemplatePreview/index.js +0 -1
- package/v2Containers/App/constants.js +0 -11
- package/v2Containers/Cap/index.js +29 -23
- package/v2Containers/CapFacebookPreview/index.js +3 -5
- package/v2Containers/CreativesContainer/SlideBoxContent.js +1 -16
- package/v2Containers/CreativesContainer/index.js +12 -122
- package/v2Containers/Email/index.js +3 -14
- package/v2Containers/EmailWrapper/index.js +3 -10
- package/v2Containers/Facebook/Advertisement/index.js +36 -72
- package/v2Containers/Facebook/Advertisement/index.scss +1 -1
- package/v2Containers/Facebook/Facebook.style.js +1 -1
- package/v2Containers/Facebook/constants.js +0 -4
- package/v2Containers/Facebook/index.js +122 -198
- package/v2Containers/Facebook/messages.js +4 -24
- package/v2Containers/Line/Container/index.js +4 -32
- package/v2Containers/MobilePush/Create/index.js +4 -25
- package/v2Containers/MobilePush/Edit/index.js +5 -27
- package/v2Containers/MobilePush/Edit/sagas.js +1 -1
- package/v2Containers/MobilePush/commonMethods.js +1 -19
- package/v2Containers/Sms/Create/index.js +2 -14
- package/v2Containers/Sms/Edit/index.js +2 -15
- package/v2Containers/Templates/index.js +27 -43
- package/v2Containers/Templates/reducer.js +1 -1
- package/v2Containers/TemplatesV2/index.js +6 -23
- package/v2Containers/TemplatesV2/messages.js +0 -4
- package/v2Containers/Viber/index.js +3 -19
- package/v2Containers/WeChat/MapTemplates/index.js +3 -12
- package/v2Containers/WeChat/RichmediaTemplates/Create/index.js +2 -11
- package/utils/gtmTrackers/gtmEvents/creativeDetails.js +0 -41
- package/utils/gtmTrackers/index.js +0 -17
- package/v2Components/TemplatePreview/assets/images/mobile.svg +0 -24
- package/v2Containers/Line/Create/_lineCreate.scss +0 -64
- package/v2Containers/Line/Create/actions.js +0 -94
- package/v2Containers/Line/Create/constants.js +0 -43
- package/v2Containers/Line/Create/index.js +0 -1132
- package/v2Containers/Line/Create/initialSchema.js +0 -378
- package/v2Containers/Line/Create/messages.js +0 -229
- package/v2Containers/Line/Create/reducer.js +0 -99
- package/v2Containers/Line/Create/sagas.js +0 -113
- package/v2Containers/Line/Create/selectors.js +0 -30
- package/v2Containers/Line/CreateWrapper/constants.js +0 -2
- package/v2Containers/Line/CreateWrapper/index.js +0 -117
- package/v2Containers/Line/CreateWrapper/messages.js +0 -55
- package/v2Containers/Line/Edit/_lineEdit.scss +0 -23
- package/v2Containers/Line/Edit/actions.js +0 -79
- package/v2Containers/Line/Edit/constants.js +0 -27
- package/v2Containers/Line/Edit/index.js +0 -1051
- package/v2Containers/Line/Edit/messages.js +0 -173
- package/v2Containers/Line/Edit/reducer.js +0 -83
- package/v2Containers/Line/Edit/sagas.js +0 -81
- package/v2Containers/Line/Edit/selectors.js +0 -29
- package/v2Containers/Line/Edit/tests/actions.test.js +0 -18
- package/v2Containers/Line/Edit/tests/index.test.js +0 -10
- package/v2Containers/Line/Edit/tests/reducer.test.js +0 -9
- package/v2Containers/Line/Edit/tests/sagas.test.js +0 -15
- package/v2Containers/Line/Edit/tests/selectors.test.js +0 -10
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
*
|
|
3
|
-
* Create reducer
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { fromJS } from 'immutable';
|
|
8
|
-
import * as types from './constants';
|
|
9
|
-
|
|
10
|
-
const initialState = fromJS({
|
|
11
|
-
createTemplateInProgress: false,
|
|
12
|
-
response: {},
|
|
13
|
-
uploadedAssetData: {},
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
function createReducer(state = initialState, action) {
|
|
17
|
-
switch (action.type) {
|
|
18
|
-
case types.DEFAULT_ACTION:
|
|
19
|
-
return state;
|
|
20
|
-
case types.CREATE_TEMPLATE_REQUEST:
|
|
21
|
-
return state
|
|
22
|
-
.set('createTemplateInProgress', true)
|
|
23
|
-
.set('createTemplateError', false)
|
|
24
|
-
.set('createTemplateErrorMessage', fromJS(""));
|
|
25
|
-
case types.CREATE_TEMPLATE_SUCCESS:
|
|
26
|
-
return state.set('createTemplateInProgress', false)
|
|
27
|
-
.set('response', action.data)
|
|
28
|
-
.set('createTemplateError', (action.statusCode !== undefined && action.statusCode > 300))
|
|
29
|
-
.set('createTemplateErrorMessage', fromJS(action.errorMsg));
|
|
30
|
-
case types.CREATE_TEMPLATE_FAILURE:
|
|
31
|
-
return state
|
|
32
|
-
.set('createTemplateInProgress', false)
|
|
33
|
-
.set('createTemplateError', true)
|
|
34
|
-
.set('createTemplateErrorMessage', fromJS(action.errorMsg));
|
|
35
|
-
case types.CLEAR_CREATE_RESPONSE_REQUEST:
|
|
36
|
-
return state.set('response', {});
|
|
37
|
-
case types.UPLOAD_ASSET_REQUEST:
|
|
38
|
-
return state
|
|
39
|
-
.set('uploadAssetSuccess', false)
|
|
40
|
-
.set('assetUploading', true);
|
|
41
|
-
case types.UPLOAD_ASSET_SUCCESS:
|
|
42
|
-
return state
|
|
43
|
-
.set('uploadAssetSuccess', (action.statusCode !== undefined && action.statusCode !== '' && action.statusCode < 300))
|
|
44
|
-
.set('assetUploading', false)
|
|
45
|
-
.set('uploadedAssetData', action.data);
|
|
46
|
-
case types.UPLOAD_ASSET_FAILURE:
|
|
47
|
-
return state
|
|
48
|
-
.set('uploadAssetSuccess', false)
|
|
49
|
-
.set('assetUploading', false);
|
|
50
|
-
case types.CLEAR_ASSET:
|
|
51
|
-
return state
|
|
52
|
-
.delete('uploadedAssetData');
|
|
53
|
-
// FOR EDIT
|
|
54
|
-
case types.EDIT_TEMPLATE_REQUEST:
|
|
55
|
-
return state
|
|
56
|
-
.set('editTemplateInProgress', true)
|
|
57
|
-
.set('editTemplateError', false)
|
|
58
|
-
.set('editTemplateErrorMessage', fromJS(""));
|
|
59
|
-
case types.EDIT_TEMPLATE_SUCCESS:
|
|
60
|
-
return state.set('editTemplateInProgress', false)
|
|
61
|
-
.set('editResponse', action.data)
|
|
62
|
-
.set('editTemplateError', (action.statusCode !== undefined && action.statusCode > 300))
|
|
63
|
-
.set('editTemplateErrorMessage', fromJS(action.errorMsg));
|
|
64
|
-
case types.EDIT_TEMPLATE_FAILURE:
|
|
65
|
-
return state
|
|
66
|
-
.set('editTemplateInProgress', false)
|
|
67
|
-
.set('editTemplateError', true)
|
|
68
|
-
.set('editTemplateErrorMessage', fromJS(action.errorMsg));
|
|
69
|
-
case types.GET_TEMPLATE_DETAILS_REQUEST:
|
|
70
|
-
return state.set('getTemplateDetailsInProgress', true);
|
|
71
|
-
case types.GET_TEMPLATE_DETAILS_SUCCESS:
|
|
72
|
-
return state.set('getTemplateDetailsInProgress', false)
|
|
73
|
-
.set('templateDetails', action.data);
|
|
74
|
-
case types.GET_TEMPLATE_DETAILS_FAILURE:
|
|
75
|
-
return state.set('getTemplateDetailsInProgress', false);
|
|
76
|
-
case types.CLEAR_EDIT_RESPONSE_REQUEST:
|
|
77
|
-
return state.set('editResponse', {});
|
|
78
|
-
case types.CLEAR_DATA:
|
|
79
|
-
return state
|
|
80
|
-
.delete('uploadedAssetData')
|
|
81
|
-
.delete('metaEntities')
|
|
82
|
-
.delete('templateDetails');
|
|
83
|
-
case types.GET_LINE_TEMPLATES_LIST_REQUEST:
|
|
84
|
-
return state
|
|
85
|
-
.set('fetchingDefaultTemplates', true);
|
|
86
|
-
case types.GET_LINE_TEMPLATES_LIST_SUCCESS:
|
|
87
|
-
return state
|
|
88
|
-
.set('fetchingDefaultTemplates', false)
|
|
89
|
-
.set('lineTemplates', fromJS(action.data));
|
|
90
|
-
case types.GET_LINE_TEMPLATES_LIST_FAILURE:
|
|
91
|
-
return state
|
|
92
|
-
.set('fetchingDefaultTemplates', false)
|
|
93
|
-
.set('errorFetchingDefaultTempalte', true);
|
|
94
|
-
default:
|
|
95
|
-
return state;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export default createReducer;
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
// Line Sagas
|
|
2
|
-
|
|
3
|
-
import { take, cancel, call, put, takeLatest } from 'redux-saga/effects';
|
|
4
|
-
import { LOCATION_CHANGE } from 'react-router-redux';
|
|
5
|
-
import * as Api from '../../../services/api';
|
|
6
|
-
import * as types from './constants';
|
|
7
|
-
|
|
8
|
-
// Individual exports for testing
|
|
9
|
-
export function* createTemplate({ template, callback }) {
|
|
10
|
-
let errorMsg;
|
|
11
|
-
try {
|
|
12
|
-
console.log('inside line saga createTemplate@@@', template);
|
|
13
|
-
const result = yield call(Api.createLineTemplate, { template });
|
|
14
|
-
if (result.message || result.status.code === 500) {
|
|
15
|
-
errorMsg = result.message;
|
|
16
|
-
}
|
|
17
|
-
yield put({ type: types.CREATE_TEMPLATE_SUCCESS, data: result.response, statusCode: result.status ? result.status.code : '', errorMsg });
|
|
18
|
-
if (callback) {
|
|
19
|
-
callback(result.response);
|
|
20
|
-
}
|
|
21
|
-
} catch (error) {
|
|
22
|
-
yield put({ type: types.CREATE_TEMPLATE_FAILURE, error, errorMsg });
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
export function* uploadAsset(file, assetType, fileParams) {
|
|
26
|
-
try {
|
|
27
|
-
const result = yield call(Api.uploadFile, file, assetType, fileParams);
|
|
28
|
-
yield put({ type: types.UPLOAD_ASSET_SUCCESS, data: result.response.asset, statusCode: result.status ? result.status.code : '' });
|
|
29
|
-
} catch (error) {
|
|
30
|
-
yield put({ type: types.UPLOAD_ASSET_FAILURE, error });
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function* watchCreateTemplate() {
|
|
35
|
-
console.log('inside watch line saga createTemplate@@@');
|
|
36
|
-
const watcher = yield takeLatest(types.CREATE_TEMPLATE_REQUEST, createTemplate);
|
|
37
|
-
yield take(LOCATION_CHANGE);
|
|
38
|
-
yield cancel(watcher);
|
|
39
|
-
}
|
|
40
|
-
function* watchUploadAsset() {
|
|
41
|
-
console.log("inside watchUploadAsset");
|
|
42
|
-
const watcher = yield takeLatest(types.UPLOAD_ASSET_REQUEST, uploadAsset);
|
|
43
|
-
yield take(LOCATION_CHANGE);
|
|
44
|
-
yield cancel(watcher);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// edit
|
|
48
|
-
|
|
49
|
-
export function* editTemplate({ template, callback }) {
|
|
50
|
-
let errorMsg;
|
|
51
|
-
try {
|
|
52
|
-
console.log('saga editTemplate line', template);
|
|
53
|
-
const result = yield call(Api.createLineTemplate, {template});
|
|
54
|
-
console.log('saga editTemplate success line', result);
|
|
55
|
-
if (result.message || result.status.code === 500) {
|
|
56
|
-
errorMsg = result.message;
|
|
57
|
-
}
|
|
58
|
-
if (callback) {
|
|
59
|
-
callback(result.response);
|
|
60
|
-
}
|
|
61
|
-
yield put({ type: types.EDIT_TEMPLATE_SUCCESS, data: result.response, statusCode: result.status ? result.status.code : '', errorMsg });
|
|
62
|
-
} catch (error) {
|
|
63
|
-
yield put({ type: types.EDIT_TEMPLATE_FAILURE, error, errorMsg });
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export function* getTemplateDetails(id) {
|
|
68
|
-
try {
|
|
69
|
-
console.log('saga get Template details line', id);
|
|
70
|
-
const result = yield call(Api.getTemplateDetails, id);
|
|
71
|
-
// const sidebar = result.response.sidebar;
|
|
72
|
-
yield put({ type: types.GET_TEMPLATE_DETAILS_SUCCESS, data: result.response });
|
|
73
|
-
} catch (error) {
|
|
74
|
-
yield put({ type: types.GET_TEMPLATE_DETAILS_FAILURE, error });
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export function* getLineTemplatesList(params) {
|
|
79
|
-
try {
|
|
80
|
-
console.log('Saga param line ', params.channel, params.queryParams);
|
|
81
|
-
const result = yield call(Api.getAllTemplates, {channel: params.channel, queryParams: params.queryParams});
|
|
82
|
-
yield put({ type: types.GET_LINE_TEMPLATES_LIST_SUCCESS, data: result.response.templates, templateData: result.response.mapped});
|
|
83
|
-
} catch (error) {
|
|
84
|
-
yield put({ type: types.GET_LINE_TEMPLATES_LIST_FAILURE, error });
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function* watchEditTemplate() {
|
|
89
|
-
const watcher = yield takeLatest(types.EDIT_TEMPLATE_REQUEST, editTemplate);
|
|
90
|
-
yield take(LOCATION_CHANGE);
|
|
91
|
-
yield cancel(watcher);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function* watchGetTemplateDetails() {
|
|
95
|
-
const watcher = yield takeLatest(types.GET_TEMPLATE_DETAILS_REQUEST, getTemplateDetails);
|
|
96
|
-
yield take(LOCATION_CHANGE);
|
|
97
|
-
yield cancel(watcher);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
function* watchLineTemplatesList() {
|
|
101
|
-
const watcher = yield takeLatest(types.GET_LINE_TEMPLATES_LIST_REQUEST, getLineTemplatesList);
|
|
102
|
-
yield take(LOCATION_CHANGE);
|
|
103
|
-
yield cancel(watcher);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
// All sagas to be loaded
|
|
107
|
-
export default [
|
|
108
|
-
watchCreateTemplate,
|
|
109
|
-
watchUploadAsset,
|
|
110
|
-
watchEditTemplate,
|
|
111
|
-
watchGetTemplateDetails,
|
|
112
|
-
watchLineTemplatesList,
|
|
113
|
-
];
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { createSelector } from 'reselect';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Direct selector to the create state domain
|
|
5
|
-
*/
|
|
6
|
-
const selectLineDomain = () => (state) => state.get('templates');
|
|
7
|
-
const selectLineMessageEditDomain = () => (state) => state.get('lineCreate');
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Other specific selectors
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Default selector used by Create & Edit
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
const makeSelectLine = () => createSelector(
|
|
19
|
-
selectLineDomain(),
|
|
20
|
-
(substate) => substate && substate.toJS()
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
const makeSelectCreateLine = () => createSelector(
|
|
24
|
-
selectLineMessageEditDomain(),
|
|
25
|
-
(substate) => substate && substate.toJS()
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
export {
|
|
29
|
-
makeSelectLine, makeSelectCreateLine,
|
|
30
|
-
};
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
*
|
|
3
|
-
* CreateLineWrapper
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
import React, {useState} from 'react';
|
|
7
|
-
import { injectIntl, FormattedMessage, intlShape } from 'react-intl';
|
|
8
|
-
import PropTypes from 'prop-types';
|
|
9
|
-
import { CapRadioCard, CapLabel, CapButton } from '@capillarytech/cap-ui-library';
|
|
10
|
-
import ComponentWithLabelHOC from '@capillarytech/cap-ui-library/assets/HOCs/ComponentWithLabelHOC';
|
|
11
|
-
import styled from 'styled-components';
|
|
12
|
-
import { CAP_SPACE_04, CAP_SPACE_08, CAP_SPACE_16 } from '@capillarytech/cap-ui-library/styled/variables';
|
|
13
|
-
import messages from './messages';
|
|
14
|
-
import mapTemplateImage from "../../../assets/mapTemplate.png";
|
|
15
|
-
import lineImageTemplate from "../../../assets/lineImageTemplate.png";
|
|
16
|
-
import { TEXT, IMAGE } from './constants';
|
|
17
|
-
import LineCreate from '../Create';
|
|
18
|
-
|
|
19
|
-
const CapRadioCardWithLabel = ComponentWithLabelHOC(CapRadioCard);
|
|
20
|
-
const CardContainer = styled.div`
|
|
21
|
-
margin-top: ${CAP_SPACE_16};
|
|
22
|
-
.component-with-label-label{
|
|
23
|
-
margin-bottom: unset;
|
|
24
|
-
}
|
|
25
|
-
.ant-radio-group{
|
|
26
|
-
.ant-radio-button-wrapper{
|
|
27
|
-
&:first-child{
|
|
28
|
-
margin-left: unset;
|
|
29
|
-
margin-top: unset;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
`;
|
|
35
|
-
|
|
36
|
-
const CreateLineWrapper = (props) => {
|
|
37
|
-
const { intl: { formatMessage }, selectedAccount } = props;
|
|
38
|
-
|
|
39
|
-
const getModes = (modeList) => (
|
|
40
|
-
modeList.map(({ label, imageSrc, type, title }) => ({
|
|
41
|
-
title: <FormattedMessage {...messages[title]}/>,
|
|
42
|
-
content: (
|
|
43
|
-
<>
|
|
44
|
-
<CapLabel type="label1" style={{ paddingTop: CAP_SPACE_04, paddingBottom: CAP_SPACE_08 }}>
|
|
45
|
-
{formatMessage(messages[label])}
|
|
46
|
-
</CapLabel>
|
|
47
|
-
<img alt="" className="template-image" src={imageSrc} />
|
|
48
|
-
</>
|
|
49
|
-
),
|
|
50
|
-
value: type,
|
|
51
|
-
}))
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
const modes = [
|
|
55
|
-
{
|
|
56
|
-
title: 'textTemplateTitle',
|
|
57
|
-
label: 'textTemplateDescription',
|
|
58
|
-
imageSrc: mapTemplateImage,
|
|
59
|
-
type: TEXT,
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
title: 'imageTemplateTitle',
|
|
63
|
-
label: 'imageTemplateDescription',
|
|
64
|
-
imageSrc: lineImageTemplate,
|
|
65
|
-
type: IMAGE,
|
|
66
|
-
},
|
|
67
|
-
];
|
|
68
|
-
|
|
69
|
-
const [selectedLineTemplateOption, updateSelectedLineTemplateOption] = useState();
|
|
70
|
-
const [showOptions, onSelectContinue] = useState(true);
|
|
71
|
-
|
|
72
|
-
const onOptionSelect = (event) => updateSelectedLineTemplateOption(event.target.value);
|
|
73
|
-
|
|
74
|
-
if (showOptions) {
|
|
75
|
-
return (
|
|
76
|
-
<>
|
|
77
|
-
<CardContainer>
|
|
78
|
-
<CapRadioCardWithLabel
|
|
79
|
-
label={<FormattedMessage {...messages.templateType}/>}
|
|
80
|
-
panes={getModes(modes)}
|
|
81
|
-
cardHeight={"364px"}
|
|
82
|
-
onChange={onOptionSelect}
|
|
83
|
-
selected={selectedLineTemplateOption}
|
|
84
|
-
/>
|
|
85
|
-
</CardContainer>
|
|
86
|
-
{
|
|
87
|
-
selectedLineTemplateOption && (
|
|
88
|
-
<CapButton
|
|
89
|
-
key="submit"
|
|
90
|
-
type="primary"
|
|
91
|
-
onClick={() => onSelectContinue(false)}
|
|
92
|
-
style={{marginTop: 10}}
|
|
93
|
-
>
|
|
94
|
-
<FormattedMessage {...messages.continue} />
|
|
95
|
-
</CapButton>
|
|
96
|
-
)
|
|
97
|
-
}
|
|
98
|
-
</>
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return (
|
|
103
|
-
<LineCreate
|
|
104
|
-
{...props}
|
|
105
|
-
params={{mode: selectedLineTemplateOption}}
|
|
106
|
-
route={{name: selectedLineTemplateOption}}
|
|
107
|
-
selectedAccount={selectedAccount}
|
|
108
|
-
/>
|
|
109
|
-
);
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
CreateLineWrapper.propTypes = {
|
|
113
|
-
intl: intlShape.isRequired,
|
|
114
|
-
selectedAccount: PropTypes.object,
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
export default injectIntl(CreateLineWrapper);
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Create Line Messages
|
|
3
|
-
*
|
|
4
|
-
* This contains all the text for the Create component.
|
|
5
|
-
*/
|
|
6
|
-
import { defineMessages } from 'react-intl';
|
|
7
|
-
|
|
8
|
-
const prefix = 'creatives.containersV2.Line.CreateWrapper';
|
|
9
|
-
|
|
10
|
-
export default defineMessages({
|
|
11
|
-
"textTemplateTitle": {
|
|
12
|
-
id: `${prefix}.textTemplateTitle`,
|
|
13
|
-
defaultMessage: 'Text template',
|
|
14
|
-
},
|
|
15
|
-
"textTemplateDescription": {
|
|
16
|
-
id: `${prefix}.textTemplateDescription`,
|
|
17
|
-
defaultMessage: 'Used for announcing offers and transaction related information',
|
|
18
|
-
},
|
|
19
|
-
"imageTemplateTitle": {
|
|
20
|
-
id: `${prefix}.imageTemplateTitle`,
|
|
21
|
-
defaultMessage: 'Image/video template',
|
|
22
|
-
},
|
|
23
|
-
"imageTemplateDescription": {
|
|
24
|
-
id: `${prefix}.imageTemplateDescription`,
|
|
25
|
-
defaultMessage: 'Used for creating image or video content',
|
|
26
|
-
},
|
|
27
|
-
"hybridTemplateTitle": {
|
|
28
|
-
id: `${prefix}.hybridTemplateTitle`,
|
|
29
|
-
defaultMessage: 'Hybrid',
|
|
30
|
-
},
|
|
31
|
-
"hybridTemplateDescription": {
|
|
32
|
-
id: `${prefix}.hybridTemplateDescription`,
|
|
33
|
-
defaultMessage: 'Used to create combined text & image or video content',
|
|
34
|
-
},
|
|
35
|
-
"templateType": {
|
|
36
|
-
id: `${prefix}.templateType`,
|
|
37
|
-
defaultMessage: 'Select the type of content',
|
|
38
|
-
},
|
|
39
|
-
"continue": {
|
|
40
|
-
id: `${prefix}.continue`,
|
|
41
|
-
defaultMessage: 'Continue',
|
|
42
|
-
},
|
|
43
|
-
"accountLineListTitle": {
|
|
44
|
-
id: `${prefix}.accountLineListTitle`,
|
|
45
|
-
defaultMessage: 'Line accounts',
|
|
46
|
-
},
|
|
47
|
-
"accountLineListDescription": {
|
|
48
|
-
id: `${prefix}.accountLineListDescription`,
|
|
49
|
-
defaultMessage: 'Choose the account to send content',
|
|
50
|
-
},
|
|
51
|
-
"accountLineNoListTitle": {
|
|
52
|
-
id: `${prefix}.accountLineNoListTitle`,
|
|
53
|
-
defaultMessage: 'No line accounts present',
|
|
54
|
-
},
|
|
55
|
-
});
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
.line-edit {
|
|
2
|
-
.mobile-push-row{
|
|
3
|
-
margin-bottom: 16px;
|
|
4
|
-
}
|
|
5
|
-
.image-container{
|
|
6
|
-
border: solid 1px #C2C2C2;
|
|
7
|
-
border-radius: 5px;
|
|
8
|
-
.image-placeholder{
|
|
9
|
-
line-height: 150px;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
.ant-tabs-bar{
|
|
13
|
-
margin-bottom: 0 !important;
|
|
14
|
-
display: flex;
|
|
15
|
-
align-items: center;
|
|
16
|
-
flex-direction: row-reverse;
|
|
17
|
-
justify-content: flex-end;
|
|
18
|
-
}
|
|
19
|
-
.ant-tabs-tabpane{
|
|
20
|
-
padding: 16px 16px 16px 0;
|
|
21
|
-
border: solid 1px #D6D6D6;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
*
|
|
3
|
-
* Create actions
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import * as types from "../../Line/Edit/constants";
|
|
9
|
-
|
|
10
|
-
export function defaultAction() {
|
|
11
|
-
return {
|
|
12
|
-
type: types.DEFAULT_ACTION,
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function editTemplate(template) {
|
|
17
|
-
console.log('action trigereed editTemplate line @@@');
|
|
18
|
-
return {
|
|
19
|
-
type: types.EDIT_TEMPLATE_REQUEST, template,
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export function getTemplateDetails(id) {
|
|
24
|
-
console.log('getting template line @@@', id);
|
|
25
|
-
return {
|
|
26
|
-
type: types.GET_TEMPLATE_DETAILS_REQUEST, id,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export function uploadAsset(file, assetType, fileParams, mode) {
|
|
31
|
-
return {
|
|
32
|
-
type: types.UPLOAD_ASSET_REQUEST,
|
|
33
|
-
file,
|
|
34
|
-
assetType,
|
|
35
|
-
fileParams,
|
|
36
|
-
mode,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export function clearEditResponse() {
|
|
41
|
-
console.log('clearEditResponse');
|
|
42
|
-
return {
|
|
43
|
-
type: types.CLEAR_EDIT_RESPONSE_REQUEST,
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export function clearData() {
|
|
48
|
-
return {
|
|
49
|
-
type: types.CLEAR_DATA,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export function clearAsset() {
|
|
54
|
-
return {
|
|
55
|
-
type: types.CLEAR_ASSET,
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export function getLineTemplatesList(channel, queryParams) {
|
|
60
|
-
return {
|
|
61
|
-
type: types.GET_LINE_TEMPLATES_LIST_REQUEST,
|
|
62
|
-
channel,
|
|
63
|
-
queryParams,
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export function setSelectedTemplate(templateData) {
|
|
68
|
-
return {
|
|
69
|
-
type: types.SET_SELECTED_TEMPLATE,
|
|
70
|
-
data: templateData,
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export function setTemplateDetails(templateDetails) {
|
|
75
|
-
return {
|
|
76
|
-
type: types.GET_TEMPLATE_DETAILS_SUCCESS,
|
|
77
|
-
data: templateDetails,
|
|
78
|
-
};
|
|
79
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
*
|
|
3
|
-
* Edit constants
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
export const DEFAULT_ACTION = 'app/Edit/DEFAULT_ACTION';
|
|
8
|
-
|
|
9
|
-
export const GET_TEMPLATE_DETAILS_REQUEST = 'app/v2Containers/line/Edit/GET_TEMPLATE_DETAILS_REQUEST';
|
|
10
|
-
export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/v2Containers/line/Edit/GET_TEMPLATE_DETAILS_SUCCESS';
|
|
11
|
-
export const GET_TEMPLATE_DETAILS_FAILURE = 'app/v2Containers/line/Edit/GET_TEMPLATE_DETAILS_FAILURE';
|
|
12
|
-
|
|
13
|
-
export const EDIT_TEMPLATE_REQUEST = 'app/v2Containers/line/Edit/EDIT_TEMPLATE_REQUEST';
|
|
14
|
-
export const EDIT_TEMPLATE_SUCCESS = 'app/v2Containers/line/Edit/EDIT_TEMPLATE_SUCCESS';
|
|
15
|
-
export const EDIT_TEMPLATE_FAILURE = 'app/v2Containers/line/Edit/EDIT_TEMPLATE_FAILURE';
|
|
16
|
-
|
|
17
|
-
export const CLEAR_EDIT_RESPONSE_REQUEST = 'app/v2Containers/line/Edit/CLEAR_EDIT_RESPONSE_REQUEST';
|
|
18
|
-
export const UPLOAD_ASSET_REQUEST = 'app/v2Containers/Line/Edit/UPLOAD_ASSET_REQUEST';
|
|
19
|
-
export const UPLOAD_ASSET_SUCCESS = 'app/v2Containers/Line/Edit/UPLOAD_ASSET_SUCCESS';
|
|
20
|
-
export const UPLOAD_ASSET_FAILURE = 'app/v2Containers/Line/Edit/UPLOAD_ASSET_FAILURE';
|
|
21
|
-
export const CLEAR_DATA = 'app/v2Containers/Line/Edit/CLEAR_DATA';
|
|
22
|
-
export const CLEAR_ASSET = 'app/v2Containers/Line/Edit/CLEAR_ASSET';
|
|
23
|
-
export const SET_SELECTED_TEMPLATE = 'app/v2Containers/Line/Edit/SET_SELECTED_TEMPLATE';
|
|
24
|
-
|
|
25
|
-
export const GET_LINE_TEMPLATES_LIST_REQUEST = 'app/v2Containers/Line/GET_LINE_TEMPLATES_LIST_REQUEST';
|
|
26
|
-
export const GET_LINE_TEMPLATES_LIST_SUCCESS = 'app/v2Containers/Line/GET_LINE_TEMPLATES_LIST_SUCCESS';
|
|
27
|
-
export const GET_LINE_TEMPLATES_LIST_FAILURE = 'app/v2Containers/Line/GET_LINE_TEMPLATES_LIST_FAILURE';
|