@capillarytech/creatives-library 9.0.15-alpha.3 → 9.0.16-beta.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/AppRoot.js +80 -0
- package/app.js +5 -3
- package/constants/unified.js +0 -29
- package/entry.js +67 -1
- package/global-styles.js +1 -1
- package/mfe-exposed-components.js +2 -4
- package/package.json +2 -2
- package/services/api.js +1 -1
- package/services/tests/api.test.js +20 -35
- package/styles/containers/layout/_layoutPage.scss +8 -6
- package/utils/commonUtils.js +1 -19
- package/utils/getDataLayer.js +15 -0
- package/utils/gtmTrackers/gtmEvents/creativeDetails.js +2 -1
- package/utils/mfeDetect.js +1 -0
- package/v2Components/CapActionButton/constants.js +1 -8
- package/v2Components/CapActionButton/index.js +144 -202
- package/v2Components/CapActionButton/index.scss +14 -232
- package/v2Components/CapActionButton/messages.js +3 -19
- package/v2Components/CapActionButton/tests/index.test.js +18 -42
- package/v2Components/CapImageUpload/index.js +2 -2
- package/v2Components/CapTagList/index.js +0 -10
- package/v2Components/CommonTestAndPreview/CustomValuesEditor.js +48 -70
- package/v2Components/CommonTestAndPreview/DeliverySettings/DeliverySettings.scss +2 -8
- package/v2Components/CommonTestAndPreview/DeliverySettings/ModifyDeliverySettings.js +21 -214
- package/v2Components/CommonTestAndPreview/DeliverySettings/constants.js +0 -16
- package/v2Components/CommonTestAndPreview/DeliverySettings/index.js +9 -83
- package/v2Components/CommonTestAndPreview/DeliverySettings/messages.js +0 -30
- package/v2Components/CommonTestAndPreview/DeliverySettings/utils/parseSenderDetailsResponse.js +11 -60
- package/v2Components/CommonTestAndPreview/SendTestMessage.js +5 -10
- package/v2Components/CommonTestAndPreview/UnifiedPreview/RcsPreviewContent.js +22 -202
- package/v2Components/CommonTestAndPreview/UnifiedPreview/_unifiedPreview.scss +80 -381
- package/v2Components/CommonTestAndPreview/UnifiedPreview/index.js +8 -155
- package/v2Components/CommonTestAndPreview/_commonTestAndPreview.scss +0 -11
- package/v2Components/CommonTestAndPreview/constants.js +2 -38
- package/v2Components/CommonTestAndPreview/index.js +222 -761
- package/v2Components/CommonTestAndPreview/messages.js +3 -45
- package/v2Components/CommonTestAndPreview/sagas.js +6 -25
- package/v2Components/CommonTestAndPreview/tests/CommonTestAndPreview.addTestCustomer.test.js +0 -1
- package/v2Components/CommonTestAndPreview/tests/CustomValuesEditor.test.js +267 -284
- package/v2Components/CommonTestAndPreview/tests/DeliverySettings/ModifyDeliverySettings.test.js +65 -231
- package/v2Components/CommonTestAndPreview/tests/DeliverySettings/index.test.js +5 -118
- package/v2Components/CommonTestAndPreview/tests/DeliverySettings/utils/parseSenderDetailsResponse.test.js +0 -341
- package/v2Components/CommonTestAndPreview/tests/PreviewSection.test.js +1 -8
- package/v2Components/CommonTestAndPreview/tests/SendTestMessage.test.js +13 -34
- package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/RcsPreviewContent.test.js +283 -281
- package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/index.test.js +1 -199
- package/v2Components/CommonTestAndPreview/tests/index.test.js +4 -133
- package/v2Components/CommonTestAndPreview/tests/sagas.test.js +24 -31
- package/v2Components/NavigationBar/index.js +9 -7
- package/v2Components/NavigationBar/mfeModuleHeader.config.js +16 -0
- package/v2Components/Pagination/_pagination.scss +2 -0
- package/v2Components/TemplatePreview/_templatePreview.scss +25 -45
- package/v2Components/TemplatePreview/index.js +32 -147
- package/v2Components/TemplatePreview/tests/index.test.js +0 -142
- package/v2Components/TestAndPreviewSlidebox/CustomValuesEditor.js +6 -6
- package/v2Components/TestAndPreviewSlidebox/index.js +1 -13
- package/v2Components/TestAndPreviewSlidebox/sagas.js +4 -11
- package/v2Components/TestAndPreviewSlidebox/tests/saga.test.js +1 -3
- package/v2Containers/Cap/constants.js +1 -0
- package/v2Containers/Cap/index.js +47 -21
- package/v2Containers/Cap/sagas.js +19 -0
- package/v2Containers/CommunicationFlow/Tests/CommunicationFlow.test.js +1 -4
- package/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/Tests/DeliverySettingsSection.test.js +0 -4
- package/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/Tests/SenderDetails.test.js +20 -20
- package/v2Containers/CreativesContainer/SlideBoxContent.js +7 -37
- package/v2Containers/CreativesContainer/SlideBoxFooter.js +5 -14
- package/v2Containers/CreativesContainer/SlideBoxHeader.js +5 -36
- package/v2Containers/CreativesContainer/constants.js +0 -11
- package/v2Containers/CreativesContainer/index.js +104 -323
- package/v2Containers/CreativesContainer/index.scss +1 -83
- package/v2Containers/CreativesContainer/tests/SlideBoxFooter.test.js +34 -79
- package/v2Containers/CreativesContainer/tests/SlideBoxHeader.test.js +16 -79
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +0 -8
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxHeader.test.js.snap +90 -333
- package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +15 -20
- package/v2Containers/CreativesContainer/tests/index.test.js +9 -71
- package/v2Containers/MobilePush/Create/test/saga.test.js +2 -2
- package/v2Containers/Rcs/constants.js +11 -131
- package/v2Containers/Rcs/index.js +829 -2682
- package/v2Containers/Rcs/index.scss +8 -443
- package/v2Containers/Rcs/messages.js +6 -45
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +39409 -74176
- package/v2Containers/Rcs/tests/__snapshots__/utils.test.js.snap +74 -10
- package/v2Containers/Rcs/tests/index.test.js +40 -151
- package/v2Containers/Rcs/tests/mockData.js +0 -38
- package/v2Containers/Rcs/tests/utils.test.js +30 -643
- package/v2Containers/Rcs/utils.js +12 -466
- package/v2Containers/Sms/Create/index.js +48 -115
- package/v2Containers/SmsTrai/Create/index.js +4 -9
- package/v2Containers/SmsTrai/Edit/constants.js +0 -2
- package/v2Containers/SmsTrai/Edit/index.js +169 -678
- package/v2Containers/SmsTrai/Edit/messages.js +4 -14
- package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +2854 -5455
- package/v2Containers/SmsWrapper/index.js +8 -37
- package/v2Containers/TagList/index.js +0 -6
- package/v2Containers/Templates/_templates.scss +11 -196
- package/v2Containers/Templates/actions.js +0 -11
- package/v2Containers/Templates/constants.js +0 -2
- package/v2Containers/Templates/index.js +60 -131
- package/v2Containers/Templates/sagas.js +13 -57
- package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +1015 -1060
- package/v2Containers/Templates/tests/sagas.test.js +16 -199
- package/v2Containers/TemplatesV2/TemplatesV2.style.js +10 -75
- package/v2Containers/TemplatesV2/index.js +43 -86
- package/v2Containers/WeChat/MapTemplates/test/saga.test.js +9 -9
- package/v2Containers/Whatsapp/index.js +25 -4
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +34 -578
- package/utils/rcsPayloadUtils.js +0 -92
- package/utils/templateVarUtils.js +0 -201
- package/utils/tests/rcsPayloadUtils.test.js +0 -226
- package/utils/tests/templateVarUtils.test.js +0 -204
- package/v2Components/CommonTestAndPreview/previewApiUtils.js +0 -59
- package/v2Components/CommonTestAndPreview/tests/previewApiUtils.test.js +0 -67
- package/v2Components/CommonTestAndPreview/utils.js +0 -84
- package/v2Components/SmsFallback/SmsFallbackLocalSelector.js +0 -91
- package/v2Components/SmsFallback/constants.js +0 -94
- package/v2Components/SmsFallback/index.js +0 -958
- package/v2Components/SmsFallback/index.scss +0 -266
- package/v2Components/SmsFallback/messages.js +0 -78
- package/v2Components/SmsFallback/smsFallbackUtils.js +0 -120
- package/v2Components/SmsFallback/tests/SmsFallbackLocalSelector.test.js +0 -50
- package/v2Components/SmsFallback/tests/rcsSmsFallback.acceptance.test.js +0 -147
- package/v2Components/SmsFallback/tests/smsFallbackHandlers.test.js +0 -304
- package/v2Components/SmsFallback/tests/smsFallbackUi.test.js +0 -208
- package/v2Components/SmsFallback/tests/smsFallbackUtils.test.js +0 -309
- package/v2Components/SmsFallback/tests/useLocalTemplateList.test.js +0 -422
- package/v2Components/SmsFallback/useLocalTemplateList.js +0 -92
- package/v2Components/TemplatePreview/constants.js +0 -2
- package/v2Components/VarSegmentMessageEditor/constants.js +0 -2
- package/v2Components/VarSegmentMessageEditor/index.js +0 -125
- package/v2Components/VarSegmentMessageEditor/index.scss +0 -46
- package/v2Containers/CreativesContainer/CreativesSlideBoxWrapper.js +0 -17
- package/v2Containers/CreativesContainer/embeddedSlideboxUtils.js +0 -79
- package/v2Containers/CreativesContainer/tests/SlideBoxContent.localTemplates.test.js +0 -90
- package/v2Containers/CreativesContainer/tests/embeddedSlideboxUtils.test.js +0 -258
- package/v2Containers/CreativesContainer/tests/useLocalTemplatesProp.test.js +0 -125
- package/v2Containers/Rcs/rcsLibraryHydrationUtils.js +0 -227
- package/v2Containers/Rcs/tests/rcsLibraryHydrationUtils.test.js +0 -318
- package/v2Containers/Sms/smsFormDataHelpers.js +0 -67
- package/v2Containers/Sms/tests/smsFormDataHelpers.test.js +0 -253
- package/v2Containers/SmsTrai/Edit/index.scss +0 -126
- package/v2Containers/Templates/TemplatesActionBar.js +0 -101
- package/v2Containers/Templates/tests/TemplatesActionBar.test.js +0 -120
- package/v2Containers/Templates/tests/smsTemplatesListApi.test.js +0 -180
- package/v2Containers/Templates/utils/smsTemplatesListApi.js +0 -79
- package/v2Containers/TemplatesV2/tests/TemplatesV2.localTemplates.test.js +0 -131
|
@@ -173,35 +173,19 @@ describe('Test SlideBoxContent container', () => {
|
|
|
173
173
|
expect(getCreativesData).toHaveBeenCalledWith({ channel: 'RCS' });
|
|
174
174
|
});
|
|
175
175
|
|
|
176
|
-
it('RCS getFormData
|
|
177
|
-
|
|
178
|
-
<Creatives
|
|
179
|
-
loyaltyMetaData={loyaltyMetaData}
|
|
180
|
-
Templates={rcsTemplates}
|
|
181
|
-
channel="RCS"
|
|
182
|
-
slidBoxContent="editTemplate"
|
|
183
|
-
templateData={rcsEditTemplateData}
|
|
184
|
-
handleCloseCreatives={handleCloseCreatives}
|
|
185
|
-
getCreativesData={getCreativesData}
|
|
186
|
-
isFullMode={false}
|
|
187
|
-
templateActions={{
|
|
188
|
-
getCdnTransformationConfig,
|
|
189
|
-
}}
|
|
190
|
-
/>,
|
|
191
|
-
);
|
|
176
|
+
it('RCS getFormData does not attach smsFallBackContent to templateData', async () => {
|
|
177
|
+
renderFunction('RCS', 'editTemplate', rcsTemplates, rcsEditTemplateData);
|
|
192
178
|
renderedComponent.instance().onEditTemplate();
|
|
193
179
|
|
|
194
180
|
const mockValue = {
|
|
195
|
-
validity: true,
|
|
196
181
|
value: {
|
|
197
182
|
name: 'rcs_creative_name',
|
|
198
|
-
type: 'RCS',
|
|
199
183
|
versions: {
|
|
200
184
|
base: {
|
|
201
185
|
content: {
|
|
202
186
|
RCS: {
|
|
203
187
|
rcsContent: { contentType: 'RICHCARD', cardType: 'STANDALONE', cardSettings: {}, cardContent: [{}] },
|
|
204
|
-
smsFallBackContent: { message: '
|
|
188
|
+
smsFallBackContent: { message: 'should-not-be-copied' },
|
|
205
189
|
},
|
|
206
190
|
},
|
|
207
191
|
},
|
|
@@ -209,62 +193,16 @@ describe('Test SlideBoxContent container', () => {
|
|
|
209
193
|
},
|
|
210
194
|
};
|
|
211
195
|
|
|
212
|
-
|
|
213
|
-
|
|
196
|
+
renderedComponent
|
|
197
|
+
.find('CapSlideBox')
|
|
198
|
+
.props()
|
|
199
|
+
.content.props.getFormData(mockValue);
|
|
214
200
|
await tick();
|
|
215
201
|
|
|
216
202
|
const instance = renderedComponent.instance();
|
|
217
203
|
expect(instance.state.templateData).toBeDefined();
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
it('RCS getFormData mirrors rcsCardVarMapped onto templateData for campaign reopen', async () => {
|
|
222
|
-
renderedComponent = shallowWithIntl(
|
|
223
|
-
<Creatives
|
|
224
|
-
loyaltyMetaData={loyaltyMetaData}
|
|
225
|
-
Templates={rcsTemplates}
|
|
226
|
-
channel="RCS"
|
|
227
|
-
slidBoxContent="editTemplate"
|
|
228
|
-
templateData={rcsEditTemplateData}
|
|
229
|
-
handleCloseCreatives={handleCloseCreatives}
|
|
230
|
-
getCreativesData={getCreativesData}
|
|
231
|
-
isFullMode={false}
|
|
232
|
-
templateActions={{
|
|
233
|
-
getCdnTransformationConfig,
|
|
234
|
-
}}
|
|
235
|
-
/>,
|
|
236
|
-
);
|
|
237
|
-
renderedComponent.instance().onEditTemplate();
|
|
238
|
-
|
|
239
|
-
const cardVarMapped = { 1: '[Name]', user_name: '[Name]' };
|
|
240
|
-
const mockValue = {
|
|
241
|
-
validity: true,
|
|
242
|
-
value: {
|
|
243
|
-
name: 'rcs_creative_name',
|
|
244
|
-
type: 'RCS',
|
|
245
|
-
versions: {
|
|
246
|
-
base: {
|
|
247
|
-
content: {
|
|
248
|
-
RCS: {
|
|
249
|
-
rcsContent: {
|
|
250
|
-
contentType: 'RICHCARD',
|
|
251
|
-
cardType: 'STANDALONE',
|
|
252
|
-
cardSettings: {},
|
|
253
|
-
cardContent: [{ title: 'Hi {{user_name}}', cardVarMapped }],
|
|
254
|
-
},
|
|
255
|
-
smsFallBackContent: {},
|
|
256
|
-
},
|
|
257
|
-
},
|
|
258
|
-
},
|
|
259
|
-
},
|
|
260
|
-
},
|
|
261
|
-
};
|
|
262
|
-
|
|
263
|
-
renderedComponent.instance().getFormData(mockValue);
|
|
264
|
-
await tick();
|
|
265
|
-
|
|
266
|
-
const instance = renderedComponent.instance();
|
|
267
|
-
expect(instance.state.templateData.rcsCardVarMapped).toEqual(cardVarMapped);
|
|
204
|
+
// sms fallback content should not be set on templateData per current logic
|
|
205
|
+
expect(instance.state.templateData.smsFallBackContent).toBeUndefined();
|
|
268
206
|
});
|
|
269
207
|
|
|
270
208
|
it('Text getCreatives data for rcs, data from creatives done to campaigns', async () => {
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
|
|
8
8
|
describe("MPUSH Sagas", () => {
|
|
9
9
|
describe("v2MobilePushCreateSagas Combined", () => {
|
|
10
|
-
it("should initialize all mpush-related watcher sagas without error", () => {
|
|
10
|
+
it.concurrent("should initialize all mpush-related watcher sagas without error", () => {
|
|
11
11
|
return expectSaga(v2MobilePushCreateSagas).run();
|
|
12
12
|
});
|
|
13
13
|
});
|
|
14
14
|
describe("v2MobilePushWatchDuplicateTemplateSaga Combined", () => {
|
|
15
|
-
it("should initialize all mpush-related watcher sagas without error", () => {
|
|
15
|
+
it.concurrent("should initialize all mpush-related watcher sagas without error", () => {
|
|
16
16
|
return expectSaga(v2MobilePushWatchDuplicateTemplateSaga).run();
|
|
17
17
|
});
|
|
18
18
|
});
|
|
@@ -34,32 +34,18 @@ export const RCS_STATUSES = {
|
|
|
34
34
|
awaitingApproval: 'awaitingApproval',
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
export const HOST_ICS="rcsicsbulk";
|
|
38
|
-
export const HOST_INFOBIP="rcsinfobipbulk";
|
|
39
|
-
|
|
40
37
|
export const contentType = {
|
|
41
38
|
text_message: 'text_message',
|
|
42
39
|
rich_card: 'rich_card',
|
|
43
|
-
carousel: '
|
|
40
|
+
carousel: 'carousel',
|
|
44
41
|
};
|
|
45
42
|
|
|
46
|
-
export const CHANNELS = [
|
|
47
|
-
'email',
|
|
48
|
-
'mPush',
|
|
49
|
-
'viber',
|
|
50
|
-
'whatsapp',
|
|
51
|
-
'zalo',
|
|
52
|
-
'facebook',
|
|
53
|
-
'rcs',
|
|
54
|
-
'inApp',
|
|
55
|
-
'line',
|
|
56
|
-
'weChat',
|
|
57
|
-
'callTask',
|
|
58
|
-
'FTP',
|
|
59
|
-
'webpush',
|
|
60
|
-
];
|
|
61
|
-
|
|
62
43
|
export const STATUS_OPTIONS = [
|
|
44
|
+
// {
|
|
45
|
+
// key: 'created',
|
|
46
|
+
// value: RCS_STATUSES.awaitingApproval,
|
|
47
|
+
// label: <FormattedMessage {...messages.created} />,
|
|
48
|
+
// },
|
|
63
49
|
{
|
|
64
50
|
key: 'approved',
|
|
65
51
|
value: RCS_STATUSES.approved,
|
|
@@ -86,44 +72,12 @@ export const RCS_MEDIA_TYPES = {
|
|
|
86
72
|
NONE: 'NONE',
|
|
87
73
|
IMAGE: 'IMAGE',
|
|
88
74
|
VIDEO: 'VIDEO',
|
|
89
|
-
TEXT: 'TEXT',
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
/** Match `{{…}}` placeholders including Liquid-style names (e.g. `tag.FORMAT_1`). Must align with split + `isAnyTemplateVarToken` / SMS fallback. */
|
|
93
|
-
export const rcsVarRegex = /\{\{[^}]+\}\}/g;
|
|
94
|
-
/** True when the whole string is a single RCS/mustache token (used when testing segment tokens). */
|
|
95
|
-
export const rcsVarTestRegex = /^\{\{[^}]+\}\}$/;
|
|
96
|
-
|
|
97
|
-
/** Matches all `{{N}}` numeric-index variable tokens in a template string (global). */
|
|
98
|
-
export const RCS_NUMERIC_VAR_TOKEN_REGEX = /\{\{(\d+)\}\}/g;
|
|
99
|
-
/** `cardVarMapped` slot keys that are numeric only (legacy ordering). */
|
|
100
|
-
export const RCS_NUMERIC_VAR_NAME_REGEX = /^\d+$/;
|
|
101
|
-
/** Semantic Liquid-style keys on RCS `cardVarMapped` (same class as `{{…}}` inner names in the editor). */
|
|
102
|
-
export const RCS_CARD_VAR_MAPPED_SEMANTIC_KEY_REGEX = /^[\w.]+$/;
|
|
103
|
-
/** Escape `RegExp` metacharacters when building a pattern from user/tag text. */
|
|
104
|
-
export const RCS_REGEX_META_CHARS_PATTERN = /[.*+?^${}()|[\]\\]/g;
|
|
105
|
-
/** Escape all special RegExp characters in an arbitrary string before using it in `new RegExp(...)`. */
|
|
106
|
-
export const REGEX_SPECIAL_CHARS_ESCAPE_PATTERN = /[-/\\^$*+?.()|[\]{}]/g;
|
|
107
|
-
/** Entire string is a single `{{tag}}` token (value still a placeholder). */
|
|
108
|
-
export const RCS_SINGLE_MUSTACHE_PLACEHOLDER_REGEX = /^\{\{[^}]+\}\}$/;
|
|
109
|
-
/** Entire string is wrapped in `{{…}}` mustache delimiters (allows any content including `}`). */
|
|
110
|
-
export const RCS_MUSTACHE_WRAPPED_REGEX = /^\{\{[\s\S]*\}\}$/;
|
|
111
|
-
/** Strip leading `{{` and trailing `}}` from a token. */
|
|
112
|
-
export const RCS_STRIP_MUSTACHE_DELIMITERS_REGEX = /^\{\{|\}\}$/g;
|
|
113
|
-
|
|
114
|
-
export const JS_TYPES = {
|
|
115
|
-
STRING: 'string',
|
|
116
|
-
NUMBER: 'number',
|
|
117
|
-
OBJECT: 'object',
|
|
118
75
|
};
|
|
119
76
|
|
|
120
|
-
|
|
121
|
-
export const
|
|
122
|
-
export const RCS_TAG_AREA_FIELD_DESC = 'desc';
|
|
123
|
-
|
|
77
|
+
export const rcsVarRegex = /\{\{\w+\}\}/g;
|
|
78
|
+
export const rcsVarTestRegex = /\{\{\w+\}\}/;
|
|
124
79
|
export const TEMPLATE_DESC_MAX_LENGTH = 2500;
|
|
125
|
-
|
|
126
|
-
export const FALLBACK_MESSAGE_MAX_LENGTH = TEMPLATE_MESSAGE_MAX_LENGTH;
|
|
80
|
+
export const FALLBACK_MESSAGE_MAX_LENGTH = 160;
|
|
127
81
|
export const TEMPLATE_TITLE_MAX_LENGTH = 200;
|
|
128
82
|
export const TEMPLATE_BUTTON_TEXT_MAX_LENGTH = 25;
|
|
129
83
|
export const CTA = 'CTA';
|
|
@@ -138,12 +92,10 @@ export const ALLOWED_IMAGE_EXTENSIONS_REGEX = (/\.(png|jpg|jpeg|gif)$/i);
|
|
|
138
92
|
export const RCS_IMG_WIDTH = 1440;
|
|
139
93
|
export const RCS_IMG_HEIGHT = 1024;
|
|
140
94
|
export const RCS_IMG_SIZE = 2000000; // 2MB
|
|
141
|
-
export const RCS_CAROUSEL_IMG_SIZE = 1 * 1024 * 1024; // 1MB
|
|
142
95
|
export const MAX_FILE_SIZE_MB = 10;
|
|
143
96
|
export const MAX_FILE_SIZE_BYTES = MAX_FILE_SIZE_MB * 1024 * 1024;
|
|
144
97
|
export const ALLOWED_EXTENSIONS_VIDEO_REGEX = (/\.(mp4)$/i);
|
|
145
98
|
export const RCS_VIDEO_SIZE = 10 * 1024 * 1024;
|
|
146
|
-
export const RCS_CAROUSEL_VIDEO_SIZE = 5 * 1024 * 1024; // 5MB
|
|
147
99
|
export const RCS_THUMBNAIL_MIN_SIZE = 40 * 1024;
|
|
148
100
|
export const RCS_THUMBNAIL_MAX_SIZE = 100 * 1024;
|
|
149
101
|
|
|
@@ -190,38 +142,13 @@ export const RCS_IMAGE_DIMENSIONS = {
|
|
|
190
142
|
},
|
|
191
143
|
};
|
|
192
144
|
|
|
193
|
-
// Carousel image dimensions (pixel values shown in UI). Keys follow `${HEIGHT}_${WIDTH}`.
|
|
194
|
-
// HEIGHT: SHORT|MEDIUM, WIDTH: SMALL|MEDIUM
|
|
195
|
-
export const RCS_CAROUSEL_IMAGE_DIMENSIONS = {
|
|
196
|
-
SHORT_SMALL: {
|
|
197
|
-
width: 1160,
|
|
198
|
-
height: 720,
|
|
199
|
-
description: 'Image (1160 x 720)',
|
|
200
|
-
},
|
|
201
|
-
SHORT_MEDIUM: {
|
|
202
|
-
width: 1800,
|
|
203
|
-
height: 720,
|
|
204
|
-
description: 'Image (1800 x 720)',
|
|
205
|
-
},
|
|
206
|
-
MEDIUM_SMALL: {
|
|
207
|
-
width: 770,
|
|
208
|
-
height: 720,
|
|
209
|
-
description: 'Image (770 x 720)',
|
|
210
|
-
},
|
|
211
|
-
MEDIUM_MEDIUM: {
|
|
212
|
-
width: 1280,
|
|
213
|
-
height: 720,
|
|
214
|
-
description: 'Image (1280 x 720)',
|
|
215
|
-
},
|
|
216
|
-
};
|
|
217
|
-
|
|
218
145
|
export const RCS_VIDEO_THUMBNAIL_DIMENSIONS = {
|
|
219
146
|
SHORT_HEIGHT: {
|
|
147
|
+
width: 770,
|
|
148
|
+
height: 257,
|
|
220
149
|
type: 'SHORT_HEIGHT',
|
|
221
150
|
heightType: 'SHORT',
|
|
222
151
|
label: 'Vertical Short',
|
|
223
|
-
width: 1140,
|
|
224
|
-
height: 448,
|
|
225
152
|
description: 'Thumbnail (770 x 257)',
|
|
226
153
|
orientation: 'VERTICAL',
|
|
227
154
|
maxFileSize: 100 * 1024,
|
|
@@ -262,29 +189,6 @@ export const RCS_VIDEO_THUMBNAIL_DIMENSIONS = {
|
|
|
262
189
|
},
|
|
263
190
|
};
|
|
264
191
|
|
|
265
|
-
// Carousel thumbnail dimensions for video cards (pixel values shown in UI).
|
|
266
|
-
// Keys follow `${HEIGHT}_${WIDTH}`.
|
|
267
|
-
// Human-readable labels: formatMessage(messages.rcsCarouselVideoThumbnailLabel, { width, height })
|
|
268
|
-
// or formatRcsCarouselVideoThumbnailLabel(formatMessage, entry) from ./utils.
|
|
269
|
-
export const RCS_CAROUSEL_VIDEO_THUMBNAIL_DIMENSIONS = {
|
|
270
|
-
SHORT_SMALL: {
|
|
271
|
-
width: 718,
|
|
272
|
-
height: 448,
|
|
273
|
-
},
|
|
274
|
-
SHORT_MEDIUM: {
|
|
275
|
-
width: 1140,
|
|
276
|
-
height: 448,
|
|
277
|
-
},
|
|
278
|
-
MEDIUM_SMALL: {
|
|
279
|
-
width: 480,
|
|
280
|
-
height: 448,
|
|
281
|
-
},
|
|
282
|
-
MEDIUM_MEDIUM: {
|
|
283
|
-
width: 796,
|
|
284
|
-
height: 448,
|
|
285
|
-
},
|
|
286
|
-
};
|
|
287
|
-
|
|
288
192
|
const prefix = 'app/v2Containers/Rcs';
|
|
289
193
|
export const UPLOAD_RCS_ASSET_REQUEST = `${prefix}/UPLOAD_RCS_ASSET_REQUEST`;
|
|
290
194
|
export const UPLOAD_RCS_ASSET_SUCCESS = `${prefix}/UPLOAD_RCS_ASSET_SUCCESS`;
|
|
@@ -311,7 +215,6 @@ export const CLEAR_EDIT_RESPONSE_REQUEST = `${prefix}/Edit/CLEAR_EDIT_RESPONSE_R
|
|
|
311
215
|
export const AI_CONTENT_BOT_DISABLED = "AI_CONTENT_BOT_DISABLED";
|
|
312
216
|
|
|
313
217
|
export const RCS_TEXT_MESSAGE_MAX_LENGTH = 160;
|
|
314
|
-
export const RCS_TEXT_MESSAGE_MAX_LENGTH_INFOBIP = 3072;
|
|
315
218
|
export const RCS_RICH_CARD_MAX_LENGTH = 2000;
|
|
316
219
|
export const MAX_BUTTONS = 4;
|
|
317
220
|
|
|
@@ -347,26 +250,3 @@ export const RCS_BUTTON_TYPES = {
|
|
|
347
250
|
PHONE_NUMBER: 'PHONE_NUMBER',
|
|
348
251
|
CTA: 'CTA',
|
|
349
252
|
};
|
|
350
|
-
|
|
351
|
-
/** Default action row for carousel card 1 (mandatory button UX): phone CTA, unsaved until user completes + Save. */
|
|
352
|
-
export const RCS_CAROUSEL_FIRST_CARD_DEFAULT_SUGGESTIONS = [
|
|
353
|
-
{
|
|
354
|
-
index: 0,
|
|
355
|
-
type: RCS_BUTTON_TYPES.PHONE_NUMBER,
|
|
356
|
-
text: '',
|
|
357
|
-
phoneNumber: '',
|
|
358
|
-
url: null,
|
|
359
|
-
postback: '',
|
|
360
|
-
isSaved: false,
|
|
361
|
-
},
|
|
362
|
-
];
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
export const CAROUSEL_HEIGHT_OPTIONS = [
|
|
366
|
-
{ value: 'SHORT', label: 'Short' },
|
|
367
|
-
{ value: 'MEDIUM', label: 'Medium' },
|
|
368
|
-
];
|
|
369
|
-
export const CAROUSEL_WIDTH_OPTIONS = [
|
|
370
|
-
{ value: 'SMALL', label: 'Small' },
|
|
371
|
-
{ value: 'MEDIUM', label: 'Medium' },
|
|
372
|
-
];
|