@capillarytech/creatives-library 8.0.345-alpha.15 → 8.0.345-alpha.16

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 (130) hide show
  1. package/constants/unified.js +0 -29
  2. package/package.json +1 -1
  3. package/services/tests/api.test.js +0 -13
  4. package/utils/commonUtils.js +1 -19
  5. package/v2Components/CapActionButton/constants.js +0 -7
  6. package/v2Components/CapActionButton/index.js +109 -167
  7. package/v2Components/CapActionButton/index.scss +6 -157
  8. package/v2Components/CapActionButton/messages.js +3 -19
  9. package/v2Components/CapActionButton/tests/index.test.js +17 -41
  10. package/v2Components/CapTagList/index.js +0 -10
  11. package/v2Components/CommonTestAndPreview/CustomValuesEditor.js +49 -70
  12. package/v2Components/CommonTestAndPreview/DeliverySettings/DeliverySettings.scss +2 -8
  13. package/v2Components/CommonTestAndPreview/DeliverySettings/ModifyDeliverySettings.js +21 -207
  14. package/v2Components/CommonTestAndPreview/DeliverySettings/constants.js +0 -16
  15. package/v2Components/CommonTestAndPreview/DeliverySettings/index.js +10 -85
  16. package/v2Components/CommonTestAndPreview/DeliverySettings/messages.js +0 -30
  17. package/v2Components/CommonTestAndPreview/DeliverySettings/utils/parseSenderDetailsResponse.js +11 -79
  18. package/v2Components/CommonTestAndPreview/SendTestMessage.js +5 -10
  19. package/v2Components/CommonTestAndPreview/UnifiedPreview/RcsPreviewContent.js +15 -160
  20. package/v2Components/CommonTestAndPreview/UnifiedPreview/_unifiedPreview.scss +76 -341
  21. package/v2Components/CommonTestAndPreview/UnifiedPreview/index.js +4 -133
  22. package/v2Components/CommonTestAndPreview/_commonTestAndPreview.scss +0 -11
  23. package/v2Components/CommonTestAndPreview/constants.js +2 -38
  24. package/v2Components/CommonTestAndPreview/index.js +186 -676
  25. package/v2Components/CommonTestAndPreview/messages.js +3 -49
  26. package/v2Components/CommonTestAndPreview/sagas.js +6 -15
  27. package/v2Components/CommonTestAndPreview/tests/CustomValuesEditor.test.js +284 -308
  28. package/v2Components/CommonTestAndPreview/tests/DeliverySettings/ModifyDeliverySettings.test.js +65 -231
  29. package/v2Components/CommonTestAndPreview/tests/DeliverySettings/index.test.js +5 -118
  30. package/v2Components/CommonTestAndPreview/tests/DeliverySettings/utils/parseSenderDetailsResponse.test.js +0 -341
  31. package/v2Components/CommonTestAndPreview/tests/PreviewSection.test.js +1 -8
  32. package/v2Components/CommonTestAndPreview/tests/SendTestMessage.test.js +13 -34
  33. package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/RcsPreviewContent.test.js +283 -281
  34. package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/index.test.js +1 -199
  35. package/v2Components/CommonTestAndPreview/tests/index.test.js +4 -132
  36. package/v2Components/CommonTestAndPreview/tests/sagas.test.js +2 -2
  37. package/v2Components/FormBuilder/index.js +10 -8
  38. package/v2Components/TemplatePreview/_templatePreview.scss +23 -33
  39. package/v2Components/TemplatePreview/index.js +28 -143
  40. package/v2Components/TemplatePreview/tests/index.test.js +0 -142
  41. package/v2Components/TestAndPreviewSlidebox/index.js +1 -13
  42. package/v2Components/TestAndPreviewSlidebox/sagas.js +4 -11
  43. package/v2Components/TestAndPreviewSlidebox/tests/saga.test.js +1 -3
  44. package/v2Containers/CreativesContainer/SlideBoxContent.js +4 -36
  45. package/v2Containers/CreativesContainer/SlideBoxFooter.js +1 -10
  46. package/v2Containers/CreativesContainer/SlideBoxHeader.js +4 -29
  47. package/v2Containers/CreativesContainer/constants.js +0 -9
  48. package/v2Containers/CreativesContainer/index.js +103 -300
  49. package/v2Containers/CreativesContainer/index.scss +1 -51
  50. package/v2Containers/CreativesContainer/tests/SlideBoxFooter.test.js +34 -78
  51. package/v2Containers/CreativesContainer/tests/SlideBoxHeader.test.js +16 -79
  52. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +0 -8
  53. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxHeader.test.js.snap +98 -357
  54. package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +15 -20
  55. package/v2Containers/CreativesContainer/tests/index.test.js +9 -71
  56. package/v2Containers/Email/reducer.js +12 -3
  57. package/v2Containers/Email/sagas.js +9 -4
  58. package/v2Containers/Email/tests/__snapshots__/reducer.test.js.snap +4 -0
  59. package/v2Containers/Email/tests/reducer.test.js +47 -0
  60. package/v2Containers/Email/tests/sagas.test.js +146 -6
  61. package/v2Containers/Rcs/constants.js +8 -119
  62. package/v2Containers/Rcs/index.js +811 -2383
  63. package/v2Containers/Rcs/index.scss +6 -276
  64. package/v2Containers/Rcs/messages.js +3 -38
  65. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +70073 -98018
  66. package/v2Containers/Rcs/tests/__snapshots__/utils.test.js.snap +5 -0
  67. package/v2Containers/Rcs/tests/index.test.js +121 -152
  68. package/v2Containers/Rcs/tests/mockData.js +0 -38
  69. package/v2Containers/Rcs/tests/utils.test.js +30 -646
  70. package/v2Containers/Rcs/utils.js +11 -478
  71. package/v2Containers/Sms/Create/index.js +40 -100
  72. package/v2Containers/SmsTrai/Create/index.js +4 -9
  73. package/v2Containers/SmsTrai/Edit/constants.js +0 -2
  74. package/v2Containers/SmsTrai/Edit/index.js +130 -636
  75. package/v2Containers/SmsTrai/Edit/messages.js +4 -14
  76. package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +2296 -4249
  77. package/v2Containers/SmsWrapper/index.js +8 -37
  78. package/v2Containers/TagList/index.js +0 -6
  79. package/v2Containers/Templates/_templates.scss +2 -163
  80. package/v2Containers/Templates/actions.js +0 -11
  81. package/v2Containers/Templates/constants.js +0 -2
  82. package/v2Containers/Templates/index.js +54 -119
  83. package/v2Containers/Templates/sagas.js +12 -57
  84. package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +1079 -1043
  85. package/v2Containers/Templates/tests/sagas.test.js +123 -193
  86. package/v2Containers/TemplatesV2/TemplatesV2.style.js +1 -72
  87. package/v2Containers/TemplatesV2/index.js +23 -86
  88. package/v2Containers/Whatsapp/index.js +20 -3
  89. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +34 -578
  90. package/utils/rcsPayloadUtils.js +0 -92
  91. package/utils/templateVarUtils.js +0 -201
  92. package/utils/tests/templateVarUtils.test.js +0 -204
  93. package/v2Components/CommonTestAndPreview/UnifiedPreview/RcsPreviewContent.js.rej +0 -18
  94. package/v2Components/CommonTestAndPreview/previewApiUtils.js +0 -59
  95. package/v2Components/CommonTestAndPreview/tests/previewApiUtils.test.js +0 -67
  96. package/v2Components/SmsFallback/SmsFallbackLocalSelector.js +0 -87
  97. package/v2Components/SmsFallback/constants.js +0 -73
  98. package/v2Components/SmsFallback/index.js +0 -955
  99. package/v2Components/SmsFallback/index.scss +0 -265
  100. package/v2Components/SmsFallback/messages.js +0 -78
  101. package/v2Components/SmsFallback/smsFallbackUtils.js +0 -118
  102. package/v2Components/SmsFallback/tests/SmsFallbackLocalSelector.test.js +0 -50
  103. package/v2Components/SmsFallback/tests/rcsSmsFallback.acceptance.test.js +0 -147
  104. package/v2Components/SmsFallback/tests/smsFallbackHandlers.test.js +0 -304
  105. package/v2Components/SmsFallback/tests/smsFallbackUi.test.js +0 -197
  106. package/v2Components/SmsFallback/tests/smsFallbackUtils.test.js +0 -277
  107. package/v2Components/SmsFallback/tests/useLocalTemplateList.test.js +0 -422
  108. package/v2Components/SmsFallback/useLocalTemplateList.js +0 -92
  109. package/v2Components/TemplatePreview/constants.js +0 -2
  110. package/v2Components/VarSegmentMessageEditor/constants.js +0 -2
  111. package/v2Components/VarSegmentMessageEditor/index.js +0 -125
  112. package/v2Components/VarSegmentMessageEditor/index.scss +0 -46
  113. package/v2Containers/CreativesContainer/CreativesSlideBoxWrapper.js +0 -43
  114. package/v2Containers/CreativesContainer/embeddedSlideboxUtils.js +0 -67
  115. package/v2Containers/CreativesContainer/tests/SlideBoxContent.localTemplates.test.js +0 -90
  116. package/v2Containers/CreativesContainer/tests/embeddedSlideboxUtils.test.js +0 -258
  117. package/v2Containers/CreativesContainer/tests/useLocalTemplatesProp.test.js +0 -125
  118. package/v2Containers/Rcs/index.js.rej +0 -1336
  119. package/v2Containers/Rcs/index.scss.rej +0 -74
  120. package/v2Containers/Rcs/rcsLibraryHydrationUtils.js +0 -225
  121. package/v2Containers/Rcs/tests/__snapshots__/utils.test.js.snap.rej +0 -128
  122. package/v2Containers/Rcs/tests/rcsLibraryHydrationUtils.test.js +0 -318
  123. package/v2Containers/Sms/smsFormDataHelpers.js +0 -67
  124. package/v2Containers/Sms/tests/smsFormDataHelpers.test.js +0 -253
  125. package/v2Containers/SmsTrai/Edit/index.scss +0 -121
  126. package/v2Containers/Templates/TemplatesActionBar.js +0 -101
  127. package/v2Containers/Templates/tests/TemplatesActionBar.test.js +0 -120
  128. package/v2Containers/Templates/tests/smsTemplatesListApi.test.js +0 -180
  129. package/v2Containers/Templates/utils/smsTemplatesListApi.js +0 -79
  130. package/v2Containers/TemplatesV2/tests/TemplatesV2.localTemplates.test.js +0 -131
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * UnifiedPreview Styles
5
- *
5
+ *
6
6
  * Consistent styling for preview across all channels
