@bigbinary/neeto-commons-frontend 4.4.10-beta-1 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/configs/scripts/dead-code-eliminator/constants.js +10 -1
- package/cjs/configs/scripts/dead-code-eliminator/index.js +3 -1
- package/cjs/constants/index.js +6 -12
- package/cjs/constants/index.js.map +1 -1
- package/cjs/constants/regex.js +3 -6
- package/cjs/constants/regex.js.map +1 -1
- package/cjs/cypress-utils/commands.js +3 -4
- package/cjs/cypress-utils/commands.js.map +1 -1
- package/cjs/cypress-utils/constants/index.js +1 -2
- package/cjs/cypress-utils/constants/index.js.map +1 -1
- package/cjs/cypress-utils/constants/routes.js +2 -4
- package/cjs/cypress-utils/constants/routes.js.map +1 -1
- package/cjs/cypress-utils/constants/selectors/common.js +3 -6
- package/cjs/cypress-utils/constants/selectors/common.js.map +1 -1
- package/cjs/cypress-utils/constants/selectors/editor.js +1 -2
- package/cjs/cypress-utils/constants/selectors/editor.js.map +1 -1
- package/cjs/cypress-utils/constants/selectors/ipRestriction.js +1 -2
- package/cjs/cypress-utils/constants/selectors/ipRestriction.js.map +1 -1
- package/cjs/cypress-utils/constants/selectors/login.js +1 -2
- package/cjs/cypress-utils/constants/selectors/login.js.map +1 -1
- package/cjs/cypress-utils/constants/selectors/member.js +3 -6
- package/cjs/cypress-utils/constants/selectors/member.js.map +1 -1
- package/cjs/cypress-utils/constants/selectors/navigation.js +2 -4
- package/cjs/cypress-utils/constants/selectors/navigation.js.map +1 -1
- package/cjs/cypress-utils/constants/selectors/roles.js +1 -2
- package/cjs/cypress-utils/constants/selectors/roles.js.map +1 -1
- package/cjs/cypress-utils/constants/selectors/signUp.js +1 -2
- package/cjs/cypress-utils/constants/selectors/signUp.js.map +1 -1
- package/cjs/cypress-utils/constants/selectors/tags.js +2 -4
- package/cjs/cypress-utils/constants/selectors/tags.js.map +1 -1
- package/cjs/cypress-utils/constants/texts/common.js +1 -2
- package/cjs/cypress-utils/constants/texts/common.js.map +1 -1
- package/cjs/cypress-utils/constants/texts/member.js +3 -6
- package/cjs/cypress-utils/constants/texts/member.js.map +1 -1
- package/cjs/cypress-utils/constants/texts/navigation.js +2 -4
- package/cjs/cypress-utils/constants/texts/navigation.js.map +1 -1
- package/cjs/cypress-utils/constants/texts/roles.js +1 -2
- package/cjs/cypress-utils/constants/texts/roles.js.map +1 -1
- package/cjs/cypress-utils/constants/texts/signUp.js +1 -2
- package/cjs/cypress-utils/constants/texts/signUp.js.map +1 -1
- package/cjs/cypress-utils/constants/texts/tags.js +1 -2
- package/cjs/cypress-utils/constants/texts/tags.js.map +1 -1
- package/cjs/cypress-utils/fixtures/fake.js +1 -2
- package/cjs/cypress-utils/fixtures/fake.js.map +1 -1
- package/cjs/cypress-utils/index.js.map +1 -1
- package/cjs/cypress-utils/utils/authentication.js +1 -2
- package/cjs/cypress-utils/utils/authentication.js.map +1 -1
- package/cjs/cypress-utils/utils/common.js +13 -24
- package/cjs/cypress-utils/utils/common.js.map +1 -1
- package/cjs/cypress-utils/utils/date.js +1 -2
- package/cjs/cypress-utils/utils/date.js.map +1 -1
- package/cjs/cypress-utils/utils/email.js +2 -4
- package/cjs/cypress-utils/utils/email.js.map +1 -1
- package/cjs/cypress-utils/utils/member.js +3 -4
- package/cjs/cypress-utils/utils/member.js.map +1 -1
- package/cjs/cypress-utils/utils/navigation.js +16 -17
- package/cjs/cypress-utils/utils/navigation.js.map +1 -1
- package/cjs/cypress-utils/utils/organization.js +4 -5
- package/cjs/cypress-utils/utils/organization.js.map +1 -1
- package/cjs/cypress-utils/utils/validation.js +1 -2
- package/cjs/cypress-utils/utils/validation.js.map +1 -1
- package/cjs/initializers/axios.js +1 -2
- package/cjs/initializers/axios.js.map +1 -1
- package/cjs/initializers/axiosInitializer/index.js +2 -2
- package/cjs/initializers/axiosInitializer/index.js.map +1 -1
- package/cjs/initializers/axiosInitializer/paramsSerializer.js +1 -2
- package/cjs/initializers/axiosInitializer/paramsSerializer.js.map +1 -1
- package/cjs/initializers/constants.js +6 -12
- package/cjs/initializers/constants.js.map +1 -1
- package/cjs/initializers/dayjs.js +30 -4
- package/cjs/initializers/dayjs.js.map +1 -1
- package/cjs/initializers/globalProps.js +4 -1
- package/cjs/initializers/globalProps.js.map +1 -1
- package/cjs/initializers/i18n.js +2 -4
- package/cjs/initializers/i18n.js.map +1 -1
- package/cjs/initializers/index.js +4 -5
- package/cjs/initializers/index.js.map +1 -1
- package/cjs/initializers/logger.js.map +1 -1
- package/cjs/initializers/mixpanel.js.map +1 -1
- package/cjs/initializers/reactDevTools.js.map +1 -1
- package/cjs/initializers/utils/customFormatters.js +2 -4
- package/cjs/initializers/utils/customFormatters.js.map +1 -1
- package/cjs/initializers/utils/customPostProcessors.js +1 -2
- package/cjs/initializers/utils/customPostProcessors.js.map +1 -1
- package/cjs/initializers/utils/utils.js +2 -3
- package/cjs/initializers/utils/utils.js.map +1 -1
- package/cjs/react-utils/AppContainer/AppContainer.js +5 -6
- package/cjs/react-utils/AppContainer/AppContainer.js.map +1 -1
- package/cjs/react-utils/AppContainer/index.js.map +1 -1
- package/cjs/react-utils/BrowserPushNotifications/devices.js +7 -4
- package/cjs/react-utils/BrowserPushNotifications/devices.js.map +1 -1
- package/cjs/react-utils/BrowserPushNotifications/index.js.map +1 -1
- package/cjs/react-utils/BrowserPushNotifications/pushHelper.js +5 -7
- package/cjs/react-utils/BrowserPushNotifications/pushHelper.js.map +1 -1
- package/cjs/react-utils/BrowserPushNotifications/registerServiceWorker.js +5 -7
- package/cjs/react-utils/BrowserPushNotifications/registerServiceWorker.js.map +1 -1
- package/cjs/react-utils/HoneybadgerErrorBoundary/FallbackComponent.js +5 -6
- package/cjs/react-utils/HoneybadgerErrorBoundary/FallbackComponent.js.map +1 -1
- package/cjs/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js +1 -2
- package/cjs/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js.map +1 -1
- package/cjs/react-utils/HoneybadgerErrorBoundary/constants.js +2 -4
- package/cjs/react-utils/HoneybadgerErrorBoundary/constants.js.map +1 -1
- package/cjs/react-utils/HoneybadgerErrorBoundary/index.js.map +1 -1
- package/cjs/react-utils/HoneybadgerErrorBoundary/utils.js +2 -4
- package/cjs/react-utils/HoneybadgerErrorBoundary/utils.js.map +1 -1
- package/cjs/react-utils/PageTitle/PageTitle.js +1 -2
- package/cjs/react-utils/PageTitle/PageTitle.js.map +1 -1
- package/cjs/react-utils/PageTitle/index.js.map +1 -1
- package/cjs/react-utils/PrivateRoute/PrivateRoute.js +3 -4
- package/cjs/react-utils/PrivateRoute/PrivateRoute.js.map +1 -1
- package/cjs/react-utils/PrivateRoute/index.js.map +1 -1
- package/cjs/react-utils/QueryClientProvider/QueryClientProvider.js +1 -2
- package/cjs/react-utils/QueryClientProvider/QueryClientProvider.js.map +1 -1
- package/cjs/react-utils/QueryClientProvider/index.js.map +1 -1
- package/cjs/react-utils/QueryClientProvider/queryClient.js +1 -2
- package/cjs/react-utils/QueryClientProvider/queryClient.js.map +1 -1
- package/cjs/react-utils/constants/constants.js +3 -6
- package/cjs/react-utils/constants/constants.js.map +1 -1
- package/cjs/react-utils/constants/index.js.map +1 -1
- package/cjs/react-utils/constants/query.js +1 -2
- package/cjs/react-utils/constants/query.js.map +1 -1
- package/cjs/react-utils/index.js +2 -2
- package/cjs/react-utils/index.js.map +1 -1
- package/cjs/react-utils/metaClick/index.js.map +1 -1
- package/cjs/react-utils/metaClick/metaClick.js +2 -4
- package/cjs/react-utils/metaClick/metaClick.js.map +1 -1
- package/cjs/react-utils/useBreakpoints/index.js +1 -2
- package/cjs/react-utils/useBreakpoints/index.js.map +1 -1
- package/cjs/react-utils/useBreakpoints/utils.js +4 -6
- package/cjs/react-utils/useBreakpoints/utils.js.map +1 -1
- package/cjs/react-utils/useDebounce/index.js.map +1 -1
- package/cjs/react-utils/useDebounce/useDebounce.js +1 -2
- package/cjs/react-utils/useDebounce/useDebounce.js.map +1 -1
- package/cjs/react-utils/useDisplayErrorPage/index.js +2 -2
- package/cjs/react-utils/useDisplayErrorPage/index.js.map +1 -1
- package/cjs/react-utils/useDisplayErrorPage/useDisplayErrorPage.js +2 -4
- package/cjs/react-utils/useDisplayErrorPage/useDisplayErrorPage.js.map +1 -1
- package/cjs/react-utils/useFetchNeetoApps/apis/neeto_apps.js +1 -2
- package/cjs/react-utils/useFetchNeetoApps/apis/neeto_apps.js.map +1 -1
- package/cjs/react-utils/useFetchNeetoApps/index.js.map +1 -1
- package/cjs/react-utils/useFetchNeetoApps/useFetchNeetoApps.js +3 -4
- package/cjs/react-utils/useFetchNeetoApps/useFetchNeetoApps.js.map +1 -1
- package/cjs/react-utils/useFieldSubmit/index.js.map +1 -1
- package/cjs/react-utils/useFieldSubmit/useFieldSubmit.js +1 -2
- package/cjs/react-utils/useFieldSubmit/useFieldSubmit.js.map +1 -1
- package/cjs/react-utils/useFuncDebounce/index.js.map +1 -1
- package/cjs/react-utils/useFuncDebounce/useFuncDebounce.js +1 -2
- package/cjs/react-utils/useFuncDebounce/useFuncDebounce.js.map +1 -1
- package/cjs/react-utils/useIsElementVisibleInDom/index.js.map +1 -1
- package/cjs/react-utils/useIsElementVisibleInDom/useForceUpdate.js +1 -2
- package/cjs/react-utils/useIsElementVisibleInDom/useForceUpdate.js.map +1 -1
- package/cjs/react-utils/useIsElementVisibleInDom/useIsElementVisibleInDom.js +1 -2
- package/cjs/react-utils/useIsElementVisibleInDom/useIsElementVisibleInDom.js.map +1 -1
- package/cjs/react-utils/useKeyboardShortcutsPaneState/index.js.map +1 -1
- package/cjs/react-utils/useKeyboardShortcutsPaneState/useKeyboardShortcutsPaneState.js +1 -2
- package/cjs/react-utils/useKeyboardShortcutsPaneState/useKeyboardShortcutsPaneState.js.map +1 -1
- package/cjs/react-utils/useLocalStorage/index.js.map +1 -1
- package/cjs/react-utils/useLocalStorage/useLocalStorage.js +1 -2
- package/cjs/react-utils/useLocalStorage/useLocalStorage.js.map +1 -1
- package/cjs/react-utils/useMutationWithInvalidation/index.js.map +1 -1
- package/cjs/react-utils/useMutationWithInvalidation/useMutationWithInvalidation.js +3 -4
- package/cjs/react-utils/useMutationWithInvalidation/useMutationWithInvalidation.js.map +1 -1
- package/cjs/react-utils/useOnClickOutside/index.js.map +1 -1
- package/cjs/react-utils/useOnClickOutside/useOnClickOutside.js +1 -2
- package/cjs/react-utils/useOnClickOutside/useOnClickOutside.js.map +1 -1
- package/cjs/react-utils/usePersistedQuery/index.js.map +1 -1
- package/cjs/react-utils/usePersistedQuery/usePersistedQuery.js +3 -4
- package/cjs/react-utils/usePersistedQuery/usePersistedQuery.js.map +1 -1
- package/cjs/react-utils/usePrevious/index.js.map +1 -1
- package/cjs/react-utils/usePrevious/usePrevious.js +1 -2
- package/cjs/react-utils/usePrevious/usePrevious.js.map +1 -1
- package/cjs/react-utils/useQueryParams/index.js.map +1 -1
- package/cjs/react-utils/useQueryParams/useQueryParams.js +1 -2
- package/cjs/react-utils/useQueryParams/useQueryParams.js.map +1 -1
- package/cjs/react-utils/useRegisterNavigationCheckpoint/index.js +2 -2
- package/cjs/react-utils/useRegisterNavigationCheckpoint/index.js.map +1 -1
- package/cjs/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js +5 -8
- package/cjs/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js.map +1 -1
- package/cjs/react-utils/useRestoreScrollPosition/index.js +2 -2
- package/cjs/react-utils/useRestoreScrollPosition/index.js.map +1 -1
- package/cjs/react-utils/useRestoreScrollPosition/useRestoreScrollPosition.js +4 -8
- package/cjs/react-utils/useRestoreScrollPosition/useRestoreScrollPosition.js.map +1 -1
- package/cjs/react-utils/useStateWithDependency/index.js.map +1 -1
- package/cjs/react-utils/useStateWithDependency/useStateWithDependency.js +1 -2
- package/cjs/react-utils/useStateWithDependency/useStateWithDependency.js.map +1 -1
- package/cjs/react-utils/useTimer/index.js.map +1 -1
- package/cjs/react-utils/useTimer/useTimer.js +1 -2
- package/cjs/react-utils/useTimer/useTimer.js.map +1 -1
- package/cjs/react-utils/useUpdateEffect/index.js.map +1 -1
- package/cjs/react-utils/useUpdateEffect/useUpdateEffect.js +1 -2
- package/cjs/react-utils/useUpdateEffect/useUpdateEffect.js.map +1 -1
- package/cjs/react-utils/withImmutableActions/index.js.map +1 -1
- package/cjs/react-utils/withImmutableActions/withImmutableActions.js +1 -2
- package/cjs/react-utils/withImmutableActions/withImmutableActions.js.map +1 -1
- package/cjs/react-utils/withT/index.js.map +1 -1
- package/cjs/react-utils/withT/withT.js +1 -2
- package/cjs/react-utils/withT/withT.js.map +1 -1
- package/cjs/react-utils/withTitle/index.js.map +1 -1
- package/cjs/react-utils/withTitle/withTitle.js +3 -4
- package/cjs/react-utils/withTitle/withTitle.js.map +1 -1
- package/cjs/utils/axios.js +1 -2
- package/cjs/utils/axios.js.map +1 -1
- package/cjs/utils/buildNestedAttributesPayload.js +5 -7
- package/cjs/utils/buildNestedAttributesPayload.js.map +1 -1
- package/cjs/utils/captureAnalyticsEvent.js +1 -2
- package/cjs/utils/captureAnalyticsEvent.js.map +1 -1
- package/cjs/utils/captureAnalyticsPageView.js +3 -4
- package/cjs/utils/captureAnalyticsPageView.js.map +1 -1
- package/cjs/utils/createSubscription.js +1 -2
- package/cjs/utils/createSubscription.js.map +1 -1
- package/cjs/utils/currencyFormat.js +3 -4
- package/cjs/utils/currencyFormat.js.map +1 -1
- package/cjs/utils/datetime.js +3 -11
- package/cjs/utils/datetime.js.map +1 -1
- package/cjs/utils/dayjs.js +15 -9
- package/cjs/utils/dayjs.js.map +1 -1
- package/cjs/utils/general.js +18 -33
- package/cjs/utils/general.js.map +1 -1
- package/cjs/utils/index.js.map +1 -1
- package/cjs/utils/permissions.js +6 -7
- package/cjs/utils/permissions.js.map +1 -1
- package/cjs/utils/validators/index.js.map +1 -1
- package/cjs/utils/validators/slug.js +3 -4
- package/cjs/utils/validators/slug.js.map +1 -1
- package/configs/scripts/dead-code-eliminator/constants.js +10 -1
- package/configs/scripts/dead-code-eliminator/index.js +3 -1
- package/constants/index.js.map +1 -1
- package/constants/regex.js.map +1 -1
- package/cypress-utils/commands.js +2 -2
- package/cypress-utils/commands.js.map +1 -1
- package/cypress-utils/constants/index.js.map +1 -1
- package/cypress-utils/constants/routes.js.map +1 -1
- package/cypress-utils/constants/selectors/common.js.map +1 -1
- package/cypress-utils/constants/selectors/editor.js.map +1 -1
- package/cypress-utils/constants/selectors/ipRestriction.js.map +1 -1
- package/cypress-utils/constants/selectors/login.js.map +1 -1
- package/cypress-utils/constants/selectors/member.js.map +1 -1
- package/cypress-utils/constants/selectors/navigation.js.map +1 -1
- package/cypress-utils/constants/selectors/roles.js.map +1 -1
- package/cypress-utils/constants/selectors/signUp.js.map +1 -1
- package/cypress-utils/constants/selectors/tags.js.map +1 -1
- package/cypress-utils/constants/texts/common.js.map +1 -1
- package/cypress-utils/constants/texts/member.js.map +1 -1
- package/cypress-utils/constants/texts/navigation.js.map +1 -1
- package/cypress-utils/constants/texts/roles.js.map +1 -1
- package/cypress-utils/constants/texts/signUp.js.map +1 -1
- package/cypress-utils/constants/texts/tags.js.map +1 -1
- package/cypress-utils/fixtures/fake.js.map +1 -1
- package/cypress-utils/index.js.map +1 -1
- package/cypress-utils/utils/authentication.js.map +1 -1
- package/cypress-utils/utils/common.js +2 -2
- package/cypress-utils/utils/common.js.map +1 -1
- package/cypress-utils/utils/date.js.map +1 -1
- package/cypress-utils/utils/email.js.map +1 -1
- package/cypress-utils/utils/member.js +2 -2
- package/cypress-utils/utils/member.js.map +1 -1
- package/cypress-utils/utils/navigation.js +15 -15
- package/cypress-utils/utils/navigation.js.map +1 -1
- package/cypress-utils/utils/organization.js +3 -3
- package/cypress-utils/utils/organization.js.map +1 -1
- package/cypress-utils/utils/validation.js.map +1 -1
- package/initializers/axios.js.map +1 -1
- package/initializers/axiosInitializer/index.js +2 -2
- package/initializers/axiosInitializer/index.js.map +1 -1
- package/initializers/axiosInitializer/paramsSerializer.js.map +1 -1
- package/initializers/constants.js.map +1 -1
- package/initializers/dayjs.js +30 -2
- package/initializers/dayjs.js.map +1 -1
- package/initializers/globalProps.js +5 -2
- package/initializers/globalProps.js.map +1 -1
- package/initializers/i18n.js.map +1 -1
- package/initializers/index.js +1 -1
- package/initializers/index.js.map +1 -1
- package/initializers/logger.js.map +1 -1
- package/initializers/mixpanel.js.map +1 -1
- package/initializers/reactDevTools.js.map +1 -1
- package/initializers/utils/customFormatters.js.map +1 -1
- package/initializers/utils/customPostProcessors.js.map +1 -1
- package/initializers/utils/utils.js +3 -2
- package/initializers/utils/utils.js.map +1 -1
- package/initializers.d.ts +2 -0
- package/package.json +57 -43
- package/react-utils/AppContainer/AppContainer.js +5 -6
- package/react-utils/AppContainer/AppContainer.js.map +1 -1
- package/react-utils/AppContainer/index.js.map +1 -1
- package/react-utils/BrowserPushNotifications/devices.js +6 -2
- package/react-utils/BrowserPushNotifications/devices.js.map +1 -1
- package/react-utils/BrowserPushNotifications/index.js.map +1 -1
- package/react-utils/BrowserPushNotifications/pushHelper.js +3 -3
- package/react-utils/BrowserPushNotifications/pushHelper.js.map +1 -1
- package/react-utils/BrowserPushNotifications/registerServiceWorker.js +3 -3
- package/react-utils/BrowserPushNotifications/registerServiceWorker.js.map +1 -1
- package/react-utils/HoneybadgerErrorBoundary/FallbackComponent.js +3 -4
- package/react-utils/HoneybadgerErrorBoundary/FallbackComponent.js.map +1 -1
- package/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js.map +1 -1
- package/react-utils/HoneybadgerErrorBoundary/constants.js.map +1 -1
- package/react-utils/HoneybadgerErrorBoundary/index.js.map +1 -1
- package/react-utils/HoneybadgerErrorBoundary/utils.js.map +1 -1
- package/react-utils/PageTitle/PageTitle.js.map +1 -1
- package/react-utils/PageTitle/index.js.map +1 -1
- package/react-utils/PrivateRoute/PrivateRoute.js +2 -2
- package/react-utils/PrivateRoute/PrivateRoute.js.map +1 -1
- package/react-utils/PrivateRoute/index.js.map +1 -1
- package/react-utils/QueryClientProvider/QueryClientProvider.js.map +1 -1
- package/react-utils/QueryClientProvider/index.js.map +1 -1
- package/react-utils/QueryClientProvider/queryClient.js.map +1 -1
- package/react-utils/constants/constants.js.map +1 -1
- package/react-utils/constants/index.js.map +1 -1
- package/react-utils/constants/query.js.map +1 -1
- package/react-utils/index.js.map +1 -1
- package/react-utils/metaClick/index.js.map +1 -1
- package/react-utils/metaClick/metaClick.js.map +1 -1
- package/react-utils/useBreakpoints/index.js.map +1 -1
- package/react-utils/useBreakpoints/utils.js +2 -2
- package/react-utils/useBreakpoints/utils.js.map +1 -1
- package/react-utils/useDebounce/index.js.map +1 -1
- package/react-utils/useDebounce/useDebounce.js.map +1 -1
- package/react-utils/useDisplayErrorPage/index.js.map +1 -1
- package/react-utils/useDisplayErrorPage/useDisplayErrorPage.js.map +1 -1
- package/react-utils/useFetchNeetoApps/apis/neeto_apps.js.map +1 -1
- package/react-utils/useFetchNeetoApps/index.js.map +1 -1
- package/react-utils/useFetchNeetoApps/useFetchNeetoApps.js +2 -2
- package/react-utils/useFetchNeetoApps/useFetchNeetoApps.js.map +1 -1
- package/react-utils/useFieldSubmit/index.js.map +1 -1
- package/react-utils/useFieldSubmit/useFieldSubmit.js.map +1 -1
- package/react-utils/useFuncDebounce/index.js.map +1 -1
- package/react-utils/useFuncDebounce/useFuncDebounce.js.map +1 -1
- package/react-utils/useIsElementVisibleInDom/index.js.map +1 -1
- package/react-utils/useIsElementVisibleInDom/useForceUpdate.js.map +1 -1
- package/react-utils/useIsElementVisibleInDom/useIsElementVisibleInDom.js.map +1 -1
- package/react-utils/useKeyboardShortcutsPaneState/index.js.map +1 -1
- package/react-utils/useKeyboardShortcutsPaneState/useKeyboardShortcutsPaneState.js.map +1 -1
- package/react-utils/useLocalStorage/index.js.map +1 -1
- package/react-utils/useLocalStorage/useLocalStorage.js.map +1 -1
- package/react-utils/useMutationWithInvalidation/index.js.map +1 -1
- package/react-utils/useMutationWithInvalidation/useMutationWithInvalidation.js +2 -2
- package/react-utils/useMutationWithInvalidation/useMutationWithInvalidation.js.map +1 -1
- package/react-utils/useOnClickOutside/index.js.map +1 -1
- package/react-utils/useOnClickOutside/useOnClickOutside.js.map +1 -1
- package/react-utils/usePersistedQuery/index.js.map +1 -1
- package/react-utils/usePersistedQuery/usePersistedQuery.js +2 -2
- package/react-utils/usePersistedQuery/usePersistedQuery.js.map +1 -1
- package/react-utils/usePrevious/index.js.map +1 -1
- package/react-utils/usePrevious/usePrevious.js.map +1 -1
- package/react-utils/useQueryParams/index.js.map +1 -1
- package/react-utils/useQueryParams/useQueryParams.js.map +1 -1
- package/react-utils/useRegisterNavigationCheckpoint/index.js.map +1 -1
- package/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js +2 -2
- package/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js.map +1 -1
- package/react-utils/useRestoreScrollPosition/index.js.map +1 -1
- package/react-utils/useRestoreScrollPosition/useRestoreScrollPosition.js.map +1 -1
- package/react-utils/useStateWithDependency/index.js.map +1 -1
- package/react-utils/useStateWithDependency/useStateWithDependency.js.map +1 -1
- package/react-utils/useTimer/index.js.map +1 -1
- package/react-utils/useTimer/useTimer.js.map +1 -1
- package/react-utils/useUpdateEffect/index.js.map +1 -1
- package/react-utils/useUpdateEffect/useUpdateEffect.js.map +1 -1
- package/react-utils/withImmutableActions/index.js.map +1 -1
- package/react-utils/withImmutableActions/withImmutableActions.js.map +1 -1
- package/react-utils/withT/index.js.map +1 -1
- package/react-utils/withT/withT.js.map +1 -1
- package/react-utils/withTitle/index.js.map +1 -1
- package/react-utils/withTitle/withTitle.js +3 -5
- package/react-utils/withTitle/withTitle.js.map +1 -1
- package/utils/axios.js.map +1 -1
- package/utils/buildNestedAttributesPayload.js +4 -5
- package/utils/buildNestedAttributesPayload.js.map +1 -1
- package/utils/captureAnalyticsEvent.js.map +1 -1
- package/utils/captureAnalyticsPageView.js +2 -2
- package/utils/captureAnalyticsPageView.js.map +1 -1
- package/utils/createSubscription.js.map +1 -1
- package/utils/currencyFormat.js +2 -2
- package/utils/currencyFormat.js.map +1 -1
- package/utils/datetime.js +1 -7
- package/utils/datetime.js.map +1 -1
- package/utils/dayjs.js +22 -8
- package/utils/dayjs.js.map +1 -1
- package/utils/general.js +3 -3
- package/utils/general.js.map +1 -1
- package/utils/index.js.map +1 -1
- package/utils/permissions.js +3 -1
- package/utils/permissions.js.map +1 -1
- package/utils/validators/index.js.map +1 -1
- package/utils/validators/slug.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","names":["HEADERS_KEYS","xCsrfToken","contentType","accept","LOWERCASED","LOWERCASED_GLOBAL_REGEX","RegExp","FORMATS","boldList","list","anyCase","LIST_FORMATS","MAXIMUM_OFFLINE_DURATION"],"sources":["../../src/initializers/constants.js"],"sourcesContent":["export const HEADERS_KEYS = {\n xCsrfToken: \"X-CSRF-TOKEN\",\n contentType: \"Content-Type\",\n accept: \"Accept\",\n};\n\nexport const LOWERCASED = \"__LOWERCASED__\";\nexport const LOWERCASED_GLOBAL_REGEX = new RegExp(LOWERCASED, \"g\");\n\nexport const FORMATS = {\n boldList: \"boldList\",\n list: \"list\",\n anyCase: \"anyCase\",\n};\nexport const LIST_FORMATS = [FORMATS.boldList, FORMATS.list];\n\nexport const MAXIMUM_OFFLINE_DURATION = 10000;\n"],"mappings":"AAAA,OAAO,IAAMA,YAAY,GAAG;EAC1BC,UAAU,EAAE,cAAc;EAC1BC,WAAW,EAAE,cAAc;EAC3BC,MAAM,EAAE;AACV,CAAC;AAED,OAAO,IAAMC,UAAU,GAAG,gBAAgB;AAC1C,OAAO,IAAMC,uBAAuB,GAAG,IAAIC,MAAM,CAACF,UAAU,EAAE,GAAG,CAAC;AAElE,OAAO,IAAMG,OAAO,GAAG;EACrBC,QAAQ,EAAE,UAAU;EACpBC,IAAI,EAAE,MAAM;EACZC,OAAO,EAAE;AACX,CAAC;AACD,OAAO,IAAMC,YAAY,GAAG,CAACJ,OAAO,CAACC,QAAQ,EAAED,OAAO,CAACE,IAAI,CAAC;AAE5D,OAAO,IAAMG,wBAAwB,GAAG,KAAK"}
|
|
1
|
+
{"version":3,"file":"constants.js","names":["HEADERS_KEYS","xCsrfToken","contentType","accept","LOWERCASED","LOWERCASED_GLOBAL_REGEX","RegExp","FORMATS","boldList","list","anyCase","LIST_FORMATS","MAXIMUM_OFFLINE_DURATION"],"sources":["../../src/initializers/constants.js"],"sourcesContent":["export const HEADERS_KEYS = {\n xCsrfToken: \"X-CSRF-TOKEN\",\n contentType: \"Content-Type\",\n accept: \"Accept\",\n};\n\nexport const LOWERCASED = \"__LOWERCASED__\";\nexport const LOWERCASED_GLOBAL_REGEX = new RegExp(LOWERCASED, \"g\");\n\nexport const FORMATS = {\n boldList: \"boldList\",\n list: \"list\",\n anyCase: \"anyCase\",\n};\nexport const LIST_FORMATS = [FORMATS.boldList, FORMATS.list];\n\nexport const MAXIMUM_OFFLINE_DURATION = 10000;\n"],"mappings":"AAAA,OAAO,IAAMA,YAAY,GAAG;EAC1BC,UAAU,EAAE,cAAc;EAC1BC,WAAW,EAAE,cAAc;EAC3BC,MAAM,EAAE;AACV,CAAC;AAED,OAAO,IAAMC,UAAU,GAAG,gBAAgB;AAC1C,OAAO,IAAMC,uBAAuB,GAAG,IAAIC,MAAM,CAACF,UAAU,EAAE,GAAG,CAAC;AAElE,OAAO,IAAMG,OAAO,GAAG;EACrBC,QAAQ,EAAE,UAAU;EACpBC,IAAI,EAAE,MAAM;EACZC,OAAO,EAAE;AACX,CAAC;AACD,OAAO,IAAMC,YAAY,GAAG,CAACJ,OAAO,CAACC,QAAQ,EAAED,OAAO,CAACE,IAAI,CAAC;AAE5D,OAAO,IAAMG,wBAAwB,GAAG,KAAK","ignoreList":[]}
|
package/initializers/dayjs.js
CHANGED
|
@@ -3,29 +3,57 @@ import advancedFormat from "dayjs/plugin/advancedFormat";
|
|
|
3
3
|
import customParseFormat from "dayjs/plugin/customParseFormat";
|
|
4
4
|
import duration from "dayjs/plugin/duration";
|
|
5
5
|
import isSameOrAfter from "dayjs/plugin/isSameOrAfter";
|
|
6
|
+
import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
6
7
|
import isToday from "dayjs/plugin/isToday";
|
|
7
8
|
import localeData from "dayjs/plugin/localeData";
|
|
8
9
|
import localizedFormat from "dayjs/plugin/localizedFormat";
|
|
10
|
+
import minMax from "dayjs/plugin/minMax";
|
|
11
|
+
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
9
12
|
import relativeTime from "dayjs/plugin/relativeTime";
|
|
10
13
|
import timezone from "dayjs/plugin/timezone";
|
|
11
14
|
import updateLocale from "dayjs/plugin/updateLocale";
|
|
12
15
|
import utc from "dayjs/plugin/utc";
|
|
13
16
|
import weekday from "dayjs/plugin/weekday";
|
|
17
|
+
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
18
|
+
|
|
19
|
+
// const isValidTimezone = timezone => {
|
|
20
|
+
// try {
|
|
21
|
+
// pureDayjs().tz(timezone);
|
|
22
|
+
|
|
23
|
+
// return true;
|
|
24
|
+
// } catch {
|
|
25
|
+
// return false;
|
|
26
|
+
// }
|
|
27
|
+
// };
|
|
28
|
+
|
|
29
|
+
// eslint-disable-next-line no-unused-vars
|
|
14
30
|
var initializeDayjs = function initializeDayjs() {
|
|
15
|
-
var
|
|
31
|
+
var skipTimezone = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
16
32
|
pureDayjs.extend(advancedFormat);
|
|
17
33
|
pureDayjs.extend(customParseFormat);
|
|
18
34
|
pureDayjs.extend(duration);
|
|
19
35
|
pureDayjs.extend(isSameOrAfter);
|
|
36
|
+
pureDayjs.extend(isSameOrBefore);
|
|
20
37
|
pureDayjs.extend(isToday);
|
|
21
38
|
pureDayjs.extend(localeData);
|
|
22
39
|
pureDayjs.extend(localizedFormat);
|
|
40
|
+
pureDayjs.extend(minMax);
|
|
41
|
+
pureDayjs.extend(quarterOfYear);
|
|
23
42
|
pureDayjs.extend(relativeTime);
|
|
24
43
|
pureDayjs.extend(timezone);
|
|
25
44
|
pureDayjs.extend(updateLocale);
|
|
26
45
|
pureDayjs.extend(utc);
|
|
27
46
|
pureDayjs.extend(weekday);
|
|
28
|
-
|
|
47
|
+
pureDayjs.extend(weekOfYear);
|
|
48
|
+
|
|
49
|
+
// const shouldInitializeTimezone =
|
|
50
|
+
// !skipTimezone &&
|
|
51
|
+
// globalProps?.user?.timeZone &&
|
|
52
|
+
// isValidTimezone(globalProps?.user?.timeZone);
|
|
53
|
+
|
|
54
|
+
// if (shouldInitializeTimezone) {
|
|
55
|
+
// pureDayjs.tz.setDefault(globalProps?.user?.timeZone);
|
|
56
|
+
// }
|
|
29
57
|
};
|
|
30
58
|
export default initializeDayjs;
|
|
31
59
|
//# sourceMappingURL=dayjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dayjs.js","names":["pureDayjs","advancedFormat","customParseFormat","duration","isSameOrAfter","isToday","localeData","localizedFormat","
|
|
1
|
+
{"version":3,"file":"dayjs.js","names":["pureDayjs","advancedFormat","customParseFormat","duration","isSameOrAfter","isSameOrBefore","isToday","localeData","localizedFormat","minMax","quarterOfYear","relativeTime","timezone","updateLocale","utc","weekday","weekOfYear","initializeDayjs","skipTimezone","arguments","length","undefined","extend"],"sources":["../../src/initializers/dayjs.js"],"sourcesContent":["import pureDayjs from \"dayjs\";\nimport advancedFormat from \"dayjs/plugin/advancedFormat\";\nimport customParseFormat from \"dayjs/plugin/customParseFormat\";\nimport duration from \"dayjs/plugin/duration\";\nimport isSameOrAfter from \"dayjs/plugin/isSameOrAfter\";\nimport isSameOrBefore from \"dayjs/plugin/isSameOrBefore\";\nimport isToday from \"dayjs/plugin/isToday\";\nimport localeData from \"dayjs/plugin/localeData\";\nimport localizedFormat from \"dayjs/plugin/localizedFormat\";\nimport minMax from \"dayjs/plugin/minMax\";\nimport quarterOfYear from \"dayjs/plugin/quarterOfYear\";\nimport relativeTime from \"dayjs/plugin/relativeTime\";\nimport timezone from \"dayjs/plugin/timezone\";\nimport updateLocale from \"dayjs/plugin/updateLocale\";\nimport utc from \"dayjs/plugin/utc\";\nimport weekday from \"dayjs/plugin/weekday\";\nimport weekOfYear from \"dayjs/plugin/weekOfYear\";\n\n// const isValidTimezone = timezone => {\n// try {\n// pureDayjs().tz(timezone);\n\n// return true;\n// } catch {\n// return false;\n// }\n// };\n\n// eslint-disable-next-line no-unused-vars\nconst initializeDayjs = (skipTimezone = false) => {\n pureDayjs.extend(advancedFormat);\n pureDayjs.extend(customParseFormat);\n pureDayjs.extend(duration);\n pureDayjs.extend(isSameOrAfter);\n pureDayjs.extend(isSameOrBefore);\n pureDayjs.extend(isToday);\n pureDayjs.extend(localeData);\n pureDayjs.extend(localizedFormat);\n pureDayjs.extend(minMax);\n pureDayjs.extend(quarterOfYear);\n pureDayjs.extend(relativeTime);\n pureDayjs.extend(timezone);\n pureDayjs.extend(updateLocale);\n pureDayjs.extend(utc);\n pureDayjs.extend(weekday);\n pureDayjs.extend(weekOfYear);\n\n // const shouldInitializeTimezone =\n // !skipTimezone &&\n // globalProps?.user?.timeZone &&\n // isValidTimezone(globalProps?.user?.timeZone);\n\n // if (shouldInitializeTimezone) {\n // pureDayjs.tz.setDefault(globalProps?.user?.timeZone);\n // }\n};\n\nexport default initializeDayjs;\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,OAAO;AAC7B,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAOC,iBAAiB,MAAM,gCAAgC;AAC9D,OAAOC,QAAQ,MAAM,uBAAuB;AAC5C,OAAOC,aAAa,MAAM,4BAA4B;AACtD,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAOC,OAAO,MAAM,sBAAsB;AAC1C,OAAOC,UAAU,MAAM,yBAAyB;AAChD,OAAOC,eAAe,MAAM,8BAA8B;AAC1D,OAAOC,MAAM,MAAM,qBA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CAAC;AAED,eAAeC,eAAe","ignoreList":[]}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/* eslint-disable @bigbinary/neeto/no-globalProps-reassignment */
|
|
2
|
-
import { keysToCamelCase, deepFreezeObject } from "@bigbinary/neeto-cist";
|
|
2
|
+
import { keysToCamelCase, deepFreezeObject, capitalize } from "@bigbinary/neeto-cist";
|
|
3
3
|
export default function initializeGlobalProps() {
|
|
4
|
-
var _document$getElements, _document$getElements2;
|
|
4
|
+
var _document$getElements, _document$getElements2, _window, _window$globalProps;
|
|
5
5
|
window.globalProps = keysToCamelCase(JSON.parse(((_document$getElements = document.getElementsByClassName("root-container")[0]) === null || _document$getElements === void 0 ? void 0 : (_document$getElements2 = _document$getElements.dataset) === null || _document$getElements2 === void 0 ? void 0 : _document$getElements2.reactProps) || "{}"));
|
|
6
|
+
if ((_window = window) !== null && _window !== void 0 && (_window$globalProps = _window.globalProps) !== null && _window$globalProps !== void 0 && _window$globalProps.appName) {
|
|
7
|
+
window.globalProps.appName = capitalize(window.globalProps.appName);
|
|
8
|
+
}
|
|
6
9
|
deepFreezeObject(window.globalProps);
|
|
7
10
|
}
|
|
8
11
|
//# sourceMappingURL=globalProps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globalProps.js","names":["keysToCamelCase","deepFreezeObject","initializeGlobalProps","_document$getElements","_document$getElements2","window","globalProps","JSON","parse","document","getElementsByClassName","dataset","reactProps"],"sources":["../../src/initializers/globalProps.js"],"sourcesContent":["/* eslint-disable @bigbinary/neeto/no-globalProps-reassignment */\nimport { keysToCamelCase, deepFreezeObject } from \"neetocist\";\n\nexport default function initializeGlobalProps() {\n window.globalProps = keysToCamelCase(\n JSON.parse(\n document.getElementsByClassName(\"root-container\")[0]?.dataset\n ?.reactProps || \"{}\"\n )\n );\n\n deepFreezeObject(window.globalProps);\n}\n"],"mappings":"AAAA;AACA,SAASA,eAAe,EAAEC,gBAAgB;
|
|
1
|
+
{"version":3,"file":"globalProps.js","names":["keysToCamelCase","deepFreezeObject","capitalize","initializeGlobalProps","_document$getElements","_document$getElements2","_window","_window$globalProps","window","globalProps","JSON","parse","document","getElementsByClassName","dataset","reactProps","appName"],"sources":["../../src/initializers/globalProps.js"],"sourcesContent":["/* eslint-disable @bigbinary/neeto/no-globalProps-reassignment */\nimport { keysToCamelCase, deepFreezeObject, capitalize } from \"neetocist\";\n\nexport default function initializeGlobalProps() {\n window.globalProps = keysToCamelCase(\n JSON.parse(\n document.getElementsByClassName(\"root-container\")[0]?.dataset\n ?.reactProps || \"{}\"\n )\n );\n\n if (window?.globalProps?.appName) {\n window.globalProps.appName = capitalize(window.globalProps.appName);\n }\n\n deepFreezeObject(window.globalProps);\n}\n"],"mappings":"AAAA;AACA,SAASA,eAAe,EAAEC,gBAAgB,EAAEC,UAAU;AAEtD,eAAe,SAASC,qBAAqBA,CAAA,EAAG;EAAA,IAAAC,qBAAA,EAAAC,sBAAA,EAAAC,OAAA,EAAAC,mBAAA;EAC9CC,MAAM,CAACC,WAAW,GAAGT,eAAe,CAClCU,IAAI,CAACC,KAAK,CACR,EAAAP,qBAAA,GAAAQ,QAAQ,CAACC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,cAAAT,qBAAA,wBAAAC,sBAAA,GAApDD,qBAAA,CAAsDU,OAAO,cAAAT,sBAAA,uBAA7DA,sBAAA,CACIU,UAAU,KAAI,IACpB,CACF,CAAC;EAED,KAAAT,OAAA,GAAIE,MAAM,cAAAF,OAAA,gBAAAC,mBAAA,GAAND,OAAA,CAAQG,WAAW,cAAAF,mBAAA,eAAnBA,mBAAA,CAAqBS,OAAO,EAAE;IAChCR,MAAM,CAACC,WAAW,CAACO,OAAO,GAAGd,UAAU,CAACM,MAAM,CAACC,WAAW,CAACO,OAAO,CAAC;EACrE;EAEAf,gBAAgB,CAACO,MAAM,CAACC,WAAW,CAAC;AACtC","ignoreList":[]}
|
package/initializers/i18n.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.js","names":["i18n","LanguageDetector","mergeDeepLeft","initReactI18next","LIST_FORMATS","listFormatter","lowerCaseDynamicTextFormatter","sentenceCaseProcessor","replaceNullValuesWithGetter","commonsEn","taxonomies","initializeI18n","hostTranslations","_window$globalProps","packageTranslations","preval","require","commonsTranslations","en","translation","resources","reduce","defaultTaxonomyKeys","Object","keys","taxonomyDefaultLabels","defaultTaxonomies","fromEntries","map","key","singular","plural","hostTaxonomies","window","globalProps","use","init","fallbackLng","interpolation","defaultVariables","escapeValue","skipOnVariables","alwaysFormat","format","value","lng","options","newValue","includes","postProcess","name","detection","order","caches","lookupQuerystring","lookupCookie"],"sources":["../../src/initializers/i18n.js"],"sourcesContent":["import i18n from \"i18next\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\nimport { mergeDeepLeft } from \"ramda\";\nimport { initReactI18next } from \"react-i18next\";\n\nimport { LIST_FORMATS } from \"./constants\";\nimport {\n listFormatter,\n lowerCaseDynamicTextFormatter,\n} from \"./utils/customFormatters\";\nimport { sentenceCaseProcessor } from \"./utils/customPostProcessors\";\nimport { replaceNullValuesWithGetter } from \"./utils/utils\";\n\nimport commonsEn from \"../translations/en.json\";\n\n// eslint-disable-next-line import/no-mutable-exports\nlet taxonomies = {};\n\nconst initializeI18n = hostTranslations => {\n // eslint-disable-next-line no-undef\n const packageTranslations = preval.require(\n \"../configs/scripts/getPkgTranslations.js\"\n );\n\n const commonsTranslations = { en: { translation: commonsEn } };\n\n const resources = [\n hostTranslations,\n commonsTranslations,\n packageTranslations,\n ].reduce(mergeDeepLeft);\n\n const defaultTaxonomyKeys = Object.keys(\n resources.en.translation.taxonomyDefaultLabels || {}\n );\n\n const defaultTaxonomies = Object.fromEntries(\n defaultTaxonomyKeys.map(key => [key, { singular: null, plural: null }])\n );\n\n const hostTaxonomies = window.globalProps?.taxonomies || {};\n\n taxonomies = replaceNullValuesWithGetter(\n mergeDeepLeft(hostTaxonomies, defaultTaxonomies)\n );\n\n i18n\n .use(LanguageDetector)\n .use(initReactI18next)\n .use(sentenceCaseProcessor)\n .init({\n resources,\n fallbackLng: \"en\",\n interpolation: {\n defaultVariables: { taxonomies },\n escapeValue: false,\n skipOnVariables: false,\n alwaysFormat: true,\n format: (value, format, lng, options) => {\n let newValue = value;\n\n if (LIST_FORMATS.includes(format)) {\n newValue = listFormatter({ value: newValue, format, lng, options });\n\n return newValue;\n }\n\n return lowerCaseDynamicTextFormatter(newValue, format);\n },\n },\n postProcess: [sentenceCaseProcessor.name],\n detection: {\n order: [\"querystring\", \"cookie\", \"navigator\", \"path\"],\n caches: [\"cookie\"],\n lookupQuerystring: \"lang\",\n lookupCookie: \"lang\",\n },\n });\n};\n\nexport { taxonomies };\n\nexport default initializeI18n;\n"],"mappings":"AAAA,OAAOA,IAAI,MAAM,SAAS;AAC1B,OAAOC,gBAAgB,MAAM,kCAAkC;AAC/D,SAASC,aAAa,QAAQ,OAAO;AACrC,SAASC,gBAAgB,QAAQ,eAAe;AAEhD,SAASC,YAAY;AACrB,SACEC,aAAa,EACbC,6BAA6B;AAE/B,SAASC,qBAAqB;AAC9B,SAASC,2BAA2B;AAEpC,OAAOC,SAAS;;AAEhB;AACA,IAAIC,UAAU,GAAG,CAAC,CAAC;AAEnB,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAAGC,gBAAgB,EAAI;EAAA,IAAAC,mBAAA;EACzC;EACA,IAAMC,mBAAmB,GAAGC,MAAM,CAACC,OAAO,CACxC,
|
|
1
|
+
{"version":3,"file":"i18n.js","names":["i18n","LanguageDetector","mergeDeepLeft","initReactI18next","LIST_FORMATS","listFormatter","lowerCaseDynamicTextFormatter","sentenceCaseProcessor","replaceNullValuesWithGetter","commonsEn","taxonomies","initializeI18n","hostTranslations","_window$globalProps","packageTranslations","preval","require","commonsTranslations","en","translation","resources","reduce","defaultTaxonomyKeys","Object","keys","taxonomyDefaultLabels","defaultTaxonomies","fromEntries","map","key","singular","plural","hostTaxonomies","window","globalProps","use","init","fallbackLng","interpolation","defaultVariables","escapeValue","skipOnVariables","alwaysFormat","format","value","lng","options","newValue","includes","postProcess","name","detection","order","caches","lookupQuerystring","lookupCookie"],"sources":["../../src/initializers/i18n.js"],"sourcesContent":["import i18n from \"i18next\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\nimport { mergeDeepLeft } from \"ramda\";\nimport { initReactI18next } from \"react-i18next\";\n\nimport { LIST_FORMATS } from \"./constants\";\nimport {\n listFormatter,\n lowerCaseDynamicTextFormatter,\n} from \"./utils/customFormatters\";\nimport { sentenceCaseProcessor } from \"./utils/customPostProcessors\";\nimport { replaceNullValuesWithGetter } from \"./utils/utils\";\n\nimport commonsEn from \"../translations/en.json\";\n\n// eslint-disable-next-line import/no-mutable-exports\nlet taxonomies = {};\n\nconst initializeI18n = hostTranslations => {\n // eslint-disable-next-line no-undef\n const packageTranslations = preval.require(\n \"../configs/scripts/getPkgTranslations.js\"\n );\n\n const commonsTranslations = { en: { translation: commonsEn } };\n\n const resources = [\n hostTranslations,\n commonsTranslations,\n packageTranslations,\n ].reduce(mergeDeepLeft);\n\n const defaultTaxonomyKeys = Object.keys(\n resources.en.translation.taxonomyDefaultLabels || {}\n );\n\n const defaultTaxonomies = Object.fromEntries(\n defaultTaxonomyKeys.map(key => [key, { singular: null, plural: null }])\n );\n\n const hostTaxonomies = window.globalProps?.taxonomies || {};\n\n taxonomies = replaceNullValuesWithGetter(\n mergeDeepLeft(hostTaxonomies, defaultTaxonomies)\n );\n\n i18n\n .use(LanguageDetector)\n .use(initReactI18next)\n .use(sentenceCaseProcessor)\n .init({\n resources,\n fallbackLng: \"en\",\n interpolation: {\n defaultVariables: { taxonomies },\n escapeValue: false,\n skipOnVariables: false,\n alwaysFormat: true,\n format: (value, format, lng, options) => {\n let newValue = value;\n\n if (LIST_FORMATS.includes(format)) {\n newValue = listFormatter({ value: newValue, format, lng, options });\n\n return newValue;\n }\n\n return lowerCaseDynamicTextFormatter(newValue, format);\n },\n },\n postProcess: [sentenceCaseProcessor.name],\n detection: {\n order: [\"querystring\", \"cookie\", \"navigator\", \"path\"],\n caches: [\"cookie\"],\n lookupQuerystring: \"lang\",\n lookupCookie: \"lang\",\n },\n });\n};\n\nexport { taxonomies };\n\nexport default initializeI18n;\n"],"mappings":"AAAA,OAAOA,IAAI,MAAM,SAAS;AAC1B,OAAOC,gBAAgB,MAAM,kCAAkC;AAC/D,SAASC,aAAa,QAAQ,OAAO;AACrC,SAASC,gBAAgB,QAAQ,eAAe;AAEhD,SAASC,YAAY;AACrB,SACEC,aAAa,EACbC,6BAA6B;AAE/B,SAASC,qBAAqB;AAC9B,SAASC,2BAA2B;AAEpC,OAAOC,SAAS;;AAEhB;AACA,IAAIC,UAAU,GAAG,CAAC,CAAC;AAEnB,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAAGC,gBAAgB,EAAI;EAAA,IAAAC,mBAAA;EACzC;EACA,IAAMC,mBAAmB,GAAGC,MAAM,CAACC,OAAO,CACxC,0CACF,CAAC;EAED,IAAMC,mBAAmB,GAAG;IAAEC,EAAE,EAAE;MAAEC,WAAW,EAAEV;IAAU;EAAE,CAAC;EAE9D,IAAMW,SAAS,GAAG,CAChBR,gBAAgB,EAChBK,mBAAmB,EACnBH,mBAAmB,CACpB,CAACO,MAAM,CAACnB,aAAa,CAAC;EAEvB,IAAMoB,mBAAmB,GAAGC,MAAM,CAACC,IAAI,CACrCJ,SAAS,CAACF,EAAE,CAACC,WAAW,CAACM,qBAAqB,IAAI,CAAC,CACrD,CAAC;EAED,IAAMC,iBAAiB,GAAGH,MAAM,CAACI,WAAW,CAC1CL,mBAAmB,CAACM,GAAG,CAAC,UAAAC,GAAG;IAAA,OAAI,CAACA,GAAG,EAAE;MAAEC,QAAQ,EAAE,IAAI;MAAEC,MAAM,EAAE;IAAK,CAAC,CAAC;EAAA,EACxE,CAAC;EAED,IAAMC,cAAc,GAAG,EAAAnB,mBAAA,GAAAoB,MAAM,CAACC,WAAW,cAAArB,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AAc","ignoreList":[]}
|
package/initializers/index.js
CHANGED
|
@@ -25,7 +25,7 @@ export default function initializeApplication(_ref) {
|
|
|
25
25
|
}
|
|
26
26
|
if (!(skip !== null && skip !== void 0 && skip.i18n)) initializeI18n(translationResources);
|
|
27
27
|
if (!(skip !== null && skip !== void 0 && skip.logger)) initializeLogger();
|
|
28
|
-
if (!(skip !== null && skip !== void 0 && skip.dayjs)) initializeDayjs();
|
|
28
|
+
if (!(skip !== null && skip !== void 0 && skip.dayjs)) initializeDayjs(skip === null || skip === void 0 ? void 0 : skip.timezone);
|
|
29
29
|
if (process.env.NODE_ENV === "production") disableReactDevTools();
|
|
30
30
|
var pageLoader = document.getElementById("neeto-page-loader");
|
|
31
31
|
if (pageLoader) pageLoader.remove();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["useDisplayErrorPage","initializeAxios","initializeDayjs","initializeGlobalProps","initializeI18n","taxonomies","initializeLogger","initializeMixpanel","disableReactDevTools","globalProps","initializeApplication","_ref","translationResources","skip","window","_typeof","axios","i18n","logger","dayjs","process","env","NODE_ENV","pageLoader","document","getElementById","remove"],"sources":["../../src/initializers/index.js"],"sourcesContent":["// TODO: kept for backward compatibility.\nimport useDisplayErrorPage from \"react-utils/useDisplayErrorPage\";\n\nimport initializeAxios from \"./axios\";\nimport initializeDayjs from \"./dayjs\";\nimport initializeGlobalProps from \"./globalProps\";\nimport initializeI18n, { taxonomies } from \"./i18n\";\nimport initializeLogger from \"./logger\";\nimport initializeMixpanel from \"./mixpanel\";\nimport disableReactDevTools from \"./reactDevTools\";\n\n// eslint-disable-next-line import/no-mutable-exports\nlet globalProps = {};\n\nexport { globalProps, useDisplayErrorPage, taxonomies };\n\nexport default function initializeApplication({ translationResources, skip }) {\n if (!skip?.globalProps) {\n initializeGlobalProps();\n // eslint-disable-next-line @bigbinary/neeto/no-globalProps-reassignment\n globalProps = window.globalProps;\n }\n\n if (typeof skip?.axios === \"object\" || !skip?.axios) {\n initializeAxios(skip?.axios);\n }\n\n if (!skip?.i18n) initializeI18n(translationResources);\n\n if (!skip?.logger) initializeLogger();\n\n if (!skip?.dayjs) initializeDayjs();\n\n if (process.env.NODE_ENV === \"production\") disableReactDevTools();\n\n const pageLoader = document.getElementById(\"neeto-page-loader\");\n if (pageLoader) pageLoader.remove();\n\n initializeMixpanel(skip);\n}\n"],"mappings":";AAAA;AACA,OAAOA,mBAAmB;AAE1B,OAAOC,eAAe;AACtB,OAAOC,eAAe;AACtB,OAAOC,qBAAqB;AAC5B,OAAOC,cAAc,IAAIC,UAAU;AACnC,OAAOC,gBAAgB;AACvB,OAAOC,kBAAkB;AACzB,OAAOC,oBAAoB;;AAE3B;AACA,IAAIC,WAAW,GAAG,CAAC,CAAC;AAEpB,SAASA,WAAW,EAAET,mBAAmB,EAAEK,UAAU;AAErD,eAAe,SAASK,qBAAqBA,CAAAC,IAAA,EAAiC;EAAA,IAA9BC,oBAAoB,GAAAD,IAAA,CAApBC,oBAAoB;IAAEC,IAAI,GAAAF,IAAA,CAAJE,IAAI;EACxE,IAAI,EAACA,IAAI,aAAJA,IAAI,eAAJA,IAAI,CAAEJ,WAAW,GAAE;IACtBN,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.js","names":["useDisplayErrorPage","initializeAxios","initializeDayjs","initializeGlobalProps","initializeI18n","taxonomies","initializeLogger","initializeMixpanel","disableReactDevTools","globalProps","initializeApplication","_ref","translationResources","skip","window","_typeof","axios","i18n","logger","dayjs","timezone","process","env","NODE_ENV","pageLoader","document","getElementById","remove"],"sources":["../../src/initializers/index.js"],"sourcesContent":["// TODO: kept for backward compatibility.\nimport useDisplayErrorPage from \"react-utils/useDisplayErrorPage\";\n\nimport initializeAxios from \"./axios\";\nimport initializeDayjs from \"./dayjs\";\nimport initializeGlobalProps from \"./globalProps\";\nimport initializeI18n, { taxonomies } from \"./i18n\";\nimport initializeLogger from \"./logger\";\nimport initializeMixpanel from \"./mixpanel\";\nimport disableReactDevTools from \"./reactDevTools\";\n\n// eslint-disable-next-line import/no-mutable-exports\nlet globalProps = {};\n\nexport { globalProps, useDisplayErrorPage, taxonomies };\n\nexport default function initializeApplication({ translationResources, skip }) {\n if (!skip?.globalProps) {\n initializeGlobalProps();\n // eslint-disable-next-line @bigbinary/neeto/no-globalProps-reassignment\n globalProps = window.globalProps;\n }\n\n if (typeof skip?.axios === \"object\" || !skip?.axios) {\n initializeAxios(skip?.axios);\n }\n\n if (!skip?.i18n) initializeI18n(translationResources);\n\n if (!skip?.logger) initializeLogger();\n\n if (!skip?.dayjs) initializeDayjs(skip?.timezone);\n\n if (process.env.NODE_ENV === \"production\") disableReactDevTools();\n\n const pageLoader = document.getElementById(\"neeto-page-loader\");\n if (pageLoader) pageLoader.remove();\n\n initializeMixpanel(skip);\n}\n"],"mappings":";AAAA;AACA,OAAOA,mBAAmB;AAE1B,OAAOC,eAAe;AACtB,OAAOC,eAAe;AACtB,OAAOC,qBAAqB;AAC5B,OAAOC,cAAc,IAAIC,UAAU;AACnC,OAAOC,gBAAgB;AACvB,OAAOC,kBAAkB;AACzB,OAAOC,oBAAoB;;AAE3B;AACA,IAAIC,WAAW,GAAG,CAAC,CAAC;AAEpB,SAASA,WAAW,EAAET,mBAAmB,EAAEK,UAAU;AAErD,eAAe,SAASK,qBAAqBA,CAAAC,IAAA,EAAiC;EAAA,IAA9BC,oBAAoB,GAAAD,IAAA,CAApBC,oBAAoB;IAAEC,IAAI,GAAAF,IAAA,CAAJE,IAAI;EACxE,IAAI,EAACA,IAAI,aAAJA,IAAI,eAAJA,IAAI,CAAEJ,WAAW,GAAE;IACtBN,qBAAqB,CAAC,CAAC;IACvB;IACAM,WAAW,GAAGK,MAAM,CAACL,WAAW;EAClC;EAEA,IAAIM,OAAA,CAAOF,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEG,KAAK,MAAK,QAAQ,IAAI,EAACH,IAAI,aAAJA,IAAI,eAAJA,IAAI,CAAEG,KAAK,GAAE;IACnDf,eAAe,CAACY,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEG,KAAK,CAAC;EAC9B;EAEA,IAAI,EAACH,IAAI,aAAJA,IAAI,eAAJA,IAAI,CAAEI,IAAI,GAAEb,cAAc,CAACQ,oBAAoB,CAAC;EAErD,IAAI,EAACC,IAAI,aAAJA,IAAI,eAAJA,IAAI,CAAEK,MAAM,GAAEZ,gBAAgB,CAAC,CAAC;EAErC,IAAI,EAACO,IAAI,aAAJA,IAAI,eAAJA,IAAI,CAAEM,KAAK,GAAEjB,eAAe,CAACW,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEO,QAAQ,CAAC;EAEjD,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAEf,oBAAoB,CAAC,CAAC;EAEjE,IAAMgB,UAAU,GAAGC,QAAQ,CAACC,cAAc,CAAC,mBAAmB,CAAC;EAC/D,IAAIF,UAAU,EAAEA,UAAU,CAACG,MAAM,CAAC,CAAC;EAEnCpB,kBAAkB,CAACM,IAAI,CAAC;AAC1B","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","names":["Logger","initializeLogger","useDefaults","process","env","RAILS_ENV","setLevel","OFF","window","logger"],"sources":["../../src/initializers/logger.js"],"sourcesContent":["import Logger from \"js-logger\";\n\nexport default function initializeLogger() {\n /* eslint react-hooks/rules-of-hooks: \"off\" */\n Logger.useDefaults();\n if (process.env.RAILS_ENV === \"production\") {\n Logger.setLevel(Logger.OFF);\n }\n window.logger = Logger;\n}\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,WAAW;AAE9B,eAAe,SAASC,gBAAgBA,CAAA,EAAG;EACzC;EACAD,MAAM,CAACE,WAAW,
|
|
1
|
+
{"version":3,"file":"logger.js","names":["Logger","initializeLogger","useDefaults","process","env","RAILS_ENV","setLevel","OFF","window","logger"],"sources":["../../src/initializers/logger.js"],"sourcesContent":["import Logger from \"js-logger\";\n\nexport default function initializeLogger() {\n /* eslint react-hooks/rules-of-hooks: \"off\" */\n Logger.useDefaults();\n if (process.env.RAILS_ENV === \"production\") {\n Logger.setLevel(Logger.OFF);\n }\n window.logger = Logger;\n}\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,WAAW;AAE9B,eAAe,SAASC,gBAAgBA,CAAA,EAAG;EACzC;EACAD,MAAM,CAACE,WAAW,CAAC,CAAC;EACpB,IAAIC,OAAO,CAACC,GAAG,CAACC,SAAS,KAAK,YAAY,EAAE;IAC1CL,MAAM,CAACM,QAAQ,CAACN,MAAM,CAACO,GAAG,CAAC;EAC7B;EACAC,MAAM,CAACC,MAAM,GAAGT,MAAM;AACxB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mixpanel.js","names":["mixpanel","initializeMixpanel","skip","_globalProps$user","_globalProps$organiza","analyticsId","concat","globalProps","user","email","organization","subdomain","mixpanelProjectToken","_globalProps$user2","_globalProps$user3","_globalProps$user4","_globalProps$user5","_globalProps$organiza2","init","people","set","$first_name","firstName","$last_name","lastName","$email","identify"],"sources":["../../src/initializers/mixpanel.js"],"sourcesContent":["import mixpanel from \"mixpanel-browser\";\n\nexport default function initializeMixpanel(skip) {\n const analyticsId = `${globalProps.user?.email}-${globalProps.organization?.subdomain}`;\n\n if (globalProps.mixpanelProjectToken && !skip?.mixpanel) {\n mixpanel.init(globalProps.mixpanelProjectToken);\n mixpanel.people.set({\n $first_name: globalProps.user?.firstName,\n $last_name: globalProps.user?.lastName,\n $email: globalProps.user?.email,\n user: globalProps.user?.email,\n subdomain: globalProps.organization?.subdomain,\n });\n mixpanel.identify(analyticsId);\n } else {\n /*\n We need to initialize mixpanel with a bogus token in development and test environment to\n prevent mixpanel library from throwing an error when we use mixpanel.track() method in react components.\n */\n mixpanel.init(\"TEST_TOKEN\");\n }\n}\n"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,kBAAkB;AAEvC,eAAe,SAASC,kBAAkBA,CAACC,IAAI,EAAE;EAAA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":["mixpanel","initializeMixpanel","skip","_globalProps$user","_globalProps$organiza","analyticsId","concat","globalProps","user","email","organization","subdomain","mixpanelProjectToken","_globalProps$user2","_globalProps$user3","_globalProps$user4","_globalProps$user5","_globalProps$organiza2","init","people","set","$first_name","firstName","$last_name","lastName","$email","identify"],"sources":["../../src/initializers/mixpanel.js"],"sourcesContent":["import mixpanel from \"mixpanel-browser\";\n\nexport default function initializeMixpanel(skip) {\n const analyticsId = `${globalProps.user?.email}-${globalProps.organization?.subdomain}`;\n\n if (globalProps.mixpanelProjectToken && !skip?.mixpanel) {\n mixpanel.init(globalProps.mixpanelProjectToken);\n mixpanel.people.set({\n $first_name: globalProps.user?.firstName,\n $last_name: globalProps.user?.lastName,\n $email: globalProps.user?.email,\n user: globalProps.user?.email,\n subdomain: globalProps.organization?.subdomain,\n });\n mixpanel.identify(analyticsId);\n } else {\n /*\n We need to initialize mixpanel with a bogus token in development and test environment to\n prevent mixpanel library from throwing an error when we use mixpanel.track() method in react components.\n */\n mixpanel.init(\"TEST_TOKEN\");\n }\n}\n"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,kBAAkB;AAEvC,eAAe,SAASC,kBAAkBA,CAACC,IAAI,EAAE;EAAA,IAAAC,iBAAA,EAAAC,qBAAA;EAC/C,IAAMC,WAAW,MAAAC,MAAA,EAAAH,iBAAA,GAAMI,WAAW,CAACC,IAAI,cAAAL,iBAAA,uBAAhBA,iBAAA,CAAkBM,KAAK,OAAAH,MAAA,EAAAF,qBAAA,GAAIG,WAAW,CAACG,YAAY,cAAAN,qBAAA,uBAAxBA,qBAAA,CAA0BO,SAAS,CAAE;EAEvF,IAAIJ,WAAW,CAACK,oBAAoB,IAAI,EAACV,IAAI,aAAJA,IAAI,eAAJA,IAAI,CAAEF,QAAQ,GAAE;IAAA,IAAAa,kBAAA,EAAAC,kBAAA,EAAAC,kBAAA,EAAAC,kBAAA,EAAAC,sBAAA;IACvDjB,QAAQ,CAACkB,IAAI,CAACX,WAAW,CAACK,oBAAoB,CAAC;IAC/CZ,QAAQ,CAACmB,MAAM,CAACC,GAAG,CAAC;MAClBC,WAAW,GAAAR,kBAAA,GAAEN,WAAW,CAACC,IAAI,cAAAK,kBAAA,uBAAhBA,kBAAA,CAAkBS,SAAS;MACxCC,UAAU,GAAAT,kBAAA,GAAEP,WAAW,CAACC,IAAI,cAAAM,kBAAA,uBAAhBA,kBAAA,CAAkBU,QAAQ;MACtCC,MAAM,GAAAV,kBAAA,GAAER,WAAW,CAACC,IAAI,cAAAO,kBAAA,uBAAhBA,kBAAA,CAAkBN,KAAK;MAC/BD,IAAI,GAAAQ,kBAAA,GAAET,WAAW,CAACC,IAAI,cAAAQ,kBAAA,uBAAhBA,kBAAA,CAAkBP,KAAK;MAC7BE,SAAS,GAAAM,sBAAA,GAAEV,WAAW,CAACG,YAAY,cAAAO,sBAAA,uBAAxBA,sBAAA,CAA0BN;IACvC,CAAC,CAAC;IACFX,QAAQ,CAAC0B,QAAQ,CAACrB,WAAW,CAAC;EAChC,CAAC,MAAM;IACL;AACJ;AACA;AACA;IACIL,QAAQ,CAACkB,IAAI,CAAC,YAAY,CAAC;EAC7B;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactDevTools.js","names":["isObjectOrFunction","object","type","_typeof","disableReactDevTools","window","document","developerToolsHook","__REACT_DEVTOOLS_GLOBAL_HOOK__","prop","Map","Function","prototype"],"sources":["../../src/initializers/reactDevTools.js"],"sourcesContent":["const isObjectOrFunction = object => {\n const type = typeof object;\n\n return type === \"function\" || (type === \"object\" && !!object);\n};\n\nexport default function disableReactDevTools() {\n if (window && window.document) {\n const developerToolsHook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;\n\n if (!isObjectOrFunction(developerToolsHook)) return;\n\n for (const prop in developerToolsHook) {\n if (prop === \"renderers\") {\n developerToolsHook[prop] = new Map();\n } else {\n developerToolsHook[prop] =\n typeof developerToolsHook[prop] === \"function\"\n ? Function.prototype\n : null;\n }\n }\n }\n}\n"],"mappings":";AAAA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAGC,MAAM,EAAI;EACnC,IAAMC,IAAI,GAAAC,OAAA,CAAUF,MAAM;EAE1B,OAAOC,IAAI,KAAK,UAAU,IAAKA,IAAI,KAAK,QAAQ,IAAI,CAAC,CAACD,MAAO;AAC/D,CAAC;AAED,eAAe,SAASG,oBAAoBA,CAAA,EAAG;EAC7C,IAAIC,MAAM,IAAIA,MAAM,CAACC,QAAQ,EAAE;IAC7B,IAAMC,kBAAkB,GAAGF,MAAM,CAACG,8BAA8B;IAEhE,IAAI,CAACR,kBAAkB,CAACO,kBAAkB,CAAC,EAAE;IAE7C,KAAK,IAAME,IAAI,IAAIF,kBAAkB,EAAE;MACrC,IAAIE,IAAI,KAAK,WAAW,EAAE;QACxBF,kBAAkB,CAACE,IAAI,CAAC,GAAG,IAAIC,GAAG,
|
|
1
|
+
{"version":3,"file":"reactDevTools.js","names":["isObjectOrFunction","object","type","_typeof","disableReactDevTools","window","document","developerToolsHook","__REACT_DEVTOOLS_GLOBAL_HOOK__","prop","Map","Function","prototype"],"sources":["../../src/initializers/reactDevTools.js"],"sourcesContent":["const isObjectOrFunction = object => {\n const type = typeof object;\n\n return type === \"function\" || (type === \"object\" && !!object);\n};\n\nexport default function disableReactDevTools() {\n if (window && window.document) {\n const developerToolsHook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;\n\n if (!isObjectOrFunction(developerToolsHook)) return;\n\n for (const prop in developerToolsHook) {\n if (prop === \"renderers\") {\n developerToolsHook[prop] = new Map();\n } else {\n developerToolsHook[prop] =\n typeof developerToolsHook[prop] === \"function\"\n ? Function.prototype\n : null;\n }\n }\n }\n}\n"],"mappings":";AAAA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAGC,MAAM,EAAI;EACnC,IAAMC,IAAI,GAAAC,OAAA,CAAUF,MAAM;EAE1B,OAAOC,IAAI,KAAK,UAAU,IAAKA,IAAI,KAAK,QAAQ,IAAI,CAAC,CAACD,MAAO;AAC/D,CAAC;AAED,eAAe,SAASG,oBAAoBA,CAAA,EAAG;EAC7C,IAAIC,MAAM,IAAIA,MAAM,CAACC,QAAQ,EAAE;IAC7B,IAAMC,kBAAkB,GAAGF,MAAM,CAACG,8BAA8B;IAEhE,IAAI,CAACR,kBAAkB,CAACO,kBAAkB,CAAC,EAAE;IAE7C,KAAK,IAAME,IAAI,IAAIF,kBAAkB,EAAE;MACrC,IAAIE,IAAI,KAAK,WAAW,EAAE;QACxBF,kBAAkB,CAACE,IAAI,CAAC,GAAG,IAAIC,GAAG,CAAC,CAAC;MACtC,CAAC,MAAM;QACLH,kBAAkB,CAACE,IAAI,CAAC,GACtB,OAAOF,kBAAkB,CAACE,IAAI,CAAC,KAAK,UAAU,GAC1CE,QAAQ,CAACC,SAAS,GAClB,IAAI;MACZ;IACF;EACF;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customFormatters.js","names":["DOMPurify","LOWERCASED","FORMATS","sanitizer","array","sanitize","USE_PROFILES","html","cacheStore","Map","fetchCachedOrInvoke","func","lng","options","_cacheStore$get","cache","get","lngCache","set","lowerCaseDynamicTextFormatter","value","format","anyCase","toLocaleLowerCase","listFormatter","_ref","formatter","Intl","ListFormat","newValue","boldList","map","item","concat","sanitizedItems","split"],"sources":["../../../src/initializers/utils/customFormatters.js"],"sourcesContent":["import DOMPurify from \"dompurify\";\n\nimport { LOWERCASED, FORMATS } from \"../constants\";\n\nconst sanitizer = array =>\n DOMPurify.sanitize(array, { USE_PROFILES: { html: true } });\n\nconst cacheStore = new Map();\n\nconst fetchCachedOrInvoke = (func, lng, options) => {\n let cache = cacheStore.get(lng)?.get(options);\n if (cache) return cache;\n\n cache = func(lng, options);\n const lngCache = cacheStore.get(lng);\n if (lngCache) lngCache.set(options, cache);\n else cacheStore.set(lng, new Map([[options, cache]]));\n\n return cache;\n};\n\nexport const lowerCaseDynamicTextFormatter = (value, format) => {\n if (!value || format === FORMATS.anyCase || typeof value !== \"string\") {\n return value;\n }\n\n return LOWERCASED + value.toLocaleLowerCase();\n};\n\nexport const listFormatter = ({ value, format, lng, options }) => {\n const formatter = fetchCachedOrInvoke(\n (lng, options) => new Intl.ListFormat(lng, options),\n lng,\n options\n );\n\n let newValue = value;\n if (format === FORMATS.boldList) {\n newValue = value.map(item => `<strong>${item}</strong>`);\n }\n const sanitizedItems = sanitizer(newValue).split(\",\");\n\n return formatter.format(sanitizedItems);\n};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,WAAW;AAEjC,SAASC,UAAU,EAAEC,OAAO;AAE5B,IAAMC,SAAS,GAAG,SAAZA,SAASA,CAAGC,KAAK;EAAA,OACrBJ,SAAS,CAACK,QAAQ,CAACD,KAAK,EAAE;IAAEE,YAAY,EAAE;MAAEC,IAAI,EAAE;IAAK;EAAE,CAAC,CAAC;AAAA;AAE7D,IAAMC,UAAU,GAAG,IAAIC,GAAG,
|
|
1
|
+
{"version":3,"file":"customFormatters.js","names":["DOMPurify","LOWERCASED","FORMATS","sanitizer","array","sanitize","USE_PROFILES","html","cacheStore","Map","fetchCachedOrInvoke","func","lng","options","_cacheStore$get","cache","get","lngCache","set","lowerCaseDynamicTextFormatter","value","format","anyCase","toLocaleLowerCase","listFormatter","_ref","formatter","Intl","ListFormat","newValue","boldList","map","item","concat","sanitizedItems","split"],"sources":["../../../src/initializers/utils/customFormatters.js"],"sourcesContent":["import DOMPurify from \"dompurify\";\n\nimport { LOWERCASED, FORMATS } from \"../constants\";\n\nconst sanitizer = array =>\n DOMPurify.sanitize(array, { USE_PROFILES: { html: true } });\n\nconst cacheStore = new Map();\n\nconst fetchCachedOrInvoke = (func, lng, options) => {\n let cache = cacheStore.get(lng)?.get(options);\n if (cache) return cache;\n\n cache = func(lng, options);\n const lngCache = cacheStore.get(lng);\n if (lngCache) lngCache.set(options, cache);\n else cacheStore.set(lng, new Map([[options, cache]]));\n\n return cache;\n};\n\nexport const lowerCaseDynamicTextFormatter = (value, format) => {\n if (!value || format === FORMATS.anyCase || typeof value !== \"string\") {\n return value;\n }\n\n return LOWERCASED + value.toLocaleLowerCase();\n};\n\nexport const listFormatter = ({ value, format, lng, options }) => {\n const formatter = fetchCachedOrInvoke(\n (lng, options) => new Intl.ListFormat(lng, options),\n lng,\n options\n );\n\n let newValue = value;\n if (format === FORMATS.boldList) {\n newValue = value.map(item => `<strong>${item}</strong>`);\n }\n const sanitizedItems = sanitizer(newValue).split(\",\");\n\n return formatter.format(sanitizedItems);\n};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,WAAW;AAEjC,SAASC,UAAU,EAAEC,OAAO;AAE5B,IAAMC,SAAS,GAAG,SAAZA,SAASA,CAAGC,KAAK;EAAA,OACrBJ,SAAS,CAACK,QAAQ,CAACD,KAAK,EAAE;IAAEE,YAAY,EAAE;MAAEC,IAAI,EAAE;IAAK;EAAE,CAAC,CAAC;AAAA;AAE7D,IAAMC,UAAU,GAAG,IAAIC,GAAG,CAAC,CAAC;AAE5B,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAIC,IAAI,EAAEC,GAAG,EAAEC,OAAO,EAAK;EAAA,IAAAC,eAAA;EAClD,IAAIC,KAAK,IAAAD,eAAA,GAAGN,UAAU,CAACQ,GAAG,CAACJ,GAAG,CAAC,cAAAE,eAAA,uBAAnBA,eAAA,CAAqBE,GAAG,CAACH,OAAO,CAAC;EAC7C,IAAIE,KAAK,EAAE,OAAOA,KAAK;EAEvBA,KAAK,GAAGJ,IAAI,CAACC,GAAG,EAAEC,OAAO,CAAC;EAC1B,IAAMI,QAAQ,GAAGT,UAAU,CAACQ,GAAG,CAACJ,GAAG,CAAC;EACpC,IAAIK,QAAQ,EAAEA,QAAQ,CAACC,GAAG,CAACL,OAAO,EAAEE,KAAK,CAAC,CAAC,KACtCP,UAAU,CAACU,GAAG,CAACN,GAAG,EAAE,IAAIH,GAAG,CAAC,CAAC,CAACI,OAAO,EA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LocaleUpperCase","slice","sentenceCaseProcessor","type","name","process","shouldSentenceCase","startsWith","replace"],"sources":["../../../src/initializers/utils/customPostProcessors.js"],"sourcesContent":["import { LOWERCASED, LOWERCASED_GLOBAL_REGEX } from \"../constants\";\n\nconst sentenceCase = value =>\n value.charAt(0).toLocaleUpperCase() + value.slice(1);\n\nexport const sentenceCaseProcessor = {\n type: \"postProcessor\",\n name: \"sentenceCaseProcessor\",\n process: value => {\n const shouldSentenceCase = value.startsWith(LOWERCASED);\n value = value.replace(LOWERCASED_GLOBAL_REGEX, \"\");\n\n return shouldSentenceCase ? sentenceCase(value) : value;\n },\n};\n"],"mappings":"AAAA,SAASA,UAAU,EAAEC,uBAAuB;AAE5C,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAGC,KAAK;EAAA,OACxBA,KAAK,CAACC,MAAM,CAAC,CAAC,CAAC,CAACC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"customPostProcessors.js","names":["LOWERCASED","LOWERCASED_GLOBAL_REGEX","sentenceCase","value","charAt","toLocaleUpperCase","slice","sentenceCaseProcessor","type","name","process","shouldSentenceCase","startsWith","replace"],"sources":["../../../src/initializers/utils/customPostProcessors.js"],"sourcesContent":["import { LOWERCASED, LOWERCASED_GLOBAL_REGEX } from \"../constants\";\n\nconst sentenceCase = value =>\n value.charAt(0).toLocaleUpperCase() + value.slice(1);\n\nexport const sentenceCaseProcessor = {\n type: \"postProcessor\",\n name: \"sentenceCaseProcessor\",\n process: value => {\n const shouldSentenceCase = value.startsWith(LOWERCASED);\n value = value.replace(LOWERCASED_GLOBAL_REGEX, \"\");\n\n return shouldSentenceCase ? sentenceCase(value) : value;\n },\n};\n"],"mappings":"AAAA,SAASA,UAAU,EAAEC,uBAAuB;AAE5C,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAGC,KAAK;EAAA,OACxBA,KAAK,CAACC,MAAM,CAAC,CAAC,CAAC,CAACC,iBAAiB,CAAC,CAAC,GAAGF,KAAK,CAACG,KAAK,CAAC,CAAC,CAAC;AAAA;AAEtD,OAAO,IAAMC,qBAAqB,GAAG;EACnCC,IAAI,EAAE,eAAe;EACrBC,IAAI,EAAE,uBAAuB;EAC7BC,OAAO,EAAE,SAATA,OAAOA,CAAEP,KAAK,EAAI;IAChB,IAAMQ,kBAAkB,GAAGR,KAAK,CAACS,UAAU,CAACZ,UAAU,CAAC;IACvDG,KAAK,GAAGA,KAAK,CAACU,OAAO,CAACZ,uBAAuB,EAAE,EAAE,CAAC;IAElD,OAAOU,kBAAkB,GAAGT,YAAY,CAACC,KAAK,CAAC,GAAGA,KAAK;EACzD;AACF,CAAC","ignoreList":[]}
|
|
@@ -6,7 +6,7 @@ var getter = function getter(key) {
|
|
|
6
6
|
return i18n.t("taxonomyDefaultLabels.".concat(key));
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
var _replaceNullValuesWithGetter = function replaceNullValuesWithGetter(inputObject) {
|
|
10
10
|
var parentKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
11
11
|
var result = {};
|
|
12
12
|
for (var _i = 0, _Object$entries = Object.entries(inputObject); _i < _Object$entries.length; _i++) {
|
|
@@ -19,11 +19,12 @@ export var replaceNullValuesWithGetter = function replaceNullValuesWithGetter(in
|
|
|
19
19
|
get: getter(transKey)
|
|
20
20
|
});
|
|
21
21
|
} else if (_typeof(value) === "object") {
|
|
22
|
-
result[key] =
|
|
22
|
+
result[key] = _replaceNullValuesWithGetter(value, transKey);
|
|
23
23
|
} else {
|
|
24
24
|
result[key] = value;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
|
+
export { _replaceNullValuesWithGetter as replaceNullValuesWithGetter };
|
|
29
30
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["i18n","getter","key","t","concat","replaceNullValuesWithGetter","inputObject","parentKey","arguments","length","undefined","result","_i","_Object$entries","Object","entries","_Object$entries$_i","_slicedToArray","value","transKey","defineProperty","get","_typeof"],"sources":["../../../src/initializers/utils/utils.js"],"sourcesContent":["import i18n from \"i18next\";\n\nconst getter = key => () => i18n.t(`taxonomyDefaultLabels.${key}`);\n\nexport const replaceNullValuesWithGetter = (inputObject, parentKey = \"\") => {\n const result = {};\n\n for (const [key, value] of Object.entries(inputObject)) {\n const transKey = parentKey ? `${parentKey}.${key}` : key;\n\n if (value === null) {\n Object.defineProperty(result, key, {\n get: getter(transKey),\n });\n } else if (typeof value === \"object\") {\n result[key] = replaceNullValuesWithGetter(value, transKey);\n } else {\n result[key] = value;\n }\n }\n\n return result;\n};\n"],"mappings":";;AAAA,OAAOA,IAAI,MAAM,SAAS;AAE1B,IAAMC,MAAM,GAAG,SAATA,MAAMA,CAAGC,GAAG;EAAA,OAAI;IAAA,OAAMF,IAAI,CAACG,CAAC,0BAAAC,MAAA,CAA0BF,GAAG,
|
|
1
|
+
{"version":3,"file":"utils.js","names":["i18n","getter","key","t","concat","replaceNullValuesWithGetter","inputObject","parentKey","arguments","length","undefined","result","_i","_Object$entries","Object","entries","_Object$entries$_i","_slicedToArray","value","transKey","defineProperty","get","_typeof","_replaceNullValuesWithGetter"],"sources":["../../../src/initializers/utils/utils.js"],"sourcesContent":["import i18n from \"i18next\";\n\nconst getter = key => () => i18n.t(`taxonomyDefaultLabels.${key}`);\n\nexport const replaceNullValuesWithGetter = (inputObject, parentKey = \"\") => {\n const result = {};\n\n for (const [key, value] of Object.entries(inputObject)) {\n const transKey = parentKey ? `${parentKey}.${key}` : key;\n\n if (value === null) {\n Object.defineProperty(result, key, {\n get: getter(transKey),\n });\n } else if (typeof value === \"object\") {\n result[key] = replaceNullValuesWithGetter(value, transKey);\n } else {\n result[key] = value;\n }\n }\n\n return result;\n};\n"],"mappings":";;AAAA,OAAOA,IAAI,MAAM,SAAS;AAE1B,IAAMC,MAAM,GAAG,SAATA,MAAMA,CAAGC,GAAG;EAAA,OAAI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4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-commons-frontend.git",
|
|
6
6
|
"author": "Amaljith K <amaljith.k@bigbinary.com>",
|
|
@@ -15,6 +15,28 @@
|
|
|
15
15
|
"yarn": ">=1.22"
|
|
16
16
|
},
|
|
17
17
|
"exports": {
|
|
18
|
+
"./configs/*": "./configs/*",
|
|
19
|
+
"./constants": {
|
|
20
|
+
"import": "./constants/index.js",
|
|
21
|
+
"require": "./cjs/constants/index.js",
|
|
22
|
+
"types": "./constants.d.ts"
|
|
23
|
+
},
|
|
24
|
+
"./cypress-configs/*": "./cypress-configs/*",
|
|
25
|
+
"./cypress-utils": {
|
|
26
|
+
"import": "./cypress-utils/index.js",
|
|
27
|
+
"require": "./cjs/cypress-utils/index.js",
|
|
28
|
+
"types": "./cypress-utils.d.ts"
|
|
29
|
+
},
|
|
30
|
+
"./initializers": {
|
|
31
|
+
"import": "./initializers/index.js",
|
|
32
|
+
"require": "./cjs/initializers/index.js",
|
|
33
|
+
"types": "./initializers.d.ts"
|
|
34
|
+
},
|
|
35
|
+
"./initializers/*": {
|
|
36
|
+
"import": "./initializers/*.js",
|
|
37
|
+
"require": "./cjs/initializers/*.js",
|
|
38
|
+
"types": "./initializers.d.ts"
|
|
39
|
+
},
|
|
18
40
|
"./react-utils": {
|
|
19
41
|
"import": "./react-utils/index.js",
|
|
20
42
|
"require": "./cjs/react-utils/index.js",
|
|
@@ -34,75 +56,67 @@
|
|
|
34
56
|
"import": "./utils/*.js",
|
|
35
57
|
"require": "./cjs/utils/*.js",
|
|
36
58
|
"types": "./utils.d.ts"
|
|
37
|
-
}
|
|
38
|
-
"./initializers": {
|
|
39
|
-
"import": "./initializers/index.js",
|
|
40
|
-
"require": "./cjs/initializers/index.js",
|
|
41
|
-
"types": "./initializers.d.ts"
|
|
42
|
-
},
|
|
43
|
-
"./initializers/*": {
|
|
44
|
-
"import": "./initializers/*.js",
|
|
45
|
-
"require": "./cjs/initializers/*.js",
|
|
46
|
-
"types": "./initializers.d.ts"
|
|
47
|
-
},
|
|
48
|
-
"./constants": {
|
|
49
|
-
"import": "./constants/index.js",
|
|
50
|
-
"require": "./cjs/constants/index.js",
|
|
51
|
-
"types": "./constants.d.ts"
|
|
52
|
-
},
|
|
53
|
-
"./cypress-utils": {
|
|
54
|
-
"import": "./cypress-utils/index.js",
|
|
55
|
-
"require": "./cjs/cypress-utils/index.js",
|
|
56
|
-
"types": "./cypress-utils.d.ts"
|
|
57
|
-
},
|
|
58
|
-
"./configs/*": "./configs/*",
|
|
59
|
-
"./cypress-configs/*": "./cypress-configs/*"
|
|
59
|
+
}
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@rails/actioncable": "^7.0.3",
|
|
63
63
|
"dayjs": "1.11.10",
|
|
64
|
-
"dompurify": "
|
|
64
|
+
"dompurify": "^2.4.0",
|
|
65
65
|
"i18next-browser-languagedetector": "^7.1.0",
|
|
66
66
|
"immer": "^10.0.2",
|
|
67
67
|
"mixpanel-browser": "^2.50.0",
|
|
68
68
|
"platform": "1.3.6",
|
|
69
|
-
"qs": "^6.11.
|
|
69
|
+
"qs": "^6.11.2",
|
|
70
70
|
"util": "^0.12.5",
|
|
71
71
|
"uuid": "^9.0.0",
|
|
72
72
|
"zustand": "4.3.2"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"@bigbinary/babel-preset-neeto": "^1.0.3",
|
|
76
|
-
"@bigbinary/neeto-cist": "
|
|
77
|
-
"@bigbinary/neeto-commons-frontend": "
|
|
76
|
+
"@bigbinary/neeto-cist": "1.0.11",
|
|
77
|
+
"@bigbinary/neeto-commons-frontend": "4.4.6",
|
|
78
78
|
"@bigbinary/neeto-editor": "1.38.1",
|
|
79
|
-
"@bigbinary/neeto-
|
|
80
|
-
"@bigbinary/neeto-
|
|
81
|
-
"@bigbinary/
|
|
82
|
-
"@
|
|
79
|
+
"@bigbinary/neeto-hotkeys": "^1.0.7",
|
|
80
|
+
"@bigbinary/neeto-icons": "1.20.5",
|
|
81
|
+
"@bigbinary/neeto-molecules": "3.5.2",
|
|
82
|
+
"@bigbinary/neetoui": "8.2.13",
|
|
83
|
+
"@faker-js/faker": "8.2.0",
|
|
83
84
|
"@honeybadger-io/js": "^6.4.1",
|
|
84
85
|
"@honeybadger-io/react": "^6.1.3",
|
|
85
86
|
"@tanstack/react-query": "5.40.0",
|
|
86
87
|
"@tanstack/react-query-devtools": "5.40.0",
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
88
|
+
"@tippyjs/react": "4.2.6",
|
|
89
|
+
"antd": "5.16.0",
|
|
90
|
+
"autoprefixer": "^10.4.5",
|
|
91
|
+
"avvvatars-react": "0.4.2",
|
|
92
|
+
"axios": "1.7.4",
|
|
90
93
|
"cypress": "11.2.0",
|
|
91
94
|
"dayjs": "1.11.10",
|
|
95
|
+
"dompurify": "^2.4.0",
|
|
92
96
|
"dotenv-webpack": "^8.0.1",
|
|
93
|
-
"formik": "
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
97
|
+
"formik": "2.2.9",
|
|
98
|
+
"framer-motion": "11.2.14",
|
|
99
|
+
"husky": "7.0.4",
|
|
100
|
+
"i18next": "22.5.1",
|
|
101
|
+
"js-logger": "1.6.1",
|
|
102
|
+
"linkify-react": "4.1.3",
|
|
103
|
+
"linkifyjs": "4.1.2",
|
|
104
|
+
"qs": "^6.11.2",
|
|
105
|
+
"ramda": "0.29.1",
|
|
98
106
|
"react": "18.2.0",
|
|
107
|
+
"react-colorful": "5.6.1",
|
|
108
|
+
"react-dom": "18.2.0",
|
|
109
|
+
"react-drag-listview": "2.0.0",
|
|
99
110
|
"react-helmet": "^6.1.0",
|
|
100
|
-
"react-i18next": "
|
|
111
|
+
"react-i18next": "12.3.1",
|
|
112
|
+
"react-resizable": "3.0.4",
|
|
101
113
|
"react-router-dom": "5.3.3",
|
|
102
114
|
"react-toastify": "8.0.2",
|
|
103
115
|
"shakapacker": "^6.5.5",
|
|
104
116
|
"tailwindcss": "^3.4.1",
|
|
117
|
+
"util": "^0.12.5",
|
|
105
118
|
"webpack": "^5.75.0",
|
|
106
|
-
"yup": "
|
|
119
|
+
"yup": "0.32.11",
|
|
120
|
+
"zustand": "4.3.2"
|
|
107
121
|
}
|
|
108
|
-
}
|
|
122
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
2
|
+
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; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).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; }
|
|
4
4
|
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
|
5
5
|
import "../../assets/stylesheets/app-container.css";
|
|
6
6
|
import BrowserSupport from "@bigbinary/neeto-molecules/BrowserSupport";
|
|
@@ -9,8 +9,7 @@ import { BrowserRouter } from "react-router-dom";
|
|
|
9
9
|
import { ToastContainer } from "react-toastify";
|
|
10
10
|
import HoneybadgerErrorBoundary from "../HoneybadgerErrorBoundary";
|
|
11
11
|
import QueryClientProvider from "../QueryClientProvider/QueryClientProvider";
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
13
|
var AppContainer = function AppContainer(_ref) {
|
|
15
14
|
var children = _ref.children,
|
|
16
15
|
browserSupportProps = _ref.browserSupportProps,
|
|
@@ -22,9 +21,9 @@ var AppContainer = function AppContainer(_ref) {
|
|
|
22
21
|
return /*#__PURE__*/_jsx(HoneybadgerErrorBoundary, _objectSpread(_objectSpread({}, honeybadgerErrorBoundaryProps), {}, {
|
|
23
22
|
children: /*#__PURE__*/_jsxs(BrowserSupport, _objectSpread(_objectSpread({}, browserSupportProps), {}, {
|
|
24
23
|
children: [/*#__PURE__*/_jsx(ToastContainer, _objectSpread({}, toastContainerProps)), /*#__PURE__*/_jsxs(QueryClientProvider, {
|
|
25
|
-
children: [/*#__PURE__*/_jsx(BrowserRouter, {
|
|
24
|
+
children: [globalProps.authenticated && enableStickyRibbons && /*#__PURE__*/_jsx(StickyRibbonsContainer, {}), /*#__PURE__*/_jsx(BrowserRouter, {
|
|
26
25
|
children: children
|
|
27
|
-
}),
|
|
26
|
+
}), /*#__PURE__*/_jsx(ReactQueryDevtools, _objectSpread({
|
|
28
27
|
initialIsOpen: false,
|
|
29
28
|
position: "bottom"
|
|
30
29
|
}, reactQueryDevtoolsProps))]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppContainer.js","names":["ReactQueryDevtools","BrowserSupport","StickyRibbonsContainer","BrowserRouter","ToastContainer","HoneybadgerErrorBoundary","QueryClientProvider","jsx","_jsx","jsxs","_jsxs","AppContainer","_ref","children","browserSupportProps","_ref$enableStickyRibb","enableStickyRibbons","honeybadgerErrorBoundaryProps","reactQueryDevtoolsProps","toastContainerProps","_objectSpread","globalProps","authenticated","initialIsOpen","position"],"sources":["../../../src/react-utils/AppContainer/AppContainer.jsx"],"sourcesContent":["import { ReactQueryDevtools } from \"@tanstack/react-query-devtools\";\nimport \"assets/stylesheets/app-container.css\";\nimport BrowserSupport from \"neetomolecules/BrowserSupport\";\nimport StickyRibbonsContainer from \"neetomolecules/StickyRibbonsContainer\";\nimport { BrowserRouter } from \"react-router-dom\";\nimport { ToastContainer } from \"react-toastify\";\nimport HoneybadgerErrorBoundary from \"react-utils/HoneybadgerErrorBoundary\";\nimport QueryClientProvider from \"react-utils/QueryClientProvider/QueryClientProvider\";\n\nconst AppContainer = ({\n children,\n browserSupportProps,\n enableStickyRibbons = true,\n honeybadgerErrorBoundaryProps,\n reactQueryDevtoolsProps,\n toastContainerProps,\n}) => (\n <HoneybadgerErrorBoundary {...honeybadgerErrorBoundaryProps}>\n <BrowserSupport {...browserSupportProps}>\n <ToastContainer {...toastContainerProps} />\n <QueryClientProvider>\n
|
|
1
|
+
{"version":3,"file":"AppContainer.js","names":["ReactQueryDevtools","BrowserSupport","StickyRibbonsContainer","BrowserRouter","ToastContainer","HoneybadgerErrorBoundary","QueryClientProvider","jsx","_jsx","jsxs","_jsxs","AppContainer","_ref","children","browserSupportProps","_ref$enableStickyRibb","enableStickyRibbons","honeybadgerErrorBoundaryProps","reactQueryDevtoolsProps","toastContainerProps","_objectSpread","globalProps","authenticated","initialIsOpen","position"],"sources":["../../../src/react-utils/AppContainer/AppContainer.jsx"],"sourcesContent":["import { ReactQueryDevtools } from \"@tanstack/react-query-devtools\";\nimport \"assets/stylesheets/app-container.css\";\nimport BrowserSupport from \"neetomolecules/BrowserSupport\";\nimport StickyRibbonsContainer from \"neetomolecules/StickyRibbonsContainer\";\nimport { BrowserRouter } from \"react-router-dom\";\nimport { ToastContainer } from \"react-toastify\";\nimport HoneybadgerErrorBoundary from \"react-utils/HoneybadgerErrorBoundary\";\nimport QueryClientProvider from \"react-utils/QueryClientProvider/QueryClientProvider\";\n\nconst AppContainer = ({\n children,\n browserSupportProps,\n enableStickyRibbons = true,\n honeybadgerErrorBoundaryProps,\n reactQueryDevtoolsProps,\n toastContainerProps,\n}) => (\n <HoneybadgerErrorBoundary {...honeybadgerErrorBoundaryProps}>\n <BrowserSupport {...browserSupportProps}>\n <ToastContainer {...toastContainerProps} />\n <QueryClientProvider>\n {globalProps.authenticated && enableStickyRibbons && (\n <StickyRibbonsContainer />\n )}\n <BrowserRouter>{children}</BrowserRouter>\n <ReactQueryDevtools\n initialIsOpen={false}\n position=\"bottom\"\n {...reactQueryDevtoolsProps}\n />\n </QueryClientProvider>\n </BrowserSupport>\n </HoneybadgerErrorBoundary>\n);\n\nexport default AppContainer;\n"],"mappings":";;;AAAA,SAASA,kBAAkB,QAAQ,gCAAgC;AACnE;AACA,OAAOC,cAAc;AACrB,OAAOC,sBAAsB;AAC7B,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,OAAOC,wBAAwB;AAC/B,OAAOC,mBAAmB;AAA4D,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEtF,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA;EAAA,IAChBC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,mBAAmB,GAAAF,IAAA,CAAnBE,mBAAmB;IAAAC,qBAAA,GAAAH,IAAA,CACnBI,mBAAmB;IAAnBA,mBAAmB,GAAAD,qBAAA,cAAG,IAAI,GAAAA,qBAAA;IAC1BE,6BAA6B,GAAAL,IAAA,CAA7BK,6BAA6B;IAC7BC,uBAAuB,GAAAN,IAAA,CAAvBM,uBAAuB;IACvBC,mBAAmB,GAAAP,IAAA,CAAnBO,mBAAmB;EAAA,oBAEnBX,IAAA,CAACH,wBAAwB,EAAAe,aAAA,CAAAA,aAAA,KAAKH,6BAA6B;IAAAJ,QAAA,eACzDH,KAAA,CAACT,cAAc,EAAAmB,aAAA,CAAAA,aAAA,KAAKN,mBAAmB;MAAAD,QAAA,gBACrCL,IAAA,CAACJ,cAAc,EAAAgB,aAAA,KAAKD,mBAAmB,CAAG,CAAC,eAC3CT,KAAA,CAACJ,mBAAmB;QAAAO,QAAA,GACjBQ,WAAW,CAACC,aAAa,IAAIN,mBAAmB,iBAC/CR,IAAA,CAACN,sBAAsB,IAAE,CAC1B,eACDM,IAAA,CAACL,aAAa;UAAAU,QAAA,EAAEA;QAAQ,CAAgB,CAAC,eACzCL,IAAA,CAACR,kBAAkB,EAAAoB,aAAA;UACjBG,aAAa,EAAE,KAAM;UACrBC,QAAQ,EAAC;QAAQ,GACbN,uBAAuB,CAC5B,CAAC;MAAA,CACiB,CAAC;IAAA,EACR;EAAC,EACO,CAAC;AAAA,CAC5B;AAED,eAAeP,YAAY","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default"],"sources":["../../../src/react-utils/AppContainer/index.js"],"sourcesContent":["export { default } from \"./AppContainer\";\n"],"mappings":"AAAA,SAASA,OAAO"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["default"],"sources":["../../../src/react-utils/AppContainer/index.js"],"sourcesContent":["export { default } from \"./AppContainer\";\n"],"mappings":"AAAA,SAASA,OAAO","ignoreList":[]}
|
|
@@ -5,10 +5,14 @@
|
|
|
5
5
|
import axios from "axios";
|
|
6
6
|
var devicesBaseUrl = "/neeto_notifications/api/v1/devices";
|
|
7
7
|
var create = function create(payload) {
|
|
8
|
-
return axios.post(devicesBaseUrl, payload
|
|
8
|
+
return axios.post(devicesBaseUrl, payload, {
|
|
9
|
+
showToastr: false
|
|
10
|
+
});
|
|
9
11
|
};
|
|
10
12
|
var destroy = function destroy(deviceId) {
|
|
11
|
-
return axios["delete"]("".concat(devicesBaseUrl, "/").concat(deviceId)
|
|
13
|
+
return axios["delete"]("".concat(devicesBaseUrl, "/").concat(deviceId), {
|
|
14
|
+
showToastr: false
|
|
15
|
+
});
|
|
12
16
|
};
|
|
13
17
|
var devicesApi = {
|
|
14
18
|
create: create,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devices.js","names":["axios","devicesBaseUrl","create","payload","post","destroy","deviceId","concat","devicesApi"],"sources":["../../../src/react-utils/BrowserPushNotifications/devices.js"],"sourcesContent":["// THIS FILE HAS BEEN ADDED BY NEETO NOTIFICATIONS ENGINE\n// AND IS USED FOR BROWSER NOTIFICATIONS\n// CONTACT NEETO NOTIFICATIONS TEAM BEFORE MODIFYING THIS FILE\n\nimport axios from \"axios\";\n\nconst devicesBaseUrl = \"/neeto_notifications/api/v1/devices\";\n\nconst create = payload
|
|
1
|
+
{"version":3,"file":"devices.js","names":["axios","devicesBaseUrl","create","payload","post","showToastr","destroy","deviceId","concat","devicesApi"],"sources":["../../../src/react-utils/BrowserPushNotifications/devices.js"],"sourcesContent":["// THIS FILE HAS BEEN ADDED BY NEETO NOTIFICATIONS ENGINE\n// AND IS USED FOR BROWSER NOTIFICATIONS\n// CONTACT NEETO NOTIFICATIONS TEAM BEFORE MODIFYING THIS FILE\n\nimport axios from \"axios\";\n\nconst devicesBaseUrl = \"/neeto_notifications/api/v1/devices\";\n\nconst create = payload =>\n axios.post(devicesBaseUrl, payload, { showToastr: false });\n\nconst destroy = deviceId =>\n axios.delete(`${devicesBaseUrl}/${deviceId}`, { showToastr: false });\n\nconst devicesApi = { create, destroy };\n\nexport default devicesApi;\n"],"mappings":"AAAA;AACA;AACA;;AAEA,OAAOA,KAAK,MAAM,OAAO;AAEzB,IAAMC,cAAc,GAAG,qCAAqC;AAE5D,IAAMC,MAAM,GAAG,SAATA,MAAMA,CAAGC,OAAO;EAAA,OACpBH,KAAK,CAACI,IAAI,CAACH,cAAc,EAAEE,OAAO,EAAE;IAAEE,UAAU,EAAE;EAAM,CAAC,CAAC;AAAA;AAE5D,IAAMC,OAAO,GAAG,SAAVA,OAAOA,CAAGC,QAAQ;EAAA,OACtBP,KAAK,UAAO,IAAAQ,MAAA,CAAIP,cAAc,OAAAO,MAAA,CAAID,QAAQ,GAAI;IAAEF,UAAU,EAAE;EAAM,CAAC,CAAC;AAAA;AAEtE,IAAMI,UAAU,GAAG;EAAEP,MAAM,EAANA,MAAM;EAAEI,OAAO,EAAPA;AAAQ,CAAC;AAEtC,eAAeG,UAAU","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["registerBrowserNotifications","destroyBrowserSubscription"],"sources":["../../../src/react-utils/BrowserPushNotifications/index.js"],"sourcesContent":["export {\n registerBrowserNotifications,\n destroyBrowserSubscription,\n} from \"./pushHelper\";\n"],"mappings":"AAAA,SACEA,4BAA4B,EAC5BC,0BAA0B"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["registerBrowserNotifications","destroyBrowserSubscription"],"sources":["../../../src/react-utils/BrowserPushNotifications/index.js"],"sourcesContent":["export {\n registerBrowserNotifications,\n destroyBrowserSubscription,\n} from \"./pushHelper\";\n"],"mappings":"AAAA,SACEA,4BAA4B,EAC5BC,0BAA0B","ignoreList":[]}
|
|
@@ -7,7 +7,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
7
7
|
import devicesApi from "./devices";
|
|
8
8
|
import { unsubscribeBrowserNotifications, registerServiceWorker } from "./registerServiceWorker";
|
|
9
9
|
var createBrowserSubscription = /*#__PURE__*/function () {
|
|
10
|
-
var _ref = _asyncToGenerator(
|
|
10
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(subscription) {
|
|
11
11
|
var payload;
|
|
12
12
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
13
13
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -49,7 +49,7 @@ var createBrowserSubscription = /*#__PURE__*/function () {
|
|
|
49
49
|
};
|
|
50
50
|
}();
|
|
51
51
|
export var destroyBrowserSubscription = /*#__PURE__*/function () {
|
|
52
|
-
var _ref2 = _asyncToGenerator(
|
|
52
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
53
53
|
var deviceId;
|
|
54
54
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
55
55
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -80,7 +80,7 @@ export var destroyBrowserSubscription = /*#__PURE__*/function () {
|
|
|
80
80
|
};
|
|
81
81
|
}();
|
|
82
82
|
export var registerBrowserNotifications = /*#__PURE__*/function () {
|
|
83
|
-
var _ref3 = _asyncToGenerator(
|
|
83
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
84
84
|
var vapidPublicKey,
|
|
85
85
|
response,
|
|
86
86
|
_args3 = arguments;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pushHelper.js","names":["devicesApi","unsubscribeBrowserNotifications","registerServiceWorker","createBrowserSubscription","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","subscription","payload","wrap","_callee$","_context","prev","next","device","platform","create","localStorage","setItem","JSON","stringify","toJSON","keys","auth","t0","logger","error","stop","_x","apply","arguments","destroyBrowserSubscription","_ref2","_callee2","deviceId","_callee2$","_context2","parse","getItem","destroy","removeItem","registerBrowserNotifications","_ref3","_callee3","vapidPublicKey","response","_args3","_callee3$","_context3","length","undefined","process","env","VAPID_PUBLIC_KEY","sent"],"sources":["../../../src/react-utils/BrowserPushNotifications/pushHelper.js"],"sourcesContent":["// THIS FILE HAS BEEN ADDED BY NEETO NOTIFICATIONS ENGINE\n// AND IS USED FOR BROWSER NOTIFICATIONS\n// CONTACT NEETO NOTIFICATIONS TEAM BEFORE MODIFYING THIS FILE\n\nimport devicesApi from \"./devices\";\nimport {\n unsubscribeBrowserNotifications,\n registerServiceWorker,\n} from \"./registerServiceWorker\";\n\nconst createBrowserSubscription = async subscription => {\n if (subscription) {\n const payload = { device: { subscription, platform: \"browser\" } };\n try {\n await devicesApi.create(payload);\n localStorage.setItem(\n \"deviceId\",\n JSON.stringify(subscription.toJSON().keys.auth)\n );\n } catch (err) {\n logger.error(\"Device registration Failed: \", err);\n }\n } else {\n logger.error(\n \"Something went wrong while registering device for browser subscription\"\n );\n }\n};\n\nexport const destroyBrowserSubscription = async () => {\n try {\n await unsubscribeBrowserNotifications();\n const deviceId = JSON.parse(localStorage.getItem(\"deviceId\"));\n await devicesApi.destroy(deviceId);\n localStorage.removeItem(\"deviceId\");\n } catch (err) {\n logger.error(\n \"Something went wrong while unsubscribing browser notification:\",\n err\n );\n }\n};\n\nexport const registerBrowserNotifications = async (\n vapidPublicKey = process.env.VAPID_PUBLIC_KEY\n) => {\n const response = await registerServiceWorker(vapidPublicKey);\n await createBrowserSubscription(response);\n};\n"],"mappings":";;AAAA;AACA;AACA;;AAEA,OAAOA,UAAU;AACjB,SACEC,+BAA+B,EAC/BC,qBAAqB;AAGvB,IAAMC,yBAAyB;EAAA,IAAAC,IAAA,GAAAC,iBAAA,
|
|
1
|
+
{"version":3,"file":"pushHelper.js","names":["devicesApi","unsubscribeBrowserNotifications","registerServiceWorker","createBrowserSubscription","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","subscription","payload","wrap","_callee$","_context","prev","next","device","platform","create","localStorage","setItem","JSON","stringify","toJSON","keys","auth","t0","logger","error","stop","_x","apply","arguments","destroyBrowserSubscription","_ref2","_callee2","deviceId","_callee2$","_context2","parse","getItem","destroy","removeItem","registerBrowserNotifications","_ref3","_callee3","vapidPublicKey","response","_args3","_callee3$","_context3","length","undefined","process","env","VAPID_PUBLIC_KEY","sent"],"sources":["../../../src/react-utils/BrowserPushNotifications/pushHelper.js"],"sourcesContent":["// THIS FILE HAS BEEN ADDED BY NEETO NOTIFICATIONS ENGINE\n// AND IS USED FOR BROWSER NOTIFICATIONS\n// CONTACT NEETO NOTIFICATIONS TEAM BEFORE MODIFYING THIS FILE\n\nimport devicesApi from \"./devices\";\nimport {\n unsubscribeBrowserNotifications,\n registerServiceWorker,\n} from \"./registerServiceWorker\";\n\nconst createBrowserSubscription = async subscription => {\n if (subscription) {\n const payload = { device: { subscription, platform: \"browser\" } };\n try {\n await devicesApi.create(payload);\n localStorage.setItem(\n \"deviceId\",\n JSON.stringify(subscription.toJSON().keys.auth)\n );\n } catch (err) {\n logger.error(\"Device registration Failed: \", err);\n }\n } else {\n logger.error(\n \"Something went wrong while registering device for browser subscription\"\n );\n }\n};\n\nexport const destroyBrowserSubscription = async () => {\n try {\n await unsubscribeBrowserNotifications();\n const deviceId = JSON.parse(localStorage.getItem(\"deviceId\"));\n await devicesApi.destroy(deviceId);\n localStorage.removeItem(\"deviceId\");\n } catch (err) {\n logger.error(\n \"Something went wrong while unsubscribing browser notification:\",\n err\n );\n }\n};\n\nexport const registerBrowserNotifications = async (\n vapidPublicKey = process.env.VAPID_PUBLIC_KEY\n) => {\n const response = await registerServiceWorker(vapidPublicKey);\n await createBrowserSubscription(response);\n};\n"],"mappings":";;AAAA;AACA;AACA;;AAEA,OAAOA,UAAU;AACjB,SACEC,+BAA+B,EAC/BC,qBAAqB;AAGvB,IAAMC,yBAAyB;EAAA,IAAAC,IAAA,GAAAC,iBAAA,cAAAC,mBAAA,CAAAC,IAAA,CAAG,SAAAC,QAAMC,YAAY;IAAA,IAAAC,OAAA;IAAA,OAAAJ,mBAAA,CAAAK,IAAA,UAAAC,SAAAC,QAAA;MAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;QAAA;UAAA,KAC9CN,YAAY;YAAAI,QAAA,CAAAE,IAAA;YAAA;UAAA;UACRL,OAAO,GAAG;YAAEM,MAAM,EAAE;cAAEP,YAAY,EAAZA,YAAY;cAAEQ,QAAQ,EAAE;YAAU;UAAE,CAAC;UAAAJ,QAAA,CAAAC,IAAA;UAAAD,QAAA,CAAAE,IAAA;UAAA,OAEzDf,UAAU,CAACkB,MAAM,CAACR,OAAO,CAAC;QAAA;UAChCS,YAAY,CAACC,OAAO,CAClB,UAAU,EACVC,IAAI,CAACC,SAAS,CAACb,YAAY,CAACc,MAAM,CAAC,CAAC,CAACC,IAAI,CAACC,IAAI,CAChD,CAAC;UAACZ,QAAA,CAAAE,IAAA;UAAA;QAAA;UAAAF,QAAA,CA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