@capillarytech/creatives-library 8.0.87-alpha.2 → 8.0.87-alpha.20
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/initialState.js +1 -0
- package/package.json +1 -1
- package/services/api.js +9 -10
- package/utils/transformerUtils.js +509 -0
- package/v2Components/CapWhatsappCTA/messages.js +0 -4
- package/v2Components/FormBuilder/index.js +7 -3
- package/v2Components/TemplatePreview/_templatePreview.scss +0 -9
- package/v2Components/TemplatePreview/index.js +104 -169
- package/v2Containers/Cap/actions.js +8 -0
- package/v2Containers/Cap/constants.js +4 -0
- package/v2Containers/Cap/reducer.js +6 -0
- package/v2Containers/Cap/sagas.js +23 -0
- package/v2Containers/Cap/selectors.js +6 -0
- package/v2Containers/Cap/tests/__snapshots__/index.test.js.snap +1 -0
- package/v2Containers/CreativesContainer/SlideBoxContent.js +11 -1
- package/v2Containers/CreativesContainer/constants.js +3 -0
- package/v2Containers/CreativesContainer/index.js +77 -88
- package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +25 -0
- package/v2Containers/CreativesContainer/tests/index.test.js +2 -0
- package/v2Containers/Email/index.js +1 -0
- package/v2Containers/EmailWrapper/index.js +2 -0
- package/v2Containers/MobilePush/Create/index.js +1 -0
- package/v2Containers/MobilePush/Edit/index.js +1 -0
- package/v2Containers/MobilepushWrapper/index.js +2 -1
- package/v2Containers/Sms/Create/index.js +1 -0
- package/v2Containers/Sms/Edit/index.js +1 -0
- package/v2Containers/SmsWrapper/index.js +2 -0
- package/v2Containers/Templates/_templates.scss +0 -35
- package/v2Containers/Templates/index.js +5 -64
- package/v2Containers/TemplatesV2/index.js +7 -0
- package/v2Containers/Whatsapp/constants.js +1 -83
- package/v2Containers/Whatsapp/index.js +182 -709
- package/v2Containers/Whatsapp/index.scss +1 -52
- package/v2Containers/Whatsapp/messages.js +2 -38
- package/v2Containers/Whatsapp/utils.js +0 -34
- package/v2Containers/mockdata.js +3 -0
- package/v2Components/CapWhatsappCarouselButton/constant.js +0 -51
- package/v2Components/CapWhatsappCarouselButton/index.js +0 -446
- package/v2Components/CapWhatsappCarouselButton/index.scss +0 -39
- package/v2Components/TemplatePreview/assets/images/empty_image_preview.svg +0 -4
- package/v2Components/TemplatePreview/assets/images/empty_video_preview.svg +0 -4
|
@@ -43,15 +43,13 @@ import inAppMobileIOSModal from './assets/images/inapp_mobile_ios_modal.svg';
|
|
|
43
43
|
import inAppMobileIOSTop from './assets/images/inapp_mobile_ios_top.svg';
|
|
44
44
|
import inAppMobileIOSBottom from './assets/images/inapp_mobile_ios_bottom.svg';
|
|
45
45
|
import inAppMobileIOSFull from './assets/images/inapp_mobile_ios_full.svg';
|
|
46
|
-
import whatsappImageEmptyPreview from './assets/images/empty_image_preview.svg';
|
|
47
|
-
import whatsappVideoEmptyPreview from './assets/images/empty_video_preview.svg';
|
|
48
46
|
import videoPlay from '../../assets/videoPlay.svg';
|
|
49
47
|
import zaloMessage from '../../v2Containers/Zalo/messages';
|
|
50
48
|
import { handlePreviewInNewTab } from '../../utils/common';
|
|
51
49
|
import { TEMPLATE, IMAGE_CAROUSEL, IMAGE, STICKER, TEXT, IMAGE_MAP, VIDEO } from '../../v2Containers/Line/Container/constants';
|
|
52
50
|
import CapFacebookPreview from '../../v2Containers/CapFacebookPreview';
|
|
53
51
|
import WhatsappStatusContainer from '../WhatsappStatusContainer';
|
|
54
|
-
import { getWhatsappQuickReply
|
|
52
|
+
import { getWhatsappQuickReply } from '../../v2Containers/Whatsapp/utils';
|
|
55
53
|
import { QUICK_REPLY, WHATSAPP_CATEGORIES } from '../../v2Containers/Whatsapp/constants';
|
|
56
54
|
import { ANDROID, INAPP_MESSAGE_LAYOUT_TYPES } from '../../v2Containers/InApp/constants';
|
|
57
55
|
|
|
@@ -215,7 +213,7 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
215
213
|
iosActions = _.map(content.actions, (action) => {
|
|
216
214
|
if (action.label) {
|
|
217
215
|
return (<div className="actions" key={`action-${action.label}`}>
|
|
218
|
-
|
|
216
|
+
<span className="action">{action.label.toUpperCase()}</span>
|
|
219
217
|
</div>);
|
|
220
218
|
}
|
|
221
219
|
return undefined;
|
|
@@ -255,15 +253,6 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
255
253
|
'width': '88%',
|
|
256
254
|
'left': 0,
|
|
257
255
|
};
|
|
258
|
-
const carouselWhatsappSectionStyle = {
|
|
259
|
-
'padding': `4px 0 ${CAP_SPACE_08}`,
|
|
260
|
-
'border-radius': '6px',
|
|
261
|
-
'background-color': CAP_WHITE,
|
|
262
|
-
'width': '166px',
|
|
263
|
-
'cursor': 'pointer',
|
|
264
|
-
'flex-shrink': 0,
|
|
265
|
-
'left': 0,
|
|
266
|
-
};
|
|
267
256
|
const getVideoContent = ({
|
|
268
257
|
video,
|
|
269
258
|
actionUrl,
|
|
@@ -285,53 +274,53 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
285
274
|
>
|
|
286
275
|
{
|
|
287
276
|
video
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
277
|
+
? (
|
|
278
|
+
<>
|
|
279
|
+
<video style={{ opacity: 0.5, width: '100%' }}>
|
|
280
|
+
<source src={video} type="video/mp4" />
|
|
281
|
+
</video>
|
|
282
|
+
<div
|
|
283
|
+
style={{
|
|
284
|
+
position: 'absolute',
|
|
285
|
+
display: 'flex',
|
|
286
|
+
flexDirection: 'column',
|
|
287
|
+
}}
|
|
288
|
+
>
|
|
289
|
+
<CapButton
|
|
290
|
+
className="preview-video-btn"
|
|
291
|
+
type="flat"
|
|
299
292
|
>
|
|
300
|
-
<CapButton
|
|
301
|
-
className="preview-video-btn"
|
|
302
|
-
type="flat"
|
|
303
|
-
>
|
|
304
293
|
<CapIcon type="play"/>
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
294
|
+
<FormattedMessage {...messages.playVideo} />
|
|
295
|
+
</CapButton>
|
|
296
|
+
{
|
|
297
|
+
actionUrl
|
|
298
|
+
? (
|
|
299
|
+
<CapButton
|
|
300
|
+
className="preview-video-btn"
|
|
301
|
+
type="flat"
|
|
302
|
+
>
|
|
314
303
|
<CapIcon type="reply" style={{ fontSize: 18 }}/>
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
304
|
+
<FormattedMessage {...messages.showDetails} />
|
|
305
|
+
</CapButton>
|
|
306
|
+
)
|
|
307
|
+
: null
|
|
308
|
+
}
|
|
309
|
+
</div>
|
|
310
|
+
</>
|
|
311
|
+
)
|
|
312
|
+
: (
|
|
313
|
+
<CapImage
|
|
314
|
+
src={lineVideoPlaceholder}
|
|
315
|
+
alt="brand-name"
|
|
316
|
+
rest={{
|
|
317
|
+
style: {
|
|
318
|
+
width: 126,
|
|
319
|
+
marginBottom: 5,
|
|
320
|
+
},
|
|
321
|
+
}}
|
|
322
|
+
/>
|
|
323
|
+
)
|
|
335
324
|
}
|
|
336
325
|
</div>
|
|
337
326
|
);
|
|
@@ -347,10 +336,10 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
347
336
|
renderArray.push(
|
|
348
337
|
<CapLabel type="label21" className="whatsapp-cta-preview">
|
|
349
338
|
{type !== WHATSAPP_CATEGORIES.authentication && <CapIcon
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
339
|
+
type={
|
|
340
|
+
(ctaType || type) === 'PHONE_NUMBER' ? 'call' : 'launch'
|
|
341
|
+
}
|
|
342
|
+
size="xs"
|
|
354
343
|
/>}
|
|
355
344
|
{text}
|
|
356
345
|
</CapLabel>,
|
|
@@ -441,42 +430,42 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
441
430
|
{this.props.showCount &&
|
|
442
431
|
channel &&
|
|
443
432
|
channel.toLowerCase() !== FACEBOOK && (
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
<FormattedMessage
|
|
448
|
-
{...messages.charactersTotal}
|
|
449
|
-
values={{
|
|
450
|
-
smsCount: smsDetails.parts,
|
|
451
|
-
charCount: smsDetails.chars_used,
|
|
452
|
-
}}
|
|
453
|
-
/>
|
|
454
|
-
{smsDetails.unicode && (
|
|
455
|
-
<FormattedMessage {...messages.smsFormatType} />
|
|
456
|
-
)}
|
|
457
|
-
</CapHeading>
|
|
458
|
-
)}
|
|
459
|
-
{smsDetails.optoutUrlPresent && (
|
|
460
|
-
<CapHeading type="h6">
|
|
461
|
-
<FormattedMessage
|
|
462
|
-
{...messages.optoutCharactersTotal}
|
|
463
|
-
values={{ optoutUrlLength: smsDetails.optouturlLength }}
|
|
464
|
-
/>
|
|
465
|
-
</CapHeading>
|
|
466
|
-
)}
|
|
467
|
-
{channel?.toLowerCase() === WHATSAPP.toLowerCase() ? (
|
|
468
|
-
<>
|
|
469
|
-
<WhatsappStatusContainer template={templateData} />
|
|
470
|
-
<CapHeading type="h3" className="margin-t-12">
|
|
433
|
+
<CapColumn span={16}>
|
|
434
|
+
{channel && channel.toLowerCase() === "sms" && (
|
|
435
|
+
<CapHeading type="h3">
|
|
471
436
|
<FormattedMessage
|
|
472
|
-
{...messages.
|
|
473
|
-
values={{
|
|
437
|
+
{...messages.charactersTotal}
|
|
438
|
+
values={{
|
|
439
|
+
smsCount: smsDetails.parts,
|
|
440
|
+
charCount: smsDetails.chars_used,
|
|
441
|
+
}}
|
|
474
442
|
/>
|
|
443
|
+
{smsDetails.unicode && (
|
|
444
|
+
<FormattedMessage {...messages.smsFormatType} />
|
|
445
|
+
)}
|
|
475
446
|
</CapHeading>
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
447
|
+
)}
|
|
448
|
+
{smsDetails.optoutUrlPresent && (
|
|
449
|
+
<CapHeading type="h6">
|
|
450
|
+
<FormattedMessage
|
|
451
|
+
{...messages.optoutCharactersTotal}
|
|
452
|
+
values={{ optoutUrlLength: smsDetails.optouturlLength }}
|
|
453
|
+
/>
|
|
454
|
+
</CapHeading>
|
|
455
|
+
)}
|
|
456
|
+
{channel?.toLowerCase() === WHATSAPP.toLowerCase() ? (
|
|
457
|
+
<>
|
|
458
|
+
<WhatsappStatusContainer template={templateData} />
|
|
459
|
+
<CapHeading type="h3" className="margin-t-12">
|
|
460
|
+
<FormattedMessage
|
|
461
|
+
{...messages.whatsappMessageLength}
|
|
462
|
+
values={{ length: whatsappUpdatedLen }}
|
|
463
|
+
/>
|
|
464
|
+
</CapHeading>
|
|
465
|
+
</>
|
|
466
|
+
) : null}
|
|
467
|
+
</CapColumn>
|
|
468
|
+
)}
|
|
480
469
|
<CapColumn span={this.props.showCount ? 8 : 24}>
|
|
481
470
|
{showTestAndPreview && (
|
|
482
471
|
<div className="test-and-preview-container">
|
|
@@ -639,9 +628,9 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
639
628
|
)}
|
|
640
629
|
{content.actions.filter((action) => action.label)
|
|
641
630
|
.length ? (
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
631
|
+
<div className="actions">
|
|
632
|
+
{_.map(
|
|
633
|
+
content.actions,
|
|
645
634
|
(action) =>
|
|
646
635
|
!!action.label && (
|
|
647
636
|
<span
|
|
@@ -651,11 +640,11 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
651
640
|
{action.label && action.label.toUpperCase()}
|
|
652
641
|
</span>
|
|
653
642
|
)
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
643
|
+
)}
|
|
644
|
+
</div>
|
|
645
|
+
) : (
|
|
646
|
+
""
|
|
647
|
+
)}
|
|
659
648
|
</div>
|
|
660
649
|
) : (
|
|
661
650
|
<div className="message-pop align-left">
|
|
@@ -991,14 +980,14 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
991
980
|
<CapLabel className="whatsapp-brand-name">
|
|
992
981
|
{whatsappUpdatedAccountName || ""}
|
|
993
982
|
</CapLabel>
|
|
994
|
-
<div className=
|
|
983
|
+
<div className="msg-container whatsapp-message-container">
|
|
995
984
|
<div
|
|
996
|
-
className=
|
|
985
|
+
className="message-pop align-left"
|
|
997
986
|
style={whatsappSectionStyle}
|
|
998
987
|
>
|
|
999
988
|
<div className="whatsapp-content">
|
|
1000
|
-
{content?.showUrlPreview
|
|
1001
|
-
|
|
989
|
+
{content?.showUrlPreview &&
|
|
990
|
+
renderUrlPreview(content?.metaTagsDetails)}
|
|
1002
991
|
{content?.whatsappImageSrc && (
|
|
1003
992
|
<CapImage
|
|
1004
993
|
src={content.whatsappImageSrc}
|
|
@@ -1037,60 +1026,6 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
1037
1026
|
{renderQuickReplyPreview()}
|
|
1038
1027
|
</div>
|
|
1039
1028
|
</div>
|
|
1040
|
-
{content?.carouselData && (
|
|
1041
|
-
<div
|
|
1042
|
-
style={{
|
|
1043
|
-
overflowX: "auto",
|
|
1044
|
-
display: "flex",
|
|
1045
|
-
paddingTop: "5px",
|
|
1046
|
-
paddingRight: "5px",
|
|
1047
|
-
whiteSpace: "nowrap",
|
|
1048
|
-
scrollbarWidth: "none", // Hide scrollbar in Firefox
|
|
1049
|
-
msOverflowStyle: "none", // Hide scrollbar in IE/Edge
|
|
1050
|
-
}}
|
|
1051
|
-
className="scroll-container"
|
|
1052
|
-
>
|
|
1053
|
-
{content?.carouselData?.map((data, index) => (
|
|
1054
|
-
<div
|
|
1055
|
-
key={`carousel-${index}`}
|
|
1056
|
-
className="message-pop align-left message-pop-carousel"
|
|
1057
|
-
style={carouselWhatsappSectionStyle}>
|
|
1058
|
-
<div className="whatsapp-content">
|
|
1059
|
-
{content?.carouselMediaType === "image" && (
|
|
1060
|
-
<CapImage
|
|
1061
|
-
src={data?.imageSrc ? data?.imageSrc : whatsappImageEmptyPreview}
|
|
1062
|
-
className="whatsapp-image"
|
|
1063
|
-
alt={formatMessage(messages.previewGenerated)}
|
|
1064
|
-
/>
|
|
1065
|
-
)}
|
|
1066
|
-
{content?.carouselMediaType === "video" && (
|
|
1067
|
-
<CapTooltip
|
|
1068
|
-
title={formatMessage(messages.videoPreviewTooltip)}
|
|
1069
|
-
>
|
|
1070
|
-
<div className="video-preview">
|
|
1071
|
-
<CapImage
|
|
1072
|
-
src={data?.videoPreviewImg ? data?.videoPreviewImg : whatsappVideoEmptyPreview}
|
|
1073
|
-
className="whatsapp-image"
|
|
1074
|
-
alt={formatMessage(messages.previewGenerated)}
|
|
1075
|
-
/>
|
|
1076
|
-
<div className="icon-position">
|
|
1077
|
-
<CapImage
|
|
1078
|
-
className="video-icon"
|
|
1079
|
-
src={videoPlay}
|
|
1080
|
-
/>
|
|
1081
|
-
</div>
|
|
1082
|
-
</div>
|
|
1083
|
-
</CapTooltip>
|
|
1084
|
-
)}
|
|
1085
|
-
<CapLabel type="label5">
|
|
1086
|
-
{content?.isEditFlow ? data?.updatedBodyText?.join("") : data?.bodyText}
|
|
1087
|
-
</CapLabel>
|
|
1088
|
-
{getWhatsappCarouselButtonView(data?.buttons, true)}
|
|
1089
|
-
</div>
|
|
1090
|
-
</div>
|
|
1091
|
-
))}
|
|
1092
|
-
</div>
|
|
1093
|
-
)}
|
|
1094
1029
|
</div>
|
|
1095
1030
|
</div>
|
|
1096
1031
|
<CapHeading
|
|
@@ -1270,21 +1205,21 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
|
|
|
1270
1205
|
{ctaData &&
|
|
1271
1206
|
!isEmpty(ctaData) &&
|
|
1272
1207
|
ctaData[0]?.text !== "" && (
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1208
|
+
<CapButton
|
|
1209
|
+
type="primary"
|
|
1210
|
+
className={`inapp-button-${templateLayoutType}-${device} ${
|
|
1276
1211
|
mediaPreview?.inAppImageSrcAndroid
|
|
1277
1212
|
? ""
|
|
1278
1213
|
: `without-image-button-${templateLayoutType}-android`
|
|
1279
|
-
|
|
1214
|
+
} ${
|
|
1280
1215
|
mediaPreview?.inAppImageSrcIos
|
|
1281
1216
|
? ""
|
|
1282
1217
|
: `without-image-button-${templateLayoutType}-ios`
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1218
|
+
}`}
|
|
1219
|
+
>
|
|
1220
|
+
{ctaData[0]?.text}
|
|
1221
|
+
</CapButton>
|
|
1222
|
+
)}
|
|
1288
1223
|
</div>
|
|
1289
1224
|
</div>
|
|
1290
1225
|
</div>
|
|
@@ -63,3 +63,7 @@ export const DEFAULT_MODULE = 'creatives';
|
|
|
63
63
|
export const GET_LIQUID_TAGS_FAILURE = 'cap/GET_LIQUID_TAGS_FAILURE_V2';
|
|
64
64
|
export const GET_LIQUID_TAGS_REQUEST = 'cap/GET_LIQUID_TAGS_REQUEST_V2';
|
|
65
65
|
export const GET_LIQUID_TAGS_SUCCESS = 'cap/GET_LIQUID_TAGS_SUCCESS_V2';
|
|
66
|
+
|
|
67
|
+
export const CREATE_CENTRAL_COMMS_META_ID_FAILURE = 'cap/CREATE_CENTRAL_COMMS_META_ID_FAILURE_V2';
|
|
68
|
+
export const CREATE_CENTRAL_COMMS_META_ID_REQUEST = 'cap/CREATE_CENTRAL_COMMS_META_ID_REQUEST_V2';
|
|
69
|
+
export const CREATE_CENTRAL_COMMS_META_ID_SUCCESS = 'cap/CREATE_CENTRAL_COMMS_META_ID_SUCCESS_V2';
|
|
@@ -199,6 +199,12 @@ function capReducer(state = fromJS(initialState.cap), action) {
|
|
|
199
199
|
return state
|
|
200
200
|
.set('demoVideoAndLinkJSONStatus', types.FAILURE)
|
|
201
201
|
.set('demoVideoAndLinkJSONError', action?.error);
|
|
202
|
+
case types.CREATE_CENTRAL_COMMS_META_ID_REQUEST:
|
|
203
|
+
return state.set('metaTagsStatus', types.REQUEST);
|
|
204
|
+
case types.CREATE_CENTRAL_COMMS_META_ID_SUCCESS:
|
|
205
|
+
return state.set('metaTagsStatus', types.SUCCESS);
|
|
206
|
+
case types.CREATE_CENTRAL_COMMS_META_ID_FAILURE:
|
|
207
|
+
return state.set('metaTagsStatus', types.FAILURE);
|
|
202
208
|
default:
|
|
203
209
|
return state;
|
|
204
210
|
}
|
|
@@ -186,6 +186,22 @@ const getTopbarData = (parentModule) => {
|
|
|
186
186
|
}
|
|
187
187
|
};
|
|
188
188
|
|
|
189
|
+
export function* createCentralCommsMetaId(action) {
|
|
190
|
+
try {
|
|
191
|
+
const result = yield call(Api.createCentralCommsMetaId, action?.data);
|
|
192
|
+
if (result?.status?.code === 200) {
|
|
193
|
+
if (action?.callback) {
|
|
194
|
+
yield call(action?.callback, result);
|
|
195
|
+
}
|
|
196
|
+
yield put({ type: types.CREATE_CENTRAL_COMMS_META_ID_SUCCESS, result });
|
|
197
|
+
} else {
|
|
198
|
+
yield put({ type: types.CREATE_CENTRAL_COMMS_META_ID_FAILURE, error: result?.message });
|
|
199
|
+
}
|
|
200
|
+
} catch (error) {
|
|
201
|
+
yield put({ type: types.CREATE_CENTRAL_COMMS_META_ID_FAILURE, error });
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
189
205
|
function* getTopbarMenuData(params) {
|
|
190
206
|
const {parentModule} = params;
|
|
191
207
|
try {
|
|
@@ -225,6 +241,10 @@ export function* watchLiquidEntity() {
|
|
|
225
241
|
yield takeLatest(types.GET_LIQUID_TAGS_REQUEST, getLiquidTags);
|
|
226
242
|
}
|
|
227
243
|
|
|
244
|
+
export function* watchMetaId() {
|
|
245
|
+
yield takeLatest(types.CREATE_CENTRAL_COMMS_META_ID_REQUEST, createCentralCommsMetaId);
|
|
246
|
+
}
|
|
247
|
+
|
|
228
248
|
function* watchForOrgChange() {
|
|
229
249
|
yield takeLatest(types.SWITCH_ORG_REQUEST, switchOrg);
|
|
230
250
|
}
|
|
@@ -257,6 +277,7 @@ export default [
|
|
|
257
277
|
watchGetTopbarMenuData,
|
|
258
278
|
watchForGetVideosConfig,
|
|
259
279
|
watchLiquidEntity,
|
|
280
|
+
watchMetaId,
|
|
260
281
|
];
|
|
261
282
|
|
|
262
283
|
|
|
@@ -268,6 +289,7 @@ export function* capSagaForFetchSchemaForEntity() {
|
|
|
268
289
|
export function* capSagaLiquidEntity() {
|
|
269
290
|
yield all([
|
|
270
291
|
watchLiquidEntity(),
|
|
292
|
+
watchMetaId(),
|
|
271
293
|
]);
|
|
272
294
|
};
|
|
273
295
|
|
|
@@ -279,5 +301,6 @@ export function* v2CapSagas() {
|
|
|
279
301
|
watchForFetchUserInfo(),
|
|
280
302
|
watchGetTopbarMenuData(),
|
|
281
303
|
watchForGetVideosConfig(),
|
|
304
|
+
watchMetaId(),
|
|
282
305
|
]);
|
|
283
306
|
}
|
|
@@ -72,6 +72,11 @@ const selectLiquidStateDetails = () => createSelector(
|
|
|
72
72
|
(globalState) => globalState.get('fetchingLiquidTags')
|
|
73
73
|
);
|
|
74
74
|
|
|
75
|
+
const selectMetaTagsStatus = () => createSelector(
|
|
76
|
+
selectCapDomain,
|
|
77
|
+
(globalState) => globalState.get('metaTagsStatus')
|
|
78
|
+
);
|
|
79
|
+
|
|
75
80
|
const makeSelectFetchingSchema = () => createSelector(
|
|
76
81
|
selectCapDomain,
|
|
77
82
|
(globalState) => globalState.get('fetchingSchema')
|
|
@@ -113,4 +118,5 @@ export {
|
|
|
113
118
|
makeSelectFetchingSchemaError,
|
|
114
119
|
makeSelectDemoVideoAndLink,
|
|
115
120
|
selectLiquidStateDetails,
|
|
121
|
+
selectMetaTagsStatus,
|
|
116
122
|
};
|
|
@@ -40,6 +40,7 @@ exports[`<Cap /> should render correct component 1`] = `
|
|
|
40
40
|
"changeOrg": [Function],
|
|
41
41
|
"clearMetaEntities": [Function],
|
|
42
42
|
"clearTopbarMenuData": [Function],
|
|
43
|
+
"createCentralCommsMetaId": [Function],
|
|
43
44
|
"fetchSchemaForEntity": [Function],
|
|
44
45
|
"getLiquidTags": [Function],
|
|
45
46
|
"getSupportVideosConfig": [Function],
|
|
@@ -158,6 +158,7 @@ export function SlideBoxContent(props) {
|
|
|
158
158
|
hostName = '',
|
|
159
159
|
eventContextTags,
|
|
160
160
|
isLoyaltyModule,
|
|
161
|
+
loyaltyMetaData = {},
|
|
161
162
|
} = props;
|
|
162
163
|
const type = (messageDetails.type || '').toLowerCase(); // type is context in get tags values : outbound | dvs | referral | loyalty | coupons
|
|
163
164
|
const query = { type: !isFullMode && 'embedded', module: isFullMode ? 'default' : 'library', isEditFromCampaigns: (templateData || {}).isEditFromCampaigns};
|
|
@@ -434,6 +435,8 @@ export function SlideBoxContent(props) {
|
|
|
434
435
|
enableNewChannels={enableNewChannels}
|
|
435
436
|
hideTestAndPreviewBtn={hideTestAndPreviewBtn}
|
|
436
437
|
eventContextTags={eventContextTags}
|
|
438
|
+
loyaltyMetaData={loyaltyMetaData}
|
|
439
|
+
isLoyaltyModule={isLoyaltyModule}
|
|
437
440
|
/>
|
|
438
441
|
)}
|
|
439
442
|
{isPreview && (
|
|
@@ -514,6 +517,7 @@ export function SlideBoxContent(props) {
|
|
|
514
517
|
onCreateComplete={onCreateComplete}
|
|
515
518
|
smsRegister={smsRegister}
|
|
516
519
|
eventContextTags={eventContextTags}
|
|
520
|
+
messageDetails={messageDetails}
|
|
517
521
|
/>
|
|
518
522
|
)}
|
|
519
523
|
{isEditFTP && (
|
|
@@ -582,6 +586,7 @@ export function SlideBoxContent(props) {
|
|
|
582
586
|
smsRegister={smsRegister}
|
|
583
587
|
onShowTemplates={onShowTemplates}
|
|
584
588
|
eventContextTags={eventContextTags}
|
|
589
|
+
messageDetails={messageDetails}
|
|
585
590
|
/>
|
|
586
591
|
)}
|
|
587
592
|
|
|
@@ -615,6 +620,7 @@ export function SlideBoxContent(props) {
|
|
|
615
620
|
showLiquidErrorInFooter={showLiquidErrorInFooter}
|
|
616
621
|
eventContextTags={eventContextTags}
|
|
617
622
|
isLoyaltyModule={isLoyaltyModule}
|
|
623
|
+
messageDetails={messageDetails}
|
|
618
624
|
/>
|
|
619
625
|
)}
|
|
620
626
|
{(isEditEmailWithId || isEmailEditWithContent) && (
|
|
@@ -645,6 +651,7 @@ export function SlideBoxContent(props) {
|
|
|
645
651
|
showLiquidErrorInFooter={showLiquidErrorInFooter}
|
|
646
652
|
eventContextTags={eventContextTags}
|
|
647
653
|
isLoyaltyModule={isLoyaltyModule}
|
|
654
|
+
messageDetails={messageDetails}
|
|
648
655
|
/>
|
|
649
656
|
)}
|
|
650
657
|
{isEditMPush &&
|
|
@@ -671,6 +678,7 @@ export function SlideBoxContent(props) {
|
|
|
671
678
|
hideTestAndPreviewBtn={hideTestAndPreviewBtn}
|
|
672
679
|
creativesMode={creativesMode}
|
|
673
680
|
eventContextTags={eventContextTags}
|
|
681
|
+
messageDetails={messageDetails}
|
|
674
682
|
/>
|
|
675
683
|
}
|
|
676
684
|
{isCreateMPush &&
|
|
@@ -700,6 +708,7 @@ export function SlideBoxContent(props) {
|
|
|
700
708
|
hideTestAndPreviewBtn={hideTestAndPreviewBtn}
|
|
701
709
|
onTestContentClicked={onTestContentClicked}
|
|
702
710
|
eventContextTags={eventContextTags}
|
|
711
|
+
messageDetails={messageDetails}
|
|
703
712
|
/>
|
|
704
713
|
}
|
|
705
714
|
{
|
|
@@ -934,6 +943,7 @@ SlideBoxContent.propTypes = {
|
|
|
934
943
|
weChatTemplateType: PropTypes.string,
|
|
935
944
|
onWechatTemplateChange: PropTypes.func,
|
|
936
945
|
selectedWeChatAccount: PropTypes.object,
|
|
946
|
+
loyaltyMetaData: PropTypes.object,
|
|
937
947
|
onWeChatMaptemplateStepChange: PropTypes.func,
|
|
938
948
|
weChatMaptemplateStep: PropTypes.string,
|
|
939
949
|
onFacebookSubmit: PropTypes.func,
|
|
@@ -950,6 +960,6 @@ SlideBoxContent.propTypes = {
|
|
|
950
960
|
moduleType: PropTypes.string,
|
|
951
961
|
showLiquidErrorInFooter: PropTypes.bool,
|
|
952
962
|
creativesMode: PropTypes.string,
|
|
953
|
-
hostName: PropTypes.string
|
|
963
|
+
hostName: PropTypes.string
|
|
954
964
|
};
|
|
955
965
|
export default SlideBoxContent;
|
|
@@ -17,6 +17,7 @@ export const FTP = "FTP";
|
|
|
17
17
|
export const NO_COMMUNICATION = "NO_COMMUNICATION";
|
|
18
18
|
export const VIBER = "VIBER";
|
|
19
19
|
export const WHATSAPP = "WHATSAPP";
|
|
20
|
+
export const PUSH = "PUSH";
|
|
20
21
|
export const RCS = "RCS";
|
|
21
22
|
export const ZALO = "ZALO";
|
|
22
23
|
export const INAPP = "INAPP";
|
|
@@ -24,6 +25,8 @@ export const PREVIEW = "preview";
|
|
|
24
25
|
export const EDIT_TEMPLATE = "editTemplate";
|
|
25
26
|
export const JOURNEY = "journey";
|
|
26
27
|
|
|
28
|
+
export const LOYALTY_SUPPORTED_ACTION = "SEND_COMMUNICATION_ACTION";
|
|
29
|
+
|
|
27
30
|
export const SHOW_CONTANER_LOADER = "app/CreativesContainer/SHOW_CONTANER_LOADER";
|
|
28
31
|
export const HIDE_CONTAINER_LOADER = "app/CreativesContainer/HIDE_CONTAINER_LOADER";
|
|
29
32
|
|