@capillarytech/creatives-library 8.0.242-alpha.1 → 8.0.242-alpha.11

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 (255) hide show
  1. package/assets/Android.png +0 -0
  2. package/assets/iOS.png +0 -0
  3. package/config/app.js +1 -1
  4. package/constants/unified.js +2 -2
  5. package/initialReducer.js +0 -2
  6. package/package.json +1 -1
  7. package/services/api.js +5 -10
  8. package/services/tests/api.test.js +0 -18
  9. package/translations/en.json +4 -3
  10. package/utils/common.js +6 -5
  11. package/utils/commonUtils.js +1 -14
  12. package/utils/imageUrlUpload.js +141 -0
  13. package/utils/tests/commonUtil.test.js +0 -224
  14. package/utils/transformTemplateConfig.js +10 -0
  15. package/v2Components/CapDeviceContent/index.js +56 -61
  16. package/v2Components/CapImageUpload/constants.js +2 -0
  17. package/v2Components/CapImageUpload/index.js +65 -16
  18. package/v2Components/CapImageUpload/index.scss +4 -1
  19. package/v2Components/CapImageUpload/messages.js +5 -1
  20. package/v2Components/CapImageUrlUpload/constants.js +26 -0
  21. package/v2Components/CapImageUrlUpload/index.js +365 -0
  22. package/v2Components/CapImageUrlUpload/index.scss +35 -0
  23. package/v2Components/CapImageUrlUpload/messages.js +47 -0
  24. package/v2Components/CapTagList/index.js +1 -6
  25. package/v2Components/CapTagListWithInput/index.js +1 -5
  26. package/v2Components/CapTagListWithInput/messages.js +1 -1
  27. package/v2Components/CapWhatsappCTA/tests/index.test.js +0 -5
  28. package/v2Components/ErrorInfoNote/index.js +72 -412
  29. package/v2Components/ErrorInfoNote/messages.js +0 -22
  30. package/v2Components/ErrorInfoNote/style.scss +2 -279
  31. package/v2Components/HtmlEditor/HTMLEditor.js +89 -210
  32. package/v2Components/HtmlEditor/__tests__/HTMLEditor.test.js +133 -1132
  33. package/v2Components/HtmlEditor/__tests__/index.lazy.test.js +12 -17
  34. package/v2Components/HtmlEditor/_htmlEditor.scss +23 -8
  35. package/v2Components/HtmlEditor/_index.lazy.scss +1 -1
  36. package/v2Components/HtmlEditor/components/CodeEditorPane/_codeEditorPane.scss +101 -13
  37. package/v2Components/HtmlEditor/components/CodeEditorPane/index.js +139 -148
  38. package/v2Components/HtmlEditor/components/DeviceToggle/_deviceToggle.scss +1 -2
  39. package/v2Components/HtmlEditor/components/DeviceToggle/index.js +3 -3
  40. package/v2Components/HtmlEditor/components/EditorToolbar/index.js +1 -1
  41. package/v2Components/HtmlEditor/components/FullscreenModal/_fullscreenModal.scss +0 -1
  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 +6 -3
  48. package/v2Components/HtmlEditor/components/PreviewPane/index.js +11 -10
  49. package/v2Components/HtmlEditor/components/SplitContainer/_splitContainer.scss +1 -1
  50. package/v2Components/HtmlEditor/components/ValidationErrorDisplay/__tests__/index.test.js +62 -87
  51. package/v2Components/HtmlEditor/components/ValidationErrorDisplay/index.js +31 -49
  52. package/v2Components/HtmlEditor/constants.js +20 -29
  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/index.js +1 -1
  57. package/v2Components/HtmlEditor/messages.js +85 -95
  58. package/v2Components/HtmlEditor/utils/liquidTemplateSupport.js +101 -99
  59. package/v2Components/HtmlEditor/utils/properSyntaxHighlighting.js +25 -23
  60. package/v2Components/HtmlEditor/utils/validationAdapter.js +41 -34
  61. package/v2Components/MobilePushPreviewV2/index.js +7 -32
  62. package/v2Components/TemplatePreview/_templatePreview.scss +24 -44
  63. package/v2Components/TemplatePreview/index.js +32 -47
  64. package/v2Components/TemplatePreview/messages.js +0 -4
  65. package/v2Components/TestAndPreviewSlidebox/index.js +25 -31
  66. package/v2Containers/App/constants.js +5 -0
  67. package/v2Containers/BeeEditor/index.js +80 -82
  68. package/v2Containers/Cap/tests/__snapshots__/index.test.js.snap +4 -3
  69. package/v2Containers/CreativesContainer/SlideBoxContent.js +118 -148
  70. package/v2Containers/CreativesContainer/SlideBoxFooter.js +3 -9
  71. package/v2Containers/CreativesContainer/SlideBoxHeader.js +2 -2
  72. package/v2Containers/CreativesContainer/constants.js +2 -1
  73. package/v2Containers/CreativesContainer/index.js +41 -173
  74. package/v2Containers/CreativesContainer/messages.js +4 -4
  75. package/v2Containers/CreativesContainer/tests/SlideBoxContent.test.js +210 -0
  76. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +354 -38
  77. package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +0 -36
  78. package/v2Containers/Email/actions.js +0 -7
  79. package/v2Containers/Email/constants.js +1 -5
  80. package/v2Containers/Email/index.js +0 -13
  81. package/v2Containers/Email/messages.js +0 -32
  82. package/v2Containers/Email/reducer.js +1 -12
  83. package/v2Containers/Email/sagas.js +6 -41
  84. package/v2Containers/Email/tests/__snapshots__/reducer.test.js.snap +0 -2
  85. package/v2Containers/EmailWrapper/components/EmailWrapperView.js +7 -193
  86. package/v2Containers/EmailWrapper/components/HTMLEditorTesting.js +74 -40
  87. package/v2Containers/EmailWrapper/components/__tests__/HTMLEditorTesting.test.js +67 -2
  88. package/v2Containers/EmailWrapper/constants.js +0 -2
  89. package/v2Containers/EmailWrapper/hooks/useEmailWrapper.js +67 -436
  90. package/v2Containers/EmailWrapper/index.js +23 -99
  91. package/v2Containers/EmailWrapper/messages.js +1 -61
  92. package/v2Containers/EmailWrapper/tests/EmailWrapperView.test.js +1 -26
  93. package/v2Containers/EmailWrapper/tests/useEmailWrapper.test.js +77 -111
  94. package/v2Containers/InApp/actions.js +0 -7
  95. package/v2Containers/InApp/constants.js +4 -20
  96. package/v2Containers/InApp/index.js +357 -800
  97. package/v2Containers/InApp/index.scss +3 -4
  98. package/v2Containers/InApp/messages.js +3 -7
  99. package/v2Containers/InApp/reducer.js +3 -21
  100. package/v2Containers/InApp/sagas.js +9 -29
  101. package/v2Containers/InApp/selectors.js +5 -25
  102. package/v2Containers/InApp/tests/index.test.js +50 -154
  103. package/v2Containers/InApp/tests/reducer.test.js +0 -34
  104. package/v2Containers/InApp/tests/sagas.test.js +9 -61
  105. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +12 -12
  106. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +8 -8
  107. package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +100 -77
  108. package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +72 -63
  109. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +184 -150
  110. package/v2Containers/SmsTrai/Create/tests/__snapshots__/index.test.js.snap +16 -12
  111. package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +32 -28
  112. package/v2Containers/TagList/index.js +1 -67
  113. package/v2Containers/Templates/ChannelTypeIllustration.js +13 -1
  114. package/v2Containers/Templates/_templates.scss +202 -56
  115. package/v2Containers/Templates/actions.js +2 -1
  116. package/v2Containers/Templates/constants.js +1 -0
  117. package/v2Containers/Templates/index.js +278 -128
  118. package/v2Containers/Templates/messages.js +24 -4
  119. package/v2Containers/Templates/reducer.js +2 -0
  120. package/v2Containers/Templates/tests/index.test.js +10 -0
  121. package/v2Containers/TemplatesV2/index.js +8 -1
  122. package/v2Containers/TemplatesV2/messages.js +4 -0
  123. package/v2Containers/WebPush/Create/components/BrandIconSection.js +108 -0
  124. package/v2Containers/WebPush/Create/components/ButtonForm.js +172 -0
  125. package/v2Containers/WebPush/Create/components/ButtonItem.js +101 -0
  126. package/v2Containers/WebPush/Create/components/ButtonList.js +145 -0
  127. package/v2Containers/WebPush/Create/components/ButtonsLinksSection.js +164 -0
  128. package/v2Containers/WebPush/Create/components/ButtonsLinksSection.test.js +463 -0
  129. package/v2Containers/WebPush/Create/components/FormActions.js +54 -0
  130. package/v2Containers/WebPush/Create/components/FormActions.test.js +163 -0
  131. package/v2Containers/WebPush/Create/components/MediaSection.js +142 -0
  132. package/v2Containers/WebPush/Create/components/MediaSection.test.js +341 -0
  133. package/v2Containers/WebPush/Create/components/MessageSection.js +103 -0
  134. package/v2Containers/WebPush/Create/components/MessageSection.test.js +268 -0
  135. package/v2Containers/WebPush/Create/components/NotificationTitleSection.js +87 -0
  136. package/v2Containers/WebPush/Create/components/NotificationTitleSection.test.js +210 -0
  137. package/v2Containers/WebPush/Create/components/TemplateNameSection.js +54 -0
  138. package/v2Containers/WebPush/Create/components/TemplateNameSection.test.js +143 -0
  139. package/v2Containers/WebPush/Create/components/__snapshots__/ButtonsLinksSection.test.js.snap +86 -0
  140. package/v2Containers/WebPush/Create/components/__snapshots__/FormActions.test.js.snap +16 -0
  141. package/v2Containers/WebPush/Create/components/__snapshots__/MediaSection.test.js.snap +41 -0
  142. package/v2Containers/WebPush/Create/components/__snapshots__/MessageSection.test.js.snap +54 -0
  143. package/v2Containers/WebPush/Create/components/__snapshots__/NotificationTitleSection.test.js.snap +37 -0
  144. package/v2Containers/WebPush/Create/components/__snapshots__/TemplateNameSection.test.js.snap +21 -0
  145. package/v2Containers/WebPush/Create/components/_buttons.scss +246 -0
  146. package/v2Containers/WebPush/Create/components/tests/ButtonForm.test.js +554 -0
  147. package/v2Containers/WebPush/Create/components/tests/ButtonItem.test.js +607 -0
  148. package/v2Containers/WebPush/Create/components/tests/ButtonList.test.js +633 -0
  149. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonForm.test.js.snap +666 -0
  150. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonItem.test.js.snap +74 -0
  151. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonList.test.js.snap +78 -0
  152. package/v2Containers/WebPush/Create/hooks/useButtonManagement.js +138 -0
  153. package/v2Containers/WebPush/Create/hooks/useButtonManagement.test.js +406 -0
  154. package/v2Containers/WebPush/Create/hooks/useCharacterCount.js +30 -0
  155. package/v2Containers/WebPush/Create/hooks/useCharacterCount.test.js +151 -0
  156. package/v2Containers/WebPush/Create/hooks/useImageUpload.js +104 -0
  157. package/v2Containers/WebPush/Create/hooks/useImageUpload.test.js +538 -0
  158. package/v2Containers/WebPush/Create/hooks/useTagManagement.js +122 -0
  159. package/v2Containers/WebPush/Create/hooks/useTagManagement.test.js +633 -0
  160. package/v2Containers/WebPush/Create/index.js +1056 -0
  161. package/v2Containers/WebPush/Create/index.scss +134 -0
  162. package/v2Containers/WebPush/Create/messages.js +203 -0
  163. package/v2Containers/WebPush/Create/preview/DevicePreviewContent.js +228 -0
  164. package/v2Containers/WebPush/Create/preview/NotificationContainer.js +294 -0
  165. package/v2Containers/WebPush/Create/preview/PreviewContent.js +90 -0
  166. package/v2Containers/WebPush/Create/preview/PreviewControls.js +305 -0
  167. package/v2Containers/WebPush/Create/preview/PreviewDisclaimer.js +23 -0
  168. package/v2Containers/WebPush/Create/preview/WebPushPreview.js +150 -0
  169. package/v2Containers/WebPush/Create/preview/assets/Light.svg +53 -0
  170. package/v2Containers/WebPush/Create/preview/assets/Top.svg +5 -0
  171. package/v2Containers/WebPush/Create/preview/assets/android-arrow-down.svg +9 -0
  172. package/v2Containers/WebPush/Create/preview/assets/android-arrow-up.svg +9 -0
  173. package/v2Containers/WebPush/Create/preview/assets/chrome-icon.png +0 -0
  174. package/v2Containers/WebPush/Create/preview/assets/edge-icon.png +0 -0
  175. package/v2Containers/WebPush/Create/preview/assets/firefox-icon.svg +106 -0
  176. package/v2Containers/WebPush/Create/preview/assets/iOS.svg +26 -0
  177. package/v2Containers/WebPush/Create/preview/assets/macos-arrow-down-icon.svg +9 -0
  178. package/v2Containers/WebPush/Create/preview/assets/macos-triple-dot-icon.svg +9 -0
  179. package/v2Containers/WebPush/Create/preview/assets/opera-icon.svg +18 -0
  180. package/v2Containers/WebPush/Create/preview/assets/safari-icon.svg +29 -0
  181. package/v2Containers/WebPush/Create/preview/assets/windows-close-icon.svg +9 -0
  182. package/v2Containers/WebPush/Create/preview/assets/windows-triple-dot-icon.svg +9 -0
  183. package/v2Containers/WebPush/Create/preview/components/AndroidMobileChromeHeader.js +47 -0
  184. package/v2Containers/WebPush/Create/preview/components/AndroidMobileExpanded.js +141 -0
  185. package/v2Containers/WebPush/Create/preview/components/IOSHeader.js +45 -0
  186. package/v2Containers/WebPush/Create/preview/components/NotificationExpandedContent.js +68 -0
  187. package/v2Containers/WebPush/Create/preview/components/NotificationHeader.js +61 -0
  188. package/v2Containers/WebPush/Create/preview/components/WindowsChromeExpanded.js +99 -0
  189. package/v2Containers/WebPush/Create/preview/components/tests/AndroidMobileExpanded.test.js +733 -0
  190. package/v2Containers/WebPush/Create/preview/components/tests/WindowsChromeExpanded.test.js +571 -0
  191. package/v2Containers/WebPush/Create/preview/components/tests/__snapshots__/AndroidMobileExpanded.test.js.snap +81 -0
  192. package/v2Containers/WebPush/Create/preview/components/tests/__snapshots__/WindowsChromeExpanded.test.js.snap +81 -0
  193. package/v2Containers/WebPush/Create/preview/config/notificationMappings.js +50 -0
  194. package/v2Containers/WebPush/Create/preview/constants.js +637 -0
  195. package/v2Containers/WebPush/Create/preview/notification-container.scss +79 -0
  196. package/v2Containers/WebPush/Create/preview/preview.scss +351 -0
  197. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-chrome.scss +370 -0
  198. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-edge.scss +12 -0
  199. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-firefox.scss +12 -0
  200. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-opera.scss +12 -0
  201. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-chrome.scss +47 -0
  202. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-edge.scss +11 -0
  203. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-firefox.scss +11 -0
  204. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-opera.scss +11 -0
  205. package/v2Containers/WebPush/Create/preview/styles/_base.scss +207 -0
  206. package/v2Containers/WebPush/Create/preview/styles/_ios.scss +153 -0
  207. package/v2Containers/WebPush/Create/preview/styles/_ipados.scss +107 -0
  208. package/v2Containers/WebPush/Create/preview/styles/_macos-chrome.scss +101 -0
  209. package/v2Containers/WebPush/Create/preview/styles/_windows-chrome.scss +229 -0
  210. package/v2Containers/WebPush/Create/preview/tests/DevicePreviewContent.test.js +909 -0
  211. package/v2Containers/WebPush/Create/preview/tests/NotificationContainer.test.js +1081 -0
  212. package/v2Containers/WebPush/Create/preview/tests/PreviewControls.test.js +723 -0
  213. package/v2Containers/WebPush/Create/preview/tests/WebPushPreview.test.js +943 -0
  214. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/DevicePreviewContent.test.js.snap +131 -0
  215. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/NotificationContainer.test.js.snap +112 -0
  216. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/PreviewControls.test.js.snap +144 -0
  217. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/WebPushPreview.test.js.snap +129 -0
  218. package/v2Containers/WebPush/Create/utils/payloadBuilder.js +94 -0
  219. package/v2Containers/WebPush/Create/utils/payloadBuilder.test.js +390 -0
  220. package/v2Containers/WebPush/Create/utils/previewUtils.js +89 -0
  221. package/v2Containers/WebPush/Create/utils/urlValidation.js +115 -0
  222. package/v2Containers/WebPush/Create/utils/urlValidation.test.js +449 -0
  223. package/v2Containers/WebPush/Create/utils/validation.js +75 -0
  224. package/v2Containers/WebPush/Create/utils/validation.test.js +283 -0
  225. package/v2Containers/WebPush/actions.js +60 -0
  226. package/v2Containers/WebPush/constants.js +128 -0
  227. package/v2Containers/WebPush/index.js +2 -0
  228. package/v2Containers/WebPush/reducer.js +104 -0
  229. package/v2Containers/WebPush/sagas.js +119 -0
  230. package/v2Containers/WebPush/selectors.js +65 -0
  231. package/v2Containers/WebPush/tests/reducer.test.js +863 -0
  232. package/v2Containers/WebPush/tests/sagas.test.js +566 -0
  233. package/v2Containers/WebPush/tests/selectors.test.js +843 -0
  234. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +528 -431
  235. package/v2Components/HtmlEditor/components/ValidationTabs/_validationTabs.scss +0 -254
  236. package/v2Components/HtmlEditor/components/ValidationTabs/index.js +0 -362
  237. package/v2Components/HtmlEditor/components/ValidationTabs/messages.js +0 -51
  238. package/v2Containers/BeePopupEditor/constants.js +0 -10
  239. package/v2Containers/BeePopupEditor/index.js +0 -193
  240. package/v2Containers/BeePopupEditor/tests/index.test.js +0 -627
  241. package/v2Containers/EmailWrapper/components/EmailHTMLEditor.js +0 -1045
  242. package/v2Containers/InApp/__tests__/InAppHTMLEditor.test.js +0 -376
  243. package/v2Containers/InApp/__tests__/sagas.test.js +0 -363
  244. package/v2Containers/InApp/tests/selectors.test.js +0 -612
  245. package/v2Containers/InAppWrapper/components/InAppWrapperView.js +0 -162
  246. package/v2Containers/InAppWrapper/components/__tests__/InAppWrapperView.test.js +0 -267
  247. package/v2Containers/InAppWrapper/components/inAppWrapperView.scss +0 -9
  248. package/v2Containers/InAppWrapper/constants.js +0 -16
  249. package/v2Containers/InAppWrapper/hooks/__tests__/useInAppWrapper.test.js +0 -473
  250. package/v2Containers/InAppWrapper/hooks/useInAppWrapper.js +0 -198
  251. package/v2Containers/InAppWrapper/index.js +0 -148
  252. package/v2Containers/InAppWrapper/messages.js +0 -49
  253. package/v2Containers/InappAdvance/index.js +0 -1099
  254. package/v2Containers/InappAdvance/index.scss +0 -10
  255. package/v2Containers/InappAdvance/tests/index.test.js +0 -448
