@capillarytech/creatives-library 9.2.2-alpha.sprint-cap-214249.44 → 9.2.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 (89) hide show
  1. package/constants/unified.js +1 -3
  2. package/package.json +1 -1
  3. package/translations/en.json +0 -1
  4. package/translations/ja-JP.json +0 -1
  5. package/translations/zh.json +0 -1
  6. package/utils/common.js +6 -0
  7. package/utils/createMobilePushPayload.js +56 -50
  8. package/utils/tagValidations.js +4 -35
  9. package/utils/tests/createMobilePushPayload.test.js +168 -177
  10. package/utils/tests/tagValidations.test.js +0 -48
  11. package/v2Components/CapMpushCTA/index.js +57 -47
  12. package/v2Components/CapMpushCTA/index.scss +5 -43
  13. package/v2Components/CapTagList/index.js +7 -46
  14. package/v2Components/CapTagList/messages.js +0 -44
  15. package/v2Components/CapTagList/style.scss +1 -113
  16. package/v2Components/CommonTestAndPreview/UnifiedPreview/MobilePushPreviewContent.js +8 -11
  17. package/v2Components/CommonTestAndPreview/UnifiedPreview/_unifiedPreview.scss +1 -13
  18. package/v2Components/CommonTestAndPreview/constants.js +0 -2
  19. package/v2Components/CommonTestAndPreview/index.js +12 -51
  20. package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/MobilePushPreviewContent.test.js +5 -83
  21. package/v2Components/CommonTestAndPreview/tests/index.test.js +0 -100
  22. package/v2Components/FormBuilder/Classic.js +14 -24
  23. package/v2Components/FormBuilder/Functional/channels/mobilepush/config.js +0 -1
  24. package/v2Components/FormBuilder/Functional/channels/mobilepush/getEditorErrorDescriptor.js +1 -1
  25. package/v2Components/FormBuilder/Functional/channels/mobilepush/tests/validate.test.js +0 -57
  26. package/v2Components/FormBuilder/Functional/channels/mobilepush/validate.js +4 -4
  27. package/v2Components/FormBuilder/Functional/channels/sms/getEditorErrorDescriptor.js +0 -3
  28. package/v2Components/FormBuilder/Functional/channels/sms/tests/getEditorErrorDescriptor.test.js +0 -5
  29. package/v2Components/FormBuilder/Functional/channels/sms/tests/validate.test.js +0 -6
  30. package/v2Components/FormBuilder/Functional/channels/sms/validate.js +1 -3
  31. package/v2Components/FormBuilder/Functional/renderers/mpushRenderers.js +0 -3
  32. package/v2Components/FormBuilder/Functional/tests/mpushRenderers.test.js +0 -22
  33. package/v2Components/MobilePushPreviewV2/index.js +9 -22
  34. package/v2Components/TemplatePreview/_templatePreview.scss +2 -18
  35. package/v2Components/TemplatePreview/index.js +18 -20
  36. package/v2Components/TemplatePreview/tests/index.test.js +0 -69
  37. package/v2Containers/Cap/messages.js +0 -4
  38. package/v2Containers/Cap/tests/__snapshots__/index.test.js.snap +0 -1
  39. package/v2Containers/CommunicationFlow/steps/ChannelSelectionStep/extractContentForPreview.js +2 -12
  40. package/v2Containers/CreativesContainer/SlideBoxContent.js +6 -4
  41. package/v2Containers/CreativesContainer/index.js +1 -2
  42. package/v2Containers/CreativesContainer/tests/SlideBoxContent.test.js +0 -43
  43. package/v2Containers/InApp/index.js +1 -4
  44. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +0 -3
  45. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +0 -2
  46. package/v2Containers/Line/Container/Text/index.js +1 -3
  47. package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +0 -16
  48. package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +0 -18
  49. package/v2Containers/MobilePushNew/components/CtaButtons.js +47 -52
  50. package/v2Containers/MobilePushNew/components/MediaUploaders.js +345 -105
  51. package/v2Containers/MobilePushNew/components/PlatformContentFields.js +105 -127
  52. package/v2Containers/MobilePushNew/components/tests/CtaButtons.test.js +208 -30
  53. package/v2Containers/MobilePushNew/components/tests/MediaUploaders.test.js +1484 -307
  54. package/v2Containers/MobilePushNew/components/tests/PlatformContentFields.test.js +59 -165
  55. package/v2Containers/MobilePushNew/constants.js +0 -12
  56. package/v2Containers/MobilePushNew/hooks/tests/usePlatformSync.test.js +1 -63
  57. package/v2Containers/MobilePushNew/hooks/tests/useUpload.test.js +0 -78
  58. package/v2Containers/MobilePushNew/hooks/usePlatformSync.js +1 -40
  59. package/v2Containers/MobilePushNew/hooks/useUpload.js +46 -42
  60. package/v2Containers/MobilePushNew/index.js +290 -502
  61. package/v2Containers/MobilePushNew/index.scss +4 -151
  62. package/v2Containers/MobilePushNew/messages.js +6 -106
  63. package/v2Containers/MobilePushNew/tests/index.test.js +1 -483
  64. package/v2Containers/MobilePushNew/tests/utils.test.js +0 -110
  65. package/v2Containers/MobilePushNew/utils.js +0 -83
  66. package/v2Containers/Rcs/index.js +1 -8
  67. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +0 -59
  68. package/v2Containers/SmsTrai/Create/tests/__snapshots__/index.test.js.snap +0 -4
  69. package/v2Containers/SmsTrai/Edit/index.js +5 -13
  70. package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +0 -15
  71. package/v2Containers/Templates/_templates.scss +2 -10
  72. package/v2Containers/Templates/index.js +81 -86
  73. package/v2Containers/Templates/tests/index.test.js +0 -81
  74. package/v2Containers/Viber/index.js +1 -3
  75. package/v2Containers/WebPush/Create/utils/validation.js +0 -6
  76. package/v2Containers/WebPush/Create/utils/validation.test.js +0 -50
  77. package/v2Containers/Whatsapp/index.js +5 -9
  78. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +2 -2
  79. package/v2Containers/Zalo/index.js +1 -4
  80. package/v2Components/CapMpushCTA/tests/index.test.js +0 -150
  81. package/v2Components/CapTagList/TagFallbackPanel.js +0 -124
  82. package/v2Components/CapTagList/constants.js +0 -5
  83. package/v2Components/CapTagList/tests/TagFallback.test.js +0 -222
  84. package/v2Components/CapTagList/utils.js +0 -17
  85. package/v2Components/MobilePushPreviewV2/_mobilePushPreviewV2.scss +0 -7
  86. package/v2Components/MobilePushPreviewV2/tests/index.test.js +0 -55
  87. package/v2Components/TemplatePreview/_mobilePushPhone.scss +0 -72
  88. package/v2Containers/CommunicationFlow/steps/ChannelSelectionStep/Tests/extractContentForPreview.test.js +0 -45
  89. package/v2Containers/MobilePushNew/components/TapLinkActions.js +0 -76
