@capillarytech/creatives-library 8.0.250-alpha.2 → 8.0.251

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 (276) hide show
  1. package/assets/Android.png +0 -0
  2. package/assets/iOS.png +0 -0
  3. package/constants/unified.js +1 -3
  4. package/initialReducer.js +0 -2
  5. package/package.json +1 -1
  6. package/services/api.js +0 -15
  7. package/services/tests/api.test.js +0 -34
  8. package/translations/en.json +3 -4
  9. package/utils/common.js +0 -11
  10. package/utils/commonUtils.js +5 -28
  11. package/utils/tests/commonUtil.test.js +0 -224
  12. package/utils/tests/transformerUtils.test.js +0 -297
  13. package/utils/transformTemplateConfig.js +10 -0
  14. package/utils/transformerUtils.js +0 -40
  15. package/v2Components/CapDeviceContent/index.js +56 -61
  16. package/v2Components/CapImageUpload/constants.js +0 -2
  17. package/v2Components/CapImageUpload/index.js +16 -65
  18. package/v2Components/CapImageUpload/index.scss +1 -4
  19. package/v2Components/CapImageUpload/messages.js +1 -5
  20. package/v2Components/CapTagList/index.js +1 -6
  21. package/v2Components/CapTagListWithInput/index.js +1 -5
  22. package/v2Components/CapTagListWithInput/messages.js +1 -1
  23. package/v2Components/CapWhatsappCTA/tests/index.test.js +0 -5
  24. package/v2Components/ErrorInfoNote/index.js +72 -455
  25. package/v2Components/ErrorInfoNote/messages.js +6 -36
  26. package/v2Components/ErrorInfoNote/style.scss +4 -280
  27. package/v2Components/FormBuilder/tests/index.test.js +4 -13
  28. package/v2Components/HtmlEditor/HTMLEditor.js +94 -547
  29. package/v2Components/HtmlEditor/__tests__/HTMLEditor.test.js +133 -1358
  30. package/v2Components/HtmlEditor/__tests__/index.lazy.test.js +16 -27
  31. package/v2Components/HtmlEditor/_htmlEditor.scss +45 -108
  32. package/v2Components/HtmlEditor/_index.lazy.scss +1 -1
  33. package/v2Components/HtmlEditor/components/CodeEditorPane/_codeEditorPane.scss +101 -22
  34. package/v2Components/HtmlEditor/components/CodeEditorPane/index.js +140 -146
  35. package/v2Components/HtmlEditor/components/DeviceToggle/_deviceToggle.scss +1 -2
  36. package/v2Components/HtmlEditor/components/DeviceToggle/index.js +3 -3
  37. package/v2Components/HtmlEditor/components/EditorToolbar/_editorToolbar.scss +0 -9
  38. package/v2Components/HtmlEditor/components/EditorToolbar/index.js +1 -1
  39. package/v2Components/HtmlEditor/components/FullscreenModal/_fullscreenModal.scss +0 -22
  40. package/v2Components/HtmlEditor/components/InAppPreviewPane/DeviceFrame.js +7 -4
  41. package/v2Components/HtmlEditor/components/InAppPreviewPane/__tests__/DeviceFrame.test.js +45 -35
  42. package/v2Components/HtmlEditor/components/InAppPreviewPane/_inAppPreviewPane.scss +3 -1
  43. package/v2Components/HtmlEditor/components/InAppPreviewPane/constants.js +33 -33
  44. package/v2Components/HtmlEditor/components/InAppPreviewPane/index.js +6 -7
  45. package/v2Components/HtmlEditor/components/PreviewPane/_previewPane.scss +6 -3
  46. package/v2Components/HtmlEditor/components/PreviewPane/index.js +34 -24
  47. package/v2Components/HtmlEditor/components/SplitContainer/_splitContainer.scss +1 -1
  48. package/v2Components/HtmlEditor/components/ValidationErrorDisplay/__tests__/index.test.js +152 -0
  49. package/v2Components/HtmlEditor/components/ValidationErrorDisplay/index.js +31 -49
  50. package/v2Components/HtmlEditor/components/ValidationPanel/_validationPanel.scss +34 -50
  51. package/v2Components/HtmlEditor/components/ValidationPanel/index.js +41 -70
  52. package/v2Components/HtmlEditor/constants.js +20 -42
  53. package/v2Components/HtmlEditor/hooks/__tests__/useInAppContent.test.js +16 -373
  54. package/v2Components/HtmlEditor/hooks/useEditorContent.js +2 -5
  55. package/v2Components/HtmlEditor/hooks/useInAppContent.js +146 -88
  56. package/v2Components/HtmlEditor/hooks/useValidation.js +53 -189
  57. package/v2Components/HtmlEditor/index.js +1 -1
  58. package/v2Components/HtmlEditor/messages.js +85 -95
  59. package/v2Components/HtmlEditor/utils/__tests__/htmlValidator.enhanced.test.js +45 -94
  60. package/v2Components/HtmlEditor/utils/__tests__/validationAdapter.test.js +0 -134
  61. package/v2Components/HtmlEditor/utils/contentSanitizer.js +41 -40
  62. package/v2Components/HtmlEditor/utils/htmlValidator.js +72 -71
  63. package/v2Components/HtmlEditor/utils/liquidTemplateSupport.js +102 -134
  64. package/v2Components/HtmlEditor/utils/properSyntaxHighlighting.js +25 -23
  65. package/v2Components/HtmlEditor/utils/validationAdapter.js +41 -66
  66. package/v2Components/MobilePushPreviewV2/index.js +7 -32
  67. package/v2Components/TemplatePreview/_templatePreview.scss +24 -55
  68. package/v2Components/TemplatePreview/index.js +32 -47
  69. package/v2Components/TemplatePreview/messages.js +0 -4
  70. package/v2Components/TestAndPreviewSlidebox/_testAndPreviewSlidebox.scss +0 -1
  71. package/v2Containers/App/constants.js +0 -5
  72. package/v2Containers/BeeEditor/index.js +90 -172
  73. package/v2Containers/Cap/tests/__snapshots__/index.test.js.snap +3 -4
  74. package/v2Containers/CreativesContainer/SlideBoxContent.js +53 -184
  75. package/v2Containers/CreativesContainer/SlideBoxFooter.js +13 -163
  76. package/v2Containers/CreativesContainer/SlideBoxHeader.js +1 -3
  77. package/v2Containers/CreativesContainer/constants.js +0 -4
  78. package/v2Containers/CreativesContainer/index.js +46 -407
  79. package/v2Containers/CreativesContainer/messages.js +0 -12
  80. package/v2Containers/CreativesContainer/tests/SlideBoxContent.test.js +0 -210
  81. package/v2Containers/CreativesContainer/tests/SlideBoxFooter.test.js +2 -11
  82. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +50 -342
  83. package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +0 -106
  84. package/v2Containers/Email/actions.js +0 -7
  85. package/v2Containers/Email/constants.js +1 -5
  86. package/v2Containers/Email/index.js +29 -234
  87. package/v2Containers/Email/messages.js +0 -32
  88. package/v2Containers/Email/reducer.js +1 -12
  89. package/v2Containers/Email/sagas.js +7 -61
  90. package/v2Containers/Email/tests/__snapshots__/reducer.test.js.snap +0 -2
  91. package/v2Containers/Email/tests/reducer.test.js +0 -46
  92. package/v2Containers/Email/tests/sagas.test.js +29 -320
  93. package/v2Containers/EmailWrapper/components/EmailWrapperView.js +19 -207
  94. package/v2Containers/EmailWrapper/components/HTMLEditorTesting.js +74 -40
  95. package/v2Containers/EmailWrapper/components/__tests__/HTMLEditorTesting.test.js +67 -2
  96. package/v2Containers/EmailWrapper/constants.js +0 -2
  97. package/v2Containers/EmailWrapper/hooks/useEmailWrapper.js +77 -629
  98. package/v2Containers/EmailWrapper/index.js +23 -103
  99. package/v2Containers/EmailWrapper/messages.js +1 -61
  100. package/v2Containers/EmailWrapper/tests/EmailWrapperView.test.js +214 -0
  101. package/v2Containers/EmailWrapper/tests/useEmailWrapper.test.js +77 -594
  102. package/v2Containers/InApp/actions.js +0 -7
  103. package/v2Containers/InApp/constants.js +4 -20
  104. package/v2Containers/InApp/index.js +359 -802
  105. package/v2Containers/InApp/index.scss +3 -4
  106. package/v2Containers/InApp/messages.js +3 -7
  107. package/v2Containers/InApp/reducer.js +3 -21
  108. package/v2Containers/InApp/sagas.js +9 -29
  109. package/v2Containers/InApp/selectors.js +5 -25
  110. package/v2Containers/InApp/tests/index.test.js +50 -154
  111. package/v2Containers/InApp/tests/reducer.test.js +0 -34
  112. package/v2Containers/InApp/tests/sagas.test.js +9 -61
  113. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +9 -15
  114. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +6 -10
  115. package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +75 -102
  116. package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +54 -81
  117. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +174 -244
  118. package/v2Containers/SmsTrai/Create/tests/__snapshots__/index.test.js.snap +12 -16
  119. package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +36 -52
  120. package/v2Containers/TagList/index.js +19 -62
  121. package/v2Containers/Templates/ChannelTypeIllustration.js +1 -13
  122. package/v2Containers/Templates/_templates.scss +1 -265
  123. package/v2Containers/Templates/actions.js +1 -2
  124. package/v2Containers/Templates/constants.js +0 -1
  125. package/v2Containers/Templates/index.js +38 -363
  126. package/v2Containers/Templates/messages.js +0 -28
  127. package/v2Containers/Templates/reducer.js +0 -4
  128. package/v2Containers/Templates/tests/index.test.js +0 -10
  129. package/v2Containers/TemplatesV2/index.js +7 -15
  130. package/v2Containers/TemplatesV2/messages.js +0 -4
  131. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +486 -682
  132. package/utils/imageUrlUpload.js +0 -141
  133. package/v2Components/CapImageUrlUpload/constants.js +0 -26
  134. package/v2Components/CapImageUrlUpload/index.js +0 -365
  135. package/v2Components/CapImageUrlUpload/index.scss +0 -35
  136. package/v2Components/CapImageUrlUpload/messages.js +0 -47
  137. package/v2Components/HtmlEditor/__tests__/HTMLEditor.apiErrors.test.js +0 -874
  138. package/v2Components/HtmlEditor/components/ValidationPanel/constants.js +0 -6
  139. package/v2Components/HtmlEditor/components/ValidationTabs/_validationTabs.scss +0 -254
  140. package/v2Components/HtmlEditor/components/ValidationTabs/index.js +0 -364
  141. package/v2Components/HtmlEditor/components/ValidationTabs/messages.js +0 -51
  142. package/v2Components/HtmlEditor/hooks/__tests__/useValidation.apiErrors.test.js +0 -795
  143. package/v2Components/HtmlEditor/utils/validationConstants.js +0 -40
  144. package/v2Containers/BeePopupEditor/_beePopupEditor.scss +0 -14
  145. package/v2Containers/BeePopupEditor/constants.js +0 -10
  146. package/v2Containers/BeePopupEditor/index.js +0 -194
  147. package/v2Containers/BeePopupEditor/tests/index.test.js +0 -627
  148. package/v2Containers/EmailWrapper/components/EmailHTMLEditor.js +0 -1285
  149. package/v2Containers/EmailWrapper/components/__tests__/EmailHTMLEditor.test.js +0 -1870
  150. package/v2Containers/EmailWrapper/components/__tests__/EmailWrapperView.test.js +0 -520
  151. package/v2Containers/EmailWrapper/tests/useEmailWrapper.edgeCases.test.js +0 -643
  152. package/v2Containers/InApp/__tests__/InAppHTMLEditor.test.js +0 -376
  153. package/v2Containers/InApp/__tests__/sagas.test.js +0 -363
  154. package/v2Containers/InApp/tests/selectors.test.js +0 -612
  155. package/v2Containers/InAppWrapper/components/InAppWrapperView.js +0 -151
  156. package/v2Containers/InAppWrapper/components/__tests__/InAppWrapperView.test.js +0 -267
  157. package/v2Containers/InAppWrapper/components/inAppWrapperView.scss +0 -23
  158. package/v2Containers/InAppWrapper/constants.js +0 -16
  159. package/v2Containers/InAppWrapper/hooks/__tests__/useInAppWrapper.test.js +0 -473
  160. package/v2Containers/InAppWrapper/hooks/useInAppWrapper.js +0 -198
  161. package/v2Containers/InAppWrapper/index.js +0 -148
  162. package/v2Containers/InAppWrapper/messages.js +0 -49
  163. package/v2Containers/InappAdvance/index.js +0 -1099
  164. package/v2Containers/InappAdvance/index.scss +0 -10
  165. package/v2Containers/InappAdvance/tests/index.test.js +0 -448
  166. package/v2Containers/WebPush/Create/components/BrandIconSection.js +0 -108
  167. package/v2Containers/WebPush/Create/components/ButtonForm.js +0 -172
  168. package/v2Containers/WebPush/Create/components/ButtonItem.js +0 -101
  169. package/v2Containers/WebPush/Create/components/ButtonList.js +0 -107
  170. package/v2Containers/WebPush/Create/components/ButtonsLinksSection.js +0 -160
  171. package/v2Containers/WebPush/Create/components/ButtonsLinksSection.test.js +0 -476
  172. package/v2Containers/WebPush/Create/components/FormActions.js +0 -54
  173. package/v2Containers/WebPush/Create/components/FormActions.test.js +0 -163
  174. package/v2Containers/WebPush/Create/components/MediaSection.js +0 -143
  175. package/v2Containers/WebPush/Create/components/MediaSection.test.js +0 -341
  176. package/v2Containers/WebPush/Create/components/MessageSection.js +0 -103
  177. package/v2Containers/WebPush/Create/components/MessageSection.test.js +0 -268
  178. package/v2Containers/WebPush/Create/components/NotificationTitleSection.js +0 -87
  179. package/v2Containers/WebPush/Create/components/NotificationTitleSection.test.js +0 -210
  180. package/v2Containers/WebPush/Create/components/TemplateNameSection.js +0 -54
  181. package/v2Containers/WebPush/Create/components/TemplateNameSection.test.js +0 -143
  182. package/v2Containers/WebPush/Create/components/__snapshots__/ButtonsLinksSection.test.js.snap +0 -82
  183. package/v2Containers/WebPush/Create/components/__snapshots__/FormActions.test.js.snap +0 -16
  184. package/v2Containers/WebPush/Create/components/__snapshots__/MediaSection.test.js.snap +0 -41
  185. package/v2Containers/WebPush/Create/components/__snapshots__/MessageSection.test.js.snap +0 -54
  186. package/v2Containers/WebPush/Create/components/__snapshots__/NotificationTitleSection.test.js.snap +0 -37
  187. package/v2Containers/WebPush/Create/components/__snapshots__/TemplateNameSection.test.js.snap +0 -21
  188. package/v2Containers/WebPush/Create/components/_buttons.scss +0 -246
  189. package/v2Containers/WebPush/Create/components/tests/ButtonForm.test.js +0 -554
  190. package/v2Containers/WebPush/Create/components/tests/ButtonItem.test.js +0 -607
  191. package/v2Containers/WebPush/Create/components/tests/ButtonList.test.js +0 -515
  192. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonForm.test.js.snap +0 -666
  193. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonItem.test.js.snap +0 -74
  194. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonList.test.js.snap +0 -46
  195. package/v2Containers/WebPush/Create/hooks/useButtonManagement.js +0 -150
  196. package/v2Containers/WebPush/Create/hooks/useButtonManagement.test.js +0 -406
  197. package/v2Containers/WebPush/Create/hooks/useCharacterCount.js +0 -30
  198. package/v2Containers/WebPush/Create/hooks/useCharacterCount.test.js +0 -151
  199. package/v2Containers/WebPush/Create/hooks/useImageUpload.js +0 -104
  200. package/v2Containers/WebPush/Create/hooks/useImageUpload.test.js +0 -538
  201. package/v2Containers/WebPush/Create/hooks/useTagManagement.js +0 -122
  202. package/v2Containers/WebPush/Create/hooks/useTagManagement.test.js +0 -633
  203. package/v2Containers/WebPush/Create/index.js +0 -1148
  204. package/v2Containers/WebPush/Create/index.scss +0 -134
  205. package/v2Containers/WebPush/Create/messages.js +0 -203
  206. package/v2Containers/WebPush/Create/preview/DevicePreviewContent.js +0 -228
  207. package/v2Containers/WebPush/Create/preview/NotificationContainer.js +0 -294
  208. package/v2Containers/WebPush/Create/preview/PreviewContent.js +0 -90
  209. package/v2Containers/WebPush/Create/preview/PreviewControls.js +0 -305
  210. package/v2Containers/WebPush/Create/preview/PreviewDisclaimer.js +0 -23
  211. package/v2Containers/WebPush/Create/preview/WebPushPreview.js +0 -155
  212. package/v2Containers/WebPush/Create/preview/assets/Light.svg +0 -53
  213. package/v2Containers/WebPush/Create/preview/assets/Top.svg +0 -5
  214. package/v2Containers/WebPush/Create/preview/assets/android-arrow-down.svg +0 -9
  215. package/v2Containers/WebPush/Create/preview/assets/android-arrow-up.svg +0 -9
  216. package/v2Containers/WebPush/Create/preview/assets/chrome-icon.png +0 -0
  217. package/v2Containers/WebPush/Create/preview/assets/edge-icon.png +0 -0
  218. package/v2Containers/WebPush/Create/preview/assets/firefox-icon.svg +0 -106
  219. package/v2Containers/WebPush/Create/preview/assets/iOS.svg +0 -26
  220. package/v2Containers/WebPush/Create/preview/assets/macos-arrow-down-icon.svg +0 -9
  221. package/v2Containers/WebPush/Create/preview/assets/macos-triple-dot-icon.svg +0 -9
  222. package/v2Containers/WebPush/Create/preview/assets/opera-icon.svg +0 -18
  223. package/v2Containers/WebPush/Create/preview/assets/safari-icon.svg +0 -29
  224. package/v2Containers/WebPush/Create/preview/assets/windows-close-icon.svg +0 -9
  225. package/v2Containers/WebPush/Create/preview/assets/windows-triple-dot-icon.svg +0 -9
  226. package/v2Containers/WebPush/Create/preview/components/AndroidMobileChromeHeader.js +0 -47
  227. package/v2Containers/WebPush/Create/preview/components/AndroidMobileExpanded.js +0 -141
  228. package/v2Containers/WebPush/Create/preview/components/IOSHeader.js +0 -45
  229. package/v2Containers/WebPush/Create/preview/components/NotificationExpandedContent.js +0 -68
  230. package/v2Containers/WebPush/Create/preview/components/NotificationHeader.js +0 -61
  231. package/v2Containers/WebPush/Create/preview/components/WindowsChromeExpanded.js +0 -99
  232. package/v2Containers/WebPush/Create/preview/components/tests/AndroidMobileExpanded.test.js +0 -733
  233. package/v2Containers/WebPush/Create/preview/components/tests/WindowsChromeExpanded.test.js +0 -571
  234. package/v2Containers/WebPush/Create/preview/components/tests/__snapshots__/AndroidMobileExpanded.test.js.snap +0 -81
  235. package/v2Containers/WebPush/Create/preview/components/tests/__snapshots__/WindowsChromeExpanded.test.js.snap +0 -81
  236. package/v2Containers/WebPush/Create/preview/config/notificationMappings.js +0 -50
  237. package/v2Containers/WebPush/Create/preview/constants.js +0 -637
  238. package/v2Containers/WebPush/Create/preview/notification-container.scss +0 -79
  239. package/v2Containers/WebPush/Create/preview/preview.scss +0 -351
  240. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-chrome.scss +0 -370
  241. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-edge.scss +0 -12
  242. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-firefox.scss +0 -12
  243. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-opera.scss +0 -12
  244. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-chrome.scss +0 -47
  245. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-edge.scss +0 -11
  246. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-firefox.scss +0 -11
  247. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-opera.scss +0 -11
  248. package/v2Containers/WebPush/Create/preview/styles/_base.scss +0 -207
  249. package/v2Containers/WebPush/Create/preview/styles/_ios.scss +0 -153
  250. package/v2Containers/WebPush/Create/preview/styles/_ipados.scss +0 -107
  251. package/v2Containers/WebPush/Create/preview/styles/_macos-chrome.scss +0 -101
  252. package/v2Containers/WebPush/Create/preview/styles/_windows-chrome.scss +0 -229
  253. package/v2Containers/WebPush/Create/preview/tests/DevicePreviewContent.test.js +0 -909
  254. package/v2Containers/WebPush/Create/preview/tests/NotificationContainer.test.js +0 -1081
  255. package/v2Containers/WebPush/Create/preview/tests/PreviewControls.test.js +0 -723
  256. package/v2Containers/WebPush/Create/preview/tests/WebPushPreview.test.js +0 -1327
  257. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/DevicePreviewContent.test.js.snap +0 -131
  258. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/NotificationContainer.test.js.snap +0 -112
  259. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/PreviewControls.test.js.snap +0 -144
  260. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/WebPushPreview.test.js.snap +0 -129
  261. package/v2Containers/WebPush/Create/utils/payloadBuilder.js +0 -96
  262. package/v2Containers/WebPush/Create/utils/payloadBuilder.test.js +0 -396
  263. package/v2Containers/WebPush/Create/utils/previewUtils.js +0 -89
  264. package/v2Containers/WebPush/Create/utils/urlValidation.js +0 -115
  265. package/v2Containers/WebPush/Create/utils/urlValidation.test.js +0 -449
  266. package/v2Containers/WebPush/Create/utils/validation.js +0 -75
  267. package/v2Containers/WebPush/Create/utils/validation.test.js +0 -283
  268. package/v2Containers/WebPush/actions.js +0 -60
  269. package/v2Containers/WebPush/constants.js +0 -132
  270. package/v2Containers/WebPush/index.js +0 -2
  271. package/v2Containers/WebPush/reducer.js +0 -104
  272. package/v2Containers/WebPush/sagas.js +0 -119
  273. package/v2Containers/WebPush/selectors.js +0 -65
  274. package/v2Containers/WebPush/tests/reducer.test.js +0 -863
  275. package/v2Containers/WebPush/tests/sagas.test.js +0 -566
  276. package/v2Containers/WebPush/tests/selectors.test.js +0 -960
