@gen-epix/ui-client-common 4.2.0 → 4.3.1
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/dist/_chunks/Breadcrumbs.js +22 -22
- package/dist/_chunks/QueryClientProvider.js +1 -1
- package/dist/_chunks/QueryClientProvider.js.map +1 -1
- package/dist/_chunks/QueryClientService.js +3 -3
- package/dist/_chunks/QueryClientService.js.map +1 -1
- package/dist/_chunks/Table.js +559 -3173
- package/dist/_chunks/Table.js.map +1 -1
- package/dist/_chunks/{oidc-client-ts.js → UserManagerUtil.js} +222 -198
- package/dist/_chunks/UserManagerUtil.js.map +1 -0
- package/dist/_chunks/middleware.js +1 -1
- package/dist/_chunks/middleware.js.map +1 -1
- package/dist/_chunks/omit.js +1 -1
- package/dist/_chunks/omit.js.map +1 -1
- package/dist/_chunks/query.js +13 -11
- package/dist/_chunks/query.js.map +1 -1
- package/dist/_chunks/react.js +1 -1
- package/dist/_chunks/react.js.map +1 -1
- package/dist/_chunks/useColumnsMenu.js +2 -2
- package/dist/_chunks/useColumnsMenu.js.map +1 -1
- package/dist/_chunks/useMutation.js +2 -2
- package/dist/_chunks/useMutation.js.map +1 -1
- package/dist/_chunks/useQueryMemo.js +8 -8
- package/dist/_chunks/useQueryMemo.js.map +1 -1
- package/dist/_chunks/vanilla.js +1 -1
- package/dist/_chunks/vanilla.js.map +1 -1
- package/dist/_chunks/yup.js +2 -2
- package/dist/_chunks/yup.js.map +1 -1
- package/dist/classes/services/LogService/index.js +1 -1
- package/dist/classes/services/LogService/index.js.map +1 -1
- package/dist/classes/services/RouterService/RouterService.d.ts +15 -6
- package/dist/classes/services/RouterService/index.js +30 -10
- package/dist/classes/services/RouterService/index.js.map +1 -1
- package/dist/components/app/App/index.js +34 -98
- package/dist/components/app/App/index.js.map +1 -1
- package/dist/components/app/AppRouterProvider/AppRouterProvider.d.ts +1 -0
- package/dist/components/app/ApplicationBootstrapWithAuthentication/ApplicationBootstrapWithAuthentication.d.ts +2 -0
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.d.ts +1 -0
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js +81 -0
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js.map +1 -0
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/ApplicationBootstrapWithoutAuthorization.d.ts +2 -0
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.d.ts +1 -0
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js +63 -0
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js.map +1 -0
- package/dist/components/app/AuthenticationWrapper/index.js +38 -38
- package/dist/components/app/AuthorizationWrapper/index.js +20 -20
- package/dist/components/app/RouterRoot/index.js +58 -59
- package/dist/components/app/RouterRoot/index.js.map +1 -1
- package/dist/components/ui/ApplicationBar/index.js +164 -148
- package/dist/components/ui/ApplicationBar/index.js.map +1 -1
- package/dist/components/ui/GenericErrorMessage/index.js +34 -34
- package/dist/components/ui/GenericErrorMessage/index.js.map +1 -1
- package/dist/components/ui/NavLink/index.js +8 -8
- package/dist/components/ui/PageContainer/index.js +1 -1
- package/dist/components/ui/PageContainer/index.js.map +1 -1
- package/dist/pages/AcceptInvitationPage/index.js +28 -28
- package/dist/pages/AdminPage/index.js +23 -23
- package/dist/pages/OrganizationContactsAdminPage/index.js +29 -29
- package/dist/pages/OrganizationSitesAdminPage/index.js +25 -25
- package/dist/pages/PostLoginPage/index.js +11 -11
- package/dist/pages/RouterErrorPage/index.js +10 -10
- package/dist/utils/UserManagerUtil/index.js +2 -31
- package/package.json +36 -27
- package/dist/_chunks/chunk-BV7QT456.js +0 -3742
- package/dist/_chunks/chunk-BV7QT456.js.map +0 -1
- package/dist/_chunks/oidc-client-ts.js.map +0 -1
- package/dist/_chunks/react-oidc-context.js +0 -201
- package/dist/_chunks/react-oidc-context.js.map +0 -1
- package/dist/components/app/ApplicationBootstrap/ApplicationBootstrap.d.ts +0 -2
- package/dist/components/app/ApplicationBootstrap/index.d.ts +0 -1
- package/dist/components/app/ApplicationBootstrap/index.js +0 -135
- package/dist/components/app/ApplicationBootstrap/index.js.map +0 -1
- package/dist/utils/UserManagerUtil/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useQueryMemo.js","names":["React","React","React"],"sources":["../../../../node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/queryObserver.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/suspense.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useQuery.js","../../src/hooks/useQueryMemo/useQueryMemo.ts"],"sourcesContent":["import { timeoutManager } from \"./timeoutManager.js\";\nimport { isValidTimeout, noop, replaceData, resolveQueryValue, shallowEqualObjects, timeUntilStale } from \"./utils.js\";\nimport { isServer } from \"./environmentManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { fetchState } from \"./query.js\";\n//#region src/queryObserver.ts\nvar QueryObserver = class extends Subscribable {\n\t#client;\n\t#currentQuery = void 0;\n\t#currentQueryInitialState = void 0;\n\t#currentResult = void 0;\n\t#currentResultState;\n\t#currentResultOptions;\n\t#selectError;\n\t#selectFn;\n\t#selectResult;\n\t#lastQueryWithDefinedData;\n\t#staleTimeoutId;\n\t#refetchIntervalId;\n\t#currentRefetchInterval;\n\t#trackedProps = /* @__PURE__ */ new Set();\n\tconstructor(client, options) {\n\t\tsuper();\n\t\tthis.options = options;\n\t\tthis.#client = client;\n\t\tthis.#selectError = null;\n\t\tthis.bindMethods();\n\t\tthis.setOptions(options);\n\t}\n\tbindMethods() {\n\t\tthis.refetch = this.refetch.bind(this);\n\t}\n\tonSubscribe() {\n\t\tif (this.listeners.size === 1) {\n\t\t\tthis.#currentQuery.addObserver(this);\n\t\t\tif (shouldFetchOnMount(this.#currentQuery, this.options)) this.#executeFetch();\n\t\t\telse this.updateResult();\n\t\t\tthis.#updateTimers();\n\t\t}\n\t}\n\tonUnsubscribe() {\n\t\tif (!this.hasListeners()) this.destroy();\n\t}\n\tshouldFetchOnReconnect() {\n\t\treturn shouldFetchOn(this.#currentQuery, this.options, this.options.refetchOnReconnect);\n\t}\n\tshouldFetchOnWindowFocus() {\n\t\treturn shouldFetchOn(this.#currentQuery, this.options, this.options.refetchOnWindowFocus);\n\t}\n\tdestroy() {\n\t\tthis.listeners = /* @__PURE__ */ new Set();\n\t\tthis.#clearStaleTimeout();\n\t\tthis.#clearRefetchInterval();\n\t\tthis.#currentQuery.removeObserver(this);\n\t}\n\tsetOptions(options) {\n\t\tconst prevOptions = this.options;\n\t\tconst prevQuery = this.#currentQuery;\n\t\tthis.options = this.#client.defaultQueryOptions(options);\n\t\tif (this.options.enabled !== void 0 && typeof this.options.enabled !== \"boolean\" && typeof this.options.enabled !== \"function\" && typeof resolveQueryValue(this.options.enabled, this.#currentQuery) !== \"boolean\") throw new Error(\"Expected enabled to be a boolean or a callback that returns a boolean\");\n\t\tthis.#updateQuery();\n\t\tthis.#currentQuery.setOptions(this.options);\n\t\tif (prevOptions._defaulted && !shallowEqualObjects(this.options, prevOptions)) this.#client.getQueryCache().notify({\n\t\t\ttype: \"observerOptionsUpdated\",\n\t\t\tquery: this.#currentQuery,\n\t\t\tobserver: this\n\t\t});\n\t\tconst mounted = this.hasListeners();\n\t\tif (mounted && shouldFetchOptionally(this.#currentQuery, prevQuery, this.options, prevOptions)) this.#executeFetch();\n\t\tthis.updateResult();\n\t\tif (mounted && (this.#currentQuery !== prevQuery || resolveQueryValue(this.options.enabled, this.#currentQuery) !== resolveQueryValue(prevOptions.enabled, this.#currentQuery) || resolveQueryValue(this.options.staleTime, this.#currentQuery) !== resolveQueryValue(prevOptions.staleTime, this.#currentQuery))) this.#updateStaleTimeout();\n\t\tconst nextRefetchInterval = this.#computeRefetchInterval();\n\t\tif (mounted && (this.#currentQuery !== prevQuery || resolveQueryValue(this.options.enabled, this.#currentQuery) !== resolveQueryValue(prevOptions.enabled, this.#currentQuery) || nextRefetchInterval !== this.#currentRefetchInterval)) this.#updateRefetchInterval(nextRefetchInterval);\n\t}\n\tgetOptimisticResult(options) {\n\t\tconst query = this.#client.getQueryCache().build(this.#client, options);\n\t\tconst result = this.createResult(query, options);\n\t\tif (!shallowEqualObjects(this.getCurrentResult(), result)) {\n\t\t\tthis.#currentResult = result;\n\t\t\tthis.#currentResultOptions = this.options;\n\t\t\tthis.#currentResultState = this.#currentQuery.state;\n\t\t}\n\t\treturn result;\n\t}\n\tgetCurrentResult() {\n\t\treturn this.#currentResult;\n\t}\n\ttrackResult(result, onPropTracked) {\n\t\treturn new Proxy(result, { get: (target, key) => {\n\t\t\tthis.trackProp(key);\n\t\t\tonPropTracked?.(key);\n\t\t\treturn Reflect.get(target, key);\n\t\t} });\n\t}\n\ttrackProp(key) {\n\t\tthis.#trackedProps.add(key);\n\t}\n\tgetCurrentQuery() {\n\t\treturn this.#currentQuery;\n\t}\n\trefetch({ ...options } = {}) {\n\t\treturn this.fetch({ ...options });\n\t}\n\tfetchOptimistic(options) {\n\t\tconst defaultedOptions = this.#client.defaultQueryOptions(options);\n\t\tconst query = this.#client.getQueryCache().build(this.#client, defaultedOptions);\n\t\tlet unsubscribe = () => {};\n\t\tlet resolveEarly;\n\t\tconst cachePromise = new Promise((resolve) => {\n\t\t\tresolveEarly = resolve;\n\t\t\tunsubscribe = this.#client.getQueryCache().subscribe((event) => {\n\t\t\t\tif (event.type === \"updated\" && event.query.queryHash === query.queryHash && query.state.data !== void 0) {\n\t\t\t\t\tunsubscribe();\n\t\t\t\t\tresolve(this.createResult(query, defaultedOptions));\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\treturn Promise.race([query.fetch().then(() => {\n\t\t\tconst result = this.createResult(query, defaultedOptions);\n\t\t\tresolveEarly?.(result);\n\t\t\treturn result;\n\t\t}).finally(() => {\n\t\t\tunsubscribe();\n\t\t}), cachePromise]);\n\t}\n\tfetch(fetchOptions) {\n\t\treturn this.#executeFetch({\n\t\t\t...fetchOptions,\n\t\t\tcancelRefetch: fetchOptions.cancelRefetch ?? true\n\t\t}).then(() => {\n\t\t\tthis.updateResult();\n\t\t\treturn this.#currentResult;\n\t\t});\n\t}\n\t#executeFetch(fetchOptions) {\n\t\tthis.#updateQuery();\n\t\tlet promise = this.#currentQuery.fetch(this.options, fetchOptions);\n\t\tif (!fetchOptions?.throwOnError) promise = promise.catch(noop);\n\t\treturn promise;\n\t}\n\t#shouldScheduleTimer(timeout) {\n\t\treturn !isServer() && resolveQueryValue(this.options.enabled, this.#currentQuery) !== false && isValidTimeout(timeout);\n\t}\n\t#updateStaleTimeout() {\n\t\tthis.#clearStaleTimeout();\n\t\tconst staleTime = resolveQueryValue(this.options.staleTime, this.#currentQuery);\n\t\tif (this.#currentResult.isStale || !this.#shouldScheduleTimer(staleTime)) return;\n\t\tconst timeout = timeUntilStale(this.#currentResult.dataUpdatedAt, staleTime) + 1;\n\t\tthis.#staleTimeoutId = timeoutManager.setTimeout(() => {\n\t\t\tif (!this.#currentResult.isStale) this.updateResult();\n\t\t}, timeout);\n\t}\n\t#computeRefetchInterval() {\n\t\treturn (typeof this.options.refetchInterval === \"function\" ? this.options.refetchInterval(this.#currentQuery) : this.options.refetchInterval) ?? false;\n\t}\n\t#updateRefetchInterval(nextInterval) {\n\t\tthis.#clearRefetchInterval();\n\t\tthis.#currentRefetchInterval = nextInterval;\n\t\tif (this.#currentRefetchInterval === 0 || !this.#shouldScheduleTimer(this.#currentRefetchInterval)) return;\n\t\tthis.#refetchIntervalId = timeoutManager.setInterval(() => {\n\t\t\tif (this.options.refetchIntervalInBackground || focusManager.isFocused()) this.#executeFetch();\n\t\t}, this.#currentRefetchInterval);\n\t}\n\t#updateTimers() {\n\t\tthis.#updateStaleTimeout();\n\t\tthis.#updateRefetchInterval(this.#computeRefetchInterval());\n\t}\n\t#clearStaleTimeout() {\n\t\tif (this.#staleTimeoutId !== void 0) {\n\t\t\ttimeoutManager.clearTimeout(this.#staleTimeoutId);\n\t\t\tthis.#staleTimeoutId = void 0;\n\t\t}\n\t}\n\t#clearRefetchInterval() {\n\t\tif (this.#refetchIntervalId !== void 0) {\n\t\t\ttimeoutManager.clearInterval(this.#refetchIntervalId);\n\t\t\tthis.#refetchIntervalId = void 0;\n\t\t}\n\t}\n\tcreateResult(query, options) {\n\t\tconst prevQuery = this.#currentQuery;\n\t\tconst prevOptions = this.options;\n\t\tconst prevResult = this.#currentResult;\n\t\tconst prevResultState = this.#currentResultState;\n\t\tconst prevResultOptions = this.#currentResultOptions;\n\t\tconst queryInitialState = query !== prevQuery ? query.state : this.#currentQueryInitialState;\n\t\tconst { state } = query;\n\t\tlet newState = { ...state };\n\t\tlet isPlaceholderData = false;\n\t\tlet data;\n\t\tif (options._optimisticResults) {\n\t\t\tconst mounted = this.hasListeners();\n\t\t\tconst fetchOnMount = !mounted && shouldFetchOnMount(query, options);\n\t\t\tconst fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);\n\t\t\tif (fetchOnMount || fetchOptionally) newState = {\n\t\t\t\t...newState,\n\t\t\t\t...fetchState(state.data, query.options)\n\t\t\t};\n\t\t\tif (options._optimisticResults === \"isRestoring\") newState.fetchStatus = \"idle\";\n\t\t}\n\t\tlet { error, errorUpdatedAt, status } = newState;\n\t\tdata = newState.data;\n\t\tlet skipSelect = false;\n\t\tif (options.placeholderData !== void 0 && data === void 0 && status === \"pending\") {\n\t\t\tlet placeholderData;\n\t\t\tif (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) {\n\t\t\t\tplaceholderData = prevResult.data;\n\t\t\t\tskipSelect = true;\n\t\t\t} else placeholderData = typeof options.placeholderData === \"function\" ? options.placeholderData(this.#lastQueryWithDefinedData?.state.data, this.#lastQueryWithDefinedData) : options.placeholderData;\n\t\t\tif (placeholderData !== void 0) {\n\t\t\t\tstatus = \"success\";\n\t\t\t\tdata = replaceData(prevResult?.data, placeholderData, options);\n\t\t\t\tisPlaceholderData = true;\n\t\t\t}\n\t\t}\n\t\tif (options.select && data !== void 0 && !skipSelect) {\n\t\t\tif (prevResult && data === prevResultState?.data && options.select === this.#selectFn) data = this.#selectResult;\n\t\t\telse try {\n\t\t\t\tthis.#selectFn = options.select;\n\t\t\t\tdata = options.select(data);\n\t\t\t\tdata = replaceData(prevResult?.data, data, options);\n\t\t\t\tthis.#selectResult = data;\n\t\t\t\tthis.#selectError = null;\n\t\t\t} catch (selectError) {\n\t\t\t\tthis.#selectError = selectError;\n\t\t\t}\n\t\t} else if (data === void 0) this.#selectError = null;\n\t\tif (this.#selectError) {\n\t\t\terror = this.#selectError;\n\t\t\tdata = this.#selectResult;\n\t\t\terrorUpdatedAt = Date.now();\n\t\t\tstatus = \"error\";\n\t\t\tisPlaceholderData = false;\n\t\t}\n\t\tconst isFetching = newState.fetchStatus === \"fetching\";\n\t\tconst isPending = status === \"pending\";\n\t\tconst isError = status === \"error\";\n\t\tconst isLoading = isPending && isFetching;\n\t\tconst hasData = data !== void 0;\n\t\treturn {\n\t\t\tstatus,\n\t\t\tfetchStatus: newState.fetchStatus,\n\t\t\tisPending,\n\t\t\tisSuccess: status === \"success\",\n\t\t\tisError,\n\t\t\tisInitialLoading: isLoading,\n\t\t\tisLoading,\n\t\t\tdata,\n\t\t\tdataUpdatedAt: newState.dataUpdatedAt,\n\t\t\terror,\n\t\t\terrorUpdatedAt,\n\t\t\tfailureCount: newState.fetchFailureCount,\n\t\t\tfailureReason: newState.fetchFailureReason,\n\t\t\terrorUpdateCount: newState.errorUpdateCount,\n\t\t\tisFetched: query.isFetched(),\n\t\t\tisFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,\n\t\t\tisFetching,\n\t\t\tisRefetching: isFetching && !isPending,\n\t\t\tisLoadingError: isError && !hasData,\n\t\t\tisPaused: newState.fetchStatus === \"paused\",\n\t\t\tisPlaceholderData,\n\t\t\tisRefetchError: isError && hasData,\n\t\t\tisStale: isStale(query, options),\n\t\t\trefetch: this.refetch,\n\t\t\tisEnabled: resolveQueryValue(options.enabled, query) !== false\n\t\t};\n\t}\n\tupdateResult() {\n\t\tconst prevResult = this.#currentResult;\n\t\tconst nextResult = this.createResult(this.#currentQuery, this.options);\n\t\tthis.#currentResultState = this.#currentQuery.state;\n\t\tthis.#currentResultOptions = this.options;\n\t\tif (this.#currentResultState.data !== void 0) this.#lastQueryWithDefinedData = this.#currentQuery;\n\t\tif (shallowEqualObjects(nextResult, prevResult)) return;\n\t\tthis.#currentResult = nextResult;\n\t\tconst shouldNotifyListeners = () => {\n\t\t\tif (!prevResult) return true;\n\t\t\tconst { notifyOnChangeProps } = this.options;\n\t\t\tconst notifyOnChangePropsValue = typeof notifyOnChangeProps === \"function\" ? notifyOnChangeProps() : notifyOnChangeProps;\n\t\t\tif (notifyOnChangePropsValue === \"all\" || !notifyOnChangePropsValue && !this.#trackedProps.size) return true;\n\t\t\tconst includedProps = new Set(notifyOnChangePropsValue ?? this.#trackedProps);\n\t\t\tif (this.options.throwOnError) includedProps.add(\"error\");\n\t\t\treturn Object.keys(this.#currentResult).some((key) => {\n\t\t\t\tconst typedKey = key;\n\t\t\t\treturn this.#currentResult[typedKey] !== prevResult[typedKey] && includedProps.has(typedKey);\n\t\t\t});\n\t\t};\n\t\tconst notifyListeners = shouldNotifyListeners();\n\t\tnotifyManager.batch(() => {\n\t\t\tif (notifyListeners) this.listeners.forEach((listener) => {\n\t\t\t\tlistener(this.#currentResult);\n\t\t\t});\n\t\t\tthis.#client.getQueryCache().notify({\n\t\t\t\tquery: this.#currentQuery,\n\t\t\t\ttype: \"observerResultsUpdated\"\n\t\t\t});\n\t\t});\n\t}\n\t#updateQuery() {\n\t\tconst query = this.#client.getQueryCache().build(this.#client, this.options);\n\t\tif (query === this.#currentQuery) return;\n\t\tconst prevQuery = this.#currentQuery;\n\t\tthis.#currentQuery = query;\n\t\tthis.#currentQueryInitialState = query.state;\n\t\tif (this.hasListeners()) {\n\t\t\tprevQuery?.removeObserver(this);\n\t\t\tquery.addObserver(this);\n\t\t}\n\t}\n\tonQueryUpdate() {\n\t\tthis.updateResult();\n\t\tif (this.hasListeners()) this.#updateTimers();\n\t}\n};\nfunction shouldLoadOnMount(query, options) {\n\treturn resolveQueryValue(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === \"error\" && resolveQueryValue(options.retryOnMount, query) === false);\n}\nfunction shouldFetchOnMount(query, options) {\n\treturn shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);\n}\nfunction shouldFetchOn(query, options, field) {\n\tif (resolveQueryValue(options.enabled, query) !== false && resolveQueryValue(options.staleTime, query) !== \"static\") {\n\t\tconst value = typeof field === \"function\" ? field(query) : field;\n\t\treturn value === \"always\" || value !== false && isStale(query, options);\n\t}\n\treturn false;\n}\nfunction shouldFetchOptionally(query, prevQuery, options, prevOptions) {\n\treturn (query !== prevQuery || resolveQueryValue(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== \"error\") && isStale(query, options);\n}\nfunction isStale(query, options) {\n\treturn resolveQueryValue(options.enabled, query) !== false && query.isStaleByTime(resolveQueryValue(options.staleTime, query));\n}\n//#endregion\nexport { QueryObserver };\n\n//# sourceMappingURL=queryObserver.js.map","\"use client\";\nimport * as React from \"react\";\n//#region src/IsRestoringProvider.ts\nconst IsRestoringContext = React.createContext(false);\nconst useIsRestoring = () => React.useContext(IsRestoringContext);\nconst IsRestoringProvider = IsRestoringContext.Provider;\n//#endregion\nexport { IsRestoringProvider, useIsRestoring };\n\n//# sourceMappingURL=IsRestoringProvider.js.map","\"use client\";\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/QueryErrorResetBoundary.tsx\nfunction createValue() {\n\tlet isReset = false;\n\treturn {\n\t\tclearReset: () => {\n\t\t\tisReset = false;\n\t\t},\n\t\treset: () => {\n\t\t\tisReset = true;\n\t\t},\n\t\tisReset: () => {\n\t\t\treturn isReset;\n\t\t}\n\t};\n}\nconst QueryErrorResetBoundaryContext = React.createContext(createValue());\nconst useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);\nconst QueryErrorResetBoundary = ({ children }) => {\n\tconst [value] = React.useState(() => createValue());\n\treturn /* @__PURE__ */ jsx(QueryErrorResetBoundaryContext.Provider, {\n\t\tvalue,\n\t\tchildren: typeof children === \"function\" ? children(value) : children\n\t});\n};\n//#endregion\nexport { QueryErrorResetBoundary, useQueryErrorResetBoundary };\n\n//# sourceMappingURL=QueryErrorResetBoundary.js.map","\"use client\";\nimport * as React from \"react\";\nimport { shouldThrowError } from \"@tanstack/query-core\";\n//#region src/errorBoundaryUtils.ts\nconst ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {\n\tconst throwOnError = query?.state.error && typeof options.throwOnError === \"function\" ? shouldThrowError(options.throwOnError, [query.state.error, query]) : options.throwOnError;\n\tif (options.suspense || throwOnError) {\n\t\tif (!errorResetBoundary.isReset()) options.retryOnMount = false;\n\t}\n};\nconst useClearResetErrorBoundary = (errorResetBoundary) => {\n\tReact.useEffect(() => {\n\t\terrorResetBoundary.clearReset();\n\t}, [errorResetBoundary]);\n};\nconst getHasError = ({ result, errorResetBoundary, throwOnError, query, suspense }) => {\n\treturn result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));\n};\n//#endregion\nexport { ensurePreventErrorBoundaryRetry, getHasError, useClearResetErrorBoundary };\n\n//# sourceMappingURL=errorBoundaryUtils.js.map","//#region src/suspense.ts\nconst defaultThrowOnError = (_error, query) => query.state.data === void 0;\nconst ensureSuspenseTimers = (defaultedOptions) => {\n\tif (defaultedOptions.suspense) {\n\t\tconst MIN_SUSPENSE_TIME_MS = 1e3;\n\t\tconst clamp = (value) => value === \"static\" ? value : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS);\n\t\tconst originalStaleTime = defaultedOptions.staleTime;\n\t\tdefaultedOptions.staleTime = typeof originalStaleTime === \"function\" ? (...args) => clamp(originalStaleTime(...args)) : clamp(originalStaleTime);\n\t\tif (typeof defaultedOptions.gcTime === \"number\") defaultedOptions.gcTime = Math.max(defaultedOptions.gcTime, MIN_SUSPENSE_TIME_MS);\n\t}\n};\nconst shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;\nconst fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {\n\terrorResetBoundary.clearReset();\n});\n//#endregion\nexport { defaultThrowOnError, ensureSuspenseTimers, fetchOptimistic, shouldSuspend };\n\n//# sourceMappingURL=suspense.js.map","\"use client\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport { useIsRestoring } from \"./IsRestoringProvider.js\";\nimport { useQueryErrorResetBoundary } from \"./QueryErrorResetBoundary.js\";\nimport { ensurePreventErrorBoundaryRetry, getHasError, useClearResetErrorBoundary } from \"./errorBoundaryUtils.js\";\nimport { ensureSuspenseTimers, fetchOptimistic, shouldSuspend } from \"./suspense.js\";\nimport * as React from \"react\";\nimport { noop, notifyManager } from \"@tanstack/query-core\";\n//#region src/useBaseQuery.ts\nfunction useBaseQuery(options, Observer, queryClient) {\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tif (typeof options !== \"object\" || Array.isArray(options)) throw new Error(\"Bad argument type. Starting with v5, only the \\\"Object\\\" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object\");\n\t}\n\tconst isRestoring = useIsRestoring();\n\tconst errorResetBoundary = useQueryErrorResetBoundary();\n\tconst client = useQueryClient(queryClient);\n\tconst defaultedOptions = client.defaultQueryOptions(options);\n\tconst query = client.getQueryCache().get(defaultedOptions.queryHash);\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tif (!defaultedOptions.queryFn) console.error(`[${defaultedOptions.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`);\n\t}\n\tconst subscribed = options.subscribed !== false;\n\tdefaultedOptions._optimisticResults = isRestoring ? \"isRestoring\" : subscribed ? \"optimistic\" : void 0;\n\tensureSuspenseTimers(defaultedOptions);\n\tensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary, query);\n\tuseClearResetErrorBoundary(errorResetBoundary);\n\tconst [observer] = React.useState(() => new Observer(client, defaultedOptions));\n\tconst result = observer.getOptimisticResult(defaultedOptions);\n\tconst shouldSubscribe = !isRestoring && subscribed;\n\tReact.useSyncExternalStore(React.useCallback((onStoreChange) => {\n\t\tconst unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop;\n\t\tobserver.updateResult();\n\t\treturn unsubscribe;\n\t}, [observer, shouldSubscribe]), () => observer.getCurrentResult(), () => observer.getCurrentResult());\n\tReact.useEffect(() => {\n\t\tobserver.setOptions(defaultedOptions);\n\t}, [defaultedOptions, observer]);\n\tif (shouldSuspend(defaultedOptions, result)) throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary);\n\tif (getHasError({\n\t\tresult,\n\t\terrorResetBoundary,\n\t\tthrowOnError: defaultedOptions.throwOnError,\n\t\tquery,\n\t\tsuspense: defaultedOptions.suspense\n\t})) throw result.error;\n\treturn !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;\n}\n//#endregion\nexport { useBaseQuery };\n\n//# sourceMappingURL=useBaseQuery.js.map","\"use client\";\nimport { useBaseQuery } from \"./useBaseQuery.js\";\nimport { QueryObserver } from \"@tanstack/query-core\";\n//#region src/useQuery.ts\nfunction useQuery(options, queryClient) {\n\treturn useBaseQuery(options, QueryObserver, queryClient);\n}\n//#endregion\nexport { useQuery };\n\n//# sourceMappingURL=useQuery.js.map","import type {\n DefaultError,\n QueryClient,\n QueryKey,\n UseQueryOptions,\n UseQueryResult,\n} from '@tanstack/react-query';\nimport { useQuery } from '@tanstack/react-query';\nimport { useMemo } from 'react';\n\n\nexport const useQueryMemo = <TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, queryClient?: QueryClient): UseQueryResult<NoInfer<TData>, TError> => {\n const query = useQuery(options, queryClient);\n\n return useMemo(() => {\n return query;\n\n // eslint-disable-next-line react-hooks/exhaustive-deps, react-hooks/use-memo\n }, [JSON.stringify({\n data: query.data,\n error: query.error,\n isEnabled: query.isEnabled,\n isFetching: query.isFetching,\n isLoading: query.isLoading,\n isPending: query.isPending,\n })]);\n};\n"],"x_google_ignoreList":[0,1,2,3,4,5,6],"mappings":";;;;;;AAQA,IAAI,IAAgB,cAAc,EAAa;CAC9C;CACA,KAAgB,KAAK;CACrB,KAA4B,KAAK;CACjC,KAAiB,KAAK;CACtB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,qBAAgC,IAAI,IAAI;CACxC,YAAY,GAAQ,GAAS;EAM5B,AALA,MAAM,GACN,KAAK,UAAU,GACf,KAAK,KAAU,GACf,KAAK,KAAe,MACpB,KAAK,YAAY,GACjB,KAAK,WAAW,CAAO;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;CACvC,OAAO,EAAa,GAAS,GAAe,CAAW;AACxD;;;ACKA,IAAa,KAA4H,GAAkE,MAAsE;CAC/Q,IAAM,IAAQ,EAAS,GAAS,CAAW;CAE3C,OAAO,QACE,GAGN,CAAC,KAAK,UAAU;EACjB,MAAM,EAAM;EACZ,OAAO,EAAM;EACb,WAAW,EAAM;EACjB,YAAY,EAAM;EAClB,WAAW,EAAM;EACjB,WAAW,EAAM;CACnB,CAAC,CAAC,CAAC;AACL"}
|
|
1
|
+
{"version":3,"file":"useQueryMemo.js","names":["React","React","React"],"sources":["../../../../node_modules/.pnpm/@tanstack+query-core@5.103.1/node_modules/@tanstack/query-core/build/modern/queryObserver.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.103.1_react@19.3.0/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.103.1_react@19.3.0/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.103.1_react@19.3.0/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.103.1_react@19.3.0/node_modules/@tanstack/react-query/build/modern/suspense.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.103.1_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.103.1_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useQuery.js","../../src/hooks/useQueryMemo/useQueryMemo.ts"],"sourcesContent":["import { timeoutManager } from \"./timeoutManager.js\";\nimport { isValidTimeout, noop, replaceData, resolveQueryValue, shallowEqualObjects, timeUntilStale } from \"./utils.js\";\nimport { isServer } from \"./environmentManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { fetchState } from \"./query.js\";\n//#region src/queryObserver.ts\n/**\n* A `QueryObserver` watches a single query in the `QueryCache` and computes a\n* `QueryObserverResult` from its state, recomputing and notifying subscribers\n* whenever the underlying query (or the observer's options) changes. It is\n* the primitive that framework adapters (e.g. `useQuery`) build their hooks\n* on top of, but it can also be used directly to observe and switch between\n* queries outside of any framework.\n*\n* @example\n* ```ts\n* const observer = new QueryObserver(queryClient, {\n* queryKey: ['posts'],\n* queryFn: fetchPosts,\n* })\n*\n* const unsubscribe = observer.subscribe((result) => {\n* console.log(result.data)\n* })\n* ```\n*/\nvar QueryObserver = class extends Subscribable {\n\t#client;\n\t#currentQuery = void 0;\n\t#currentQueryInitialState = void 0;\n\t#currentResult = void 0;\n\t#currentResultState;\n\t#currentResultOptions;\n\t#selectError;\n\t#selectFn;\n\t#selectResult;\n\t#lastQueryWithDefinedData;\n\t#staleTimeoutId;\n\t#refetchIntervalId;\n\t#currentRefetchInterval;\n\t#trackedProps = /* @__PURE__ */ new Set();\n\tconstructor(client, options) {\n\t\tsuper();\n\t\tthis.options = options;\n\t\tthis.#client = client;\n\t\tthis.#selectError = null;\n\t\tthis.bindMethods();\n\t\tthis.setOptions(options);\n\t}\n\tbindMethods() {\n\t\tthis.refetch = this.refetch.bind(this);\n\t}\n\tonSubscribe() {\n\t\tif (this.listeners.size === 1) {\n\t\t\tthis.#currentQuery.addObserver(this);\n\t\t\tif (shouldFetchOnMount(this.#currentQuery, this.options)) this.#executeFetch();\n\t\t\telse this.updateResult();\n\t\t\tthis.#updateTimers();\n\t\t}\n\t}\n\tonUnsubscribe() {\n\t\tif (!this.hasListeners()) this.destroy();\n\t}\n\t/**\n\t* Returns whether the observed query is currently stale and configured\n\t* (via the `refetchOnReconnect` option) to refetch when the network\n\t* reconnects.\n\t*/\n\tshouldFetchOnReconnect() {\n\t\treturn shouldFetchOn(this.#currentQuery, this.options, this.options.refetchOnReconnect);\n\t}\n\t/**\n\t* Returns whether the observed query is currently stale and configured\n\t* (via the `refetchOnWindowFocus` option) to refetch when the window\n\t* regains focus.\n\t*/\n\tshouldFetchOnWindowFocus() {\n\t\treturn shouldFetchOn(this.#currentQuery, this.options, this.options.refetchOnWindowFocus);\n\t}\n\t/**\n\t* Stops observing the current query: clears all listeners, cancels the\n\t* stale and refetch-interval timers, and removes this observer from the\n\t* query it was observing.\n\t*/\n\tdestroy() {\n\t\tthis.listeners = /* @__PURE__ */ new Set();\n\t\tthis.#clearStaleTimeout();\n\t\tthis.#clearRefetchInterval();\n\t\tthis.#currentQuery.removeObserver(this);\n\t}\n\t/**\n\t* Updates the observer's options. This will re-resolve the query being\n\t* observed (switching to a different query if the `queryKey` changed),\n\t* trigger a fetch if the new options require one and the observer has\n\t* subscribers, recompute the current result, and reschedule the stale and\n\t* refetch-interval timers as needed.\n\t*\n\t* @example\n\t* ```ts\n\t* observer.setOptions({ queryKey: ['posts', 1], queryFn: () => fetchPost(1) })\n\t* // later: switch to a different query, reusing the same observer\n\t* observer.setOptions({ queryKey: ['posts', 2], queryFn: () => fetchPost(2) })\n\t* ```\n\t*/\n\tsetOptions(options) {\n\t\tconst prevOptions = this.options;\n\t\tconst prevQuery = this.#currentQuery;\n\t\tthis.options = this.#client.defaultQueryOptions(options);\n\t\tif (this.options.enabled !== void 0 && typeof this.options.enabled !== \"boolean\" && typeof this.options.enabled !== \"function\" && typeof resolveQueryValue(this.options.enabled, this.#currentQuery) !== \"boolean\") throw new Error(\"Expected enabled to be a boolean or a callback that returns a boolean\");\n\t\tthis.#updateQuery();\n\t\tthis.#currentQuery.setOptions(this.options);\n\t\tif (prevOptions._defaulted && !shallowEqualObjects(this.options, prevOptions)) this.#client.getQueryCache().notify({\n\t\t\ttype: \"observerOptionsUpdated\",\n\t\t\tquery: this.#currentQuery,\n\t\t\tobserver: this\n\t\t});\n\t\tconst mounted = this.hasListeners();\n\t\tif (mounted && shouldFetchOptionally(this.#currentQuery, prevQuery, this.options, prevOptions)) this.#executeFetch();\n\t\tthis.updateResult();\n\t\tif (mounted && (this.#currentQuery !== prevQuery || resolveQueryValue(this.options.enabled, this.#currentQuery) !== resolveQueryValue(prevOptions.enabled, this.#currentQuery) || resolveQueryValue(this.options.staleTime, this.#currentQuery) !== resolveQueryValue(prevOptions.staleTime, this.#currentQuery))) this.#updateStaleTimeout();\n\t\tconst nextRefetchInterval = this.#computeRefetchInterval();\n\t\tif (mounted && (this.#currentQuery !== prevQuery || resolveQueryValue(this.options.enabled, this.#currentQuery) !== resolveQueryValue(prevOptions.enabled, this.#currentQuery) || nextRefetchInterval !== this.#currentRefetchInterval)) this.#updateRefetchInterval(nextRefetchInterval);\n\t}\n\t/**\n\t* Computes the result the observer would produce for the given (already-defaulted) options\n\t* right now, building the underlying `Query` if it doesn't exist yet, without waiting for a\n\t* subscription callback. Called by framework adapters on every render (e.g. `useQuery`) so the\n\t* returned value is available synchronously, ahead of `setOptions` triggering an actual fetch.\n\t*/\n\tgetOptimisticResult(options) {\n\t\tconst query = this.#client.getQueryCache().build(this.#client, options);\n\t\tconst result = this.createResult(query, options);\n\t\tif (!shallowEqualObjects(this.getCurrentResult(), result)) {\n\t\t\tthis.#currentResult = result;\n\t\t\tthis.#currentResultOptions = this.options;\n\t\t\tthis.#currentResultState = this.#currentQuery.state;\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t* Returns the most recently computed `QueryObserverResult` for the\n\t* observed query. This is a point-in-time read; to be notified of updates\n\t* as they happen, subscribe to the observer instead (its inherited\n\t* `subscribe` method).\n\t*\n\t* @example\n\t* ```ts\n\t* const result = observer.getCurrentResult()\n\t* console.log(result.status, result.data)\n\t* ```\n\t*/\n\tgetCurrentResult() {\n\t\treturn this.#currentResult;\n\t}\n\t/**\n\t* Wraps a `QueryObserverResult` in a `Proxy` that records which properties are read, via\n\t* {@link QueryObserver#trackProp} (and an optional `onPropTracked` callback). Used by framework\n\t* adapters when `notifyOnChangeProps` is not set, to implement its default \"only re-render on\n\t* properties you actually read\" behavior.\n\t*/\n\ttrackResult(result, onPropTracked) {\n\t\treturn new Proxy(result, { get: (target, key) => {\n\t\t\tthis.trackProp(key);\n\t\t\tonPropTracked?.(key);\n\t\t\treturn Reflect.get(target, key);\n\t\t} });\n\t}\n\t/**\n\t* Records that the given `QueryObserverResult` property was read, so a subsequent update only\n\t* notifies this observer if a tracked property actually changed. Normally called indirectly via\n\t* {@link QueryObserver#trackResult}'s proxy; exposed directly for adapters that track property\n\t* access themselves (e.g. through their own reactivity system) instead of via the proxy.\n\t*/\n\ttrackProp(key) {\n\t\tthis.#trackedProps.add(key);\n\t}\n\t/**\n\t* Returns the `Query` instance this observer is currently observing.\n\t*/\n\tgetCurrentQuery() {\n\t\treturn this.#currentQuery;\n\t}\n\t/**\n\t* Refetches the observed query and returns a promise that resolves with\n\t* the resulting `QueryObserverResult`.\n\t*\n\t* @example\n\t* ```ts\n\t* const result = await observer.refetch({ cancelRefetch: false })\n\t* console.log(result.data)\n\t* ```\n\t*/\n\trefetch({ ...options } = {}) {\n\t\treturn this.fetch({ ...options });\n\t}\n\t/**\n\t* Fetches a query defined by the given options without affecting this\n\t* observer's own tracked query or result, and returns a promise that\n\t* resolves with the `QueryObserverResult` for that fetch. This is useful\n\t* for prefetching data that another observer (e.g. a query about to be\n\t* navigated to) will need, ahead of time.\n\t*\n\t* @example\n\t* ```ts\n\t* const result = await observer.fetchOptimistic({\n\t* queryKey: ['posts', 2],\n\t* queryFn: () => fetchPost(2),\n\t* })\n\t* console.log(result.data)\n\t* ```\n\t*/\n\tfetchOptimistic(options) {\n\t\tconst defaultedOptions = this.#client.defaultQueryOptions(options);\n\t\tconst query = this.#client.getQueryCache().build(this.#client, defaultedOptions);\n\t\tlet unsubscribe = () => {};\n\t\tlet resolveEarly;\n\t\tconst cachePromise = new Promise((resolve) => {\n\t\t\tresolveEarly = resolve;\n\t\t\tunsubscribe = this.#client.getQueryCache().subscribe((event) => {\n\t\t\t\tif (event.type === \"updated\" && event.query.queryHash === query.queryHash && query.state.data !== void 0) {\n\t\t\t\t\tunsubscribe();\n\t\t\t\t\tresolve(this.createResult(query, defaultedOptions));\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\treturn Promise.race([query.fetch().then(() => {\n\t\t\tconst result = this.createResult(query, defaultedOptions);\n\t\t\tresolveEarly?.(result);\n\t\t\treturn result;\n\t\t}).finally(() => {\n\t\t\tunsubscribe();\n\t\t}), cachePromise]);\n\t}\n\tfetch(fetchOptions) {\n\t\treturn this.#executeFetch({\n\t\t\t...fetchOptions,\n\t\t\tcancelRefetch: fetchOptions.cancelRefetch ?? true\n\t\t}).then(() => {\n\t\t\tthis.updateResult();\n\t\t\treturn this.#currentResult;\n\t\t});\n\t}\n\t#executeFetch(fetchOptions) {\n\t\tthis.#updateQuery();\n\t\tlet promise = this.#currentQuery.fetch(this.options, fetchOptions);\n\t\tif (!fetchOptions?.throwOnError) promise = promise.catch(noop);\n\t\treturn promise;\n\t}\n\t#shouldScheduleTimer(timeout) {\n\t\treturn !isServer() && resolveQueryValue(this.options.enabled, this.#currentQuery) !== false && isValidTimeout(timeout);\n\t}\n\t#updateStaleTimeout() {\n\t\tthis.#clearStaleTimeout();\n\t\tconst staleTime = resolveQueryValue(this.options.staleTime, this.#currentQuery);\n\t\tif (this.#currentResult.isStale || !this.#shouldScheduleTimer(staleTime)) return;\n\t\tconst timeout = timeUntilStale(this.#currentResult.dataUpdatedAt, staleTime) + 1;\n\t\tthis.#staleTimeoutId = timeoutManager.setTimeout(() => {\n\t\t\tif (!this.#currentResult.isStale) this.updateResult();\n\t\t}, timeout);\n\t}\n\t#computeRefetchInterval() {\n\t\treturn resolveQueryValue(this.options.refetchInterval, this.#currentQuery) ?? false;\n\t}\n\t#updateRefetchInterval(nextInterval) {\n\t\tthis.#clearRefetchInterval();\n\t\tthis.#currentRefetchInterval = nextInterval;\n\t\tif (this.#currentRefetchInterval === 0 || !this.#shouldScheduleTimer(this.#currentRefetchInterval)) return;\n\t\tthis.#refetchIntervalId = timeoutManager.setInterval(() => {\n\t\t\tif (this.options.refetchIntervalInBackground || focusManager.isFocused()) this.#executeFetch();\n\t\t}, this.#currentRefetchInterval);\n\t}\n\t#updateTimers() {\n\t\tthis.#updateStaleTimeout();\n\t\tthis.#updateRefetchInterval(this.#computeRefetchInterval());\n\t}\n\t#clearStaleTimeout() {\n\t\tif (this.#staleTimeoutId !== void 0) {\n\t\t\ttimeoutManager.clearTimeout(this.#staleTimeoutId);\n\t\t\tthis.#staleTimeoutId = void 0;\n\t\t}\n\t}\n\t#clearRefetchInterval() {\n\t\tif (this.#refetchIntervalId !== void 0) {\n\t\t\ttimeoutManager.clearInterval(this.#refetchIntervalId);\n\t\t\tthis.#refetchIntervalId = void 0;\n\t\t}\n\t}\n\tcreateResult(query, options) {\n\t\tconst prevQuery = this.#currentQuery;\n\t\tconst prevOptions = this.options;\n\t\tconst prevResult = this.#currentResult;\n\t\tconst prevResultState = this.#currentResultState;\n\t\tconst prevResultOptions = this.#currentResultOptions;\n\t\tconst queryInitialState = query !== prevQuery ? query.state : this.#currentQueryInitialState;\n\t\tconst { state } = query;\n\t\tlet newState = { ...state };\n\t\tlet isPlaceholderData = false;\n\t\tlet data;\n\t\tif (options._optimisticResults) {\n\t\t\tconst mounted = this.hasListeners();\n\t\t\tconst fetchOnMount = !mounted && shouldFetchOnMount(query, options);\n\t\t\tconst fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);\n\t\t\tif (fetchOnMount || fetchOptionally) newState = {\n\t\t\t\t...newState,\n\t\t\t\t...fetchState(state.data, query.options)\n\t\t\t};\n\t\t\tif (options._optimisticResults === \"isRestoring\") newState.fetchStatus = \"idle\";\n\t\t}\n\t\tlet { error, errorUpdatedAt, status } = newState;\n\t\tdata = newState.data;\n\t\tlet skipSelect = false;\n\t\tif (options.placeholderData !== void 0 && data === void 0 && status === \"pending\") {\n\t\t\tlet placeholderData;\n\t\t\tif (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) {\n\t\t\t\tplaceholderData = prevResult.data;\n\t\t\t\tskipSelect = true;\n\t\t\t} else placeholderData = typeof options.placeholderData === \"function\" ? options.placeholderData(this.#lastQueryWithDefinedData?.state.data, this.#lastQueryWithDefinedData) : options.placeholderData;\n\t\t\tif (placeholderData !== void 0) {\n\t\t\t\tstatus = \"success\";\n\t\t\t\tdata = replaceData(prevResult?.data, placeholderData, options);\n\t\t\t\tisPlaceholderData = true;\n\t\t\t}\n\t\t}\n\t\tif (options.select && data !== void 0 && !skipSelect) {\n\t\t\tif (prevResult && data === prevResultState?.data && options.select === this.#selectFn) data = this.#selectResult;\n\t\t\telse try {\n\t\t\t\tthis.#selectFn = options.select;\n\t\t\t\tdata = options.select(data);\n\t\t\t\tdata = replaceData(prevResult?.data, data, options);\n\t\t\t\tthis.#selectResult = data;\n\t\t\t\tthis.#selectError = null;\n\t\t\t} catch (selectError) {\n\t\t\t\tthis.#selectError = selectError;\n\t\t\t}\n\t\t} else if (data === void 0) this.#selectError = null;\n\t\tif (this.#selectError) {\n\t\t\terror = this.#selectError;\n\t\t\tdata = this.#selectResult;\n\t\t\terrorUpdatedAt = Date.now();\n\t\t\tstatus = \"error\";\n\t\t\tisPlaceholderData = false;\n\t\t}\n\t\tconst isFetching = newState.fetchStatus === \"fetching\";\n\t\tconst isPending = status === \"pending\";\n\t\tconst isError = status === \"error\";\n\t\tconst isLoading = isPending && isFetching;\n\t\tconst hasData = data !== void 0;\n\t\treturn {\n\t\t\tstatus,\n\t\t\tfetchStatus: newState.fetchStatus,\n\t\t\tisPending,\n\t\t\tisSuccess: status === \"success\",\n\t\t\tisError,\n\t\t\tisInitialLoading: isLoading,\n\t\t\tisLoading,\n\t\t\tdata,\n\t\t\tdataUpdatedAt: newState.dataUpdatedAt,\n\t\t\terror,\n\t\t\terrorUpdatedAt,\n\t\t\tfailureCount: newState.fetchFailureCount,\n\t\t\tfailureReason: newState.fetchFailureReason,\n\t\t\terrorUpdateCount: newState.errorUpdateCount,\n\t\t\tisFetched: query.isFetched(),\n\t\t\tisFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,\n\t\t\tisFetching,\n\t\t\tisRefetching: isFetching && !isPending,\n\t\t\tisLoadingError: isError && !hasData,\n\t\t\tisPaused: newState.fetchStatus === \"paused\",\n\t\t\tisPlaceholderData,\n\t\t\tisRefetchError: isError && hasData,\n\t\t\tisStale: isStale(query, options),\n\t\t\trefetch: this.refetch,\n\t\t\tisEnabled: resolveQueryValue(options.enabled, query) !== false\n\t\t};\n\t}\n\t/**\n\t* Recomputes and stores the current result from the current query/options, notifying listeners\n\t* if it changed. Framework adapters call this right after subscribing to make sure no query\n\t* update was missed in the gap between creating the observer and subscribing to it.\n\t*/\n\tupdateResult() {\n\t\tconst prevResult = this.#currentResult;\n\t\tconst nextResult = this.createResult(this.#currentQuery, this.options);\n\t\tthis.#currentResultState = this.#currentQuery.state;\n\t\tthis.#currentResultOptions = this.options;\n\t\tif (this.#currentResultState.data !== void 0) this.#lastQueryWithDefinedData = this.#currentQuery;\n\t\tif (shallowEqualObjects(nextResult, prevResult)) return;\n\t\tthis.#currentResult = nextResult;\n\t\tconst shouldNotifyListeners = () => {\n\t\t\tif (!prevResult) return true;\n\t\t\tconst { notifyOnChangeProps } = this.options;\n\t\t\tconst notifyOnChangePropsValue = typeof notifyOnChangeProps === \"function\" ? notifyOnChangeProps() : notifyOnChangeProps;\n\t\t\tif (notifyOnChangePropsValue === \"all\" || !notifyOnChangePropsValue && !this.#trackedProps.size) return true;\n\t\t\tconst includedProps = new Set(notifyOnChangePropsValue ?? this.#trackedProps);\n\t\t\tif (this.options.throwOnError) includedProps.add(\"error\");\n\t\t\treturn Object.keys(this.#currentResult).some((key) => {\n\t\t\t\tconst typedKey = key;\n\t\t\t\treturn this.#currentResult[typedKey] !== prevResult[typedKey] && includedProps.has(typedKey);\n\t\t\t});\n\t\t};\n\t\tconst notifyListeners = shouldNotifyListeners();\n\t\tnotifyManager.batch(() => {\n\t\t\tif (notifyListeners) this.listeners.forEach((listener) => {\n\t\t\t\tlistener(this.#currentResult);\n\t\t\t});\n\t\t\tthis.#client.getQueryCache().notify({\n\t\t\t\tquery: this.#currentQuery,\n\t\t\t\ttype: \"observerResultsUpdated\"\n\t\t\t});\n\t\t});\n\t}\n\t#updateQuery() {\n\t\tconst query = this.#client.getQueryCache().build(this.#client, this.options);\n\t\tif (query === this.#currentQuery) return;\n\t\tconst prevQuery = this.#currentQuery;\n\t\tthis.#currentQuery = query;\n\t\tthis.#currentQueryInitialState = query.state;\n\t\tif (this.hasListeners()) {\n\t\t\tprevQuery?.removeObserver(this);\n\t\t\tquery.addObserver(this);\n\t\t}\n\t}\n\t/** @internal */\n\tonQueryUpdate() {\n\t\tthis.updateResult();\n\t\tif (this.hasListeners()) this.#updateTimers();\n\t}\n};\nfunction shouldLoadOnMount(query, options) {\n\treturn resolveQueryValue(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === \"error\" && resolveQueryValue(options.retryOnMount, query) === false);\n}\nfunction shouldFetchOnMount(query, options) {\n\treturn shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);\n}\nfunction shouldFetchOn(query, options, field) {\n\tif (resolveQueryValue(options.enabled, query) !== false && resolveQueryValue(options.staleTime, query) !== \"static\") {\n\t\tconst value = resolveQueryValue(field, query);\n\t\treturn value === \"always\" || value !== false && isStale(query, options);\n\t}\n\treturn false;\n}\nfunction shouldFetchOptionally(query, prevQuery, options, prevOptions) {\n\treturn (query !== prevQuery || resolveQueryValue(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== \"error\") && isStale(query, options);\n}\nfunction isStale(query, options) {\n\treturn resolveQueryValue(options.enabled, query) !== false && query.isStaleByTime(resolveQueryValue(options.staleTime, query));\n}\n//#endregion\nexport { QueryObserver };\n\n//# sourceMappingURL=queryObserver.js.map","\"use client\";\nimport * as React from \"react\";\n//#region src/IsRestoringProvider.ts\nconst IsRestoringContext = React.createContext(false);\n/**\n* If you are using `PersistQueryClientProvider`, you can also use the `useIsRestoring` hook alongside it to\n* check if a restore is currently in progress. `useQuery` and friends also check this internally to avoid\n* race conditions between the restore and mounting queries.\n*\n* @returns `true` while a persisted client is being restored, `false` otherwise.\n*/\nconst useIsRestoring = () => React.useContext(IsRestoringContext);\n/**\n* The Provider that `PersistQueryClientProvider` uses to signal whether a persisted client is currently\n* being restored, read by `useIsRestoring`.\n*/\nconst IsRestoringProvider = IsRestoringContext.Provider;\n//#endregion\nexport { IsRestoringProvider, useIsRestoring };\n\n//# sourceMappingURL=IsRestoringProvider.js.map","\"use client\";\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/QueryErrorResetBoundary.tsx\n/**\n* Resets any query errors within the boundary, so queries know they can try again.\n*/\nfunction createValue() {\n\tlet isReset = false;\n\treturn {\n\t\t/**\n\t\t* Clears the reset state, so queries know not to try again until the boundary is reset again.\n\t\t*/\n\t\tclearReset: () => {\n\t\t\tisReset = false;\n\t\t},\n\t\t/**\n\t\t* Resets any query errors within the boundary, so queries know they can try again.\n\t\t*/\n\t\treset: () => {\n\t\t\tisReset = true;\n\t\t},\n\t\t/**\n\t\t* Returns whether the boundary has been reset and not yet cleared.\n\t\t*/\n\t\tisReset: () => {\n\t\t\treturn isReset;\n\t\t}\n\t};\n}\nconst QueryErrorResetBoundaryContext = React.createContext(createValue());\n/**\n* This hook will reset any query errors within the closest `QueryErrorResetBoundary`. If there is no boundary\n* defined it will reset them globally.\n*\n* @returns The boundary's {@link QueryErrorResetBoundaryValue}.\n*\n* @example\n* ```tsx\n* import { ErrorBoundary } from 'react-error-boundary'\n* import { useQueryErrorResetBoundary } from '@tanstack/react-query'\n*\n* function App({ children }: { children: React.ReactNode }) {\n* const { reset } = useQueryErrorResetBoundary()\n*\n* return (\n* <ErrorBoundary\n* onReset={reset}\n* fallbackRender={({ resetErrorBoundary }) => (\n* <div>\n* There was an error!\n* <button onClick={() => resetErrorBoundary()}>Try again</button>\n* </div>\n* )}\n* >\n* {children}\n* </ErrorBoundary>\n* )\n* }\n* ```\n*/\nconst useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);\n/**\n* When using `suspense` or `throwOnError` in your queries, you need a way to let queries know that you want to\n* try again when re-rendering after some error occurred. With the `QueryErrorResetBoundary` component you can\n* reset any query errors within the boundaries of the component.\n*\n* @returns The `children`, rendered as-is, or called with the boundary's {@link QueryErrorResetBoundaryValue}\n* if `children` is a function.\n*\n* @example\n* ```tsx\n* import { ErrorBoundary } from 'react-error-boundary'\n* import { QueryErrorResetBoundary } from '@tanstack/react-query'\n*\n* function App() {\n* return (\n* <QueryErrorResetBoundary>\n* {({ reset }) => (\n* <ErrorBoundary\n* onReset={reset}\n* fallbackRender={({ resetErrorBoundary }) => (\n* <div>\n* There was an error!\n* <button onClick={() => resetErrorBoundary()}>Try again</button>\n* </div>\n* )}\n* >\n* <Page />\n* </ErrorBoundary>\n* )}\n* </QueryErrorResetBoundary>\n* )\n* }\n* ```\n*/\nconst QueryErrorResetBoundary = ({ children }) => {\n\tconst [value] = React.useState(() => createValue());\n\treturn /* @__PURE__ */ jsx(QueryErrorResetBoundaryContext.Provider, {\n\t\tvalue,\n\t\tchildren: typeof children === \"function\" ? children(value) : children\n\t});\n};\n//#endregion\nexport { QueryErrorResetBoundary, useQueryErrorResetBoundary };\n\n//# sourceMappingURL=QueryErrorResetBoundary.js.map","\"use client\";\nimport * as React from \"react\";\nimport { shouldThrowError } from \"@tanstack/query-core\";\n//#region src/errorBoundaryUtils.ts\nconst ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {\n\tconst throwOnError = query?.state.error && typeof options.throwOnError === \"function\" ? shouldThrowError(options.throwOnError, [query.state.error, query]) : options.throwOnError;\n\tif (options.suspense || throwOnError) {\n\t\tif (!errorResetBoundary.isReset()) options.retryOnMount = false;\n\t}\n};\nconst useClearResetErrorBoundary = (errorResetBoundary) => {\n\tReact.useEffect(() => {\n\t\terrorResetBoundary.clearReset();\n\t}, [errorResetBoundary]);\n};\nconst getHasError = ({ result, errorResetBoundary, throwOnError, query, suspense }) => {\n\treturn result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));\n};\n//#endregion\nexport { ensurePreventErrorBoundaryRetry, getHasError, useClearResetErrorBoundary };\n\n//# sourceMappingURL=errorBoundaryUtils.js.map","//#region src/suspense.ts\nconst defaultThrowOnError = (_error, query) => query.state.data === void 0;\nconst ensureSuspenseTimers = (defaultedOptions) => {\n\tif (defaultedOptions.suspense) {\n\t\tconst MIN_SUSPENSE_TIME_MS = 1e3;\n\t\tconst clamp = (value) => value === \"static\" ? value : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS);\n\t\tconst originalStaleTime = defaultedOptions.staleTime;\n\t\tdefaultedOptions.staleTime = typeof originalStaleTime === \"function\" ? (...args) => clamp(originalStaleTime(...args)) : clamp(originalStaleTime);\n\t\tif (typeof defaultedOptions.gcTime === \"number\") defaultedOptions.gcTime = Math.max(defaultedOptions.gcTime, MIN_SUSPENSE_TIME_MS);\n\t}\n};\nconst shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;\nconst fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {\n\terrorResetBoundary.clearReset();\n});\n//#endregion\nexport { defaultThrowOnError, ensureSuspenseTimers, fetchOptimistic, shouldSuspend };\n\n//# sourceMappingURL=suspense.js.map","\"use client\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport { useIsRestoring } from \"./IsRestoringProvider.js\";\nimport { useQueryErrorResetBoundary } from \"./QueryErrorResetBoundary.js\";\nimport { ensurePreventErrorBoundaryRetry, getHasError, useClearResetErrorBoundary } from \"./errorBoundaryUtils.js\";\nimport { ensureSuspenseTimers, fetchOptimistic, shouldSuspend } from \"./suspense.js\";\nimport * as React from \"react\";\nimport { noop, notifyManager } from \"@tanstack/query-core\";\n//#region src/useBaseQuery.ts\nfunction useBaseQuery(options, Observer, queryClient) {\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tif (typeof options !== \"object\" || Array.isArray(options)) throw new Error(\"Bad argument type. Starting with v5, only the \\\"Object\\\" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object\");\n\t}\n\tconst isRestoring = useIsRestoring();\n\tconst errorResetBoundary = useQueryErrorResetBoundary();\n\tconst client = useQueryClient(queryClient);\n\tconst defaultedOptions = client.defaultQueryOptions(options);\n\tconst query = client.getQueryCache().get(defaultedOptions.queryHash);\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tif (!defaultedOptions.queryFn) console.error(`[${defaultedOptions.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`);\n\t}\n\tconst subscribed = options.subscribed !== false;\n\tdefaultedOptions._optimisticResults = isRestoring ? \"isRestoring\" : subscribed ? \"optimistic\" : void 0;\n\tensureSuspenseTimers(defaultedOptions);\n\tensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary, query);\n\tuseClearResetErrorBoundary(errorResetBoundary);\n\tconst [observer] = React.useState(() => new Observer(client, defaultedOptions));\n\tconst result = observer.getOptimisticResult(defaultedOptions);\n\tconst shouldSubscribe = !isRestoring && subscribed;\n\tReact.useSyncExternalStore(React.useCallback((onStoreChange) => {\n\t\tconst unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop;\n\t\tobserver.updateResult();\n\t\treturn unsubscribe;\n\t}, [observer, shouldSubscribe]), () => observer.getCurrentResult(), () => observer.getCurrentResult());\n\tReact.useEffect(() => {\n\t\tobserver.setOptions(defaultedOptions);\n\t}, [defaultedOptions, observer]);\n\tif (shouldSuspend(defaultedOptions, result)) throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary);\n\tif (getHasError({\n\t\tresult,\n\t\terrorResetBoundary,\n\t\tthrowOnError: defaultedOptions.throwOnError,\n\t\tquery,\n\t\tsuspense: defaultedOptions.suspense\n\t})) throw result.error;\n\treturn !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;\n}\n//#endregion\nexport { useBaseQuery };\n\n//# sourceMappingURL=useBaseQuery.js.map","\"use client\";\nimport { useBaseQuery } from \"./useBaseQuery.js\";\nimport { QueryObserver } from \"@tanstack/query-core\";\n//#region src/useQuery.ts\nfunction useQuery(options, queryClient) {\n\treturn useBaseQuery(options, QueryObserver, queryClient);\n}\n//#endregion\nexport { useQuery };\n\n//# sourceMappingURL=useQuery.js.map","import type {\n DefaultError,\n QueryClient,\n QueryKey,\n UseQueryOptions,\n UseQueryResult,\n} from '@tanstack/react-query';\nimport { useQuery } from '@tanstack/react-query';\nimport { useMemo } from 'react';\n\n\nexport const useQueryMemo = <TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, queryClient?: QueryClient): UseQueryResult<NoInfer<TData>, TError> => {\n const query = useQuery(options, queryClient);\n\n return useMemo(() => {\n return query;\n\n // eslint-disable-next-line react-hooks/exhaustive-deps, react-hooks/use-memo\n }, [JSON.stringify({\n data: query.data,\n error: query.error,\n isEnabled: query.isEnabled,\n isFetching: query.isFetching,\n isLoading: query.isLoading,\n isPending: query.isPending,\n })]);\n};\n"],"x_google_ignoreList":[0,1,2,3,4,5,6],"mappings":";;;;;;AA4BA,IAAI,IAAgB,cAAc,EAAa;CAC9C;CACA,KAAgB,KAAK;CACrB,KAA4B,KAAK;CACjC,KAAiB,KAAK;CACtB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,qBAAgC,IAAI,IAAI;CACxC,YAAY,GAAQ,GAAS;EAM5B,AALA,MAAM,GACN,KAAK,UAAU,GACf,KAAK,KAAU,GACf,KAAK,KAAe,MACpB,KAAK,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AAa,GAAS,GAAe,CAAW;AACxD;;;ACKA,IAAa,KAA4H,GAAkE,MAAsE;CAC/Q,IAAM,IAAQ,EAAS,GAAS,CAAW;CAE3C,OAAO,QACE,GAGN,CAAC,KAAK,UAAU;EACjB,MAAM,EAAM;EACZ,OAAO,EAAM;EACb,WAAW,EAAM;EACjB,YAAY,EAAM;EAClB,WAAW,EAAM;EACjB,WAAW,EAAM;CACnB,CAAC,CAAC,CAAC;AACL"}
|
package/dist/_chunks/vanilla.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_immer@11.1.18_react@19.3.0_use-sync-external-store@1.
|
|
1
|
+
//#region ../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_immer@11.1.18_react@19.3.0_use-sync-external-store@1.7.0_react@19.3.0_/node_modules/zustand/esm/vanilla.mjs
|
|
2
2
|
var e = (e) => {
|
|
3
3
|
let t, n = /* @__PURE__ */ new Set(), r = (e, r) => {
|
|
4
4
|
let i = typeof e == "function" ? e(t) : e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vanilla.js","names":[],"sources":["../../../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_immer@11.1.18_react@19.3.0_use-sync-external-store@1.
|
|
1
|
+
{"version":3,"file":"vanilla.js","names":[],"sources":["../../../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_immer@11.1.18_react@19.3.0_use-sync-external-store@1.7.0_react@19.3.0_/node_modules/zustand/esm/vanilla.mjs"],"sourcesContent":["const createStoreImpl = (createState) => {\n let state;\n const listeners = /* @__PURE__ */ new Set();\n const setState = (partial, replace) => {\n const nextState = typeof partial === \"function\" ? partial(state) : partial;\n if (!Object.is(nextState, state)) {\n const previousState = state;\n state = (replace != null ? replace : typeof nextState !== \"object\" || nextState === null) ? nextState : Object.assign({}, state, nextState);\n listeners.forEach((listener) => listener(state, previousState));\n }\n };\n const getState = () => state;\n const getInitialState = () => initialState;\n const subscribe = (listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n };\n const api = { setState, getState, getInitialState, subscribe };\n const initialState = state = createState(setState, getState, api);\n return api;\n};\nconst createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);\n\nexport { createStore };\n"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAM,KAAmB,MAAgB;CACvC,IAAI,GACE,oBAA4B,IAAI,IAAI,GACpC,KAAY,GAAS,MAAY;EACrC,IAAM,IAAY,OAAO,KAAY,aAAa,EAAQ,CAAK,IAAI;EACnE,IAAI,CAAC,OAAO,GAAG,GAAW,CAAK,GAAG;GAChC,IAAM,IAAgB;GAEtB,AADA,IAAS,MAA4B,OAAO,KAAc,aAAY,KAAsB,IAAY,OAAO,OAAO,CAAC,GAAG,GAAO,CAAS,GAC1I,EAAU,SAAS,MAAa,EAAS,GAAO,CAAa,CAAC;EAChE;CACF,GACM,UAAiB,GAMjB,IAAM;EAAE;EAAU;EAAU,uBALJ;EAKqB,YAJhC,OACjB,EAAU,IAAI,CAAQ,SACT,EAAU,OAAO,CAAQ;CAEqB,GACvD,IAAe,IAAQ,EAAY,GAAU,GAAU,CAAG;CAChE,OAAO;AACT,GACM,MAAgB,MAAgB,IAAc,EAAgB,CAAW,IAAI"}
|
package/dist/_chunks/yup.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { appendErrors as e, get as t, set as n } from "react-hook-form";
|
|
2
|
-
//#region ../../node_modules/.pnpm/@hookform+resolvers@5.9.
|
|
2
|
+
//#region ../../node_modules/.pnpm/@hookform+resolvers@5.9.1_ajv@8.20.0_react-hook-form@7.88.0_react@19.3.0__yup@1.7.1_zod@4.6.5/node_modules/@hookform/resolvers/dist/resolvers.mjs
|
|
3
3
|
var r = (e, n, r) => {
|
|
4
4
|
if (e && "reportValidity" in e) {
|
|
5
5
|
let i = t(r, n);
|
|
@@ -29,7 +29,7 @@ function s(e) {
|
|
|
29
29
|
return e.replace(/\[(\d+)]/g, ".$1").replace(/[[\]]/g, "");
|
|
30
30
|
}
|
|
31
31
|
//#endregion
|
|
32
|
-
//#region ../../node_modules/.pnpm/@hookform+resolvers@5.9.
|
|
32
|
+
//#region ../../node_modules/.pnpm/@hookform+resolvers@5.9.1_ajv@8.20.0_react-hook-form@7.88.0_react@19.3.0__yup@1.7.1_zod@4.6.5/node_modules/@hookform/resolvers/yup/dist/yup.mjs
|
|
33
33
|
function c(t, n, r) {
|
|
34
34
|
return r === void 0 && (r = {}), function(o, s, c) {
|
|
35
35
|
try {
|
package/dist/_chunks/yup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yup.js","names":["e","o","r","s","e","t","r"],"sources":["../../../../node_modules/.pnpm/@hookform+resolvers@5.9.
|
|
1
|
+
{"version":3,"file":"yup.js","names":["e","o","r","s","e","t","r"],"sources":["../../../../node_modules/.pnpm/@hookform+resolvers@5.9.1_ajv@8.20.0_react-hook-form@7.88.0_react@19.3.0__yup@1.7.1_zod@4.6.5/node_modules/@hookform/resolvers/dist/resolvers.mjs","../../../../node_modules/.pnpm/@hookform+resolvers@5.9.1_ajv@8.20.0_react-hook-form@7.88.0_react@19.3.0__yup@1.7.1_zod@4.6.5/node_modules/@hookform/resolvers/yup/dist/yup.mjs"],"sourcesContent":["import{get as e,set as r}from\"react-hook-form\";const t=(r,t,s)=>{if(r&&\"reportValidity\"in r){const o=e(s,t);r.setCustomValidity(o&&o.message||\"\"),r.reportValidity()}},s=(e,r)=>{for(const s in r.fields){const o=r.fields[s];o&&o.ref&&\"reportValidity\"in o.ref?t(o.ref,s,e):o&&o.refs&&o.refs.forEach(r=>t(r,s,e))}},o=(t,o)=>{o.shouldUseNativeValidation&&s(t,o);const n={};for(const s in t){const f=e(o.fields,s),c=Object.assign(t[s]||{},{ref:f&&f.refs?f.refs[0]:f&&f.ref});if(i(o.names||Object.keys(t),s)){const t=Object.assign({},e(n,s));r(t,\"root\",c),r(n,s,t)}else r(n,s,c)}return n},i=(e,r)=>{const t=n(r).replace(/[.*+?^${}()|\\\\]/g,\"\\\\$&\");return e.some(e=>n(e).match(`^${t}\\\\.\\\\d+`))};function n(e){return e.replace(/\\[(\\d+)]/g,\".$1\").replace(/[[\\]]/g,\"\")}export{o as toNestErrors,s as validateFieldsNatively};\n//# sourceMappingURL=resolvers.mjs.map\n","import{validateFieldsNatively as e,toNestErrors as t}from\"@hookform/resolvers\";import{appendErrors as r}from\"react-hook-form\";function o(o,n,a){return void 0===a&&(a={}),function(s,i,c){try{return Promise.resolve(function(t,r){try{var u=(null!=n&&n.context&&\"development\"===process.env.NODE_ENV&&console.warn(\"You should not used the yup options context. Please, use the 'useForm' context object instead\"),Promise.resolve(o[\"sync\"===a.mode?\"validateSync\":\"validate\"](s,Object.assign({abortEarly:!1},n,{context:i}))).then(function(t){return c.shouldUseNativeValidation&&e({},c),{values:a.raw?Object.assign({},s):t,errors:{}}}))}catch(e){return r(e)}return u&&u.then?u.then(void 0,r):u}(0,function(e){if(!e.inner)throw e;return{values:{},errors:t((o=e,n=!c.shouldUseNativeValidation&&\"all\"===c.criteriaMode,(o.inner||[]).reduce(function(e,t){if(e[t.path]||(e[t.path]={message:t.message,type:t.type}),n){var o=e[t.path].types,a=o&&o[t.type];e[t.path]=r(t.path,n,e,t.type,a?[].concat(a,t.message):t.message)}return e},Object.create(null))),c)};var o,n}))}catch(e){return Promise.reject(e)}}}export{o as yupResolver};\n//# sourceMappingURL=yup.module.js.map\n"],"x_google_ignoreList":[0,1],"mappings":";;AAA+C,IAAM,KAAG,GAAE,GAAE,MAAI;CAAC,IAAG,KAAG,oBAAmB,GAAE;EAAC,IAAM,IAAEA,EAAE,GAAE,CAAC;EAAE,EAAE,kBAAkB,KAAG,EAAE,WAAS,EAAE,GAAE,EAAE,eAAe;CAAC;AAAC,GAAE,KAAG,GAAE,MAAI;CAAC,KAAI,IAAM,KAAK,EAAE,QAAO;EAAC,IAAM,IAAE,EAAE,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|
83
83
|
}]);
|
|
84
84
|
}
|
|
85
85
|
sendLog() {
|
|
86
|
-
|
|
86
|
+
this.logItems.length && n.getInstance()?.authContextProps?.isAuthenticated && (document.location.href.includes("accept-invitation") || (r.getInstance().systemApi.log({ log_items: this.logItems }, { headers: { "X-IGNORE-LOG": "1" } }).catch(() => 0), this.logItems = []));
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
89
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/classes/services/LogService/LogService.ts"],"sourcesContent":["import { isAxiosError } from 'axios';\nimport type {\n AxiosResponse,\n InternalAxiosRequestConfig,\n} from 'axios';\nimport { CommonDbLogLevel } from '@gen-epix/api-commondb';\nimport type {
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/classes/services/LogService/LogService.ts"],"sourcesContent":["import { isAxiosError } from 'axios';\nimport type {\n AxiosResponse,\n InternalAxiosRequestConfig,\n} from 'axios';\nimport { CommonDbLogLevel } from '@gen-epix/api-commondb';\nimport type { CommonDbExternalLogItem } from '@gen-epix/api-commondb';\nimport { HmrUtil } from '@gen-epix/ui-core/utils/HmrUtil';\nimport { StringUtil } from '@gen-epix/ui-core/utils/StringUtil';\n\nimport { AuthenticationService } from '../AuthenticationService';\nimport { ConfigService } from '../ConfigService';\nimport { ApiService } from '../ApiService';\nimport { AxiosUtil } from '../../../utils/AxiosUtil';\n\ntype LogServiceItem = {\n detail?: unknown;\n duration?: number;\n level: CommonDbLogLevel;\n topic: string;\n};\n\nexport class LogService {\n private static __instance: LogService;\n\n protected readonly requestMap: Map<string, number>;\n\n private logItems: CommonDbExternalLogItem[] = [];\n\n private constructor() {\n this.requestMap = new Map<string, number>();\n setInterval(() => {\n this.sendLog();\n }, ConfigService.getInstance().config.log.LOG_INTERVAL_MS);\n }\n\n public static getInstance(): LogService {\n LogService.__instance = HmrUtil.getHmrSingleton('logService', LogService.__instance, () => new LogService());\n return LogService.__instance;\n }\n\n public flushLog(): void {\n this.sendLog();\n }\n\n public log(items: LogServiceItem[]): void {\n const timestamp = new Date().toISOString();\n const software_version = ConfigService.getInstance().config.getSoftwareVersion();\n this.logItems.push(...items.map<CommonDbExternalLogItem>(item => {\n return {\n command_id: StringUtil.createUuid(),\n detail: item.detail ? JSON.stringify(item.detail) : null,\n duration: item.duration ?? null,\n level: item.level,\n software_version,\n timestamp,\n topic: item.topic ?? null,\n };\n }));\n }\n\n public onRequest(request: InternalAxiosRequestConfig): InternalAxiosRequestConfig {\n if (request.headers.has('X-IGNORE-LOG')) {\n return request;\n }\n const requestId = StringUtil.createUuid();\n request.headers.set('X-REQUEST-ID', requestId);\n this.requestMap.set(requestId, new Date().getTime());\n\n this.log([{\n detail: {\n requestData: request.data as unknown,\n requestParams: request.params as unknown,\n url: request.url,\n },\n level: CommonDbLogLevel.TRACE,\n topic: 'REQUEST',\n }]);\n\n return request;\n }\n\n public onResponseFulfilled(response: AxiosResponse): AxiosResponse {\n if (response.config.headers.has('X-IGNORE-LOG')) {\n return response;\n }\n\n const requestId = response?.config?.headers.get('X-REQUEST-ID') as string;\n const duration = new Date().getTime() - this.requestMap.get(requestId);\n\n this.log([{\n detail: {\n requestData: response.config.data as unknown,\n requestParams: response.config.params as unknown,\n url: response.config.url,\n },\n duration,\n level: response.status >= 200 && response.status < 300 ? CommonDbLogLevel.TRACE : CommonDbLogLevel.ERROR,\n topic: 'RESPONSE',\n }]);\n\n return response;\n }\n\n public onResponseRejected(error: unknown): void {\n if (isAxiosError(error)) {\n if (AxiosUtil.isAxiosCanceledError(error)) {\n return;\n }\n const requestId = error?.config?.headers.get('X-REQUEST-ID') as string;\n const duration = new Date().getTime() - this.requestMap.get(requestId);\n this.log([{\n detail: {\n requestParams: error.config.params as unknown,\n responseData: error.response.data as unknown,\n status: error.response.status,\n url: error.config.url,\n },\n duration,\n level: CommonDbLogLevel.ERROR,\n topic: 'RESPONSE_ERROR',\n }]);\n } else {\n this.log([{\n detail: {\n error,\n },\n level: CommonDbLogLevel.ERROR,\n topic: 'RESPONSE_ERROR',\n }]);\n }\n }\n\n private sendLog(): void {\n if (!this.logItems.length || !AuthenticationService.getInstance()?.authContextProps?.isAuthenticated) {\n return;\n }\n if (document.location.href.includes('accept-invitation')) {\n return;\n }\n ApiService.getInstance().systemApi.log({\n log_items: this.logItems,\n }, {\n headers: {\n 'X-IGNORE-LOG': '1',\n },\n }).catch(() => 0);\n this.logItems = [];\n }\n}\n"],"mappings":";;;;;;;;;AAsBA,IAAa,IAAb,MAAa,EAAW;CACtB,OAAe;CAEf;CAEA,WAA8C,CAAC;CAE/C,cAAsB;EAEpB,AADA,KAAK,6BAAa,IAAI,IAAoB,GAC1C,kBAAkB;GAChB,KAAK,QAAQ;EACf,GAAG,EAAc,YAAY,CAAC,CAAC,OAAO,IAAI,eAAe;CAC3D;CAEA,OAAc,cAA0B;EAEtC,OADA,EAAW,aAAa,EAAQ,gBAAgB,cAAc,EAAW,kBAAkB,IAAI,EAAW,CAAC,GACpG,EAAW;CACpB;CAEA,WAAwB;EACtB,KAAK,QAAQ;CACf;CAEA,IAAW,GAA+B;EACxC,IAAM,qBAAY,IAAI,KAAK,EAAA,CAAE,YAAY,GACnC,IAAmB,EAAc,YAAY,CAAC,CAAC,OAAO,mBAAmB;EAC/E,KAAK,SAAS,KAAK,GAAG,EAAM,KAA6B,OAChD;GACL,YAAY,EAAW,WAAW;GAClC,QAAQ,EAAK,SAAS,KAAK,UAAU,EAAK,MAAM,IAAI;GACpD,UAAU,EAAK,YAAY;GAC3B,OAAO,EAAK;GACZ;GACA;GACA,OAAO,EAAK,SAAS;EACvB,EACD,CAAC;CACJ;CAEA,UAAiB,GAAiE;EAChF,IAAI,EAAQ,QAAQ,IAAI,cAAc,GACpC,OAAO;EAET,IAAM,IAAY,EAAW,WAAW;EAcxC,OAbA,EAAQ,QAAQ,IAAI,gBAAgB,CAAS,GAC7C,KAAK,WAAW,IAAI,oBAAW,IAAI,KAAK,EAAA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AAS,mBAAmB,MAGvD,EAAW,YAAY,CAAC,CAAC,UAAU,IAAI,EACrC,WAAW,KAAK,SAClB,GAAG,EACD,SAAS,EACP,gBAAgB,IAClB,EACF,CAAC,CAAC,CAAC,YAAY,CAAC,GAChB,KAAK,WAAW,CAAC;CACnB;AACF"}
|
|
@@ -2,18 +2,27 @@ import { ReactElement } from 'react';
|
|
|
2
2
|
import { createBrowserRouter } from 'react-router-dom';
|
|
3
3
|
import { MyNonIndexRouteObject } from '../../../models/reactRouter';
|
|
4
4
|
type HomePage = () => ReactElement;
|
|
5
|
+
type RoutesFactory = () => MyNonIndexRouteObject[];
|
|
6
|
+
type RoutesInput = MyNonIndexRouteObject[] | RoutesFactory;
|
|
5
7
|
export declare class RouterService {
|
|
6
8
|
private static __instance;
|
|
7
|
-
adminRoutes: MyNonIndexRouteObject[];
|
|
8
|
-
homePageComponent: HomePage;
|
|
9
|
-
router: ReturnType<typeof createBrowserRouter>;
|
|
10
|
-
routes: MyNonIndexRouteObject[];
|
|
9
|
+
get adminRoutes(): MyNonIndexRouteObject[];
|
|
10
|
+
get homePageComponent(): HomePage;
|
|
11
|
+
get router(): ReturnType<typeof createBrowserRouter>;
|
|
12
|
+
get routes(): MyNonIndexRouteObject[];
|
|
13
|
+
private __adminRoutes;
|
|
14
|
+
private __adminRoutesFactory;
|
|
15
|
+
private __homePageComponent;
|
|
16
|
+
private __router;
|
|
17
|
+
private __routes;
|
|
18
|
+
private __routesFactory;
|
|
11
19
|
private constructor();
|
|
12
20
|
static getInstance(): RouterService;
|
|
13
21
|
initialize(kwArgs: {
|
|
14
|
-
adminRoutes:
|
|
22
|
+
adminRoutes: RoutesInput;
|
|
15
23
|
homePageComponent: HomePage;
|
|
16
|
-
routes:
|
|
24
|
+
routes: RoutesInput;
|
|
17
25
|
}): void;
|
|
26
|
+
private createRoutesFactory;
|
|
18
27
|
}
|
|
19
28
|
export {};
|
|
@@ -1,19 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { HmrUtil as e } from "@gen-epix/ui-core/utils/HmrUtil";
|
|
2
|
+
import { createBrowserRouter as t } from "react-router-dom";
|
|
3
3
|
//#region src/classes/services/RouterService/RouterService.ts
|
|
4
4
|
var n = class n {
|
|
5
5
|
static __instance;
|
|
6
|
-
adminRoutes
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
get adminRoutes() {
|
|
7
|
+
if (!this.__adminRoutesFactory) throw Error("RouterService not initialized");
|
|
8
|
+
return this.__adminRoutes ??= this.__adminRoutesFactory(), this.__adminRoutes;
|
|
9
|
+
}
|
|
10
|
+
get homePageComponent() {
|
|
11
|
+
if (!this.__homePageComponent) throw Error("RouterService not initialized");
|
|
12
|
+
return this.__homePageComponent;
|
|
13
|
+
}
|
|
14
|
+
get router() {
|
|
15
|
+
return this.__router ||= t(this.routes), this.__router;
|
|
16
|
+
}
|
|
17
|
+
get routes() {
|
|
18
|
+
if (!this.__routesFactory) throw Error("RouterService not initialized");
|
|
19
|
+
return this.__routes ??= this.__routesFactory(), this.__routes;
|
|
20
|
+
}
|
|
21
|
+
__adminRoutes = null;
|
|
22
|
+
__adminRoutesFactory = null;
|
|
23
|
+
__homePageComponent = null;
|
|
24
|
+
__router = null;
|
|
25
|
+
__routes = null;
|
|
26
|
+
__routesFactory = null;
|
|
10
27
|
constructor() {}
|
|
11
28
|
static getInstance() {
|
|
12
|
-
return n.__instance =
|
|
29
|
+
return n.__instance = e.getHmrSingleton("routerService", n.__instance, () => new n()), n.__instance;
|
|
30
|
+
}
|
|
31
|
+
initialize(e) {
|
|
32
|
+
if (this.__routesFactory) throw Error("RouterService already initialized");
|
|
33
|
+
this.__homePageComponent = e.homePageComponent, this.__adminRoutesFactory = this.createRoutesFactory(e.adminRoutes), this.__routesFactory = this.createRoutesFactory(e.routes);
|
|
13
34
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
this.homePageComponent = t.homePageComponent, this.adminRoutes = t.adminRoutes, this.routes = t.routes, this.router = e(this.routes);
|
|
35
|
+
createRoutesFactory(e) {
|
|
36
|
+
return typeof e == "function" ? e : () => e;
|
|
17
37
|
}
|
|
18
38
|
};
|
|
19
39
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/classes/services/RouterService/RouterService.ts"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { createBrowserRouter } from 'react-router-dom';\nimport { HmrUtil } from '@gen-epix/ui-core/utils/HmrUtil';\n\nimport type { MyNonIndexRouteObject } from '../../../models/reactRouter';\n\ntype HomePage = () => ReactElement;\n\nexport class RouterService {\n private static __instance: RouterService;\n\n public adminRoutes: MyNonIndexRouteObject[]
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/classes/services/RouterService/RouterService.ts"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { createBrowserRouter } from 'react-router-dom';\nimport { HmrUtil } from '@gen-epix/ui-core/utils/HmrUtil';\n\nimport type { MyNonIndexRouteObject } from '../../../models/reactRouter';\n\ntype HomePage = () => ReactElement;\ntype RoutesFactory = () => MyNonIndexRouteObject[];\ntype RoutesInput = MyNonIndexRouteObject[] | RoutesFactory;\n\nexport class RouterService {\n private static __instance: RouterService;\n\n public get adminRoutes(): MyNonIndexRouteObject[] {\n if (!this.__adminRoutesFactory) {\n throw new Error('RouterService not initialized');\n }\n this.__adminRoutes ??= this.__adminRoutesFactory();\n return this.__adminRoutes;\n }\n public get homePageComponent(): HomePage {\n if (!this.__homePageComponent) {\n throw new Error('RouterService not initialized');\n }\n return this.__homePageComponent;\n }\n public get router(): ReturnType<typeof createBrowserRouter> {\n if (!this.__router) {\n this.__router = createBrowserRouter(this.routes);\n }\n return this.__router;\n }\n public get routes(): MyNonIndexRouteObject[] {\n if (!this.__routesFactory) {\n throw new Error('RouterService not initialized');\n }\n this.__routes ??= this.__routesFactory();\n return this.__routes;\n }\n private __adminRoutes: MyNonIndexRouteObject[] | null = null;\n private __adminRoutesFactory: null | RoutesFactory = null;\n\n private __homePageComponent: HomePage | null = null;\n\n private __router: null | ReturnType<typeof createBrowserRouter> = null;\n\n private __routes: MyNonIndexRouteObject[] | null = null;\n\n private __routesFactory: null | RoutesFactory = null;\n\n private constructor() {\n }\n\n public static getInstance(): RouterService {\n RouterService.__instance = HmrUtil.getHmrSingleton('routerService', RouterService.__instance, () => new RouterService());\n return RouterService.__instance;\n }\n\n public initialize(kwArgs: {\n adminRoutes: RoutesInput;\n homePageComponent: HomePage;\n routes: RoutesInput;\n }): void {\n if (this.__routesFactory) {\n throw new Error('RouterService already initialized');\n }\n this.__homePageComponent = kwArgs.homePageComponent;\n this.__adminRoutesFactory = this.createRoutesFactory(kwArgs.adminRoutes);\n this.__routesFactory = this.createRoutesFactory(kwArgs.routes);\n }\n\n private createRoutesFactory(routes: RoutesInput): RoutesFactory {\n if (typeof routes === 'function') {\n return routes;\n }\n return () => routes;\n }\n}\n"],"mappings":";;;AAUA,IAAa,IAAb,MAAa,EAAc;CACzB,OAAe;CAEf,IAAW,cAAuC;EAChD,IAAI,CAAC,KAAK,sBACR,MAAU,MAAM,+BAA+B;EAGjD,OADA,KAAK,kBAAkB,KAAK,qBAAqB,GAC1C,KAAK;CACd;CACA,IAAW,oBAA8B;EACvC,IAAI,CAAC,KAAK,qBACR,MAAU,MAAM,+BAA+B;EAEjD,OAAO,KAAK;CACd;CACA,IAAW,SAAiD;EAI1D,OAHA,AACE,KAAK,aAAW,EAAoB,KAAK,MAAM,GAE1C,KAAK;CACd;CACA,IAAW,SAAkC;EAC3C,IAAI,CAAC,KAAK,iBACR,MAAU,MAAM,+BAA+B;EAGjD,OADA,KAAK,aAAa,KAAK,gBAAgB,GAChC,KAAK;CACd;CACA,gBAAwD;CACxD,uBAAqD;CAErD,sBAA+C;CAE/C,WAAkE;CAElE,WAAmD;CAEnD,kBAAgD;CAEhD,cAAsB,CACtB;CAEA,OAAc,cAA6B;EAEzC,OADA,EAAc,aAAa,EAAQ,gBAAgB,iBAAiB,EAAc,kBAAkB,IAAI,EAAc,CAAC,GAChH,EAAc;CACvB;CAEA,WAAkB,GAIT;EACP,IAAI,KAAK,iBACP,MAAU,MAAM,mCAAmC;EAIrD,AAFA,KAAK,sBAAsB,EAAO,mBAClC,KAAK,uBAAuB,KAAK,oBAAoB,EAAO,WAAW,GACvE,KAAK,kBAAkB,KAAK,oBAAoB,EAAO,MAAM;CAC/D;CAEA,oBAA4B,GAAoC;EAI9D,OAHI,OAAO,KAAW,aACb,UAEI;CACf;AACF"}
|
|
@@ -1,109 +1,45 @@
|
|
|
1
1
|
import { ConfigService as e } from "../../../classes/services/ConfigService/index.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { EmotionCacheService as
|
|
12
|
-
import { CssBaseline as
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
//#region
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
flushSync: x.flushSync,
|
|
23
|
-
...e
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
t();
|
|
27
|
-
//#endregion
|
|
28
|
-
//#region ../../node_modules/.pnpm/react-error-boundary@6.1.5_@types+react@19.3.0_react@19.3.0/node_modules/react-error-boundary/dist/react-error-boundary.js
|
|
29
|
-
var T = g(null), E = {
|
|
30
|
-
didCatch: !1,
|
|
31
|
-
error: null
|
|
32
|
-
}, D = class extends h {
|
|
33
|
-
constructor(e) {
|
|
34
|
-
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = E;
|
|
35
|
-
}
|
|
36
|
-
static getDerivedStateFromError(e) {
|
|
37
|
-
return {
|
|
38
|
-
didCatch: !0,
|
|
39
|
-
error: e
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
resetErrorBoundary(...e) {
|
|
43
|
-
let { didCatch: t } = this.state;
|
|
44
|
-
t && (this.props.onReset?.({
|
|
45
|
-
args: e,
|
|
46
|
-
reason: "imperative-api"
|
|
47
|
-
}), this.setState(E));
|
|
48
|
-
}
|
|
49
|
-
componentDidCatch(e, t) {
|
|
50
|
-
this.props.onError?.(e, t);
|
|
51
|
-
}
|
|
52
|
-
componentDidUpdate(e, t) {
|
|
53
|
-
let { didCatch: n } = this.state, { resetKeys: r } = this.props;
|
|
54
|
-
n && t.didCatch && O(e.resetKeys, r) && (this.props.onReset?.({
|
|
55
|
-
next: r,
|
|
56
|
-
prev: e.resetKeys,
|
|
57
|
-
reason: "keys"
|
|
58
|
-
}), this.setState(E));
|
|
59
|
-
}
|
|
60
|
-
render() {
|
|
61
|
-
let { children: e, fallbackRender: t, FallbackComponent: n, fallback: r } = this.props, { didCatch: i, error: a } = this.state, o = e;
|
|
62
|
-
if (i) {
|
|
63
|
-
let e = {
|
|
64
|
-
error: a,
|
|
65
|
-
resetErrorBoundary: this.resetErrorBoundary
|
|
66
|
-
};
|
|
67
|
-
if (typeof t == "function") o = t(e);
|
|
68
|
-
else if (n) o = _(n, e);
|
|
69
|
-
else if (r !== void 0) o = r;
|
|
70
|
-
else throw a;
|
|
71
|
-
}
|
|
72
|
-
return _(T.Provider, { value: {
|
|
73
|
-
didCatch: i,
|
|
74
|
-
error: a,
|
|
75
|
-
resetErrorBoundary: this.resetErrorBoundary
|
|
76
|
-
} }, o);
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
function O(e = [], t = []) {
|
|
80
|
-
return e.length !== t.length || e.some((e, n) => !Object.is(e, t[n]));
|
|
81
|
-
}
|
|
82
|
-
//#endregion
|
|
83
|
-
//#region src/components/app/App/App.tsx
|
|
84
|
-
var k = () => {
|
|
85
|
-
let { config: t } = e.getInstance(), n = v(() => {
|
|
2
|
+
import { RouterService as t } from "../../../classes/services/RouterService/index.js";
|
|
3
|
+
import { AuthenticationService as n } from "../../../classes/services/AuthenticationService/index.js";
|
|
4
|
+
import { ApiService as r } from "../../../classes/services/ApiService/index.js";
|
|
5
|
+
import { LogService as i } from "../../../classes/services/LogService/index.js";
|
|
6
|
+
import { t as a } from "../../../_chunks/QueryClientProvider.js";
|
|
7
|
+
import { t as o } from "../../../_chunks/QueryClientService.js";
|
|
8
|
+
import { ErrorPage as s } from "../../../pages/ErrorPage/index.js";
|
|
9
|
+
import { BackendVersionService as c } from "../../../classes/services/BackendVersionService/index.js";
|
|
10
|
+
import { ApplicationBootstrapWithoutAuthorization as l } from "../ApplicationBootstrapWithoutAuthorization/index.js";
|
|
11
|
+
import { EmotionCacheService as u } from "../../../classes/services/EmotionCacheService/index.js";
|
|
12
|
+
import { CssBaseline as d, ThemeProvider as f } from "@mui/material";
|
|
13
|
+
import { useMemo as p } from "react";
|
|
14
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
15
|
+
import { RouterProvider as g } from "react-router-dom";
|
|
16
|
+
import { UiCoreComponentsContextProvider as _ } from "@gen-epix/ui-core-components/context/uiCoreComponentsConfigContext";
|
|
17
|
+
import { CacheProvider as v } from "@emotion/react";
|
|
18
|
+
import { ErrorBoundary as y } from "react-error-boundary";
|
|
19
|
+
//#region src/components/app/AppRouterProvider/AppRouterProvider.tsx
|
|
20
|
+
var b = () => /* @__PURE__ */ m(g, { router: t.getInstance().router }), x = () => {
|
|
21
|
+
let { config: t } = e.getInstance(), g = p(() => {
|
|
86
22
|
let { DEFAULT_CIRCULAR_PROGRESS_SIZE: e, DEFAULT_TAKING_LONGER_TIMEOUT_MS: n } = t.spinner;
|
|
87
23
|
return { spinner: {
|
|
88
24
|
defaultCircularProgressSize: e,
|
|
89
25
|
defaultTakingLongerTimeoutMs: n
|
|
90
26
|
} };
|
|
91
|
-
}, [t.spinner]),
|
|
92
|
-
|
|
93
|
-
let
|
|
94
|
-
|
|
95
|
-
let T =
|
|
96
|
-
return /* @__PURE__ */
|
|
97
|
-
config:
|
|
98
|
-
children: /* @__PURE__ */
|
|
27
|
+
}, [t.spinner]), x = n.getInstance(), S = i.getInstance(), C = t.getTouchIconUrl();
|
|
28
|
+
C && document.querySelector("link[rel=\"icon\"]")?.setAttribute("href", C);
|
|
29
|
+
let w = r.getInstance();
|
|
30
|
+
w.api.baseUrl = t.getAPIBaseUrl(), w.api.defaultRequestTimeout = t.defaultRequestTimeout, w.api.onRequest = [x.onRequest.bind(x), S.onRequest.bind(S)], w.api.onResponseFulfilled = [S.onResponseFulfilled.bind(S), c.getInstance().onResponseFulfilled.bind(c.getInstance())], w.api.onResponseRejected = [S.onResponseRejected.bind(S), x.onResponseRejected.bind(x)];
|
|
31
|
+
let T = o.getInstance(), E = u.getInstance();
|
|
32
|
+
return /* @__PURE__ */ m(_, {
|
|
33
|
+
config: g,
|
|
34
|
+
children: /* @__PURE__ */ m(a, {
|
|
99
35
|
client: T.queryClient,
|
|
100
|
-
children: /* @__PURE__ */
|
|
36
|
+
children: /* @__PURE__ */ m(v, {
|
|
101
37
|
value: E.emotionCache,
|
|
102
|
-
children: /* @__PURE__ */
|
|
38
|
+
children: /* @__PURE__ */ h(f, {
|
|
103
39
|
theme: e.getInstance().config.theme,
|
|
104
|
-
children: [/* @__PURE__ */
|
|
105
|
-
FallbackComponent:
|
|
106
|
-
children: /* @__PURE__ */
|
|
40
|
+
children: [/* @__PURE__ */ m(d, {}), /* @__PURE__ */ m(y, {
|
|
41
|
+
FallbackComponent: s,
|
|
42
|
+
children: /* @__PURE__ */ m(l, { children: /* @__PURE__ */ m(b, {}) })
|
|
107
43
|
})]
|
|
108
44
|
})
|
|
109
45
|
})
|
|
@@ -111,6 +47,6 @@ var k = () => {
|
|
|
111
47
|
});
|
|
112
48
|
};
|
|
113
49
|
//#endregion
|
|
114
|
-
export {
|
|
50
|
+
export { x as App };
|
|
115
51
|
|
|
116
52
|
//# sourceMappingURL=index.js.map
|