@@ -341,7 +341,6 @@ exports[`line wrapper test/> should render create mode 1`] = `
341
341
  "creatives.componentsV2.TopBar.profile": "Profile",
342
342
  "creatives.componentsV2.TopBar.settings": "Settings",
343
343
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
344
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
345
344
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
346
345
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
347
346
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -10996,7 +10995,6 @@ new message content.",
10996
10995
  "creatives.componentsV2.TopBar.profile": "Profile",
10997
10996
  "creatives.componentsV2.TopBar.settings": "Settings",
10998
10997
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
10999
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
11000
10998
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
11001
10999
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
11002
11000
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -13543,7 +13541,6 @@ new message content.",
13543
13541
  "creatives.componentsV2.TopBar.profile": "Profile",
13544
13542
  "creatives.componentsV2.TopBar.settings": "Settings",
13545
13543
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
13546
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
13547
13544
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
13548
13545
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
13549
13546
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -16563,7 +16560,6 @@ new message content.",
16563
16560
  "creatives.componentsV2.TopBar.profile": "Profile",
16564
16561
  "creatives.componentsV2.TopBar.settings": "Settings",
16565
16562
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
16566
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
16567
16563
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
16568
16564
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
16569
16565
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -18978,7 +18974,6 @@ exports[`line wrapper test/> should render create mode 2`] = `
18978
18974
  "creatives.componentsV2.TopBar.profile": "Profile",
18979
18975
  "creatives.componentsV2.TopBar.settings": "Settings",
18980
18976
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
18981
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
18982
18977
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
18983
18978
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
18984
18979
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -34049,7 +34044,6 @@ new message content.",
34049
34044
  "creatives.componentsV2.TopBar.profile": "Profile",
34050
34045
  "creatives.componentsV2.TopBar.settings": "Settings",
