@capillarytech/creatives-library 8.0.359-alpha.0 → 8.0.359-alpha.1

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 (147) hide show
  1. package/constants/unified.js +29 -0
  2. package/index.html +1 -0
  3. package/package.json +1 -1
  4. package/services/tests/api.test.js +35 -20
  5. package/utils/cdnTransformation.js +75 -3
  6. package/utils/commonUtils.js +19 -1
  7. package/utils/rcsPayloadUtils.js +92 -0
  8. package/utils/templateVarUtils.js +201 -0
  9. package/utils/tests/cdnTransformation.test.js +127 -0
  10. package/utils/tests/rcsPayloadUtils.test.js +226 -0
  11. package/utils/tests/templateVarUtils.test.js +204 -0
  12. package/v2Components/CapActionButton/constants.js +7 -0
  13. package/v2Components/CapActionButton/index.js +166 -108
  14. package/v2Components/CapActionButton/index.scss +157 -6
  15. package/v2Components/CapActionButton/messages.js +19 -3
  16. package/v2Components/CapActionButton/tests/index.test.js +41 -17
  17. package/v2Components/CapImageUpload/index.js +2 -2
  18. package/v2Components/CapTagList/index.js +10 -0
  19. package/v2Components/CommonTestAndPreview/CustomValuesEditor.js +72 -49
  20. package/v2Components/CommonTestAndPreview/DeliverySettings/DeliverySettings.scss +8 -2
  21. package/v2Components/CommonTestAndPreview/DeliverySettings/ModifyDeliverySettings.js +214 -21
  22. package/v2Components/CommonTestAndPreview/DeliverySettings/constants.js +16 -0
  23. package/v2Components/CommonTestAndPreview/DeliverySettings/index.js +83 -9
  24. package/v2Components/CommonTestAndPreview/DeliverySettings/messages.js +30 -0
  25. package/v2Components/CommonTestAndPreview/DeliverySettings/utils/parseSenderDetailsResponse.js +79 -11
  26. package/v2Components/CommonTestAndPreview/SendTestMessage.js +10 -5
  27. package/v2Components/CommonTestAndPreview/UnifiedPreview/PreviewHeader.js +16 -0
  28. package/v2Components/CommonTestAndPreview/UnifiedPreview/RcsPreviewContent.js +157 -15
  29. package/v2Components/CommonTestAndPreview/UnifiedPreview/ViberPreviewContent.js +14 -132
  30. package/v2Components/CommonTestAndPreview/UnifiedPreview/WebPushPreviewContent.js +169 -0
  31. package/v2Components/CommonTestAndPreview/UnifiedPreview/_unifiedPreview.scss +400 -239
  32. package/v2Components/CommonTestAndPreview/UnifiedPreview/index.js +202 -10
  33. package/v2Components/CommonTestAndPreview/_commonTestAndPreview.scss +11 -0
  34. package/v2Components/CommonTestAndPreview/constants.js +40 -2
  35. package/v2Components/CommonTestAndPreview/index.js +887 -453
  36. package/v2Components/CommonTestAndPreview/messages.js +45 -3
  37. package/v2Components/CommonTestAndPreview/previewApiUtils.js +59 -0
  38. package/v2Components/CommonTestAndPreview/sagas.js +25 -6
  39. package/v2Components/CommonTestAndPreview/tests/CustomValuesEditor.test.js +308 -284
  40. package/v2Components/CommonTestAndPreview/tests/DeliverySettings/ModifyDeliverySettings.test.js +231 -65
  41. package/v2Components/CommonTestAndPreview/tests/DeliverySettings/index.test.js +118 -5
  42. package/v2Components/CommonTestAndPreview/tests/DeliverySettings/utils/parseSenderDetailsResponse.test.js +341 -0
  43. package/v2Components/CommonTestAndPreview/tests/PreviewSection.test.js +8 -1
  44. package/v2Components/CommonTestAndPreview/tests/SendTestMessage.test.js +34 -13
  45. package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/PreviewHeader.test.js +163 -0
  46. package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/RcsPreviewContent.test.js +281 -283
  47. package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/ViberPreviewContent.test.js +0 -364
  48. package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/WebPushPreviewContent.test.js +522 -0
  49. package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/index.test.js +454 -1
  50. package/v2Components/CommonTestAndPreview/tests/constants.test.js +2 -1
  51. package/v2Components/CommonTestAndPreview/tests/index.test.js +327 -4
  52. package/v2Components/CommonTestAndPreview/tests/previewApiUtils.test.js +67 -0
  53. package/v2Components/CommonTestAndPreview/tests/sagas.test.js +31 -24
  54. package/v2Components/FormBuilder/index.js +167 -56
  55. package/v2Components/SmsFallback/SmsFallbackLocalSelector.js +91 -0
  56. package/v2Components/SmsFallback/constants.js +73 -0
  57. package/v2Components/SmsFallback/index.js +956 -0
  58. package/v2Components/SmsFallback/index.scss +265 -0
  59. package/v2Components/SmsFallback/messages.js +78 -0
  60. package/v2Components/SmsFallback/smsFallbackUtils.js +119 -0
  61. package/v2Components/SmsFallback/tests/SmsFallbackLocalSelector.test.js +50 -0
  62. package/v2Components/SmsFallback/tests/rcsSmsFallback.acceptance.test.js +147 -0
  63. package/v2Components/SmsFallback/tests/smsFallbackHandlers.test.js +304 -0
  64. package/v2Components/SmsFallback/tests/smsFallbackUi.test.js +223 -0
  65. package/v2Components/SmsFallback/tests/smsFallbackUtils.test.js +309 -0
  66. package/v2Components/SmsFallback/tests/useLocalTemplateList.test.js +422 -0
  67. package/v2Components/SmsFallback/useLocalTemplateList.js +92 -0
  68. package/v2Components/TemplatePreview/_templatePreview.scss +37 -22
  69. package/v2Components/TemplatePreview/constants.js +2 -0
  70. package/v2Components/TemplatePreview/index.js +143 -31
  71. package/v2Components/TemplatePreview/tests/index.test.js +142 -0
  72. package/v2Components/TestAndPreviewSlidebox/index.js +15 -3
  73. package/v2Components/TestAndPreviewSlidebox/sagas.js +11 -4
  74. package/v2Components/TestAndPreviewSlidebox/tests/saga.test.js +3 -1
  75. package/v2Components/VarSegmentMessageEditor/constants.js +2 -0
  76. package/v2Components/VarSegmentMessageEditor/index.js +125 -0
  77. package/v2Components/VarSegmentMessageEditor/index.scss +46 -0
  78. package/v2Containers/App/constants.js +3 -0
  79. package/v2Containers/App/tests/constants.test.js +61 -0
  80. package/v2Containers/CreativesContainer/CreativesSlideBoxWrapper.js +17 -0
  81. package/v2Containers/CreativesContainer/SlideBoxContent.js +36 -4
  82. package/v2Containers/CreativesContainer/SlideBoxFooter.js +14 -5
  83. package/v2Containers/CreativesContainer/SlideBoxHeader.js +36 -5
  84. package/v2Containers/CreativesContainer/constants.js +9 -0
  85. package/v2Containers/CreativesContainer/embeddedSlideboxUtils.js +79 -0
  86. package/v2Containers/CreativesContainer/index.js +382 -127
  87. package/v2Containers/CreativesContainer/index.scss +83 -1
  88. package/v2Containers/CreativesContainer/tests/SlideBoxContent.localTemplates.test.js +90 -0
  89. package/v2Containers/CreativesContainer/tests/SlideBoxFooter.test.js +79 -34
  90. package/v2Containers/CreativesContainer/tests/SlideBoxHeader.test.js +79 -16
  91. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +8 -0
  92. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxHeader.test.js.snap +357 -98
  93. package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +20 -15
  94. package/v2Containers/CreativesContainer/tests/embeddedSlideboxUtils.test.js +258 -0
  95. package/v2Containers/CreativesContainer/tests/index.test.js +71 -9
  96. package/v2Containers/CreativesContainer/tests/useLocalTemplatesProp.test.js +125 -0
  97. package/v2Containers/MobilePush/Create/test/saga.test.js +2 -2
  98. package/v2Containers/Rcs/constants.js +120 -11
  99. package/v2Containers/Rcs/index.js +2577 -812
  100. package/v2Containers/Rcs/index.scss +281 -8
  101. package/v2Containers/Rcs/messages.js +34 -3
  102. package/v2Containers/Rcs/rcsLibraryHydrationUtils.js +225 -0
  103. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +98036 -70145
  104. package/v2Containers/Rcs/tests/__snapshots__/utils.test.js.snap +0 -5
  105. package/v2Containers/Rcs/tests/index.test.js +152 -121
  106. package/v2Containers/Rcs/tests/mockData.js +38 -0
  107. package/v2Containers/Rcs/tests/rcsLibraryHydrationUtils.test.js +318 -0
  108. package/v2Containers/Rcs/tests/utils.test.js +646 -30
  109. package/v2Containers/Rcs/utils.js +478 -11
  110. package/v2Containers/Sms/Create/index.js +106 -40
  111. package/v2Containers/Sms/smsFormDataHelpers.js +67 -0
  112. package/v2Containers/Sms/tests/smsFormDataHelpers.test.js +253 -0
  113. package/v2Containers/SmsTrai/Create/index.js +9 -4
  114. package/v2Containers/SmsTrai/Edit/constants.js +2 -0
  115. package/v2Containers/SmsTrai/Edit/index.js +640 -130
  116. package/v2Containers/SmsTrai/Edit/index.scss +121 -0
  117. package/v2Containers/SmsTrai/Edit/messages.js +14 -4
  118. package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +4328 -2375
  119. package/v2Containers/SmsWrapper/index.js +37 -8
  120. package/v2Containers/TagList/index.js +6 -0
  121. package/v2Containers/Templates/TemplatesActionBar.js +101 -0
  122. package/v2Containers/Templates/_templates.scss +166 -86
  123. package/v2Containers/Templates/actions.js +11 -0
  124. package/v2Containers/Templates/constants.js +2 -0
  125. package/v2Containers/Templates/index.js +203 -145
  126. package/v2Containers/Templates/sagas.js +62 -13
  127. package/v2Containers/Templates/tests/TemplatesActionBar.test.js +120 -0
  128. package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +1062 -1017
  129. package/v2Containers/Templates/tests/sagas.test.js +222 -22
  130. package/v2Containers/Templates/tests/smsTemplatesListApi.test.js +180 -0
  131. package/v2Containers/Templates/tests/webpush.test.js +375 -0
  132. package/v2Containers/Templates/utils/smsTemplatesListApi.js +79 -0
  133. package/v2Containers/TemplatesV2/TemplatesV2.style.js +72 -1
  134. package/v2Containers/TemplatesV2/index.js +86 -23
  135. package/v2Containers/TemplatesV2/tests/TemplatesV2.localTemplates.test.js +131 -0
  136. package/v2Containers/Viber/constants.js +0 -19
  137. package/v2Containers/Viber/index.js +47 -714
  138. package/v2Containers/Viber/index.scss +0 -148
  139. package/v2Containers/Viber/messages.js +0 -116
  140. package/v2Containers/Viber/tests/index.test.js +0 -80
  141. package/v2Containers/WeChat/MapTemplates/test/saga.test.js +9 -9
  142. package/v2Containers/WebPush/Create/index.js +91 -8
  143. package/v2Containers/WebPush/Create/index.scss +7 -0
  144. package/v2Containers/WebPush/Create/tests/getTemplateContent.test.js +348 -0
  145. package/v2Containers/WebPush/Create/tests/testAndPreviewIntegration.test.js +325 -0
  146. package/v2Containers/Whatsapp/index.js +3 -20
  147. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +578 -34
