@capillarytech/creatives-library 8.0.186 → 8.0.187
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/config/app.js +0 -1
- package/package.json +1 -1
- package/services/api.js +0 -1
- package/v2Components/CapActionButton/index.js +3 -1
- package/v2Containers/CreativesContainer/SlideBoxContent.js +0 -4
- package/v2Containers/CreativesContainer/index.js +10 -29
- package/v2Containers/Rcs/index.js +257 -53
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +1680 -0
- package/v2Containers/Whatsapp/constants.js +1 -22
- package/v2Containers/Whatsapp/index.js +1 -14
|
@@ -80,7 +80,7 @@ export const mediaTypeOptions = ({host, templateCategory}) => {
|
|
|
80
80
|
tagColor: CAP_GREEN02,
|
|
81
81
|
tagTextColor: CAP_GREEN01,
|
|
82
82
|
},
|
|
83
|
-
...(templateCategory === WHATSAPP_CATEGORIES.marketing && (
|
|
83
|
+
...(templateCategory === WHATSAPP_CATEGORIES.marketing && (host === HOST_GUPSHUP || host === HOST_KARIX)
|
|
84
84
|
? [
|
|
85
85
|
{
|
|
86
86
|
key: 'CAROUSEL',
|
|
@@ -104,25 +104,6 @@ export const mediaTypeOptions = ({host, templateCategory}) => {
|
|
|
104
104
|
];
|
|
105
105
|
};
|
|
106
106
|
|
|
107
|
-
export const VALUE_FIRST_CATEGORY_OPTIONS = [
|
|
108
|
-
{
|
|
109
|
-
key: 'marketing',
|
|
110
|
-
value: WHATSAPP_CATEGORIES.marketing,
|
|
111
|
-
label: <FormattedMessage {...messages.marketing} />,
|
|
112
|
-
tooltipLabel: <FormattedMessage {...messages.marketingTooltip} />,
|
|
113
|
-
tagColor: CAP_ORANGE01,
|
|
114
|
-
tagTextColor: CAP_ORANGE,
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
key: 'authentication',
|
|
118
|
-
value: WHATSAPP_CATEGORIES.authentication,
|
|
119
|
-
label: <FormattedMessage {...messages.authentication} />,
|
|
120
|
-
tooltipLabel: <FormattedMessage {...messages.authenticationTooltip} />,
|
|
121
|
-
tagColor: CAP_GREEN02,
|
|
122
|
-
tagTextColor: CAP_GREEN01,
|
|
123
|
-
},
|
|
124
|
-
];
|
|
125
|
-
|
|
126
107
|
export const KARIX_GUPSHUP_CATEGORY_OPTIONS = [
|
|
127
108
|
{
|
|
128
109
|
key: 'utility',
|
|
@@ -365,7 +346,6 @@ export const HOST_KARIX = 'karixwhatsappbulk';
|
|
|
365
346
|
export const HOST_GUPSHUP = 'gupshupwhatsappbulk';
|
|
366
347
|
export const HOST_ICS = 'icswababulk';
|
|
367
348
|
export const HOST_HAPTIC = 'hapticwhatsappbulk';
|
|
368
|
-
export const HOST_VALUE_FIRST = 'valuefirstwhatsappbulk';
|
|
369
349
|
|
|
370
350
|
export const SIZE_UNITS = ['bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
|
371
351
|
export const DOCUMENT_FORMAT = 'PDF';
|
|
@@ -705,7 +685,6 @@ export const CATEGORY_OPTIONS_MAP = {
|
|
|
705
685
|
[HOST_GUPSHUP]: KARIX_GUPSHUP_CATEGORY_OPTIONS,
|
|
706
686
|
[HOST_ICS]: ICS_CATEGORY_OPTIONS,
|
|
707
687
|
[HOST_HAPTIC]: HAPTIC_CATEGORY_OPTIONS,
|
|
708
|
-
[HOST_VALUE_FIRST]: VALUE_FIRST_CATEGORY_OPTIONS,
|
|
709
688
|
};
|
|
710
689
|
|
|
711
690
|
export const REQUEST = "REQUEST";
|
|
@@ -55,7 +55,6 @@ import {
|
|
|
55
55
|
WHATSAPP,
|
|
56
56
|
TWILIO_CATEGORY_OPTIONS,
|
|
57
57
|
KARIX_GUPSHUP_CATEGORY_OPTIONS,
|
|
58
|
-
VALUE_FIRST_CATEGORY_OPTIONS,
|
|
59
58
|
LANGUAGE_OPTIONS,
|
|
60
59
|
WHATSAPP_STATUSES,
|
|
61
60
|
TAG,
|
|
@@ -99,7 +98,6 @@ import {
|
|
|
99
98
|
HAPTIC_CATEGORY_OPTIONS,
|
|
100
99
|
CORRECT_TEMPLATE_FORMAT_URL,
|
|
101
100
|
CATEGORY_OPTIONS_MAP,
|
|
102
|
-
HOST_VALUE_FIRST,
|
|
103
101
|
IMAGE,
|
|
104
102
|
VIDEO,
|
|
105
103
|
URL,
|
|
@@ -268,7 +266,6 @@ export const Whatsapp = (props) => {
|
|
|
268
266
|
const isMediaTypeCarousel = templateMediaType === WHATSAPP_MEDIA_TYPES.CAROUSEL;
|
|
269
267
|
const isHostIsNotTwilio = host !== HOST_TWILIO;
|
|
270
268
|
const isHaptic = host === HOST_HAPTIC;
|
|
271
|
-
const isHostValueFirst = host === HOST_VALUE_FIRST;
|
|
272
269
|
const WhatsappFooter = styled.div`
|
|
273
270
|
background-color: ${CAP_WHITE};
|
|
274
271
|
position: fixed;
|
|
@@ -836,11 +833,6 @@ export const Whatsapp = (props) => {
|
|
|
836
833
|
label: renderTemplateCategoryLabel(option.tooltipLabel, option.label),
|
|
837
834
|
}));
|
|
838
835
|
|
|
839
|
-
const valueFirstCategoryOptions = VALUE_FIRST_CATEGORY_OPTIONS.map((option) => ({
|
|
840
|
-
value: option.value,
|
|
841
|
-
label: renderTemplateCategoryLabel(option.tooltipLabel, option.label),
|
|
842
|
-
}));
|
|
843
|
-
|
|
844
836
|
const isAuthenticationTemplate = isEqual(templateCategory, WHATSAPP_CATEGORIES.authentication);
|
|
845
837
|
const onChangeButtonType = ({ target: { value } }) => {
|
|
846
838
|
setButtonType(value);
|
|
@@ -1341,8 +1333,6 @@ const isAuthenticationTemplate = isEqual(templateCategory, WHATSAPP_CATEGORIES.a
|
|
|
1341
1333
|
};
|
|
1342
1334
|
|
|
1343
1335
|
const getCategoryOptions = (host) => {
|
|
1344
|
-
console.log('host', host);
|
|
1345
|
-
console.log('CATEGORY_OPTIONS_MAP', CATEGORY_OPTIONS_MAP);
|
|
1346
1336
|
return CATEGORY_OPTIONS_MAP[host] || [];
|
|
1347
1337
|
}
|
|
1348
1338
|
|
|
@@ -1587,7 +1577,6 @@ const isAuthenticationTemplate = isEqual(templateCategory, WHATSAPP_CATEGORIES.a
|
|
|
1587
1577
|
}
|
|
1588
1578
|
|
|
1589
1579
|
const createPayload = () => {
|
|
1590
|
-
console.log('in create payload');
|
|
1591
1580
|
let mediaParams = {};
|
|
1592
1581
|
const { whatsappVideoSrc = '', whatsappVideoPreviewImg = '' } = whatsappVideoSrcAndPreview;
|
|
1593
1582
|
switch (templateMediaType) {
|
|
@@ -1698,9 +1687,7 @@ const isAuthenticationTemplate = isEqual(templateCategory, WHATSAPP_CATEGORIES.a
|
|
|
1698
1687
|
|
|
1699
1688
|
const createApprovalHandler = () => {
|
|
1700
1689
|
setSpin(true);
|
|
1701
|
-
|
|
1702
|
-
console.log('payload', payload);
|
|
1703
|
-
actions.createWhatsappTemplate(payload, (resp, errorMessage) => {
|
|
1690
|
+
actions.createWhatsappTemplate(createPayload(), (resp, errorMessage) => {
|
|
1704
1691
|
actionCallback({ resp, errorMessage });
|
|
1705
1692
|
if (!errorMessage) {
|
|
1706
1693
|
onCreateComplete();
|