7
7
  */
8
8
 
@@ -11,24 +11,25 @@
11
11
  height: 100%;
12
12
  display: flex;
13
13
  flex-direction: column;
14
+ background: $CAP_WHITE;
14
15
  overflow: hidden;
15
-
16
+
16
17
  // Preview Chrome wrapper (matches old TestAndPreviewSlidebox design)
17
18
  .preview-chrome {
18
19
  background: $CAP_WHITE;
19
20
  overflow: hidden;
20
-
21
+
21
22
  .preview-divider {
22
23
  margin: 0;
23
24
  }
24
-
25
+
25
26
  .preview-header {
26
27
  display: flex;
27
28
  justify-content: space-between;
28
29
  align-items: center;
29
30
  padding: $CAP_SPACE_08 $CAP_SPACE_16 $CAP_SPACE_06 $CAP_SPACE_16;
30
31
  background: $CAP_G09;
31
-
32
+
32
33
  .preview-for {
33
34
  font-size: $FONT_SIZE_M;
34
35
  color: #595959;
@@ -38,20 +39,20 @@
38
39
  margin-left: $CAP_SPACE_04;
39
40
  }
40
41
  }
41
-
42
+
42
43
  .device-toggle {
43
44
  display: flex;
44
45
  gap: $CAP_SPACE_08;
45
46
  background-color: #e0e0e0;
46
47
  padding: $CAP_SPACE_06 $CAP_SPACE_08;
47
48
  border-radius: $CAP_SPACE_08;
48
-
49
+
49
50
  .anticon {
50
51
  padding: $CAP_SPACE_04;
51
52
  border-radius: $CAP_SPACE_04;
52
53
  cursor: pointer;
53
54
  color: #595959;
54
-
55
+
55
56
  &.active {
56
57
  background-color: $CAP_WHITE;
57
58
  color: #262626;
@@ -61,27 +62,7 @@
61
62
  }
62
63
  }
63
64
  }
64
-
65
- .unified-preview.unified-preview-rcs-tabs {
66
- .ant-tabs-nav {
67
- margin: 0;
68
- padding: 0 $CAP_SPACE_16;
69
- }
70
-
71
- // Prevent white hover/active backgrounds from default antd styles
72
- .ant-tabs-tab,
73
- .ant-tabs-tab:hover,
74
- .ant-tabs-tab-active {
75
- background: transparent;
76
- }
77
-
78
- .ant-tabs-tab-btn,
79
- .ant-tabs-tab-btn:hover,
80
- .ant-tabs-tab-btn:active {
81
- background: transparent;
82
- }
83
- }
84
-
65
+
85
66
  // Preview Content Container
86
67
  .preview-content-container {
87
68
  flex: 1;
@@ -94,25 +75,25 @@
94
75
  .preview-content-container-no-header {
95
76
  background-color: $CAP_WHITE;
96
77
  }
97
-
78
+
98
79
  // Device Frames
99
80
  .unified-preview-frame {
100
81
  width: 100%;
101
82
  display: flex;
102
83
  justify-content: center;
103
-
84
+
104
85
  .device-frame {
105
86
  background: $CAP_WHITE;
106
87
  border-radius: $CAP_SPACE_08;
107
88
  box-shadow: 0 $CAP_SPACE_04 $CAP_SPACE_12 rgba(0, 0, 0, 0.15);
108
89
  overflow: hidden;
109
90
  transition: all 0.3s ease;
110
-
91
+
111
92
  // Desktop Frame
112
93
  &.device-frame-desktop {
113
94
  width: 100%;
114
95
  min-height: 42.857rem;
115
-
96
+
116
97
  .desktop-chrome {
117
98
  height: $CAP_SPACE_40;
118
99
  background: $CAP_G12;
@@ -121,30 +102,30 @@
121
102
  align-items: center;
122
103
  padding: 0 $CAP_SPACE_12;
123
104
  gap: $CAP_SPACE_12;
124
-
105
+
125
106
  .chrome-dots {
126
107
  display: flex;
127
108
  gap: $CAP_SPACE_06;
128
-
109
+
129
110
  .dot {
130
111
  width: $CAP_SPACE_12;
131
112
  height: $CAP_SPACE_12;
132
113
  border-radius: 50%;
133
-
114
+
134
115
  &.dot-close {
135
116
  background: #ff5f56;
136
117
  }
137
-
118
+
138
119
  &.dot-minimize {
139
120
  background: #ffbd2e;
140
121
  }
141
-
122
+
142
123
  &.dot-maximize {
143
124
  background: #27c93f;
144
125
  }
145
126
  }
146
127
  }
147
-
128
+
148
129
  .chrome-address-bar {
149
130
  flex: 1;
150
131
  background: $CAP_WHITE;
@@ -154,25 +135,25 @@
154
135
  color: #8c8c8c;
155
136
  }
156
137
  }
157
-
138
+
158
139
  .device-content {
159
140
  min-height: 40rem;
160
141
  background: $CAP_WHITE;
161
142
  }
162
143
  }
163
-
144
+
164
145
  // Tablet Frame
165
146
  &.device-frame-tablet {
166
147
  width: 54.857rem;
167
148
  max-width: 90%;
168
-
149
+
169
150
  .tablet-chrome {
170
151
  height: $CAP_SPACE_24;
171
152
  background: #333333;
172
153
  display: flex;
173
154
  align-items: center;
174
155
  justify-content: center;
175
-
156
+
176
157
  .tablet-camera {
177
158
  width: $CAP_SPACE_08;
178
159
  height: $CAP_SPACE_08;
@@ -181,19 +162,19 @@
181
162
  border: $CAP_SPACE_01 solid #666666;
182
163
  }
183
164
  }
184
-
165
+
185
166
  .device-content {
186
167
  min-height: 73.143rem;
187
168
  background: $CAP_WHITE;
188
169
  }
189
-
170
+
190
171
  .tablet-footer {
191
172
  height: 3.571rem;
192
173
  background: #333333;
193
174
  display: flex;
194
175
  align-items: center;
195
176
  justify-content: center;
196
-
177
+
197
178
  .home-button {
198
179
  width: $CAP_SPACE_40;
199
180
  height: $CAP_SPACE_40;
@@ -203,19 +184,19 @@
203
184
  }
204
185
  }
205
186
  }
206
-
187
+
207
188
  // Mobile Frame
208
189
  &.device-frame-mobile {
209
190
  width: 26.786rem;
210
191
  max-width: 90%;
211
-
192
+
212
193
  .mobile-chrome {
213
194
  height: $CAP_SPACE_24;
214
195
  background: #000000;
215
196
  display: flex;
216
197
  align-items: center;
217
198
  justify-content: center;
218
-
199
+
219
200
  .mobile-notch {
220
201
  width: 10.714rem;
221
202
  height: 1.571rem;
@@ -223,19 +204,19 @@
223
204
  border-radius: 0 0 $CAP_SPACE_12 $CAP_SPACE_12;
224
205
  }
225
206
  }
226
-
207
+
227
208
  .device-content {
228
209
  min-height: 47.643rem;
229
210
  background: $CAP_WHITE;
230
211
  }
231
-
212
+
232
213
  .mobile-footer {
233
214
  height: $CAP_SPACE_24;
234
215
  background: #000000;
235
216
  display: flex;
236
217
  align-items: center;
237
218
  justify-content: center;
238
-
219
+
239
220
  .home-indicator {
240
221
  width: $CAP_SPACE_80;
241
222
  height: $CAP_SPACE_04;
@@ -247,7 +228,7 @@
247
228
  }
248
229
  }
249
230
  }
250
-
231
+
251
232
  // Channel Preview Placeholders (Phase 5)
252
233
  .channel-preview-placeholder {
253
234
  display: flex;
@@ -257,7 +238,7 @@
257
238
  padding: $CAP_SPACE_60 $CAP_SPACE_24;
258
239
  text-align: center;
259
240
  min-height: 28.571rem;
260
-
241
+
261
242
  .question-circle {
262
243
  font-size: $CAP_SPACE_48;
263
244
  color: $CAP_COLOR_16;
@@ -268,13 +249,13 @@
268
249
  font-weight: 600;
269
250
  color: #262626;
270
251
  }
271
-
252
+
272
253
  p {
273
254
  margin-top: $CAP_SPACE_08;
274
255
  font-size: $FONT_SIZE_M;
275
256
  color: #8c8c8c;
276
257
  }
277
-
258
+
278
259
  .preview-subject {
279
260
  margin-top: $CAP_SPACE_24;
280
261
  padding: $CAP_SPACE_12 $CAP_SPACE_16;
@@ -283,26 +264,26 @@
283
264
  text-align: left;
284
265
  width: 100%;
285
266
  max-width: 35.714rem;
286
-
267
+
287
268
  strong {
288
269
  color: #595959;
289
270
  margin-right: $CAP_SPACE_08;
290
271
  }
291
272
  }
292
-
273
+
293
274
  .preview-body-placeholder {
294
275
  margin-top: $CAP_SPACE_12;
295
276
  padding: $CAP_SPACE_08 $CAP_SPACE_12;
296
277
  background: #fafafa;
297
278
  border: $CAP_SPACE_01 dashed $CAP_COLOR_16;
298
279
  border-radius: $CAP_SPACE_04;
299
-
280
+
300
281
  small {
301
282
  color: #8c8c8c;
302
283
  }
303
284
  }
304
285
  }
305
-
286
+
306
287
  // Loading State
307
288
  &.unified-preview-loading {
308
289
  .preview-loading-container {
@@ -313,14 +294,14 @@
313
294
  justify-content: center;
314
295
  gap: $CAP_SPACE_16;
315
296
  min-height: 28.571rem;
316
-
297
+
317
298
  .loading-text {
318
299
  font-size: $FONT_SIZE_M;
319
300
  color: #8c8c8c;
320
301
  }
321
302
  }
322
303
  }
323
-
304
+
324
305
  // Error State
325
306
  &.unified-preview-error {
326
307
  .preview-error-container {
@@ -331,7 +312,7 @@
331
312
  justify-content: center;
332
313
  gap: $CAP_SPACE_16;
333
314
  min-height: 28.571rem;
334
-
315
+
335
316
  .exclamation-circle {
336
317
  font-size: $CAP_SPACE_48;
337
318
  color: #ff4d4f;
@@ -341,7 +322,7 @@
341
322
  font-weight: 600;
342
323
  color: #262626;
343
324
  }
344
-
325
+
345
326
  .error-message {
346
327
  font-size: $FONT_SIZE_M;
347
328
  color: #ff4d4f;
@@ -350,7 +331,7 @@
350
331
  }
351
332
  }
352
333
  }
353
-
334
+
354
335
  // Preview Metadata
355
336
  .preview-metadata {
356
337
  padding: $CAP_SPACE_12 $CAP_SPACE_24;
@@ -360,7 +341,7 @@
360
341
  color: #8c8c8c;
361
342
  display: flex;
362
343
  gap: $CAP_SPACE_16;
363
-
344
+
364
345
  .metadata-item {
365
346
  display: flex;
366
347
  gap: $CAP_SPACE_04;
@@ -553,7 +534,7 @@
553
534
  font-weight: 600;
554
535
  color: #262626;
555
536
  }
556
-
537
+
557
538
  .error-message {
558
539
  font-size: $FONT_SIZE_M;
559
540
  color: #ff4d4f;
@@ -595,12 +576,9 @@
595
576
  transform: translateX(-50%);
596
577
  width: 100%;
597
578
  max-width: 26.786rem;
598
- min-width: 0; // flex descendant overflow: allow shrink inside narrow screen
599
579
  height: calc(100% - 4.5rem);
600
580
  display: flex;
601
581
  flex-direction: column;
602
- overflow-x: hidden;
603
- box-sizing: border-box;
604
582
 
605
583
  &.sms-content-overlay-android {
606
584
  height: calc(100% - 3.8rem);
@@ -762,7 +740,7 @@
762
740
  font-weight: 600;
763
741
  color: #262626;
764
742
  }
765
-
743
+
766
744
  .sms-error-message {
767
745
  font-size: $FONT_SIZE_M;
768
746
  color: #ff4d4f;
@@ -784,256 +762,13 @@
784
762
  }
785
763
  }
786
764
 
787
- // RCS carousel: allow cards to slide "behind" the phone frame/bezel
788
- // (device png covers overflow while screen cutout still shows overlay)
789
- .rcs-device-container.rcs-device-container-carousel {
790
- .sms-device-image {
791
- position: relative;
792
- z-index: 0; // keep device image behind the overlay so preview never disappears
793
- pointer-events: none; // allow horizontal scroll/drag on carousel underneath
794
- }
795
-
796
- .rcs-content-overlay {
797
- z-index: 1; // overlay above device image (preview visible)
798
- }
799
- }
800
-
801
- // RCS-only overrides for SMS-style preview frame (scoped; does not affect SMS channel preview)
802
- .rcs-device-container {
803
- .rcs-content-overlay {
804
-
805
- &.sms-preview.sms-ios {
806
- .sms-message-container.rcs-message-container-carousel {
807
- margin-right: 0; // allow carousel to reach device edge
808
- }
809
- }
810
-
811
- .sms-message-container {
812
- &.rcs-message-container-carousel {
813
- // Let carousel reach the right edge of the device frame (match expected)
814
- padding-right: 0;
815
- }
816
-
817
- .sms-message-bubble {
818
- &.rcs-message-bubble-carousel {
819
- background: transparent;
820
- padding: 0;
821
- max-width: 100%;
822
- border-radius: 0;
823
- width: 100%;
824
-
825
- .sms-message-text {
826
- width: 100%;
827
- }
828
- }
829
- }
830
- }
831
- }
832
- }
833
-
834
- // RCS Carousel preview inside SMS-style device frame
835
- // RcsPreviewContent uses msg-container-carousel/scroll-container/message-pop-carousel classes.
836
- .rcs-device-container {
837
- .rcs-content-overlay {
838
- .sms-message-text {
839
- .message-pop.sms {
840
- width: 100%;
841
- .msg-container-carousel {
842
- display: flex;
843
- flex-direction: column;
844
- width: 100%;
845
- }
846
-
847
- .scroll-container {
848
- overflow-x: auto;
849
- overflow-y: hidden;
850
- display: flex;
851
- flex-wrap: nowrap; // CapRow defaults can wrap; carousel must stay in one row
852
- align-items: stretch;
853
- padding-top: $CAP_SPACE_06;
854
- padding-right: 0; // allow cards to align flush on the right
855
- white-space: nowrap;
856
- scrollbar-width: none; // Hide scrollbar in Firefox
857
- gap: 0.75rem; // 12px; no trailing whitespace like margin-right
858
- width: 100%;
859
-
860
- &::-webkit-scrollbar {
861
- display: none; // Hide scrollbar in Chrome/Safari/Opera
862
- }
863
- }
864
-
865
- .message-pop-carousel {
866
- // Match TemplatePreview carousel card look (big card + subtle shadow)
867
- background-color: $CAP_WHITE;
868
- border-radius: $CAP_SPACE_08;
869
- // Ensure card width is stable and does not shrink to text width
870
- width: 16.125rem; // 258px (shows 1 card + a peek of the next)
871
- min-width: 16.125rem;
872
- flex: 0 0 16.125rem;
873
- padding: 0;
874
- margin-right: 0; // spacing handled by scroll-container gap
875
- color: $CAP_G01;
876
- overflow: hidden;
877
- box-shadow: 0 0 0.625rem 0 rgba(0, 0, 0, 0.08);
878
- position: relative;
879
- }
880
-
881
- .whatsapp-content {
882
- font-family: Roboto, 'Open Sans', sans-serif;
883
- margin: 0;
884
- width: 100%;
885
- }
886
-
887
- // Height follows width × aspect-ratio; inline style from carouselPreviewDimensions overrides fallback.
888
- .whatsapp-image.rcs-carousel-media-wrap {
889
- width: 100%;
890
- height: auto;
891
- aspect-ratio: 1280 / 720; // MEDIUM_MEDIUM image fallback when dimensions not passed
892
- display: block;
893
- overflow: hidden;
894
- border-radius: 0.5rem 0.5rem 0 0; // 8px
895
- margin-bottom: 0;
896
-
897
- // CapImage (antd Image) applies className on wrapper; ensure inner img is constrained too.
898
- img,
899
- .ant-image-img {
900
- width: 100%;
901
- height: 100%;
902
- object-fit: cover;
903
- border-radius: inherit;
904
- display: block;
905
- }
906
-
907
- // Plain <img> in RCS carousel preview (not CapImage)
908
- .rcs-carousel-img {
909
- width: 100%;
910
- height: 100%;
911
- object-fit: cover;
912
- border-radius: inherit;
913
- display: block;
914
- }
915
- }
916
-
917
- .video-preview {
918
- position: relative;
919
- width: 100%;
920
- margin-bottom: 0;
921
-
922
- .whatsapp-image.rcs-carousel-media-wrap {
923
- width: 100%;
924
- height: auto;
925
- aspect-ratio: 796 / 448; // MEDIUM_MEDIUM video thumbnail fallback
926
- margin-bottom: 0;
927
-
928
- img,
929
- .ant-image-img,
930
- .rcs-carousel-img {
931
- width: 100%;
932
- height: 100%;
933
- object-fit: cover;
934
- border-radius: inherit;
935
- display: block;
936
- }
937
- }
938
-
939
- .icon-position {
940
- position: absolute;
941
- top: 50%;
942
- left: 50%;
943
- transform: translate(-50%, -50%);
944
- display: flex;
945
- align-items: center;
946
- justify-content: center;
947
-
948
- .video-icon {
949
- width: $CAP_SPACE_48;
950
- height: $CAP_SPACE_48;
951
- }
952
- }
953
- }
954
-
955
- .carousel-content {
956
- padding: 0.625rem 0.75rem; // 10px 12px
957
- width: 100%;
958
- background-color: #ebecf0;
959
- white-space: normal; // override scroll-container's nowrap so text can wrap
960
- display: flex;
961
- flex-direction: column;
962
- border-bottom-left-radius: 0.25rem; // 4px — text panel tucks above CTA gap (Figma)
963
- border-bottom-right-radius: 0.25rem;
964
-
965
- // Title/body typography via CapLabel type (label1 / label2, etc.)
966
- .carousel-title {
967
- margin-bottom: 0.25rem; // 4px
968
- display: block;
969
- overflow: visible;
970
- white-space: normal;
971
- overflow-wrap: anywhere;
972
- }
973
-
974
- .carousel-message {
975
- display: block;
976
- overflow: visible;
977
- white-space: normal;
978
- overflow-wrap: anywhere;
979
- }
980
-
981
- .rcs-carousel-field-placeholder {
982
- color: $CAP_G05;
983
- font-weight: $FONT_WEIGHT_REGULAR;
984
- }
985
- }
986
-
987
- // Divider and suggestions should render like a CTA bar list (no extra margins)
988
- .whatsapp-divider {
989
- margin: 0;
990
- border-top: 1px solid $CAP_WHITE;
991
- }
992
-
993
- // Stacked full-width CTA bars below card copy, separated by white gap (Figma RCS carousel)
994
- .rcs-carousel-cta-stack.cap-row-v2 {
995
- display: flex;
996
- flex-direction: column;
997
- flex-wrap: nowrap;
998
- width: 100%;
999
- gap: 0.25rem;
1000
- box-sizing: border-box;
1001
- align-items: stretch;
1002
- }
1003
-
1004
- .rcs-cta-preview--carousel-bar {
1005
- display: flex;
1006
- align-items: center;
1007
- justify-content: center;
1008
- gap: 0.375rem;
1009
- width: 100%;
1010
- margin: 0;
1011
- padding: 0.625rem 0.75rem;
1012
- box-sizing: border-box;
1013
- background-color: #ebecf0;
1014
- border-radius: 0.25rem;
1015
- font-size: $FONT_SIZE_M;
1016
- font-weight: $FONT_WEIGHT_MEDIUM;
1017
- color: $CAP_G01;
1018
- text-align: center;
1019
- }
1020
-
1021
- .rcs-cta-preview-phone-icon-end {
1022
- margin-left: 0.25rem;
1023
- flex-shrink: 0;
1024
- }
1025
- }
1026
- }
1027
- }
1028
- }
1029
-
1030
765
  // WhatsApp Preview Content Styles (Phase 8)
1031
766
  // All WhatsApp styles wrapped in parent class for increased specificity
1032
767
  // This prevents other CSS (like CapLabel) from overriding WhatsApp-specific styles
1033
768
  .whatsapp-preview-wrapper {
1034
769
  // Using same CSS classes as TemplatePreview for consistency
1035
770
  // Styles are copied from TemplatePreview/_templatePreview.scss to ensure they work
1036
-
771
+
1037
772
  .shell-v2-whatsapp {
1038
773
  position: relative;
1039
774
  -webkit-transform: translate(-50%);
@@ -1108,23 +843,23 @@
1108
843
  }
1109
844
 
1110
845
  // WhatsApp message pop styles (matching TemplatePreview)
1111
- &.whatsapp-message-pop,
1112
- &.whatsapp-message-pop-carousel {
846
+ &.whatsapp-message-pop {
1113
847
  padding: $CAP_SPACE_04 0 $CAP_SPACE_08;
1114
848
  border-radius: $CAP_SPACE_06;
1115
849
  background-color: $CAP_WHITE;
1116
- left: 0;
1117
- }
1118
-
1119
- &.whatsapp-message-pop {
1120
850
  width: 88%;
851
+ left: 0;
1121
852
  }
1122
853
 
1123
854
  // WhatsApp carousel message pop styles
1124
855
  &.whatsapp-message-pop-carousel {
856
+ padding: $CAP_SPACE_04 0 $CAP_SPACE_08;
857
+ border-radius: $CAP_SPACE_06;
858
+ background-color: $CAP_WHITE;
1125
859
  width: 10.4rem;
1126
860
  cursor: pointer;
1127
861
  flex-shrink: 0;
862
+ left: 0;
1128
863
  }
1129
864
  }
1130
865
  }
@@ -1189,7 +924,7 @@
1189
924
  line-height: 1rem;
1190
925
  font-family: Roboto, 'Open Sans', sans-serif;
1191
926
  }
1192
-
927
+
1193
928
  .whatsapp-template-footer-preview {
1194
929
  // From WhatsApp/index.scss: color: $CAP_G04, but use white for preview
1195
930
  color: $CAP_G01;
@@ -1245,19 +980,19 @@
1245
980
  color: #8c8c8c;
1246
981
  font-size: $FONT_SIZE_M;
1247
982
  }
1248
-
983
+
1249
984
  .whatsapp-error-text {
1250
985
  font-size: $FONT_SIZE_L;
1251
986
  font-weight: 600;
1252
987
  color: #262626;
1253
988
  }
1254
-
989
+
1255
990
  .whatsapp-error-message {
1256
991
  font-size: $FONT_SIZE_M;
1257
992
  color: #ff4d4f;
1258
993
  text-align: center;
1259
994
  }
1260
-
995
+
1261
996
  .whatsapp-no-content {
1262
997
  color: #8c8c8c;
1263
998
  font-size: $FONT_SIZE_M;
@@ -1309,14 +1044,14 @@
1309
1044
  color: #8c8c8c;
1310
1045
  margin-top: $CAP_SPACE_04;
1311
1046
  }
1312
-
1047
+
1313
1048
  .url-preview {
1314
1049
  font-size: $FONT_SIZE_S;
1315
1050
  color: #1890ff;
1316
1051
  word-break: break-all;
1317
1052
  }
1318
1053
  }
1319
-
1054
+
1320
1055
  // InApp Preview Content Styles (Phase 10)
1321
1056
  // Styles copied from TemplatePreview/_templatePreview.scss to ensure consistency
1322
1057
  // These styles work within the SMS device container structure
@@ -1377,11 +1112,11 @@
1377
1112
  .inapp-message-container-FULLSCREEN {
1378
1113
  position: relative;
1379
1114
  background-color: $CAP_WHITE;
1380
- width: 100%;
1115
+ width: 100%;
1381
1116
  height: 100%;
1382
1117
  align-items: center;
1383
1118
  padding: 0 $CAP_SPACE_16;
1384
- border-bottom-left-radius: 2.6rem;
1119
+ border-bottom-left-radius: 2.6rem;
1385
1120
  border-bottom-right-radius: 2.6rem;
1386
1121
  .inapp-title-FULLSCREEN {
1387
1122
  align-items: center;
@@ -2211,7 +1946,7 @@
2211
1946
  max-height: 7.5rem;
2212
1947
  margin-left: $CAP_SPACE_24;
2213
1948
  }
2214
-
1949
+
2215
1950
  .mpush-gif-preview {
2216
1951
  max-width: 100%;
2217
1952
  max-height: 7.5rem;
@@ -2471,7 +2206,6 @@
2471
2206
  font-weight: 500;
2472
2207
  display: -webkit-box;
2473
2208
  -webkit-line-clamp: 1;
2474
- line-clamp: 1;
2475
2209
  -webkit-box-orient: vertical;
2476
2210
  overflow: hidden;
2477
2211
  color: $CAP_WHITE;
@@ -2523,7 +2257,7 @@
2523
2257
  color: $FONT_COLOR_01;
2524
2258
  margin-bottom: $CAP_SPACE_12;
2525
2259
  }
2526
-
2260
+
2527
2261
  .preview-text {
2528
2262
  font-weight: 400;
2529
2263
  font-size: $FONT_SIZE_S;
@@ -2558,13 +2292,13 @@
2558
2292
  justify-content: center;
2559
2293
  padding: $CAP_SPACE_60 $CAP_SPACE_24;
2560
2294
  gap: $CAP_SPACE_16;
2561
-
2295
+
2562
2296
  .zalo-loading-text {
2563
2297
  color: #8c8c8c;
2564
2298
  font-size: $FONT_SIZE_M;
2565
2299
  }
2566
2300
  }
2567
-
2301
+
2568
2302
  // Error state
2569
2303
  .zalo-error-container {
2570
2304
  display: flex;
@@ -2573,13 +2307,13 @@
2573
2307
  justify-content: center;
2574
2308
  padding: $CAP_SPACE_60 $CAP_SPACE_24;
2575
2309
  gap: $CAP_SPACE_16;
2576
-
2310
+
2577
2311
  .zalo-error-text {
2578
2312
  font-size: $FONT_SIZE_L;
2579
2313
  font-weight: 600;
2580
2314
  color: #262626;
2581
2315
  }
2582
-
2316
+
2583
2317
  .zalo-error-message {
2584
2318
  font-size: $FONT_SIZE_M;
2585
2319
  color: #ff4d4f;
@@ -2597,31 +2331,31 @@
2597
2331
  }
2598
2332
  }
2599
2333
  }
2600
-
2334
+
2601
2335
  @media (max-width: 54.857rem) {
2602
2336
  .unified-preview {
2603
2337
  .preview-header {
2604
2338
  flex-direction: column;
2605
2339
  align-items: flex-start;
2606
2340
  gap: $CAP_SPACE_12;
2607
-
2341
+
2608
2342
  .preview-header-right {
2609
2343
  width: 100%;
2610
2344
  justify-content: flex-start;
2611
2345
  }
2612
2346
  }
2613
-
2347
+
2614
2348
  .preview-content-container {
2615
2349
  padding: $CAP_SPACE_16;
2616
2350
  }
2617
-
2351
+
2618
2352
  .device-frame {
2619
2353
  &.device-frame-desktop,
2620
2354
  &.device-frame-tablet {
2621
2355
  width: 100% !important;
2622
2356
  max-width: 100% !important;
2623
2357
  }
2624
-
2358
+
2625
2359
  &.device-frame-mobile {
2626
2360
  width: 100% !important;
2627
2361
  max-width: 100% !important;
@@ -2629,3 +2363,4 @@
2629
2363
  }
2630
2364
  }
2631
2365
  }
2366
+