@capillarytech/creatives-library 8.0.125 → 8.0.127-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 (110) hide show
  1. package/config/app.js +6 -0
  2. package/containers/App/constants.js +1 -0
  3. package/index.html +3 -1
  4. package/initialReducer.js +2 -0
  5. package/package.json +1 -1
  6. package/services/api.js +94 -1
  7. package/services/tests/api.test.js +191 -0
  8. package/tests/integration/TemplateCreation/TemplateCreation.integration.test.js +8 -3
  9. package/tests/integration/TemplateCreation/api-response.js +5 -0
  10. package/tests/integration/TemplateCreation/msw-handler.js +42 -63
  11. package/utils/common.js +7 -0
  12. package/utils/commonUtils.js +2 -6
  13. package/utils/createPayload.js +272 -0
  14. package/utils/tests/createPayload.test.js +761 -0
  15. package/v2Components/CapImageUpload/index.js +59 -46
  16. package/v2Components/CapInAppCTA/index.js +1 -0
  17. package/v2Components/CapMpushCTA/constants.js +25 -0
  18. package/v2Components/CapMpushCTA/index.js +332 -0
  19. package/v2Components/CapMpushCTA/index.scss +95 -0
  20. package/v2Components/CapMpushCTA/messages.js +89 -0
  21. package/v2Components/CapTagList/index.js +177 -120
  22. package/v2Components/CapVideoUpload/constants.js +3 -0
  23. package/v2Components/CapVideoUpload/index.js +167 -110
  24. package/v2Components/CapVideoUpload/messages.js +16 -0
  25. package/v2Components/Carousel/index.js +15 -13
  26. package/v2Components/CustomerSearchSection/_customerSearch.scss +309 -0
  27. package/v2Components/CustomerSearchSection/constants.js +5 -0
  28. package/v2Components/CustomerSearchSection/index.js +367 -0
  29. package/v2Components/CustomerSearchSection/messages.js +20 -0
  30. package/v2Components/CustomerSearchSection/tests/utils.test.js +334 -0
  31. package/v2Components/CustomerSearchSection/utils.js +49 -0
  32. package/v2Components/ErrorInfoNote/style.scss +1 -0
  33. package/v2Components/MobilePushPreviewV2/index.js +37 -5
  34. package/v2Components/TemplatePreview/_templatePreview.scss +114 -72
  35. package/v2Components/TemplatePreview/assets/images/Android _ With date and time.svg +29 -0
  36. package/v2Components/TemplatePreview/assets/images/android.svg +9 -0
  37. package/v2Components/TemplatePreview/assets/images/iOS _ With date and time.svg +26 -0
  38. package/v2Components/TemplatePreview/assets/images/ios.svg +9 -0
  39. package/v2Components/TemplatePreview/index.js +178 -50
  40. package/v2Components/TemplatePreview/messages.js +4 -0
  41. package/v2Components/TestAndPreviewSlidebox/CustomValuesEditor.js +169 -0
  42. package/v2Components/TestAndPreviewSlidebox/LeftPanelContent.js +95 -0
  43. package/v2Components/TestAndPreviewSlidebox/PreviewSection.js +69 -0
  44. package/v2Components/TestAndPreviewSlidebox/SendTestMessage.js +68 -0
  45. package/v2Components/TestAndPreviewSlidebox/_testAndPreviewSlidebox.scss +543 -0
  46. package/v2Components/TestAndPreviewSlidebox/actions.js +67 -0
  47. package/v2Components/TestAndPreviewSlidebox/constants.js +67 -0
  48. package/v2Components/TestAndPreviewSlidebox/index.js +592 -0
  49. package/v2Components/TestAndPreviewSlidebox/messages.js +147 -0
  50. package/v2Components/TestAndPreviewSlidebox/reducer.js +233 -0
  51. package/v2Components/TestAndPreviewSlidebox/sagas.js +258 -0
  52. package/v2Components/TestAndPreviewSlidebox/selectors.js +142 -0
  53. package/v2Components/TestAndPreviewSlidebox/tests/CustomValuesEditor.test.js +425 -0
  54. package/v2Components/TestAndPreviewSlidebox/tests/LeftPanelContent.test.js +400 -0
  55. package/v2Components/TestAndPreviewSlidebox/tests/SendTestMessage.test.js +448 -0
  56. package/v2Components/TestAndPreviewSlidebox/tests/actions.test.js +80 -0
  57. package/v2Components/TestAndPreviewSlidebox/tests/reducer.test.js +367 -0
  58. package/v2Components/TestAndPreviewSlidebox/tests/saga.rtl.test.js +192 -0
  59. package/v2Components/TestAndPreviewSlidebox/tests/saga.test.js +652 -0
  60. package/v2Components/TestAndPreviewSlidebox/tests/selector.test.js +182 -0
  61. package/v2Containers/CreativesContainer/SlideBoxContent.js +22 -10
  62. package/v2Containers/CreativesContainer/SlideBoxFooter.js +23 -2
  63. package/v2Containers/CreativesContainer/index.js +216 -136
  64. package/v2Containers/CreativesContainer/messages.js +4 -0
  65. package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +21 -0
  66. package/v2Containers/Email/index.js +27 -2
  67. package/v2Containers/EmailWrapper/hooks/useEmailWrapper.js +10 -0
  68. package/v2Containers/EmailWrapper/index.js +6 -0
  69. package/v2Containers/InApp/constants.js +1 -0
  70. package/v2Containers/InApp/index.js +13 -13
  71. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +3 -0
  72. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +2 -0
  73. package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +2 -0
  74. package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +9 -0
  75. package/v2Containers/MobilePush/Create/index.js +1 -0
  76. package/v2Containers/MobilePush/commonMethods.js +7 -14
  77. package/v2Containers/MobilePushNew/actions.js +116 -0
  78. package/v2Containers/MobilePushNew/components/CtaButtons.js +170 -0
  79. package/v2Containers/MobilePushNew/components/MediaUploaders.js +754 -0
  80. package/v2Containers/MobilePushNew/components/PlatformContentFields.js +279 -0
  81. package/v2Containers/MobilePushNew/components/index.js +5 -0
  82. package/v2Containers/MobilePushNew/components/tests/CtaButtons.test.js +779 -0
  83. package/v2Containers/MobilePushNew/components/tests/MediaUploaders.test.js +2114 -0
  84. package/v2Containers/MobilePushNew/components/tests/PlatformContentFields.test.js +343 -0
  85. package/v2Containers/MobilePushNew/constants.js +115 -0
  86. package/v2Containers/MobilePushNew/hooks/tests/usePlatformSync.test.js +1299 -0
  87. package/v2Containers/MobilePushNew/hooks/tests/useUpload.test.js +1223 -0
  88. package/v2Containers/MobilePushNew/hooks/usePlatformSync.js +246 -0
  89. package/v2Containers/MobilePushNew/hooks/useUpload.js +726 -0
  90. package/v2Containers/MobilePushNew/index.js +2280 -0
  91. package/v2Containers/MobilePushNew/index.scss +308 -0
  92. package/v2Containers/MobilePushNew/messages.js +226 -0
  93. package/v2Containers/MobilePushNew/reducer.js +160 -0
  94. package/v2Containers/MobilePushNew/sagas.js +198 -0
  95. package/v2Containers/MobilePushNew/selectors.js +55 -0
  96. package/v2Containers/MobilePushNew/tests/reducer.test.js +741 -0
  97. package/v2Containers/MobilePushNew/tests/sagas.test.js +863 -0
  98. package/v2Containers/MobilePushNew/tests/selectors.test.js +425 -0
  99. package/v2Containers/MobilePushNew/tests/utils.test.js +322 -0
  100. package/v2Containers/MobilePushNew/utils.js +33 -0
  101. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +23 -5
  102. package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +4 -0
  103. package/v2Containers/TagList/index.js +56 -10
  104. package/v2Containers/Templates/_templates.scss +101 -1
  105. package/v2Containers/Templates/index.js +147 -35
  106. package/v2Containers/Templates/messages.js +8 -0
  107. package/v2Containers/Templates/sagas.js +2 -0
  108. package/v2Containers/Whatsapp/constants.js +1 -0
  109. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +35 -0
  110. package/v2Containers/Email/tests/index.test.js +0 -35
