@capillarytech/creatives-library 8.0.125-alpha.6 → 8.0.126

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 (105) hide show
  1. package/config/app.js +6 -0
  2. package/containers/App/constants.js +0 -1
  3. package/containers/Email/index.js +5 -5
  4. package/containers/WeChat/RichmediaTemplates/Create/index.js +1 -1
  5. package/initialReducer.js +2 -0
  6. package/package.json +1 -1
  7. package/services/api.js +94 -1
  8. package/services/tests/api.test.js +191 -0
  9. package/tests/integration/TemplateCreation/TemplateCreation.integration.test.js +3 -8
  10. package/tests/integration/TemplateCreation/api-response.js +0 -5
  11. package/tests/integration/TemplateCreation/msw-handler.js +63 -42
  12. package/utils/common.js +0 -7
  13. package/utils/commonUtils.js +6 -2
  14. package/v2Components/CapImageUpload/index.js +45 -51
  15. package/v2Components/CapInAppCTA/index.js +0 -1
  16. package/v2Components/CapTagList/index.js +120 -177
  17. package/v2Components/CapVideoUpload/constants.js +0 -3
  18. package/v2Components/CapVideoUpload/index.js +110 -167
  19. package/v2Components/CapVideoUpload/messages.js +0 -16
  20. package/v2Components/Carousel/index.js +13 -15
  21. package/v2Components/CustomerSearchSection/_customerSearch.scss +309 -0
  22. package/v2Components/CustomerSearchSection/constants.js +5 -0
  23. package/v2Components/CustomerSearchSection/index.js +362 -0
  24. package/v2Components/CustomerSearchSection/messages.js +20 -0
  25. package/v2Components/CustomerSearchSection/tests/utils.test.js +334 -0
  26. package/v2Components/CustomerSearchSection/utils.js +49 -0
  27. package/v2Components/ErrorInfoNote/style.scss +0 -1
  28. package/v2Components/MobilePushPreviewV2/index.js +5 -37
  29. package/v2Components/TemplatePreview/_templatePreview.scss +72 -114
  30. package/v2Components/TemplatePreview/index.js +50 -178
  31. package/v2Components/TemplatePreview/messages.js +0 -4
  32. package/v2Components/TestAndPreviewSlidebox/_testAndPreviewSlidebox.scss +543 -0
  33. package/v2Components/TestAndPreviewSlidebox/actions.js +67 -0
  34. package/v2Components/TestAndPreviewSlidebox/constants.js +67 -0
  35. package/v2Components/TestAndPreviewSlidebox/index.js +771 -0
  36. package/v2Components/TestAndPreviewSlidebox/messages.js +147 -0
  37. package/v2Components/TestAndPreviewSlidebox/reducer.js +233 -0
  38. package/v2Components/TestAndPreviewSlidebox/sagas.js +258 -0
  39. package/v2Components/TestAndPreviewSlidebox/selectors.js +142 -0
  40. package/v2Components/TestAndPreviewSlidebox/tests/actions.test.js +80 -0
  41. package/v2Components/TestAndPreviewSlidebox/tests/reducer.test.js +367 -0
  42. package/v2Components/TestAndPreviewSlidebox/tests/saga.rtl.test.js +192 -0
  43. package/v2Components/TestAndPreviewSlidebox/tests/saga.test.js +652 -0
  44. package/v2Components/TestAndPreviewSlidebox/tests/selector.test.js +182 -0
  45. package/v2Containers/CreativesContainer/SlideBoxContent.js +21 -9
  46. package/v2Containers/CreativesContainer/SlideBoxFooter.js +23 -2
  47. package/v2Containers/CreativesContainer/index.js +160 -195
  48. package/v2Containers/CreativesContainer/messages.js +4 -0
  49. package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +21 -0
  50. package/v2Containers/Email/index.js +18 -6
  51. package/v2Containers/EmailWrapper/hooks/useEmailWrapper.js +10 -0
  52. package/v2Containers/EmailWrapper/index.js +6 -0
  53. package/v2Containers/InApp/constants.js +0 -1
  54. package/v2Containers/InApp/index.js +13 -13
  55. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +3 -0
  56. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +2 -0
  57. package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +2 -0
  58. package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +9 -0
  59. package/v2Containers/MobilePush/Create/index.js +0 -1
  60. package/v2Containers/MobilePush/commonMethods.js +14 -7
  61. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +23 -5
  62. package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +4 -0
  63. package/v2Containers/TagList/index.js +10 -56
  64. package/v2Containers/Templates/_templates.scss +1 -101
  65. package/v2Containers/Templates/index.js +35 -147
  66. package/v2Containers/Templates/messages.js +0 -8
  67. package/v2Containers/Templates/sagas.js +0 -2
  68. package/v2Containers/WeChat/RichmediaTemplates/Create/index.js +1 -1
  69. package/v2Containers/Whatsapp/constants.js +0 -1
  70. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +35 -0
  71. package/utils/createPayload.js +0 -270
  72. package/utils/tests/createPayload.test.js +0 -761
  73. package/v2Components/CapMpushCTA/constants.js +0 -25
  74. package/v2Components/CapMpushCTA/index.js +0 -332
  75. package/v2Components/CapMpushCTA/index.scss +0 -95
  76. package/v2Components/CapMpushCTA/messages.js +0 -89
  77. package/v2Components/TemplatePreview/assets/images/Android _ With date and time.svg +0 -29
  78. package/v2Components/TemplatePreview/assets/images/android.svg +0 -9
  79. package/v2Components/TemplatePreview/assets/images/iOS _ With date and time.svg +0 -26
  80. package/v2Components/TemplatePreview/assets/images/ios.svg +0 -9
  81. package/v2Containers/Email/tests/index.test.js +0 -35
  82. package/v2Containers/MobilePushNew/actions.js +0 -116
  83. package/v2Containers/MobilePushNew/components/CtaButtons.js +0 -170
  84. package/v2Containers/MobilePushNew/components/MediaUploaders.js +0 -686
  85. package/v2Containers/MobilePushNew/components/PlatformContentFields.js +0 -279
  86. package/v2Containers/MobilePushNew/components/index.js +0 -5
  87. package/v2Containers/MobilePushNew/components/tests/CtaButtons.test.js +0 -779
  88. package/v2Containers/MobilePushNew/components/tests/MediaUploaders.test.js +0 -2114
  89. package/v2Containers/MobilePushNew/components/tests/PlatformContentFields.test.js +0 -343
  90. package/v2Containers/MobilePushNew/constants.js +0 -115
  91. package/v2Containers/MobilePushNew/hooks/tests/usePlatformSync.test.js +0 -1299
  92. package/v2Containers/MobilePushNew/hooks/tests/useUpload.test.js +0 -1223
  93. package/v2Containers/MobilePushNew/hooks/usePlatformSync.js +0 -246
  94. package/v2Containers/MobilePushNew/hooks/useUpload.js +0 -709
  95. package/v2Containers/MobilePushNew/index.js +0 -2170
  96. package/v2Containers/MobilePushNew/index.scss +0 -308
  97. package/v2Containers/MobilePushNew/messages.js +0 -226
  98. package/v2Containers/MobilePushNew/reducer.js +0 -160
  99. package/v2Containers/MobilePushNew/sagas.js +0 -198
  100. package/v2Containers/MobilePushNew/selectors.js +0 -55
  101. package/v2Containers/MobilePushNew/tests/reducer.test.js +0 -741
  102. package/v2Containers/MobilePushNew/tests/sagas.test.js +0 -863
  103. package/v2Containers/MobilePushNew/tests/selectors.test.js +0 -425
  104. package/v2Containers/MobilePushNew/tests/utils.test.js +0 -322
  105. package/v2Containers/MobilePushNew/utils.js +0 -33