34051
34046
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
34052
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
34053
34047
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
34054
34048
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
34055
34049
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -36788,7 +36782,6 @@ new message content.",
36788
36782
  "creatives.componentsV2.TopBar.profile": "Profile",
36789
36783
  "creatives.componentsV2.TopBar.settings": "Settings",
36790
36784
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
36791
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
36792
36785
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
36793
36786
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
36794
36787
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -40084,7 +40077,6 @@ new message content.",
40084
40077
  "creatives.componentsV2.TopBar.profile": "Profile",
40085
40078
  "creatives.componentsV2.TopBar.settings": "Settings",
40086
40079
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
40087
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
40088
40080
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
40089
40081
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
40090
40082
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -42823,7 +42815,6 @@ new message content.",
42823
42815
  "creatives.componentsV2.TopBar.profile": "Profile",
42824
42816
  "creatives.componentsV2.TopBar.settings": "Settings",
42825
42817
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
42826
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
42827
42818
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
42828
42819
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
42829
42820
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -46673,7 +46664,6 @@ new message content.",
46673
46664
  "creatives.componentsV2.TopBar.profile": "Profile",
46674
46665
  "creatives.componentsV2.TopBar.settings": "Settings",
46675
46666
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
46676
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
46677
46667
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
46678
46668
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
46679
46669
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -49555,7 +49545,6 @@ new message content.",
49555
49545
  "creatives.componentsV2.TopBar.profile": "Profile",
49556
49546
  "creatives.componentsV2.TopBar.settings": "Settings",
49557
49547
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
49558
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
49559
49548
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
49560
49549
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
49561
49550
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -52455,7 +52444,6 @@ new message content.",
52455
52444
  "creatives.componentsV2.TopBar.profile": "Profile",
52456
52445
  "creatives.componentsV2.TopBar.settings": "Settings",
52457
52446
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
52458
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
52459
52447
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
52460
52448
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
52461
52449
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -55789,7 +55777,6 @@ new message content.",
55789
55777
  "creatives.componentsV2.TopBar.profile": "Profile",
55790
55778
  "creatives.componentsV2.TopBar.settings": "Settings",
55791
55779
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
55792
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
55793
55780
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
55794
55781
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
55795
55782
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -61973,7 +61960,6 @@ new message content.",
61973
61960
  "creatives.componentsV2.TopBar.profile": "Profile",
61974
61961
  "creatives.componentsV2.TopBar.settings": "Settings",
61975
61962
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
61976
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
61977
61963
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
61978
61964
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
61979
61965
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -64716,7 +64702,6 @@ new message content.",
64716
64702
  "creatives.componentsV2.TopBar.profile": "Profile",
64717
64703
  "creatives.componentsV2.TopBar.settings": "Settings",
64718
64704
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
64719
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
64720
64705
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
64721
64706
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
64722
64707
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -67305,7 +67290,6 @@ new message content.",
67305
67290
  "creatives.componentsV2.TopBar.profile": "Profile",
67306
67291
  "creatives.componentsV2.TopBar.settings": "Settings",
67307
67292
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
67308
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
67309
67293
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
67310
67294
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
67311
67295
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -341,7 +341,6 @@ exports[`line wrapper test/> should render line component new 1`] = `
341
341
  "creatives.componentsV2.TopBar.profile": "Profile",
342
342
  "creatives.componentsV2.TopBar.settings": "Settings",
343
343
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
344
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
345
344
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
346
345
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
347
346
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -6678,7 +6677,6 @@ new message content.",
6678
6677
  "creatives.componentsV2.TopBar.profile": "Profile",
6679
6678
  "creatives.componentsV2.TopBar.settings": "Settings",
6680
6679
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
6681
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
6682
6680
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
6683
6681
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
6684
6682
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -9439,7 +9437,6 @@ exports[`line wrapper test/> should render line component new 2`] = `
9439
9437
  "creatives.componentsV2.TopBar.profile": "Profile",
9440
9438
  "creatives.componentsV2.TopBar.settings": "Settings",
9441
9439
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
9442
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
9443
9440
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
9444
9441
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
9445
9442
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -15965,7 +15962,6 @@ new message content.",
15965
15962
  "creatives.componentsV2.TopBar.profile": "Profile",
15966
15963
  "creatives.componentsV2.TopBar.settings": "Settings",
