@capillarytech/creatives-library 8.0.261 → 8.0.262-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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "8.0.261",
4
+ "version": "8.0.262-alpha.1",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -95,7 +95,7 @@ const cleanErrorMessage = (message, lineMatch, charMatch, ruleMatch) => {
95
95
  */
96
96
  const getSeverityIcon = (severity) => {
97
97
  if (severity === SEVERITY.WARNING) {
98
- return <CapIcon type="alert-warning" className="error-info-note__icon error-info-note__icon--warning" />;
98
+ return <CapIcon type="warning" className="error-info-note__icon error-info-note__icon--warning" />;
99
99
  }
100
100
  return <CapIcon type="warning-circle" className="error-info-note__icon error-info-note__icon--error" />;
101
101
  };
@@ -189,10 +189,6 @@
189
189
  &--error {
190
190
  color: $CAP_RED;
191
191
  }
192
-
193
- &--warning {
194
- color: $CAP_YELLOW;
195
- }
196
192
  }
197
193
 
198
194
  &__item-content {
@@ -198,10 +198,6 @@
198
198
  color: #1890ff;
199
199
  }
200
200
 
201
- &--warning {
202
- color: #faad14;
203
- }
204
-
205
201
  &--security {
206
202
  color: #ff4d4f;
207
203
  }
