@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.
Files changed (75) hide show
  1. package/package.json +1 -1
  2. package/utils/tests/tagValidations.test.js +20 -0
  3. package/v2Components/CapActionButton/constants.js +7 -0
  4. package/v2Components/CapActionButton/index.js +167 -109
  5. package/v2Components/CapActionButton/index.scss +157 -6
  6. package/v2Components/CapActionButton/messages.js +19 -3
  7. package/v2Components/CapActionButton/tests/index.test.js +41 -17
  8. package/v2Components/CapTagList/index.js +28 -23
  9. package/v2Components/CapTagList/style.scss +29 -0
  10. package/v2Components/CapTagListWithInput/__tests__/CapTagListWithInput.test.js +63 -0
  11. package/v2Components/CapTagListWithInput/index.js +4 -0
  12. package/v2Components/CapWhatsappCTA/index.js +2 -0
  13. package/v2Components/CommonTestAndPreview/ExistingCustomerModal.js +1 -0
  14. package/v2Components/CommonTestAndPreview/UnifiedPreview/RcsPreviewContent.js +160 -15
  15. package/v2Components/CommonTestAndPreview/UnifiedPreview/RcsPreviewContent.js.rej +18 -0
  16. package/v2Components/CommonTestAndPreview/UnifiedPreview/_unifiedPreview.scss +323 -77
  17. package/v2Components/CommonTestAndPreview/messages.js +8 -0
  18. package/v2Components/CommonTestAndPreview/reducer.js +3 -1
  19. package/v2Components/CommonTestAndPreview/sagas.js +2 -1
  20. package/v2Components/CommonTestAndPreview/tests/PreviewSection.test.js +8 -1
  21. package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/RcsPreviewContent.test.js +281 -283
  22. package/v2Components/FormBuilder/index.js +1 -0
  23. package/v2Components/HtmlEditor/HTMLEditor.js +6 -1
  24. package/v2Components/HtmlEditor/__tests__/HTMLEditor.apiErrors.test.js +1 -0
  25. package/v2Components/HtmlEditor/__tests__/HTMLEditor.test.js +927 -2
  26. package/v2Components/HtmlEditor/components/CodeEditorPane/index.js +3 -0
  27. package/v2Components/TemplatePreview/_templatePreview.scss +33 -23
  28. package/v2Components/TemplatePreview/constants.js +2 -0
  29. package/v2Components/TemplatePreview/index.js +143 -28
  30. package/v2Components/TemplatePreview/tests/index.test.js +142 -0
  31. package/v2Components/mockdata.js +1 -0
  32. package/v2Containers/BeeEditor/index.js +19 -1
  33. package/v2Containers/CreativesContainer/SlideBoxContent.js +28 -1
  34. package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +5 -0
  35. package/v2Containers/Email/index.js +78 -39
  36. package/v2Containers/Email/reducer.js +2 -2
  37. package/v2Containers/Email/sagas.js +3 -1
  38. package/v2Containers/Email/tests/__snapshots__/reducer.test.js.snap +2 -2
  39. package/v2Containers/Email/tests/sagas.test.js +230 -0
  40. package/v2Containers/EmailWrapper/components/EmailHTMLEditor.js +6 -1
  41. package/v2Containers/EmailWrapper/components/EmailWrapperView.js +3 -0
  42. package/v2Containers/EmailWrapper/components/__tests__/EmailHTMLEditor.test.js +20 -2
  43. package/v2Containers/EmailWrapper/components/__tests__/EmailWrapperView.test.js +16 -1
  44. package/v2Containers/EmailWrapper/hooks/useEmailWrapper.js +3 -1
  45. package/v2Containers/EmailWrapper/index.js +4 -0
  46. package/v2Containers/EmailWrapper/tests/useEmailWrapper.edgeCases.test.js +1 -0
  47. package/v2Containers/EmailWrapper/tests/useEmailWrapper.test.js +9 -0
  48. package/v2Containers/InAppWrapper/hooks/__tests__/useInAppWrapper.test.js +1 -0
  49. package/v2Containers/MobilePush/Create/index.js +2 -0
  50. package/v2Containers/MobilePush/Edit/index.js +2 -0
  51. package/v2Containers/MobilepushWrapper/index.js +3 -1
  52. package/v2Containers/Rcs/constants.js +79 -5
  53. package/v2Containers/Rcs/index.js +1374 -73
  54. package/v2Containers/Rcs/index.js.rej +1336 -0
  55. package/v2Containers/Rcs/index.scss +191 -0
  56. package/v2Containers/Rcs/index.scss.rej +74 -0
  57. package/v2Containers/Rcs/messages.js +26 -1
  58. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +69173 -118166
  59. package/v2Containers/Rcs/tests/__snapshots__/utils.test.js.snap.rej +128 -0
  60. package/v2Containers/Rcs/tests/index.test.js +132 -94
  61. package/v2Containers/Rcs/tests/utils.test.js +220 -38
  62. package/v2Containers/Rcs/utils.js +77 -1
  63. package/v2Containers/Sms/Edit/index.js +2 -0
  64. package/v2Containers/SmsWrapper/index.js +2 -0
  65. package/v2Containers/TagList/index.js +73 -20
  66. package/v2Containers/TagList/messages.js +4 -0
  67. package/v2Containers/TagList/tests/TagList.test.js +124 -20
  68. package/v2Containers/TagList/tests/mockdata.js +17 -0
  69. package/v2Containers/Templates/_templates.scss +99 -0
  70. package/v2Containers/Templates/index.js +29 -14
  71. package/v2Containers/Viber/index.js +3 -0
  72. package/v2Containers/WebPush/Create/hooks/useTagManagement.js +0 -2
  73. package/v2Containers/WebPush/Create/index.js +10 -2
  74. package/v2Containers/Whatsapp/index.js +5 -0
  75. package/v2Containers/Zalo/index.js +2 -0
