@capillarytech/creatives-library 8.0.345-alpha.12 → 8.0.345-alpha.13

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 (138) hide show
  1. package/constants/unified.js +0 -29
  2. package/package.json +1 -1
  3. package/services/api.js +20 -0
  4. package/services/tests/api.test.js +59 -13
  5. package/utils/commonUtils.js +1 -19
  6. package/v2Components/CapActionButton/constants.js +0 -7
  7. package/v2Components/CapActionButton/index.js +109 -167
  8. package/v2Components/CapActionButton/index.scss +6 -157
  9. package/v2Components/CapActionButton/messages.js +3 -19
  10. package/v2Components/CapActionButton/tests/index.test.js +17 -41
  11. package/v2Components/CapCustomSkeleton/index.js +1 -1
  12. package/v2Components/CapCustomSkeleton/tests/__snapshots__/index.test.js.snap +12 -12
  13. package/v2Components/CapTagList/index.js +0 -10
  14. package/v2Components/CommonTestAndPreview/CustomValuesEditor.js +49 -70
  15. package/v2Components/CommonTestAndPreview/DeliverySettings/DeliverySettings.scss +2 -8
  16. package/v2Components/CommonTestAndPreview/DeliverySettings/ModifyDeliverySettings.js +21 -207
  17. package/v2Components/CommonTestAndPreview/DeliverySettings/constants.js +0 -16
  18. package/v2Components/CommonTestAndPreview/DeliverySettings/index.js +10 -85
  19. package/v2Components/CommonTestAndPreview/DeliverySettings/messages.js +0 -30
  20. package/v2Components/CommonTestAndPreview/DeliverySettings/utils/parseSenderDetailsResponse.js +11 -79
  21. package/v2Components/CommonTestAndPreview/SendTestMessage.js +5 -10
  22. package/v2Components/CommonTestAndPreview/UnifiedPreview/RcsPreviewContent.js +15 -160
  23. package/v2Components/CommonTestAndPreview/UnifiedPreview/_unifiedPreview.scss +76 -341
  24. package/v2Components/CommonTestAndPreview/UnifiedPreview/index.js +4 -133
  25. package/v2Components/CommonTestAndPreview/_commonTestAndPreview.scss +0 -11
  26. package/v2Components/CommonTestAndPreview/constants.js +2 -38
  27. package/v2Components/CommonTestAndPreview/index.js +186 -676
  28. package/v2Components/CommonTestAndPreview/messages.js +3 -49
  29. package/v2Components/CommonTestAndPreview/sagas.js +6 -15
  30. package/v2Components/CommonTestAndPreview/tests/CustomValuesEditor.test.js +284 -308
  31. package/v2Components/CommonTestAndPreview/tests/DeliverySettings/ModifyDeliverySettings.test.js +65 -231
  32. package/v2Components/CommonTestAndPreview/tests/DeliverySettings/index.test.js +5 -118
  33. package/v2Components/CommonTestAndPreview/tests/DeliverySettings/utils/parseSenderDetailsResponse.test.js +0 -341
  34. package/v2Components/CommonTestAndPreview/tests/PreviewSection.test.js +1 -8
  35. package/v2Components/CommonTestAndPreview/tests/SendTestMessage.test.js +13 -34
  36. package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/RcsPreviewContent.test.js +283 -281
  37. package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/index.test.js +1 -199
  38. package/v2Components/CommonTestAndPreview/tests/index.test.js +4 -132
  39. package/v2Components/CommonTestAndPreview/tests/sagas.test.js +2 -2
  40. package/v2Components/FormBuilder/index.js +10 -8
  41. package/v2Components/TemplatePreview/_templatePreview.scss +23 -33
  42. package/v2Components/TemplatePreview/index.js +28 -143
  43. package/v2Components/TemplatePreview/tests/index.test.js +0 -142
  44. package/v2Components/TestAndPreviewSlidebox/index.js +1 -13
  45. package/v2Components/TestAndPreviewSlidebox/sagas.js +4 -11
  46. package/v2Components/TestAndPreviewSlidebox/tests/saga.test.js +1 -3
  47. package/v2Containers/Assets/images/archive_Empty_Illustration.svg +9 -0
  48. package/v2Containers/CreativesContainer/SlideBoxContent.js +4 -36
  49. package/v2Containers/CreativesContainer/SlideBoxFooter.js +4 -11
  50. package/v2Containers/CreativesContainer/SlideBoxHeader.js +4 -29
  51. package/v2Containers/CreativesContainer/constants.js +0 -9
  52. package/v2Containers/CreativesContainer/index.js +108 -300
  53. package/v2Containers/CreativesContainer/index.scss +1 -51
  54. package/v2Containers/CreativesContainer/messages.js +4 -0
  55. package/v2Containers/CreativesContainer/tests/SlideBoxFooter.test.js +34 -78
  56. package/v2Containers/CreativesContainer/tests/SlideBoxHeader.test.js +16 -79
  57. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +0 -8
  58. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxHeader.test.js.snap +98 -357
  59. package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +18 -20
  60. package/v2Containers/CreativesContainer/tests/index.test.js +9 -71
  61. package/v2Containers/Rcs/constants.js +8 -119
  62. package/v2Containers/Rcs/index.js +812 -2375
  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 +70345 -98302
  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/ChannelTypeIllustration.js +23 -6
  80. package/v2Containers/Templates/_templates.scss +126 -181
  81. package/v2Containers/Templates/actions.js +36 -11
  82. package/v2Containers/Templates/constants.js +23 -2
  83. package/v2Containers/Templates/index.js +333 -142
  84. package/v2Containers/Templates/messages.js +68 -0
  85. package/v2Containers/Templates/reducer.js +68 -0
  86. package/v2Containers/Templates/sagas.js +98 -55
  87. package/v2Containers/Templates/selectors.js +12 -0
  88. package/v2Containers/Templates/tests/ChannelTypeIllustration.test.js +12 -0
  89. package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +1256 -1042
  90. package/v2Containers/Templates/tests/index.test.js +6 -0
  91. package/v2Containers/Templates/tests/reducer.test.js +178 -0
  92. package/v2Containers/Templates/tests/sagas.test.js +436 -200
  93. package/v2Containers/Templates/tests/selector.test.js +32 -0
  94. package/v2Containers/TemplatesV2/TemplatesV2.style.js +1 -72
  95. package/v2Containers/TemplatesV2/index.js +23 -86
  96. package/v2Containers/Whatsapp/index.js +20 -3
  97. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +34 -578
  98. package/utils/rcsPayloadUtils.js +0 -92
  99. package/utils/templateVarUtils.js +0 -201
  100. package/utils/tests/templateVarUtils.test.js +0 -204
  101. package/v2Components/CommonTestAndPreview/UnifiedPreview/RcsPreviewContent.js.rej +0 -18
  102. package/v2Components/CommonTestAndPreview/previewApiUtils.js +0 -59
  103. package/v2Components/CommonTestAndPreview/tests/previewApiUtils.test.js +0 -67
  104. package/v2Components/SmsFallback/SmsFallbackLocalSelector.js +0 -87
  105. package/v2Components/SmsFallback/constants.js +0 -73
  106. package/v2Components/SmsFallback/index.js +0 -955
  107. package/v2Components/SmsFallback/index.scss +0 -265
  108. package/v2Components/SmsFallback/messages.js +0 -78
  109. package/v2Components/SmsFallback/smsFallbackUtils.js +0 -118
  110. package/v2Components/SmsFallback/tests/SmsFallbackLocalSelector.test.js +0 -50
  111. package/v2Components/SmsFallback/tests/rcsSmsFallback.acceptance.test.js +0 -147
  112. package/v2Components/SmsFallback/tests/smsFallbackHandlers.test.js +0 -304
  113. package/v2Components/SmsFallback/tests/smsFallbackUi.test.js +0 -197
  114. package/v2Components/SmsFallback/tests/smsFallbackUtils.test.js +0 -277
  115. package/v2Components/SmsFallback/tests/useLocalTemplateList.test.js +0 -422
  116. package/v2Components/SmsFallback/useLocalTemplateList.js +0 -92
  117. package/v2Components/TemplatePreview/constants.js +0 -2
  118. package/v2Components/VarSegmentMessageEditor/constants.js +0 -2
  119. package/v2Components/VarSegmentMessageEditor/index.js +0 -125
  120. package/v2Components/VarSegmentMessageEditor/index.scss +0 -46
  121. package/v2Containers/CreativesContainer/CreativesSlideBoxWrapper.js +0 -43
  122. package/v2Containers/CreativesContainer/embeddedSlideboxUtils.js +0 -67
  123. package/v2Containers/CreativesContainer/tests/SlideBoxContent.localTemplates.test.js +0 -90
  124. package/v2Containers/CreativesContainer/tests/embeddedSlideboxUtils.test.js +0 -258
  125. package/v2Containers/CreativesContainer/tests/useLocalTemplatesProp.test.js +0 -125
  126. package/v2Containers/Rcs/index.js.rej +0 -1336
  127. package/v2Containers/Rcs/index.scss.rej +0 -74
  128. package/v2Containers/Rcs/rcsLibraryHydrationUtils.js +0 -225
  129. package/v2Containers/Rcs/tests/__snapshots__/utils.test.js.snap.rej +0 -128
  130. package/v2Containers/Rcs/tests/rcsLibraryHydrationUtils.test.js +0 -318
  131. package/v2Containers/Sms/smsFormDataHelpers.js +0 -67
  132. package/v2Containers/Sms/tests/smsFormDataHelpers.test.js +0 -253
  133. package/v2Containers/SmsTrai/Edit/index.scss +0 -121
  134. package/v2Containers/Templates/TemplatesActionBar.js +0 -101
  135. package/v2Containers/Templates/tests/TemplatesActionBar.test.js +0 -120
  136. package/v2Containers/Templates/tests/smsTemplatesListApi.test.js +0 -180
  137. package/v2Containers/Templates/utils/smsTemplatesListApi.js +0 -79
  138. package/v2Containers/TemplatesV2/tests/TemplatesV2.localTemplates.test.js +0 -131