15967
15964
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
15968
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
15969
15965
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
15970
15966
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
15971
15967
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -18726,7 +18722,6 @@ exports[`line wrapper test/> should render line component new 3`] = `
18726
18722
  "creatives.componentsV2.TopBar.profile": "Profile",
18727
18723
  "creatives.componentsV2.TopBar.settings": "Settings",
18728
18724
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
18729
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
18730
18725
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
18731
18726
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
18732
18727
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -25498,7 +25493,6 @@ new message content.",
25498
25493
  "creatives.componentsV2.TopBar.profile": "Profile",
25499
25494
  "creatives.componentsV2.TopBar.settings": "Settings",
25500
25495
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
25501
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
25502
25496
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
25503
25497
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
25504
25498
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -28317,7 +28311,6 @@ exports[`line wrapper test/> should render line component new 4`] = `
28317
28311
  "creatives.componentsV2.TopBar.profile": "Profile",
28318
28312
  "creatives.componentsV2.TopBar.settings": "Settings",
28319
28313
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
28320
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
28321
28314
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
28322
28315
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
28323
28316
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -37310,7 +37303,6 @@ new message content.",
37310
37303
  "creatives.componentsV2.TopBar.profile": "Profile",
37311
37304
  "creatives.componentsV2.TopBar.settings": "Settings",
37312
37305
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
37313
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
37314
37306
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
37315
37307
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
37316
37308
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -40129,7 +40121,6 @@ exports[`line wrapper test/> should render line component new 5`] = `
40129
40121
  "creatives.componentsV2.TopBar.profile": "Profile",
40130
40122
  "creatives.componentsV2.TopBar.settings": "Settings",
40131
40123
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
40132
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
40133
40124
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
40134
40125
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
40135
40126
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -49157,7 +49148,6 @@ new message content.",
49157
49148
  "creatives.componentsV2.TopBar.profile": "Profile",
49158
49149
  "creatives.componentsV2.TopBar.settings": "Settings",
49159
49150
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
49160
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
49161
49151
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
49162
49152
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
49163
49153
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -51976,7 +51966,6 @@ exports[`line wrapper test/> should render line component old 1`] = `
51976
51966
  "creatives.componentsV2.TopBar.profile": "Profile",
51977
51967
  "creatives.componentsV2.TopBar.settings": "Settings",
51978
51968
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
51979
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
51980
51969
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
51981
51970
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
51982
51971
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -56382,7 +56371,6 @@ new message content.",
56382
56371
  "creatives.componentsV2.TopBar.profile": "Profile",
56383
56372
  "creatives.componentsV2.TopBar.settings": "Settings",
56384
56373
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
56385
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
56386
56374
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
56387
56375
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
56388
56376
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -59741,7 +59729,6 @@ exports[`line wrapper test/> should render line component old 2`] = `
59741
59729
  "creatives.componentsV2.TopBar.profile": "Profile",
59742
59730
  "creatives.componentsV2.TopBar.settings": "Settings",
59743
59731
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
59744
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
59745
59732
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
59746
59733
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
59747
59734
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -64570,7 +64557,6 @@ new message content.",
64570
64557
  "creatives.componentsV2.TopBar.profile": "Profile",
64571
64558
  "creatives.componentsV2.TopBar.settings": "Settings",
64572
64559
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
64573
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
64574
64560
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
64575
64561
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
64576
64562
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -67929,7 +67915,6 @@ exports[`line wrapper test/> should render line component old 3`] = `
67929
67915
  "creatives.componentsV2.TopBar.profile": "Profile",
67930
67916
  "creatives.componentsV2.TopBar.settings": "Settings",
67931
67917
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
67932
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
67933
67918
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
67934
67919
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
67935
67920
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -73004,7 +72989,6 @@ new message content.",
73004
72989
  "creatives.componentsV2.TopBar.profile": "Profile",
73005
72990
  "creatives.componentsV2.TopBar.settings": "Settings",
