@bigbinary/neeto-commons-frontend 4.13.27 → 4.13.29

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 (241) hide show
  1. package/dist/cjs/createClass-DtcoOmOY.js +23 -0
  2. package/dist/cjs/createClass-DtcoOmOY.js.map +1 -0
  3. package/dist/cjs/cypress-utils/commands.js +2 -1
  4. package/dist/cjs/cypress-utils/commands.js.map +1 -1
  5. package/dist/cjs/cypress-utils/constants/routes.js +2 -1
  6. package/dist/cjs/cypress-utils/constants/routes.js.map +1 -1
  7. package/dist/cjs/cypress-utils/constants/selectors/common.js +2 -1
  8. package/dist/cjs/cypress-utils/constants/selectors/common.js.map +1 -1
  9. package/dist/cjs/cypress-utils/constants/selectors/editor.js +2 -1
  10. package/dist/cjs/cypress-utils/constants/selectors/editor.js.map +1 -1
  11. package/dist/cjs/cypress-utils/constants/selectors/ipRestriction.js +2 -1
  12. package/dist/cjs/cypress-utils/constants/selectors/ipRestriction.js.map +1 -1
  13. package/dist/cjs/cypress-utils/constants/selectors/login.js +2 -1
  14. package/dist/cjs/cypress-utils/constants/selectors/login.js.map +1 -1
  15. package/dist/cjs/cypress-utils/constants/selectors/member.js +2 -1
  16. package/dist/cjs/cypress-utils/constants/selectors/member.js.map +1 -1
  17. package/dist/cjs/cypress-utils/constants/selectors/navigation.js +2 -1
  18. package/dist/cjs/cypress-utils/constants/selectors/navigation.js.map +1 -1
  19. package/dist/cjs/cypress-utils/constants/selectors/signUp.js +2 -1
  20. package/dist/cjs/cypress-utils/constants/selectors/signUp.js.map +1 -1
  21. package/dist/cjs/cypress-utils/constants/selectors/tags.js +2 -1
  22. package/dist/cjs/cypress-utils/constants/selectors/tags.js.map +1 -1
  23. package/dist/cjs/cypress-utils/index.js +2 -1
  24. package/dist/cjs/cypress-utils/index.js.map +1 -1
  25. package/dist/cjs/cypress-utils/utils/authentication.js +2 -1
  26. package/dist/cjs/cypress-utils/utils/authentication.js.map +1 -1
  27. package/dist/cjs/cypress-utils/utils/common.js +2 -1
  28. package/dist/cjs/cypress-utils/utils/common.js.map +1 -1
  29. package/dist/cjs/cypress-utils/utils/email.js +2 -1
  30. package/dist/cjs/cypress-utils/utils/email.js.map +1 -1
  31. package/dist/cjs/cypress-utils/utils/member.js +2 -1
  32. package/dist/cjs/cypress-utils/utils/member.js.map +1 -1
  33. package/dist/cjs/cypress-utils/utils/navigation.js +2 -1
  34. package/dist/cjs/cypress-utils/utils/navigation.js.map +1 -1
  35. package/dist/cjs/cypress-utils/utils/organization.js +2 -1
  36. package/dist/cjs/cypress-utils/utils/organization.js.map +1 -1
  37. package/dist/cjs/cypress-utils/utils/validation.js +2 -1
  38. package/dist/cjs/cypress-utils/utils/validation.js.map +1 -1
  39. package/dist/cjs/defineProperty-BB_r6qQ2.js +15 -0
  40. package/dist/cjs/defineProperty-BB_r6qQ2.js.map +1 -0
  41. package/dist/cjs/initializers/axios.js +2 -1
  42. package/dist/cjs/initializers/axios.js.map +1 -1
  43. package/dist/cjs/initializers/axiosInitializer/index.js +2 -1
  44. package/dist/cjs/initializers/axiosInitializer/index.js.map +1 -1
  45. package/dist/cjs/initializers/i18n.js +5 -52
  46. package/dist/cjs/initializers/i18n.js.map +1 -1
  47. package/dist/cjs/initializers/index.js +3 -1
  48. package/dist/cjs/initializers/index.js.map +1 -1
  49. package/dist/cjs/{objectWithoutProperties-DQlolGrE.js → objectWithoutProperties-wSsbHFcG.js} +4 -4
  50. package/dist/cjs/objectWithoutProperties-wSsbHFcG.js.map +1 -0
  51. package/dist/cjs/react-utils/AppContainer/AppContainer.js +2 -1
  52. package/dist/cjs/react-utils/AppContainer/AppContainer.js.map +1 -1
  53. package/dist/cjs/react-utils/AppContainer/index.js +2 -1
  54. package/dist/cjs/react-utils/AppContainer/index.js.map +1 -1
  55. package/dist/cjs/react-utils/HoneybadgerErrorBoundary/FallbackComponent.js +2 -1
  56. package/dist/cjs/react-utils/HoneybadgerErrorBoundary/FallbackComponent.js.map +1 -1
  57. package/dist/cjs/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js +2 -1
  58. package/dist/cjs/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js.map +1 -1
  59. package/dist/cjs/react-utils/HoneybadgerErrorBoundary/index.js +2 -1
  60. package/dist/cjs/react-utils/HoneybadgerErrorBoundary/index.js.map +1 -1
  61. package/dist/cjs/react-utils/PrivateRoute/PrivateRoute.js +10 -5
  62. package/dist/cjs/react-utils/PrivateRoute/PrivateRoute.js.map +1 -1
  63. package/dist/cjs/react-utils/PrivateRoute/index.js +3 -2
  64. package/dist/cjs/react-utils/PrivateRoute/index.js.map +1 -1
  65. package/dist/cjs/react-utils/index.js +4 -2
  66. package/dist/cjs/react-utils/index.js.map +1 -1
  67. package/dist/cjs/react-utils/useBreakpoints/index.js +2 -1
  68. package/dist/cjs/react-utils/useBreakpoints/index.js.map +1 -1
  69. package/dist/cjs/react-utils/useBreakpoints/utils.js +2 -1
  70. package/dist/cjs/react-utils/useBreakpoints/utils.js.map +1 -1
  71. package/dist/cjs/react-utils/useFetchNeetoApps/index.js +3 -2
  72. package/dist/cjs/react-utils/useFetchNeetoApps/index.js.map +1 -1
  73. package/dist/cjs/react-utils/useFetchNeetoApps/useFetchNeetoApps.js +3 -2
  74. package/dist/cjs/react-utils/useFetchNeetoApps/useFetchNeetoApps.js.map +1 -1
  75. package/dist/cjs/react-utils/useLocalStorage/index.js +4 -2
  76. package/dist/cjs/react-utils/useLocalStorage/index.js.map +1 -1
  77. package/dist/cjs/react-utils/useLocalStorage/useLocalStorage.js +4 -2
  78. package/dist/cjs/react-utils/useLocalStorage/useLocalStorage.js.map +1 -1
  79. package/dist/cjs/react-utils/useMutationWithInvalidation/index.js +3 -2
  80. package/dist/cjs/react-utils/useMutationWithInvalidation/index.js.map +1 -1
  81. package/dist/cjs/react-utils/useMutationWithInvalidation/useMutationWithInvalidation.js +3 -2
  82. package/dist/cjs/react-utils/useMutationWithInvalidation/useMutationWithInvalidation.js.map +1 -1
  83. package/dist/cjs/react-utils/usePersistedQuery/index.js +3 -2
  84. package/dist/cjs/react-utils/usePersistedQuery/index.js.map +1 -1
  85. package/dist/cjs/react-utils/usePersistedQuery/usePersistedQuery.js +3 -2
  86. package/dist/cjs/react-utils/usePersistedQuery/usePersistedQuery.js.map +1 -1
  87. package/dist/cjs/react-utils/useQueryParams/index.js +3 -2
  88. package/dist/cjs/react-utils/useQueryParams/index.js.map +1 -1
  89. package/dist/cjs/react-utils/useQueryParams/useQueryParams.js +3 -2
  90. package/dist/cjs/react-utils/useQueryParams/useQueryParams.js.map +1 -1
  91. package/dist/cjs/react-utils/useRegisterNavigationCheckpoint/index.js +3 -2
  92. package/dist/cjs/react-utils/useRegisterNavigationCheckpoint/index.js.map +1 -1
  93. package/dist/cjs/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js +3 -2
  94. package/dist/cjs/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js.map +1 -1
  95. package/dist/cjs/react-utils/withTitle/index.js +2 -1
  96. package/dist/cjs/react-utils/withTitle/index.js.map +1 -1
  97. package/dist/cjs/react-utils/withTitle/withTitle.js +2 -1
  98. package/dist/cjs/react-utils/withTitle/withTitle.js.map +1 -1
  99. package/dist/cjs/{defineProperty-Cm9b1C1w.js → toPropertyKey-CRgrohXG.js} +1 -11
  100. package/dist/cjs/toPropertyKey-CRgrohXG.js.map +1 -0
  101. package/dist/cjs/utils/buildNestedAttributesPayload.js +2 -1
  102. package/dist/cjs/utils/buildNestedAttributesPayload.js.map +1 -1
  103. package/dist/cjs/utils/captureAnalyticsPageView.js +2 -1
  104. package/dist/cjs/utils/captureAnalyticsPageView.js.map +1 -1
  105. package/dist/cjs/utils/createSubscription.js +3 -2
  106. package/dist/cjs/utils/createSubscription.js.map +1 -1
  107. package/dist/cjs/utils/currencyFormat.js +2 -1
  108. package/dist/cjs/utils/currencyFormat.js.map +1 -1
  109. package/dist/cjs/utils/datetime.js +3 -1
  110. package/dist/cjs/utils/datetime.js.map +1 -1
  111. package/dist/cjs/utils/dayjs.js +5 -19
  112. package/dist/cjs/utils/dayjs.js.map +1 -1
  113. package/dist/cjs/utils/general.js +3 -2
  114. package/dist/cjs/utils/general.js.map +1 -1
  115. package/dist/cjs/utils/index.js +4 -2
  116. package/dist/cjs/utils/index.js.map +1 -1
  117. package/dist/cjs/utils/timezonePlugin.js +2 -1
  118. package/dist/cjs/utils/timezonePlugin.js.map +1 -1
  119. package/dist/createClass-BvEaZs3T.js +20 -0
  120. package/dist/createClass-BvEaZs3T.js.map +1 -0
  121. package/dist/cypress-utils/commands.js +2 -1
  122. package/dist/cypress-utils/commands.js.map +1 -1
  123. package/dist/cypress-utils/constants/routes.js +2 -1
  124. package/dist/cypress-utils/constants/routes.js.map +1 -1
  125. package/dist/cypress-utils/constants/selectors/common.js +2 -1
  126. package/dist/cypress-utils/constants/selectors/common.js.map +1 -1
  127. package/dist/cypress-utils/constants/selectors/editor.js +2 -1
  128. package/dist/cypress-utils/constants/selectors/editor.js.map +1 -1
  129. package/dist/cypress-utils/constants/selectors/ipRestriction.js +2 -1
  130. package/dist/cypress-utils/constants/selectors/ipRestriction.js.map +1 -1
  131. package/dist/cypress-utils/constants/selectors/login.js +2 -1
  132. package/dist/cypress-utils/constants/selectors/login.js.map +1 -1
  133. package/dist/cypress-utils/constants/selectors/member.js +2 -1
  134. package/dist/cypress-utils/constants/selectors/member.js.map +1 -1
  135. package/dist/cypress-utils/constants/selectors/navigation.js +2 -1
  136. package/dist/cypress-utils/constants/selectors/navigation.js.map +1 -1
  137. package/dist/cypress-utils/constants/selectors/signUp.js +2 -1
  138. package/dist/cypress-utils/constants/selectors/signUp.js.map +1 -1
  139. package/dist/cypress-utils/constants/selectors/tags.js +2 -1
  140. package/dist/cypress-utils/constants/selectors/tags.js.map +1 -1
  141. package/dist/cypress-utils/index.js +2 -1
  142. package/dist/cypress-utils/index.js.map +1 -1
  143. package/dist/cypress-utils/utils/authentication.js +2 -1
  144. package/dist/cypress-utils/utils/authentication.js.map +1 -1
  145. package/dist/cypress-utils/utils/common.js +2 -1
  146. package/dist/cypress-utils/utils/common.js.map +1 -1
  147. package/dist/cypress-utils/utils/email.js +2 -1
  148. package/dist/cypress-utils/utils/email.js.map +1 -1
  149. package/dist/cypress-utils/utils/member.js +2 -1
  150. package/dist/cypress-utils/utils/member.js.map +1 -1
  151. package/dist/cypress-utils/utils/navigation.js +2 -1
  152. package/dist/cypress-utils/utils/navigation.js.map +1 -1
  153. package/dist/cypress-utils/utils/organization.js +2 -1
  154. package/dist/cypress-utils/utils/organization.js.map +1 -1
  155. package/dist/cypress-utils/utils/validation.js +2 -1
  156. package/dist/cypress-utils/utils/validation.js.map +1 -1
  157. package/dist/defineProperty-DuFCEj0A.js +13 -0
  158. package/dist/defineProperty-DuFCEj0A.js.map +1 -0
  159. package/dist/initializers/axios.js +2 -1
  160. package/dist/initializers/axios.js.map +1 -1
  161. package/dist/initializers/axiosInitializer/index.js +2 -1
  162. package/dist/initializers/axiosInitializer/index.js.map +1 -1
  163. package/dist/initializers/i18n.js +3 -50
  164. package/dist/initializers/i18n.js.map +1 -1
  165. package/dist/initializers/index.js +3 -1
  166. package/dist/initializers/index.js.map +1 -1
  167. package/dist/{objectWithoutProperties-PcUN5OqL.js → objectWithoutProperties-DN7d1SzH.js} +4 -4
  168. package/dist/objectWithoutProperties-DN7d1SzH.js.map +1 -0
  169. package/dist/react-utils/AppContainer/AppContainer.js +2 -1
  170. package/dist/react-utils/AppContainer/AppContainer.js.map +1 -1
  171. package/dist/react-utils/AppContainer/index.js +2 -1
  172. package/dist/react-utils/AppContainer/index.js.map +1 -1
  173. package/dist/react-utils/HoneybadgerErrorBoundary/FallbackComponent.js +2 -1
  174. package/dist/react-utils/HoneybadgerErrorBoundary/FallbackComponent.js.map +1 -1
  175. package/dist/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js +2 -1
  176. package/dist/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js.map +1 -1
  177. package/dist/react-utils/HoneybadgerErrorBoundary/index.js +2 -1
  178. package/dist/react-utils/HoneybadgerErrorBoundary/index.js.map +1 -1
  179. package/dist/react-utils/PrivateRoute/PrivateRoute.js +10 -5
  180. package/dist/react-utils/PrivateRoute/PrivateRoute.js.map +1 -1
  181. package/dist/react-utils/PrivateRoute/index.js +3 -2
  182. package/dist/react-utils/PrivateRoute/index.js.map +1 -1
  183. package/dist/react-utils/index.js +4 -2
  184. package/dist/react-utils/index.js.map +1 -1
  185. package/dist/react-utils/useBreakpoints/index.js +2 -1
  186. package/dist/react-utils/useBreakpoints/index.js.map +1 -1
  187. package/dist/react-utils/useBreakpoints/utils.js +2 -1
  188. package/dist/react-utils/useBreakpoints/utils.js.map +1 -1
  189. package/dist/react-utils/useFetchNeetoApps/index.js +3 -2
  190. package/dist/react-utils/useFetchNeetoApps/index.js.map +1 -1
  191. package/dist/react-utils/useFetchNeetoApps/useFetchNeetoApps.js +3 -2
  192. package/dist/react-utils/useFetchNeetoApps/useFetchNeetoApps.js.map +1 -1
  193. package/dist/react-utils/useLocalStorage/index.js +4 -2
  194. package/dist/react-utils/useLocalStorage/index.js.map +1 -1
  195. package/dist/react-utils/useLocalStorage/useLocalStorage.js +4 -2
  196. package/dist/react-utils/useLocalStorage/useLocalStorage.js.map +1 -1
  197. package/dist/react-utils/useMutationWithInvalidation/index.js +3 -2
  198. package/dist/react-utils/useMutationWithInvalidation/index.js.map +1 -1
  199. package/dist/react-utils/useMutationWithInvalidation/useMutationWithInvalidation.js +3 -2
  200. package/dist/react-utils/useMutationWithInvalidation/useMutationWithInvalidation.js.map +1 -1
  201. package/dist/react-utils/usePersistedQuery/index.js +3 -2
  202. package/dist/react-utils/usePersistedQuery/index.js.map +1 -1
  203. package/dist/react-utils/usePersistedQuery/usePersistedQuery.js +3 -2
  204. package/dist/react-utils/usePersistedQuery/usePersistedQuery.js.map +1 -1
  205. package/dist/react-utils/useQueryParams/index.js +3 -2
  206. package/dist/react-utils/useQueryParams/index.js.map +1 -1
  207. package/dist/react-utils/useQueryParams/useQueryParams.js +3 -2
  208. package/dist/react-utils/useQueryParams/useQueryParams.js.map +1 -1
  209. package/dist/react-utils/useRegisterNavigationCheckpoint/index.js +3 -2
  210. package/dist/react-utils/useRegisterNavigationCheckpoint/index.js.map +1 -1
  211. package/dist/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js +3 -2
  212. package/dist/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js.map +1 -1
  213. package/dist/react-utils/withTitle/index.js +2 -1
  214. package/dist/react-utils/withTitle/index.js.map +1 -1
  215. package/dist/react-utils/withTitle/withTitle.js +2 -1
  216. package/dist/react-utils/withTitle/withTitle.js.map +1 -1
  217. package/dist/{defineProperty-D_V-nTlo.js → toPropertyKey-C6Y0u0Sf.js} +2 -11
  218. package/dist/toPropertyKey-C6Y0u0Sf.js.map +1 -0
  219. package/dist/utils/buildNestedAttributesPayload.js +2 -1
  220. package/dist/utils/buildNestedAttributesPayload.js.map +1 -1
  221. package/dist/utils/captureAnalyticsPageView.js +2 -1
  222. package/dist/utils/captureAnalyticsPageView.js.map +1 -1
  223. package/dist/utils/createSubscription.js +3 -2
  224. package/dist/utils/createSubscription.js.map +1 -1
  225. package/dist/utils/currencyFormat.js +2 -1
  226. package/dist/utils/currencyFormat.js.map +1 -1
  227. package/dist/utils/datetime.js +3 -1
  228. package/dist/utils/datetime.js.map +1 -1
  229. package/dist/utils/dayjs.js +3 -17
  230. package/dist/utils/dayjs.js.map +1 -1
  231. package/dist/utils/general.js +3 -2
  232. package/dist/utils/general.js.map +1 -1
  233. package/dist/utils/index.js +4 -2
  234. package/dist/utils/index.js.map +1 -1
  235. package/dist/utils/timezonePlugin.js +2 -1
  236. package/dist/utils/timezonePlugin.js.map +1 -1
  237. package/package.json +4 -4
  238. package/dist/cjs/defineProperty-Cm9b1C1w.js.map +0 -1
  239. package/dist/cjs/objectWithoutProperties-DQlolGrE.js.map +0 -1
  240. package/dist/defineProperty-D_V-nTlo.js.map +0 -1
  241. package/dist/objectWithoutProperties-PcUN5OqL.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty } from '../../defineProperty-D_V-nTlo.js';
