@capillarytech/creatives-library 7.14.39 → 7.14.41
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/i18n.js +4 -6
- package/package.json +1 -1
- package/reducers.js +2 -0
- package/services/api.js +9 -1
- package/tests/integration/TemplateCreation/TemplateCreation.integration.test.js +420 -0
- package/tests/integration/TemplateCreation/api-response.js +1663 -0
- package/tests/integration/TemplateCreation/helper.js +23 -0
- package/tests/integration/TemplateCreation/mocks/initialState.js +428 -0
- package/tests/integration/TemplateCreation/msw-handler.js +48 -0
- package/v2Components/CapActionButton/index.js +1 -0
- package/v2Components/FormBuilder/index.js +28 -4
- package/v2Containers/Assets/Gallery/index.js +1 -1
- package/v2Containers/CreativesContainer/constants.js +2 -0
- package/v2Containers/CreativesContainer/selectors.js +2 -2
- package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +8 -0
- package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +3 -0
- package/v2Containers/Line/Container/Text/index.js +3 -2
- package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +4 -0
- package/v2Containers/Line/Container/index.js +1 -1
- package/v2Containers/Rcs/index.js +3 -0
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +250 -3
- package/v2Containers/Sms/Create/actions.js +9 -0
- package/v2Containers/Sms/Create/constants.js +2 -0
- package/v2Containers/Sms/Create/index.js +12 -0
- package/v2Containers/Sms/Create/sagas.js +19 -3
- package/v2Containers/Sms/Create/tests/sagas.test.js +82 -0
- package/v2Containers/Templates/index.js +26 -11
- package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +96 -80
- package/v2Containers/TemplatesV2/index.js +1 -1
- package/v2Containers/Viber/index.js +1 -0
- package/v2Containers/Whatsapp/constants.js +27 -8
- package/v2Containers/Whatsapp/index.js +14 -2
- package/v2Containers/Whatsapp/messages.js +21 -4
- package/v2Containers/Whatsapp/styles.scss +3 -0
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +180 -128
- package/v2Containers/Whatsapp/tests/utils.test.js +1 -1
- package/v2Containers/Whatsapp/utils.js +2 -1
- package/v2Containers/mockdata.js +5 -5
|
@@ -51,7 +51,7 @@ describe('Test utils', () => {
|
|
|
51
51
|
expect(getWhatsappCategory('ALERT_UPDATE', 'twiliowhatsapptrans')).toEqual(
|
|
52
52
|
getWhatsappCategoryOutput1,
|
|
53
53
|
);
|
|
54
|
-
expect(getWhatsappCategory('
|
|
54
|
+
expect(getWhatsappCategory('UTILITY', 'karixwhatsappbulk')).toEqual(
|
|
55
55
|
getWhatsappCategoryOutput2,
|
|
56
56
|
);
|
|
57
57
|
});
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
STATUS_OPTIONS,
|
|
10
10
|
TWILIO_CATEGORY_OPTIONS,
|
|
11
11
|
KARIX_GUPSHUP_CATEGORY_OPTIONS,
|
|
12
|
+
KARIX_GUPSHUP_OLDER_CATEGORY_OPTIONS,
|
|
12
13
|
WHATSAPP_STATUSES,
|
|
13
14
|
PHONE_NUMBER,
|
|
14
15
|
NONE,
|
|
@@ -143,7 +144,7 @@ export const getWhatsappCta = (template) => {
|
|
|
143
144
|
};
|
|
144
145
|
|
|
145
146
|
export const getWhatsappCategory = (category, hostName) => (
|
|
146
|
-
hostName === HOST_TWILIO ? TWILIO_CATEGORY_OPTIONS : KARIX_GUPSHUP_CATEGORY_OPTIONS
|
|
147
|
+
hostName === HOST_TWILIO ? TWILIO_CATEGORY_OPTIONS : [...KARIX_GUPSHUP_CATEGORY_OPTIONS, ...KARIX_GUPSHUP_OLDER_CATEGORY_OPTIONS]
|
|
147
148
|
).find((obj) => obj.value === category);
|
|
148
149
|
|
|
149
150
|
export const getWhatsappStatus = (status) => {
|
package/v2Containers/mockdata.js
CHANGED
|
@@ -1169,11 +1169,11 @@ export default {
|
|
|
1169
1169
|
value: 'ALERT_UPDATE',
|
|
1170
1170
|
},
|
|
1171
1171
|
getWhatsappCategoryOutput2: {
|
|
1172
|
-
key: '
|
|
1172
|
+
key: 'utility',
|
|
1173
1173
|
label: (
|
|
1174
1174
|
<FormattedMessage
|
|
1175
|
-
defaultMessage="
|
|
1176
|
-
id="creatives.containersV2.Whatsapp.
|
|
1175
|
+
defaultMessage="Utility"
|
|
1176
|
+
id="creatives.containersV2.Whatsapp.utility"
|
|
1177
1177
|
values={{}}
|
|
1178
1178
|
/>
|
|
1179
1179
|
),
|
|
@@ -1182,11 +1182,11 @@ export default {
|
|
|
1182
1182
|
tooltipLabel: (
|
|
1183
1183
|
<FormattedMessage
|
|
1184
1184
|
defaultMessage="Send account updates, order updates, alerts, and more to share important information."
|
|
1185
|
-
id="creatives.containersV2.Whatsapp.
|
|
1185
|
+
id="creatives.containersV2.Whatsapp.utilityTooltip"
|
|
1186
1186
|
values={{}}
|
|
1187
1187
|
/>
|
|
1188
1188
|
),
|
|
1189
|
-
value: '
|
|
1189
|
+
value: 'UTILITY',
|
|
1190
1190
|
},
|
|
1191
1191
|
whatsappPreviewTemplateData: {
|
|
1192
1192
|
mode: 'preview',
|