@@ -84,7 +84,7 @@ const ValidationPanel = ({
84
84
  };
85
85
 
86
86
  // Get icon for issue type
87
- // Blocking errors use error-icon, warnings use alert-warning
87
+ // Blocking errors use error-icon, warnings use warning
88
88
  const getIssueIcon = (issue) => {
89
89
  const { source, severity } = issue || {};
90
90
  if (source === 'security') {
@@ -100,7 +100,7 @@ const ValidationPanel = ({
100
100
  if (severity === SEVERITY.INFO) {
101
101
  return <CapIcon type="info" className="validation-issue__icon validation-issue__icon--info" />;
102
102
  }
103
- return <CapIcon type="alert-warning" className="validation-issue__icon validation-issue__icon--warning" />;
103
+ return <CapIcon type="warning" className="validation-issue__icon validation-issue__icon--warning" />;
104
104
  };
105
105
 
106
106
  // Get source icon
@@ -24,7 +24,6 @@
24
24
  .cap-tab-v2 {
25
25
  .ant-tabs-bar {
26
26
  padding: 0.5rem 0.5rem;
27
- background-color: $CAP_COLOR_05;
28
27
  }
29
28
  .ant-tabs-nav {
30
29
  margin-bottom: 0;
@@ -43,7 +42,6 @@
43
42
  font-weight: 400;
44
43
  line-height: 1;
45
44
  letter-spacing: 0;
46
- background-color: $CAP_COLOR_05;
47
45
  border-radius: 0.25rem;
48
46
  border-bottom: none; // Remove bottom border
49
47
 
@@ -53,7 +51,6 @@
53
51
 
54
52
  &:hover {
55
53
  color: $CAP_COLOR_05;
56
- background-color: $CAP_COLOR_05;
57
54
  }
58
55
 
59
56
  &.ant-tabs-tab-active {
@@ -90,7 +87,6 @@
90
87
  align-items: center;
91
88
  flex-shrink: 0;
92
89
  padding-top: 0.5rem;
93
- background-color: $CAP_COLOR_05;
94
90
  }
95
91
 
96
92
  &__close {
@@ -107,11 +103,6 @@
107
103
  color: $CAP_G03;
108
104
  transition: all 0.2s ease;
109
105
 
110
- // &:hover {
111
- // background-color: rgba($CAP_COLOR_05, 0.1);
112
- // color: $CAP_COLOR_05;
113
- // }
114
-
115
106
  .cap-icon-v2 {
116
107
  font-size: 0.875rem;
117
108
  }
@@ -157,11 +148,18 @@
157
148
  .validation-tabs__icon--error {
158
149
  color: $CAP_RED;
159
150
  }
151
+ .validation-tabs__item-location,
152
+ .validation-tabs__item-message {
153
+ color: $CAP_RED;
154
+ }
160
155
  }
161
156
 
162
157
  &--warning {
163
- .validation-tabs__icon--warning {
164
- color: $CAP_YELLOW;
158
+ .validation-tabs__item-message {
159
+ color: $CAP_G01;
160
+ }
161
+ .validation-tabs__item-location {
162
+ color: $CAP_G03;
165
163
  }
166
164
  }
167
165
  }
@@ -170,7 +168,6 @@
170
168
  flex-shrink: 0;
171
169
  display: flex;
172
170
  align-items: center;
173
- padding-top: 0.125rem;
174
171
  }
175
172
 
176
173
  &__icon {
@@ -179,10 +176,6 @@
179
176
  &--error {
180
177
  color: $CAP_RED;
181
178
  }
182
-
183
- &--warning {
184
- color: $CAP_YELLOW;
185
- }
186
179
  }
187
180
 
188
181
  &__item-content {
@@ -239,7 +232,6 @@
239
232
  .ant-tabs-tab {
240
233
  margin-right: 1rem;
241
234
  font-size: 0.8125rem;
242
- background-color: $CAP_COLOR_05;
243
235
  }
244
236
  }
245
237
 
@@ -85,14 +85,14 @@ const isBlockingError = (issue) => {
85
85
 
86
86
  /**
87
87
  * Get icon based on whether issue is blocking error or warning
88
- * Blocking errors use error-icon, warnings use alert-warning
88
+ * Blocking errors use error-icon, warnings use warning
89
89
  */
90
90
  const getSeverityIcon = (issue) => {
91
91
  if (isBlockingError(issue)) {
92
92
  return <CapIcon type="error-icon" className="validation-tabs__icon validation-tabs__icon--error" />;
93
93
  }
94
94
  // All other issues (warnings, non-blocking) use warning icon
95
- return <CapIcon type="alert-warning" className="validation-tabs__icon validation-tabs__icon--warning" />;
95
+ return <CapIcon type="warning" className="validation-tabs__icon validation-tabs__icon--warning" />;
96
96
  };
97
97
 
98
98
  /**
@@ -19,7 +19,6 @@ export const LABEL_ISSUE_PATTERNS = [
19
19
  'tag must be paired',
20
20
  'open tag match failed',
21
21
  'closed tag match failed',
22
- 'unclosed',
23
22
  'missing required',
24
23
  'tag-pair',
25
24
  'attr-value-not-empty',
@@ -1828,21 +1828,24 @@ export class Creatives extends React.Component {
1828
1828
  // Check if Continue button should be disabled (for new flow only)
1829
1829
  isContinueButtonDisabled = () => {
1830
1830
  const { currentChannel, emailCreateMode, templateNameExists } = this.state;
1831
- const { isFullMode } = this.props;
1831
+ const { isFullMode, EmailLayout } = this.props;
1832
1832
  const supportCKEditor = commonUtil.hasSupportCKEditor();
1833
1833
  if (supportCKEditor) {
1834
1834
  return false;
1835
1835
  }
1836
1836
  if (currentChannel.toUpperCase() === constants.EMAIL) {
1837
+ // Upload mode: enable when a file has been uploaded (EmailLayout set by ZIP or HTML upload)
1838
+ // Other modes: enable when an editor type is selected (html_editor, drag_drop, editor)
1839
+ const isUploadComplete = emailCreateMode === 'upload' && !isEmpty(EmailLayout);
1837
1840
  const isEditorSelected = !!emailCreateMode && emailCreateMode !== 'upload';
1838
- // In full mode: require both template name AND editor selection
1839
- // In library mode: require only editor selection (template name not needed)
1841
+ const canContinue = isUploadComplete || isEditorSelected;
1842
+ // In full mode: require both template name AND (upload complete or editor selected)
1843
+ // In library mode: require only upload complete or editor selection
1840
1844
  if (isFullMode) {
1841
1845
  const isTemplateNameValid = templateNameExists;
1842
- return !(isTemplateNameValid && isEditorSelected);
1846
+ return !(isTemplateNameValid && canContinue);
1843
1847
  }
1844
- // Library mode: only editor selection is required
1845
- return !isEditorSelected;
1848
+ return !canContinue;
1846
1849
  }
1847
1850
  return true;
1848
1851
  }
@@ -899,8 +899,13 @@ const EmailHTMLEditor = (props) => {
899
899
 
900
900
  // Handle success response
901
901
  if (createResponse && createResponse.templateId) {
902
- const successMessage = formatMessage(emailMessages.emailCreateSuccess);
903
- CapNotification.success({ message: successMessage, key: 'create-template-success' });
902
+ const successMessage = formatMessage(
903
+ isEditModeForSave ? emailMessages.emailEditSuccess : emailMessages.emailCreateSuccess
904
+ );
905
+ CapNotification.success({
906
+ message: successMessage,
907
+ key: isEditModeForSave ? 'edit-template-success' : 'create-template-success',
908
+ });
904
909
 
905
910
  const module = location?.query?.module || 'default';
906
911
  const type = location?.query?.type;