@capillarytech/creatives-library 8.0.252 → 8.0.253

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.252",
4
+ "version": "8.0.253",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -0,0 +1 @@
1
+ export const LIQUID_DOC_URL = 'https://docs.capillarytech.com/docs/liquid-language-in-messages';
@@ -16,6 +16,8 @@ import { processErrors } from './utils';
16
16
  import ErrorTypeRenderer from './ErrorTypeRenderer';
17
17
  import { ANDROID, GENERIC, IOS } from '../../v2Containers/CreativesContainer/constants';
18
18
  import { LABEL_ISSUE_PATTERNS, ERROR_TAB_KEYS } from '../HtmlEditor/utils/validationConstants';
19
+ import { SEVERITY } from '../HtmlEditor/components/ValidationPanel/constants';
20
+ import { LIQUID_DOC_URL } from './constants';
19
21
 
20
22
  const { CapLabelInline } = CapLabel;
21
23
 
@@ -39,14 +41,14 @@ const categorizeErrorMessages = (standardErrors, liquidErrors) => {
39
41
  if (isLabelIssue) {
40
42
  labelIssues.push({
41
43
  message: error,
42
- severity: 'error',
44
+ severity: SEVERITY.ERROR,
43
45
  index,
44
46
  source: 'label',
45
47
  });
46
48
  } else {
47
49
  htmlIssues.push({
48
50
  message: error,
49
- severity: 'error',
51
+ severity: SEVERITY.ERROR,
50
52
  index,
51
53
  source: 'html',
52
54
  });
@@ -57,7 +59,7 @@ const categorizeErrorMessages = (standardErrors, liquidErrors) => {
57
59
  (liquidErrors || []).forEach((error, index) => {
58
60
  liquidIssues.push({
59
61
  message: error,
60
- severity: 'error',
62
+ severity: SEVERITY.ERROR,
61
63
  index,
62
64
  source: 'liquid',
63
65
  });
@@ -92,7 +94,7 @@ const cleanErrorMessage = (message, lineMatch, charMatch, ruleMatch) => {
92
94
  * Get icon based on severity
93
95
  */
94
96
  const getSeverityIcon = (severity) => {
95
- if (severity === 'warning') {
97
+ if (severity === SEVERITY.WARNING) {
96
98
  return <CapIcon type="alert-warning" className="error-info-note__icon error-info-note__icon--warning" />;
97
99
  }
98
100
  return <CapIcon type="warning-circle" className="error-info-note__icon error-info-note__icon--error" />;
@@ -317,7 +319,7 @@ export const ErrorInfoNote = (props) => {
317
319
  // Handle liquid documentation click
318
320
  const handleLiquidDocClick = () => {
319
321
  window.open(
320
- 'https://docs.capillarytech.com/docs/liquid-language-in-messages',
322
+ LIQUID_DOC_URL,
321
323
  '_blank',
322
324
  );
323
325
  };
@@ -41,7 +41,7 @@
41
41
  margin-right: 1.5rem;
42
42
  color: $CAP_G03;
43
43
  font-size: 0.875rem;
44
- font-weight: 500;
44
+ font-weight: $FONT_WEIGHT_MEDIUM;
45
45
 
46
46
  &:hover {
47
47
  color: $CAP_G01;
@@ -89,7 +89,7 @@
89
89
  gap: 0.25rem;
90
90
  color: $CAP_BLUE;
91
91
  font-size: 0.875rem;
92
- font-weight: 500;
92
+ font-weight: $FONT_WEIGHT_MEDIUM;
93
93
  background: transparent;
94
94
  border: none;
95
95
  cursor: pointer;
@@ -254,7 +254,7 @@
254
254
  display: inline-flex;
255
255
  align-items: center;
256
256
  justify-content: space-between;
257
- font-weight: 500;
257
+ font-weight: $FONT_WEIGHT_MEDIUM;
258
258
 
259
259
  .ant-btn.cap-button-v2.flat-btn {
260
260
  display: flex;
@@ -338,7 +338,7 @@
338
338
 
339
339
  .error-header-sub-title {
340
340
  margin-left: $CAP_SPACE_04;
341
- font-weight: 500;
341
+ font-weight: $FONT_WEIGHT_MEDIUM;
342
342
  }
343
343
 
344
344
  // Responsive adjustments
@@ -13,7 +13,6 @@
13
13
  align-items: center;
14
14
  min-height: 25rem; // 400px = 25rem
15
15
  background: $CAP_G11; // Light background similar to #fafbfc
16
- // border: 0.0625rem solid $CAP_G07; // 1px border similar to #dfe2e7
17
16
  border-radius: 0.5rem; // 8px = 0.5rem
18
17
  flex-direction: column;
19
18
  gap: 1rem; // 16px = 1rem