1
+ import { _ as _defineProperty } from '../../defineProperty-DuFCEj0A.js';
2
2
  import { useEffect } from 'react';
3
3
  import DOMPurify from 'dompurify';
4
4
  import Button from '@bigbinary/neetoui/Button';
@@ -6,6 +6,7 @@ import Typography from '@bigbinary/neetoui/Typography';
6
6
  import { isNil } from 'ramda';
7
7
  import { useTranslation, Trans } from 'react-i18next';
8
8
  import { jsx, jsxs } from 'react/jsx-runtime';
9
+ import '../../toPropertyKey-C6Y0u0Sf.js';
9
10
  import '../../typeof-D-UKOauR.js';
10
11
 
11
12
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -1 +1 @@
1
- {"version":3,"file":"FallbackComponent.js","sources":["../../../src/react-utils/HoneybadgerErrorBoundary/FallbackComponent.jsx"],"sourcesContent":["import { useEffect } from \"react\";\n\nimport FallbackComponentImage from \"assets/images/fallback-component.svg\";\nimport DOMPurify from \"dompurify\";\nimport { Button, Typography } from \"neetoui\";\nimport { isNil } from \"ramda\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nconst sanitize = DOMPurify.sanitize;\n\nconst FallbackComponent = () => {\n const { t } = useTranslation();\n\n useEffect(() => {\n const listener = e => {\n if (isNil(e.state)) return;\n window.location.href = sanitize(e.target?.location.href);\n };\n window.addEventListener(\"popstate\", listener);\n\n return () => window.removeEventListener(\"popstate\", listener);\n }, []);\n\n return (\n <div className=\"flex h-screen w-full flex-row items-start justify-start\">\n <div className=\"m-auto text-center\">\n <div className=\"m-auto mb-8 flex items-center justify-center\">\n <FallbackComponentImage />\n </div>\n <Typography\n className=\"mb-4\"\n component=\"h2\"\n style=\"h2\"\n weight=\"semibold\"\n >\n {t(\"neetoCommons.fallbackComponent.somethingWentWrong\")}\n </Typography>\n <Typography\n className=\"neeto-ui-text-gray-600 mb-8\"\n component=\"p\"\n style=\"body1\"\n weight=\"normal\"\n >\n <Trans\n i18nKey=\"neetoCommons.fallbackComponent.description\"\n components={{\n reloading: (\n <Button style=\"link\" onClick={() => window.location.reload()} />\n ),\n contactus: (\n <Button\n style=\"link\"\n onClick={() => {\n window.NeetoChat?.contextualHelp?.maximizeWidget();\n window.NeetoChat?.contextualHelp?.openWidget();\n }}\n />\n ),\n }}\n />\n </Typography>\n </div>\n </div>\n );\n};\n\nexport default FallbackComponent;\n"],"names":["FallbackComponentImage","props","_jsxs","_objectSpread","children","_jsx","d","fill","defaultProps","width","height","viewBox","xmlns","sanitize","DOMPurify","FallbackComponent","_useTranslation","useTranslation","t","useEffect","listener","e","_e$target","isNil","state","window","location","href","target","addEventListener","removeEventListener","className","Typography","component","style","weight","Trans","i18nKey","components","reloading","Button","onClick","reload","contactus","_window$NeetoChat","_window$NeetoChat2","NeetoChat","contextualHelp","maximizeWidget","openWidget"],"mappings":";;;;;;;;;;;;AAAkC,IAE3BA,sBAAsB,GAAA,SAAtBA,sBAAsBA,CAAAC,KAAA,EAAA;AAAA,EAAA,oBAAAC,IAAA,CAAAC,KAAAA,EAAAA,aAAA,CAAAA,aAAA,KAAAF,KAAA,CAAA,EAAA,EAAA,EAAA;AAAAG,IAAAA,QAAA,gBAAAC,GAAA,CAAA,MAAA,EAAA;MAAAC,CAAA,EAAA,s8BAAA;MAAAC,IAAA,EAAA,SAAA;AAAA,KAAA,CAAA,eAAAF,GAAA,CAAA,MAAA,EAAA;MAAAC,CAAA,EAAA,w4BAAA;MAAAC,IAAA,EAAA,SAAA;AAAA,KAAA,CAAA,eAAAF,GAAA,CAAA,MAAA,EAAA;MAAAC,CAAA,EAAA,w4BAAA;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EAAE,CAAA;AAAA,eAAA;AAAC,aAAE,CAChE;YACDC,SAAS,eACPtC,GAAA,CAACmC,MAAM,EAAA;AACLN,cAAAA,KAAK,EAAC,MAAM;AACZO,cAAAA,OAAO,EAAE,SAATA,OAAOA,GAAQ;gBAAA,IAAAG,iBAAA,EAAAC,kBAAA,CAAA;gBACb,CAAAD,iBAAA,GAAAnB,MAAM,CAACqB,SAAS,MAAAF,IAAAA,IAAAA,iBAAA,gBAAAA,iBAAA,GAAhBA,iBAAA,CAAkBG,cAAc,cAAAH,iBAAA,KAAA,KAAA,CAAA,IAAhCA,iBAAA,CAAkCI,cAAc,EAAE,CAAA;gBAClD,CAAAH,kBAAA,GAAApB,MAAM,CAACqB,SAAS,MAAAD,IAAAA,IAAAA,kBAAA,gBAAAA,kBAAA,GAAhBA,kBAAA,CAAkBE,cAAc,cAAAF,kBAAA,KAAA,KAAA,CAAA,IAAhCA,kBAAA,CAAkCI,UAAU,EAAE,CAAA;AAChD,eAAA;aACD,CAAA;AAEL,WAAA;SACD,CAAA;AAAC,OACQ,CAAC,CAAA;KACV,CAAA;AAAC,GACH,CAAC,CAAA;AAEV;;;;"}
1
+ {"version":3,"file":"FallbackComponent.js","sources":["../../../src/react-utils/HoneybadgerErrorBoundary/FallbackComponent.jsx"],"sourcesContent":["import { useEffect } from \"react\";\n\nimport FallbackComponentImage from \"assets/images/fallback-component.svg\";\nimport DOMPurify from \"dompurify\";\nimport { Button, Typography } from \"neetoui\";\nimport { isNil } from \"ramda\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nconst sanitize = DOMPurify.sanitize;\n\nconst FallbackComponent = () => {\n const { t } = useTranslation();\n\n useEffect(() => {\n const listener = e => {\n if (isNil(e.state)) return;\n window.location.href = sanitize(e.target?.location.href);\n };\n window.addEventListener(\"popstate\", listener);\n\n return () => window.removeEventListener(\"popstate\", listener);\n }, []);\n\n return (\n <div className=\"flex h-screen w-full flex-row items-start justify-start\">\n <div className=\"m-auto text-center\">\n <div className=\"m-auto mb-8 flex items-center justify-center\">\n <FallbackComponentImage />\n </div>\n <Typography\n className=\"mb-4\"\n component=\"h2\"\n style=\"h2\"\n weight=\"semibold\"\n >\n {t(\"neetoCommons.fallbackComponent.somethingWentWrong\")}\n </Typography>\n <Typography\n className=\"neeto-ui-text-gray-600 mb-8\"\n component=\"p\"\n style=\"body1\"\n weight=\"normal\"\n >\n <Trans\n i18nKey=\"neetoCommons.fallbackComponent.description\"\n components={{\n reloading: (\n <Button style=\"link\" onClick={() => window.location.reload()} />\n ),\n contactus: (\n <Button\n style=\"link\"\n onClick={() => {\n window.NeetoChat?.contextualHelp?.maximizeWidget();\n window.NeetoChat?.contextualHelp?.openWidget();\n }}\n />\n ),\n }}\n />\n </Typography>\n </div>\n </div>\n );\n};\n\nexport default FallbackComponent;\n"],"names":["FallbackComponentImage","props","_jsxs","_objectSpread","children","_jsx","d","fill","defaultProps","width","height","viewBox","xmlns","sanitize","DOMPurify","FallbackComponent","_useTranslation","useTranslation","t","useEffect","listener","e","_e$target","isNil","state","window","location","href","target","addEventListener","removeEventListener","className","Typography","component","style","weight","Trans","i18nKey","components","reloading","Button","onClick","reload","contactus","_window$NeetoChat","_window$NeetoChat2","NeetoChat","contextualHelp","maximizeWidget","openWidget"],"mappings":";;;;;;;;;;;;;AAAkC,IAE3BA,sBAAsB,GAAA,SAAtBA,sBAAsBA,CAAAC,KAAA,EAAA;AAAA,EAAA,oBAAAC,IAAA,CAAAC,KAAAA,EAAAA,aAAA,CAAAA,aAAA,KAAAF,KAAA,CAAA,EAAA,EAAA,EAAA;AAAAG,IAAAA,QAAA,gBAAAC,GAAA,CAAA,MAAA,EAAA;MAAAC,CAAA,EAAA,s8BAAA;MAAAC,IAAA,EAAA,SAAA;AAAA,KAAA,CAAA,eAAAF,GAAA,CAAA,MAAA,EAAA;MAAAC,CAAA,EAAA,w4BAAA;MAAAC,IAAA,EAAA,SAAA;AAAA,KAAA,CAAA,eAAAF,GAAA,CAAA,MAAA,EAAA;M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CAACC,QAAQ,CAACgB,MAAM,EAAE,CAAA;AAAA,eAAA;AAAC,aAAE,CAChE;YACDC,SAAS,eACPtC,GAAA,CAACmC,MAAM,EAAA;AACLN,cAAAA,KAAK,EAAC,MAAM;AACZO,cAAAA,OAAO,EAAE,SAATA,OAAOA,GAAQ;gBAAA,IAAAG,iBAAA,EAAAC,kBAAA,CAAA;gBACb,CAAAD,iBAAA,GAAAnB,MAAM,CAACqB,SAAS,MAAAF,IAAAA,IAAAA,iBAAA,gBAAAA,iBAAA,GAAhBA,iBAAA,CAAkBG,cAAc,cAAAH,iBAAA,KAAA,KAAA,CAAA,IAAhCA,iBAAA,CAAkCI,cAAc,EAAE,CAAA;gBAClD,CAAAH,kBAAA,GAAApB,MAAM,CAACqB,SAAS,MAAAD,IAAAA,IAAAA,kBAAA,gBAAAA,kBAAA,GAAhBA,kBAAA,CAAkBE,cAAc,cAAAF,kBAAA,KAAA,KAAA,CAAA,IAAhCA,kBAAA,CAAkCI,UAAU,EAAE,CAAA;AAChD,eAAA;aACD,CAAA;AAEL,WAAA;SACD,CAAA;AAAC,OACQ,CAAC,CAAA;KACV,CAAA;AAAC,GACH,CAAC,CAAA;AAEV;;;;"}
@@ -3,7 +3,8 @@ import { IGNORABLE_ERRORS_REGEX, IGNORABLE_ERROR_NAMES_REGEX } from './constants
3
3
  import FallbackComponent from './FallbackComponent.js';