@@ -10,14 +10,12 @@ 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
-
14
13
  const SmsWrapper = (props) => {
15
14
  const {
16
15
  isCreateSms,
17
16
  isEditSms,
18
17
  setIsLoadingContent,
19
18
  location,
20
- route: routeFromProps,
21
19
  isGetFormData,
22
20
  getFormSubscriptionData,
23
21
  isFullMode,
@@ -40,33 +38,15 @@ const SmsWrapper = (props) => {
40
38
  handleCloseTestAndPreview,
41
39
  isTestAndPreviewMode,
42
40
  onValidationFail,
43
- embeddedSmsFallback = false,
44
- onEmbeddedSmsFooterValidity,
45
- forceFullTagContext = false,
46
41
  } = props;
47
42
 
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
-
62
43
  const smsProps = {
63
44
  onCreateComplete,
64
45
  setIsLoadingContent,
65
- location: smsLocation,
66
- route: routeFromProps || { name: 'sms' },
46
+ location,
47
+ route: { name: 'sms' },
67
48
  isGetFormData,
68
49
  getFormSubscriptionData,
69
- templateData,
70
50
  getDefaultTags,
71
51
  isFullMode,
72
52
  forwardedTags,
@@ -82,33 +62,24 @@ const SmsWrapper = (props) => {
82
62
  handleCloseTestAndPreview,
83
63
  isTestAndPreviewMode,
84
64
  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
- : {}),
95
65
  };
96
- const useTraiSmsFlow = isTraiDLTEnable(isFullMode, smsRegister);
66
+ const isTraiDlt = isTraiDLTEnable(isFullMode, smsRegister);
97
67
  return <>
98
68
  {
99
- isCreateSms && (useTraiSmsFlow ?
69
+ isCreateSms && (isTraiDlt ?
100
70
  <SmsTraiCreate
101
71
  isComponent
102
72
  {...smsProps}
103
73
  onShowTemplates={onShowTemplates}
104
74
  /> :
105
75
  <SmsCreate
106
- isComponent
107
- {...smsProps}
76
+ isComponent {
77
+ ...smsProps
78
+ }
108
79
  />
109
80
  )
110
81
  }
111
- {isEditSms && (useTraiSmsFlow ?
82
+ {isEditSms && (isTraiDlt ?
112
83
  <SmsTraiEdit
113
84
  {...smsProps}
114
85
  params={{id: templateData._id}}
@@ -477,9 +477,6 @@ 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}
483
480
  />
484
481
  </div>
485
482
  );
@@ -516,9 +513,6 @@ TagList.propTypes = {
516
513
  // message to show when Add Label button is disabled (e.g. personalization restriction)
517
514
  disableTooltipMsg: PropTypes.string,
518
515
  restrictPersonalization: PropTypes.bool,
519
- popoverOverlayStyle: PropTypes.object,
520
- popoverOverlayClassName: PropTypes.string,
521
- getPopupContainer: PropTypes.func,
522
516
  intl: PropTypes.shape({
523
517
  formatMessage: PropTypes.func.isRequired,
524
518
  locale: PropTypes.string,
@@ -1,5 +1,9 @@
1
1
  import React, { useMemo } from 'react';
2
2
  import PropTypes from 'prop-types';
3
+ import zaloillustration from '@capillarytech/cap-ui-library/assets/images/featureUiNotEnabledIllustration.svg';
4
+ import inAppIllustration from '@capillarytech/cap-ui-library/assets/images/featureUiNotEnabledIllustration.svg';
5
+ import { FormattedMessage } from 'react-intl';
6
+ import { CapIllustration } from "@capillarytech/cap-ui-library";
3
7
  import emailIllustration from '../Assets/images/emailIllustration.svg';
4
8
  import smsIllustration from '../Assets/images/smsIllustration.svg';
5
9
  import pushIllustration from '../Assets/images/pushIllustration.svg';
@@ -8,13 +12,12 @@ import lineIllustration from '../Assets/images/lineIllustration.svg';
8
12
  import facebookIllustration from '../Assets/images/facebookIllustration.svg';
9
13
  import whatsappIllustration from '../Assets/images/whatsappIllustration.png';
10
14
  import whatsappOrZaloAccountIllustration from '../Assets/images/whatsappOrZaloAccountIllustration.svg';
15
+ import archiveEmptyStateIllustration from '../Assets/images/archive_Empty_Illustration.svg';
11
16
  import rcsIllustration from '../Assets/images/rcsIllustration.png';
12
- import zaloillustration from '@capillarytech/cap-ui-library/assets/images/featureUiNotEnabledIllustration.svg';
13
- import inAppIllustration from '@capillarytech/cap-ui-library/assets/images/featureUiNotEnabledIllustration.svg';
14
17
  import messages from './messages';
15
- import { FormattedMessage } from 'react-intl';
16
- import { CapIllustration } from "@capillarytech/cap-ui-library";
17
- import { MOBILE_PUSH, SMS, EMAIL, LINE, VIBER, FACEBOOK, WHATSAPP, RCS, ZALO, INAPP, WEBPUSH } from '../CreativesContainer/constants';
18
+ import {
19
+ MOBILE_PUSH, SMS, EMAIL, LINE, VIBER, FACEBOOK, WHATSAPP, RCS, ZALO, INAPP, WEBPUSH,
20
+ } from '../CreativesContainer/constants';
18
21
 
19
22
 
20
23
  // Configuration object for channel types
@@ -80,7 +83,8 @@ function ChannelTypeIllustration(props) {
80
83
  isFullMode,
81
84
  createTemplate,
82
85
  currentChannel,
83
- hostName
86
+ hostName,
87
+ isArchivedMode,
84
88
  } = props;
85
89
 
86
90
  const templateText = useMemo(() => {
@@ -88,6 +92,18 @@ function ChannelTypeIllustration(props) {
88
92
  return isFullMode ? templateIntlMsg : '';
89
93
  }, [isFullMode]);
90
94
 
95
+ if (isArchivedMode) {
96
+ return (
97
+ <CapIllustration
98
+ illustrationImage={archiveEmptyStateIllustration}
99
+ title={<FormattedMessage {...messages.noArchivedCreatives} />}
100
+ description={<FormattedMessage {...messages.noArchivedCreativesDesc} />}
101
+ descriptionPosition="bottom"
102
+ descriptionClassName="illustration-desc archive-illustration"
103
+ />
104
+ );
105
+ }
106
+
91
107
  const getChannelTypeIllustrationInfo = (type, hostName) => {
92
108
  // Handle special cases with hostName dependency
93
109
  if (type === WHATSAPP) {
@@ -196,5 +212,6 @@ ChannelTypeIllustration.propTypes = {
196
212
  createTemplate: PropTypes.func.isRequired,
197
213
  currentChannel: PropTypes.string,
198
214
  hostName: PropTypes.string,
215
+ isArchivedMode: PropTypes.bool,
199
216
  };
200
217
  export default ChannelTypeIllustration;
@@ -1,59 +1,36 @@
1
1
  @import '~@capillarytech/cap-ui-library/styles/_variables.scss';
2
2
 
3
3
  .ant-tabs-content{
4
- margin-top: 16px;
5
- // .creatives-templates-list.full-mode{
6
- .v2-pagination-container, .v2-pagination-container-half {
4
+ margin-top: $CAP_SPACE_16;
7
5
  .ant-tabs-tabpane-active{
8
6
  padding: unset;
9
7
  }
10
8
  }
11
- }
12
9
 
13
- @media screen and (max-width: 1172px) {
14
- .creatives-templates-list.full-mode{
15
- .v2-pagination-container {
16
- .cap-custom-card-list-row {
17
- .cap-custom-card-list-col{
18
- &:nth-child(3n+3) { //every 4th child
19
- margin-right: unset;
20
- }
21
- }
22
- }
23
- }
24
- }
25
- }
26
- // }
27
-
28
- @media screen and (min-width: 1172px) {
29
- .creatives-templates-list.full-mode{
30
- .v2-pagination-container, .v2-pagination-container-half {
31
- .creatives-templates-list.full-mode{
32
- .v2-pagination-container {
33
- .cap-custom-card-list-row {
34
- .cap-custom-card-list-col{
35
- &:nth-child(4n+4) { //every 4th child
36
- margin-right: unset;
37
- }
10
+ // 3 cards per row across all breakpoints
11
+ .creatives-templates-list {
12
+ .v2-pagination-container,
13
+ .v2-pagination-container-half {
14
+ .cap-custom-card-list-row {
15
+ .cap-custom-card-list-col {
16
+ width: calc(33.33% - #{$CAP_SPACE_08});
17
+ margin-right: $CAP_SPACE_12;
18
+ &:nth-child(3n) {
19
+ margin-right: 0;
38
20
  }
39
21
  }
40
22
  }
41
23
  }
42
- }
43
- }
44
24
  }
45
25
 
46
-
47
26
  .creatives-templates-list {
48
27
 
49
28
  .delete-template-confirm {
50
29
  .ant-modal-footer {
51
30
  padding: $CAP_SPACE_16 $CAP_SPACE_24 $CAP_SPACE_24 $CAP_SPACE_24;
52
31
  }
53
- }
54
32
 
55
33
  .ant-modal-header {
56
- .v2-pagination-container, .v2-pagination-container-half {
57
34
  padding: $CAP_SPACE_24 $CAP_SPACE_24 $CAP_SPACE_08 $CAP_SPACE_24;
58
35
  }
59
36
 
@@ -192,13 +169,10 @@
192
169
  .whatsapp-container {
193
170
  background-color: $CAP_WHITE;
194
171
  padding: $CAP_SPACE_12;
195
- overflow-y: hidden;
196
172
  }
197
173
  .scroll-container {
198
174
  overflow-x: auto;
199
175
  display: flex;
200
- flex-wrap: nowrap;
201
- width: 100%;
202
176
  padding-top: $CAP_SPACE_06;
203
177
  padding-right: $CAP_SPACE_06;
204
178
  white-space: nowrap;
@@ -232,92 +206,6 @@
232
206
  }
233
207
  }
234
208
 
235
- // RCS template listing preview: match WhatsApp carousel "peek" behavior
236
- .RCS {
237
- .cap-custom-card {
238
- .ant-card-body {
239
- .ant-card-meta {
240
- background-color: $CAP_G09;
241
- padding: 0;
242
- .ant-card-meta-description {
243
- .whatsapp-container,.cap-rcs-creatives {
244
- background-color: $CAP_WHITE;
245
- padding: $CAP_SPACE_12;
246
- border-radius: 0.25rem;
247
- .cap-divider-v2{
248
- margin: $CAP_SPACE_12 0;
249
- }
250
- }
251
- .scroll-container {
252
- overflow-x: auto;
253
- overflow-y: hidden;
254
- display: flex;
255
- flex-wrap: nowrap;
256
- padding-top: $CAP_SPACE_06;
257
- padding-right: $CAP_SPACE_06;
258
- white-space: nowrap;
259
- scrollbar-width: none; // Hide scrollbar in Firefox
260
- &::-webkit-scrollbar {
261
- display: none; // Hide scrollbar in Chrome/Safari/Opera
262
- }
263
- .whatsapp-carousel-container {
264
- padding: $CAP_SPACE_04 0px $CAP_SPACE_08;
265
- border-radius: $CAP_SPACE_06;
266
- background-color: $CAP_WHITE;
267
- width: 80%;
268
- flex-shrink: 0;
269
- margin-right: $CAP_SPACE_04;
270
- white-space: pre-wrap;
271
- word-break: break-word;
272
- overflow: auto;
273
- text-align: left;
274
- .whatsapp-carousel-card {
275
- margin: $CAP_SPACE_02 $CAP_SPACE_06 $CAP_SPACE_01 $CAP_SPACE_08;
276
- .whatsapp-carousel-body {
277
- margin-bottom: $CAP_SPACE_08;
278
- white-space: pre-wrap;
279
- }
280
- }
281
- }
282
- }
283
-
284
- // RCS CTA buttons in listing (reuse WhatsApp-ish look)
285
- .rcs-cta-preview {
286
- margin: $CAP_SPACE_12 0;
287
- display: flex;
288
- justify-content: center;
289
- font-size: $FONT_SIZE_M;
290
- align-items: center;
291
- color: #1970DA;
292
- svg {
293
- margin-right: $CAP_SPACE_04;
294
- }
295
- }
296
-
297
- .rcs-video-preview-placeholder {
298
- background: #f5f5f5;
299
- display: flex;
300
- align-items: center;
301
- justify-content: center;
302
- }
303
-
304
- .rcs-video-preview-label {
305
- color: #7a7a7a;
306
- }
307
-
308
- .rcs-listing-title {
309
- font-weight: 600;
310
- }
311
-
312
- .whatsapp-divider {
313
- margin: 0;
314
- }
315
- }
316
- }
317
- }
318
- }
319
- }
320
-
321
209
  .MOBILEPUSH {
322
210
  .ant-card-body {
323
211
  padding: 0;
@@ -759,29 +647,11 @@
759
647
  }
760
648
 
761
649
  .action-container{
762
- margin-top: $CAP_SPACE_08;
763
- margin-bottom: $CAP_SPACE_16;
650
+ margin-top: 8px;
651
+ margin-bottom: 16px;
764
652
  display: flex;
765
653
  justify-content: space-between;
766
654
  align-items: center;
767
-
768
- &__toolbar-row {
769
- display: flex;
770
- align-items: center;
771
- gap: 0.75rem;
772
- }
773
-
774
- &__toolbar-row .search-text {
775
- width: 13.125rem;
776
- min-width: 13.125rem;
777
- flex: 1;
778
- }
779
-
780
- &__create-row {
781
- display: flex;
782
- justify-content: space-between;
783
- align-items: center;
784
- }
785
655
  }
786
656
 
787
657
  .popover-action-container:hover{
@@ -792,6 +662,32 @@
792
662
  font-size: 14px;
793
663
  }
794
664
 
665
+ // Archive/Unarchive confirm modal overrides — scoped to avoid affecting other modals
666
+ .archive-confirm-modal {
667
+ // Remove the left margin added when an icon is present
668
+ .ant-modal-confirm-body {
669
+ > .anticon + .ant-modal-confirm-title + .ant-modal-confirm-content {
670
+ margin-left: 0;
671
+ }
672
+ }
673
+
674
+ // Left-align buttons, remove float
675
+ .ant-modal-confirm-btns {
676
+ float: none;
677
+ display: flex;
678
+ align-items: center;
679
+ gap: $CAP_SPACE_08;
680
+ margin-top: $CAP_SPACE_16;
681
+
682
+ // Cancel button styling
683
+ .ant-btn:not(.ant-btn-primary) {
684
+ background-color: $CAP_G08;
685
+ border-color: $CAP_G08;
686
+ color: $CAP_G01;
687
+ }
688
+ }
689
+ }
690
+
795
691
  .popover-action-container {
796
692
  line-height: 24px;
797
693
  }
@@ -1221,45 +1117,94 @@
1221
1117
  overflow: 'auto';
1222
1118
  }
1223
1119
 
1224
- /* Local SMS / slidebox: viewport-based .v2-pagination-container-half height leaves empty space below and clips cards */
1225
- .creatives-templates-container--local-sms.library-mode {
1226
- .creatives-templates-list.library-mode > .cap-row:first-of-type > div {
1227
- display: flex;
1228
- flex-direction: column;
1229
- flex: 1 1 auto;
1230
- min-height: 0;
1231
- overflow: hidden;
1232
- }
1120
+ // Archive feature layout classes
1121
+ .illustration-scroll-wrapper {
1122
+ height: calc(100vh - 20.3125rem);
1123
+ overflow: auto;
1124
+ }
1233
1125
 
1234
- .creatives-templates-list.library-mode > .cap-row:first-of-type > div > div:first-child {
1235
- display: flex;
1236
- flex-direction: column;
1237
- flex: 1 1 auto;
1238
- min-height: 0;
1239
- overflow: hidden;
1240
- }
1126
+ .filter-row {
1127
+ display: flex;
1128
+ align-items: center;
1129
+ justify-content: space-between;
1130
+ width: 100%;
1131
+ }
1241
1132
 
1242
- /* Block below search/filter: grid + skeletons — must grow to use space above footer */
1243
- .creatives-templates-list.library-mode > .cap-row:first-of-type > div > div:first-child > div:nth-child(2) {
1244
- flex: 1 1 auto;
1245
- min-height: 0;
1246
- display: flex;
1247
- flex-direction: column;
1248
- overflow: hidden;
1249
- }
1133
+ .filter-row-content {
1134
+ flex: 1;
1135
+ }
1250
1136
 
1251
- /*
1252
- * Scroll needs a definite height. Pure flex + height:auto + max-height:100% often won’t bound (no % base), so no scrollbar.
1253
- * Use a taller slice than global 100vh-20rem so the grid uses space under search; still overflow-y:auto for long lists.
1254
- */
1255
- .v2-pagination-container,
1256
- .v2-pagination-container-half {
1257
- flex: 0 1 auto;
1258
- min-height: 0;
1259
- height: calc(100vh - 12rem);
1260
- max-height: calc(100vh - 12rem);
1261
- overflow-y: auto;
1262
- overflow-x: hidden;
1263
- -webkit-overflow-scrolling: touch;
1137
+ .bulk-selection-bar {
1138
+ display: flex;
1139
+ align-items: center;
1140
+ gap: $CAP_SPACE_12;
1141
+ flex-shrink: 0;
1142
+ }
1143
+
1144
+ .archived-mode-header {
1145
+ display: flex;
1146
+ align-items: center;
1147
+ gap: $CAP_SPACE_12;
1148
+ margin-bottom: $CAP_SPACE_16;
1149
+
1150
+ .archived-mode-back-icon {
1151
+ cursor: pointer;
1152
+ font-size: 1.428rem;
1264
1153
  }
1265
- }
1154
+ }
1155
+
1156
+ .archived-tag {
1157
+ margin-left: $CAP_SPACE_08;
1158
+ font-size: 0.786rem;
1159
+ }
1160
+
1161
+ .popover-archive-action {
1162
+ cursor: pointer;
1163
+ padding: $CAP_SPACE_08 0;
1164
+ }
1165
+
1166
+ .archive-menu-item {
1167
+ display: inline-flex;
1168
+ align-items: center;
1169
+ gap: $CAP_SPACE_08;
1170
+ margin-top: 1rem;
1171
+ }
1172
+
1173
+ .archive-btn-label {
1174
+ margin-right: 0.714rem;
1175
+ }
1176
+
1177
+ .bulk-selection-bar .cap-button-v2-prefix {
1178
+ margin-top: 1rem;
1179
+ }
1180
+
1181
+ .bulk-selection-bar .ant-btn.cap-button-v2 > .cap-button-v2-prefix + span {
1182
+ margin-left: -$CAP_SPACE_06;
1183
+ }
1184
+
1185
+ .template-card-top-bar {
1186
+ display: flex;
1187
+ align-items: center;
1188
+ justify-content: space-between;
1189
+ padding: $CAP_SPACE_08 $CAP_SPACE_12 0;
1190
+ }
1191
+
1192
+ .template-listing-header-actions {
1193
+ display: flex;
1194
+ justify-content: space-between;
1195
+ align-items: center;
1196
+ gap: $CAP_SPACE_08;
1197
+ }
1198
+
1199
+ .template-listing-more-btn {
1200
+ padding: 0 $CAP_SPACE_08;
1201
+ min-width: auto;
1202
+ }
1203
+
1204
+ .notification-template-label {
1205
+ color: #5E6C84;
1206
+ }
1207
+
1208
+ .notification-template-name {
1209
+ color: #091E42;
1210
+ }
@@ -15,17 +15,6 @@ 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
-
29
18
  export function resetTemplate() {
30
19
  return {
31
20
  type: types.RESET_TEMPLATE,
@@ -178,3 +167,39 @@ export function getCdnTransformationConfig() {
178
167
  type: types.GET_CDN_TRANSFORMATION_CONFIG_REQUEST,
179
168
  };
180
169
  }
170
+
171
+ export function archiveTemplate(channel, id, templateName) {
172
+ return { type: types.ARCHIVE_TEMPLATE_REQUEST, channel, id, templateName };
173
+ }
174
+
175
+ export function unarchiveTemplate(channel, id, templateName) {
176
+ return { type: types.UNARCHIVE_TEMPLATE_REQUEST, channel, id, templateName };
177
+ }
178
+
179
+ export function bulkArchiveTemplates(channel, ids) {
180
+ return { type: types.BULK_ARCHIVE_REQUEST, channel, ids };
181
+ }
182
+
183
+ export function bulkUnarchiveTemplates(channel, ids) {
184
+ return { type: types.BULK_UNARCHIVE_REQUEST, channel, ids };
185
+ }
186
+
187
+ export function setArchiveFilter(filter) {
188
+ return { type: types.SET_ARCHIVE_FILTER, filter };
189
+ }
190
+
191
+ export function toggleTemplateSelection(id) {
192
+ return { type: types.TOGGLE_TEMPLATE_SELECTION, id };
193
+ }
194
+
195
+ export function selectAllTemplates(ids) {
196
+ return { type: types.SELECT_ALL_TEMPLATES, ids };
197
+ }
198
+
199
+ export function clearTemplateSelection() {
200
+ return { type: types.CLEAR_TEMPLATE_SELECTION };
201
+ }
202
+
203
+ export function setArchivedMode(isArchived) {
204
+ return { type: types.SET_ARCHIVED_MODE, isArchived };
205
+ }
@@ -10,8 +10,6 @@ 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
-
15
13
  export const DELETE_TEMPLATE_REQUEST = 'app/v2Containers/Templates/DELETE_TEMPLATE_REQUEST';
16
14
  export const DELETE_RCS_TEMPLATE_REQUEST = 'app/v2Containers/Templates/DELETE_RCS_TEMPLATE_REQUEST';
17
15
  export const DELETE_TEMPLATE_SUCCESS = 'app/v2Containers/Templates/DELETE_TEMPLATE_SUCCESS';
@@ -93,3 +91,26 @@ export const noApprovedWhatsappTemplatesDesc ='noApprovedWhatsappTemplatesDesc'
93
91
  export const zaloDescIllustration='zaloDescIllustration'
94
92
  export const noApprovedRcsTemplatesTitle='noApprovedRcsTemplatesTitle'
95
93
  export const noApprovedRcsTemplatesDesc='noApprovedRcsTemplatesDesc'
94
+
95
+ // Archive feature
96
+ export const ARCHIVE_TEMPLATE_REQUEST = 'app/v2Containers/Templates/ARCHIVE_TEMPLATE_REQUEST';
97
+ export const ARCHIVE_TEMPLATE_SUCCESS = 'app/v2Containers/Templates/ARCHIVE_TEMPLATE_SUCCESS';
98
+ export const ARCHIVE_TEMPLATE_FAILURE = 'app/v2Containers/Templates/ARCHIVE_TEMPLATE_FAILURE';
99
+
100
+ export const UNARCHIVE_TEMPLATE_REQUEST = 'app/v2Containers/Templates/UNARCHIVE_TEMPLATE_REQUEST';
101
+ export const UNARCHIVE_TEMPLATE_SUCCESS = 'app/v2Containers/Templates/UNARCHIVE_TEMPLATE_SUCCESS';
102
+ export const UNARCHIVE_TEMPLATE_FAILURE = 'app/v2Containers/Templates/UNARCHIVE_TEMPLATE_FAILURE';
103
+
104
+ export const BULK_ARCHIVE_REQUEST = 'app/v2Containers/Templates/BULK_ARCHIVE_REQUEST';
105
+ export const BULK_ARCHIVE_SUCCESS = 'app/v2Containers/Templates/BULK_ARCHIVE_SUCCESS';
106
+ export const BULK_ARCHIVE_FAILURE = 'app/v2Containers/Templates/BULK_ARCHIVE_FAILURE';
107
+
108
+ export const BULK_UNARCHIVE_REQUEST = 'app/v2Containers/Templates/BULK_UNARCHIVE_REQUEST';
109
+ export const BULK_UNARCHIVE_SUCCESS = 'app/v2Containers/Templates/BULK_UNARCHIVE_SUCCESS';
110
+ export const BULK_UNARCHIVE_FAILURE = 'app/v2Containers/Templates/BULK_UNARCHIVE_FAILURE';
111
+
112
+ export const SET_ARCHIVE_FILTER = 'app/v2Containers/Templates/SET_ARCHIVE_FILTER';
113
+ export const TOGGLE_TEMPLATE_SELECTION = 'app/v2Containers/Templates/TOGGLE_TEMPLATE_SELECTION';
114
+ export const SELECT_ALL_TEMPLATES = 'app/v2Containers/Templates/SELECT_ALL_TEMPLATES';
115
+ export const CLEAR_TEMPLATE_SELECTION = 'app/v2Containers/Templates/CLEAR_TEMPLATE_SELECTION';
116
+ export const SET_ARCHIVED_MODE = 'app/v2Containers/Templates/SET_ARCHIVED_MODE';