@capillarytech/creatives-library 7.17.72 → 7.17.73-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": "7.17.72",
4
+ "version": "7.17.73-alpha.1",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -104,7 +104,7 @@ const indexOfEnd = (targetString, string) => {
104
104
  return io == -1 ? -1 : io + string.length;
105
105
  }
106
106
 
107
- const skipTags = (tag) => {
107
+ export const skipTags = (tag) => {
108
108
  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]*\\)"];
109
109
  let skipped = false;
110
110
  lodashForEach(regexGroups, (group) => {
@@ -33,7 +33,7 @@ import * as globalActions from '../../containers/Cap/actions';
33
33
  import { TagList } from '../TagList';
34
34
  import { NO_COMMUNICATION, CREATE, EDIT, PREVIEW } from '../App/constants';
35
35
  import { getTreeStructuredTags } from '../../utils/common';
36
- import { transformInjectedTags, checkIfSupportedTag } from '../../utils/tagValidations';
36
+ import { transformInjectedTags, checkIfSupportedTag, skipTags } from '../../utils/tagValidations';
37
37
 
38
38
  const UIView = {
39
39
  serverSelection: 'serverSelection',
@@ -258,6 +258,10 @@ export class FTP extends React.Component {
258
258
  let ifSupported = !!flatTags.find((t) => t === tag[0]);
259
259
  const tagValue = tag[0].substring(this.indexOfEnd(tag[0], '{{'), tag[0].indexOf('}}'));
260
260
  ifSupported = ifSupported || checkIfSupportedTag(tagValue, injectedTags);
261
+ const ifSkipped = skipTags(tagValue);
262
+ if (ifSkipped) {
263
+ ifSupported = true;
264
+ }
261
265
  if (!ifSupported) {
262
266
  response.unsupportedTags.push(tagValue);
263
267
  response.valid = false;