@capillarytech/creatives-library 8.0.242-alpha.0 → 8.0.242-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/assets/Android.png +0 -0
  2. package/assets/iOS.png +0 -0
  3. package/constants/unified.js +2 -1
  4. package/initialReducer.js +2 -0
  5. package/package.json +1 -1
  6. package/sagas/__tests__/assetPolling.test.js +74 -3
  7. package/sagas/assetPolling.js +8 -1
  8. package/services/api.js +10 -5
  9. package/services/tests/api.test.js +18 -0
  10. package/translations/en.json +0 -1
  11. package/utils/common.js +5 -0
  12. package/utils/commonUtils.js +14 -1
  13. package/utils/tests/commonUtil.test.js +224 -0
  14. package/utils/transformTemplateConfig.js +0 -10
  15. package/utils/transformerUtils.js +0 -42
  16. package/v2Components/CapDeviceContent/index.js +61 -56
  17. package/v2Components/CapImageUpload/constants.js +0 -2
  18. package/v2Components/CapImageUpload/index.js +14 -54
  19. package/v2Components/CapImageUpload/index.scss +1 -4
  20. package/v2Components/CapImageUpload/messages.js +0 -4
  21. package/v2Components/CapTagList/index.js +6 -1
  22. package/v2Components/CapTagListWithInput/index.js +5 -1
  23. package/v2Components/CapTagListWithInput/messages.js +1 -1
  24. package/v2Components/CapWhatsappCTA/tests/index.test.js +5 -0
  25. package/v2Components/ErrorInfoNote/index.js +412 -72
  26. package/v2Components/ErrorInfoNote/messages.js +22 -0
  27. package/v2Components/ErrorInfoNote/style.scss +279 -2
  28. package/v2Components/HtmlEditor/HTMLEditor.js +217 -90
  29. package/v2Components/HtmlEditor/__tests__/HTMLEditor.test.js +1132 -133
  30. package/v2Components/HtmlEditor/__tests__/index.lazy.test.js +17 -12
  31. package/v2Components/HtmlEditor/_htmlEditor.scss +15 -23
  32. package/v2Components/HtmlEditor/_index.lazy.scss +1 -1
  33. package/v2Components/HtmlEditor/components/CodeEditorPane/_codeEditorPane.scss +13 -101
  34. package/v2Components/HtmlEditor/components/CodeEditorPane/index.js +148 -139
  35. package/v2Components/HtmlEditor/components/DeviceToggle/_deviceToggle.scss +2 -1
  36. package/v2Components/HtmlEditor/components/DeviceToggle/index.js +3 -3
  37. package/v2Components/HtmlEditor/components/EditorToolbar/_editorToolbar.scss +1 -0
  38. package/v2Components/HtmlEditor/components/EditorToolbar/index.js +1 -1
  39. package/v2Components/HtmlEditor/components/FullscreenModal/_fullscreenModal.scss +1 -0
  40. package/v2Components/HtmlEditor/components/InAppPreviewPane/DeviceFrame.js +4 -7
  41. package/v2Components/HtmlEditor/components/InAppPreviewPane/__tests__/DeviceFrame.test.js +35 -45
  42. package/v2Components/HtmlEditor/components/InAppPreviewPane/_inAppPreviewPane.scss +1 -3
  43. package/v2Components/HtmlEditor/components/InAppPreviewPane/constants.js +33 -33
  44. package/v2Components/HtmlEditor/components/InAppPreviewPane/index.js +7 -6
  45. package/v2Components/HtmlEditor/components/PreviewPane/_previewPane.scss +3 -6
  46. package/v2Components/HtmlEditor/components/PreviewPane/index.js +10 -11
  47. package/v2Components/HtmlEditor/components/SplitContainer/_splitContainer.scss +1 -1
  48. package/v2Components/HtmlEditor/components/ValidationErrorDisplay/__tests__/index.test.js +87 -62
  49. package/v2Components/HtmlEditor/components/ValidationErrorDisplay/index.js +49 -31
  50. package/v2Components/HtmlEditor/components/ValidationTabs/_validationTabs.scss +254 -0
  51. package/v2Components/HtmlEditor/components/ValidationTabs/index.js +362 -0
  52. package/v2Components/HtmlEditor/components/ValidationTabs/messages.js +51 -0
  53. package/v2Components/HtmlEditor/constants.js +29 -20
  54. package/v2Components/HtmlEditor/hooks/__tests__/useInAppContent.test.js +373 -16
  55. package/v2Components/HtmlEditor/hooks/useEditorContent.js +5 -2
  56. package/v2Components/HtmlEditor/hooks/useInAppContent.js +88 -146
  57. package/v2Components/HtmlEditor/index.js +1 -1
  58. package/v2Components/HtmlEditor/messages.js +95 -85
  59. package/v2Components/HtmlEditor/utils/liquidTemplateSupport.js +99 -101
  60. package/v2Components/HtmlEditor/utils/properSyntaxHighlighting.js +23 -25
  61. package/v2Components/HtmlEditor/utils/validationAdapter.js +34 -41
  62. package/v2Components/MobilePushPreviewV2/index.js +32 -7
  63. package/v2Components/TemplatePreview/_templatePreview.scss +44 -24
  64. package/v2Components/TemplatePreview/index.js +47 -32
  65. package/v2Components/TemplatePreview/messages.js +4 -0
  66. package/v2Components/TestAndPreviewSlidebox/index.js +31 -25
  67. package/v2Containers/App/constants.js +0 -5
  68. package/v2Containers/BeeEditor/index.js +82 -80
  69. package/v2Containers/BeePopupEditor/constants.js +10 -0
  70. package/v2Containers/BeePopupEditor/index.js +193 -0
  71. package/v2Containers/BeePopupEditor/tests/index.test.js +627 -0
  72. package/v2Containers/Cap/tests/__snapshots__/index.test.js.snap +0 -1
  73. package/v2Containers/CreativesContainer/SlideBoxContent.js +148 -120
  74. package/v2Containers/CreativesContainer/SlideBoxFooter.js +9 -3
  75. package/v2Containers/CreativesContainer/SlideBoxHeader.js +2 -2
  76. package/v2Containers/CreativesContainer/constants.js +1 -2
  77. package/v2Containers/CreativesContainer/index.js +173 -193
  78. package/v2Containers/CreativesContainer/messages.js +4 -4
  79. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +38 -50
  80. package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +36 -0
  81. package/v2Containers/Email/actions.js +7 -0
  82. package/v2Containers/Email/constants.js +5 -1
  83. package/v2Containers/Email/index.js +13 -0
  84. package/v2Containers/Email/messages.js +32 -0
  85. package/v2Containers/Email/reducer.js +12 -1
  86. package/v2Containers/Email/sagas.js +41 -6
  87. package/v2Containers/Email/tests/__snapshots__/reducer.test.js.snap +2 -0
  88. package/v2Containers/EmailWrapper/components/EmailHTMLEditor.js +1046 -0
  89. package/v2Containers/EmailWrapper/components/EmailWrapperView.js +193 -7
  90. package/v2Containers/EmailWrapper/components/HTMLEditorTesting.js +40 -74
  91. package/v2Containers/EmailWrapper/components/__tests__/HTMLEditorTesting.test.js +2 -67
  92. package/v2Containers/EmailWrapper/constants.js +2 -0
  93. package/v2Containers/EmailWrapper/hooks/useEmailWrapper.js +436 -67
  94. package/v2Containers/EmailWrapper/index.js +99 -23
  95. package/v2Containers/EmailWrapper/messages.js +61 -1
  96. package/v2Containers/EmailWrapper/tests/EmailWrapperView.test.js +26 -1
  97. package/v2Containers/EmailWrapper/tests/useEmailWrapper.test.js +111 -77
  98. package/v2Containers/InApp/__tests__/InAppHTMLEditor.test.js +376 -0
  99. package/v2Containers/InApp/__tests__/sagas.test.js +363 -0
  100. package/v2Containers/InApp/actions.js +7 -0
  101. package/v2Containers/InApp/constants.js +20 -4
  102. package/v2Containers/InApp/index.js +800 -357
  103. package/v2Containers/InApp/index.scss +4 -3
  104. package/v2Containers/InApp/messages.js +7 -3
  105. package/v2Containers/InApp/reducer.js +21 -3
  106. package/v2Containers/InApp/sagas.js +29 -9
  107. package/v2Containers/InApp/selectors.js +25 -5
  108. package/v2Containers/InApp/tests/index.test.js +154 -50
  109. package/v2Containers/InApp/tests/reducer.test.js +34 -0
  110. package/v2Containers/InApp/tests/sagas.test.js +61 -9
  111. package/v2Containers/InApp/tests/selectors.test.js +612 -0
  112. package/v2Containers/InAppWrapper/components/InAppWrapperView.js +162 -0
  113. package/v2Containers/InAppWrapper/components/__tests__/InAppWrapperView.test.js +267 -0
  114. package/v2Containers/InAppWrapper/components/inAppWrapperView.scss +9 -0
  115. package/v2Containers/InAppWrapper/constants.js +16 -0
  116. package/v2Containers/InAppWrapper/hooks/__tests__/useInAppWrapper.test.js +473 -0
  117. package/v2Containers/InAppWrapper/hooks/useInAppWrapper.js +198 -0
  118. package/v2Containers/InAppWrapper/index.js +148 -0
  119. package/v2Containers/InAppWrapper/messages.js +49 -0
  120. package/v2Containers/InappAdvance/index.js +1099 -0
  121. package/v2Containers/InappAdvance/index.scss +10 -0
  122. package/v2Containers/InappAdvance/tests/index.test.js +448 -0
  123. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +3 -3
  124. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +2 -2
  125. package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +2 -25
  126. package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +9 -18
  127. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +12 -46
  128. package/v2Containers/SmsTrai/Create/tests/__snapshots__/index.test.js.snap +0 -4
  129. package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +4 -8
  130. package/v2Containers/TagList/index.js +67 -1
  131. package/v2Containers/Templates/ChannelTypeIllustration.js +1 -13
  132. package/v2Containers/Templates/_templates.scss +56 -200
  133. package/v2Containers/Templates/actions.js +1 -2
  134. package/v2Containers/Templates/constants.js +0 -1
  135. package/v2Containers/Templates/index.js +124 -277
  136. package/v2Containers/Templates/messages.js +4 -24
  137. package/v2Containers/Templates/reducer.js +0 -2
  138. package/v2Containers/Templates/tests/index.test.js +0 -10
  139. package/v2Containers/TemplatesV2/index.js +2 -3
  140. package/v2Containers/TemplatesV2/messages.js +0 -4
  141. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +35 -132
  142. package/v2Components/CapImageUrlUpload/constants.js +0 -19
  143. package/v2Components/CapImageUrlUpload/index.js +0 -455
  144. package/v2Components/CapImageUrlUpload/index.scss +0 -35
  145. package/v2Components/CapImageUrlUpload/messages.js +0 -47
  146. package/v2Containers/WebPush/Create/components/ButtonForm.js +0 -175
  147. package/v2Containers/WebPush/Create/components/ButtonItem.js +0 -101
  148. package/v2Containers/WebPush/Create/components/ButtonList.js +0 -144
  149. package/v2Containers/WebPush/Create/components/_buttons.scss +0 -246
  150. package/v2Containers/WebPush/Create/components/tests/ButtonForm.test.js +0 -554
  151. package/v2Containers/WebPush/Create/components/tests/ButtonItem.test.js +0 -607
  152. package/v2Containers/WebPush/Create/components/tests/ButtonList.test.js +0 -633
  153. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonForm.test.js.snap +0 -666
  154. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonItem.test.js.snap +0 -74
  155. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonList.test.js.snap +0 -80
  156. package/v2Containers/WebPush/Create/index.js +0 -1755
  157. package/v2Containers/WebPush/Create/index.scss +0 -123
  158. package/v2Containers/WebPush/Create/messages.js +0 -199
  159. package/v2Containers/WebPush/Create/preview/DevicePreviewContent.js +0 -241
  160. package/v2Containers/WebPush/Create/preview/NotificationContainer.js +0 -290
  161. package/v2Containers/WebPush/Create/preview/PreviewContent.js +0 -81
  162. package/v2Containers/WebPush/Create/preview/PreviewControls.js +0 -240
  163. package/v2Containers/WebPush/Create/preview/PreviewDisclaimer.js +0 -23
  164. package/v2Containers/WebPush/Create/preview/WebPushPreview.js +0 -144
  165. package/v2Containers/WebPush/Create/preview/assets/Light.svg +0 -53
  166. package/v2Containers/WebPush/Create/preview/assets/Top.svg +0 -5
  167. package/v2Containers/WebPush/Create/preview/assets/chrome-icon.png +0 -0
  168. package/v2Containers/WebPush/Create/preview/assets/edge-icon.png +0 -0
  169. package/v2Containers/WebPush/Create/preview/assets/firefox-icon.svg +0 -106
  170. package/v2Containers/WebPush/Create/preview/assets/iOS.svg +0 -26
  171. package/v2Containers/WebPush/Create/preview/assets/opera-icon.svg +0 -18
  172. package/v2Containers/WebPush/Create/preview/assets/safari-icon.svg +0 -29
  173. package/v2Containers/WebPush/Create/preview/components/AndroidMobileChromeHeader.js +0 -44
  174. package/v2Containers/WebPush/Create/preview/components/AndroidMobileExpanded.js +0 -110
  175. package/v2Containers/WebPush/Create/preview/components/IOSHeader.js +0 -45
  176. package/v2Containers/WebPush/Create/preview/components/NotificationExpandedContent.js +0 -72
  177. package/v2Containers/WebPush/Create/preview/components/NotificationHeader.js +0 -55
  178. package/v2Containers/WebPush/Create/preview/components/WindowsChromeExpanded.js +0 -70
  179. package/v2Containers/WebPush/Create/preview/components/tests/AndroidMobileExpanded.test.js +0 -512
  180. package/v2Containers/WebPush/Create/preview/components/tests/__snapshots__/AndroidMobileExpanded.test.js.snap +0 -77
  181. package/v2Containers/WebPush/Create/preview/config/notificationMappings.js +0 -527
  182. package/v2Containers/WebPush/Create/preview/constants.js +0 -162
  183. package/v2Containers/WebPush/Create/preview/notification-container.scss +0 -104
  184. package/v2Containers/WebPush/Create/preview/preview.scss +0 -409
  185. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-chrome.scss +0 -300
  186. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-edge.scss +0 -12
  187. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-firefox.scss +0 -12
  188. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-opera.scss +0 -12
  189. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-chrome.scss +0 -303
  190. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-edge.scss +0 -11
  191. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-firefox.scss +0 -11
  192. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-opera.scss +0 -11
  193. package/v2Containers/WebPush/Create/preview/styles/_base.scss +0 -188
  194. package/v2Containers/WebPush/Create/preview/styles/_ios.scss +0 -106
  195. package/v2Containers/WebPush/Create/preview/styles/_ipados.scss +0 -107
  196. package/v2Containers/WebPush/Create/preview/styles/_macos-chrome.scss +0 -75
  197. package/v2Containers/WebPush/Create/preview/styles/_windows-chrome.scss +0 -174
  198. package/v2Containers/WebPush/Create/preview/tests/DevicePreviewContent.test.js +0 -909
  199. package/v2Containers/WebPush/Create/preview/tests/NotificationContainer.test.js +0 -1077
  200. package/v2Containers/WebPush/Create/preview/tests/PreviewControls.test.js +0 -723
  201. package/v2Containers/WebPush/Create/preview/tests/WebPushPreview.test.js +0 -943
  202. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/DevicePreviewContent.test.js.snap +0 -128
  203. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/NotificationContainer.test.js.snap +0 -121
  204. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/PreviewControls.test.js.snap +0 -144
  205. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/WebPushPreview.test.js.snap +0 -127
  206. package/v2Containers/WebPush/Create/utils/urlValidation.js +0 -116
  207. package/v2Containers/WebPush/Create/utils/urlValidation.test.js +0 -449
  208. package/v2Containers/WebPush/actions.js +0 -60
  209. package/v2Containers/WebPush/constants.js +0 -108
  210. package/v2Containers/WebPush/index.js +0 -2
  211. package/v2Containers/WebPush/reducer.js +0 -104
  212. package/v2Containers/WebPush/sagas.js +0 -119
  213. package/v2Containers/WebPush/selectors.js +0 -65
  214. package/v2Containers/WebPush/tests/reducer.test.js +0 -863
  215. package/v2Containers/WebPush/tests/sagas.test.js +0 -566
  216. package/v2Containers/WebPush/tests/selectors.test.js +0 -960