4
4
  import { getSessionReplayUrl, attachContext } from './utils.js';
5
5
  import { jsx } from 'react/jsx-runtime';
6
- import '../../defineProperty-D_V-nTlo.js';
6
+ import '../../defineProperty-DuFCEj0A.js';
7
+ import '../../toPropertyKey-C6Y0u0Sf.js';
7
8
  import '../../typeof-D-UKOauR.js';
8
9
  import 'react';
9
10
  import 'dompurify';
@@ -1 +1 @@
1
- {"version":3,"file":"HoneybadgerErrorBoundary.js","sources":["../../../src/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.jsx"],"sourcesContent":["import {\n Honeybadger,\n HoneybadgerErrorBoundary as ErrorBoundary,\n} from \"@honeybadger-io/react\";\n\nimport {\n IGNORABLE_ERROR_NAMES_REGEX,\n IGNORABLE_ERRORS_REGEX,\n} from \"./constants\";\nimport FallbackComponent from \"./FallbackComponent\";\nimport { attachContext, getSessionReplayUrl } from \"./utils\";\n\n/** @type {import(\"neetocommons/react-utils\").HoneybadgerErrorBoundary} */\nconst HoneybadgerErrorBoundary = ({\n children,\n ErrorComponent = FallbackComponent,\n filterErrors = undefined,\n}) => {\n Honeybadger.beforeNotify(notice => {\n if (!notice) return false;\n\n const isIgnorable =\n IGNORABLE_ERRORS_REGEX.test(notice.message) ||\n IGNORABLE_ERROR_NAMES_REGEX.test(notice.name) ||\n notice.stack.includes(\"chrome-extension://\") ||\n filterErrors?.(notice) === false;\n\n if (isIgnorable) return false;\n\n const context = { errorClass: notice.name };\n\n if (notice.name === \"ChunkLoadError\") {\n context.IGNORABLE_ERROR_NAMES_REGEX = IGNORABLE_ERROR_NAMES_REGEX;\n context.isChunkLoadError = IGNORABLE_ERROR_NAMES_REGEX.test(notice.name);\n }\n\n const user = globalProps.user?.email;\n if (user) context.user = user;\n\n const sessionReplay = getSessionReplayUrl();\n if (sessionReplay) context.sessionReplay = sessionReplay;\n\n attachContext(notice, context);\n\n return true;\n });\n\n const honeybadger = Honeybadger.configure({\n apiKey: globalProps.honeybadgerApiKey,\n environment: globalProps.railsEnv,\n revision: globalProps.honeybadgerRevision,\n developmentEnvironments: [\"development\", \"test\"],\n enableUncaught: true,\n async: true,\n breadcrumbsEnabled: true,\n projectRoot: \"webpack:///./\",\n enableUnhandledRejection: false,\n });\n\n return (\n <ErrorBoundary {...{ ErrorComponent, honeybadger }}>\n {children}\n </ErrorBoundary>\n );\n};\n\nexport default HoneybadgerErrorBoundary;\n"],"names":["HoneybadgerErrorBoundary","_ref","children","_ref$ErrorComponent","ErrorComponent","FallbackComponent","_ref$filterErrors","filterErrors","undefined","Honeybadger","beforeNotify","notice","_globalProps$user","isIgnorable","IGNORABLE_ERRORS_REGEX","test","message","IGNORABLE_ERROR_NAMES_REGEX","name","stack","includes","context","errorClass","isChunkLoadError","user","globalProps","email","sessionReplay","getSessionReplayUrl","attachContext","honeybadger","configure","apiKey","honeybadgerApiKey","environment","railsEnv","revision","honeybadgerRevision","developmentEnvironments","enableUncaught","async","breadcrumbsEnabled","projectRoot","enableUnhandledRejection","_jsx","ErrorBoundary"],"mappings":";;;;;;;;;;;;;;AAaA,IAAMA,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAAC,IAAA,EAIxB;AAAA,EAAA,IAHJC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAAC,mBAAA,GAAAF,IAAA,CACRG,cAAc;AAAdA,IAAAA,cAAc,GAAAD,mBAAA,KAAGE,KAAAA,CAAAA,GAAAA,iBAAiB,GAAAF,mBAAA;IAAAG,iBAAA,GAAAL,IAAA,CAClCM,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAGE,KAAAA,CAAAA,GAAAA,SAAS,GAAAF,iBAAA,CAAA;AAExBG,EAAAA,WAAW,CAACC,YAAY,CAAC,UAAAC,MAAM,EAAI;AAAA,IAAA,IAAAC,iBAAA,CAAA;AACjC,IAAA,IAAI,CAACD,MAAM,EAAE,OAAO,KAAK,CAAA;AAEzB,IAAA,IAAME,WAAW,GACfC,sBAAsB,CAACC,IAAI,CAACJ,MAAM,CAACK,OAAO,CAAC,IAC3CC,2BAA2B,CAACF,IAAI,CAACJ,MAAM,CAACO,IAAI,CAAC,IAC7CP,MAAM,CAACQ,KAAK,CAACC,QAAQ,CAAC,qBAAqB,CAAC,IAC5C,CAAAb,YAAY,KAAA,IAAA,IAAZA,YAAY,KAAZA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,YAAY,CAAGI,MAAM,CAAC,MAAK,KAAK,CAAA;IAElC,IAAIE,WAAW,EAAE,OAAO,KAAK,CAAA;AAE7B,IAAA,IAAMQ,OAAO,GAAG;MAAEC,UAAU,EAAEX,MAAM,C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,IAAAA,WAAW,EAAXA,WAAW;AAAA5B,IAAAA,QAAA,EAC7CA,QAAAA;AAAQ,GACI,CAAC,CAAA;AAEpB;;;;"}
1
+ {"version":3,"file":"HoneybadgerErrorBoundary.js","sources":["../../../src/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.jsx"],"sourcesContent":["import {\n Honeybadger,\n HoneybadgerErrorBoundary as ErrorBoundary,\n} from \"@honeybadger-io/react\";\n\nimport {\n IGNORABLE_ERROR_NAMES_REGEX,\n IGNORABLE_ERRORS_REGEX,\n} from \"./constants\";\nimport FallbackComponent from \"./FallbackComponent\";\nimport { attachContext, getSessionReplayUrl } from \"./utils\";\n\n/** @type {import(\"neetocommons/react-utils\").HoneybadgerErrorBoundary} */\nconst HoneybadgerErrorBoundary = ({\n children,\n ErrorComponent = FallbackComponent,\n filterErrors = undefined,\n}) => {\n Honeybadger.beforeNotify(notice => {\n if (!notice) return false;\n\n const isIgnorable =\n IGNORABLE_ERRORS_REGEX.test(notice.message) ||\n IGNORABLE_ERROR_NAMES_REGEX.test(notice.name) ||\n notice.stack.includes(\"chrome-extension://\") ||\n filterErrors?.(notice) === false;\n\n if (isIgnorable) return false;\n\n const context = { errorClass: notice.name };\n\n if (notice.name === \"ChunkLoadError\") {\n context.IGNORABLE_ERROR_NAMES_REGEX = IGNORABLE_ERROR_NAMES_REGEX;\n context.isChunkLoadError = IGNORABLE_ERROR_NAMES_REGEX.test(notice.name);\n }\n\n const user = globalProps.user?.email;\n if (user) context.user = user;\n\n const sessionReplay = getSessionReplayUrl();\n if (sessionReplay) context.sessionReplay = sessionReplay;\n\n attachContext(notice, context);\n\n return true;\n });\n\n const honeybadger = Honeybadger.configure({\n apiKey: globalProps.honeybadgerApiKey,\n environment: globalProps.railsEnv,\n revision: globalProps.honeybadgerRevision,\n developmentEnvironments: [\"development\", \"test\"],\n enableUncaught: true,\n async: true,\n breadcrumbsEnabled: true,\n projectRoot: \"webpack:///./\",\n enableUnhandledRejection: false,\n });\n\n return (\n <ErrorBoundary {...{ ErrorComponent, honeybadger }}>\n {children}\n </ErrorBoundary>\n );\n};\n\nexport default HoneybadgerErrorBoundary;\n"],"names":["HoneybadgerErrorBoundary","_ref","children","_ref$ErrorComponent","ErrorComponent","FallbackComponent","_ref$filterErrors","filterErrors","undefined","Honeybadger","beforeNotify","notice","_globalProps$user","isIgnorable","IGNORABLE_ERRORS_REGEX","test","message","IGNORABLE_ERROR_NAMES_REGEX","name","stack","includes","context","errorClass","isChunkLoadError","user","globalProps","email","sessionReplay","getSessionReplayUrl","attachContext","honeybadger","configure","apiKey","honeybadgerApiKey","environment","railsEnv","revision","honeybadgerRevision","developmentEnvironments","enableUncaught","async","breadcrumbsEnabled","projectRoot","enableUnhandledRejection","_jsx","ErrorBoundary"],"mappings":";;;;;;;;;;;;;;;AAaA,IAAMA,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAAC,IAAA,EAIxB;AAAA,EAAA,IAHJC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAAC,mBAAA,GAAAF,IAAA,CACRG,cAAc;AAAdA,IAAAA,cAAc,GAAAD,mBAAA,KAAGE,KAAAA,CAAAA,GAAAA,iBAAiB,GAAAF,mBAAA;IAAAG,iBAAA,GAAAL,IAAA,CAClCM,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAGE,KAAAA,CAAAA,GAAAA,SAAS,GAAAF,iBAAA,CAAA;AAExBG,EAAAA,WAAW,CAACC,YAAY,CAAC,UAAAC,MAAM,EAAI;AAAA,IAAA,IAAAC,iBAAA,CAAA;AACjC,IAAA,IAAI,CAACD,MAAM,EAAE,OAAO,KAAK,CAAA;AAEzB,IAAA,IAAME,WAAW,GACfC,sBAAsB,CAACC,IAAI,CAACJ,MAAM,CAACK,OAAO,CAAC,IAC3CC,2BAA2B,CAACF,IAAI,CAACJ,MAAM,CAACO,IAAI,CAAC,IAC7CP,MAAM,CAACQ,KAAK,CAACC,QAAQ,CAAC,qBAAqB,CAA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IAAI;AACpBC,IAAAA,KAAK,EAAE,IAAI;AACXC,IAAAA,kBAAkB,EAAE,IAAI;AACxBC,IAAAA,WAAW,EAAE,eAAe;AAC5BC,IAAAA,wBAAwB,EAAE,KAAA;AAC5B,GAAC,CAAC,CAAA;EAEF,oBACEC,GAAA,CAACC,0BAAa,EAAA;AAAOzC,IAAAA,cAAc,EAAdA,cAAc;AAAE0B,IAAAA,WAAW,EAAXA,WAAW;AAAA5B,IAAAA,QAAA,EAC7CA,QAAAA;AAAQ,GACI,CAAC,CAAA;AAEpB;;;;"}
@@ -2,7 +2,8 @@ export { default } from './HoneybadgerErrorBoundary.js';
2
2
  import '@honeybadger-io/react';