@@ -1,8 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import {
4
- CAP_SPACE_16, CAP_SPACE_32, CAP_SPACE_56, CAP_SPACE_64,
5
- } from '@capillarytech/cap-ui-library/styled/variables';
3
+ import { CAP_SPACE_32, CAP_SPACE_56, CAP_SPACE_64 } from '@capillarytech/cap-ui-library/styled/variables';
6
4
 
7
5
  import CapSlideBox from '@capillarytech/cap-ui-library/CapSlideBox';
8
6
  import CapHeader from '@capillarytech/cap-ui-library/CapHeader';
@@ -44,9 +42,8 @@ import { makeSelectFetchingCmsData } from '../Email/selectors';
44
42
  import {
45
43
  IMAGE as LINE_IMAGE, IMAGE_MAP, IMAGE_CAROUSEL, VIDEO as LINE_VIDEO, TEMPLATE, STICKER,
46
44
  } from '../Line/Container/constants';
47
- import {EXTERNAL_URL, SITE_URL, WEBPUSH_MEDIA_TYPES} from '../WebPush/constants';
48
45
  import { IMAGE, VIDEO } from '../Facebook/Advertisement/constant';
49
- import { RCS_STATUSES } from '../Rcs/constants';
46
+ import {RCS_STATUSES} from '../Rcs/constants';
50
47
  import { CREATIVE } from '../Facebook/constants';
