@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
|
@@ -59,6 +59,7 @@ const CodeEditorPaneComponent = ({
|
|
|
59
59
|
injectedTags = {},
|
|
60
60
|
location,
|
|
61
61
|
eventContextTags = [],
|
|
62
|
+
waitEventContextTags = {},
|
|
62
63
|
selectedOfferDetails = [],
|
|
63
64
|
channel,
|
|
64
65
|
userLocale = 'en',
|
|
@@ -273,7 +274,7 @@ const CodeEditorPaneComponent = ({
|
|
|
273
274
|
<div className="codemirror-wrapper">
|
|
274
275
|
<div ref={editorRef} className="codemirror-editor" />
|
|
275
276
|
{/* Floating Add Label Button */}
|
|
276
|
-
<CapRow className="code-editor-pane__actions">
|
|
277
|
+
<CapRow useLegacy className="code-editor-pane__actions">
|
|
277
278
|
<TagList
|
|
278
279
|
key="html-editor-taglist"
|
|
279
280
|
label={intl.formatMessage(messages.addLabel)}
|
|
@@ -289,6 +290,7 @@ const CodeEditorPaneComponent = ({
|
|
|
289
290
|
location={location}
|
|
290
291
|
selectedOfferDetails={selectedOfferDetails}
|
|
291
292
|
eventContextTags={eventContextTags}
|
|
293
|
+
waitEventContextTags={waitEventContextTags}
|
|
292
294
|
popoverPlacement="rightTop"
|
|
293
295
|
/>
|
|
294
296
|
</CapRow>
|
|
@@ -327,6 +329,7 @@ CodeEditorPane.propTypes = {
|
|
|
327
329
|
injectedTags: PropTypes.object,
|
|
328
330
|
location: PropTypes.object,
|
|
329
331
|
eventContextTags: PropTypes.array,
|
|
332
|
+
waitEventContextTags: PropTypes.object,
|
|
330
333
|
selectedOfferDetails: PropTypes.array,
|
|
331
334
|
channel: PropTypes.string,
|
|
332
335
|
userLocale: PropTypes.string,
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
transition: all 0.2s ease-in-out;
|
|
42
42
|
|
|
43
43
|
// Override any Cap UI button styles with high specificity
|
|
44
|
-
&.cap-button,
|
|
44
|
+
&.cap-button-v2,
|
|
45
45
|
&.ant-btn,
|
|
46
46
|
&.cap-button-primary,
|
|
47
47
|
&.cap-button-success,
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
// Override Cap UI styles for active state with high specificity
|
|
97
|
-
&.cap-button,
|
|
97
|
+
&.cap-button-v2,
|
|
98
98
|
&.ant-btn,
|
|
99
99
|
&.cap-button-primary,
|
|
100
100
|
&.cap-button-success,
|
|
@@ -51,7 +51,7 @@ const DeviceToggle = ({
|
|
|
51
51
|
return (
|
|
52
52
|
<CapRow className={`device-toggle ${className}`}>
|
|
53
53
|
{/* Device Tabs */}
|
|
54
|
-
<CapRow className="device-toggle__tabs">
|
|
54
|
+
<CapRow useLegacy className="device-toggle__tabs">
|
|
55
55
|
{/* Android Tab */}
|
|
56
56
|
<CapButton
|
|
57
57
|
type={activeDevice === DEVICE_TYPES.ANDROID ? "primary" : "default"}
|
|
@@ -78,7 +78,7 @@ const DeviceToggle = ({
|
|
|
78
78
|
</CapRow>
|
|
79
79
|
|
|
80
80
|
{/* Content Sync Checkbox */}
|
|
81
|
-
<CapRow className="device-toggle__sync">
|
|
81
|
+
<CapRow useLegacy className="device-toggle__sync">
|
|
82
82
|
<CapCheckbox
|
|
83
83
|
checked={keepContentSame}
|
|
84
84
|
onChange={handleCheckboxChange}
|
|
@@ -35,7 +35,7 @@ const PreviewModeGroup = ({
|
|
|
35
35
|
return (
|
|
36
36
|
<div className="preview-mode-group">
|
|
37
37
|
<CapButton
|
|
38
|
-
type="
|
|
38
|
+
type="link"
|
|
39
39
|
onClick={() => onChange(DESKTOP)}
|
|
40
40
|
disabled={disabled}
|
|
41
41
|
className={value === DESKTOP ? 'preview-mode-group__btn preview-mode-group__btn--active' : 'preview-mode-group__btn'}
|
|
@@ -45,7 +45,7 @@ const PreviewModeGroup = ({
|
|
|
45
45
|
<CapIcon type="desktop" size="m" />
|
|
46
46
|
</CapButton>
|
|
47
47
|
<CapButton
|
|
48
|
-
type="
|
|
48
|
+
type="link"
|
|
49
49
|
onClick={() => onChange(MOBILE)}
|
|
50
50
|
disabled={disabled}
|
|
51
51
|
className={value === MOBILE ? 'preview-mode-group__btn preview-mode-group__btn--active' : 'preview-mode-group__btn'}
|
|
@@ -61,7 +61,7 @@ const EditorToolbar = ({
|
|
|
61
61
|
<Header className={`editor-toolbar ${className}`}>
|
|
62
62
|
{/* Left Section - Title (conditional) */}
|
|
63
63
|
{showTitle && (
|
|
64
|
-
<CapRow className="editor-toolbar__left">
|
|
64
|
+
<CapRow useLegacy className="editor-toolbar__left">
|
|
65
65
|
<Text strong className="editor-toolbar__title">
|
|
66
66
|
{variant === HTML_EDITOR_VARIANTS.INAPP
|
|
67
67
|
? intl.formatMessage(messages.inAppEditor)
|
|
@@ -95,7 +95,7 @@ const EditorToolbar = ({
|
|
|
95
95
|
)}
|
|
96
96
|
|
|
97
97
|
{/* Right Section - Actions */}
|
|
98
|
-
<CapRow className="editor-toolbar__right">
|
|
98
|
+
<CapRow useLegacy className="editor-toolbar__right">
|
|
99
99
|
{showFullscreenButton && (
|
|
100
100
|
<CapButton
|
|
101
101
|
type="text"
|
|
@@ -183,14 +183,14 @@ const PreviewPane = ({
|
|
|
183
183
|
// Render Email preview for Email variant
|
|
184
184
|
return (
|
|
185
185
|
<div className={`preview-pane ${className}`}>
|
|
186
|
-
<CapRow className="preview-pane__mode-controls">
|
|
186
|
+
<CapRow useLegacy className="preview-pane__mode-controls">
|
|
187
187
|
<PreviewModeGroup
|
|
188
188
|
value={viewMode}
|
|
189
189
|
onChange={setViewMode}
|
|
190
190
|
/>
|
|
191
191
|
</CapRow>
|
|
192
192
|
|
|
193
|
-
<CapRow className="preview-pane__content">
|
|
193
|
+
<CapRow useLegacy className="preview-pane__content">
|
|
194
194
|
{iframeContent ? renderDeviceFrame() : renderEmptyState()}
|
|
195
195
|
</CapRow>
|
|
196
196
|
</div>
|
|
@@ -235,7 +235,7 @@ const SplitContainer = ({
|
|
|
235
235
|
className={containerClasses}
|
|
236
236
|
style={containerStyle}
|
|
237
237
|
>
|
|
238
|
-
<CapRow className="split-container__panel split-container__panel--first">
|
|
238
|
+
<CapRow useLegacy className="split-container__panel split-container__panel--first">
|
|
239
239
|
{children?.[0]}
|
|
240
240
|
</CapRow>
|
|
241
241
|
|
|
@@ -256,7 +256,7 @@ const SplitContainer = ({
|
|
|
256
256
|
</div>
|
|
257
257
|
</div>
|
|
258
258
|
|
|
259
|
-
<CapRow className="split-container__panel split-container__panel--second">
|
|
259
|
+
<CapRow useLegacy className="split-container__panel split-container__panel--second">
|
|
260
260
|
{children?.[1]}
|
|
261
261
|
</CapRow>
|
|
262
262
|
</div>
|
|
@@ -14,12 +14,9 @@ import Empty from 'antd/lib/empty';
|
|
|
14
14
|
import Spin from 'antd/lib/spin';
|
|
15
15
|
|
|
16
16
|
// Import icons individually
|
|
17
|
-
|
|
18
|
-
import WarningOutlined from '@ant-design/icons/WarningOutlined';
|
|
19
|
-
import InfoCircleOutlined from '@ant-design/icons/InfoCircleOutlined';
|
|
17
|
+
// TODO: ShieldOutlined, BugOutlined, EyeInvisibleOutlined have no direct CapIcon equivalent — kept for follow-up
|
|
20
18
|
import ShieldOutlined from '@ant-design/icons/ShieldOutlined';
|
|
21
19
|
import BugOutlined from '@ant-design/icons/BugOutlined';
|
|
22
|
-
import CodeOutlined from '@ant-design/icons/CodeOutlined';
|
|
23
20
|
import EyeInvisibleOutlined from '@ant-design/icons/EyeInvisibleOutlined';
|
|
24
21
|
import CapIcon from '@capillarytech/cap-ui-library/CapIcon';
|
|
25
22
|
|
|
@@ -90,15 +87,15 @@ const ValidationPanel = ({
|
|
|
90
87
|
const getSourceIcon = (source) => {
|
|
91
88
|
switch (source) {
|
|
92
89
|
case 'htmlhint':
|
|
93
|
-
return <
|
|
90
|
+
return <CapIcon type="code" outlined />;
|
|
94
91
|
case 'css-validator':
|
|
95
|
-
return <
|
|
92
|
+
return <CapIcon type="code" outlined />;
|
|
96
93
|
case 'security':
|
|
97
94
|
return <ShieldOutlined />;
|
|
98
95
|
case 'custom':
|
|
99
96
|
return <BugOutlined />;
|
|
100
97
|
default:
|
|
101
|
-
return <
|
|
98
|
+
return <CapIcon type="info" outlined />;
|
|
102
99
|
}
|
|
103
100
|
};
|
|
104
101
|
|
|
@@ -213,13 +210,13 @@ const ValidationPanel = ({
|
|
|
213
210
|
<div className="validation-panel">
|
|
214
211
|
<div className="validation-panel__summary">
|
|
215
212
|
<div className="validation-panel__summary-item">
|
|
216
|
-
<
|
|
213
|
+
<CapIcon type="exclamation-circle" outlined style={{ color: '#ff4d4f' }} />
|
|
217
214
|
<span>{validation?.summary?.totalErrors || 0}</span>
|
|
218
215
|
<FormattedMessage {...messages.errors} />
|
|
219
216
|
</div>
|
|
220
217
|
|
|
221
218
|
<div className="validation-panel__summary-item">
|
|
222
|
-
<
|
|
219
|
+
<CapIcon type="warning" outlined style={{ color: '#faad14' }} />
|
|
223
220
|
<span>{validation?.summary?.totalWarnings || 0}</span>
|
|
224
221
|
<FormattedMessage {...messages.warnings} />
|
|
225
222
|
</div>
|
|
@@ -247,14 +247,14 @@ const ValidationTabs = ({
|
|
|
247
247
|
|
|
248
248
|
return (
|
|
249
249
|
<div className={`validation-tabs ${isCollapsed ? 'validation-tabs--collapsed' : ''} ${className || ''}`}>
|
|
250
|
-
<CapRow className="validation-tabs__header">
|
|
250
|
+
<CapRow useLegacy className="validation-tabs__header">
|
|
251
251
|
<StyledCapTab
|
|
252
252
|
className="validation-tabs__tabs"
|
|
253
253
|
activeKey={activeKey || (tabPanes[0]?.key)}
|
|
254
254
|
onChange={setActiveKey}
|
|
255
255
|
panes={tabPanes}
|
|
256
256
|
/>
|
|
257
|
-
<CapRow className="validation-tabs__actions">
|
|
257
|
+
<CapRow useLegacy className="validation-tabs__actions">
|
|
258
258
|
<CapTooltip title={collapseLabel}>
|
|
259
259
|
<button
|
|
260
260
|
type="button"
|
|
@@ -35,7 +35,13 @@ const CapWrapper = styled.div`
|
|
|
35
35
|
background-color: #ffffff;
|
|
36
36
|
width: 100%;
|
|
37
37
|
display: flex;
|
|
38
|
-
margin-top: ${(props) => props.isEmbedded ? '0px' : '64px'}
|
|
38
|
+
margin-top: ${(props) => props.isEmbedded ? '0px' : '64px'};
|
|
39
|
+
.sidebar-container {
|
|
40
|
+
margin-right: 10px;
|
|
41
|
+
}
|
|
42
|
+
.ant-collapse {
|
|
43
|
+
background-color: #ffffff;
|
|
44
|
+
}
|
|
39
45
|
`;
|
|
40
46
|
|
|
41
47
|
const ComponentWrapper = styled.div`
|
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
// import { connect } from 'react-redux';
|
|
10
|
-
import { CapRow, CapColumn, CapButton } from '@capillarytech/cap-
|
|
11
|
-
import { CapHeading, CapLabel, CapTab, CapIcon, CapImage } from '@capillarytech/cap-ui-library/';
|
|
10
|
+
import { CapRow, CapColumn, CapButton, CapHeading, CapLabel, CapTab, CapIcon, CapImage } from '@capillarytech/cap-ui-library';
|
|
12
11
|
import { FormattedMessage } from 'react-intl';
|
|
13
12
|
import _ from 'lodash';
|
|
14
13
|
import './_wechatRichmediaTemplatePrev.scss';
|
|
@@ -61,12 +60,12 @@ class WechatRichmediaTemplatePreview extends React.PureComponent { // eslint-dis
|
|
|
61
60
|
if (id === 0) {
|
|
62
61
|
returnObj.push(
|
|
63
62
|
<div style={{ width: "100%", height: 116, position: "relative" }}>
|
|
64
|
-
<CapRow>
|
|
63
|
+
<CapRow useLegacy>
|
|
65
64
|
<CapImage alt="default" width="100%" height="110px" src={contentData.image_url} />
|
|
66
65
|
<div className="preview-overflow-wrap-fields" style={{ position: "absolute", bottom: "5%", left: "10%", width: "auto" }}>{contentData.title ? contentData.title : ""}</div>
|
|
67
66
|
</CapRow>
|
|
68
67
|
{Object.keys(mediaList).length === 1 ?
|
|
69
|
-
<CapRow style={{ height: 32, left: "12%" }}>
|
|
68
|
+
<CapRow useLegacy style={{ height: 32, left: "12%" }}>
|
|
70
69
|
{contentData.digest ? contentData.digest : ""}
|
|
71
70
|
</CapRow>
|
|
72
71
|
:
|
|
@@ -818,7 +818,8 @@
|
|
|
818
818
|
|
|
819
819
|
.msg-container-carousel {
|
|
820
820
|
display: flex;
|
|
821
|
-
flex-direction: column;
|
|
821
|
+
flex-direction: column !important;
|
|
822
|
+
flex-flow: column nowrap;
|
|
822
823
|
.scroll-container {
|
|
823
824
|
overflow-x: auto;
|
|
824
825
|
display: flex;
|
|
@@ -987,7 +988,7 @@
|
|
|
987
988
|
margin-bottom: 12px;
|
|
988
989
|
}
|
|
989
990
|
|
|
990
|
-
.ant-btn.cap-button-v2.
|
|
991
|
+
.ant-btn.cap-button-v2.ant-btn-link.preview-video-btn {
|
|
991
992
|
padding: 0;
|
|
992
993
|
background-color: transparent;
|
|
993
994
|
height: auto;
|
|
@@ -1218,7 +1219,8 @@
|
|
|
1218
1219
|
padding: $CAP_SPACE_08;
|
|
1219
1220
|
text-align: center;
|
|
1220
1221
|
display: flex;
|
|
1221
|
-
flex-direction: column;
|
|
1222
|
+
flex-direction: column !important;
|
|
1223
|
+
flex-flow: column nowrap;
|
|
1222
1224
|
align-items: center;
|
|
1223
1225
|
justify-content: center;
|
|
1224
1226
|
gap: $CAP_SPACE_08;
|
|
@@ -196,7 +196,7 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
196
196
|
</CapRow>
|
|
197
197
|
</CapRow>
|
|
198
198
|
)}
|
|
199
|
-
<CapRow className="carousel-content">
|
|
199
|
+
<CapRow useLegacy className="carousel-content">
|
|
200
200
|
<CapLabel className="carousel-title">
|
|
201
201
|
{item?.title || item?.header || ""}
|
|
202
202
|
</CapLabel>
|
|
@@ -350,7 +350,7 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
350
350
|
>
|
|
351
351
|
<CapButton
|
|
352
352
|
className="preview-video-btn"
|
|
353
|
-
type="
|
|
353
|
+
type="link"
|
|
354
354
|
>
|
|
355
355
|
<CapIcon type="play"/>
|
|
356
356
|
<FormattedMessage {...messages.playVideo} />
|
|
@@ -360,7 +360,7 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
360
360
|
? (
|
|
361
361
|
<CapButton
|
|
362
362
|
className="preview-video-btn"
|
|
363
|
-
type="
|
|
363
|
+
type="link"
|
|
364
364
|
>
|
|
365
365
|
<CapIcon type="reply" style={{ fontSize: 18 }}/>
|
|
366
366
|
<FormattedMessage {...messages.showDetails} />
|
|
@@ -739,6 +739,7 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
739
739
|
!!content.bodyText ||
|
|
740
740
|
!!content.bodyImage || !!content.bodyVideo?.videoSrc || !!content.bodyGif) && (
|
|
741
741
|
<CapRow
|
|
742
|
+
useLegacy
|
|
742
743
|
className={`${
|
|
743
744
|
this.props.device === "ios" ? "iphone" : this.props.device
|
|
744
745
|
}-push-message-Container`}
|
|
@@ -757,7 +758,7 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
757
758
|
</CapRow>
|
|
758
759
|
<CapLabel className="body-text">{content.bodyText}</CapLabel>
|
|
759
760
|
{(content.bodyImage || content?.bodyVideo?.videoSrc || content?.bodyGif) && (
|
|
760
|
-
<CapRow className="body-image">
|
|
761
|
+
<CapRow useLegacy className="body-image">
|
|
761
762
|
{(() => {
|
|
762
763
|
if (content?.bodyVideo?.videoSrc && !content?.bodyImage && !content?.bodyGif) {
|
|
763
764
|
return (
|
|
@@ -821,7 +822,7 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
821
822
|
</CapRow>
|
|
822
823
|
<CapLabel className="body-text">{content.bodyText}</CapLabel>
|
|
823
824
|
{(content?.bodyImage || content?.bodyVideo?.videoSrc || content?.bodyGif) && (
|
|
824
|
-
<CapRow className="body-image">
|
|
825
|
+
<CapRow useLegacy className="body-image">
|
|
825
826
|
{(() => {
|
|
826
827
|
if (content?.bodyVideo?.videoSrc && !content?.bodyImage && !content?.bodyGif) {
|
|
827
828
|
return (
|
|
@@ -1303,23 +1304,24 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
1303
1304
|
)}
|
|
1304
1305
|
{channel?.toUpperCase() === ZALO && (
|
|
1305
1306
|
<CapRow
|
|
1307
|
+
useLegacy
|
|
1306
1308
|
className={`zalo-preview-container ${
|
|
1307
1309
|
templateData?.fullMode
|
|
1308
1310
|
? "zalo-preview-container-creative"
|
|
1309
1311
|
: "zalo-preview-container-campaign"
|
|
1310
1312
|
}`}
|
|
1311
1313
|
>
|
|
1312
|
-
<CapRow>
|
|
1314
|
+
<CapRow useLegacy>
|
|
1313
1315
|
<CapLabel className="preview-head">
|
|
1314
1316
|
{formatMessage(zaloMessage.previewHead)}
|
|
1315
1317
|
</CapLabel>
|
|
1316
1318
|
</CapRow>
|
|
1317
|
-
<CapRow>
|
|
1319
|
+
<CapRow useLegacy>
|
|
1318
1320
|
<CapLabel className="preview-text">
|
|
1319
1321
|
{formatMessage(zaloMessage.previewText)}
|
|
1320
1322
|
</CapLabel>
|
|
1321
1323
|
</CapRow>
|
|
1322
|
-
<CapRow>
|
|
1324
|
+
<CapRow useLegacy>
|
|
1323
1325
|
<CapLabel
|
|
1324
1326
|
data-testid="preview-link-button"
|
|
1325
1327
|
onClick={handlePreview}
|
|
@@ -1356,7 +1358,7 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
1356
1358
|
{channel?.toUpperCase() === INAPP && (
|
|
1357
1359
|
isBeeFreeTemplate ? (
|
|
1358
1360
|
<div className="shell-v2 align-center">
|
|
1359
|
-
<CapRow className="preview-image-container">
|
|
1361
|
+
<CapRow useLegacy className="preview-image-container">
|
|
1360
1362
|
<CapImage
|
|
1361
1363
|
className="preview-image"
|
|
1362
1364
|
src={this.props.device === ANDROID ? inAppMobileDeviceAndroid : inAppMobileDeviceIos}
|
|
@@ -27,9 +27,9 @@ const CustomValuesEditor = ({
|
|
|
27
27
|
}) => {
|
|
28
28
|
if (isExtractingTags) {
|
|
29
29
|
return (
|
|
30
|
-
<CapRow className="loading-container">
|
|
30
|
+
<CapRow useLegacy className="loading-container">
|
|
31
31
|
<CapSpin size="large" />
|
|
32
|
-
<CapRow className="loading-text">
|
|
32
|
+
<CapRow useLegacy className="loading-text">
|
|
33
33
|
<FormattedMessage {...messages.extractingTags} />
|
|
34
34
|
</CapRow>
|
|
35
35
|
</CapRow>
|
|
@@ -128,7 +128,7 @@ const CustomValuesEditor = ({
|
|
|
128
128
|
<div className="editor-actions">
|
|
129
129
|
<CapButton
|
|
130
130
|
className="discard-button"
|
|
131
|
-
type="
|
|
131
|
+
type="link"
|
|
132
132
|
size="small"
|
|
133
133
|
onClick={handleDiscardCustomValues}
|
|
134
134
|
icon="close"
|
|
@@ -25,9 +25,9 @@ const LeftPanelContent = ({
|
|
|
25
25
|
}) => {
|
|
26
26
|
if (isExtractingTags) {
|
|
27
27
|
return (
|
|
28
|
-
<CapRow className="loading-container">
|
|
28
|
+
<CapRow useLegacy className="loading-container">
|
|
29
29
|
<CapSpin size="large" />
|
|
30
|
-
<CapRow className="loading-text">
|
|
30
|
+
<CapRow useLegacy className="loading-text">
|
|
31
31
|
<FormattedMessage {...messages.extractingTags} />
|
|
32
32
|
</CapRow>
|
|
33
33
|
</CapRow>
|
|
@@ -37,7 +37,7 @@ const LeftPanelContent = ({
|
|
|
37
37
|
return (
|
|
38
38
|
<>
|
|
39
39
|
{/* Customer Search Section */}
|
|
40
|
-
<CapRow className="panel-section customer-section">
|
|
40
|
+
<CapRow useLegacy className="panel-section customer-section">
|
|
41
41
|
<CapHeader size="label1" title={<FormattedMessage {...messages.customerSearchTitle} />} />
|
|
42
42
|
<CustomerSearchSection
|
|
43
43
|
selectedCustomer={selectedCustomer}
|
|
@@ -50,8 +50,8 @@ const LeftPanelContent = ({
|
|
|
50
50
|
</CapRow>
|
|
51
51
|
{/* Tags Section */}
|
|
52
52
|
{!tagsExtracted && (
|
|
53
|
-
<CapRow className="panel-section">
|
|
54
|
-
<CapButton type="
|
|
53
|
+
<CapRow useLegacy className="panel-section">
|
|
54
|
+
<CapButton type="link" className="extract-tags-button" onClick={handleExtractTags}>
|
|
55
55
|
<CapLabel type="label33">
|
|
56
56
|
<FormattedMessage {...messages.enterCustomValuesForTags} />
|
|
57
57
|
</CapLabel>
|
|
@@ -15,7 +15,7 @@ const PreviewSection = ({
|
|
|
15
15
|
formatMessage,
|
|
16
16
|
PreviewChrome,
|
|
17
17
|
}) => (
|
|
18
|
-
<CapRow className="test-and-preview-section panel-section">
|
|
18
|
+
<CapRow useLegacy className="test-and-preview-section panel-section">
|
|
19
19
|
<PreviewChrome
|
|
20
20
|
device={previewDevice}
|
|
21
21
|
onDeviceChange={setPreviewDevice}
|
|
@@ -23,9 +23,9 @@ const PreviewSection = ({
|
|
|
23
23
|
subject={previewDataHtml?.resolvedTitle || formData['template-subject']}
|
|
24
24
|
>
|
|
25
25
|
{isUpdatingPreview && (
|
|
26
|
-
<CapRow className="loading-container">
|
|
26
|
+
<CapRow useLegacy className="loading-container">
|
|
27
27
|
<CapSpin />
|
|
28
|
-
<CapRow className="loading-text">{formatMessage(messages.updatingPreview)}</CapRow>
|
|
28
|
+
<CapRow useLegacy className="loading-text">{formatMessage(messages.updatingPreview)}</CapRow>
|
|
29
29
|
</CapRow>
|
|
30
30
|
)}
|
|
31
31
|
{!isUpdatingPreview && previewDataHtml && (
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
margin-left: 2%;
|
|
32
32
|
height: 100%;
|
|
33
33
|
display: flex;
|
|
34
|
-
flex-direction: column;
|
|
34
|
+
flex-direction: column !important;
|
|
35
|
+
flex-flow: column nowrap;
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
.discard-button {
|
|
@@ -79,7 +80,8 @@
|
|
|
79
80
|
|
|
80
81
|
.loading-container {
|
|
81
82
|
display: flex;
|
|
82
|
-
flex-direction: column;
|
|
83
|
+
flex-direction: column !important;
|
|
84
|
+
flex-flow: column nowrap;
|
|
83
85
|
align-items: center;
|
|
84
86
|
justify-content: center;
|
|
85
87
|
padding: $CAP_SPACE_32;
|
|
@@ -53,6 +53,7 @@ function BeeEditor(props) {
|
|
|
53
53
|
BEESelect,
|
|
54
54
|
currentOrgDetails,
|
|
55
55
|
eventContextTags,
|
|
56
|
+
waitEventContextTags,
|
|
56
57
|
isGetBeeData,
|
|
57
58
|
getBEEData,
|
|
58
59
|
} = props;
|
|
@@ -381,6 +382,7 @@ function BeeEditor(props) {
|
|
|
381
382
|
}}
|
|
382
383
|
onContextChange={onContextChange}
|
|
383
384
|
eventContextTags={eventContextTags}
|
|
385
|
+
waitEventContextTags={waitEventContextTags}
|
|
384
386
|
/>
|
|
385
387
|
<CapModal
|
|
386
388
|
className="custom-row-modal"
|
|
@@ -427,6 +429,7 @@ BeeEditor.propTypes = {
|
|
|
427
429
|
onContextChange: PropTypes.func,
|
|
428
430
|
userLocale: PropTypes.string,
|
|
429
431
|
eventContextTags: PropTypes.array,
|
|
432
|
+
waitEventContextTags: PropTypes.object,
|
|
430
433
|
isGetBeeData: PropTypes.bool,
|
|
431
434
|
getBEEData: PropTypes.func,
|
|
432
435
|
};
|
|
@@ -127,7 +127,7 @@ const CommunicationFlow = ({
|
|
|
127
127
|
switch (step) {
|
|
128
128
|
case STEPS.MESSAGE_TYPE:
|
|
129
129
|
return (
|
|
130
|
-
<CapRow key={step}>
|
|
130
|
+
<CapRow useLegacy key={step}>
|
|
131
131
|
<MessageTypeStep
|
|
132
132
|
{...commonProps}
|
|
133
133
|
value={stepData.messageType}
|
|
@@ -140,7 +140,7 @@ const CommunicationFlow = ({
|
|
|
140
140
|
);
|
|
141
141
|
case STEPS.COMMUNICATION_STRATEGY:
|
|
142
142
|
return (
|
|
143
|
-
<CapRow key={step}>
|
|
143
|
+
<CapRow useLegacy key={step}>
|
|
144
144
|
<CommunicationStrategyStep
|
|
145
145
|
{...commonProps}
|
|
146
146
|
value={stepData.communicationStrategy}
|
|
@@ -158,7 +158,7 @@ const CommunicationFlow = ({
|
|
|
158
158
|
return null;
|
|
159
159
|
}
|
|
160
160
|
return (
|
|
161
|
-
<CapRow key={step}>
|
|
161
|
+
<CapRow useLegacy key={step}>
|
|
162
162
|
<ChannelSelectionStep
|
|
163
163
|
{...commonProps}
|
|
164
164
|
value={stepData}
|
|
@@ -206,10 +206,10 @@ const CommunicationFlow = ({
|
|
|
206
206
|
}), [enabledSteps, stepData, validationErrors, config, handleStepChange, messageTypeData, communicationStrategyData, contentTemplateData]);
|
|
207
207
|
|
|
208
208
|
return (
|
|
209
|
-
<CapRow className="communication-flow-container">
|
|
209
|
+
<CapRow useLegacy className="communication-flow-container">
|
|
210
210
|
{renderSteps()}
|
|
211
211
|
{onSave && (
|
|
212
|
-
<CapRow className="communication-flow-container__footer">
|
|
212
|
+
<CapRow useLegacy className="communication-flow-container__footer">
|
|
213
213
|
<CapButton type="primary" onClick={() => onSave(getAggregatedData())}>
|
|
214
214
|
{formatMessage(messages.save)}
|
|
215
215
|
</CapButton>
|
|
@@ -367,7 +367,7 @@ const ChannelSelectionStep = ({
|
|
|
367
367
|
onVisibleChange={(visible) => handleIncentivesVisibleChange(visible, item.contentId)}
|
|
368
368
|
visible={!!showIncentivesMenuMap[item.contentId]}
|
|
369
369
|
>
|
|
370
|
-
<CapButton isAddBtn type="
|
|
370
|
+
<CapButton isAddBtn type="link" className="add-incentives-button add-incentive-link">
|
|
371
371
|
{formatMessage(messages.addIncentive)}
|
|
372
372
|
</CapButton>
|
|
373
373
|
</CapDropdown>
|
|
@@ -389,6 +389,7 @@ const ChannelSelectionStep = ({
|
|
|
389
389
|
</CapHeading>
|
|
390
390
|
|
|
391
391
|
<CapRow
|
|
392
|
+
useLegacy
|
|
392
393
|
className={`content-template-container ${contentItems?.length > 0 ? 'content-template-container--has-content' : ''}`}
|
|
393
394
|
>
|
|
394
395
|
{contentItems?.length === 0 ? (
|
|
@@ -427,7 +428,7 @@ const ChannelSelectionStep = ({
|
|
|
427
428
|
onVisibleChange={(visible) => handleIncentivesVisibleChange(visible, 'standalone')}
|
|
428
429
|
visible={!!showIncentivesMenuMap.standalone}
|
|
429
430
|
>
|
|
430
|
-
<CapButton isAddBtn type="
|
|
431
|
+
<CapButton isAddBtn type="link" className="add-incentive-button">
|
|
431
432
|
{formatMessage(messages.addIncentive)}
|
|
432
433
|
</CapButton>
|
|
433
434
|
</CapDropdown>
|
|
@@ -449,7 +450,7 @@ const ChannelSelectionStep = ({
|
|
|
449
450
|
</CapRow>
|
|
450
451
|
|
|
451
452
|
{error && (
|
|
452
|
-
<CapRow className="validation-error">
|
|
453
|
+
<CapRow useLegacy className="validation-error">
|
|
453
454
|
{error}
|
|
454
455
|
</CapRow>
|
|
455
456
|
)}
|
package/v2Containers/CommunicationFlow/steps/CommunicationStrategyStep/CommunicationStrategyStep.js
CHANGED
|
@@ -53,7 +53,7 @@ const CommunicationStrategyStep = ({
|
|
|
53
53
|
const selectValue = (value === null || value === '') ? undefined : value;
|
|
54
54
|
|
|
55
55
|
return (
|
|
56
|
-
<CapRow className="communication-strategy-step">
|
|
56
|
+
<CapRow useLegacy className="communication-strategy-step">
|
|
57
57
|
<CapHeading type="h3" className="heading-style">
|
|
58
58
|
{formatMessage(messages.communicationStrategyHeading)}
|
|
59
59
|
</CapHeading>
|
|
@@ -68,7 +68,7 @@ const CommunicationStrategyStep = ({
|
|
|
68
68
|
/>
|
|
69
69
|
|
|
70
70
|
{error && (
|
|
71
|
-
<CapRow className="validation-error">
|
|
71
|
+
<CapRow useLegacy className="validation-error">
|
|
72
72
|
{error}
|
|
73
73
|
</CapRow>
|
|
74
74
|
)}
|
package/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/DeliverySettingsSection.js
CHANGED
|
@@ -216,13 +216,14 @@ const DeliverySettingsSection = ({
|
|
|
216
216
|
return (
|
|
217
217
|
<>
|
|
218
218
|
<CapRow
|
|
219
|
+
useLegacy
|
|
219
220
|
type="flex"
|
|
220
221
|
align="middle"
|
|
221
222
|
justify="space-between"
|
|
222
223
|
className="delivery-settings-section delivery-settings-section--clickable"
|
|
223
224
|
onClick={() => setShowSlidebox(true)}
|
|
224
225
|
>
|
|
225
|
-
<CapRow type="flex" className="delivery-settings-section__content">
|
|
226
|
+
<CapRow useLegacy type="flex" className="delivery-settings-section__content">
|
|
226
227
|
<CapHeading type="h5">
|
|
227
228
|
{formatMessage(messages.senderDetails)}
|
|
228
229
|
</CapHeading>
|
|
@@ -236,7 +237,7 @@ const DeliverySettingsSection = ({
|
|
|
236
237
|
return value != null && value !== '';
|
|
237
238
|
})
|
|
238
239
|
.map((channelConfig) => (
|
|
239
|
-
<CapRow key={`${channel}-${channelConfig.valueKey}`} type="flex" align="middle" justify="space-between" className="delivery-settings-section__field-row">
|
|
240
|
+
<CapRow useLegacy key={`${channel}-${channelConfig.valueKey}`} type="flex" align="middle" justify="space-between" className="delivery-settings-section__field-row">
|
|
240
241
|
<CapHeading type="label4" className="delivery-settings-section__label">
|
|
241
242
|
{formatMessage(messages[channelConfig.labelKey])}
|
|
242
243
|
</CapHeading>
|