@@ -66,13 +66,6 @@ export function clearCRUDResponse() {
66
66
  };
67
67
  }
68
68
 
69
- export function getCmsAccounts(cmsType) {
70
- return {
71
- type: types.GET_CMS_ACCOUNTS_REQUEST,
72
- cmsType,
73
- };
74
- }
75
-
76
69
  export function clearStoreValues() {
77
70
  return {
78
71
  type: types.CLEAR_ALL_VALUES,
@@ -36,8 +36,4 @@ export const DUPLICATE_TEMPLATE_REQUEST = 'app/v2Containers/Email/DUPLICATE_TEMP
36
36
  export const DUPLICATE_TEMPLATE_SUCCESS = 'app/v2Containers/Email/DUPLICATE_TEMPLATE_SUCCESS';
37
37
  export const DUPLICATE_TEMPLATE_FAILURE = 'app/v2Containers/Email/DUPLICATE_TEMPLATE_FAILURE';
38
38
 
39
- export const TRANSFORM_EMAIL_TEMPLATE_REQUEST = 'app/v2Containers/Email/TRANSFORM_EMAIL_TEMPLATE_REQUEST';
40
-
41
- export const GET_CMS_ACCOUNTS_REQUEST = 'app/v2Containers/Email/GET_CMS_ACCOUNTS_REQUEST';
42
- export const GET_CMS_ACCOUNTS_SUCCESS = 'app/v2Containers/Email/GET_CMS_ACCOUNTS_SUCCESS';
43
- export const GET_CMS_ACCOUNTS_FAILURE = 'app/v2Containers/Email/GET_CMS_ACCOUNTS_FAILURE';
39
+ export const TRANSFORM_EMAIL_TEMPLATE_REQUEST = 'app/v2Containers/Email/TRANSFORM_EMAIL_TEMPLATE_REQUEST';
@@ -2998,19 +2998,6 @@ function mapDispatchToProps(dispatch) {
2998
2998
  const withReducer = injectReducer({ key: 'email', reducer: v2EmailReducer });
2999
2999
  const withEmailSaga = injectSaga({ key: 'email', saga: v2EmailSagas });
3000
3000
 
3001
- // Base Email component without saga registration (for use from EmailWrapper)
3002
- // EmailWrapper already registers the saga, so we don't need to register it here
3003
- export const EmailWithoutSaga = withCreatives({
3004
- WrappedComponent: Email,
3005
- mapStateToProps,
3006
- mapDispatchToProps,
3007
- userAuth: true,
3008
- sagas: [], // No saga - EmailWrapper registers it
3009
- reducers: [withReducer],
3010
- });
3011
-
3012
- // Email component with saga registration (for direct use from SlideBoxContent in Edit mode)
3013
- // When Email is used directly (not as child of EmailWrapper), it needs to register the saga
3014
3001
  export default withCreatives({
3015
3002
  WrappedComponent: Email,
3016
3003
  mapStateToProps,
@@ -302,36 +302,4 @@ export default defineMessages({
302
302
  id: 'creatives.containersV2.Email.base64ImageError',
303
303
  defaultMessage: 'Base64 images are not allowed. Please upload your image to a gallery and use it, or add the image URL instead.',
304
304
  },
305
- "editorTypeTitle": {
306
- id: 'creatives.containersV2.Email.editorTypeTitle',
307
- defaultMessage: 'Editor type',
308
- },
309
- "htmlEditorTitle": {
310
- id: 'creatives.containersV2.Email.htmlEditorTitle',
311
- defaultMessage: 'HTML editor',
312
- },
313
- "htmlEditorDescription": {
314
- id: 'creatives.containersV2.Email.htmlEditorDescription',
315
- defaultMessage: 'Use a basic HTML editor to write and format your content. Suitable if you are familiar with HTML.',
316
- },
317
- "dragDropEditorTitle": {
318
- id: 'creatives.containersV2.Email.dragDropEditorTitle',
319
- defaultMessage: 'Drag & drop editor',
320
- },
321
- "dragDropEditorDescription": {
322
- id: 'creatives.containersV2.Email.dragDropEditorDescription',
323
- defaultMessage: 'Create your content visually by dragging blocks — no coding needed. Great for quick, easy designs.',
324
- },
325
- "uploadZipTitle": {
326
- id: 'creatives.containersV2.Email.uploadZipTitle',
327
- defaultMessage: 'Upload zip file',
328
- },
329
- "uploadZipDescription": {
330
- id: 'creatives.containersV2.Email.uploadZipDescription',
331
- defaultMessage: 'Upload a ZIP containing your custom HTML, images, and assets. Ideal if your content is already built.',
332
- },
333
- "nextButton": {
334
- id: 'creatives.containersV2.Email.nextButton',
335
- defaultMessage: 'Next',
336
- },
337
305
  });
@@ -11,7 +11,6 @@ import * as types from './constants';
11
11
  const initialState = fromJS({
12
12
  createTemplateInProgress: false,
13
13
  createResponse: {},
14
- isBeeEnabled: false,
15
14
  });
16
15
 
17
16
  function emailReducer(state = initialState, action) {
@@ -108,15 +107,6 @@ function emailReducer(state = initialState, action) {
108
107
  return state
109
108
  .set('fetchingCmsData', false)
110
109
  .set('fetchingCmsDataFailed', true);
111
- case types.GET_CMS_ACCOUNTS_REQUEST:
112
- return state
113
- .set('isBeeEnabled', false); // default to false
114
- case types.GET_CMS_ACCOUNTS_SUCCESS:
115
- return state
116
- .set('isBeeEnabled', action.isBeeEnabled);
117
- case types.GET_CMS_ACCOUNTS_FAILURE:
118
- return state
119
- .set('isBeeEnabled', false);
120
110
  case types.CLEAR_EMAIL_CRUD_RESPONSE_REQUEST:
121
111
  return state
122
112
  .set('createResponse', fromJS({}));
@@ -149,8 +139,7 @@ function emailReducer(state = initialState, action) {
149
139
  .set('CmsSettings', fromJS({}))
150
140
  .set('fetchingCmsData', false)
151
141
  .set('duplicateResponse', fromJS({}))
152
- .set('cmsData', '')
153
- .set('isBeeEnabled', false);
142
+ .set('cmsData', '');
154
143
  case types.TRANSFORM_EMAIL_TEMPLATE_REQUEST:
155
144
  return state.set("createTemplateInProgress", true);
156
145
  default:
@@ -9,29 +9,15 @@ export function* createTemplate(template) {
9
9
  let errorMsg;
10
10
  try {
11
11
  const result = yield call(Api.createEmailTemplate, template);
12
- // Check if the API call failed (non-2xx status codes or explicit failure)
13
- const statusCode = result.status?.code || result.status;
14
- const isError = !result.success || statusCode >= 400;
15
-
16
- if (isError) {
12
+ if (!result.success || result.status.code === 500) {
17
13
  errorMsg = result.message;
18
14
  yield put({ type: types.CREATE_TEMPLATE_FAILURE, errorMsg });
19
- // Call callback with error so component can handle it
20
- if (template.onCreateTemplateComplete) {
21
- yield template.onCreateTemplateComplete({ error: true, message: errorMsg, statusCode });
22
- }
23
15
  } else {
24
- yield put({
25
- type: types.CREATE_TEMPLATE_SUCCESS, data: result.response, statusCode: result.status ? result.status.code : '', errorMsg,
26
- });
16
+ yield put({ type: types.CREATE_TEMPLATE_SUCCESS, data: result.response, statusCode: result.status ? result.status.code : '', errorMsg });
27
17
  yield template.onCreateTemplateComplete(result.response);
28
18
  }
29
19
  } catch (error) {
30
20
  yield put({ type: types.CREATE_TEMPLATE_FAILURE, error, errorMsg });
31
- // Call callback with error so component can handle it
32
- if (template.onCreateTemplateComplete) {
33
- yield template.onCreateTemplateComplete({ error: true, message: errorMsg || error.message });
34
- }
35
21
  }
36
22
  }
37
23
 
@@ -40,14 +26,14 @@ export function* transformEmailTemplate({template, callback}) {
40
26
  const result = yield call(transformEmailTemplates, template);
41
27
  yield callback(result);
42
28
  } catch (error) {
43
- yield callback(template);
29
+ yield callback(template);
44
30
  }
45
31
  }
46
32
 
47
33
  export function* duplicateTemplate(payload) {
48
34
  let errorMsg;
49
35
  let result;
50
- const { id, channel, callback } = payload;
36
+ let { id, channel, callback } = payload;
51
37
  try {
52
38
  result = yield call(Api.duplicateTemplate, {id, channel} );
53
39
  if (result.status.code === 500) {
@@ -56,9 +42,7 @@ export function* duplicateTemplate(payload) {
56
42
  if (callback) {
57
43
  callback(result?.response);
58
44
  }
59
- yield put({
60
- type: types.DUPLICATE_TEMPLATE_SUCCESS, data: result?.response, statusCode: result?.status?.code, errorMsg,
61
- });
45
+ yield put({ type: types.DUPLICATE_TEMPLATE_SUCCESS, data: result?.response, statusCode: result?.status?.code, errorMsg });
62
46
  } catch (error) {
63
47
  yield put({ type: types.DUPLICATE_TEMPLATE_FAILURE, error, errorMsg });
64
48
  }
@@ -83,9 +67,7 @@ export function* getAllAssets(assetType, queryParams) {
83
67
  }
84
68
  }
85
69
 
86
- export function* getCmsSetting({
87
- cmsType, projectId, cmsMode, langId, isEdmSupport, isBEEAppEnable,
88
- }) {
70
+ export function* getCmsSetting({cmsType, projectId, cmsMode, langId, isEdmSupport, isBEEAppEnable}) {
89
71
  try {
90
72
  const result = yield call(Api.getCmsTemplateSettingsV2, cmsType, projectId, cmsMode, langId, isEdmSupport, isBEEAppEnable);
91
73
 
@@ -105,17 +87,6 @@ export function* getCmsData({cmsType, projectId, langId}) {
105
87
  }
106
88
  }
107
89
 
108
- export function* getCmsAccounts({cmsType}) {
109
- try {
110
- const result = yield call(Api.getCmsAccounts, cmsType);
111
- const { cmsAccounts } = result.data?.response || {};
112
- const isBeeEnabled = cmsAccounts?.type === cmsType;
113
- yield put({ type: types.GET_CMS_ACCOUNTS_SUCCESS, isBeeEnabled });
114
- } catch (error) {
115
- yield put({ type: types.GET_CMS_ACCOUNTS_FAILURE, error });
116
- }
117
- }
118
-
119
90
  export function* uploadAsset(file, assetType, fileParams) {
120
91
  try {
121
92
  const result = yield call(Api.uploadFile, file, assetType, fileParams);
@@ -152,10 +123,6 @@ function* watchGetCmsData() {
152
123
  yield takeEvery(types.GET_CMS_EDITOR_DATA_REQUEST, getCmsData);
153
124
  }
154
125
 
155
- function* watchGetCmsAccounts() {
156
- yield takeEvery(types.GET_CMS_ACCOUNTS_REQUEST, getCmsAccounts);
157
- }
158
-
159
126
  function* watchUploadAsset() {
160
127
  yield takeLatest(types.UPLOAD_ASSET_REQUEST, uploadAsset);
161
128
  }
@@ -172,7 +139,6 @@ export default [
172
139
  watchGetAllAssets,
173
140
  watchGetCmsSetting,
174
141
  watchGetCmsData,
175
- watchGetCmsAccounts,
176
142
  watchUploadAsset,
177
143
  watchDuplicateTemplate,
178
144
  ];
@@ -185,7 +151,6 @@ export function* v2EmailSagas() {
185
151
  watchGetAllAssets(),
186
152
  watchGetCmsSetting(),
187
153
  watchGetCmsData(),
188
- watchGetCmsAccounts(),
189
154
  watchUploadAsset(),
190
155
  ]);
191
156
  }
@@ -4,7 +4,6 @@ exports[` 1`] = `
4
4
  Immutable.Map {
5
5
  "createTemplateInProgress": false,
6
6
  "createResponse": Immutable.Map {},
7
- "isBeeEnabled": false,
8
7
  }
9
8
  `;
10
9
 
@@ -12,6 +11,5 @@ exports[` 2`] = `
12
11
  Immutable.Map {
13
12
  "createTemplateInProgress": true,
14
13
  "createResponse": Immutable.Map {},
15
- "isBeeEnabled": false,
16
14
  }
17
15
  `;
@@ -1,4 +1,4 @@
1
- import React, { useRef, useCallback } from 'react';
1
+ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { FormattedMessage } from 'react-intl';
4
4
  import styled from 'styled-components';
@@ -11,15 +11,10 @@ import CapSpin from '@capillarytech/cap-ui-library/CapSpin';
11
11
  import CapButton from '@capillarytech/cap-ui-library/CapButton';
12
12
  import CapError from '@capillarytech/cap-ui-library/CapError';
13
13
  import ComponentWithLabelHOC from '@capillarytech/cap-ui-library/assets/HOCs/ComponentWithLabelHOC';
14
- import { CAP_COLOR_06, CAP_WHITE } from '@capillarytech/cap-ui-library/styled/variables';
15
- import { EmailWithoutSaga } from '../../Email';
14
+ import Email from '../../Email';
16
15
  import CmsTemplatesComponent from '../../../v2Components/CmsTemplatesComponent';
17
- import EmailHTMLEditor from './EmailHTMLEditor';
18
- import TestAndPreviewSlidebox from '../../../v2Components/TestAndPreviewSlidebox';
19
- import { EMAIL } from '../../CreativesContainer/constants';
20
16
  import messages from '../messages';
21
17
  import { EMAIL_CREATE_MODES, STEPS } from '../constants';
22
- import { hasSupportCKEditor } from '../../../utils/common';
23
18
 
24
19
  const CapRadioCardWithLabel = ComponentWithLabelHOC(CapRadioCard);
25
20
 
@@ -32,23 +27,9 @@ const CardContainer = styled.div`
32
27
  }
33
28
  }
34
29
  }
35
-
36
- .ant-radio-group.cap-radioCard-v2 {
37
- .ant-radio-button-wrapper {
38
- &.ant-radio-button-wrapper-checked {
39
- .icon-container {
40
- background-color: ${CAP_COLOR_06};
41
- .anticon,
42
- .cap-icon {
43
- color: ${CAP_WHITE};
44
- }
45
- }
46
- }
47
- }
48
- }
49
30
  `;
50
31
 
51
- // Mode selection component
32
+ // Mode selection component that handles the creation mode selection UI
52
33
  const ModeSelectionUI = ({
53
34
  isFullMode,
54
35
  templateName,
@@ -70,7 +51,7 @@ const ModeSelectionUI = ({
70
51
  value={templateName}
71
52
  labelPosition="top"
72
53
  size="default"
73
- style={{ width: '68%' }}
54
+ style={{ width: '68%'}}
74
55
  />
75
56
  )}
76
57
  <CardContainer>
@@ -117,21 +98,15 @@ ModeSelectionUI.propTypes = {
117
98
  uploadButtonLabel: PropTypes.node.isRequired,
118
99
  };
119
100
 
120
- // Content creation component
101
+ // Content creation component that handles the email or template selection UI
121
102
  const ContentCreationUI = ({
122
103
  isShowEmailCreate,
123
104
  emailProps,
124
105
  cmsTemplatesProps,
125
- isHTMLEditorMode,
126
- htmlEditorProps,
127
106
  }) => (
128
107
  <>
129
108
  {isShowEmailCreate ? (
130
- isHTMLEditorMode ? (
131
- <EmailHTMLEditor {...htmlEditorProps} />
132
- ) : (
133
- <EmailWithoutSaga {...emailProps} />
134
- )
109
+ <Email {...emailProps} />
135
110
  ) : (
136
111
  <CmsTemplatesComponent {...cmsTemplatesProps} />
137
112
  )}
@@ -142,8 +117,6 @@ ContentCreationUI.propTypes = {
142
117
  isShowEmailCreate: PropTypes.bool.isRequired,
143
118
  emailProps: PropTypes.object.isRequired,
144
119
  cmsTemplatesProps: PropTypes.object.isRequired,
145
- isHTMLEditorMode: PropTypes.bool,
146
- htmlEditorProps: PropTypes.object,
147
120
  };
148
121
 
149
122
  // Main EmailWrapper presentational component
@@ -164,130 +137,9 @@ const EmailWrapperView = ({
164
137
  isShowEmailCreate,
165
138
  emailProps,
166
139
  cmsTemplatesProps,
167
- metaEntities,
168
- loadingTags,
169
- injectedTags,
170
- globalActions,
171
- supportedTags,
172
- getDefaultTags,
173
- location,
174
- currentOrgDetails,
175
- forwardedTags,
176
- selectedOfferDetails,
177
- eventContextTags,
178
- getFormdata,
179
- isGetFormData,
180
- getLiquidTags,
181
- showLiquidErrorInFooter,
182
- onValidationFail,
183
- emailActions,
184
- Email,
185
- templateData: templateDataProp,
186
- params,
187
- fetchingLiquidTags,
188
- createTemplateInProgress,
189
- fetchingCmsData,
190
- setIsLoadingContent,
191
- showTestAndPreviewSlidebox,
192
- handleCloseTestAndPreview,
193
- showTemplateName,
194
140
  }) => {
195
- const htmlEditorRef = useRef(null);
196
- const supportCKEditor = hasSupportCKEditor();
197
- const hasParamsIdForEditor = params?.id || location?.query?.id || location?.params?.id || location?.pathname?.includes('/edit/');
198
- const isEditModeForEditor = hasParamsIdForEditor;
199
- const isBEEFromProps = emailProps?.editor === 'BEE' && emailProps?.selectedEditorMode === null;
200
- const isDragDropFromCreateMode = emailCreateMode === EMAIL_CREATE_MODES.DRAG_DROP;
201
- const isExplicitlyBEEEditor = isBEEFromProps || isDragDropFromCreateMode;
202
- let isHTMLEditorMode = false;
203
141
 
204
- if (supportCKEditor) {
205
- isHTMLEditorMode = false; // Legacy flow: use Email component
206
- } else if (isEditModeForEditor) {
207
- isHTMLEditorMode = !isExplicitlyBEEEditor;
208
- } else {
209
- if (isExplicitlyBEEEditor || isBEEFromProps || isDragDropFromCreateMode) {
210
- isHTMLEditorMode = false;
211
- } else {
212
- isHTMLEditorMode = emailProps?.selectedEditorMode === EMAIL_CREATE_MODES.HTML_EDITOR ||
213
- emailCreateMode === EMAIL_CREATE_MODES.HTML_EDITOR;
214
- }
215
- }
216
-
217
- const isShowTemplateSelection = step === STEPS.MODE_SELECTION;
218
-
219
- // Create onFormDataChange callback for template name updates (similar to Email component)
220
- // This allows CreativesContainer to update the template name when user clicks "Edit name"
221
- // When user edits the name in CreativesContainer header, it calls this callback
222
- // which updates the template name in EmailWrapper, and then CreativesContainer
223
- // will call showTemplateName again with the updated formData
224
- const handleFormDataChange = useCallback((updatedFormData) => {
225
- const newTemplateName = updatedFormData?.['template-name'] || templateName;
226
- if (newTemplateName !== templateName && onTemplateNameChange) {
227
- // Update template name in parent (useEmailWrapper hook)
228
- onTemplateNameChange({ target: { value: newTemplateName } });
229
- }
230
- // Note: CreativesContainer will call showTemplateName again after this callback
231
- // (it stores the callback in templateContainerDetails and calls it after state updates)
232
- }, [templateName, onTemplateNameChange]);
233
-
234
- const htmlEditorProps = isHTMLEditorMode ? {
235
- // Location and params
236
- location,
237
- params,
238
- // Tag-related props
239
- getDefaultTags,
240
- supportedTags,
241
- metaEntities,
242
- injectedTags,
243
- globalActions,
244
- loadingTags,
245
- eventContextTags,
246
- forwardedTags,
247
- selectedOfferDetails,
248
- currentOrgDetails,
249
- // Email Redux state and actions
250
- Email,
251
- emailActions,
252
- // Full mode props
253
- isFullMode,
254
- templateName,
255
- isGetFormData,
256
- getFormdata,
257
- // Library mode props
258
- templateData: templateDataProp,
259
- // Uploaded content from zip file
260
- EmailLayout,
261
- // Liquid validation
262
- getLiquidTags,
263
- showLiquidErrorInFooter,
264
- onValidationFail,
265
- // Template name
266
- showTemplateName,
267
- onFormDataChange: handleFormDataChange,
268
- // Loading states
269
- fetchingLiquidTags: fetchingLiquidTags || false,
270
- createTemplateInProgress: createTemplateInProgress || false,
271
- fetchingCmsData: fetchingCmsData || false,
272
- // Parent loading control
273
- setIsLoadingContent,
274
- ref: htmlEditorRef,
275
- } : {};
276
-
277
- // Get formData for TestAndPreviewSlidebox when needed
278
- const getFormDataForPreview = () => {
279
- if (htmlEditorRef.current && htmlEditorRef.current.getFormDataForPreview) {
280
- return htmlEditorRef.current.getFormDataForPreview();
281
- }
282
- return {};
283
- };
284
-
285
- const getContentForPreview = () => {
286
- if (htmlEditorRef.current && htmlEditorRef.current.getContentForPreview) {
287
- return htmlEditorRef.current.getContentForPreview();
288
- }
289
- return '';
290
- };
142
+ const isShowTemplateSelection = step === STEPS.MODE_SELECTION || (step === STEPS.TEMPLATE_SELECTION && emailCreateMode === EMAIL_CREATE_MODES.UPLOAD);
291
143
 
292
144
  return (
293
145
  <>
@@ -311,22 +163,9 @@ const EmailWrapperView = ({
311
163
  isShowEmailCreate={isShowEmailCreate}
312
164
  emailProps={emailProps}
313
165
  cmsTemplatesProps={cmsTemplatesProps}
314
- isHTMLEditorMode={isHTMLEditorMode}
315
- htmlEditorProps={htmlEditorProps}
316
166
  />
317
167
  )}
318
168
  </CapSpin>
319
- {/* Render TestAndPreviewSlidebox for HTML Editor (similar to legacy Email component) */}
320
- {isHTMLEditorMode && showTestAndPreviewSlidebox && (
321
- <TestAndPreviewSlidebox
322
- show={showTestAndPreviewSlidebox}
323
- onClose={handleCloseTestAndPreview}
324
- formData={getFormDataForPreview()}
325
- content={getContentForPreview()}
326
- currentChannel={EMAIL}
327
- currentTab={1}
328
- />
329
- )}
330
169
  </>
331
170
  );
332
171
  };
@@ -336,10 +175,6 @@ EmailWrapperView.propTypes = {
336
175
  emailCreateMode: PropTypes.string,
337
176
  step: PropTypes.string,
338
177
  isFullMode: PropTypes.bool,
339
- getFormdata: PropTypes.func,
340
- isGetFormData: PropTypes.bool,
341
- getLiquidTags: PropTypes.func,
342
- showLiquidErrorInFooter: PropTypes.func,
343
178
  templateName: PropTypes.string,
344
179
  onTemplateNameChange: PropTypes.func.isRequired,
345
180
  isTemplateNameEmpty: PropTypes.bool,
@@ -352,27 +187,6 @@ EmailWrapperView.propTypes = {
352
187
  isShowEmailCreate: PropTypes.bool.isRequired,
353
188
  emailProps: PropTypes.object.isRequired,
354
189
  cmsTemplatesProps: PropTypes.object.isRequired,
355
- metaEntities: PropTypes.object,
356
- loadingTags: PropTypes.bool,
357
- injectedTags: PropTypes.object,
358
- globalActions: PropTypes.object,
359
- supportedTags: PropTypes.array,
360
- getDefaultTags: PropTypes.string,
361
- location: PropTypes.object,
362
- currentOrgDetails: PropTypes.object,
363
- forwardedTags: PropTypes.object,
364
- selectedOfferDetails: PropTypes.array,
365
- eventContextTags: PropTypes.array,
366
- emailActions: PropTypes.object,
367
- Email: PropTypes.object,
368
- templateData: PropTypes.object,
369
- params: PropTypes.object,
370
- fetchingLiquidTags: PropTypes.bool,
371
- createTemplateInProgress: PropTypes.bool,
372
- fetchingCmsData: PropTypes.bool,
373
- setIsLoadingContent: PropTypes.func,
374
- showTestAndPreviewSlidebox: PropTypes.bool,
375
- handleCloseTestAndPreview: PropTypes.func,
376
190
  };
377
191
 
378
192
  export default EmailWrapperView;