@capillarytech/creatives-library 9.0.36 → 9.0.37-alpha.1
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/AppRoot.js +124 -0
- package/app-config.js +61 -0
- package/app.js +10 -175
- package/bootstrap.js +185 -0
- package/entry.js +67 -1
- package/mfe-exposed-components.js +2 -4
- package/package.json +2 -2
- package/services/api.js +9 -1
- package/styles/containers/layout/_layoutPage.scss +8 -6
- package/utils/getDataLayer.js +15 -0
- package/utils/gtmTrackers/gtmEvents/creativeDetails.js +2 -1
- package/utils/mfeDetect.js +1 -0
- package/utils/mfeFirstPaintReady.js +29 -0
- package/utils/mfeHistory.js +62 -0
- package/utils/rcsPayloadUtils.js +5 -2
- package/utils/tests/rcsPayloadUtils.test.js +54 -2
- package/v2Components/CapActionButton/constants.js +1 -0
- package/v2Components/CapActionButton/index.js +77 -9
- package/v2Components/CapActionButton/index.scss +13 -0
- package/v2Components/CapActionButton/messages.js +13 -0
- package/v2Components/CapActionButton/tests/index.test.js +32 -1
- package/v2Components/CommonTestAndPreview/index.js +44 -15
- package/v2Components/CommonTestAndPreview/tests/index.test.js +78 -0
- package/v2Components/CommonTestAndPreview/utils.js +34 -0
- package/v2Components/NavigationBar/index.js +9 -7
- package/v2Components/NavigationBar/mfeModuleHeader.config.js +16 -0
- package/v2Components/NavigationBar/tests/index.test.js +39 -19
- package/v2Components/SmsFallback/index.js +6 -0
- package/v2Containers/Cap/constants.js +1 -0
- package/v2Containers/Cap/index.js +57 -27
- package/v2Containers/CreativesContainer/index.js +11 -8
- package/v2Containers/CreativesContainer/tests/index.test.js +53 -0
- package/v2Containers/Rcs/components/CarouselCard.js +5 -0
- package/v2Containers/Rcs/components/CarouselCardButtons.js +20 -0
- package/v2Containers/Rcs/index.js +154 -79
- package/v2Containers/Rcs/rcsLibraryHydrationUtils.js +55 -4
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +286 -0
- package/v2Containers/Rcs/tests/carouselUtils.test.js +13 -17
- package/v2Containers/Rcs/tests/index.test.js +141 -6
- package/v2Containers/Rcs/tests/rcsLibraryHydrationUtils.test.js +110 -0
- package/v2Containers/Rcs/tests/utils.test.js +36 -0
- package/v2Containers/Rcs/utils.js +16 -4
- package/v2Containers/SmsTrai/Edit/index.js +35 -24
- package/v2Containers/Templates/_templates.scss +1 -1
- package/v2Containers/Templates/index.js +1 -0
- package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +5 -0
- package/v2Containers/TemplatesV2/TemplatesV2.style.js +8 -3
- package/v2Containers/TemplatesV2/index.js +22 -9
|
@@ -6782,10 +6782,23 @@ new message content.",
|
|
|
6782
6782
|
buttonType="NONE"
|
|
6783
6783
|
deleteButtonHandler={[Function]}
|
|
6784
6784
|
host=""
|
|
6785
|
+
injectedTags={Object {}}
|
|
6785
6786
|
isEditFlow={false}
|
|
6786
6787
|
isFullMode={true}
|
|
6788
|
+
location={
|
|
6789
|
+
Object {
|
|
6790
|
+
"pathname": "/rcs/create",
|
|
6791
|
+
"query": Object {
|
|
6792
|
+
"module": "default",
|
|
6793
|
+
"type": false,
|
|
6794
|
+
},
|
|
6795
|
+
"search": "",
|
|
6796
|
+
}
|
|
6797
|
+
}
|
|
6787
6798
|
maxButtons={4}
|
|
6799
|
+
onContextChange={[Function]}
|
|
6788
6800
|
suggestions={Array []}
|
|
6801
|
+
tags={Array []}
|
|
6789
6802
|
updateButtonChange={[Function]}
|
|
6790
6803
|
>
|
|
6791
6804
|
<div
|
|
@@ -6793,10 +6806,23 @@ new message content.",
|
|
|
6793
6806
|
className="cap-action-button-mock"
|
|
6794
6807
|
deleteButtonHandler={[Function]}
|
|
6795
6808
|
host=""
|
|
6809
|
+
injectedTags={Object {}}
|
|
6796
6810
|
isEditFlow={false}
|
|
6797
6811
|
isFullMode={true}
|
|
6812
|
+
location={
|
|
6813
|
+
Object {
|
|
6814
|
+
"pathname": "/rcs/create",
|
|
6815
|
+
"query": Object {
|
|
6816
|
+
"module": "default",
|
|
6817
|
+
"type": false,
|
|
6818
|
+
},
|
|
6819
|
+
"search": "",
|
|
6820
|
+
}
|
|
6821
|
+
}
|
|
6798
6822
|
maxButtons={4}
|
|
6823
|
+
onContextChange={[Function]}
|
|
6799
6824
|
suggestions={Array []}
|
|
6825
|
+
tags={Array []}
|
|
6800
6826
|
updateButtonChange={[Function]}
|
|
6801
6827
|
>
|
|
6802
6828
|
CapActionButton
|
|
@@ -22673,10 +22699,23 @@ new message content.",
|
|
|
22673
22699
|
buttonType="NONE"
|
|
22674
22700
|
deleteButtonHandler={[Function]}
|
|
22675
22701
|
host=""
|
|
22702
|
+
injectedTags={Object {}}
|
|
22676
22703
|
isEditFlow={false}
|
|
22677
22704
|
isFullMode={true}
|
|
22705
|
+
location={
|
|
22706
|
+
Object {
|
|
22707
|
+
"pathname": "/rcs/create",
|
|
22708
|
+
"query": Object {
|
|
22709
|
+
"module": "default",
|
|
22710
|
+
"type": false,
|
|
22711
|
+
},
|
|
22712
|
+
"search": "",
|
|
22713
|
+
}
|
|
22714
|
+
}
|
|
22678
22715
|
maxButtons={4}
|
|
22716
|
+
onContextChange={[Function]}
|
|
22679
22717
|
suggestions={Array []}
|
|
22718
|
+
tags={Array []}
|
|
22680
22719
|
updateButtonChange={[Function]}
|
|
22681
22720
|
>
|
|
22682
22721
|
<div
|
|
@@ -22684,10 +22723,23 @@ new message content.",
|
|
|
22684
22723
|
className="cap-action-button-mock"
|
|
22685
22724
|
deleteButtonHandler={[Function]}
|
|
22686
22725
|
host=""
|
|
22726
|
+
injectedTags={Object {}}
|
|
22687
22727
|
isEditFlow={false}
|
|
22688
22728
|
isFullMode={true}
|
|
22729
|
+
location={
|
|
22730
|
+
Object {
|
|
22731
|
+
"pathname": "/rcs/create",
|
|
22732
|
+
"query": Object {
|
|
22733
|
+
"module": "default",
|
|
22734
|
+
"type": false,
|
|
22735
|
+
},
|
|
22736
|
+
"search": "",
|
|
22737
|
+
}
|
|
22738
|
+
}
|
|
22689
22739
|
maxButtons={4}
|
|
22740
|
+
onContextChange={[Function]}
|
|
22690
22741
|
suggestions={Array []}
|
|
22742
|
+
tags={Array []}
|
|
22691
22743
|
updateButtonChange={[Function]}
|
|
22692
22744
|
>
|
|
22693
22745
|
CapActionButton
|
|
@@ -38738,10 +38790,23 @@ new message content.",
|
|
|
38738
38790
|
buttonType="NONE"
|
|
38739
38791
|
deleteButtonHandler={[Function]}
|
|
38740
38792
|
host=""
|
|
38793
|
+
injectedTags={Object {}}
|
|
38741
38794
|
isEditFlow={false}
|
|
38742
38795
|
isFullMode={true}
|
|
38796
|
+
location={
|
|
38797
|
+
Object {
|
|
38798
|
+
"pathname": "/rcs/create",
|
|
38799
|
+
"query": Object {
|
|
38800
|
+
"module": "default",
|
|
38801
|
+
"type": false,
|
|
38802
|
+
},
|
|
38803
|
+
"search": "",
|
|
38804
|
+
}
|
|
38805
|
+
}
|
|
38743
38806
|
maxButtons={4}
|
|
38807
|
+
onContextChange={[Function]}
|
|
38744
38808
|
suggestions={Array []}
|
|
38809
|
+
tags={Array []}
|
|
38745
38810
|
updateButtonChange={[Function]}
|
|
38746
38811
|
>
|
|
38747
38812
|
<div
|
|
@@ -38749,10 +38814,23 @@ new message content.",
|
|
|
38749
38814
|
className="cap-action-button-mock"
|
|
38750
38815
|
deleteButtonHandler={[Function]}
|
|
38751
38816
|
host=""
|
|
38817
|
+
injectedTags={Object {}}
|
|
38752
38818
|
isEditFlow={false}
|
|
38753
38819
|
isFullMode={true}
|
|
38820
|
+
location={
|
|
38821
|
+
Object {
|
|
38822
|
+
"pathname": "/rcs/create",
|
|
38823
|
+
"query": Object {
|
|
38824
|
+
"module": "default",
|
|
38825
|
+
"type": false,
|
|
38826
|
+
},
|
|
38827
|
+
"search": "",
|
|
38828
|
+
}
|
|
38829
|
+
}
|
|
38754
38830
|
maxButtons={4}
|
|
38831
|
+
onContextChange={[Function]}
|
|
38755
38832
|
suggestions={Array []}
|
|
38833
|
+
tags={Array []}
|
|
38756
38834
|
updateButtonChange={[Function]}
|
|
38757
38835
|
>
|
|
38758
38836
|
CapActionButton
|
|
@@ -55393,10 +55471,23 @@ new message content.",
|
|
|
55393
55471
|
buttonType="NONE"
|
|
55394
55472
|
deleteButtonHandler={[Function]}
|
|
55395
55473
|
host=""
|
|
55474
|
+
injectedTags={Object {}}
|
|
55396
55475
|
isEditFlow={false}
|
|
55397
55476
|
isFullMode={true}
|
|
55477
|
+
location={
|
|
55478
|
+
Object {
|
|
55479
|
+
"pathname": "/rcs/create",
|
|
55480
|
+
"query": Object {
|
|
55481
|
+
"module": "default",
|
|
55482
|
+
"type": false,
|
|
55483
|
+
},
|
|
55484
|
+
"search": "",
|
|
55485
|
+
}
|
|
55486
|
+
}
|
|
55398
55487
|
maxButtons={4}
|
|
55488
|
+
onContextChange={[Function]}
|
|
55399
55489
|
suggestions={Array []}
|
|
55490
|
+
tags={Array []}
|
|
55400
55491
|
updateButtonChange={[Function]}
|
|
55401
55492
|
>
|
|
55402
55493
|
<div
|
|
@@ -55404,10 +55495,23 @@ new message content.",
|
|
|
55404
55495
|
className="cap-action-button-mock"
|
|
55405
55496
|
deleteButtonHandler={[Function]}
|
|
55406
55497
|
host=""
|
|
55498
|
+
injectedTags={Object {}}
|
|
55407
55499
|
isEditFlow={false}
|
|
55408
55500
|
isFullMode={true}
|
|
55501
|
+
location={
|
|
55502
|
+
Object {
|
|
55503
|
+
"pathname": "/rcs/create",
|
|
55504
|
+
"query": Object {
|
|
55505
|
+
"module": "default",
|
|
55506
|
+
"type": false,
|
|
55507
|
+
},
|
|
55508
|
+
"search": "",
|
|
55509
|
+
}
|
|
55510
|
+
}
|
|
55409
55511
|
maxButtons={4}
|
|
55512
|
+
onContextChange={[Function]}
|
|
55410
55513
|
suggestions={Array []}
|
|
55514
|
+
tags={Array []}
|
|
55411
55515
|
updateButtonChange={[Function]}
|
|
55412
55516
|
>
|
|
55413
55517
|
CapActionButton
|
|
@@ -72080,10 +72184,23 @@ new message content.",
|
|
|
72080
72184
|
buttonType="NONE"
|
|
72081
72185
|
deleteButtonHandler={[Function]}
|
|
72082
72186
|
host=""
|
|
72187
|
+
injectedTags={Object {}}
|
|
72083
72188
|
isEditFlow={false}
|
|
72084
72189
|
isFullMode={true}
|
|
72190
|
+
location={
|
|
72191
|
+
Object {
|
|
72192
|
+
"pathname": "/rcs/create",
|
|
72193
|
+
"query": Object {
|
|
72194
|
+
"module": "default",
|
|
72195
|
+
"type": false,
|
|
72196
|
+
},
|
|
72197
|
+
"search": "",
|
|
72198
|
+
}
|
|
72199
|
+
}
|
|
72085
72200
|
maxButtons={4}
|
|
72201
|
+
onContextChange={[Function]}
|
|
72086
72202
|
suggestions={Array []}
|
|
72203
|
+
tags={Array []}
|
|
72087
72204
|
updateButtonChange={[Function]}
|
|
72088
72205
|
>
|
|
72089
72206
|
<div
|
|
@@ -72091,10 +72208,23 @@ new message content.",
|
|
|
72091
72208
|
className="cap-action-button-mock"
|
|
72092
72209
|
deleteButtonHandler={[Function]}
|
|
72093
72210
|
host=""
|
|
72211
|
+
injectedTags={Object {}}
|
|
72094
72212
|
isEditFlow={false}
|
|
72095
72213
|
isFullMode={true}
|
|
72214
|
+
location={
|
|
72215
|
+
Object {
|
|
72216
|
+
"pathname": "/rcs/create",
|
|
72217
|
+
"query": Object {
|
|
72218
|
+
"module": "default",
|
|
72219
|
+
"type": false,
|
|
72220
|
+
},
|
|
72221
|
+
"search": "",
|
|
72222
|
+
}
|
|
72223
|
+
}
|
|
72096
72224
|
maxButtons={4}
|
|
72225
|
+
onContextChange={[Function]}
|
|
72097
72226
|
suggestions={Array []}
|
|
72227
|
+
tags={Array []}
|
|
72098
72228
|
updateButtonChange={[Function]}
|
|
72099
72229
|
>
|
|
72100
72230
|
CapActionButton
|
|
@@ -90173,10 +90303,23 @@ new message content.",
|
|
|
90173
90303
|
buttonType="NONE"
|
|
90174
90304
|
deleteButtonHandler={[Function]}
|
|
90175
90305
|
host=""
|
|
90306
|
+
injectedTags={Object {}}
|
|
90176
90307
|
isEditFlow={false}
|
|
90177
90308
|
isFullMode={true}
|
|
90309
|
+
location={
|
|
90310
|
+
Object {
|
|
90311
|
+
"pathname": "/rcs/create",
|
|
90312
|
+
"query": Object {
|
|
90313
|
+
"module": "default",
|
|
90314
|
+
"type": false,
|
|
90315
|
+
},
|
|
90316
|
+
"search": "",
|
|
90317
|
+
}
|
|
90318
|
+
}
|
|
90178
90319
|
maxButtons={4}
|
|
90320
|
+
onContextChange={[Function]}
|
|
90179
90321
|
suggestions={Array []}
|
|
90322
|
+
tags={Array []}
|
|
90180
90323
|
updateButtonChange={[Function]}
|
|
90181
90324
|
>
|
|
90182
90325
|
<div
|
|
@@ -90184,10 +90327,23 @@ new message content.",
|
|
|
90184
90327
|
className="cap-action-button-mock"
|
|
90185
90328
|
deleteButtonHandler={[Function]}
|
|
90186
90329
|
host=""
|
|
90330
|
+
injectedTags={Object {}}
|
|
90187
90331
|
isEditFlow={false}
|
|
90188
90332
|
isFullMode={true}
|
|
90333
|
+
location={
|
|
90334
|
+
Object {
|
|
90335
|
+
"pathname": "/rcs/create",
|
|
90336
|
+
"query": Object {
|
|
90337
|
+
"module": "default",
|
|
90338
|
+
"type": false,
|
|
90339
|
+
},
|
|
90340
|
+
"search": "",
|
|
90341
|
+
}
|
|
90342
|
+
}
|
|
90189
90343
|
maxButtons={4}
|
|
90344
|
+
onContextChange={[Function]}
|
|
90190
90345
|
suggestions={Array []}
|
|
90346
|
+
tags={Array []}
|
|
90191
90347
|
updateButtonChange={[Function]}
|
|
90192
90348
|
>
|
|
90193
90349
|
CapActionButton
|
|
@@ -110019,10 +110175,23 @@ new message content.",
|
|
|
110019
110175
|
buttonType="NONE"
|
|
110020
110176
|
deleteButtonHandler={[Function]}
|
|
110021
110177
|
host=""
|
|
110178
|
+
injectedTags={Object {}}
|
|
110022
110179
|
isEditFlow={false}
|
|
110023
110180
|
isFullMode={true}
|
|
110181
|
+
location={
|
|
110182
|
+
Object {
|
|
110183
|
+
"pathname": "/rcs/create",
|
|
110184
|
+
"query": Object {
|
|
110185
|
+
"module": "default",
|
|
110186
|
+
"type": false,
|
|
110187
|
+
},
|
|
110188
|
+
"search": "",
|
|
110189
|
+
}
|
|
110190
|
+
}
|
|
110024
110191
|
maxButtons={4}
|
|
110192
|
+
onContextChange={[Function]}
|
|
110025
110193
|
suggestions={Array []}
|
|
110194
|
+
tags={Array []}
|
|
110026
110195
|
updateButtonChange={[Function]}
|
|
110027
110196
|
>
|
|
110028
110197
|
<div
|
|
@@ -110030,10 +110199,23 @@ new message content.",
|
|
|
110030
110199
|
className="cap-action-button-mock"
|
|
110031
110200
|
deleteButtonHandler={[Function]}
|
|
110032
110201
|
host=""
|
|
110202
|
+
injectedTags={Object {}}
|
|
110033
110203
|
isEditFlow={false}
|
|
110034
110204
|
isFullMode={true}
|
|
110205
|
+
location={
|
|
110206
|
+
Object {
|
|
110207
|
+
"pathname": "/rcs/create",
|
|
110208
|
+
"query": Object {
|
|
110209
|
+
"module": "default",
|
|
110210
|
+
"type": false,
|
|
110211
|
+
},
|
|
110212
|
+
"search": "",
|
|
110213
|
+
}
|
|
110214
|
+
}
|
|
110035
110215
|
maxButtons={4}
|
|
110216
|
+
onContextChange={[Function]}
|
|
110036
110217
|
suggestions={Array []}
|
|
110218
|
+
tags={Array []}
|
|
110037
110219
|
updateButtonChange={[Function]}
|
|
110038
110220
|
>
|
|
110039
110221
|
CapActionButton
|
|
@@ -129104,10 +129286,23 @@ new message content.",
|
|
|
129104
129286
|
buttonType="NONE"
|
|
129105
129287
|
deleteButtonHandler={[Function]}
|
|
129106
129288
|
host=""
|
|
129289
|
+
injectedTags={Object {}}
|
|
129107
129290
|
isEditFlow={false}
|
|
129108
129291
|
isFullMode={true}
|
|
129292
|
+
location={
|
|
129293
|
+
Object {
|
|
129294
|
+
"pathname": "/rcs/create",
|
|
129295
|
+
"query": Object {
|
|
129296
|
+
"module": "default",
|
|
129297
|
+
"type": false,
|
|
129298
|
+
},
|
|
129299
|
+
"search": "",
|
|
129300
|
+
}
|
|
129301
|
+
}
|
|
129109
129302
|
maxButtons={4}
|
|
129303
|
+
onContextChange={[Function]}
|
|
129110
129304
|
suggestions={Array []}
|
|
129305
|
+
tags={Array []}
|
|
129111
129306
|
updateButtonChange={[Function]}
|
|
129112
129307
|
>
|
|
129113
129308
|
<div
|
|
@@ -129115,10 +129310,23 @@ new message content.",
|
|
|
129115
129310
|
className="cap-action-button-mock"
|
|
129116
129311
|
deleteButtonHandler={[Function]}
|
|
129117
129312
|
host=""
|
|
129313
|
+
injectedTags={Object {}}
|
|
129118
129314
|
isEditFlow={false}
|
|
129119
129315
|
isFullMode={true}
|
|
129316
|
+
location={
|
|
129317
|
+
Object {
|
|
129318
|
+
"pathname": "/rcs/create",
|
|
129319
|
+
"query": Object {
|
|
129320
|
+
"module": "default",
|
|
129321
|
+
"type": false,
|
|
129322
|
+
},
|
|
129323
|
+
"search": "",
|
|
129324
|
+
}
|
|
129325
|
+
}
|
|
129120
129326
|
maxButtons={4}
|
|
129327
|
+
onContextChange={[Function]}
|
|
129121
129328
|
suggestions={Array []}
|
|
129329
|
+
tags={Array []}
|
|
129122
129330
|
updateButtonChange={[Function]}
|
|
129123
129331
|
>
|
|
129124
129332
|
CapActionButton
|
|
@@ -147843,10 +148051,23 @@ new message content.",
|
|
|
147843
148051
|
buttonType="NONE"
|
|
147844
148052
|
deleteButtonHandler={[Function]}
|
|
147845
148053
|
host=""
|
|
148054
|
+
injectedTags={Object {}}
|
|
147846
148055
|
isEditFlow={false}
|
|
147847
148056
|
isFullMode={true}
|
|
148057
|
+
location={
|
|
148058
|
+
Object {
|
|
148059
|
+
"pathname": "/rcs/create",
|
|
148060
|
+
"query": Object {
|
|
148061
|
+
"module": "default",
|
|
148062
|
+
"type": false,
|
|
148063
|
+
},
|
|
148064
|
+
"search": "",
|
|
148065
|
+
}
|
|
148066
|
+
}
|
|
147848
148067
|
maxButtons={4}
|
|
148068
|
+
onContextChange={[Function]}
|
|
147849
148069
|
suggestions={Array []}
|
|
148070
|
+
tags={Array []}
|
|
147850
148071
|
updateButtonChange={[Function]}
|
|
147851
148072
|
>
|
|
147852
148073
|
<div
|
|
@@ -147854,10 +148075,23 @@ new message content.",
|
|
|
147854
148075
|
className="cap-action-button-mock"
|
|
147855
148076
|
deleteButtonHandler={[Function]}
|
|
147856
148077
|
host=""
|
|
148078
|
+
injectedTags={Object {}}
|
|
147857
148079
|
isEditFlow={false}
|
|
147858
148080
|
isFullMode={true}
|
|
148081
|
+
location={
|
|
148082
|
+
Object {
|
|
148083
|
+
"pathname": "/rcs/create",
|
|
148084
|
+
"query": Object {
|
|
148085
|
+
"module": "default",
|
|
148086
|
+
"type": false,
|
|
148087
|
+
},
|
|
148088
|
+
"search": "",
|
|
148089
|
+
}
|
|
148090
|
+
}
|
|
147859
148091
|
maxButtons={4}
|
|
148092
|
+
onContextChange={[Function]}
|
|
147860
148093
|
suggestions={Array []}
|
|
148094
|
+
tags={Array []}
|
|
147861
148095
|
updateButtonChange={[Function]}
|
|
147862
148096
|
>
|
|
147863
148097
|
CapActionButton
|
|
@@ -163714,10 +163948,23 @@ new message content.",
|
|
|
163714
163948
|
buttonType="NONE"
|
|
163715
163949
|
deleteButtonHandler={[Function]}
|
|
163716
163950
|
host=""
|
|
163951
|
+
injectedTags={Object {}}
|
|
163717
163952
|
isEditFlow={false}
|
|
163718
163953
|
isFullMode={true}
|
|
163954
|
+
location={
|
|
163955
|
+
Object {
|
|
163956
|
+
"pathname": "/rcs/create",
|
|
163957
|
+
"query": Object {
|
|
163958
|
+
"module": "default",
|
|
163959
|
+
"type": false,
|
|
163960
|
+
},
|
|
163961
|
+
"search": "",
|
|
163962
|
+
}
|
|
163963
|
+
}
|
|
163719
163964
|
maxButtons={4}
|
|
163965
|
+
onContextChange={[Function]}
|
|
163720
163966
|
suggestions={Array []}
|
|
163967
|
+
tags={Array []}
|
|
163721
163968
|
updateButtonChange={[Function]}
|
|
163722
163969
|
>
|
|
163723
163970
|
<div
|
|
@@ -163725,10 +163972,23 @@ new message content.",
|
|
|
163725
163972
|
className="cap-action-button-mock"
|
|
163726
163973
|
deleteButtonHandler={[Function]}
|
|
163727
163974
|
host=""
|
|
163975
|
+
injectedTags={Object {}}
|
|
163728
163976
|
isEditFlow={false}
|
|
163729
163977
|
isFullMode={true}
|
|
163978
|
+
location={
|
|
163979
|
+
Object {
|
|
163980
|
+
"pathname": "/rcs/create",
|
|
163981
|
+
"query": Object {
|
|
163982
|
+
"module": "default",
|
|
163983
|
+
"type": false,
|
|
163984
|
+
},
|
|
163985
|
+
"search": "",
|
|
163986
|
+
}
|
|
163987
|
+
}
|
|
163730
163988
|
maxButtons={4}
|
|
163989
|
+
onContextChange={[Function]}
|
|
163731
163990
|
suggestions={Array []}
|
|
163991
|
+
tags={Array []}
|
|
163732
163992
|
updateButtonChange={[Function]}
|
|
163733
163993
|
>
|
|
163734
163994
|
CapActionButton
|
|
@@ -179585,10 +179845,23 @@ new message content.",
|
|
|
179585
179845
|
buttonType="NONE"
|
|
179586
179846
|
deleteButtonHandler={[Function]}
|
|
179587
179847
|
host=""
|
|
179848
|
+
injectedTags={Object {}}
|
|
179588
179849
|
isEditFlow={false}
|
|
179589
179850
|
isFullMode={true}
|
|
179851
|
+
location={
|
|
179852
|
+
Object {
|
|
179853
|
+
"pathname": "/rcs/create",
|
|
179854
|
+
"query": Object {
|
|
179855
|
+
"module": "default",
|
|
179856
|
+
"type": false,
|
|
179857
|
+
},
|
|
179858
|
+
"search": "",
|
|
179859
|
+
}
|
|
179860
|
+
}
|
|
179590
179861
|
maxButtons={4}
|
|
179862
|
+
onContextChange={[Function]}
|
|
179591
179863
|
suggestions={Array []}
|
|
179864
|
+
tags={Array []}
|
|
179592
179865
|
updateButtonChange={[Function]}
|
|
179593
179866
|
>
|
|
179594
179867
|
<div
|
|
@@ -179596,10 +179869,23 @@ new message content.",
|
|
|
179596
179869
|
className="cap-action-button-mock"
|
|
179597
179870
|
deleteButtonHandler={[Function]}
|
|
179598
179871
|
host=""
|
|
179872
|
+
injectedTags={Object {}}
|
|
179599
179873
|
isEditFlow={false}
|
|
179600
179874
|
isFullMode={true}
|
|
179875
|
+
location={
|
|
179876
|
+
Object {
|
|
179877
|
+
"pathname": "/rcs/create",
|
|
179878
|
+
"query": Object {
|
|
179879
|
+
"module": "default",
|
|
179880
|
+
"type": false,
|
|
179881
|
+
},
|
|
179882
|
+
"search": "",
|
|
179883
|
+
}
|
|
179884
|
+
}
|
|
179601
179885
|
maxButtons={4}
|
|
179886
|
+
onContextChange={[Function]}
|
|
179602
179887
|
suggestions={Array []}
|
|
179888
|
+
tags={Array []}
|
|
179603
179889
|
updateButtonChange={[Function]}
|
|
179604
179890
|
>
|
|
179605
179891
|
CapActionButton
|
|
@@ -554,15 +554,13 @@ describe('buildCarouselCardsForPreview', () => {
|
|
|
554
554
|
expect(
|
|
555
555
|
buildCarouselCardsForPreview(undefined, {
|
|
556
556
|
isFullMode: false,
|
|
557
|
-
|
|
558
|
-
resolveTemplateWithMap: jest.fn(),
|
|
557
|
+
resolveCarouselTemplateWithMap: jest.fn(),
|
|
559
558
|
}),
|
|
560
559
|
).toEqual([]);
|
|
561
560
|
expect(
|
|
562
561
|
buildCarouselCardsForPreview([], {
|
|
563
562
|
isFullMode: false,
|
|
564
|
-
|
|
565
|
-
resolveTemplateWithMap: jest.fn(),
|
|
563
|
+
resolveCarouselTemplateWithMap: jest.fn(),
|
|
566
564
|
}),
|
|
567
565
|
).toEqual([]);
|
|
568
566
|
});
|
|
@@ -571,19 +569,18 @@ describe('buildCarouselCardsForPreview', () => {
|
|
|
571
569
|
expect(
|
|
572
570
|
buildCarouselCardsForPreview(null, {
|
|
573
571
|
isFullMode: false,
|
|
574
|
-
|
|
575
|
-
resolveTemplateWithMap: jest.fn(),
|
|
572
|
+
resolveCarouselTemplateWithMap: jest.fn(),
|
|
576
573
|
}),
|
|
577
574
|
).toEqual([]);
|
|
578
575
|
});
|
|
579
576
|
|
|
580
|
-
it('passes title/description through unresolved in full mode without calling
|
|
581
|
-
const
|
|
577
|
+
it('passes title/description through unresolved in full mode without calling resolveCarouselTemplateWithMap', () => {
|
|
578
|
+
const resolveCarouselTemplateWithMap = jest.fn();
|
|
582
579
|
const out = buildCarouselCardsForPreview(
|
|
583
580
|
[{ title: 'Hi {{a}}', description: 'Bye {{b}}' }],
|
|
584
|
-
{ isFullMode: true,
|
|
581
|
+
{ isFullMode: true, resolveCarouselTemplateWithMap },
|
|
585
582
|
);
|
|
586
|
-
expect(
|
|
583
|
+
expect(resolveCarouselTemplateWithMap).not.toHaveBeenCalled();
|
|
587
584
|
expect(out[0].title).toBe('Hi {{a}}');
|
|
588
585
|
expect(out[0].bodyText).toBe('Bye {{b}}');
|
|
589
586
|
});
|
|
@@ -595,7 +592,7 @@ describe('buildCarouselCardsForPreview', () => {
|
|
|
595
592
|
{ title: 'Hi {{a}}', description: 'Bye {{b}} {{c}}' },
|
|
596
593
|
{ title: 'Solo {{d}}', description: 'none' },
|
|
597
594
|
],
|
|
598
|
-
{ isFullMode: false,
|
|
595
|
+
{ isFullMode: false, resolveCarouselTemplateWithMap },
|
|
599
596
|
);
|
|
600
597
|
expect(resolveCarouselTemplateWithMap).toHaveBeenNthCalledWith(1, 'Hi {{a}}', 0, false);
|
|
601
598
|
expect(resolveCarouselTemplateWithMap).toHaveBeenNthCalledWith(2, 'Bye {{b}} {{c}}', 0, true);
|
|
@@ -610,8 +607,7 @@ describe('buildCarouselCardsForPreview', () => {
|
|
|
610
607
|
it('defaults missing card fields, including a default {} for a missing array item', () => {
|
|
611
608
|
const out = buildCarouselCardsForPreview([undefined], {
|
|
612
609
|
isFullMode: true,
|
|
613
|
-
|
|
614
|
-
resolveTemplateWithMap: jest.fn(),
|
|
610
|
+
resolveCarouselTemplateWithMap: jest.fn(),
|
|
615
611
|
});
|
|
616
612
|
expect(out[0]).toEqual({
|
|
617
613
|
mediaType: '',
|
|
@@ -635,7 +631,7 @@ describe('buildCarouselCardsForPreview', () => {
|
|
|
635
631
|
description: '',
|
|
636
632
|
},
|
|
637
633
|
],
|
|
638
|
-
{ isFullMode: true,
|
|
634
|
+
{ isFullMode: true, resolveCarouselTemplateWithMap: jest.fn() },
|
|
639
635
|
);
|
|
640
636
|
expect(out[0].mediaType).toBe('image');
|
|
641
637
|
expect(out[0].imageSrc).toBe('img.png');
|
|
@@ -651,7 +647,7 @@ describe('buildCarouselCardsForPreview', () => {
|
|
|
651
647
|
videoAsset: { videoSrc: 'v.mp4', videoThumbnail: 'other-thumb.png' },
|
|
652
648
|
},
|
|
653
649
|
],
|
|
654
|
-
{ isFullMode: true,
|
|
650
|
+
{ isFullMode: true, resolveCarouselTemplateWithMap: jest.fn() },
|
|
655
651
|
);
|
|
656
652
|
expect(out[0].videoPreviewImg).toBe('thumb.png');
|
|
657
653
|
expect(out[0].videoSrc).toBe('v.mp4');
|
|
@@ -665,7 +661,7 @@ describe('buildCarouselCardsForPreview', () => {
|
|
|
665
661
|
videoAsset: { videoSrc: 'v.mp4', videoThumbnail: 'other-thumb.png' },
|
|
666
662
|
},
|
|
667
663
|
],
|
|
668
|
-
{ isFullMode: true,
|
|
664
|
+
{ isFullMode: true, resolveCarouselTemplateWithMap: jest.fn() },
|
|
669
665
|
);
|
|
670
666
|
expect(out[0].videoPreviewImg).toBe('other-thumb.png');
|
|
671
667
|
});
|
|
@@ -673,7 +669,7 @@ describe('buildCarouselCardsForPreview', () => {
|
|
|
673
669
|
it('defaults videoPreviewImg and videoSrc to empty string when nothing is set', () => {
|
|
674
670
|
const out = buildCarouselCardsForPreview(
|
|
675
671
|
[{ mediaType: RCS_MEDIA_TYPES.IMAGE }],
|
|
676
|
-
{ isFullMode: true,
|
|
672
|
+
{ isFullMode: true, resolveCarouselTemplateWithMap: jest.fn() },
|
|
677
673
|
);
|
|
678
674
|
expect(out[0].videoPreviewImg).toBe('');
|
|
679
675
|
expect(out[0].videoSrc).toBe('');
|