@capillarytech/creatives-library 7.14.7-alpha.0 → 7.14.8
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/assets/pdfIcon.svg +9 -0
- package/config/app.js +1 -0
- package/index.html +2 -0
- package/package.json +3 -3
- package/v2Components/CapDocumentUpload/index.js +211 -0
- package/v2Components/CapDocumentUpload/index.scss +63 -0
- package/v2Components/CapDocumentUpload/messages.js +38 -0
- package/v2Components/CapVideoUpload/constants.js +1 -0
- package/v2Components/CapVideoUpload/index.js +68 -38
- package/v2Components/CapVideoUpload/index.scss +10 -0
- package/v2Components/CapVideoUpload/messages.js +11 -3
- package/v2Components/TemplatePreview/_templatePreview.scss +6 -0
- package/v2Components/TemplatePreview/index.js +12 -0
- package/v2Containers/BeeEditor/index.js +6 -12
- package/v2Containers/CreativesContainer/index.js +0 -1
- package/v2Containers/Facebook/Advertisement/index.js +1 -1
- package/v2Containers/Templates/_templates.scss +16 -0
- package/v2Containers/Templates/index.js +2 -1
- package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +9 -0
- package/v2Containers/Whatsapp/constants.js +5 -0
- package/v2Containers/Whatsapp/index.js +127 -6
- package/v2Containers/Whatsapp/index.scss +17 -0
- package/v2Containers/Whatsapp/styles.scss +38 -0
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +64 -140
- package/v2Containers/Whatsapp/utils.js +47 -1
|
@@ -55586,24 +55586,12 @@ exports[`Creatives Whatsapp test1/> should render create mode for twilio/karix 2
|
|
|
55586
55586
|
"id": "creatives.containersV2.Whatsapp.mediaImage",
|
|
55587
55587
|
},
|
|
55588
55588
|
],
|
|
55589
|
-
Array [
|
|
55590
|
-
Object {
|
|
55591
|
-
"defaultMessage": "Not yet enabled. Coming soon!",
|
|
55592
|
-
"id": "creatives.containersV2.Whatsapp.disabledFeatureTooltip",
|
|
55593
|
-
},
|
|
55594
|
-
],
|
|
55595
55589
|
Array [
|
|
55596
55590
|
Object {
|
|
55597
55591
|
"defaultMessage": "Video",
|
|
55598
55592
|
"id": "creatives.containersV2.Whatsapp.mediaVideo",
|
|
55599
55593
|
},
|
|
55600
55594
|
],
|
|
55601
|
-
Array [
|
|
55602
|
-
Object {
|
|
55603
|
-
"defaultMessage": "Not yet enabled. Coming soon!",
|
|
55604
|
-
"id": "creatives.containersV2.Whatsapp.disabledFeatureTooltip",
|
|
55605
|
-
},
|
|
55606
|
-
],
|
|
55607
55595
|
Array [
|
|
55608
55596
|
Object {
|
|
55609
55597
|
"defaultMessage": "Document",
|
|
@@ -56393,14 +56381,6 @@ exports[`Creatives Whatsapp test1/> should render create mode for twilio/karix 2
|
|
|
56393
56381
|
"type": "return",
|
|
56394
56382
|
"value": undefined,
|
|
56395
56383
|
},
|
|
56396
|
-
Object {
|
|
56397
|
-
"type": "return",
|
|
56398
|
-
"value": undefined,
|
|
56399
|
-
},
|
|
56400
|
-
Object {
|
|
56401
|
-
"type": "return",
|
|
56402
|
-
"value": undefined,
|
|
56403
|
-
},
|
|
56404
56384
|
],
|
|
56405
56385
|
},
|
|
56406
56386
|
}
|
|
@@ -59383,13 +59363,17 @@ exports[`Creatives Whatsapp test1/> should render create mode for twilio/karix 2
|
|
|
59383
59363
|
"value": "IMAGE",
|
|
59384
59364
|
},
|
|
59385
59365
|
Object {
|
|
59386
|
-
"disabled":
|
|
59387
|
-
"label": <CapTooltip
|
|
59366
|
+
"disabled": false,
|
|
59367
|
+
"label": <CapTooltip
|
|
59368
|
+
title=""
|
|
59369
|
+
/>,
|
|
59388
59370
|
"value": "VIDEO",
|
|
59389
59371
|
},
|
|
59390
59372
|
Object {
|
|
59391
|
-
"disabled":
|
|
59392
|
-
"label": <CapTooltip
|
|
59373
|
+
"disabled": false,
|
|
59374
|
+
"label": <CapTooltip
|
|
59375
|
+
title=""
|
|
59376
|
+
/>,
|
|
59393
59377
|
"value": "DOCUMENT",
|
|
59394
59378
|
},
|
|
59395
59379
|
]
|
|
@@ -59415,13 +59399,17 @@ exports[`Creatives Whatsapp test1/> should render create mode for twilio/karix 2
|
|
|
59415
59399
|
"value": "IMAGE",
|
|
59416
59400
|
},
|
|
59417
59401
|
Object {
|
|
59418
|
-
"disabled":
|
|
59419
|
-
"label": <CapTooltip
|
|
59402
|
+
"disabled": false,
|
|
59403
|
+
"label": <CapTooltip
|
|
59404
|
+
title=""
|
|
59405
|
+
/>,
|
|
59420
59406
|
"value": "VIDEO",
|
|
59421
59407
|
},
|
|
59422
59408
|
Object {
|
|
59423
|
-
"disabled":
|
|
59424
|
-
"label": <CapTooltip
|
|
59409
|
+
"disabled": false,
|
|
59410
|
+
"label": <CapTooltip
|
|
59411
|
+
title=""
|
|
59412
|
+
/>,
|
|
59425
59413
|
"value": "DOCUMENT",
|
|
59426
59414
|
},
|
|
59427
59415
|
]
|
|
@@ -60065,20 +60053,18 @@ exports[`Creatives Whatsapp test1/> should render create mode for twilio/karix 2
|
|
|
60065
60053
|
</Radio>
|
|
60066
60054
|
<Radio
|
|
60067
60055
|
checked={false}
|
|
60068
|
-
disabled={true}
|
|
60069
60056
|
key="radio-group-value-options-VIDEO"
|
|
60070
60057
|
prefixCls="ant-radio"
|
|
60071
60058
|
type="radio"
|
|
60072
60059
|
value="VIDEO"
|
|
60073
60060
|
>
|
|
60074
60061
|
<label
|
|
60075
|
-
className="ant-radio-wrapper
|
|
60062
|
+
className="ant-radio-wrapper"
|
|
60076
60063
|
>
|
|
60077
60064
|
<Checkbox
|
|
60078
60065
|
checked={false}
|
|
60079
60066
|
className=""
|
|
60080
60067
|
defaultChecked={false}
|
|
60081
|
-
disabled={true}
|
|
60082
60068
|
onBlur={[Function]}
|
|
60083
60069
|
onChange={[Function]}
|
|
60084
60070
|
onFocus={[Function]}
|
|
@@ -60088,13 +60074,12 @@ exports[`Creatives Whatsapp test1/> should render create mode for twilio/karix 2
|
|
|
60088
60074
|
value="VIDEO"
|
|
60089
60075
|
>
|
|
60090
60076
|
<span
|
|
60091
|
-
className="ant-radio
|
|
60077
|
+
className="ant-radio"
|
|
60092
60078
|
style={Object {}}
|
|
60093
60079
|
>
|
|
60094
60080
|
<input
|
|
60095
60081
|
checked={false}
|
|
60096
60082
|
className="ant-radio-input"
|
|
60097
|
-
disabled={true}
|
|
60098
60083
|
onBlur={[Function]}
|
|
60099
60084
|
onChange={[Function]}
|
|
60100
60085
|
onFocus={[Function]}
|
|
@@ -60107,7 +60092,9 @@ exports[`Creatives Whatsapp test1/> should render create mode for twilio/karix 2
|
|
|
60107
60092
|
</span>
|
|
60108
60093
|
</Checkbox>
|
|
60109
60094
|
<span>
|
|
60110
|
-
<CapTooltip
|
|
60095
|
+
<CapTooltip
|
|
60096
|
+
title=""
|
|
60097
|
+
>
|
|
60111
60098
|
<Tooltip
|
|
60112
60099
|
arrowPointAtCenter={false}
|
|
60113
60100
|
autoAdjustOverflow={true}
|
|
@@ -60115,6 +60102,7 @@ exports[`Creatives Whatsapp test1/> should render create mode for twilio/karix 2
|
|
|
60115
60102
|
mouseLeaveDelay={0.1}
|
|
60116
60103
|
overlayClassName="cap-tooltip-overlay-v2"
|
|
60117
60104
|
placement="top"
|
|
60105
|
+
title=""
|
|
60118
60106
|
transitionName="zoom-big-fast"
|
|
60119
60107
|
>
|
|
60120
60108
|
<Tooltip
|
|
@@ -60363,6 +60351,7 @@ exports[`Creatives Whatsapp test1/> should render create mode for twilio/karix 2
|
|
|
60363
60351
|
overlayClassName="cap-tooltip-overlay-v2"
|
|
60364
60352
|
placement="top"
|
|
60365
60353
|
prefixCls="ant-tooltip"
|
|
60354
|
+
title=""
|
|
60366
60355
|
transitionName="zoom-big-fast"
|
|
60367
60356
|
trigger={
|
|
60368
60357
|
Array [
|
|
@@ -60636,6 +60625,7 @@ exports[`Creatives Whatsapp test1/> should render create mode for twilio/karix 2
|
|
|
60636
60625
|
popupVisible={false}
|
|
60637
60626
|
prefixCls="ant-tooltip"
|
|
60638
60627
|
showAction={Array []}
|
|
60628
|
+
title=""
|
|
60639
60629
|
visible={false}
|
|
60640
60630
|
>
|
|
60641
60631
|
<span
|
|
@@ -60652,20 +60642,18 @@ exports[`Creatives Whatsapp test1/> should render create mode for twilio/karix 2
|
|
|
60652
60642
|
</Radio>
|
|
60653
60643
|
<Radio
|
|
60654
60644
|
checked={false}
|
|
60655
|
-
disabled={true}
|
|
60656
60645
|
key="radio-group-value-options-DOCUMENT"
|
|
60657
60646
|
prefixCls="ant-radio"
|
|
60658
60647
|
type="radio"
|
|
60659
60648
|
value="DOCUMENT"
|
|
60660
60649
|
>
|
|
60661
60650
|
<label
|
|
60662
|
-
className="ant-radio-wrapper
|
|
60651
|
+
className="ant-radio-wrapper"
|
|
60663
60652
|
>
|
|
60664
60653
|
<Checkbox
|
|
60665
60654
|
checked={false}
|
|
60666
60655
|
className=""
|
|
60667
60656
|
defaultChecked={false}
|
|
60668
|
-
disabled={true}
|
|
60669
60657
|
onBlur={[Function]}
|
|
60670
60658
|
onChange={[Function]}
|
|
60671
60659
|
onFocus={[Function]}
|
|
@@ -60675,13 +60663,12 @@ exports[`Creatives Whatsapp test1/> should render create mode for twilio/karix 2
|
|
|
60675
60663
|
value="DOCUMENT"
|
|
60676
60664
|
>
|
|
60677
60665
|
<span
|
|
60678
|
-
className="ant-radio
|
|
60666
|
+
className="ant-radio"
|
|
60679
60667
|
style={Object {}}
|
|
60680
60668
|
>
|
|
60681
60669
|
<input
|
|
60682
60670
|
checked={false}
|
|
60683
60671
|
className="ant-radio-input"
|
|
60684
|
-
disabled={true}
|
|
60685
60672
|
onBlur={[Function]}
|
|
60686
60673
|
onChange={[Function]}
|
|
60687
60674
|
onFocus={[Function]}
|
|
@@ -60694,7 +60681,9 @@ exports[`Creatives Whatsapp test1/> should render create mode for twilio/karix 2
|
|
|
60694
60681
|
</span>
|
|
60695
60682
|
</Checkbox>
|
|
60696
60683
|
<span>
|
|
60697
|
-
<CapTooltip
|
|
60684
|
+
<CapTooltip
|
|
60685
|
+
title=""
|
|
60686
|
+
>
|
|
60698
60687
|
<Tooltip
|
|
60699
60688
|
arrowPointAtCenter={false}
|
|
60700
60689
|
autoAdjustOverflow={true}
|
|
@@ -60702,6 +60691,7 @@ exports[`Creatives Whatsapp test1/> should render create mode for twilio/karix 2
|
|
|
60702
60691
|
mouseLeaveDelay={0.1}
|
|
60703
60692
|
overlayClassName="cap-tooltip-overlay-v2"
|
|
60704
60693
|
placement="top"
|
|
60694
|
+
title=""
|
|
60705
60695
|
transitionName="zoom-big-fast"
|
|
60706
60696
|
>
|
|
60707
60697
|
<Tooltip
|
|
@@ -60950,6 +60940,7 @@ exports[`Creatives Whatsapp test1/> should render create mode for twilio/karix 2
|
|
|
60950
60940
|
overlayClassName="cap-tooltip-overlay-v2"
|
|
60951
60941
|
placement="top"
|
|
60952
60942
|
prefixCls="ant-tooltip"
|
|
60943
|
+
title=""
|
|
60953
60944
|
transitionName="zoom-big-fast"
|
|
60954
60945
|
trigger={
|
|
60955
60946
|
Array [
|
|
@@ -61223,6 +61214,7 @@ exports[`Creatives Whatsapp test1/> should render create mode for twilio/karix 2
|
|
|
61223
61214
|
popupVisible={false}
|
|
61224
61215
|
prefixCls="ant-tooltip"
|
|
61225
61216
|
showAction={Array []}
|
|
61217
|
+
title=""
|
|
61226
61218
|
visible={false}
|
|
61227
61219
|
>
|
|
61228
61220
|
<span
|
|
@@ -69141,24 +69133,12 @@ exports[`Creatives Whatsapp test1/> should render create mode for twilio/karix 3
|
|
|
69141
69133
|
"id": "creatives.containersV2.Whatsapp.mediaImage",
|
|
69142
69134
|
},
|
|
69143
69135
|
],
|
|
69144
|
-
Array [
|
|
69145
|
-
Object {
|
|
69146
|
-
"defaultMessage": "Not yet enabled. Coming soon!",
|
|
69147
|
-
"id": "creatives.containersV2.Whatsapp.disabledFeatureTooltip",
|
|
69148
|
-
},
|
|
69149
|
-
],
|
|
69150
69136
|
Array [
|
|
69151
69137
|
Object {
|
|
69152
69138
|
"defaultMessage": "Video",
|
|
69153
69139
|
"id": "creatives.containersV2.Whatsapp.mediaVideo",
|
|
69154
69140
|
},
|
|
69155
69141
|
],
|
|
69156
|
-
Array [
|
|
69157
|
-
Object {
|
|
69158
|
-
"defaultMessage": "Not yet enabled. Coming soon!",
|
|
69159
|
-
"id": "creatives.containersV2.Whatsapp.disabledFeatureTooltip",
|
|
69160
|
-
},
|
|
69161
|
-
],
|
|
69162
69142
|
Array [
|
|
69163
69143
|
Object {
|
|
69164
69144
|
"defaultMessage": "Document",
|
|
@@ -70339,14 +70319,6 @@ exports[`Creatives Whatsapp test1/> should render create mode for twilio/karix 3
|
|
|
70339
70319
|
"type": "return",
|
|
70340
70320
|
"value": undefined,
|
|
70341
70321
|
},
|
|
70342
|
-
Object {
|
|
70343
|
-
"type": "return",
|
|
70344
|
-
"value": undefined,
|
|
70345
|
-
},
|
|
70346
|
-
Object {
|
|
70347
|
-
"type": "return",
|
|
70348
|
-
"value": undefined,
|
|
70349
|
-
},
|
|
70350
70322
|
],
|
|
70351
70323
|
},
|
|
70352
70324
|
}
|
|
@@ -83217,24 +83189,12 @@ exports[`Creatives Whatsapp test1/> should render create mode for twilio/karix 4
|
|
|
83217
83189
|
"id": "creatives.containersV2.Whatsapp.mediaImage",
|
|
83218
83190
|
},
|
|
83219
83191
|
],
|
|
83220
|
-
Array [
|
|
83221
|
-
Object {
|
|
83222
|
-
"defaultMessage": "Not yet enabled. Coming soon!",
|
|
83223
|
-
"id": "creatives.containersV2.Whatsapp.disabledFeatureTooltip",
|
|
83224
|
-
},
|
|
83225
|
-
],
|
|
83226
83192
|
Array [
|
|
83227
83193
|
Object {
|
|
83228
83194
|
"defaultMessage": "Video",
|
|
83229
83195
|
"id": "creatives.containersV2.Whatsapp.mediaVideo",
|
|
83230
83196
|
},
|
|
83231
83197
|
],
|
|
83232
|
-
Array [
|
|
83233
|
-
Object {
|
|
83234
|
-
"defaultMessage": "Not yet enabled. Coming soon!",
|
|
83235
|
-
"id": "creatives.containersV2.Whatsapp.disabledFeatureTooltip",
|
|
83236
|
-
},
|
|
83237
|
-
],
|
|
83238
83198
|
Array [
|
|
83239
83199
|
Object {
|
|
83240
83200
|
"defaultMessage": "Document",
|
|
@@ -84806,14 +84766,6 @@ exports[`Creatives Whatsapp test1/> should render create mode for twilio/karix 4
|
|
|
84806
84766
|
"type": "return",
|
|
84807
84767
|
"value": undefined,
|
|
84808
84768
|
},
|
|
84809
|
-
Object {
|
|
84810
|
-
"type": "return",
|
|
84811
|
-
"value": undefined,
|
|
84812
|
-
},
|
|
84813
|
-
Object {
|
|
84814
|
-
"type": "return",
|
|
84815
|
-
"value": undefined,
|
|
84816
|
-
},
|
|
84817
84769
|
],
|
|
84818
84770
|
},
|
|
84819
84771
|
}
|
|
@@ -180266,24 +180218,12 @@ exports[`Creatives Whatsapp test1/> template category change 2`] = `
|
|
|
180266
180218
|
"id": "creatives.containersV2.Whatsapp.mediaImage",
|
|
180267
180219
|
},
|
|
180268
180220
|
],
|
|
180269
|
-
Array [
|
|
180270
|
-
Object {
|
|
180271
|
-
"defaultMessage": "Not yet enabled. Coming soon!",
|
|
180272
|
-
"id": "creatives.containersV2.Whatsapp.disabledFeatureTooltip",
|
|
180273
|
-
},
|
|
180274
|
-
],
|
|
180275
180221
|
Array [
|
|
180276
180222
|
Object {
|
|
180277
180223
|
"defaultMessage": "Video",
|
|
180278
180224
|
"id": "creatives.containersV2.Whatsapp.mediaVideo",
|
|
180279
180225
|
},
|
|
180280
180226
|
],
|
|
180281
|
-
Array [
|
|
180282
|
-
Object {
|
|
180283
|
-
"defaultMessage": "Not yet enabled. Coming soon!",
|
|
180284
|
-
"id": "creatives.containersV2.Whatsapp.disabledFeatureTooltip",
|
|
180285
|
-
},
|
|
180286
|
-
],
|
|
180287
180227
|
Array [
|
|
180288
180228
|
Object {
|
|
180289
180229
|
"defaultMessage": "Document",
|
|
@@ -180499,24 +180439,12 @@ exports[`Creatives Whatsapp test1/> template category change 2`] = `
|
|
|
180499
180439
|
"id": "creatives.containersV2.Whatsapp.mediaImage",
|
|
180500
180440
|
},
|
|
180501
180441
|
],
|
|
180502
|
-
Array [
|
|
180503
|
-
Object {
|
|
180504
|
-
"defaultMessage": "Not yet enabled. Coming soon!",
|
|
180505
|
-
"id": "creatives.containersV2.Whatsapp.disabledFeatureTooltip",
|
|
180506
|
-
},
|
|
180507
|
-
],
|
|
180508
180442
|
Array [
|
|
180509
180443
|
Object {
|
|
180510
180444
|
"defaultMessage": "Video",
|
|
180511
180445
|
"id": "creatives.containersV2.Whatsapp.mediaVideo",
|
|
180512
180446
|
},
|
|
180513
180447
|
],
|
|
180514
|
-
Array [
|
|
180515
|
-
Object {
|
|
180516
|
-
"defaultMessage": "Not yet enabled. Coming soon!",
|
|
180517
|
-
"id": "creatives.containersV2.Whatsapp.disabledFeatureTooltip",
|
|
180518
|
-
},
|
|
180519
|
-
],
|
|
180520
180448
|
Array [
|
|
180521
180449
|
Object {
|
|
180522
180450
|
"defaultMessage": "Document",
|
|
@@ -181598,22 +181526,6 @@ exports[`Creatives Whatsapp test1/> template category change 2`] = `
|
|
|
181598
181526
|
"type": "return",
|
|
181599
181527
|
"value": undefined,
|
|
181600
181528
|
},
|
|
181601
|
-
Object {
|
|
181602
|
-
"type": "return",
|
|
181603
|
-
"value": undefined,
|
|
181604
|
-
},
|
|
181605
|
-
Object {
|
|
181606
|
-
"type": "return",
|
|
181607
|
-
"value": undefined,
|
|
181608
|
-
},
|
|
181609
|
-
Object {
|
|
181610
|
-
"type": "return",
|
|
181611
|
-
"value": undefined,
|
|
181612
|
-
},
|
|
181613
|
-
Object {
|
|
181614
|
-
"type": "return",
|
|
181615
|
-
"value": undefined,
|
|
181616
|
-
},
|
|
181617
181529
|
],
|
|
181618
181530
|
},
|
|
181619
181531
|
}
|
|
@@ -184596,13 +184508,17 @@ exports[`Creatives Whatsapp test1/> template category change 2`] = `
|
|
|
184596
184508
|
"value": "IMAGE",
|
|
184597
184509
|
},
|
|
184598
184510
|
Object {
|
|
184599
|
-
"disabled":
|
|
184600
|
-
"label": <CapTooltip
|
|
184511
|
+
"disabled": false,
|
|
184512
|
+
"label": <CapTooltip
|
|
184513
|
+
title=""
|
|
184514
|
+
/>,
|
|
184601
184515
|
"value": "VIDEO",
|
|
184602
184516
|
},
|
|
184603
184517
|
Object {
|
|
184604
|
-
"disabled":
|
|
184605
|
-
"label": <CapTooltip
|
|
184518
|
+
"disabled": false,
|
|
184519
|
+
"label": <CapTooltip
|
|
184520
|
+
title=""
|
|
184521
|
+
/>,
|
|
184606
184522
|
"value": "DOCUMENT",
|
|
184607
184523
|
},
|
|
184608
184524
|
]
|
|
@@ -184628,13 +184544,17 @@ exports[`Creatives Whatsapp test1/> template category change 2`] = `
|
|
|
184628
184544
|
"value": "IMAGE",
|
|
184629
184545
|
},
|
|
184630
184546
|
Object {
|
|
184631
|
-
"disabled":
|
|
184632
|
-
"label": <CapTooltip
|
|
184547
|
+
"disabled": false,
|
|
184548
|
+
"label": <CapTooltip
|
|
184549
|
+
title=""
|
|
184550
|
+
/>,
|
|
184633
184551
|
"value": "VIDEO",
|
|
184634
184552
|
},
|
|
184635
184553
|
Object {
|
|
184636
|
-
"disabled":
|
|
184637
|
-
"label": <CapTooltip
|
|
184554
|
+
"disabled": false,
|
|
184555
|
+
"label": <CapTooltip
|
|
184556
|
+
title=""
|
|
184557
|
+
/>,
|
|
184638
184558
|
"value": "DOCUMENT",
|
|
184639
184559
|
},
|
|
184640
184560
|
]
|
|
@@ -185278,20 +185198,18 @@ exports[`Creatives Whatsapp test1/> template category change 2`] = `
|
|
|
185278
185198
|
</Radio>
|
|
185279
185199
|
<Radio
|
|
185280
185200
|
checked={false}
|
|
185281
|
-
disabled={true}
|
|
185282
185201
|
key="radio-group-value-options-VIDEO"
|
|
185283
185202
|
prefixCls="ant-radio"
|
|
185284
185203
|
type="radio"
|
|
185285
185204
|
value="VIDEO"
|
|
185286
185205
|
>
|
|
185287
185206
|
<label
|
|
185288
|
-
className="ant-radio-wrapper
|
|
185207
|
+
className="ant-radio-wrapper"
|
|
185289
185208
|
>
|
|
185290
185209
|
<Checkbox
|
|
185291
185210
|
checked={false}
|
|
185292
185211
|
className=""
|
|
185293
185212
|
defaultChecked={false}
|
|
185294
|
-
disabled={true}
|
|
185295
185213
|
onBlur={[Function]}
|
|
185296
185214
|
onChange={[Function]}
|
|
185297
185215
|
onFocus={[Function]}
|
|
@@ -185301,13 +185219,12 @@ exports[`Creatives Whatsapp test1/> template category change 2`] = `
|
|
|
185301
185219
|
value="VIDEO"
|
|
185302
185220
|
>
|
|
185303
185221
|
<span
|
|
185304
|
-
className="ant-radio
|
|
185222
|
+
className="ant-radio"
|
|
185305
185223
|
style={Object {}}
|
|
185306
185224
|
>
|
|
185307
185225
|
<input
|
|
185308
185226
|
checked={false}
|
|
185309
185227
|
className="ant-radio-input"
|
|
185310
|
-
disabled={true}
|
|
185311
185228
|
onBlur={[Function]}
|
|
185312
185229
|
onChange={[Function]}
|
|
185313
185230
|
onFocus={[Function]}
|
|
@@ -185320,7 +185237,9 @@ exports[`Creatives Whatsapp test1/> template category change 2`] = `
|
|
|
185320
185237
|
</span>
|
|
185321
185238
|
</Checkbox>
|
|
185322
185239
|
<span>
|
|
185323
|
-
<CapTooltip
|
|
185240
|
+
<CapTooltip
|
|
185241
|
+
title=""
|
|
185242
|
+
>
|
|
185324
185243
|
<Tooltip
|
|
185325
185244
|
arrowPointAtCenter={false}
|
|
185326
185245
|
autoAdjustOverflow={true}
|
|
@@ -185328,6 +185247,7 @@ exports[`Creatives Whatsapp test1/> template category change 2`] = `
|
|
|
185328
185247
|
mouseLeaveDelay={0.1}
|
|
185329
185248
|
overlayClassName="cap-tooltip-overlay-v2"
|
|
185330
185249
|
placement="top"
|
|
185250
|
+
title=""
|
|
185331
185251
|
transitionName="zoom-big-fast"
|
|
185332
185252
|
>
|
|
185333
185253
|
<Tooltip
|
|
@@ -185576,6 +185496,7 @@ exports[`Creatives Whatsapp test1/> template category change 2`] = `
|
|
|
185576
185496
|
overlayClassName="cap-tooltip-overlay-v2"
|
|
185577
185497
|
placement="top"
|
|
185578
185498
|
prefixCls="ant-tooltip"
|
|
185499
|
+
title=""
|
|
185579
185500
|
transitionName="zoom-big-fast"
|
|
185580
185501
|
trigger={
|
|
185581
185502
|
Array [
|
|
@@ -185849,6 +185770,7 @@ exports[`Creatives Whatsapp test1/> template category change 2`] = `
|
|
|
185849
185770
|
popupVisible={false}
|
|
185850
185771
|
prefixCls="ant-tooltip"
|
|
185851
185772
|
showAction={Array []}
|
|
185773
|
+
title=""
|
|
185852
185774
|
visible={false}
|
|
185853
185775
|
>
|
|
185854
185776
|
<span
|
|
@@ -185865,20 +185787,18 @@ exports[`Creatives Whatsapp test1/> template category change 2`] = `
|
|
|
185865
185787
|
</Radio>
|
|
185866
185788
|
<Radio
|
|
185867
185789
|
checked={false}
|
|
185868
|
-
disabled={true}
|
|
185869
185790
|
key="radio-group-value-options-DOCUMENT"
|
|
185870
185791
|
prefixCls="ant-radio"
|
|
185871
185792
|
type="radio"
|
|
185872
185793
|
value="DOCUMENT"
|
|
185873
185794
|
>
|
|
185874
185795
|
<label
|
|
185875
|
-
className="ant-radio-wrapper
|
|
185796
|
+
className="ant-radio-wrapper"
|
|
185876
185797
|
>
|
|
185877
185798
|
<Checkbox
|
|
185878
185799
|
checked={false}
|
|
185879
185800
|
className=""
|
|
185880
185801
|
defaultChecked={false}
|
|
185881
|
-
disabled={true}
|
|
185882
185802
|
onBlur={[Function]}
|
|
185883
185803
|
onChange={[Function]}
|
|
185884
185804
|
onFocus={[Function]}
|
|
@@ -185888,13 +185808,12 @@ exports[`Creatives Whatsapp test1/> template category change 2`] = `
|
|
|
185888
185808
|
value="DOCUMENT"
|
|
185889
185809
|
>
|
|
185890
185810
|
<span
|
|
185891
|
-
className="ant-radio
|
|
185811
|
+
className="ant-radio"
|
|
185892
185812
|
style={Object {}}
|
|
185893
185813
|
>
|
|
185894
185814
|
<input
|
|
185895
185815
|
checked={false}
|
|
185896
185816
|
className="ant-radio-input"
|
|
185897
|
-
disabled={true}
|
|
185898
185817
|
onBlur={[Function]}
|
|
185899
185818
|
onChange={[Function]}
|
|
185900
185819
|
onFocus={[Function]}
|
|
@@ -185907,7 +185826,9 @@ exports[`Creatives Whatsapp test1/> template category change 2`] = `
|
|
|
185907
185826
|
</span>
|
|
185908
185827
|
</Checkbox>
|
|
185909
185828
|
<span>
|
|
185910
|
-
<CapTooltip
|
|
185829
|
+
<CapTooltip
|
|
185830
|
+
title=""
|
|
185831
|
+
>
|
|
185911
185832
|
<Tooltip
|
|
185912
185833
|
arrowPointAtCenter={false}
|
|
185913
185834
|
autoAdjustOverflow={true}
|
|
@@ -185915,6 +185836,7 @@ exports[`Creatives Whatsapp test1/> template category change 2`] = `
|
|
|
185915
185836
|
mouseLeaveDelay={0.1}
|
|
185916
185837
|
overlayClassName="cap-tooltip-overlay-v2"
|
|
185917
185838
|
placement="top"
|
|
185839
|
+
title=""
|
|
185918
185840
|
transitionName="zoom-big-fast"
|
|
185919
185841
|
>
|
|
185920
185842
|
<Tooltip
|
|
@@ -186163,6 +186085,7 @@ exports[`Creatives Whatsapp test1/> template category change 2`] = `
|
|
|
186163
186085
|
overlayClassName="cap-tooltip-overlay-v2"
|
|
186164
186086
|
placement="top"
|
|
186165
186087
|
prefixCls="ant-tooltip"
|
|
186088
|
+
title=""
|
|
186166
186089
|
transitionName="zoom-big-fast"
|
|
186167
186090
|
trigger={
|
|
186168
186091
|
Array [
|
|
@@ -186436,6 +186359,7 @@ exports[`Creatives Whatsapp test1/> template category change 2`] = `
|
|
|
186436
186359
|
popupVisible={false}
|
|
186437
186360
|
prefixCls="ant-tooltip"
|
|
186438
186361
|
showAction={Array []}
|
|
186362
|
+
title=""
|
|
186439
186363
|
visible={false}
|
|
186440
186364
|
>
|
|
186441
186365
|
<span
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import CapLabel from '@capillarytech/cap-ui-library/CapLabel';
|
|
3
3
|
import CapIcon from '@capillarytech/cap-ui-library/CapIcon';
|
|
4
|
+
import CapImage from '@capillarytech/cap-ui-library/CapImage';
|
|
4
5
|
import { get } from 'lodash';
|
|
5
6
|
import { WHATSAPP } from '../CreativesContainer/constants';
|
|
6
7
|
import {
|
|
@@ -13,7 +14,44 @@ import {
|
|
|
13
14
|
CTA,
|
|
14
15
|
WHATSAPP_MEDIA_TYPES,
|
|
15
16
|
HOST_KARIX,
|
|
17
|
+
SIZE_UNITS,
|
|
16
18
|
} from '../Whatsapp/constants';
|
|
19
|
+
import './styles.scss';
|
|
20
|
+
import pdfIcon from "../../assets/pdfIcon.svg";
|
|
21
|
+
|
|
22
|
+
function bytesConversion(x) {
|
|
23
|
+
let l;
|
|
24
|
+
l = 0;
|
|
25
|
+
let n;
|
|
26
|
+
n = parseInt(x, 10) || 0;
|
|
27
|
+
// eslint-disable-next-line no-plusplus
|
|
28
|
+
while (n >= 1024 && ++l) {
|
|
29
|
+
n /= 1024;
|
|
30
|
+
}
|
|
31
|
+
return (`${n.toFixed(n < 10 && l > 0 ? 1 : 0)} ${SIZE_UNITS[l]}`);
|
|
32
|
+
}
|
|
33
|
+
export const getWhatsappDocPreview = (whatsappDocParams) =>
|
|
34
|
+
(
|
|
35
|
+
<>
|
|
36
|
+
<div className="pdf-img-box">
|
|
37
|
+
<CapImage src={whatsappDocParams?.whatsappDocImg} alt="upload-document-src" className="pdf-preview-img" />
|
|
38
|
+
</div>
|
|
39
|
+
<div className="pdf-label">
|
|
40
|
+
<CapImage src={pdfIcon} />
|
|
41
|
+
<div className="pdf-info">
|
|
42
|
+
<div className="pdf-name-div">
|
|
43
|
+
<CapLabel type="label9" className="pdf-name">{whatsappDocParams?.whatsappDocName?.slice(0, -13)}</CapLabel>
|
|
44
|
+
<CapLabel type="label9">{".pdf"}</CapLabel>
|
|
45
|
+
</div>
|
|
46
|
+
<CapLabel className="pdf-info-sec">
|
|
47
|
+
{
|
|
48
|
+
`${whatsappDocParams?.whatsappDocPages} ${whatsappDocParams?.whatsappDocPages > 1 ? "pages" : "page"} · ${bytesConversion(whatsappDocParams?.whatsappDocSize)} · PDF`
|
|
49
|
+
}
|
|
50
|
+
</CapLabel>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</>
|
|
54
|
+
);
|
|
17
55
|
|
|
18
56
|
export const getWhatsappContent = (template, isPreview) => {
|
|
19
57
|
const {
|
|
@@ -26,6 +64,8 @@ export const getWhatsappContent = (template, isPreview) => {
|
|
|
26
64
|
buttons: ctaData = [],
|
|
27
65
|
mediaType = WHATSAPP_MEDIA_TYPES.TEXT,
|
|
28
66
|
imageUrl = '',
|
|
67
|
+
videoPreviewImg = '',
|
|
68
|
+
whatsappDocParams = {},
|
|
29
69
|
} = {},
|
|
30
70
|
} = {},
|
|
31
71
|
} = {},
|
|
@@ -53,6 +93,12 @@ export const getWhatsappContent = (template, isPreview) => {
|
|
|
53
93
|
...(mediaType === WHATSAPP_MEDIA_TYPES.IMAGE && {
|
|
54
94
|
whatsappImageSrc: imageUrl,
|
|
55
95
|
}),
|
|
96
|
+
...(mediaType === WHATSAPP_MEDIA_TYPES.VIDEO && {
|
|
97
|
+
whatsappImageSrc: videoPreviewImg,
|
|
98
|
+
}),
|
|
99
|
+
...(mediaType === WHATSAPP_MEDIA_TYPES.DOCUMENT && {
|
|
100
|
+
docPreview: getWhatsappDocPreview(whatsappDocParams),
|
|
101
|
+
}),
|
|
56
102
|
};
|
|
57
103
|
};
|
|
58
104
|
|
|
@@ -94,7 +140,7 @@ export const getWhatsappCategory = (category, hostName) => {
|
|
|
94
140
|
|
|
95
141
|
export const getWhatsappStatus = (status) => {
|
|
96
142
|
if ([WHATSAPP_STATUSES.pending, WHATSAPP_STATUSES.unsubmitted].includes(status)) {
|
|
97
|
-
|
|
143
|
+
status = WHATSAPP_STATUSES.awaitingApproval;
|
|
98
144
|
}
|
|
99
145
|
return STATUS_OPTIONS.find((obj) => obj.value === status);
|
|
100
146
|
}
|