@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
|
@@ -234,16 +234,18 @@ export const CapMpushCTA = (props) => {
|
|
|
234
234
|
align="middle"
|
|
235
235
|
type="flex"
|
|
236
236
|
>
|
|
237
|
-
<
|
|
238
|
-
<
|
|
239
|
-
<
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
<
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
237
|
+
<CapColumn>
|
|
238
|
+
<CapRow className="mpush-cta-row">
|
|
239
|
+
<CapColumn>
|
|
240
|
+
<CapIcon size="s" type={'launch'} />
|
|
241
|
+
</CapColumn>
|
|
242
|
+
<CapColumn className="btn-text">
|
|
243
|
+
<CapLabel type="label2" className="mpush-saved-cta-button-text">
|
|
244
|
+
{text}
|
|
245
|
+
</CapLabel>
|
|
246
|
+
</CapColumn>
|
|
247
|
+
</CapRow>
|
|
248
|
+
</CapColumn>
|
|
247
249
|
<CapColumn >
|
|
248
250
|
{urlType === DEEP_LINK ?
|
|
249
251
|
<CapTag className="cta-type-label">{formatMessage(messages.urlDeepLink)}</CapTag>
|
|
@@ -254,7 +256,7 @@ export const CapMpushCTA = (props) => {
|
|
|
254
256
|
</CapColumn>
|
|
255
257
|
<CapColumn>
|
|
256
258
|
</CapColumn>
|
|
257
|
-
|
|
259
|
+
<CapColumn>
|
|
258
260
|
<CapRow className="cta-action-grp">
|
|
259
261
|
<CapColumn
|
|
260
262
|
className="mpush-saved-cta-edit-icon"
|
|
@@ -266,7 +268,7 @@ export const CapMpushCTA = (props) => {
|
|
|
266
268
|
<CapIcon size="s" type="delete" className="cta-action" ariaLabel="delete-cta-icon" />
|
|
267
269
|
</CapColumn>
|
|
268
270
|
</CapRow>
|
|
269
|
-
|
|
271
|
+
</CapColumn>
|
|
270
272
|
</CapRow>
|
|
271
273
|
);
|
|
272
274
|
} else {
|
|
@@ -290,7 +292,7 @@ export const CapMpushCTA = (props) => {
|
|
|
290
292
|
{renderLength(text.length, BTN_MAX_LENGTH)}
|
|
291
293
|
</CapColumn>
|
|
292
294
|
<CapColumn className="mpush-cta-buttons">
|
|
293
|
-
<CapRow style={{ width: '30%', marginRight: '10px' }}>
|
|
295
|
+
<CapRow useLegacy style={{ width: '30%', marginRight: '10px' }}>
|
|
294
296
|
<CapHeading type="h4" className="cta-label">
|
|
295
297
|
{formatMessage(messages.ctaType)}
|
|
296
298
|
</CapHeading>
|
|
@@ -303,7 +305,7 @@ export const CapMpushCTA = (props) => {
|
|
|
303
305
|
/>
|
|
304
306
|
</CapRow>
|
|
305
307
|
{urlType === DEEP_LINK && (
|
|
306
|
-
<CapRow style={{ width: '70%' }}>
|
|
308
|
+
<CapRow useLegacy style={{ width: '70%' }}>
|
|
307
309
|
<CapHeading type="h4" className="cta-deep-link-label">
|
|
308
310
|
{formatMessage(messages.urlDeepLink)}
|
|
309
311
|
</CapHeading>
|
|
@@ -341,59 +343,63 @@ export const CapMpushCTA = (props) => {
|
|
|
341
343
|
)}
|
|
342
344
|
</CapColumn>
|
|
343
345
|
{urlType === DEEP_LINK && ctaDeepLinkValue && deepLinkKeysFromSelectionArray.length > 0 && (
|
|
344
|
-
<
|
|
345
|
-
<
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
346
|
+
<CapColumn>
|
|
347
|
+
<CapRow useLegacy style={{ marginTop: '10px' }}>
|
|
348
|
+
<CapHeading type="h4">
|
|
349
|
+
{formatMessage(messages.deepLinkKeys)}
|
|
350
|
+
</CapHeading>
|
|
351
|
+
<CapLabel type="label2" className="cta-deep-link-keys-value">
|
|
352
|
+
{(() => {
|
|
353
|
+
if (deepLinkKeysFromSelectionArray.length > 0) {
|
|
354
|
+
return deepLinkKeysFromSelectionArray.join(', ');
|
|
355
|
+
}
|
|
356
|
+
if (deepLinkKeysArray.length > 0) {
|
|
357
|
+
return deepLinkKeysArray.join(', ');
|
|
358
|
+
}
|
|
359
|
+
})()}
|
|
360
|
+
</CapLabel>
|
|
361
|
+
<CapInput
|
|
362
|
+
id="mpush-deep-link-keys"
|
|
363
|
+
className="mpush-deep-link-keys"
|
|
364
|
+
onChange={onDeepLinkKeysChange}
|
|
365
|
+
placeholder={formatMessage(messages.deepLinkKeysPlaceholder, { key: deepLinkKeysFromSelectionArray.join(', ') })}
|
|
366
|
+
value={Array.isArray(ctaDeepLinkKeysValue) ? ctaDeepLinkKeysValue.join(', ') : (ctaDeepLinkKeysValue || '')}
|
|
367
|
+
size="large"
|
|
368
|
+
data-index={index}
|
|
369
|
+
errorMessage={deepLinkKeysError ? formatMessage(messages.deepLinkKeysRequired) : ""}
|
|
370
|
+
/>
|
|
371
|
+
</CapRow>
|
|
372
|
+
</CapColumn>
|
|
369
373
|
)}
|
|
370
|
-
<
|
|
371
|
-
<
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
<
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
374
|
+
<CapColumn>
|
|
375
|
+
<CapRow useLegacy className="mpush-cta-save-delete-btn">
|
|
376
|
+
<CapTooltip
|
|
377
|
+
title={
|
|
378
|
+
ctaSaveDisabled(index)
|
|
379
|
+
? formatMessage(messages.ctaSaveDisabled)
|
|
380
|
+
: ""
|
|
381
|
+
}
|
|
382
|
+
placement={"bottom"}
|
|
383
|
+
>
|
|
384
|
+
<div className="button-disabled-tooltip-wrapper">
|
|
385
|
+
<CapButton
|
|
386
|
+
onClick={() => isSavedCta(index, true)}
|
|
387
|
+
disabled={ctaSaveDisabled(index)}
|
|
388
|
+
className="mpush-cta-save-btn"
|
|
389
|
+
>
|
|
390
|
+
{formatMessage(globalMessages.save)}
|
|
391
|
+
</CapButton>
|
|
392
|
+
</div>
|
|
393
|
+
</CapTooltip>
|
|
394
|
+
<CapButton
|
|
395
|
+
onClick={() => deleteHandler(index)}
|
|
396
|
+
className="mpush-cta-delete-btn"
|
|
397
|
+
type="secondary"
|
|
398
|
+
>
|
|
399
|
+
{formatMessage(globalMessages.delete)}
|
|
400
|
+
</CapButton>
|
|
401
|
+
</CapRow>
|
|
402
|
+
</CapColumn>
|
|
397
403
|
</CapRow>
|
|
398
404
|
);
|
|
399
405
|
}
|
|
@@ -120,7 +120,9 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
120
120
|
};
|
|
121
121
|
|
|
122
122
|
onExpand = (expandedKeys, info) => {
|
|
123
|
-
|
|
123
|
+
const node = info && info.node;
|
|
124
|
+
const eventKey = node && (node.eventKey ?? node.key ?? node.props?.eventKey);
|
|
125
|
+
this.handleOnExpand(eventKey);
|
|
124
126
|
};
|
|
125
127
|
|
|
126
128
|
getSearchedExpandedKeys(tags, value = '', parentPath = '') {
|
|
@@ -202,9 +204,14 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
202
204
|
|
|
203
205
|
handleOnSelect = (selectedKeys, info) => {
|
|
204
206
|
if (selectedKeys.length > 0) {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
207
|
+
const selectedNode = info && info.selectedNodes && info.selectedNodes[0];
|
|
208
|
+
if (!selectedNode) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
const isLeaf = selectedNode.isLeaf ?? selectedNode.props?.isLeaf;
|
|
212
|
+
if (isLeaf) {
|
|
213
|
+
const tagKey = selectedNode.tagKey ?? selectedNode.props?.tagKey;
|
|
214
|
+
const selectedTagValue = tagKey || selectedKeys[0];
|
|
208
215
|
this.setState({
|
|
209
216
|
tagValue: selectedTagValue,
|
|
210
217
|
selectedNodeKey: selectedKeys[0],
|
|
@@ -216,7 +223,7 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
216
223
|
this.props.onSelect([selectedTagValue], info);
|
|
217
224
|
this.setState({visible: false});
|
|
218
225
|
}
|
|
219
|
-
} else
|
|
226
|
+
} else {
|
|
220
227
|
this.handleOnExpand(selectedKeys[0]);
|
|
221
228
|
}
|
|
222
229
|
}
|
|
@@ -409,7 +416,7 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
409
416
|
},
|
|
410
417
|
];
|
|
411
418
|
const contentSection = (
|
|
412
|
-
<CapRow className="cap-tag-list-popover-inner">
|
|
419
|
+
<CapRow useLegacy className="cap-tag-list-popover-inner">
|
|
413
420
|
<CapSpin tip={formatMessage(messages.gettingTags)} spinning={shouldShowLoading}>
|
|
414
421
|
<Search
|
|
415
422
|
style={{ marginBottom: 8, width: '250px'}}
|
|
@@ -419,7 +426,7 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
419
426
|
<CapSelect
|
|
420
427
|
getPopupContainer={(triggerNode) => triggerNode.parentNode}
|
|
421
428
|
style={{
|
|
422
|
-
width: '250px', marginBottom: '16px', minWidth: 'initial', display: '
|
|
429
|
+
width: '250px', marginBottom: '16px', minWidth: 'initial', display: 'flex',
|
|
423
430
|
}}
|
|
424
431
|
onChange={this.handleOnChange}
|
|
425
432
|
value={selectedContext}
|
|
@@ -444,7 +451,7 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
444
451
|
size="s"
|
|
445
452
|
/>
|
|
446
453
|
<CapLink>
|
|
447
|
-
<CapButton id="translationtagfooter" type="
|
|
454
|
+
<CapButton id="translationtagfooter" type="link" onClick={this.openTranslationLink}>
|
|
448
455
|
<div className="tag-list-footer-icon">
|
|
449
456
|
<div>{JAPANESE_HELP_TEXT}</div>
|
|
450
457
|
<CapIcon
|
|
@@ -479,13 +486,18 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
479
486
|
content={contentSection}
|
|
480
487
|
trigger="click"
|
|
481
488
|
placement={this.props.popoverPlacement || (channel === EMAIL.toUpperCase() ? "leftTop" : "rightTop")}
|
|
489
|
+
styles={{
|
|
490
|
+
container: {
|
|
491
|
+
backgroundColor: 'white'
|
|
492
|
+
}
|
|
493
|
+
}}
|
|
482
494
|
>
|
|
483
495
|
<CapTooltip
|
|
484
496
|
title={
|
|
485
497
|
disableTooltipMsg && disabled ? (
|
|
486
498
|
disableTooltipMsg
|
|
487
499
|
) : fetchingSchemaError ? (
|
|
488
|
-
<CapRow className="tooltip-text-container">
|
|
500
|
+
<CapRow useLegacy className="tooltip-text-container">
|
|
489
501
|
<CapLabel className="tooltip-text1">
|
|
490
502
|
{formatMessage(messages.somethingWentWrong)}
|
|
491
503
|
</CapLabel>
|
|
@@ -497,13 +509,13 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
497
509
|
}
|
|
498
510
|
placement="right"
|
|
499
511
|
>
|
|
500
|
-
<CapRow className="tooltip-add-label-container">
|
|
512
|
+
<CapRow useLegacy className="tooltip-add-label-container">
|
|
501
513
|
<CapButton
|
|
502
514
|
disabled={
|
|
503
515
|
this?.props?.disabled || fetchingSchemaError
|
|
504
516
|
}
|
|
505
517
|
isAddBtn
|
|
506
|
-
type="
|
|
518
|
+
type="link"
|
|
507
519
|
>
|
|
508
520
|
{label || ""}
|
|
509
521
|
</CapButton>
|
|
@@ -311,144 +311,148 @@ export const CapWhatsappCTA = (props) => {
|
|
|
311
311
|
className="cap-whatsapp-cta margin-t-16"
|
|
312
312
|
id={`cap-whatsapp-cta-${index}`}
|
|
313
313
|
>
|
|
314
|
-
<
|
|
315
|
-
<CapColumn span={12}>
|
|
316
|
-
{/* Type of action */}
|
|
317
|
-
<CapHeading type="h4" className="cta-label">
|
|
318
|
-
{formatMessage(messages.ctaType)}
|
|
319
|
-
</CapHeading>
|
|
320
|
-
<CapSelect
|
|
321
|
-
id="whatsapp-cta-type"
|
|
322
|
-
options={ctaOptions || []}
|
|
323
|
-
onChange={(value) => onCtaTypeChange(value, index)}
|
|
324
|
-
value={ctaType}
|
|
325
|
-
/>
|
|
326
|
-
</CapColumn>
|
|
327
|
-
<CapColumn span={12}>
|
|
328
|
-
{/* Button text */}
|
|
329
|
-
<CapHeading type="h4" className="cta-label">
|
|
330
|
-
{formatMessage(messages.ctaButtonText)}
|
|
331
|
-
<CapTooltipWithInfo
|
|
332
|
-
infoIconProps={{
|
|
333
|
-
style: { marginLeft: CAP_SPACE_04 },
|
|
334
|
-
}}
|
|
335
|
-
autoAdjustOverflow
|
|
336
|
-
placement="right"
|
|
337
|
-
title={formatMessage(messages.ctaButtonTextTooltip)}
|
|
338
|
-
/>
|
|
339
|
-
</CapHeading>
|
|
340
|
-
<CapInput
|
|
341
|
-
id={index}
|
|
342
|
-
className="whatsapp-cta-button-text"
|
|
343
|
-
onChange={onButtonTextChange}
|
|
344
|
-
placeholder={formatMessage(messages.ctaButtonTextPlaceholder)}
|
|
345
|
-
value={text}
|
|
346
|
-
size="large"
|
|
347
|
-
maxLength={BTN_MAX_LENGTH}
|
|
348
|
-
errorMessage={buttonError}
|
|
349
|
-
/>
|
|
350
|
-
{renderLength(text.length, BTN_MAX_LENGTH)}
|
|
351
|
-
</CapColumn>
|
|
352
|
-
</CapRow>
|
|
353
|
-
{ctaType === PHONE_NUMBER && (
|
|
354
|
-
<CapRow>
|
|
355
|
-
<CapColumn span={11}>
|
|
356
|
-
{/* phone number */}
|
|
357
|
-
<CapHeading type="h4" className="cta-label">
|
|
358
|
-
{formatMessage(messages.ctaPhoneNo)}
|
|
359
|
-
</CapHeading>
|
|
360
|
-
<PhoneInput
|
|
361
|
-
placeholder={formatMessage(messages.ctaPhoneNoPlaceholder)}
|
|
362
|
-
autoFormat={false}
|
|
363
|
-
countryCodeEditable={false}
|
|
364
|
-
value={phone_number}
|
|
365
|
-
onChange={(value) => onPhoneNoChange(value, index)}
|
|
366
|
-
country="in"
|
|
367
|
-
className="cta-phone-number"
|
|
368
|
-
/>
|
|
369
|
-
{renderLength(phone_number.length, PHONE_NUMBER_MAX_LENGTH)}
|
|
370
|
-
</CapColumn>
|
|
371
|
-
</CapRow>
|
|
372
|
-
)}
|
|
373
|
-
{ctaType === WEBSITE && (
|
|
314
|
+
<CapColumn>
|
|
374
315
|
<CapRow>
|
|
375
316
|
<CapColumn span={12}>
|
|
376
|
-
{/*
|
|
317
|
+
{/* Type of action */}
|
|
377
318
|
<CapHeading type="h4" className="cta-label">
|
|
378
|
-
{formatMessage(messages.
|
|
319
|
+
{formatMessage(messages.ctaType)}
|
|
379
320
|
</CapHeading>
|
|
380
321
|
<CapSelect
|
|
381
|
-
id="whatsapp-cta-
|
|
382
|
-
options={
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
: KARIX_GUPSHUP_URL_OPTIONS
|
|
386
|
-
}
|
|
387
|
-
onChange={(value) => onUrlTypeChange(value, index)}
|
|
388
|
-
value={urlType}
|
|
322
|
+
id="whatsapp-cta-type"
|
|
323
|
+
options={ctaOptions || []}
|
|
324
|
+
onChange={(value) => onCtaTypeChange(value, index)}
|
|
325
|
+
value={ctaType}
|
|
389
326
|
/>
|
|
390
327
|
</CapColumn>
|
|
391
328
|
<CapColumn span={12}>
|
|
392
|
-
{/*
|
|
329
|
+
{/* Button text */}
|
|
393
330
|
<CapHeading type="h4" className="cta-label">
|
|
394
|
-
{formatMessage(messages.
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
/>
|
|
404
|
-
)}
|
|
331
|
+
{formatMessage(messages.ctaButtonText)}
|
|
332
|
+
<CapTooltipWithInfo
|
|
333
|
+
infoIconProps={{
|
|
334
|
+
style: { marginLeft: CAP_SPACE_04 },
|
|
335
|
+
}}
|
|
336
|
+
autoAdjustOverflow
|
|
337
|
+
placement="right"
|
|
338
|
+
title={formatMessage(messages.ctaButtonTextTooltip)}
|
|
339
|
+
/>
|
|
405
340
|
</CapHeading>
|
|
406
341
|
<CapInput
|
|
407
342
|
id={index}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
urlType === DYNAMIC_URL
|
|
413
|
-
? formatMessage(messages.ctaDynamicPlaceholder)
|
|
414
|
-
: formatMessage(messages.ctaStaticPlaceholder)
|
|
415
|
-
}
|
|
416
|
-
value={url}
|
|
343
|
+
className="whatsapp-cta-button-text"
|
|
344
|
+
onChange={onButtonTextChange}
|
|
345
|
+
placeholder={formatMessage(messages.ctaButtonTextPlaceholder)}
|
|
346
|
+
value={text}
|
|
417
347
|
size="large"
|
|
418
|
-
maxLength={
|
|
419
|
-
errorMessage={
|
|
348
|
+
maxLength={BTN_MAX_LENGTH}
|
|
349
|
+
errorMessage={buttonError}
|
|
420
350
|
/>
|
|
421
|
-
{renderLength(
|
|
351
|
+
{renderLength(text.length, BTN_MAX_LENGTH)}
|
|
422
352
|
</CapColumn>
|
|
423
353
|
</CapRow>
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
{
|
|
441
|
-
</
|
|
442
|
-
</
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
354
|
+
{ctaType === PHONE_NUMBER && (
|
|
355
|
+
<CapRow>
|
|
356
|
+
<CapColumn span={11}>
|
|
357
|
+
{/* phone number */}
|
|
358
|
+
<CapHeading type="h4" className="cta-label">
|
|
359
|
+
{formatMessage(messages.ctaPhoneNo)}
|
|
360
|
+
</CapHeading>
|
|
361
|
+
<PhoneInput
|
|
362
|
+
placeholder={formatMessage(messages.ctaPhoneNoPlaceholder)}
|
|
363
|
+
autoFormat={false}
|
|
364
|
+
countryCodeEditable={false}
|
|
365
|
+
value={phone_number}
|
|
366
|
+
onChange={(value) => onPhoneNoChange(value, index)}
|
|
367
|
+
country="in"
|
|
368
|
+
className="cta-phone-number"
|
|
369
|
+
/>
|
|
370
|
+
{renderLength(phone_number.length, PHONE_NUMBER_MAX_LENGTH)}
|
|
371
|
+
</CapColumn>
|
|
372
|
+
</CapRow>
|
|
373
|
+
)}
|
|
374
|
+
{ctaType === WEBSITE && (
|
|
375
|
+
<CapRow>
|
|
376
|
+
<CapColumn span={12}>
|
|
377
|
+
{/* URL Type */}
|
|
378
|
+
<CapHeading type="h4" className="cta-label">
|
|
379
|
+
{formatMessage(messages.ctaWebsiteType)}
|
|
380
|
+
</CapHeading>
|
|
381
|
+
<CapSelect
|
|
382
|
+
id="whatsapp-cta-url-type"
|
|
383
|
+
options={
|
|
384
|
+
hostName === HOST_TWILIO
|
|
385
|
+
? TWILIO_URL_OPTIONS
|
|
386
|
+
: KARIX_GUPSHUP_URL_OPTIONS
|
|
387
|
+
}
|
|
388
|
+
onChange={(value) => onUrlTypeChange(value, index)}
|
|
389
|
+
value={urlType}
|
|
390
|
+
/>
|
|
391
|
+
</CapColumn>
|
|
392
|
+
<CapColumn span={12}>
|
|
393
|
+
{/* cta url */}
|
|
394
|
+
<CapHeading type="h4" className="cta-label">
|
|
395
|
+
{formatMessage(messages.ctaWebsiteUrl)}
|
|
396
|
+
{urlType === DYNAMIC_URL && (
|
|
397
|
+
<CapTooltipWithInfo
|
|
398
|
+
infoIconProps={{
|
|
399
|
+
style: { marginLeft: CAP_SPACE_04 },
|
|
400
|
+
}}
|
|
401
|
+
autoAdjustOverflow
|
|
402
|
+
placement="right"
|
|
403
|
+
title={formatMessage(messages.dynamicUrlTooltip, { one: '{{1}}' })}
|
|
404
|
+
/>
|
|
405
|
+
)}
|
|
406
|
+
</CapHeading>
|
|
407
|
+
<CapInput
|
|
408
|
+
id={index}
|
|
409
|
+
addonAfter={urlType === DYNAMIC_URL && !url.includes(DYNAMIC_URL_SUFFIX) && DYNAMIC_URL_SUFFIX}
|
|
410
|
+
className="whatsapp-cta-url"
|
|
411
|
+
onChange={(event) => onUrlChange(event, urlType)}
|
|
412
|
+
placeholder={
|
|
413
|
+
urlType === DYNAMIC_URL
|
|
414
|
+
? formatMessage(messages.ctaDynamicPlaceholder)
|
|
415
|
+
: formatMessage(messages.ctaStaticPlaceholder)
|
|
416
|
+
}
|
|
417
|
+
value={url}
|
|
418
|
+
size="large"
|
|
419
|
+
maxLength={URL_MAX_LENGTH}
|
|
420
|
+
errorMessage={urlError}
|
|
421
|
+
/>
|
|
422
|
+
{renderLength(url.length, URL_MAX_LENGTH)}
|
|
423
|
+
</CapColumn>
|
|
424
|
+
</CapRow>
|
|
425
|
+
)}
|
|
426
|
+
</CapColumn>
|
|
427
|
+
<CapColumn>
|
|
428
|
+
<CapRow useLegacy className="whatsapp-cta-save-delete-btn">
|
|
429
|
+
<CapTooltip
|
|
430
|
+
title={
|
|
431
|
+
ctaSaveDisabled(index)
|
|
432
|
+
? formatMessage(messages.ctaSaveDisabled)
|
|
433
|
+
: ''
|
|
434
|
+
}
|
|
435
|
+
placement="bottom"
|
|
436
|
+
>
|
|
437
|
+
<div className="button-disabled-tooltip-wrapper">
|
|
438
|
+
<CapButton
|
|
439
|
+
onClick={() => saveCta(index)}
|
|
440
|
+
disabled={ctaSaveDisabled(index)}
|
|
441
|
+
className="whatsapp-cta-save-btn"
|
|
442
|
+
>
|
|
443
|
+
{formatMessage(globalMessages.save)}
|
|
444
|
+
</CapButton>
|
|
445
|
+
</div>
|
|
446
|
+
</CapTooltip>
|
|
447
|
+
<CapButton
|
|
448
|
+
onClick={() => deleteHandler(index)}
|
|
449
|
+
className="whatsapp-cta-delete-btn"
|
|
450
|
+
type="secondary"
|
|
451
|
+
>
|
|
452
|
+
{formatMessage(globalMessages.delete)}
|
|
453
|
+
</CapButton>
|
|
454
|
+
</CapRow>
|
|
455
|
+
</CapColumn>
|
|
452
456
|
</CapRow>,
|
|
453
457
|
);
|
|
454
458
|
}
|
|
@@ -460,7 +464,7 @@ export const CapWhatsappCTA = (props) => {
|
|
|
460
464
|
ctaData.length < 2
|
|
461
465
|
&& !isEditFlow
|
|
462
466
|
&& renderArray.push(
|
|
463
|
-
<CapRow>
|
|
467
|
+
<CapRow useLegacy>
|
|
464
468
|
<CapTooltip
|
|
465
469
|
title={
|
|
466
470
|
addBtnDisabled ? formatMessage(messages.ctaAddDisabled) : ''
|
|
@@ -469,7 +473,7 @@ export const CapWhatsappCTA = (props) => {
|
|
|
469
473
|
>
|
|
470
474
|
<div className="button-disabled-tooltip-wrapper">
|
|
471
475
|
<CapButton
|
|
472
|
-
type="
|
|
476
|
+
type="link"
|
|
473
477
|
id="whatsapp-cta-add-button"
|
|
474
478
|
disabled={addBtnDisabled}
|
|
475
479
|
className="margin-t-12 margin-l-24"
|