@capillarytech/creatives-library 7.16.0 → 7.16.2
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/app.js +2 -2
- package/components/TemplatePreview/index.js +1 -0
- package/containers/Cap/sagas.js +4 -3
- package/containers/Cap/tests/saga.test.js +31 -0
- package/i18n.js +4 -10
- package/package.json +1 -1
- package/services/api.js +1 -9
- package/styles/vendor/semantic/src/definitions/collections/form.less +2 -2
- package/styles/vendor/semantic/src/definitions/elements/flag.less +1 -1
- package/styles/vendor/semantic/src/definitions/elements/icon.less +0 -1
- package/styles/vendor/semantic/src/definitions/globals/site.less +1 -1
- package/utils/smsCharCountV2.js +0 -13
- package/utils/test-utils.js +0 -17
- package/v2Components/FormBuilder/index.js +4 -28
- package/v2Containers/Cap/sagas.js +4 -3
- package/v2Containers/Cap/tests/saga.test.js +31 -0
- package/v2Containers/CreativesContainer/constants.js +0 -2
- package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +0 -8
- package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +0 -3
- package/v2Containers/Line/Container/Video/index.js +1 -1
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +3 -9
- package/v2Containers/Sms/Create/actions.js +0 -9
- package/v2Containers/Sms/Create/constants.js +0 -2
- package/v2Containers/Sms/Create/index.js +0 -12
- package/v2Containers/Sms/Create/sagas.js +3 -19
- package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +0 -16
- package/v2Containers/Whatsapp/index.js +4 -2
- package/v2Containers/Whatsapp/messages.js +5 -0
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +0 -52
- package/v2Containers/ChannelTemplates/actions.js +0 -20
- package/v2Containers/ChannelTemplates/constants.js +0 -8
- package/v2Containers/ChannelTemplates/index.js +0 -47
- package/v2Containers/ChannelTemplates/messages.js +0 -13
- package/v2Containers/ChannelTemplates/reducer.js +0 -34
- package/v2Containers/ChannelTemplates/sagas.js +0 -32
- package/v2Containers/ChannelTemplates/selectors.js +0 -25
- package/v2Containers/Sms/Create/tests/sagas.test.js +0 -82
|
@@ -889,8 +889,10 @@ export const Whatsapp = (props) => {
|
|
|
889
889
|
|
|
890
890
|
const noContentBetweenVars = /}}\s*{{/g;
|
|
891
891
|
const moreThanTwoBrackets = /{{3,}([1-9]|1[0-9])}{3,}/g;
|
|
892
|
-
|
|
893
|
-
if (
|
|
892
|
+
const consecutiveNewLines = /\n\s*\n\s*\n/;
|
|
893
|
+
if (value.match(consecutiveNewLines)) {
|
|
894
|
+
errorMessage = formatMessage(messages.removeMultinewlineChars);
|
|
895
|
+
} else if (validVarArr?.length > 0 || invalidVarArr?.length > 0) {
|
|
894
896
|
if (validVarArr?.length !== validVarSet?.length) {
|
|
895
897
|
//checks for repetations like Hi {{1}}, offer for you {{1}}
|
|
896
898
|
errorMessage = formatMessage(messages.repetativeVars);
|
|
@@ -180,6 +180,11 @@ export default defineMessages({
|
|
|
180
180
|
defaultMessage:
|
|
181
181
|
'Variable name should be numeric value from {{1}} to {{19}}',
|
|
182
182
|
},
|
|
183
|
+
removeMultinewlineChars: {
|
|
184
|
+
id: `${prefix}.removeMultinewlineChars`,
|
|
185
|
+
defaultMessage:
|
|
186
|
+
'More than two consecutive line breaks are not allowed.',
|
|
187
|
+
},
|
|
183
188
|
noContentBetweenVars: {
|
|
184
189
|
id: `${prefix}.noContentBetweenVars`,
|
|
185
190
|
defaultMessage: 'Add atleast 1 character between 2 variables',
|
|
@@ -3959,7 +3959,6 @@ new message content.",
|
|
|
3959
3959
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
3960
3960
|
>
|
|
3961
3961
|
<CapSelect
|
|
3962
|
-
getMenuOptionsProps={[Function]}
|
|
3963
3962
|
id="select-whatsapp-category"
|
|
3964
3963
|
onChange={[Function]}
|
|
3965
3964
|
options={
|
|
@@ -5062,7 +5061,6 @@ new message content.",
|
|
|
5062
5061
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
5063
5062
|
>
|
|
5064
5063
|
<CapSelect
|
|
5065
|
-
getMenuOptionsProps={[Function]}
|
|
5066
5064
|
id="select-whatsapp-language"
|
|
5067
5065
|
onChange={[Function]}
|
|
5068
5066
|
options={
|
|
@@ -17650,7 +17648,6 @@ new message content.",
|
|
|
17650
17648
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
17651
17649
|
>
|
|
17652
17650
|
<CapSelect
|
|
17653
|
-
getMenuOptionsProps={[Function]}
|
|
17654
17651
|
id="select-whatsapp-category"
|
|
17655
17652
|
onChange={[Function]}
|
|
17656
17653
|
options={
|
|
@@ -18753,7 +18750,6 @@ new message content.",
|
|
|
18753
18750
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
18754
18751
|
>
|
|
18755
18752
|
<CapSelect
|
|
18756
|
-
getMenuOptionsProps={[Function]}
|
|
18757
18753
|
id="select-whatsapp-language"
|
|
18758
18754
|
onChange={[Function]}
|
|
18759
18755
|
options={
|
|
@@ -31738,7 +31734,6 @@ new message content.",
|
|
|
31738
31734
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
31739
31735
|
>
|
|
31740
31736
|
<CapSelect
|
|
31741
|
-
getMenuOptionsProps={[Function]}
|
|
31742
31737
|
id="select-whatsapp-category"
|
|
31743
31738
|
onChange={[Function]}
|
|
31744
31739
|
options={
|
|
@@ -32841,7 +32836,6 @@ new message content.",
|
|
|
32841
32836
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
32842
32837
|
>
|
|
32843
32838
|
<CapSelect
|
|
32844
|
-
getMenuOptionsProps={[Function]}
|
|
32845
32839
|
id="select-whatsapp-language"
|
|
32846
32840
|
onChange={[Function]}
|
|
32847
32841
|
options={
|
|
@@ -45018,7 +45012,6 @@ new message content.",
|
|
|
45018
45012
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
45019
45013
|
>
|
|
45020
45014
|
<CapSelect
|
|
45021
|
-
getMenuOptionsProps={[Function]}
|
|
45022
45015
|
id="select-whatsapp-category"
|
|
45023
45016
|
onChange={[Function]}
|
|
45024
45017
|
options={
|
|
@@ -46121,7 +46114,6 @@ new message content.",
|
|
|
46121
46114
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
46122
46115
|
>
|
|
46123
46116
|
<CapSelect
|
|
46124
|
-
getMenuOptionsProps={[Function]}
|
|
46125
46117
|
id="select-whatsapp-language"
|
|
46126
46118
|
onChange={[Function]}
|
|
46127
46119
|
options={
|
|
@@ -58944,7 +58936,6 @@ new message content.",
|
|
|
58944
58936
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
58945
58937
|
>
|
|
58946
58938
|
<CapSelect
|
|
58947
|
-
getMenuOptionsProps={[Function]}
|
|
58948
58939
|
id="select-whatsapp-category"
|
|
58949
58940
|
onChange={[Function]}
|
|
58950
58941
|
options={
|
|
@@ -59975,7 +59966,6 @@ new message content.",
|
|
|
59975
59966
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
59976
59967
|
>
|
|
59977
59968
|
<CapSelect
|
|
59978
|
-
getMenuOptionsProps={[Function]}
|
|
59979
59969
|
id="select-whatsapp-language"
|
|
59980
59970
|
onChange={[Function]}
|
|
59981
59971
|
options={
|
|
@@ -73172,7 +73162,6 @@ new message content.",
|
|
|
73172
73162
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
73173
73163
|
>
|
|
73174
73164
|
<CapSelect
|
|
73175
|
-
getMenuOptionsProps={[Function]}
|
|
73176
73165
|
id="select-whatsapp-category"
|
|
73177
73166
|
onChange={[Function]}
|
|
73178
73167
|
options={
|
|
@@ -74203,7 +74192,6 @@ new message content.",
|
|
|
74203
74192
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
74204
74193
|
>
|
|
74205
74194
|
<CapSelect
|
|
74206
|
-
getMenuOptionsProps={[Function]}
|
|
74207
74195
|
id="select-whatsapp-language"
|
|
74208
74196
|
onChange={[Function]}
|
|
74209
74197
|
options={
|
|
@@ -88125,7 +88113,6 @@ new message content.",
|
|
|
88125
88113
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
88126
88114
|
>
|
|
88127
88115
|
<CapSelect
|
|
88128
|
-
getMenuOptionsProps={[Function]}
|
|
88129
88116
|
id="select-whatsapp-category"
|
|
88130
88117
|
onChange={[Function]}
|
|
88131
88118
|
options={
|
|
@@ -89156,7 +89143,6 @@ new message content.",
|
|
|
89156
89143
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
89157
89144
|
>
|
|
89158
89145
|
<CapSelect
|
|
89159
|
-
getMenuOptionsProps={[Function]}
|
|
89160
89146
|
id="select-whatsapp-language"
|
|
89161
89147
|
onChange={[Function]}
|
|
89162
89148
|
options={
|
|
@@ -103430,7 +103416,6 @@ new message content.",
|
|
|
103430
103416
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
103431
103417
|
>
|
|
103432
103418
|
<CapSelect
|
|
103433
|
-
getMenuOptionsProps={[Function]}
|
|
103434
103419
|
id="select-whatsapp-category"
|
|
103435
103420
|
onChange={[Function]}
|
|
103436
103421
|
options={
|
|
@@ -104461,7 +104446,6 @@ new message content.",
|
|
|
104461
104446
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
104462
104447
|
>
|
|
104463
104448
|
<CapSelect
|
|
104464
|
-
getMenuOptionsProps={[Function]}
|
|
104465
104449
|
id="select-whatsapp-language"
|
|
104466
104450
|
onChange={[Function]}
|
|
104467
104451
|
options={
|
|
@@ -188600,7 +188584,6 @@ new message content.",
|
|
|
188600
188584
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
188601
188585
|
>
|
|
188602
188586
|
<CapSelect
|
|
188603
|
-
getMenuOptionsProps={[Function]}
|
|
188604
188587
|
id="select-whatsapp-category"
|
|
188605
188588
|
onChange={[Function]}
|
|
188606
188589
|
options={
|
|
@@ -189703,7 +189686,6 @@ new message content.",
|
|
|
189703
189686
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
189704
189687
|
>
|
|
189705
189688
|
<CapSelect
|
|
189706
|
-
getMenuOptionsProps={[Function]}
|
|
189707
189689
|
id="select-whatsapp-language"
|
|
189708
189690
|
onChange={[Function]}
|
|
189709
189691
|
options={
|
|
@@ -203278,7 +203260,6 @@ new message content.",
|
|
|
203278
203260
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
203279
203261
|
>
|
|
203280
203262
|
<CapSelect
|
|
203281
|
-
getMenuOptionsProps={[Function]}
|
|
203282
203263
|
id="select-whatsapp-category"
|
|
203283
203264
|
onChange={[Function]}
|
|
203284
203265
|
options={
|
|
@@ -204309,7 +204290,6 @@ new message content.",
|
|
|
204309
204290
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
204310
204291
|
>
|
|
204311
204292
|
<CapSelect
|
|
204312
|
-
getMenuOptionsProps={[Function]}
|
|
204313
204293
|
id="select-whatsapp-language"
|
|
204314
204294
|
onChange={[Function]}
|
|
204315
204295
|
options={
|
|
@@ -216891,7 +216871,6 @@ new message content.",
|
|
|
216891
216871
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
216892
216872
|
>
|
|
216893
216873
|
<CapSelect
|
|
216894
|
-
getMenuOptionsProps={[Function]}
|
|
216895
216874
|
id="select-whatsapp-category"
|
|
216896
216875
|
onChange={[Function]}
|
|
216897
216876
|
options={
|
|
@@ -217994,7 +217973,6 @@ new message content.",
|
|
|
217994
217973
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
217995
217974
|
>
|
|
217996
217975
|
<CapSelect
|
|
217997
|
-
getMenuOptionsProps={[Function]}
|
|
217998
217976
|
id="select-whatsapp-language"
|
|
217999
217977
|
onChange={[Function]}
|
|
218000
217978
|
options={
|
|
@@ -230568,7 +230546,6 @@ new message content.",
|
|
|
230568
230546
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
230569
230547
|
>
|
|
230570
230548
|
<CapSelect
|
|
230571
|
-
getMenuOptionsProps={[Function]}
|
|
230572
230549
|
id="select-whatsapp-category"
|
|
230573
230550
|
onChange={[Function]}
|
|
230574
230551
|
options={
|
|
@@ -231671,7 +231648,6 @@ new message content.",
|
|
|
231671
231648
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
231672
231649
|
>
|
|
231673
231650
|
<CapSelect
|
|
231674
|
-
getMenuOptionsProps={[Function]}
|
|
231675
231651
|
id="select-whatsapp-language"
|
|
231676
231652
|
onChange={[Function]}
|
|
231677
231653
|
options={
|
|
@@ -244626,7 +244602,6 @@ new message content.",
|
|
|
244626
244602
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
244627
244603
|
>
|
|
244628
244604
|
<CapSelect
|
|
244629
|
-
getMenuOptionsProps={[Function]}
|
|
244630
244605
|
id="select-whatsapp-category"
|
|
244631
244606
|
onChange={[Function]}
|
|
244632
244607
|
options={
|
|
@@ -245729,7 +245704,6 @@ new message content.",
|
|
|
245729
245704
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
245730
245705
|
>
|
|
245731
245706
|
<CapSelect
|
|
245732
|
-
getMenuOptionsProps={[Function]}
|
|
245733
245707
|
id="select-whatsapp-language"
|
|
245734
245708
|
onChange={[Function]}
|
|
245735
245709
|
options={
|
|
@@ -259097,7 +259071,6 @@ new message content.",
|
|
|
259097
259071
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
259098
259072
|
>
|
|
259099
259073
|
<CapSelect
|
|
259100
|
-
getMenuOptionsProps={[Function]}
|
|
259101
259074
|
id="select-whatsapp-category"
|
|
259102
259075
|
onChange={[Function]}
|
|
259103
259076
|
options={
|
|
@@ -260200,7 +260173,6 @@ new message content.",
|
|
|
260200
260173
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
260201
260174
|
>
|
|
260202
260175
|
<CapSelect
|
|
260203
|
-
getMenuOptionsProps={[Function]}
|
|
260204
260176
|
id="select-whatsapp-language"
|
|
260205
260177
|
onChange={[Function]}
|
|
260206
260178
|
options={
|
|
@@ -273959,7 +273931,6 @@ new message content.",
|
|
|
273959
273931
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
273960
273932
|
>
|
|
273961
273933
|
<CapSelect
|
|
273962
|
-
getMenuOptionsProps={[Function]}
|
|
273963
273934
|
id="select-whatsapp-category"
|
|
273964
273935
|
onChange={[Function]}
|
|
273965
273936
|
options={
|
|
@@ -275062,7 +275033,6 @@ new message content.",
|
|
|
275062
275033
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
275063
275034
|
>
|
|
275064
275035
|
<CapSelect
|
|
275065
|
-
getMenuOptionsProps={[Function]}
|
|
275066
275036
|
id="select-whatsapp-language"
|
|
275067
275037
|
onChange={[Function]}
|
|
275068
275038
|
options={
|
|
@@ -289222,7 +289192,6 @@ new message content.",
|
|
|
289222
289192
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
289223
289193
|
>
|
|
289224
289194
|
<CapSelect
|
|
289225
|
-
getMenuOptionsProps={[Function]}
|
|
289226
289195
|
id="select-whatsapp-category"
|
|
289227
289196
|
onChange={[Function]}
|
|
289228
289197
|
options={
|
|
@@ -290325,7 +290294,6 @@ new message content.",
|
|
|
290325
290294
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
290326
290295
|
>
|
|
290327
290296
|
<CapSelect
|
|
290328
|
-
getMenuOptionsProps={[Function]}
|
|
290329
290297
|
id="select-whatsapp-language"
|
|
290330
290298
|
onChange={[Function]}
|
|
290331
290299
|
options={
|
|
@@ -304886,7 +304854,6 @@ new message content.",
|
|
|
304886
304854
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
304887
304855
|
>
|
|
304888
304856
|
<CapSelect
|
|
304889
|
-
getMenuOptionsProps={[Function]}
|
|
304890
304857
|
id="select-whatsapp-category"
|
|
304891
304858
|
onChange={[Function]}
|
|
304892
304859
|
options={
|
|
@@ -305989,7 +305956,6 @@ new message content.",
|
|
|
305989
305956
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
305990
305957
|
>
|
|
305991
305958
|
<CapSelect
|
|
305992
|
-
getMenuOptionsProps={[Function]}
|
|
305993
305959
|
id="select-whatsapp-language"
|
|
305994
305960
|
onChange={[Function]}
|
|
305995
305961
|
options={
|
|
@@ -320951,7 +320917,6 @@ new message content.",
|
|
|
320951
320917
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
320952
320918
|
>
|
|
320953
320919
|
<CapSelect
|
|
320954
|
-
getMenuOptionsProps={[Function]}
|
|
320955
320920
|
id="select-whatsapp-category"
|
|
320956
320921
|
onChange={[Function]}
|
|
320957
320922
|
options={
|
|
@@ -322054,7 +322019,6 @@ new message content.",
|
|
|
322054
322019
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
322055
322020
|
>
|
|
322056
322021
|
<CapSelect
|
|
322057
|
-
getMenuOptionsProps={[Function]}
|
|
322058
322022
|
id="select-whatsapp-language"
|
|
322059
322023
|
onChange={[Function]}
|
|
322060
322024
|
options={
|
|
@@ -337407,7 +337371,6 @@ new message content.",
|
|
|
337407
337371
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
337408
337372
|
>
|
|
337409
337373
|
<CapSelect
|
|
337410
|
-
getMenuOptionsProps={[Function]}
|
|
337411
337374
|
id="select-whatsapp-category"
|
|
337412
337375
|
onChange={[Function]}
|
|
337413
337376
|
options={
|
|
@@ -338510,7 +338473,6 @@ new message content.",
|
|
|
338510
338473
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
338511
338474
|
>
|
|
338512
338475
|
<CapSelect
|
|
338513
|
-
getMenuOptionsProps={[Function]}
|
|
338514
338476
|
id="select-whatsapp-language"
|
|
338515
338477
|
onChange={[Function]}
|
|
338516
338478
|
options={
|
|
@@ -351096,7 +351058,6 @@ new message content.",
|
|
|
351096
351058
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
351097
351059
|
>
|
|
351098
351060
|
<CapSelect
|
|
351099
|
-
getMenuOptionsProps={[Function]}
|
|
351100
351061
|
id="select-whatsapp-category"
|
|
351101
351062
|
onChange={[Function]}
|
|
351102
351063
|
options={
|
|
@@ -352199,7 +352160,6 @@ new message content.",
|
|
|
352199
352160
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
352200
352161
|
>
|
|
352201
352162
|
<CapSelect
|
|
352202
|
-
getMenuOptionsProps={[Function]}
|
|
352203
352163
|
id="select-whatsapp-language"
|
|
352204
352164
|
onChange={[Function]}
|
|
352205
352165
|
options={
|
|
@@ -365181,7 +365141,6 @@ new message content.",
|
|
|
365181
365141
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
365182
365142
|
>
|
|
365183
365143
|
<CapSelect
|
|
365184
|
-
getMenuOptionsProps={[Function]}
|
|
365185
365144
|
id="select-whatsapp-category"
|
|
365186
365145
|
onChange={[Function]}
|
|
365187
365146
|
options={
|
|
@@ -366284,7 +366243,6 @@ new message content.",
|
|
|
366284
366243
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
366285
366244
|
>
|
|
366286
366245
|
<CapSelect
|
|
366287
|
-
getMenuOptionsProps={[Function]}
|
|
366288
366246
|
id="select-whatsapp-language"
|
|
366289
366247
|
onChange={[Function]}
|
|
366290
366248
|
options={
|
|
@@ -379687,7 +379645,6 @@ new message content.",
|
|
|
379687
379645
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
379688
379646
|
>
|
|
379689
379647
|
<CapSelect
|
|
379690
|
-
getMenuOptionsProps={[Function]}
|
|
379691
379648
|
id="select-whatsapp-category"
|
|
379692
379649
|
onChange={[Function]}
|
|
379693
379650
|
options={
|
|
@@ -380790,7 +380747,6 @@ new message content.",
|
|
|
380790
380747
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
380791
380748
|
>
|
|
380792
380749
|
<CapSelect
|
|
380793
|
-
getMenuOptionsProps={[Function]}
|
|
380794
380750
|
id="select-whatsapp-language"
|
|
380795
380751
|
onChange={[Function]}
|
|
380796
380752
|
options={
|
|
@@ -394136,7 +394092,6 @@ new message content.",
|
|
|
394136
394092
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
394137
394093
|
>
|
|
394138
394094
|
<CapSelect
|
|
394139
|
-
getMenuOptionsProps={[Function]}
|
|
394140
394095
|
id="select-whatsapp-category"
|
|
394141
394096
|
onChange={[Function]}
|
|
394142
394097
|
options={
|
|
@@ -395239,7 +395194,6 @@ new message content.",
|
|
|
395239
395194
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
395240
395195
|
>
|
|
395241
395196
|
<CapSelect
|
|
395242
|
-
getMenuOptionsProps={[Function]}
|
|
395243
395197
|
id="select-whatsapp-language"
|
|
395244
395198
|
onChange={[Function]}
|
|
395245
395199
|
options={
|
|
@@ -409996,7 +409950,6 @@ new message content.",
|
|
|
409996
409950
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
409997
409951
|
>
|
|
409998
409952
|
<CapSelect
|
|
409999
|
-
getMenuOptionsProps={[Function]}
|
|
410000
409953
|
id="select-whatsapp-category"
|
|
410001
409954
|
onChange={[Function]}
|
|
410002
409955
|
options={
|
|
@@ -411057,7 +411010,6 @@ new message content.",
|
|
|
411057
411010
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
411058
411011
|
>
|
|
411059
411012
|
<CapSelect
|
|
411060
|
-
getMenuOptionsProps={[Function]}
|
|
411061
411013
|
id="select-whatsapp-language"
|
|
411062
411014
|
onChange={[Function]}
|
|
411063
411015
|
options={
|
|
@@ -429060,7 +429012,6 @@ undefined",
|
|
|
429060
429012
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
429061
429013
|
>
|
|
429062
429014
|
<CapSelect
|
|
429063
|
-
getMenuOptionsProps={[Function]}
|
|
429064
429015
|
id="select-whatsapp-category"
|
|
429065
429016
|
onChange={[Function]}
|
|
429066
429017
|
options={
|
|
@@ -430121,7 +430072,6 @@ undefined",
|
|
|
430121
430072
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
430122
430073
|
>
|
|
430123
430074
|
<CapSelect
|
|
430124
|
-
getMenuOptionsProps={[Function]}
|
|
430125
430075
|
id="select-whatsapp-language"
|
|
430126
430076
|
onChange={[Function]}
|
|
430127
430077
|
options={
|
|
@@ -449211,7 +449161,6 @@ undefined",
|
|
|
449211
449161
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
449212
449162
|
>
|
|
449213
449163
|
<CapSelect
|
|
449214
|
-
getMenuOptionsProps={[Function]}
|
|
449215
449164
|
id="select-whatsapp-category"
|
|
449216
449165
|
onChange={[Function]}
|
|
449217
449166
|
options={
|
|
@@ -450272,7 +450221,6 @@ undefined",
|
|
|
450272
450221
|
className="ComponentWithLabelHOC__ComponentWithLabelWrapper-sc-1qk6bpg-1 evSAae"
|
|
450273
450222
|
>
|
|
450274
450223
|
<CapSelect
|
|
450275
|
-
getMenuOptionsProps={[Function]}
|
|
450276
450224
|
id="select-whatsapp-language"
|
|
450277
450225
|
onChange={[Function]}
|
|
450278
450226
|
options={
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
*
|
|
3
|
-
* ChannelTemplates actions
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import * as types from './constants';
|
|
8
|
-
|
|
9
|
-
export function defaultAction() {
|
|
10
|
-
return {
|
|
11
|
-
type: types.DEFAULT_ACTION,
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function getTemplates(channel) {
|
|
16
|
-
return {
|
|
17
|
-
type: types.GET_TEMPLATES_REQUEST,
|
|
18
|
-
channel,
|
|
19
|
-
};
|
|
20
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
*
|
|
3
|
-
* ChannelTemplates
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import PropTypes from 'prop-types';
|
|
8
|
-
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import { connect } from 'react-redux';
|
|
11
|
-
import { FormattedMessage } from 'react-intl';
|
|
12
|
-
import { bindActionCreators } from 'redux';
|
|
13
|
-
import { createStructuredSelector } from 'reselect';
|
|
14
|
-
import makeSelectChannelTemplates from './selectors';
|
|
15
|
-
import * as actions from './actions';
|
|
16
|
-
import messages from './messages';
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
export class ChannelTemplates extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
20
|
-
componentDidMount() {
|
|
21
|
-
this.props.actions.getTemplates(this.props.channel);
|
|
22
|
-
}
|
|
23
|
-
render() {
|
|
24
|
-
return (
|
|
25
|
-
<CardGrid
|
|
26
|
-
cardDataList={[]}
|
|
27
|
-
/>
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
ChannelTemplates.propTypes = {
|
|
33
|
-
actions: PropTypes.object.isRequired,
|
|
34
|
-
channel: PropTypes.string,
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const mapStateToProps = createStructuredSelector({
|
|
38
|
-
ChannelTemplates: makeSelectChannelTemplates(),
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
function mapDispatchToProps(dispatch) {
|
|
42
|
-
return {
|
|
43
|
-
actions: bindActionCreators(actions, dispatch),
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export default connect(mapStateToProps, mapDispatchToProps)(ChannelTemplates);
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* ChannelTemplates Messages
|
|
3
|
-
*
|
|
4
|
-
* This contains all the text for the ChannelTemplates component.
|
|
5
|
-
*/
|
|
6
|
-
import { defineMessages } from 'react-intl';
|
|
7
|
-
|
|
8
|
-
export default defineMessages({
|
|
9
|
-
header: {
|
|
10
|
-
id: 'creatives.containersV2.ChannelTemplates.header',
|
|
11
|
-
defaultMessage: 'This is ChannelTemplates container !',
|
|
12
|
-
},
|
|
13
|
-
});
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
*
|
|
3
|
-
* ChannelTemplates reducer
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { fromJS } from 'immutable';
|
|
8
|
-
import * as types from './constants';
|
|
9
|
-
|
|
10
|
-
const initialState = fromJS({
|
|
11
|
-
loadingTemplates: true,
|
|
12
|
-
smsTemplates: [],
|
|
13
|
-
emailTemplates: [],
|
|
14
|
-
wechatTemplates: [],
|
|
15
|
-
mobilepushTemplates: [],
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
function channelTemplatesReducer(state = initialState, action) {
|
|
19
|
-
const channelTemplates = `${action.channel}Templates`;
|
|
20
|
-
switch (action.type) {
|
|
21
|
-
case types.DEFAULT_ACTION:
|
|
22
|
-
return state;
|
|
23
|
-
case types.GET_TEMPLATES_REQUEST:
|
|
24
|
-
return state.set('loadingTemplates', true);
|
|
25
|
-
case types.GET_TEMPLATES_SUCESS:
|
|
26
|
-
return state.set('loadingTemplates', false).set(channelTemplates, action.templates);
|
|
27
|
-
case types.GET_TEMPLATES_FAILURE:
|
|
28
|
-
return state.set('loadingTemplates', false).set('error', action.error);
|
|
29
|
-
default:
|
|
30
|
-
return state;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export default channelTemplatesReducer;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { take, takeLatest, call, put, cancel } from 'redux-saga/effects';
|
|
2
|
-
import { LOCATION_CHANGE } from 'react-router-redux';
|
|
3
|
-
import * as Api from '../../services/api';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import * as types from './constants';
|
|
7
|
-
// Individual exports for testing
|
|
8
|
-
export function* defaultSaga() {
|
|
9
|
-
// See example in v2Containers/HomePage/sagas.js
|
|
10
|
-
}
|
|
11
|
-
function* getTemplates(action) {
|
|
12
|
-
try {
|
|
13
|
-
const req = {
|
|
14
|
-
channel: action.channel,
|
|
15
|
-
queryParams: action.query,
|
|
16
|
-
};
|
|
17
|
-
const res = call(Api.getAllTemplates, req);
|
|
18
|
-
put({type: types.GET_TEMPLATES_SUCESS, templates: res.response, channel: action.channel});
|
|
19
|
-
} catch (error) {
|
|
20
|
-
put({type: types.GET_TEMPLATES_FAILURE, error});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
function* getTemplatesWatcher() {
|
|
24
|
-
const watcher = yield takeLatest(types.GET_TEMPLATES_REQUEST, getTemplates);
|
|
25
|
-
yield take(LOCATION_CHANGE);
|
|
26
|
-
yield cancel(watcher);
|
|
27
|
-
}
|
|
28
|
-
// All sagas to be loaded
|
|
29
|
-
export default [
|
|
30
|
-
defaultSaga,
|
|
31
|
-
getTemplatesWatcher,
|
|
32
|
-
];
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { createSelector } from 'reselect';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Direct selector to the channelTemplates state domain
|
|
5
|
-
*/
|
|
6
|
-
const selectChannelTemplatesDomain = () => (state) => state.get('templates');
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Other specific selectors
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Default selector used by ChannelTemplates
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
const makeSelectChannelTemplates = () => createSelector(
|
|
18
|
-
selectChannelTemplatesDomain(),
|
|
19
|
-
(substate) => substate.toJS()
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
export default makeSelectChannelTemplates;
|
|
23
|
-
export {
|
|
24
|
-
selectChannelTemplatesDomain,
|
|
25
|
-
};
|