@capillarytech/creatives-library 8.0.241 → 8.0.242-alpha.0

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.
Files changed (119) hide show
  1. package/package.json +1 -1
  2. package/sagas/__tests__/assetPolling.test.js +607 -0
  3. package/sagas/assetPolling.js +156 -0
  4. package/services/api.js +16 -0
  5. package/services/tests/api.test.js +124 -0
  6. package/translations/en.json +1 -0
  7. package/utils/assetStatusConstants.js +12 -0
  8. package/utils/asyncAssetUpload.js +161 -0
  9. package/utils/tests/asyncAssetUpload.test.js +292 -0
  10. package/utils/transformerUtils.js +42 -0
  11. package/v2Components/CapImageUpload/constants.js +2 -0
  12. package/v2Components/CapImageUpload/index.js +54 -14
  13. package/v2Components/CapImageUpload/index.scss +4 -1
  14. package/v2Components/CapImageUpload/messages.js +4 -0
  15. package/v2Components/CapImageUrlUpload/constants.js +19 -0
  16. package/v2Components/CapImageUrlUpload/index.js +455 -0
  17. package/v2Components/CapImageUrlUpload/index.scss +35 -0
  18. package/v2Components/CapImageUrlUpload/messages.js +47 -0
  19. package/v2Containers/App/constants.js +5 -0
  20. package/v2Containers/Cap/tests/__snapshots__/index.test.js.snap +1 -0
  21. package/v2Containers/CreativesContainer/SlideBoxContent.js +57 -2
  22. package/v2Containers/CreativesContainer/SlideBoxHeader.js +1 -0
  23. package/v2Containers/CreativesContainer/constants.js +2 -0
  24. package/v2Containers/CreativesContainer/index.js +152 -0
  25. package/v2Containers/CreativesContainer/messages.js +4 -0
  26. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +3 -0
  27. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +2 -0
  28. package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +25 -0
  29. package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +18 -0
  30. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +46 -0
  31. package/v2Containers/SmsTrai/Create/tests/__snapshots__/index.test.js.snap +4 -0
  32. package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +8 -0
  33. package/v2Containers/Templates/ChannelTypeIllustration.js +13 -1
  34. package/v2Containers/Templates/_templates.scss +203 -0
  35. package/v2Containers/Templates/actions.js +2 -1
  36. package/v2Containers/Templates/constants.js +1 -0
  37. package/v2Containers/Templates/index.js +273 -30
  38. package/v2Containers/Templates/messages.js +24 -0
  39. package/v2Containers/Templates/reducer.js +2 -0
  40. package/v2Containers/Templates/tests/index.test.js +10 -0
  41. package/v2Containers/TemplatesV2/index.js +3 -2
  42. package/v2Containers/TemplatesV2/messages.js +4 -0
  43. package/v2Containers/WebPush/Create/components/ButtonForm.js +175 -0
  44. package/v2Containers/WebPush/Create/components/ButtonItem.js +101 -0
  45. package/v2Containers/WebPush/Create/components/ButtonList.js +144 -0
  46. package/v2Containers/WebPush/Create/components/_buttons.scss +246 -0
  47. package/v2Containers/WebPush/Create/components/tests/ButtonForm.test.js +554 -0
  48. package/v2Containers/WebPush/Create/components/tests/ButtonItem.test.js +607 -0
  49. package/v2Containers/WebPush/Create/components/tests/ButtonList.test.js +633 -0
  50. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonForm.test.js.snap +666 -0
  51. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonItem.test.js.snap +74 -0
  52. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonList.test.js.snap +80 -0
  53. package/v2Containers/WebPush/Create/index.js +1755 -0
  54. package/v2Containers/WebPush/Create/index.scss +123 -0
  55. package/v2Containers/WebPush/Create/messages.js +199 -0
  56. package/v2Containers/WebPush/Create/preview/DevicePreviewContent.js +241 -0
  57. package/v2Containers/WebPush/Create/preview/NotificationContainer.js +290 -0
  58. package/v2Containers/WebPush/Create/preview/PreviewContent.js +81 -0
  59. package/v2Containers/WebPush/Create/preview/PreviewControls.js +240 -0
  60. package/v2Containers/WebPush/Create/preview/PreviewDisclaimer.js +23 -0
  61. package/v2Containers/WebPush/Create/preview/WebPushPreview.js +144 -0
  62. package/v2Containers/WebPush/Create/preview/assets/Light.svg +53 -0
  63. package/v2Containers/WebPush/Create/preview/assets/Top.svg +5 -0
  64. package/v2Containers/WebPush/Create/preview/assets/chrome-icon.png +0 -0
  65. package/v2Containers/WebPush/Create/preview/assets/edge-icon.png +0 -0
  66. package/v2Containers/WebPush/Create/preview/assets/firefox-icon.svg +106 -0
  67. package/v2Containers/WebPush/Create/preview/assets/iOS.svg +26 -0
  68. package/v2Containers/WebPush/Create/preview/assets/opera-icon.svg +18 -0
  69. package/v2Containers/WebPush/Create/preview/assets/safari-icon.svg +29 -0
  70. package/v2Containers/WebPush/Create/preview/components/AndroidMobileChromeHeader.js +44 -0
  71. package/v2Containers/WebPush/Create/preview/components/AndroidMobileExpanded.js +110 -0
  72. package/v2Containers/WebPush/Create/preview/components/IOSHeader.js +45 -0
  73. package/v2Containers/WebPush/Create/preview/components/NotificationExpandedContent.js +72 -0
  74. package/v2Containers/WebPush/Create/preview/components/NotificationHeader.js +55 -0
  75. package/v2Containers/WebPush/Create/preview/components/WindowsChromeExpanded.js +70 -0
  76. package/v2Containers/WebPush/Create/preview/components/tests/AndroidMobileExpanded.test.js +512 -0
  77. package/v2Containers/WebPush/Create/preview/components/tests/__snapshots__/AndroidMobileExpanded.test.js.snap +77 -0
  78. package/v2Containers/WebPush/Create/preview/config/notificationMappings.js +527 -0
  79. package/v2Containers/WebPush/Create/preview/constants.js +162 -0
  80. package/v2Containers/WebPush/Create/preview/notification-container.scss +104 -0
  81. package/v2Containers/WebPush/Create/preview/preview.scss +409 -0
  82. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-chrome.scss +300 -0
  83. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-edge.scss +12 -0
  84. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-firefox.scss +12 -0
  85. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-opera.scss +12 -0
  86. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-chrome.scss +303 -0
  87. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-edge.scss +11 -0
  88. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-firefox.scss +11 -0
  89. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-opera.scss +11 -0
  90. package/v2Containers/WebPush/Create/preview/styles/_base.scss +188 -0
  91. package/v2Containers/WebPush/Create/preview/styles/_ios.scss +106 -0
  92. package/v2Containers/WebPush/Create/preview/styles/_ipados.scss +107 -0
  93. package/v2Containers/WebPush/Create/preview/styles/_macos-chrome.scss +75 -0
  94. package/v2Containers/WebPush/Create/preview/styles/_windows-chrome.scss +174 -0
  95. package/v2Containers/WebPush/Create/preview/tests/DevicePreviewContent.test.js +909 -0
  96. package/v2Containers/WebPush/Create/preview/tests/NotificationContainer.test.js +1077 -0
  97. package/v2Containers/WebPush/Create/preview/tests/PreviewControls.test.js +723 -0
  98. package/v2Containers/WebPush/Create/preview/tests/WebPushPreview.test.js +943 -0
  99. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/DevicePreviewContent.test.js.snap +128 -0
  100. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/NotificationContainer.test.js.snap +121 -0
  101. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/PreviewControls.test.js.snap +144 -0
  102. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/WebPushPreview.test.js.snap +127 -0
  103. package/v2Containers/WebPush/Create/utils/urlValidation.js +116 -0
  104. package/v2Containers/WebPush/Create/utils/urlValidation.test.js +449 -0
  105. package/v2Containers/WebPush/actions.js +60 -0
  106. package/v2Containers/WebPush/constants.js +108 -0
  107. package/v2Containers/WebPush/index.js +2 -0
  108. package/v2Containers/WebPush/reducer.js +104 -0
  109. package/v2Containers/WebPush/sagas.js +119 -0
  110. package/v2Containers/WebPush/selectors.js +65 -0
  111. package/v2Containers/WebPush/tests/reducer.test.js +863 -0
  112. package/v2Containers/WebPush/tests/sagas.test.js +566 -0
  113. package/v2Containers/WebPush/tests/selectors.test.js +960 -0
  114. package/v2Containers/Whatsapp/constants.js +9 -0
  115. package/v2Containers/Whatsapp/reducer.js +34 -5
  116. package/v2Containers/Whatsapp/sagas.js +61 -10
  117. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +132 -0
  118. package/v2Containers/Whatsapp/tests/reducer.test.js +188 -0
  119. package/v2Containers/Whatsapp/tests/saga.test.js +420 -7
