@capillarytech/creatives-library 8.0.87-alpha.2 → 8.0.87-alpha.20

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 (41) hide show
  1. package/initialState.js +1 -0
  2. package/package.json +1 -1
  3. package/services/api.js +9 -10
  4. package/utils/transformerUtils.js +509 -0
  5. package/v2Components/CapWhatsappCTA/messages.js +0 -4
  6. package/v2Components/FormBuilder/index.js +7 -3
  7. package/v2Components/TemplatePreview/_templatePreview.scss +0 -9
  8. package/v2Components/TemplatePreview/index.js +104 -169
  9. package/v2Containers/Cap/actions.js +8 -0
  10. package/v2Containers/Cap/constants.js +4 -0
  11. package/v2Containers/Cap/reducer.js +6 -0
  12. package/v2Containers/Cap/sagas.js +23 -0
  13. package/v2Containers/Cap/selectors.js +6 -0
  14. package/v2Containers/Cap/tests/__snapshots__/index.test.js.snap +1 -0
  15. package/v2Containers/CreativesContainer/SlideBoxContent.js +11 -1
  16. package/v2Containers/CreativesContainer/constants.js +3 -0
  17. package/v2Containers/CreativesContainer/index.js +77 -88
  18. package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +25 -0
  19. package/v2Containers/CreativesContainer/tests/index.test.js +2 -0
  20. package/v2Containers/Email/index.js +1 -0
  21. package/v2Containers/EmailWrapper/index.js +2 -0
  22. package/v2Containers/MobilePush/Create/index.js +1 -0
  23. package/v2Containers/MobilePush/Edit/index.js +1 -0
  24. package/v2Containers/MobilepushWrapper/index.js +2 -1
  25. package/v2Containers/Sms/Create/index.js +1 -0
  26. package/v2Containers/Sms/Edit/index.js +1 -0
  27. package/v2Containers/SmsWrapper/index.js +2 -0
  28. package/v2Containers/Templates/_templates.scss +0 -35
  29. package/v2Containers/Templates/index.js +5 -64
  30. package/v2Containers/TemplatesV2/index.js +7 -0
  31. package/v2Containers/Whatsapp/constants.js +1 -83
  32. package/v2Containers/Whatsapp/index.js +182 -709
  33. package/v2Containers/Whatsapp/index.scss +1 -52
  34. package/v2Containers/Whatsapp/messages.js +2 -38
  35. package/v2Containers/Whatsapp/utils.js +0 -34
  36. package/v2Containers/mockdata.js +3 -0
  37. package/v2Components/CapWhatsappCarouselButton/constant.js +0 -51
  38. package/v2Components/CapWhatsappCarouselButton/index.js +0 -446
  39. package/v2Components/CapWhatsappCarouselButton/index.scss +0 -39
  40. package/v2Components/TemplatePreview/assets/images/empty_image_preview.svg +0 -4
  41. package/v2Components/TemplatePreview/assets/images/empty_video_preview.svg +0 -4
@@ -54,56 +54,6 @@ export const WHATSAPP_CATEGORIES = {
54
54
  transactional: 'TRANSACTIONAL',
55
55
  };
56
56
 
57
- export const mediaTypeOptions = ({host, templateCategory}) => {
58
- return [
59
- {
60
- key: 'TEXT',
61
- value: WHATSAPP_MEDIA_TYPES.TEXT,
62
- label: <FormattedMessage {...messages.none} />,
63
- tagColor: CAP_PURPLE03,
64
- tagTextColor: CAP_PURPLE02,
65
- },
66
- ...(host === HOST_TWILIO
67
- ? []
68
- : [
69
- {
70
- key: 'IMAGE',
71
- value: WHATSAPP_MEDIA_TYPES.IMAGE,
72
- label: <FormattedMessage {...messages.mediaImage} />,
73
- tagColor: CAP_ORANGE01,
74
- tagTextColor: CAP_ORANGE,
75
- },
76
- {
77
- key: 'VIDEO',
78
- value: WHATSAPP_MEDIA_TYPES.VIDEO,
79
- label: <FormattedMessage {...messages.mediaVideo} />,
80
- tagColor: CAP_GREEN02,
81
- tagTextColor: CAP_GREEN01,
82
- },
83
- ...(templateCategory === WHATSAPP_CATEGORIES.marketing
84
- ? [
85
- {
86
- key: 'CAROUSEL',
87
- value: WHATSAPP_MEDIA_TYPES.CAROUSEL,
88
- label: <FormattedMessage {...messages.mediaCarousel} />,
89
- tagColor: CAP_PURPLE03,
90
- tagTextColor: CAP_PURPLE02,
91
- },
92
- ]
93
- : []
94
- ),
95
- {
96
- key: 'DOCUMENT',
97
- value: WHATSAPP_MEDIA_TYPES.DOCUMENT,
98
- label: <FormattedMessage {...messages.mediaDocument} />,
99
- tagColor: CAP_ORANGE01,
100
- tagTextColor: CAP_ORANGE,
101
- },
102
- ]
103
- ),
104
- ];
105
- };
106
-
107
57
  export const KARIX_GUPSHUP_CATEGORY_OPTIONS = [
108
58
  {
109
59
  key: 'utility',
@@ -262,17 +212,14 @@ export const WHATSAPP_MEDIA_TYPES = {
262
212
  IMAGE: 'IMAGE',
263
213
  VIDEO: 'VIDEO',
264
214
  DOCUMENT: 'DOCUMENT',
265
- CAROUSEL: 'CAROUSEL',
266
215
  };
267
216
  export const NONE = 'NONE';
268
217
  export const CTA = 'CTA';
269
218
  export const QUICK_REPLY = 'QUICK_REPLY';
270
219
  export const HEADER_TEXT = 'header';
271
220
  export const FOOTER_TEXT = 'footer';
272
- export const CAROUSEL_TEXT = 'carouselText';
273
221
  export const MESSAGE_TEXT = 'message';
274
- export const BODY_TEXT = 'body';
275
- export const BUTTON_TEXT = 'buttonText';
222
+ export const BUTTON_TEXT = 'buttonText'
276
223
  export const WHATSAPP_BUTTON_TYPES = {
277
224
  NONE,
278
225
  CTA,
@@ -611,35 +558,6 @@ export const LANGUAGE_OPTIONS = [
611
558
  },
612
559
  ];
613
560
 
614
- export const carouselMediaOptions = [
615
- {
616
- value: 'image',
617
- label: <FormattedMessage {...messages.mediaImage} />,
618
- },
619
- {
620
- value: 'video',
621
- label: <FormattedMessage {...messages.mediaVideo} />,
622
- },
623
- ];
624
-
625
- export const CAROUSEL_INITIAL_DATA = [{
626
- mediaType: '',
627
- bodyText: '',
628
- bodyError: '',
629
- addedVarCount: 0,
630
- buttons: [
631
- {
632
- buttonType: PHONE_NUMBER,
633
- text: '',
634
- phone_number: '',
635
- isSaved: false,
636
- textError: '',
637
- },
638
- ],
639
- }];
640
-
641
- export const MAX_CAROUSEL_ALLOWED = 10;
642
-
643
561
  export const OTP_CONFIG_URI = "/org/setup/configurations/OTPConfigurations";
644
562
  export const AI_CONTENT_BOT_DISABLED = "AI_CONTENT_BOT_DISABLED";
645
563
  export const CORRECT_TEMPLATE_FORMAT_URL = "https://developers.facebook.com/docs/whatsapp/updates-to-pricing/new-template-guidelines";