@@ -2,20 +2,22 @@
2
2
 
3
3
  exports[`Test SlideBoxContent container Email component isTestAndPreviewMode IIFE Should handle isTestAndPreviewMode IIFE in Email edit mode with ID 1`] = `
4
4
  <SlideBoxContent__CreativesWrapper>
5
- <ForwardRef
5
+ <Connect(UserIsAuthenticated(Component))
6
6
  cap={Object {}}
7
7
  editor="default"
8
+ emailCreateMode="editor"
8
9
  eventContextTags={Object {}}
9
- getDefaultTags=""
10
+ getCmsTemplatesInProgress={false}
10
11
  handleCloseTestAndPreview={[MockFunction]}
11
12
  handleTestAndPreview={[MockFunction]}
12
13
  isLoyaltyModule={false}
13
14
  isTestAndPreviewMode={true}
14
- key="cretives-container-email-edit"
15
+ key="cretives-container-email-edit-wrapper"
15
16
  location={
16
17
  Object {
17
- "pathname": "/email/edit",
18
+ "pathname": "/email/edit/123",
18
19
  "query": Object {
20
+ "id": "123",
19
21
  "module": "library",
20
22
  "type": "embedded",
21
23
  },
@@ -28,14 +30,10 @@ exports[`Test SlideBoxContent container Email component isTestAndPreviewMode IIF
28
30
  "id": "123",