@@ -0,0 +1,666 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`ButtonForm Cancel Button should show "Cancel" text when in edit mode 1`] = `
4
+ <div
5
+ className="webpush-button-form"
6
+ onKeyDown={[Function]}
7
+ >
8
+ <CapRow
9
+ className="button-form-row"
10
+ >
11
+ <CapHeading
12
+ className="button-form-heading"
13
+ type="h4"
14
+ >
15
+ <FormattedMessage
16
+ defaultMessage="Button text"
17
+ id="creatives.containersV2.WebPush.buttonText"
18
+ values={Object {}}
19
+ />
20
+ </CapHeading>
21
+ <div
22
+ className="button-form-field"
23
+ >
24
+ <_Class
25
+ help=""
26
+ id="webpush-button-text-input-primary"
27
+ labelPosition="top"
28
+ maxLength={20}
29
+ onChange={[Function]}
30
+ size="default"
31
+ status=""
32
+ suffix={
33
+ <span
34
+ className="button-character-count-suffix"
35
+ >
36
+ 0/20
37
+ </span>
38
+ }
39
+ value=""
40
+ />
41
+ </div>
42
+ </CapRow>
43
+ <CapRow
44
+ className="button-form-row"
45
+ >
46
+ <CapHeading
47
+ className="button-form-heading"
48
+ type="h4"
49
+ >
50
+ <FormattedMessage
51
+ defaultMessage="URL"
52
+ id="creatives.containersV2.WebPush.buttonUrlLabel"
53
+ values={Object {}}
54
+ />
55
+ </CapHeading>
56
+ <_Class
57
+ help=""
58
+ id="webpush-button-url-input-primary"
59
+ labelPosition="top"
60
+ onChange={[Function]}
61
+ size="default"
62
+ status=""
63
+ value=""
64
+ />
65
+ </CapRow>
66
+ <CapRow
67
+ className="button-form-actions"
68
+ >
69
+ <CapButton
70
+ className="button-form-save"
71
+ disabled={true}
72
+ isAddBtn={false}
73
+ onClick={[Function]}
74
+ type="primary"
75
+ >
76
+ <FormattedMessage
77
+ defaultMessage="Save"
78
+ id="creatives.containersV2.WebPush.saveButton"
79
+ values={Object {}}
80
+ />
81
+ </CapButton>
82
+ <CapButton
83
+ className="button-form-cancel"
84
+ isAddBtn={false}
85
+ onClick={[Function]}
86
+ type="secondary"
87
+ >
88
+ <FormattedMessage
89
+ defaultMessage="Cancel"
90
+ id="creatives.containersV2.WebPush.cancelButton"
91
+ values={Object {}}
92
+ />
93
+ </CapButton>
94
+ </CapRow>
95
+ </div>
96
+ `;
97
+
98
+ exports[`ButtonForm Cancel Button should show "Delete" text when not in edit mode 1`] = `
99
+ <div
100
+ className="webpush-button-form"
101
+ onKeyDown={[Function]}
102
+ >
103
+ <CapRow
104
+ className="button-form-row"
105
+ >
106
+ <CapHeading
107
+ className="button-form-heading"
108
+ type="h4"
109
+ >
110
+ <FormattedMessage
111
+ defaultMessage="Button text"
112
+ id="creatives.containersV2.WebPush.buttonText"
113
+ values={Object {}}
114
+ />
115
+ </CapHeading>
116
+ <div
117
+ className="button-form-field"
118
+ >
119
+ <_Class
120
+ help=""
121
+ id="webpush-button-text-input-primary"
122
+ labelPosition="top"
123
+ maxLength={20}
124
+ onChange={[Function]}
125
+ size="default"
126
+ status=""
127
+ suffix={
128
+ <span
129
+ className="button-character-count-suffix"
130
+ >
131
+ 0/20
132
+ </span>
133
+ }
134
+ value=""
135
+ />
136
+ </div>
137
+ </CapRow>
138
+ <CapRow
139
+ className="button-form-row"
140
+ >
141
+ <CapHeading
142
+ className="button-form-heading"
143
+ type="h4"
144
+ >
145
+ <FormattedMessage
146
+ defaultMessage="URL"
147
+ id="creatives.containersV2.WebPush.buttonUrlLabel"
148
+ values={Object {}}
149
+ />
150
+ </CapHeading>
151
+ <_Class
152
+ help=""
153
+ id="webpush-button-url-input-primary"
154
+ labelPosition="top"
155
+ onChange={[Function]}
156
+ size="default"
157
+ status=""
158
+ value=""
159
+ />
160
+ </CapRow>
161
+ <CapRow
162
+ className="button-form-actions"
163
+ >
164
+ <CapButton
165
+ className="button-form-save"
166
+ disabled={true}
167
+ isAddBtn={false}
168
+ onClick={[Function]}
169
+ type="primary"
170
+ >
171
+ <FormattedMessage
172
+ defaultMessage="Save"
173
+ id="creatives.containersV2.WebPush.saveButton"
174
+ values={Object {}}
175
+ />
176
+ </CapButton>
177
+ <CapButton
178
+ className="button-form-cancel"
179
+ isAddBtn={false}
180
+ onClick={[Function]}
181
+ type="secondary"
182
+ >
183
+ <FormattedMessage
184
+ defaultMessage="Delete"
185
+ id="creatives.containersV2.WebPush.deleteButton"
186
+ values={Object {}}
187
+ />
188
+ </CapButton>
189
+ </CapRow>
190
+ </div>
191
+ `;
192
+
193
+ exports[`ButtonForm Rendering should render correctly for primary button type 1`] = `
194
+ <div
195
+ className="webpush-button-form"
196
+ onKeyDown={[Function]}
197
+ >
198
+ <CapRow
199
+ className="button-form-row"
200
+ >
201
+ <CapHeading
202
+ className="button-form-heading"
203
+ type="h4"
204
+ >
205
+ <FormattedMessage
206
+ defaultMessage="Button text"
207
+ id="creatives.containersV2.WebPush.buttonText"
208
+ values={Object {}}
209
+ />
210
+ </CapHeading>
211
+ <div
212
+ className="button-form-field"
213
+ >
214
+ <_Class
215
+ help=""
216
+ id="webpush-button-text-input-primary"
217
+ labelPosition="top"
218
+ maxLength={20}
219
+ onChange={[Function]}
220
+ size="default"
221
+ status=""
222
+ suffix={
223
+ <span
224
+ className="button-character-count-suffix"
225
+ >
226
+ 0/20
227
+ </span>
228
+ }
229
+ value=""
230
+ />
231
+ </div>
232
+ </CapRow>
233
+ <CapRow
234
+ className="button-form-row"
235
+ >
236
+ <CapHeading
237
+ className="button-form-heading"
238
+ type="h4"
239
+ >
240
+ <FormattedMessage
241
+ defaultMessage="URL"
242
+ id="creatives.containersV2.WebPush.buttonUrlLabel"
243
+ values={Object {}}
244
+ />
245
+ </CapHeading>
246
+ <_Class
247
+ help=""
248
+ id="webpush-button-url-input-primary"
249
+ labelPosition="top"
250
+ onChange={[Function]}
251
+ size="default"
252
+ status=""
253
+ value=""
254
+ />
255
+ </CapRow>
256
+ <CapRow
257
+ className="button-form-actions"
258
+ >
259
+ <CapButton
260
+ className="button-form-save"
261
+ disabled={true}
262
+ isAddBtn={false}
263
+ onClick={[Function]}
264
+ type="primary"
265
+ >
266
+ <FormattedMessage
267
+ defaultMessage="Save"
268
+ id="creatives.containersV2.WebPush.saveButton"
269
+ values={Object {}}
270
+ />
271
+ </CapButton>
272
+ <CapButton
273
+ className="button-form-cancel"
274
+ isAddBtn={false}
275
+ onClick={[Function]}
276
+ type="secondary"
277
+ >
278
+ <FormattedMessage
279
+ defaultMessage="Delete"
280
+ id="creatives.containersV2.WebPush.deleteButton"
281
+ values={Object {}}
282
+ />
283
+ </CapButton>
284
+ </CapRow>
285
+ </div>
286
+ `;
287
+
288
+ exports[`ButtonForm Rendering should render correctly for secondary button type 1`] = `
289
+ <div
290
+ className="webpush-button-form"
291
+ onKeyDown={[Function]}
292
+ >
293
+ <CapRow
294
+ className="button-form-row"
295
+ >
296
+ <CapHeading
297
+ className="button-form-heading"
298
+ type="h4"
299
+ >
300
+ <FormattedMessage
301
+ defaultMessage="Button text"
302
+ id="creatives.containersV2.WebPush.buttonText"
303
+ values={Object {}}
304
+ />
305
+ </CapHeading>
306
+ <div
307
+ className="button-form-field"
308
+ >
309
+ <_Class
310
+ help=""
311
+ id="webpush-button-text-input-secondary"
312
+ labelPosition="top"
313
+ maxLength={20}
314
+ onChange={[Function]}
315
+ size="default"
316
+ status=""
317
+ suffix={
318
+ <span
319
+ className="button-character-count-suffix"
320
+ >
321
+ 0/20
322
+ </span>
323
+ }
324
+ value=""
325
+ />
326
+ </div>
327
+ </CapRow>
328
+ <CapRow
329
+ className="button-form-row"
330
+ >
331
+ <CapHeading
332
+ className="button-form-heading"
333
+ type="h4"
334
+ >
335
+ <FormattedMessage
336
+ defaultMessage="URL"
337
+ id="creatives.containersV2.WebPush.buttonUrlLabel"
338
+ values={Object {}}
339
+ />
340
+ </CapHeading>
341
+ <_Class
342
+ help=""
343
+ id="webpush-button-url-input-secondary"
344
+ labelPosition="top"
345
+ onChange={[Function]}
346
+ size="default"
347
+ status=""
348
+ value=""
349
+ />
350
+ </CapRow>
351
+ <CapRow
352
+ className="button-form-actions"
353
+ >
354
+ <CapButton
355
+ className="button-form-save"
356
+ disabled={true}
357
+ isAddBtn={false}
358
+ onClick={[Function]}
359
+ type="primary"
360
+ >
361
+ <FormattedMessage
362
+ defaultMessage="Save"
363
+ id="creatives.containersV2.WebPush.saveButton"
364
+ values={Object {}}
365
+ />
366
+ </CapButton>
367
+ <CapButton
368
+ className="button-form-cancel"
369
+ isAddBtn={false}
370
+ onClick={[Function]}
371
+ type="secondary"
372
+ >
373
+ <FormattedMessage
374
+ defaultMessage="Delete"
375
+ id="creatives.containersV2.WebPush.deleteButton"
376
+ values={Object {}}
377
+ />
378
+ </CapButton>
379
+ </CapRow>
380
+ </div>
381
+ `;
382
+
383
+ exports[`ButtonForm Rendering should render correctly in edit mode 1`] = `
384
+ <div
385
+ className="webpush-button-form"
386
+ onKeyDown={[Function]}
387
+ >
388
+ <CapRow
389
+ className="button-form-row"
390
+ >
391
+ <CapHeading
392
+ className="button-form-heading"
393
+ type="h4"
394
+ >
395
+ <FormattedMessage
396
+ defaultMessage="Button text"
397
+ id="creatives.containersV2.WebPush.buttonText"
398
+ values={Object {}}
399
+ />
400
+ </CapHeading>
401
+ <div
402
+ className="button-form-field"
403
+ >
404
+ <_Class
405
+ help=""
406
+ id="webpush-button-text-input-primary"
407
+ labelPosition="top"
408
+ maxLength={20}
409
+ onChange={[Function]}
410
+ size="default"
411
+ status=""
412
+ suffix={
413
+ <span
414
+ className="button-character-count-suffix"
415
+ >
416
+ 0/20
417
+ </span>
418
+ }
419
+ value=""
420
+ />
421
+ </div>
422
+ </CapRow>
423
+ <CapRow
424
+ className="button-form-row"
425
+ >
426
+ <CapHeading
427
+ className="button-form-heading"
428
+ type="h4"
429
+ >
430
+ <FormattedMessage
431
+ defaultMessage="URL"
432
+ id="creatives.containersV2.WebPush.buttonUrlLabel"
433
+ values={Object {}}
434
+ />
435
+ </CapHeading>
436
+ <_Class
437
+ help=""
438
+ id="webpush-button-url-input-primary"
439
+ labelPosition="top"
440
+ onChange={[Function]}
441
+ size="default"
442
+ status=""
443
+ value=""
444
+ />
445
+ </CapRow>
446
+ <CapRow
447
+ className="button-form-actions"
448
+ >
449
+ <CapButton
450
+ className="button-form-save"
451
+ disabled={true}
452
+ isAddBtn={false}
453
+ onClick={[Function]}
454
+ type="primary"
455
+ >
456
+ <FormattedMessage
457
+ defaultMessage="Save"
458
+ id="creatives.containersV2.WebPush.saveButton"
459
+ values={Object {}}
460
+ />
461
+ </CapButton>
462
+ <CapButton
463
+ className="button-form-cancel"
464
+ isAddBtn={false}
465
+ onClick={[Function]}
466
+ type="secondary"
467
+ >
468
+ <FormattedMessage
469
+ defaultMessage="Cancel"
470
+ id="creatives.containersV2.WebPush.cancelButton"
471
+ values={Object {}}
472
+ />
473
+ </CapButton>
474
+ </CapRow>
475
+ </div>
476
+ `;
477
+
478
+ exports[`ButtonForm Rendering should render correctly with default props 1`] = `
479
+ <div
480
+ className="webpush-button-form"
481
+ onKeyDown={[Function]}
482
+ >
483
+ <CapRow
484
+ className="button-form-row"
485
+ >
486
+ <CapHeading
487
+ className="button-form-heading"
488
+ type="h4"
489
+ >
490
+ <FormattedMessage
491
+ defaultMessage="Button text"
492
+ id="creatives.containersV2.WebPush.buttonText"
493
+ values={Object {}}
494
+ />
495
+ </CapHeading>
496
+ <div
497
+ className="button-form-field"
498
+ >
499
+ <_Class
500
+ help=""
501
+ id="webpush-button-text-input-primary"
502
+ labelPosition="top"
503
+ maxLength={20}
504
+ onChange={[Function]}
505
+ size="default"
506
+ status=""
507
+ suffix={
508
+ <span
509
+ className="button-character-count-suffix"
510
+ >
511
+ 0/20
512
+ </span>
513
+ }
514
+ value=""
515
+ />
516
+ </div>
517
+ </CapRow>
518
+ <CapRow
519
+ className="button-form-row"
520
+ >
521
+ <CapHeading
522
+ className="button-form-heading"
523
+ type="h4"
524
+ >
525
+ <FormattedMessage
526
+ defaultMessage="URL"
527
+ id="creatives.containersV2.WebPush.buttonUrlLabel"
528
+ values={Object {}}
529
+ />
530
+ </CapHeading>
531
+ <_Class
532
+ help=""
533
+ id="webpush-button-url-input-primary"
534
+ labelPosition="top"
535
+ onChange={[Function]}
536
+ size="default"
537
+ status=""
538
+ value=""
539
+ />
540
+ </CapRow>
541
+ <CapRow
542
+ className="button-form-actions"
543
+ >
544
+ <CapButton
545
+ className="button-form-save"
546
+ disabled={true}
547
+ isAddBtn={false}
548
+ onClick={[Function]}
549
+ type="primary"
550
+ >
551
+ <FormattedMessage
552
+ defaultMessage="Save"
553
+ id="creatives.containersV2.WebPush.saveButton"
554
+ values={Object {}}
555
+ />
556
+ </CapButton>
557
+ <CapButton
558
+ className="button-form-cancel"
559
+ isAddBtn={false}
560
+ onClick={[Function]}
561
+ type="secondary"
562
+ >
563
+ <FormattedMessage
564
+ defaultMessage="Delete"
565
+ id="creatives.containersV2.WebPush.deleteButton"
566
+ values={Object {}}
567
+ />
568
+ </CapButton>
569
+ </CapRow>
570
+ </div>
571
+ `;
572
+
573
+ exports[`ButtonForm Rendering should render correctly with initial data 1`] = `
574
+ <div
575
+ className="webpush-button-form"
576
+ onKeyDown={[Function]}
577
+ >
578
+ <CapRow
579
+ className="button-form-row"
580
+ >
581
+ <CapHeading
582
+ className="button-form-heading"
583
+ type="h4"
584
+ >
585
+ <FormattedMessage
586
+ defaultMessage="Button text"
587
+ id="creatives.containersV2.WebPush.buttonText"
588
+ values={Object {}}
589
+ />
590
+ </CapHeading>
591
+ <div
592
+ className="button-form-field"
593
+ >
594
+ <_Class
595
+ help=""
596
+ id="webpush-button-text-input-primary"
597
+ labelPosition="top"
598
+ maxLength={20}
599
+ onChange={[Function]}
600
+ size="default"
601
+ status=""
602
+ suffix={
603
+ <span
604
+ className="button-character-count-suffix"
605
+ >
606
+ 8/20
607
+ </span>
608
+ }
609
+ value="Click me"
610
+ />
611
+ </div>
612
+ </CapRow>
613
+ <CapRow
614
+ className="button-form-row"
615
+ >
616
+ <CapHeading
617
+ className="button-form-heading"
618
+ type="h4"
619
+ >
620
+ <FormattedMessage
621
+ defaultMessage="URL"
622
+ id="creatives.containersV2.WebPush.buttonUrlLabel"
623
+ values={Object {}}
624
+ />
625
+ </CapHeading>
626
+ <_Class
627
+ help=""
628
+ id="webpush-button-url-input-primary"
629
+ labelPosition="top"
630
+ onChange={[Function]}
631
+ size="default"
632
+ status=""
633
+ value="https://example.com"
634
+ />
635
+ </CapRow>
636
+ <CapRow
637
+ className="button-form-actions"
638
+ >
639
+ <CapButton
640
+ className="button-form-save"
641
+ disabled=""
642
+ isAddBtn={false}
643
+ onClick={[Function]}
644
+ type="primary"
645
+ >
646
+ <FormattedMessage
647
+ defaultMessage="Save"
648
+ id="creatives.containersV2.WebPush.saveButton"
649
+ values={Object {}}
650
+ />
651
+ </CapButton>
652
+ <CapButton
653
+ className="button-form-cancel"
654
+ isAddBtn={false}
655
+ onClick={[Function]}
656
+ type="secondary"
657
+ >
658
+ <FormattedMessage
659
+ defaultMessage="Delete"
660
+ id="creatives.containersV2.WebPush.deleteButton"
661
+ values={Object {}}
662
+ />
663
+ </CapButton>
664
+ </CapRow>
665
+ </div>
666
+ `;