@@ -2282,6 +2282,7 @@ new message content.",
2282
2282
  "gallery": [Function],
2283
2283
  "language": [Function],
2284
2284
  "navigationConfig": [Function],
2285
+ "previewAndTest": [Function],
2285
2286
  "tagList": [Function],
2286
2287
  "templates": [Function],
2287
2288
  },
@@ -19159,6 +19160,7 @@ new message content.",
19159
19160
  "gallery": [Function],
19160
19161
  "language": [Function],
19161
19162
  "navigationConfig": [Function],
19163
+ "previewAndTest": [Function],
19162
19164
  "tagList": [Function],
19163
19165
  "templates": [Function],
19164
19166
  },
@@ -36000,6 +36002,7 @@ new message content.",
36000
36002
  "gallery": [Function],
36001
36003
  "language": [Function],
36002
36004
  "navigationConfig": [Function],
36005
+ "previewAndTest": [Function],
36003
36006
  "tagList": [Function],
36004
36007
  "templates": [Function],
36005
36008
  },
@@ -54761,6 +54764,7 @@ new message content.",
54761
54764
  "gallery": [Function],
54762
54765
  "language": [Function],
54763
54766
  "navigationConfig": [Function],
54767
+ "previewAndTest": [Function],
54764
54768
  "tagList": [Function],