@@ -34,6 +34,9 @@ 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
+
37
40
  export const contentType = {
38
41
  text_message: 'text_message',
39
42
  rich_card: 'rich_card',
@@ -57,11 +60,6 @@ export const CHANNELS = [
57
60
  ];
58
61
 
59
62
  export const STATUS_OPTIONS = [
60
- // {
61
- // key: 'created',
62
- // value: RCS_STATUSES.awaitingApproval,
63
- // label: <FormattedMessage {...messages.created} />,
64
- // },
65
63
  {
66
64
  key: 'approved',
67
65
  value: RCS_STATUSES.approved,
@@ -129,10 +127,12 @@ export const ALLOWED_IMAGE_EXTENSIONS_REGEX = (/\.(png|jpg|jpeg|gif)$/i);
129
127
  export const RCS_IMG_WIDTH = 1440;
130
128
  export const RCS_IMG_HEIGHT = 1024;
131
129
  export const RCS_IMG_SIZE = 2000000; // 2MB
130
+ export const RCS_CAROUSEL_IMG_SIZE = 1 * 1024 * 1024; // 1MB
132
131
  export const MAX_FILE_SIZE_MB = 10;
133
132
  export const MAX_FILE_SIZE_BYTES = MAX_FILE_SIZE_MB * 1024 * 1024;
134
133
  export const ALLOWED_EXTENSIONS_VIDEO_REGEX = (/\.(mp4)$/i);
135
134
  export const RCS_VIDEO_SIZE = 10 * 1024 * 1024;
135
+ export const RCS_CAROUSEL_VIDEO_SIZE = 5 * 1024 * 1024; // 5MB
136
136
  export const RCS_THUMBNAIL_MIN_SIZE = 40 * 1024;
137
137
  export const RCS_THUMBNAIL_MAX_SIZE = 100 * 1024;
138
138
 
@@ -179,6 +179,31 @@ export const RCS_IMAGE_DIMENSIONS = {
179
179
  },
180
180
  };
181
181
 
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
+
182
207
  export const RCS_VIDEO_THUMBNAIL_DIMENSIONS = {
183
208
  SHORT_HEIGHT: {
184
209
  width: 770,
@@ -186,6 +211,8 @@ export const RCS_VIDEO_THUMBNAIL_DIMENSIONS = {
186
211
  type: 'SHORT_HEIGHT',
187
212
  heightType: 'SHORT',
188
213
  label: 'Vertical Short',
214
+ width: 1140,
215
+ height: 448,
189
216
  description: 'Thumbnail (770 x 257)',
190
217
  orientation: 'VERTICAL',
191
218
  maxFileSize: 100 * 1024,
@@ -226,6 +253,29 @@ export const RCS_VIDEO_THUMBNAIL_DIMENSIONS = {
226
253
  },
227
254
  };
228
255
 
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
+
229
279
  const prefix = 'app/v2Containers/Rcs';
230
280
  export const UPLOAD_RCS_ASSET_REQUEST = `${prefix}/UPLOAD_RCS_ASSET_REQUEST`;
231
281
  export const UPLOAD_RCS_ASSET_SUCCESS = `${prefix}/UPLOAD_RCS_ASSET_SUCCESS`;
@@ -252,6 +302,7 @@ export const CLEAR_EDIT_RESPONSE_REQUEST = `${prefix}/Edit/CLEAR_EDIT_RESPONSE_R
252
302
  export const AI_CONTENT_BOT_DISABLED = "AI_CONTENT_BOT_DISABLED";
253
303
 
254
304
  export const RCS_TEXT_MESSAGE_MAX_LENGTH = 160;
305
+ export const RCS_TEXT_MESSAGE_MAX_LENGTH_INFOBIP = 3072;
255
306
  export const RCS_RICH_CARD_MAX_LENGTH = 2000;
256
307
  export const MAX_BUTTONS = 4;
257
308
 
@@ -287,3 +338,26 @@ export const RCS_BUTTON_TYPES = {
287
338
  PHONE_NUMBER: 'PHONE_NUMBER',
288
339
  CTA: 'CTA',
289
340
  };
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
+ ];