@capillarytech/creatives-library 7.12.36 → 7.12.37
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/package.json +1 -1
- package/v2Components/CapWhatsappCTA/index.js +5 -5
- package/v2Components/CapWhatsappCTA/index.scss +7 -1
- package/v2Containers/CreativesContainer/index.js +3 -3
- package/v2Containers/Whatsapp/index.js +15 -7
- package/v2Containers/Whatsapp/index.scss +11 -13
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +820 -240
package/package.json
CHANGED
|
@@ -195,7 +195,7 @@ export const CapWhatsappCTA = (props) => {
|
|
|
195
195
|
<CapRow>
|
|
196
196
|
<CapColumn span={12}>
|
|
197
197
|
{/* Type of action */}
|
|
198
|
-
<CapHeading type="h4">
|
|
198
|
+
<CapHeading type="h4" className="cta-label">
|
|
199
199
|
{formatMessage(messages.ctaType)}
|
|
200
200
|
</CapHeading>
|
|
201
201
|
<CapSelect
|
|
@@ -207,7 +207,7 @@ export const CapWhatsappCTA = (props) => {
|
|
|
207
207
|
</CapColumn>
|
|
208
208
|
<CapColumn span={12}>
|
|
209
209
|
{/* Button text */}
|
|
210
|
-
<CapHeading type="h4">
|
|
210
|
+
<CapHeading type="h4" className="cta-label">
|
|
211
211
|
{formatMessage(messages.ctaButtonText)}
|
|
212
212
|
</CapHeading>
|
|
213
213
|
<CapInput
|
|
@@ -226,7 +226,7 @@ export const CapWhatsappCTA = (props) => {
|
|
|
226
226
|
<CapRow>
|
|
227
227
|
<CapColumn span={11}>
|
|
228
228
|
{/* phone number */}
|
|
229
|
-
<CapHeading type="h4">
|
|
229
|
+
<CapHeading type="h4" className="cta-label">
|
|
230
230
|
{formatMessage(messages.ctaPhoneNo)}
|
|
231
231
|
</CapHeading>
|
|
232
232
|
<PhoneInput
|
|
@@ -246,7 +246,7 @@ export const CapWhatsappCTA = (props) => {
|
|
|
246
246
|
<CapRow>
|
|
247
247
|
<CapColumn span={12}>
|
|
248
248
|
{/* URL Type */}
|
|
249
|
-
<CapHeading type="h4">
|
|
249
|
+
<CapHeading type="h4" className="cta-label">
|
|
250
250
|
{formatMessage(messages.ctaWebsiteType)}
|
|
251
251
|
</CapHeading>
|
|
252
252
|
<CapSelect
|
|
@@ -257,7 +257,7 @@ export const CapWhatsappCTA = (props) => {
|
|
|
257
257
|
</CapColumn>
|
|
258
258
|
<CapColumn span={12}>
|
|
259
259
|
{/* cta url */}
|
|
260
|
-
<CapHeading type="h4">
|
|
260
|
+
<CapHeading type="h4" className="cta-label">
|
|
261
261
|
{formatMessage(messages.ctaWebsiteUrl)}
|
|
262
262
|
</CapHeading>
|
|
263
263
|
<CapInput
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
.cap-whatsapp-saved-cta {
|
|
4
4
|
border: solid 1px $CAP_G06;
|
|
5
5
|
margin-left: 24px;
|
|
6
|
-
padding:
|
|
6
|
+
padding: 10px;
|
|
7
7
|
border-radius: 4px;
|
|
8
8
|
|
|
9
9
|
div:not(:last-child) {
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
|
|
13
13
|
.url,
|
|
14
14
|
.phone {
|
|
15
|
+
white-space: nowrap;
|
|
15
16
|
overflow: hidden;
|
|
17
|
+
text-overflow: ellipsis;
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
.url-type {
|
|
@@ -30,6 +32,10 @@
|
|
|
30
32
|
padding: 20px;
|
|
31
33
|
border-radius: 4px;
|
|
32
34
|
|
|
35
|
+
.cta-label {
|
|
36
|
+
margin-bottom: 4px;
|
|
37
|
+
}
|
|
38
|
+
|
|
33
39
|
.whatsapp-cta-save-delete-btn {
|
|
34
40
|
.ant-btn {
|
|
35
41
|
margin-right: $CAP_SPACE_16;
|
|
@@ -375,7 +375,7 @@ export class Creatives extends React.Component {
|
|
|
375
375
|
language,
|
|
376
376
|
category,
|
|
377
377
|
mediaType,
|
|
378
|
-
|
|
378
|
+
buttonType = 'NONE',
|
|
379
379
|
buttons = [],
|
|
380
380
|
} = {},
|
|
381
381
|
} = templateData;
|
|
@@ -588,7 +588,7 @@ export class Creatives extends React.Component {
|
|
|
588
588
|
category,
|
|
589
589
|
templateEditor,
|
|
590
590
|
varMapped,
|
|
591
|
-
buttonType
|
|
591
|
+
buttonType = 'NONE',
|
|
592
592
|
buttons = [],
|
|
593
593
|
} = cloneDeep(versions.base.content.whatsapp);
|
|
594
594
|
const modifiedButtons = cloneDeep(buttons).map((btn) => {
|
|
@@ -612,7 +612,7 @@ export class Creatives extends React.Component {
|
|
|
612
612
|
category,
|
|
613
613
|
language: languages[0].language,
|
|
614
614
|
mediaType,
|
|
615
|
-
|
|
615
|
+
buttonType,
|
|
616
616
|
buttons : modifiedButtons,
|
|
617
617
|
},
|
|
618
618
|
};
|
|
@@ -451,7 +451,7 @@ export const Whatsapp = (props) => {
|
|
|
451
451
|
setCtadata((prevState) => {
|
|
452
452
|
const clonedCta = cloneDeep(prevState);
|
|
453
453
|
const filteredCta = clonedCta.filter((i) => i.index !== index);
|
|
454
|
-
if(filteredCta.length === 1){
|
|
454
|
+
if (filteredCta.length === 1) {
|
|
455
455
|
filteredCta[0].index = 0;
|
|
456
456
|
}
|
|
457
457
|
return filteredCta;
|
|
@@ -461,19 +461,21 @@ export const Whatsapp = (props) => {
|
|
|
461
461
|
const buttonRadioOptions = [
|
|
462
462
|
{
|
|
463
463
|
value: WHATSAPP_BUTTON_TYPES.NONE,
|
|
464
|
-
label:
|
|
464
|
+
label: (
|
|
465
|
+
<CapHeading type="h4" className="whatsapp-button-none">
|
|
466
|
+
{formatMessage(messages.btnTypeNone)}
|
|
467
|
+
</CapHeading>
|
|
468
|
+
),
|
|
465
469
|
},
|
|
466
470
|
{
|
|
467
471
|
value: WHATSAPP_BUTTON_TYPES.CTA,
|
|
468
472
|
label: (
|
|
469
473
|
<>
|
|
470
|
-
<div className="whatsapp-button">
|
|
474
|
+
<div className="whatsapp-button-cta">
|
|
471
475
|
<CapHeading type="h4">
|
|
472
476
|
{formatMessage(messages.btnTypeCTA)}
|
|
473
477
|
</CapHeading>
|
|
474
|
-
<CapLabel
|
|
475
|
-
{formatMessage(messages.ctaDesc)}
|
|
476
|
-
</CapLabel>
|
|
478
|
+
<CapLabel>{formatMessage(messages.ctaDesc)}</CapLabel>
|
|
477
479
|
</div>
|
|
478
480
|
{buttonType === WHATSAPP_BUTTON_TYPES.CTA && (
|
|
479
481
|
<CapWhatsappCTA
|
|
@@ -492,7 +494,13 @@ export const Whatsapp = (props) => {
|
|
|
492
494
|
placement="bottom"
|
|
493
495
|
title={!isEditFlow && formatMessage(messages.disabledFeatureTooltip)}
|
|
494
496
|
>
|
|
495
|
-
<div
|
|
497
|
+
<div
|
|
498
|
+
className="whatsapp-button-quick-reply"
|
|
499
|
+
style={{
|
|
500
|
+
marginTop:
|
|
501
|
+
buttonType === WHATSAPP_BUTTON_TYPES.CTA ? '0px' : '24px',
|
|
502
|
+
}}
|
|
503
|
+
>
|
|
496
504
|
<CapHeading type="h4">
|
|
497
505
|
{formatMessage(messages.btnTypeQuickReply)}
|
|
498
506
|
</CapHeading>
|
|
@@ -80,13 +80,19 @@
|
|
|
80
80
|
display: grid;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
.whatsapp-
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
.whatsapp-button-none{
|
|
84
|
+
display: inline-grid;
|
|
85
|
+
margin-top: 16px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.whatsapp-button-cta {
|
|
89
|
+
display: inline-grid;
|
|
90
|
+
margin-top: 24px;
|
|
86
91
|
}
|
|
87
92
|
|
|
88
|
-
.whatsapp-
|
|
89
|
-
|
|
93
|
+
.whatsapp-button-quick-reply {
|
|
94
|
+
display: inline-grid;
|
|
95
|
+
opacity: 0.4;
|
|
90
96
|
}
|
|
91
97
|
|
|
92
98
|
.whatsapp-optional-label {
|
|
@@ -95,12 +101,4 @@
|
|
|
95
101
|
font-weight: normal;
|
|
96
102
|
font-size: 12px;
|
|
97
103
|
}
|
|
98
|
-
|
|
99
|
-
.whatsapp-button {
|
|
100
|
-
display: inline-grid;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.whatsapp-cta-desc {
|
|
104
|
-
margin-bottom: 17px;
|
|
105
|
-
}
|
|
106
104
|
}
|