@capillarytech/creatives-library 7.18.0-beta.0 → 8.0.0

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 (334) hide show
  1. package/app.js +27 -54
  2. package/assets/Line_Preview_English.svg +24 -0
  3. package/assets/Line_Preview_Japanese.svg +24 -0
  4. package/components/CapTagList/index.js +2 -2
  5. package/components/CapTagList/messages.js +8 -0
  6. package/components/Ckeditor/index.js +4 -2
  7. package/components/Ckeditor/style.scss +3 -0
  8. package/components/FormBuilder/_formBuilder.scss +4 -16
  9. package/components/FormBuilder/index.js +4 -3
  10. package/components/FormBuilder/messages.js +4 -0
  11. package/components/Sidebar/index.js +4 -4
  12. package/config/path.js +1 -1
  13. package/containers/App/constants.js +95 -0
  14. package/containers/App/index.js +52 -0
  15. package/containers/App/sagas.js +8 -3
  16. package/containers/Assets/Gallery/index.js +17 -3
  17. package/containers/Assets/Gallery/messages.js +4 -0
  18. package/containers/Assets/Gallery/sagas.js +14 -14
  19. package/containers/Cap/index.js +84 -50
  20. package/containers/Cap/sagas.js +20 -12
  21. package/containers/Cap/selectors.js +13 -13
  22. package/containers/Cap/tests/__snapshots__/index.test.js.snap +1 -1
  23. package/containers/Cap/tests/saga.test.js +81 -1
  24. package/containers/Dashboard/index.js +34 -17
  25. package/containers/Dashboard/sagas.js +7 -1
  26. package/containers/Ebill/index.js +16 -3
  27. package/containers/Ebill/sagas.js +18 -11
  28. package/containers/Email/index.js +20 -3
  29. package/containers/Email/sagas.js +34 -23
  30. package/containers/LanguageProvider/index.js +49 -31
  31. package/containers/LanguageProvider/tests/index.test.js +5 -3
  32. package/containers/Line/Create/index.js +15 -2
  33. package/containers/Line/Create/sagas.js +26 -17
  34. package/containers/Line/Edit/sagas.js +12 -13
  35. package/containers/Login/index.js +36 -11
  36. package/containers/MobilePush/Create/index.js +17 -2
  37. package/containers/MobilePush/Create/sagas.js +18 -12
  38. package/containers/MobilePush/Edit/index.js +20 -3
  39. package/containers/MobilePush/Edit/sagas.js +30 -20
  40. package/containers/Sms/Create/index.js +15 -2
  41. package/containers/Sms/Create/sagas.js +8 -6
  42. package/containers/Sms/Edit/index.js +15 -3
  43. package/containers/Sms/Edit/sagas.js +14 -8
  44. package/containers/TagList/constants.js +23 -0
  45. package/containers/Templates/actions.js +0 -5
  46. package/containers/Templates/index.js +47 -14
  47. package/containers/Templates/sagas.js +20 -23
  48. package/containers/WeChat/MapTemplates/index.js +19 -2
  49. package/containers/WeChat/MapTemplates/sagas.js +17 -17
  50. package/containers/WeChat/RichmediaTemplates/Create/index.js +18 -2
  51. package/containers/WeChat/RichmediaTemplates/Create/sagas.js +11 -8
  52. package/containers/WeChat/RichmediaTemplates/Edit/index.js +21 -2
  53. package/containers/WeChat/RichmediaTemplates/Edit/sagas.js +9 -5
  54. package/entry.js +2 -0
  55. package/global-styles.js +2 -2
  56. package/gtm/eventDefinitionsMap.js +1 -1
  57. package/helpers/intl-enzym-test-helpers.js +1 -1
  58. package/hoc/withReactRouterV3Compatibility.js +66 -0
  59. package/index.js +12 -0
  60. package/initialReducer.js +32 -0
  61. package/initialState.js +1 -0
  62. package/mfe-exposed-components.js +8 -0
  63. package/package.json +16 -11
  64. package/routes.js +206 -749
  65. package/services/api.js +62 -17
  66. package/services/tests/api.test.js +248 -1
  67. package/styles/components/navigation/_leftnav.scss +13 -0
  68. package/styles/containers/layout/_layoutPage.scss +14 -0
  69. package/tests/integration/TemplateCreation/TemplateCreation.integration.test.js +21 -16
  70. package/tests/store.test.js +5 -3
  71. package/translations/en.json +1 -9
  72. package/translations/ja-JP.json +0 -8
  73. package/translations/zh.json +0 -8
  74. package/utils/authWrapper.js +43 -17
  75. package/utils/cdnTransformation.js +73 -44
  76. package/utils/checkStore.js +21 -0
  77. package/utils/common.js +198 -8
  78. package/utils/commonUtils.js +17 -1
  79. package/utils/customAuthWrapper.js +62 -0
  80. package/utils/customConnectedAuthWrapper.js +26 -0
  81. package/utils/history.js +8 -0
  82. package/utils/injectReducer.js +2 -0
  83. package/utils/injectSaga.js +2 -0
  84. package/utils/tagValidations.js +2 -2
  85. package/utils/tests/cdnTransformation.test.js +6 -4
  86. package/utils/tests/common.mockdata.js +623 -0
  87. package/utils/tests/common.test.js +273 -0
  88. package/utils/tests/commonUtil.test.js +79 -0
  89. package/v2Components/CapDeviceContent/index.js +330 -0
  90. package/v2Components/CapDeviceContent/index.scss +115 -0
  91. package/v2Components/CapDeviceContent/messages.js +94 -0
  92. package/v2Components/CapDeviceContent/tests/index.test.js +89 -0
  93. package/v2Components/CapImageUpload/constants.js +6 -0
  94. package/v2Components/CapImageUpload/index.js +23 -15
  95. package/v2Components/CapImageUpload/index.scss +6 -0
  96. package/v2Components/CapImageUpload/messages.js +7 -7
  97. package/v2Components/CapInAppCTA/constants.js +25 -0
  98. package/v2Components/CapInAppCTA/index.js +279 -0
  99. package/v2Components/CapInAppCTA/index.scss +99 -0
  100. package/v2Components/CapInAppCTA/messages.js +85 -0
  101. package/v2Components/CapTagList/index.js +149 -26
  102. package/v2Components/CapTagList/messages.js +12 -0
  103. package/v2Components/CapTagList/style.scss +26 -0
  104. package/v2Components/CapVideoUpload/constants.js +6 -0
  105. package/v2Components/CapVideoUpload/index.js +48 -22
  106. package/v2Components/CapVideoUpload/index.scss +4 -2
  107. package/v2Components/CapVideoUpload/messages.js +10 -6
  108. package/v2Components/CapWhatsappQuickReply/index.js +255 -0
  109. package/v2Components/CapWhatsappQuickReply/index.scss +54 -0
  110. package/v2Components/CapWhatsappQuickReply/messages.js +32 -0
  111. package/v2Components/Ckeditor/index.js +56 -22
  112. package/v2Components/Ckeditor/style.scss +3 -0
  113. package/v2Components/Ckeditor/tests/index.test.js +44 -0
  114. package/v2Components/CmsTemplatesComponent/index.js +1 -0
  115. package/v2Components/CmsTemplatesComponent/messages.js +4 -0
  116. package/v2Components/EmailMobilePreview/index.js +4 -2
  117. package/v2Components/EmailPreviewV2/index.js +6 -4
  118. package/v2Components/EmailPreviewV2/tests/__snapshots__/index.test.js.snap +0 -3
  119. package/v2Components/FormBuilder/_formBuilder.scss +1 -0
  120. package/v2Components/FormBuilder/constants.js +1 -1
  121. package/v2Components/FormBuilder/index.js +111 -29
  122. package/v2Components/FormBuilder/messages.js +4 -0
  123. package/v2Components/FormBuilder/tests/index.test.js +5 -2
  124. package/v2Components/MobilePushPreviewV2/index.js +57 -22
  125. package/v2Components/NavigationBar/constants.js +1 -0
  126. package/v2Components/NavigationBar/index.js +84 -113
  127. package/v2Components/NavigationBar/messages.js +8 -0
  128. package/v2Components/NavigationBar/style.js +9 -0
  129. package/v2Components/NavigationBar/tests/index.test.js +32 -9
  130. package/v2Components/NavigationBar/tests/mockData.js +1 -0
  131. package/v2Components/NewCallTask/tests/index.test.js +5 -3
  132. package/v2Components/Pagination/index.js +2 -1
  133. package/v2Components/RenderRoute/RenderRoute.js +11 -0
  134. package/v2Components/RenderRoute/index.js +1 -0
  135. package/v2Components/TemplatePreview/_templatePreview.scss +535 -0
  136. package/v2Components/TemplatePreview/assets/images/inapp_mobile_android_bottom.svg +11 -0
  137. package/v2Components/TemplatePreview/assets/images/inapp_mobile_android_full.svg +11 -0
  138. package/v2Components/TemplatePreview/assets/images/inapp_mobile_android_modal.svg +11 -0
  139. package/v2Components/TemplatePreview/assets/images/inapp_mobile_android_top.svg +11 -0
  140. package/v2Components/TemplatePreview/assets/images/inapp_mobile_ios_bottom.svg +6 -0
  141. package/v2Components/TemplatePreview/assets/images/inapp_mobile_ios_full.svg +18 -0
  142. package/v2Components/TemplatePreview/assets/images/inapp_mobile_ios_modal.svg +7 -0
  143. package/v2Components/TemplatePreview/assets/images/inapp_mobile_ios_top.svg +13 -0
  144. package/v2Components/TemplatePreview/index.js +745 -362
  145. package/v2Components/TemplatePreview/messages.js +8 -0
  146. package/v2Components/TemplatePreview/tests/__snapshots__/index.test.js.snap +47 -14
  147. package/v2Components/TemplatePreview/tests/index.test.js +9 -0
  148. package/v2Components/WhatsappStatusContainer/_whatsappStatusContainer.scss +8 -1
  149. package/v2Containers/App/constants.js +12 -6
  150. package/v2Containers/App/sagas.js +0 -1
  151. package/v2Containers/Assets/Gallery/index.js +1 -0
  152. package/v2Containers/Assets/Gallery/sagas.js +15 -14
  153. package/v2Containers/BeeEditor/index.js +3 -1
  154. package/v2Containers/BeeEditor/sagas.js +8 -5
  155. package/v2Containers/CallTask/sagas.js +7 -1
  156. package/v2Containers/Cap/actions.js +4 -0
  157. package/v2Containers/Cap/constants.js +20 -1
  158. package/v2Containers/Cap/index.js +116 -17
  159. package/v2Containers/Cap/messages.js +8 -0
  160. package/v2Containers/Cap/reducer.js +18 -3
  161. package/v2Containers/Cap/sagas.js +64 -9
  162. package/v2Containers/Cap/selectors.js +27 -13
  163. package/v2Containers/Cap/tests/Cap.test.js +164 -0
  164. package/v2Containers/Cap/tests/__snapshots__/index.test.js.snap +2 -1
  165. package/v2Containers/Cap/tests/actions.test.js +11 -0
  166. package/v2Containers/Cap/tests/reducer.test.js +59 -0
  167. package/v2Containers/Cap/tests/saga.test.js +181 -2
  168. package/v2Containers/Cap/tests/selectors.test.js +42 -18
  169. package/v2Containers/CapFacebookPreview/sagas.js +7 -5
  170. package/v2Containers/CreativesContainer/SlideBoxContent.js +86 -4
  171. package/v2Containers/CreativesContainer/SlideBoxFooter.js +4 -3
  172. package/v2Containers/CreativesContainer/SlideBoxHeader.js +30 -14
  173. package/v2Containers/CreativesContainer/constants.js +5 -0
  174. package/v2Containers/CreativesContainer/index.js +157 -38
  175. package/v2Containers/CreativesContainer/index.scss +12 -0
  176. package/v2Containers/CreativesContainer/messages.js +33 -1
  177. package/v2Containers/CreativesContainer/tests/SlideBoxContent.test.js +11 -0
  178. package/v2Containers/CreativesContainer/tests/SlideBoxFooter.test.js +5 -2
  179. package/v2Containers/CreativesContainer/tests/SlideBoxHeader.test.js +7 -1
  180. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +227 -0
  181. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxHeader.test.js.snap +73 -0
  182. package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +80 -0
  183. package/v2Containers/CreativesContainer/tests/index.test.js +16 -0
  184. package/v2Containers/Ebill/sagas.js +3 -10
  185. package/v2Containers/Email/index.js +38 -19
  186. package/v2Containers/Email/initialSchema.js +1 -1
  187. package/v2Containers/Email/sagas.js +22 -26
  188. package/v2Containers/EmailWrapper/index.js +18 -8
  189. package/v2Containers/FTP/index.js +2 -2
  190. package/v2Containers/FTP/sagas.js +3 -4
  191. package/v2Containers/Facebook/sagas.js +26 -17
  192. package/v2Containers/InApp/actions.js +64 -0
  193. package/v2Containers/InApp/constants.js +160 -0
  194. package/v2Containers/InApp/index.js +792 -0
  195. package/v2Containers/InApp/index.scss +50 -0
  196. package/v2Containers/InApp/messages.js +114 -0
  197. package/v2Containers/InApp/reducer.js +109 -0
  198. package/v2Containers/InApp/sagas.js +151 -0
  199. package/v2Containers/InApp/selectors.js +12 -0
  200. package/v2Containers/InApp/tests/action.test.js +53 -0
  201. package/v2Containers/InApp/tests/index.test.js +165 -0
  202. package/v2Containers/InApp/tests/mockData.js +898 -0
  203. package/v2Containers/InApp/tests/reducer.test.js +177 -0
  204. package/v2Containers/InApp/tests/sagas.test.js +391 -0
  205. package/v2Containers/InApp/utils.js +12 -0
  206. package/v2Containers/LanguageProvider/index.js +17 -5
  207. package/v2Containers/LanguageProvider/reducer.js +3 -2
  208. package/v2Containers/LanguageProvider/sagas.js +7 -8
  209. package/v2Containers/LanguageProvider/selectors.js +2 -1
  210. package/v2Containers/LanguageProvider/tests/index.test.js +5 -2
  211. package/v2Containers/LanguageProvider/tests/reducer.test.js +6 -3
  212. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +28 -16
  213. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +2 -2
  214. package/v2Containers/Line/Container/ImageCarousel/tests/content.test.js +5 -3
  215. package/v2Containers/Line/Container/ImageCarousel/tests/index.test.js +5 -3
  216. package/v2Containers/Line/Container/ImageMap/index.js +1 -1
  217. package/v2Containers/Line/Container/Text/index.js +16 -1
  218. package/v2Containers/Line/Container/Video/index.js +2 -1
  219. package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +18134 -107
  220. package/v2Containers/Line/Container/Wrapper/tests/index.test.js +5 -3
  221. package/v2Containers/Line/Container/Wrapper/utils.js +1 -1
  222. package/v2Containers/Line/Container/index.js +4 -0
  223. package/v2Containers/Line/Container/sagas.js +30 -20
  224. package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +123 -81
  225. package/v2Containers/Line/Container/tests/index.test.js +5 -2
  226. package/v2Containers/Login/index.js +1 -2
  227. package/v2Containers/MobilePush/Create/index.js +40 -17
  228. package/v2Containers/MobilePush/Create/sagas.js +18 -12
  229. package/v2Containers/MobilePush/Edit/index.js +16 -7
  230. package/v2Containers/MobilePush/Edit/sagas.js +30 -20
  231. package/v2Containers/MobilepushWrapper/index.js +3 -0
  232. package/v2Containers/Rcs/sagas.js +14 -14
  233. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +123 -87
  234. package/v2Containers/Rcs/tests/index.test.js +5 -3
  235. package/v2Containers/Sms/Create/sagas.js +10 -6
  236. package/v2Containers/Sms/Edit/sagas.js +14 -8
  237. package/v2Containers/SmsTrai/Create/sagas.js +9 -10
  238. package/v2Containers/SmsTrai/Create/tests/__snapshots__/index.test.js.snap +4 -4
  239. package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +12 -8
  240. package/v2Containers/SmsTrai/Edit/tests/index.test.js +5 -3
  241. package/v2Containers/TagList/_tagList.scss +18 -0
  242. package/v2Containers/TagList/index.js +81 -42
  243. package/v2Containers/TagList/tests/TagList.test.js +6 -7
  244. package/v2Containers/TagList/tests/mockdata.js +10 -166
  245. package/v2Containers/TagList/tests/utils.test.js +17 -0
  246. package/v2Containers/TagList/utils.js +15 -0
  247. package/v2Containers/Templates/_templates.scss +60 -5
  248. package/v2Containers/Templates/actions.js +6 -5
  249. package/v2Containers/Templates/constants.js +2 -1
  250. package/v2Containers/Templates/index.js +576 -181
  251. package/v2Containers/Templates/messages.js +52 -8
  252. package/v2Containers/Templates/reducer.js +3 -1
  253. package/v2Containers/Templates/sagas.js +54 -38
  254. package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +669 -43
  255. package/v2Containers/Templates/tests/actions.test.js +19 -0
  256. package/v2Containers/Templates/tests/index.test.js +53 -1
  257. package/v2Containers/Templates/tests/mockData.js +45 -1
  258. package/v2Containers/Templates/tests/reducer.test.js +50 -0
  259. package/v2Containers/Templates/tests/sagas.test.js +116 -3
  260. package/v2Containers/Templates/tests/selector.test.js +17 -0
  261. package/v2Containers/TemplatesV2/index.js +180 -8
  262. package/v2Containers/TemplatesV2/messages.js +8 -0
  263. package/v2Containers/TemplatesV2/tests/index.test.js +104 -0
  264. package/v2Containers/TemplatesV2/tests/mockData.js +685 -0
  265. package/v2Containers/Viber/constants.js +58 -0
  266. package/v2Containers/Viber/index.js +404 -421
  267. package/v2Containers/Viber/index.scss +107 -0
  268. package/v2Containers/Viber/messages.js +70 -2
  269. package/v2Containers/Viber/sagas.js +22 -14
  270. package/v2Containers/Viber/style.js +20 -0
  271. package/v2Containers/Viber/tests/index.test.js +299 -0
  272. package/v2Containers/Viber/tests/mockData.js +134 -0
  273. package/v2Containers/WeChat/MapTemplates/sagas.js +22 -14
  274. package/v2Containers/WeChat/RichmediaTemplates/Create/sagas.js +12 -11
  275. package/v2Containers/WeChat/RichmediaTemplates/Edit/sagas.js +9 -5
  276. package/v2Containers/Whatsapp/actions.js +16 -0
  277. package/v2Containers/Whatsapp/constants.js +24 -0
  278. package/v2Containers/Whatsapp/index.js +892 -222
  279. package/v2Containers/Whatsapp/index.scss +91 -1
  280. package/v2Containers/Whatsapp/messages.js +98 -1
  281. package/v2Containers/Whatsapp/reducer.js +19 -0
  282. package/v2Containers/Whatsapp/sagas.js +67 -12
  283. package/v2Containers/Whatsapp/styles.scss +35 -0
  284. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +34983 -24886
  285. package/v2Containers/Whatsapp/tests/__snapshots__/utils.test.js.snap +12 -0
  286. package/v2Containers/Whatsapp/tests/actions.test.js +21 -0
  287. package/v2Containers/Whatsapp/tests/index.test.js +17 -4
  288. package/v2Containers/Whatsapp/tests/mockData.js +77 -0
  289. package/v2Containers/Whatsapp/tests/reducer.test.js +67 -0
  290. package/v2Containers/Whatsapp/tests/saga.test.js +201 -0
  291. package/v2Containers/Whatsapp/tests/utils.test.js +18 -0
  292. package/v2Containers/Whatsapp/utils.js +65 -4
  293. package/v2Containers/Zalo/actions.js +24 -0
  294. package/v2Containers/Zalo/constants.js +59 -0
  295. package/v2Containers/Zalo/index.js +548 -0
  296. package/v2Containers/Zalo/index.scss +75 -0
  297. package/v2Containers/Zalo/messages.js +86 -0
  298. package/v2Containers/Zalo/reducer.js +63 -0
  299. package/v2Containers/Zalo/saga.js +45 -0
  300. package/v2Containers/Zalo/selectors.js +19 -0
  301. package/v2Containers/Zalo/tests/actions.test.js +26 -0
  302. package/v2Containers/Zalo/tests/index.test.js +149 -0
  303. package/v2Containers/Zalo/tests/mockData.js +11527 -0
  304. package/v2Containers/Zalo/tests/reducer.test.js +96 -0
  305. package/v2Containers/Zalo/tests/saga.test.js +118 -0
  306. package/v2Containers/Zalo/tests/selector.test.js +51 -0
  307. package/v2Containers/mockdata.js +1531 -680
  308. package/containers/TestPage/constants.js +0 -7
  309. package/containers/TestPage/index.js +0 -31
  310. package/containers/TestPage/messages.js +0 -13
  311. package/containers/TestPage/reducer.js +0 -21
  312. package/containers/TestPage/sagas.js +0 -11
  313. package/containers/Testv2/actions.js +0 -15
  314. package/containers/Testv2/constants.js +0 -7
  315. package/containers/Testv2/index.js +0 -47
  316. package/containers/Testv2/messages.js +0 -21
  317. package/containers/Testv2/reducer.js +0 -23
  318. package/containers/Testv2/sagas.js +0 -11
  319. package/containers/Testv2/selectors.js +0 -25
  320. package/reducers.js +0 -73
  321. package/store.js +0 -61
  322. package/utils/tests/asyncInjectors.test.js +0 -173
  323. package/v2Containers/TestPage/constants.js +0 -7
  324. package/v2Containers/TestPage/index.js +0 -31
  325. package/v2Containers/TestPage/messages.js +0 -13
  326. package/v2Containers/TestPage/reducer.js +0 -21
  327. package/v2Containers/TestPage/sagas.js +0 -11
  328. package/v2Containers/Testv2/actions.js +0 -15
  329. package/v2Containers/Testv2/constants.js +0 -7
  330. package/v2Containers/Testv2/index.js +0 -47
  331. package/v2Containers/Testv2/messages.js +0 -21
  332. package/v2Containers/Testv2/reducer.js +0 -23
  333. package/v2Containers/Testv2/sagas.js +0 -11
  334. package/v2Containers/Testv2/selectors.js +0 -25
