@capillarytech/creatives-library 8.0.263 → 8.0.265

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