51
48
  import { LOYALTY } from '../App/constants';
52
49
  import {
@@ -67,29 +64,19 @@ import {
67
64
  // getTemplateDiffState
68
65
  } from "../../utils/transformerUtils";
69
66
  import { MANUAL_CAROUSEL } from '../MobilePushNew/constants';
70
- import { BIG_HTML } from '../InApp/constants';
71
67
 
72
68
  const classPrefix = 'add-creatives-section';
73
69
  const CREATIVES_CONTAINER = 'creativesContainer';
74
70
 
75
71
  const SlideBoxWrapper = styled.div`
76
72
  .cap-slide-box-v2-container{
77
- .slidebox-header, .slidebox-content-container{
73
+ .slidebox-header, .slidebox-content-container, .slidebox-footer{
78
74
  margin-bottom: ${({ slideBoxWrapperMargin }) => `${slideBoxWrapperMargin}`};
79
75
  padding: 0 rem;
80
76
  &.has-footer{
81
77
  overflow-x: hidden;
82
78
  }
83
79
  }
84
- .slidebox-footer{
85
- /* Only apply margin-bottom to footer when ErrorInfoNote is shown in footer (BEE editor) */
86
- /* For HTML Editor, errors are shown in ValidationErrorDisplay (inside content area), so no footer margin needed */
87
- margin-bottom: ${({ shouldApplyFooterMargin }) => (shouldApplyFooterMargin ? `${CAP_SPACE_16}` : '0')};
88
- padding: 0 rem;
89
- &.has-footer{
90
- overflow-x: hidden;
91
- }
92
- }
93
80
  }
94
81
  `;
95
82
  export class Creatives extends React.Component {
@@ -108,7 +95,6 @@ export class Creatives extends React.Component {
108
95
  currentChannel: this.props.channel || 'sms',
109
96
  weChatTemplateType: '',
110
97
  weChatMaptemplateStep: 0,
111
- inAppEditorType: null,
112
98
  isLiquidValidationError: false,
113
99
  errorMessages: [],
114
100
  liquidErrorMessage: {
@@ -121,17 +107,6 @@ export class Creatives extends React.Component {
121
107
  isTestAndPreviewMode: false, // Add flag to track Test & Preview mode
122
108
  // Performance optimization: Local template name for immediate UI feedback
123
109
  localTemplateName: '',
124
- // Track selected email create mode for new flow (HTML Editor vs Drag & Drop)
125
- selectedEmailCreateMode: null,
126
- // HTML Editor validation state (for email channel)
127
- htmlEditorValidationState: {
128
- isContentEmpty: true,
129
- issueCounts: {
130
- html: 0, label: 0, liquid: 0, total: 0,
131
- },
132
- validationComplete: false, // Flag to track if validation has completed
133
- errorsAcknowledged: false, // Flag to track if user has acknowledged errors by clicking redirection icon
134
- },
135
110
  };
136
111
  this.liquidFlow = Boolean(commonUtil.hasLiquidSupportFeature());
137
112
  this.creativesTemplateSteps = {
@@ -161,7 +136,7 @@ export class Creatives extends React.Component {
161
136
  if (!this.props?.isFullMode) {
162
137
  this.props?.templateActions.getCdnTransformationConfig();
163
138
  }
164
-
139
+
165
140
  // Store loyalty tag props if loyaltyTagFetchingDependencies is provided
166
141
  const { loyaltyTagFetchingDependencies } = this.props;
167
142
  if (loyaltyTagFetchingDependencies) {
@@ -187,9 +162,9 @@ export class Creatives extends React.Component {
187
162
  const isEmptyTemplateName = !value.trim();
188
163
 
189
164
  // 1. IMMEDIATE: Update local state for instant UI feedback
190
- this.setState({
165
+ this.setState({
191
166
  isTemplateNameEmpty: isEmptyTemplateName,
192
- localTemplateName: value,
167
+ localTemplateName: value
193
168
  });
194
169
 
195
170
  // 2. DEBOUNCED: Only debounce the expensive onFormDataChange call
@@ -268,19 +243,8 @@ export class Creatives extends React.Component {
268
243
  onCreateNextStep = () => {
269
244
  this.setState((prevState) => {
270
245
  let templateStep = prevState.templateStep + 1;
271
- const { emailCreateMode, currentChannel, selectedEmailCreateMode } = prevState;
272
-
273
- // Check if we should skip template selection for HTML Editor
274
- const supportCKEditor = commonUtil.hasSupportCKEditor();
275
- const shouldSkipTemplateSelection = !supportCKEditor
276
- && selectedEmailCreateMode === 'html_editor'
277
- && currentChannel.toUpperCase() === constants.EMAIL
278
- && prevState.templateStep === 1; // Only skip if we're at modeSelection step
279
-
280
- if (shouldSkipTemplateSelection) {
281
- // Skip template selection (step 2), go directly to createTemplateContent (step 3)
282
- templateStep = prevState.templateStep + 2;
283
- } else if ((currentChannel.toUpperCase() === constants.EMAIL && emailCreateMode === "upload") || [constants.MOBILE_PUSH, constants.WECHAT, constants.INAPP].includes(currentChannel.toUpperCase())) {
246
+ const { emailCreateMode, currentChannel } = prevState;
247
+ if ((currentChannel.toUpperCase() === constants.EMAIL && emailCreateMode === "upload") || [constants.MOBILE_PUSH, constants.WECHAT, constants.INAPP].includes(currentChannel.toUpperCase())) {
284
248
  templateStep = prevState.templateStep + 2;
285
249
  }
286
250
  return {
@@ -289,21 +253,14 @@ export class Creatives extends React.Component {
289
253
  });
290
254
  }
291
255
 
292
- onEmailModeChange = (mode, selectedMode = null) => {
293
- this.setState({
294
- emailCreateMode: mode,
295
- selectedEmailCreateMode: selectedMode || mode, // Store the selected mode for new flow
296
- });
256
+ onEmailModeChange = (mode) => {
257
+ this.setState({ emailCreateMode: mode });
297
258
  }
298
259
 
299
260
  onInAppModeChange = (mode) => {
300
261
  this.setState({ inAppCreateMode: mode });
301
262
  }
302
263
 
303
- onInAppEditorTypeChange = (editorType) => {
304
- this.setState({ inAppEditorType: editorType });
305
- }
306
-
307
264
  onMobilepushModeChange = (mode) => {
308
265
  this.setState({ mobilePushCreateMode: mode });
309
266
  }
@@ -347,7 +304,7 @@ export class Creatives extends React.Component {
347
304
  }
348
305
  return buttonObj;
349
306
  });
350
- const { url, previewUrl } = media || {};
307
+ const {url, previewUrl} = media || {};
351
308
  return {
352
309
  bodyText: bodyTemplate,
353
310
  varMap: cardVarMapped,
@@ -476,35 +433,14 @@ export class Creatives extends React.Component {
476
433
  }
477
434
  case constants.INAPP: {
478
435
  const mode = get(templateData, 'androidContent.type') || get(templateData, 'iosContent.type') || '';
479
-
480
- // Check if this is a BEE editor template (identified by special title 'bee free template')
481
- const isAndroidBeeEditor = templateData?.androidContent?.type === constants.HTML
482
- && templateData?.androidContent?.title?.toLowerCase() === 'bee free template';
483
- const isIosBeeEditor = templateData?.iosContent?.type === constants.HTML
484
- && templateData?.iosContent?.title?.toLowerCase() === 'bee free template';
485
-
486
436
  creativesTemplateData = {
487
437
  type: channel,
488
438
  name: templateData.messageSubject,
489
439
  versions: {
490
440
  base: {
491
441
  content: {
492
- ANDROID: isAndroidBeeEditor ? {
493
- type: templateData?.androidContent?.type,
494
- bodyType: templateData?.androidContent?.bodyType,
495
- deviceType: constants.ANDROID,
496
- beeHtml: { value: templateData?.androidContent?.message },
497
- beeJson: templateData?.androidContent?.expandableDetails?.message,
498
- isBEEeditor: true,
499
- } : templateData?.androidContent,
500
- IOS: isIosBeeEditor ? {
501
- type: templateData?.iosContent?.type,
502
- bodyType: templateData?.iosContent?.bodyType,
503
- deviceType: constants.IOS,
504
- beeHtml: { value: templateData?.iosContent?.message },
505
- beeJson: templateData?.iosContent?.expandableDetails?.message,
506
- isBEEeditor: true,
507
- } : templateData?.iosContent,
442
+ ANDROID: templateData?.androidContent,
443
+ IOS: templateData?.iosContent,
508
444
  },
509
445
  },
510
446
  },
@@ -739,7 +675,7 @@ export class Creatives extends React.Component {
739
675
  } = templateData || {};
740
676
  const cardContent = (rcsContent.cardContent && rcsContent.cardContent[0]) || {};
741
677
  const Status = RCS_STATUSES.approved || '';
742
-
678
+
743
679
  creativesTemplateData = {
744
680
  type: channel,
745
681
  edit: true,
@@ -772,73 +708,6 @@ export class Creatives extends React.Component {
772
708
  };
773
709
  break;
774
710
  }
775
- case constants.WEBPUSH: {
776
- // Convert from campaign format (messageContent.content.content) to creatives format
777
- const webpushContent = get(templateData, 'content', {});
778
- const accountId = get(templateData, 'accountId');
779
- const {
780
- title,
781
- message,
782
- iconImageUrl: brandIcon = "",
783
- cta,
784
- expandableDetails
785
- } = webpushContent || {};
786
-
787
- // Map cta to onClickAction
788
- let onClickAction = null;
789
- if (cta) {
790
- if (cta?.type === EXTERNAL_URL) {
791
- onClickAction = {
792
- type: URL,
793
- url: cta?.actionLink || '',
794
- };
795
- } else {
796
- onClickAction = {
797
- type: cta?.type || SITE_URL,
798
- };
799
- }
800
- }
801
-
802
- // Map expandableDetails.ctas to ctas array
803
- let ctas = [];
804
- if (expandableDetails?.ctas && expandableDetails?.ctas?.length > 0) {
805
- ctas = expandableDetails?.ctas?.map((ctaItem) => ({
806
- actionText: ctaItem?.title || ctaItem?.actionText || '',
807
- type: URL,
808
- actionLink: ctaItem?.actionLink || '',
809
- }));
810
- }
811
-
812
- // Map expandableDetails.media to image if present
813
- let image = null;
814
- if (expandableDetails?.media && expandableDetails?.media?.length > 0) {
815
- const firstMedia = expandableDetails?.media[0];
816
- if (firstMedia?.type === WEBPUSH_MEDIA_TYPES.IMAGE && firstMedia?.url) {
817
- image = firstMedia?.url;
818
- }
819
- }
820
-
821
- creativesTemplateData = {
822
- type: channel,
823
- name: templateData?.messageSubject,
824
- versions: {
825
- base: {
826
- content: {
827
- webpush: {
828
- title: title || '',
829
- message: message || '',
830
- ...(brandIcon && { brandIcon }),
831
- ...(onClickAction && { onClickAction }),
832
- ...(ctas.length > 0 && { ctas }),
833
- ...(image && { image, mediaType: IMAGE }),
834
- },
835
- },
836
- },
837
- },
838
- definition: { accountId },
839
- };
840
- break;
841
- }
842
711
  default:
843
712
  break;
844
713
  }
@@ -891,7 +760,7 @@ export class Creatives extends React.Component {
891
760
  });
892
761
 
893
762
  getMobilePushCarouselData = (expandableDetails = []) => {
894
- const newExpandableDetails = { ...expandableDetails };
763
+ const newExpandableDetails = {...expandableDetails};
895
764
  newExpandableDetails.style = expandableDetails.style || MANUAL_CAROUSEL;
896
765
  newExpandableDetails.message = expandableDetails.message || '';
897
766
  newExpandableDetails.ctas = expandableDetails.ctas || [];
@@ -986,24 +855,11 @@ export class Creatives extends React.Component {
986
855
  androidContent.custom = custom;
987
856
  }
988
857
  if (channel === constants.MOBILE_PUSH && androidContent?.expandableDetails?.carouselData?.length) {
989
- androidContent.expandableDetails = this.getMobilePushCarouselData({ ...androidContent?.expandableDetails });
990
- }
991
- if (androidContent?.isBEEeditor && androidContent?.beeHtml?.value) {
992
- templateData.androidContent = {};
993
- templateData.androidContent.type = constants.HTML;
994
- templateData.androidContent.message = androidContent?.beeHtml?.value || '';
995
- templateData.androidContent.title = 'bee free template';
996
- templateData.androidContent.bodyType = androidContent?.bodyType;
997
- templateData.androidContent.deviceType = constants.ANDROID;
998
- templateData.androidContent.expandableDetails = {
999
- style: BIG_HTML,
1000
- message: androidContent?.beeJson || '',
1001
- };
1002
- } else if (!androidContent?.isBEEeditor) {
1003
- templateData.androidContent = androidContent;
1004
- templateData.androidContent.type = androidContent?.type || get(channelTemplate, 'definition.mode', '')?.toUpperCase() || constants.TEXT;
1005
- templateData.androidContent.deviceType = constants.ANDROID;
858
+ androidContent.expandableDetails = this.getMobilePushCarouselData({...androidContent?.expandableDetails});
1006
859
  }
860
+ templateData.androidContent = androidContent;
861
+ templateData.androidContent.type = androidContent?.type || get(channelTemplate, 'definition.mode', '')?.toUpperCase() || constants.TEXT;
862
+ templateData.androidContent.deviceType = constants.ANDROID;
1007
863
  }
1008
864
  const iosContent = channel === constants.INAPP ? get(channelTemplate, 'versions.base.content.IOS') : get(channelTemplate, 'versions.base.IOS');
1009
865
  if (!isEmpty(iosContent)) {
@@ -1021,24 +877,11 @@ export class Creatives extends React.Component {
1021
877
  iosContent.custom = custom;
1022
878
  }
1023
879
  if (channel === constants.MOBILE_PUSH && iosContent?.expandableDetails?.carouselData?.length) {
1024
- iosContent.expandableDetails = this.getMobilePushCarouselData({ ...iosContent?.expandableDetails });
1025
- }
1026
- if (iosContent?.isBEEeditor && iosContent?.beeHtml?.value) {
1027
- templateData.iosContent = {};
1028
- templateData.iosContent.type = constants.HTML;
1029
- templateData.iosContent.message = iosContent?.beeHtml?.value || '';
1030
- templateData.iosContent.title = 'bee free template';
1031
- templateData.iosContent.bodyType = iosContent?.bodyType;
1032
- templateData.iosContent.deviceType = constants.IOS;
1033
- templateData.iosContent.expandableDetails = {
1034
- style: BIG_HTML,
1035
- message: iosContent?.beeJson || '',
1036
- };
1037
- } else if (!iosContent?.isBEEeditor) {
1038
- templateData.iosContent = iosContent;
1039
- templateData.iosContent.type = iosContent?.type || get(channelTemplate, 'definition.mode', '')?.toUpperCase() || 'TEXT';
1040
- templateData.iosContent.deviceType = constants.IOS;
880
+ iosContent.expandableDetails = this.getMobilePushCarouselData({...iosContent?.expandableDetails});
1041
881
  }
882
+ templateData.iosContent = iosContent;
883
+ templateData.iosContent.type = iosContent?.type || get(channelTemplate, 'definition.mode', '')?.toUpperCase() || 'TEXT';
884
+ templateData.iosContent.deviceType = constants.IOS;
1042
885
  }
1043
886
  templateData.messageSubject = channelTemplate?.name ? channelTemplate?.name : "messageSubject";
1044
887
  }
@@ -1253,7 +1096,7 @@ export class Creatives extends React.Component {
1253
1096
  contentType = "",
1254
1097
  cardType = "",
1255
1098
  cardSettings = {},
1256
- } = get(versions, 'base.content.RCS.rcsContent', {});
1099
+ } = get(versions, 'base.content.RCS.rcsContent',{});
1257
1100
  const rcsContent = {
1258
1101
  contentType,
1259
1102
  cardType,
@@ -1279,105 +1122,6 @@ export class Creatives extends React.Component {
1279
1122
  }
1280
1123
  }
1281
1124
  break;
1282
- case constants.WEBPUSH: {
1283
- if (template.value) {
1284
- const channelTemplate = template.value;
1285
- const accountId = get(channelTemplate, 'definition.accountId');
1286
- const webpushContent = get(channelTemplate, 'versions.base.content.webpush', {});
1287
- const {
1288
- title,
1289
- message,
1290
- brandIcon,
1291
- iconImageUrl: templateImageUrl ,
1292
- onClickAction,
1293
- ctas: templateCtas,
1294
- cta: templateCta,
1295
- expandableDetails: templateExpandableDetails,
1296
- image
1297
- } = webpushContent || {};
1298
-
1299
- const iconImageUrl = brandIcon || templateImageUrl || '';
1300
-
1301
- // Map onClickAction to cta
1302
- let cta = null;
1303
- if (onClickAction) {
1304
- if (onClickAction?.type === URL) {
1305
- cta = {
1306
- type: EXTERNAL_URL,
1307
- actionLink: onClickAction?.url || '',
1308
- };
1309
- } else {
1310
- cta = {
1311
- type: onClickAction?.type || SITE_URL,
1312
- actionLink: onClickAction?.url || '',
1313
- };
1314
- }
1315
- } else if (templateCta) {
1316
- // Fallback to cta if onClickAction is not present
1317
- cta = {
1318
- type: templateCta?.type || EXTERNAL_URL,
1319
- actionLink: templateCta?.actionLink || '',
1320
- };
1321
- }
1322
-
1323
- // Map ctas array to expandableDetails.ctas
1324
- let expandableDetails = null;
1325
- const hasCtas = templateCtas && templateCtas.length > 0;
1326
- const hasImage = image;
1327
-
1328
- if (hasCtas || hasImage) {
1329
- expandableDetails = {
1330
- media: [],
1331
- ctas: [],
1332
- };
1333
-
1334
- // Map image to expandableDetails.media
1335
- if (hasImage) {
1336
- expandableDetails.media = [{
1337
- url: image,
1338
- type: IMAGE,
1339
- }];
1340
- }
1341
-
1342
- // Map ctas array to expandableDetails.ctas
1343
- if (hasCtas) {
1344
- expandableDetails.ctas = templateCtas.map((ctaItem) => ({
1345
- type: ctaItem?.type === URL ? EXTERNAL_URL : ctaItem?.type,
1346
- action: ctaItem?.action || '',
1347
- title: ctaItem?.actionText || ctaItem?.title || '',
1348
- actionLink: ctaItem?.actionLink || '',
1349
- }));
1350
- }
1351
- } else if (templateExpandableDetails) {
1352
- // If expandableDetails already exists, use it
1353
- expandableDetails = {
1354
- media: templateExpandableDetails?.media || [],
1355
- ctas: templateExpandableDetails?.ctas || [],
1356
- };
1357
- }
1358
-
1359
- // Convert from creatives format to campaign format
1360
- templateData = {
1361
- channel,
1362
- messageContent: {
1363
- content: {
1364
- channel: constants.WEBPUSH,
1365
- accountId,
1366
- content: {
1367
- title: title || '',
1368
- message: message || '',
1369
- ...(iconImageUrl && { iconImageUrl }),
1370
- ...(cta && { cta }),
1371
- ...(expandableDetails && { expandableDetails }),
1372
- },
1373
- messageSubject: channelTemplate?.name ? channelTemplate.name : 'messageSubject',
1374
- offers: [],
1375
- },
1376
- },
1377
- };
1378
- }
1379
- break;
1380
- }
1381
1125
  default:
1382
1126
  break;
1383
1127
  }
@@ -1429,7 +1173,6 @@ export class Creatives extends React.Component {
1429
1173
  case constants.SMS:
1430
1174
  case constants.WECHAT:
1431
1175
  case constants.VIBER:
1432
- case constants.WEBPUSH:
1433
1176
  break;
1434
1177
  case constants.EMAIL:
1435
1178
  gtmDetails = {
@@ -1491,7 +1234,7 @@ export class Creatives extends React.Component {
1491
1234
  processCentralCommsMetaId = (channel, creativesData) => {
1492
1235
  // Create the payload for the centralcommnsmetaId API call
1493
1236
  const { isLoyaltyModule = false, loyaltyMetaData = {} } = this.props;
1494
- const { actionName, setMetaData = () => { } } = loyaltyMetaData;
1237
+ const { actionName, setMetaData = () => {} } = loyaltyMetaData;
1495
1238
 
1496
1239
  // const isTemplateModified = getTemplateDiffState(
1497
1240
  // channel,
@@ -1541,9 +1284,6 @@ export class Creatives extends React.Component {
1541
1284
  if (prevState.currentChannel.toUpperCase() === constants.EMAIL) {
1542
1285
  newState = { ...newState, emailCreateMode: null };
1543
1286
  }
1544
- if (prevState.currentChannel.toUpperCase() === constants.INAPP) {
1545
- newState = { ...newState, inAppEditorType: null };
1546
- }
1547
1287
  return newState;
1548
1288
  });
1549
1289
  }
@@ -1589,7 +1329,7 @@ export class Creatives extends React.Component {
1589
1329
  shouldShowFooter = () => {
1590
1330
  const { isFullMode } = this.props;
1591
1331
  const {
1592
- slidBoxContent, currentChannel, emailCreateMode, templateNameExists, templateStep, mobilePushCreateMode, weChatTemplateType, templateData, inAppCreateMode,
1332
+ slidBoxContent, currentChannel, emailCreateMode, templateNameExists, templateStep, mobilePushCreateMode, weChatTemplateType, templateData,
1593
1333
  } = this.state;
1594
1334
  const channel = currentChannel.toUpperCase();
1595
1335
  const currentStep = this.creativesTemplateSteps[templateStep];
@@ -1597,13 +1337,6 @@ export class Creatives extends React.Component {
1597
1337
  showFooter = isFullMode && slidBoxContent === "preview";
1598
1338
  const isMobilepush = channel === constants.MOBILE_PUSH;
1599
1339
 
1600
- const supportCKEditor = commonUtil.hasSupportCKEditor();
1601
- if (!supportCKEditor && channel === constants.EMAIL && currentStep === 'modeSelection' && slidBoxContent === 'createTemplate') {
1602
- return true;
1603
- }
1604
- if (!supportCKEditor && channel === constants.EMAIL && currentStep === 'createTemplateContent' && slidBoxContent === 'createTemplate') {
1605
- showFooter = true;
1606
- }
1607
1340
 
1608
1341
  if (!isFullMode) {
1609
1342
  const isEmailCreate = slidBoxContent === 'createTemplate' && channel === constants.EMAIL && currentStep !== 'createTemplateContent';
@@ -1639,7 +1372,6 @@ export class Creatives extends React.Component {
1639
1372
  showFooter = true;
1640
1373
  }
1641
1374
 
1642
-
1643
1375
  if (showFooter) {
1644
1376
  if (slidBoxContent === "createTemplate" && ((channel === constants.EMAIL && currentStep === 'createTemplateContent')
1645
1377
  || ([constants.SMS, constants.WECHAT].includes(channel) && currentStep === 'modeSelection'))) {
@@ -1662,7 +1394,7 @@ export class Creatives extends React.Component {
1662
1394
 
1663
1395
  shouldShowDoneFooter = () => {
1664
1396
  const {
1665
- slidBoxContent, templateStep, currentChannel, templateData, inAppCreateMode,
1397
+ slidBoxContent, templateStep, currentChannel, templateData,
1666
1398
  } = this.state;
1667
1399
  const { isFullMode } = this.props;
1668
1400
  const currentStep = this.creativesTemplateSteps[templateStep];
@@ -1670,17 +1402,10 @@ export class Creatives extends React.Component {
1670
1402
  const channelName = !isFullMode && templateData ? templateData.type : currentChannel;
1671
1403
  const channel = channelName?.toUpperCase();
1672
1404
 
1673
- // Check supportCKEditor flag for new HTML editor flow
1674
- const supportCKEditor = commonUtil.hasSupportCKEditor();
1405
+
1675
1406
  if (channel === constants.EMAIL || channel === constants.SMS) {
1676
1407
  const isEmailCreate = slidBoxContent === 'createTemplate' && channel === constants.EMAIL && currentStep !== 'createTemplateContent';
1677
-
1678
- // For new HTML editor flow (when supportCKEditor is false), show Done footer when in createTemplateContent step
1679
- if (!supportCKEditor && channel === constants.EMAIL && slidBoxContent === 'createTemplate' && currentStep === 'createTemplateContent') {
1680
- showDone = true;
1681
- } else {
1682
- showDone = (slidBoxContent === 'editTemplate' || slidBoxContent === 'createTemplate') && !isEmailCreate;
1683
- }
1408
+ showDone = (slidBoxContent === 'editTemplate' || slidBoxContent === 'createTemplate') && !isEmailCreate;
1684
1409
  } else if ([constants.WECHAT, constants.MOBILE_PUSH].includes(channel)) {
1685
1410
  showDone = currentStep === "createTemplateContent" || slidBoxContent === "editTemplate";
1686
1411
 
@@ -1690,6 +1415,7 @@ export class Creatives extends React.Component {
1690
1415
  }
1691
1416
  }
1692
1417
 
1418
+
1693
1419
  return showDone;
1694
1420
  }
1695
1421
 
@@ -1709,18 +1435,18 @@ export class Creatives extends React.Component {
1709
1435
  templateNameComponentInput = ({ formData, onFormDataChange, name }) => {
1710
1436
  // Use local state for immediate UI feedback, fallback to prop value
1711
1437
  const displayValue = this.state.localTemplateName !== '' ? this.state.localTemplateName : name;
1712
-
1438
+
1713
1439
  return (
1714
1440
  <CapInput
1715
1441
  value={displayValue}
1716
1442
  suffix={<span />}
1717
- onBlur={() => {
1718
- this.setState({
1443
+ onBlur={() => {
1444
+ this.setState({
1719
1445
  isEditName: false,
1720
- localTemplateName: '', // Clear local state on blur
1721
- }, () => {
1722
- this.showTemplateName({ formData, onFormDataChange });
1723
- });
1446
+ localTemplateName: '' // Clear local state on blur
1447
+ }, () => {
1448
+ this.showTemplateName({ formData, onFormDataChange });
1449
+ });
1724
1450
  }}
1725
1451
  onChange={(ev) => {
1726
1452
  const { value } = ev.currentTarget;
@@ -1732,18 +1458,10 @@ export class Creatives extends React.Component {
1732
1458
  }
1733
1459
 
1734
1460
  showTemplateName = ({ formData, onFormDataChange }) => { //gets called from email/index after template data is fetched
1735
- const {
1736
- slidBoxContent, currentChannel, isEditName, templateStep,
1737
- } = this.state;
1461
+ const { slidBoxContent, currentChannel, isEditName } = this.state;
1738
1462
  const channel = currentChannel.toUpperCase();
1739
1463
  if ([constants.EMAIL, constants.MOBILE_PUSH, constants.INAPP].includes(channel) && (slidBoxContent === 'editTemplate' || slidBoxContent === 'createTemplate')) {
1740
1464
  const name = get(formData, 'template-name');
1741
-
1742
- const isModeSelectionStep = templateStep === 'modeSelection' || this.creativesTemplateSteps[templateStep] === 'modeSelection';
1743
- const isCreateMode = slidBoxContent === 'createTemplate';
1744
- if (isCreateMode && isModeSelectionStep) {
1745
- return;
1746
- }
1747
1465
  if (channel === constants.EMAIL && !name && slidBoxContent === 'createTemplate') {
1748
1466
  this.setState({ isTemplateNameEmpty: true });
1749
1467
  }
@@ -1751,9 +1469,9 @@ export class Creatives extends React.Component {
1751
1469
  if (name && !isEditName) {
1752
1470
  this.setState({ showTemplateNameComponentEdit: false });
1753
1471
  } else if (isEditName) {
1754
- this.setState({
1472
+ this.setState({
1755
1473
  showTemplateNameComponentEdit: true,
1756
- localTemplateName: name || '', // Initialize local state with current value
1474
+ localTemplateName: name || '' // Initialize local state with current value
1757
1475
  });
1758
1476
  }
1759
1477
  }
@@ -1767,31 +1485,15 @@ export class Creatives extends React.Component {
1767
1485
  });
1768
1486
  }
1769
1487
 
1770
- // Callback to update HTML Editor validation state (called from EmailWrapper)
1771
- updateHtmlEditorValidationState = (validationState) => {
1772
- this.setState({
1773
- htmlEditorValidationState: validationState,
1774
- });
1775
- }
1776
-
1777
1488
  shouldShowContinueFooter = () => { // only for email for now, has to be modified according to channel
1778
1489
  const {
1779
- slidBoxContent, templateStep, currentChannel, emailCreateMode, mobilePushCreateMode, inAppEditorType, weChatTemplateType,
1490
+ slidBoxContent, templateStep, currentChannel, emailCreateMode, mobilePushCreateMode, inAppCreateMode, weChatTemplateType,
1780
1491
  } = this.state;
1781
1492
  let isShowContinueFooter = false;
1782
1493
  const currentStep = this.creativesTemplateSteps[templateStep];
1783
1494
  const channel = currentChannel.toUpperCase();
1784
- // Check if supportCKEditor is false (new flow)
1785
- const supportCKEditor = commonUtil.hasSupportCKEditor(); // Default to legacy flow
1786
1495
  if (channel === constants.EMAIL || channel === constants.SMS) {
1787
- // New flow: Show Continue button when supportCKEditor is false and in modeSelection
1788
- // Always show it (even if disabled) - visibility is separate from enabled state
1789
- if (!supportCKEditor && currentStep === 'modeSelection' && slidBoxContent === 'createTemplate') {
1790
- return true; // Return early to ensure visibility
1791
- }
1792
-
1793
- // Legacy flow: Original logic (only when supportCKEditor is true)
1794
- if (supportCKEditor && ((emailCreateMode === "upload" && !isEmpty(this.props.EmailLayout)) || emailCreateMode === "editor")) {
1496
+ if ((emailCreateMode === "upload" && !isEmpty(this.props.EmailLayout)) || emailCreateMode === "editor") {
1795
1497
  let isEmailCreate = slidBoxContent === 'createTemplate';
1796
1498
  isEmailCreate = currentChannel.toUpperCase() === constants.EMAIL && ((emailCreateMode === "upload" && currentStep !== 'createTemplateContent') || (emailCreateMode === "editor" && currentStep !== 'createTemplateContent' && currentStep !== "templateSelection"));
1797
1499
  isShowContinueFooter = isEmailCreate && emailCreateMode;
@@ -1800,6 +1502,8 @@ export class Creatives extends React.Component {
1800
1502
  isShowContinueFooter = !isEmpty(mobilePushCreateMode) && currentStep === "modeSelection";
1801
1503
  } else if (currentChannel.toUpperCase() === constants.WECHAT) {
1802
1504
  isShowContinueFooter = !isEmpty(weChatTemplateType) && currentStep === "modeSelection";
1505
+ } else if (currentChannel.toUpperCase() === constants.INAPP) {
1506
+ isShowContinueFooter = !isEmpty(inAppCreateMode) && currentChannel === "modeSelection";
1803
1507
  }
1804
1508
 
1805
1509
  return isShowContinueFooter;
@@ -1825,28 +1529,6 @@ export class Creatives extends React.Component {
1825
1529
  return true;
1826
1530
  }
1827
1531
 
1828
- // Check if Continue button should be disabled (for new flow only)
1829
- isContinueButtonDisabled = () => {
1830
- const { currentChannel, emailCreateMode, templateNameExists } = this.state;
1831
- const { isFullMode } = this.props;
1832
- const supportCKEditor = commonUtil.hasSupportCKEditor();
1833
- if (supportCKEditor) {
1834
- return false;
1835
- }
1836
- if (currentChannel.toUpperCase() === constants.EMAIL) {
1837
- const isEditorSelected = !!emailCreateMode && emailCreateMode !== 'upload';
1838
- // In full mode: require both template name AND editor selection
1839
- // In library mode: require only editor selection (template name not needed)
1840
- if (isFullMode) {
1841
- const isTemplateNameValid = templateNameExists;
1842
- return !(isTemplateNameValid && isEditorSelected);
1843
- }
1844
- // Library mode: only editor selection is required
1845
- return !isEditorSelected;
1846
- }
1847
- return true;
1848
- }
1849
-
1850
1532
  render() {
1851
1533
  const {
1852
1534
  slidBoxContent,
@@ -1855,7 +1537,6 @@ export class Creatives extends React.Component {
1855
1537
  templateData,
1856
1538
  currentChannel,
1857
1539
  emailCreateMode,
1858
- selectedEmailCreateMode,
1859
1540
  templateStep,
1860
1541
  isLoadingContent,
1861
1542
  mobilePushCreateMode,
@@ -1868,8 +1549,6 @@ export class Creatives extends React.Component {
1868
1549
  activeFormBuilderTab,
1869
1550
  showTestAndPreviewSlidebox,
1870
1551
  isTestAndPreviewMode,
1871
- inAppEditorType,
1872
- htmlEditorValidationState,
1873
1552
  } = this.state;
1874
1553
  const {
1875
1554
  isFullMode,
@@ -1892,35 +1571,9 @@ export class Creatives extends React.Component {
1892
1571
  isLoyaltyModule,
1893
1572
  loyaltyMetaData = {},
1894
1573
  } = this.props;
1895
- // Compute Continue button label
1896
- const supportCKEditor = commonUtil.hasSupportCKEditor();
1897
- const continueButtonLabel = supportCKEditor ? messages.continue : messages.next;
1898
-
1899
1574
  const mapTemplateCreate = slidBoxContent === "createTemplate"
1900
1575
  && weChatTemplateType === MAP_TEMPLATE
1901
1576
  && templateStep !== "modeSelection";
1902
-
1903
- // Determine if we're in HTML Editor mode (where errors are shown in ValidationErrorDisplay, not ErrorInfoNote in footer)
1904
- const isEmailChannel = currentChannel?.toUpperCase() === constants.EMAIL;
1905
- const isEditMode = slidBoxContent === 'editTemplate';
1906
- const isHTMLEditorModeInCreate = selectedEmailCreateMode === 'html_editor';
1907
- const isHTMLEditorModeInEdit = isEditMode && htmlEditorValidationState != null;
1908
- const isHTMLEditorMode = isEmailChannel && (isHTMLEditorModeInCreate || isHTMLEditorModeInEdit);
1909
- const isBEEEditor = selectedEmailCreateMode === 'drag_drop'
1910
- || (emailCreateMode === 'editor' && !isHTMLEditorMode);
1911
-
1912
- // Check for BEE editor errors (same logic as SlideBoxFooter)
1913
- const hasStandardErrors = liquidErrorMessage && liquidErrorMessage.STANDARD_ERROR_MSG && liquidErrorMessage.STANDARD_ERROR_MSG.length > 0;
1914
- const hasLiquidErrors = liquidErrorMessage && liquidErrorMessage.LIQUID_ERROR_MSG && liquidErrorMessage.LIQUID_ERROR_MSG.length > 0;
1915
- const htmlEditorHasErrors = htmlEditorValidationState && htmlEditorValidationState.issueCounts && htmlEditorValidationState.issueCounts.total > 0;
1916
- const hasBEEEditorErrors = isEmailChannel && (hasStandardErrors || hasLiquidErrors) && (!htmlEditorValidationState || !htmlEditorHasErrors);
1917
-
1918
- // Only apply margin to footer when ErrorInfoNote is shown in footer (BEE editor)
1919
- // For HTML Editor, errors are shown in ValidationErrorDisplay (inside content area), so no footer margin needed
1920
- // IMPORTANT: Never show ErrorInfoNote in footer when in HTML Editor mode, even if liquidErrorMessage exists
1921
- const shouldShowErrorInfoNoteInFooter = isHTMLEditorMode ? false : hasBEEEditorErrors;
1922
-
1923
- // Calculate margin for header/content (always apply if there are errors, regardless of editor type)
1924
1577
  const slideBoxWrapperMargin = (get(liquidErrorMessage, 'STANDARD_ERROR_MSG.length', 0) > 0 && get(liquidErrorMessage, 'LIQUID_ERROR_MSG.length', 0) > 0)
1925
1578
  ? CAP_SPACE_64
1926
1579
  : get(liquidErrorMessage, 'LIQUID_ERROR_MSG.length', 0) > 0
@@ -1930,11 +1583,7 @@ export class Creatives extends React.Component {
1930
1583
  : 0;
1931
1584
  /* TODO: Instead of passing down same props separately to each component down, write common function to these props and pass it accordingly */
1932
1585
  return (
1933
- <SlideBoxWrapper
1934
- slideBoxWrapperMargin={slideBoxWrapperMargin}
1935
- shouldApplyFooterMargin={shouldShowErrorInfoNoteInFooter}
1936
- className={classnames(`${classPrefix} ${isFullMode ? 'creatives-full-mode' : 'creatives-library-mode'} ${mapTemplateCreate ? 'map-template-create' : ''}`)}
1937
- >
1586
+ <SlideBoxWrapper slideBoxWrapperMargin={slideBoxWrapperMargin} className={classnames(`${classPrefix} ${isFullMode ? 'creatives-full-mode' : 'creatives-library-mode'} ${mapTemplateCreate ? 'map-template-create' : ''}`)}>
1938
1587
  <CapSlideBox
1939
1588
  header={
1940
1589
  this.shouldShowHeader() && (
@@ -1983,8 +1632,6 @@ export class Creatives extends React.Component {
1983
1632
  onChannelChange={this.onChannelChange}
1984
1633
  onEmailModeChange={this.onEmailModeChange}//used when create is clicked in email
1985
1634
  emailCreateMode={emailCreateMode}// upload zip || use editor are values
1986
- onInAppEditorTypeChange={this.onInAppEditorTypeChange}//used when create is clicked in inapp
1987
- inAppEditorType={inAppEditorType}// htmlEditor || dragDropEditor are values
1988
1635
  templateStep={this.creativesTemplateSteps[templateStep]}
1989
1636
  onCreateNextStep={this.onCreateNextStep}
1990
1637
  onEnterTemplateName={this.onEnterTemplateName}
@@ -1994,8 +1641,6 @@ export class Creatives extends React.Component {
1994
1641
  cap={cap}
1995
1642
  setIsLoadingContent={this.setIsLoadingContent}
1996
1643
  onMobilepushModeChange={this.onMobilepushModeChange}
1997
- inAppCreateMode={this.state.inAppCreateMode}
1998
- onInAppModeChange={this.onInAppModeChange}
1999
1644
  mobilePushCreateMode={mobilePushCreateMode}
2000
1645
  showTemplateName={this.showTemplateName}
2001
1646
  onValidationFail={this.onValidationFail}
@@ -2034,7 +1679,6 @@ export class Creatives extends React.Component {
2034
1679
  handleTestAndPreview={this.handleTestAndPreview}
2035
1680
  handleCloseTestAndPreview={this.handleCloseTestAndPreview}
2036
1681
  isTestAndPreviewMode={(() => this.state.isTestAndPreviewMode)()}
2037
- onHtmlEditorValidationStateChange={this.updateHtmlEditorValidationState}
2038
1682
  />
2039
1683
  )}
2040
1684
  footer={this.shouldShowFooter() ? (
@@ -2049,7 +1693,6 @@ export class Creatives extends React.Component {
2049
1693
  currentChannel={currentChannel.toUpperCase()}
2050
1694
  templateStep={this.creativesTemplateSteps[templateStep]}
2051
1695
  emailCreateMode={emailCreateMode}
2052
- selectedEmailCreateMode={selectedEmailCreateMode}
2053
1696
  shouldShowContinueFooter={this.shouldShowContinueFooter}
2054
1697
  shouldShowDoneFooter={this.shouldShowDoneFooter}
2055
1698
  fetchingCmsData={fetchingCmsData}
@@ -2058,22 +1701,18 @@ export class Creatives extends React.Component {
2058
1701
  errorMessages={liquidErrorMessage}
2059
1702
  currentTab={activeFormBuilderTab}
2060
1703
  onTestAndPreview={this.handleTestAndPreview}
2061
- isContinueButtonDisabled={this.isContinueButtonDisabled()}
2062
- continueButtonLabel={continueButtonLabel}
2063
1704
  showTestAndPreviewButton={(() => {
2064
1705
  const isEmailOrSmsOrWhatsappOrRcsOrInAppOrMobilePush = [constants.EMAIL, constants.SMS, constants.WHATSAPP, constants.RCS, constants.INAPP, constants.MOBILE_PUSH, constants.VIBER, constants.ZALO].includes(currentChannel.toUpperCase());
2065
1706
  const showButton = isEmailOrSmsOrWhatsappOrRcsOrInAppOrMobilePush && (slidBoxContent === 'editTemplate' || slidBoxContent === 'createTemplate');
2066
1707
  return showButton;
2067
1708
  })()}
2068
- htmlEditorValidationState={htmlEditorValidationState}
2069
- isCreatingTemplate={slidBoxContent === 'createTemplate' && currentChannel.toUpperCase() === constants.EMAIL}
2070
1709
  />
2071
1710
  ) : isLiquidValidationError && (
2072
1711
  <CapRow className="template-footer-width">
2073
1712
  {(() => {
2074
1713
  const errorsToShow = get(liquidErrorMessage, constants.LIQUID_ERROR_MSG, []);
2075
1714
  const standardErrorsToShow = get(liquidErrorMessage, constants.STANDARD_ERROR_MSG, []);
2076
- return <ErrorInfoNote currentTab={activeFormBuilderTab?.toUpperCase()} errorMessages={{ LIQUID_ERROR_MSG: errorsToShow, STANDARD_ERROR_MSG: standardErrorsToShow }} />;
1715
+ return <ErrorInfoNote currentTab={activeFormBuilderTab?.toUpperCase()} errorMessages={{LIQUID_ERROR_MSG: errorsToShow, STANDARD_ERROR_MSG: standardErrorsToShow}} />;
2077
1716
  })()}
2078
1717
  </CapRow>
2079
1718
  )}