54765
54769
  "templates": [Function],
54766
54770
  },
@@ -73740,6 +73744,7 @@ new message content.",
73740
73744
  "gallery": [Function],
73741
73745
  "language": [Function],
73742
73746
  "navigationConfig": [Function],
73747
+ "previewAndTest": [Function],
73743
73748
  "tagList": [Function],
73744
73749
  "templates": [Function],
73745
73750
  },
@@ -93476,6 +93481,7 @@ new message content.",
93476
93481
  "gallery": [Function],
93477
93482
  "language": [Function],
93478
93483
  "navigationConfig": [Function],
93484
+ "previewAndTest": [Function],
93479
93485
  "tagList": [Function],
93480
93486
  "templates": [Function],
93481
93487
  },
@@ -110327,6 +110333,7 @@ new message content.",
110327
110333
  "gallery": [Function],
110328
110334
  "language": [Function],
110329
110335
  "navigationConfig": [Function],
110336
+ "previewAndTest": [Function],
110330
110337
  "tagList": [Function],
110331
110338
  "templates": [Function],
110332
110339
  },
@@ -127168,6 +127175,7 @@ new message content.",
127168
127175
  "gallery": [Function],
127169
127176
  "language": [Function],
127170
127177
  "navigationConfig": [Function],
127178
+ "previewAndTest": [Function],
127171
127179
  "tagList": [Function],
127172
127180
  "templates": [Function],
127173
127181
  },
@@ -146481,6 +146489,7 @@ new message content.",
146481
146489
  "gallery": [Function],
146482
146490
  "language": [Function],
146483
146491
  "navigationConfig": [Function],
146492
+ "previewAndTest": [Function],
146484
146493
  "tagList": [Function],
146485
146494
  "templates": [Function],
146486
146495
  },
@@ -166012,6 +166021,7 @@ new message content.",
166012
166021
  "gallery": [Function],
166013
166022
  "language": [Function],
166014
166023
  "navigationConfig": [Function],
166024
+ "previewAndTest": [Function],
166015
166025
  "tagList": [Function],
166016
166026
  "templates": [Function],
166017
166027
  },
@@ -186300,6 +186310,7 @@ new message content.",
186300
186310
  "gallery": [Function],
186301
186311
  "language": [Function],
186302
186312
  "navigationConfig": [Function],
186313
+ "previewAndTest": [Function],
186303
186314
  "tagList": [Function],
186304
186315
  "templates": [Function],
186305
186316
  },
@@ -206800,6 +206811,7 @@ new message content.",
206800
206811
  "gallery": [Function],
206801
206812
  "language": [Function],
206802
206813
  "navigationConfig": [Function],
206814
+ "previewAndTest": [Function],
206803
206815
  "tagList": [Function],
206804
206816
  "templates": [Function],
206805
206817
  },
@@ -217635,6 +217647,7 @@ new message content.",
217635
217647
  "gallery": [Function],
217636
217648
  "language": [Function],
217637
217649
  "navigationConfig": [Function],
217650
+ "previewAndTest": [Function],
217638
217651
  "tagList": [Function],
217639
217652
  "templates": [Function],
217640
217653
  },
@@ -225755,6 +225768,7 @@ new message content.",
225755
225768
  "gallery": [Function],
