@capillarytech/creatives-library 8.0.223 → 8.0.226

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.
@@ -149,6 +149,7 @@ export const BADGES_ISSUE = 'BADGES_ISSUE';
149
149
  export const CUSTOMER_BARCODE_TAG = 'customer_barcode';
150
150
  export const COPY_OF = 'Copy of';
151
151
  export const ENTRY_TRIGGER_TAG_REGEX = /\bentryTrigger\.\w+(?:\.\w+)?(?:\(\w+\))?/g;
152
+ export const SKIP_TAGS_REGEX_GROUPS = ["dynamic_expiry_date_after_\\d+_days.FORMAT_\\d", "unsubscribe\\(#[a-zA-Z\\d]{6}\\)", "Link_to_[a-zA-Z]", "SURVEY.*.TOKEN", "^[A-Za-z].*\\([a-zA-Z\\d]*\\)", "referral_unique_(code|url).*userid"];
152
153
 
153
154
  export const GET_TRANSLATION_MAPPED = {
154
155
  'en': 'en-US',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "8.0.223",
4
+ "version": "8.0.226",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -8,7 +8,7 @@
8
8
 
9
9
  import lodashForEach from 'lodash/forEach';
10
10
  import lodashCloneDeep from 'lodash/cloneDeep';
11
- import { ENTRY_TRIGGER_TAG_REGEX } from '../constants/unified';
11
+ import { ENTRY_TRIGGER_TAG_REGEX, SKIP_TAGS_REGEX_GROUPS } from '../constants/unified';
12
12
 
13
13
  const DEFAULT = 'default';
14
14
  const SUBTAGS = 'subtags';
@@ -247,9 +247,8 @@ export const skipTags = (tag) => {
247
247
  if (tag?.match(ENTRY_TRIGGER_TAG_REGEX)) {
248
248
  return false;
249
249
  }
250
- const regexGroups = ["dynamic_expiry_date_after_\\d+_days.FORMAT_\\d", "unsubscribe\\(#[a-zA-Z\\d]{6}\\)", "Link_to_[a-zA-z]", "SURVEY.*.TOKEN", "^[A-Za-z].*\\([a-zA-Z\\d]*\\)", "referral_unique_(code|url).*userid"];
251
250
  // Use some() to check if any pattern matches (stops on first match)
252
- return regexGroups.some((group) => {
251
+ return SKIP_TAGS_REGEX_GROUPS.some((group) => {
253
252
  // Create a new RegExp for each test to avoid state issues with global flag
254
253
  const groupRegex = new RegExp(group);
255
254
  return groupRegex.test(tag);
@@ -57,7 +57,7 @@ import { convert } from 'html-to-text';
57
57
  import { OUTBOUND, ADD_LANGUAGE, UPLOAD, USE_EDITOR, COPY_PRIMARY_LANGUAGE } from './constants';
58
58
  import { GET_TRANSLATION_MAPPED } from '../../constants/unified';
59
59
  import moment from 'moment';
60
- import { CUSTOMER_BARCODE_TAG , COPY_OF, ENTRY_TRIGGER_TAG_REGEX} from '../../constants/unified';
60
+ import { CUSTOMER_BARCODE_TAG , COPY_OF, ENTRY_TRIGGER_TAG_REGEX, SKIP_TAGS_REGEX_GROUPS} from '../../constants/unified';
61
61
  import { REQUEST } from '../../v2Containers/Cap/constants'
62
62
  import { hasLiquidSupportFeature, isEmailUnsubscribeTagMandatory } from '../../utils/common';
63
63
  import { isUrl } from '../../v2Containers/Line/Container/Wrapper/utils';
@@ -1491,9 +1491,8 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
1491
1491
  if (tag?.match(ENTRY_TRIGGER_TAG_REGEX)) {
1492
1492
  return false;
1493
1493
  }
1494
- const regexGroups = ["dynamic_expiry_date_after_\\d+_days.FORMAT_\\d", "unsubscribe\\(#[a-zA-Z\\d]{6}\\)", "Link_to_[a-zA-z]", "SURVEY.*.TOKEN", "^[A-Za-z].*\\([a-zA-Z\\d]*\\)", "referral_unique_(code|url).*userid"];
1495
1494
  // Use some() to check if any pattern matches (stops on first match)
1496
- return regexGroups.some((group) => {
1495
+ return SKIP_TAGS_REGEX_GROUPS.some((group) => {
1497
1496
  // Create a new RegExp for each test to avoid state issues with global flag
1498
1497
  const groupRegex = new RegExp(group);
1499
1498
  return groupRegex.test(tag);