@capillarytech/creatives-library 8.0.168-alpha.1 → 8.0.168-beta.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/package.json +1 -1
- package/utils/test-utils.js +2 -6
- package/v2Components/CapActionButton/index.js +12 -52
- package/v2Components/CapActionButton/messages.js +0 -4
- package/v2Components/CapActionButton/tests/index.test.js +0 -135
- package/v2Components/CapDeviceContent/index.js +0 -5
- package/v2Components/CapInAppCTA/index.js +14 -29
- package/v2Components/CapInAppCTA/index.scss +2 -0
- package/v2Components/CapInAppCTA/messages.js +0 -4
- package/v2Components/CapMpushCTA/index.js +38 -54
- package/v2Components/CapMpushCTA/index.scss +2 -2
- package/v2Components/CapMpushCTA/messages.js +0 -4
- package/v2Components/FormBuilder/index.js +1 -93
- package/v2Components/TestAndPreviewSlidebox/PreviewSection.js +1 -1
- package/v2Components/TestAndPreviewSlidebox/index.js +4 -24
- package/v2Containers/CreativesContainer/index.js +1 -1
- package/v2Containers/Email/index.js +3 -64
- package/v2Containers/Email/initialSchema.js +21 -7
- package/v2Containers/MobilePush/Create/index.js +3 -23
- package/v2Containers/MobilePush/commonMethods.js +3 -24
- package/v2Containers/MobilePushNew/components/CtaButtons.js +0 -20
- package/v2Containers/MobilePushNew/components/MediaUploaders.js +3 -31
- package/v2Containers/MobilePushNew/components/PlatformContentFields.js +3 -34
- package/v2Containers/MobilePushNew/components/tests/MediaUploaders.test.js +5 -153
- package/v2Containers/MobilePushNew/index.js +0 -9
- package/v2Containers/MobilePushNew/index.scss +1 -2
- package/v2Containers/Rcs/index.js +71 -77
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +492 -15270
- package/v2Containers/Viber/index.js +76 -102
- package/v2Components/CapTagListWithInput/index.js +0 -169
- package/v2Components/CapTagListWithInput/messages.js +0 -10
package/package.json
CHANGED
package/utils/test-utils.js
CHANGED
|
@@ -7,14 +7,10 @@ import history from './history';
|
|
|
7
7
|
import { Provider } from 'react-redux';
|
|
8
8
|
import { configureStore } from '@capillarytech/vulcan-react-sdk/utils';
|
|
9
9
|
import { initialReducer } from '../initialReducer';
|
|
10
|
+
import initialState from '../initialState';
|
|
10
11
|
|
|
11
12
|
function Wrapper({ children }) {
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<Provider store={store}>
|
|
15
|
-
<IntlProvider locale="en">{children}</IntlProvider>
|
|
16
|
-
</Provider>
|
|
17
|
-
);
|
|
13
|
+
return <IntlProvider locale="en">{children}</IntlProvider>;
|
|
18
14
|
}
|
|
19
15
|
Wrapper.propTypes = {
|
|
20
16
|
children: PropTypes.array,
|
|
@@ -9,12 +9,10 @@ import CapDivider from '@capillarytech/cap-ui-library/CapDivider';
|
|
|
9
9
|
import CapButton from '@capillarytech/cap-ui-library/CapButton';
|
|
10
10
|
import CapTooltip from '@capillarytech/cap-ui-library/CapTooltip';
|
|
11
11
|
import CapLabel from '@capillarytech/cap-ui-library/CapLabel';
|
|
12
|
-
import CapTagListWithInput from '../CapTagListWithInput';
|
|
13
12
|
|
|
14
13
|
import { isUrl } from '../../v2Containers/Line/Container/Wrapper/utils';
|
|
15
14
|
import messages from './messages';
|
|
16
15
|
import './index.scss';
|
|
17
|
-
|
|
18
16
|
export const CapActionButton = (props) => {
|
|
19
17
|
const {
|
|
20
18
|
intl,
|
|
@@ -22,12 +20,6 @@ export const CapActionButton = (props) => {
|
|
|
22
20
|
type,
|
|
23
21
|
updateButtonChange,
|
|
24
22
|
suggestions = [],
|
|
25
|
-
tags = [],
|
|
26
|
-
injectedTags = {},
|
|
27
|
-
location = {},
|
|
28
|
-
selectedOfferDetails = [],
|
|
29
|
-
|
|
30
|
-
onContextChange,
|
|
31
23
|
} = props;
|
|
32
24
|
const { text = '', url = '' } = suggestions[0] || {};
|
|
33
25
|
const [buttonText, setButtonText] = useState(text || '');
|
|
@@ -36,13 +28,6 @@ export const CapActionButton = (props) => {
|
|
|
36
28
|
|
|
37
29
|
const { formatMessage } = intl;
|
|
38
30
|
|
|
39
|
-
const handleTagSelect = (data) => {
|
|
40
|
-
const tempMsg = `${buttonLink}{{${data}}}`;
|
|
41
|
-
setButtonLink(tempMsg);
|
|
42
|
-
onButtonLinkChange({ target: { value: tempMsg } });
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
|
|
46
31
|
const onButtonTextChange = (e) => {
|
|
47
32
|
const val = e.target.value;
|
|
48
33
|
setButtonText(val);
|
|
@@ -96,24 +81,18 @@ export const CapActionButton = (props) => {
|
|
|
96
81
|
}
|
|
97
82
|
/>
|
|
98
83
|
|
|
99
|
-
{/* button Link
|
|
100
|
-
<
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
onTagSelect={handleTagSelect}
|
|
112
|
-
onContextChange={onContextChange}
|
|
113
|
-
location={location}
|
|
114
|
-
tags={tags}
|
|
115
|
-
injectedTags={injectedTags}
|
|
116
|
-
selectedOfferDetails={selectedOfferDetails}
|
|
84
|
+
{/* button Link */}
|
|
85
|
+
<CapHeading type="h4" style={{ paddingTop: '20px' }}>
|
|
86
|
+
<FormattedMessage {...messages.templateButtonLink} />
|
|
87
|
+
</CapHeading>
|
|
88
|
+
<CapInput
|
|
89
|
+
id="rcs-template-Button-link"
|
|
90
|
+
onChange={onButtonLinkChange}
|
|
91
|
+
placeholder={formatMessage(messages.templateButtonLinkPlaceholder)}
|
|
92
|
+
data-testid="cta_btn_link"
|
|
93
|
+
value={buttonLink}
|
|
94
|
+
size="default"
|
|
95
|
+
errorMessage={buttonURLErrorMessage}
|
|
117
96
|
/>
|
|
118
97
|
|
|
119
98
|
{/* divider */}
|
|
@@ -143,25 +122,6 @@ CapActionButton.propTypes = {
|
|
|
143
122
|
type: PropTypes.string,
|
|
144
123
|
updateButtonChange: PropTypes.func,
|
|
145
124
|
suggestions: PropTypes.array,
|
|
146
|
-
tags: PropTypes.array,
|
|
147
|
-
injectedTags: PropTypes.object,
|
|
148
|
-
location: PropTypes.object,
|
|
149
|
-
selectedOfferDetails: PropTypes.array,
|
|
150
|
-
onTagSelect: PropTypes.func,
|
|
151
|
-
onContextChange: PropTypes.func,
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
CapActionButton.defaultProps = {
|
|
155
|
-
buttonTextlen: 20,
|
|
156
|
-
type: '',
|
|
157
|
-
updateButtonChange: () => {},
|
|
158
|
-
suggestions: [],
|
|
159
|
-
tags: [],
|
|
160
|
-
injectedTags: {},
|
|
161
|
-
location: {},
|
|
162
|
-
selectedOfferDetails: [],
|
|
163
|
-
onTagSelect: () => {},
|
|
164
|
-
onContextChange: () => {},
|
|
165
125
|
};
|
|
166
126
|
|
|
167
127
|
export default injectIntl(CapActionButton);
|
|
@@ -30,8 +30,4 @@ export default defineMessages({
|
|
|
30
30
|
id: `${prefix}.comingSoonTooltip`,
|
|
31
31
|
defaultMessage: 'Right now only one Call to action button is enabled, in future you would be able to add upto 3 buttons.',
|
|
32
32
|
},
|
|
33
|
-
addLabels: {
|
|
34
|
-
id: `${prefix}.addLabels`,
|
|
35
|
-
defaultMessage: 'Add Labels',
|
|
36
|
-
},
|
|
37
33
|
});
|
|
@@ -10,132 +10,6 @@ import {
|
|
|
10
10
|
} from '../../../utils/test-utils';
|
|
11
11
|
import { CapActionButton } from "../index";
|
|
12
12
|
|
|
13
|
-
// Mock Cap UI Library components
|
|
14
|
-
jest.mock('@capillarytech/cap-ui-library/CapRow', () =>
|
|
15
|
-
function MockCapRow({ children, ...props }) {
|
|
16
|
-
return <div {...props} data-testid="cap-row">{children}</div>;
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
jest.mock('@capillarytech/cap-ui-library/CapHeading', () =>
|
|
21
|
-
function MockCapHeading({ children, type, ...props }) {
|
|
22
|
-
const Tag = type === 'h4' ? 'h4' : 'div';
|
|
23
|
-
return <Tag {...props} data-testid="cap-heading">{children}</Tag>;
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
jest.mock('@capillarytech/cap-ui-library/CapInput', () =>
|
|
28
|
-
function MockCapInput({ onChange, value, placeholder, ...props }) {
|
|
29
|
-
return (
|
|
30
|
-
<input
|
|
31
|
-
type="text"
|
|
32
|
-
value={value || ''}
|
|
33
|
-
onChange={onChange}
|
|
34
|
-
placeholder={placeholder}
|
|
35
|
-
{...props}
|
|
36
|
-
data-testid="cap-input"
|
|
37
|
-
/>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
jest.mock('@capillarytech/cap-ui-library/CapDivider', () =>
|
|
43
|
-
function MockCapDivider({ ...props }) {
|
|
44
|
-
return <hr {...props} data-testid="cap-divider" />;
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
|
|
48
|
-
jest.mock('@capillarytech/cap-ui-library/CapButton', () =>
|
|
49
|
-
function MockCapButton({ children, ...props }) {
|
|
50
|
-
return <button {...props} data-testid="cap-button">{children}</button>;
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
jest.mock('@capillarytech/cap-ui-library/CapTooltip', () =>
|
|
55
|
-
function MockCapTooltip({ children, title, ...props }) {
|
|
56
|
-
return (
|
|
57
|
-
<div {...props} data-testid="cap-tooltip" title={title}>
|
|
58
|
-
{children}
|
|
59
|
-
</div>
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
|
|
64
|
-
jest.mock('@capillarytech/cap-ui-library/CapLabel', () =>
|
|
65
|
-
function MockCapLabel({ children, ...props }) {
|
|
66
|
-
return <label {...props} data-testid="cap-label">{children}</label>;
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
|
|
70
|
-
jest.mock('@capillarytech/cap-ui-library/CapColumn', () =>
|
|
71
|
-
function MockCapColumn({ children, ...props }) {
|
|
72
|
-
return <div {...props} data-testid="cap-column">{children}</div>;
|
|
73
|
-
}
|
|
74
|
-
);
|
|
75
|
-
|
|
76
|
-
jest.mock('../../../v2Containers/TagList', () =>
|
|
77
|
-
function MockTagList({ label, onTagSelect, onContextChange, ...props }) {
|
|
78
|
-
return (
|
|
79
|
-
<div data-testid="tag-list" {...props}>
|
|
80
|
-
<button
|
|
81
|
-
type="button"
|
|
82
|
-
onClick={() => onTagSelect && onTagSelect('test-tag')}
|
|
83
|
-
data-testid="tag-select-button"
|
|
84
|
-
>
|
|
85
|
-
{label || 'Add Label'}
|
|
86
|
-
</button>
|
|
87
|
-
</div>
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
|
|
92
|
-
jest.mock('../../../v2Containers/Line/Container/Wrapper/utils', () => ({
|
|
93
|
-
isUrl: jest.fn((url) => {
|
|
94
|
-
if (!url) return false;
|
|
95
|
-
return url.startsWith('http://') || url.startsWith('https://');
|
|
96
|
-
}),
|
|
97
|
-
}));
|
|
98
|
-
|
|
99
|
-
jest.mock('../messages', () => ({
|
|
100
|
-
__esModule: true,
|
|
101
|
-
default: {
|
|
102
|
-
templateButtonText: {
|
|
103
|
-
id: 'creatives.componentsV2.CapActionButton.templateButtonText',
|
|
104
|
-
defaultMessage: 'Button text',
|
|
105
|
-
},
|
|
106
|
-
templateButtonTextPlaceholder: {
|
|
107
|
-
id: 'creatives.componentsV2.CapActionButton.templateButtonTextPlaceholder',
|
|
108
|
-
defaultMessage: 'Enter button text',
|
|
109
|
-
},
|
|
110
|
-
templateButtonLink: {
|
|
111
|
-
id: 'creatives.componentsV2.CapActionButton.templateButtonLink',
|
|
112
|
-
defaultMessage: 'Button link',
|
|
113
|
-
},
|
|
114
|
-
templateButtonLinkPlaceholder: {
|
|
115
|
-
id: 'creatives.componentsV2.CapActionButton.templateButtonLinkPlaceholder',
|
|
116
|
-
defaultMessage: 'Enter button link',
|
|
117
|
-
},
|
|
118
|
-
addButton: {
|
|
119
|
-
id: 'creatives.componentsV2.CapActionButton.addButton',
|
|
120
|
-
defaultMessage: 'Add button',
|
|
121
|
-
},
|
|
122
|
-
inValidUrlErrorMessage: {
|
|
123
|
-
id: 'creatives.componentsV2.CapActionButton.inValidUrlErrorMessage',
|
|
124
|
-
defaultMessage: 'Button URL is not valid',
|
|
125
|
-
},
|
|
126
|
-
comingSoonTooltip: {
|
|
127
|
-
id: 'creatives.componentsV2.CapActionButton.comingSoonTooltip',
|
|
128
|
-
defaultMessage: 'Right now only one Call to action button is enabled, in future you would be able to add upto 3 buttons.',
|
|
129
|
-
},
|
|
130
|
-
addLabels: {
|
|
131
|
-
id: 'creatives.componentsV2.CapActionButton.addLabels',
|
|
132
|
-
defaultMessage: 'Add Labels',
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
}));
|
|
136
|
-
|
|
137
|
-
jest.mock('../index.scss', () => ({}));
|
|
138
|
-
|
|
139
13
|
|
|
140
14
|
const initializeComponent = () => {
|
|
141
15
|
const Component = injectIntl(CapActionButton);
|
|
@@ -144,15 +18,6 @@ const initializeComponent = () => {
|
|
|
144
18
|
buttonTextlen={200}
|
|
145
19
|
updateButtonChange={() => {}}
|
|
146
20
|
suggestions={[{text: "text", url: 'url'}]}
|
|
147
|
-
tags={[]}
|
|
148
|
-
injectedTags={{}}
|
|
149
|
-
location={{}}
|
|
150
|
-
selectedOfferDetails={[]}
|
|
151
|
-
onContextChange={() => {}}
|
|
152
|
-
onButtonLinkChange={() => {}}
|
|
153
|
-
globalActions={{
|
|
154
|
-
fetchSchemaForEntity: () => {}
|
|
155
|
-
}}
|
|
156
21
|
/>);
|
|
157
22
|
};
|
|
158
23
|
|
|
@@ -337,11 +337,6 @@ const CapDeviceContent = (props) => {
|
|
|
337
337
|
deleteHandler={deleteHandler}
|
|
338
338
|
isEditFlow={isEditFlow}
|
|
339
339
|
deepLink={deepLink}
|
|
340
|
-
onContextChange={handleOnTagsContextChange}
|
|
341
|
-
location={location}
|
|
342
|
-
tags={tags}
|
|
343
|
-
injectedTags={injectedTags}
|
|
344
|
-
selectedOfferDetails={selectedOfferDetails}
|
|
345
340
|
/>
|
|
346
341
|
)}
|
|
347
342
|
</CapRow>
|
|
@@ -29,7 +29,6 @@ import {
|
|
|
29
29
|
CTA_OPTIONS,
|
|
30
30
|
URL_MAX_LENGTH,
|
|
31
31
|
} from "./constants";
|
|
32
|
-
import CapTagListWithInput from "../CapTagListWithInput";
|
|
33
32
|
|
|
34
33
|
export const CapInAppCTA = (props) => {
|
|
35
34
|
const {
|
|
@@ -37,12 +36,9 @@ export const CapInAppCTA = (props) => {
|
|
|
37
36
|
ctaData = [],
|
|
38
37
|
updateHandler,
|
|
39
38
|
deleteHandler,
|
|
39
|
+
isEditFlow,
|
|
40
40
|
deepLink,
|
|
41
|
-
|
|
42
|
-
location,
|
|
43
|
-
tags,
|
|
44
|
-
injectedTags,
|
|
45
|
-
selectedOfferDetails,
|
|
41
|
+
channel,
|
|
46
42
|
} = props;
|
|
47
43
|
const { formatMessage } = intl;
|
|
48
44
|
|
|
@@ -126,12 +122,6 @@ export const CapInAppCTA = (props) => {
|
|
|
126
122
|
const renderArray = [];
|
|
127
123
|
ctaData?.forEach((cta) => {
|
|
128
124
|
const { index, text, url, urlType, isSaved } = cta || {};
|
|
129
|
-
|
|
130
|
-
const onButtonTagSelect = (data) => {
|
|
131
|
-
const newUrl = `${url}{{${data}}}`;
|
|
132
|
-
updateHelper('url', newUrl, index);
|
|
133
|
-
};
|
|
134
|
-
|
|
135
125
|
//this is to display buttons after they are saved, in both create and edit mode.
|
|
136
126
|
if (isSaved) {
|
|
137
127
|
renderArray.push(
|
|
@@ -235,23 +225,18 @@ export const CapInAppCTA = (props) => {
|
|
|
235
225
|
)}
|
|
236
226
|
{urlType === EXTERNAL_URL && (
|
|
237
227
|
<>
|
|
238
|
-
<
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
onContextChange={onContextChange}
|
|
251
|
-
location={location}
|
|
252
|
-
tags={tags || []}
|
|
253
|
-
injectedTags={injectedTags || {}}
|
|
254
|
-
selectedOfferDetails={selectedOfferDetails}
|
|
228
|
+
<CapHeading type="h4">
|
|
229
|
+
{formatMessage(messages.urlExternalLink)}
|
|
230
|
+
</CapHeading>
|
|
231
|
+
<CapInput
|
|
232
|
+
id="inapp-cta-external-link"
|
|
233
|
+
className="inapp-cta-external-link"
|
|
234
|
+
onChange={onUrlChange}
|
|
235
|
+
placeholder={formatMessage(messages.ctaExternalLinkPlaceholder)}
|
|
236
|
+
value={url}
|
|
237
|
+
size="large"
|
|
238
|
+
maxLength={URL_MAX_LENGTH}
|
|
239
|
+
errorMessage={urlError}
|
|
255
240
|
/>
|
|
256
241
|
</>
|
|
257
242
|
)}
|
|
@@ -30,8 +30,6 @@ import {
|
|
|
30
30
|
} from "./constants";
|
|
31
31
|
import { PRIMARY } from "../../v2Containers/MobilePushNew/constants";
|
|
32
32
|
import { URL } from "../../v2Containers/Whatsapp/constants";
|
|
33
|
-
import TagList from "../../v2Containers/TagList";
|
|
34
|
-
import CapTagListWithInput from "../CapTagListWithInput";
|
|
35
33
|
|
|
36
34
|
export const CapMpushCTA = (props) => {
|
|
37
35
|
const {
|
|
@@ -41,11 +39,6 @@ export const CapMpushCTA = (props) => {
|
|
|
41
39
|
deleteHandler,
|
|
42
40
|
deepLink,
|
|
43
41
|
buttonType,
|
|
44
|
-
location,
|
|
45
|
-
tags,
|
|
46
|
-
injectedTags,
|
|
47
|
-
selectedOfferDetails,
|
|
48
|
-
handleOnTagsContextChange,
|
|
49
42
|
} = props;
|
|
50
43
|
const { formatMessage } = intl;
|
|
51
44
|
|
|
@@ -109,7 +102,7 @@ export const CapMpushCTA = (props) => {
|
|
|
109
102
|
const renderLength = (len, max) => (
|
|
110
103
|
<CapHeading
|
|
111
104
|
type="label1"
|
|
112
|
-
className="
|
|
105
|
+
className="inapp-render-btn-length"
|
|
113
106
|
>
|
|
114
107
|
{formatMessage(inAppMsg.templateMessageLength, {
|
|
115
108
|
currentLength: len,
|
|
@@ -223,10 +216,6 @@ export const CapMpushCTA = (props) => {
|
|
|
223
216
|
|
|
224
217
|
filteredCtaData?.forEach((cta) => {
|
|
225
218
|
const { index, text, urlType, isSaved } = cta || {};
|
|
226
|
-
const onButtonTagSelect = (data) => {
|
|
227
|
-
const newUrl = `${localUrlValues[index]}{{${data}}}`;
|
|
228
|
-
updateHelper('url', newUrl, index);
|
|
229
|
-
};
|
|
230
219
|
if (isSaved) {
|
|
231
220
|
renderArray.push(
|
|
232
221
|
<CapRow
|
|
@@ -289,7 +278,7 @@ export const CapMpushCTA = (props) => {
|
|
|
289
278
|
/>
|
|
290
279
|
{renderLength(text.length, BTN_MAX_LENGTH)}
|
|
291
280
|
</CapColumn>
|
|
292
|
-
<CapColumn className="
|
|
281
|
+
<CapColumn className="inapp-cta-buttons">
|
|
293
282
|
<CapRow style={{ width: '30%', marginRight: '10px' }}>
|
|
294
283
|
<CapHeading type="h4" className="cta-label">
|
|
295
284
|
{formatMessage(messages.ctaType)}
|
|
@@ -318,27 +307,22 @@ export const CapMpushCTA = (props) => {
|
|
|
318
307
|
</CapRow>
|
|
319
308
|
)}
|
|
320
309
|
{urlType === EXTERNAL_URL && (
|
|
321
|
-
<
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
tags={tags || []}
|
|
338
|
-
injectedTags={injectedTags || {}}
|
|
339
|
-
selectedOfferDetails={selectedOfferDetails}
|
|
340
|
-
inputProps={{ 'data-index': index }}
|
|
341
|
-
/>
|
|
310
|
+
<CapRow style={{ width: '70%' }}>
|
|
311
|
+
<CapHeading type="h4">
|
|
312
|
+
{formatMessage(messages.urlExternalLink)}
|
|
313
|
+
</CapHeading>
|
|
314
|
+
<CapInput
|
|
315
|
+
id="inapp-cta-external-link"
|
|
316
|
+
className="inapp-cta-external-link"
|
|
317
|
+
onChange={onUrlChange}
|
|
318
|
+
placeholder={formatMessage(messages.ctaExternalLinkPlaceholder)}
|
|
319
|
+
value={localUrlValues[index] || ''}
|
|
320
|
+
size="large"
|
|
321
|
+
maxLength={URL_MAX_LENGTH}
|
|
322
|
+
errorMessage={urlError}
|
|
323
|
+
data-index={index}
|
|
324
|
+
/>
|
|
325
|
+
</CapRow>
|
|
342
326
|
)}
|
|
343
327
|
</CapColumn>
|
|
344
328
|
{urlType === DEEP_LINK && ctaDeepLinkValue && deepLinkKeysFromSelectionArray.length > 0 && (
|
|
@@ -346,26 +330,26 @@ export const CapMpushCTA = (props) => {
|
|
|
346
330
|
<CapHeading type="h4">
|
|
347
331
|
{formatMessage(messages.deepLinkKeys)}
|
|
348
332
|
</CapHeading>
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
333
|
+
<CapLabel type="label2" className="cta-deep-link-keys-value">
|
|
334
|
+
{(() => {
|
|
335
|
+
if (deepLinkKeysFromSelectionArray.length > 0) {
|
|
336
|
+
return deepLinkKeysFromSelectionArray.join(', ');
|
|
337
|
+
}
|
|
338
|
+
if (deepLinkKeysArray.length > 0) {
|
|
339
|
+
return deepLinkKeysArray.join(', ');
|
|
340
|
+
}
|
|
341
|
+
})()}
|
|
342
|
+
</CapLabel>
|
|
343
|
+
<CapInput
|
|
344
|
+
id="inapp-deep-link-keys"
|
|
345
|
+
className="inapp-deep-link-keys"
|
|
346
|
+
onChange={onDeepLinkKeysChange}
|
|
347
|
+
placeholder={formatMessage(messages.deepLinkKeysPlaceholder, { key: deepLinkKeysFromSelectionArray.join(', ')})}
|
|
348
|
+
value={Array.isArray(ctaDeepLinkKeysValue) ? ctaDeepLinkKeysValue.join(', ') : (ctaDeepLinkKeysValue || '')}
|
|
349
|
+
size="large"
|
|
350
|
+
data-index={index}
|
|
351
|
+
errorMessage={deepLinkKeysError ? formatMessage(messages.deepLinkKeysRequired) : ""}
|
|
352
|
+
/>
|
|
369
353
|
</CapRow>
|
|
370
354
|
)}
|
|
371
355
|
<CapRow className="inapp-cta-save-delete-btn">
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
border: 1px solid $CAP_G06;
|
|
8
8
|
border-radius: $CAP_SPACE_04;
|
|
9
9
|
|
|
10
|
-
.
|
|
10
|
+
.inapp-cta-buttons {
|
|
11
11
|
margin-top: $CAP_SPACE_12;
|
|
12
12
|
display: flex;
|
|
13
13
|
flex-direction: row;
|
|
14
14
|
align-items: flex-end;
|
|
15
15
|
justify-content: space-between;
|
|
16
16
|
|
|
17
|
-
.
|
|
17
|
+
.inapp-render-btn-length {
|
|
18
18
|
margin-top: $CAP_SPACE_12;
|
|
19
19
|
width: 90%;
|
|
20
20
|
margin-left: 52%;
|