225756
225769
  "language": [Function],
225757
225770
  "navigationConfig": [Function],
225771
+ "previewAndTest": [Function],
225758
225772
  "tagList": [Function],
225759
225773
  "templates": [Function],
225760
225774
  },
@@ -234311,6 +234325,7 @@ new message content.",
234311
234325
  "gallery": [Function],
234312
234326
  "language": [Function],
234313
234327
  "navigationConfig": [Function],
234328
+ "previewAndTest": [Function],
234314
234329
  "tagList": [Function],
234315
234330
  "templates": [Function],
234316
234331
  },
@@ -247589,6 +247604,7 @@ new message content.",
247589
247604
  "gallery": [Function],
247590
247605
  "language": [Function],
247591
247606
  "navigationConfig": [Function],
247607
+ "previewAndTest": [Function],
247592
247608
  "tagList": [Function],
247593
247609
  "templates": [Function],
247594
247610
  },
@@ -262217,6 +262233,7 @@ new message content.",
262217
262233
  "gallery": [Function],
262218
262234
  "language": [Function],
262219
262235
  "navigationConfig": [Function],
262236
+ "previewAndTest": [Function],
262220
262237
  "tagList": [Function],
262221
262238
  "templates": [Function],
262222
262239
  },
@@ -273385,6 +273402,7 @@ new message content.",
273385
273402
  "gallery": [Function],
273386
273403
  "language": [Function],
273387
273404
  "navigationConfig": [Function],
273405
+ "previewAndTest": [Function],
273388
273406
  "tagList": [Function],
273389
273407
  "templates": [Function],
273390
273408
  },
@@ -290226,6 +290244,7 @@ new message content.",
290226
290244
  "gallery": [Function],
290227
290245
  "language": [Function],
290228
290246
  "navigationConfig": [Function],
290247
+ "previewAndTest": [Function],
290229
290248
  "tagList": [Function],
290230
290249
  "templates": [Function],
290231
290250
  },
@@ -309539,6 +309558,7 @@ new message content.",
309539
309558
  "gallery": [Function],
309540
309559
  "language": [Function],
309541
309560
  "navigationConfig": [Function],
309561
+ "previewAndTest": [Function],
309542
309562
  "tagList": [Function],
309543
309563
  "templates": [Function],
309544
309564
  },
@@ -326380,6 +326400,7 @@ new message content.",
326380
326400
  "gallery": [Function],
326381
326401
  "language": [Function],
326382
326402
  "navigationConfig": [Function],
326403
+ "previewAndTest": [Function],
326383
326404
  "tagList": [Function],
326384
326405
  "templates": [Function],
326385
326406
  },
@@ -343447,6 +343468,7 @@ new message content.",
343447
343468
  "gallery": [Function],
343448
343469
  "language": [Function],
343449
343470
  "navigationConfig": [Function],
343471
+ "previewAndTest": [Function],
343450
343472
  "tagList": [Function],
343451
343473
  "templates": [Function],
343452
343474
  },
@@ -360754,6 +360776,7 @@ new message content.",
360754
360776
  "gallery": [Function],
360755
360777
  "language": [Function],
360756
360778
  "navigationConfig": [Function],
360779
+ "previewAndTest": [Function],
360757
360780
  "tagList": [Function],
360758
360781
  "templates": [Function],
360759
360782
  },
@@ -378287,6 +378310,7 @@ new message content.",
378287
378310
  "gallery": [Function],
378288
378311
  "language": [Function],
378289
378312
  "navigationConfig": [Function],
378313
+ "previewAndTest": [Function],
378290
378314
  "tagList": [Function],
378291
378315
  "templates": [Function],
378292
378316
  },
@@ -396061,6 +396085,7 @@ new message content.",
396061
396085
  "gallery": [Function],
396062
396086
  "language": [Function],
396063
396087
  "navigationConfig": [Function],
396088
+ "previewAndTest": [Function],
396064
396089
  "tagList": [Function],
396065
396090
  "templates": [Function],
396066
396091
  },
@@ -414075,6 +414100,7 @@ new message content.",
414075
414100
  "gallery": [Function],
414076
414101
  "language": [Function],
414077
414102
  "navigationConfig": [Function],
414103
+ "previewAndTest": [Function],
414078
414104
  "tagList": [Function],
