@capillarytech/creatives-library 8.0.310 → 8.0.312-alpha.0
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/constants/unified.js +5 -1
- package/initialState.js +0 -2
- package/package.json +1 -1
- package/utils/common.js +5 -8
- package/utils/commonUtils.js +36 -93
- package/utils/tagValidations.js +83 -223
- package/utils/tests/commonUtil.test.js +147 -124
- package/utils/tests/tagValidations.test.js +441 -358
- package/v2Components/ErrorInfoNote/index.js +2 -5
- package/v2Components/FormBuilder/index.js +137 -203
- package/v2Components/FormBuilder/messages.js +0 -8
- package/v2Components/HtmlEditor/HTMLEditor.js +0 -5
- package/v2Components/HtmlEditor/__tests__/HTMLEditor.apiErrors.test.js +0 -1
- package/v2Components/HtmlEditor/__tests__/HTMLEditor.test.js +0 -15
- package/v2Components/HtmlEditor/components/CodeEditorPane/index.js +1 -2
- package/v2Containers/Cap/mockData.js +0 -14
- package/v2Containers/Cap/reducer.js +3 -55
- package/v2Containers/Cap/tests/reducer.test.js +0 -102
- package/v2Containers/CreativesContainer/SlideBoxContent.js +5 -1
- package/v2Containers/CreativesContainer/SlideBoxFooter.js +13 -5
- package/v2Containers/CreativesContainer/constants.js +6 -0
- package/v2Containers/CreativesContainer/index.js +47 -7
- package/v2Containers/Email/index.js +1 -5
- package/v2Containers/EmailWrapper/components/EmailHTMLEditor.js +23 -70
- package/v2Containers/EmailWrapper/components/__tests__/EmailHTMLEditor.test.js +20 -120
- package/v2Containers/FTP/index.js +2 -51
- package/v2Containers/FTP/messages.js +0 -4
- package/v2Containers/InApp/index.js +35 -107
- package/v2Containers/InApp/tests/index.test.js +17 -6
- package/v2Containers/InappAdvance/index.js +4 -112
- package/v2Containers/InappAdvance/tests/index.test.js +2 -0
- package/v2Containers/Line/Container/Text/index.js +0 -1
- package/v2Containers/MobilePush/Create/index.js +59 -19
- package/v2Containers/MobilePush/Edit/index.js +48 -20
- package/v2Containers/MobilePushNew/index.js +13 -33
- package/v2Containers/MobilepushWrapper/index.js +3 -1
- package/v2Containers/Rcs/index.js +12 -37
- package/v2Containers/Sms/Create/index.js +39 -3
- package/v2Containers/Sms/Create/messages.js +4 -0
- package/v2Containers/Sms/Edit/index.js +35 -3
- package/v2Containers/Sms/commonMethods.js +3 -6
- package/v2Containers/Sms/tests/commonMethods.test.js +122 -0
- package/v2Containers/SmsTrai/Edit/index.js +71 -71
- package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +6 -6
- package/v2Containers/SmsWrapper/index.js +2 -0
- package/v2Containers/TemplatesV2/index.js +28 -13
- package/v2Containers/Viber/index.js +0 -1
- package/v2Containers/WebPush/Create/hooks/useTagManagement.js +1 -3
- package/v2Containers/WebPush/Create/hooks/useTagManagement.test.js +0 -7
- package/v2Containers/WebPush/Create/index.js +2 -2
- package/v2Containers/WebPush/Create/utils/validation.js +17 -8
- package/v2Containers/WebPush/Create/utils/validation.test.js +44 -24
- package/v2Containers/Whatsapp/index.js +9 -17
- package/v2Containers/Zalo/index.js +3 -11
|
@@ -637,22 +637,21 @@ export const Whatsapp = (props) => {
|
|
|
637
637
|
validateTags({
|
|
638
638
|
content: contentData.join(""),
|
|
639
639
|
tagsParam: tags,
|
|
640
|
-
injectedTagsParams: injectedTags,
|
|
641
640
|
location,
|
|
642
641
|
tagModule: getDefaultTags,
|
|
643
|
-
eventContextTags,
|
|
644
642
|
isFullMode,
|
|
645
643
|
}) || {};
|
|
646
|
-
const unsupportedTagsLengthCheck =
|
|
647
|
-
validationResponse?.unsupportedTags?.length > 0;
|
|
648
644
|
if (type === HEADER_TEXT) {
|
|
649
645
|
headerTagValidationResponse = validationResponse;
|
|
650
|
-
updateIsHeaderTagValidationError(
|
|
646
|
+
updateIsHeaderTagValidationError(validationResponse.isBraceError);
|
|
651
647
|
} else if (type === CAROUSEL_TEXT) {
|
|
652
|
-
return [
|
|
648
|
+
return [
|
|
649
|
+
{ fieldName: "carouselTagValidationErrMessage", value: validationResponse.isBraceError ? validationResponse : {} },
|
|
650
|
+
{ fieldName: "carouselTagValidationErr", value: validationResponse.isBraceError },
|
|
651
|
+
];
|
|
653
652
|
} else {
|
|
654
653
|
tagValidationResponse = validationResponse;
|
|
655
|
-
updateIsTagValidationError(
|
|
654
|
+
updateIsTagValidationError(validationResponse.isBraceError);
|
|
656
655
|
}
|
|
657
656
|
}
|
|
658
657
|
};
|
|
@@ -2682,18 +2681,11 @@ const isAuthenticationTemplate = isEqual(templateCategory, WHATSAPP_CATEGORIES.a
|
|
|
2682
2681
|
} else {
|
|
2683
2682
|
validationResponse = tagValidationResponse;
|
|
2684
2683
|
}
|
|
2685
|
-
const {
|
|
2686
|
-
|
|
2687
|
-
let tagError = "";
|
|
2688
|
-
if (unsupportedTags.length > 0) {
|
|
2689
|
-
tagError = formatMessage(globalMessages.unsupportedTagsValidationError, {
|
|
2690
|
-
unsupportedTags,
|
|
2691
|
-
});
|
|
2692
|
-
}
|
|
2684
|
+
const { isBraceError } = validationResponse || {};
|
|
2693
2685
|
if (isBraceError) {
|
|
2694
|
-
|
|
2686
|
+
return <CapError>{formatMessage(globalMessages.unbalanacedCurlyBraces)}</CapError>;
|
|
2695
2687
|
}
|
|
2696
|
-
return
|
|
2688
|
+
return null;
|
|
2697
2689
|
};
|
|
2698
2690
|
|
|
2699
2691
|
const editModeContent = () => (
|
|
@@ -270,23 +270,15 @@ export const Zalo = (props) => {
|
|
|
270
270
|
validateTags({
|
|
271
271
|
content: message,
|
|
272
272
|
tagsParam: tags,
|
|
273
|
-
injectedTagsParams: injectedTags,
|
|
274
273
|
location,
|
|
275
274
|
tagModule: getDefaultTags,
|
|
276
|
-
eventContextTags,
|
|
277
275
|
isFullMode,
|
|
278
276
|
}) || {};
|
|
279
|
-
const {
|
|
280
|
-
let tagError = '';
|
|
281
|
-
if (unsupportedTags.length > 0) {
|
|
282
|
-
tagError = formatMessage(globalMessages.unsupportedTagsValidationError, {
|
|
283
|
-
unsupportedTags,
|
|
284
|
-
});
|
|
285
|
-
}
|
|
277
|
+
const { isBraceError } = tagValidationResponse;
|
|
286
278
|
if (isBraceError) {
|
|
287
|
-
|
|
279
|
+
return formatMessage(globalMessages.unbalanacedCurlyBraces);
|
|
288
280
|
}
|
|
289
|
-
return
|
|
281
|
+
return '';
|
|
290
282
|
};
|
|
291
283
|
|
|
292
284
|
//this function is used for checking errror validation in this it validate tags error and length error
|