@capillarytech/creatives-library 8.0.345 → 8.0.346

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 (30) hide show
  1. package/package.json +1 -1
  2. package/services/api.js +0 -20
  3. package/services/tests/api.test.js +0 -59
  4. package/v2Components/CapCustomSkeleton/index.js +1 -1
  5. package/v2Components/CapCustomSkeleton/tests/__snapshots__/index.test.js.snap +12 -12
  6. package/v2Containers/CreativesContainer/SlideBoxFooter.js +1 -3
  7. package/v2Containers/CreativesContainer/index.js +0 -5
  8. package/v2Containers/CreativesContainer/messages.js +0 -4
  9. package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +0 -3
  10. package/v2Containers/Email/reducer.js +12 -3
  11. package/v2Containers/Email/sagas.js +9 -4
  12. package/v2Containers/Email/tests/__snapshots__/reducer.test.js.snap +4 -0
  13. package/v2Containers/Email/tests/reducer.test.js +47 -0
  14. package/v2Containers/Email/tests/sagas.test.js +146 -6
  15. package/v2Containers/Templates/ChannelTypeIllustration.js +6 -23
  16. package/v2Containers/Templates/_templates.scss +24 -130
  17. package/v2Containers/Templates/actions.js +0 -36
  18. package/v2Containers/Templates/constants.js +0 -23
  19. package/v2Containers/Templates/index.js +30 -286
  20. package/v2Containers/Templates/messages.js +0 -68
  21. package/v2Containers/Templates/reducer.js +0 -68
  22. package/v2Containers/Templates/sagas.js +1 -89
  23. package/v2Containers/Templates/selectors.js +0 -12
  24. package/v2Containers/Templates/tests/ChannelTypeIllustration.test.js +0 -12
  25. package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +1122 -1300
  26. package/v2Containers/Templates/tests/index.test.js +0 -6
  27. package/v2Containers/Templates/tests/reducer.test.js +0 -178
  28. package/v2Containers/Templates/tests/sagas.test.js +8 -314
  29. package/v2Containers/Templates/tests/selector.test.js +0 -32
  30. package/v2Containers/Assets/images/archive_Empty_Illustration.svg +0 -9
@@ -1,9 +1,5 @@
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";
7
3
  import emailIllustration from '../Assets/images/emailIllustration.svg';
8
4
  import smsIllustration from '../Assets/images/smsIllustration.svg';
9
5
  import pushIllustration from '../Assets/images/pushIllustration.svg';
@@ -12,12 +8,13 @@ import lineIllustration from '../Assets/images/lineIllustration.svg';
12
8
  import facebookIllustration from '../Assets/images/facebookIllustration.svg';
13
9
  import whatsappIllustration from '../Assets/images/whatsappIllustration.png';
14
10
  import whatsappOrZaloAccountIllustration from '../Assets/images/whatsappOrZaloAccountIllustration.svg';
15
- import archiveEmptyStateIllustration from '../Assets/images/archive_Empty_Illustration.svg';
16
11
  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';
17
14
  import messages from './messages';
18
- import {
19
- MOBILE_PUSH, SMS, EMAIL, LINE, VIBER, FACEBOOK, WHATSAPP, RCS, ZALO, INAPP, WEBPUSH,
20
- } from '../CreativesContainer/constants';
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';
21
18
 
22
19
 
23
20
  // Configuration object for channel types
@@ -83,8 +80,7 @@ function ChannelTypeIllustration(props) {
83
80
  isFullMode,
84
81
  createTemplate,
85
82
  currentChannel,
86
- hostName,
87
- isArchivedMode,
83
+ hostName
88
84
  } = props;
89
85
 
90
86
  const templateText = useMemo(() => {
@@ -92,18 +88,6 @@ function ChannelTypeIllustration(props) {
92
88
  return isFullMode ? templateIntlMsg : '';
93
89
  }, [isFullMode]);
94
90
 
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
-
107
91
  const getChannelTypeIllustrationInfo = (type, hostName) => {
108
92
  // Handle special cases with hostName dependency
109
93
  if (type === WHATSAPP) {
@@ -212,6 +196,5 @@ ChannelTypeIllustration.propTypes = {
212
196
  createTemplate: PropTypes.func.isRequired,
213
197
  currentChannel: PropTypes.string,
214
198
  hostName: PropTypes.string,
215
- isArchivedMode: PropTypes.bool,
216
199
  };
217
200
  export default ChannelTypeIllustration;
@@ -1,22 +1,34 @@
1
1
  @import '~@capillarytech/cap-ui-library/styles/_variables.scss';
2
2
 
3
3
  .ant-tabs-content{
4
- margin-top: $CAP_SPACE_16;
4
+ margin-top: 16px;
5
5
  .ant-tabs-tabpane-active{
6
6
  padding: unset;
7
7
  }
8
8
  }
9
9
 
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;
10
+ @media screen and (max-width: 1172px) {
11
+ .creatives-templates-list.full-mode{
12
+ .v2-pagination-container {
13
+ .cap-custom-card-list-row {
14
+ .cap-custom-card-list-col{
15
+ &:nth-child(3n+3) { //every 4th child
16
+ margin-right: unset;
17
+ }
18
+ }
19
+ }
20
+ }
21
+ }
22
+ }
23
+
24
+ @media screen and (min-width: 1172px) {
25
+ .creatives-templates-list.full-mode{
26
+ .v2-pagination-container {
27
+ .cap-custom-card-list-row {
28
+ .cap-custom-card-list-col{
29
+ &:nth-child(4n+4) { //every 4th child
30
+ margin-right: unset;
31
+ }
20
32
  }
21
33
  }
22
34
  }
@@ -662,32 +674,6 @@
662
674
  font-size: 14px;
663
675
  }
664
676
 
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
-
691
677
  .popover-action-container {
692
678
  line-height: 24px;
693
679
  }
@@ -1115,96 +1101,4 @@
1115
1101
  .inapp-illustration-parent {
1116
1102
  height: "calc(100vh - 325px)";
1117
1103
  overflow: 'auto';
1118
- }
1119
-
1120
- // Archive feature layout classes
1121
- .illustration-scroll-wrapper {
1122
- height: calc(100vh - 20.3125rem);
1123
- overflow: auto;
1124
- }
1125
-
1126
- .filter-row {
1127
- display: flex;
1128
- align-items: center;
1129
- justify-content: space-between;
1130
- width: 100%;
1131
- }
1132
-
1133
- .filter-row-content {
1134
- flex: 1;
1135
- }
1136
-
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;
1153
- }
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
- }
1104
+ }
@@ -167,39 +167,3 @@ export function getCdnTransformationConfig() {
167
167
  type: types.GET_CDN_TRANSFORMATION_CONFIG_REQUEST,
168
168
  };
169
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
- }
@@ -91,26 +91,3 @@ export const noApprovedWhatsappTemplatesDesc ='noApprovedWhatsappTemplatesDesc'
91
91
  export const zaloDescIllustration='zaloDescIllustration'
92
92
  export const noApprovedRcsTemplatesTitle='noApprovedRcsTemplatesTitle'
93
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';