package/app.js CHANGED
@@ -1,43 +1,41 @@
1
1
  import 'babel-polyfill';
2
2
  import React from 'react';
3
- import ReactDOM from 'react-dom';
3
+ import { createRoot } from 'react-dom/client';
4
4
  import { Provider } from 'react-redux';
5
- import createHistory from 'history/lib/createBrowserHistory';
6
- import { applyRouterMiddleware, Router, useRouterHistory } from 'react-router';
7
- import { syncHistoryWithStore } from 'react-router-redux';
8
- import { useScroll } from 'react-router-scroll';
5
+ // import createHistory from 'history/lib/createBrowserHistory';
6
+ // import { applyRouterMiddleware, Router, useRouterHistory } from 'react-router';
7
+ // import { useScroll } from 'react-router-scroll';
8
+ import history from 'utils/history';
9
9
  import CapSomethingWentWrong from '@capillarytech/cap-ui-library/CapSomethingWentWrong';
10
10
  import Bugsnag from '@bugsnag/js';
11
11
  import BugsnagPluginReact from '@bugsnag/plugin-react';
12
- import CapV2 from 'v2Containers/Cap';
13
- import Cap from 'containers/Cap';
14
- import { LocaleProvider } from 'antd';
15
- import { makeSelectLocationState } from 'containers/Cap/selectors';
12
+ // import { makeSelectLocationState } from 'containers/Cap/selectors';
16
13
  import LanguageProvider from 'v2Containers/LanguageProvider';
