@capillarytech/creatives-library 8.0.329 → 8.0.330-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/constants/unified.js +4 -0
- package/package.json +1 -1
- package/utils/commonUtils.js +19 -1
- package/utils/templateVarUtils.js +35 -6
- package/utils/tests/tagValidations.test.js +20 -0
- package/utils/tests/templateVarUtils.test.js +44 -0
- package/v2Components/CapActionButton/constants.js +7 -0
- package/v2Components/CapActionButton/index.js +167 -109
- package/v2Components/CapActionButton/index.scss +157 -6
- package/v2Components/CapActionButton/messages.js +19 -3
- package/v2Components/CapActionButton/tests/index.test.js +41 -17
- package/v2Components/CapTagList/index.js +28 -23
- package/v2Components/CapTagList/style.scss +29 -0
- package/v2Components/CapTagListWithInput/__tests__/CapTagListWithInput.test.js +63 -0
- package/v2Components/CapTagListWithInput/index.js +4 -0
- package/v2Components/CapWhatsappCTA/index.js +2 -0
- package/v2Components/CommonTestAndPreview/ExistingCustomerModal.js +1 -0
- package/v2Components/CommonTestAndPreview/UnifiedPreview/RcsPreviewContent.js +160 -15
- package/v2Components/CommonTestAndPreview/UnifiedPreview/RcsPreviewContent.js.rej +18 -0
- package/v2Components/CommonTestAndPreview/UnifiedPreview/_unifiedPreview.scss +323 -77
- package/v2Components/CommonTestAndPreview/index.js +49 -57
- package/v2Components/CommonTestAndPreview/messages.js +8 -0
- package/v2Components/CommonTestAndPreview/reducer.js +3 -1
- package/v2Components/CommonTestAndPreview/sagas.js +2 -1
- package/v2Components/CommonTestAndPreview/tests/PreviewSection.test.js +8 -1
- package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/RcsPreviewContent.test.js +281 -283
- package/v2Components/FormBuilder/index.js +1 -0
- package/v2Components/HtmlEditor/HTMLEditor.js +6 -1
- package/v2Components/HtmlEditor/__tests__/HTMLEditor.apiErrors.test.js +1 -0
- package/v2Components/HtmlEditor/__tests__/HTMLEditor.test.js +927 -2
- package/v2Components/HtmlEditor/components/CodeEditorPane/index.js +3 -0
- package/v2Components/SmsFallback/smsFallbackUtils.js +14 -3
- package/v2Components/SmsFallback/tests/smsFallbackUtils.test.js +16 -0
- package/v2Components/TemplatePreview/_templatePreview.scss +33 -23
- package/v2Components/TemplatePreview/constants.js +2 -0
- package/v2Components/TemplatePreview/index.js +143 -28
- package/v2Components/TemplatePreview/tests/index.test.js +142 -0
- package/v2Components/TestAndPreviewSlidebox/index.js +5 -0
- package/v2Components/mockdata.js +1 -0
- package/v2Containers/BeeEditor/index.js +19 -1
- package/v2Containers/CreativesContainer/SlideBoxContent.js +28 -1
- package/v2Containers/CreativesContainer/index.js +9 -3
- package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +5 -0
- package/v2Containers/Email/index.js +78 -39
- package/v2Containers/Email/reducer.js +2 -2
- package/v2Containers/Email/sagas.js +3 -1
- package/v2Containers/Email/tests/__snapshots__/reducer.test.js.snap +2 -2
- package/v2Containers/Email/tests/sagas.test.js +230 -0
- package/v2Containers/EmailWrapper/components/EmailHTMLEditor.js +6 -1
- package/v2Containers/EmailWrapper/components/EmailWrapperView.js +3 -0
- package/v2Containers/EmailWrapper/components/__tests__/EmailHTMLEditor.test.js +20 -2
- package/v2Containers/EmailWrapper/components/__tests__/EmailWrapperView.test.js +16 -1
- package/v2Containers/EmailWrapper/hooks/useEmailWrapper.js +3 -1
- package/v2Containers/EmailWrapper/index.js +4 -0
- package/v2Containers/EmailWrapper/tests/useEmailWrapper.edgeCases.test.js +1 -0
- package/v2Containers/EmailWrapper/tests/useEmailWrapper.test.js +9 -0
- package/v2Containers/InAppWrapper/hooks/__tests__/useInAppWrapper.test.js +1 -0
- package/v2Containers/MobilePush/Create/index.js +2 -0
- package/v2Containers/MobilePush/Edit/index.js +2 -0
- package/v2Containers/MobilepushWrapper/index.js +3 -1
- package/v2Containers/Rcs/constants.js +85 -7
- package/v2Containers/Rcs/index.js +1592 -156
- package/v2Containers/Rcs/index.js.rej +1336 -0
- package/v2Containers/Rcs/index.scss +191 -0
- package/v2Containers/Rcs/index.scss.rej +74 -0
- package/v2Containers/Rcs/messages.js +28 -2
- package/v2Containers/Rcs/rcsLibraryHydrationUtils.js +20 -0
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +69178 -117691
- package/v2Containers/Rcs/tests/__snapshots__/utils.test.js.snap.rej +128 -0
- package/v2Containers/Rcs/tests/index.test.js +132 -94
- package/v2Containers/Rcs/tests/rcsLibraryHydrationUtils.test.js +67 -0
- package/v2Containers/Rcs/tests/utils.test.js +276 -38
- package/v2Containers/Rcs/utils.js +130 -7
- package/v2Containers/Sms/Edit/index.js +2 -0
- package/v2Containers/SmsTrai/Edit/index.js +27 -0
- package/v2Containers/SmsTrai/Edit/messages.js +5 -0
- package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +6 -6
- package/v2Containers/SmsWrapper/index.js +2 -0
- package/v2Containers/TagList/index.js +73 -20
- package/v2Containers/TagList/messages.js +4 -0
- package/v2Containers/TagList/tests/TagList.test.js +124 -20
- package/v2Containers/TagList/tests/mockdata.js +17 -0
- package/v2Containers/Templates/_templates.scss +99 -0
- package/v2Containers/Templates/index.js +29 -14
- package/v2Containers/Viber/index.js +3 -0
- package/v2Containers/WebPush/Create/hooks/useTagManagement.js +0 -2
- package/v2Containers/WebPush/Create/index.js +10 -2
- package/v2Containers/Whatsapp/index.js +5 -0
- package/v2Containers/Zalo/index.js +2 -0
|
@@ -37,6 +37,7 @@ import { createStructuredSelector } from 'reselect';
|
|
|
37
37
|
import { CAP_SPACE_12, CAP_SPACE_08, FONT_COLOR_05, FONT_COLOR_04 } from '@capillarytech/cap-ui-library/styled/variables';
|
|
38
38
|
import UnifiedPreview from '../CommonTestAndPreview/UnifiedPreview';
|
|
39
39
|
import { ANDROID } from '../CommonTestAndPreview/constants';
|
|
40
|
+
import TemplatePreview from '../TemplatePreview';
|
|
40
41
|
import TagList from '../../v2Containers/TagList';
|
|
41
42
|
import CapTagListWithInput from '../CapTagListWithInput';
|
|
42
43
|
import SlideBox from '../SlideBox';
|
|
@@ -94,6 +94,7 @@ const HTMLEditor = forwardRef(({
|
|
|
94
94
|
injectedTags = {},
|
|
95
95
|
location,
|
|
96
96
|
eventContextTags = [],
|
|
97
|
+
waitEventContextTags,
|
|
97
98
|
selectedOfferDetails = [],
|
|
98
99
|
channel,
|
|
99
100
|
userLocale = 'en',
|
|
@@ -361,7 +362,7 @@ const HTMLEditor = forwardRef(({
|
|
|
361
362
|
const issueCounts = calculateIssueCounts();
|
|
362
363
|
const isContentEmpty = !currentContent || currentContent.trim() === '';
|
|
363
364
|
|
|
364
|
-
// hasErrors = only Rule Group #1 (Input & Sanitization)
|
|
365
|
+
// hasErrors = only Rule Group #1 (Input & Sanitization) - gates Done/Update/Preview/Test
|
|
365
366
|
const newState = {
|
|
366
367
|
isContentEmpty,
|
|
367
368
|
issueCounts,
|
|
@@ -663,6 +664,7 @@ const HTMLEditor = forwardRef(({
|
|
|
663
664
|
injectedTags={injectedTags}
|
|
664
665
|
location={location}
|
|
665
666
|
eventContextTags={eventContextTags}
|
|
667
|
+
waitEventContextTags={waitEventContextTags}
|
|
666
668
|
selectedOfferDetails={selectedOfferDetails}
|
|
667
669
|
channel={channel}
|
|
668
670
|
userLocale={userLocale}
|
|
@@ -734,6 +736,7 @@ const HTMLEditor = forwardRef(({
|
|
|
734
736
|
injectedTags={injectedTags}
|
|
735
737
|
location={location}
|
|
736
738
|
eventContextTags={eventContextTags}
|
|
739
|
+
waitEventContextTags={waitEventContextTags}
|
|
737
740
|
selectedOfferDetails={selectedOfferDetails}
|
|
738
741
|
channel={channel}
|
|
739
742
|
userLocale={userLocale}
|
|
@@ -772,6 +775,7 @@ HTMLEditor.propTypes = {
|
|
|
772
775
|
injectedTags: PropTypes.object,
|
|
773
776
|
location: PropTypes.object,
|
|
774
777
|
eventContextTags: PropTypes.array,
|
|
778
|
+
waitEventContextTags: PropTypes.object,
|
|
775
779
|
selectedOfferDetails: PropTypes.array,
|
|
776
780
|
channel: PropTypes.string,
|
|
777
781
|
userLocale: PropTypes.string,
|
|
@@ -805,6 +809,7 @@ HTMLEditor.defaultProps = {
|
|
|
805
809
|
injectedTags: {},
|
|
806
810
|
location: null,
|
|
807
811
|
eventContextTags: [],
|
|
812
|
+
waitEventContextTags: {},
|
|
808
813
|
selectedOfferDetails: [],
|
|
809
814
|
channel: null,
|
|
810
815
|
userLocale: 'en',
|