@capillarytech/creatives-library 7.17.220-alpha.0 → 7.17.222
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
package/utils/tagValidations.js
CHANGED
|
@@ -8,6 +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 '../containers/App/constants';
|
|
11
12
|
|
|
12
13
|
const DEFAULT = 'default';
|
|
13
14
|
const SUBTAGS = 'subtags';
|
|
@@ -202,6 +203,10 @@ const indexOfEnd = (targetString, string) => {
|
|
|
202
203
|
}
|
|
203
204
|
|
|
204
205
|
export const skipTags = (tag) => {
|
|
206
|
+
// If the tag contains the word "entryTrigger_", then it's an event context tag and should not be skipped.
|
|
207
|
+
if (tag?.match(ENTRY_TRIGGER_TAG_REGEX)) {
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
205
210
|
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]*\\)"];
|
|
206
211
|
let skipped = false;
|
|
207
212
|
lodashForEach(regexGroups, (group) => {
|
|
@@ -55,7 +55,7 @@ import { convert } from 'html-to-text';
|
|
|
55
55
|
import { OUTBOUND } from './constants';
|
|
56
56
|
import { GET_TRANSLATION_MAPPED } from '../../containers/TagList/constants';
|
|
57
57
|
import moment from 'moment';
|
|
58
|
-
import { CUSTOMER_BARCODE_TAG , COPY_OF} from '../../containers/App/constants';
|
|
58
|
+
import { CUSTOMER_BARCODE_TAG , COPY_OF, ENTRY_TRIGGER_TAG_REGEX} from '../../containers/App/constants';
|
|
59
59
|
import { hasLiquidSupportFeature, isEmailUnsubscribeTagMandatory } from '../../utils/common';
|
|
60
60
|
import { isUrl } from '../../v2Containers/Line/Container/Wrapper/utils';
|
|
61
61
|
import { bindActionCreators } from 'redux';
|
|
@@ -1198,6 +1198,10 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
1198
1198
|
};
|
|
1199
1199
|
|
|
1200
1200
|
skipTags(tag) {
|
|
1201
|
+
// If the tag contains the word "entryTrigger_", then it's an event context tag and it should not be skipped.
|
|
1202
|
+
if (tag?.match(ENTRY_TRIGGER_TAG_REGEX)) {
|
|
1203
|
+
return false;
|
|
1204
|
+
}
|
|
1201
1205
|
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]*\\)"];
|
|
1202
1206
|
//const regexGroups = [];
|
|
1203
1207
|
let skipped = false;
|
|
@@ -2479,7 +2483,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
2479
2483
|
<TextArea
|
|
2480
2484
|
id={val.id}
|
|
2481
2485
|
placeholder={val.placeholder ? val.placeholder : ''}
|
|
2482
|
-
className={`${ifError ? 'error' : ''}`}
|
|
2486
|
+
className={`${ifError ? 'error-form-builder' : ''}`}
|
|
2483
2487
|
errorMessage={errorMessageText}
|
|
2484
2488
|
label={val.label}
|
|
2485
2489
|
autosize={val.autosize ? val.autosizeParams : false}
|