@capillarytech/creatives-library 3.8.11 → 3.9.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/components/TemplatePreview/WechatRichmediaTemplatePreview/index.js +8 -7
- package/components/TemplatePreview/_templatePreview.scss +20 -279
- package/components/TemplatePreview/index.js +20 -180
- package/components/TemplatePreview/messages.js +0 -16
- package/index.js +6 -0
- package/package.json +1 -1
- package/v2Components/FormBuilder/index.js +17 -25
- package/v2Components/MobilePushPreviewV2/index.js +32 -40
- package/v2Components/MobilePushPreviewV2/messages.js +8 -0
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/_wechatRichmediaTemplatePrev.scss +0 -64
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/index.js +19 -101
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +0 -12
- package/v2Components/TemplatePreview/_templatePreview.scss +4 -13
- package/v2Components/TemplatePreview/index.js +20 -147
- package/v2Components/TemplatePreview/messages.js +0 -8
- package/v2Containers/Assets/Gallery/index.js +1 -0
- package/v2Containers/CreativesContainer/SlideBoxContent.js +17 -17
- package/v2Containers/CreativesContainer/SlideBoxHeader.js +1 -1
- package/v2Containers/CreativesContainer/index.js +51 -4
- package/v2Containers/CreativesContainer/messages.js +2 -2
- package/v2Containers/Email/_email.scss +1 -7
- package/v2Containers/Email/index.js +13 -39
- package/v2Containers/Email/messages.js +0 -4
- package/v2Containers/EmailWrapper/index.js +5 -7
- package/v2Containers/Line/Create/actions.js +2 -1
- package/v2Containers/Line/Create/index.js +137 -61
- package/v2Containers/Line/Create/sagas.js +2 -2
- package/v2Containers/Line/Create/selectors.js +2 -7
- package/v2Containers/Line/CreateWrapper/index.js +5 -2
- package/v2Containers/Line/CreateWrapper/messages.js +12 -0
- package/v2Containers/MobilePush/Create/index.js +0 -5
- package/v2Containers/MobilePush/Edit/index.js +0 -5
- package/v2Containers/MobilepushWrapper/index.js +1 -4
- package/v2Containers/Sms/Create/index.js +1 -2
- package/v2Containers/Sms/Edit/index.js +0 -2
- package/v2Containers/Templates/_templates.scss +20 -16
- package/v2Containers/Templates/actions.js +7 -0
- package/v2Containers/Templates/constants.js +2 -0
- package/v2Containers/Templates/index.js +58 -9
- package/v2Containers/Templates/messages.js +8 -0
- package/v2Containers/Templates/reducer.js +2 -0
- 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/sms_mobile_android.svg +0 -22
- package/components/TemplatePreview/assets/images/sms_mobile_ios.svg +0 -16
- package/components/TemplatePreview/assets/images/wechat_mobile_android.svg +0 -20
- package/package-lock.json +0 -3096
- package/v2Components/TemplatePreview/assets/images/home-screen-android.svg +0 -21
- package/v2Components/TemplatePreview/assets/images/home-screen-ios.svg +0 -16
- package/v2Components/TemplatePreview/assets/images/sms_mobile_android.svg +0 -22
- package/v2Components/TemplatePreview/assets/images/wechat-home-screen-android.svg +0 -21
- package/v2Components/TemplatePreview/assets/images/wechat_mobile_android.svg +0 -20
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React, { Component } from 'react';
|
|
3
3
|
import get from 'lodash/get';
|
|
4
|
+
import set from 'lodash/set';
|
|
4
5
|
import { bindActionCreators } from 'redux';
|
|
5
6
|
import { intlShape } from 'react-intl';
|
|
6
7
|
import { createStructuredSelector } from 'reselect';
|
|
7
|
-
import { Row, Col, Spin } from 'antd';
|
|
8
8
|
import _ from 'lodash';
|
|
9
|
-
import { CapHeading } from '@capillarytech/cap-ui-library';
|
|
9
|
+
import { CapSpin, CapHeading, CapRow, CapColumn } from '@capillarytech/cap-ui-library';
|
|
10
10
|
import messages from './messages';
|
|
11
11
|
import * as actions from './actions';
|
|
12
12
|
import Gallery from '../../Assets/Gallery';
|
|
13
13
|
import FormBuilder from '../../../v2Components/FormBuilder';
|
|
14
14
|
//import { makeSelectCreate, makeSelectCreateResponse, makeSelectEdit, makeSelectEditResponse, makeSelectTemplateDetailsResponse } from './selectors';
|
|
15
|
-
import {makeSelectCreateLine} from './selectors';
|
|
15
|
+
import {makeSelectCreateLine, makeSelectLine} from './selectors';
|
|
16
16
|
import { makeSelectMetaEntities, setInjectedTags } from '../../Cap/selectors';
|
|
17
17
|
import {getMessageObject} from '../../../utils/messageUtils';
|
|
18
18
|
import { makeSelectTemplates } from '../../Templates/selectors';
|
|
@@ -44,7 +44,7 @@ export class Line extends Component {
|
|
|
44
44
|
'title-tagList': {
|
|
45
45
|
onTagSelect: this.onTagSelectTitle,
|
|
46
46
|
},
|
|
47
|
-
pane: {
|
|
47
|
+
'pane': {
|
|
48
48
|
onTabChange: this.onTabChange,
|
|
49
49
|
},
|
|
50
50
|
'line-template': {
|
|
@@ -53,7 +53,7 @@ export class Line extends Component {
|
|
|
53
53
|
'image-upload-line': {
|
|
54
54
|
onUpload: this.uploadImage,
|
|
55
55
|
},
|
|
56
|
-
tagList: {
|
|
56
|
+
'tagList': {
|
|
57
57
|
onTagSelect: this.onTagSelect,
|
|
58
58
|
},
|
|
59
59
|
'line-editor': {
|
|
@@ -88,7 +88,7 @@ export class Line extends Component {
|
|
|
88
88
|
isReady: false,
|
|
89
89
|
modeType: null,
|
|
90
90
|
isDrawerRequired: false,
|
|
91
|
-
|
|
91
|
+
startValidation: false,
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -127,8 +127,26 @@ export class Line extends Component {
|
|
|
127
127
|
if (modeType) {
|
|
128
128
|
this.setState({ modeType, schema: {} });
|
|
129
129
|
}
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
const {
|
|
131
|
+
isGetFormData,
|
|
132
|
+
templateData,
|
|
133
|
+
} = nextProps;
|
|
134
|
+
if (isGetFormData) {
|
|
135
|
+
const {
|
|
136
|
+
lineData,
|
|
137
|
+
getFormSubscriptionData,
|
|
138
|
+
} = nextProps;
|
|
139
|
+
let selectedAccount = {};
|
|
140
|
+
if (lineData) {
|
|
141
|
+
const {
|
|
142
|
+
weCrmAccounts = [],
|
|
143
|
+
} = lineData;
|
|
144
|
+
selectedAccount = weCrmAccounts.filter((account) => account === selectedAccount);
|
|
145
|
+
}
|
|
146
|
+
getFormSubscriptionData({ ...this.getFormData(), accountDetails: selectedAccount});
|
|
147
|
+
}
|
|
148
|
+
if (templateData && templateData.edit) {
|
|
149
|
+
this.setEditState(templateData);
|
|
132
150
|
}
|
|
133
151
|
if (isSchemaReady) {
|
|
134
152
|
// set schema value as per mode type. Supported mode (text & image)
|
|
@@ -221,24 +239,6 @@ export class Line extends Component {
|
|
|
221
239
|
this.props.actions.clearData();
|
|
222
240
|
}
|
|
223
241
|
|
|
224
|
-
const isEditSucceed =
|
|
225
|
-
this.state.isEdit &&
|
|
226
|
-
nextProps.Line &&
|
|
227
|
-
nextProps.Line.editResponse &&
|
|
228
|
-
nextProps.Line.editResponse.templateId;
|
|
229
|
-
if (isEditSucceed) {
|
|
230
|
-
this.setState({ formData: {} });
|
|
231
|
-
const message = getMessageObject(
|
|
232
|
-
'success',
|
|
233
|
-
this.props.intl.formatMessage(
|
|
234
|
-
messages['Line Template Edited Successfully']
|
|
235
|
-
),
|
|
236
|
-
true
|
|
237
|
-
);
|
|
238
|
-
this.props.globalActions.addMessageToQueue(message);
|
|
239
|
-
this.props.actions.clearEditResponse();
|
|
240
|
-
}
|
|
241
|
-
|
|
242
242
|
if (
|
|
243
243
|
nextProps.Line.editTemplateError &&
|
|
244
244
|
!_.isEqual(
|
|
@@ -272,6 +272,40 @@ export class Line extends Component {
|
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
+
setEditSuccessMessage = () => {
|
|
276
|
+
this.setState({ formData: {} });
|
|
277
|
+
const message = getMessageObject(
|
|
278
|
+
'success',
|
|
279
|
+
this.props.intl.formatMessage(
|
|
280
|
+
messages['Line Template Edited Successfully']
|
|
281
|
+
),
|
|
282
|
+
true
|
|
283
|
+
);
|
|
284
|
+
this.props.globalActions.addMessageToQueue(message);
|
|
285
|
+
this.props.actions.clearEditResponse();
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
setEditState = (data) => {
|
|
289
|
+
const { formData: previousFormData } = this.state;
|
|
290
|
+
const { text, originalContentUrl, imagePreview, image } = get(data, "versions.base.content.messages[0]");
|
|
291
|
+
const retrievedData = {
|
|
292
|
+
...previousFormData[0],
|
|
293
|
+
};
|
|
294
|
+
if (text) {
|
|
295
|
+
retrievedData["message-editor"] = text;
|
|
296
|
+
}
|
|
297
|
+
const lineImage = originalContentUrl || image;
|
|
298
|
+
if (lineImage) {
|
|
299
|
+
retrievedData.image = lineImage;
|
|
300
|
+
retrievedData.imagePreview = imagePreview;
|
|
301
|
+
}
|
|
302
|
+
const formData = {
|
|
303
|
+
0: retrievedData,
|
|
304
|
+
base: retrievedData,
|
|
305
|
+
};
|
|
306
|
+
this.setState({ formData });
|
|
307
|
+
}
|
|
308
|
+
|
|
275
309
|
componentWillUnmount() {
|
|
276
310
|
window.removeEventListener('message', this.handleFrameTasks);
|
|
277
311
|
}
|
|
@@ -297,7 +331,7 @@ export class Line extends Component {
|
|
|
297
331
|
}
|
|
298
332
|
|
|
299
333
|
onFormDataChange = (formData, tabCount, currentTab) => {
|
|
300
|
-
this.setState({ formData });
|
|
334
|
+
this.setState({ formData: { ...formData } });
|
|
301
335
|
if (tabCount) {
|
|
302
336
|
this.setState({ tabCount });
|
|
303
337
|
}
|
|
@@ -468,13 +502,30 @@ export class Line extends Component {
|
|
|
468
502
|
return;
|
|
469
503
|
}
|
|
470
504
|
}
|
|
471
|
-
if (this.state.
|
|
472
|
-
this.
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
505
|
+
if (!this.state.startValidation) {
|
|
506
|
+
this.setState({
|
|
507
|
+
startValidation: true,
|
|
508
|
+
}, () => {
|
|
509
|
+
const {
|
|
510
|
+
isFullMode,
|
|
511
|
+
saveMessage,
|
|
512
|
+
actions,
|
|
513
|
+
onCreateComplete,
|
|
514
|
+
} = this.props;
|
|
515
|
+
if (!isFullMode) {
|
|
516
|
+
saveMessage();
|
|
517
|
+
} else if (this.state.isEdit) {
|
|
518
|
+
actions.editTemplate(obj, () => {
|
|
519
|
+
this.setEditSuccessMessage();
|
|
520
|
+
onCreateComplete();
|
|
521
|
+
});
|
|
522
|
+
} else {
|
|
523
|
+
actions.createTemplate(
|
|
524
|
+
obj,
|
|
525
|
+
onCreateComplete
|
|
526
|
+
);
|
|
527
|
+
}
|
|
528
|
+
});
|
|
478
529
|
}
|
|
479
530
|
};
|
|
480
531
|
|
|
@@ -763,16 +814,24 @@ export class Line extends Component {
|
|
|
763
814
|
|
|
764
815
|
removeStandAlone = () => {
|
|
765
816
|
const schema = _.cloneDeep(this.state.schema);
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
817
|
+
const {
|
|
818
|
+
location: {
|
|
819
|
+
query: {
|
|
820
|
+
type,
|
|
821
|
+
mode,
|
|
822
|
+
module,
|
|
823
|
+
},
|
|
824
|
+
},
|
|
825
|
+
} = this.props;
|
|
826
|
+
if (type === 'embedded' && module === 'loyalty') {
|
|
770
827
|
schema.standalone.sections.splice(0, 1);
|
|
771
|
-
} else if (
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
828
|
+
} else if (type === 'embedded' && typeof mode !== 'undefined') {
|
|
829
|
+
delete schema.standalone;
|
|
830
|
+
} else if (!this.props.isFullMode) {
|
|
831
|
+
const childSections = get(schema, 'standalone.sections[0].childSections');
|
|
832
|
+
const fields = get(childSections, '[1].childSections[0].childSections');//removing template name section
|
|
833
|
+
fields.splice(0, 1);
|
|
834
|
+
set(childSections, '[1].childSections[0].childSections', fields);
|
|
776
835
|
} else {
|
|
777
836
|
schema.standalone.sections.splice(1, 1);
|
|
778
837
|
}
|
|
@@ -910,18 +969,31 @@ export class Line extends Component {
|
|
|
910
969
|
};
|
|
911
970
|
|
|
912
971
|
render() {
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
972
|
+
const {
|
|
973
|
+
Line: {
|
|
974
|
+
createTemplateInProgress,
|
|
975
|
+
assetUploading,
|
|
976
|
+
} = {},
|
|
977
|
+
templateData: {
|
|
978
|
+
edit,
|
|
979
|
+
mode,
|
|
980
|
+
orgId,
|
|
981
|
+
} = {},
|
|
982
|
+
params: {
|
|
983
|
+
id,
|
|
984
|
+
} = {},
|
|
985
|
+
} = this.props;
|
|
986
|
+
let loading = createTemplateInProgress || false;
|
|
987
|
+
loading = !!assetUploading;
|
|
988
|
+
if (edit || mode === 'edit' || (orgId && id)) {
|
|
989
|
+
const {
|
|
990
|
+
base: {
|
|
991
|
+
'message-editor': msgEditor,
|
|
992
|
+
image: uploadedAsset,
|
|
993
|
+
} = {},
|
|
994
|
+
reUpload,
|
|
995
|
+
} = this.state.formData;
|
|
996
|
+
loading = typeof reUpload === 'undefined' ? !(msgEditor || uploadedAsset) : !reUpload;
|
|
925
997
|
}
|
|
926
998
|
let tags =
|
|
927
999
|
this.props.metaEntities && this.props.metaEntities.tags
|
|
@@ -931,9 +1003,9 @@ export class Line extends Component {
|
|
|
931
1003
|
tags = this.props.supportedTags;
|
|
932
1004
|
}
|
|
933
1005
|
return (
|
|
934
|
-
<
|
|
935
|
-
<
|
|
936
|
-
<
|
|
1006
|
+
<CapSpin spinning={loading}>
|
|
1007
|
+
<CapRow>
|
|
1008
|
+
<CapColumn>
|
|
937
1009
|
<FormBuilder
|
|
938
1010
|
key={'form builder'}
|
|
939
1011
|
schema={this.state.schema}
|
|
@@ -965,10 +1037,11 @@ export class Line extends Component {
|
|
|
965
1037
|
setDrawerVisibility={(drawervisibleFlag) =>
|
|
966
1038
|
this.setState({ isDrawerRequired: drawervisibleFlag })
|
|
967
1039
|
}
|
|
1040
|
+
startValidation={this.state.startValidation}
|
|
968
1041
|
/>
|
|
969
|
-
</
|
|
970
|
-
</
|
|
971
|
-
</
|
|
1042
|
+
</CapColumn>
|
|
1043
|
+
</CapRow>
|
|
1044
|
+
</CapSpin>
|
|
972
1045
|
);
|
|
973
1046
|
}
|
|
974
1047
|
}
|
|
@@ -989,10 +1062,13 @@ Line.propTypes = {
|
|
|
989
1062
|
injectedTags: PropTypes.object,
|
|
990
1063
|
onCreateComplete: PropTypes.func,
|
|
991
1064
|
isFullMode: PropTypes.bool,
|
|
1065
|
+
saveMessage: PropTypes.func,
|
|
1066
|
+
templateData: PropTypes.object,
|
|
992
1067
|
};
|
|
993
1068
|
|
|
994
1069
|
const mapStateToProps = createStructuredSelector({
|
|
995
1070
|
Line: makeSelectCreateLine(),
|
|
1071
|
+
lineData: makeSelectLine(),
|
|
996
1072
|
Templates: makeSelectTemplates(),
|
|
997
1073
|
metaEntities: makeSelectMetaEntities(),
|
|
998
1074
|
injectedTags: setInjectedTags(),
|
|
@@ -16,7 +16,7 @@ export function* createTemplate({ template, callback }) {
|
|
|
16
16
|
}
|
|
17
17
|
yield put({ type: types.CREATE_TEMPLATE_SUCCESS, data: result.response, statusCode: result.status ? result.status.code : '', errorMsg });
|
|
18
18
|
if (callback) {
|
|
19
|
-
callback();
|
|
19
|
+
callback(result.response);
|
|
20
20
|
}
|
|
21
21
|
} catch (error) {
|
|
22
22
|
yield put({ type: types.CREATE_TEMPLATE_FAILURE, error, errorMsg });
|
|
@@ -56,7 +56,7 @@ export function* editTemplate({ template, callback }) {
|
|
|
56
56
|
errorMsg = result.message;
|
|
57
57
|
}
|
|
58
58
|
if (callback) {
|
|
59
|
-
callback();
|
|
59
|
+
callback(result.response);
|
|
60
60
|
}
|
|
61
61
|
yield put({ type: types.EDIT_TEMPLATE_SUCCESS, data: result.response, statusCode: result.status ? result.status.code : '', errorMsg });
|
|
62
62
|
} catch (error) {
|
|
@@ -17,19 +17,14 @@ const selectLineMessageEditDomain = () => (state) => state.get('lineCreate');
|
|
|
17
17
|
|
|
18
18
|
const makeSelectLine = () => createSelector(
|
|
19
19
|
selectLineDomain(),
|
|
20
|
-
(substate) => substate.toJS()
|
|
20
|
+
(substate) => substate && substate.toJS()
|
|
21
21
|
);
|
|
22
22
|
|
|
23
23
|
const makeSelectCreateLine = () => createSelector(
|
|
24
24
|
selectLineMessageEditDomain(),
|
|
25
|
-
(substate) => substate.toJS()
|
|
25
|
+
(substate) => substate && substate.toJS()
|
|
26
26
|
);
|
|
27
27
|
|
|
28
|
-
// const makeSelectDuplicate = () => createSelector(
|
|
29
|
-
// selectLineDuplicateDomain(),
|
|
30
|
-
// (substate) => substate.toJS()
|
|
31
|
-
// );
|
|
32
|
-
|
|
33
28
|
export {
|
|
34
29
|
makeSelectLine, makeSelectCreateLine,
|
|
35
30
|
};
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import React, {useState} from 'react';
|
|
7
7
|
import { injectIntl, FormattedMessage, intlShape } from 'react-intl';
|
|
8
|
-
import
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import { CapRadioCard, CapLabel, CapButton } from '@capillarytech/cap-ui-library';
|
|
9
10
|
import ComponentWithLabelHOC from '@capillarytech/cap-ui-library/assets/HOCs/ComponentWithLabelHOC';
|
|
10
11
|
import styled from 'styled-components';
|
|
11
12
|
import { CAP_SPACE_04, CAP_SPACE_08, CAP_SPACE_16 } from '@capillarytech/cap-ui-library/styled/variables';
|
|
@@ -33,7 +34,7 @@ const CardContainer = styled.div`
|
|
|
33
34
|
`;
|
|
34
35
|
|
|
35
36
|
const CreateLineWrapper = (props) => {
|
|
36
|
-
const { intl: { formatMessage } } = props;
|
|
37
|
+
const { intl: { formatMessage }, selectedAccount } = props;
|
|
37
38
|
|
|
38
39
|
const getModes = (modeList) => (
|
|
39
40
|
modeList.map(({ label, imageSrc, type, title }) => ({
|
|
@@ -103,12 +104,14 @@ const CreateLineWrapper = (props) => {
|
|
|
103
104
|
{...props}
|
|
104
105
|
params={{mode: selectedLineTemplateOption}}
|
|
105
106
|
route={{name: selectedLineTemplateOption}}
|
|
107
|
+
selectedAccount={selectedAccount}
|
|
106
108
|
/>
|
|
107
109
|
);
|
|
108
110
|
};
|
|
109
111
|
|
|
110
112
|
CreateLineWrapper.propTypes = {
|
|
111
113
|
intl: intlShape.isRequired,
|
|
114
|
+
selectedAccount: PropTypes.object,
|
|
112
115
|
};
|
|
113
116
|
|
|
114
117
|
export default injectIntl(CreateLineWrapper);
|
|
@@ -40,4 +40,16 @@ export default defineMessages({
|
|
|
40
40
|
id: `${prefix}.continue`,
|
|
41
41
|
defaultMessage: 'Continue',
|
|
42
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
|
+
},
|
|
43
55
|
});
|
|
@@ -1714,9 +1714,6 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
1714
1714
|
startValidation={this.state.startValidation}
|
|
1715
1715
|
stopValidation={this.stopValidation}
|
|
1716
1716
|
selectedOfferDetails={this.props.selectedOfferDetails}
|
|
1717
|
-
onPreviewContentClicked={this.props.onPreviewContentClicked}
|
|
1718
|
-
onTestContentClicked={this.props.onTestContentClicked}
|
|
1719
|
-
templateData={this.props.templateData}
|
|
1720
1717
|
/>
|
|
1721
1718
|
</CapColumn>
|
|
1722
1719
|
{this.props.iosCtasData && this.state.showIosCtaTable &&
|
|
@@ -1806,8 +1803,6 @@ Create.propTypes = {
|
|
|
1806
1803
|
isGetFormData: PropTypes.bool,
|
|
1807
1804
|
onValidationFail: PropTypes.func,
|
|
1808
1805
|
getFormLibraryData: PropTypes.func,
|
|
1809
|
-
onPreviewContentClicked: PropTypes.func,
|
|
1810
|
-
onTestContentClicked: PropTypes.func,
|
|
1811
1806
|
};
|
|
1812
1807
|
|
|
1813
1808
|
const mapStateToProps = createStructuredSelector({
|
|
@@ -1801,9 +1801,6 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
1801
1801
|
startValidation={this.state.startValidation}
|
|
1802
1802
|
stopValidation={this.stopValidation}
|
|
1803
1803
|
selectedOfferDetails={this.props.selectedOfferDetails}
|
|
1804
|
-
onPreviewContentClicked={this.props.onPreviewContentClicked}
|
|
1805
|
-
onTestContentClicked={this.props.onTestContentClicked}
|
|
1806
|
-
templateData={this.props.templateData}
|
|
1807
1804
|
/>}
|
|
1808
1805
|
</CapColumn>
|
|
1809
1806
|
{this.props.iosCtasData && this.state.showIosCtaTable &&
|
|
@@ -1896,8 +1893,6 @@ Edit.propTypes = {
|
|
|
1896
1893
|
isGetFormData: PropTypes.bool,
|
|
1897
1894
|
Create: PropTypes.object,
|
|
1898
1895
|
onValidationFail: PropTypes.bool,
|
|
1899
|
-
onPreviewContentClicked: PropTypes.func,
|
|
1900
|
-
onTestContentClicked: PropTypes.func,
|
|
1901
1896
|
};
|
|
1902
1897
|
|
|
1903
1898
|
const mapStateToProps = createStructuredSelector({
|
|
@@ -69,7 +69,7 @@ export class MobilepushWrapper extends React.Component { // eslint-disable-line
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
render() {
|
|
72
|
-
const {mobilePushCreateMode, step, getFormData, setIsLoadingContent, isGetFormData, query, isFullMode, showTemplateName, type, onValidationFail
|
|
72
|
+
const {mobilePushCreateMode, step, getFormData, setIsLoadingContent, isGetFormData, query, isFullMode, showTemplateName, type, onValidationFail} = this.props;
|
|
73
73
|
const {templateName} = this.state;
|
|
74
74
|
const isShowMobilepushCreate = !isEmpty(mobilePushCreateMode);
|
|
75
75
|
return (
|
|
@@ -112,9 +112,6 @@ export class MobilepushWrapper extends React.Component { // eslint-disable-line
|
|
|
112
112
|
route={{ name: 'mobilepush' }}
|
|
113
113
|
getDefaultTags={type}
|
|
114
114
|
onValidationFail={onValidationFail}
|
|
115
|
-
onPreviewContentClicked={onPreviewContentClicked}
|
|
116
|
-
onTestContentClicked={onTestContentClicked}
|
|
117
|
-
templateData={templateData}
|
|
118
115
|
/>
|
|
119
116
|
|
|
120
117
|
|
|
@@ -928,6 +928,7 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
928
928
|
this.setState({startValidation: true}, this.showError);
|
|
929
929
|
}
|
|
930
930
|
render() {
|
|
931
|
+
console.log("this.props sms create: ", this.props);
|
|
931
932
|
const schema = this.state.schema;
|
|
932
933
|
const spinning = this.isSmsLoading();
|
|
933
934
|
let tags = this.props.metaEntities && this.props.metaEntities.tags && this.props.metaEntities.tags.standard ? this.props.metaEntities.tags.standard : [];
|
|
@@ -975,8 +976,6 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
975
976
|
startValidation={this.state.startValidation}
|
|
976
977
|
stopValidation={this.stopValidation}
|
|
977
978
|
selectedOfferDetails={this.props.selectedOfferDetails}
|
|
978
|
-
onTestContentClicked={this.props.onTestContentClicked}
|
|
979
|
-
onPreviewContentClicked={this.props.onPreviewContentClicked}
|
|
980
979
|
/>
|
|
981
980
|
</CapColumn>
|
|
982
981
|
</CapRow>
|
|
@@ -972,8 +972,6 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
972
972
|
startValidation={this.state.startValidation}
|
|
973
973
|
stopValidation={this.stopValidation}
|
|
974
974
|
selectedOfferDetails={this.props.selectedOfferDetails}
|
|
975
|
-
onPreviewContentClicked={this.props.onPreviewContentClicked}
|
|
976
|
-
onTestContentClicked={this.props.onTestContentClicked}
|
|
977
975
|
/>
|
|
978
976
|
</CapColumn>
|
|
979
977
|
</CapRow>
|
|
@@ -13,23 +13,27 @@
|
|
|
13
13
|
&:nth-child(4n+4) { //every 4th child
|
|
14
14
|
margin-right: unset;
|
|
15
15
|
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
16
20
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
21
|
+
.creatives-templates-list {
|
|
22
|
+
.pagination-container {
|
|
23
|
+
.LINE {
|
|
24
|
+
.ant-card-body {
|
|
25
|
+
background-color: $CAP_G09;
|
|
26
|
+
height: 320px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.no-image .ant-card-meta {
|
|
30
|
+
height: 276px;
|
|
31
|
+
background: $CAP_WHITE;
|
|
32
|
+
padding: $CAP_SPACE_16 $CAP_SPACE_12;
|
|
33
|
+
|
|
34
|
+
.ant-card-meta-description {
|
|
35
|
+
height: 250px;
|
|
36
|
+
word-wrap: break-word;
|
|
33
37
|
}
|
|
34
38
|
}
|
|
35
39
|
}
|
|
@@ -43,3 +43,5 @@ export const RESET_TEMPLATE = "app/v2Containers/Templates/RESET_TEMPLATE";
|
|
|
43
43
|
export const RESET_TEMPLATE_DATA = "app/v2Containers/Templates/RESET_TEMPLATE_DATA";
|
|
44
44
|
export const RESET_UPLOAD_DATA = "app/v2Containers/Templates/RESET_UPLOAD_DATA";
|
|
45
45
|
export const CLEAR_TEMPLATE_STORE_DATA = "app/v2Containers/Templates/CLEAR_TEMPLATE_STORE_DATA";
|
|
46
|
+
|
|
47
|
+
export const SET_LINE_ACCOUNT = "app/v2Containers/Templates/SET_LINE_ACCOUNT";
|