@bigbinary/neeto-commons-frontend 4.13.29 → 4.13.31
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.
- package/configs/eslint/globals.mjs +22 -0
- package/configs/eslint/helpers/{index.js → index.mjs} +8 -4
- package/configs/eslint/imports/enforced.mjs +34 -0
- package/configs/eslint/imports/order.mjs +71 -0
- package/configs/eslint/index.mjs +206 -0
- package/configs/eslint/overrides.mjs +28 -0
- package/configs/eslint/promise.mjs +12 -0
- package/configs/eslint/react.mjs +94 -0
- package/configs/nanos/eslint/imports/order.mjs +44 -0
- package/configs/nanos/eslint/index.mjs +21 -0
- package/configs/nextjs/eslint/imports/order.mjs +46 -0
- package/configs/nextjs/eslint/index.mjs +21 -0
- package/dist/cjs/constants/index.js.map +1 -1
- package/dist/cjs/constants/regex.js.map +1 -1
- package/dist/cjs/cypress-utils/.eslintrc.js.map +1 -1
- package/dist/cjs/cypress-utils/commands.js +2 -3
- package/dist/cjs/cypress-utils/commands.js.map +1 -1
- package/dist/cjs/cypress-utils/constants/index.js.map +1 -1
- package/dist/cjs/cypress-utils/constants/routes.js +1 -2
- package/dist/cjs/cypress-utils/constants/routes.js.map +1 -1
- package/dist/cjs/cypress-utils/constants/selectors/common.js +1 -2
- package/dist/cjs/cypress-utils/constants/selectors/common.js.map +1 -1
- package/dist/cjs/cypress-utils/constants/selectors/editor.js +1 -2
- package/dist/cjs/cypress-utils/constants/selectors/editor.js.map +1 -1
- package/dist/cjs/cypress-utils/constants/selectors/ipRestriction.js +1 -2
- package/dist/cjs/cypress-utils/constants/selectors/ipRestriction.js.map +1 -1
- package/dist/cjs/cypress-utils/constants/selectors/login.js +1 -2
- package/dist/cjs/cypress-utils/constants/selectors/login.js.map +1 -1
- package/dist/cjs/cypress-utils/constants/selectors/member.js +1 -2
- package/dist/cjs/cypress-utils/constants/selectors/member.js.map +1 -1
- package/dist/cjs/cypress-utils/constants/selectors/navigation.js +1 -2
- package/dist/cjs/cypress-utils/constants/selectors/navigation.js.map +1 -1
- package/dist/cjs/cypress-utils/constants/selectors/roles.js.map +1 -1
- package/dist/cjs/cypress-utils/constants/selectors/signUp.js +1 -2
- package/dist/cjs/cypress-utils/constants/selectors/signUp.js.map +1 -1
- package/dist/cjs/cypress-utils/constants/selectors/tags.js +1 -2
- package/dist/cjs/cypress-utils/constants/selectors/tags.js.map +1 -1
- package/dist/cjs/cypress-utils/constants/texts/common.js.map +1 -1
- package/dist/cjs/cypress-utils/constants/texts/member.js.map +1 -1
- package/dist/cjs/cypress-utils/constants/texts/navigation.js.map +1 -1
- package/dist/cjs/cypress-utils/constants/texts/roles.js.map +1 -1
- package/dist/cjs/cypress-utils/constants/texts/signUp.js.map +1 -1
- package/dist/cjs/cypress-utils/constants/texts/tags.js.map +1 -1
- package/dist/cjs/cypress-utils/fixtures/fake.js.map +1 -1
- package/dist/cjs/cypress-utils/index.js +1 -2
- package/dist/cjs/cypress-utils/index.js.map +1 -1
- package/dist/cjs/cypress-utils/utils/authentication.js +1 -2
- package/dist/cjs/cypress-utils/utils/authentication.js.map +1 -1
- package/dist/cjs/cypress-utils/utils/common.js +2 -3
- package/dist/cjs/cypress-utils/utils/common.js.map +1 -1
- package/dist/cjs/cypress-utils/utils/date.js.map +1 -1
- package/dist/cjs/cypress-utils/utils/email.js +2 -3
- package/dist/cjs/cypress-utils/utils/email.js.map +1 -1
- package/dist/cjs/cypress-utils/utils/member.js +11 -12
- package/dist/cjs/cypress-utils/utils/member.js.map +1 -1
- package/dist/cjs/cypress-utils/utils/navigation.js +1 -2
- package/dist/cjs/cypress-utils/utils/navigation.js.map +1 -1
- package/dist/cjs/cypress-utils/utils/organization.js +1 -2
- package/dist/cjs/cypress-utils/utils/organization.js.map +1 -1
- package/dist/cjs/cypress-utils/utils/validation.js +1 -2
- package/dist/cjs/cypress-utils/utils/validation.js.map +1 -1
- package/dist/cjs/{toPropertyKey-CRgrohXG.js → defineProperty-lChFfVqi.js} +12 -2
- package/dist/cjs/defineProperty-lChFfVqi.js.map +1 -0
- package/dist/cjs/{index-DDd00LFf.js → index-CUYe6FO0.js} +16 -16
- package/dist/cjs/index-CUYe6FO0.js.map +1 -0
- package/dist/cjs/initializers/axios.js +1 -2
- package/dist/cjs/initializers/axios.js.map +1 -1
- package/dist/cjs/initializers/axiosInitializer/index.js +1 -2
- package/dist/cjs/initializers/axiosInitializer/index.js.map +1 -1
- package/dist/cjs/initializers/axiosInitializer/paramsSerializer.js.map +1 -1
- package/dist/cjs/initializers/constants.js.map +1 -1
- package/dist/cjs/initializers/dayjs.js.map +1 -1
- package/dist/cjs/initializers/globalProps.js.map +1 -1
- package/dist/cjs/initializers/i18n.js +59 -11
- package/dist/cjs/initializers/i18n.js.map +1 -1
- package/dist/cjs/initializers/index.js +3 -6
- package/dist/cjs/initializers/index.js.map +1 -1
- package/dist/cjs/initializers/logger.js.map +1 -1
- package/dist/cjs/initializers/mixpanel.js +5 -6
- package/dist/cjs/initializers/mixpanel.js.map +1 -1
- package/dist/cjs/initializers/reactDevTools.js.map +1 -1
- package/dist/cjs/initializers/utils/customFormatters.js.map +1 -1
- package/dist/cjs/initializers/utils/customPostProcessors.js.map +1 -1
- package/dist/cjs/initializers/utils/utils.js +1 -1
- package/dist/cjs/initializers/utils/utils.js.map +1 -1
- package/dist/cjs/mixpanel.module-ajRn5e0J.js +22401 -0
- package/dist/cjs/mixpanel.module-ajRn5e0J.js.map +1 -0
- package/dist/cjs/objectWithoutProperties-wSsbHFcG.js.map +1 -1
- package/dist/cjs/react-utils/AppContainer/AppContainer.js +3 -4
- package/dist/cjs/react-utils/AppContainer/AppContainer.js.map +1 -1
- package/dist/cjs/react-utils/AppContainer/index.js +1 -2
- package/dist/cjs/react-utils/AppContainer/index.js.map +1 -1
- package/dist/cjs/react-utils/BrowserPushNotifications/devices.js.map +1 -1
- package/dist/cjs/react-utils/BrowserPushNotifications/index.js +1 -1
- package/dist/cjs/react-utils/BrowserPushNotifications/pushHelper.js +1 -1
- package/dist/cjs/react-utils/BrowserPushNotifications/pushHelper.js.map +1 -1
- package/dist/cjs/react-utils/BrowserPushNotifications/registerServiceWorker.js +1 -1
- package/dist/cjs/react-utils/BrowserPushNotifications/registerServiceWorker.js.map +1 -1
- package/dist/cjs/react-utils/HoneybadgerErrorBoundary/FallbackComponent.js +2 -3
- package/dist/cjs/react-utils/HoneybadgerErrorBoundary/FallbackComponent.js.map +1 -1
- package/dist/cjs/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js +2 -3
- package/dist/cjs/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js.map +1 -1
- package/dist/cjs/react-utils/HoneybadgerErrorBoundary/constants.js +2 -0
- package/dist/cjs/react-utils/HoneybadgerErrorBoundary/constants.js.map +1 -1
- package/dist/cjs/react-utils/HoneybadgerErrorBoundary/index.js +1 -2
- package/dist/cjs/react-utils/HoneybadgerErrorBoundary/index.js.map +1 -1
- package/dist/cjs/react-utils/HoneybadgerErrorBoundary/utils.js.map +1 -1
- package/dist/cjs/react-utils/PageTitle/PageTitle.js.map +1 -1
- package/dist/cjs/react-utils/PrivateRoute/PrivateRoute.js +2 -3
- package/dist/cjs/react-utils/PrivateRoute/PrivateRoute.js.map +1 -1
- package/dist/cjs/react-utils/PrivateRoute/index.js +1 -2
- package/dist/cjs/react-utils/PrivateRoute/index.js.map +1 -1
- package/dist/cjs/react-utils/QueryClientProvider/QueryClientProvider.js.map +1 -1
- package/dist/cjs/react-utils/QueryClientProvider/queryClient.js.map +1 -1
- package/dist/cjs/react-utils/constants/constants.js.map +1 -1
- package/dist/cjs/react-utils/constants/query.js.map +1 -1
- package/dist/cjs/react-utils/index.js +4 -6
- package/dist/cjs/react-utils/index.js.map +1 -1
- package/dist/cjs/react-utils/metaClick/metaClick.js.map +1 -1
- package/dist/cjs/react-utils/useBreakpoints/index.js +1 -2
- package/dist/cjs/react-utils/useBreakpoints/index.js.map +1 -1
- package/dist/cjs/react-utils/useBreakpoints/utils.js +2 -3
- package/dist/cjs/react-utils/useBreakpoints/utils.js.map +1 -1
- package/dist/cjs/react-utils/useDebounce/index.js +1 -1
- package/dist/cjs/react-utils/useDebounce/useDebounce.js +1 -1
- package/dist/cjs/react-utils/useDebounce/useDebounce.js.map +1 -1
- package/dist/cjs/react-utils/useDisplayErrorPage/useDisplayErrorPage.js.map +1 -1
- package/dist/cjs/react-utils/useFetchNeetoApps/apis/neeto_apps.js.map +1 -1
- package/dist/cjs/react-utils/useFetchNeetoApps/index.js +3 -4
- package/dist/cjs/react-utils/useFetchNeetoApps/index.js.map +1 -1
- package/dist/cjs/react-utils/useFetchNeetoApps/useFetchNeetoApps.js +4 -5
- package/dist/cjs/react-utils/useFetchNeetoApps/useFetchNeetoApps.js.map +1 -1
- package/dist/cjs/react-utils/useFieldSubmit/useFieldSubmit.js.map +1 -1
- package/dist/cjs/react-utils/useFuncDebounce/useFuncDebounce.js.map +1 -1
- package/dist/cjs/react-utils/useIsElementVisibleInDom/index.js +1 -1
- package/dist/cjs/react-utils/useIsElementVisibleInDom/useForceUpdate.js +1 -1
- package/dist/cjs/react-utils/useIsElementVisibleInDom/useForceUpdate.js.map +1 -1
- package/dist/cjs/react-utils/useIsElementVisibleInDom/useIsElementVisibleInDom.js +1 -1
- package/dist/cjs/react-utils/useIsElementVisibleInDom/useIsElementVisibleInDom.js.map +1 -1
- package/dist/cjs/react-utils/useKeyboardShortcutsPaneState/useKeyboardShortcutsPaneState.js.map +1 -1
- package/dist/cjs/react-utils/useLocalStorage/index.js +4 -6
- package/dist/cjs/react-utils/useLocalStorage/index.js.map +1 -1
- package/dist/cjs/react-utils/useLocalStorage/useLocalStorage.js +4 -6
- package/dist/cjs/react-utils/useLocalStorage/useLocalStorage.js.map +1 -1
- package/dist/cjs/react-utils/useMutationWithInvalidation/index.js +1 -2
- package/dist/cjs/react-utils/useMutationWithInvalidation/index.js.map +1 -1
- package/dist/cjs/react-utils/useMutationWithInvalidation/useMutationWithInvalidation.js +2 -3
- package/dist/cjs/react-utils/useMutationWithInvalidation/useMutationWithInvalidation.js.map +1 -1
- package/dist/cjs/react-utils/useOnClickOutside/useOnClickOutside.js.map +1 -1
- package/dist/cjs/react-utils/usePersistedQuery/index.js +3 -4
- package/dist/cjs/react-utils/usePersistedQuery/index.js.map +1 -1
- package/dist/cjs/react-utils/usePersistedQuery/usePersistedQuery.js +4 -5
- package/dist/cjs/react-utils/usePersistedQuery/usePersistedQuery.js.map +1 -1
- package/dist/cjs/react-utils/usePrevious/usePrevious.js.map +1 -1
- package/dist/cjs/react-utils/useQueryParams/index.js +3 -4
- package/dist/cjs/react-utils/useQueryParams/index.js.map +1 -1
- package/dist/cjs/react-utils/useQueryParams/useQueryParams.js +3 -4
- package/dist/cjs/react-utils/useQueryParams/useQueryParams.js.map +1 -1
- package/dist/cjs/react-utils/useRegisterNavigationCheckpoint/index.js +3 -4
- package/dist/cjs/react-utils/useRegisterNavigationCheckpoint/index.js.map +1 -1
- package/dist/cjs/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js +4 -5
- package/dist/cjs/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js.map +1 -1
- package/dist/cjs/react-utils/useRestoreScrollPosition/useRestoreScrollPosition.js.map +1 -1
- package/dist/cjs/react-utils/useStateWithDependency/index.js +1 -1
- package/dist/cjs/react-utils/useStateWithDependency/useStateWithDependency.js +1 -1
- package/dist/cjs/react-utils/useStateWithDependency/useStateWithDependency.js.map +1 -1
- package/dist/cjs/react-utils/useTimer/useTimer.js.map +1 -1
- package/dist/cjs/react-utils/useUpdateEffect/useUpdateEffect.js.map +1 -1
- package/dist/cjs/react-utils/withImmutableActions/withImmutableActions.js.map +1 -1
- package/dist/cjs/react-utils/withT/withT.js.map +1 -1
- package/dist/cjs/react-utils/withTitle/index.js +1 -2
- package/dist/cjs/react-utils/withTitle/index.js.map +1 -1
- package/dist/cjs/react-utils/withTitle/withTitle.js +2 -3
- package/dist/cjs/react-utils/withTitle/withTitle.js.map +1 -1
- package/dist/cjs/{slicedToArray-Cbh2WzDH.js → slicedToArray-BcL7fKuL.js} +4 -4
- package/dist/cjs/{slicedToArray-Cbh2WzDH.js.map → slicedToArray-BcL7fKuL.js.map} +1 -1
- package/dist/cjs/toConsumableArray-tBKHqzE3.js.map +1 -1
- package/dist/cjs/typeof-D4ZZ_FlZ.js.map +1 -1
- package/dist/cjs/unsupportedIterableToArray-BoHMiKNA.js.map +1 -1
- package/dist/cjs/utils/axios.js.map +1 -1
- package/dist/cjs/utils/buildNestedAttributesPayload.js +2 -3
- package/dist/cjs/utils/buildNestedAttributesPayload.js.map +1 -1
- package/dist/cjs/utils/captureAnalyticsEvent.js +2 -3
- package/dist/cjs/utils/captureAnalyticsEvent.js.map +1 -1
- package/dist/cjs/utils/captureAnalyticsPageView.js +4 -6
- package/dist/cjs/utils/captureAnalyticsPageView.js.map +1 -1
- package/dist/cjs/utils/createSubscription.js +3 -4
- package/dist/cjs/utils/createSubscription.js.map +1 -1
- package/dist/cjs/utils/currencyFormat.js +2 -3
- package/dist/cjs/utils/currencyFormat.js.map +1 -1
- package/dist/cjs/utils/datetime.js +1 -3
- package/dist/cjs/utils/datetime.js.map +1 -1
- package/dist/cjs/utils/dayjs.js +20 -6
- package/dist/cjs/utils/dayjs.js.map +1 -1
- package/dist/cjs/utils/general.js +4 -5
- package/dist/cjs/utils/general.js.map +1 -1
- package/dist/cjs/utils/index.js +4 -6
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/utils/loadGoogleFonts.js.map +1 -1
- package/dist/cjs/utils/permissions.js.map +1 -1
- package/dist/cjs/utils/timezonePlugin.js +3 -4
- package/dist/cjs/utils/timezonePlugin.js.map +1 -1
- package/dist/cjs/utils/validators/slug.js.map +1 -1
- package/dist/constants/index.js.map +1 -1
- package/dist/constants/regex.js.map +1 -1
- package/dist/cypress-utils/.eslintrc.js.map +1 -1
- package/dist/cypress-utils/commands.js +2 -3
- package/dist/cypress-utils/commands.js.map +1 -1
- package/dist/cypress-utils/constants/index.js.map +1 -1
- package/dist/cypress-utils/constants/routes.js +2 -3
- package/dist/cypress-utils/constants/routes.js.map +1 -1
- package/dist/cypress-utils/constants/selectors/common.js +2 -3
- package/dist/cypress-utils/constants/selectors/common.js.map +1 -1
- package/dist/cypress-utils/constants/selectors/editor.js +1 -2
- package/dist/cypress-utils/constants/selectors/editor.js.map +1 -1
- package/dist/cypress-utils/constants/selectors/ipRestriction.js +1 -2
- package/dist/cypress-utils/constants/selectors/ipRestriction.js.map +1 -1
- package/dist/cypress-utils/constants/selectors/login.js +1 -2
- package/dist/cypress-utils/constants/selectors/login.js.map +1 -1
- package/dist/cypress-utils/constants/selectors/member.js +1 -2
- package/dist/cypress-utils/constants/selectors/member.js.map +1 -1
- package/dist/cypress-utils/constants/selectors/navigation.js +1 -2
- package/dist/cypress-utils/constants/selectors/navigation.js.map +1 -1
- package/dist/cypress-utils/constants/selectors/roles.js.map +1 -1
- package/dist/cypress-utils/constants/selectors/signUp.js +1 -2
- package/dist/cypress-utils/constants/selectors/signUp.js.map +1 -1
- package/dist/cypress-utils/constants/selectors/tags.js +1 -2
- package/dist/cypress-utils/constants/selectors/tags.js.map +1 -1
- package/dist/cypress-utils/constants/texts/common.js.map +1 -1
- package/dist/cypress-utils/constants/texts/member.js.map +1 -1
- package/dist/cypress-utils/constants/texts/navigation.js.map +1 -1
- package/dist/cypress-utils/constants/texts/roles.js.map +1 -1
- package/dist/cypress-utils/constants/texts/signUp.js.map +1 -1
- package/dist/cypress-utils/constants/texts/tags.js.map +1 -1
- package/dist/cypress-utils/fixtures/fake.js.map +1 -1
- package/dist/cypress-utils/index.js +1 -2
- package/dist/cypress-utils/index.js.map +1 -1
- package/dist/cypress-utils/utils/authentication.js +2 -3
- package/dist/cypress-utils/utils/authentication.js.map +1 -1
- package/dist/cypress-utils/utils/common.js +2 -3
- package/dist/cypress-utils/utils/common.js.map +1 -1
- package/dist/cypress-utils/utils/date.js.map +1 -1
- package/dist/cypress-utils/utils/email.js +2 -3
- package/dist/cypress-utils/utils/email.js.map +1 -1
- package/dist/cypress-utils/utils/member.js +12 -13
- package/dist/cypress-utils/utils/member.js.map +1 -1
- package/dist/cypress-utils/utils/navigation.js +3 -4
- package/dist/cypress-utils/utils/navigation.js.map +1 -1
- package/dist/cypress-utils/utils/organization.js +1 -2
- package/dist/cypress-utils/utils/organization.js.map +1 -1
- package/dist/cypress-utils/utils/validation.js +1 -2
- package/dist/cypress-utils/utils/validation.js.map +1 -1
- package/dist/{toPropertyKey-C6Y0u0Sf.js → defineProperty-CrCYjjU3.js} +12 -3
- package/dist/defineProperty-CrCYjjU3.js.map +1 -0
- package/dist/{index-D_s_toMy.js → index-COfUw8MU.js} +16 -16
- package/dist/index-COfUw8MU.js.map +1 -0
- package/dist/initializers/axios.js +1 -2
- package/dist/initializers/axios.js.map +1 -1
- package/dist/initializers/axiosInitializer/index.js +1 -2
- package/dist/initializers/axiosInitializer/index.js.map +1 -1
- package/dist/initializers/axiosInitializer/paramsSerializer.js.map +1 -1
- package/dist/initializers/constants.js.map +1 -1
- package/dist/initializers/dayjs.js.map +1 -1
- package/dist/initializers/globalProps.js.map +1 -1
- package/dist/initializers/i18n.js +58 -10
- package/dist/initializers/i18n.js.map +1 -1
- package/dist/initializers/index.js +3 -6
- package/dist/initializers/index.js.map +1 -1
- package/dist/initializers/logger.js.map +1 -1
- package/dist/initializers/mixpanel.js +1 -2
- package/dist/initializers/mixpanel.js.map +1 -1
- package/dist/initializers/reactDevTools.js.map +1 -1
- package/dist/initializers/utils/customFormatters.js.map +1 -1
- package/dist/initializers/utils/customPostProcessors.js.map +1 -1
- package/dist/initializers/utils/utils.js +1 -1
- package/dist/initializers/utils/utils.js.map +1 -1
- package/dist/mixpanel.module-Bu2zrBMQ.js +22399 -0
- package/dist/mixpanel.module-Bu2zrBMQ.js.map +1 -0
- package/dist/objectWithoutProperties-DN7d1SzH.js.map +1 -1
- package/dist/react-utils/AppContainer/AppContainer.js +3 -4
- package/dist/react-utils/AppContainer/AppContainer.js.map +1 -1
- package/dist/react-utils/AppContainer/index.js +1 -2
- package/dist/react-utils/AppContainer/index.js.map +1 -1
- package/dist/react-utils/BrowserPushNotifications/devices.js.map +1 -1
- package/dist/react-utils/BrowserPushNotifications/index.js +1 -1
- package/dist/react-utils/BrowserPushNotifications/pushHelper.js +1 -1
- package/dist/react-utils/BrowserPushNotifications/pushHelper.js.map +1 -1
- package/dist/react-utils/BrowserPushNotifications/registerServiceWorker.js +1 -1
- package/dist/react-utils/BrowserPushNotifications/registerServiceWorker.js.map +1 -1
- package/dist/react-utils/HoneybadgerErrorBoundary/FallbackComponent.js +2 -3
- package/dist/react-utils/HoneybadgerErrorBoundary/FallbackComponent.js.map +1 -1
- package/dist/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js +3 -4
- package/dist/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js.map +1 -1
- package/dist/react-utils/HoneybadgerErrorBoundary/constants.js +2 -1
- package/dist/react-utils/HoneybadgerErrorBoundary/constants.js.map +1 -1
- package/dist/react-utils/HoneybadgerErrorBoundary/index.js +1 -2
- package/dist/react-utils/HoneybadgerErrorBoundary/index.js.map +1 -1
- package/dist/react-utils/HoneybadgerErrorBoundary/utils.js.map +1 -1
- package/dist/react-utils/PageTitle/PageTitle.js.map +1 -1
- package/dist/react-utils/PrivateRoute/PrivateRoute.js +2 -3
- package/dist/react-utils/PrivateRoute/PrivateRoute.js.map +1 -1
- package/dist/react-utils/PrivateRoute/index.js +1 -2
- package/dist/react-utils/PrivateRoute/index.js.map +1 -1
- package/dist/react-utils/QueryClientProvider/QueryClientProvider.js.map +1 -1
- package/dist/react-utils/QueryClientProvider/queryClient.js +1 -1
- package/dist/react-utils/QueryClientProvider/queryClient.js.map +1 -1
- package/dist/react-utils/constants/constants.js.map +1 -1
- package/dist/react-utils/constants/query.js.map +1 -1
- package/dist/react-utils/index.js +4 -6
- package/dist/react-utils/index.js.map +1 -1
- package/dist/react-utils/metaClick/metaClick.js.map +1 -1
- package/dist/react-utils/useBreakpoints/index.js +1 -2
- package/dist/react-utils/useBreakpoints/index.js.map +1 -1
- package/dist/react-utils/useBreakpoints/utils.js +2 -3
- package/dist/react-utils/useBreakpoints/utils.js.map +1 -1
- package/dist/react-utils/useDebounce/index.js +1 -1
- package/dist/react-utils/useDebounce/useDebounce.js +1 -1
- package/dist/react-utils/useDebounce/useDebounce.js.map +1 -1
- package/dist/react-utils/useDisplayErrorPage/useDisplayErrorPage.js.map +1 -1
- package/dist/react-utils/useFetchNeetoApps/apis/neeto_apps.js.map +1 -1
- package/dist/react-utils/useFetchNeetoApps/index.js +3 -4
- package/dist/react-utils/useFetchNeetoApps/index.js.map +1 -1
- package/dist/react-utils/useFetchNeetoApps/useFetchNeetoApps.js +4 -5
- package/dist/react-utils/useFetchNeetoApps/useFetchNeetoApps.js.map +1 -1
- package/dist/react-utils/useFieldSubmit/useFieldSubmit.js.map +1 -1
- package/dist/react-utils/useFuncDebounce/useFuncDebounce.js.map +1 -1
- package/dist/react-utils/useIsElementVisibleInDom/index.js +1 -1
- package/dist/react-utils/useIsElementVisibleInDom/useForceUpdate.js +1 -1
- package/dist/react-utils/useIsElementVisibleInDom/useForceUpdate.js.map +1 -1
- package/dist/react-utils/useIsElementVisibleInDom/useIsElementVisibleInDom.js +1 -1
- package/dist/react-utils/useIsElementVisibleInDom/useIsElementVisibleInDom.js.map +1 -1
- package/dist/react-utils/useKeyboardShortcutsPaneState/useKeyboardShortcutsPaneState.js.map +1 -1
- package/dist/react-utils/useLocalStorage/index.js +4 -6
- package/dist/react-utils/useLocalStorage/index.js.map +1 -1
- package/dist/react-utils/useLocalStorage/useLocalStorage.js +4 -6
- package/dist/react-utils/useLocalStorage/useLocalStorage.js.map +1 -1
- package/dist/react-utils/useMutationWithInvalidation/index.js +1 -2
- package/dist/react-utils/useMutationWithInvalidation/index.js.map +1 -1
- package/dist/react-utils/useMutationWithInvalidation/useMutationWithInvalidation.js +2 -3
- package/dist/react-utils/useMutationWithInvalidation/useMutationWithInvalidation.js.map +1 -1
- package/dist/react-utils/useOnClickOutside/useOnClickOutside.js.map +1 -1
- package/dist/react-utils/usePersistedQuery/index.js +3 -4
- package/dist/react-utils/usePersistedQuery/index.js.map +1 -1
- package/dist/react-utils/usePersistedQuery/usePersistedQuery.js +5 -6
- package/dist/react-utils/usePersistedQuery/usePersistedQuery.js.map +1 -1
- package/dist/react-utils/usePrevious/usePrevious.js.map +1 -1
- package/dist/react-utils/useQueryParams/index.js +3 -4
- package/dist/react-utils/useQueryParams/index.js.map +1 -1
- package/dist/react-utils/useQueryParams/useQueryParams.js +3 -4
- package/dist/react-utils/useQueryParams/useQueryParams.js.map +1 -1
- package/dist/react-utils/useRegisterNavigationCheckpoint/index.js +3 -4
- package/dist/react-utils/useRegisterNavigationCheckpoint/index.js.map +1 -1
- package/dist/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js +5 -6
- package/dist/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js.map +1 -1
- package/dist/react-utils/useRestoreScrollPosition/useRestoreScrollPosition.js +1 -1
- package/dist/react-utils/useRestoreScrollPosition/useRestoreScrollPosition.js.map +1 -1
- package/dist/react-utils/useStateWithDependency/index.js +1 -1
- package/dist/react-utils/useStateWithDependency/useStateWithDependency.js +1 -1
- package/dist/react-utils/useStateWithDependency/useStateWithDependency.js.map +1 -1
- package/dist/react-utils/useTimer/useTimer.js.map +1 -1
- package/dist/react-utils/useUpdateEffect/useUpdateEffect.js.map +1 -1
- package/dist/react-utils/withImmutableActions/withImmutableActions.js.map +1 -1
- package/dist/react-utils/withT/withT.js.map +1 -1
- package/dist/react-utils/withTitle/index.js +1 -2
- package/dist/react-utils/withTitle/index.js.map +1 -1
- package/dist/react-utils/withTitle/withTitle.js +2 -3
- package/dist/react-utils/withTitle/withTitle.js.map +1 -1
- package/dist/{slicedToArray-BWOQ_OdI.js → slicedToArray-DmsZvA_9.js} +4 -4
- package/dist/{slicedToArray-BWOQ_OdI.js.map → slicedToArray-DmsZvA_9.js.map} +1 -1
- package/dist/toConsumableArray-B7CFjjkW.js.map +1 -1
- package/dist/typeof-D-UKOauR.js.map +1 -1
- package/dist/unsupportedIterableToArray-Dqz8Y8_I.js.map +1 -1
- package/dist/utils/axios.js.map +1 -1
- package/dist/utils/buildNestedAttributesPayload.js +2 -3
- package/dist/utils/buildNestedAttributesPayload.js.map +1 -1
- package/dist/utils/captureAnalyticsEvent.js +1 -2
- package/dist/utils/captureAnalyticsEvent.js.map +1 -1
- package/dist/utils/captureAnalyticsPageView.js +3 -5
- package/dist/utils/captureAnalyticsPageView.js.map +1 -1
- package/dist/utils/createSubscription.js +3 -4
- package/dist/utils/createSubscription.js.map +1 -1
- package/dist/utils/currencyFormat.js +2 -3
- package/dist/utils/currencyFormat.js.map +1 -1
- package/dist/utils/datetime.js +1 -3
- package/dist/utils/datetime.js.map +1 -1
- package/dist/utils/dayjs.js +18 -4
- package/dist/utils/dayjs.js.map +1 -1
- package/dist/utils/general.js +6 -7
- package/dist/utils/general.js.map +1 -1
- package/dist/utils/index.js +4 -6
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/loadGoogleFonts.js.map +1 -1
- package/dist/utils/permissions.js.map +1 -1
- package/dist/utils/timezonePlugin.js +3 -4
- package/dist/utils/timezonePlugin.js.map +1 -1
- package/dist/utils/validators/slug.js.map +1 -1
- package/package.json +27 -21
- package/configs/eslint/globals.js +0 -14
- package/configs/eslint/imports/enforced.js +0 -29
- package/configs/eslint/imports/order.js +0 -65
- package/configs/eslint/index.js +0 -172
- package/configs/eslint/overrides.js +0 -26
- package/configs/eslint/promise.js +0 -8
- package/configs/eslint/react.js +0 -90
- package/configs/nanos/eslint/imports/order.js +0 -25
- package/configs/nanos/eslint/index.js +0 -28
- package/configs/nextjs/eslint/imports/order.js +0 -25
- package/configs/nextjs/eslint/index.js +0 -22
- package/dist/cjs/createClass-DtcoOmOY.js +0 -23
- package/dist/cjs/createClass-DtcoOmOY.js.map +0 -1
- package/dist/cjs/defineProperty-BB_r6qQ2.js +0 -15
- package/dist/cjs/defineProperty-BB_r6qQ2.js.map +0 -1
- package/dist/cjs/index-DDd00LFf.js.map +0 -1
- package/dist/cjs/mixpanel.cjs-DyVaCR4W.js +0 -6346
- package/dist/cjs/mixpanel.cjs-DyVaCR4W.js.map +0 -1
- package/dist/cjs/toPropertyKey-CRgrohXG.js.map +0 -1
- package/dist/createClass-BvEaZs3T.js +0 -20
- package/dist/createClass-BvEaZs3T.js.map +0 -1
- package/dist/defineProperty-DuFCEj0A.js +0 -13
- package/dist/defineProperty-DuFCEj0A.js.map +0 -1
- package/dist/index-D_s_toMy.js.map +0 -1
- package/dist/mixpanel.cjs-DTVxnNUt.js +0 -6344
- package/dist/mixpanel.cjs-DTVxnNUt.js.map +0 -1
- package/dist/toPropertyKey-C6Y0u0Sf.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDebounce.js","sources":["../../../src/react-utils/useDebounce/useDebounce.js"],"sourcesContent":["import { useState, useEffect } from \"react\";\n\nconst useDebounce = (value, delay = 350) => {\n const [debouncedValue, setDebouncedValue] = useState(value);\n\n useEffect(() => {\n const handler = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n\n return () => {\n clearTimeout(handler);\n };\n }, [value]);\n\n return debouncedValue;\n};\n\nexport default useDebounce;\n"],"names":["useDebounce","value","delay","arguments","length","undefined","_useState","useState","_useState2","_slicedToArray","debouncedValue","setDebouncedValue","useEffect","handler","setTimeout","clearTimeout"],"mappings":";;;;AAEA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAIC,KAAK,EAAkB;AAAA,EAAA,IAAhBC,KAAK,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,GAAG
|
|
1
|
+
{"version":3,"file":"useDebounce.js","sources":["../../../src/react-utils/useDebounce/useDebounce.js"],"sourcesContent":["import { useState, useEffect } from \"react\";\n\nconst useDebounce = (value, delay = 350) => {\n const [debouncedValue, setDebouncedValue] = useState(value);\n\n useEffect(() => {\n const handler = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n\n return () => {\n clearTimeout(handler);\n };\n }, [value]);\n\n return debouncedValue;\n};\n\nexport default useDebounce;\n"],"names":["useDebounce","value","delay","arguments","length","undefined","_useState","useState","_useState2","_slicedToArray","debouncedValue","setDebouncedValue","useEffect","handler","setTimeout","clearTimeout"],"mappings":";;;;AAEA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAIC,KAAK,EAAkB;AAAA,EAAA,IAAhBC,KAAK,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,GAAG;AACrC,EAAA,IAAAG,SAAA,GAA4CC,QAAQ,CAACN,KAAK,CAAC;IAAAO,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAApDI,IAAAA,cAAc,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,iBAAiB,GAAAH,UAAA,CAAA,CAAA,CAAA;AAExCI,EAAAA,SAAS,CAAC,YAAM;AACd,IAAA,IAAMC,OAAO,GAAGC,UAAU,CAAC,YAAM;MAC/BH,iBAAiB,CAACV,KAAK,CAAC;KACzB,EAAEC,KAAK,CAAC;AAET,IAAA,OAAO,YAAM;MACXa,YAAY,CAACF,OAAO,CAAC;KACtB;AACH,GAAC,EAAE,CAACZ,KAAK,CAAC,CAAC;AAEX,EAAA,OAAOS,cAAc;AACvB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDisplayErrorPage.js","sources":["../../../src/react-utils/useDisplayErrorPage/useDisplayErrorPage.js"],"sourcesContent":["import { prop } from \"ramda\";\nimport { create } from \"zustand\";\n\nconst useDisplayErrorPage = () => useErrorDisplayStore(prop(\"showErrorPage\"));\n\nexport const useErrorDisplayStore = create(() => ({\n showErrorPage: false,\n statusCode: 404,\n failedApiUrl: \"\",\n failedApiPath: \"\",\n showRefreshRibbon: false,\n}));\n\nexport default useDisplayErrorPage;\n"],"names":["useDisplayErrorPage","useErrorDisplayStore","prop","create","showErrorPage","statusCode","failedApiUrl","failedApiPath","showRefreshRibbon"],"mappings":";;;AAGA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAmBA,GAAA;AAAA,EAAA,OAASC,oBAAoB,CAACC,IAAI,CAAC,eAAe,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"useDisplayErrorPage.js","sources":["../../../src/react-utils/useDisplayErrorPage/useDisplayErrorPage.js"],"sourcesContent":["import { prop } from \"ramda\";\nimport { create } from \"zustand\";\n\nconst useDisplayErrorPage = () => useErrorDisplayStore(prop(\"showErrorPage\"));\n\nexport const useErrorDisplayStore = create(() => ({\n showErrorPage: false,\n statusCode: 404,\n failedApiUrl: \"\",\n failedApiPath: \"\",\n showRefreshRibbon: false,\n}));\n\nexport default useDisplayErrorPage;\n"],"names":["useDisplayErrorPage","useErrorDisplayStore","prop","create","showErrorPage","statusCode","failedApiUrl","failedApiPath","showRefreshRibbon"],"mappings":";;;AAGA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAmBA,GAAA;AAAA,EAAA,OAASC,oBAAoB,CAACC,IAAI,CAAC,eAAe,CAAC,CAAC;AAAA;AAEhED,IAAAA,oBAAoB,GAAGE,MAAM,CAAC,YAAA;EAAA,OAAO;AAChDC,IAAAA,aAAa,EAAE,KAAK;AACpBC,IAAAA,UAAU,EAAE,GAAG;AACfC,IAAAA,YAAY,EAAE,EAAE;AAChBC,IAAAA,aAAa,EAAE,EAAE;AACjBC,IAAAA,iBAAiB,EAAE;GACpB;AAAA,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"neeto_apps.js","sources":["../../../../src/react-utils/useFetchNeetoApps/apis/neeto_apps.js"],"sourcesContent":["import axios from \"axios\";\n\nconst fetch = () => axios.get(\"/api/v1/neeto_apps\");\n\nconst neetoAppsApi = { fetch };\n\nexport default neetoAppsApi;\n"],"names":["fetch","axios","get","neetoAppsApi"],"mappings":";;AAEA,IAAMA,KAAK,GAAG,SAARA,KAAKA,GAAA;AAAA,EAAA,OAASC,KAAK,CAACC,GAAG,CAAC,oBAAoB,CAAC
|
|
1
|
+
{"version":3,"file":"neeto_apps.js","sources":["../../../../src/react-utils/useFetchNeetoApps/apis/neeto_apps.js"],"sourcesContent":["import axios from \"axios\";\n\nconst fetch = () => axios.get(\"/api/v1/neeto_apps\");\n\nconst neetoAppsApi = { fetch };\n\nexport default neetoAppsApi;\n"],"names":["fetch","axios","get","neetoAppsApi"],"mappings":";;AAEA,IAAMA,KAAK,GAAG,SAARA,KAAKA,GAAA;AAAA,EAAA,OAASC,KAAK,CAACC,GAAG,CAAC,oBAAoB,CAAC;AAAA,CAAA;AAEnD,IAAMC,YAAY,GAAG;AAAEH,EAAAA,KAAK,EAALA;AAAM;;;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { default } from './useFetchNeetoApps.js';
|
|
2
|
-
import '../../defineProperty-
|
|
3
|
-
import '../../toPropertyKey-C6Y0u0Sf.js';
|
|
2
|
+
import '../../defineProperty-CrCYjjU3.js';
|
|
4
3
|
import '../../typeof-D-UKOauR.js';
|
|
5
4
|
import '@bigbinary/neeto-cist';
|
|
6
5
|
import '../usePersistedQuery/usePersistedQuery.js';
|
|
@@ -10,9 +9,9 @@ import 'ramda';
|
|
|
10
9
|
import '../constants/constants.js';
|
|
11
10
|
import '../../utils/general.js';
|
|
12
11
|
import '../../objectWithoutProperties-DN7d1SzH.js';
|
|
13
|
-
import '../../slicedToArray-
|
|
12
|
+
import '../../slicedToArray-DmsZvA_9.js';
|
|
14
13
|
import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
|
|
15
|
-
import '../../index-
|
|
14
|
+
import '../../index-COfUw8MU.js';
|
|
16
15
|
import '../../_commonjsHelpers-B85MJLTf.js';
|
|
17
16
|
import 'i18next';
|
|
18
17
|
import '@bigbinary/neetoui/Toastr';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { _ as _defineProperty } from '../../defineProperty-
|
|
1
|
+
import { _ as _defineProperty } from '../../defineProperty-CrCYjjU3.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';
|
|
8
7
|
import '../../typeof-D-UKOauR.js';
|
|
9
8
|
import 'react';
|
|
10
9
|
import '@tanstack/react-query';
|
|
11
10
|
import 'ramda';
|
|
12
11
|
import '../../utils/general.js';
|
|
13
12
|
import '../../objectWithoutProperties-DN7d1SzH.js';
|
|
14
|
-
import '../../slicedToArray-
|
|
13
|
+
import '../../slicedToArray-DmsZvA_9.js';
|
|
15
14
|
import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
|
|
16
|
-
import '../../index-
|
|
15
|
+
import '../../index-COfUw8MU.js';
|
|
17
16
|
import '../../_commonjsHelpers-B85MJLTf.js';
|
|
18
17
|
import 'i18next';
|
|
19
18
|
import '@bigbinary/neetoui/Toastr';
|
|
@@ -21,7 +20,7 @@ import 'qs';
|
|
|
21
20
|
import 'axios';
|
|
22
21
|
|
|
23
22
|
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; }
|
|
24
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t),
|
|
23
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25
24
|
var useFetchNeetoApps = function useFetchNeetoApps(options) {
|
|
26
25
|
var _globalProps$user;
|
|
27
26
|
var scopedQueryKey = ["".concat(QUERY_KEYS.NEETO_APPS_LIST, "-").concat((_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.id)];
|
|
@@ -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":"
|
|
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;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,MAAAA,GAAAA,MAAAA,GAAAA,iBAAA,CAAkBO,EAAE,CACtD,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;EACxB,IAAMC,OAAO,GAAGD,UAAU,IAAIE,IAAI,CAACC,GAAG,EAAE,GAAGC,0BAA0B;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;GAClCZ,EAAAA,OAAO,CACX,CAAC;AACJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFieldSubmit.js","sources":["../../../src/react-utils/useFieldSubmit/useFieldSubmit.js"],"sourcesContent":["import { useCallback, useEffect, useRef } from \"react\";\n\nconst useFieldSubmit = onSubmit => {\n /** @type {{ current: HTMLInputElement & HTMLTextAreaElement }} */\n // @ts-ignore\n const ref = useRef(null);\n\n const keyDownHandler = useCallback(event => {\n if (event.key !== \"Enter\") return;\n\n if (event.shiftKey) {\n event.stopPropagation();\n } else {\n onSubmit();\n event.preventDefault();\n }\n }, []);\n\n useEffect(() => {\n const element = ref.current;\n if (!element) return undefined;\n\n element.addEventListener(\"keydown\", keyDownHandler);\n\n return () => element.removeEventListener(\"keydown\", keyDownHandler);\n }, []);\n\n return ref;\n};\n\nexport default useFieldSubmit;\n"],"names":["useFieldSubmit","onSubmit","ref","useRef","keyDownHandler","useCallback","event","key","shiftKey","stopPropagation","preventDefault","useEffect","element","current","undefined","addEventListener","removeEventListener"],"mappings":";;AAEA,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAGC,QAAQ,EAAI;AACjC;AACA;AACA,EAAA,IAAMC,GAAG,GAAGC,MAAM,CAAC,IAAI,CAAC
|
|
1
|
+
{"version":3,"file":"useFieldSubmit.js","sources":["../../../src/react-utils/useFieldSubmit/useFieldSubmit.js"],"sourcesContent":["import { useCallback, useEffect, useRef } from \"react\";\n\nconst useFieldSubmit = onSubmit => {\n /** @type {{ current: HTMLInputElement & HTMLTextAreaElement }} */\n // @ts-ignore\n const ref = useRef(null);\n\n const keyDownHandler = useCallback(event => {\n if (event.key !== \"Enter\") return;\n\n if (event.shiftKey) {\n event.stopPropagation();\n } else {\n onSubmit();\n event.preventDefault();\n }\n }, []);\n\n useEffect(() => {\n const element = ref.current;\n if (!element) return undefined;\n\n element.addEventListener(\"keydown\", keyDownHandler);\n\n return () => element.removeEventListener(\"keydown\", keyDownHandler);\n }, []);\n\n return ref;\n};\n\nexport default useFieldSubmit;\n"],"names":["useFieldSubmit","onSubmit","ref","useRef","keyDownHandler","useCallback","event","key","shiftKey","stopPropagation","preventDefault","useEffect","element","current","undefined","addEventListener","removeEventListener"],"mappings":";;AAEA,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAGC,QAAQ,EAAI;AACjC;AACA;AACA,EAAA,IAAMC,GAAG,GAAGC,MAAM,CAAC,IAAI,CAAC;AAExB,EAAA,IAAMC,cAAc,GAAGC,WAAW,CAAC,UAAAC,KAAK,EAAI;AAC1C,IAAA,IAAIA,KAAK,CAACC,GAAG,KAAK,OAAO,EAAE;IAE3B,IAAID,KAAK,CAACE,QAAQ,EAAE;MAClBF,KAAK,CAACG,eAAe,EAAE;AACzB,KAAC,MAAM;AACLR,MAAAA,QAAQ,EAAE;MACVK,KAAK,CAACI,cAAc,EAAE;AACxB;GACD,EAAE,EAAE,CAAC;AAENC,EAAAA,SAAS,CAAC,YAAM;AACd,IAAA,IAAMC,OAAO,GAAGV,GAAG,CAACW,OAAO;AAC3B,IAAA,IAAI,CAACD,OAAO,EAAE,OAAOE,SAAS;AAE9BF,IAAAA,OAAO,CAACG,gBAAgB,CAAC,SAAS,EAAEX,cAAc,CAAC;IAEnD,OAAO,YAAA;AAAA,MAAA,OAAMQ,OAAO,CAACI,mBAAmB,CAAC,SAAS,EAAEZ,cAAc,CAAC;AAAA,KAAA;GACpE,EAAE,EAAE,CAAC;AAEN,EAAA,OAAOF,GAAG;AACZ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFuncDebounce.js","sources":["../../../src/react-utils/useFuncDebounce/useFuncDebounce.js"],"sourcesContent":["import { useRef } from \"react\";\n\nconst useFuncDebounce = (func, delay = 350) => {\n const timer = useRef(null);\n const debouncedFunc = (...args) => {\n clearTimeout(timer.current);\n timer.current = setTimeout(() => func(...args), delay);\n };\n debouncedFunc.cancel = () => clearTimeout(timer.current);\n\n return debouncedFunc;\n};\n\nexport default useFuncDebounce;\n"],"names":["useFuncDebounce","func","delay","arguments","length","undefined","timer","useRef","debouncedFunc","_len","args","Array","_key","clearTimeout","current","setTimeout","apply","cancel"],"mappings":";;AAEA,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,IAAI,EAAkB;AAAA,EAAA,IAAhBC,KAAK,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,GAAG
|
|
1
|
+
{"version":3,"file":"useFuncDebounce.js","sources":["../../../src/react-utils/useFuncDebounce/useFuncDebounce.js"],"sourcesContent":["import { useRef } from \"react\";\n\nconst useFuncDebounce = (func, delay = 350) => {\n const timer = useRef(null);\n const debouncedFunc = (...args) => {\n clearTimeout(timer.current);\n timer.current = setTimeout(() => func(...args), delay);\n };\n debouncedFunc.cancel = () => clearTimeout(timer.current);\n\n return debouncedFunc;\n};\n\nexport default useFuncDebounce;\n"],"names":["useFuncDebounce","func","delay","arguments","length","undefined","timer","useRef","debouncedFunc","_len","args","Array","_key","clearTimeout","current","setTimeout","apply","cancel"],"mappings":";;AAEA,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,IAAI,EAAkB;AAAA,EAAA,IAAhBC,KAAK,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,GAAG;AACxC,EAAA,IAAMG,KAAK,GAAGC,MAAM,CAAC,IAAI,CAAC;AAC1B,EAAA,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,GAAgB;AAAA,IAAA,KAAA,IAAAC,IAAA,GAAAN,SAAA,CAAAC,MAAA,EAATM,IAAI,GAAAC,IAAAA,KAAA,CAAAF,IAAA,GAAAG,IAAA,GAAA,CAAA,EAAAA,IAAA,GAAAH,IAAA,EAAAG,IAAA,EAAA,EAAA;AAAJF,MAAAA,IAAI,CAAAE,IAAA,CAAAT,GAAAA,SAAA,CAAAS,IAAA,CAAA;AAAA;AAC5BC,IAAAA,YAAY,CAACP,KAAK,CAACQ,OAAO,CAAC;AAC3BR,IAAAA,KAAK,CAACQ,OAAO,GAAGC,UAAU,CAAC,YAAA;AAAA,MAAA,OAAMd,IAAI,CAAAe,KAAA,CAAA,MAAA,EAAIN,IAAI,CAAC;AAAA,KAAA,EAAER,KAAK,CAAC;GACvD;EACDM,aAAa,CAACS,MAAM,GAAG,YAAA;AAAA,IAAA,OAAMJ,YAAY,CAACP,KAAK,CAACQ,OAAO,CAAC;AAAA,GAAA;AAExD,EAAA,OAAON,aAAa;AACtB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useForceUpdate.js","sources":["../../../src/react-utils/useIsElementVisibleInDom/useForceUpdate.js"],"sourcesContent":["import { useState } from \"react\";\n\nconst useForceUpdate = () => {\n // eslint-disable-next-line react/hook-use-state\n const [, setValue] = useState(0);\n\n return () => setValue(value => value + 1);\n};\n\nexport default useForceUpdate;\n"],"names":["useForceUpdate","_useState","useState","_useState2","_slicedToArray","setValue","value"],"mappings":";;;;AAEA,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,GAAS;AAC3B;AACA,EAAA,IAAAC,SAAA,GAAqBC,QAAQ,CAAC,CAAC,CAAC;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAvBI,IAAAA,QAAQ,GAAAF,UAAA,CAAA,CAAA,CAAA
|
|
1
|
+
{"version":3,"file":"useForceUpdate.js","sources":["../../../src/react-utils/useIsElementVisibleInDom/useForceUpdate.js"],"sourcesContent":["import { useState } from \"react\";\n\nconst useForceUpdate = () => {\n // eslint-disable-next-line react/hook-use-state\n const [, setValue] = useState(0);\n\n return () => setValue(value => value + 1);\n};\n\nexport default useForceUpdate;\n"],"names":["useForceUpdate","_useState","useState","_useState2","_slicedToArray","setValue","value"],"mappings":";;;;AAEA,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,GAAS;AAC3B;AACA,EAAA,IAAAC,SAAA,GAAqBC,QAAQ,CAAC,CAAC,CAAC;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAvBI,IAAAA,QAAQ,GAAAF,UAAA,CAAA,CAAA,CAAA;EAEjB,OAAO,YAAA;IAAA,OAAME,QAAQ,CAAC,UAAAC,KAAK,EAAA;MAAA,OAAIA,KAAK,GAAG,CAAC;KAAC,CAAA;AAAA,GAAA;AAC3C;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as _slicedToArray } from '../../slicedToArray-
|
|
1
|
+
import { _ as _slicedToArray } from '../../slicedToArray-DmsZvA_9.js';
|
|
2
2
|
import { useState, useEffect } from 'react';
|
|
3
3
|
import useForceUpdate from './useForceUpdate.js';
|
|
4
4
|
import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsElementVisibleInDom.js","sources":["../../../src/react-utils/useIsElementVisibleInDom/useIsElementVisibleInDom.js"],"sourcesContent":["import { useEffect, useState } from \"react\";\n\nimport useForceUpdate from \"./useForceUpdate\";\n\nconst useIsElementVisibleInDom = (target, options = undefined) => {\n const [isIntersecting, setIsIntersecting] = useState(false);\n const forceUpdate = useForceUpdate();\n\n useEffect(() => {\n if (!target) return forceUpdate();\n\n const observer = new IntersectionObserver(\n ([entry]) => setIsIntersecting(entry.isIntersecting),\n options\n );\n observer.observe(target);\n\n return () => observer.unobserve(target);\n }, [target, options]);\n\n return isIntersecting;\n};\n\nexport default useIsElementVisibleInDom;\n"],"names":["useIsElementVisibleInDom","target","options","arguments","length","undefined","_useState","useState","_useState2","_slicedToArray","isIntersecting","setIsIntersecting","forceUpdate","useForceUpdate","useEffect","observer","IntersectionObserver","_ref","_ref2","entry","observe","unobserve"],"mappings":";;;;;AAIA,IAAMA,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAIC,MAAM,EAA0B;AAAA,EAAA,IAAxBC,OAAO,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAGE,SAAS
|
|
1
|
+
{"version":3,"file":"useIsElementVisibleInDom.js","sources":["../../../src/react-utils/useIsElementVisibleInDom/useIsElementVisibleInDom.js"],"sourcesContent":["import { useEffect, useState } from \"react\";\n\nimport useForceUpdate from \"./useForceUpdate\";\n\nconst useIsElementVisibleInDom = (target, options = undefined) => {\n const [isIntersecting, setIsIntersecting] = useState(false);\n const forceUpdate = useForceUpdate();\n\n useEffect(() => {\n if (!target) return forceUpdate();\n\n const observer = new IntersectionObserver(\n ([entry]) => setIsIntersecting(entry.isIntersecting),\n options\n );\n observer.observe(target);\n\n return () => observer.unobserve(target);\n }, [target, options]);\n\n return isIntersecting;\n};\n\nexport default useIsElementVisibleInDom;\n"],"names":["useIsElementVisibleInDom","target","options","arguments","length","undefined","_useState","useState","_useState2","_slicedToArray","isIntersecting","setIsIntersecting","forceUpdate","useForceUpdate","useEffect","observer","IntersectionObserver","_ref","_ref2","entry","observe","unobserve"],"mappings":";;;;;AAIA,IAAMA,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAIC,MAAM,EAA0B;AAAA,EAAA,IAAxBC,OAAO,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAGE,SAAS;AAC3D,EAAA,IAAAC,SAAA,GAA4CC,QAAQ,CAAC,KAAK,CAAC;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAApDI,IAAAA,cAAc,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,iBAAiB,GAAAH,UAAA,CAAA,CAAA,CAAA;AACxC,EAAA,IAAMI,WAAW,GAAGC,cAAc,EAAE;AAEpCC,EAAAA,SAAS,CAAC,YAAM;AACd,IAAA,IAAI,CAACb,MAAM,EAAE,OAAOW,WAAW,EAAE;AAEjC,IAAA,IAAMG,QAAQ,GAAG,IAAIC,oBAAoB,CACvC,UAAAC,IAAA,EAAA;AAAA,MAAA,IAAAC,KAAA,GAAAT,cAAA,CAAAQ,IAAA,EAAA,CAAA,CAAA;AAAEE,QAAAA,KAAK,GAAAD,KAAA,CAAA,CAAA,CAAA;AAAA,MAAA,OAAMP,iBAAiB,CAACQ,KAAK,CAACT,cAAc,CAAC;AAAA,KAAA,EACpDR,OACF,CAAC;AACDa,IAAAA,QAAQ,CAACK,OAAO,CAACnB,MAAM,CAAC;IAExB,OAAO,YAAA;AAAA,MAAA,OAAMc,QAAQ,CAACM,SAAS,CAACpB,MAAM,CAAC;AAAA,KAAA;AACzC,GAAC,EAAE,CAACA,MAAM,EAAEC,OAAO,CAAC,CAAC;AAErB,EAAA,OAAOQ,cAAc;AACvB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useKeyboardShortcutsPaneState.js","sources":["../../../src/react-utils/useKeyboardShortcutsPaneState/useKeyboardShortcutsPaneState.js"],"sourcesContent":["import { create } from \"zustand\";\nimport { shallow } from \"zustand/shallow\";\n\nconst useKeyboardShortcutsStore = create(set => ({\n isOpen: false,\n\n setIsOpen: arg => {\n if (typeof arg === \"function\") {\n set(state => ({ isOpen: arg(state.isOpen) }));\n } else {\n set({ isOpen: arg });\n }\n },\n}));\n\nconst useKeyboardShortcutsPaneState = () =>\n useKeyboardShortcutsStore(\n ({ isOpen, setIsOpen }) => [isOpen, setIsOpen],\n shallow\n );\n\nexport default useKeyboardShortcutsPaneState;\n"],"names":["useKeyboardShortcutsStore","create","set","isOpen","setIsOpen","arg","state","useKeyboardShortcutsPaneState","_ref","shallow"],"mappings":";;;AAGA,IAAMA,yBAAyB,GAAGC,MAAM,CAAC,UAAAC,GAAG,EAAA;EAAA,OAAK;AAC/CC,IAAAA,MAAM,EAAE,KAAK;AAEbC,IAAAA,SAAS,EAAE,SAAXA,SAASA,CAAEC,GAAG,EAAI;AAChB,MAAA,IAAI,OAAOA,GAAG,KAAK,UAAU,EAAE;QAC7BH,GAAG,CAAC,UAAAI,KAAK,EAAA;UAAA,OAAK;AAAEH,YAAAA,MAAM,EAAEE,GAAG,CAACC,KAAK,CAACH,MAAM
|
|
1
|
+
{"version":3,"file":"useKeyboardShortcutsPaneState.js","sources":["../../../src/react-utils/useKeyboardShortcutsPaneState/useKeyboardShortcutsPaneState.js"],"sourcesContent":["import { create } from \"zustand\";\nimport { shallow } from \"zustand/shallow\";\n\nconst useKeyboardShortcutsStore = create(set => ({\n isOpen: false,\n\n setIsOpen: arg => {\n if (typeof arg === \"function\") {\n set(state => ({ isOpen: arg(state.isOpen) }));\n } else {\n set({ isOpen: arg });\n }\n },\n}));\n\nconst useKeyboardShortcutsPaneState = () =>\n useKeyboardShortcutsStore(\n ({ isOpen, setIsOpen }) => [isOpen, setIsOpen],\n shallow\n );\n\nexport default useKeyboardShortcutsPaneState;\n"],"names":["useKeyboardShortcutsStore","create","set","isOpen","setIsOpen","arg","state","useKeyboardShortcutsPaneState","_ref","shallow"],"mappings":";;;AAGA,IAAMA,yBAAyB,GAAGC,MAAM,CAAC,UAAAC,GAAG,EAAA;EAAA,OAAK;AAC/CC,IAAAA,MAAM,EAAE,KAAK;AAEbC,IAAAA,SAAS,EAAE,SAAXA,SAASA,CAAEC,GAAG,EAAI;AAChB,MAAA,IAAI,OAAOA,GAAG,KAAK,UAAU,EAAE;QAC7BH,GAAG,CAAC,UAAAI,KAAK,EAAA;UAAA,OAAK;AAAEH,YAAAA,MAAM,EAAEE,GAAG,CAACC,KAAK,CAACH,MAAM;WAAG;AAAA,SAAC,CAAC;AAC/C,OAAC,MAAM;AACLD,QAAAA,GAAG,CAAC;AAAEC,UAAAA,MAAM,EAAEE;AAAI,SAAC,CAAC;AACtB;AACF;GACD;AAAA,CAAC,CAAC;AAEH,IAAME,6BAA6B,GAAG,SAAhCA,6BAA6BA,GAAA;EAAA,OACjCP,yBAAyB,CACvB,UAAAQ,IAAA,EAAA;AAAA,IAAA,IAAGL,MAAM,GAAAK,IAAA,CAANL,MAAM;MAAEC,SAAS,GAAAI,IAAA,CAATJ,SAAS;AAAA,IAAA,OAAO,CAACD,MAAM,EAAEC,SAAS,CAAC;AAAA,GAAA,EAC9CK,OACF,CAAC;AAAA;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default } from './useLocalStorage.js';
|
|
2
|
-
import '../../slicedToArray-
|
|
2
|
+
import '../../slicedToArray-DmsZvA_9.js';
|
|
3
3
|
import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'ramda';
|
|
@@ -7,10 +7,9 @@ import 'axios';
|
|
|
7
7
|
import '../../initializers/constants.js';
|
|
8
8
|
import '../../utils/general.js';
|
|
9
9
|
import '../../objectWithoutProperties-DN7d1SzH.js';
|
|
10
|
-
import '../../index-
|
|
10
|
+
import '../../index-COfUw8MU.js';
|
|
11
11
|
import '../../_commonjsHelpers-B85MJLTf.js';
|
|
12
|
-
import '../../defineProperty-
|
|
13
|
-
import '../../toPropertyKey-C6Y0u0Sf.js';
|
|
12
|
+
import '../../defineProperty-CrCYjjU3.js';
|
|
14
13
|
import '../../typeof-D-UKOauR.js';
|
|
15
14
|
import 'i18next';
|
|
16
15
|
import '@bigbinary/neeto-cist';
|
|
@@ -18,10 +17,9 @@ import '@bigbinary/neetoui/Toastr';
|
|
|
18
17
|
import 'qs';
|
|
19
18
|
import '../../utils/dayjs.js';
|
|
20
19
|
import '../../toConsumableArray-B7CFjjkW.js';
|
|
21
|
-
import '../../createClass-BvEaZs3T.js';
|
|
22
20
|
import 'dayjs';
|
|
23
21
|
import '../../utils/createSubscription.js';
|
|
24
22
|
import '@rails/actioncable';
|
|
25
23
|
import 'yup';
|
|
26
|
-
import '../../mixpanel.
|
|
24
|
+
import '../../mixpanel.module-Bu2zrBMQ.js';
|
|
27
25
|
//# 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,4 +1,4 @@
|
|
|
1
|
-
import { _ as _slicedToArray } from '../../slicedToArray-
|
|
1
|
+
import { _ as _slicedToArray } from '../../slicedToArray-DmsZvA_9.js';
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { isNil } from 'ramda';
|
|
4
4
|
import 'axios';
|
|
@@ -9,19 +9,17 @@ import '../../utils/createSubscription.js';
|
|
|
9
9
|
import 'dayjs';
|
|
10
10
|
import 'i18next';
|
|
11
11
|
import 'yup';
|
|
12
|
-
import '../../mixpanel.
|
|
12
|
+
import '../../mixpanel.module-Bu2zrBMQ.js';
|
|
13
13
|
import '@bigbinary/neeto-cist';
|
|
14
14
|
import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
|
|
15
15
|
import '../../objectWithoutProperties-DN7d1SzH.js';
|
|
16
|
-
import '../../index-
|
|
16
|
+
import '../../index-COfUw8MU.js';
|
|
17
17
|
import '../../_commonjsHelpers-B85MJLTf.js';
|
|
18
|
-
import '../../defineProperty-
|
|
19
|
-
import '../../toPropertyKey-C6Y0u0Sf.js';
|
|
18
|
+
import '../../defineProperty-CrCYjjU3.js';
|
|
20
19
|
import '../../typeof-D-UKOauR.js';
|
|
21
20
|
import '@bigbinary/neetoui/Toastr';
|
|
22
21
|
import 'qs';
|
|
23
22
|
import '../../toConsumableArray-B7CFjjkW.js';
|
|
24
|
-
import '../../createClass-BvEaZs3T.js';
|
|
25
23
|
import '@rails/actioncable';
|
|
26
24
|
|
|
27
25
|
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":"
|
|
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;IAE7C,OAAOE,WAAW,GAAGG,IAAI,CAACC,KAAK,CAACJ,WAAW,CAAC,GAAGD,YAAY;GAC5D,CAAC,OAAOM,KAAK,EAAE;AACdC,IAAAA,MAAM,CAACD,KAAK,CAACA,KAAK,CAAC;AAEnB,IAAA,OAAON,YAAY;AACrB;AACF,CAAC;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;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;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;AAE9D,MAAA,IAAIG,KAAK,CAACD,QAAQ,CAAC,EAAE;QACnBE,sBAAsB,CAACpB,GAAG,CAAC;AAC7B,OAAC,MAAM;AACLqB,QAAAA,iBAAiB,CAACrB,GAAG,EAAEkB,QAAQ,CAAC;AAClC;AAEA,MAAA,OAAOA,QAAQ;AACjB,KAAC,CAAC;AAAA,GAAA;AAEJ,EAAA,OAAO,CAAChB,WAAW,EAAEa,QAAQ,CAAC;AAChC;;;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { default } from './useMutationWithInvalidation.js';
|
|
2
|
-
import '../../defineProperty-
|
|
3
|
-
import '../../toPropertyKey-C6Y0u0Sf.js';
|
|
2
|
+
import '../../defineProperty-CrCYjjU3.js';
|
|
4
3
|
import '../../typeof-D-UKOauR.js';
|
|
5
4
|
import '../../objectWithoutProperties-DN7d1SzH.js';
|
|
6
5
|
import '@tanstack/react-query';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { _ as _defineProperty } from '../../defineProperty-
|
|
1
|
+
import { _ as _defineProperty } from '../../defineProperty-CrCYjjU3.js';
|
|
2
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';
|
|
6
5
|
import '../../typeof-D-UKOauR.js';
|
|
7
6
|
|
|
8
7
|
var _excluded = ["keysToInvalidate"],
|
|
9
8
|
_excluded2 = ["onSuccess"];
|
|
10
9
|
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; }
|
|
11
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t),
|
|
10
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
11
|
var useMutationWithInvalidation = function useMutationWithInvalidation(mutationFn, _ref) {
|
|
13
12
|
var keysToInvalidate = _ref.keysToInvalidate,
|
|
14
13
|
options = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -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":"
|
|
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;AAE9B,EAAA,IAAMC,WAAW,GAAGC,cAAc,EAAE;AACpC,EAAA,IAAQC,UAAS,GAAsBL,OAAO,CAAtCK,SAAS;AAAKC,IAAAA,YAAY,GAAAL,wBAAA,CAAKD,OAAO,EAAAO,UAAA,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;AAEhE,QAAA,IAAIE,IAAI,CAACD,MAAM,CAAC,KAAK,QAAQ,EAAE;AAC7BZ,UAAAA,WAAW,CAACc,iBAAiB,CAACF,MAAM,CAAC;SACtC,MAAM,IAAIC,IAAI,CAACD,MAAM,CAAC,KAAK,QAAQ,EAAE;UACpCZ,WAAW,CAACc,iBAAiB,CAAC;YAAEC,QAAQ,EAAE,CAACH,MAAM;AAAE,WAAC,CAAC;AACvD,SAAC,MAAM;UACLZ,WAAW,CAACc,iBAAiB,CAAC;AAAEC,YAAAA,QAAQ,EAAEH;AAAO,WAAC,CAAC;AACrD;AACF,OAAC,CAAC;MAEFV,UAAS,KAAA,IAAA,IAATA,UAAS,KAAA,MAAA,IAATA,UAAS,CAAGK,IAAI,EAAEC,SAAS,EAAEC,OAAO,CAAC;AACvC;GAEGN,EAAAA,YAAY,CAChB,CAAC;AACJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOnClickOutside.js","sources":["../../../src/react-utils/useOnClickOutside/useOnClickOutside.js"],"sourcesContent":["import { useEffect } from \"react\";\n\nconst useOnClickOutside = (ref, handler, { enabled = true } = {}) => {\n useEffect(() => {\n const listener = event => {\n // Do nothing if clicking ref's element or descendent elements\n if (!ref.current || ref.current.contains(event.target)) {\n return;\n }\n handler(event);\n };\n\n if (enabled) {\n document.addEventListener(\"mousedown\", listener);\n document.addEventListener(\"touchstart\", listener);\n }\n\n return () => {\n document.removeEventListener(\"mousedown\", listener);\n document.removeEventListener(\"touchstart\", listener);\n };\n }, [handler, enabled]);\n};\n\nexport default useOnClickOutside;\n"],"names":["useOnClickOutside","ref","handler","_ref","arguments","length","undefined","_ref$enabled","enabled","useEffect","listener","event","current","contains","target","document","addEventListener","removeEventListener"],"mappings":";;AAEMA,IAAAA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAIC,GAAG,EAAEC,OAAO,EAA8B;AAAA,EAAA,IAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAP,EAAE;IAAAG,YAAA,GAAAJ,IAAA,CAArBK,OAAO;AAAPA,IAAAA,OAAO,GAAAD,YAAA,KAAG,
|
|
1
|
+
{"version":3,"file":"useOnClickOutside.js","sources":["../../../src/react-utils/useOnClickOutside/useOnClickOutside.js"],"sourcesContent":["import { useEffect } from \"react\";\n\nconst useOnClickOutside = (ref, handler, { enabled = true } = {}) => {\n useEffect(() => {\n const listener = event => {\n // Do nothing if clicking ref's element or descendent elements\n if (!ref.current || ref.current.contains(event.target)) {\n return;\n }\n handler(event);\n };\n\n if (enabled) {\n document.addEventListener(\"mousedown\", listener);\n document.addEventListener(\"touchstart\", listener);\n }\n\n return () => {\n document.removeEventListener(\"mousedown\", listener);\n document.removeEventListener(\"touchstart\", listener);\n };\n }, [handler, enabled]);\n};\n\nexport default useOnClickOutside;\n"],"names":["useOnClickOutside","ref","handler","_ref","arguments","length","undefined","_ref$enabled","enabled","useEffect","listener","event","current","contains","target","document","addEventListener","removeEventListener"],"mappings":";;AAEMA,IAAAA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAIC,GAAG,EAAEC,OAAO,EAA8B;AAAA,EAAA,IAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAP,EAAE;IAAAG,YAAA,GAAAJ,IAAA,CAArBK,OAAO;AAAPA,IAAAA,OAAO,GAAAD,YAAA,KAAG,MAAA,GAAA,IAAI,GAAAA,YAAA;AACvDE,EAAAA,SAAS,CAAC,YAAM;AACd,IAAA,IAAMC,QAAQ,GAAG,SAAXA,QAAQA,CAAGC,KAAK,EAAI;AACxB;AACA,MAAA,IAAI,CAACV,GAAG,CAACW,OAAO,IAAIX,GAAG,CAACW,OAAO,CAACC,QAAQ,CAACF,KAAK,CAACG,MAAM,CAAC,EAAE;AACtD,QAAA;AACF;MACAZ,OAAO,CAACS,KAAK,CAAC;KACf;AAED,IAAA,IAAIH,OAAO,EAAE;AACXO,MAAAA,QAAQ,CAACC,gBAAgB,CAAC,WAAW,EAAEN,QAAQ,CAAC;AAChDK,MAAAA,QAAQ,CAACC,gBAAgB,CAAC,YAAY,EAAEN,QAAQ,CAAC;AACnD;AAEA,IAAA,OAAO,YAAM;AACXK,MAAAA,QAAQ,CAACE,mBAAmB,CAAC,WAAW,EAAEP,QAAQ,CAAC;AACnDK,MAAAA,QAAQ,CAACE,mBAAmB,CAAC,YAAY,EAAEP,QAAQ,CAAC;KACrD;AACH,GAAC,EAAE,CAACR,OAAO,EAAEM,OAAO,CAAC,CAAC;AACxB;;;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { default } from './usePersistedQuery.js';
|
|
2
|
-
import '../../defineProperty-
|
|
3
|
-
import '../../toPropertyKey-C6Y0u0Sf.js';
|
|
2
|
+
import '../../defineProperty-CrCYjjU3.js';
|
|
4
3
|
import '../../typeof-D-UKOauR.js';
|
|
5
4
|
import 'react';
|
|
6
5
|
import '@tanstack/react-query';
|
|
@@ -8,9 +7,9 @@ import 'ramda';
|
|
|
8
7
|
import '../constants/constants.js';
|
|
9
8
|
import '../../utils/general.js';
|
|
10
9
|
import '../../objectWithoutProperties-DN7d1SzH.js';
|
|
11
|
-
import '../../slicedToArray-
|
|
10
|
+
import '../../slicedToArray-DmsZvA_9.js';
|
|
12
11
|
import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
|
|
13
|
-
import '../../index-
|
|
12
|
+
import '../../index-COfUw8MU.js';
|
|
14
13
|
import '../../_commonjsHelpers-B85MJLTf.js';
|
|
15
14
|
import 'i18next';
|
|
16
15
|
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,15 +1,14 @@
|
|
|
1
|
-
import { _ as _defineProperty } from '../../defineProperty-
|
|
1
|
+
import { _ as _defineProperty } from '../../defineProperty-CrCYjjU3.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
|
-
import {
|
|
7
|
-
import '../../toPropertyKey-C6Y0u0Sf.js';
|
|
6
|
+
import { getFromLocalStorage, setToLocalStorage } from '../../utils/general.js';
|
|
8
7
|
import '../../typeof-D-UKOauR.js';
|
|
9
8
|
import '../../objectWithoutProperties-DN7d1SzH.js';
|
|
10
|
-
import '../../slicedToArray-
|
|
9
|
+
import '../../slicedToArray-DmsZvA_9.js';
|
|
11
10
|
import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
|
|
12
|
-
import '../../index-
|
|
11
|
+
import '../../index-COfUw8MU.js';
|
|
13
12
|
import '../../_commonjsHelpers-B85MJLTf.js';
|
|
14
13
|
import 'i18next';
|
|
15
14
|
import '@bigbinary/neeto-cist';
|
|
@@ -17,7 +16,7 @@ import '@bigbinary/neetoui/Toastr';
|
|
|
17
16
|
import 'qs';
|
|
18
17
|
|
|
19
18
|
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; }
|
|
20
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t),
|
|
19
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21
20
|
var localStorageQueryCache = {
|
|
22
21
|
set: function set(key, data) {
|
|
23
22
|
var cache = localStorageQueryCache.getAll();
|
|
@@ -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":"
|
|
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;IAC7C,IAAMC,QAAQ,GAAAC,aAAA,CAAAA,aAAA,CAAQH,EAAAA,EAAAA,KAAK,CAAAI,EAAAA,EAAAA,EAAAA,eAAA,CAAGN,EAAAA,EAAAA,GAAG,EAAG;AAAEC,MAAAA,IAAI,EAAJA,IAAI;AAAEM,MAAAA,UAAU,EAAEC,IAAI,CAACC,GAAG;AAAG,KAAC,CAAE,CAAA;AACtEC,IAAAA,iBAAiB,CAACC,sBAAsB,EAAEP,QAAQ,CAAC;GACpD;AACDD,EAAAA,MAAM,EAAE,SAARA,MAAMA,GAAQ;AACZ,IAAA,IAAMD,KAAK,GAAGU,mBAAmB,CAACD,sBAAsB,CAAC;AACzD,IAAA,IAAI,CAACT,KAAK,EAAE,OAAO,EAAE;AAErB,IAAA,OAAOA,KAAK;GACb;AACDW,EAAAA,GAAG,EAAE,SAALA,GAAGA,CAAEb,GAAG,EAAA;AAAA,IAAA,OAAIF,sBAAsB,CAACK,MAAM,EAAE,CAACH,GAAG,CAAC;AAAA;AAClD,CAAC;AAED,IAAMc,UAAU,GAAG,SAAbA,UAAUA,CAAIC,UAAU,EAAEC,SAAS,EAAK;AAC5C,EAAA,IAAIC,KAAK,CAACF,UAAU,CAAC,EAAE,OAAO,IAAI;AAElC,EAAA,IAAIE,KAAK,CAACD,SAAS,CAAC,EAAE,OAAO,KAAK;EAElC,OAAOD,UAAU,CAACR,UAAU,IAAIC,IAAI,CAACC,GAAG,EAAE,GAAGO,SAAS;AACxD,CAAC;AAEKE,IAAAA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAIC,QAAQ,EAAEC,KAAK,EAAEC,OAAO,EAAK;AACtD,EAAA,IAAMC,WAAW,GAAGC,QAAQ,CAAAlB,aAAA,CAAA;AAC1Bc,IAAAA,QAAQ,EAARA,QAAQ;AACRK,IAAAA,OAAO,EAAEJ;GACNC,EAAAA,OAAO,CACX,CAAC;AACF,EAAA,IAAMN,UAAU,GAAGjB,sBAAsB,CAACe,GAAG,CAACM,QAAQ,CAAC;AAEvDM,EAAAA,SAAS,CAAC,YAAM;AACd,IAAA,IAAI,CAACH,WAAW,CAACI,SAAS,EAAE;IAC5B5B,sBAAsB,CAACC,GAAG,CAACoB,QAAQ,EAAEG,WAAW,CAACrB,IAAI,CAAC;AACxD,GAAC,EAAE,CAACkB,QAAQ,EAAEG,WAAW,CAACrB,IAAI,EAAEqB,WAAW,CAACI,SAAS,CAAC,CAAC;AAEvD,EAAA,IAAIZ,UAAU,CAACC,UAAU,EAAEM,OAAO,KAAA,IAAA,IAAPA,OAAO,KAAA,MAAA,GAAA,MAAA,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;AAAS,KAAA,CAAA;AAChE;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;AAAK,GAAA,CAAA;AAEzB;AAEAT,iBAAiB,CAACW,QAAQ,GAAG/B,sBAAsB,CAACe,GAAG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePrevious.js","sources":["../../../src/react-utils/usePrevious/usePrevious.js"],"sourcesContent":["import { useEffect, useRef } from \"react\";\n\nconst usePrevious = value => {\n const ref = useRef(value);\n\n useEffect(() => {\n ref.current = value;\n }, [value]);\n\n return ref.current;\n};\n\nexport default usePrevious;\n"],"names":["usePrevious","value","ref","useRef","useEffect","current"],"mappings":";;AAEA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAGC,KAAK,EAAI;AAC3B,EAAA,IAAMC,GAAG,GAAGC,MAAM,CAACF,KAAK,CAAC
|
|
1
|
+
{"version":3,"file":"usePrevious.js","sources":["../../../src/react-utils/usePrevious/usePrevious.js"],"sourcesContent":["import { useEffect, useRef } from \"react\";\n\nconst usePrevious = value => {\n const ref = useRef(value);\n\n useEffect(() => {\n ref.current = value;\n }, [value]);\n\n return ref.current;\n};\n\nexport default usePrevious;\n"],"names":["usePrevious","value","ref","useRef","useEffect","current"],"mappings":";;AAEA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAGC,KAAK,EAAI;AAC3B,EAAA,IAAMC,GAAG,GAAGC,MAAM,CAACF,KAAK,CAAC;AAEzBG,EAAAA,SAAS,CAAC,YAAM;IACdF,GAAG,CAACG,OAAO,GAAGJ,KAAK;AACrB,GAAC,EAAE,CAACA,KAAK,CAAC,CAAC;EAEX,OAAOC,GAAG,CAACG,OAAO;AACpB;;;;"}
|
|
@@ -2,12 +2,11 @@ export { default } from './useQueryParams.js';
|
|
|
2
2
|
import 'react-router-dom';
|
|
3
3
|
import '../../utils/general.js';
|
|
4
4
|
import '../../objectWithoutProperties-DN7d1SzH.js';
|
|
5
|
-
import '../../slicedToArray-
|
|
5
|
+
import '../../slicedToArray-DmsZvA_9.js';
|
|
6
6
|
import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
|
|
7
|
-
import '../../index-
|
|
7
|
+
import '../../index-COfUw8MU.js';
|
|
8
8
|
import '../../_commonjsHelpers-B85MJLTf.js';
|
|
9
|
-
import '../../defineProperty-
|
|
10
|
-
import '../../toPropertyKey-C6Y0u0Sf.js';
|
|
9
|
+
import '../../defineProperty-CrCYjjU3.js';
|
|
11
10
|
import '../../typeof-D-UKOauR.js';
|
|
12
11
|
import 'i18next';
|
|
13
12
|
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,12 +1,11 @@
|
|
|
1
1
|
import { useLocation } from 'react-router-dom';
|
|
2
2
|
import { parseQueryParams } from '../../utils/general.js';
|
|
3
3
|
import '../../objectWithoutProperties-DN7d1SzH.js';
|
|
4
|
-
import '../../slicedToArray-
|
|
4
|
+
import '../../slicedToArray-DmsZvA_9.js';
|
|
5
5
|
import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
|
|
6
|
-
import '../../index-
|
|
6
|
+
import '../../index-COfUw8MU.js';
|
|
7
7
|
import '../../_commonjsHelpers-B85MJLTf.js';
|
|
8
|
-
import '../../defineProperty-
|
|
9
|
-
import '../../toPropertyKey-C6Y0u0Sf.js';
|
|
8
|
+
import '../../defineProperty-CrCYjjU3.js';
|
|
10
9
|
import '../../typeof-D-UKOauR.js';
|
|
11
10
|
import 'i18next';
|
|
12
11
|
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":"
|
|
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;AAE9B,EAAA,OAAOC,gBAAgB,CAACF,QAAQ,CAACG,MAAM,EAAEJ,OAAO,CAAC;AACnD;;;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { default, useNavigationCheckpoints, useRemoveNavigationCheckpoint } from './useRegisterNavigationCheckpoint.js';
|
|
2
|
-
import '../../defineProperty-
|
|
3
|
-
import '../../toPropertyKey-C6Y0u0Sf.js';
|
|
2
|
+
import '../../defineProperty-CrCYjjU3.js';
|
|
4
3
|
import '../../typeof-D-UKOauR.js';
|
|
5
4
|
import 'react';
|
|
6
5
|
import 'ramda';
|
|
@@ -8,9 +7,9 @@ import '../constants/constants.js';
|
|
|
8
7
|
import '../withImmutableActions/withImmutableActions.js';
|
|
9
8
|
import '../../utils/general.js';
|
|
10
9
|
import '../../objectWithoutProperties-DN7d1SzH.js';
|
|
11
|
-
import '../../slicedToArray-
|
|
10
|
+
import '../../slicedToArray-DmsZvA_9.js';
|
|
12
11
|
import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
|
|
13
|
-
import '../../index-
|
|
12
|
+
import '../../index-COfUw8MU.js';
|
|
14
13
|
import '../../_commonjsHelpers-B85MJLTf.js';
|
|
15
14
|
import 'i18next';
|
|
16
15
|
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,17 +1,16 @@
|
|
|
1
|
-
import { _ as _defineProperty } from '../../defineProperty-
|
|
1
|
+
import { _ as _defineProperty } from '../../defineProperty-CrCYjjU3.js';
|
|
2
2
|
import { useEffect } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { prop, pick, dissoc, mergeDeepLeft } from 'ramda';
|
|
4
4
|
import { STORAGE_KEY } from '../constants/constants.js';
|
|
5
5
|
import withImmutableActions from '../withImmutableActions/withImmutableActions.js';
|
|
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';
|
|
10
9
|
import '../../typeof-D-UKOauR.js';
|
|
11
10
|
import '../../objectWithoutProperties-DN7d1SzH.js';
|
|
12
|
-
import '../../slicedToArray-
|
|
11
|
+
import '../../slicedToArray-DmsZvA_9.js';
|
|
13
12
|
import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
|
|
14
|
-
import '../../index-
|
|
13
|
+
import '../../index-COfUw8MU.js';
|
|
15
14
|
import '../../_commonjsHelpers-B85MJLTf.js';
|
|
16
15
|
import 'i18next';
|
|
17
16
|
import '@bigbinary/neeto-cist';
|
|
@@ -19,7 +18,7 @@ import '@bigbinary/neetoui/Toastr';
|
|
|
19
18
|
import 'qs';
|
|
20
19
|
|
|
21
20
|
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; }
|
|
22
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t),
|
|
21
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23
22
|
var getLocalStorageData = function getLocalStorageData() {
|
|
24
23
|
return getFromLocalStorage(STORAGE_KEY) || {};
|
|
25
24
|
};
|
package/dist/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js.map
CHANGED
|
@@ -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":"
|
|
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;AAAA,CAAA;AAExE,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAGC,IAAI,EAAA;AAAA,EAAA,OAAIC,iBAAiB,CAACH,WAAW,EAAEE,IAAI,CAAC;AAAA,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;AAAG,OAAC,CAAC,CAAC;AAAA,KAAA;AACtDG,IAAAA,gBAAgB,EAAE,SAAlBA,gBAAgBA,CAAEJ,GAAG,EAAA;MAAA,OACnBH,GAAG,CAAC,UAAAQ,KAAK,EAAA;QAAA,OAAK;AAAEP,UAAAA,WAAW,EAAEQ,MAAM,CAACN,GAAG,EAAEK,KAAK,CAACP,WAAW;SAAG;AAAA,OAAC,CAAC;AAAA;GAClE;AAAA,CAAC,CACJ,CAAC;AAED,IAAMS,+BAA+B,GAAG,SAAlCA,+BAA+BA,CACnCP,GAAG,EAGA;EAAA,IAFHC,IAAI,GAAAO,SAAA,CAAAC,MAAA,GAAAD,CAAAA,IAAAA,SAAA,CAAAE,CAAAA,CAAAA,KAAAA,SAAA,GAAAF,SAAA,MAAGG,MAAM,CAACC,QAAQ,CAACC,QAAQ,GAAGF,MAAM,CAACC,QAAQ,CAACE,MAAM;AAAA,EAAA,IACxDC,qBAAqB,GAAAP,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,KAAK;EAE7B,IAAMT,aAAa,GAAGL,kBAAkB,CAACsB,IAAI,CAAC,eAAe,CAAC,CAAC;AAE/DC,EAAAA,SAAS,CAAC,YAAM;AACdlB,IAAAA,aAAa,CAACC,GAAG,EAAEC,IAAI,CAAC;AACxB,IAAA,IAAIc,qBAAqB,EAAE;AACzB,MAAA,IAAMG,gBAAgB,GAAG9B,mBAAmB,EAAE;AAC9CG,MAAAA,mBAAmB,CAAA4B,aAAA,CAAAA,aAAA,CAAMD,EAAAA,EAAAA,gBAAgB,CAAAf,EAAAA,EAAAA,EAAAA,eAAA,CAAGH,EAAAA,EAAAA,GAAG,EAAGC,IAAI,EAAE,CAAC;AAC3D;GACD,EAAE,CAACD,GAAG,EAAEC,IAAI,EAAEc,qBAAqB,CAAC,CAAC;AACxC;IAEaK,wBAAwB,GAAG,SAA3BA,wBAAwBA,GAAgB;AAAA,EAAA,KAAA,IAAAC,IAAA,GAAAb,SAAA,CAAAC,MAAA,EAATa,IAAI,GAAAC,IAAAA,KAAA,CAAAF,IAAA,GAAAG,IAAA,GAAA,CAAA,EAAAA,IAAA,GAAAH,IAAA,EAAAG,IAAA,EAAA,EAAA;AAAJF,IAAAA,IAAI,CAAAE,IAAA,CAAAhB,GAAAA,SAAA,CAAAgB,IAAA,CAAA;AAAA;AAC9C,EAAA,IAAMC,cAAc,GAAG/B,kBAAkB,CACvC,UAAAgC,KAAK,EAAA;AAAA,IAAA,OAAIC,IAAI,CAACL,IAAI,EAAEI,KAAK,CAAC5B,WAAW,CAAC;AAAA,GAAA,EACtC8B,OACF,CAAC;AAED,EAAA,IAAMV,gBAAgB,GAAG9B,mBAAmB,EAAE;AAC9C,EAAA,IAAMyC,uBAAuB,GAAGF,IAAI,CAACL,IAAI,EAAEJ,gBAAgB,CAAC;AAE5D,EAAA,OAAAC,aAAA,CAAAA,aAAA,CAAYM,EAAAA,EAAAA,cAAc,GAAKI,uBAAuB,CAAA;AACxD;IAEaC,6BAA6B,GAAG,SAAhCA,6BAA6BA,GAAS;EACjD,IAAM1B,gBAAgB,GAAGV,kBAAkB,CAACsB,IAAI,CAAC,kBAAkB,CAAC,CAAC;EAErE,OAAO,UAAAhB,GAAG,EAAI;IACZI,gBAAgB,CAACJ,GAAG,CAAC;AACrB,IAAA,IAAMkB,gBAAgB,GAAG9B,mBAAmB,EAAE;AAC9CG,IAAAA,mBAAmB,CAACe,MAAM,CAACN,GAAG,EAAEkB,gBAAgB,CAAC,CAAC;GACnD;AACH;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { dissoc, assoc, prop } from 'ramda';
|
|
3
3
|
import useFuncDebounce from '../useFuncDebounce/useFuncDebounce.js';
|
|
4
4
|
import withImmutableActions from '../withImmutableActions/withImmutableActions.js';
|
|
5
5
|
import { create } from 'zustand';
|