@capillarytech/creatives-library 8.0.345-alpha.12 → 8.0.345-alpha.13
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 +0 -29
- package/package.json +1 -1
- package/services/api.js +20 -0
- package/services/tests/api.test.js +59 -13
- package/utils/commonUtils.js +1 -19
- package/v2Components/CapActionButton/constants.js +0 -7
- package/v2Components/CapActionButton/index.js +109 -167
- package/v2Components/CapActionButton/index.scss +6 -157
- package/v2Components/CapActionButton/messages.js +3 -19
- package/v2Components/CapActionButton/tests/index.test.js +17 -41
- package/v2Components/CapCustomSkeleton/index.js +1 -1
- package/v2Components/CapCustomSkeleton/tests/__snapshots__/index.test.js.snap +12 -12
- package/v2Components/CapTagList/index.js +0 -10
- package/v2Components/CommonTestAndPreview/CustomValuesEditor.js +49 -70
- package/v2Components/CommonTestAndPreview/DeliverySettings/DeliverySettings.scss +2 -8
- package/v2Components/CommonTestAndPreview/DeliverySettings/ModifyDeliverySettings.js +21 -207
- package/v2Components/CommonTestAndPreview/DeliverySettings/constants.js +0 -16
- package/v2Components/CommonTestAndPreview/DeliverySettings/index.js +10 -85
- package/v2Components/CommonTestAndPreview/DeliverySettings/messages.js +0 -30
- package/v2Components/CommonTestAndPreview/DeliverySettings/utils/parseSenderDetailsResponse.js +11 -79
- package/v2Components/CommonTestAndPreview/SendTestMessage.js +5 -10
- package/v2Components/CommonTestAndPreview/UnifiedPreview/RcsPreviewContent.js +15 -160
- package/v2Components/CommonTestAndPreview/UnifiedPreview/_unifiedPreview.scss +76 -341
- package/v2Components/CommonTestAndPreview/UnifiedPreview/index.js +4 -133
- package/v2Components/CommonTestAndPreview/_commonTestAndPreview.scss +0 -11
- package/v2Components/CommonTestAndPreview/constants.js +2 -38
- package/v2Components/CommonTestAndPreview/index.js +186 -676
- package/v2Components/CommonTestAndPreview/messages.js +3 -49
- package/v2Components/CommonTestAndPreview/sagas.js +6 -15
- package/v2Components/CommonTestAndPreview/tests/CustomValuesEditor.test.js +284 -308
- 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 -132
- package/v2Components/CommonTestAndPreview/tests/sagas.test.js +2 -2
- package/v2Components/FormBuilder/index.js +10 -8
- package/v2Components/TemplatePreview/_templatePreview.scss +23 -33
- package/v2Components/TemplatePreview/index.js +28 -143
- package/v2Components/TemplatePreview/tests/index.test.js +0 -142
- 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/Assets/images/archive_Empty_Illustration.svg +9 -0
- package/v2Containers/CreativesContainer/SlideBoxContent.js +4 -36
- package/v2Containers/CreativesContainer/SlideBoxFooter.js +4 -11
- package/v2Containers/CreativesContainer/SlideBoxHeader.js +4 -29
- package/v2Containers/CreativesContainer/constants.js +0 -9
- package/v2Containers/CreativesContainer/index.js +108 -300
- package/v2Containers/CreativesContainer/index.scss +1 -51
- package/v2Containers/CreativesContainer/messages.js +4 -0
- package/v2Containers/CreativesContainer/tests/SlideBoxFooter.test.js +34 -78
- 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 +98 -357
- package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +18 -20
- package/v2Containers/CreativesContainer/tests/index.test.js +9 -71
- package/v2Containers/Rcs/constants.js +8 -119
- package/v2Containers/Rcs/index.js +812 -2375
- package/v2Containers/Rcs/index.scss +6 -276
- package/v2Containers/Rcs/messages.js +3 -38
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +70345 -98302
- package/v2Containers/Rcs/tests/__snapshots__/utils.test.js.snap +5 -0
- package/v2Containers/Rcs/tests/index.test.js +121 -152
- package/v2Containers/Rcs/tests/mockData.js +0 -38
- package/v2Containers/Rcs/tests/utils.test.js +30 -646
- package/v2Containers/Rcs/utils.js +11 -478
- package/v2Containers/Sms/Create/index.js +40 -100
- package/v2Containers/SmsTrai/Create/index.js +4 -9
- package/v2Containers/SmsTrai/Edit/constants.js +0 -2
- package/v2Containers/SmsTrai/Edit/index.js +130 -636
- package/v2Containers/SmsTrai/Edit/messages.js +4 -14
- package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +2296 -4249
- package/v2Containers/SmsWrapper/index.js +8 -37
- package/v2Containers/TagList/index.js +0 -6
- package/v2Containers/Templates/ChannelTypeIllustration.js +23 -6
- package/v2Containers/Templates/_templates.scss +126 -181
- package/v2Containers/Templates/actions.js +36 -11
- package/v2Containers/Templates/constants.js +23 -2
- package/v2Containers/Templates/index.js +333 -142
- package/v2Containers/Templates/messages.js +68 -0
- package/v2Containers/Templates/reducer.js +68 -0
- package/v2Containers/Templates/sagas.js +98 -55
- package/v2Containers/Templates/selectors.js +12 -0
- package/v2Containers/Templates/tests/ChannelTypeIllustration.test.js +12 -0
- package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +1256 -1042
- package/v2Containers/Templates/tests/index.test.js +6 -0
- package/v2Containers/Templates/tests/reducer.test.js +178 -0
- package/v2Containers/Templates/tests/sagas.test.js +436 -200
- package/v2Containers/Templates/tests/selector.test.js +32 -0
- package/v2Containers/TemplatesV2/TemplatesV2.style.js +1 -72
- package/v2Containers/TemplatesV2/index.js +23 -86
- package/v2Containers/Whatsapp/index.js +20 -3
- 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/templateVarUtils.test.js +0 -204
- package/v2Components/CommonTestAndPreview/UnifiedPreview/RcsPreviewContent.js.rej +0 -18
- package/v2Components/CommonTestAndPreview/previewApiUtils.js +0 -59
- package/v2Components/CommonTestAndPreview/tests/previewApiUtils.test.js +0 -67
- package/v2Components/SmsFallback/SmsFallbackLocalSelector.js +0 -87
- package/v2Components/SmsFallback/constants.js +0 -73
- package/v2Components/SmsFallback/index.js +0 -955
- package/v2Components/SmsFallback/index.scss +0 -265
- package/v2Components/SmsFallback/messages.js +0 -78
- package/v2Components/SmsFallback/smsFallbackUtils.js +0 -118
- 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 -197
- package/v2Components/SmsFallback/tests/smsFallbackUtils.test.js +0 -277
- 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 -43
- package/v2Containers/CreativesContainer/embeddedSlideboxUtils.js +0 -67
- 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/index.js.rej +0 -1336
- package/v2Containers/Rcs/index.scss.rej +0 -74
- package/v2Containers/Rcs/rcsLibraryHydrationUtils.js +0 -225
- package/v2Containers/Rcs/tests/__snapshots__/utils.test.js.snap.rej +0 -128
- 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 -121
- 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 () => {
|
|
@@ -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
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,
|
|
@@ -88,31 +74,10 @@ export const RCS_MEDIA_TYPES = {
|
|
|
88
74
|
VIDEO: 'VIDEO',
|
|
89
75
|
};
|
|
90
76
|
|
|
91
|
-
|
|
92
|
-
export const
|
|
93
|
-
/** True when the whole string is a single RCS/mustache token (used when testing segment tokens). */
|
|
94
|
-
export const rcsVarTestRegex = /^\{\{[^}]+\}\}$/;
|
|
95
|
-
|
|
96
|
-
/** Matches all `{{N}}` numeric-index variable tokens in a template string (global). */
|
|
97
|
-
export const RCS_NUMERIC_VAR_TOKEN_REGEX = /\{\{(\d+)\}\}/g;
|
|
98
|
-
/** `cardVarMapped` slot keys that are numeric only (legacy ordering). */
|
|
99
|
-
export const RCS_NUMERIC_VAR_NAME_REGEX = /^\d+$/;
|
|
100
|
-
/** Semantic Liquid-style keys on RCS `cardVarMapped` (same class as `{{…}}` inner names in the editor). */
|
|
101
|
-
export const RCS_CARD_VAR_MAPPED_SEMANTIC_KEY_REGEX = /^[\w.]+$/;
|
|
102
|
-
/** Escape `RegExp` metacharacters when building a pattern from user/tag text. */
|
|
103
|
-
export const RCS_REGEX_META_CHARS_PATTERN = /[.*+?^${}()|[\]\\]/g;
|
|
104
|
-
/** Entire string is a single `{{tag}}` token (value still a placeholder). */
|
|
105
|
-
export const RCS_SINGLE_MUSTACHE_PLACEHOLDER_REGEX = /^\{\{[^}]+\}\}$/;
|
|
106
|
-
/** Strip leading `{{` and trailing `}}` from a token. */
|
|
107
|
-
export const RCS_STRIP_MUSTACHE_DELIMITERS_REGEX = /^\{\{|\}\}$/g;
|
|
108
|
-
|
|
109
|
-
/** Tag-popover target: title vs description field (matches `onTagSelect` `field` argument). */
|
|
110
|
-
export const RCS_TAG_AREA_FIELD_TITLE = 'title';
|
|
111
|
-
export const RCS_TAG_AREA_FIELD_DESC = 'desc';
|
|
112
|
-
|
|
77
|
+
export const rcsVarRegex = /\{\{\w+\}\}/g;
|
|
78
|
+
export const rcsVarTestRegex = /\{\{\w+\}\}/;
|
|
113
79
|
export const TEMPLATE_DESC_MAX_LENGTH = 2500;
|
|
114
|
-
|
|
115
|
-
export const FALLBACK_MESSAGE_MAX_LENGTH = TEMPLATE_MESSAGE_MAX_LENGTH;
|
|
80
|
+
export const FALLBACK_MESSAGE_MAX_LENGTH = 160;
|
|
116
81
|
export const TEMPLATE_TITLE_MAX_LENGTH = 200;
|
|
117
82
|
export const TEMPLATE_BUTTON_TEXT_MAX_LENGTH = 25;
|
|
118
83
|
export const CTA = 'CTA';
|
|
@@ -127,12 +92,10 @@ export const ALLOWED_IMAGE_EXTENSIONS_REGEX = (/\.(png|jpg|jpeg|gif)$/i);
|
|
|
127
92
|
export const RCS_IMG_WIDTH = 1440;
|
|
128
93
|
export const RCS_IMG_HEIGHT = 1024;
|
|
129
94
|
export const RCS_IMG_SIZE = 2000000; // 2MB
|
|
130
|
-
export const RCS_CAROUSEL_IMG_SIZE = 1 * 1024 * 1024; // 1MB
|
|
131
95
|
export const MAX_FILE_SIZE_MB = 10;
|
|
132
96
|
export const MAX_FILE_SIZE_BYTES = MAX_FILE_SIZE_MB * 1024 * 1024;
|
|
133
97
|
export const ALLOWED_EXTENSIONS_VIDEO_REGEX = (/\.(mp4)$/i);
|
|
134
98
|
export const RCS_VIDEO_SIZE = 10 * 1024 * 1024;
|
|
135
|
-
export const RCS_CAROUSEL_VIDEO_SIZE = 5 * 1024 * 1024; // 5MB
|
|
136
99
|
export const RCS_THUMBNAIL_MIN_SIZE = 40 * 1024;
|
|
137
100
|
export const RCS_THUMBNAIL_MAX_SIZE = 100 * 1024;
|
|
138
101
|
|
|
@@ -179,31 +142,6 @@ export const RCS_IMAGE_DIMENSIONS = {
|
|
|
179
142
|
},
|
|
180
143
|
};
|
|
181
144
|
|
|
182
|
-
// Carousel image dimensions (pixel values shown in UI). Keys follow `${HEIGHT}_${WIDTH}`.
|
|
183
|
-
// HEIGHT: SHORT|MEDIUM, WIDTH: SMALL|MEDIUM
|
|
184
|
-
export const RCS_CAROUSEL_IMAGE_DIMENSIONS = {
|
|
185
|
-
SHORT_SMALL: {
|
|
186
|
-
width: 1160,
|
|
187
|
-
height: 720,
|
|
188
|
-
description: 'Image (1160 x 720)',
|
|
189
|
-
},
|
|
190
|
-
SHORT_MEDIUM: {
|
|
191
|
-
width: 1800,
|
|
192
|
-
height: 720,
|
|
193
|
-
description: 'Image (1800 x 720)',
|
|
194
|
-
},
|
|
195
|
-
MEDIUM_SMALL: {
|
|
196
|
-
width: 770,
|
|
197
|
-
height: 720,
|
|
198
|
-
description: 'Image (770 x 720)',
|
|
199
|
-
},
|
|
200
|
-
MEDIUM_MEDIUM: {
|
|
201
|
-
width: 1280,
|
|
202
|
-
height: 720,
|
|
203
|
-
description: 'Image (1280 x 720)',
|
|
204
|
-
},
|
|
205
|
-
};
|
|
206
|
-
|
|
207
145
|
export const RCS_VIDEO_THUMBNAIL_DIMENSIONS = {
|
|
208
146
|
SHORT_HEIGHT: {
|
|
209
147
|
width: 770,
|
|
@@ -211,8 +149,6 @@ export const RCS_VIDEO_THUMBNAIL_DIMENSIONS = {
|
|
|
211
149
|
type: 'SHORT_HEIGHT',
|
|
212
150
|
heightType: 'SHORT',
|
|
213
151
|
label: 'Vertical Short',
|
|
214
|
-
width: 1140,
|
|
215
|
-
height: 448,
|
|
216
152
|
description: 'Thumbnail (770 x 257)',
|
|
217
153
|
orientation: 'VERTICAL',
|
|
218
154
|
maxFileSize: 100 * 1024,
|
|
@@ -253,29 +189,6 @@ export const RCS_VIDEO_THUMBNAIL_DIMENSIONS = {
|
|
|
253
189
|
},
|
|
254
190
|
};
|
|
255
191
|
|
|
256
|
-
// Carousel thumbnail dimensions for video cards (pixel values shown in UI).
|
|
257
|
-
// Keys follow `${HEIGHT}_${WIDTH}`.
|
|
258
|
-
// Human-readable labels: formatMessage(messages.rcsCarouselVideoThumbnailLabel, { width, height })
|
|
259
|
-
// or formatRcsCarouselVideoThumbnailLabel(formatMessage, entry) from ./utils.
|
|
260
|
-
export const RCS_CAROUSEL_VIDEO_THUMBNAIL_DIMENSIONS = {
|
|
261
|
-
SHORT_SMALL: {
|
|
262
|
-
width: 718,
|
|
263
|
-
height: 448,
|
|
264
|
-
},
|
|
265
|
-
SHORT_MEDIUM: {
|
|
266
|
-
width: 1140,
|
|
267
|
-
height: 448,
|
|
268
|
-
},
|
|
269
|
-
MEDIUM_SMALL: {
|
|
270
|
-
width: 480,
|
|
271
|
-
height: 448,
|
|
272
|
-
},
|
|
273
|
-
MEDIUM_MEDIUM: {
|
|
274
|
-
width: 796,
|
|
275
|
-
height: 448,
|
|
276
|
-
},
|
|
277
|
-
};
|
|
278
|
-
|
|
279
192
|
const prefix = 'app/v2Containers/Rcs';
|
|
280
193
|
export const UPLOAD_RCS_ASSET_REQUEST = `${prefix}/UPLOAD_RCS_ASSET_REQUEST`;
|
|
281
194
|
export const UPLOAD_RCS_ASSET_SUCCESS = `${prefix}/UPLOAD_RCS_ASSET_SUCCESS`;
|
|
@@ -302,7 +215,6 @@ export const CLEAR_EDIT_RESPONSE_REQUEST = `${prefix}/Edit/CLEAR_EDIT_RESPONSE_R
|
|
|
302
215
|
export const AI_CONTENT_BOT_DISABLED = "AI_CONTENT_BOT_DISABLED";
|
|
303
216
|
|
|
304
217
|
export const RCS_TEXT_MESSAGE_MAX_LENGTH = 160;
|
|
305
|
-
export const RCS_TEXT_MESSAGE_MAX_LENGTH_INFOBIP = 3072;
|
|
306
218
|
export const RCS_RICH_CARD_MAX_LENGTH = 2000;
|
|
307
219
|
export const MAX_BUTTONS = 4;
|
|
308
220
|
|
|
@@ -338,26 +250,3 @@ export const RCS_BUTTON_TYPES = {
|
|
|
338
250
|
PHONE_NUMBER: 'PHONE_NUMBER',
|
|
339
251
|
CTA: 'CTA',
|
|
340
252
|
};
|
|
341
|
-
|
|
342
|
-
/** Default action row for carousel card 1 (mandatory button UX): phone CTA, unsaved until user completes + Save. */
|
|
343
|
-
export const RCS_CAROUSEL_FIRST_CARD_DEFAULT_SUGGESTIONS = [
|
|
344
|
-
{
|
|
345
|
-
index: 0,
|
|
346
|
-
type: RCS_BUTTON_TYPES.PHONE_NUMBER,
|
|
347
|
-
text: '',
|
|
348
|
-
phoneNumber: '',
|
|
349
|
-
url: null,
|
|
350
|
-
postback: '',
|
|
351
|
-
isSaved: false,
|
|
352
|
-
},
|
|
353
|
-
];
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
export const CAROUSEL_HEIGHT_OPTIONS = [
|
|
357
|
-
{ value: 'SHORT', label: 'Short' },
|
|
358
|
-
{ value: 'MEDIUM', label: 'Medium' },
|
|
359
|
-
];
|
|
360
|
-
export const CAROUSEL_WIDTH_OPTIONS = [
|
|
361
|
-
{ value: 'SMALL', label: 'Small' },
|
|
362
|
-
{ value: 'MEDIUM', label: 'Medium' },
|
|
363
|
-
];
|