@capillarytech/creatives-library 8.0.330-alpha.0 → 8.0.330-alpha.2
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 +1 -1
- package/utils/tests/tagValidations.test.js +20 -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/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/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/mockdata.js +1 -0
- package/v2Containers/BeeEditor/index.js +19 -1
- package/v2Containers/CreativesContainer/SlideBoxContent.js +28 -1
- 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 +79 -5
- package/v2Containers/Rcs/index.js +1374 -73
- 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 +26 -1
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +69173 -118166
- 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/utils.test.js +220 -38
- package/v2Containers/Rcs/utils.js +77 -1
- package/v2Containers/Sms/Edit/index.js +2 -0
- 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
|
@@ -340,6 +340,14 @@ export default defineMessages({
|
|
|
340
340
|
id: `${scope}.videoPreviewTooltip`,
|
|
341
341
|
defaultMessage: 'Video Preview',
|
|
342
342
|
},
|
|
343
|
+
rcsCarouselPreviewTitlePlaceholder: {
|
|
344
|
+
id: `${scope}.rcsCarouselPreviewTitlePlaceholder`,
|
|
345
|
+
defaultMessage: 'Card title',
|
|
346
|
+
},
|
|
347
|
+
rcsCarouselPreviewBodyPlaceholder: {
|
|
348
|
+
id: `${scope}.rcsCarouselPreviewBodyPlaceholder`,
|
|
349
|
+
defaultMessage: 'Card description',
|
|
350
|
+
},
|
|
343
351
|
toMe: {
|
|
344
352
|
id: `${scope}.toMe`,
|
|
345
353
|
defaultMessage: 'to me',
|
|
@@ -220,8 +220,10 @@ const previewAndTestReducer = (state = initialState, action) => {
|
|
|
220
220
|
case ADD_TEST_CUSTOMER: {
|
|
221
221
|
const raw = state.get('testCustomers');
|
|
222
222
|
const list = Array.isArray(raw) ? raw : (raw && raw.toArray ? raw.toArray().map((i) => (i && i.toJS ? i.toJS() : i)) : []);
|
|
223
|
-
const customer = action.payload
|
|
223
|
+
const customer = action.payload?.customer;
|
|
224
|
+
if (!customer) return state;
|
|
224
225
|
const newId = customer.userId || customer.customerId;
|
|
226
|
+
if (!newId) return state;
|
|
225
227
|
if (list.some((c) => (c.userId || c.customerId) === newId)) return state;
|
|
226
228
|
return state.set('testCustomers', list.concat([customer]));
|
|
227
229
|
}
|
|
@@ -161,9 +161,10 @@ export function* getBulkCustomerDetails({fetchedUserIds}) {
|
|
|
161
161
|
const emailIdentifier = profile?.identifiers?.find(
|
|
162
162
|
(identifier) => identifier.type === IDENTIFIER_TYPE_EMAIL,
|
|
163
163
|
);
|
|
164
|
+
const nameParts = [profile?.firstName, profile?.lastName].filter(Boolean);
|
|
164
165
|
return {
|
|
165
166
|
userId: item?.entity?.id,
|
|
166
|
-
name:
|
|
167
|
+
name: nameParts.join(' '),
|
|
167
168
|
mobile: mobileIdentifier?.value,
|
|
168
169
|
email: emailIdentifier?.value,
|
|
169
170
|
};
|
|
@@ -8,7 +8,7 @@ import React from 'react';
|
|
|
8
8
|
import { render, screen } from '@testing-library/react';
|
|
9
9
|
import PreviewSection from '../PreviewSection';
|
|
10
10
|
|
|
11
|
-
// Mock UnifiedPreview component
|
|
11
|
+
// Mock UnifiedPreview component (lightweight DOM for this suite only).
|
|
12
12
|
const mockUnifiedPreview = jest.fn();
|
|
13
13
|
jest.mock('../UnifiedPreview', () => {
|
|
14
14
|
// eslint-disable-next-line global-require, import/no-extraneous-dependencies
|
|
@@ -232,3 +232,10 @@ describe('PreviewSection', () => {
|
|
|
232
232
|
});
|
|
233
233
|
});
|
|
234
234
|
});
|
|
235
|
+
|
|
236
|
+
// This suite mocks ../UnifiedPreview. resetModules() alone is not enough — Jest still applies the
|
|
237
|
+
// manual mock on the next load. Unmock + reset so later test files in this worker get the real module.
|
|
238
|
+
afterAll(() => {
|
|
239
|
+
jest.unmock('../UnifiedPreview');
|
|
240
|
+
jest.resetModules();
|
|
241
|
+
});
|