73006
72991
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
73007
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
73008
72992
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
73009
72993
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
73010
72994
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -76421,7 +76405,6 @@ exports[`line wrapper test/> should render line component old 4`] = `
76421
76405
  "creatives.componentsV2.TopBar.profile": "Profile",
76422
76406
  "creatives.componentsV2.TopBar.settings": "Settings",
76423
76407
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
76424
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
76425
76408
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
76426
76409
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
76427
76410
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -81609,7 +81592,6 @@ new message content.",
81609
81592
  "creatives.componentsV2.TopBar.profile": "Profile",
81610
81593
  "creatives.componentsV2.TopBar.settings": "Settings",
81611
81594
  "creatives.componentsV2.unbalanacedCurlyBraces": "Invalid label, please close all curly braces",
81612
- "creatives.componentsV2.unquotedTagDefaultValue": "Invalid label, default value must be within quotes",
81613
81595
  "creatives.componentsv2.MobilePushPreviewV2.header": "This is the MobilePushPreviewV2 component !",
81614
81596
  "creatives.containers.Assets.Gallery.alphabetically": "Alphabetically",
81615
81597
  "creatives.containers.Assets.Gallery.assetDeleteFailed": "Image deletion failed.",
@@ -5,20 +5,16 @@ import CapRow from "@capillarytech/cap-ui-library/CapRow";
5
5
  import CapButton from "@capillarytech/cap-ui-library/CapButton";
6
6
  import CapIcon from "@capillarytech/cap-ui-library/CapIcon";
7
7
  import CapHeading from "@capillarytech/cap-ui-library/CapHeading";
8
- import CapLabel from "@capillarytech/cap-ui-library/CapLabel";
9
- // import CapTooltip from "@capillarytech/cap-ui-library/CapTooltip";
8
+ import CapTooltip from "@capillarytech/cap-ui-library/CapTooltip";
10
9
  import CapMpushCTA from "../../../v2Components/CapMpushCTA";
11
- import { PRIMARY, DEEP_LINK } from "../constants";
12
- // import { SECONDARY } from "../constants";
10
+ import { PRIMARY, SECONDARY, DEEP_LINK } from "../constants";
13
11
  import messages from "../messages";
14
12
 
15
- // Secondary button is commented out below: it needs backend support, so it is being revamped.
16
- // Restore the commented secondaryButton / setSecondaryButton props, state, handler and JSX together.
17
13
  const CtaButtons = ({
18
14
  primaryButton,
19
- // secondaryButton,
15
+ secondaryButton,
20
16
  setPrimaryButton,
21
- // setSecondaryButton,
17
+ setSecondaryButton,
22
18
  ctaData,
23
19
  updateHandler,
24
20
  deleteHandler,
@@ -31,7 +27,7 @@ const CtaButtons = ({
31
27
  }) => {
32
28
  // Local state to control CTA form visibility
33
29
  const [showPrimaryCTA, setShowPrimaryCTA] = useState(false);
34
- // const [showSecondaryCTA, setShowSecondaryCTA] = useState(false);
30
+ const [showSecondaryCTA, setShowSecondaryCTA] = useState(false);
35
31
 
36
32
  const handleAddPrimary = () => {
37
33
  // Prevent multiple clicks if primary button is already being added or form is already showing
@@ -57,67 +53,68 @@ const CtaButtons = ({
57
53
  setShowPrimaryCTA(true);
58
54
  };
59
55
 
60
- // Secondary button: needs backend support, revamped
61
- // const handleAddSecondary = () => {
62
- // if (secondaryButton && showSecondaryCTA) {
63
- // return;
64
- // }
65
- // if (ctaData?.length < 2 || !ctaData?.find((cta) => cta?.index === 1)) {
66
- // const newSecondaryButton = {
67
- // index: 1,
68
- // ctaType: SECONDARY,
69
- // text: "",
70
- // urlType: DEEP_LINK,
71
- // url: "",
72
- // deepLinkKeys: "",
73
- // isSaved: false,
74
- // };
75
- // updateHandler(newSecondaryButton, 1);
76
- // }
77
- // setSecondaryButton(true);
78
- // setShowSecondaryCTA(true);
79
- // };
56
+ const handleAddSecondary = () => {
57
+ // Prevent multiple clicks if secondary button is already being added or form is already showing
58
+ //cooment until supported from BE & Hydra
59
+ // if (secondaryButton && showSecondaryCTA) {
60
+ // return;
61
+ // }
62
+
63
+ // if (shouldShowSecondaryCTA) {
64
+ // return;
65
+ // }
66
+
67
+ // If ctaData doesn't have a secondary button, initialize it
68
+ if (ctaData?.length < 2 || !ctaData?.find((cta) => cta?.index === 1)) {
69
+ const newSecondaryButton = {
70
+ index: 1,
71
+ ctaType: SECONDARY,
72
+ text: "",
73
+ urlType: DEEP_LINK,
74
+ url: "",
75
+ deepLinkKeys: "",
76
+ isSaved: false,
77
+ };
78
+ updateHandler(newSecondaryButton, 1);
79
+ }
80
+
81
+ // setSecondaryButton(true);
82
+ // setShowSecondaryCTA(true);
83
+ };
80
84
 
81
85
  // Check if primary button exists (saved or being edited)
82
86
  const primaryButtonExists = ctaData?.length > 0 && ctaData[0]?.text;
83
87
  const isPrimaryButtonSaved = primaryButtonExists && ctaData[0]?.isSaved;
84
88
 
85
- // Secondary button: needs backend support, revamped
86
- // const secondaryButtonExists = ctaData?.length > 1 && ctaData[1]?.text;
87
- // const isSecondaryButtonSaved = secondaryButtonExists && ctaData[1]?.isSaved;
89
+ // Check if secondary button exists (saved or being edited)
90
+ const secondaryButtonExists = ctaData?.length > 1 && ctaData[1]?.text;
91
+ const isSecondaryButtonSaved = secondaryButtonExists && ctaData[1]?.isSaved;
88
92
 
89
93
  // Show primary CTA if button is active and (form is showing OR button exists)
90
94
  const shouldShowPrimaryCTA = primaryButton && (showPrimaryCTA || primaryButtonExists);
91
95
 
92
- // Secondary button: needs backend support, revamped
93
- // const shouldShowSecondaryCTA = secondaryButton && (showSecondaryCTA || secondaryButtonExists);
96
+ // Show secondary CTA if button is active and (form is showing OR button exists)
97
+ const shouldShowSecondaryCTA = secondaryButton && (showSecondaryCTA || secondaryButtonExists);
94
98
 
95
99
  // Enhanced delete handler to hide forms when buttons are deleted
96
100
  const handleDelete = (index) => {
97
101
  if (index === 0) {
98
102
  setShowPrimaryCTA(false);
99
103
  setPrimaryButton(false);
104
+ } else if (index === 1) {
105
+ //cooment until supported from BE & Hydra
106
+ // setShowSecondaryCTA(false);
107
+ // setSecondaryButton(false);
100
108
  }
101
- // Secondary button: needs backend support, revamped
102
- // else if (index === 1) {
103
- // setShowSecondaryCTA(false);
104
- // setSecondaryButton(false);
105
- // }
106
109
  deleteHandler(index);
107
110
  };
108
111
 
109
112
  return (
110
113
  <>
111
114
  <CapRow className="mpush-cta-buttons">
112
- {/* Heading with "(Optional)" on the same line */}
113
- <CapRow type="flex" align="middle" noWrap className="mpush-section-heading">
114
- <CapHeading type="h3">
115
- <FormattedMessage {...messages.buttons} />
116
- </CapHeading>
117
- <CapLabel className="optional-text">
118
- <FormattedMessage {...messages.optionalText} />
119
- </CapLabel>
120
- </CapRow>
115
+ <CapHeading type="h3">
116
+ <FormattedMessage {...messages.buttons} />
117
+ </CapHeading>
121
118
  {!isPrimaryButtonSaved && !shouldShowPrimaryCTA && (
122
119
  <CapButton
123
120
  type="link"
@@ -145,7 +142,6 @@ const CtaButtons = ({
145
142
  handleOnTagsContextChange={handleOnTagsContextChange}
146
143
  />
147
144
  )}
148
- {/* Secondary button: needs backend support, so it is being revamped. Hidden until then.
149
145
  {isPrimaryButtonSaved && !isSecondaryButtonSaved && !shouldShowSecondaryCTA && (
150
146
  <CapTooltip
151
147
  overlay={<FormattedMessage {...messages.secondaryButtonTooltip} />}
@@ -175,16 +171,15 @@ const CtaButtons = ({
175
171
  buttonType={SECONDARY}
176
172
  />
177
173
  )}
178
- */}
179
174
  </>
180
175
  );
181
176
  };
182
177
 
183
178
  CtaButtons.propTypes = {
184
179
  primaryButton: PropTypes.bool.isRequired,
185
- // secondaryButton: PropTypes.bool.isRequired,
180
+ secondaryButton: PropTypes.bool.isRequired,
186
181
  setPrimaryButton: PropTypes.func.isRequired,
187
- // setSecondaryButton: PropTypes.func.isRequired,
182
+ setSecondaryButton: PropTypes.func.isRequired,
188
183
  ctaData: PropTypes.array.isRequired,
189
184
  updateHandler: PropTypes.func.isRequired,
190
185
  deleteHandler: PropTypes.func.isRequired,