@@ -10,12 +10,14 @@ import { isTraiDLTEnable } from '../../utils/common';
10
10
  import SmsEdit from '../Sms/Edit';
11
11
  import SmsTraiCreate from '../SmsTrai/Create';
12
12
  import SmsTraiEdit from '../SmsTrai/Edit';
13
+
13
14
  const SmsWrapper = (props) => {
14
15
  const {
15
16
  isCreateSms,
16
17
  isEditSms,
17
18
  setIsLoadingContent,
18
19
  location,
20
+ route: routeFromProps,
19
21
  isGetFormData,
20
22
  getFormSubscriptionData,
21
23
  isFullMode,
@@ -38,15 +40,33 @@ const SmsWrapper = (props) => {
38
40
  handleCloseTestAndPreview,
39
41
  isTestAndPreviewMode,
40
42
  onValidationFail,
43
+ embeddedSmsFallback = false,
44
+ onEmbeddedSmsFooterValidity,
45
+ forceFullTagContext = false,
41
46
  } = props;
42
47
 
48
+ /** FormBuilder / SMS Create assume `location.query`; connected-router shapes may omit it. */
49
+ const smsLocation = (() => {
50
+ const loc = location || {};
51
+ const q = loc.query;
52
+ if (q && typeof q === 'object') {
53
+ return { ...loc, query: { ...q } };
54
+ }
55
+ return {
56
+ pathname: loc.pathname || '/sms/create',
57
+ search: loc.search || '',
58
+ query: { type: 'embedded', module: 'library' },
59
+ };
60
+ })();
61
+
43
62
  const smsProps = {
44
63
  onCreateComplete,
45
64
  setIsLoadingContent,
46
- location,
47
- route: { name: 'sms' },
65
+ location: smsLocation,
66
+ route: routeFromProps || { name: 'sms' },
48
67
  isGetFormData,
49
68
  getFormSubscriptionData,
69
+ templateData,
50
70
  getDefaultTags,
51
71
  isFullMode,
52
72
  forwardedTags,
@@ -62,24 +82,33 @@ const SmsWrapper = (props) => {
62
82
  handleCloseTestAndPreview,
63
83
  isTestAndPreviewMode,
64
84
  onValidationFail,
85
+ forceFullTagContext,
86
+ embeddedSmsFallback,
87
+ onEmbeddedSmsFooterValidity,
88
+ ...(embeddedSmsFallback
89
+ ? {
90
+ tagListGetPopupContainer: () => document.body,
91
+ tagListPopoverOverlayStyle: { zIndex: 10020 },
92
+ tagListPopoverOverlayClassName: 'sms-fallback-taglist-popover rcs-sms-fallback-taglist-popover',
93
+ }
94
+ : {}),
65
95
  };
66
- const isTraiDlt = isTraiDLTEnable(isFullMode, smsRegister);
96
+ const useTraiSmsFlow = isTraiDLTEnable(isFullMode, smsRegister);
67
97
  return <>
68
98
  {
69
- isCreateSms && (isTraiDlt ?
99
+ isCreateSms && (useTraiSmsFlow ?
70
100
  <SmsTraiCreate
71
101
  isComponent
72
102
  {...smsProps}
73
103
  onShowTemplates={onShowTemplates}
74
104
  /> :
75
105
  <SmsCreate
76
- isComponent {
77
- ...smsProps
78
- }
106
+ isComponent
107
+ {...smsProps}
79
108
  />
80
109
  )
81
110
  }
82
- {isEditSms && (isTraiDlt ?
111
+ {isEditSms && (useTraiSmsFlow ?
83
112
  <SmsTraiEdit
84
113
  {...smsProps}
85
114
  params={{id: templateData._id}}
@@ -477,6 +477,9 @@ export class TagList extends React.Component { // eslint-disable-line react/pref
477
477
  disableTooltipMsg={tooltipMsg}
478
478
  fetchingSchemaError={this?.state?.tagsError}
479
479
  popoverPlacement={this.props.popoverPlacement}
480
+ overlayStyle={this.props.popoverOverlayStyle}
481
+ overlayClassName={this.props.popoverOverlayClassName}
482
+ getPopupContainer={this.props.getPopupContainer}
480
483
  />
481
484
  </div>
482
485
  );
@@ -513,6 +516,9 @@ TagList.propTypes = {
513
516
  // message to show when Add Label button is disabled (e.g. personalization restriction)
514
517
  disableTooltipMsg: PropTypes.string,
515
518
  restrictPersonalization: PropTypes.bool,
519
+ popoverOverlayStyle: PropTypes.object,
520
+ popoverOverlayClassName: PropTypes.string,
521
+ getPopupContainer: PropTypes.func,
516
522
  intl: PropTypes.shape({
517
523
  formatMessage: PropTypes.func.isRequired,
518
524
  locale: PropTypes.string,
@@ -0,0 +1,101 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import CapInput from '@capillarytech/cap-ui-library/CapInput';
4
+ import CapButton from '@capillarytech/cap-ui-library/CapButton';
5
+
6
+ /**
7
+ * Reusable action bar for template pickers.
8
+ * Layout and spacing live in `_templates.scss` (`.action-container`, `.action-container__toolbar-row`).
9
+ * Default search field width: `.action-container__toolbar-row .search-text` (13.125rem).
10
+ * Pass `searchInputClassName` / `searchInputStyle` to override (defaults match Templates list: 210px per master).
11
+ */
12
+ const TemplatesActionBar = ({
13
+ searchValue,
14
+ onSearchChange,
15
+ onSearch,
16
+ onClear,
17
+ searchPlaceholder,
18
+ searchInputClassName,
19
+ searchInputStyle,
20
+ ctaLabel,
21
+ onCtaClick,
22
+ ctaDisabled,
23
+ ctaClassName,
24
+ ctaNode,
25
+ children,
26
+ showCta = true,
27
+ }) => (
28
+ <div className="action-container">
29
+ <div className="action-container__toolbar-row">
30
+ {searchPlaceholder && (
31
+ <CapInput.Search
32
+ className={['search-text', searchInputClassName].filter(Boolean).join(' ')}
33
+ placeholder={searchPlaceholder}
34
+ value={searchValue}
35
+ onChange={onSearchChange}
36
+ /* antd `Input` (used by CapInput.Search) has no `onSearch`; only `Input.Search` does. */
37
+ onPressEnter={(e) => {
38
+ if (onSearch) {
39
+ const v = e?.target && 'value' in e.target ? e.target.value : searchValue;
40
+ onSearch(v);
41
+ }
42
+ }}
43
+ onSearch={onSearch}
44
+ onClear={onClear}
45
+ onScroll={(e) => e.stopPropagation()}
46
+ />
47
+ )}
48
+ {children}
49
+ </div>
50
+ {showCta && (
51
+ <div>
52
+ {ctaNode || (
53
+ <CapButton
54
+ className={ctaClassName}
55
+ type="primary"
56
+ disabled={ctaDisabled}
57
+ onClick={onCtaClick}
58
+ >
59
+ {ctaLabel}
60
+ </CapButton>
61
+ )}
62
+ </div>
63
+ )}
64
+ </div>
65
+ );
66
+
67
+ TemplatesActionBar.propTypes = {
68
+ searchValue: PropTypes.string,
69
+ onSearchChange: PropTypes.func,
70
+ onSearch: PropTypes.func,
71
+ onClear: PropTypes.func,
72
+ searchPlaceholder: PropTypes.string,
73
+ searchInputClassName: PropTypes.string,
74
+ searchInputStyle: PropTypes.object,
75
+ ctaLabel: PropTypes.node,
76
+ onCtaClick: PropTypes.func,
77
+ ctaDisabled: PropTypes.bool,
78
+ ctaClassName: PropTypes.string,
79
+ ctaNode: PropTypes.node,
80
+ children: PropTypes.node,
81
+ showCta: PropTypes.bool,
82
+ };
83
+
84
+ TemplatesActionBar.defaultProps = {
85
+ searchValue: '',
86
+ onSearchChange: () => {},
87
+ onSearch: () => {},
88
+ onClear: () => {},
89
+ searchPlaceholder: '',
90
+ searchInputClassName: '',
91
+ searchInputStyle: { width: '210px' },
92
+ ctaLabel: null,
93
+ onCtaClick: () => {},
94
+ ctaDisabled: false,
95
+ ctaClassName: '',
96
+ ctaNode: null,
97
+ children: null,
98
+ };
99
+
100
+ export default TemplatesActionBar;
101
+
@@ -1,11 +1,13 @@
1
1
  @import '~@capillarytech/cap-ui-library/styles/_variables.scss';
2
2
 
3
3
  .ant-tabs-content{
4
- margin-top: $CAP_SPACE_16;
5
- .ant-tabs-tabpane-active{
6
- padding: unset;
4
+ // .creatives-templates-list.full-mode{
5
+ .v2-pagination-container, .v2-pagination-container-half {
6
+ .ant-tabs-tabpane-active{
7
+ padding: unset;
8
+ }
7
9
  }
8
- }
10
+ }
9
11
  //removing current one as not required now in each row we'll have 3 cards for which css has been added
10
12
 
11
13
  // 3 cards per row across all breakpoints
@@ -24,6 +26,7 @@
24
26
  }
25
27
  }
26
28
 
29
+
27
30
  .creatives-templates-list {
28
31
  position: relative;
29
32
 
@@ -45,8 +48,10 @@
45
48
  .ant-modal-footer {
46
49
  padding: $CAP_SPACE_16 $CAP_SPACE_24 $CAP_SPACE_24 $CAP_SPACE_24;
47
50
  }
51
+ }
48
52
 
49
53
  .ant-modal-header {
54
+ .v2-pagination-container, .v2-pagination-container-half {
50
55
  padding: $CAP_SPACE_24 $CAP_SPACE_24 $CAP_SPACE_08 $CAP_SPACE_24;
51
56
  }
52
57
 
@@ -59,7 +64,8 @@
59
64
  }
60
65
  }
61
66
 
62
- .v2-pagination-container {
67
+ .v2-pagination-container,
68
+ .v2-pagination-container-half {
63
69
  .FACEBOOK {
64
70
  .ant-card-body {
65
71
  background-color: $CAP_G09;
@@ -153,83 +159,6 @@
153
159
  line-clamp: 3;
154
160
  }
155
161
  }
156
- .viber-carousel-static-content {
157
- width: 100%;
158
- overflow: hidden;
159
- .viber-carousel-static-message-box {
160
- width: 100%;
161
- height: 2.25rem;
162
- border-radius: $CAP_SPACE_04;
163
- background: $CAP_WHITE;
164
- margin-bottom: $CAP_SPACE_08;
165
- padding: 0 $CAP_SPACE_08;
166
- display: flex;
167
- align-items: center;
168
- }
169
- .viber-carousel-static-message {
170
- display: block;
171
- width: 100%;
172
- color: $CAP_G01;
173
- overflow: hidden;
174
- text-overflow: ellipsis;
175
- white-space: nowrap;
176
- }
177
- .viber-carousel-static-cards {
178
- display: flex;
179
- gap: $CAP_SPACE_08;
180
- overflow: hidden;
181
- }
182
- .viber-carousel-static-card {
183
- flex: 1;
184
- min-width: 0;
185
- background: $CAP_WHITE;
186
- border-radius: $CAP_SPACE_04;
187
- padding: $CAP_SPACE_06;
188
- overflow: hidden;
189
- }
190
- .viber-carousel-static-image,
191
- .viber-carousel-static-image-placeholder {
192
- width: 100%;
193
- height: 5.357rem;
194
- border-radius: $CAP_SPACE_04;
195
- }
196
- .viber-carousel-static-image {
197
- object-fit: cover;
198
- }
199
- .viber-carousel-static-image-placeholder {
200
- background: $CAP_G07;
201
- }
202
- .viber-carousel-static-text {
203
- display: block;
204
- color: $CAP_G01;
205
- margin: $CAP_SPACE_04 0;
206
- line-height: 1.3;
207
- overflow: hidden;
208
- text-overflow: ellipsis;
209
- white-space: normal;
210
- }
211
- .viber-carousel-static-buttons {
212
- display: flex;
213
- flex-direction: column;
214
- gap: $CAP_SPACE_04;
215
- }
216
- .viber-carousel-static-button {
217
- display: block;
218
- min-height: 1.5rem;
219
- border-radius: $CAP_SPACE_12;
220
- background: $CAP_PURPLE01;
221
- color: $CAP_WHITE;
222
- text-align: center;
223
- padding: 0.179rem $CAP_SPACE_08;
224
- white-space: normal;
225
- }
226
- .viber-carousel-static-button-secondary {
227
- color: $CAP_PURPLE01;
228
- background: transparent;
229
- border: none;
230
- box-shadow: none;
231
- }
232
- }
233
162
 
234
163
  }
235
164
 
@@ -262,10 +191,14 @@
262
191
  .whatsapp-container {
263
192
  background-color: $CAP_WHITE;
264
193
  padding: $CAP_SPACE_12;
194
+ overflow-y: hidden;
265
195
  }
266
196
  .scroll-container {
267
197
  overflow-x: auto;
198
+ overflow-y: hidden;
268
199
  display: flex;
200
+ flex-wrap: nowrap;
201
+ width: 100%;
269
202
  padding-top: $CAP_SPACE_06;
270
203
  padding-right: $CAP_SPACE_06;
271
204
  white-space: nowrap;
@@ -273,7 +206,6 @@
273
206
  &::-webkit-scrollbar {
274
207
  display: none; // Hide scrollbar in Chrome/Safari/Opera
275
208
  }
276
- overflow: hidden;
277
209
  .whatsapp-carousel-container {
278
210
  padding: $CAP_SPACE_04 0px $CAP_SPACE_08;
279
211
  border-radius: $CAP_SPACE_06;
@@ -299,6 +231,92 @@
299
231
  }
300
232
  }
301
233
 
234
+ // RCS template listing preview: match WhatsApp carousel "peek" behavior
235
+ .RCS {
236
+ .cap-custom-card {
237
+ .ant-card-body {
238
+ .ant-card-meta {
239
+ background-color: $CAP_G09;
240
+ padding: 0;
241
+ .ant-card-meta-description {
242
+ .whatsapp-container,.cap-rcs-creatives {
243
+ background-color: $CAP_WHITE;
244
+ padding: $CAP_SPACE_12;
245
+ border-radius: 0.25rem;
246
+ .cap-divider-v2{
247
+ margin: $CAP_SPACE_12 0;
248
+ }
249
+ }
250
+ .scroll-container {
251
+ overflow-x: auto;
252
+ overflow-y: hidden;
253
+ display: flex;
254
+ flex-wrap: nowrap;
255
+ padding-top: $CAP_SPACE_06;
256
+ padding-right: $CAP_SPACE_06;
257
+ white-space: nowrap;
258
+ scrollbar-width: none; // Hide scrollbar in Firefox
259
+ &::-webkit-scrollbar {
260
+ display: none; // Hide scrollbar in Chrome/Safari/Opera
261
+ }
262
+ .whatsapp-carousel-container {
263
+ padding: $CAP_SPACE_04 0px $CAP_SPACE_08;
264
+ border-radius: $CAP_SPACE_06;
265
+ background-color: $CAP_WHITE;
266
+ width: 80%;
267
+ flex-shrink: 0;
268
+ margin-right: $CAP_SPACE_04;
269
+ white-space: pre-wrap;
270
+ word-break: break-word;
271
+ overflow: auto;
272
+ text-align: left;
273
+ .whatsapp-carousel-card {
274
+ margin: $CAP_SPACE_02 $CAP_SPACE_06 $CAP_SPACE_01 $CAP_SPACE_08;
275
+ .whatsapp-carousel-body {
276
+ margin-bottom: $CAP_SPACE_08;
277
+ white-space: pre-wrap;
278
+ }
279
+ }
280
+ }
281
+ }
282
+
283
+ // RCS CTA buttons in listing (reuse WhatsApp-ish look)
284
+ .rcs-cta-preview {
285
+ margin: $CAP_SPACE_12 0;
286
+ display: flex;
287
+ justify-content: center;
288
+ font-size: $FONT_SIZE_M;
289
+ align-items: center;
290
+ color: #1970DA;
291
+ svg {
292
+ margin-right: $CAP_SPACE_04;
293
+ }
294
+ }
295
+
296
+ .rcs-video-preview-placeholder {
297
+ background: #f5f5f5;
298
+ display: flex;
299
+ align-items: center;
300
+ justify-content: center;
301
+ }
302
+
303
+ .rcs-video-preview-label {
304
+ color: #7a7a7a;
305
+ }
306
+
307
+ .rcs-listing-title {
308
+ font-weight: 600;
309
+ }
310
+
311
+ .whatsapp-divider {
312
+ margin: 0;
313
+ }
314
+ }
315
+ }
316
+ }
317
+ }
318
+ }
319
+
302
320
  .MOBILEPUSH {
303
321
  .ant-card-body {
304
322
  padding: 0;
@@ -344,6 +362,7 @@
344
362
  }
345
363
  .scroll-container {
346
364
  overflow-x: auto;
365
+ overflow-y: hidden;
347
366
  display: flex;
348
367
  padding-top: $CAP_SPACE_06;
349
368
  padding-right: $CAP_SPACE_06;
@@ -352,7 +371,6 @@
352
371
  &::-webkit-scrollbar {
353
372
  display: none; // Hide scrollbar in Chrome/Safari/Opera
354
373
  }
355
- overflow: hidden;
356
374
  height: 100%;
357
375
  width: 100%;
358
376
  margin-left: 1.65rem;
@@ -740,11 +758,30 @@
740
758
  }
741
759
 
742
760
  .action-container{
743
- margin-top: 8px;
744
- margin-bottom: 16px;
761
+ margin-top: $CAP_SPACE_08;
762
+ margin-bottom: $CAP_SPACE_16;
745
763
  display: flex;
746
764
  justify-content: space-between;
747
765
  align-items: center;
766
+
767
+ &__toolbar-row {
768
+ display: flex;
769
+ align-items: center;
770
+ gap: 0.75rem;
771
+ }
772
+
773
+ &__toolbar-row .search-text {
774
+ width: 13.125rem;
775
+ min-width: 13.125rem;
776
+ flex: 1;
777
+ }
778
+
779
+ &__create-row {
780
+ display: flex;
781
+ justify-content: space-between;
782
+ align-items: center;
783
+ margin-right: $CAP_SPACE_32;
784
+ }
748
785
  }
749
786
 
750
787
  .popover-action-container:hover{
@@ -1215,6 +1252,49 @@
1215
1252
  overflow: 'auto';
1216
1253
  }
1217
1254
 
1255
+ /* Local SMS / slidebox: viewport-based .v2-pagination-container-half height leaves empty space below and clips cards */
1256
+ .creatives-templates-container--local-sms.library-mode {
1257
+ .creatives-templates-list.library-mode > .cap-row:first-of-type > div {
1258
+ display: flex;
1259
+ flex-direction: column;
1260
+ flex: 1 1 auto;
1261
+ min-height: 0;
1262
+ overflow: hidden;
1263
+ }
1264
+
1265
+ .creatives-templates-list.library-mode > .cap-row:first-of-type > div > div:first-child {
1266
+ display: flex;
1267
+ flex-direction: column;
1268
+ flex: 1 1 auto;
1269
+ min-height: 0;
1270
+ overflow: hidden;
1271
+ }
1272
+
1273
+ /* Block below search/filter: grid + skeletons — must grow to use space above footer */
1274
+ .creatives-templates-list.library-mode > .cap-row:first-of-type > div > div:first-child > div:nth-child(2) {
1275
+ flex: 1 1 auto;
1276
+ min-height: 0;
1277
+ display: flex;
1278
+ flex-direction: column;
1279
+ overflow: hidden;
1280
+ }
1281
+
1282
+ /*
1283
+ * Scroll needs a definite height. Pure flex + height:auto + max-height:100% often won’t bound (no % base), so no scrollbar.
1284
+ * Use a taller slice than global 100vh-20rem so the grid uses space under search; still overflow-y:auto for long lists.
1285
+ */
1286
+ .v2-pagination-container,
1287
+ .v2-pagination-container-half {
1288
+ flex: 0 1 auto;
1289
+ min-height: 0;
1290
+ height: calc(100vh - 12rem);
1291
+ max-height: calc(100vh - 12rem);
1292
+ overflow-y: auto;
1293
+ overflow-x: hidden;
1294
+ -webkit-overflow-scrolling: touch;
1295
+ }
1296
+ }
1297
+
1218
1298
  // Archive feature layout classes
1219
1299
  .illustration-scroll-wrapper {
1220
1300
  height: calc(100vh - 20.3125rem);
@@ -15,6 +15,17 @@ export function getAllTemplates(channel, queryParams, intlCopyOf = '') {
15
15
  };
16
16
  }
17
17
 
18
+
19
+ export function getLocalSmsTemplates(queryParams, intlCopyOf = '', onSuccess, onFailure) {
20
+ return {
21
+ type: types.GET_LOCAL_SMS_TEMPLATES_REQUEST,
22
+ queryParams,
23
+ intlCopyOf,
24
+ onSuccess,
25
+ onFailure,
26
+ };
27
+ }
28
+
18
29
  export function resetTemplate() {
19
30
  return {
20
31
  type: types.RESET_TEMPLATE,
@@ -10,6 +10,8 @@ export const GET_ALL_TEMPLATES_REQUEST = 'app/v2Containers/Templates/GET_ALL_TEM
10
10
  export const GET_ALL_TEMPLATES_SUCCESS = 'app/v2Containers/Templates/GET_ALL_TEMPLATES_SUCCESS';
11
11
  export const GET_ALL_TEMPLATES_FAILURE = 'app/v2Containers/Templates/GET_ALL_TEMPLATES_FAILURE';
12
12
 
13
+ export const GET_LOCAL_SMS_TEMPLATES_REQUEST = 'app/v2Containers/Templates/GET_LOCAL_SMS_TEMPLATES_REQUEST';
14
+
13
15
  export const DELETE_TEMPLATE_REQUEST = 'app/v2Containers/Templates/DELETE_TEMPLATE_REQUEST';
14
16
  export const DELETE_RCS_TEMPLATE_REQUEST = 'app/v2Containers/Templates/DELETE_RCS_TEMPLATE_REQUEST';
15
17
  export const DELETE_TEMPLATE_SUCCESS = 'app/v2Containers/Templates/DELETE_TEMPLATE_SUCCESS';