@capillarytech/creatives-library 8.0.339 → 8.0.340-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/app.js +8 -1
- package/global-styles.js +4 -0
- package/package.json +2 -2
- package/styles/components/navigation/_leftnav.scss +1 -1
- package/utils/tests/tagValidations.test.js +20 -0
- 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 +32 -27
- package/v2Components/CapTagList/style.scss +29 -0
- package/v2Components/CapTagListWithInput/__tests__/CapTagListWithInput.test.js +63 -0
- package/v2Components/CapTagListWithInput/index.js +4 -0
- package/v2Components/CapVideoUpload/index.js +1 -1
- package/v2Components/CapWhatsappCTA/index.js +130 -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 +3 -3
- 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/RcsPreviewContent.js +9 -9
- package/v2Components/CommonTestAndPreview/UnifiedPreview/SmsPreviewContent.js +8 -8
- 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 +10 -5
- package/v2Components/CommonTestAndPreview/UnifiedPreview/index.js +1 -1
- package/v2Components/CommonTestAndPreview/_commonTestAndPreview.scss +3 -4
- package/v2Components/CommonTestAndPreview/index.js +1 -1
- 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 +39 -40
- package/v2Components/HtmlEditor/HTMLEditor.js +10 -5
- package/v2Components/HtmlEditor/__tests__/HTMLEditor.apiErrors.test.js +1 -0
- package/v2Components/HtmlEditor/__tests__/HTMLEditor.test.js +927 -2
- package/v2Components/HtmlEditor/_htmlEditor.scss +2 -1
- package/v2Components/HtmlEditor/components/CodeEditorPane/index.js +4 -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 +3 -3
- package/v2Components/TestAndPreviewSlidebox/LeftPanelContent.js +5 -5
- package/v2Components/TestAndPreviewSlidebox/PreviewSection.js +3 -3
- package/v2Components/TestAndPreviewSlidebox/_testAndPreviewSlidebox.scss +4 -2
- package/v2Containers/BeeEditor/index.js +3 -0
- 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/SlideBoxContent.js +28 -1
- package/v2Containers/CreativesContainer/SlideBoxFooter.js +1 -1
- package/v2Containers/CreativesContainer/index.js +4 -1
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +47 -0
- package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +5 -0
- package/v2Containers/Ebill/index.js +10 -9
- package/v2Containers/Email/index.js +8 -7
- package/v2Containers/Email/initialSchema.js +1 -1
- package/v2Containers/EmailWrapper/components/EmailHTMLEditor.js +6 -1
- package/v2Containers/EmailWrapper/components/EmailWrapperView.js +3 -0
- package/v2Containers/EmailWrapper/components/__tests__/EmailHTMLEditor.test.js +20 -2
- package/v2Containers/EmailWrapper/components/__tests__/EmailWrapperView.test.js +16 -1
- package/v2Containers/EmailWrapper/hooks/useEmailWrapper.js +3 -0
- package/v2Containers/EmailWrapper/index.js +4 -0
- package/v2Containers/EmailWrapper/tests/useEmailWrapper.edgeCases.test.js +1 -0
- package/v2Containers/EmailWrapper/tests/useEmailWrapper.test.js +9 -0
- 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/InAppWrapper/hooks/__tests__/useInAppWrapper.test.js +1 -0
- 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/MobilePush/Create/index.js +2 -0
- package/v2Containers/MobilePush/Edit/index.js +2 -0
- 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 +6 -3
- package/v2Containers/MobilepushWrapper/index.js +3 -1
- package/v2Containers/Rcs/index.js +25 -19
- package/v2Containers/Rcs/index.scss +0 -7
- package/v2Containers/Sms/Create/index.js +2 -0
- package/v2Containers/Sms/Edit/index.js +2 -0
- package/v2Containers/SmsTrai/Edit/index.js +5 -2
- package/v2Containers/SmsWrapper/index.js +2 -0
- package/v2Containers/TagList/index.js +62 -5
- package/v2Containers/TagList/messages.js +4 -0
- package/v2Containers/TagList/tests/TagList.test.js +124 -20
- package/v2Containers/TagList/tests/mockdata.js +17 -0
- package/v2Containers/Templates/index.js +16 -16
- package/v2Containers/Viber/index.js +22 -14
- package/v2Containers/Viber/index.scss +0 -7
- 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/hooks/useTagManagement.js +0 -2
- package/v2Containers/WebPush/Create/index.js +9 -1
- package/v2Containers/WebPush/Create/index.scss +6 -3
- package/v2Containers/WebPush/Create/preview/WebPushPreview.js +1 -1
- package/v2Containers/Whatsapp/index.js +33 -28
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +20 -0
- package/v2Containers/Zalo/index.js +5 -3
|
@@ -183,9 +183,9 @@ const CustomerSearchSection = ({
|
|
|
183
183
|
};
|
|
184
184
|
|
|
185
185
|
return (
|
|
186
|
-
<CapRow className="customer-search-section">
|
|
186
|
+
<CapRow useLegacy className="customer-search-section">
|
|
187
187
|
<div ref={searchContainerRef}>
|
|
188
|
-
<CapRow className="search-container">
|
|
188
|
+
<CapRow useLegacy className="search-container">
|
|
189
189
|
{selectedCustomer ? (
|
|
190
190
|
<SelectedCustomerView
|
|
191
191
|
customer={selectedCustomer}
|
|
@@ -203,7 +203,7 @@ const CustomerSearchSection = ({
|
|
|
203
203
|
/>
|
|
204
204
|
)}
|
|
205
205
|
{showDropdown && !selectedCustomer && (
|
|
206
|
-
<CapRow className="search-dropdown-container">
|
|
206
|
+
<CapRow useLegacy className="search-dropdown-container">
|
|
207
207
|
<CapRow type="flex" justify="center" align="middle">
|
|
208
208
|
{(processedSearchData?.length === 0 && customerSearchValue != null && !isSearchingCustomer) && (
|
|
209
209
|
<CapCard className="validation-card">
|
|
@@ -214,7 +214,7 @@ const CustomerSearchSection = ({
|
|
|
214
214
|
)}
|
|
215
215
|
{(isSearchingCustomer) && (
|
|
216
216
|
<CapCard className="validation-card">
|
|
217
|
-
<CapRow className="spin-card-align">
|
|
217
|
+
<CapRow useLegacy className="spin-card-align">
|
|
218
218
|
<CapSpin />
|
|
219
219
|
</CapRow>
|
|
220
220
|
</CapCard>
|
|
@@ -232,12 +232,12 @@ const CustomerSearchSection = ({
|
|
|
232
232
|
className="search-results-height link-result"
|
|
233
233
|
title={(
|
|
234
234
|
<>
|
|
235
|
-
<CapRow type="flex" align="middle"
|
|
235
|
+
<CapRow type="flex" align="middle" gap={16}>
|
|
236
236
|
<CapColumn data-testid="namingIcon">
|
|
237
237
|
<CapRow className="customer-common-profile">{getNamingIcon(d?.name)}</CapRow>
|
|
238
238
|
</CapColumn>
|
|
239
239
|
<CapColumn>
|
|
240
|
-
<CapRow type="flex"
|
|
240
|
+
<CapRow type="flex" gap={12}>
|
|
241
241
|
<CapColumn data-testid="searchResultName">
|
|
242
242
|
<CapHeading className="search-text" type="h4">
|
|
243
243
|
{d?.name}
|
|
@@ -279,7 +279,7 @@ const SearchInput = ({
|
|
|
279
279
|
disabled,
|
|
280
280
|
placeholder,
|
|
281
281
|
}) => (
|
|
282
|
-
<CapRow className="search-input-container">
|
|
282
|
+
<CapRow useLegacy className="search-input-container">
|
|
283
283
|
<CapInput
|
|
284
284
|
value={value}
|
|
285
285
|
onChange={onChange}
|
|
@@ -290,7 +290,7 @@ const SearchInput = ({
|
|
|
290
290
|
autoComplete="off"
|
|
291
291
|
/>
|
|
292
292
|
{error && (
|
|
293
|
-
<CapRow className="search-error">
|
|
293
|
+
<CapRow useLegacy className="search-error">
|
|
294
294
|
<CapAlert
|
|
295
295
|
message={error}
|
|
296
296
|
type="error"
|
|
@@ -304,7 +304,7 @@ const SearchInput = ({
|
|
|
304
304
|
|
|
305
305
|
const SelectedCustomerView = ({ customer, onClear, showIdentifiers }) => (
|
|
306
306
|
<div className="selected-customer-view">
|
|
307
|
-
<CapRow type="flex" align="middle"
|
|
307
|
+
<CapRow type="flex" align="middle" gap={8}>
|
|
308
308
|
<CapColumn>
|
|
309
309
|
<CapRow className="customer-common-profile">{getNamingIcon(customer?.name)}</CapRow>
|
|
310
310
|
</CapColumn>
|
|
@@ -94,7 +94,7 @@ const TabContent = ({ issues, onErrorClick, intl }) => {
|
|
|
94
94
|
};
|
|
95
95
|
|
|
96
96
|
return (
|
|
97
|
-
<CapRow className="error-info-note__content">
|
|
97
|
+
<CapRow useLegacy className="error-info-note__content">
|
|
98
98
|
{issues.map((issue, index) => {
|
|
99
99
|
const { severity, message } = issue;
|
|
100
100
|
const key = `${message}-${index}`;
|
|
@@ -114,10 +114,11 @@ const TabContent = ({ issues, onErrorClick, intl }) => {
|
|
|
114
114
|
|
|
115
115
|
return (
|
|
116
116
|
<CapRow
|
|
117
|
+
useLegacy
|
|
117
118
|
key={key}
|
|
118
119
|
className={`error-info-note__item error-info-note__item--${severity || 'error'}`}
|
|
119
120
|
>
|
|
120
|
-
<CapRow className="error-info-note__item-content">
|
|
121
|
+
<CapRow useLegacy className="error-info-note__item-content">
|
|
121
122
|
<CapLabelInline type="label2" className="error-info-note__item-message">
|
|
122
123
|
{displayMessage}
|
|
123
124
|
</CapLabelInline>
|
|
@@ -149,7 +150,7 @@ const TabContent = ({ issues, onErrorClick, intl }) => {
|
|
|
149
150
|
{onErrorClick && (
|
|
150
151
|
<CapTooltip title={intl?.formatMessage ? intl.formatMessage(messages.navigateToError) : 'Go to error location'}>
|
|
151
152
|
<CapButton
|
|
152
|
-
type="
|
|
153
|
+
type="link"
|
|
153
154
|
className="error-info-note__item-navigate"
|
|
154
155
|
onClick={(e) => handleNavigateClick({ ...issue, line, column: char }, e)}
|
|
155
156
|
aria-label={intl?.formatMessage ? intl.formatMessage(messages.navigateToError) : 'Go to error location'}
|
|
@@ -348,7 +349,7 @@ export const ErrorInfoNote = (props) => {
|
|
|
348
349
|
}
|
|
349
350
|
|
|
350
351
|
return (
|
|
351
|
-
<CapRow className="error-container error-container--tabs">
|
|
352
|
+
<CapRow useLegacy className="error-container error-container--tabs">
|
|
352
353
|
<CapRow className="error-info-note__header">
|
|
353
354
|
<CapTab
|
|
354
355
|
activeKey={activeKey || (tabPanes[0]?.key)}
|
|
@@ -356,10 +357,10 @@ export const ErrorInfoNote = (props) => {
|
|
|
356
357
|
panes={tabPanes}
|
|
357
358
|
className="error-info-note__tabs"
|
|
358
359
|
/>
|
|
359
|
-
<CapRow className="error-info-note__actions">
|
|
360
|
+
<CapRow useLegacy className="error-info-note__actions">
|
|
360
361
|
{hasLiquidErrors && (
|
|
361
362
|
<CapButton
|
|
362
|
-
type="
|
|
363
|
+
type="link"
|
|
363
364
|
className="error-info-note__liquid-doc"
|
|
364
365
|
onClick={handleLiquidDocClick}
|
|
365
366
|
>
|
|
@@ -369,7 +370,7 @@ export const ErrorInfoNote = (props) => {
|
|
|
369
370
|
)}
|
|
370
371
|
<CapTooltip title={intl?.formatMessage ? intl.formatMessage(messages.closePanel) : 'Close validation panel'}>
|
|
371
372
|
<CapButton
|
|
372
|
-
type="
|
|
373
|
+
type="link"
|
|
373
374
|
className="error-info-note__close"
|
|
374
375
|
onClick={handleClose}
|
|
375
376
|
aria-label={intl?.formatMessage ? intl.formatMessage(messages.closePanel) : 'Close validation panel'}
|
|
@@ -393,6 +394,7 @@ const ErrorSection = ({
|
|
|
393
394
|
<>
|
|
394
395
|
{title && (
|
|
395
396
|
<CapRow
|
|
397
|
+
useLegacy
|
|
396
398
|
className={`error-header ${
|
|
397
399
|
!liquidError ? 'standard-error-header' : ''
|
|
398
400
|
}`}
|
|
@@ -404,7 +406,7 @@ const ErrorSection = ({
|
|
|
404
406
|
<>
|
|
405
407
|
{liquidError && (
|
|
406
408
|
<CapButton
|
|
407
|
-
type="
|
|
409
|
+
type="link"
|
|
408
410
|
className="add-btn"
|
|
409
411
|
onClick={() => window.open(LIQUID_DOC_URL, '_blank')}
|
|
410
412
|
>
|
|
@@ -416,13 +418,13 @@ const ErrorSection = ({
|
|
|
416
418
|
</CapRow>
|
|
417
419
|
)}
|
|
418
420
|
{platformLabel && (
|
|
419
|
-
<CapRow className="error-header-sub-title">
|
|
421
|
+
<CapRow useLegacy className="error-header-sub-title">
|
|
420
422
|
<CapLabel type="label2">{platformLabel}</CapLabel>
|
|
421
423
|
</CapRow>
|
|
422
424
|
)}
|
|
423
|
-
<CapRow className="error-list-legacy">
|
|
425
|
+
<CapRow useLegacy className="error-list-legacy">
|
|
424
426
|
{(errors || []).map((error) => (
|
|
425
|
-
<CapRow key={`${error}`} className="error-list-legacy__item">
|
|
427
|
+
<CapRow useLegacy key={`${error}`} className="error-list-legacy__item">
|
|
426
428
|
<CapLabel type="label2" className="cap-list-v2-error-item">
|
|
427
429
|
<CapLabel type="label2">{error}</CapLabel>
|
|
428
430
|
</CapLabel>
|
|
@@ -10,7 +10,7 @@ import PropTypes from 'prop-types';
|
|
|
10
10
|
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import _ from 'lodash';
|
|
13
|
-
import {
|
|
13
|
+
import { Table, Modal} from 'antd';
|
|
14
14
|
import { connect } from 'react-redux';
|
|
15
15
|
import CapSpin from '@capillarytech/cap-ui-library/CapSpin';
|
|
16
16
|
import CapDrawer from '@capillarytech/cap-ui-library/CapDrawer';
|
|
@@ -24,6 +24,7 @@ import CapSelect from '@capillarytech/cap-ui-library/CapSelect';
|
|
|
24
24
|
import CapTable from '@capillarytech/cap-ui-library/CapTable';
|
|
25
25
|
import CapRow from '@capillarytech/cap-ui-library/CapRow';
|
|
26
26
|
import CapColumn from '@capillarytech/cap-ui-library/CapColumn';
|
|
27
|
+
import CapTab from '@capillarytech/cap-ui-library/CapTab';
|
|
27
28
|
import CapNotification from '@capillarytech/cap-ui-library/CapNotification';
|
|
28
29
|
import CapUploader from '@capillarytech/cap-ui-library/CapUploader';
|
|
29
30
|
import CapHeading from '@capillarytech/cap-ui-library/CapHeading';
|
|
@@ -64,7 +65,6 @@ import { isEmailUnsubscribeTagOptional, isAiContentBotDisabled } from '../../uti
|
|
|
64
65
|
import { isUrl } from '../../v2Containers/Line/Container/Wrapper/utils';
|
|
65
66
|
import { bindActionCreators } from 'redux';
|
|
66
67
|
import { getChannelData, hasPersonalizationTags, validateLiquidTemplateContent, validateMobilePushContent } from '../../utils/commonUtils';
|
|
67
|
-
const TabPane = Tabs.TabPane;
|
|
68
68
|
const {Column} = Table;
|
|
69
69
|
const {TextArea} = CapInput;
|
|
70
70
|
const {CapRadioGroup} = CapRadio;
|
|
@@ -2990,6 +2990,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
2990
2990
|
selectedOfferDetails={this.props.selectedOfferDetails}
|
|
2991
2991
|
eventContextTags={this.props?.eventContextTags}
|
|
2992
2992
|
restrictPersonalization={this.props.restrictPersonalization}
|
|
2993
|
+
waitEventContextTags={this.props?.waitEventContextTags}
|
|
2993
2994
|
/>
|
|
2994
2995
|
</CapColumn>
|
|
2995
2996
|
);
|
|
@@ -3019,6 +3020,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
3019
3020
|
userLocale={this.props.userLocale}
|
|
3020
3021
|
selectedOfferDetails={this.props.selectedOfferDetails}
|
|
3021
3022
|
eventContextTags={this.props?.eventContextTags}
|
|
3023
|
+
waitEventContextTags={this.props?.waitEventContextTags}
|
|
3022
3024
|
moduleFilterEnabled={this.props.location && this.props.location.query && this.props.location.query.type !== 'embedded'}
|
|
3023
3025
|
containerStyle={val.style || {}}
|
|
3024
3026
|
inputProps={val.inputProps || {}}
|
|
@@ -3156,7 +3158,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
3156
3158
|
break;
|
|
3157
3159
|
}
|
|
3158
3160
|
row.push(
|
|
3159
|
-
<CapRow>
|
|
3161
|
+
<CapRow useLegacy>
|
|
3160
3162
|
{
|
|
3161
3163
|
_.forEach(columns, (value) => {
|
|
3162
3164
|
if (value) {
|
|
@@ -3205,7 +3207,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
3205
3207
|
cols.push(<CapColumn style={childSection.colStyle ? childSection.colStyle : {}}offset={childSection.offset} span={childSection.width}>{renderedChildSection}</CapColumn>);
|
|
3206
3208
|
return true;
|
|
3207
3209
|
});
|
|
3208
|
-
const row = (<CapRow style={section.rowStyle ? section.rowStyle : {}}>
|
|
3210
|
+
const row = (<CapRow useLegacy style={section.rowStyle ? section.rowStyle : {}}>
|
|
3209
3211
|
{
|
|
3210
3212
|
_.forEach(cols, (value) => {
|
|
3211
3213
|
if (value) {
|
|
@@ -3318,7 +3320,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
3318
3320
|
return (
|
|
3319
3321
|
<CapButton
|
|
3320
3322
|
className="dragger-button"
|
|
3321
|
-
type="
|
|
3323
|
+
type="link"
|
|
3322
3324
|
style={{top: 0, position: 'absolute', right: 0, color: FONT_COLOR_05 }}
|
|
3323
3325
|
onClick={this.onReUpload}
|
|
3324
3326
|
>
|
|
@@ -3327,7 +3329,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
3327
3329
|
);
|
|
3328
3330
|
}
|
|
3329
3331
|
return (
|
|
3330
|
-
<CapButton disabled={val.disabled ? val.disabled : false} type="
|
|
3332
|
+
<CapButton disabled={val.disabled ? val.disabled : false} type="link" prefix={<CapIcon size="s" type="add-photo" />} onClick={(e) => this.openFileDialog(e, val.id)} style={{float: 'right', color: `${val.disabled ? FONT_COLOR_04 : FONT_COLOR_05}`}}>
|
|
3331
3333
|
{val.label}
|
|
3332
3334
|
</CapButton>
|
|
3333
3335
|
);
|
|
@@ -3658,6 +3660,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
3658
3660
|
channel={channel}
|
|
3659
3661
|
eventContextTags={this.props?.eventContextTags}
|
|
3660
3662
|
restrictPersonalization={this.props.restrictPersonalization}
|
|
3663
|
+
waitEventContextTags={this.props?.waitEventContextTags}
|
|
3661
3664
|
/>
|
|
3662
3665
|
</CapColumn>
|
|
3663
3666
|
);
|
|
@@ -3704,6 +3707,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
3704
3707
|
userLocale={this.state.translationLang}
|
|
3705
3708
|
selectedOfferDetails={this.props.selectedOfferDetails}
|
|
3706
3709
|
eventContextTags={this.props?.eventContextTags}
|
|
3710
|
+
waitEventContextTags={this.props?.waitEventContextTags}
|
|
3707
3711
|
moduleFilterEnabled={moduleFilterEnabledForCapTagList}
|
|
3708
3712
|
containerStyle={val.style || {}}
|
|
3709
3713
|
inputProps={val.inputProps || {}}
|
|
@@ -3998,6 +4002,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
3998
4002
|
onContextChange={this.props.onContextChange}
|
|
3999
4003
|
moduleFilterEnabled={isModuleFilterEnabled}
|
|
4000
4004
|
eventContextTags={this.props?.eventContextTags}
|
|
4005
|
+
waitEventContextTags={this.props?.waitEventContextTags}
|
|
4001
4006
|
isGetBeeData={this.props?.isGetBeeData}
|
|
4002
4007
|
getBEEData={this.props?.getBEEData}
|
|
4003
4008
|
/>
|
|
@@ -4029,7 +4034,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
4029
4034
|
return true;
|
|
4030
4035
|
});
|
|
4031
4036
|
const row = (
|
|
4032
|
-
<CapRow style={field.rowStyle ? field.rowStyle : {}} className={field.rowClassName ? field.rowClassName : ''}>
|
|
4037
|
+
<CapRow useLegacy style={field.rowStyle ? field.rowStyle : {}} className={field.rowClassName ? field.rowClassName : ''}>
|
|
4033
4038
|
{
|
|
4034
4039
|
_.forEach(columns, (value) => {
|
|
4035
4040
|
if (value) {
|
|
@@ -4071,7 +4076,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
4071
4076
|
}
|
|
4072
4077
|
});
|
|
4073
4078
|
const row = (
|
|
4074
|
-
<CapRow>
|
|
4079
|
+
<CapRow useLegacy>
|
|
4075
4080
|
{
|
|
4076
4081
|
_.forEach(columns, (value) => {
|
|
4077
4082
|
if (value) {
|
|
@@ -4154,31 +4159,30 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
4154
4159
|
}
|
|
4155
4160
|
const isPaneSupported = typeof pane.isSupported === "boolean" ? pane.isSupported : true; // pane.isSupported field exists only in mpush schema, in other channels it is not
|
|
4156
4161
|
if (isPaneSupported) {
|
|
4157
|
-
renderedPanes.push(
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
tab={
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
_.forEach(renderedContentSections, (value) => {
|
|
4164
|
-
if (value) {
|
|
4165
|
-
return value;
|
|
4166
|
-
}
|
|
4167
|
-
return value;
|
|
4168
|
-
}))
|
|
4169
|
-
}
|
|
4170
|
-
</div>
|
|
4171
|
-
}
|
|
4172
|
-
key={paneTabKey && paneTabKey !== '' ? `${paneTabKey}` : index}>
|
|
4173
|
-
{
|
|
4174
|
-
_.forEach(renderedSections, (value) => {
|
|
4162
|
+
renderedPanes.push({
|
|
4163
|
+
forceRender: true,
|
|
4164
|
+
tab: (
|
|
4165
|
+
<div className="form-tab-header" onInput={(e) => e.stopPropagation()}>
|
|
4166
|
+
{ this.state.translationLang !== 'ja-JP' && (
|
|
4167
|
+
_.forEach(renderedContentSections, (value) => {
|
|
4175
4168
|
if (value) {
|
|
4176
4169
|
return value;
|
|
4177
4170
|
}
|
|
4178
4171
|
return value;
|
|
4179
|
-
})
|
|
4180
|
-
|
|
4181
|
-
|
|
4172
|
+
}))
|
|
4173
|
+
}
|
|
4174
|
+
</div>
|
|
4175
|
+
),
|
|
4176
|
+
key: paneTabKey && paneTabKey !== '' ? `${paneTabKey}` : index,
|
|
4177
|
+
content: (
|
|
4178
|
+
_.forEach(renderedSections, (value) => {
|
|
4179
|
+
if (value) {
|
|
4180
|
+
return value;
|
|
4181
|
+
}
|
|
4182
|
+
return value;
|
|
4183
|
+
})
|
|
4184
|
+
),
|
|
4185
|
+
});
|
|
4182
4186
|
paneIndex += 1;
|
|
4183
4187
|
}
|
|
4184
4188
|
});
|
|
@@ -4191,7 +4195,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
4191
4195
|
activeTabKey = stateTabKey;
|
|
4192
4196
|
}
|
|
4193
4197
|
return (
|
|
4194
|
-
<
|
|
4198
|
+
<CapTab
|
|
4195
4199
|
className={`cap-tabs-${container.id}`}
|
|
4196
4200
|
activeKey={activeTabKey && activeTabKey !== '' ? `${activeTabKey}` : '1'}
|
|
4197
4201
|
defaultActiveKey={activeTabKey && activeTabKey !== '' ? `${activeTabKey}` : '1'}
|
|
@@ -4205,16 +4209,9 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
4205
4209
|
}
|
|
4206
4210
|
return value;
|
|
4207
4211
|
})
|
|
4208
|
-
}>
|
|
4209
|
-
{
|
|
4210
|
-
_.forEach(renderedPanes, (value) => {
|
|
4211
|
-
if (value) {
|
|
4212
|
-
return value;
|
|
4213
|
-
}
|
|
4214
|
-
return value;
|
|
4215
|
-
})
|
|
4216
4212
|
}
|
|
4217
|
-
|
|
4213
|
+
panes={renderedPanes}
|
|
4214
|
+
/>
|
|
4218
4215
|
);
|
|
4219
4216
|
|
|
4220
4217
|
default:
|
|
@@ -4268,7 +4265,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
4268
4265
|
|
|
4269
4266
|
return (
|
|
4270
4267
|
<CapSpin spinning={Boolean((this.isLiquidFlowSupportedByChannel() && this.props.liquidExtractionInProgress) || this.props.metaDataStatus === REQUEST)} tip={this.props.intl.formatMessage(messages.liquidSpinText)} >
|
|
4271
|
-
<CapRow>
|
|
4268
|
+
<CapRow useLegacy>
|
|
4272
4269
|
{this.props.schema && this.renderForm()}
|
|
4273
4270
|
<SlideBox
|
|
4274
4271
|
header={
|
|
@@ -4302,6 +4299,7 @@ FormBuilder.defaultProps = {
|
|
|
4302
4299
|
userLocale: localStorage.getItem('jlocale') || 'en',
|
|
4303
4300
|
showLiquidErrorInFooter: () => {},
|
|
4304
4301
|
metaDataStatus: "",
|
|
4302
|
+
waitEventContextTags: {},
|
|
4305
4303
|
isTestAndPreviewMode: false, // Default to false to maintain existing behavior
|
|
4306
4304
|
};
|
|
4307
4305
|
|
|
@@ -4352,6 +4350,7 @@ FormBuilder.propTypes = {
|
|
|
4352
4350
|
moduleType: PropTypes.string.isRequired,
|
|
4353
4351
|
showLiquidErrorInFooter: PropTypes.bool.isRequired,
|
|
4354
4352
|
eventContextTags: PropTypes.array.isRequired,
|
|
4353
|
+
waitEventContextTags: PropTypes.object,
|
|
4355
4354
|
forwardedTags: PropTypes.object.isRequired,
|
|
4356
4355
|
isLoyaltyModule: PropTypes.bool.isRequired,
|
|
4357
4356
|
isTestAndPreviewMode: PropTypes.bool, // Add new prop type
|
|
@@ -94,6 +94,7 @@ const HTMLEditor = forwardRef(({
|
|
|
94
94
|
injectedTags = {},
|
|
95
95
|
location,
|
|
96
96
|
eventContextTags = [],
|
|
97
|
+
waitEventContextTags,
|
|
97
98
|
selectedOfferDetails = [],
|
|
98
99
|
channel,
|
|
99
100
|
userLocale = 'en',
|
|
@@ -361,7 +362,7 @@ const HTMLEditor = forwardRef(({
|
|
|
361
362
|
const issueCounts = calculateIssueCounts();
|
|
362
363
|
const isContentEmpty = !currentContent || currentContent.trim() === '';
|
|
363
364
|
|
|
364
|
-
// hasErrors = only Rule Group #1 (Input & Sanitization)
|
|
365
|
+
// hasErrors = only Rule Group #1 (Input & Sanitization) - gates Done/Update/Preview/Test
|
|
365
366
|
const newState = {
|
|
366
367
|
isContentEmpty,
|
|
367
368
|
issueCounts,
|
|
@@ -608,7 +609,7 @@ const HTMLEditor = forwardRef(({
|
|
|
608
609
|
// Loading state
|
|
609
610
|
if (!content || !layout) {
|
|
610
611
|
return (
|
|
611
|
-
<CapRow className="html-editor-loading">
|
|
612
|
+
<CapRow useLegacy className="html-editor-loading">
|
|
612
613
|
<CapSpin size="large" tip={intl.formatMessage(messages.initializing)} />
|
|
613
614
|
</CapRow>
|
|
614
615
|
);
|
|
@@ -632,7 +633,7 @@ const HTMLEditor = forwardRef(({
|
|
|
632
633
|
/>
|
|
633
634
|
) : (
|
|
634
635
|
/* InApp variant: Device Toggle + Toolbar combined */
|
|
635
|
-
<CapRow className="html-editor__header">
|
|
636
|
+
<CapRow useLegacy className="html-editor__header">
|
|
636
637
|
<DeviceToggle
|
|
637
638
|
activeDevice={activeDevice}
|
|
638
639
|
onDeviceChange={switchDevice}
|
|
@@ -651,7 +652,7 @@ const HTMLEditor = forwardRef(({
|
|
|
651
652
|
)}
|
|
652
653
|
|
|
653
654
|
{/* Main Content Area - Split Container */}
|
|
654
|
-
<CapRow className="html-editor-content">
|
|
655
|
+
<CapRow useLegacy className="html-editor-content">
|
|
655
656
|
<SplitContainer className="html-editor-split-container">
|
|
656
657
|
{/* Code Editor Pane */}
|
|
657
658
|
<CodeEditorPane
|
|
@@ -663,6 +664,7 @@ const HTMLEditor = forwardRef(({
|
|
|
663
664
|
injectedTags={injectedTags}
|
|
664
665
|
location={location}
|
|
665
666
|
eventContextTags={eventContextTags}
|
|
667
|
+
waitEventContextTags={waitEventContextTags}
|
|
666
668
|
selectedOfferDetails={selectedOfferDetails}
|
|
667
669
|
channel={channel}
|
|
668
670
|
userLocale={userLocale}
|
|
@@ -689,7 +691,7 @@ const HTMLEditor = forwardRef(({
|
|
|
689
691
|
width="93vw"
|
|
690
692
|
className="html-editor-fullscreen-modal"
|
|
691
693
|
>
|
|
692
|
-
<CapRow className={`html-editor-fullscreen html-editor-fullscreen--${variant} ${isLibraryMode ? 'html-editor-fullscreen--library-mode' : ''}`}>
|
|
694
|
+
<CapRow useLegacy className={`html-editor-fullscreen html-editor-fullscreen--${variant} ${isLibraryMode ? 'html-editor-fullscreen--library-mode' : ''}`}>
|
|
693
695
|
{/* Editor Toolbar - Conditional based on variant */}
|
|
694
696
|
{variant === HTML_EDITOR_VARIANTS.EMAIL ? (
|
|
695
697
|
<EditorToolbar
|
|
@@ -734,6 +736,7 @@ const HTMLEditor = forwardRef(({
|
|
|
734
736
|
injectedTags={injectedTags}
|
|
735
737
|
location={location}
|
|
736
738
|
eventContextTags={eventContextTags}
|
|
739
|
+
waitEventContextTags={waitEventContextTags}
|
|
737
740
|
selectedOfferDetails={selectedOfferDetails}
|
|
738
741
|
channel={channel}
|
|
739
742
|
userLocale={userLocale}
|
|
@@ -772,6 +775,7 @@ HTMLEditor.propTypes = {
|
|
|
772
775
|
injectedTags: PropTypes.object,
|
|
773
776
|
location: PropTypes.object,
|
|
774
777
|
eventContextTags: PropTypes.array,
|
|
778
|
+
waitEventContextTags: PropTypes.object,
|
|
775
779
|
selectedOfferDetails: PropTypes.array,
|
|
776
780
|
channel: PropTypes.string,
|
|
777
781
|
userLocale: PropTypes.string,
|
|
@@ -805,6 +809,7 @@ HTMLEditor.defaultProps = {
|
|
|
805
809
|
injectedTags: {},
|
|
806
810
|
location: null,
|
|
807
811
|
eventContextTags: [],
|
|
812
|
+
waitEventContextTags: {},
|
|
808
813
|
selectedOfferDetails: [],
|
|
809
814
|
channel: null,
|
|
810
815
|
userLocale: 'en',
|