@capillarytech/creatives-library 7.12.61 → 7.12.63
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
CHANGED
|
@@ -233,7 +233,7 @@ export const CapWhatsappCTA = (props) => {
|
|
|
233
233
|
</CapLabel>
|
|
234
234
|
</CapColumn>
|
|
235
235
|
{ctaIsPhone && (
|
|
236
|
-
<CapColumn span={
|
|
236
|
+
<CapColumn span={11} align="left">
|
|
237
237
|
<CapLabel className="phone">+{phone_number}</CapLabel>
|
|
238
238
|
</CapColumn>
|
|
239
239
|
)}
|
|
@@ -247,7 +247,7 @@ export const CapWhatsappCTA = (props) => {
|
|
|
247
247
|
</CapLabel>
|
|
248
248
|
</CapColumn>
|
|
249
249
|
<CapTooltip title={url} placement={'top'}>
|
|
250
|
-
<CapColumn span={
|
|
250
|
+
<CapColumn span={8} style={{ marginRight: '0px' }}>
|
|
251
251
|
<CapLabel className="url">{url}</CapLabel>
|
|
252
252
|
</CapColumn>
|
|
253
253
|
</CapTooltip>
|
|
@@ -442,7 +442,7 @@ export const CapWhatsappCTA = (props) => {
|
|
|
442
442
|
// when first button is not saved, add button is disabled with tooltip
|
|
443
443
|
// eslint-disable-next-line no-unused-expressions
|
|
444
444
|
ctaData.length < 2 &&
|
|
445
|
-
|
|
445
|
+
!isEditFlow &&
|
|
446
446
|
renderArray.push(
|
|
447
447
|
<CapRow>
|
|
448
448
|
<CapTooltip
|
|
@@ -388,6 +388,11 @@ export class Creatives extends React.Component {
|
|
|
388
388
|
}
|
|
389
389
|
return btn;
|
|
390
390
|
});
|
|
391
|
+
for (const key in varMapped) {
|
|
392
|
+
if (key.includes('_unsubscribe')) {
|
|
393
|
+
delete varMapped[key];
|
|
394
|
+
}
|
|
395
|
+
}
|
|
391
396
|
const unsubscribeRegex = /Click {{unsubscribe}} to unsubscribe/g;
|
|
392
397
|
creativesTemplateData = {
|
|
393
398
|
type: constants.WHATSAPP,
|
|
@@ -597,6 +602,7 @@ export class Creatives extends React.Component {
|
|
|
597
602
|
buttons = [],
|
|
598
603
|
imageUrl = '',
|
|
599
604
|
} = cloneDeep(versions.base.content.whatsapp);
|
|
605
|
+
|
|
600
606
|
const modifiedButtons = cloneDeep(buttons).map((btn) => {
|
|
601
607
|
if (btn.type === 'PHONE_NUMBER') {
|
|
602
608
|
btn.phoneNumber = btn.phone_number;
|
|
@@ -607,6 +613,19 @@ export class Creatives extends React.Component {
|
|
|
607
613
|
}
|
|
608
614
|
return btn;
|
|
609
615
|
});
|
|
616
|
+
|
|
617
|
+
//to send {{unsubscribe}} to backend inside varMapped
|
|
618
|
+
const unsubscribeRegex = /Click {{unsubscribe}} to unsubscribe/g;
|
|
619
|
+
if (
|
|
620
|
+
languages[0].content?.match(unsubscribeRegex)?.length > 0 &&
|
|
621
|
+
Object.keys(varMapped)?.every(
|
|
622
|
+
(key) => !key?.includes("_unsubscribe")
|
|
623
|
+
)
|
|
624
|
+
) {
|
|
625
|
+
varMapped[`{{${Object.keys(varMapped).length + 1}}}_unsubscribe`] =
|
|
626
|
+
"{{unsubscribe}}";
|
|
627
|
+
}
|
|
628
|
+
|
|
610
629
|
templateData = {
|
|
611
630
|
channel,
|
|
612
631
|
accountId,
|
|
@@ -59996,16 +59996,16 @@ T&C'
|
|
|
59996
59996
|
<CapColumn
|
|
59997
59997
|
align="left"
|
|
59998
59998
|
key=".2"
|
|
59999
|
-
span={
|
|
59999
|
+
span={11}
|
|
60000
60000
|
>
|
|
60001
60001
|
<Col
|
|
60002
60002
|
align="left"
|
|
60003
60003
|
className="cap-column-v2"
|
|
60004
|
-
span={
|
|
60004
|
+
span={11}
|
|
60005
60005
|
>
|
|
60006
60006
|
<div
|
|
60007
60007
|
align="left"
|
|
60008
|
-
className="ant-col ant-col-
|
|
60008
|
+
className="ant-col ant-col-11 cap-column-v2"
|
|
60009
60009
|
>
|
|
60010
60010
|
<CapLabel
|
|
60011
60011
|
className="phone"
|
|
@@ -60738,7 +60738,7 @@ T&C'
|
|
|
60738
60738
|
key="trigger"
|
|
60739
60739
|
onMouseEnter={[Function]}
|
|
60740
60740
|
onMouseLeave={[Function]}
|
|
60741
|
-
span={
|
|
60741
|
+
span={8}
|
|
60742
60742
|
style={
|
|
60743
60743
|
Object {
|
|
60744
60744
|
"marginRight": "0px",
|
|
@@ -60749,7 +60749,7 @@ T&C'
|
|
|
60749
60749
|
className="cap-column-v2"
|
|
60750
60750
|
onMouseEnter={[Function]}
|
|
60751
60751
|
onMouseLeave={[Function]}
|
|
60752
|
-
span={
|
|
60752
|
+
span={8}
|
|
60753
60753
|
style={
|
|
60754
60754
|
Object {
|
|
60755
60755
|
"marginRight": "0px",
|
|
@@ -60757,7 +60757,7 @@ T&C'
|
|
|
60757
60757
|
}
|
|
60758
60758
|
>
|
|
60759
60759
|
<div
|
|
60760
|
-
className="ant-col ant-col-
|
|
60760
|
+
className="ant-col ant-col-8 cap-column-v2"
|
|
60761
60761
|
onMouseEnter={[Function]}
|
|
60762
60762
|
onMouseLeave={[Function]}
|
|
60763
60763
|
style={
|
|
@@ -91819,16 +91819,16 @@ T&C'
|
|
|
91819
91819
|
<CapColumn
|
|
91820
91820
|
align="left"
|
|
91821
91821
|
key=".2"
|
|
91822
|
-
span={
|
|
91822
|
+
span={11}
|
|
91823
91823
|
>
|
|
91824
91824
|
<Col
|
|
91825
91825
|
align="left"
|
|
91826
91826
|
className="cap-column-v2"
|
|
91827
|
-
span={
|
|
91827
|
+
span={11}
|
|
91828
91828
|
>
|
|
91829
91829
|
<div
|
|
91830
91830
|
align="left"
|
|
91831
|
-
className="ant-col ant-col-
|
|
91831
|
+
className="ant-col ant-col-11 cap-column-v2"
|
|
91832
91832
|
>
|
|
91833
91833
|
<CapLabel
|
|
91834
91834
|
className="phone"
|
|
@@ -92561,7 +92561,7 @@ T&C'
|
|
|
92561
92561
|
key="trigger"
|
|
92562
92562
|
onMouseEnter={[Function]}
|
|
92563
92563
|
onMouseLeave={[Function]}
|
|
92564
|
-
span={
|
|
92564
|
+
span={8}
|
|
92565
92565
|
style={
|
|
92566
92566
|
Object {
|
|
92567
92567
|
"marginRight": "0px",
|
|
@@ -92572,7 +92572,7 @@ T&C'
|
|
|
92572
92572
|
className="cap-column-v2"
|
|
92573
92573
|
onMouseEnter={[Function]}
|
|
92574
92574
|
onMouseLeave={[Function]}
|
|
92575
|
-
span={
|
|
92575
|
+
span={8}
|
|
92576
92576
|
style={
|
|
92577
92577
|
Object {
|
|
92578
92578
|
"marginRight": "0px",
|
|
@@ -92580,7 +92580,7 @@ T&C'
|
|
|
92580
92580
|
}
|
|
92581
92581
|
>
|
|
92582
92582
|
<div
|
|
92583
|
-
className="ant-col ant-col-
|
|
92583
|
+
className="ant-col ant-col-8 cap-column-v2"
|
|
92584
92584
|
onMouseEnter={[Function]}
|
|
92585
92585
|
onMouseLeave={[Function]}
|
|
92586
92586
|
style={
|
|
@@ -107606,16 +107606,16 @@ Click {{unsubscribe}} to unsubscribe",
|
|
|
107606
107606
|
<CapColumn
|
|
107607
107607
|
align="left"
|
|
107608
107608
|
key=".2"
|
|
107609
|
-
span={
|
|
107609
|
+
span={11}
|
|
107610
107610
|
>
|
|
107611
107611
|
<Col
|
|
107612
107612
|
align="left"
|
|
107613
107613
|
className="cap-column-v2"
|
|
107614
|
-
span={
|
|
107614
|
+
span={11}
|
|
107615
107615
|
>
|
|
107616
107616
|
<div
|
|
107617
107617
|
align="left"
|
|
107618
|
-
className="ant-col ant-col-
|
|
107618
|
+
className="ant-col ant-col-11 cap-column-v2"
|
|
107619
107619
|
>
|
|
107620
107620
|
<CapLabel
|
|
107621
107621
|
className="phone"
|
|
@@ -108348,7 +108348,7 @@ Click {{unsubscribe}} to unsubscribe",
|
|
|
108348
108348
|
key="trigger"
|
|
108349
108349
|
onMouseEnter={[Function]}
|
|
108350
108350
|
onMouseLeave={[Function]}
|
|
108351
|
-
span={
|
|
108351
|
+
span={8}
|
|
108352
108352
|
style={
|
|
108353
108353
|
Object {
|
|
108354
108354
|
"marginRight": "0px",
|
|
@@ -108359,7 +108359,7 @@ Click {{unsubscribe}} to unsubscribe",
|
|
|
108359
108359
|
className="cap-column-v2"
|
|
108360
108360
|
onMouseEnter={[Function]}
|
|
108361
108361
|
onMouseLeave={[Function]}
|
|
108362
|
-
span={
|
|
108362
|
+
span={8}
|
|
108363
108363
|
style={
|
|
108364
108364
|
Object {
|
|
108365
108365
|
"marginRight": "0px",
|
|
@@ -108367,7 +108367,7 @@ Click {{unsubscribe}} to unsubscribe",
|
|
|
108367
108367
|
}
|
|
108368
108368
|
>
|
|
108369
108369
|
<div
|
|
108370
|
-
className="ant-col ant-col-
|
|
108370
|
+
className="ant-col ant-col-8 cap-column-v2"
|
|
108371
108371
|
onMouseEnter={[Function]}
|
|
108372
108372
|
onMouseLeave={[Function]}
|
|
108373
108373
|
style={
|
|
@@ -118572,7 +118572,7 @@ exports[`Creatives Whatsapp test1/> should render edit mode in various cases 6`]
|
|
|
118572
118572
|
key="trigger"
|
|
118573
118573
|
onMouseEnter={[Function]}
|
|
118574
118574
|
onMouseLeave={[Function]}
|
|
118575
|
-
span={
|
|
118575
|
+
span={8}
|
|
118576
118576
|
style={
|
|
118577
118577
|
Object {
|
|
118578
118578
|
"marginRight": "0px",
|
|
@@ -118583,7 +118583,7 @@ exports[`Creatives Whatsapp test1/> should render edit mode in various cases 6`]
|
|
|
118583
118583
|
className="cap-column-v2"
|
|
118584
118584
|
onMouseEnter={[Function]}
|
|
118585
118585
|
onMouseLeave={[Function]}
|
|
118586
|
-
span={
|
|
118586
|
+
span={8}
|
|
118587
118587
|
style={
|
|
118588
118588
|
Object {
|
|
118589
118589
|
"marginRight": "0px",
|
|
@@ -118591,7 +118591,7 @@ exports[`Creatives Whatsapp test1/> should render edit mode in various cases 6`]
|
|
|
118591
118591
|
}
|
|
118592
118592
|
>
|
|
118593
118593
|
<div
|
|
118594
|
-
className="ant-col ant-col-
|
|
118594
|
+
className="ant-col ant-col-8 cap-column-v2"
|
|
118595
118595
|
onMouseEnter={[Function]}
|
|
118596
118596
|
onMouseLeave={[Function]}
|
|
118597
118597
|
style={
|
|
@@ -356952,7 +356952,7 @@ undefined",
|
|
|
356952
356952
|
key="trigger"
|
|
356953
356953
|
onMouseEnter={[Function]}
|
|
356954
356954
|
onMouseLeave={[Function]}
|
|
356955
|
-
span={
|
|
356955
|
+
span={8}
|
|
356956
356956
|
style={
|
|
356957
356957
|
Object {
|
|
356958
356958
|
"marginRight": "0px",
|
|
@@ -356963,7 +356963,7 @@ undefined",
|
|
|
356963
356963
|
className="cap-column-v2"
|
|
356964
356964
|
onMouseEnter={[Function]}
|
|
356965
356965
|
onMouseLeave={[Function]}
|
|
356966
|
-
span={
|
|
356966
|
+
span={8}
|
|
356967
356967
|
style={
|
|
356968
356968
|
Object {
|
|
356969
356969
|
"marginRight": "0px",
|
|
@@ -356971,7 +356971,7 @@ undefined",
|
|
|
356971
356971
|
}
|
|
356972
356972
|
>
|
|
356973
356973
|
<div
|
|
356974
|
-
className="ant-col ant-col-
|
|
356974
|
+
className="ant-col ant-col-8 cap-column-v2"
|
|
356975
356975
|
onMouseEnter={[Function]}
|
|
356976
356976
|
onMouseLeave={[Function]}
|
|
356977
356977
|
style={
|
|
@@ -378131,7 +378131,7 @@ undefined",
|
|
|
378131
378131
|
key="trigger"
|
|
378132
378132
|
onMouseEnter={[Function]}
|
|
378133
378133
|
onMouseLeave={[Function]}
|
|
378134
|
-
span={
|
|
378134
|
+
span={8}
|
|
378135
378135
|
style={
|
|
378136
378136
|
Object {
|
|
378137
378137
|
"marginRight": "0px",
|
|
@@ -378142,7 +378142,7 @@ undefined",
|
|
|
378142
378142
|
className="cap-column-v2"
|
|
378143
378143
|
onMouseEnter={[Function]}
|
|
378144
378144
|
onMouseLeave={[Function]}
|
|
378145
|
-
span={
|
|
378145
|
+
span={8}
|
|
378146
378146
|
style={
|
|
378147
378147
|
Object {
|
|
378148
378148
|
"marginRight": "0px",
|
|
@@ -378150,7 +378150,7 @@ undefined",
|
|
|
378150
378150
|
}
|
|
378151
378151
|
>
|
|
378152
378152
|
<div
|
|
378153
|
-
className="ant-col ant-col-
|
|
378153
|
+
className="ant-col ant-col-8 cap-column-v2"
|
|
378154
378154
|
onMouseEnter={[Function]}
|
|
378155
378155
|
onMouseLeave={[Function]}
|
|
378156
378156
|
style={
|
|
@@ -378433,16 +378433,16 @@ undefined",
|
|
|
378433
378433
|
<CapColumn
|
|
378434
378434
|
align="left"
|
|
378435
378435
|
key=".2"
|
|
378436
|
-
span={
|
|
378436
|
+
span={11}
|
|
378437
378437
|
>
|
|
378438
378438
|
<Col
|
|
378439
378439
|
align="left"
|
|
378440
378440
|
className="cap-column-v2"
|
|
378441
|
-
span={
|
|
378441
|
+
span={11}
|
|
378442
378442
|
>
|
|
378443
378443
|
<div
|
|
378444
378444
|
align="left"
|
|
378445
|
-
className="ant-col ant-col-
|
|
378445
|
+
className="ant-col ant-col-11 cap-column-v2"
|
|
378446
378446
|
>
|
|
378447
378447
|
<CapLabel
|
|
378448
378448
|
className="phone"
|