414079
414105
  "templates": [Function],
414080
414106
  },
@@ -432326,6 +432352,7 @@ new message content.",
432326
432352
  "gallery": [Function],
432327
432353
  "language": [Function],
432328
432354
  "navigationConfig": [Function],
432355
+ "previewAndTest": [Function],
432329
432356
  "tagList": [Function],
432330
432357
  "templates": [Function],
432331
432358
  },
@@ -450814,6 +450841,7 @@ new message content.",
450814
450841
  "gallery": [Function],
450815
450842
  "language": [Function],
450816
450843
  "navigationConfig": [Function],
450844
+ "previewAndTest": [Function],
450817
450845
  "tagList": [Function],
450818
450846
  "templates": [Function],
450819
450847
  },
@@ -469540,6 +469568,7 @@ new message content.",
469540
469568
  "gallery": [Function],
469541
469569
  "language": [Function],
469542
469570
  "navigationConfig": [Function],
469571
+ "previewAndTest": [Function],
469543
469572
  "tagList": [Function],
469544
469573
  "templates": [Function],
469545
469574
  },
@@ -486628,6 +486657,7 @@ new message content.",
486628
486657
  "gallery": [Function],
486629
486658
  "language": [Function],
486630
486659
  "navigationConfig": [Function],
486660
+ "previewAndTest": [Function],
486631
486661
  "tagList": [Function],
486632
486662
  "templates": [Function],
486633
486663
  },
@@ -503949,6 +503979,7 @@ new message content.",
503949
503979
  "gallery": [Function],
503950
503980
  "language": [Function],
503951
503981
  "navigationConfig": [Function],
503982
+ "previewAndTest": [Function],
503952
503983
  "tagList": [Function],
503953
503984
  "templates": [Function],
503954
503985
  },
@@ -521527,6 +521558,7 @@ new message content.",
521527
521558
  "gallery": [Function],
521528
521559
  "language": [Function],
521529
521560
  "navigationConfig": [Function],
521561
+ "previewAndTest": [Function],
521530
521562
  "tagList": [Function],
521531
521563
  "templates": [Function],
521532
521564
  },
@@ -538368,6 +538400,7 @@ new message content.",
538368
538400
  "gallery": [Function],
538369
538401
  "language": [Function],
538370
538402
  "navigationConfig": [Function],
538403
+ "previewAndTest": [Function],
538371
538404
  "tagList": [Function],
538372
538405
  "templates": [Function],
538373
538406
  },
@@ -557460,6 +557493,7 @@ new message content.",
557460
557493
  "gallery": [Function],
557461
557494
  "language": [Function],
557462
557495
  "navigationConfig": [Function],
557496
+ "previewAndTest": [Function],
557463
557497
  "tagList": [Function],
557464
557498
  "templates": [Function],
557465
557499
  },
@@ -576633,6 +576667,7 @@ new message content.",
576633
576667
  "gallery": [Function],
576634
576668
  "language": [Function],
576635
576669
  "navigationConfig": [Function],
576670
+ "previewAndTest": [Function],
576636
576671
  "tagList": [Function],
576637
576672
  "templates": [Function],
576638
576673
  },
@@ -1,35 +0,0 @@
1
- import React from "react";
2
- import { injectIntl } from 'react-intl';
3
- import '@testing-library/jest-dom';
4
- import {
5
- render,
6
- } from '../../../utils/test-utils';
7
- import { EMAILPreviewMockData } from '../mockdata/mockdata';
8
- import { Email } from "../index";
9
-
10
- const initializeComponent = () => {
11
- const Component = injectIntl(Email);
12
- const resetUploadData = jest.fn();
13
- const clearStoreValues = jest.fn();
14
- const clearCRUDResponse = jest.fn();
15
- const fetchSchemaForEntity = jest.fn();
16
-
17
- return render( <Component
18
- {...EMAILPreviewMockData}
19
- templatesActions={{resetUploadData}}
20
- actions={{
21
- clearStoreValues,
22
- clearCRUDResponse,
23
- }}
24
- globalActions={{
25
- fetchSchemaForEntity,
26
- }}
27
- />);
28
- };
29
-
30
- describe('renders a message', () => {
31
- it("Test if Email component renders", () => {
32
- initializeComponent();
33
- });
34
- });
35
-