@@ -0,0 +1,543 @@
1
+ /**
2
+ * TestAndPreviewSlidebox styles
3
+ */
4
+ @import '~@capillarytech/cap-ui-library/styles/_variables.scss';
5
+
6
+ .test-and-preview-slidebox {
7
+ .test-preview-header {
8
+ display: flex;
9
+ align-items: center;
10
+ gap: $CAP_SPACE_12;
11
+
12
+ .back-icon {
13
+ cursor: pointer;
14
+ font-size: $CAP_SPACE_16;
15
+ color: #8c8c8c;
16
+ transition: color 0.2s ease;
17
+
18
+ &:hover {
19
+ color: #262626;
20
+ }
21
+ }
22
+
23
+ .header-title {
24
+ font-size: $CAP_SPACE_16;
25
+ font-weight: 500;
26
+ color: #262626;
27
+ }
28
+ }
29
+
30
+ .test-preview-container {
31
+ height: 100%;
32
+ display: flex;
33
+ flex-direction: column;
34
+ }
35
+
36
+ .discard-button {
37
+ padding: 0 $CAP_SPACE_08;
38
+ }
39
+
40
+ .tag-input-field {
41
+ width: 206px;
42
+ }
43
+
44
+ .test-and-preview-panels {
45
+ display: flex;
46
+ flex: 1;
47
+ overflow: hidden;
48
+ }
49
+
50
+ .left-panel {
51
+ width: 40%;
52
+ padding-right: 1rem;
53
+ border-right: 1px solid #e8e8e8;
54
+ overflow-y: auto;
55
+ .panel-divider {
56
+ margin: 0;
57
+ }
58
+ .no-tags-extracted-info-note {
59
+ .note-text {
60
+ white-space: unset;
61
+ }
62
+ }
63
+ }
64
+
65
+ .right-panel {
66
+ flex: 1;
67
+ background-color: #f0f2f5;
68
+ padding: $CAP_SPACE_08 $CAP_SPACE_24;
69
+ }
70
+
71
+ .panel-section {
72
+ margin-bottom: $CAP_SPACE_12;
73
+
74
+ &:last-child {
75
+ margin-bottom: 0;
76
+ }
77
+ }
78
+
79
+ .loading-container {
80
+ display: flex;
81
+ flex-direction: column;
82
+ align-items: center;
83
+ justify-content: center;
84
+ padding: $CAP_SPACE_32;
85
+ text-align: center;
86
+
87
+ .loading-text {
88
+ margin-top: $CAP_SPACE_16;
89
+ color: #666;
90
+ }
91
+ }
92
+
93
+ .no-customer-message,
94
+ .no-tags-message {
95
+ padding: $CAP_SPACE_32;
96
+ text-align: center;
97
+ color: #666;
98
+ background: #f5f5f5;
99
+ border-radius: $CAP_SPACE_04;
100
+ }
101
+
102
+ .custom-values-editor {
103
+ .values-missing-message {
104
+ margin: $CAP_SPACE_16 0;
105
+ }
106
+ .editor-header {
107
+ display: flex;
108
+ justify-content: flex-end;
109
+ margin-bottom: $CAP_SPACE_16;
110
+
111
+ .json-toggle {
112
+ display: flex;
113
+ align-items: center;
114
+ gap: $CAP_SPACE_08;
115
+
116
+ .toggle-label {
117
+ color: #666;
118
+ }
119
+ }
120
+ }
121
+
122
+ .json-editor {
123
+ border: 1px solid #e0e0e0;
124
+ border-radius: $CAP_SPACE_04;
125
+ background-color: $CAP_WHITE;
126
+ margin-bottom: 1rem;
127
+ overflow: hidden;
128
+
129
+ .json-editor-container {
130
+ display: flex;
131
+ font-family: 'Courier New', monospace;
132
+ font-size: 13px;
133
+ line-height: 1.4;
134
+ }
135
+
136
+ .line-numbers {
137
+ background-color: #f8f8f8;
138
+ border-right: 1px solid #e0e0e0;
139
+ padding: $CAP_SPACE_08 $CAP_SPACE_04;
140
+ user-select: none;
141
+ min-width: $CAP_SPACE_40;
142
+ flex-shrink: 0;
143
+
144
+ .line-number {
145
+ text-align: right;
146
+ color: #8c8c8c;
147
+ font-size: $CAP_SPACE_12;
148
+ padding-right: $CAP_SPACE_08;
149
+ line-height: 1.4;
150
+ height: 19px;
151
+ display: flex;
152
+ align-items: center;
153
+ justify-content: flex-end;
154
+ }
155
+ }
156
+
157
+ .json-textarea {
158
+ flex: 1;
159
+ border: none;
160
+ outline: none;
161
+ font-family: 'Courier New', monospace;
162
+ font-size: 13px;
163
+ line-height: 1.4;
164
+ padding: $CAP_SPACE_08 $CAP_SPACE_08;
165
+ background-color: $CAP_WHITE;
166
+ resize: none;
167
+ white-space: pre;
168
+ overflow-wrap: normal;
169
+ overflow-x: auto;
170
+ tab-size: 2;
171
+ color: #3D7790;
172
+
173
+ &:focus {
174
+ outline: none;
175
+ }
176
+ }
177
+
178
+ .json-container {
179
+ font-family: 'Courier New', monospace;
180
+ font-size: 13px;
181
+ line-height: 1.4;
182
+ }
183
+
184
+ .json-line {
185
+ display: flex;
186
+ align-items: center;
187
+ min-height: $CAP_SPACE_20;
188
+ padding-left: $CAP_SPACE_08;
189
+
190
+ &:hover {
191
+ background-color: #f5f5f5;
192
+ }
193
+ }
194
+
195
+ .line-number {
196
+ display: inline-block;
197
+ width: $CAP_SPACE_24;
198
+ text-align: right;
199
+ margin-right: $CAP_SPACE_12;
200
+ color: #8c8c8c;
201
+ font-size: $CAP_SPACE_12;
202
+ user-select: none;
203
+ flex-shrink: 0;
204
+ }
205
+
206
+ .json-indent {
207
+ color: transparent;
208
+ white-space: pre;
209
+ }
210
+
211
+ .json-key {
212
+ color: #3D7790;
213
+ ;
214
+ font-weight: 500;
215
+ }
216
+
217
+ .json-colon {
218
+ color: black;
219
+ margin: 0 2px;
220
+ }
221
+
222
+ .json-quote {
223
+ color: #0451a5;
224
+ }
225
+
226
+ .json-brace {
227
+ color: black;
228
+ font-weight: bold;
229
+ }
230
+
231
+ .json-comma {
232
+ color: black;
233
+ }
234
+
235
+ .json-value-input {
236
+ border: none;
237
+ background-color: transparent;
238
+ box-shadow: none;
239
+ padding: 0 2px;
240
+ font-family: inherit;
241
+ font-size: inherit;
242
+ color: #0451a5;
243
+ min-width: 60px;
244
+
245
+ &:focus {
246
+ background-color: #e6f7ff;
247
+ border: 1px solid #40a9ff;
248
+ border-radius: 2px;
249
+ outline: none;
250
+ }
251
+
252
+ &::placeholder {
253
+ color: #bfbfbf;
254
+ font-style: italic;
255
+ }
256
+ .ant-input {
257
+ margin: $CAP_SPACE_06 0;
258
+ height: $CAP_SPACE_36;
259
+ width: 206px;
260
+ }
261
+ }
262
+ }
263
+
264
+ .values-table {
265
+ margin-bottom: $CAP_SPACE_16;
266
+ border: 1px solid #e8e8e8;
267
+ border-radius: $CAP_SPACE_04;
268
+ overflow: hidden;
269
+
270
+ .table-header {
271
+ display: flex;
272
+ background: #f5f5f5;
273
+ border-bottom: 1px solid #e8e8e8;
274
+
275
+ .header-cell {
276
+ flex: 1;
277
+ padding: $CAP_SPACE_12 $CAP_SPACE_16;
278
+ font-weight: 500;
279
+ color: #666;
280
+
281
+ &:first-child {
282
+ flex: 2;
283
+ }
284
+ }
285
+ }
286
+
287
+ .value-row {
288
+ display: flex;
289
+ border-bottom: 1px solid #e8e8e8;
290
+
291
+ &:last-child {
292
+ border-bottom: none;
293
+ }
294
+
295
+ .tag-name {
296
+ flex: 2;
297
+ padding: $CAP_SPACE_12 $CAP_SPACE_16;
298
+ color: #333;
299
+ word-break: break-all;
300
+ }
301
+
302
+ .tag-input {
303
+ flex: 1;
304
+ padding: $CAP_SPACE_08 $CAP_SPACE_16;
305
+ display: flex;
306
+ align-items: center;
307
+ }
308
+ }
309
+ }
310
+
311
+ .editor-actions {
312
+ display: flex;
313
+ justify-content: flex-end;
314
+ gap: 5rem;
315
+ margin-bottom: $CAP_SPACE_16;
316
+ }
317
+
318
+ .optional-tags-section {
319
+ .optional-count {
320
+ margin-left: $CAP_SPACE_08;
321
+ color: #666;
322
+ }
323
+
324
+ .optional-tags-content {
325
+ padding: $CAP_SPACE_16;
326
+ background: #f5f5f5;
327
+ border-radius: $CAP_SPACE_04;
328
+ }
329
+ }
330
+ }
331
+
332
+ .preview-section {
333
+ .section-title {
334
+ margin-bottom: $CAP_SPACE_16;
335
+ color: #333;
336
+ }
337
+
338
+ .preview-content {
339
+ border: 1px solid #e8e8e8;
340
+ border-radius: $CAP_SPACE_04;
341
+ padding: $CAP_SPACE_16;
342
+ min-height: 200px;
343
+ }
344
+ }
345
+
346
+ .send-test-section {
347
+ .test-description {
348
+ margin-bottom: $CAP_SPACE_16;
349
+ color: #666;
350
+ }
351
+ .ant-collapse-header {
352
+ padding-left: 0;
353
+ }
354
+ .ant-collapse-content-box {
355
+ padding-left: 0 !important;
356
+ }
357
+ .test-customers-tree-select {
358
+ width: 100%;
359
+ height: $CAP_SPACE_40;
360
+ margin: $CAP_SPACE_12 0;
361
+ .ant-select-selection {
362
+ height: inherit;
363
+ }
364
+ }
365
+ .ant-select-selection__choice {
366
+ background-color: #EBECF0;
367
+ border-radius: $CAP_SPACE_04;
368
+ }
369
+ }
370
+ }
371
+
372
+ // Responsive design for smaller screens
373
+ @media (max-width: 768px) {
374
+ .test-and-preview-slidebox {
375
+ .test-preview-container {
376
+ .left-panel {
377
+ border-right: none;
378
+ border-bottom: 1px solid #e8e8e8;
379
+ padding-right: 0;
380
+ padding-bottom: $CAP_SPACE_16;
381
+ margin-bottom: $CAP_SPACE_16;
382
+ }
383
+
384
+ .right-panel {
385
+ padding-left: 0;
386
+ padding-top: $CAP_SPACE_16;
387
+ }
388
+ }
389
+ }
390
+ }
391
+
392
+ .preview-chrome {
393
+ background: #fff;
394
+ overflow: hidden;
395
+
396
+ .preview-divider {
397
+ margin: 0;
398
+ }
399
+ .preview-header {
400
+ display: flex;
401
+ justify-content: space-between;
402
+ align-items: center;
403
+ padding: $CAP_SPACE_08 $CAP_SPACE_16 $CAP_SPACE_06 $CAP_SPACE_16;
404
+ background: #f0f2f5;
405
+ border-bottom: 1px solid #e8e8e8;
406
+
407
+ .preview-for {
408
+ font-size: 14px;
409
+ color: #595959;
410
+ gap: $CAP_SPACE_04;
411
+ b {
412
+ color: #262626;
413
+ margin-left: $CAP_SPACE_04;
414
+ }
415
+ }
416
+
417
+ .device-toggle {
418
+ display: flex;
419
+ gap: $CAP_SPACE_08;
420
+ background-color: #e0e0e0;
421
+ padding: $CAP_SPACE_06 $CAP_SPACE_08;
422
+ border-radius: $CAP_SPACE_08;
423
+
424
+ .anticon {
425
+ padding: $CAP_SPACE_04;
426
+ border-radius: $CAP_SPACE_04;
427
+ cursor: pointer;
428
+ color: #595959;
429
+
430
+ &.active {
431
+ background-color: #ffffff;
432
+ color: #262626;
433
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
434
+ }
435
+ }
436
+ }
437
+ }
438
+
439
+ .preview-body {
440
+ border-radius: $CAP_SPACE_08;
441
+ box-shadow: 0 $CAP_SPACE_04 $CAP_SPACE_12 rgba(0,0,0,0.1);
442
+ &.mobile {
443
+ width: 375px;
444
+ margin: 0 auto;
445
+ .browser-bar {
446
+ background: #EBECF0;
447
+ }
448
+ }
449
+
450
+ .browser-bar {
451
+ display: flex;
452
+ align-items: center;
453
+ padding: $CAP_SPACE_08 $CAP_SPACE_12;
454
+ gap: $CAP_SPACE_08;
455
+
456
+ .browser-controls {
457
+ display: flex;
458
+ gap: $CAP_SPACE_08;
459
+ color: #B3BAC5;
460
+ .refresh-icon {
461
+ margin-top: $CAP_SPACE_04;
462
+ svg path {
463
+ fill: #B3BAC5;
464
+ }
465
+ }
466
+ }
467
+ .address-bar {
468
+ flex-grow: 1;
469
+ background: #fff;
470
+ border-radius: $CAP_SPACE_16;
471
+ padding: $CAP_SPACE_04 $CAP_SPACE_12;
472
+ font-size: $CAP_SPACE_12;
473
+ color: #595959;
474
+ text-align: center;
475
+ border: 1px solid #DFE2E7;
476
+ .address-bar-label {
477
+ float: left;
478
+ }
479
+ .browser-address-bar-icon {
480
+ float: right;
481
+ }
482
+ }
483
+ .browser-actions {
484
+ color: #8c8c8c;
485
+ }
486
+ }
487
+
488
+ .email-header {
489
+ display: flex;
490
+ align-items: center;
491
+ padding: $CAP_SPACE_16;
492
+ gap: $CAP_SPACE_16;
493
+ .back-arrow {
494
+ font-size: $CAP_SPACE_16;
495
+ }
496
+ .email-meta {
497
+ margin-left: auto;
498
+ display: flex;
499
+ align-items: center;
500
+ gap: $CAP_SPACE_08;
501
+ font-size: $CAP_SPACE_12;
502
+ color: #8c8c8c;
503
+ .dots {
504
+ width: $CAP_SPACE_06;
505
+ height: $CAP_SPACE_06;
506
+ border-radius: 50%;
507
+ background: #d9d9d9;
508
+ }
509
+ }
510
+ }
511
+
512
+ .email-from {
513
+ display: flex;
514
+ align-items: center;
515
+ padding: 0 $CAP_SPACE_16 $CAP_SPACE_16;
516
+ gap: $CAP_SPACE_12;
517
+ .sender-avatar {
518
+ width: $CAP_SPACE_40;
519
+ height: $CAP_SPACE_40;
520
+ border-radius: 50%;
521
+ background: #e8e8e8;
522
+ }
523
+ .sender-info {
524
+ .sender-name {
525
+ font-weight: 500;
526
+ }
527
+ .recipient-info {
528
+ font-size: $CAP_SPACE_12;
529
+ color: #8c8c8c;
530
+ }
531
+ }
532
+ }
533
+
534
+ .email-content {
535
+ height: 600px; // Or adjust as needed
536
+ border-top: 1px solid #e8e8e8;
537
+ padding: 0 $CAP_SPACE_16;
538
+ iframe {
539
+ border: none;
540
+ }
541
+ }
542
+ }
543
+ }
@@ -0,0 +1,67 @@
1
+ import {
2
+ SEARCH_CUSTOMERS_REQUESTED,
3
+ EXTRACT_TAGS_REQUEST,
4
+ UPDATE_PREVIEW_REQUEST,
5
+ SEND_TEST_MESSAGE_REQUESTED,
6
+ CLEAR_CUSTOMER_SEARCH_STATE,
7
+ FETCH_TEST_CUSTOMERS_REQUESTED,
8
+ FETCH_TEST_GROUPS_REQUESTED,
9
+ CREATE_MESSAGE_META_REQUESTED,
10
+ CLEAR_SEARCH_RESULTS,
11
+ GET_PREFILLED_VALUES_REQUESTED,
12
+ CLEAR_PREFILLED_VALUES,
13
+ } from './constants';
14
+
15
+ // Action Creators
16
+ export const searchCustomersRequested = (query) => ({
17
+ type: SEARCH_CUSTOMERS_REQUESTED,
18
+ payload: { query },
19
+ });
20
+
21
+ export const extractTagsRequested = (templateSubject, templateContent) => ({
22
+ type: EXTRACT_TAGS_REQUEST,
23
+ payload: { templateSubject, templateContent },
24
+ });
25
+
26
+ export const updatePreviewRequested = (data) => ({
27
+ type: UPDATE_PREVIEW_REQUEST,
28
+ payload: data,
29
+ });
30
+
31
+ export const sendTestMessageRequested = (payload, callback) => ({
32
+ type: SEND_TEST_MESSAGE_REQUESTED,
33
+ payload,
34
+ callback,
35
+ });
36
+
37
+ export const clearCustomerSearchState = () => ({
38
+ type: CLEAR_CUSTOMER_SEARCH_STATE,
39
+ });
40
+
41
+ export const clearSearchResults = () => ({
42
+ type: CLEAR_SEARCH_RESULTS,
43
+ });
44
+
45
+ export const fetchTestCustomersRequested = () => ({
46
+ type: FETCH_TEST_CUSTOMERS_REQUESTED,
47
+ });
48
+
49
+ export const fetchTestGroupsRequested = () => ({
50
+ type: FETCH_TEST_GROUPS_REQUESTED,
51
+ });
52
+
53
+ export const createMessageMetaRequested = (payload, messageMetaConfigId, callback) => ({
54
+ type: CREATE_MESSAGE_META_REQUESTED,
55
+ payload,
56
+ messageMetaConfigId,
57
+ callback,
58
+ });
59
+
60
+ export const getPrefilledValuesRequested = (payload) => ({
61
+ type: GET_PREFILLED_VALUES_REQUESTED,
62
+ payload,
63
+ });
64
+
65
+ export const clearPrefilledValues = () => ({
66
+ type: CLEAR_PREFILLED_VALUES,
67
+ });
@@ -0,0 +1,67 @@
1
+ // Action type constants for CustomerSearchSection
2
+ export const SEARCH_CUSTOMERS_REQUESTED = 'app/v2Components/TestAndPreviewSlidebox/SEARCH_CUSTOMERS_REQUESTED';
3
+ export const SEARCH_CUSTOMERS_SUCCESS = 'app/v2Components/TestAndPreviewSlidebox/SEARCH_CUSTOMERS_SUCCESS';
4
+ export const SEARCH_CUSTOMERS_FAILURE = 'app/v2Components/TestAndPreviewSlidebox/SEARCH_CUSTOMERS_FAILURE';
5
+
6
+ export const EXTRACT_TAGS_REQUEST = 'app/v2Components/TestAndPreviewSlidebox/EXTRACT_TAGS_REQUEST';
7
+ export const EXTRACT_TAGS_SUCCESS = 'app/v2Components/TestAndPreviewSlidebox/EXTRACT_TAGS_SUCCESS';
8
+ export const EXTRACT_TAGS_FAILURE = 'app/v2Components/TestAndPreviewSlidebox/EXTRACT_TAGS_FAILURE';
9
+
10
+ export const UPDATE_PREVIEW_REQUEST = 'app/v2Components/TestAndPreviewSlidebox/UPDATE_PREVIEW_REQUEST';
11
+ export const UPDATE_PREVIEW_SUCCESS = 'app/v2Components/TestAndPreviewSlidebox/UPDATE_PREVIEW_SUCCESS';
12
+ export const UPDATE_PREVIEW_FAILURE = 'app/v2Components/TestAndPreviewSlidebox/UPDATE_PREVIEW_FAILURE';
13
+
14
+ export const SEND_TEST_MESSAGE_REQUESTED = 'app/v2Components/TestAndPreviewSlidebox/SEND_TEST_MESSAGE_REQUESTED';
15
+ export const SEND_TEST_MESSAGE_SUCCESS = 'app/v2Components/TestAndPreviewSlidebox/SEND_TEST_MESSAGE_SUCCESS';
16
+ export const SEND_TEST_MESSAGE_FAILURE = 'app/v2Components/TestAndPreviewSlidebox/SEND_TEST_MESSAGE_FAILURE';
17
+
18
+ export const CLEAR_CUSTOMER_SEARCH_STATE = 'app/v2Components/TestAndPreviewSlidebox/CLEAR_CUSTOMER_SEARCH_STATE';
19
+ export const CLEAR_SEARCH_RESULTS = 'app/v2Components/TestAndPreviewSlidebox/CLEAR_SEARCH_RESULTS';
20
+
21
+ export const FETCH_TEST_CUSTOMERS_REQUESTED = 'app/v2Components/TestAndPreviewSlidebox/FETCH_TEST_CUSTOMERS_REQUESTED';
22
+ export const FETCH_TEST_CUSTOMERS_SUCCESS = 'app/v2Components/TestAndPreviewSlidebox/FETCH_TEST_CUSTOMERS_SUCCESS';
23
+ export const FETCH_TEST_CUSTOMERS_FAILURE = 'app/v2Components/TestAndPreviewSlidebox/FETCH_TEST_CUSTOMERS_FAILURE';
24
+
25
+ export const FETCH_TEST_GROUPS_REQUESTED = 'app/v2Components/TestAndPreviewSlidebox/FETCH_TEST_GROUPS_REQUESTED';
26
+ export const FETCH_TEST_GROUPS_SUCCESS = 'app/v2Components/TestAndPreviewSlidebox/FETCH_TEST_GROUPS_SUCCESS';
27
+ export const FETCH_TEST_GROUPS_FAILURE = 'app/v2Components/TestAndPreviewSlidebox/FETCH_TEST_GROUPS_FAILURE';
28
+
29
+ export const CREATE_MESSAGE_META_REQUESTED = 'app/v2Components/TestAndPreviewSlidebox/CREATE_MESSAGE_META_REQUESTED';
30
+ export const CREATE_MESSAGE_META_SUCCESS = 'app/v2Components/TestAndPreviewSlidebox/CREATE_MESSAGE_META_SUCCESS';
31
+ export const CREATE_MESSAGE_META_FAILURE = 'app/v2Components/TestAndPreviewSlidebox/CREATE_MESSAGE_META_FAILURE';
32
+
33
+ export const GET_PREFILLED_VALUES_REQUESTED = 'app/v2Components/TestAndPreviewSlidebox/GET_PREFILLED_VALUES_REQUESTED';
34
+ export const GET_PREFILLED_VALUES_SUCCESS = 'app/v2Components/TestAndPreviewSlidebox/GET_PREFILLED_VALUES_SUCCESS';
35
+ export const GET_PREFILLED_VALUES_FAILURE = 'app/v2Components/TestAndPreviewSlidebox/GET_PREFILLED_VALUES_FAILURE';
36
+
37
+ export const CLEAR_PREFILLED_VALUES = 'app/v2Components/TestAndPreviewSlidebox/CLEAR_PREFILLED_VALUES';
38
+
39
+ export const INITIAL_PAYLOAD = {
40
+ ouId: -1,
41
+ sourceEntityId: "creatives_ui_76de58db-f70b-40d0-85a5-d014bda6e751",
42
+ channel: "EMAIL",
43
+ module: "CREATIVES",
44
+ emailDeliverySettings: {
45
+ additionalSettings: {
46
+ encryptUrl: false,
47
+ linkTrackingEnabled: false,
48
+ useTinyUrl: false,
49
+ skipRateLimit: false,
50
+ bypassControlUser: false,
51
+ },
52
+ channelSettings: {
53
+ channel: "EMAIL",
54
+ senderLabel: "",
55
+ senderId: "",
56
+ replyToId: "",
57
+ },
58
+ },
59
+ executionParams: {},
60
+ clientName: "CREATIVES",
61
+ };
62
+
63
+ export const TEST = "TEST";
64
+ export const EMAIL = "EMAIL";
65
+ export const DESKTOP = "desktop";
66
+ export const ACTIVE = "active";
67
+ export const MOBILE = "mobile";