@capillarytech/creatives-library 8.0.340-0 → 8.0.340-beta.0.1
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 +8 -1
- package/global-styles.js +4 -0
- package/package.json +2 -2
- package/styles/components/navigation/_leftnav.scss +1 -1
- package/styles/containers/layout/_layoutPage.scss +1 -1
- package/v2Components/AccessForbidden/index.js +1 -1
- package/v2Components/CapActionButton/index.js +5 -5
- package/v2Components/CapCustomSkeleton/index.js +1 -1
- package/v2Components/CapDeviceContent/index.js +5 -5
- package/v2Components/CapDocumentUpload/index.js +1 -1
- package/v2Components/CapImageUpload/index.js +1 -1
- package/v2Components/CapInAppCTA/index.js +118 -112
- package/v2Components/CapMpushCTA/index.js +72 -66
- package/v2Components/CapTagList/index.js +23 -11
- package/v2Components/CapVideoUpload/index.js +1 -1
- package/v2Components/CapWhatsappCTA/index.js +128 -124
- package/v2Components/CapWhatsappCarouselButton/index.js +27 -29
- package/v2Components/CapWhatsappQuickReply/index.js +7 -7
- package/v2Components/Carousel/index.js +1 -1
- package/v2Components/CommonTestAndPreview/AddTestCustomer.js +1 -1
- package/v2Components/CommonTestAndPreview/CustomValuesEditor.js +10 -11
- package/v2Components/CommonTestAndPreview/CustomerCreationModal.js +1 -1
- package/v2Components/CommonTestAndPreview/DeliverySettings/ModifyDeliverySettings.js +4 -4
- package/v2Components/CommonTestAndPreview/DeliverySettings/index.js +1 -1
- package/v2Components/CommonTestAndPreview/ExistingCustomerModal.js +6 -6
- package/v2Components/CommonTestAndPreview/LeftPanelContent.js +5 -5
- package/v2Components/CommonTestAndPreview/PreviewSection.js +1 -1
- package/v2Components/CommonTestAndPreview/UnifiedPreview/DeviceFrame.js +1 -1
- package/v2Components/CommonTestAndPreview/UnifiedPreview/EmailPreviewContent.js +8 -8
- package/v2Components/CommonTestAndPreview/UnifiedPreview/InAppPreviewContent.js +14 -13
- package/v2Components/CommonTestAndPreview/UnifiedPreview/MobilePushPreviewContent.js +22 -21
- package/v2Components/CommonTestAndPreview/UnifiedPreview/PreviewHeader.js +1 -1
- package/v2Components/CommonTestAndPreview/UnifiedPreview/RcsPreviewContent.js +9 -9
- package/v2Components/CommonTestAndPreview/UnifiedPreview/SmsPreviewContent.js +13 -11
- package/v2Components/CommonTestAndPreview/UnifiedPreview/ViberPreviewContent.js +10 -10
- package/v2Components/CommonTestAndPreview/UnifiedPreview/WhatsAppPreviewContent.js +13 -12
- package/v2Components/CommonTestAndPreview/UnifiedPreview/ZaloPreviewContent.js +4 -3
- package/v2Components/CommonTestAndPreview/UnifiedPreview/_unifiedPreview.scss +17 -8
- package/v2Components/CommonTestAndPreview/UnifiedPreview/index.js +1 -1
- package/v2Components/CommonTestAndPreview/_commonTestAndPreview.scss +30 -5
- package/v2Components/CommonTestAndPreview/index.js +3 -3
- package/v2Components/CustomerSearchSection/_customerSearch.scss +2 -1
- package/v2Components/CustomerSearchSection/index.js +9 -9
- package/v2Components/EmailMobilePreview/index.js +1 -1
- package/v2Components/ErrorInfoNote/index.js +13 -11
- package/v2Components/ErrorInfoNote/style.scss +1 -1
- package/v2Components/FormBuilder/_formBuilder.scss +1 -0
- package/v2Components/FormBuilder/index.js +32 -40
- package/v2Components/HtmlEditor/HTMLEditor.js +4 -4
- package/v2Components/HtmlEditor/_htmlEditor.scss +2 -1
- package/v2Components/HtmlEditor/components/CodeEditorPane/index.js +1 -1
- package/v2Components/HtmlEditor/components/DeviceToggle/_deviceToggle.scss +2 -2
- package/v2Components/HtmlEditor/components/DeviceToggle/index.js +2 -2
- package/v2Components/HtmlEditor/components/EditorToolbar/PreviewModeGroup.js +2 -2
- package/v2Components/HtmlEditor/components/EditorToolbar/index.js +2 -2
- package/v2Components/HtmlEditor/components/InAppPreviewPane/index.js +1 -0
- package/v2Components/HtmlEditor/components/PreviewPane/index.js +2 -2
- package/v2Components/HtmlEditor/components/SplitContainer/SplitContainer.js +2 -2
- package/v2Components/HtmlEditor/components/SplitContainer/_splitContainer.scss +2 -1
- package/v2Components/HtmlEditor/components/ValidationPanel/index.js +6 -9
- package/v2Components/HtmlEditor/components/ValidationTabs/index.js +2 -2
- package/v2Components/NavigationBar/index.js +7 -1
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/index.js +3 -4
- package/v2Components/TemplatePreview/_templatePreview.scss +5 -3
- package/v2Components/TemplatePreview/index.js +11 -9
- package/v2Components/TestAndPreviewSlidebox/CustomValuesEditor.js +4 -4
- package/v2Components/TestAndPreviewSlidebox/LeftPanelContent.js +5 -5
- package/v2Components/TestAndPreviewSlidebox/PreviewSection.js +3 -3
- package/v2Components/TestAndPreviewSlidebox/_testAndPreviewSlidebox.scss +4 -2
- package/v2Containers/BeePopupEditor/index.js +1 -1
- package/v2Containers/CommunicationFlow/CommunicationFlow.js +5 -5
- package/v2Containers/CommunicationFlow/steps/ChannelSelectionStep/ChannelSelectionStep.js +4 -3
- package/v2Containers/CommunicationFlow/steps/CommunicationStrategyStep/CommunicationStrategyStep.js +2 -2
- package/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/DeliverySettingsSection.js +3 -2
- package/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/SenderDetails.js +7 -7
- package/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/SenderDetails.scss +0 -5
- package/v2Containers/CommunicationFlow/steps/DynamicControlsStep/DynamicControlsStep.js +2 -2
- package/v2Containers/CommunicationFlow/steps/MessageTypeStep/MessageTypeStep.js +2 -2
- package/v2Containers/CreativesContainer/SlideBoxFooter.js +1 -1
- package/v2Containers/CreativesContainer/index.js +1 -1
- package/v2Containers/Ebill/index.js +10 -9
- package/v2Containers/Email/index.js +7 -7
- package/v2Containers/Email/initialSchema.js +1 -1
- package/v2Containers/FTP/index.js +1 -1
- package/v2Containers/Facebook/Advertisement/index.js +4 -4
- package/v2Containers/Facebook/index.js +2 -2
- package/v2Containers/InApp/index.js +21 -16
- package/v2Containers/InApp/index.scss +0 -7
- package/v2Containers/InAppWrapper/components/InAppWrapperView.js +2 -2
- package/v2Containers/InappAdvance/index.js +4 -4
- package/v2Containers/LanguageProvider/index.js +3 -3
- package/v2Containers/LanguageProvider/tests/index.test.js +3 -3
- package/v2Containers/Line/Container/Image/index.js +1 -1
- package/v2Containers/Line/Container/ImageCarousel/Content.js +1 -1
- package/v2Containers/Line/Container/ImageCarousel/index.js +5 -5
- package/v2Containers/Line/Container/ImageMap/index.js +3 -3
- package/v2Containers/Line/Container/Sticker/index.js +2 -2
- package/v2Containers/Line/Container/Sticker/utils.js +1 -1
- package/v2Containers/Line/Container/Video/index.js +1 -1
- package/v2Containers/Line/Container/Wrapper/index.js +3 -3
- package/v2Containers/Line/Container/Wrapper/style.js +1 -5
- package/v2Containers/Line/Container/index.js +2 -2
- package/v2Containers/Login/components/LoginForm/index.js +34 -47
- package/v2Containers/Login/index.js +5 -5
- package/v2Containers/MobilePushNew/components/CtaButtons.js +2 -2
- package/v2Containers/MobilePushNew/components/MediaUploaders.js +9 -9
- package/v2Containers/MobilePushNew/components/PlatformContentFields.js +4 -4
- package/v2Containers/MobilePushNew/index.js +2 -2
- package/v2Containers/MobilePushNew/index.scss +9 -6
- package/v2Containers/Rcs/index.js +24 -19
- package/v2Containers/Rcs/index.scss +0 -7
- package/v2Containers/Sms/Create/_smsCreate.scss +9 -2
- package/v2Containers/Sms/SCHEMA_FORMBUILDER_MAP.md +922 -0
- package/v2Containers/Sms/initialSchema.js +7 -1
- package/v2Containers/SmsTrai/Edit/index.js +3 -2
- package/v2Containers/Templates/index.js +16 -16
- package/v2Containers/Viber/constants.js +0 -8
- package/v2Containers/Viber/index.js +19 -19
- package/v2Containers/Viber/index.scss +0 -7
- package/v2Containers/Viber/reducer.js +21 -44
- package/v2Containers/Viber/sagas.js +21 -62
- package/v2Containers/Viber/tests/index.test.js +0 -80
- package/v2Containers/Viber/tests/saga.test.js +40 -365
- package/v2Containers/WeChat/RichmediaTemplates/Create/_createRichmedia.scss +1 -1
- package/v2Containers/WeChat/RichmediaTemplates/Create/index.js +2 -2
- package/v2Containers/WebPush/Create/components/BrandIconSection.js +1 -1
- package/v2Containers/WebPush/Create/components/ButtonForm.js +2 -2
- package/v2Containers/WebPush/Create/components/ButtonList.js +4 -4
- package/v2Containers/WebPush/Create/components/ButtonsLinksSection.js +4 -4
- package/v2Containers/WebPush/Create/components/FormActions.js +3 -3
- package/v2Containers/WebPush/Create/components/MessageSection.js +2 -2
- package/v2Containers/WebPush/Create/components/NotificationTitleSection.js +2 -2
- package/v2Containers/WebPush/Create/components/_buttons.scss +2 -2
- package/v2Containers/WebPush/Create/index.scss +6 -3
- package/v2Containers/WebPush/Create/preview/WebPushPreview.js +1 -1
- package/v2Containers/Whatsapp/index.js +28 -28
- package/v2Containers/Zalo/index.js +3 -3
- package/.npmrc copy +0 -2
- package/v2Containers/Viber/tests/reducer.test.js +0 -297
package/app.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import 'babel-polyfill';
|
|
2
|
+
import 'whatwg-fetch';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import { createRoot } from 'react-dom/client';
|
|
4
5
|
import { Provider } from 'react-redux';
|
|
@@ -26,6 +27,10 @@ import './styles/main.scss';
|
|
|
26
27
|
import pathConfig from './config/path';
|
|
27
28
|
import ignoredErrorMessages from './utils/ignoredErrorMessages';
|
|
28
29
|
import App from './containers/App';
|
|
30
|
+
import ConfigProvider from 'antd/lib/config-provider';
|
|
31
|
+
import { getCapThemeConfig, loadCapUI } from '@capillarytech/cap-ui-library/utils';
|
|
32
|
+
|
|
33
|
+
loadCapUI();
|
|
29
34
|
|
|
30
35
|
try {
|
|
31
36
|
const { setupNewrelicWebVitals } = require('./newRelic/utils');
|
|
@@ -114,7 +119,9 @@ const render = (messages) => {
|
|
|
114
119
|
<Provider store={store}>
|
|
115
120
|
<LanguageProvider messages={messages}>
|
|
116
121
|
<ErrorBoundary FallbackComponent={ErrorScreen}>
|
|
117
|
-
<
|
|
122
|
+
<ConfigProvider theme={getCapThemeConfig()}>
|
|
123
|
+
<App />
|
|
124
|
+
</ConfigProvider>
|
|
118
125
|
</ErrorBoundary>
|
|
119
126
|
</LanguageProvider>
|
|
120
127
|
</Provider>,
|
package/global-styles.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capillarytech/creatives-library",
|
|
3
3
|
"author": "meharaj",
|
|
4
|
-
"version": "8.0.340-0",
|
|
4
|
+
"version": "8.0.340-beta.0.1",
|
|
5
5
|
"description": "Capillary creatives ui",
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"module": "./index.es.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@bugsnag/js": "^7.2.1",
|
|
18
18
|
"@bugsnag/plugin-react": "7.2.1",
|
|
19
19
|
"@capillarytech/cap-ui-utils": "3.0.4",
|
|
20
|
-
"@capillarytech/vulcan-react-sdk": "
|
|
20
|
+
"@capillarytech/vulcan-react-sdk": "3.0.1",
|
|
21
21
|
"@codemirror/autocomplete": "^6.19.0",
|
|
22
22
|
"@codemirror/lang-css": "^6.3.1",
|
|
23
23
|
"@codemirror/lang-html": "^6.4.11",
|
|
@@ -4,7 +4,7 @@ import { CapRow, CapHeading } from '@capillarytech/cap-ui-library';
|
|
|
4
4
|
import messages from './messages';
|
|
5
5
|
|
|
6
6
|
const AccessForbidden = () => (
|
|
7
|
-
<CapRow className="margin-t-32 text-align-center">
|
|
7
|
+
<CapRow useLegacy className="margin-t-32 text-align-center">
|
|
8
8
|
<CapHeading type="h2">
|
|
9
9
|
<FormattedMessage {...messages.forbiddenHeader} />
|
|
10
10
|
</CapHeading>
|
|
@@ -245,7 +245,7 @@ export const CapActionButton = (props) => {
|
|
|
245
245
|
{renderLength(phoneNumber.length, PHONE_NUMBER_MAX_LENGTH)}
|
|
246
246
|
</CapColumn>
|
|
247
247
|
</CapRow>
|
|
248
|
-
<CapRow className="rcs-cta-save-delete-btn">
|
|
248
|
+
<CapRow useLegacy className="rcs-cta-save-delete-btn">
|
|
249
249
|
<CapTooltip
|
|
250
250
|
title={ctaSaveDisabled(index) && formatMessage(messages.ctaSaveDisabled)}
|
|
251
251
|
placement="bottom"
|
|
@@ -290,7 +290,7 @@ export const CapActionButton = (props) => {
|
|
|
290
290
|
{renderLength(url.length, URL_MAX_LENGTH)}
|
|
291
291
|
</CapColumn>
|
|
292
292
|
</CapRow>
|
|
293
|
-
<CapRow className="rcs-cta-save-delete-btn">
|
|
293
|
+
<CapRow useLegacy className="rcs-cta-save-delete-btn">
|
|
294
294
|
<CapTooltip
|
|
295
295
|
title={
|
|
296
296
|
ctaSaveDisabled(index) && formatMessage(messages.ctaSaveDisabled)
|
|
@@ -318,7 +318,7 @@ export const CapActionButton = (props) => {
|
|
|
318
318
|
</>
|
|
319
319
|
)}
|
|
320
320
|
{type === RCS_BUTTON_TYPES.QUICK_REPLY && (
|
|
321
|
-
<CapRow className="rcs-cta-save-delete-btn">
|
|
321
|
+
<CapRow useLegacy className="rcs-cta-save-delete-btn">
|
|
322
322
|
<CapTooltip
|
|
323
323
|
title={ctaSaveDisabled(index) && formatMessage(messages.ctaSaveDisabled)}
|
|
324
324
|
placement="bottom"
|
|
@@ -413,7 +413,7 @@ export const CapActionButton = (props) => {
|
|
|
413
413
|
suggestions.length < maxButtons &&
|
|
414
414
|
(isFullMode && !isEditFlow)
|
|
415
415
|
&& renderArray.push(
|
|
416
|
-
<CapRow>
|
|
416
|
+
<CapRow useLegacy>
|
|
417
417
|
<CapTooltip
|
|
418
418
|
title={
|
|
419
419
|
addBtnDisabled ? formatMessage(messages.ctaAddDisabled) : ''
|
|
@@ -422,7 +422,7 @@ export const CapActionButton = (props) => {
|
|
|
422
422
|
>
|
|
423
423
|
<div className="button-disabled-tooltip-wrapper">
|
|
424
424
|
<CapButton
|
|
425
|
-
type="
|
|
425
|
+
type="link"
|
|
426
426
|
id="rcs-cta-add-button"
|
|
427
427
|
disabled={addBtnDisabled}
|
|
428
428
|
className="margin-t-12 margin-l-24"
|
|
@@ -201,8 +201,8 @@ const CapDeviceContent = (props) => {
|
|
|
201
201
|
)}
|
|
202
202
|
/>
|
|
203
203
|
</CapRow>
|
|
204
|
-
<CapRow className="creatives-inapp-media">
|
|
205
|
-
<CapRow className="inapp-content-media">
|
|
204
|
+
<CapRow useLegacy className="creatives-inapp-media">
|
|
205
|
+
<CapRow useLegacy className="inapp-content-media">
|
|
206
206
|
<CapHeading type="h5" className="inapp-media-header">
|
|
207
207
|
{formatMessage(messages.mediaLabel)}
|
|
208
208
|
</CapHeading>
|
|
@@ -282,7 +282,7 @@ const CapDeviceContent = (props) => {
|
|
|
282
282
|
)}
|
|
283
283
|
</CapRow>
|
|
284
284
|
</CapRow>
|
|
285
|
-
<CapRow className="inapp-action-link">
|
|
285
|
+
<CapRow useLegacy className="inapp-action-link">
|
|
286
286
|
<CapCheckbox onChange={onActionLinkCheckBoxChange} checked={addActionLink} />
|
|
287
287
|
<CapRow className="inapp-render-heading">
|
|
288
288
|
<CapHeader
|
|
@@ -296,7 +296,7 @@ const CapDeviceContent = (props) => {
|
|
|
296
296
|
description={<CapLabel type="label3">{formatMessage(messages.addActionLinkDesc)}</CapLabel>}
|
|
297
297
|
/>
|
|
298
298
|
{addActionLink && (
|
|
299
|
-
<CapRow className="inapp-action-deep-link">
|
|
299
|
+
<CapRow useLegacy className="inapp-action-deep-link">
|
|
300
300
|
<CapHeading type="h4">
|
|
301
301
|
{formatMessage(messages.actionDeepLink)}
|
|
302
302
|
</CapHeading>
|
|
@@ -313,7 +313,7 @@ const CapDeviceContent = (props) => {
|
|
|
313
313
|
)}
|
|
314
314
|
</CapRow>
|
|
315
315
|
</CapRow>
|
|
316
|
-
<CapRow className="inapp-cta-button">
|
|
316
|
+
<CapRow useLegacy className="inapp-cta-button">
|
|
317
317
|
<CapHeader
|
|
318
318
|
className="inapp-render-heading-cta-button"
|
|
319
319
|
title={(
|
|
@@ -287,7 +287,7 @@ function CapImageUpload(props) {
|
|
|
287
287
|
return (
|
|
288
288
|
<CapButton
|
|
289
289
|
className="dragger-button re-upload"
|
|
290
|
-
type="
|
|
290
|
+
type="link"
|
|
291
291
|
onClick={onReUpload}
|
|
292
292
|
style={channelSpecificStyle ? { marginTop: `-${CAP_SPACE_16}` } : {}}
|
|
293
293
|
disabled={disabled}
|
|
@@ -140,16 +140,18 @@ export const CapInAppCTA = (props) => {
|
|
|
140
140
|
align="middle"
|
|
141
141
|
type="flex"
|
|
142
142
|
>
|
|
143
|
-
<
|
|
144
|
-
<
|
|
145
|
-
<
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
<
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
143
|
+
<CapColumn>
|
|
144
|
+
<CapRow className="inapp-cta-row">
|
|
145
|
+
<CapColumn>
|
|
146
|
+
<CapIcon size="s" type={'launch'} className="btn-icon" />
|
|
147
|
+
</CapColumn>
|
|
148
|
+
<CapColumn className="btn-text">
|
|
149
|
+
<CapLabel type="label2" className="inapp-saved-cta-button-text">
|
|
150
|
+
{text}
|
|
151
|
+
</CapLabel>
|
|
152
|
+
</CapColumn>
|
|
153
|
+
</CapRow>
|
|
154
|
+
</CapColumn>
|
|
153
155
|
<CapColumn >
|
|
154
156
|
{urlType === DEEP_LINK ?
|
|
155
157
|
<CapTag className="cta-type-label">{formatMessage(messages.urlDeepLink)}</CapTag>
|
|
@@ -158,7 +160,7 @@ export const CapInAppCTA = (props) => {
|
|
|
158
160
|
<CapColumn>
|
|
159
161
|
{urlType === DEEP_LINK ? selectedDeepLink?.label : ''}
|
|
160
162
|
</CapColumn>
|
|
161
|
-
|
|
163
|
+
<CapColumn>
|
|
162
164
|
<CapRow className="cta-action-grp">
|
|
163
165
|
<CapColumn
|
|
164
166
|
className="inapp-saved-cta-edit-icon"
|
|
@@ -170,7 +172,7 @@ export const CapInAppCTA = (props) => {
|
|
|
170
172
|
<CapIcon size="s" type="delete" className="cta-action" ariaLabel="delete-cta-icon" />
|
|
171
173
|
</CapColumn>
|
|
172
174
|
</CapRow>
|
|
173
|
-
|
|
175
|
+
</CapColumn>
|
|
174
176
|
</CapRow>
|
|
175
177
|
);
|
|
176
178
|
} else {
|
|
@@ -180,108 +182,112 @@ export const CapInAppCTA = (props) => {
|
|
|
180
182
|
className="cap-inapp-cta"
|
|
181
183
|
id={`cap-inapp-cta-${index}`}
|
|
182
184
|
>
|
|
183
|
-
<
|
|
184
|
-
<
|
|
185
|
-
{
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
{
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
185
|
+
<CapColumn>
|
|
186
|
+
<CapRow className="inapp-cta-buttons">
|
|
187
|
+
<CapColumn span={12} >
|
|
188
|
+
{/* Type of link */}
|
|
189
|
+
<CapHeading type="h4" className="cta-label">
|
|
190
|
+
{formatMessage(messages.ctaType)}
|
|
191
|
+
</CapHeading>
|
|
192
|
+
<CapSelect
|
|
193
|
+
id="inapp-cta-type"
|
|
194
|
+
options={CTA_OPTIONS || []}
|
|
195
|
+
onChange={(value) => onUrlTypeChange(value, index)}
|
|
196
|
+
value={urlType}
|
|
197
|
+
/>
|
|
198
|
+
</CapColumn>
|
|
199
|
+
<CapColumn span={12}>
|
|
200
|
+
{/* Button text */}
|
|
201
|
+
<CapHeading type="h4" className="cta-label">
|
|
202
|
+
{formatMessage(messages.ctaButtonText)}
|
|
203
|
+
<CapTooltipWithInfo
|
|
204
|
+
infoIconProps={{
|
|
205
|
+
style: { marginLeft: CAP_SPACE_04 },
|
|
206
|
+
}}
|
|
207
|
+
autoAdjustOverflow
|
|
208
|
+
placement="right"
|
|
209
|
+
title={formatMessage(messages.ctaButtonTextTooltip)}
|
|
210
|
+
/>
|
|
211
|
+
</CapHeading>
|
|
212
|
+
<CapInput
|
|
213
|
+
id={index}
|
|
214
|
+
className="inapp-cta-button-text"
|
|
215
|
+
onChange={onButtonTextChange}
|
|
216
|
+
placeholder={formatMessage(messages.ctaButtonTextPlaceholder)}
|
|
217
|
+
value={text}
|
|
218
|
+
maxLength={BTN_MAX_LENGTH}
|
|
219
|
+
errorMessage={buttonError}
|
|
207
220
|
/>
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
{formatMessage(messages.urlDeepLink)}
|
|
225
|
-
</CapHeading>
|
|
226
|
-
<CapSelect
|
|
227
|
-
id="inapp-deep-link-type"
|
|
228
|
-
placeholder={formatMessage(messages.ctaDeepLinkOptionsPlaceholder)}
|
|
229
|
-
options={deepLink || []}
|
|
230
|
-
onChange={onDeepLinkSelect}
|
|
231
|
-
value={ctaDeepLinkValue}
|
|
232
|
-
/>
|
|
233
|
-
</>
|
|
221
|
+
{renderLength(text.length, BTN_MAX_LENGTH)}
|
|
222
|
+
</CapColumn>
|
|
223
|
+
</CapRow>
|
|
224
|
+
{urlType === DEEP_LINK && (
|
|
225
|
+
<>
|
|
226
|
+
<CapHeading type="h4">
|
|
227
|
+
{formatMessage(messages.urlDeepLink)}
|
|
228
|
+
</CapHeading>
|
|
229
|
+
<CapSelect
|
|
230
|
+
id="inapp-deep-link-type"
|
|
231
|
+
placeholder={formatMessage(messages.ctaDeepLinkOptionsPlaceholder)}
|
|
232
|
+
options={deepLink || []}
|
|
233
|
+
onChange={onDeepLinkSelect}
|
|
234
|
+
value={ctaDeepLinkValue}
|
|
235
|
+
/>
|
|
236
|
+
</>
|
|
234
237
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
238
|
+
)}
|
|
239
|
+
{urlType === EXTERNAL_URL && (
|
|
240
|
+
<>
|
|
241
|
+
<CapTagListWithInput
|
|
242
|
+
inputId="inapp-cta-external-link"
|
|
243
|
+
inputValue={url}
|
|
244
|
+
inputOnChange={onUrlChange}
|
|
245
|
+
inputPlaceholder={formatMessage(messages.ctaExternalLinkPlaceholder)}
|
|
246
|
+
inputSize="large"
|
|
247
|
+
inputMaxLength={URL_MAX_LENGTH}
|
|
248
|
+
inputErrorMessage={urlError}
|
|
249
|
+
headingText={formatMessage(messages.urlExternalLink)}
|
|
250
|
+
headingStyle={{ marginTop: '3%',marginRight: '65%'}}
|
|
251
|
+
moduleFilterEnabled={location?.query?.type !== "embedded"}
|
|
252
|
+
onTagSelect={onButtonTagSelect}
|
|
253
|
+
onContextChange={onContextChange}
|
|
254
|
+
location={location}
|
|
255
|
+
tags={tags || []}
|
|
256
|
+
injectedTags={injectedTags || {}}
|
|
257
|
+
selectedOfferDetails={selectedOfferDetails}
|
|
258
|
+
/>
|
|
259
|
+
</>
|
|
260
|
+
)}
|
|
261
|
+
</CapColumn>
|
|
262
|
+
<CapColumn>
|
|
263
|
+
<CapRow useLegacy className="inapp-cta-save-delete-btn">
|
|
264
|
+
<CapTooltip
|
|
265
|
+
title={
|
|
266
|
+
ctaSaveDisabled(index)
|
|
267
|
+
? formatMessage(messages.ctaSaveDisabled)
|
|
268
|
+
: ""
|
|
269
|
+
}
|
|
270
|
+
placement={"bottom"}
|
|
271
|
+
>
|
|
272
|
+
<div className="button-disabled-tooltip-wrapper">
|
|
273
|
+
<CapButton
|
|
274
|
+
onClick={() => isSavedCta(index, true)}
|
|
275
|
+
disabled={ctaSaveDisabled(index)}
|
|
276
|
+
className="inapp-cta-save-btn"
|
|
277
|
+
>
|
|
278
|
+
{formatMessage(globalMessages.save)}
|
|
279
|
+
</CapButton>
|
|
280
|
+
</div>
|
|
281
|
+
</CapTooltip>
|
|
282
|
+
<CapButton
|
|
283
|
+
onClick={() => deleteHandler(index)}
|
|
284
|
+
className="inapp-cta-delete-btn"
|
|
285
|
+
type="secondary"
|
|
286
|
+
>
|
|
287
|
+
{formatMessage(globalMessages.delete)}
|
|
288
|
+
</CapButton>
|
|
289
|
+
</CapRow>
|
|
290
|
+
</CapColumn>
|
|
285
291
|
</CapRow>
|
|
286
292
|
);
|
|
287
293
|
}
|