17
14
  import FontFaceObserver from 'fontfaceobserver';
18
15
  /* eslint-disable import/no-unresolved, import/extensions */
19
16
  import '!file-loader?name=[name].[ext]!./favicon.ico';
20
17
  /* eslint-enable import/no-unresolved, import/extensions */
21
- import configureStore from './store';
18
+ import { configureStore } from '@capillarytech/vulcan-react-sdk/utils';
19
+ import { initialReducer } from './initialReducer';
22
20
  import { translationMessages } from './i18n';
23
21
  import './global-styles';
24
- import createRoutes from './routes';
25
22
  import initialState from './initialState';
26
23
  import './styles/vendor/semantic/dist/semantic.min.css';
27
24
  import './styles/main.scss';
28
25
  import pathConfig from './config/path';
29
26
  import ignoredErrorMessages from './utils/ignoredErrorMessages';
30
- // addLocaleData([...en, ...es, ...fr, ...it, ...zh]);
27
+ import App from './containers/App';
31
28
 
32
- const browserHistory = useRouterHistory(createHistory)({
33
- basename: pathConfig.publicPath,
34
- });
29
+ // const browserHistory = useRouterHistory(createHistory)({
30
+ // basename: pathConfig.publicPath,
31
+ // });
35
32
 
36
- const store = configureStore(initialState, browserHistory);
33
+ const store = configureStore(initialState, initialReducer, history);
34
+ const MOUNT_NODE = document.getElementById('app');
37
35
 
38
- const history = syncHistoryWithStore(browserHistory, store, {
39
- selectLocationState: makeSelectLocationState(),
40
- });
36
+ // const history = syncHistoryWithStore(browserHistory, store, {
37
+ // selectLocationState: makeSelectLocationState(),
38
+ // });
41
39
  const BUGSNAG_APP_VERSION = `creatives-ui__${new Date().getTime()}`;
42
40
  const BUGSNAG_API_KEY = 'c4d96446438ff7dc7c08da08ef94c5b2';
43
41
 
