@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
|
@@ -63,6 +63,7 @@ exports[`Test SlideBoxContent container campaign message, add creative click rcs
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
templateStep="modeSelection"
|
|
66
|
+
waitEventContextTags={Object {}}
|
|
66
67
|
weChatMaptemplateStep={0}
|
|
67
68
|
weChatTemplateType=""
|
|
68
69
|
/>
|
|
@@ -159,6 +160,7 @@ exports[`Test SlideBoxContent container campaign message, add creative click wha
|
|
|
159
160
|
}
|
|
160
161
|
}
|
|
161
162
|
templateStep="modeSelection"
|
|
163
|
+
waitEventContextTags={Object {}}
|
|
162
164
|
weChatMaptemplateStep={0}
|
|
163
165
|
weChatTemplateType=""
|
|
164
166
|
/>
|
|
@@ -250,6 +252,7 @@ exports[`Test SlideBoxContent container campaign message, whatsapp edit all data
|
|
|
250
252
|
showTestAndPreviewSlidebox={false}
|
|
251
253
|
slidBoxContent="editTemplate"
|
|
252
254
|
templateStep="modeSelection"
|
|
255
|
+
waitEventContextTags={Object {}}
|
|
253
256
|
weChatMaptemplateStep={0}
|
|
254
257
|
weChatTemplateType=""
|
|
255
258
|
/>
|
|
@@ -388,6 +391,7 @@ exports[`Test SlideBoxContent container campaign message, whatsapp edit min data
|
|
|
388
391
|
showTestAndPreviewSlidebox={false}
|
|
389
392
|
slidBoxContent="editTemplate"
|
|
390
393
|
templateStep="modeSelection"
|
|
394
|
+
waitEventContextTags={Object {}}
|
|
391
395
|
weChatMaptemplateStep={0}
|
|
392
396
|
weChatTemplateType=""
|
|
393
397
|
/>
|
|
@@ -526,6 +530,7 @@ exports[`Test SlideBoxContent container it should clear the url, on channel chan
|
|
|
526
530
|
showTestAndPreviewSlidebox={false}
|
|
527
531
|
slidBoxContent="editTemplate"
|
|
528
532
|
templateStep="modeSelection"
|
|
533
|
+
waitEventContextTags={Object {}}
|
|
529
534
|
weChatMaptemplateStep={0}
|
|
530
535
|
weChatTemplateType=""
|
|
531
536
|
/>
|
|
@@ -8,7 +8,8 @@ import PropTypes from 'prop-types';
|
|
|
8
8
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import { bindActionCreators } from 'redux';
|
|
11
|
-
import { Spin,
|
|
11
|
+
import { Spin, Breadcrumb } from 'antd';
|
|
12
|
+
import { CapRow, CapColumn } from '@capillarytech/cap-ui-library';
|
|
12
13
|
import Helmet from 'react-helmet';
|
|
13
14
|
import { intlShape } from 'react-intl';
|
|
14
15
|
import _ from 'lodash';
|
|
@@ -1168,8 +1169,8 @@ export class Ebill extends React.Component { // eslint-disable-line react/prefer
|
|
|
1168
1169
|
title="Ebill"
|
|
1169
1170
|
/>
|
|
1170
1171
|
<Spin spinning={spinning}>
|
|
1171
|
-
{this.props.location.query.type !== 'embedded' && <
|
|
1172
|
-
<
|
|
1172
|
+
{this.props.location.query.type !== 'embedded' && <CapRow>
|
|
1173
|
+
<CapColumn span={24}>
|
|
1173
1174
|
{this.props.location.query.type !== "embedded" &&
|
|
1174
1175
|
<Breadcrumb>
|
|
1175
1176
|
<BreadcrumbItem>{this.props.intl.formatMessage(messages.campaigns)}</BreadcrumbItem>
|
|
@@ -1177,10 +1178,10 @@ export class Ebill extends React.Component { // eslint-disable-line react/prefer
|
|
|
1177
1178
|
<BreadcrumbItem>{this.props.intl.formatMessage(messages.ebill)}</BreadcrumbItem>
|
|
1178
1179
|
</Breadcrumb>
|
|
1179
1180
|
}
|
|
1180
|
-
</
|
|
1181
|
-
</
|
|
1182
|
-
<
|
|
1183
|
-
<
|
|
1181
|
+
</CapColumn>
|
|
1182
|
+
</CapRow>}
|
|
1183
|
+
<CapRow>
|
|
1184
|
+
<CapColumn>
|
|
1184
1185
|
<FormBuilder
|
|
1185
1186
|
schema={schema}
|
|
1186
1187
|
onSubmit={this.saveFormData}
|
|
@@ -1208,8 +1209,8 @@ export class Ebill extends React.Component { // eslint-disable-line react/prefer
|
|
|
1208
1209
|
// supportedLanguages={this.props.Global.currentOrgDetails.basic_details.supported_languages}
|
|
1209
1210
|
// isSchemaChanged={this.state.isSchemaChanged}
|
|
1210
1211
|
/>
|
|
1211
|
-
</
|
|
1212
|
-
</
|
|
1212
|
+
</CapColumn>
|
|
1213
|
+
</CapRow>
|
|
1213
1214
|
</Spin>
|
|
1214
1215
|
{/* <div style={{display: 'inline-block', verticalAlign: 'top', width: '100%', height: '450px', borderLeft: '1px solid #b7b7b7'}}>
|
|
1215
1216
|
<div style={{width: "100%", height: '100%'}}>
|
|
@@ -8,9 +8,9 @@ import PropTypes from 'prop-types';
|
|
|
8
8
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import { bindActionCreators } from 'redux';
|
|
11
|
-
import {
|
|
11
|
+
import { Popover, Modal } from 'antd';
|
|
12
12
|
import { intlShape, FormattedMessage } from 'react-intl';
|
|
13
|
-
import { CapButton, CapIcon, CapInput, CapSpin, CapSlideBox, CapCustomCard, CapNotification, CapImage } from '@capillarytech/cap-ui-library';
|
|
13
|
+
import { CapButton, CapIcon, CapInput, CapSpin, CapSlideBox, CapCustomCard, CapNotification, CapImage, CapRow, CapColumn } from '@capillarytech/cap-ui-library';
|
|
14
14
|
import { createStructuredSelector } from 'reselect';
|
|
15
15
|
import _ from 'lodash';
|
|
16
16
|
import moment from "moment";
|
|
@@ -3024,7 +3024,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
3024
3024
|
display: 'inline-block',
|
|
3025
3025
|
padding: '0 6px',
|
|
3026
3026
|
}}
|
|
3027
|
-
type="
|
|
3027
|
+
type="link"
|
|
3028
3028
|
onClick={() => action === 'PREVIEW' ? onPreviewContentClicked(testOrPreviewProps) : onTestContentClicked(testOrPreviewProps)}
|
|
3029
3029
|
>
|
|
3030
3030
|
<CapIcon type={action === 'PREVIEW' ? "eye" : "lab"}/>
|
|
@@ -3118,8 +3118,8 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
3118
3118
|
return (
|
|
3119
3119
|
<div className="email-container">
|
|
3120
3120
|
<CapSpin spinning={isLoading}>
|
|
3121
|
-
<
|
|
3122
|
-
<
|
|
3121
|
+
<CapRow>
|
|
3122
|
+
<CapColumn>
|
|
3123
3123
|
{ !_.isEmpty(schema) && (this.state.formData[0] || this.state.formData["0"]) ?
|
|
3124
3124
|
<FormBuilder
|
|
3125
3125
|
editor={this.props.editor}
|
|
@@ -3170,14 +3170,15 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
3170
3170
|
moduleType={moduleType}
|
|
3171
3171
|
showLiquidErrorInFooter={this.props.showLiquidErrorInFooter}
|
|
3172
3172
|
eventContextTags={this.props?.eventContextTags}
|
|
3173
|
+
waitEventContextTags={this.props?.waitEventContextTags}
|
|
3173
3174
|
forwardedTags={this.props?.forwardedTags}
|
|
3174
3175
|
isLoyaltyModule={this.props?.isLoyaltyModule}
|
|
3175
3176
|
isGetBeeData={this.state.isGetBeeData}
|
|
3176
3177
|
getBEEData={this.getBEEData}
|
|
3177
3178
|
isTestAndPreviewMode={this.state.isTestAndPreviewMode} // Add flag to prevent validation
|
|
3178
3179
|
/> : ''}
|
|
3179
|
-
</
|
|
3180
|
-
</
|
|
3180
|
+
</CapColumn>
|
|
3181
|
+
</CapRow>
|
|
3181
3182
|
</CapSpin>
|
|
3182
3183
|
{!_.isEmpty(this.state.formData[(this.state.currentTab - 1)]) && <EmailPreview
|
|
3183
3184
|
header={previewHeader}
|
|
@@ -269,7 +269,7 @@ export const response = {
|
|
|
269
269
|
metaType: "label",
|
|
270
270
|
type: "div",
|
|
271
271
|
primitive: true,
|
|
272
|
-
value: <CapButton isAddBtn type="
|
|
272
|
+
value: <CapButton isAddBtn type="link"><FormattedMessage {...messages.image} /></CapButton>,
|
|
273
273
|
fluid: true,
|
|
274
274
|
onlyDisplay: false,
|
|
275
275
|
styling: "semantic",
|
|
@@ -54,6 +54,7 @@ const EmailHTMLEditor = (props) => {
|
|
|
54
54
|
globalActions,
|
|
55
55
|
loadingTags,
|
|
56
56
|
eventContextTags,
|
|
57
|
+
waitEventContextTags,
|
|
57
58
|
forwardedTags,
|
|
58
59
|
selectedOfferDetails,
|
|
59
60
|
currentOrgDetails,
|
|
@@ -510,7 +511,7 @@ const EmailHTMLEditor = (props) => {
|
|
|
510
511
|
setTagValidationError(null);
|
|
511
512
|
}
|
|
512
513
|
}
|
|
513
|
-
}, [tags, injectedTags, location, getDefaultTags, eventContextTags, showLiquidErrorInFooter]);
|
|
514
|
+
}, [tags, injectedTags, location, getDefaultTags, eventContextTags, waitEventContextTags, showLiquidErrorInFooter]);
|
|
514
515
|
|
|
515
516
|
// Store the last validation state received from HTMLEditor
|
|
516
517
|
const lastValidationStateRef = useRef(null);
|
|
@@ -1100,6 +1101,7 @@ const EmailHTMLEditor = (props) => {
|
|
|
1100
1101
|
injectedTags={injectedTags || {}}
|
|
1101
1102
|
selectedOfferDetails={selectedOfferDetails}
|
|
1102
1103
|
eventContextTags={eventContextTags}
|
|
1104
|
+
waitEventContextTags={waitEventContextTags}
|
|
1103
1105
|
showHeading
|
|
1104
1106
|
showTagList
|
|
1105
1107
|
showInput
|
|
@@ -1124,6 +1126,7 @@ const EmailHTMLEditor = (props) => {
|
|
|
1124
1126
|
injectedTags={injectedTags}
|
|
1125
1127
|
location={location}
|
|
1126
1128
|
eventContextTags={eventContextTags}
|
|
1129
|
+
waitEventContextTags={waitEventContextTags}
|
|
1127
1130
|
selectedOfferDetails={selectedOfferDetails}
|
|
1128
1131
|
channel={EMAIL}
|
|
1129
1132
|
userLocale={intl.locale || 'en'}
|
|
@@ -1151,6 +1154,7 @@ EmailHTMLEditor.propTypes = {
|
|
|
1151
1154
|
globalActions: PropTypes.object,
|
|
1152
1155
|
loadingTags: PropTypes.bool,
|
|
1153
1156
|
eventContextTags: PropTypes.array,
|
|
1157
|
+
waitEventContextTags: PropTypes.object,
|
|
1154
1158
|
forwardedTags: PropTypes.object,
|
|
1155
1159
|
selectedOfferDetails: PropTypes.array,
|
|
1156
1160
|
currentOrgDetails: PropTypes.object,
|
|
@@ -1197,6 +1201,7 @@ EmailHTMLEditor.defaultProps = {
|
|
|
1197
1201
|
globalActions: {},
|
|
1198
1202
|
loadingTags: false,
|
|
1199
1203
|
eventContextTags: [],
|
|
1204
|
+
waitEventContextTags: {},
|
|
1200
1205
|
forwardedTags: {},
|
|
1201
1206
|
selectedOfferDetails: [],
|
|
1202
1207
|
currentOrgDetails: {},
|
|
@@ -173,6 +173,7 @@ const EmailWrapperView = ({
|
|
|
173
173
|
forwardedTags,
|
|
174
174
|
selectedOfferDetails,
|
|
175
175
|
eventContextTags,
|
|
176
|
+
waitEventContextTags,
|
|
176
177
|
getFormdata,
|
|
177
178
|
isGetFormData,
|
|
178
179
|
getLiquidTags,
|
|
@@ -246,6 +247,7 @@ const EmailWrapperView = ({
|
|
|
246
247
|
globalActions,
|
|
247
248
|
loadingTags,
|
|
248
249
|
eventContextTags,
|
|
250
|
+
waitEventContextTags,
|
|
249
251
|
forwardedTags,
|
|
250
252
|
selectedOfferDetails,
|
|
251
253
|
currentOrgDetails,
|
|
@@ -371,6 +373,7 @@ EmailWrapperView.propTypes = {
|
|
|
371
373
|
forwardedTags: PropTypes.object,
|
|
372
374
|
selectedOfferDetails: PropTypes.array,
|
|
373
375
|
eventContextTags: PropTypes.array,
|
|
376
|
+
waitEventContextTags: PropTypes.object,
|
|
374
377
|
emailActions: PropTypes.object,
|
|
375
378
|
Email: PropTypes.object,
|
|
376
379
|
templateData: PropTypes.object,
|
|
@@ -71,7 +71,10 @@ jest.mock('../../../../v2Components/HtmlEditor/index.lazy', () => {
|
|
|
71
71
|
}));
|
|
72
72
|
|
|
73
73
|
return (
|
|
74
|
-
<div
|
|
74
|
+
<div
|
|
75
|
+
data-testid="html-editor"
|
|
76
|
+
data-wait-event-context-tags={JSON.stringify(props.waitEventContextTags ?? null)}
|
|
77
|
+
>
|
|
75
78
|
<button
|
|
76
79
|
onClick={() => props.onContentChange && props.onContentChange('<p>New content</p>')}
|
|
77
80
|
data-testid="trigger-content-change"
|
|
@@ -130,7 +133,10 @@ jest.mock('../../../../v2Components/HtmlEditor', () => {
|
|
|
130
133
|
}));
|
|
131
134
|
|
|
132
135
|
return (
|
|
133
|
-
<div
|
|
136
|
+
<div
|
|
137
|
+
data-testid="html-editor"
|
|
138
|
+
data-wait-event-context-tags={JSON.stringify(props.waitEventContextTags ?? null)}
|
|
139
|
+
>
|
|
134
140
|
<button
|
|
135
141
|
onClick={() => props.onContentChange && props.onContentChange('<p>New content</p>')}
|
|
136
142
|
data-testid="trigger-content-change"
|
|
@@ -364,6 +370,7 @@ const defaultProps = {
|
|
|
364
370
|
},
|
|
365
371
|
loadingTags: false,
|
|
366
372
|
eventContextTags: [],
|
|
373
|
+
waitEventContextTags: {},
|
|
367
374
|
forwardedTags: {},
|
|
368
375
|
selectedOfferDetails: [],
|
|
369
376
|
currentOrgDetails: {
|
|
@@ -522,6 +529,17 @@ describe('EmailHTMLEditor', () => {
|
|
|
522
529
|
});
|
|
523
530
|
});
|
|
524
531
|
|
|
532
|
+
describe('waitEventContextTags', () => {
|
|
533
|
+
it('forwards waitEventContextTags to HTMLEditor', () => {
|
|
534
|
+
const waitMap = { b1: { eventName: 'E', blockName: 'B', tags: ['t'] } };
|
|
535
|
+
renderWithIntl({ waitEventContextTags: waitMap });
|
|
536
|
+
expect(screen.getByTestId('html-editor')).toHaveAttribute(
|
|
537
|
+
'data-wait-event-context-tags',
|
|
538
|
+
JSON.stringify(waitMap),
|
|
539
|
+
);
|
|
540
|
+
});
|
|
541
|
+
});
|
|
542
|
+
|
|
525
543
|
describe('Content Initialization', () => {
|
|
526
544
|
it('initializes with empty content in create mode', () => {
|
|
527
545
|
renderWithIntl({ isGetFormData: false });
|
|
@@ -37,7 +37,14 @@ jest.mock('../EmailHTMLEditor', () => {
|
|
|
37
37
|
getContentForPreview: jest.fn(() => '<p>Test</p>'),
|
|
38
38
|
}));
|
|
39
39
|
|
|
40
|
-
return
|
|
40
|
+
return (
|
|
41
|
+
<div
|
|
42
|
+
data-testid="email-html-editor"
|
|
43
|
+
data-wait-event-context-tags={JSON.stringify(props.waitEventContextTags ?? null)}
|
|
44
|
+
>
|
|
45
|
+
HTML Editor
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
41
48
|
});
|
|
42
49
|
});
|
|
43
50
|
|
|
@@ -137,6 +144,7 @@ const defaultProps = {
|
|
|
137
144
|
forwardedTags: {},
|
|
138
145
|
selectedOfferDetails: [],
|
|
139
146
|
eventContextTags: [],
|
|
147
|
+
waitEventContextTags: {},
|
|
140
148
|
getFormdata: jest.fn(),
|
|
141
149
|
isGetFormData: false,
|
|
142
150
|
getLiquidTags: jest.fn(),
|
|
@@ -171,6 +179,13 @@ describe('EmailWrapperView', () => {
|
|
|
171
179
|
jest.clearAllMocks();
|
|
172
180
|
});
|
|
173
181
|
|
|
182
|
+
it('passes waitEventContextTags to EmailHTMLEditor when HTML editor is shown', () => {
|
|
183
|
+
const waitMap = { b1: { eventName: 'E', blockName: 'B', tags: [] } };
|
|
184
|
+
renderWithIntl({ waitEventContextTags: waitMap });
|
|
185
|
+
const el = screen.getByTestId('email-html-editor');
|
|
186
|
+
expect(el).toHaveAttribute('data-wait-event-context-tags', JSON.stringify(waitMap));
|
|
187
|
+
});
|
|
188
|
+
|
|
174
189
|
describe('Mode Selection UI', () => {
|
|
175
190
|
it('renders mode selection when step is MODE_SELECTION', () => {
|
|
176
191
|
renderWithIntl({ step: STEPS.MODE_SELECTION });
|
|
@@ -51,6 +51,7 @@ const useEmailWrapper = ({
|
|
|
51
51
|
editor,
|
|
52
52
|
moduleType,
|
|
53
53
|
eventContextTags,
|
|
54
|
+
waitEventContextTags,
|
|
54
55
|
isLoyaltyModule,
|
|
55
56
|
// Props for CmsTemplates component
|
|
56
57
|
cmsTemplatesLoader,
|
|
@@ -736,6 +737,7 @@ const useEmailWrapper = ({
|
|
|
736
737
|
selectedEditorMode, // Pass selected mode to Email component (only for HTML_EDITOR)
|
|
737
738
|
moduleType,
|
|
738
739
|
eventContextTags,
|
|
740
|
+
waitEventContextTags,
|
|
739
741
|
isLoyaltyModule,
|
|
740
742
|
showTestAndPreviewSlidebox,
|
|
741
743
|
handleTestAndPreview,
|
|
@@ -765,6 +767,7 @@ const useEmailWrapper = ({
|
|
|
765
767
|
editor,
|
|
766
768
|
moduleType,
|
|
767
769
|
eventContextTags,
|
|
770
|
+
waitEventContextTags,
|
|
768
771
|
isLoyaltyModule,
|
|
769
772
|
showTestAndPreviewSlidebox,
|
|
770
773
|
handleTestAndPreview,
|
|
@@ -63,6 +63,7 @@ const EmailWrapper = (props) => {
|
|
|
63
63
|
onEnterTemplateName,
|
|
64
64
|
onRemoveTemplateName,
|
|
65
65
|
eventContextTags,
|
|
66
|
+
waitEventContextTags,
|
|
66
67
|
isLoyaltyModule,
|
|
67
68
|
cmsTemplatesLoader,
|
|
68
69
|
onPreviewContentClicked,
|
|
@@ -130,6 +131,7 @@ const EmailWrapper = (props) => {
|
|
|
130
131
|
onEnterTemplateName,
|
|
131
132
|
onRemoveTemplateName,
|
|
132
133
|
eventContextTags,
|
|
134
|
+
waitEventContextTags,
|
|
133
135
|
isLoyaltyModule,
|
|
134
136
|
cmsTemplatesLoader,
|
|
135
137
|
onPreviewContentClicked,
|
|
@@ -184,6 +186,7 @@ const EmailWrapper = (props) => {
|
|
|
184
186
|
forwardedTags={forwardedTags}
|
|
185
187
|
selectedOfferDetails={selectedOfferDetails}
|
|
186
188
|
eventContextTags={eventContextTags}
|
|
189
|
+
waitEventContextTags={waitEventContextTags}
|
|
187
190
|
getFormdata={getFormdata}
|
|
188
191
|
isGetFormData={isGetFormData}
|
|
189
192
|
getLiquidTags={globalActionsProp?.getLiquidTags}
|
|
@@ -241,6 +244,7 @@ EmailWrapper.propTypes = {
|
|
|
241
244
|
onEnterTemplateName: PropTypes.func,
|
|
242
245
|
onRemoveTemplateName: PropTypes.func,
|
|
243
246
|
eventContextTags: PropTypes.array,
|
|
247
|
+
waitEventContextTags: PropTypes.object,
|
|
244
248
|
isLoyaltyModule: PropTypes.bool,
|
|
245
249
|
onPreviewContentClicked: PropTypes.func,
|
|
246
250
|
onTestContentClicked: PropTypes.func,
|
|
@@ -102,6 +102,7 @@ describe('useEmailWrapper', () => {
|
|
|
102
102
|
editor: null,
|
|
103
103
|
moduleType: '',
|
|
104
104
|
eventContextTags: [],
|
|
105
|
+
waitEventContextTags: {},
|
|
105
106
|
isLoyaltyModule: false,
|
|
106
107
|
cmsTemplatesLoader: false,
|
|
107
108
|
currentOrgDetails: { id: 'org1' },
|
|
@@ -120,6 +121,14 @@ describe('useEmailWrapper', () => {
|
|
|
120
121
|
expect(result.current.onTemplateNameChange).toBeInstanceOf(Function);
|
|
121
122
|
});
|
|
122
123
|
|
|
124
|
+
it('passes waitEventContextTags through emailProps', () => {
|
|
125
|
+
const waitMap = { block1: { eventName: 'E', blockName: 'B', tags: [] } };
|
|
126
|
+
const { result } = renderHook(() =>
|
|
127
|
+
useEmailWrapper({ ...mockProps, waitEventContextTags: waitMap }),
|
|
128
|
+
);
|
|
129
|
+
expect(result.current.emailProps.waitEventContextTags).toEqual(waitMap);
|
|
130
|
+
});
|
|
131
|
+
|
|
123
132
|
it('handles template name change correctly', () => {
|
|
124
133
|
const { result } = renderHook(() => useEmailWrapper(mockProps));
|
|
125
134
|
|
|
@@ -724,7 +724,7 @@ export const Advertisement = (props) => {
|
|
|
724
724
|
<>
|
|
725
725
|
<CapButton
|
|
726
726
|
onClick={addContent}
|
|
727
|
-
type="
|
|
727
|
+
type="link"
|
|
728
728
|
disabled={MAX_CAROUSEL_ALLOWED === carouselData.length}
|
|
729
729
|
isAddBtn
|
|
730
730
|
style={{ padding: 0, marginTop: 12 }}
|
|
@@ -744,7 +744,7 @@ export const Advertisement = (props) => {
|
|
|
744
744
|
<CapButton
|
|
745
745
|
onClick={shiftLeftContent}
|
|
746
746
|
disabled={defaultActiveIndex === Number(activeIndex)}
|
|
747
|
-
type="
|
|
747
|
+
type="link">
|
|
748
748
|
<CapIcon type="left" size="s" />
|
|
749
749
|
</CapButton>
|
|
750
750
|
</CapTooltip>
|
|
@@ -753,7 +753,7 @@ export const Advertisement = (props) => {
|
|
|
753
753
|
<CapButton
|
|
754
754
|
onClick={shiftRightContent}
|
|
755
755
|
disabled={carouselData.length === (Number(activeIndex) + 1)}
|
|
756
|
-
type="
|
|
756
|
+
type="link">
|
|
757
757
|
<CapIcon type="right" size="s" />
|
|
758
758
|
</CapButton>
|
|
759
759
|
</CapTooltip>
|
|
@@ -762,7 +762,7 @@ export const Advertisement = (props) => {
|
|
|
762
762
|
<CapButton
|
|
763
763
|
onClick={deleteContent}
|
|
764
764
|
disabled={carouselData.length === 1}
|
|
765
|
-
type="
|
|
765
|
+
type="link">
|
|
766
766
|
<CapIcon type="delete" size="s" />
|
|
767
767
|
</CapButton>
|
|
768
768
|
</CapTooltip>
|
|
@@ -326,7 +326,7 @@ const Facebook = (props) => {
|
|
|
326
326
|
span={index % 2 === 0 ? 6 : 14}
|
|
327
327
|
key={label}
|
|
328
328
|
>
|
|
329
|
-
<CapRow>
|
|
329
|
+
<CapRow useLegacy>
|
|
330
330
|
<CapLabel type="label2">
|
|
331
331
|
<FormattedMessage {...messages[label]} />
|
|
332
332
|
</CapLabel>
|
|
@@ -334,7 +334,7 @@ const Facebook = (props) => {
|
|
|
334
334
|
{value}
|
|
335
335
|
{!socialRemoteCampaignId && onChange && (
|
|
336
336
|
<CapButton
|
|
337
|
-
type="
|
|
337
|
+
type="link"
|
|
338
338
|
className="marketingObjective-change-button facebook-marketing-objective-change"
|
|
339
339
|
onClick={onChange}
|
|
340
340
|
>
|
|
@@ -10,6 +10,7 @@ import { DAEMON } from '@capillarytech/vulcan-react-sdk/utils/sagaInjectorTypes'
|
|
|
10
10
|
import CapHeading from "@capillarytech/cap-ui-library/CapHeading";
|
|
11
11
|
import CapSpin from "@capillarytech/cap-ui-library/CapSpin";
|
|
12
12
|
import CapRadioGroup from "@capillarytech/cap-ui-library/CapRadioGroup";
|
|
13
|
+
import ConfigProvider from 'antd/lib/config-provider';
|
|
13
14
|
import CapRow from "@capillarytech/cap-ui-library/CapRow";
|
|
14
15
|
import CapColumn from "@capillarytech/cap-ui-library/CapColumn";
|
|
15
16
|
import CapButton from "@capillarytech/cap-ui-library/CapButton";
|
|
@@ -1434,7 +1435,7 @@ export const InApp = (props) => {
|
|
|
1434
1435
|
{/* Creative layout type */}
|
|
1435
1436
|
{shouldUseHTMLEditor && (
|
|
1436
1437
|
<>
|
|
1437
|
-
<CapRow>
|
|
1438
|
+
<CapRow useLegacy>
|
|
1438
1439
|
<CapHeading type="h4">
|
|
1439
1440
|
<FormattedMessage {...messages.creativeLayout} />
|
|
1440
1441
|
</CapHeading>
|
|
@@ -1442,13 +1443,15 @@ export const InApp = (props) => {
|
|
|
1442
1443
|
<FormattedMessage {...messages.creativeLayoutDesc} />
|
|
1443
1444
|
</CapHeading>
|
|
1444
1445
|
</CapRow>
|
|
1445
|
-
<
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1446
|
+
<ConfigProvider theme={{ components: { Radio: { radioSize: 20, dotSize: 8 } } }}>
|
|
1447
|
+
<CapRadioGroup
|
|
1448
|
+
id="inapp-layout-radio"
|
|
1449
|
+
options={LAYOUT_RADIO_OPTIONS}
|
|
1450
|
+
value={templateLayoutType}
|
|
1451
|
+
onChange={onTemplateLayoutTypeChange}
|
|
1452
|
+
className="inapp-layout-radio"
|
|
1453
|
+
/>
|
|
1454
|
+
</ConfigProvider>
|
|
1452
1455
|
</>
|
|
1453
1456
|
)}
|
|
1454
1457
|
{shouldUseHTMLEditor && (
|
|
@@ -1510,7 +1513,7 @@ export const InApp = (props) => {
|
|
|
1510
1513
|
labelPosition="top"
|
|
1511
1514
|
size="default"
|
|
1512
1515
|
/>
|
|
1513
|
-
<CapRow>
|
|
1516
|
+
<CapRow useLegacy>
|
|
1514
1517
|
<CapHeading type="h4">
|
|
1515
1518
|
<FormattedMessage {...messages.creativeLayout} />
|
|
1516
1519
|
</CapHeading>
|
|
@@ -1518,13 +1521,15 @@ export const InApp = (props) => {
|
|
|
1518
1521
|
<FormattedMessage {...messages.creativeLayoutDesc} />
|
|
1519
1522
|
</CapHeading>
|
|
1520
1523
|
</CapRow>
|
|
1521
|
-
<
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1524
|
+
<ConfigProvider theme={{ components: { Radio: { radioSize: 20, dotSize: 8 } } }}>
|
|
1525
|
+
<CapRadioGroup
|
|
1526
|
+
id="inapp-layout-radio"
|
|
1527
|
+
options={LAYOUT_RADIO_OPTIONS}
|
|
1528
|
+
value={templateLayoutType}
|
|
1529
|
+
onChange={onTemplateLayoutTypeChange}
|
|
1530
|
+
className="inapp-layout-radio"
|
|
1531
|
+
/>
|
|
1532
|
+
</ConfigProvider>
|
|
1528
1533
|
<CapTab
|
|
1529
1534
|
panes={DEVICE_PANES.filter((devicePane) => devicePane?.isSupported === true)}
|
|
1530
1535
|
onChange={(value) => setPanes(value)}
|
|
@@ -35,7 +35,7 @@ const ModeSelectionUI = ({
|
|
|
35
35
|
labelPosition="top"
|
|
36
36
|
size="default"
|
|
37
37
|
/>
|
|
38
|
-
<CapRow className="inapp-wrapper__card-container">
|
|
38
|
+
<CapRow useLegacy className="inapp-wrapper__card-container">
|
|
39
39
|
<CapRadioCardWithLabel
|
|
40
40
|
panes={modes}
|
|
41
41
|
onChange={onChange}
|
|
@@ -49,7 +49,7 @@ const ModeSelectionUI = ({
|
|
|
49
49
|
</CapError>
|
|
50
50
|
)}
|
|
51
51
|
{inAppEditorType && !isTemplateNameEmpty && (
|
|
52
|
-
<CapRow className="next-button-container">
|
|
52
|
+
<CapRow useLegacy className="next-button-container">
|
|
53
53
|
<CapButton
|
|
54
54
|
onClick={handleEditorTypeSelection}
|
|
55
55
|
disabled={isFullMode && isTemplateNameEmpty}
|
|
@@ -885,10 +885,10 @@ export const InappAdvanced = (props) => {
|
|
|
885
885
|
|
|
886
886
|
return (
|
|
887
887
|
<CapSpin spinning={spin}>
|
|
888
|
-
<CapRow className="cap-inapp-creatives">
|
|
888
|
+
<CapRow useLegacy className="cap-inapp-creatives">
|
|
889
889
|
{/* Creative layout type*/}
|
|
890
890
|
<>
|
|
891
|
-
<CapRow className="inapp-creative-layout">
|
|
891
|
+
<CapRow useLegacy className="inapp-creative-layout">
|
|
892
892
|
<CapHeading type="h4">
|
|
893
893
|
<FormattedMessage {...messages.creativeLayout} />
|
|
894
894
|
</CapHeading>
|
|
@@ -907,7 +907,7 @@ export const InappAdvanced = (props) => {
|
|
|
907
907
|
<CapColumn span={24}>
|
|
908
908
|
{/* Content Sync Checkbox - positioned after device tabs */}
|
|
909
909
|
{isAndroidSupported && isIosSupported && (
|
|
910
|
-
<CapRow>
|
|
910
|
+
<CapRow useLegacy>
|
|
911
911
|
<CapCheckbox
|
|
912
912
|
checked={keepContentSame}
|
|
913
913
|
onChange={handleCheckboxChange}
|
|
@@ -917,7 +917,7 @@ export const InappAdvanced = (props) => {
|
|
|
917
917
|
</CapCheckbox>
|
|
918
918
|
</CapRow>
|
|
919
919
|
)}
|
|
920
|
-
<CapRow>
|
|
920
|
+
<CapRow useLegacy>
|
|
921
921
|
{/* device tab */}
|
|
922
922
|
<CapTab
|
|
923
923
|
panes={PANES.filter(
|
|
@@ -10,9 +10,9 @@ import PropTypes from 'prop-types';
|
|
|
10
10
|
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import { ConfigProvider } from 'antd';
|
|
13
|
-
import enUS from 'antd/es/locale
|
|
14
|
-
import zhCN from 'antd/es/locale
|
|
15
|
-
import jaJP from 'antd/es/locale
|
|
13
|
+
import enUS from 'antd/es/locale/en_US';
|
|
14
|
+
import zhCN from 'antd/es/locale/zh_CN';
|
|
15
|
+
import jaJP from 'antd/es/locale/ja_JP';
|
|
16
16
|
import { connect } from 'react-redux';
|
|
17
17
|
import { createStructuredSelector } from 'reselect';
|
|
18
18
|
import { IntlProvider } from 'react-intl';
|
|
@@ -17,9 +17,9 @@ const messages = defineMessages({
|
|
|
17
17
|
},
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
-
jest.mock('antd/es/locale
|
|
21
|
-
jest.mock('antd/es/locale
|
|
22
|
-
jest.mock('antd/es/locale
|
|
20
|
+
jest.mock('antd/es/locale/en_US', () => 'enUS');
|
|
21
|
+
jest.mock('antd/es/locale/zh_CN', () => 'zhCN');
|
|
22
|
+
jest.mock('antd/es/locale/ja_JP', () => 'jaJP');
|
|
23
23
|
|
|
24
24
|
describe('<LanguageProvider />', () => {
|
|
25
25
|
it('should render its children', () => {
|