29
31
  }
30
32
  }
31
- route={
32
- Object {
33
- "name": "email",
34
- }
35
- }
36
33
  showLiquidErrorInFooter={false}
37
34
  showTemplateName={[MockFunction]}
38
35
  showTestAndPreviewSlidebox={true}
36
+ step="createTemplateContent"
39
37
  templateData={
40
38
  Object {
41
39
  "_id": "123",
@@ -47,26 +45,29 @@ exports[`Test SlideBoxContent container Email component isTestAndPreviewMode IIF
47
45
  },
48
46
  }
49
47
  }
48
+ type=""
50
49
  />
51
50
  </SlideBoxContent__CreativesWrapper>
52
51
  `;
53
52
 
54
53
  exports[`Test SlideBoxContent container Email component isTestAndPreviewMode IIFE Should handle isTestAndPreviewMode IIFE in Email edit mode with ID 2`] = `
55
54
  <SlideBoxContent__CreativesWrapper>
56
- <ForwardRef
55
+ <Connect(UserIsAuthenticated(Component))
57
56
  cap={Object {}}
58
57
  editor="default"
58
+ emailCreateMode="editor"
59
59
  eventContextTags={Object {}}
60
- getDefaultTags=""
60
+ getCmsTemplatesInProgress={false}
61
61
  handleCloseTestAndPreview={[MockFunction]}
62
62
  handleTestAndPreview={[MockFunction]}
63
63
  isLoyaltyModule={false}
64
64
  isTestAndPreviewMode={false}
65
- key="cretives-container-email-edit"
65
+ key="cretives-container-email-edit-wrapper"
66
66
  location={
67
67
  Object {
68
- "pathname": "/email/edit",
68
+ "pathname": "/email/edit/123",
69
69
  "query": Object {
70
+ "id": "123",
70
71
  "module": "library",
71
72
  "type": "embedded",
72
73
  },
@@ -79,14 +80,10 @@ exports[`Test SlideBoxContent container Email component isTestAndPreviewMode IIF
79
80
  "id": "123",
80
81
  }
81
82
  }
82
- route={
83
- Object {
84
- "name": "email",
85
- }
86
- }
87
83
  showLiquidErrorInFooter={false}
88
84
  showTemplateName={[MockFunction]}
89
85
  showTestAndPreviewSlidebox={false}
86
+ step="createTemplateContent"
90
87
  templateData={
91
88
  Object {
92
89
  "_id": "123",
@@ -98,26 +95,29 @@ exports[`Test SlideBoxContent container Email component isTestAndPreviewMode IIF
98
95
  },
99
96
  }
100
97
  }
98
+ type=""
101
99
  />
102
100
  </SlideBoxContent__CreativesWrapper>
103
101
  `;
104
102
 
105
103
  exports[`Test SlideBoxContent container Email component isTestAndPreviewMode IIFE Should handle isTestAndPreviewMode IIFE in Email edit mode without ID 1`] = `
106
104
  <SlideBoxContent__CreativesWrapper>
107
- <ForwardRef
105
+ <Connect(UserIsAuthenticated(Component))
108
106
  cap={Object {}}
109
107
  editor="default"
108
+ emailCreateMode="editor"
110
109
  eventContextTags={Object {}}
111
- getDefaultTags=""
110
+ getCmsTemplatesInProgress={false}
112
111
  handleCloseTestAndPreview={[MockFunction]}
113
112
  handleTestAndPreview={[MockFunction]}
114
113
  isLoyaltyModule={false}
115
114
  isTestAndPreviewMode={true}
116
- key="cretives-container-email-edit"
115
+ key="cretives-container-email-edit-wrapper"
117
116
  location={
118
117
  Object {
119
- "pathname": "/email/edit",
118
+ "pathname": "/email/edit/undefined",
120
119
  "query": Object {
120
+ "id": undefined,
121
121
  "module": "library",
122
122
  "type": "embedded",
123
123
  },
@@ -130,14 +130,10 @@ exports[`Test SlideBoxContent container Email component isTestAndPreviewMode IIF
130
130
  "id": undefined,
131
131
  }
132
132
  }
133
- route={
134
- Object {
135
- "name": "email",
136
- }
137
- }
138
133
  showLiquidErrorInFooter={false}
139
134
  showTemplateName={[MockFunction]}
140
135
  showTestAndPreviewSlidebox={true}
136
+ step="createTemplateContent"
141
137
  templateData={
142
138
  Object {
143
139
  "type": "EMAIL",
@@ -148,26 +144,29 @@ exports[`Test SlideBoxContent container Email component isTestAndPreviewMode IIF
148
144
  },
149
145
  }
150
146
  }
147
+ type=""
151
148
  />
152
149
  </SlideBoxContent__CreativesWrapper>
153
150
  `;
154
151
 
155
152
  exports[`Test SlideBoxContent container Email component isTestAndPreviewMode IIFE Should handle isTestAndPreviewMode IIFE in Email edit mode without ID 2`] = `
156
153
  <SlideBoxContent__CreativesWrapper>
157
- <ForwardRef
154
+ <Connect(UserIsAuthenticated(Component))
158
155
  cap={Object {}}
159
156
  editor="default"
157
+ emailCreateMode="editor"
160
158
  eventContextTags={Object {}}
161
- getDefaultTags=""
159
+ getCmsTemplatesInProgress={false}
162
160
  handleCloseTestAndPreview={[MockFunction]}
163
161
  handleTestAndPreview={[MockFunction]}
164
162
  isLoyaltyModule={false}
165
163
  isTestAndPreviewMode={false}
166
- key="cretives-container-email-edit"
164
+ key="cretives-container-email-edit-wrapper"
167
165
  location={
168
166
  Object {
169
- "pathname": "/email/edit",
167
+ "pathname": "/email/edit/undefined",
170
168
  "query": Object {
169
+ "id": undefined,
171
170
  "module": "library",
172
171
  "type": "embedded",
173
172
  },
@@ -180,14 +179,10 @@ exports[`Test SlideBoxContent container Email component isTestAndPreviewMode IIF
180
179
  "id": undefined,
181
180
  }
182
181
  }
183
- route={
184
- Object {
185
- "name": "email",
186
- }
187
- }
188
182
  showLiquidErrorInFooter={false}
189
183
  showTemplateName={[MockFunction]}
190
184
  showTestAndPreviewSlidebox={false}
185
+ step="createTemplateContent"
191
186
  templateData={
192
187
  Object {
193
188
  "type": "EMAIL",
@@ -198,6 +193,7 @@ exports[`Test SlideBoxContent container Email component isTestAndPreviewMode IIF
198
193
  },
199
194
  }
200
195
  }
196
+ type=""
201
197
  />
202
198
  </SlideBoxContent__CreativesWrapper>
203
199
  `;
@@ -1101,25 +1097,17 @@ exports[`Test SlideBoxContent container Should render correct component for what
1101
1097
 
1102
1098
  exports[`Test SlideBoxContent container Should render correct component for whatsapp channel create mode 2`] = `
1103
1099
  <SlideBoxContent__CreativesWrapper>
1104
- <ForwardRef
1100
+ <Connect(Connect(UserIsAuthenticated(InjectIntl(CreativesCommon))))
1101
+ date={0}
1105
1102
  getDefaultTags=""
1106
- location={
1107
- Object {
1108
- "pathname": "/inapp/create",
1109
- "query": Object {
1110
- "isEditFromCampaigns": undefined,
1111
- "module": "library",
1112
- "type": "embedded",
1113
- },
1114
- "search": "",
1115
- }
1116
- }
1103
+ key="creatives-inapp-wrapper"
1117
1104
  onCreateComplete={[MockFunction]}
1118
1105
  templateData={
1119
1106
  Object {
1120
1107
  "mode": "create",
1121
1108
  }
1122
1109
  }
1110
+ type=""
1123
1111
  />
1124
1112
  </SlideBoxContent__CreativesWrapper>
1125
1113
  `;
@@ -1283,7 +1271,7 @@ exports[`Test SlideBoxContent container Should render correctly with isTestAndPr
1283
1271
 
1284
1272
  exports[`Test SlideBoxContent container Should render correctly with isTestAndPreviewMode disabled 2`] = `
1285
1273
  <SlideBoxContent__CreativesWrapper>
1286
- <Connect(UserIsAuthenticated(Connect(InjectIntl(EmailWrapper))))
1274
+ <Connect(UserIsAuthenticated(Component))
1287
1275
  date={0}
1288
1276
  getCmsTemplatesInProgress={false}
1289
1277
  isTestAndPreviewMode={false}
@@ -1357,7 +1345,7 @@ exports[`Test SlideBoxContent container Should render correctly with isTestAndPr
1357
1345
 
1358
1346
  exports[`Test SlideBoxContent container Should render correctly with isTestAndPreviewMode enabled 2`] = `
1359
1347
  <SlideBoxContent__CreativesWrapper>
1360
- <Connect(UserIsAuthenticated(Connect(InjectIntl(EmailWrapper))))
1348
+ <Connect(UserIsAuthenticated(Component))
1361
1349
  date={0}
1362
1350
  getCmsTemplatesInProgress={false}
1363
1351
  isTestAndPreviewMode={true}
@@ -17,6 +17,7 @@ exports[`Test SlideBoxContent container campaign message, add creative click rcs
17
17
  handleCloseTestAndPreview={[Function]}
18
18
  handleTestAndPreview={[Function]}
19
19
  hostName=""
20
+ inAppEditorType={null}
20
21
  isTestAndPreviewMode={false}
21
22
  loyaltyMetaData={
22
23
  Object {
@@ -32,6 +33,8 @@ exports[`Test SlideBoxContent container campaign message, add creative click rcs
32
33
  onEnterTemplateName={[Function]}
33
34
  onFTPSubmit={[MockFunction]}
34
35
  onFacebookSubmit={[MockFunction]}
36
+ onInAppEditorTypeChange={[Function]}
37
+ onInAppModeChange={[Function]}
35
38
  onMobilepushModeChange={[Function]}
36
39
  onPreviewTemplate={[Function]}
37
40
  onRemoveTemplateName={[Function]}
@@ -103,6 +106,7 @@ exports[`Test SlideBoxContent container campaign message, add creative click wha
103
106
  handleCloseTestAndPreview={[Function]}
104
107
  handleTestAndPreview={[Function]}
105
108
  hostName=""
109
+ inAppEditorType={null}
106
110
  isTestAndPreviewMode={false}
107
111
  loyaltyMetaData={
108
112
  Object {
@@ -118,6 +122,8 @@ exports[`Test SlideBoxContent container campaign message, add creative click wha
118
122
  onEnterTemplateName={[Function]}
119
123
  onFTPSubmit={[MockFunction]}
120
124
  onFacebookSubmit={[MockFunction]}
125
+ onInAppEditorTypeChange={[Function]}
126
+ onInAppModeChange={[Function]}
121
127
  onMobilepushModeChange={[Function]}
122
128
  onPreviewTemplate={[Function]}
123
129
  onRemoveTemplateName={[Function]}
@@ -189,6 +195,7 @@ exports[`Test SlideBoxContent container campaign message, whatsapp edit all data
189
195
  handleCloseTestAndPreview={[Function]}
190
196
  handleTestAndPreview={[Function]}
191
197
  hostName=""
198
+ inAppEditorType={null}
192
199
  isTestAndPreviewMode={false}
193
200
  loyaltyMetaData={
194
201
  Object {
@@ -204,6 +211,8 @@ exports[`Test SlideBoxContent container campaign message, whatsapp edit all data
204
211
  onEnterTemplateName={[Function]}
205
212
  onFTPSubmit={[MockFunction]}
206
213
  onFacebookSubmit={[MockFunction]}
214
+ onInAppEditorTypeChange={[Function]}
215
+ onInAppModeChange={[Function]}
207
216
  onMobilepushModeChange={[Function]}
208
217
  onPreviewTemplate={[Function]}
209
218
  onRemoveTemplateName={[Function]}
@@ -226,6 +235,12 @@ exports[`Test SlideBoxContent container campaign message, whatsapp edit all data
226
235
  }
227
236
  footer={
228
237
  <SlideBoxFooter
238
+ continueButtonLabel={
239
+ Object {
240
+ "defaultMessage": "Next",
241
+ "id": "creatives.containersV2.Creatives.next",
242
+ }
243
+ }
229
244
  currentChannel="WHATSAPP"
230
245
  currentTab="ANDROID"
231
246
  errorMessages={
@@ -234,6 +249,7 @@ exports[`Test SlideBoxContent container campaign message, whatsapp edit all data
234
249
  "STANDARD_ERROR_MSG": Array [],
235
250
  }
236
251
  }
252
+ isContinueButtonDisabled={true}
237
253
  isLiquidValidationError={false}
238
254
  onCreateNextStep={[Function]}
239
255
  onDiscard={[Function]}
@@ -287,6 +303,7 @@ exports[`Test SlideBoxContent container campaign message, whatsapp edit min data
287
303
  handleCloseTestAndPreview={[Function]}
288
304
  handleTestAndPreview={[Function]}
289
305
  hostName=""
306
+ inAppEditorType={null}
290
307
  isTestAndPreviewMode={false}
291
308
  loyaltyMetaData={
292
309
  Object {
@@ -302,6 +319,8 @@ exports[`Test SlideBoxContent container campaign message, whatsapp edit min data
302
319
  onEnterTemplateName={[Function]}
303
320
  onFTPSubmit={[MockFunction]}
304
321
  onFacebookSubmit={[MockFunction]}
322
+ onInAppEditorTypeChange={[Function]}
323
+ onInAppModeChange={[Function]}
305
324
  onMobilepushModeChange={[Function]}
306
325
  onPreviewTemplate={[Function]}
307
326
  onRemoveTemplateName={[Function]}
@@ -324,6 +343,12 @@ exports[`Test SlideBoxContent container campaign message, whatsapp edit min data
324
343
  }
325
344
  footer={
326
345
  <SlideBoxFooter
346
+ continueButtonLabel={
347
+ Object {
348
+ "defaultMessage": "Next",
349
+ "id": "creatives.containersV2.Creatives.next",
350
+ }
351
+ }
327
352
  currentChannel="WHATSAPP"
328
353
  currentTab="ANDROID"
329
354
  errorMessages={
@@ -332,6 +357,7 @@ exports[`Test SlideBoxContent container campaign message, whatsapp edit min data
332
357
  "STANDARD_ERROR_MSG": Array [],
333
358
  }
334
359
  }
360
+ isContinueButtonDisabled={true}
335
361
  isLiquidValidationError={false}
336
362
  onCreateNextStep={[Function]}
337
363
  onDiscard={[Function]}
@@ -385,6 +411,7 @@ exports[`Test SlideBoxContent container it should clear the url, on channel chan
385
411
  handleCloseTestAndPreview={[Function]}
386
412
  handleTestAndPreview={[Function]}
387
413
  hostName=""
414
+ inAppEditorType={null}
388
415
  isTestAndPreviewMode={false}
389
416
  loyaltyMetaData={
390
417
  Object {
@@ -400,6 +427,8 @@ exports[`Test SlideBoxContent container it should clear the url, on channel chan
400
427
  onEnterTemplateName={[Function]}
401
428
  onFTPSubmit={[MockFunction]}
402
429
  onFacebookSubmit={[MockFunction]}
430
+ onInAppEditorTypeChange={[Function]}
431
+ onInAppModeChange={[Function]}
403
432
  onMobilepushModeChange={[Function]}
404
433
  onPreviewTemplate={[Function]}
405
434
  onRemoveTemplateName={[Function]}
@@ -422,6 +451,12 @@ exports[`Test SlideBoxContent container it should clear the url, on channel chan
422
451
  }
423
452
  footer={
424
453
  <SlideBoxFooter
454
+ continueButtonLabel={
455
+ Object {
456
+ "defaultMessage": "Next",
457
+ "id": "creatives.containersV2.Creatives.next",
458
+ }
459
+ }
425
460
  currentChannel="WHATSAPP"
426
461
  currentTab="ANDROID"
427
462
  errorMessages={
@@ -430,6 +465,7 @@ exports[`Test SlideBoxContent container it should clear the url, on channel chan
430
465
  "STANDARD_ERROR_MSG": Array [],
431
466
  }
432
467
  }
468
+ isContinueButtonDisabled={true}
433
469
  isLiquidValidationError={false}
434
470
  onCreateNextStep={[Function]}
435
471
  onDiscard={[Function]}
@@ -66,6 +66,13 @@ 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
+
69
76
  export function clearStoreValues() {
70
77
  return {
71
78
  type: types.CLEAR_ALL_VALUES,
@@ -36,4 +36,8 @@ 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';
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';
@@ -2998,6 +2998,19 @@ 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
3001
3014
  export default withCreatives({
3002
3015
  WrappedComponent: Email,
3003
3016
  mapStateToProps,
@@ -302,4 +302,36 @@ 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
+ },
305
337
  });
@@ -11,6 +11,7 @@ import * as types from './constants';
11
11
  const initialState = fromJS({
12
12
  createTemplateInProgress: false,
13
13
  createResponse: {},
14
+ isBeeEnabled: false,
14
15
  });
15
16
 
16
17
  function emailReducer(state = initialState, action) {
@@ -107,6 +108,15 @@ function emailReducer(state = initialState, action) {
107
108
  return state
108
109
  .set('fetchingCmsData', false)
109
110
  .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);
110
120
  case types.CLEAR_EMAIL_CRUD_RESPONSE_REQUEST:
111
121
  return state
112
122
  .set('createResponse', fromJS({}));
@@ -139,7 +149,8 @@ function emailReducer(state = initialState, action) {
139
149
  .set('CmsSettings', fromJS({}))
140
150
  .set('fetchingCmsData', false)
141
151
  .set('duplicateResponse', fromJS({}))
142
- .set('cmsData', '');
152
+ .set('cmsData', '')
153
+ .set('isBeeEnabled', false);
143
154
  case types.TRANSFORM_EMAIL_TEMPLATE_REQUEST:
144
155
  return state.set("createTemplateInProgress", true);
145
156
  default:
@@ -9,15 +9,29 @@ export function* createTemplate(template) {
9
9
  let errorMsg;
10
10
  try {
11
11
  const result = yield call(Api.createEmailTemplate, template);
12
- if (!result.success || result.status.code === 500) {
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) {
13
17
  errorMsg = result.message;
14
18
  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
+ }
15
23
  } else {
16
- yield put({ type: types.CREATE_TEMPLATE_SUCCESS, data: result.response, statusCode: result.status ? result.status.code : '', errorMsg });
24
+ yield put({
25
+ type: types.CREATE_TEMPLATE_SUCCESS, data: result.response, statusCode: result.status ? result.status.code : '', errorMsg,
26
+ });
17
27
  yield template.onCreateTemplateComplete(result.response);
18
28
  }
19
29
  } catch (error) {
20
30
  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
+ }
21
35
  }
22
36
  }
23
37
 
@@ -26,14 +40,14 @@ export function* transformEmailTemplate({template, callback}) {
26
40
  const result = yield call(transformEmailTemplates, template);
27
41
  yield callback(result);
28
42
  } catch (error) {
29
- yield callback(template);
43
+ yield callback(template);
30
44
  }
31
45
  }
32
46
 
33
47
  export function* duplicateTemplate(payload) {
34
48
  let errorMsg;
35
49
  let result;
36
- let { id, channel, callback } = payload;
50
+ const { id, channel, callback } = payload;
37
51
  try {
38
52
  result = yield call(Api.duplicateTemplate, {id, channel} );
39
53
  if (result.status.code === 500) {
@@ -42,7 +56,9 @@ export function* duplicateTemplate(payload) {
42
56
  if (callback) {
43
57
  callback(result?.response);
44
58
  }
45
- yield put({ type: types.DUPLICATE_TEMPLATE_SUCCESS, data: result?.response, statusCode: result?.status?.code, errorMsg });
59
+ yield put({
60
+ type: types.DUPLICATE_TEMPLATE_SUCCESS, data: result?.response, statusCode: result?.status?.code, errorMsg,
61
+ });
46
62
  } catch (error) {
47
63
  yield put({ type: types.DUPLICATE_TEMPLATE_FAILURE, error, errorMsg });
48
64
  }
@@ -67,7 +83,9 @@ export function* getAllAssets(assetType, queryParams) {
67
83
  }
68
84
  }
69
85
 
70
- export function* getCmsSetting({cmsType, projectId, cmsMode, langId, isEdmSupport, isBEEAppEnable}) {
86
+ export function* getCmsSetting({
87
+ cmsType, projectId, cmsMode, langId, isEdmSupport, isBEEAppEnable,
88
+ }) {
71
89
  try {
72
90
  const result = yield call(Api.getCmsTemplateSettingsV2, cmsType, projectId, cmsMode, langId, isEdmSupport, isBEEAppEnable);
73
91
 
@@ -87,6 +105,17 @@ export function* getCmsData({cmsType, projectId, langId}) {
87
105
  }
88
106
  }
89
107
 
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
+
90
119
  export function* uploadAsset(file, assetType, fileParams) {
91
120
  try {
92
121
  const result = yield call(Api.uploadFile, file, assetType, fileParams);
@@ -123,6 +152,10 @@ function* watchGetCmsData() {
123
152
  yield takeEvery(types.GET_CMS_EDITOR_DATA_REQUEST, getCmsData);
124
153
  }
125
154
 
155
+ function* watchGetCmsAccounts() {
156
+ yield takeEvery(types.GET_CMS_ACCOUNTS_REQUEST, getCmsAccounts);
157
+ }
158
+
126
159
  function* watchUploadAsset() {
127
160
  yield takeLatest(types.UPLOAD_ASSET_REQUEST, uploadAsset);
128
161
  }
@@ -139,6 +172,7 @@ export default [
139
172
  watchGetAllAssets,
140
173
  watchGetCmsSetting,
141
174
  watchGetCmsData,
175
+ watchGetCmsAccounts,
142
176
  watchUploadAsset,
143
177
  watchDuplicateTemplate,
144
178
  ];
@@ -151,6 +185,7 @@ export function* v2EmailSagas() {
151
185
  watchGetAllAssets(),
152
186
  watchGetCmsSetting(),
153
187
  watchGetCmsData(),
188
+ watchGetCmsAccounts(),
154
189
  watchUploadAsset(),
155
190
  ]);
156
191
  }
@@ -4,6 +4,7 @@ exports[` 1`] = `
4
4
  Immutable.Map {
5
5
  "createTemplateInProgress": false,
6
6
  "createResponse": Immutable.Map {},
7
+ "isBeeEnabled": false,
7
8
  }
8
9
  `;
9
10
 
@@ -11,5 +12,6 @@ exports[` 2`] = `
11
12
  Immutable.Map {
12
13
  "createTemplateInProgress": true,
13
14
  "createResponse": Immutable.Map {},
15
+ "isBeeEnabled": false,
14
16
  }
15
17
  `;