@@ -68,7 +66,7 @@ const bugSnagErrorCallback = (event) => {
68
66
  userId = id;
69
67
  userName = `${firstName} ${lastName}`;
70
68
  userEmail = loginName;
71
- orgName = proxyOrgList.find(({orgID}) => orgID === Number(orgId)).orgName;
69
+ orgName = proxyOrgList.find(({ orgID }) => orgID === Number(orgId)).orgName;
72
70
  } catch (error) {
73
71
  userId = '';
74
72
  userName = '';
@@ -100,43 +98,18 @@ const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary(React);
100
98
 
101
99
  export const BugsnagClient = Bugsnag;
102
100
 
103
- const rootRoute = {
104
- component: (props) => {
105
- // eslint-disable-next-line react/prop-types
106
- if (
107
- props.location.pathname === 'v2' ||
108
- props.location.pathname === 'v2/' ||
109
- props.location.pathname === 'v2/loyalty' ||
110
- props.location.pathname === 'v2/somethingwentwrong'
111
- ) {
112
- return <CapV2 {...props} />;
113
- }
114
- return <Cap {...props} />;
115
- },
116
- childRoutes: createRoutes(store),
117
- };
118
-
119
- const ErrorScreen = () => <CapSomethingWentWrong url={`${pathConfig.publicPath}v2`} />
120
-
101
+ const ErrorScreen = () => <CapSomethingWentWrong url={`${pathConfig.publicPath}/v2`} />
102
+ const root = createRoot(MOUNT_NODE);
121
103
  const render = (messages) => {
122
- ReactDOM.render(
104
+ root.render(
123
105
  <Provider store={store}>
124
- <LocaleProvider>
125
- <ErrorBoundary FallbackComponent={ErrorScreen}>
126
- <LanguageProvider messages={messages}>
127
- <div>
128
- <Router
129
- history={(history)}
130
- routes={rootRoute}
131
- render={applyRouterMiddleware(useScroll())
132
- }
133
- />
134
- </div>
135
- </LanguageProvider>
136
- </ErrorBoundary>
137
- </LocaleProvider>
106
+ <LanguageProvider messages={messages}>
107
+ <ErrorBoundary FallbackComponent={ErrorScreen}>
108
+ <App />
109
+ </ErrorBoundary>
110
+ </LanguageProvider>
138
111
  </Provider>,
139
- document.getElementById('app')
112
+ MOUNT_NODE
140
113
  );
141
114
  };
142
115
 
@@ -0,0 +1,24 @@
1
+ <svg width="220" height="472" viewBox="0 0 220 472" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_77_525)">
3
+ <path d="M194 0H26C11.6406 0 0 11.6406 0 26V446C0 460.359 11.6406 472 26 472H194C208.359 472 220 460.359 220 446V26C220 11.6406 208.359 0 194 0Z" fill="#101211"/>
4
+ <path d="M202 36H18C13.0294 36 9 40.0294 9 45V431C9 435.971 13.0294 440 18 440H202C206.971 440 211 435.971 211 431V45C211 40.0294 206.971 36 202 36Z" fill="#DFE2E7"/>
5
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M18 36H202C206.97 36 211 40.03 211 45V51H9V45C9 40.03 13.03 36 18 36Z" fill="#202D48"/>
6
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M9 82H211V51H9V82Z" fill="#202D48"/>
7
+ <path d="M133.5 14H86.5C85.1193 14 84 15.1193 84 16.5C84 17.8807 85.1193 19 86.5 19H133.5C134.881 19 136 17.8807 136 16.5C136 15.1193 134.881 14 133.5 14Z" fill="#2E2E2E"/>
8
+ <path d="M133.5 455H86.5C85.1193 455 84 456.119 84 457.5C84 458.881 85.1193 460 86.5 460H133.5C134.881 460 136 458.881 136 457.5C136 456.119 134.881 455 133.5 455Z" fill="#2E2E2E"/>
9
+ <path d="M45.5 25C48.5376 25 51 22.5376 51 19.5C51 16.4624 48.5376 14 45.5 14C42.4624 14 40 16.4624 40 19.5C40 22.5376 42.4624 25 45.5 25Z" fill="#2E2E2E"/>
10
+ <path d="M65.5 23C67.433 23 69 21.433 69 19.5C69 17.567 67.433 16 65.5 16C63.567 16 62 17.567 62 19.5C62 21.433 63.567 23 65.5 23Z" fill="#2E2E2E"/>
11
+ <path d="M55.0371 67.8438C55.0371 67.6445 55.0059 67.4688 54.9434 67.3164C54.8848 67.1602 54.7793 67.0195 54.627 66.8945C54.4785 66.7695 54.2715 66.6504 54.0059 66.5371C53.7441 66.4238 53.4121 66.3086 53.0098 66.1914C52.5879 66.0664 52.207 65.9277 51.8672 65.7754C51.5273 65.6191 51.2363 65.4414 50.9941 65.2422C50.752 65.043 50.5664 64.8145 50.4375 64.5566C50.3086 64.2988 50.2441 64.0039 50.2441 63.6719C50.2441 63.3398 50.3125 63.0332 50.4492 62.752C50.5859 62.4707 50.7812 62.2266 51.0352 62.0195C51.293 61.8086 51.5996 61.6445 51.9551 61.5273C52.3105 61.4102 52.707 61.3516 53.1445 61.3516C53.7852 61.3516 54.3281 61.4746 54.7734 61.7207C55.2227 61.9629 55.5645 62.2812 55.7988 62.6758C56.0332 63.0664 56.1504 63.4844 56.1504 63.9297H55.0254C55.0254 63.6094 54.957 63.3262 54.8203 63.0801C54.6836 62.8301 54.4766 62.6348 54.1992 62.4941C53.9219 62.3496 53.5703 62.2773 53.1445 62.2773C52.7422 62.2773 52.4102 62.3379 52.1484 62.459C51.8867 62.5801 51.6914 62.7441 51.5625 62.9512C51.4375 63.1582 51.375 63.3945 51.375 63.6602C51.375 63.8398 51.4121 64.0039 51.4863 64.1523C51.5645 64.2969 51.6836 64.4316 51.8438 64.5566C52.0078 64.6816 52.2148 64.7969 52.4648 64.9023C52.7188 65.0078 53.0215 65.1094 53.373 65.207C53.8574 65.3438 54.2754 65.4961 54.627 65.6641C54.9785 65.832 55.2676 66.0215 55.4941 66.2324C55.7246 66.4395 55.8945 66.6758 56.0039 66.9414C56.1172 67.2031 56.1738 67.5 56.1738 67.832C56.1738 68.1797 56.1035 68.4941 55.9629 68.7754C55.8223 69.0566 55.6211 69.2969 55.3594 69.4961C55.0977 69.6953 54.7832 69.8496 54.416 69.959C54.0527 70.0645 53.6465 70.1172 53.1973 70.1172C52.8027 70.1172 52.4141 70.0625 52.0312 69.9531C51.6523 69.8438 51.3066 69.6797 50.9941 69.4609C50.6855 69.2422 50.4375 68.9727 50.25 68.6523C50.0664 68.3281 49.9746 67.9531 49.9746 67.5273H51.0996C51.0996 67.8203 51.1562 68.0723 51.2695 68.2832C51.3828 68.4902 51.5371 68.6621 51.7324 68.7988C51.9316 68.9355 52.1562 69.0371 52.4062 69.1035C52.6602 69.166 52.9238 69.1973 53.1973 69.1973C53.5918 69.1973 53.9258 69.1426 54.1992 69.0332C54.4727 68.9238 54.6797 68.7676 54.8203 68.5645C54.9648 68.3613 55.0371 68.1211 55.0371 67.8438ZM60.082 70.1172C59.6406 70.1172 59.2402 70.043 58.8809 69.8945C58.5254 69.7422 58.2188 69.5293 57.9609 69.2559C57.707 68.9824 57.5117 68.6582 57.375 68.2832C57.2383 67.9082 57.1699 67.498 57.1699 67.0527V66.8066C57.1699 66.291 57.2461 65.832 57.3984 65.4297C57.5508 65.0234 57.7578 64.6797 58.0195 64.3984C58.2812 64.1172 58.5781 63.9043 58.9102 63.7598C59.2422 63.6152 59.5859 63.543 59.9414 63.543C60.3945 63.543 60.7852 63.6211 61.1133 63.7773C61.4453 63.9336 61.7168 64.1523 61.9277 64.4336C62.1387 64.7109 62.2949 65.0391 62.3965 65.418C62.498 65.793 62.5488 66.2031 62.5488 66.6484V67.1348H57.8145V66.25H61.4648V66.168C61.4492 65.8867 61.3906 65.6133 61.2891 65.3477C61.1914 65.082 61.0352 64.8633 60.8203 64.6914C60.6055 64.5195 60.3125 64.4336 59.9414 64.4336C59.6953 64.4336 59.4688 64.4863 59.2617 64.5918C59.0547 64.6934 58.877 64.8457 58.7285 65.0488C58.5801 65.252 58.4648 65.5 58.3828 65.793C58.3008 66.0859 58.2598 66.4238 58.2598 66.8066V67.0527C58.2598 67.3535 58.3008 67.6367 58.3828 67.9023C58.4688 68.1641 58.5918 68.3945 58.752 68.5938C58.916 68.793 59.1133 68.9492 59.3438 69.0625C59.5781 69.1758 59.8438 69.2324 60.1406 69.2324C60.5234 69.2324 60.8477 69.1543 61.1133 68.998C61.3789 68.8418 61.6113 68.6328 61.8105 68.3711L62.4668 68.8926C62.3301 69.0996 62.1562 69.2969 61.9453 69.4844C61.7344 69.6719 61.4746 69.8242 61.166 69.9414C60.8613 70.0586 60.5 70.1172 60.082 70.1172ZM64.8984 65.0137V70H63.8145V63.6602H64.8398L64.8984 65.0137ZM64.6406 66.5898L64.1895 66.5723C64.1934 66.1387 64.2578 65.7383 64.3828 65.3711C64.5078 65 64.6836 64.6777 64.9102 64.4043C65.1367 64.1309 65.4062 63.9199 65.7188 63.7715C66.0352 63.6191 66.3848 63.543 66.7676 63.543C67.0801 63.543 67.3613 63.5859 67.6113 63.6719C67.8613 63.7539 68.0742 63.8867 68.25 64.0703C68.4297 64.2539 68.5664 64.4922 68.6602 64.7852C68.7539 65.0742 68.8008 65.4277 68.8008 65.8457V70H67.7109V65.834C67.7109 65.502 67.6621 65.2363 67.5645 65.0371C67.4668 64.834 67.3242 64.6875 67.1367 64.5977C66.9492 64.5039 66.7188 64.457 66.4453 64.457C66.1758 64.457 65.9297 64.5137 65.707 64.627C65.4883 64.7402 65.2988 64.8965 65.1387 65.0957C64.9824 65.2949 64.8594 65.5234 64.7695 65.7812C64.6836 66.0352 64.6406 66.3047 64.6406 66.5898ZM74.4434 68.7695V61H75.5332V70H74.5371L74.4434 68.7695ZM70.1777 66.9004V66.7773C70.1777 66.293 70.2363 65.8535 70.3535 65.459C70.4746 65.0605 70.6445 64.7188 70.8633 64.4336C71.0859 64.1484 71.3496 63.9297 71.6543 63.7773C71.9629 63.6211 72.3066 63.543 72.6855 63.543C73.084 63.543 73.4316 63.6133 73.7285 63.7539C74.0293 63.8906 74.2832 64.0918 74.4902 64.3574C74.7012 64.6191 74.8672 64.9355 74.9883 65.3066C75.1094 65.6777 75.1934 66.0977 75.2402 66.5664V67.1055C75.1973 67.5703 75.1133 67.9883 74.9883 68.3594C74.8672 68.7305 74.7012 69.0469 74.4902 69.3086C74.2832 69.5703 74.0293 69.7715 73.7285 69.9121C73.4277 70.0488 73.0762 70.1172 72.6738 70.1172C72.3027 70.1172 71.9629 70.0371 71.6543 69.877C71.3496 69.7168 71.0859 69.4922 70.8633 69.2031C70.6445 68.9141 70.4746 68.5742 70.3535 68.1836C70.2363 67.7891 70.1777 67.3613 70.1777 66.9004ZM71.2676 66.7773V66.9004C71.2676 67.2168 71.2988 67.5137 71.3613 67.791C71.4277 68.0684 71.5293 68.3125 71.666 68.5234C71.8027 68.7344 71.9766 68.9004 72.1875 69.0215C72.3984 69.1387 72.6504 69.1973 72.9434 69.1973C73.3027 69.1973 73.5977 69.1211 73.8281 68.9688C74.0625 68.8164 74.25 68.6152 74.3906 68.3652C74.5312 68.1152 74.6406 67.8438 74.7188 67.5508V66.1387C74.6719 65.9238 74.6035 65.7168 74.5137 65.5176C74.4277 65.3145 74.3145 65.1348 74.1738 64.9785C74.0371 64.8184 73.8672 64.6914 73.6641 64.5977C73.4648 64.5039 73.2285 64.457 72.9551 64.457C72.6582 64.457 72.4023 64.5195 72.1875 64.6445C71.9766 64.7656 71.8027 64.9336 71.666 65.1484C71.5293 65.3594 71.4277 65.6055 71.3613 65.8867C71.2988 66.1641 71.2676 66.4609 71.2676 66.7773ZM79.8516 70.1172C79.4102 70.1172 79.0098 70.043 78.6504 69.8945C78.2949 69.7422 77.9883 69.5293 77.7305 69.2559C77.4766 68.9824 77.2812 68.6582 77.1445 68.2832C77.0078 67.9082 76.9395 67.498 76.9395 67.0527V66.8066C76.9395 66.291 77.0156 65.832 77.168 65.4297C77.3203 65.0234 77.5273 64.6797 77.7891 64.3984C78.0508 64.1172 78.3477 63.9043 78.6797 63.7598C79.0117 63.6152 79.3555 63.543 79.7109 63.543C80.1641 63.543 80.5547 63.6211 80.8828 63.7773C81.2148 63.9336 81.4863 64.1523 81.6973 64.4336C81.9082 64.7109 82.0645 65.0391 82.166 65.418C82.2676 65.793 82.3184 66.2031 82.3184 66.6484V67.1348H77.584V66.25H81.2344V66.168C81.2188 65.8867 81.1602 65.6133 81.0586 65.3477C80.9609 65.082 80.8047 64.8633 80.5898 64.6914C80.375 64.5195 80.082 64.4336 79.7109 64.4336C79.4648 64.4336 79.2383 64.4863 79.0312 64.5918C78.8242 64.6934 78.6465 64.8457 78.498 65.0488C78.3496 65.252 78.2344 65.5 78.1523 65.793C78.0703 66.0859 78.0293 66.4238 78.0293 66.8066V67.0527C78.0293 67.3535 78.0703 67.6367 78.1523 67.9023C78.2383 68.1641 78.3613 68.3945 78.5215 68.5938C78.6855 68.793 78.8828 68.9492 79.1133 69.0625C79.3477 69.1758 79.6133 69.2324 79.9102 69.2324C80.293 69.2324 80.6172 69.1543 80.8828 68.998C81.1484 68.8418 81.3809 68.6328 81.5801 68.3711L82.2363 68.8926C82.0996 69.0996 81.9258 69.2969 81.7148 69.4844C81.5039 69.6719 81.2441 69.8242 80.9355 69.9414C80.6309 70.0586 80.2695 70.1172 79.8516 70.1172ZM84.668 64.6562V70H83.584V63.6602H84.6387L84.668 64.6562ZM86.6484 63.625L86.6426 64.6328C86.5527 64.6133 86.4668 64.6016 86.3848 64.5977C86.3066 64.5898 86.2168 64.5859 86.1152 64.5859C85.8652 64.5859 85.6445 64.625 85.4531 64.7031C85.2617 64.7812 85.0996 64.8906 84.9668 65.0312C84.834 65.1719 84.7285 65.3398 84.6504 65.5352C84.5762 65.7266 84.5273 65.9375 84.5039 66.168L84.1992 66.3438C84.1992 65.9609 84.2363 65.6016 84.3105 65.2656C84.3887 64.9297 84.5078 64.6328 84.668 64.375C84.8281 64.1133 85.0312 63.9102 85.2773 63.7656C85.5273 63.6172 85.8242 63.543 86.168 63.543C86.2461 63.543 86.3359 63.5527 86.4375 63.5723C86.5391 63.5879 86.6094 63.6055 86.6484 63.625ZM91.7109 65.0137V70H90.627V63.6602H91.6523L91.7109 65.0137ZM91.4531 66.5898L91.002 66.5723C91.0059 66.1387 91.0703 65.7383 91.1953 65.3711C91.3203 65 91.4961 64.6777 91.7227 64.4043C91.9492 64.1309 92.2188 63.9199 92.5312 63.7715C92.8477 63.6191 93.1973 63.543 93.5801 63.543C93.8926 63.543 94.1738 63.5859 94.4238 63.6719C94.6738 63.7539 94.8867 63.8867 95.0625 64.0703C95.2422 64.2539 95.3789 64.4922 95.4727 64.7852C95.5664 65.0742 95.6133 65.4277 95.6133 65.8457V70H94.5234V65.834C94.5234 65.502 94.4746 65.2363 94.377 65.0371C94.2793 64.834 94.1367 64.6875 93.9492 64.5977C93.7617 64.5039 93.5312 64.457 93.2578 64.457C92.9883 64.457 92.7422 64.5137 92.5195 64.627C92.3008 64.7402 92.1113 64.8965 91.9512 65.0957C91.7949 65.2949 91.6719 65.5234 91.582 65.7812C91.4961 66.0352 91.4531 66.3047 91.4531 66.5898ZM100.998 68.916V65.6523C100.998 65.4023 100.947 65.1855 100.846 65.002C100.748 64.8145 100.6 64.6699 100.4 64.5684C100.201 64.4668 99.9551 64.416 99.6621 64.416C99.3887 64.416 99.1484 64.4629 98.9414 64.5566C98.7383 64.6504 98.5781 64.7734 98.4609 64.9258C98.3477 65.0781 98.291 65.2422 98.291 65.418H97.207C97.207 65.1914 97.2656 64.9668 97.3828 64.7441C97.5 64.5215 97.668 64.3203 97.8867 64.1406C98.1094 63.957 98.375 63.8125 98.6836 63.707C98.9961 63.5977 99.3438 63.543 99.7266 63.543C100.188 63.543 100.594 63.6211 100.945 63.7773C101.301 63.9336 101.578 64.1699 101.777 64.4863C101.98 64.7988 102.082 65.1914 102.082 65.6641V68.6172C102.082 68.8281 102.1 69.0527 102.135 69.291C102.174 69.5293 102.23 69.7344 102.305 69.9062V70H101.174C101.119 69.875 101.076 69.709 101.045 69.502C101.014 69.291 100.998 69.0957 100.998 68.916ZM101.186 66.1562L101.197 66.918H100.102C99.793 66.918 99.5176 66.9434 99.2754 66.9941C99.0332 67.041 98.8301 67.1133 98.666 67.2109C98.502 67.3086 98.377 67.4316 98.291 67.5801C98.2051 67.7246 98.1621 67.8945 98.1621 68.0898C98.1621 68.2891 98.207 68.4707 98.2969 68.6348C98.3867 68.7988 98.5215 68.9297 98.7012 69.0273C98.8848 69.1211 99.1094 69.168 99.375 69.168C99.707 69.168 100 69.0977 100.254 68.957C100.508 68.8164 100.709 68.6445 100.857 68.4414C101.01 68.2383 101.092 68.041 101.104 67.8496L101.566 68.3711C101.539 68.5352 101.465 68.7168 101.344 68.916C101.223 69.1152 101.061 69.3066 100.857 69.4902C100.658 69.6699 100.42 69.8203 100.143 69.9414C99.8691 70.0586 99.5605 70.1172 99.2168 70.1172C98.7871 70.1172 98.4102 70.0332 98.0859 69.8652C97.7656 69.6973 97.5156 69.4727 97.3359 69.1914C97.1602 68.9062 97.0723 68.5879 97.0723 68.2363C97.0723 67.8965 97.1387 67.5977 97.2715 67.3398C97.4043 67.0781 97.5957 66.8613 97.8457 66.6895C98.0957 66.5137 98.3965 66.3809 98.748 66.291C99.0996 66.2012 99.4922 66.1562 99.9258 66.1562H101.186ZM104.865 64.9199V70H103.775V63.6602H104.807L104.865 64.9199ZM104.643 66.5898L104.139 66.5723C104.143 66.1387 104.199 65.7383 104.309 65.3711C104.418 65 104.58 64.6777 104.795 64.4043C105.01 64.1309 105.277 63.9199 105.598 63.7715C105.918 63.6191 106.289 63.543 106.711 63.543C107.008 63.543 107.281 63.5859 107.531 63.6719C107.781 63.7539 107.998 63.8848 108.182 64.0645C108.365 64.2441 108.508 64.4746 108.609 64.7559C108.711 65.0371 108.762 65.377 108.762 65.7754V70H107.678V65.8281C107.678 65.4961 107.621 65.2305 107.508 65.0312C107.398 64.832 107.242 64.6875 107.039 64.5977C106.836 64.5039 106.598 64.457 106.324 64.457C106.004 64.457 105.736 64.5137 105.521 64.627C105.307 64.7402 105.135 64.8965 105.006 65.0957C104.877 65.2949 104.783 65.5234 104.725 65.7812C104.67 66.0352 104.643 66.3047 104.643 66.5898ZM108.75 65.9922L108.023 66.2148C108.027 65.8672 108.084 65.5332 108.193 65.2129C108.307 64.8926 108.469 64.6074 108.68 64.3574C108.895 64.1074 109.158 63.9102 109.471 63.7656C109.783 63.6172 110.141 63.543 110.543 63.543C110.883 63.543 111.184 63.5879 111.445 63.6777C111.711 63.7676 111.934 63.9062 112.113 64.0938C112.297 64.2773 112.436 64.5137 112.529 64.8027C112.623 65.0918 112.67 65.4355 112.67 65.834V70H111.58V65.8223C111.58 65.4668 111.523 65.1914 111.41 64.9961C111.301 64.7969 111.145 64.6582 110.941 64.5801C110.742 64.498 110.504 64.457 110.227 64.457C109.988 64.457 109.777 64.498 109.594 64.5801C109.41 64.6621 109.256 64.7754 109.131 64.9199C109.006 65.0605 108.91 65.2227 108.844 65.4062C108.781 65.5898 108.75 65.7852 108.75 65.9922ZM116.941 70.1172C116.5 70.1172 116.1 70.043 115.74 69.8945C115.385 69.7422 115.078 69.5293 114.82 69.2559C114.566 68.9824 114.371 68.6582 114.234 68.2832C114.098 67.9082 114.029 67.498 114.029 67.0527V66.8066C114.029 66.291 114.105 65.832 114.258 65.4297C114.41 65.0234 114.617 64.6797 114.879 64.3984C115.141 64.1172 115.438 63.9043 115.77 63.7598C116.102 63.6152 116.445 63.543 116.801 63.543C117.254 63.543 117.645 63.6211 117.973 63.7773C118.305 63.9336 118.576 64.1523 118.787 64.4336C118.998 64.7109 119.154 65.0391 119.256 65.418C119.357 65.793 119.408 66.2031 119.408 66.6484V67.1348H114.674V66.25H118.324V66.168C118.309 65.8867 118.25 65.6133 118.148 65.3477C118.051 65.082 117.895 64.8633 117.68 64.6914C117.465 64.5195 117.172 64.4336 116.801 64.4336C116.555 64.4336 116.328 64.4863 116.121 64.5918C115.914 64.6934 115.736 64.8457 115.588 65.0488C115.439 65.252 115.324 65.5 115.242 65.793C115.16 66.0859 115.119 66.4238 115.119 66.8066V67.0527C115.119 67.3535 115.16 67.6367 115.242 67.9023C115.328 68.1641 115.451 68.3945 115.611 68.5938C115.775 68.793 115.973 68.9492 116.203 69.0625C116.438 69.1758 116.703 69.2324 117 69.2324C117.383 69.2324 117.707 69.1543 117.973 68.998C118.238 68.8418 118.471 68.6328 118.67 68.3711L119.326 68.8926C119.189 69.0996 119.016 69.2969 118.805 69.4844C118.594 69.6719 118.334 69.8242 118.025 69.9414C117.721 70.0586 117.359 70.1172 116.941 70.1172Z" fill="white"/>
12
+ <path d="M199 64C199.552 64 200 63.5523 200 63C200 62.4477 199.552 62 199 62C198.448 62 198 62.4477 198 63C198 63.5523 198.448 64 199 64Z" fill="white"/>
13
+ <path d="M199 71C199.552 71 200 70.5523 200 70C200 69.4477 199.552 69 199 69C198.448 69 198 69.4477 198 70C198 70.5523 198.448 71 199 71Z" fill="white"/>
14
+ <path d="M199 67.5C199.552 67.5 200 67.0523 200 66.5C200 65.9477 199.552 65.5 199 65.5C198.448 65.5 198 65.9477 198 66.5C198 67.0523 198.448 67.5 199 67.5Z" fill="white"/>
15
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M28.0001 65.9999C28.0001 66.2789 27.7741 66.5049 27.4951 66.5049H21.939L24.359 68.925C24.557 69.122 24.557 69.4429 24.359 69.6409C24.161 69.8389 23.8391 69.8389 23.6411 69.6409L20.7071 66.7069C20.3171 66.3169 20.3171 65.6829 20.7071 65.2929L23.6411 62.3589C23.8391 62.1609 24.161 62.1609 24.359 62.3589C24.557 62.5569 24.557 62.8779 24.359 63.0759L21.939 65.495H27.4951C27.7741 65.495 28.0001 65.7209 28.0001 65.9999Z" fill="white"/>
16
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M9 404H211V432.5C211 436.642 207.642 440 203.5 440H16.5C12.358 440 9 436.642 9 432.5V404Z" fill="white"/>
17
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M189.006 427.286L201 422.143L189.006 417L189 421L197.571 422.143L189 423.286L189.006 427.286Z" fill="#B3BAC5"/>
18
+ </g>
19
+ <defs>
20
+ <clipPath id="clip0_77_525">
21
+ <rect width="220" height="472" fill="white"/>
22
+ </clipPath>
23
+ </defs>
24
+ </svg>
@@ -0,0 +1,24 @@
1
+ <svg width="220" height="472" viewBox="0 0 220 472" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_77_543)">
3
+ <path d="M194 0H26C11.6406 0 0 11.6406 0 26V446C0 460.359 11.6406 472 26 472H194C208.359 472 220 460.359 220 446V26C220 11.6406 208.359 0 194 0Z" fill="#101211"/>
4
+ <path d="M202 36H18C13.0294 36 9 40.0294 9 45V431C9 435.971 13.0294 440 18 440H202C206.971 440 211 435.971 211 431V45C211 40.0294 206.971 36 202 36Z" fill="#DFE2E7"/>
5
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M18 36H202C206.97 36 211 40.03 211 45V51H9V45C9 40.03 13.03 36 18 36Z" fill="#202D48"/>
6
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M9 82H211V51H9V82Z" fill="#202D48"/>
7
+ <path d="M133.5 14H86.5C85.1193 14 84 15.1193 84 16.5C84 17.8807 85.1193 19 86.5 19H133.5C134.881 19 136 17.8807 136 16.5C136 15.1193 134.881 14 133.5 14Z" fill="#2E2E2E"/>
8
+ <path d="M133.5 455H86.5C85.1193 455 84 456.119 84 457.5C84 458.881 85.1193 460 86.5 460H133.5C134.881 460 136 458.881 136 457.5C136 456.119 134.881 455 133.5 455Z" fill="#2E2E2E"/>
9
+ <path d="M45.5 25C48.5376 25 51 22.5376 51 19.5C51 16.4624 48.5376 14 45.5 14C42.4624 14 40 16.4624 40 19.5C40 22.5376 42.4624 25 45.5 25Z" fill="#2E2E2E"/>
10
+ <path d="M65.5 23C67.433 23 69 21.433 69 19.5C69 17.567 67.433 16 65.5 16C63.567 16 62 17.567 62 19.5C62 21.433 63.567 23 65.5 23Z" fill="#2E2E2E"/>
11
+ <path d="M53.316 64.684H60.888V65.512H53.316V64.684ZM53.7 62.212H60.528V63.016H53.7V62.212ZM56.532 62.584H57.432V64.384C57.432 65.884 57.024 67.852 54 69.208C53.88 69.016 53.604 68.704 53.4 68.548C56.316 67.372 56.532 65.608 56.532 64.372V62.584ZM57.684 65.212C58.14 66.892 59.196 68.008 60.912 68.5C60.708 68.68 60.456 69.028 60.336 69.268C58.524 68.632 57.432 67.336 56.904 65.38L57.684 65.212ZM52.632 64.66V68.908H51.756V65.5H50.076V64.66H52.632ZM52.632 68.512C53.196 69.4 54.264 69.808 55.644 69.868C56.952 69.916 59.652 69.88 61.068 69.784C60.972 70 60.816 70.432 60.78 70.708C59.46 70.756 56.976 70.78 55.644 70.732C54.084 70.672 53.004 70.252 52.236 69.304C51.66 69.82 51.048 70.336 50.4 70.864L49.92 69.94C50.496 69.556 51.204 69.028 51.816 68.512H52.632ZM50.208 60.76L50.868 60.22C51.66 60.724 52.572 61.504 52.98 62.092L52.272 62.68C51.888 62.104 50.988 61.288 50.208 60.76ZM58.956 59.92L59.868 60.232C59.46 60.916 58.968 61.708 58.572 62.212L57.84 61.936C58.212 61.396 58.704 60.532 58.956 59.92ZM54.168 60.28L54.936 59.968C55.416 60.544 55.884 61.336 56.052 61.888L55.236 62.248C55.08 61.708 54.636 60.88 54.168 60.28ZM66.348 60.496H71.904V61.228H66.348V60.496ZM66.204 63.82H72.12V64.564H66.204V63.82ZM66.204 65.488H72.096V66.232H66.204V65.488ZM66.552 69.652H71.76V70.396H66.552V69.652ZM65.22 62.152H73.032V62.908H65.22V62.152ZM66.084 67.156H72.228V70.924H71.328V67.888H66.948V70.96H66.084V67.156ZM64.812 59.956L65.664 60.22C64.848 62.248 63.564 64.264 62.232 65.596C62.148 65.392 61.896 64.924 61.728 64.708C62.94 63.568 64.116 61.78 64.812 59.956ZM63.564 63.052L64.416 62.2L64.428 62.212V70.936H63.564V63.052ZM74.148 63.784H84.84V64.588H74.148V63.784ZM75.204 61.432H82.152V62.236H75.204V61.432ZM77.148 67.804H82.8V68.524H77.148V67.804ZM77.148 69.796H82.8V70.576H77.148V69.796ZM78.288 59.92H79.164V64.216H78.288V59.92ZM83.544 60.34L84.312 60.748C81.9 63.904 78.288 66.268 74.448 67.744C74.34 67.54 74.052 67.168 73.872 66.988C77.748 65.644 81.324 63.316 83.544 60.34ZM76.656 65.86H83.376V70.924H82.44V66.616H77.556V70.972H76.656V65.86ZM92.256 61.816C92.1 63.064 91.86 64.468 91.488 65.752C90.756 68.212 89.796 69.484 88.692 69.484C87.612 69.484 86.544 68.26 86.544 66.268C86.544 63.664 88.86 61.396 91.8 61.396C94.608 61.396 96.396 63.376 96.396 65.812C96.396 68.32 94.74 70 91.884 70.372L91.332 69.484C91.716 69.448 92.076 69.4 92.364 69.34C93.9 68.992 95.412 67.84 95.412 65.764C95.412 63.844 94.08 62.26 91.776 62.26C89.136 62.26 87.492 64.432 87.492 66.196C87.492 67.708 88.176 68.38 88.716 68.38C89.28 68.38 89.928 67.564 90.54 65.536C90.888 64.396 91.14 63.04 91.26 61.792L92.256 61.816ZM101.868 69.652H107.664V70.48H101.868V69.652ZM101.46 61.132H105.864V61.936H101.46V61.132ZM102 59.884L103.008 60.088C102.108 61.648 100.668 63.28 98.58 64.516C98.448 64.288 98.148 63.976 97.944 63.82C99.924 62.74 101.304 61.192 102 59.884ZM105.564 61.132H105.732L105.9 61.084L106.5 61.408C105.06 65.032 101.676 67.444 98.412 68.5C98.304 68.26 98.076 67.888 97.884 67.696C100.992 66.796 104.316 64.444 105.564 61.288V61.132ZM99.96 63.268L100.632 62.692C101.58 63.34 102.732 64.3 103.284 64.984L102.552 65.632C102.048 64.948 100.908 63.94 99.96 63.268ZM107.22 65.86H108.144V70.984H107.22V65.86ZM102.276 65.86H107.676V66.688H102.276V70.96H101.376V66.568L102.096 65.86H102.276ZM110.136 61.816H120.864V62.656H110.136V61.816ZM111.372 65.68H114.732V66.388H111.372V65.68ZM111.372 67.6H114.732V68.308H111.372V67.6ZM116.736 63.832H117.588V68.764H116.736V63.832ZM114.408 63.724H115.284V69.928C115.284 70.384 115.176 70.624 114.84 70.768C114.516 70.912 113.988 70.912 113.172 70.912C113.124 70.684 112.992 70.348 112.872 70.12C113.472 70.144 114.024 70.144 114.192 70.132C114.36 70.12 114.408 70.072 114.408 69.916V63.724ZM119.172 63.472H120.06V69.844C120.06 70.372 119.94 70.624 119.568 70.768C119.196 70.9 118.596 70.924 117.66 70.924C117.612 70.684 117.468 70.3 117.336 70.06C118.068 70.084 118.716 70.084 118.92 70.072C119.112 70.06 119.172 70.012 119.172 69.844V63.472ZM111.996 60.22L112.824 59.908C113.292 60.424 113.796 61.132 114.024 61.6L113.136 61.924C112.944 61.468 112.452 60.736 111.996 60.22ZM118.164 59.872L119.124 60.184C118.668 60.928 118.128 61.756 117.684 62.32L116.892 62.02C117.324 61.444 117.864 60.52 118.164 59.872ZM110.892 63.724H114.696V64.504H111.744V70.9H110.892V63.724Z" fill="white"/>
12
+ <path d="M199 64C199.552 64 200 63.5523 200 63C200 62.4477 199.552 62 199 62C198.448 62 198 62.4477 198 63C198 63.5523 198.448 64 199 64Z" fill="white"/>
13
+ <path d="M199 71C199.552 71 200 70.5523 200 70C200 69.4477 199.552 69 199 69C198.448 69 198 69.4477 198 70C198 70.5523 198.448 71 199 71Z" fill="white"/>
14
+ <path d="M199 67.5C199.552 67.5 200 67.0523 200 66.5C200 65.9477 199.552 65.5 199 65.5C198.448 65.5 198 65.9477 198 66.5C198 67.0523 198.448 67.5 199 67.5Z" fill="white"/>
15
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M28.0001 65.9999C28.0001 66.2789 27.7741 66.5049 27.4951 66.5049H21.939L24.359 68.925C24.557 69.122 24.557 69.4429 24.359 69.6409C24.161 69.8389 23.8391 69.8389 23.6411 69.6409L20.7071 66.7069C20.3171 66.3169 20.3171 65.6829 20.7071 65.2929L23.6411 62.3589C23.8391 62.1609 24.161 62.1609 24.359 62.3589C24.557 62.5569 24.557 62.8779 24.359 63.0759L21.939 65.495H27.4951C27.7741 65.495 28.0001 65.7209 28.0001 65.9999Z" fill="white"/>
16
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M9 404H211V432.5C211 436.642 207.642 440 203.5 440H16.5C12.358 440 9 436.642 9 432.5V404Z" fill="white"/>
17
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M189.006 427.286L201 422.143L189.006 417L189 421L197.571 422.143L189 423.286L189.006 427.286Z" fill="#B3BAC5"/>
18
+ </g>
19
+ <defs>
20
+ <clipPath id="clip0_77_543">
21
+ <rect width="220" height="472" fill="white"/>
22
+ </clipPath>
23
+ </defs>
24
+ </svg>
@@ -182,8 +182,8 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
182
182
  visible={this.state.visible}