3
3
  import './constants.js';
4
4
  import './FallbackComponent.js';
5
- import '../../defineProperty-D_V-nTlo.js';
5
+ import '../../defineProperty-DuFCEj0A.js';
6
+ import '../../toPropertyKey-C6Y0u0Sf.js';
6
7
  import '../../typeof-D-UKOauR.js';
7
8
  import 'react';
8
9
  import 'dompurify';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
@@ -1,9 +1,10 @@
1
- import { _ as _defineProperty } from '../../defineProperty-D_V-nTlo.js';
2
- import { _ as _objectWithoutProperties } from '../../objectWithoutProperties-PcUN5OqL.js';
1
+ import { _ as _defineProperty } from '../../defineProperty-DuFCEj0A.js';
2
+ import { _ as _objectWithoutProperties } from '../../objectWithoutProperties-DN7d1SzH.js';
3
3
  import ErrorPage from '@bigbinary/neeto-molecules/ErrorPage';
4
4
  import { includes, __ } from 'ramda';
5
5
  import { Route, Redirect } from 'react-router-dom';
6
6
  import { jsx } from 'react/jsx-runtime';
7
+ import '../../toPropertyKey-C6Y0u0Sf.js';
7
8
  import '../../typeof-D-UKOauR.js';
8
9
 
9
10
  var _excluded = ["condition", "redirectRoute", "errorPage", "permissions"];
@@ -21,9 +22,13 @@ var PrivateRoute = function PrivateRoute(_ref) {
21
22
  props = _objectWithoutProperties(_ref, _excluded);
22
23
  if (condition) {
23
24
  if (permissions) {
24
- return globalProps.permissions.some(includes(__, permissions)) ? /*#__PURE__*/jsx(Route, _objectSpread({}, props)) : errorPage || /*#__PURE__*/jsx(ErrorPage, {
25
- status: 403
26
- });
25
+ return globalProps.permissions.some(includes(__, permissions)) ? /*#__PURE__*/jsx(Route, _objectSpread({}, props)) : /*#__PURE__*/jsx(Route, _objectSpread(_objectSpread({}, props), {}, {
26
+ component: function component() {
27
+ return errorPage || /*#__PURE__*/jsx(ErrorPage, {
28
+ status: 403
29
+ });
30
+ }
31
+ }));
27
32
  }
28
33
  return /*#__PURE__*/jsx(Route, _objectSpread({}, props));
29
34
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PrivateRoute.js","sources":["../../../src/react-utils/PrivateRoute/PrivateRoute.jsx"],"sourcesContent":["import ErrorPage from \"neetomolecules/ErrorPage\";\nimport { __, includes } from \"ramda\";\nimport { Redirect, Route } from \"react-router-dom\";\n\nconst PrivateRoute = ({\n condition = globalProps.authenticated,\n redirectRoute = undefined,\n errorPage = undefined,\n permissions = undefined,\n ...props\n}) => {\n if (condition) {\n if (permissions) {\n return globalProps.permissions.some(includes(__, permissions)) ? (\n <Route {...props} />\n ) : (\n errorPage || <ErrorPage status={403} />\n );\n }\n\n return <Route {...props} />;\n }\n\n if (redirectRoute) {\n return <Redirect to={{ pathname: redirectRoute }} />;\n }\n\n return errorPage || <ErrorPage status={403} />;\n};\n\nexport default PrivateRoute;\n"],"names":["PrivateRoute","_ref","_ref$condition","condition","globalProps","authenticated","_ref$redirectRoute","redirectRoute","undefined","_ref$errorPage","errorPage","_ref$permissions","permissions","props","_objectWithoutProperties","_excluded","some","includes","__","_jsx","Route","_objectSpread","ErrorPage","status","Redirect","to","pathname"],"mappings":";;;;;;;;;;;AAIA,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAA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D,GAAA;AAEA,EAAA,OAAOG,SAAS,iBAAIS,GAAA,CAACG,SAAS,EAAA;AAACC,IAAAA,MAAM,EAAE,GAAA;AAAI,GAAE,CAAC,CAAA;AAChD;;;;"}
1
+ {"version":3,"file":"PrivateRoute.js","sources":["../../../src/react-utils/PrivateRoute/PrivateRoute.jsx"],"sourcesContent":["import ErrorPage from \"neetomolecules/ErrorPage\";\nimport { __, includes } from \"ramda\";\nimport { Redirect, Route } from \"react-router-dom\";\n\nconst PrivateRoute = ({\n condition = globalProps.authenticated,\n redirectRoute = undefined,\n errorPage = undefined,\n permissions = undefined,\n ...props\n}) => {\n if (condition) {\n if (permissions) {\n return globalProps.permissions.some(includes(__, permissions)) ? (\n <Route {...props} />\n ) : (\n <Route\n {...props}\n component={() => errorPage || <ErrorPage status={403} />}\n />\n );\n }\n\n return <Route {...props} />;\n }\n\n if (redirectRoute) {\n return <Redirect to={{ pathname: redirectRoute }} />;\n }\n\n return errorPage || <ErrorPage status={403} />;\n};\n\nexport default PrivateRoute;\n"],"names":["PrivateRoute","_ref","_ref$condition","condition","globalProps","authenticated","_ref$redirectRoute","redirectRoute","undefined","_ref$errorPage","errorPage","_ref$permissions","permissions","props","_objectWithoutProperties","_excluded","some","includes","__","_jsx","Route","_objectSpread","component","ErrorPage","status","Redirect","to","pathname"],"mappings":";;;;;;;;;;;;AAIA,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAMZ;AAAA,EAAA,IAAAC,cAAA,GAAAD,IAAA,CALJE,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAA,KAAA,CAAA,GAAGE,WAAW,CAACC,aAAa,GAAAH,cAAA;IAAAI,kBAAA,GAAAL,IAAA,CACrCM,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KAAGE,KAAAA,CAAAA,GAAAA,SAAS,GAAAF,kBAAA;IAAAG,cAAA,GAAAR,IAAA,CACzBS,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAA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ateRoute.js';
2
- import '../../defineProperty-D_V-nTlo.js';
2
+ import '../../defineProperty-DuFCEj0A.js';
3
+ import '../../toPropertyKey-C6Y0u0Sf.js';
3
4
  import '../../typeof-D-UKOauR.js';
4
- import '../../objectWithoutProperties-PcUN5OqL.js';
5
+ import '../../objectWithoutProperties-DN7d1SzH.js';
5
6
  import '@bigbinary/neeto-molecules/ErrorPage';
6
7
  import 'ramda';
7
8
  import 'react-router-dom';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -31,7 +31,8 @@ export { default as AppContainer } from './AppContainer/AppContainer.js';
31
31
  import '@honeybadger-io/react';
32
32
  import './HoneybadgerErrorBoundary/constants.js';
33
33
  import './HoneybadgerErrorBoundary/FallbackComponent.js';
34
- import '../defineProperty-D_V-nTlo.js';
34
+ import '../defineProperty-DuFCEj0A.js';
35
+ import '../toPropertyKey-C6Y0u0Sf.js';
35
36
  import '../typeof-D-UKOauR.js';
36
37
  import 'react';
37
38
  import 'dompurify';
@@ -41,7 +42,7 @@ import 'ramda';
41
42
  import 'react-i18next';
42
43
  import 'react/jsx-runtime';
43
44
  import './HoneybadgerErrorBoundary/utils.js';
44
- import '../objectWithoutProperties-PcUN5OqL.js';
45
+ import '../objectWithoutProperties-DN7d1SzH.js';
45
46
  import '@bigbinary/neeto-molecules/ErrorPage';
46
47
  import 'react-router-dom';
47
48
  import '@bigbinary/neeto-commons-frontend/initializers';
@@ -65,6 +66,7 @@ import '@bigbinary/neetoui/Toastr';
65
66
  import 'qs';
66
67
  import '../utils/dayjs.js';
67
68
  import '../toConsumableArray-B7CFjjkW.js';
69
+ import '../createClass-BvEaZs3T.js';
68
70
  import 'dayjs';
69
71
  import '../utils/createSubscription.js';
70
72
  import '@rails/actioncable';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,8 @@
1
1
  import { useSyncExternalStore } from 'react';
2
2
  import { equals } from 'ramda';
3
3
  import { subscribe, getCurrentSize } from './utils.js';
4
- import '../../defineProperty-D_V-nTlo.js';
4
+ import '../../defineProperty-DuFCEj0A.js';
5
+ import '../../toPropertyKey-C6Y0u0Sf.js';
5
6
  import '../../typeof-D-UKOauR.js';
6
7
 
7
8
  var useBreakpoints = function useBreakpoints(breakpointOverrides) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/react-utils/useBreakpoints/index.js"],"sourcesContent":["import { useSyncExternalStore } from \"react\";\n\nimport { equals } from \"ramda\";\n\nimport { getCurrentSize, subscribe } from \"./utils\";\n\nconst useBreakpoints = breakpointOverrides => {\n const getSnapshot = () => getCurrentSize(window, breakpointOverrides);\n const currentSize = useSyncExternalStore(subscribe, getSnapshot);\n\n return { currentSize, isSize: equals(currentSize) };\n};\n\nexport default useBreakpoints;\n"],"names":["useBreakpoints","breakpointOverrides","getSnapshot","getCurrentSize","window","currentSize","useSyncExternalStore","subscribe","isSize","equals"],"mappings":";;;;;;AAMA,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAGC,mBAAmB,EAAI;AAC5C,EAAA,IAAMC,WAAW,GAAG,SAAdA,WAAWA,GAAA;AAAA,IAAA,OAASC,cAAc,CAACC,MAAM,EAAEH,mBAAmB,CAAC,CAAA;AAAA,GAAA,CAAA;AACrE,EAAA,IAAMI,WAAW,GAAGC,oBAAoB,CAACC,SAAS,EAAEL,WAAW,CAAC,CAAA;EAEhE,OAAO;AAAEG,IAAAA,WAAW,EAAXA,WAAW;IAAEG,MAAM,EAAEC,MAAM,CAACJ,WAAW,CAAA;GAAG,CAAA;AACrD;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/react-utils/useBreakpoints/index.js"],"sourcesContent":["import { useSyncExternalStore } from \"react\";\n\nimport { equals } from \"ramda\";\n\nimport { getCurrentSize, subscribe } from \"./utils\";\n\nconst useBreakpoints = breakpointOverrides => {\n const getSnapshot = () => getCurrentSize(window, breakpointOverrides);\n const currentSize = useSyncExternalStore(subscribe, getSnapshot);\n\n return { currentSize, isSize: equals(currentSize) };\n};\n\nexport default useBreakpoints;\n"],"names":["useBreakpoints","breakpointOverrides","getSnapshot","getCurrentSize","window","currentSize","useSyncExternalStore","subscribe","isSize","equals"],"mappings":";;;;;;;AAMA,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAGC,mBAAmB,EAAI;AAC5C,EAAA,IAAMC,WAAW,GAAG,SAAdA,WAAWA,GAAA;AAAA,IAAA,OAASC,cAAc,CAACC,MAAM,EAAEH,mBAAmB,CAAC,CAAA;AAAA,GAAA,CAAA;AACrE,EAAA,IAAMI,WAAW,GAAGC,oBAAoB,CAACC,SAAS,EAAEL,WAAW,CAAC,CAAA;EAEhE,OAAO;AAAEG,IAAAA,WAAW,EAAXA,WAAW;IAAEG,MAAM,EAAEC,MAAM,CAACJ,WAAW,CAAA;GAAG,CAAA;AACrD;;;;"}
@@ -1,4 +1,5 @@
1
- import { _ as _defineProperty } from '../../defineProperty-D_V-nTlo.js';
1
+ import { _ as _defineProperty } from '../../defineProperty-DuFCEj0A.js';
2
+ import '../../toPropertyKey-C6Y0u0Sf.js';
2
3
  import '../../typeof-D-UKOauR.js';
3
4
 
