@capillarytech/creatives-library 2.0.80 → 2.0.81
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/FormBuilder/index.js +2 -1
- 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/actions.js +6 -0
- package/containers/WeChat/index.js +31 -13
- package/package.json +1 -1
- package/v2Containers/MobilePush/Create/index.js +43 -9
- package/v2Containers/MobilePush/Create/messages.js +16 -0
- package/v2Containers/MobilePush/Edit/index.js +54 -22
- package/v2Containers/MobilePush/Edit/messages.js +17 -1
- package/v2Containers/MobilePush/commonMethods.js +9 -7
|
@@ -14,7 +14,7 @@ import { notification } from 'antd';
|
|
|
14
14
|
import { createStructuredSelector } from 'reselect';
|
|
15
15
|
import { injectIntl, intlShape, FormattedMessage } from 'react-intl';
|
|
16
16
|
import _, {get, findIndex, set, forEach, cloneDeep} from 'lodash';
|
|
17
|
-
import { CapSpin, CapSlideBox, CapHeader, CapTable, CapLink, CapRow, CapColumn, CapIcons} from '@capillarytech/cap-ui-library';
|
|
17
|
+
import { CapSpin, CapSlideBox, CapHeader, CapTable, CapLink, CapRow, CapColumn, CapIcons, CapNotification} from '@capillarytech/cap-ui-library';
|
|
18
18
|
import styled from 'styled-components';
|
|
19
19
|
import {makeSelectEdit, makeSelectEditResponse, makeSelectTemplateDetailsResponse, makeSelectIosCta} from "./selectors";
|
|
20
20
|
import {makeSelectMetaEntities, setInjectedTags, isLoadingMetaEntities} from "../../Cap/selectors";
|
|
@@ -168,7 +168,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
168
168
|
this.setState({formData});
|
|
169
169
|
this.props.actions.clearAsset();
|
|
170
170
|
}
|
|
171
|
-
if (nextProps.iosCtasData) {
|
|
171
|
+
if (nextProps.iosCtasData && _.isEmpty(this.state.templateCta)) {
|
|
172
172
|
this.setState({showIosCtaTable: true});
|
|
173
173
|
}
|
|
174
174
|
if (nextProps.Edit.editTemplateError && !_.isEqual(nextProps.Edit.editTemplateError, this.props.Edit.editTemplateError)) {
|
|
@@ -194,11 +194,11 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
194
194
|
const newFormData = _.cloneDeep(formData);
|
|
195
195
|
const {templateCta} = this.state;
|
|
196
196
|
if (!_.isEmpty(templateCta) && this.state.currentTab === 2) {
|
|
197
|
-
newFormData[this.state.currentTab - 1][`secondary-cta-${this.state.currentTab - 1}-label`] = templateCta
|
|
198
|
-
newFormData[this.state.currentTab - 1][`secondary-cta-${this.state.currentTab - 1}-action`] = templateCta
|
|
197
|
+
newFormData[this.state.currentTab - 1][`secondary-cta-${this.state.currentTab - 1}-label`] = get(templateCta, 'name');
|
|
198
|
+
newFormData[this.state.currentTab - 1][`secondary-cta-${this.state.currentTab - 1}-action`] = get(templateCta, 'ctaTemplateDetails[0].buttonText');
|
|
199
199
|
delete newFormData[this.state.currentTab - 1][`secondary-cta-${this.state.currentTab - 1}-action2`];
|
|
200
|
-
if (templateCta
|
|
201
|
-
newFormData[this.state.currentTab - 1][`secondary-cta-${this.state.currentTab - 1}-action2`] = templateCta
|
|
200
|
+
if (get(templateCta, 'ctaTemplateDetails[1]')) {
|
|
201
|
+
newFormData[this.state.currentTab - 1][`secondary-cta-${this.state.currentTab - 1}-action2`] = get(templateCta, 'ctaTemplateDetails[1].buttonText');
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
if (newFormData["mobilepush-accounts"] !== this.state.formData["mobilepush-accounts"]) {
|
|
@@ -239,7 +239,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
239
239
|
// if (field.id === "cta-deeplink-secondary-cta-1" && (tabIndex > 1 || this.state.currentTab > 1)) {
|
|
240
240
|
// inputId = `${inputId}${tabIndex || this.state.currentTab}`;
|
|
241
241
|
// }
|
|
242
|
-
const newInputFields = this.getLinkTypeFields({inputFieldsArgs: inputFields, fieldIndex, deepLinkOptions, formData, field});
|
|
242
|
+
const newInputFields = this.getLinkTypeFields({inputFieldsArgs: inputFields, fieldIndex, deepLinkOptions, formData, field, tab: currentTab});
|
|
243
243
|
set(schema, `containers[0].panes[${tabIndex - 1}].sections[0].childSections[0].childSections[0].inputFields`, newInputFields);
|
|
244
244
|
|
|
245
245
|
if (currentTab) { // identifying where ist called from setEditData or by event handler
|
|
@@ -512,7 +512,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
512
512
|
actionLabel: ios['secondary-cta-1-action'],
|
|
513
513
|
actionLabel2: ios['secondary-cta-1-action2'],
|
|
514
514
|
type: ios['cta-deeplink-secondary-cta-1'] && (ios['cta-deeplink-secondary-cta-1'].toLowerCase() === "deeplink" ? "DEEP_LINK" : "EXTERNAL_URL"),
|
|
515
|
-
actionLink: ios['cta-deeplink-secondary-cta-1'] && (ios['cta-deeplink-secondary-cta-1'].toLowerCase() === "deeplink" ? ios['cta-deeplink-secondary-cta-1-select2'] : ios['cta-deeplink-secondary-cta-1-
|
|
515
|
+
actionLink: ios['cta-deeplink-secondary-cta-1'] && (ios['cta-deeplink-secondary-cta-1'].toLowerCase() === "deeplink" ? ios['cta-deeplink-secondary-cta-1-select2'] : ios['cta-deeplink-secondary-cta-1-text']),
|
|
516
516
|
ioscdeepLinkName: this.getLinkName(ios['cta-deeplink-secondary-cta-1-select']),
|
|
517
517
|
templateCtaId,
|
|
518
518
|
};
|
|
@@ -546,9 +546,41 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
546
546
|
}
|
|
547
547
|
return undefined;
|
|
548
548
|
};
|
|
549
|
+
showError = () => {
|
|
550
|
+
const {intl} = this.props;
|
|
551
|
+
const {errorData} = this.state;
|
|
552
|
+
const errorMessage = {key: 'validation-error', message: intl.formatMessage(messages.validationError)};
|
|
553
|
+
let isTagErrorExist = false;
|
|
554
|
+
if (!_.isEmpty(this.state.formData) && !this.state.isFormValid) {
|
|
555
|
+
let tab = this.state.currentTab;
|
|
556
|
+
const isAndroidInvalid = Object.values(errorData[0]).includes(true);
|
|
557
|
+
const isIosInvalid = Object.values(errorData[1]).includes(true);
|
|
558
|
+
if (isAndroidInvalid) {
|
|
559
|
+
tab = 1;
|
|
560
|
+
errorMessage.description = intl.formatMessage(messages.invalidAndroidMessage);
|
|
561
|
+
const invalidTags = errorData[0]['invalid-tags'];
|
|
562
|
+
if (!_.isEmpty(invalidTags)) {
|
|
563
|
+
isTagErrorExist = true;
|
|
564
|
+
errorMessage.description = `${intl.formatMessage(messages.invalidAndroidMessage)} ${intl.formatMessage(messages.invalidTags)}: ${invalidTags.join(',')} `;
|
|
565
|
+
}
|
|
566
|
+
} else if (isIosInvalid) {
|
|
567
|
+
tab = 2;
|
|
568
|
+
errorMessage.description = intl.formatMessage(messages.invalidIosMessage);
|
|
569
|
+
const invalidTags = errorData[1]['invalid-tags'];
|
|
570
|
+
if (!_.isEmpty(invalidTags)) {
|
|
571
|
+
isTagErrorExist = true;
|
|
572
|
+
errorMessage.description = `${intl.formatMessage(messages.invalidIosMessage)} ${intl.formatMessage(messages.invalidTags)}: ${invalidTags.join(',')} `;
|
|
573
|
+
}
|
|
574
|
+
}
|
|
549
575
|
|
|
550
|
-
|
|
551
|
-
|
|
576
|
+
if (tab !== this.state.currentTab || isTagErrorExist) {
|
|
577
|
+
CapNotification.error(errorMessage);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
setFormValidity = (isFormValid, errorData) => {
|
|
582
|
+
const newState = {isFormValid, errorData};
|
|
583
|
+
this.setState(newState);
|
|
552
584
|
};
|
|
553
585
|
|
|
554
586
|
getMappedEvent = (id, event) => {
|
|
@@ -577,7 +609,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
577
609
|
validity: this.state.isFormValid,
|
|
578
610
|
};
|
|
579
611
|
console.log('GetForm Data ', response);
|
|
580
|
-
this.setState({checkValidation: true});
|
|
612
|
+
this.setState({checkValidation: true}, this.showError);
|
|
581
613
|
if (e) {
|
|
582
614
|
e.source.postMessage(JSON.stringify(response), e.origin);
|
|
583
615
|
}
|
|
@@ -693,14 +725,14 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
693
725
|
ios.image = iosData.expandableDetails.image;
|
|
694
726
|
}
|
|
695
727
|
if (iosData.expandableDetails && iosData.expandableDetails.ctas && iosData.expandableDetails.ctas.length) {
|
|
696
|
-
|
|
728
|
+
ios['add-sec-cta-ios'] = true;
|
|
697
729
|
if (iosData.expandableDetails.ctas[0].type) {
|
|
698
730
|
ios['cta-deeplink-secondary-cta-1'] = iosData.expandableDetails.ctas[0].type === "DEEP_LINK" ? "Deeplink" : "External Link";
|
|
699
731
|
}
|
|
700
732
|
if (iosData.expandableDetails.ctas[0].type === "DEEP_LINK") {
|
|
701
733
|
ios['cta-deeplink-secondary-cta-1-select2'] = iosData.expandableDetails.ctas[0].actionLink;
|
|
702
734
|
} else {
|
|
703
|
-
ios['cta-deeplink-secondary-cta-1-
|
|
735
|
+
ios['cta-deeplink-secondary-cta-1-text'] = iosData.expandableDetails.ctas[0].actionLink;
|
|
704
736
|
}
|
|
705
737
|
ios['secondary-cta-1-label'] = iosData.expandableDetails.ctas[0].actionText;
|
|
706
738
|
if (iosData.expandableDetails.ctas[0].type === "DEEP_LINK" && ios['cta-deeplink-secondary-cta-1-select2']) {
|
|
@@ -768,7 +800,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
768
800
|
if (formData[1]['secondary-cta-1-action']) {
|
|
769
801
|
formData[1]['add-sec-cta-ios'] = true;
|
|
770
802
|
|
|
771
|
-
schema = this.showSelectedIosCta(schema, {id: 'add-sec-cta-ios'}, 2,
|
|
803
|
+
schema = this.showSelectedIosCta(schema, {id: 'add-sec-cta-ios'}, 2, this.state.templateCta, formData[1]['cta-deeplink-secondary-cta-1']);
|
|
772
804
|
schema = this.onLinkTypeChange(true, formData, {id: 'cta-deeplink-secondary-cta-1'}, 2, schema);
|
|
773
805
|
schema = this.showCtaKeys(true, formData, {id: 'cta-deeplink-secondary-cta-1-select2'}, 2, schema);
|
|
774
806
|
}
|
|
@@ -966,7 +998,9 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
966
998
|
|
|
967
999
|
],
|
|
968
1000
|
});
|
|
969
|
-
|
|
1001
|
+
const selectedConfigTemplateCtaId = get(selectedConfig, 'ctaTemplateDetails[0].id');
|
|
1002
|
+
// the option to select deeplink and externa link should not come for these ctas
|
|
1003
|
+
if (selectedConfigTemplateCtaId && (selectedConfigTemplateCtaId.id !== "3heicig" && selectedConfigTemplateCtaId.id !== "6eigf4f" && selectedConfigTemplateCtaId.id !== "c97d0ed")) {
|
|
970
1004
|
inputFields.splice(fieldIndex + 2, 0, {
|
|
971
1005
|
rowClassName: "mobile-push-row",
|
|
972
1006
|
identifier: `cta-deeplink-${inputId}`,
|
|
@@ -1028,10 +1062,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
1028
1062
|
}
|
|
1029
1063
|
});
|
|
1030
1064
|
});
|
|
1031
|
-
|
|
1032
|
-
this.setState({schema, initialState: this.state.initialState ? this.state.initialState : this.state.schema, isSchemaChanged: true});
|
|
1033
|
-
this.injectEvents(schema);
|
|
1034
|
-
}
|
|
1065
|
+
this.setState({schema, initialState: this.state.initialState ? this.state.initialState : this.state.schema, isSchemaChanged: true}, () => { this.injectEvents(schema); });
|
|
1035
1066
|
return schema;
|
|
1036
1067
|
};
|
|
1037
1068
|
|
|
@@ -1553,7 +1584,7 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
1553
1584
|
const fieldIndex = findIndex(inputFields, {identifier: id});
|
|
1554
1585
|
let newInputFields;
|
|
1555
1586
|
if (formData[tabIndex - 1][id]) {
|
|
1556
|
-
newInputFields = this.getPrimaryCtaFields({inputFields, fieldIndex, deepLinkOptions});
|
|
1587
|
+
newInputFields = this.getPrimaryCtaFields({inputFields, fieldIndex, deepLinkOptions, tab: currentTab});
|
|
1557
1588
|
} else {
|
|
1558
1589
|
const identifier = (tabIndex - 1) ? 'add-sec-cta-ios' : 'add-sec-cta';
|
|
1559
1590
|
const indexOfNextField = findIndex(inputFields, {identifier});
|
|
@@ -1564,8 +1595,9 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
1564
1595
|
if (inputSchema) {
|
|
1565
1596
|
return schema;
|
|
1566
1597
|
}
|
|
1567
|
-
this.setState({schema, initialState: this.state.initialState ? this.state.initialState : this.state.schema, isSchemaChanged: true})
|
|
1568
|
-
|
|
1598
|
+
this.setState({schema, initialState: this.state.initialState ? this.state.initialState : this.state.schema, isSchemaChanged: true}, () => {
|
|
1599
|
+
this.injectEvents(schema);
|
|
1600
|
+
});
|
|
1569
1601
|
return schema;
|
|
1570
1602
|
};
|
|
1571
1603
|
|
|
@@ -247,7 +247,23 @@ export default defineMessages({
|
|
|
247
247
|
defaultMessage: 'IOS template is not configured, Save without IOS template',
|
|
248
248
|
},
|
|
249
249
|
"selectActionButton": {
|
|
250
|
-
id: 'app.containers.MobilePush.
|
|
250
|
+
id: 'app.containers.MobilePush.Edit.mobilePush',
|
|
251
251
|
defaultMessage: 'Select action buttons',
|
|
252
252
|
},
|
|
253
|
+
"validationError": {
|
|
254
|
+
id: 'app.containers.MobilePush.Edit.validationError',
|
|
255
|
+
defaultMessage: 'Validation error',
|
|
256
|
+
},
|
|
257
|
+
"invalidIosMessage": {
|
|
258
|
+
id: 'app.containers.MobilePush.Edit.invalidIosMessage',
|
|
259
|
+
defaultMessage: 'Validation failed for IOS',
|
|
260
|
+
},
|
|
261
|
+
"invalidAndroidMessage": {
|
|
262
|
+
id: 'app.containers.MobilePush.Edit.invalidAndroidMessage',
|
|
263
|
+
defaultMessage: 'Validation failed for Android',
|
|
264
|
+
},
|
|
265
|
+
"invalidTags": {
|
|
266
|
+
id: 'app.containers.MobilePush.Create.invalidTags',
|
|
267
|
+
defaultMessage: 'Invalid tags',
|
|
268
|
+
},
|
|
253
269
|
});
|
|
@@ -2,15 +2,16 @@ import {get, filter, cloneDeep} from 'lodash';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import {FormattedMessage} from 'react-intl';
|
|
4
4
|
import messages from './Create/messages';
|
|
5
|
-
function getPrimaryCtaFields({inputFields, fieldIndex, deepLinkOptions}) {
|
|
5
|
+
function getPrimaryCtaFields({inputFields, fieldIndex, deepLinkOptions, tab}) {
|
|
6
|
+
const currentTab = tab || this.state.currentTab;
|
|
6
7
|
const newInputFields = cloneDeep(inputFields);
|
|
7
8
|
newInputFields.splice(fieldIndex + 1, 0, {
|
|
8
9
|
rowClassName: 'mobile-push-row',
|
|
9
|
-
identifier: `cta-deeplink${
|
|
10
|
+
identifier: `cta-deeplink${currentTab > 1 ? currentTab : ''}`,
|
|
10
11
|
|
|
11
12
|
cols: [
|
|
12
13
|
{
|
|
13
|
-
id: `cta-deeplink${
|
|
14
|
+
id: `cta-deeplink${currentTab > 1 ? currentTab : ''}`,
|
|
14
15
|
type: "radioGroup", //Resembles component to be used
|
|
15
16
|
metaType: "text",
|
|
16
17
|
datatype: "string",
|
|
@@ -33,12 +34,12 @@ function getPrimaryCtaFields({inputFields, fieldIndex, deepLinkOptions}) {
|
|
|
33
34
|
newInputFields.splice(fieldIndex + 2, 0, {
|
|
34
35
|
rowClassName: 'mobile-push-row',
|
|
35
36
|
id: 'cta-deeplink-select-section',
|
|
36
|
-
identifier: `cta-deeplink${
|
|
37
|
+
identifier: `cta-deeplink${currentTab > 1 ? currentTab : ''}-select`,
|
|
37
38
|
|
|
38
39
|
cols: [
|
|
39
40
|
|
|
40
41
|
{
|
|
41
|
-
id: `cta-deeplink${
|
|
42
|
+
id: `cta-deeplink${currentTab > 1 ? currentTab : ''}-select`,
|
|
42
43
|
placeholder: "Select DeepLink",
|
|
43
44
|
type: "select", //Resembles component to be used
|
|
44
45
|
options: deepLinkOptions,
|
|
@@ -153,10 +154,11 @@ function getSecondaryCtaFields({inputFields, fieldIndex, deepLinkOptions}) {
|
|
|
153
154
|
});
|
|
154
155
|
return newInputFields;
|
|
155
156
|
}
|
|
156
|
-
function getLinkTypeFields({inputFieldsArgs, fieldIndex, deepLinkOptions, formData, field}) {
|
|
157
|
+
function getLinkTypeFields({inputFieldsArgs, fieldIndex, deepLinkOptions, formData, field, tab}) {
|
|
158
|
+
const currentTab = tab || this.state.currentTab;
|
|
157
159
|
const inputFields = cloneDeep(inputFieldsArgs);
|
|
158
160
|
const deeplinks = this.props.Templates.selectedWeChatAccount && this.props.Templates.selectedWeChatAccount.configs && !!this.props.Templates.selectedWeChatAccount.configs.deeplink ? this.props.Templates.selectedWeChatAccount.configs.deeplink : '[]';
|
|
159
|
-
const deeplinkValue = formData[
|
|
161
|
+
const deeplinkValue = formData[currentTab - 1][field.id];
|
|
160
162
|
const componentIndex = fieldIndex + 1;
|
|
161
163
|
const inputId = deeplinkValue && deeplinkValue.toLowerCase() === "deeplink" ? `${field.id}-select` : `${field.id}-text`;
|
|
162
164
|
if ( deeplinkValue && deeplinkValue.toLowerCase() === "deeplink" && (fieldIndex === inputFields.length - 1 || inputFields[componentIndex].id !== "cta-deeplink-select-section")) {
|