@bigbinary/neeto-commons-frontend 3.0.6 → 3.0.7
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/{constants.cjs.js → cjs/constants/index.js} +11 -10
- package/cjs/constants/index.js.map +1 -0
- package/cjs/cypress-utils/commands.js +276 -0
- package/cjs/cypress-utils/commands.js.map +1 -0
- package/cjs/cypress-utils/constants/index.js +14 -0
- package/cjs/cypress-utils/constants/index.js.map +1 -0
- package/cjs/cypress-utils/constants/routes.js +40 -0
- package/cjs/cypress-utils/constants/routes.js.map +1 -0
- package/cjs/cypress-utils/constants/selectors/common.js +103 -0
- package/cjs/cypress-utils/constants/selectors/common.js.map +1 -0
- package/cjs/cypress-utils/constants/selectors/editor.js +29 -0
- package/cjs/cypress-utils/constants/selectors/editor.js.map +1 -0
- package/cjs/cypress-utils/constants/selectors/ipRestriction.js +19 -0
- package/cjs/cypress-utils/constants/selectors/ipRestriction.js.map +1 -0
- package/cjs/cypress-utils/constants/selectors/login.js +21 -0
- package/cjs/cypress-utils/constants/selectors/login.js.map +1 -0
- package/cjs/cypress-utils/constants/selectors/member.js +65 -0
- package/cjs/cypress-utils/constants/selectors/member.js.map +1 -0
- package/cjs/cypress-utils/constants/selectors/navigation.js +28 -0
- package/cjs/cypress-utils/constants/selectors/navigation.js.map +1 -0
- package/cjs/cypress-utils/constants/selectors/roles.js +24 -0
- package/cjs/cypress-utils/constants/selectors/roles.js.map +1 -0
- package/cjs/cypress-utils/constants/selectors/signUp.js +23 -0
- package/cjs/cypress-utils/constants/selectors/signUp.js.map +1 -0
- package/cjs/cypress-utils/constants/selectors/tags.js +31 -0
- package/cjs/cypress-utils/constants/selectors/tags.js.map +1 -0
- package/cjs/cypress-utils/constants/texts/common.js +40 -0
- package/cjs/cypress-utils/constants/texts/common.js.map +1 -0
- package/cjs/cypress-utils/constants/texts/member.js +68 -0
- package/cjs/cypress-utils/constants/texts/member.js.map +1 -0
- package/cjs/cypress-utils/constants/texts/navigation.js +24 -0
- package/cjs/cypress-utils/constants/texts/navigation.js.map +1 -0
- package/cjs/cypress-utils/constants/texts/roles.js +25 -0
- package/cjs/cypress-utils/constants/texts/roles.js.map +1 -0
- package/cjs/cypress-utils/constants/texts/signUp.js +14 -0
- package/cjs/cypress-utils/constants/texts/signUp.js.map +1 -0
- package/cjs/cypress-utils/constants/texts/tags.js +28 -0
- package/cjs/cypress-utils/constants/texts/tags.js.map +1 -0
- package/cjs/cypress-utils/fixtures/fake.js +177 -0
- package/cjs/cypress-utils/fixtures/fake.js.map +1 -0
- package/cjs/cypress-utils/index.js +226 -0
- package/cjs/cypress-utils/index.js.map +1 -0
- package/cjs/cypress-utils/utils/authentication.js +45 -0
- package/cjs/cypress-utils/utils/authentication.js.map +1 -0
- package/cjs/cypress-utils/utils/common.js +92 -0
- package/cjs/cypress-utils/utils/common.js.map +1 -0
- package/cjs/cypress-utils/utils/date.js +28 -0
- package/cjs/cypress-utils/utils/date.js.map +1 -0
- package/cjs/cypress-utils/utils/email.js +165 -0
- package/cjs/cypress-utils/utils/email.js.map +1 -0
- package/cjs/cypress-utils/utils/member.js +352 -0
- package/cjs/cypress-utils/utils/member.js.map +1 -0
- package/cjs/cypress-utils/utils/navigation.js +208 -0
- package/cjs/cypress-utils/utils/navigation.js.map +1 -0
- package/cjs/cypress-utils/utils/organization.js +109 -0
- package/cjs/cypress-utils/utils/organization.js.map +1 -0
- package/cjs/cypress-utils/utils/validation.js +17 -0
- package/cjs/cypress-utils/utils/validation.js.map +1 -0
- package/cjs/initializers/axios/index.js +199 -0
- package/cjs/initializers/axios/index.js.map +1 -0
- package/cjs/initializers/axios/paramsSerializer.js +27 -0
- package/cjs/initializers/axios/paramsSerializer.js.map +1 -0
- package/cjs/initializers/constants.js +17 -0
- package/cjs/initializers/constants.js.map +1 -0
- package/cjs/initializers/globalProps.js +15 -0
- package/cjs/initializers/globalProps.js.map +1 -0
- package/cjs/initializers/i18n.js +68 -0
- package/cjs/initializers/i18n.js.map +1 -0
- package/cjs/initializers/index.js +51 -0
- package/cjs/initializers/index.js.map +1 -0
- package/cjs/initializers/logger.js +17 -0
- package/cjs/initializers/logger.js.map +1 -0
- package/cjs/initializers/reactDevTools.js +26 -0
- package/cjs/initializers/reactDevTools.js.map +1 -0
- package/cjs/initializers/utils/customFormatters.js +43 -0
- package/cjs/initializers/utils/customFormatters.js.map +1 -0
- package/cjs/initializers/utils/customPostProcessors.js +21 -0
- package/cjs/initializers/utils/customPostProcessors.js.map +1 -0
- package/cjs/initializers/utils.js +37 -0
- package/cjs/initializers/utils.js.map +1 -0
- package/cjs/react-utils/BrowserPushNotifications/devices.js +26 -0
- package/cjs/react-utils/BrowserPushNotifications/devices.js.map +1 -0
- package/cjs/react-utils/BrowserPushNotifications/index.js +19 -0
- package/cjs/react-utils/BrowserPushNotifications/index.js.map +1 -0
- package/cjs/react-utils/BrowserPushNotifications/pushHelper.js +116 -0
- package/cjs/react-utils/BrowserPushNotifications/pushHelper.js.map +1 -0
- package/cjs/react-utils/BrowserPushNotifications/registerServiceWorker.js +146 -0
- package/cjs/react-utils/BrowserPushNotifications/registerServiceWorker.js.map +1 -0
- package/cjs/react-utils/HoneybadgerErrorBoundary/FallbackComponent.js +153 -0
- package/cjs/react-utils/HoneybadgerErrorBoundary/FallbackComponent.js.map +1 -0
- package/cjs/react-utils/HoneybadgerErrorBoundary/constants.js +9 -0
- package/cjs/react-utils/HoneybadgerErrorBoundary/constants.js.map +1 -0
- package/cjs/react-utils/HoneybadgerErrorBoundary/index.js +59 -0
- package/cjs/react-utils/HoneybadgerErrorBoundary/index.js.map +1 -0
- package/cjs/react-utils/HoneybadgerErrorBoundary/utils.js +17 -0
- package/cjs/react-utils/HoneybadgerErrorBoundary/utils.js.map +1 -0
- package/cjs/react-utils/PrivateRoute.js +80 -0
- package/cjs/react-utils/PrivateRoute.js.map +1 -0
- package/cjs/react-utils/constants/constants.js +11 -0
- package/cjs/react-utils/constants/constants.js.map +1 -0
- package/cjs/react-utils/constants/index.js +28 -0
- package/cjs/react-utils/constants/index.js.map +1 -0
- package/cjs/react-utils/constants/query.js +11 -0
- package/cjs/react-utils/constants/query.js.map +1 -0
- package/cjs/react-utils/index.js +242 -0
- package/cjs/react-utils/index.js.map +1 -0
- package/cjs/react-utils/metaClick.js +16 -0
- package/cjs/react-utils/metaClick.js.map +1 -0
- package/cjs/react-utils/useDebounce.js +28 -0
- package/cjs/react-utils/useDebounce.js.map +1 -0
- package/cjs/react-utils/useDisplayErrorPage.js +23 -0
- package/cjs/react-utils/useDisplayErrorPage.js.map +1 -0
- package/cjs/react-utils/useFetchNeetoApps/apis/neeto_apps.js +17 -0
- package/cjs/react-utils/useFetchNeetoApps/apis/neeto_apps.js.map +1 -0
- package/cjs/react-utils/useFetchNeetoApps/index.js +14 -0
- package/cjs/react-utils/useFetchNeetoApps/index.js.map +1 -0
- package/cjs/react-utils/useFetchNeetoApps/useFetchNeetoApps.js +27 -0
- package/cjs/react-utils/useFetchNeetoApps/useFetchNeetoApps.js.map +1 -0
- package/cjs/react-utils/useFieldSubmit.js +33 -0
- package/cjs/react-utils/useFieldSubmit.js.map +1 -0
- package/cjs/react-utils/useFuncDebounce.js +27 -0
- package/cjs/react-utils/useFuncDebounce.js.map +1 -0
- package/cjs/react-utils/useHotKeys/constants.js +36 -0
- package/cjs/react-utils/useHotKeys/constants.js.map +1 -0
- package/cjs/react-utils/useHotKeys/index.js +14 -0
- package/cjs/react-utils/useHotKeys/index.js.map +1 -0
- package/cjs/react-utils/useHotKeys/useHotKeys.js +65 -0
- package/cjs/react-utils/useHotKeys/useHotKeys.js.map +1 -0
- package/cjs/react-utils/useHotKeys/utils.js +37 -0
- package/cjs/react-utils/useHotKeys/utils.js.map +1 -0
- package/cjs/react-utils/useIsElementVisibleInDom/index.js +14 -0
- package/cjs/react-utils/useIsElementVisibleInDom/index.js.map +1 -0
- package/cjs/react-utils/useIsElementVisibleInDom/useForceUpdate.js +23 -0
- package/cjs/react-utils/useIsElementVisibleInDom/useForceUpdate.js.map +1 -0
- package/cjs/react-utils/useIsElementVisibleInDom/useIsElementVisibleInDom.js +34 -0
- package/cjs/react-utils/useIsElementVisibleInDom/useIsElementVisibleInDom.js.map +1 -0
- package/cjs/react-utils/useKeyboardShortcutsPaneState.js +36 -0
- package/cjs/react-utils/useKeyboardShortcutsPaneState.js.map +1 -0
- package/cjs/react-utils/useLocalStorage.js +39 -0
- package/cjs/react-utils/useLocalStorage.js.map +1 -0
- package/cjs/react-utils/useMutationWithInvalidation.js +33 -0
- package/cjs/react-utils/useMutationWithInvalidation.js.map +1 -0
- package/cjs/react-utils/useOnClickOutside.js +32 -0
- package/cjs/react-utils/useOnClickOutside.js.map +1 -0
- package/cjs/react-utils/usePersistedQuery.js +59 -0
- package/cjs/react-utils/usePersistedQuery.js.map +1 -0
- package/cjs/react-utils/usePrevious.js +17 -0
- package/cjs/react-utils/usePrevious.js.map +1 -0
- package/cjs/react-utils/useQueryParams.js +15 -0
- package/cjs/react-utils/useQueryParams.js.map +1 -0
- package/cjs/react-utils/useRegisterNavigationCheckpoint.js +43 -0
- package/cjs/react-utils/useRegisterNavigationCheckpoint.js.map +1 -0
- package/cjs/react-utils/useStateWithDependency.js +23 -0
- package/cjs/react-utils/useStateWithDependency.js.map +1 -0
- package/cjs/react-utils/useTimer.js +51 -0
- package/cjs/react-utils/useTimer.js.map +1 -0
- package/cjs/react-utils/useUpdateEffect.js +21 -0
- package/cjs/react-utils/useUpdateEffect.js.map +1 -0
- package/cjs/react-utils/withImmutableActions.js +29 -0
- package/cjs/react-utils/withImmutableActions.js.map +1 -0
- package/cjs/react-utils/withT.js +14 -0
- package/cjs/react-utils/withT.js.map +1 -0
- package/cjs/react-utils/withTitle.js +44 -0
- package/cjs/react-utils/withTitle.js.map +1 -0
- package/cjs/utils/axios.js +17 -0
- package/cjs/utils/axios.js.map +1 -0
- package/cjs/utils/createSubscription.js +22 -0
- package/cjs/utils/createSubscription.js.map +1 -0
- package/cjs/utils/currencyFormat.js +50 -0
- package/cjs/utils/currencyFormat.js.map +1 -0
- package/cjs/utils/datetime.js +69 -0
- package/cjs/utils/datetime.js.map +1 -0
- package/cjs/utils/general.js +193 -0
- package/cjs/utils/general.js.map +1 -0
- package/cjs/utils/index.js +72 -0
- package/cjs/utils/index.js.map +1 -0
- package/cjs/utils/permissions.js +25 -0
- package/cjs/utils/permissions.js.map +1 -0
- package/configs/scripts/getPkgTranslations.js +1 -1
- package/configs/scripts/jsdoc-builder/constants.mjs +1 -1
- package/configs/scripts/jsdoc-builder/index.mjs +1 -1
- package/configs/webpack/rules.js +2 -1
- package/constants/index.js +13 -0
- package/constants/index.js.map +1 -0
- package/cypress-utils/commands.js +268 -0
- package/cypress-utils/commands.js.map +1 -0
- package/cypress-utils/constants/index.js +7 -0
- package/cypress-utils/constants/index.js.map +1 -0
- package/cypress-utils/constants/routes.js +33 -0
- package/cypress-utils/constants/routes.js.map +1 -0
- package/cypress-utils/constants/selectors/common.js +94 -0
- package/cypress-utils/constants/selectors/common.js.map +1 -0
- package/cypress-utils/constants/selectors/editor.js +22 -0
- package/cypress-utils/constants/selectors/editor.js.map +1 -0
- package/cypress-utils/constants/selectors/ipRestriction.js +12 -0
- package/cypress-utils/constants/selectors/ipRestriction.js.map +1 -0
- package/cypress-utils/constants/selectors/login.js +14 -0
- package/cypress-utils/constants/selectors/login.js.map +1 -0
- package/cypress-utils/constants/selectors/member.js +56 -0
- package/cypress-utils/constants/selectors/member.js.map +1 -0
- package/cypress-utils/constants/selectors/navigation.js +20 -0
- package/cypress-utils/constants/selectors/navigation.js.map +1 -0
- package/cypress-utils/constants/selectors/roles.js +17 -0
- package/cypress-utils/constants/selectors/roles.js.map +1 -0
- package/cypress-utils/constants/selectors/signUp.js +16 -0
- package/cypress-utils/constants/selectors/signUp.js.map +1 -0
- package/cypress-utils/constants/selectors/tags.js +23 -0
- package/cypress-utils/constants/selectors/tags.js.map +1 -0
- package/cypress-utils/constants/texts/common.js +33 -0
- package/cypress-utils/constants/texts/common.js.map +1 -0
- package/cypress-utils/constants/texts/member.js +59 -0
- package/cypress-utils/constants/texts/member.js.map +1 -0
- package/cypress-utils/constants/texts/navigation.js +16 -0
- package/cypress-utils/constants/texts/navigation.js.map +1 -0
- package/cypress-utils/constants/texts/roles.js +18 -0
- package/cypress-utils/constants/texts/roles.js.map +1 -0
- package/cypress-utils/constants/texts/signUp.js +7 -0
- package/cypress-utils/constants/texts/signUp.js.map +1 -0
- package/cypress-utils/constants/texts/tags.js +21 -0
- package/cypress-utils/constants/texts/tags.js.map +1 -0
- package/cypress-utils/fixtures/fake.js +171 -0
- package/cypress-utils/fixtures/fake.js.map +1 -0
- package/cypress-utils/index.js +21 -0
- package/cypress-utils/index.js.map +1 -0
- package/cypress-utils/utils/authentication.js +38 -0
- package/cypress-utils/utils/authentication.js.map +1 -0
- package/cypress-utils/utils/common.js +75 -0
- package/cypress-utils/utils/common.js.map +1 -0
- package/cypress-utils/utils/date.js +20 -0
- package/cypress-utils/utils/date.js.map +1 -0
- package/cypress-utils/utils/email.js +156 -0
- package/cypress-utils/utils/email.js.map +1 -0
- package/cypress-utils/utils/member.js +344 -0
- package/cypress-utils/utils/member.js.map +1 -0
- package/cypress-utils/utils/navigation.js +200 -0
- package/cypress-utils/utils/navigation.js.map +1 -0
- package/cypress-utils/utils/organization.js +102 -0
- package/cypress-utils/utils/organization.js.map +1 -0
- package/cypress-utils/utils/validation.js +10 -0
- package/cypress-utils/utils/validation.js.map +1 -0
- package/initializers/axios/index.js +192 -0
- package/initializers/axios/index.js.map +1 -0
- package/initializers/axios/paramsSerializer.js +18 -0
- package/initializers/axios/paramsSerializer.js.map +1 -0
- package/initializers/constants.js +8 -0
- package/initializers/constants.js.map +1 -0
- package/initializers/globalProps.js +8 -0
- package/initializers/globalProps.js.map +1 -0
- package/initializers/i18n.js +61 -0
- package/initializers/i18n.js.map +1 -0
- package/initializers/index.js +28 -0
- package/initializers/index.js.map +1 -0
- package/initializers/logger.js +10 -0
- package/initializers/logger.js.map +1 -0
- package/initializers/reactDevTools.js +19 -0
- package/initializers/reactDevTools.js.map +1 -0
- package/initializers/utils/customFormatters.js +34 -0
- package/initializers/utils/customFormatters.js.map +1 -0
- package/initializers/utils/customPostProcessors.js +14 -0
- package/initializers/utils/customPostProcessors.js.map +1 -0
- package/initializers/utils.js +29 -0
- package/initializers/utils.js.map +1 -0
- package/package.json +51 -158
- package/pure.d.ts +384 -0
- package/react-utils/BrowserPushNotifications/devices.js +18 -0
- package/react-utils/BrowserPushNotifications/devices.js.map +1 -0
- package/react-utils/BrowserPushNotifications/index.js +1 -0
- package/react-utils/BrowserPushNotifications/index.js.map +1 -0
- package/react-utils/BrowserPushNotifications/pushHelper.js +107 -0
- package/react-utils/BrowserPushNotifications/pushHelper.js.map +1 -0
- package/react-utils/BrowserPushNotifications/registerServiceWorker.js +137 -0
- package/react-utils/BrowserPushNotifications/registerServiceWorker.js.map +1 -0
- package/react-utils/HoneybadgerErrorBoundary/FallbackComponent.js +144 -0
- package/react-utils/HoneybadgerErrorBoundary/FallbackComponent.js.map +1 -0
- package/react-utils/HoneybadgerErrorBoundary/constants.js +1 -0
- package/react-utils/HoneybadgerErrorBoundary/constants.js.map +1 -0
- package/react-utils/HoneybadgerErrorBoundary/index.js +52 -0
- package/react-utils/HoneybadgerErrorBoundary/index.js.map +1 -0
- package/react-utils/HoneybadgerErrorBoundary/utils.js +9 -0
- package/react-utils/HoneybadgerErrorBoundary/utils.js.map +1 -0
- package/react-utils/PrivateRoute.js +72 -0
- package/react-utils/PrivateRoute.js.map +1 -0
- package/react-utils/constants/constants.js +3 -0
- package/react-utils/constants/constants.js.map +1 -0
- package/react-utils/constants/index.js +3 -0
- package/react-utils/constants/index.js.map +1 -0
- package/react-utils/constants/query.js +4 -0
- package/react-utils/constants/query.js.map +1 -0
- package/react-utils/index.js +33 -0
- package/react-utils/index.js.map +1 -0
- package/react-utils/metaClick.js +8 -0
- package/react-utils/metaClick.js.map +1 -0
- package/react-utils/useDebounce.js +20 -0
- package/react-utils/useDebounce.js.map +1 -0
- package/react-utils/useDisplayErrorPage.js +15 -0
- package/react-utils/useDisplayErrorPage.js.map +1 -0
- package/react-utils/useFetchNeetoApps/apis/neeto_apps.js +9 -0
- package/react-utils/useFetchNeetoApps/apis/neeto_apps.js.map +1 -0
- package/react-utils/useFetchNeetoApps/index.js +1 -0
- package/react-utils/useFetchNeetoApps/index.js.map +1 -0
- package/react-utils/useFetchNeetoApps/useFetchNeetoApps.js +19 -0
- package/react-utils/useFetchNeetoApps/useFetchNeetoApps.js.map +1 -0
- package/react-utils/useFieldSubmit.js +26 -0
- package/react-utils/useFieldSubmit.js.map +1 -0
- package/react-utils/useFuncDebounce.js +20 -0
- package/react-utils/useFuncDebounce.js.map +1 -0
- package/react-utils/useHotKeys/constants.js +25 -0
- package/react-utils/useHotKeys/constants.js.map +1 -0
- package/react-utils/useHotKeys/index.js +1 -0
- package/react-utils/useHotKeys/index.js.map +1 -0
- package/react-utils/useHotKeys/useHotKeys.js +57 -0
- package/react-utils/useHotKeys/useHotKeys.js.map +1 -0
- package/react-utils/useHotKeys/utils.js +29 -0
- package/react-utils/useHotKeys/utils.js.map +1 -0
- package/react-utils/useIsElementVisibleInDom/index.js +1 -0
- package/react-utils/useIsElementVisibleInDom/index.js.map +1 -0
- package/react-utils/useIsElementVisibleInDom/useForceUpdate.js +15 -0
- package/react-utils/useIsElementVisibleInDom/useForceUpdate.js.map +1 -0
- package/react-utils/useIsElementVisibleInDom/useIsElementVisibleInDom.js +26 -0
- package/react-utils/useIsElementVisibleInDom/useIsElementVisibleInDom.js.map +1 -0
- package/react-utils/useKeyboardShortcutsPaneState.js +29 -0
- package/react-utils/useKeyboardShortcutsPaneState.js.map +1 -0
- package/react-utils/useLocalStorage.js +31 -0
- package/react-utils/useLocalStorage.js.map +1 -0
- package/react-utils/useMutationWithInvalidation.js +25 -0
- package/react-utils/useMutationWithInvalidation.js.map +1 -0
- package/react-utils/useOnClickOutside.js +25 -0
- package/react-utils/useOnClickOutside.js.map +1 -0
- package/react-utils/usePersistedQuery.js +51 -0
- package/react-utils/usePersistedQuery.js.map +1 -0
- package/react-utils/usePrevious.js +10 -0
- package/react-utils/usePrevious.js.map +1 -0
- package/react-utils/useQueryParams.js +8 -0
- package/react-utils/useQueryParams.js.map +1 -0
- package/react-utils/useRegisterNavigationCheckpoint.js +35 -0
- package/react-utils/useRegisterNavigationCheckpoint.js.map +1 -0
- package/react-utils/useStateWithDependency.js +15 -0
- package/react-utils/useStateWithDependency.js.map +1 -0
- package/react-utils/useTimer.js +43 -0
- package/react-utils/useTimer.js.map +1 -0
- package/react-utils/useUpdateEffect.js +14 -0
- package/react-utils/useUpdateEffect.js.map +1 -0
- package/react-utils/withImmutableActions.js +22 -0
- package/react-utils/withImmutableActions.js.map +1 -0
- package/react-utils/withT.js +7 -0
- package/react-utils/withT.js.map +1 -0
- package/react-utils/withTitle.js +36 -0
- package/react-utils/withTitle.js.map +1 -0
- package/react-utils.d.ts +14 -2
- package/utils/axios.js +10 -0
- package/utils/axios.js.map +1 -0
- package/utils/createSubscription.js +15 -0
- package/utils/createSubscription.js.map +1 -0
- package/utils/currencyFormat.js +42 -0
- package/utils/currencyFormat.js.map +1 -0
- package/utils/datetime.js +60 -0
- package/utils/datetime.js.map +1 -0
- package/utils/general.js +172 -0
- package/utils/general.js.map +1 -0
- package/utils/index.js +7 -0
- package/utils/index.js.map +1 -0
- package/utils/permissions.js +16 -0
- package/utils/permissions.js.map +1 -0
- package/utils.d.ts +18 -2
- package/README.md +0 -173
- package/constants.cjs.js.map +0 -1
- package/constants.js +0 -15
- package/constants.js.map +0 -1
- package/cypress-utils.cjs.js +0 -1819
- package/cypress-utils.cjs.js.map +0 -1
- package/cypress-utils.js +0 -1773
- package/cypress-utils.js.map +0 -1
- package/initializers.cjs.js +0 -2648
- package/initializers.cjs.js.map +0 -1
- package/initializers.js +0 -2634
- package/initializers.js.map +0 -1
- package/react-utils.cjs.js +0 -4915
- package/react-utils.cjs.js.map +0 -1
- package/react-utils.js +0 -4860
- package/react-utils.js.map +0 -1
- package/utils.cjs.js +0 -1280
- package/utils.cjs.js.map +0 -1
- package/utils.js +0 -1248
- package/utils.js.map +0 -1
- /package/{src/translations → translations}/en.json +0 -0
package/utils.js
DELETED
|
@@ -1,1248 +0,0 @@
|
|
|
1
|
-
import axios from 'axios';
|
|
2
|
-
import { values, curry, toPairs, pipe, omit, isEmpty } from 'ramda';
|
|
3
|
-
import i18next from 'i18next';
|
|
4
|
-
import { getRandomInt, preprocessForSerialization } from '@bigbinary/neeto-cist';
|
|
5
|
-
import { Toastr } from '@bigbinary/neetoui';
|
|
6
|
-
import { stringify, parse } from 'qs';
|
|
7
|
-
import dayjs from 'dayjs';
|
|
8
|
-
import relativeTime from 'dayjs/plugin/relativeTime';
|
|
9
|
-
import updateLocale from 'dayjs/plugin/updateLocale';
|
|
10
|
-
|
|
11
|
-
var HEADERS_KEYS = {
|
|
12
|
-
xCsrfToken: "X-CSRF-TOKEN",
|
|
13
|
-
contentType: "Content-Type",
|
|
14
|
-
accept: "Accept"
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
var resetAuthTokens = function resetAuthTokens() {
|
|
18
|
-
values(HEADERS_KEYS).forEach(function (header) {
|
|
19
|
-
delete axios.defaults.headers[header];
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
function _arrayWithHoles(arr) {
|
|
24
|
-
if (Array.isArray(arr)) return arr;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function _iterableToArrayLimit(arr, i) {
|
|
28
|
-
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
29
|
-
if (null != _i) {
|
|
30
|
-
var _s,
|
|
31
|
-
_e,
|
|
32
|
-
_x,
|
|
33
|
-
_r,
|
|
34
|
-
_arr = [],
|
|
35
|
-
_n = !0,
|
|
36
|
-
_d = !1;
|
|
37
|
-
try {
|
|
38
|
-
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
39
|
-
if (Object(_i) !== _i) return;
|
|
40
|
-
_n = !1;
|
|
41
|
-
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
42
|
-
} catch (err) {
|
|
43
|
-
_d = !0, _e = err;
|
|
44
|
-
} finally {
|
|
45
|
-
try {
|
|
46
|
-
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
|
47
|
-
} finally {
|
|
48
|
-
if (_d) throw _e;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
return _arr;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function _arrayLikeToArray(arr, len) {
|
|
56
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
57
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
58
|
-
return arr2;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
62
|
-
if (!o) return;
|
|
63
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
64
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
65
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
66
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
67
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function _nonIterableRest() {
|
|
71
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function _slicedToArray(arr, i) {
|
|
75
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
79
|
-
try {
|
|
80
|
-
var info = gen[key](arg);
|
|
81
|
-
var value = info.value;
|
|
82
|
-
} catch (error) {
|
|
83
|
-
reject(error);
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
if (info.done) {
|
|
87
|
-
resolve(value);
|
|
88
|
-
} else {
|
|
89
|
-
Promise.resolve(value).then(_next, _throw);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
function _asyncToGenerator(fn) {
|
|
93
|
-
return function () {
|
|
94
|
-
var self = this,
|
|
95
|
-
args = arguments;
|
|
96
|
-
return new Promise(function (resolve, reject) {
|
|
97
|
-
var gen = fn.apply(self, args);
|
|
98
|
-
function _next(value) {
|
|
99
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
100
|
-
}
|
|
101
|
-
function _throw(err) {
|
|
102
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
103
|
-
}
|
|
104
|
-
_next(undefined);
|
|
105
|
-
});
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
function _typeof$1(obj) {
|
|
110
|
-
"@babel/helpers - typeof";
|
|
111
|
-
|
|
112
|
-
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
113
|
-
return typeof obj;
|
|
114
|
-
} : function (obj) {
|
|
115
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
116
|
-
}, _typeof$1(obj);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function _toPrimitive(input, hint) {
|
|
120
|
-
if (_typeof$1(input) !== "object" || input === null) return input;
|
|
121
|
-
var prim = input[Symbol.toPrimitive];
|
|
122
|
-
if (prim !== undefined) {
|
|
123
|
-
var res = prim.call(input, hint || "default");
|
|
124
|
-
if (_typeof$1(res) !== "object") return res;
|
|
125
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
126
|
-
}
|
|
127
|
-
return (hint === "string" ? String : Number)(input);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function _toPropertyKey(arg) {
|
|
131
|
-
var key = _toPrimitive(arg, "string");
|
|
132
|
-
return _typeof$1(key) === "symbol" ? key : String(key);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
function _defineProperty(obj, key, value) {
|
|
136
|
-
key = _toPropertyKey(key);
|
|
137
|
-
if (key in obj) {
|
|
138
|
-
Object.defineProperty(obj, key, {
|
|
139
|
-
value: value,
|
|
140
|
-
enumerable: true,
|
|
141
|
-
configurable: true,
|
|
142
|
-
writable: true
|
|
143
|
-
});
|
|
144
|
-
} else {
|
|
145
|
-
obj[key] = value;
|
|
146
|
-
}
|
|
147
|
-
return obj;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
var regeneratorRuntime$1 = {exports: {}};
|
|
151
|
-
|
|
152
|
-
var _typeof = {exports: {}};
|
|
153
|
-
|
|
154
|
-
(function (module) {
|
|
155
|
-
function _typeof(obj) {
|
|
156
|
-
"@babel/helpers - typeof";
|
|
157
|
-
|
|
158
|
-
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
159
|
-
return typeof obj;
|
|
160
|
-
} : function (obj) {
|
|
161
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
162
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
|
163
|
-
}
|
|
164
|
-
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
165
|
-
} (_typeof));
|
|
166
|
-
|
|
167
|
-
(function (module) {
|
|
168
|
-
var _typeof$1 = _typeof.exports["default"];
|
|
169
|
-
function _regeneratorRuntime() {
|
|
170
|
-
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
171
|
-
return exports;
|
|
172
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
173
|
-
var exports = {},
|
|
174
|
-
Op = Object.prototype,
|
|
175
|
-
hasOwn = Op.hasOwnProperty,
|
|
176
|
-
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
177
|
-
obj[key] = desc.value;
|
|
178
|
-
},
|
|
179
|
-
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
180
|
-
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
181
|
-
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
182
|
-
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
183
|
-
function define(obj, key, value) {
|
|
184
|
-
return Object.defineProperty(obj, key, {
|
|
185
|
-
value: value,
|
|
186
|
-
enumerable: !0,
|
|
187
|
-
configurable: !0,
|
|
188
|
-
writable: !0
|
|
189
|
-
}), obj[key];
|
|
190
|
-
}
|
|
191
|
-
try {
|
|
192
|
-
define({}, "");
|
|
193
|
-
} catch (err) {
|
|
194
|
-
define = function define(obj, key, value) {
|
|
195
|
-
return obj[key] = value;
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
199
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
200
|
-
generator = Object.create(protoGenerator.prototype),
|
|
201
|
-
context = new Context(tryLocsList || []);
|
|
202
|
-
return defineProperty(generator, "_invoke", {
|
|
203
|
-
value: makeInvokeMethod(innerFn, self, context)
|
|
204
|
-
}), generator;
|
|
205
|
-
}
|
|
206
|
-
function tryCatch(fn, obj, arg) {
|
|
207
|
-
try {
|
|
208
|
-
return {
|
|
209
|
-
type: "normal",
|
|
210
|
-
arg: fn.call(obj, arg)
|
|
211
|
-
};
|
|
212
|
-
} catch (err) {
|
|
213
|
-
return {
|
|
214
|
-
type: "throw",
|
|
215
|
-
arg: err
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
exports.wrap = wrap;
|
|
220
|
-
var ContinueSentinel = {};
|
|
221
|
-
function Generator() {}
|
|
222
|
-
function GeneratorFunction() {}
|
|
223
|
-
function GeneratorFunctionPrototype() {}
|
|
224
|
-
var IteratorPrototype = {};
|
|
225
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
226
|
-
return this;
|
|
227
|
-
});
|
|
228
|
-
var getProto = Object.getPrototypeOf,
|
|
229
|
-
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
230
|
-
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
231
|
-
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
232
|
-
function defineIteratorMethods(prototype) {
|
|
233
|
-
["next", "throw", "return"].forEach(function (method) {
|
|
234
|
-
define(prototype, method, function (arg) {
|
|
235
|
-
return this._invoke(method, arg);
|
|
236
|
-
});
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
240
|
-
function invoke(method, arg, resolve, reject) {
|
|
241
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
242
|
-
if ("throw" !== record.type) {
|
|
243
|
-
var result = record.arg,
|
|
244
|
-
value = result.value;
|
|
245
|
-
return value && "object" == _typeof$1(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
246
|
-
invoke("next", value, resolve, reject);
|
|
247
|
-
}, function (err) {
|
|
248
|
-
invoke("throw", err, resolve, reject);
|
|
249
|
-
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
250
|
-
result.value = unwrapped, resolve(result);
|
|
251
|
-
}, function (error) {
|
|
252
|
-
return invoke("throw", error, resolve, reject);
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
reject(record.arg);
|
|
256
|
-
}
|
|
257
|
-
var previousPromise;
|
|
258
|
-
defineProperty(this, "_invoke", {
|
|
259
|
-
value: function value(method, arg) {
|
|
260
|
-
function callInvokeWithMethodAndArg() {
|
|
261
|
-
return new PromiseImpl(function (resolve, reject) {
|
|
262
|
-
invoke(method, arg, resolve, reject);
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
266
|
-
}
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
270
|
-
var state = "suspendedStart";
|
|
271
|
-
return function (method, arg) {
|
|
272
|
-
if ("executing" === state) throw new Error("Generator is already running");
|
|
273
|
-
if ("completed" === state) {
|
|
274
|
-
if ("throw" === method) throw arg;
|
|
275
|
-
return doneResult();
|
|
276
|
-
}
|
|
277
|
-
for (context.method = method, context.arg = arg;;) {
|
|
278
|
-
var delegate = context.delegate;
|
|
279
|
-
if (delegate) {
|
|
280
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
281
|
-
if (delegateResult) {
|
|
282
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
283
|
-
return delegateResult;
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
287
|
-
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
288
|
-
context.dispatchException(context.arg);
|
|
289
|
-
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
290
|
-
state = "executing";
|
|
291
|
-
var record = tryCatch(innerFn, self, context);
|
|
292
|
-
if ("normal" === record.type) {
|
|
293
|
-
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
294
|
-
return {
|
|
295
|
-
value: record.arg,
|
|
296
|
-
done: context.done
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
300
|
-
}
|
|
301
|
-
};
|
|
302
|
-
}
|
|
303
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
304
|
-
var methodName = context.method,
|
|
305
|
-
method = delegate.iterator[methodName];
|
|
306
|
-
if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
|
|
307
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
308
|
-
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
309
|
-
var info = record.arg;
|
|
310
|
-
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
|
311
|
-
}
|
|
312
|
-
function pushTryEntry(locs) {
|
|
313
|
-
var entry = {
|
|
314
|
-
tryLoc: locs[0]
|
|
315
|
-
};
|
|
316
|
-
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
317
|
-
}
|
|
318
|
-
function resetTryEntry(entry) {
|
|
319
|
-
var record = entry.completion || {};
|
|
320
|
-
record.type = "normal", delete record.arg, entry.completion = record;
|
|
321
|
-
}
|
|
322
|
-
function Context(tryLocsList) {
|
|
323
|
-
this.tryEntries = [{
|
|
324
|
-
tryLoc: "root"
|
|
325
|
-
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
326
|
-
}
|
|
327
|
-
function values(iterable) {
|
|
328
|
-
if (iterable) {
|
|
329
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
330
|
-
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
331
|
-
if ("function" == typeof iterable.next) return iterable;
|
|
332
|
-
if (!isNaN(iterable.length)) {
|
|
333
|
-
var i = -1,
|
|
334
|
-
next = function next() {
|
|
335
|
-
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
336
|
-
return next.value = undefined, next.done = !0, next;
|
|
337
|
-
};
|
|
338
|
-
return next.next = next;
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
return {
|
|
342
|
-
next: doneResult
|
|
343
|
-
};
|
|
344
|
-
}
|
|
345
|
-
function doneResult() {
|
|
346
|
-
return {
|
|
347
|
-
value: undefined,
|
|
348
|
-
done: !0
|
|
349
|
-
};
|
|
350
|
-
}
|
|
351
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
352
|
-
value: GeneratorFunctionPrototype,
|
|
353
|
-
configurable: !0
|
|
354
|
-
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
355
|
-
value: GeneratorFunction,
|
|
356
|
-
configurable: !0
|
|
357
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
358
|
-
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
359
|
-
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
360
|
-
}, exports.mark = function (genFun) {
|
|
361
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
362
|
-
}, exports.awrap = function (arg) {
|
|
363
|
-
return {
|
|
364
|
-
__await: arg
|
|
365
|
-
};
|
|
366
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
367
|
-
return this;
|
|
368
|
-
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
369
|
-
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
370
|
-
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
371
|
-
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
372
|
-
return result.done ? result.value : iter.next();
|
|
373
|
-
});
|
|
374
|
-
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
375
|
-
return this;
|
|
376
|
-
}), define(Gp, "toString", function () {
|
|
377
|
-
return "[object Generator]";
|
|
378
|
-
}), exports.keys = function (val) {
|
|
379
|
-
var object = Object(val),
|
|
380
|
-
keys = [];
|
|
381
|
-
for (var key in object) keys.push(key);
|
|
382
|
-
return keys.reverse(), function next() {
|
|
383
|
-
for (; keys.length;) {
|
|
384
|
-
var key = keys.pop();
|
|
385
|
-
if (key in object) return next.value = key, next.done = !1, next;
|
|
386
|
-
}
|
|
387
|
-
return next.done = !0, next;
|
|
388
|
-
};
|
|
389
|
-
}, exports.values = values, Context.prototype = {
|
|
390
|
-
constructor: Context,
|
|
391
|
-
reset: function reset(skipTempReset) {
|
|
392
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
|
393
|
-
},
|
|
394
|
-
stop: function stop() {
|
|
395
|
-
this.done = !0;
|
|
396
|
-
var rootRecord = this.tryEntries[0].completion;
|
|
397
|
-
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
398
|
-
return this.rval;
|
|
399
|
-
},
|
|
400
|
-
dispatchException: function dispatchException(exception) {
|
|
401
|
-
if (this.done) throw exception;
|
|
402
|
-
var context = this;
|
|
403
|
-
function handle(loc, caught) {
|
|
404
|
-
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
405
|
-
}
|
|
406
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
407
|
-
var entry = this.tryEntries[i],
|
|
408
|
-
record = entry.completion;
|
|
409
|
-
if ("root" === entry.tryLoc) return handle("end");
|
|
410
|
-
if (entry.tryLoc <= this.prev) {
|
|
411
|
-
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
412
|
-
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
413
|
-
if (hasCatch && hasFinally) {
|
|
414
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
415
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
416
|
-
} else if (hasCatch) {
|
|
417
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
418
|
-
} else {
|
|
419
|
-
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
420
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
},
|
|
425
|
-
abrupt: function abrupt(type, arg) {
|
|
426
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
427
|
-
var entry = this.tryEntries[i];
|
|
428
|
-
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
429
|
-
var finallyEntry = entry;
|
|
430
|
-
break;
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
434
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
435
|
-
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
436
|
-
},
|
|
437
|
-
complete: function complete(record, afterLoc) {
|
|
438
|
-
if ("throw" === record.type) throw record.arg;
|
|
439
|
-
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
|
440
|
-
},
|
|
441
|
-
finish: function finish(finallyLoc) {
|
|
442
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
443
|
-
var entry = this.tryEntries[i];
|
|
444
|
-
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
445
|
-
}
|
|
446
|
-
},
|
|
447
|
-
"catch": function _catch(tryLoc) {
|
|
448
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
449
|
-
var entry = this.tryEntries[i];
|
|
450
|
-
if (entry.tryLoc === tryLoc) {
|
|
451
|
-
var record = entry.completion;
|
|
452
|
-
if ("throw" === record.type) {
|
|
453
|
-
var thrown = record.arg;
|
|
454
|
-
resetTryEntry(entry);
|
|
455
|
-
}
|
|
456
|
-
return thrown;
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
throw new Error("illegal catch attempt");
|
|
460
|
-
},
|
|
461
|
-
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
|
|
462
|
-
return this.delegate = {
|
|
463
|
-
iterator: values(iterable),
|
|
464
|
-
resultName: resultName,
|
|
465
|
-
nextLoc: nextLoc
|
|
466
|
-
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
467
|
-
}
|
|
468
|
-
}, exports;
|
|
469
|
-
}
|
|
470
|
-
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
471
|
-
} (regeneratorRuntime$1));
|
|
472
|
-
|
|
473
|
-
// TODO(Babel 8): Remove this file.
|
|
474
|
-
|
|
475
|
-
var runtime = regeneratorRuntime$1.exports();
|
|
476
|
-
var regenerator = runtime;
|
|
477
|
-
|
|
478
|
-
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
|
|
479
|
-
try {
|
|
480
|
-
regeneratorRuntime = runtime;
|
|
481
|
-
} catch (accidentalStrictMode) {
|
|
482
|
-
if (typeof globalThis === "object") {
|
|
483
|
-
globalThis.regeneratorRuntime = runtime;
|
|
484
|
-
} else {
|
|
485
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
var _this = undefined;
|
|
490
|
-
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
491
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
492
|
-
var withEventTargetValue = /*#__PURE__*/curry(function (func, event) {
|
|
493
|
-
return func(event.target.value);
|
|
494
|
-
});
|
|
495
|
-
var getSubdomain = function getSubdomain() {
|
|
496
|
-
var host = window.location.host;
|
|
497
|
-
var parts = host.split(".");
|
|
498
|
-
return parts.length >= 3 ? parts[0] : "";
|
|
499
|
-
};
|
|
500
|
-
var simulateApiCall = function simulateApiCall(result, error) {
|
|
501
|
-
var errorProbability = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0.1;
|
|
502
|
-
var delay = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : getRandomInt(350, 1000);
|
|
503
|
-
return new Promise(function (resolve, reject) {
|
|
504
|
-
return setTimeout(function () {
|
|
505
|
-
var defaultErrorObj = {
|
|
506
|
-
success: false,
|
|
507
|
-
notice: i18next.t("neetoCommons.notice.errorOccurred")
|
|
508
|
-
};
|
|
509
|
-
Math.random() < errorProbability ? reject(_objectSpread$1(_objectSpread$1({}, defaultErrorObj), error)) : resolve(result);
|
|
510
|
-
}, delay);
|
|
511
|
-
});
|
|
512
|
-
};
|
|
513
|
-
var copyToClipboard = /*#__PURE__*/function () {
|
|
514
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(text) {
|
|
515
|
-
var _ref2,
|
|
516
|
-
_ref2$showToastr,
|
|
517
|
-
showToastr,
|
|
518
|
-
_ref2$message,
|
|
519
|
-
message,
|
|
520
|
-
textArea,
|
|
521
|
-
_args = arguments;
|
|
522
|
-
return regenerator.wrap(function _callee$(_context) {
|
|
523
|
-
while (1) switch (_context.prev = _context.next) {
|
|
524
|
-
case 0:
|
|
525
|
-
_ref2 = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}, _ref2$showToastr = _ref2.showToastr, showToastr = _ref2$showToastr === void 0 ? true : _ref2$showToastr, _ref2$message = _ref2.message, message = _ref2$message === void 0 ? i18next.t("neetoCommons.toastr.success.copiedToClipboard") : _ref2$message;
|
|
526
|
-
_context.prev = 1;
|
|
527
|
-
if (!(navigator.clipboard && window.isSecureContext)) {
|
|
528
|
-
_context.next = 7;
|
|
529
|
-
break;
|
|
530
|
-
}
|
|
531
|
-
_context.next = 5;
|
|
532
|
-
return navigator.clipboard.writeText(text);
|
|
533
|
-
case 5:
|
|
534
|
-
_context.next = 17;
|
|
535
|
-
break;
|
|
536
|
-
case 7:
|
|
537
|
-
textArea = document.createElement("textarea");
|
|
538
|
-
textArea.value = text;
|
|
539
|
-
textArea.style.top = "0";
|
|
540
|
-
textArea.style.left = "0";
|
|
541
|
-
textArea.style.position = "fixed";
|
|
542
|
-
document.body.appendChild(textArea);
|
|
543
|
-
textArea.focus();
|
|
544
|
-
textArea.select();
|
|
545
|
-
document.execCommand("copy");
|
|
546
|
-
document.body.removeChild(textArea);
|
|
547
|
-
case 17:
|
|
548
|
-
showToastr && Toastr.success(message);
|
|
549
|
-
_context.next = 23;
|
|
550
|
-
break;
|
|
551
|
-
case 20:
|
|
552
|
-
_context.prev = 20;
|
|
553
|
-
_context.t0 = _context["catch"](1);
|
|
554
|
-
Toastr.error(_context.t0);
|
|
555
|
-
case 23:
|
|
556
|
-
case "end":
|
|
557
|
-
return _context.stop();
|
|
558
|
-
}
|
|
559
|
-
}, _callee, null, [[1, 20]]);
|
|
560
|
-
}));
|
|
561
|
-
return function copyToClipboard(_x) {
|
|
562
|
-
return _ref.apply(this, arguments);
|
|
563
|
-
};
|
|
564
|
-
}();
|
|
565
|
-
var buildUrl = function buildUrl(route, params) {
|
|
566
|
-
var placeHolders = [];
|
|
567
|
-
toPairs(params).forEach(function (_ref3) {
|
|
568
|
-
var _ref4 = _slicedToArray(_ref3, 2),
|
|
569
|
-
key = _ref4[0],
|
|
570
|
-
value = _ref4[1];
|
|
571
|
-
if (route.includes(":".concat(key))) {
|
|
572
|
-
placeHolders.push(key);
|
|
573
|
-
route = route.replace(":".concat(key), encodeURIComponent(value));
|
|
574
|
-
}
|
|
575
|
-
});
|
|
576
|
-
var queryParams = pipe(omit(placeHolders), preprocessForSerialization, stringify)(params);
|
|
577
|
-
return isEmpty(queryParams) ? route : "".concat(route, "?").concat(queryParams);
|
|
578
|
-
};
|
|
579
|
-
var toLocale = function toLocale(number) {
|
|
580
|
-
var _window$globalProps, _window$globalProps$u;
|
|
581
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
582
|
-
return Number(number).toLocaleString(((_window$globalProps = window.globalProps) === null || _window$globalProps === void 0 ? void 0 : (_window$globalProps$u = _window$globalProps.user) === null || _window$globalProps$u === void 0 ? void 0 : _window$globalProps$u.locale) || navigator.language || navigator.languages[0], options);
|
|
583
|
-
};
|
|
584
|
-
var getQueryParams = function getQueryParams() {
|
|
585
|
-
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
586
|
-
return parse(location.search, _objectSpread$1({
|
|
587
|
-
ignoreQueryPrefix: true
|
|
588
|
-
}, options));
|
|
589
|
-
};
|
|
590
|
-
var joinHyphenCase = function joinHyphenCase() {
|
|
591
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
592
|
-
args[_key] = arguments[_key];
|
|
593
|
-
}
|
|
594
|
-
return args.join(" ").replace(/\s+/g, "-").toLowerCase();
|
|
595
|
-
};
|
|
596
|
-
var hyphenize = function hyphenize(value) {
|
|
597
|
-
var fallbackString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
598
|
-
if (typeof value === "number") return String(value);
|
|
599
|
-
if (value && typeof value === "string" && value.replace) {
|
|
600
|
-
return value.replace(/[\s_]/g, "-").replace(/([a-z])([A-Z])/g, "$1-$2").replace(/-+/g, "-").toLowerCase();
|
|
601
|
-
}
|
|
602
|
-
return fallbackString;
|
|
603
|
-
};
|
|
604
|
-
var debounce = function debounce(func) {
|
|
605
|
-
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 350;
|
|
606
|
-
var timer;
|
|
607
|
-
return function () {
|
|
608
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
609
|
-
args[_key2] = arguments[_key2];
|
|
610
|
-
}
|
|
611
|
-
clearTimeout(timer);
|
|
612
|
-
timer = setTimeout(function () {
|
|
613
|
-
return func.apply(_this, args);
|
|
614
|
-
}, delay);
|
|
615
|
-
};
|
|
616
|
-
};
|
|
617
|
-
var getFromLocalStorage = function getFromLocalStorage(key) {
|
|
618
|
-
try {
|
|
619
|
-
return JSON.parse(localStorage.getItem(key));
|
|
620
|
-
} catch (_unused) {
|
|
621
|
-
return null;
|
|
622
|
-
}
|
|
623
|
-
};
|
|
624
|
-
var setToLocalStorage = function setToLocalStorage(key, value) {
|
|
625
|
-
return localStorage.setItem(key, JSON.stringify(value));
|
|
626
|
-
};
|
|
627
|
-
var removeFromLocalStorage = function removeFromLocalStorage(key) {
|
|
628
|
-
return localStorage.removeItem(key);
|
|
629
|
-
};
|
|
630
|
-
|
|
631
|
-
dayjs.extend(relativeTime);
|
|
632
|
-
dayjs.extend(updateLocale);
|
|
633
|
-
var getDefaultFormat = function getDefaultFormat() {
|
|
634
|
-
var _globalProps$user$dat, _globalProps, _globalProps$user;
|
|
635
|
-
return (_globalProps$user$dat = (_globalProps = globalProps) === null || _globalProps === void 0 ? void 0 : (_globalProps$user = _globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.dateFormat) !== null && _globalProps$user$dat !== void 0 ? _globalProps$user$dat : "DD/MM/YYYY";
|
|
636
|
-
};
|
|
637
|
-
var timeFormat = {
|
|
638
|
-
fromNow: function fromNow(time) {
|
|
639
|
-
return dayjs(time).fromNow();
|
|
640
|
-
},
|
|
641
|
-
time: function time(_time) {
|
|
642
|
-
return dayjs(_time).format("h:mm A");
|
|
643
|
-
},
|
|
644
|
-
timeWithSeconds: function timeWithSeconds(time) {
|
|
645
|
-
return dayjs(time).format("h:mm:ss A");
|
|
646
|
-
},
|
|
647
|
-
date: function date(time) {
|
|
648
|
-
return dayjs(time).format("MMM D, YYYY");
|
|
649
|
-
},
|
|
650
|
-
dateWeek: function dateWeek(time) {
|
|
651
|
-
return dayjs(time).format("MMM D, YYYY ddd");
|
|
652
|
-
},
|
|
653
|
-
dateWeekDayExtended: function dateWeekDayExtended(time) {
|
|
654
|
-
return dayjs(time).format("MMM D, YYYY dddd");
|
|
655
|
-
},
|
|
656
|
-
dateWeekWithoutYear: function dateWeekWithoutYear(time) {
|
|
657
|
-
return dayjs(time).format("MMM D, ddd");
|
|
658
|
-
},
|
|
659
|
-
dateWeekWithoutYearDayExtended: function dateWeekWithoutYearDayExtended(time) {
|
|
660
|
-
return dayjs(time).format("MMM D, dddd");
|
|
661
|
-
},
|
|
662
|
-
dateTime: function dateTime(time) {
|
|
663
|
-
return dayjs(time).format("MMM D, YYYY h:mm A");
|
|
664
|
-
},
|
|
665
|
-
dateTimeWithSeconds: function dateTimeWithSeconds(time) {
|
|
666
|
-
return dayjs(time).format("MMM D, YYYY h:mm:ss A");
|
|
667
|
-
},
|
|
668
|
-
dateWeekTime: function dateWeekTime(time) {
|
|
669
|
-
return dayjs(time).format("MMM D, YYYY ddd h:mm A");
|
|
670
|
-
},
|
|
671
|
-
dateWeekTimeDayExtended: function dateWeekTimeDayExtended(time) {
|
|
672
|
-
return dayjs(time).format("MMM D, YYYY dddd h:mm A");
|
|
673
|
-
},
|
|
674
|
-
extended: function extended(time) {
|
|
675
|
-
var dateTime = dayjs(time).format("dddd MMMM D, YYYY h:mm A");
|
|
676
|
-
var fromNow = dayjs(time).fromNow();
|
|
677
|
-
return "".concat(dateTime, " (").concat(fromNow, ")");
|
|
678
|
-
},
|
|
679
|
-
"default": function _default(time) {
|
|
680
|
-
return dayjs(time).format(getDefaultFormat());
|
|
681
|
-
},
|
|
682
|
-
defaultWithTime: function defaultWithTime(time) {
|
|
683
|
-
return dayjs(time).format("".concat(getDefaultFormat(), " hh:mm:ss A"));
|
|
684
|
-
}
|
|
685
|
-
};
|
|
686
|
-
var dateFormat = timeFormat;
|
|
687
|
-
|
|
688
|
-
var hasPermission = function hasPermission(permission) {
|
|
689
|
-
return globalProps.permissions.includes(permission);
|
|
690
|
-
};
|
|
691
|
-
var hasAnyPermission = function hasAnyPermission() {
|
|
692
|
-
for (var _len = arguments.length, permissions = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
693
|
-
permissions[_key] = arguments[_key];
|
|
694
|
-
}
|
|
695
|
-
return permissions.some(hasPermission);
|
|
696
|
-
};
|
|
697
|
-
var hasAllPermissions = function hasAllPermissions() {
|
|
698
|
-
for (var _len2 = arguments.length, permissions = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
699
|
-
permissions[_key2] = arguments[_key2];
|
|
700
|
-
}
|
|
701
|
-
return permissions.every(hasPermission);
|
|
702
|
-
};
|
|
703
|
-
|
|
704
|
-
var adapters = {
|
|
705
|
-
logger: self.console,
|
|
706
|
-
WebSocket: self.WebSocket
|
|
707
|
-
};
|
|
708
|
-
|
|
709
|
-
var logger = {
|
|
710
|
-
log(...messages) {
|
|
711
|
-
if (this.enabled) {
|
|
712
|
-
messages.push(Date.now());
|
|
713
|
-
adapters.logger.log("[ActionCable]", ...messages);
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
};
|
|
717
|
-
|
|
718
|
-
const now = () => (new Date).getTime();
|
|
719
|
-
|
|
720
|
-
const secondsSince = time => (now() - time) / 1e3;
|
|
721
|
-
|
|
722
|
-
class ConnectionMonitor {
|
|
723
|
-
constructor(connection) {
|
|
724
|
-
this.visibilityDidChange = this.visibilityDidChange.bind(this);
|
|
725
|
-
this.connection = connection;
|
|
726
|
-
this.reconnectAttempts = 0;
|
|
727
|
-
}
|
|
728
|
-
start() {
|
|
729
|
-
if (!this.isRunning()) {
|
|
730
|
-
this.startedAt = now();
|
|
731
|
-
delete this.stoppedAt;
|
|
732
|
-
this.startPolling();
|
|
733
|
-
addEventListener("visibilitychange", this.visibilityDidChange);
|
|
734
|
-
logger.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`);
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
stop() {
|
|
738
|
-
if (this.isRunning()) {
|
|
739
|
-
this.stoppedAt = now();
|
|
740
|
-
this.stopPolling();
|
|
741
|
-
removeEventListener("visibilitychange", this.visibilityDidChange);
|
|
742
|
-
logger.log("ConnectionMonitor stopped");
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
isRunning() {
|
|
746
|
-
return this.startedAt && !this.stoppedAt;
|
|
747
|
-
}
|
|
748
|
-
recordPing() {
|
|
749
|
-
this.pingedAt = now();
|
|
750
|
-
}
|
|
751
|
-
recordConnect() {
|
|
752
|
-
this.reconnectAttempts = 0;
|
|
753
|
-
this.recordPing();
|
|
754
|
-
delete this.disconnectedAt;
|
|
755
|
-
logger.log("ConnectionMonitor recorded connect");
|
|
756
|
-
}
|
|
757
|
-
recordDisconnect() {
|
|
758
|
-
this.disconnectedAt = now();
|
|
759
|
-
logger.log("ConnectionMonitor recorded disconnect");
|
|
760
|
-
}
|
|
761
|
-
startPolling() {
|
|
762
|
-
this.stopPolling();
|
|
763
|
-
this.poll();
|
|
764
|
-
}
|
|
765
|
-
stopPolling() {
|
|
766
|
-
clearTimeout(this.pollTimeout);
|
|
767
|
-
}
|
|
768
|
-
poll() {
|
|
769
|
-
this.pollTimeout = setTimeout((() => {
|
|
770
|
-
this.reconnectIfStale();
|
|
771
|
-
this.poll();
|
|
772
|
-
}), this.getPollInterval());
|
|
773
|
-
}
|
|
774
|
-
getPollInterval() {
|
|
775
|
-
const {staleThreshold: staleThreshold, reconnectionBackoffRate: reconnectionBackoffRate} = this.constructor;
|
|
776
|
-
const backoff = Math.pow(1 + reconnectionBackoffRate, Math.min(this.reconnectAttempts, 10));
|
|
777
|
-
const jitterMax = this.reconnectAttempts === 0 ? 1 : reconnectionBackoffRate;
|
|
778
|
-
const jitter = jitterMax * Math.random();
|
|
779
|
-
return staleThreshold * 1e3 * backoff * (1 + jitter);
|
|
780
|
-
}
|
|
781
|
-
reconnectIfStale() {
|
|
782
|
-
if (this.connectionIsStale()) {
|
|
783
|
-
logger.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${secondsSince(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`);
|
|
784
|
-
this.reconnectAttempts++;
|
|
785
|
-
if (this.disconnectedRecently()) {
|
|
786
|
-
logger.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${secondsSince(this.disconnectedAt)} s`);
|
|
787
|
-
} else {
|
|
788
|
-
logger.log("ConnectionMonitor reopening");
|
|
789
|
-
this.connection.reopen();
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
get refreshedAt() {
|
|
794
|
-
return this.pingedAt ? this.pingedAt : this.startedAt;
|
|
795
|
-
}
|
|
796
|
-
connectionIsStale() {
|
|
797
|
-
return secondsSince(this.refreshedAt) > this.constructor.staleThreshold;
|
|
798
|
-
}
|
|
799
|
-
disconnectedRecently() {
|
|
800
|
-
return this.disconnectedAt && secondsSince(this.disconnectedAt) < this.constructor.staleThreshold;
|
|
801
|
-
}
|
|
802
|
-
visibilityDidChange() {
|
|
803
|
-
if (document.visibilityState === "visible") {
|
|
804
|
-
setTimeout((() => {
|
|
805
|
-
if (this.connectionIsStale() || !this.connection.isOpen()) {
|
|
806
|
-
logger.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`);
|
|
807
|
-
this.connection.reopen();
|
|
808
|
-
}
|
|
809
|
-
}), 200);
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
ConnectionMonitor.staleThreshold = 6;
|
|
815
|
-
|
|
816
|
-
ConnectionMonitor.reconnectionBackoffRate = .15;
|
|
817
|
-
|
|
818
|
-
var INTERNAL = {
|
|
819
|
-
message_types: {
|
|
820
|
-
welcome: "welcome",
|
|
821
|
-
disconnect: "disconnect",
|
|
822
|
-
ping: "ping",
|
|
823
|
-
confirmation: "confirm_subscription",
|
|
824
|
-
rejection: "reject_subscription"
|
|
825
|
-
},
|
|
826
|
-
disconnect_reasons: {
|
|
827
|
-
unauthorized: "unauthorized",
|
|
828
|
-
invalid_request: "invalid_request",
|
|
829
|
-
server_restart: "server_restart"
|
|
830
|
-
},
|
|
831
|
-
default_mount_path: "/cable",
|
|
832
|
-
protocols: [ "actioncable-v1-json", "actioncable-unsupported" ]
|
|
833
|
-
};
|
|
834
|
-
|
|
835
|
-
const {message_types: message_types, protocols: protocols} = INTERNAL;
|
|
836
|
-
|
|
837
|
-
const supportedProtocols = protocols.slice(0, protocols.length - 1);
|
|
838
|
-
|
|
839
|
-
const indexOf = [].indexOf;
|
|
840
|
-
|
|
841
|
-
class Connection {
|
|
842
|
-
constructor(consumer) {
|
|
843
|
-
this.open = this.open.bind(this);
|
|
844
|
-
this.consumer = consumer;
|
|
845
|
-
this.subscriptions = this.consumer.subscriptions;
|
|
846
|
-
this.monitor = new ConnectionMonitor(this);
|
|
847
|
-
this.disconnected = true;
|
|
848
|
-
}
|
|
849
|
-
send(data) {
|
|
850
|
-
if (this.isOpen()) {
|
|
851
|
-
this.webSocket.send(JSON.stringify(data));
|
|
852
|
-
return true;
|
|
853
|
-
} else {
|
|
854
|
-
return false;
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
open() {
|
|
858
|
-
if (this.isActive()) {
|
|
859
|
-
logger.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`);
|
|
860
|
-
return false;
|
|
861
|
-
} else {
|
|
862
|
-
logger.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${protocols}`);
|
|
863
|
-
if (this.webSocket) {
|
|
864
|
-
this.uninstallEventHandlers();
|
|
865
|
-
}
|
|
866
|
-
this.webSocket = new adapters.WebSocket(this.consumer.url, protocols);
|
|
867
|
-
this.installEventHandlers();
|
|
868
|
-
this.monitor.start();
|
|
869
|
-
return true;
|
|
870
|
-
}
|
|
871
|
-
}
|
|
872
|
-
close({allowReconnect: allowReconnect} = {
|
|
873
|
-
allowReconnect: true
|
|
874
|
-
}) {
|
|
875
|
-
if (!allowReconnect) {
|
|
876
|
-
this.monitor.stop();
|
|
877
|
-
}
|
|
878
|
-
if (this.isOpen()) {
|
|
879
|
-
return this.webSocket.close();
|
|
880
|
-
}
|
|
881
|
-
}
|
|
882
|
-
reopen() {
|
|
883
|
-
logger.log(`Reopening WebSocket, current state is ${this.getState()}`);
|
|
884
|
-
if (this.isActive()) {
|
|
885
|
-
try {
|
|
886
|
-
return this.close();
|
|
887
|
-
} catch (error) {
|
|
888
|
-
logger.log("Failed to reopen WebSocket", error);
|
|
889
|
-
} finally {
|
|
890
|
-
logger.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`);
|
|
891
|
-
setTimeout(this.open, this.constructor.reopenDelay);
|
|
892
|
-
}
|
|
893
|
-
} else {
|
|
894
|
-
return this.open();
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
|
-
getProtocol() {
|
|
898
|
-
if (this.webSocket) {
|
|
899
|
-
return this.webSocket.protocol;
|
|
900
|
-
}
|
|
901
|
-
}
|
|
902
|
-
isOpen() {
|
|
903
|
-
return this.isState("open");
|
|
904
|
-
}
|
|
905
|
-
isActive() {
|
|
906
|
-
return this.isState("open", "connecting");
|
|
907
|
-
}
|
|
908
|
-
isProtocolSupported() {
|
|
909
|
-
return indexOf.call(supportedProtocols, this.getProtocol()) >= 0;
|
|
910
|
-
}
|
|
911
|
-
isState(...states) {
|
|
912
|
-
return indexOf.call(states, this.getState()) >= 0;
|
|
913
|
-
}
|
|
914
|
-
getState() {
|
|
915
|
-
if (this.webSocket) {
|
|
916
|
-
for (let state in adapters.WebSocket) {
|
|
917
|
-
if (adapters.WebSocket[state] === this.webSocket.readyState) {
|
|
918
|
-
return state.toLowerCase();
|
|
919
|
-
}
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
return null;
|
|
923
|
-
}
|
|
924
|
-
installEventHandlers() {
|
|
925
|
-
for (let eventName in this.events) {
|
|
926
|
-
const handler = this.events[eventName].bind(this);
|
|
927
|
-
this.webSocket[`on${eventName}`] = handler;
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
uninstallEventHandlers() {
|
|
931
|
-
for (let eventName in this.events) {
|
|
932
|
-
this.webSocket[`on${eventName}`] = function() {};
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
Connection.reopenDelay = 500;
|
|
938
|
-
|
|
939
|
-
Connection.prototype.events = {
|
|
940
|
-
message(event) {
|
|
941
|
-
if (!this.isProtocolSupported()) {
|
|
942
|
-
return;
|
|
943
|
-
}
|
|
944
|
-
const {identifier: identifier, message: message, reason: reason, reconnect: reconnect, type: type} = JSON.parse(event.data);
|
|
945
|
-
switch (type) {
|
|
946
|
-
case message_types.welcome:
|
|
947
|
-
this.monitor.recordConnect();
|
|
948
|
-
return this.subscriptions.reload();
|
|
949
|
-
|
|
950
|
-
case message_types.disconnect:
|
|
951
|
-
logger.log(`Disconnecting. Reason: ${reason}`);
|
|
952
|
-
return this.close({
|
|
953
|
-
allowReconnect: reconnect
|
|
954
|
-
});
|
|
955
|
-
|
|
956
|
-
case message_types.ping:
|
|
957
|
-
return this.monitor.recordPing();
|
|
958
|
-
|
|
959
|
-
case message_types.confirmation:
|
|
960
|
-
this.subscriptions.confirmSubscription(identifier);
|
|
961
|
-
return this.subscriptions.notify(identifier, "connected");
|
|
962
|
-
|
|
963
|
-
case message_types.rejection:
|
|
964
|
-
return this.subscriptions.reject(identifier);
|
|
965
|
-
|
|
966
|
-
default:
|
|
967
|
-
return this.subscriptions.notify(identifier, "received", message);
|
|
968
|
-
}
|
|
969
|
-
},
|
|
970
|
-
open() {
|
|
971
|
-
logger.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`);
|
|
972
|
-
this.disconnected = false;
|
|
973
|
-
if (!this.isProtocolSupported()) {
|
|
974
|
-
logger.log("Protocol is unsupported. Stopping monitor and disconnecting.");
|
|
975
|
-
return this.close({
|
|
976
|
-
allowReconnect: false
|
|
977
|
-
});
|
|
978
|
-
}
|
|
979
|
-
},
|
|
980
|
-
close(event) {
|
|
981
|
-
logger.log("WebSocket onclose event");
|
|
982
|
-
if (this.disconnected) {
|
|
983
|
-
return;
|
|
984
|
-
}
|
|
985
|
-
this.disconnected = true;
|
|
986
|
-
this.monitor.recordDisconnect();
|
|
987
|
-
return this.subscriptions.notifyAll("disconnected", {
|
|
988
|
-
willAttemptReconnect: this.monitor.isRunning()
|
|
989
|
-
});
|
|
990
|
-
},
|
|
991
|
-
error() {
|
|
992
|
-
logger.log("WebSocket onerror event");
|
|
993
|
-
}
|
|
994
|
-
};
|
|
995
|
-
|
|
996
|
-
const extend = function(object, properties) {
|
|
997
|
-
if (properties != null) {
|
|
998
|
-
for (let key in properties) {
|
|
999
|
-
const value = properties[key];
|
|
1000
|
-
object[key] = value;
|
|
1001
|
-
}
|
|
1002
|
-
}
|
|
1003
|
-
return object;
|
|
1004
|
-
};
|
|
1005
|
-
|
|
1006
|
-
class Subscription {
|
|
1007
|
-
constructor(consumer, params = {}, mixin) {
|
|
1008
|
-
this.consumer = consumer;
|
|
1009
|
-
this.identifier = JSON.stringify(params);
|
|
1010
|
-
extend(this, mixin);
|
|
1011
|
-
}
|
|
1012
|
-
perform(action, data = {}) {
|
|
1013
|
-
data.action = action;
|
|
1014
|
-
return this.send(data);
|
|
1015
|
-
}
|
|
1016
|
-
send(data) {
|
|
1017
|
-
return this.consumer.send({
|
|
1018
|
-
command: "message",
|
|
1019
|
-
identifier: this.identifier,
|
|
1020
|
-
data: JSON.stringify(data)
|
|
1021
|
-
});
|
|
1022
|
-
}
|
|
1023
|
-
unsubscribe() {
|
|
1024
|
-
return this.consumer.subscriptions.remove(this);
|
|
1025
|
-
}
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
class SubscriptionGuarantor {
|
|
1029
|
-
constructor(subscriptions) {
|
|
1030
|
-
this.subscriptions = subscriptions;
|
|
1031
|
-
this.pendingSubscriptions = [];
|
|
1032
|
-
}
|
|
1033
|
-
guarantee(subscription) {
|
|
1034
|
-
if (this.pendingSubscriptions.indexOf(subscription) == -1) {
|
|
1035
|
-
logger.log(`SubscriptionGuarantor guaranteeing ${subscription.identifier}`);
|
|
1036
|
-
this.pendingSubscriptions.push(subscription);
|
|
1037
|
-
} else {
|
|
1038
|
-
logger.log(`SubscriptionGuarantor already guaranteeing ${subscription.identifier}`);
|
|
1039
|
-
}
|
|
1040
|
-
this.startGuaranteeing();
|
|
1041
|
-
}
|
|
1042
|
-
forget(subscription) {
|
|
1043
|
-
logger.log(`SubscriptionGuarantor forgetting ${subscription.identifier}`);
|
|
1044
|
-
this.pendingSubscriptions = this.pendingSubscriptions.filter((s => s !== subscription));
|
|
1045
|
-
}
|
|
1046
|
-
startGuaranteeing() {
|
|
1047
|
-
this.stopGuaranteeing();
|
|
1048
|
-
this.retrySubscribing();
|
|
1049
|
-
}
|
|
1050
|
-
stopGuaranteeing() {
|
|
1051
|
-
clearTimeout(this.retryTimeout);
|
|
1052
|
-
}
|
|
1053
|
-
retrySubscribing() {
|
|
1054
|
-
this.retryTimeout = setTimeout((() => {
|
|
1055
|
-
if (this.subscriptions && typeof this.subscriptions.subscribe === "function") {
|
|
1056
|
-
this.pendingSubscriptions.map((subscription => {
|
|
1057
|
-
logger.log(`SubscriptionGuarantor resubscribing ${subscription.identifier}`);
|
|
1058
|
-
this.subscriptions.subscribe(subscription);
|
|
1059
|
-
}));
|
|
1060
|
-
}
|
|
1061
|
-
}), 500);
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
|
-
class Subscriptions {
|
|
1066
|
-
constructor(consumer) {
|
|
1067
|
-
this.consumer = consumer;
|
|
1068
|
-
this.guarantor = new SubscriptionGuarantor(this);
|
|
1069
|
-
this.subscriptions = [];
|
|
1070
|
-
}
|
|
1071
|
-
create(channelName, mixin) {
|
|
1072
|
-
const channel = channelName;
|
|
1073
|
-
const params = typeof channel === "object" ? channel : {
|
|
1074
|
-
channel: channel
|
|
1075
|
-
};
|
|
1076
|
-
const subscription = new Subscription(this.consumer, params, mixin);
|
|
1077
|
-
return this.add(subscription);
|
|
1078
|
-
}
|
|
1079
|
-
add(subscription) {
|
|
1080
|
-
this.subscriptions.push(subscription);
|
|
1081
|
-
this.consumer.ensureActiveConnection();
|
|
1082
|
-
this.notify(subscription, "initialized");
|
|
1083
|
-
this.subscribe(subscription);
|
|
1084
|
-
return subscription;
|
|
1085
|
-
}
|
|
1086
|
-
remove(subscription) {
|
|
1087
|
-
this.forget(subscription);
|
|
1088
|
-
if (!this.findAll(subscription.identifier).length) {
|
|
1089
|
-
this.sendCommand(subscription, "unsubscribe");
|
|
1090
|
-
}
|
|
1091
|
-
return subscription;
|
|
1092
|
-
}
|
|
1093
|
-
reject(identifier) {
|
|
1094
|
-
return this.findAll(identifier).map((subscription => {
|
|
1095
|
-
this.forget(subscription);
|
|
1096
|
-
this.notify(subscription, "rejected");
|
|
1097
|
-
return subscription;
|
|
1098
|
-
}));
|
|
1099
|
-
}
|
|
1100
|
-
forget(subscription) {
|
|
1101
|
-
this.guarantor.forget(subscription);
|
|
1102
|
-
this.subscriptions = this.subscriptions.filter((s => s !== subscription));
|
|
1103
|
-
return subscription;
|
|
1104
|
-
}
|
|
1105
|
-
findAll(identifier) {
|
|
1106
|
-
return this.subscriptions.filter((s => s.identifier === identifier));
|
|
1107
|
-
}
|
|
1108
|
-
reload() {
|
|
1109
|
-
return this.subscriptions.map((subscription => this.subscribe(subscription)));
|
|
1110
|
-
}
|
|
1111
|
-
notifyAll(callbackName, ...args) {
|
|
1112
|
-
return this.subscriptions.map((subscription => this.notify(subscription, callbackName, ...args)));
|
|
1113
|
-
}
|
|
1114
|
-
notify(subscription, callbackName, ...args) {
|
|
1115
|
-
let subscriptions;
|
|
1116
|
-
if (typeof subscription === "string") {
|
|
1117
|
-
subscriptions = this.findAll(subscription);
|
|
1118
|
-
} else {
|
|
1119
|
-
subscriptions = [ subscription ];
|
|
1120
|
-
}
|
|
1121
|
-
return subscriptions.map((subscription => typeof subscription[callbackName] === "function" ? subscription[callbackName](...args) : undefined));
|
|
1122
|
-
}
|
|
1123
|
-
subscribe(subscription) {
|
|
1124
|
-
if (this.sendCommand(subscription, "subscribe")) {
|
|
1125
|
-
this.guarantor.guarantee(subscription);
|
|
1126
|
-
}
|
|
1127
|
-
}
|
|
1128
|
-
confirmSubscription(identifier) {
|
|
1129
|
-
logger.log(`Subscription confirmed ${identifier}`);
|
|
1130
|
-
this.findAll(identifier).map((subscription => this.guarantor.forget(subscription)));
|
|
1131
|
-
}
|
|
1132
|
-
sendCommand(subscription, command) {
|
|
1133
|
-
const {identifier: identifier} = subscription;
|
|
1134
|
-
return this.consumer.send({
|
|
1135
|
-
command: command,
|
|
1136
|
-
identifier: identifier
|
|
1137
|
-
});
|
|
1138
|
-
}
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
|
-
class Consumer {
|
|
1142
|
-
constructor(url) {
|
|
1143
|
-
this._url = url;
|
|
1144
|
-
this.subscriptions = new Subscriptions(this);
|
|
1145
|
-
this.connection = new Connection(this);
|
|
1146
|
-
}
|
|
1147
|
-
get url() {
|
|
1148
|
-
return createWebSocketURL(this._url);
|
|
1149
|
-
}
|
|
1150
|
-
send(data) {
|
|
1151
|
-
return this.connection.send(data);
|
|
1152
|
-
}
|
|
1153
|
-
connect() {
|
|
1154
|
-
return this.connection.open();
|
|
1155
|
-
}
|
|
1156
|
-
disconnect() {
|
|
1157
|
-
return this.connection.close({
|
|
1158
|
-
allowReconnect: false
|
|
1159
|
-
});
|
|
1160
|
-
}
|
|
1161
|
-
ensureActiveConnection() {
|
|
1162
|
-
if (!this.connection.isActive()) {
|
|
1163
|
-
return this.connection.open();
|
|
1164
|
-
}
|
|
1165
|
-
}
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1168
|
-
function createWebSocketURL(url) {
|
|
1169
|
-
if (typeof url === "function") {
|
|
1170
|
-
url = url();
|
|
1171
|
-
}
|
|
1172
|
-
if (url && !/^wss?:/i.test(url)) {
|
|
1173
|
-
const a = document.createElement("a");
|
|
1174
|
-
a.href = url;
|
|
1175
|
-
a.href = a.href;
|
|
1176
|
-
a.protocol = a.protocol.replace("http", "ws");
|
|
1177
|
-
return a.href;
|
|
1178
|
-
} else {
|
|
1179
|
-
return url;
|
|
1180
|
-
}
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
function createConsumer(url = getConfig("url") || INTERNAL.default_mount_path) {
|
|
1184
|
-
return new Consumer(url);
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
|
-
function getConfig(name) {
|
|
1188
|
-
const element = document.head.querySelector(`meta[name='action-cable-${name}']`);
|
|
1189
|
-
if (element) {
|
|
1190
|
-
return element.getAttribute("content");
|
|
1191
|
-
}
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
|
-
var getWebsocketURL = function getWebsocketURL() {
|
|
1195
|
-
var _document$querySelect;
|
|
1196
|
-
var websocketURL = (_document$querySelect = document.querySelector('meta[name="action-cable-url"]')) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.content;
|
|
1197
|
-
return buildUrl(websocketURL, {
|
|
1198
|
-
subdomain: globalProps.organization.subdomain
|
|
1199
|
-
});
|
|
1200
|
-
};
|
|
1201
|
-
var consumer = createConsumer(getWebsocketURL);
|
|
1202
|
-
var createSubscription = function createSubscription(channelName, callbacks) {
|
|
1203
|
-
var subscription = consumer.subscriptions.create(channelName, callbacks);
|
|
1204
|
-
return subscription;
|
|
1205
|
-
};
|
|
1206
|
-
|
|
1207
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1208
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1209
|
-
var getAmountWithSymbol = function getAmountWithSymbol(amount, options) {
|
|
1210
|
-
var formatter = new Intl.NumberFormat(dayjs.locale(), _objectSpread({}, options));
|
|
1211
|
-
return formatter.format(Number(amount));
|
|
1212
|
-
};
|
|
1213
|
-
var currencyFormat = {
|
|
1214
|
-
withAmount: function withAmount(amount) {
|
|
1215
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
1216
|
-
minimumFractionDigits: 2
|
|
1217
|
-
};
|
|
1218
|
-
return getAmountWithSymbol(amount, _objectSpread({
|
|
1219
|
-
style: undefined
|
|
1220
|
-
}, options));
|
|
1221
|
-
},
|
|
1222
|
-
// 1000, { maximumFractionDigits: 1 } => 1,000.0
|
|
1223
|
-
withSymbol: function withSymbol(amount, currency, options) {
|
|
1224
|
-
return getAmountWithSymbol(amount, _objectSpread(_objectSpread({}, options), {}, {
|
|
1225
|
-
style: "currency",
|
|
1226
|
-
currency: currency
|
|
1227
|
-
}));
|
|
1228
|
-
},
|
|
1229
|
-
// 1000, "INR", { maximumFractionDigits: 0 } => ₹1,000
|
|
1230
|
-
withCode: function withCode(amount, currency) {
|
|
1231
|
-
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
|
|
1232
|
-
minimumFractionDigits: 2
|
|
1233
|
-
};
|
|
1234
|
-
return "".concat(getAmountWithSymbol(amount, _objectSpread(_objectSpread({}, options), {}, {
|
|
1235
|
-
style: undefined
|
|
1236
|
-
})), " ").concat(currency);
|
|
1237
|
-
},
|
|
1238
|
-
// 1000, "USD" => 1,000.00 USD
|
|
1239
|
-
withSymbolAndCode: function withSymbolAndCode(amount, currency, options) {
|
|
1240
|
-
return "".concat(getAmountWithSymbol(amount, _objectSpread(_objectSpread({}, options), {}, {
|
|
1241
|
-
style: "currency",
|
|
1242
|
-
currency: currency
|
|
1243
|
-
})), " ").concat(currency);
|
|
1244
|
-
} // 1000, "INR", { maximumFractionDigits: 0 } => ₹1,000 INR
|
|
1245
|
-
};
|
|
1246
|
-
|
|
1247
|
-
export { buildUrl, copyToClipboard, createSubscription, currencyFormat, dateFormat, debounce, getFromLocalStorage, getQueryParams, getSubdomain, hasAllPermissions, hasAnyPermission, hasPermission, hyphenize, joinHyphenCase, removeFromLocalStorage, resetAuthTokens, setToLocalStorage, simulateApiCall, timeFormat, toLocale, withEventTargetValue };
|
|
1248
|
-
//# sourceMappingURL=utils.js.map
|