183
183
  onVisibleChange={this.togglePopoverVisibility}
184
184
  content={<div>
185
- <Spin tip="Getting tags..." spinning={this.props.loading}>
186
- <Search style={{ marginBottom: 8, width: '250px'}} placeholder="Search" onChange={this.onChange} />
185
+ <Spin tip={this.props?.intl?.formatMessage(messages.gettingTags)} spinning={this.props.loading}>
186
+ <Search style={{ marginBottom: 8, width: '250px'}} placeholder={this.props?.intl?.formatMessage(messages.searchText)} onChange={this.onChange} />
187
187
  {this.props.moduleFilterEnabled ? <CapSelect getPopupContainer={(triggerNode) => triggerNode.parentNode} style={{width: '250px', marginBottom: '16px', minWidth: 'initial', display: 'inherit'}} onChange={this.props.onContextChange} defaultValue="All" options={options}>
188
188
  </CapSelect> : ''}
189
189
  <Tree
@@ -34,4 +34,12 @@ export default defineMessages({
34
34
  id: 'creatives.components.CapTagList.loyalty',
35
35
  defaultMessage: 'Loyalty',
36
36
  },
37
+ "searchText": {
38
+ id: 'creatives.components.CapTagList.searchText',
39
+ defaultMessage: 'Search',
40
+ },
41
+ "gettingTags": {
42
+ id: 'creatives.components.CapTagList.gettingTags',
43
+ defaultMessage: "Getting tags...",
44
+ },
37
45
  });