4
5
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../../src/react-utils/useBreakpoints/utils.js"],"sourcesContent":["export const subscribe = listener => {\n window.addEventListener(\"resize\", listener);\n\n return () => window.removeEventListener(\"resize\", listener);\n};\n\nexport const getCurrentSize = (window, breakpointOverrides) => {\n const { innerWidth } = window;\n const sizes = {\n mobile: innerWidth < 768,\n tablet: innerWidth >= 768 && innerWidth < 1024,\n desktop: innerWidth >= 1024 && innerWidth < 1280,\n largeDesktop: innerWidth >= 1280,\n ...breakpointOverrides?.(window),\n };\n\n const size = Object.keys(sizes).find(breakpoint => sizes[breakpoint]) || \"\";\n\n return size;\n};\n"],"names":["subscribe","listener","window","addEventListener","removeEventListener","getCurrentSize","breakpointOverrides","innerWidth","sizes","_objectSpread","mobile","tablet","desktop","largeDesktop","size","Object","keys","find","breakpoint"],"mappings":";;;;;IAAaA,SAAS,GAAG,SAAZA,SAASA,CAAGC,QAAQ,EAAI;AACnCC,EAAAA,MAAM,CAACC,gBAAgB,CAAC,QAAQ,EAAEF,QAAQ,CAAC,CAAA;EAE3C,OAAO,YAAA;AAAA,IAAA,OAAMC,MAAM,CAACE,mBAAmB,CAAC,QAAQ,EAAEH,QAAQ,CAAC,CAAA;AAAA,GAAA,CAAA;AAC7D,EAAC;AAEM,IAAMI,cAAc,GAAG,SAAjBA,cAAcA,CAAIH,MAAM,EAAEI,mBAAmB,EAAK;AAC7D,EAAA,IAAQC,UAAU,GAAKL,MAAM,CAArBK,UAAU,CAAA;EAClB,IAAMC,KAAK,GAAAC,aAAA,CAAA;IACTC,MAAM,EAAEH,UAAU,GAAG,GAAG;AACxBI,IAAAA,MAAM,EAAEJ,UAAU,IAAI,GAAG,IAAIA,UAAU,GAAG,IAAI;AAC9CK,IAAAA,OAAO,EAAEL,UAAU,IAAI,IAAI,IAAIA,UAAU,GAAG,IAAI;IAChDM,YAAY,EAAEN,UAAU,IAAI,IAAA;GACzBD,EAAAA,mBAAmB,aAAnBA,mBAAmB,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAnBA,mBAAmB,CAAGJ,MAAM,CAAC,CACjC,CAAA;AAED,EAAA,IAAMY,IAAI,GAAGC,MAAM,CAACC,IAAI,CAACR,KAAK,CAAC,CAACS,IAAI,CAAC,UAAAC,UAAU,EAAA;IAAA,OAAIV,KAAK,CAACU,UAAU,CAAC,CAAA;AAAA,GAAA,CAAC,IAAI,EAAE,CAAA;AAE3E,EAAA,OAAOJ,IAAI,CAAA;AACb;;;;"}
1
+ {"version":3,"file":"utils.js","sources":["../../../src/react-utils/useBreakpoints/utils.js"],"sourcesContent":["export const subscribe = listener => {\n window.addEventListener(\"resize\", listener);\n\n return () => window.removeEventListener(\"resize\", listener);\n};\n\nexport const getCurrentSize = (window, breakpointOverrides) => {\n const { innerWidth } = window;\n const sizes = {\n mobile: innerWidth < 768,\n tablet: innerWidth >= 768 && innerWidth < 1024,\n desktop: innerWidth >= 1024 && innerWidth < 1280,\n largeDesktop: innerWidth >= 1280,\n ...breakpointOverrides?.(window),\n };\n\n const size = Object.keys(sizes).find(breakpoint => sizes[breakpoint]) || \"\";\n\n return size;\n};\n"],"names":["subscribe","listener","window","addEventListener","removeEventListener","getCurrentSize","breakpointOverrides","innerWidth","sizes","_objectSpread","mobile","tablet","desktop","largeDesktop","size","Object","keys","find","breakpoint"],"mappings":";;;;;;IAAaA,SAAS,GAAG,SAAZA,SAASA,CAAGC,QAAQ,EAAI;AACnCC,EAAAA,MAAM,CAACC,gBAAgB,CAAC,QAAQ,EAAEF,QAAQ,CAAC,CAAA;EAE3C,OAAO,YAAA;AAAA,IAAA,OAAMC,MAAM,CAACE,mBAAmB,CAAC,QAAQ,EAAEH,QAAQ,CAAC,CAAA;AAAA,GAAA,CAAA;AAC7D,EAAC;AAEM,IAAMI,cAAc,GAAG,SAAjBA,cAAcA,CAAIH,MAAM,EAAEI,mBAAmB,EAAK;AAC7D,EAAA,IAAQC,UAAU,GAAKL,MAAM,CAArBK,UAAU,CAAA;EAClB,IAAMC,KAAK,GAAAC,aAAA,CAAA;IACTC,MAAM,EAAEH,UAAU,GAAG,GAAG;AACxBI,IAAAA,MAAM,EAAEJ,UAAU,IAAI,GAAG,IAAIA,UAAU,GAAG,IAAI;AAC9CK,IAAAA,OAAO,EAAEL,UAAU,IAAI,IAAI,IAAIA,UAAU,GAAG,IAAI;IAChDM,YAAY,EAAEN,UAAU,IAAI,IAAA;GACzBD,EAAAA,mBAAmB,aAAnBA,mBAAmB,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAnBA,mBAAmB,CAAGJ,MAAM,CAAC,CACjC,CAAA;AAED,EAAA,IAAMY,IAAI,GAAGC,MAAM,CAACC,IAAI,CAACR,KAAK,CAAC,CAACS,IAAI,CAAC,UAAAC,UAAU,EAAA;IAAA,OAAIV,KAAK,CAACU,UAAU,CAAC,CAAA;AAAA,GAAA,CAAC,IAAI,EAAE,CAAA;AAE3E,EAAA,OAAOJ,IAAI,CAAA;AACb;;;;"}
@@ -1,5 +1,6 @@
1
1
  export { default } from './useFetchNeetoApps.js';
2
- import '../../defineProperty-D_V-nTlo.js';
2
+ import '../../defineProperty-DuFCEj0A.js';
3
+ import '../../toPropertyKey-C6Y0u0Sf.js';
3
4
  import '../../typeof-D-UKOauR.js';
4
5
  import '@bigbinary/neeto-cist';
5
6
  import '../usePersistedQuery/usePersistedQuery.js';
@@ -8,7 +9,7 @@ import '@tanstack/react-query';
8
9
  import 'ramda';
9
10
  import '../constants/constants.js';
10
11
  import '../../utils/general.js';
11
- import '../../objectWithoutProperties-PcUN5OqL.js';
12
+ import '../../objectWithoutProperties-DN7d1SzH.js';
12
13
  import '../../slicedToArray-BWOQ_OdI.js';
13
14
  import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
14
15
  import '../../index-D_s_toMy.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
@@ -1,15 +1,16 @@
1
- import { _ as _defineProperty } from '../../defineProperty-D_V-nTlo.js';
1
+ import { _ as _defineProperty } from '../../defineProperty-DuFCEj0A.js';
2
2
  import { isNotPresent } from '@bigbinary/neeto-cist';
3
3
  import usePersistedQuery from '../usePersistedQuery/usePersistedQuery.js';
4
4
  import neetoAppsApi from './apis/neeto_apps.js';
5
5
  import { NEETO_APPS_LIST_STALE_TIME } from '../constants/constants.js';
6
6
  import { QUERY_KEYS } from '../constants/query.js';
7
+ import '../../toPropertyKey-C6Y0u0Sf.js';
7
8
  import '../../typeof-D-UKOauR.js';
8
9
  import 'react';
9
10
  import '@tanstack/react-query';
10
11
  import 'ramda';
11
12
  import '../../utils/general.js';
12
- import '../../objectWithoutProperties-PcUN5OqL.js';
13
+ import '../../objectWithoutProperties-DN7d1SzH.js';
13
14
  import '../../slicedToArray-BWOQ_OdI.js';
14
15
  import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
15
16
  import '../../index-D_s_toMy.js';