@@ -12,15 +12,17 @@ import React from 'react';
12
12
  // import { FormattedMessage } from 'react-intl';
13
13
  import _ from 'lodash';
14
14
  // import messages from './messages';
15
+ import './style.scss';
15
16
  const loadScript = require('load-script');
16
- const defaultScriptUrl = "https://storage.crm.n.content-cdn.io/ckeditor_test/ckeditor4/ckeditor.js";
17
+ // fetching ckeditor from s3 by rerouting through arya whitelisted services
18
+ const defaultScriptUrl = `${window.location.origin}/arya/ui/library/ckeditor/ckeditor.js`;
17
19
  const user = localStorage.getItem('user');
18
20
  let locale = 'en';
19
21
  if (user && JSON.parse(user).lang) {
20
22
  locale = JSON.parse(user).lang;
21
23
  }
22
24
  const CKEditorConfig = {
23
- skin: 'moono',
25
+ skin: 'moono-lisa',
24
26
  toolbar: [
25
27
  { name: 'document', items: ['Source', '-'] },
26
28
  { name: 'clipboard', items: ['Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'] },
@@ -0,0 +1,3 @@
1
+ .cke_notification_warning {
2
+ display: none;
3
+ }
@@ -1,13 +1,3 @@
1
- .ant-tabs-nav{
2
- text-align: center;
3
- color: #333333;
4
- line-height: 24px;
5
- font-size: 16px;
6
- font-family: open-sans, sans-serif;
7
- font-style: normal;
8
- font-weight: 600;
9
- }
10
-
11
1
  .form-tab-header{
12
2
  display: flex;
13
3
  align-items: center;
@@ -16,17 +6,15 @@
16
6
  font-weight: 600;
17
7
  }
18
8
 
19
- .ant-tabs-tab{
20
- // border: 1px solid #1D5B96;
21
- // border-bottom: 2px solid #1D5B96;
22
- padding: 0 16px 0 8px !important;
23
- }
24
-
25
9
  .textarea-error-message {
26
10
  top: initial !important;
27
11
  bottom: 4px !important;
28
12
  }
29
13
 
14
+ input.ant-input {
15
+ border: 1px solid #b3bac5 !important;
16
+ border-radius: 4px !important;
17
+ }
30
18
  .cap-input {
31
19
  .error-message {
32
20
  margin-left: initial !important;
@@ -24,6 +24,7 @@ import EDMEditor from "../../components/Edmeditor";
24
24
  import CustomPopOver from '../../components/CustomPopOver';
25
25
  import './_formBuilder.scss';
26
26
  import {updateCharCount, checkUnicode} from "../../utils/smsCharCountV2";
27
+ import globalMessages from '../../v2Containers/Cap/messages';
27
28
  import messages from './messages';
28
29
  const TabPane = Tabs.TabPane;
29
30
  const {Column} = Table;
@@ -1516,8 +1517,8 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
1516
1517
  this.setState({errorData: formData});
1517
1518
  } else {
1518
1519
  const tempTab = ifError ? currentTab : this.state.currentTab;
1519
- const version = `Version ${this.state.currentTab}`;
1520
- formData[tabCount].name = `Copy of ${formData[tempTab - 1].name ? formData[tempTab - 1].name : version}`;
1520
+ const version = `${this.props.intl.formatMessage(messages.version)} ${this.state.currentTab}`;
1521
+ formData[tabCount].name = `${this.props?.intl?.formatMessage(globalMessages.copyOf)} ${formData[tempTab - 1].name ? formData[tempTab - 1].name : version}`;
1521
1522
  formData[tabCount].base = false;
1522
1523
  const initialTab = this.state.currentTab;
1523
1524
  this.setState({formData, tabCount: tabCount + 1, currentTab: tabCount + 1, tabKey: formData[tabCount].tabKey}, () => {
@@ -2043,7 +2044,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
2043
2044
  const _URL = window.URL || window.webkitURL;
2044
2045
  const file = files[0];
2045
2046
  if (val.supportedExtensions) {
2046
- const allowedExtensions = /(\.bmp|\.jpeg|\.png|\.gif|\.jpg)$/i;
2047
+ const allowedExtensions = /(\.bmp|\.jpeg|\.png|\.gif|\.avif|\.jpg)$/i;
2047
2048
  if (!allowedExtensions.exec(file.name)) {
2048
2049
  this.callChildEvent({file, type: 'wrong file'}, val, val.submitAction);
2049
2050
  }
@@ -54,4 +54,8 @@ export default defineMessages({
54
54
  id: 'creatives.components.FormBuilder.ok',
55
55
  defaultMessage: 'Ok',
56
56
  },
57
+ Version: {
58
+ id: 'creatives.components.FormBuilder.version',
59
+ defaultMessage: 'Version',
60
+ },
57
61
  });
@@ -4,9 +4,10 @@ import React from 'react';
4
4
  import { Accordion, Icon, Input, Button } from 'semantic-ui-react';
5
5
  import { FormattedMessage } from 'react-intl';
6
6
  import _ from 'lodash';
7
- import { Link } from 'react-router';
7
+ import { Link } from 'react-router-dom';
8
8
  import messages from './messages';
9
9
  import './_sidebar.scss';
10
+ import { withRouter } from 'react-router-dom';
10
11
 
11
12
  class Sidebar extends React.Component { // eslint-disable-line react/prefer-stateless-function
12
13
  constructor(props) {
@@ -68,8 +69,7 @@ class Sidebar extends React.Component { // eslint-disable-line react/prefer-stat
68
69
  }
69
70
 
70
71
  selectActiveLinkFromUrl(props) {
71
- const activeRoute = props.router.routes[props.router.routes.length - 1] || {};
72
- const activeRouteName = (activeRoute.name && activeRoute.name.trim().toLowerCase()) || '';
72
+ const activeRouteName = this.props.history.location.pathname?.split('/')[1];
73
73
  let selectedItem = '';
74
74
  let selectedIndex = -1;
75
75
  _.forEach(props.menuData, (menuItem, menuIndex) => {
@@ -205,4 +205,4 @@ Sidebar.propTypes = {
205
205
  actionComponents: PropTypes.oneOfType([PropTypes.element, PropTypes.string]),
206
206
  };
207
207
 
208
- export default Sidebar;
208
+ export default withRouter(Sidebar);
package/config/path.js CHANGED
@@ -1,4 +1,4 @@
1
1
  module.exports = {
2
- publicPath: '/creatives/ui/',
2
+ publicPath: '/creatives/ui',
3
3
  engagePlusPublicPath: '/campaigns/ui',
4
4
  };
@@ -5,6 +5,18 @@ export const GET_SIDEBAR_FAILURE = 'app/App/GET_SIDEBAR_FAILURE';
5
5
  export const STORE2DOOR_PLUS_ENABLED = 'STORE2DOOR_PLUS_ENABLED';
6
6
  export const TRAI_DLT = 'TRAI_DLT';
7
7
  export const CARD_BASED_SCOPE = 'CARD_BASED_SCOPE';
8
+ export const HOSPITALITY_BASED_SCOPE = 'HOSPITALITY_BASED_SCOPE';
9
+ export const REGISTRATION_CUSTOM_FIELD = 'Registration custom fields';
10
+ export const GIFT_CARDS = 'GIFT_CARDS';
11
+ export const PROMO_ENGINE = 'PROMO_ENGINE';
12
+ export const CUSTOM_TAG = 'CustomTagMessage';
13
+ export const CUSTOMER_EXTENDED_FIELD = 'Customer extended fields';
14
+ export const EXTENDED_TAG = 'ExtendedTagMessage';
15
+ export const BADGES_UI_ENABLED = 'BADGES_UI_ENABLED';
16
+ export const JP_LOCALE_HIDE_FEATURE = 'JP_LOCALE_HIDE_FEATURE';
17
+ export const ENABLE_WECHAT = 'ENABLE_WECHAT';
18
+ export const ENABLE_CUSTOMER_BARCODE_TAG = "ENABLE_CUSTOMER_BARCODE_TAG";
19
+ export const EMAIL_UNSUBSCRIBE_TAG_MANDATORY = "EMAIL_UNSUBSCRIBE_TAG_MANDATORY";
8
20
 
9
21
  export const CARD_RELATED_TAGS = [
10
22
  'card_series',
@@ -14,3 +26,86 @@ export const CARD_RELATED_TAGS = [
14
26
  'card_series_name',
15
27
  'card_name',
16
28
  ];
29
+
30
+ export const HOSPITALITY_RELATED_TAGS = [
31
+ "hospitality_series",
32
+ "tax_Code",
33
+ "roomTypeCode",
34
+ "bookingChannel",
35
+ "hotelReservationID_ResID_Type",
36
+ "lastModifyDateTime",
37
+ "guestCounts_IsPerRoom",
38
+ "ratePlan_RatePlanCode",
39
+ "resID_Value",
40
+ "numberOfUnits",
41
+ "rateTimeUnit",
42
+ "resStatus",
43
+ "timeSpan_End",
44
+ "roomStay_MarketCode",
45
+ "createDateTime",
46
+ "amount",
47
+ "timeSpan_Start",
48
+ "email",
49
+ "resID_Source",
50
+ ];
51
+ export const GIFT_VOUCHER_RELATED_TAGS = [
52
+ "gift_voucher",
53
+ "gift_voucher_expiry_date.FORMAT_1",
54
+ "gift_voucher_expiry_date.FORMAT_2",
55
+ "gift_voucher_expiry_date.FORMAT_3",
56
+ "gift_voucher_expiry_date.FORMAT_4",
57
+ "gift_voucher_expiry_date.FORMAT_5",
58
+ "gift_voucher_expiry_date.FORMAT_6",
59
+ "gift_voucher_expiry_date.FORMAT_7",
60
+ "gift_voucher_expiry_date.FORMAT_8",
61
+ "gift_voucher_expiry_date",
62
+ ];
63
+ export const PROMO_ENGINE_RELATED_TAGS = [
64
+ "promotion",
65
+ "promotion_expiry_date.FORMAT_1",
66
+ "promotion_expiry_date.FORMAT_2",
67
+ "promotion_expiry_date.FORMAT_3",
68
+ "promotion_expiry_date.FORMAT_4",
69
+ "promotion_expiry_date.FORMAT_5",
70
+ "promotion_expiry_date.FORMAT_6",
71
+ "promotion_expiry_date.FORMAT_7",
72
+ "promotion_expiry_date.FORMAT_8",
73
+ "promotion_expiry_date",
74
+ ];
75
+
76
+ export const BADGES_RELATED_TAGS = [
77
+ "Badge_expiry_date",
78
+ "badges_issue_expiry_date",
79
+ "badge_expiry_mm_slash_dd_slash_yyyy",
80
+ "badge_expiry_dd_slash_mm_slash_yyyy",
81
+ "badge_expiry_yyyy_hyphen_mm_hyphen_dd",
82
+ "badge_expiry_mm_slash_dd_slash_yy",
83
+ "badge_expiry_dd_space_Mon_space_yyyy",
84
+ "badge_expiry_Day_comma_space_Mon_space_dd_comma_space_yy",
85
+ "badge_expiry_Dd_dot_mm_dot_yy",
86
+ "badge_expiry_dd_space_Mon",
87
+ "Days_until_expiry",
88
+ "badges_enroll_expiry_date.FORMAT_1",
89
+ "badges_enroll_expiry_date.FORMAT_2",
90
+ "badges_enroll_expiry_date.FORMAT_3",
91
+ "badges_enroll_expiry_date.FORMAT_4",
92
+ "badges_enroll_expiry_date.FORMAT_5",
93
+ "badges_enroll_expiry_date.FORMAT_6",
94
+ "badges_enroll_expiry_date.FORMAT_7",
95
+ "badges_enroll_expiry_date.FORMAT_8",
96
+ "badges_enroll_expiring_in_days",
97
+ "badges_issue_expiry_date.FORMAT_1",
98
+ "badges_issue_expiry_date.FORMAT_2",
99
+ "badges_issue_expiry_date.FORMAT_3",
100
+ "badges_issue_expiry_date.FORMAT_4",
101
+ "badges_issue_expiry_date.FORMAT_5",
102
+ "badges_issue_expiry_date.FORMAT_6",
103
+ "badges_issue_expiry_date.FORMAT_7",
104
+ "badges_issue_expiry_date.FORMAT_8",
105
+ "badges_issue_expiring_in_days",
106
+ ];
107
+ export const BADGES_ENROLL = 'BADGES_ENROLL';
108
+ export const BADGES_ISSUE = 'BADGES_ISSUE';
109
+
110
+ export const CUSTOMER_BARCODE_TAG = "customer_barcode";
111
+ export const COPY_OF = "Copy of";
@@ -0,0 +1,52 @@
1
+ /**
2
+ *
3
+ * App.js
4
+ *
5
+ * This component is the skeleton around the actual pages, and should only
6
+ * contain code that should be seen on all pages. (e.g. navigation bar)
7
+ *
8
+ */
9
+
10
+ import React, { useEffect } from 'react'; // eslint-disable-line no-unused-vars
11
+ import { Switch } from 'react-router';
12
+ import { ConnectedRouter } from 'connected-react-router/immutable';
13
+ import history from 'utils/history';
14
+
15
+ import Cap from '../Cap';
16
+ import CapV2 from '../../v2Containers/Cap';
17
+ import Login from '../Login';
18
+ import NotFoundPage from '../NotFoundPage';
19
+
20
+ import GlobalStyle from '../../global-styles';
21
+ import config from '../../config/app';
22
+ import withReactRouterV3Compatibility from '../../hoc/withReactRouterV3Compatibility';
23
+ import RenderRoute from '../../v2Components/RenderRoute';
24
+ import { updateCharCount } from '../../utils/smsCharCountV2';
25
+
26
+ const loginUrl =
27
+ process.env.NODE_ENV === 'production'
28
+ ? `${config.production.login_url}`
29
+ : `${config.development.login_url}`;
30
+
31
+ // const Protected = userIsAuthenticatedRedir(Cap);
32
+ const v3CompatibleCap = withReactRouterV3Compatibility(Cap);
33
+ const v3CompatibleCapV2 = withReactRouterV3Compatibility(CapV2);
34
+
35
+ export default function App() {
36
+ useEffect(() => {
37
+ updateCharCount("", false);
38
+ });
39
+ return (
40
+ <div>
41
+ <ConnectedRouter history={history}>
42
+ <Switch>
43
+ <RenderRoute exact path={loginUrl} component={Login} />
44
+ <RenderRoute path="/v2" component={v3CompatibleCapV2} key="/v2" />
45
+ <RenderRoute path="/" component={v3CompatibleCap} key="/" />
46
+ <RenderRoute component={NotFoundPage} />
47
+ </Switch>
48
+ </ConnectedRouter>
49
+ <GlobalStyle />
50
+ </div>
51
+ );
52
+ }
@@ -1,5 +1,4 @@
1
- import { call, put, takeLatest } from 'redux-saga/effects';
2
- // import { LOCATION_CHANGE } from 'react-router-redux';
1
+ import { call, put, takeLatest, all } from 'redux-saga/effects';
3
2
  // import { schema, normalize } from 'normalizr';
4
3
  import * as Api from '../../services/api';
5
4
  import * as types from './constants';
@@ -8,7 +7,7 @@ import * as types from './constants';
8
7
  export function* getSidebar() {
9
8
  try {
10
9
  const result = yield call(Api.getSidebar);
11
- const sidebar = result.response.sidebar;
10
+ const { sidebar } = result.response;
12
11
  yield put({ type: types.GET_SIDEBAR_SUCCESS, sidebar });
13
12
  } catch (error) {
14
13
  yield put({ type: types.GET_SIDEBAR_FAILURE, error });
@@ -24,3 +23,9 @@ function* watchgetSidebar() {
24
23
  export default [
25
24
  watchgetSidebar,
26
25
  ];
26
+
27
+ export function* appSaga() {
28
+ yield all([
29
+ watchgetSidebar(),
30
+ ]);
31
+ }
@@ -8,7 +8,7 @@ import PropTypes from 'prop-types';
8
8
 
9
9
  import React from 'react';
10
10
  import { connect } from 'react-redux';
11
- import { bindActionCreators } from 'redux';
11
+ import { bindActionCreators, compose } from 'redux';
12
12
  import Helmet from 'react-helmet';
13
13
  import { FormattedMessage, injectIntl, intlShape } from 'react-intl';
14
14
  import { createStructuredSelector } from 'reselect';
@@ -28,6 +28,11 @@ import PageHeader from '../../../components/PageHeader';
28
28
  import Pagination from '../../../components/Pagination';
29
29
  import * as commonUtil from '../../../utils/common';
30
30
  import './_gallery.scss';
31
+ import injectSaga from '../../../utils/injectSaga';
32
+ import injectReducer from '../../../utils/injectReducer';
33
+ import reducer from './reducer';
34
+ import { gallerySaga } from './sagas';
35
+
31
36
  const Option = Select.Option;
32
37
 
33
38
  export class Gallery extends React.Component { // eslint-disable-line react/prefer-stateless-function
@@ -336,7 +341,7 @@ export class Gallery extends React.Component { // eslint-disable-line react/pref
336
341
  <CapInput
337
342
  className="search-text"
338
343
  style={{width: '210px'}}
339
- placeholder="Search"
344
+ placeholder={this.props.intl.formatMessage(messages.searchText)}
340
345
  prefix={<i className="material-icons" style={{color: '#707070', fontSize: '16px'}}>search</i>}
341
346
  value={this.state.searchText}
342
347
  onChange={(e) => this.searchAsset(e.target.value)}
@@ -456,4 +461,13 @@ function mapDispatchToProps(dispatch) {
456
461
  };
457
462
  }
458
463
 
459
- export default UserIsAuthenticated(connect(mapStateToProps, mapDispatchToProps)(injectIntl(Gallery)));
464
+ const withConnect = connect(mapStateToProps, mapDispatchToProps);
465
+ const withSaga = injectSaga({ key: 'gallery', saga: gallerySaga });
466
+ const withReducer = injectReducer({ key: 'gallery', reducer });
467
+
468
+ export default compose(
469
+ UserIsAuthenticated,
470
+ withSaga,
471
+ withReducer,
472
+ withConnect,
473
+ )(injectIntl(Gallery));
@@ -86,4 +86,8 @@ export default defineMessages({
86
86
  id: 'creatives.containers.Assets.Gallery.assetDeleteFailed',
87
87
  defaultMessage: 'Image deletion failed.',
88
88
  },
89
+ searchText: {
90
+ id: 'creatives.components.CapTagList.searchText',
91
+ defaultMessage: 'Search',
92
+ },
89
93
  });