@@ -1 +1 @@
1
- {"version":3,"file":"useFetchNeetoApps.js","sources":["../../../src/react-utils/useFetchNeetoApps/useFetchNeetoApps.js"],"sourcesContent":["import { isNotPresent } from \"neetocist\";\nimport usePersistedQuery from \"react-utils/usePersistedQuery\";\n\nimport neetoAppsApi from \"./apis/neeto_apps\";\n\nimport { NEETO_APPS_LIST_STALE_TIME } from \"../constants\";\nimport { QUERY_KEYS } from \"../constants/query\";\n\nconst useFetchNeetoApps = options => {\n const scopedQueryKey = [\n `${QUERY_KEYS.NEETO_APPS_LIST}-${globalProps.user?.id}`,\n ];\n\n const { data, modifiedAt } = usePersistedQuery.getCache(scopedQueryKey) || {};\n const expired = modifiedAt <= Date.now() - NEETO_APPS_LIST_STALE_TIME;\n\n return usePersistedQuery(scopedQueryKey, neetoAppsApi.fetch, {\n staleTime: NEETO_APPS_LIST_STALE_TIME,\n enabled: expired || isNotPresent(data),\n ...options,\n });\n};\n\nexport default useFetchNeetoApps;\n"],"names":["useFetchNeetoApps","options","_globalProps$user","scopedQueryKey","concat","QUERY_KEYS","NEETO_APPS_LIST","globalProps","user","id","_ref","usePersistedQuery","getCache","data","modifiedAt","expired","Date","now","NEETO_APPS_LIST_STALE_TIME","neetoAppsApi","fetch","_objectSpread","staleTime","enabled","isNotPresent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAGC,OAAO,EAAI;AAAA,EAAA,IAAAC,iBAAA,CAAA;EACnC,IAAMC,cAAc,GAAG,CAAAC,EAAAA,CAAAA,MAAA,CAClBC,UAAU,CAACC,eAAe,EAAA,GAAA,CAAA,CAAAF,MAAA,CAAA,CAAAF,iBAAA,GAAIK,WAAW,CAACC,IAAI,MAAA,IAAA,IAAAN,iBAAA,KAAhBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,iBAAA,CAAkBO,EAAE,CACtD,CAAA,CAAA;EAED,IAAAC,IAAA,GAA6BC,iBAAiB,CAACC,QAAQ,CAACT,cAAc,CAAC,IAAI,EAAE;IAArEU,IAAI,GAAAH,IAAA,CAAJG,IAAI;IAAEC,UAAU,GAAAJ,IAAA,CAAVI,UAAU,CAAA;EACxB,IAAMC,OAAO,GAAGD,UAAU,IAAIE,IAAI,CAACC,GAAG,EAAE,GAAGC,0BAA0B,CAAA;EAErE,OAAOP,iBAAiB,CAACR,cAAc,EAAEgB,YAAY,CAACC,KAAK,EAAAC,aAAA,CAAA;AACzDC,IAAAA,SAAS,EAAEJ,0BAA0B;AACrCK,IAAAA,OAAO,EAAER,OAAO,IAAIS,YAAY,CAACX,IAAI,CAAA;GAClCZ,EAAAA,OAAO,CACX,CAAC,CAAA;AACJ;;;;"}
1
+ {"version":3,"file":"useFetchNeetoApps.js","sources":["../../../src/react-utils/useFetchNeetoApps/useFetchNeetoApps.js"],"sourcesContent":["import { isNotPresent } from \"neetocist\";\nimport usePersistedQuery from \"react-utils/usePersistedQuery\";\n\nimport neetoAppsApi from \"./apis/neeto_apps\";\n\nimport { NEETO_APPS_LIST_STALE_TIME } from \"../constants\";\nimport { QUERY_KEYS } from \"../constants/query\";\n\nconst useFetchNeetoApps = options => {\n const scopedQueryKey = [\n `${QUERY_KEYS.NEETO_APPS_LIST}-${globalProps.user?.id}`,\n ];\n\n const { data, modifiedAt } = usePersistedQuery.getCache(scopedQueryKey) || {};\n const expired = modifiedAt <= Date.now() - NEETO_APPS_LIST_STALE_TIME;\n\n return usePersistedQuery(scopedQueryKey, neetoAppsApi.fetch, {\n staleTime: NEETO_APPS_LIST_STALE_TIME,\n enabled: expired || isNotPresent(data),\n ...options,\n });\n};\n\nexport default useFetchNeetoApps;\n"],"names":["useFetchNeetoApps","options","_globalProps$user","scopedQueryKey","concat","QUERY_KEYS","NEETO_APPS_LIST","globalProps","user","id","_ref","usePersistedQuery","getCache","data","modifiedAt","expired","Date","now","NEETO_APPS_LIST_STALE_TIME","neetoAppsApi","fetch","_objectSpread","staleTime","enabled","isNotPresent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAGC,OAAO,EAAI;AAAA,EAAA,IAAAC,iBAAA,CAAA;EACnC,IAAMC,cAAc,GAAG,CAAAC,EAAAA,CAAAA,MAAA,CAClBC,UAAU,CAACC,eAAe,EAAA,GAAA,CAAA,CAAAF,MAAA,CAAA,CAAAF,iBAAA,GAAIK,WAAW,CAACC,IAAI,MAAA,IAAA,IAAAN,iBAAA,KAAhBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,iBAAA,CAAkBO,EAAE,CACtD,CAAA,CAAA;EAED,IAAAC,IAAA,GAA6BC,iBAAiB,CAACC,QAAQ,CAACT,cAAc,CAAC,IAAI,EAAE;IAArEU,IAAI,GAAAH,IAAA,CAAJG,IAAI;IAAEC,UAAU,GAAAJ,IAAA,CAAVI,UAAU,CAAA;EACxB,IAAMC,OAAO,GAAGD,UAAU,IAAIE,IAAI,CAACC,GAAG,EAAE,GAAGC,0BAA0B,CAAA;EAErE,OAAOP,iBAAiB,CAACR,cAAc,EAAEgB,YAAY,CAACC,KAAK,EAAAC,aAAA,CAAA;AACzDC,IAAAA,SAAS,EAAEJ,0BAA0B;AACrCK,IAAAA,OAAO,EAAER,OAAO,IAAIS,YAAY,CAACX,IAAI,CAAA;GAClCZ,EAAAA,OAAO,CACX,CAAC,CAAA;AACJ;;;;"}
@@ -6,10 +6,11 @@ import 'ramda';
6
6
  import 'axios';
7
7
  import '../../initializers/constants.js';
8
8
  import '../../utils/general.js';
9
- import '../../objectWithoutProperties-PcUN5OqL.js';
9
+ import '../../objectWithoutProperties-DN7d1SzH.js';
10
10
  import '../../index-D_s_toMy.js';
11
11
  import '../../_commonjsHelpers-B85MJLTf.js';
12
- import '../../defineProperty-D_V-nTlo.js';
12
+ import '../../defineProperty-DuFCEj0A.js';
13
+ import '../../toPropertyKey-C6Y0u0Sf.js';
13
14
  import '../../typeof-D-UKOauR.js';
14
15
  import 'i18next';
15
16
  import '@bigbinary/neeto-cist';
@@ -17,6 +18,7 @@ import '@bigbinary/neetoui/Toastr';
17
18
  import 'qs';
18
19
  import '../../utils/dayjs.js';
19
20
  import '../../toConsumableArray-B7CFjjkW.js';
21
+ import '../../createClass-BvEaZs3T.js';
20
22
  import 'dayjs';
21
23
  import '../../utils/createSubscription.js';
22
24
  import '@rails/actioncable';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -12,14 +12,16 @@ import 'yup';
12
12
  import '../../mixpanel.cjs-DTVxnNUt.js';
13
13
  import '@bigbinary/neeto-cist';
14
14
  import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
15
- import '../../objectWithoutProperties-PcUN5OqL.js';
15
+ import '../../objectWithoutProperties-DN7d1SzH.js';
16
16
  import '../../index-D_s_toMy.js';
17
17
  import '../../_commonjsHelpers-B85MJLTf.js';
18
- import '../../defineProperty-D_V-nTlo.js';
18
+ import '../../defineProperty-DuFCEj0A.js';
19
+ import '../../toPropertyKey-C6Y0u0Sf.js';
19
20
  import '../../typeof-D-UKOauR.js';
20
21
  import '@bigbinary/neetoui/Toastr';
21
22
  import 'qs';
22
23
  import '../../toConsumableArray-B7CFjjkW.js';
24
+ import '../../createClass-BvEaZs3T.js';
23
25
  import '@rails/actioncable';
24
26
 
25
27
  var getStorageValue = function getStorageValue(key, defaultValue) {
@@ -1 +1 @@
1
- {"version":3,"file":"useLocalStorage.js","sources":["../../../src/react-utils/useLocalStorage/useLocalStorage.js"],"sourcesContent":["/* eslint-disable @bigbinary/neeto/no-local-storage */\n\nimport { useState } from \"react\";\n\nimport { isNil } from \"ramda\";\nimport { removeFromLocalStorage, setToLocalStorage } from \"utils\";\n\nconst getStorageValue = (key, defaultValue) => {\n try {\n const storedValue = localStorage.getItem(key);\n\n return storedValue ? JSON.parse(storedValue) : defaultValue;\n } catch (error) {\n logger.error(error);\n\n return defaultValue;\n }\n};\n\nconst useLocalStorage = (key, defaultValue) => {\n const [storedValue, setStoredValue] = useState(() =>\n getStorageValue(key, defaultValue)\n );\n\n const setValue = value =>\n setStoredValue(prevStoredValue => {\n const newValue =\n typeof value === \"function\" ? value(prevStoredValue) : value;\n\n if (isNil(newValue)) {\n removeFromLocalStorage(key);\n } else {\n setToLocalStorage(key, newValue);\n }\n\n return newValue;\n });\n\n return [storedValue, setValue];\n};\n\nexport default useLocalStorage;\n"],"names":["getStorageValue","key","defaultValue","storedValue","localStorage","getItem","JSON","parse","error","logger","useLocalStorage","_useState","useState","_useState2","_slicedToArray","setStoredValue","setValue","value","prevStoredValue","newValue","isNil","removeFromLocalStorage","setToLocalStorage"],"mappings":";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Q,CAAA;AACjB,KAAC,CAAC,CAAA;AAAA,GAAA,CAAA;AAEJ,EAAA,OAAO,CAAChB,WAAW,EAAEa,QAAQ,CAAC,CAAA;AAChC;;;;"}
1
+ {"version":3,"file":"useLocalStorage.js","sources":["../../../src/react-utils/useLocalStorage/useLocalStorage.js"],"sourcesContent":["/* eslint-disable @bigbinary/neeto/no-local-storage */\n\nimport { useState } from \"react\";\n\nimport { isNil } from \"ramda\";\nimport { removeFromLocalStorage, setToLocalStorage } from \"utils\";\n\nconst getStorageValue = (key, defaultValue) => {\n try {\n const storedValue = localStorage.getItem(key);\n\n return storedValue ? JSON.parse(storedValue) : defaultValue;\n } catch (error) {\n logger.error(error);\n\n return defaultValue;\n }\n};\n\nconst useLocalStorage = (key, defaultValue) => {\n const [storedValue, setStoredValue] = useState(() =>\n getStorageValue(key, defaultValue)\n );\n\n const setValue = value =>\n setStoredValue(prevStoredValue => {\n const newValue =\n typeof value === \"function\" ? value(prevStoredValue) : value;\n\n if (isNil(newValue)) {\n removeFromLocalStorage(key);\n } else {\n setToLocalStorage(key, newValue);\n }\n\n return newValue;\n });\n\n return [storedValue, setValue];\n};\n\nexport default useLocalStorage;\n"],"names":["getStorageValue","key","defaultValue","storedValue","localStorage","getItem","JSON","parse","error","logger","useLocalStorage","_useState","useState","_useState2","_slicedToArray","setStoredValue","setValue","value","prevStoredValue","newValue","isNil","removeFromLocalStorage","setToLocalStorage"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,GAAG,EAAEC,YAAY,EAAK;EAC7C,IAAI;AACF,IAAA,IAAMC,WAAW,GAAGC,YAAY,CAACC,OAAO,CAACJ,GAAG,CAAC,CAAA;IAE7C,OAAOE,WAAW,GAAGG,IAAI,CAACC,KAAK,CAACJ,WAAW,CAAC,GAAGD,YAAY,CAAA;GAC5D,CAAC,OAAOM,KAAK,EAAE;AACdC,IAAAA,MAAM,CAACD,KAAK,CAACA,KAAK,CAAC,CAAA;AAEnB,IAAA,OAAON,YAAY,CAAA;AACrB,GAAA;AACF,CAAC,CAAA;AAEKQ,IAAAA,eAAe,GAAG,SAAlBA,eAAeA,CAAIT,GAAG,EAAEC,YAAY,EAAK;EAC7C,IAAAS,SAAA,GAAsCC,QAAQ,CAAC,YAAA;AAAA,MAAA,OAC7CZ,eAAe,CAACC,GAAG,EAAEC,YAAY,CAAC,CAAA;AAAA,KACpC,CAAC;IAAAW,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAFMR,IAAAA,WAAW,GAAAU,UAAA,CAAA,CAAA,CAAA;AAAEE,IAAAA,cAAc,GAAAF,UAAA,CAAA,CAAA,CAAA,CAAA;AAIlC,EAAA,IAAMG,QAAQ,GAAG,SAAXA,QAAQA,CAAGC,KAAK,EAAA;AAAA,IAAA,OACpBF,cAAc,CAAC,UAAAG,eAAe,EAAI;AAChC,MAAA,IAAMC,QAAQ,GACZ,OAAOF,KAAK,KAAK,UAAU,GAAGA,KAAK,CAACC,eAAe,CAAC,GAAGD,KAAK,CAAA;AAE9D,MAAA,IAAIG,KAAK,CAACD,QAAQ,CAAC,EAAE;QACnBE,sBAAsB,CAACpB,GAAG,CAAC,CAAA;AAC7B,OAAC,MAAM;AACLqB,QAAAA,iBAAiB,CAACrB,GAAG,EAAEkB,QAAQ,CAAC,CAAA;AAClC,OAAA;AAEA,MAAA,OAAOA,QAAQ,CAAA;AACjB,KAAC,CAAC,CAAA;AAAA,GAAA,CAAA;AAEJ,EAAA,OAAO,CAAChB,WAAW,EAAEa,QAAQ,CAAC,CAAA;AAChC;;;;"}
@@ -1,7 +1,8 @@
1
1
  export { default } from './useMutationWithInvalidation.js';
2
- import '../../defineProperty-D_V-nTlo.js';
2
+ import '../../defineProperty-DuFCEj0A.js';
3
+ import '../../toPropertyKey-C6Y0u0Sf.js';
3
4
  import '../../typeof-D-UKOauR.js';
4
- import '../../objectWithoutProperties-PcUN5OqL.js';
5
+ import '../../objectWithoutProperties-DN7d1SzH.js';
5
6
  import '@tanstack/react-query';
6
7
  import 'ramda';
7
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1,7 +1,8 @@
1
- import { _ as _defineProperty } from '../../defineProperty-D_V-nTlo.js';
2
- import { _ as _objectWithoutProperties } from '../../objectWithoutProperties-PcUN5OqL.js';
1
+ import { _ as _defineProperty } from '../../defineProperty-DuFCEj0A.js';
2
+ import { _ as _objectWithoutProperties } from '../../objectWithoutProperties-DN7d1SzH.js';
3
3
  import { useQueryClient, useMutation } from '@tanstack/react-query';
4
4
  import { type } from 'ramda';
5
+ import '../../toPropertyKey-C6Y0u0Sf.js';
5
6
  import '../../typeof-D-UKOauR.js';
6
7
 
7
8
  var _excluded = ["keysToInvalidate"],
@@ -1 +1 @@
1
- {"version":3,"file":"useMutationWithInvalidation.js","sources":["../../../src/react-utils/useMutationWithInvalidation/useMutationWithInvalidation.js"],"sourcesContent":["import { useQueryClient, useMutation } from \"@tanstack/react-query\";\nimport { type } from \"ramda\";\n\nconst useMutationWithInvalidation = (\n mutationFn,\n { keysToInvalidate, ...options }\n) => {\n const queryClient = useQueryClient();\n const { onSuccess, ...otherOptions } = options;\n\n return useMutation({\n mutationFn,\n onSuccess: (data, variables, context) => {\n keysToInvalidate.forEach(key => {\n const result =\n type(key) === \"Function\" ? key(data, variables, context) : key;\n\n if (type(result) === \"Object\") {\n queryClient.invalidateQueries(result);\n } else if (type(result) === \"String\") {\n queryClient.invalidateQueries({ queryKey: [result] });\n } else {\n queryClient.invalidateQueries({ queryKey: result });\n }\n });\n\n onSuccess?.(data, variables, context);\n },\n\n ...otherOptions,\n });\n};\n\nexport default useMutationWithInvalidation;\n"],"names":["useMutationWithInvalidation","mutationFn","_ref","keysToInvalidate","options","_objectWithoutProperties","_excluded","queryClient","useQueryClient","onSuccess","otherOptions","_excluded2","useMutation","_objectSpread","data","variables","context","forEach","key","result","type","invalidateQueries","queryKey"],"mappings":";;;;;;;;;;AAGMA,IAAAA,2BAA2B,GAAG,SAA9BA,2BAA2BA,CAC/BC,UAAU,EAAAC,IAAA,EAEP;AAAA,EAAA,IADDC,gBAAgB,GAAAD,IAAA,CAAhBC,gBAAgB;AAAKC,IAAAA,OAAO,GAAAC,wBAAA,CAAAH,IAAA,EAAAI,SAAA,CAAA,CAAA;AAE9B,EAAA,IAAMC,WAAW,GAAGC,cAAc,EAAE,CAAA;AACpC,EAAA,IAAQC,UAAS,GAAsBL,OAAO,CAAtCK,SAAS;AAAKC,IAAAA,YAAY,GAAAL,wBAAA,CAAKD,OAAO,EAAAO,UAAA,CAAA,CAAA;EAE9C,OAAOC,WAAW,CAAAC,aAAA,CAAA;AAChBZ,IAAAA,UAAU,EAAVA,UAAU;IACVQ,SAAS,EAAE,SAAXA,SAASA,CAAGK,IAAI,EAAEC,SAAS,EAAEC,OAAO,EAAK;AACvCb,MAAAA,gBAAgB,CAACc,OAAO,CAAC,UAAAC,GAAG,EAAI;AAC9B,QAAA,IAAMC,MAAM,GACVC,IAAI,CAACF,GAAG,CAAC,KAAK,UAAU,GAAGA,GAAG,CAACJ,IAAI,EAAEC,SAAS,EAAEC,OAAO,CAAC,GAAGE,GAAG,CAAA;AAEhE,QAAA,IAAIE,IAAI,CAACD,MAAM,CAAC,KAAK,QAAQ,EAAE;AAC7BZ,UAAAA,WAAW,CAACc,iBAAiB,CAACF,MAAM,CAAC,CAAA;SACtC,MAAM,IAAIC,IAAI,CAACD,MAAM,CAAC,KAAK,QAAQ,EAAE;UACpCZ,WAAW,CAACc,iBAAiB,CAAC;YAAEC,QAAQ,EAAE,CAACH,MAAM,CAAA;AAAE,WAAC,CAAC,CAAA;AACvD,SAAC,MAAM;UACLZ,WAAW,CAACc,iBAAiB,CAAC;AAAEC,YAAAA,QAAQ,EAAEH,MAAAA;AAAO,WAAC,CAAC,CAAA;AACrD,SAAA;AACF,OAAC,CAAC,CAAA;MAEFV,UAAS,KAAA,IAAA,IAATA,UAAS,KAAA,KAAA,CAAA,IAATA,UAAS,CAAGK,IAAI,EAAEC,SAAS,EAAEC,OAAO,CAAC,CAAA;AACvC,KAAA;GAEGN,EAAAA,YAAY,CAChB,CAAC,CAAA;AACJ;;;;"}
1
+ {"version":3,"file":"useMutationWithInvalidation.js","sources":["../../../src/react-utils/useMutationWithInvalidation/useMutationWithInvalidation.js"],"sourcesContent":["import { useQueryClient, useMutation } from \"@tanstack/react-query\";\nimport { type } from \"ramda\";\n\nconst useMutationWithInvalidation = (\n mutationFn,\n { keysToInvalidate, ...options }\n) => {\n const queryClient = useQueryClient();\n const { onSuccess, ...otherOptions } = options;\n\n return useMutation({\n mutationFn,\n onSuccess: (data, variables, context) => {\n keysToInvalidate.forEach(key => {\n const result =\n type(key) === \"Function\" ? key(data, variables, context) : key;\n\n if (type(result) === \"Object\") {\n queryClient.invalidateQueries(result);\n } else if (type(result) === \"String\") {\n queryClient.invalidateQueries({ queryKey: [result] });\n } else {\n queryClient.invalidateQueries({ queryKey: result });\n }\n });\n\n onSuccess?.(data, variables, context);\n },\n\n ...otherOptions,\n });\n};\n\nexport default useMutationWithInvalidation;\n"],"names":["useMutationWithInvalidation","mutationFn","_ref","keysToInvalidate","options","_objectWithoutProperties","_excluded","queryClient","useQueryClient","onSuccess","otherOptions","_excluded2","useMutation","_objectSpread","data","variables","context","forEach","key","result","type","invalidateQueries","queryKey"],"mappings":";;;;;;;;;;;AAGMA,IAAAA,2BAA2B,GAAG,SAA9BA,2BAA2BA,CAC/BC,UAAU,EAAAC,IAAA,EAEP;AAAA,EAAA,IADDC,gBAAgB,GAAAD,IAAA,CAAhBC,gBAAgB;AAAKC,IAAAA,OAAO,GAAAC,wBAAA,CAAAH,IAAA,EAAAI,SAAA,CAAA,CAAA;AAE9B,EAAA,IAAMC,WAAW,GAAGC,cA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'../../toPropertyKey-C6Y0u0Sf.js';
3
4
  import '../../typeof-D-UKOauR.js';
4
5
  import 'react';
5
6
  import '@tanstack/react-query';
6
7
  import 'ramda';
7
8
  import '../constants/constants.js';
8
9
  import '../../utils/general.js';
9
- import '../../objectWithoutProperties-PcUN5OqL.js';
10
+ import '../../objectWithoutProperties-DN7d1SzH.js';
10
11
  import '../../slicedToArray-BWOQ_OdI.js';
11
12
  import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
12
13
  import '../../index-D_s_toMy.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
@@ -1,11 +1,12 @@
1
- import { _ as _defineProperty } from '../../defineProperty-D_V-nTlo.js';
1
+ import { _ as _defineProperty } from '../../defineProperty-DuFCEj0A.js';
2
2
  import { useEffect } from 'react';
3
3
  import { useQuery } from '@tanstack/react-query';
4
4
  import { isNil } from 'ramda';
5
5
  import { QUERY_CACHE_NAME_SPACE } from '../constants/constants.js';
6
6
  import { setToLocalStorage, getFromLocalStorage } from '../../utils/general.js';
7
+ import '../../toPropertyKey-C6Y0u0Sf.js';
7
8
  import '../../typeof-D-UKOauR.js';
8
- import '../../objectWithoutProperties-PcUN5OqL.js';
9
+ import '../../objectWithoutProperties-DN7d1SzH.js';
9
10
  import '../../slicedToArray-BWOQ_OdI.js';
10
11
  import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
11
12
  import '../../index-D_s_toMy.js';
@@ -1 +1 @@
1
- {"version":3,"file":"usePersistedQuery.js","sources":["../../../src/react-utils/usePersistedQuery/usePersistedQuery.js"],"sourcesContent":["import { useEffect } from \"react\";\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { isNil } from \"ramda\";\nimport { QUERY_CACHE_NAME_SPACE } from \"react-utils/constants\";\nimport { getFromLocalStorage, setToLocalStorage } from \"utils/general\";\n\nconst localStorageQueryCache = {\n set: (key, data) => {\n const cache = localStorageQueryCache.getAll();\n const newCache = { ...cache, [key]: { data, modifiedAt: Date.now() } };\n setToLocalStorage(QUERY_CACHE_NAME_SPACE, newCache);\n },\n getAll: () => {\n const cache = getFromLocalStorage(QUERY_CACHE_NAME_SPACE);\n if (!cache) return {};\n\n return cache;\n },\n get: key => localStorageQueryCache.getAll()[key],\n};\n\nconst isOutdated = (localCache, staleTime) => {\n if (isNil(localCache)) return true;\n\n if (isNil(staleTime)) return false;\n\n return localCache.modifiedAt <= Date.now() - staleTime;\n};\n\nconst usePersistedQuery = (queryKey, fetch, options) => {\n const queryResult = useQuery({\n queryKey,\n queryFn: fetch,\n ...options,\n });\n const localCache = localStorageQueryCache.get(queryKey);\n\n useEffect(() => {\n if (!queryResult.isSuccess) return;\n localStorageQueryCache.set(queryKey, queryResult.data);\n }, [queryKey, queryResult.data, queryResult.isSuccess]);\n\n if (isOutdated(localCache, options?.staleTime)) {\n return { ...queryResult, isFreshLoading: queryResult.isLoading };\n }\n\n return {\n ...queryResult,\n data: queryResult.data || localCache.data,\n isFreshLoading: false,\n };\n};\n\nusePersistedQuery.getCache = localStorageQueryCache.get;\n\nexport default usePersistedQuery;\n"],"names":["localStorageQueryCache","set","key","data","cache","getAll","newCache","_objectSpread","_defineProperty","modifiedAt","Date","now","setToLocalStorage","QUERY_CACHE_NAME_SPACE","getFromLocalStorage","get","isOutdated","localCache","staleTime","isNil","usePersistedQuery","queryKey","fetch","options","queryResult","useQuery","queryFn","useEffect","isSuccess","isFreshLoading","isLoading","getCache"],"mappings":";;;;;;;;;;;;;;;;;;;AAOA,IAAMA,sBAAsB,GAAG;AAC7BC,EAAAA,GAAG,EAAE,SAALA,GAAGA,CAAGC,GAAG,EAAEC,IAAI,EAAK;AAClB,IAAA,IAAMC,KAAK,GAAGJ,sBAAsB,CAACK,MAAM,EAAE,CAAA;IAC7C,IAAMC,QAAQ,GAAAC,aAAA,C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,IAAMN,UAAU,GAAGjB,sBAAsB,CAACe,GAAG,CAACM,QAAQ,CAAC,CAAA;AAEvDM,EAAAA,SAAS,CAAC,YAAM;AACd,IAAA,IAAI,CAACH,WAAW,CAACI,SAAS,EAAE,OAAA;IAC5B5B,sBAAsB,CAACC,GAAG,CAACoB,QAAQ,EAAEG,WAAW,CAACrB,IAAI,CAAC,CAAA;AACxD,GAAC,EAAE,CAACkB,QAAQ,EAAEG,WAAW,CAACrB,IAAI,EAAEqB,WAAW,CAACI,SAAS,CAAC,CAAC,CAAA;AAEvD,EAAA,IAAIZ,UAAU,CAACC,UAAU,EAAEM,OAAO,KAAA,IAAA,IAAPA,OAAO,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAPA,OAAO,CAAEL,SAAS,CAAC,EAAE;AAC9C,IAAA,OAAAX,aAAA,CAAAA,aAAA,CAAA,EAAA,EAAYiB,WAAW,CAAA,EAAA,EAAA,EAAA;MAAEK,cAAc,EAAEL,WAAW,CAACM,SAAAA;AAAS,KAAA,CAAA,CAAA;AAChE,GAAA;AAEA,EAAA,OAAAvB,aAAA,CAAAA,aAAA,CAAA,EAAA,EACKiB,WAAW,CAAA,EAAA,EAAA,EAAA;AACdrB,IAAAA,IAAI,EAAEqB,WAAW,CAACrB,IAAI,IAAIc,UAAU,CAACd,IAAI;AACzC0B,IAAAA,cAAc,EAAE,KAAA;AAAK,GAAA,CAAA,CAAA;AAEzB,EAAC;AAEDT,iBAAiB,CAACW,QAAQ,GAAG/B,sBAAsB,CAACe,GAAG;;;;"}
1
+ {"version":3,"file":"usePersistedQuery.js","sources":["../../../src/react-utils/usePersistedQuery/usePersistedQuery.js"],"sourcesContent":["import { useEffect } from \"react\";\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { isNil } from \"ramda\";\nimport { QUERY_CACHE_NAME_SPACE } from \"react-utils/constants\";\nimport { getFromLocalStorage, setToLocalStorage } from \"utils/general\";\n\nconst localStorageQueryCache = {\n set: (key, data) => {\n const cache = localStorageQueryCache.getAll();\n const newCache = { ...cache, [key]: { data, modifiedAt: Date.now() } };\n setToLocalStorage(QUERY_CACHE_NAME_SPACE, newCache);\n },\n getAll: () => {\n const cache = getFromLocalStorage(QUERY_CACHE_NAME_SPACE);\n if (!cache) return {};\n\n return cache;\n },\n get: key => localStorageQueryCache.getAll()[key],\n};\n\nconst isOutdated = (localCache, staleTime) => {\n if (isNil(localCache)) return true;\n\n if (isNil(staleTime)) return false;\n\n return localCache.modifiedAt <= Date.now() - staleTime;\n};\n\nconst usePersistedQuery = (queryKey, fetch, options) => {\n const queryResult = useQuery({\n queryKey,\n queryFn: fetch,\n ...options,\n });\n const localCache = localStorageQueryCache.get(queryKey);\n\n useEffect(() => {\n if (!queryResult.isSuccess) return;\n localStorageQueryCache.set(queryKey, queryResult.data);\n }, [queryKey, queryResult.data, queryResult.isSuccess]);\n\n if (isOutdated(localCache, options?.staleTime)) {\n return { ...queryResult, isFreshLoading: queryResult.isLoading };\n }\n\n return {\n ...queryResult,\n data: queryResult.data || localCache.data,\n isFreshLoading: false,\n };\n};\n\nusePersistedQuery.getCache = localStorageQueryCache.get;\n\nexport default usePersistedQuery;\n"],"names":["localStorageQueryCache","set","key","data","cache","getAll","newCache","_objectSpread","_defineProperty","modifiedAt","Date","now","setToLocalStorage","QUERY_CACHE_NAME_SPACE","getFromLocalStorage","get","isOutdated","localCache","staleTime","isNil","usePersistedQuery","queryKey","fetch","options","queryResult","useQuery","queryFn","useEffect","isSuccess","isFreshLoading","isLoading","getCache"],"mappings":";;;;;;;;;;;;;;;;;;;;AAOA,IAAMA,sBAAsB,GAAG;AAC7BC,EAAAA,GAAG,EAAE,SAALA,GAAGA,CAAGC,GAAG,EAAEC,IAAI,EAAK;AAClB,IAAA,IAAMC,KAAK,GAAGJ,sBAAsB,CAACK,MAAM,EAAE,CAAA;IAC7C,IAAMC,QAAQ,GAAAC,aAAA,CAAAA,aAAA,CAAQH,EAAAA,EAAAA,KAAK,CAAAI,EAAAA,EA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CAAC,CAAA;AAEvDM,EAAAA,SAAS,CAAC,YAAM;AACd,IAAA,IAAI,CAACH,WAAW,CAACI,SAAS,EAAE,OAAA;IAC5B5B,sBAAsB,CAACC,GAAG,CAACoB,QAAQ,EAAEG,WAAW,CAACrB,IAAI,CAAC,CAAA;AACxD,GAAC,EAAE,CAACkB,QAAQ,EAAEG,WAAW,CAACrB,IAAI,EAAEqB,WAAW,CAACI,SAAS,CAAC,CAAC,CAAA;AAEvD,EAAA,IAAIZ,UAAU,CAACC,UAAU,EAAEM,OAAO,KAAA,IAAA,IAAPA,OAAO,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAPA,OAAO,CAAEL,SAAS,CAAC,EAAE;AAC9C,IAAA,OAAAX,aAAA,CAAAA,aAAA,CAAA,EAAA,EAAYiB,WAAW,CAAA,EAAA,EAAA,EAAA;MAAEK,cAAc,EAAEL,WAAW,CAACM,SAAAA;AAAS,KAAA,CAAA,CAAA;AAChE,GAAA;AAEA,EAAA,OAAAvB,aAAA,CAAAA,aAAA,CAAA,EAAA,EACKiB,WAAW,CAAA,EAAA,EAAA,EAAA;AACdrB,IAAAA,IAAI,EAAEqB,WAAW,CAACrB,IAAI,IAAIc,UAAU,CAACd,IAAI;AACzC0B,IAAAA,cAAc,EAAE,KAAA;AAAK,GAAA,CAAA,CAAA;AAEzB,EAAC;AAEDT,iBAAiB,CAACW,QAAQ,GAAG/B,sBAAsB,CAACe,GAAG;;;;"}
@@ -1,12 +1,13 @@
1
1
  export { default } from './useQueryParams.js';
2
2
  import 'react-router-dom';
3
3
  import '../../utils/general.js';
4
- import '../../objectWithoutProperties-PcUN5OqL.js';
4
+ import '../../objectWithoutProperties-DN7d1SzH.js';
5
5
  import '../../slicedToArray-BWOQ_OdI.js';
6
6
  import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
7
7
  import '../../index-D_s_toMy.js';
8
8
  import '../../_commonjsHelpers-B85MJLTf.js';
9
- import '../../defineProperty-D_V-nTlo.js';
9
+ import '../../defineProperty-DuFCEj0A.js';
10
+ import '../../toPropertyKey-C6Y0u0Sf.js';
10
11
  import '../../typeof-D-UKOauR.js';
11
12
  import 'i18next';
12
13
  import '@bigbinary/neeto-cist';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
@@ -1,11 +1,12 @@
1
1
  import { useLocation } from 'react-router-dom';
2
2
  import { parseQueryParams } from '../../utils/general.js';
3
- import '../../objectWithoutProperties-PcUN5OqL.js';
3
+ import '../../objectWithoutProperties-DN7d1SzH.js';
4
4
  import '../../slicedToArray-BWOQ_OdI.js';
5
5
  import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
6
6
  import '../../index-D_s_toMy.js';
7
7
  import '../../_commonjsHelpers-B85MJLTf.js';
8
- import '../../defineProperty-D_V-nTlo.js';
8
+ import '../../defineProperty-DuFCEj0A.js';
9
+ import '../../toPropertyKey-C6Y0u0Sf.js';
9
10
  import '../../typeof-D-UKOauR.js';
10
11
  import 'i18next';
11
12
  import '@bigbinary/neeto-cist';
@@ -1 +1 @@
1
- {"version":3,"file":"useQueryParams.js","sources":["../../../src/react-utils/useQueryParams/useQueryParams.js"],"sourcesContent":["import { useLocation } from \"react-router-dom\";\nimport { parseQueryParams } from \"utils/general\";\n\nconst useQueryParams = options => {\n const location = useLocation();\n\n return parseQueryParams(location.search, options);\n};\n\nexport default useQueryParams;\n"],"names":["useQueryParams","options","location","useLocation","parseQueryParams","search"],"mappings":";;;;;;;;;;;;;;;AAGA,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAGC,OAAO,EAAI;AAChC,EAAA,IAAMC,QAAQ,GAAGC,WAAW,EAAE,CAAA;AAE9B,EAAA,OAAOC,gBAAgB,CAACF,QAAQ,CAACG,MAAM,EAAEJ,OAAO,CAAC,CAAA;AACnD;;;;"}
1
+ {"version":3,"file":"useQueryParams.js","sources":["../../../src/react-utils/useQueryParams/useQueryParams.js"],"sourcesContent":["import { useLocation } from \"react-router-dom\";\nimport { parseQueryParams } from \"utils/general\";\n\nconst useQueryParams = options => {\n const location = useLocation();\n\n return parseQueryParams(location.search, options);\n};\n\nexport default useQueryParams;\n"],"names":["useQueryParams","options","location","useLocation","parseQueryParams","search"],"mappings":";;;;;;;;;;;;;;;;AAGA,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAGC,OAAO,EAAI;AAChC,EAAA,IAAMC,QAAQ,GAAGC,WAAW,EAAE,CAAA;AAE9B,EAAA,OAAOC,gBAAgB,CAACF,QAAQ,CAACG,MAAM,EAAEJ,OAAO,CAAC,CAAA;AACnD;;;;"}
@@ -1,12 +1,13 @@
1
1
  export { default, useNavigationCheckpoints, useRemoveNavigationCheckpoint } from './useRegisterNavigationCheckpoint.js';
2
- import '../../defineProperty-D_V-nTlo.js';
2
+ import '../../defineProperty-DuFCEj0A.js';
3
+ import '../../toPropertyKey-C6Y0u0Sf.js';
3
4
  import '../../typeof-D-UKOauR.js';
4
5
  import 'react';
5
6
  import 'ramda';
6
7
  import '../constants/constants.js';
7
8
  import '../withImmutableActions/withImmutableActions.js';
8
9
  import '../../utils/general.js';
9
- import '../../objectWithoutProperties-PcUN5OqL.js';
10
+ import '../../objectWithoutProperties-DN7d1SzH.js';
10
11
  import '../../slicedToArray-BWOQ_OdI.js';
11
12
  import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
12
13
  import '../../index-D_s_toMy.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty } from '../../defineProperty-D_V-nTlo.js';
1
+ import { _ as _defineProperty } from '../../defineProperty-DuFCEj0A.js';
2
2
  import { useEffect } from 'react';
3
3
  import { mergeDeepLeft, dissoc, prop, pick } from 'ramda';
4
4
  import { STORAGE_KEY } from '../constants/constants.js';
@@ -6,8 +6,9 @@ import withImmutableActions from '../withImmutableActions/withImmutableActions.j
6
6
  import { getFromLocalStorage, setToLocalStorage } from '../../utils/general.js';
7
7
  import { create } from 'zustand';
8
8
  import { shallow } from 'zustand/shallow';
9
+ import '../../toPropertyKey-C6Y0u0Sf.js';
9
10
  import '../../typeof-D-UKOauR.js';
10
- import '../../objectWithoutProperties-PcUN5OqL.js';
11
+ import '../../objectWithoutProperties-DN7d1SzH.js';
11
12
  import '../../slicedToArray-BWOQ_OdI.js';
12
13
  import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
13
14
  import '../../index-D_s_toMy.js';
@@ -1 +1 @@
1
- {"version":3,"file":"useRegisterNavigationCheckpoint.js","sources":["../../../src/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js"],"sourcesContent":["import { useEffect } from \"react\";\n\nimport { mergeDeepLeft, pick, prop, dissoc } from \"ramda\";\nimport { STORAGE_KEY } from \"react-utils/constants\";\nimport withImmutableActions from \"react-utils/withImmutableActions\";\nimport { getFromLocalStorage, setToLocalStorage } from \"utils/general\";\nimport { create } from \"zustand\";\nimport { shallow } from \"zustand/shallow\";\n\nconst getLocalStorageData = () => getFromLocalStorage(STORAGE_KEY) || {};\n\nconst setLocalStorageData = data => setToLocalStorage(STORAGE_KEY, data);\n\n/** @type {import(\"neetocommons/react-utils\").ZustandStoreHook} */\nconst useCheckpointStore = create(\n withImmutableActions(set => ({\n checkpoints: {},\n setCheckpoint: (key, path) =>\n set(mergeDeepLeft({ checkpoints: { [key]: path } })),\n removeCheckpoint: key =>\n set(state => ({ checkpoints: dissoc(key, state.checkpoints) })),\n }))\n);\n\nconst useRegisterNavigationCheckpoint = (\n key,\n path = window.location.pathname + window.location.search,\n persistInLocalStorage = false\n) => {\n const setCheckpoint = useCheckpointStore(prop(\"setCheckpoint\"));\n\n useEffect(() => {\n setCheckpoint(key, path);\n if (persistInLocalStorage) {\n const localStorageData = getLocalStorageData();\n setLocalStorageData({ ...localStorageData, [key]: path });\n }\n }, [key, path, persistInLocalStorage]);\n};\n\nexport const useNavigationCheckpoints = (...keys) => {\n const getCheckpoints = useCheckpointStore(\n store => pick(keys, store.checkpoints),\n shallow\n );\n\n const localStorageData = getLocalStorageData();\n const localStorageCheckpoints = pick(keys, localStorageData);\n\n return { ...getCheckpoints, ...localStorageCheckpoints };\n};\n\nexport const useRemoveNavigationCheckpoint = () => {\n const removeCheckpoint = useCheckpointStore(prop(\"removeCheckpoint\"));\n\n return key => {\n removeCheckpoint(key);\n const localStorageData = getLocalStorageData();\n setLocalStorageData(dissoc(key, localStorageData));\n };\n};\n\nexport default useRegisterNavigationCheckpoint;\n"],"names":["getLocalStorageData","getFromLocalStorage","STORAGE_KEY","setLocalStorageData","data","setToLocalStorage","useCheckpointStore","create","withImmutableActions","set","checkpoints","setCheckpoint","key","path","mergeDeepLeft","_defineProperty","removeCheckpoint","state","dissoc","useRegisterNavigationCheckpoint","arguments","length","undefined","window","location","pathname","search","persistInLocalStorage","prop","useEffect","localStorageData","_objectSpread","useNavigationCheckpoints","_len","keys","Array","_key","getCheckpoints","store","pick","shallow","localStorageCheckpoints","useRemoveNavigationCheckpoint"],"mappings":";;;;;;;;;;;;;;;;;;;;;AASA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAmBA,GAAA;AAAA,EAAA,OAASC,mBAAmB,CAACC,WAAW,CAAC,IAAI,EAAE,CAAA;AAAA,CAAA,CAAA;AAExE,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAGC,IAAI,EAAA;AAAA,EAAA,OAAIC,iBAAiB,CAACH,WAAW,EAAEE,IAAI,CAAC,CAAA;AAAA,CAAA,CAAA;;AAExE;AACA,IAAME,kBAAkB,GAAGC,MAAM,CAC/BC,oBAAoB,CAAC,UAAAC,GAAG,EAAA;E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AAG,CAAC,CAAA;AACrB,IAAA,IAAMkB,gBAAgB,GAAG9B,mBAAmB,EAAE,CAAA;AAC9CG,IAAAA,mBAAmB,CAACe,MAAM,CAACN,GAAG,EAAEkB,gBAAgB,CAAC,CAAC,CAAA;GACnD,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"useRegisterNavigationCheckpoint.js","sources":["../../../src/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js"],"sourcesContent":["import { useEffect } from \"react\";\n\nimport { mergeDeepLeft, pick, prop, dissoc } from \"ramda\";\nimport { STORAGE_KEY } from \"react-utils/constants\";\nimport withImmutableActions from \"react-utils/withImmutableActions\";\nimport { getFromLocalStorage, setToLocalStorage } from \"utils/general\";\nimport { create } from \"zustand\";\nimport { shallow } from \"zustand/shallow\";\n\nconst getLocalStorageData = () => getFromLocalStorage(STORAGE_KEY) || {};\n\nconst setLocalStorageData = data => setToLocalStorage(STORAGE_KEY, data);\n\n/** @type {import(\"neetocommons/react-utils\").ZustandStoreHook} */\nconst useCheckpointStore = create(\n withImmutableActions(set => ({\n checkpoints: {},\n setCheckpoint: (key, path) =>\n set(mergeDeepLeft({ checkpoints: { [key]: path } })),\n removeCheckpoint: key =>\n set(state => ({ checkpoints: dissoc(key, state.checkpoints) })),\n }))\n);\n\nconst useRegisterNavigationCheckpoint = (\n key,\n path = window.location.pathname + window.location.search,\n persistInLocalStorage = false\n) => {\n const setCheckpoint = useCheckpointStore(prop(\"setCheckpoint\"));\n\n useEffect(() => {\n setCheckpoint(key, path);\n if (persistInLocalStorage) {\n const localStorageData = getLocalStorageData();\n setLocalStorageData({ ...localStorageData, [key]: path });\n }\n }, [key, path, persistInLocalStorage]);\n};\n\nexport const useNavigationCheckpoints = (...keys) => {\n const getCheckpoints = useCheckpointStore(\n store => pick(keys, store.checkpoints),\n shallow\n );\n\n const localStorageData = getLocalStorageData();\n const localStorageCheckpoints = pick(keys, localStorageData);\n\n return { ...getCheckpoints, ...localStorageCheckpoints };\n};\n\nexport const useRemoveNavigationCheckpoint = () => {\n const removeCheckpoint = useCheckpointStore(prop(\"removeCheckpoint\"));\n\n return key => {\n removeCheckpoint(key);\n const localStorageData = getLocalStorageData();\n setLocalStorageData(dissoc(key, localStorageData));\n };\n};\n\nexport default useRegisterNavigationCheckpoint;\n"],"names":["getLocalStorageData","getFromLocalStorage","STORAGE_KEY","setLocalStorageData","data","setToLocalStorage","useCheckpointStore","create","withImmutableActions","set","checkpoints","setCheckpoint","key","path","mergeDeepLeft","_defineProperty","removeCheckpoint","state","dissoc","useRegisterNavigationCheckpoint","arguments","length","undefined","window","location","pathname","search","persistInLocalStorage","prop","useEffect","localStorageData","_objectSpread","useNavigationCheckpoints","_len","keys","Array","_key","getCheckpoints","store","pick","shallow","localStorageCheckpoints","useRemoveNavigationCheckpoint"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AASA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAmBA,GAAA;AAAA,EAAA,OAASC,mBAAmB,CAACC,WAAW,CAAC,IAAI,EAAE,CAAA;AAAA,CAAA,CAAA;AAExE,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAGC,IAAI,EAAA;AAAA,EAAA,OAAIC,iBAAiB,CAACH,WAAW,EAAEE,IAAI,CAAC,CAAA;AAAA,CAAA,CAAA;;AAExE;AACA,IAAME,kBAAkB,GAAGC,MAAM,CAC/BC,oBAAoB,CAAC,UAAAC,GAAG,EAAA;EAAA,OAAK;IAC3BC,WAAW,EAAE,EAAE;AACfC,IAAAA,aAAa,EAAE,SAAfA,aAAaA,CAAGC,GAAG,EAAEC,IAAI,EAAA;MAAA,OACvBJ,GAAG,CAACK,aAAa,CAAC;AAAEJ,QAAAA,WAAW,EAAAK,eAAA,CAAKH,EAAAA,EAAAA,GAAG,EAAGC,IAAI,CAAA;AAAG,OAAC,CAAC,CAAC,CAAA;AAAA,KAAA;AACtDG,IAAAA,gBAAgB,EAAE,SAAlBA,gBAAgBA,CAAEJ,GA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