fastapi-rtk 0.1.32 → 0.1.33
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/.external/cjs/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/query.cjs +1 -0
- package/dist/.external/cjs/{@tanstack_react-query@5.80.7_react@18.3.1 → @tanstack_react-query@5.80.10_react@18.3.1}/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs +1 -1
- package/dist/.external/cjs/{@tanstack_react-query@5.80.7_react@18.3.1 → @tanstack_react-query@5.80.10_react@18.3.1}/@tanstack/react-query/build/modern/useBaseQuery.cjs +2 -2
- package/dist/.external/cjs/{@tanstack_react-query@5.80.7_react@18.3.1 → @tanstack_react-query@5.80.10_react@18.3.1}/@tanstack/react-query/build/modern/useQuery.cjs +1 -1
- package/dist/.external/esm/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/query.mjs +1 -0
- package/dist/.external/esm/{@tanstack_react-query@5.80.7_react@18.3.1 → @tanstack_react-query@5.80.10_react@18.3.1}/@tanstack/react-query/build/modern/errorBoundaryUtils.mjs +1 -1
- package/dist/.external/esm/{@tanstack_react-query@5.80.7_react@18.3.1 → @tanstack_react-query@5.80.10_react@18.3.1}/@tanstack/react-query/build/modern/useBaseQuery.mjs +2 -2
- package/dist/.external/esm/{@tanstack_react-query@5.80.7_react@18.3.1 → @tanstack_react-query@5.80.10_react@18.3.1}/@tanstack/react-query/build/modern/useQuery.mjs +1 -1
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/Body.cjs +17 -3
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/MultiLineHighlight.cjs +3 -3
- package/dist/core/cjs/Wrappers/ApiProvider/hooks/useProvideApi.cjs +2 -2
- package/dist/core/cjs/Wrappers/ApiProvider/utils/createQueryParams.cjs +10 -7
- package/dist/core/cjs/Wrappers/Provider/Provider.cjs +2 -2
- package/dist/core/cjs/Wrappers/Provider/hooks/useProvideAuth.cjs +2 -2
- package/dist/core/cjs/Wrappers/Provider/hooks/useProvideInfo.cjs +1 -1
- package/dist/core/cjs/fab-react-toolkit-patch/api/hooks/useProvideApi.cjs +2 -2
- package/dist/core/cjs/fab-react-toolkit-patch/auth/hooks/useProvideAuth.cjs +2 -2
- package/dist/core/cjs/fab-react-toolkit-patch/auth/hooks/useProvideInfo.cjs +1 -1
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/Body.mjs +17 -3
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/MultiLineHighlight.mjs +3 -3
- package/dist/core/esm/Wrappers/ApiProvider/hooks/useProvideApi.mjs +2 -2
- package/dist/core/esm/Wrappers/ApiProvider/utils/createQueryParams.mjs +10 -7
- package/dist/core/esm/Wrappers/Provider/Provider.mjs +2 -2
- package/dist/core/esm/Wrappers/Provider/hooks/useProvideAuth.mjs +2 -2
- package/dist/core/esm/Wrappers/Provider/hooks/useProvideInfo.mjs +1 -1
- package/dist/core/esm/fab-react-toolkit-patch/api/hooks/useProvideApi.mjs +2 -2
- package/dist/core/esm/fab-react-toolkit-patch/auth/hooks/useProvideAuth.mjs +2 -2
- package/dist/core/esm/fab-react-toolkit-patch/auth/hooks/useProvideInfo.mjs +1 -1
- package/dist/core/lib/Tables/NextGenDataGrid/NextGenDataGrid.d.ts +8 -0
- package/dist/core/lib/Tables/NextGenDataGrid/hooks/useColumns/MultiLineHighlight.d.ts +16 -4
- package/dist/core/lib/Wrappers/ApiProvider/hooks/useProvideApi.d.ts +5 -0
- package/dist/core/lib/Wrappers/ApiProvider/utils/createQueryParams.d.ts +10 -3
- package/package.json +1 -1
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/focusManager.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/mutation.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/mutationCache.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/notifyManager.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/onlineManager.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/queryCache.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/queryClient.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/queryObserver.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/removable.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/retryer.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/subscribable.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/thenable.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/utils.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_react-query@5.80.7_react@18.3.1 → @tanstack_react-query@5.80.10_react@18.3.1}/@tanstack/react-query/build/modern/IsRestoringProvider.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_react-query@5.80.7_react@18.3.1 → @tanstack_react-query@5.80.10_react@18.3.1}/@tanstack/react-query/build/modern/QueryClientProvider.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_react-query@5.80.7_react@18.3.1 → @tanstack_react-query@5.80.10_react@18.3.1}/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_react-query@5.80.7_react@18.3.1 → @tanstack_react-query@5.80.10_react@18.3.1}/@tanstack/react-query/build/modern/suspense.cjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/focusManager.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/infiniteQueryBehavior.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/mutation.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/mutationCache.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/notifyManager.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/onlineManager.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/queryCache.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/queryClient.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/queryObserver.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/removable.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/retryer.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/subscribable.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/thenable.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.7 → @tanstack_query-core@5.80.10}/@tanstack/query-core/build/modern/utils.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_react-query@5.80.7_react@18.3.1 → @tanstack_react-query@5.80.10_react@18.3.1}/@tanstack/react-query/build/modern/IsRestoringProvider.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_react-query@5.80.7_react@18.3.1 → @tanstack_react-query@5.80.10_react@18.3.1}/@tanstack/react-query/build/modern/QueryClientProvider.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_react-query@5.80.7_react@18.3.1 → @tanstack_react-query@5.80.10_react@18.3.1}/@tanstack/react-query/build/modern/QueryErrorResetBoundary.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_react-query@5.80.7_react@18.3.1 → @tanstack_react-query@5.80.10_react@18.3.1}/@tanstack/react-query/build/modern/suspense.mjs +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const React = require("react");
|
|
4
|
-
const utils = require("../../../../../@tanstack_query-core@5.80.
|
|
4
|
+
const utils = require("../../../../../@tanstack_query-core@5.80.10/@tanstack/query-core/build/modern/utils.cjs");
|
|
5
5
|
function _interopNamespaceDefault(e) {
|
|
6
6
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
7
7
|
if (e) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const React = require("react");
|
|
4
|
-
const notifyManager = require("../../../../../@tanstack_query-core@5.80.
|
|
5
|
-
const utils = require("../../../../../@tanstack_query-core@5.80.
|
|
4
|
+
const notifyManager = require("../../../../../@tanstack_query-core@5.80.10/@tanstack/query-core/build/modern/notifyManager.cjs");
|
|
5
|
+
const utils = require("../../../../../@tanstack_query-core@5.80.10/@tanstack/query-core/build/modern/utils.cjs");
|
|
6
6
|
const QueryClientProvider = require("./QueryClientProvider.cjs");
|
|
7
7
|
const QueryErrorResetBoundary = require("./QueryErrorResetBoundary.cjs");
|
|
8
8
|
const errorBoundaryUtils = require("./errorBoundaryUtils.cjs");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const queryObserver = require("../../../../../@tanstack_query-core@5.80.
|
|
3
|
+
const queryObserver = require("../../../../../@tanstack_query-core@5.80.10/@tanstack/query-core/build/modern/queryObserver.cjs");
|
|
4
4
|
const useBaseQuery = require("./useBaseQuery.cjs");
|
|
5
5
|
function useQuery(options, queryClient) {
|
|
6
6
|
return useBaseQuery.useBaseQuery(options, queryObserver.QueryObserver);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { shouldThrowError } from "../../../../../@tanstack_query-core@5.80.
|
|
2
|
+
import { shouldThrowError } from "../../../../../@tanstack_query-core@5.80.10/@tanstack/query-core/build/modern/utils.mjs";
|
|
3
3
|
var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => {
|
|
4
4
|
if (options.suspense || options.throwOnError || options.experimental_prefetchInRender) {
|
|
5
5
|
if (!errorResetBoundary.isReset()) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { notifyManager } from "../../../../../@tanstack_query-core@5.80.
|
|
3
|
-
import { noop, isServer } from "../../../../../@tanstack_query-core@5.80.
|
|
2
|
+
import { notifyManager } from "../../../../../@tanstack_query-core@5.80.10/@tanstack/query-core/build/modern/notifyManager.mjs";
|
|
3
|
+
import { noop, isServer } from "../../../../../@tanstack_query-core@5.80.10/@tanstack/query-core/build/modern/utils.mjs";
|
|
4
4
|
import { useQueryClient } from "./QueryClientProvider.mjs";
|
|
5
5
|
import { useQueryErrorResetBoundary } from "./QueryErrorResetBoundary.mjs";
|
|
6
6
|
import { ensurePreventErrorBoundaryRetry, useClearResetErrorBoundary, getHasError } from "./errorBoundaryUtils.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { QueryObserver } from "../../../../../@tanstack_query-core@5.80.
|
|
1
|
+
import { QueryObserver } from "../../../../../@tanstack_query-core@5.80.10/@tanstack/query-core/build/modern/queryObserver.mjs";
|
|
2
2
|
import { useBaseQuery } from "./useBaseQuery.mjs";
|
|
3
3
|
function useQuery(options, queryClient) {
|
|
4
4
|
return useBaseQuery(options, QueryObserver);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const utils$1 = require("fastapi-rtk/utils");
|
|
4
5
|
const React = require("react");
|
|
5
6
|
const useApi = require("../../../../hooks/api/useApi.cjs");
|
|
6
7
|
const useAuth = require("../../../../hooks/auth/useAuth.cjs");
|
|
@@ -12,7 +13,7 @@ const Body = ({ body, col, textFilterSeparator, mrtProps }) => {
|
|
|
12
13
|
const api = useApi.useApi();
|
|
13
14
|
const auth = useAuth.useAuth();
|
|
14
15
|
const { specialKey } = useApi.useApi();
|
|
15
|
-
const { component, separator, truncate } = utils.getProps(body, specialKey.all, col);
|
|
16
|
+
const { component, separator, truncate, tooltipProps, highlightProps } = utils.getProps(body, specialKey.all, col);
|
|
16
17
|
const highlights = React.useMemo(() => {
|
|
17
18
|
const globalFilter = table.getState().globalFilter;
|
|
18
19
|
const columnTextFilter = column.getFilterValue();
|
|
@@ -28,7 +29,7 @@ const Body = ({ body, col, textFilterSeparator, mrtProps }) => {
|
|
|
28
29
|
const cellObj = React.useMemo(() => {
|
|
29
30
|
const result = { value: cell.getValue(), truncate: {}, highlight: [] };
|
|
30
31
|
if (typeof result.value === "number") {
|
|
31
|
-
result.value = result.value
|
|
32
|
+
result.value = String(result.value);
|
|
32
33
|
} else if (result.value === null || result.value === void 0) {
|
|
33
34
|
result.value = "";
|
|
34
35
|
}
|
|
@@ -55,7 +56,20 @@ const Body = ({ body, col, textFilterSeparator, mrtProps }) => {
|
|
|
55
56
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
56
57
|
FallbackWrapper.FallbackWrapper,
|
|
57
58
|
{
|
|
58
|
-
fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
59
|
+
fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
60
|
+
MultiLineHighlight.MultiLineHighlight,
|
|
61
|
+
{
|
|
62
|
+
highlight,
|
|
63
|
+
truncate: cellObj.truncate,
|
|
64
|
+
tooltipProps: utils$1.parseFromValuesOrFunc(tooltipProps, { value: cellObj.value, data: cell.row.original, cellObj }),
|
|
65
|
+
highlightProps: utils$1.parseFromValuesOrFunc(highlightProps, {
|
|
66
|
+
value: cellObj.value,
|
|
67
|
+
data: cell.row.original,
|
|
68
|
+
cellObj
|
|
69
|
+
}),
|
|
70
|
+
children: cellObj.value
|
|
71
|
+
}
|
|
72
|
+
),
|
|
59
73
|
functionProps: {
|
|
60
74
|
api,
|
|
61
75
|
auth,
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const core = require("@mantine/core");
|
|
5
|
-
function MultiLineHighlight({ highlight, truncate, children }) {
|
|
5
|
+
function MultiLineHighlight({ highlight, truncate, tooltipProps, highlightProps, children }) {
|
|
6
6
|
return Array.isArray(children) ? children.map(
|
|
7
7
|
(c, index) => {
|
|
8
8
|
var _a;
|
|
9
|
-
return ((_a = truncate == null ? void 0 : truncate[index]) == null ? void 0 : _a.truncated) ? /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: truncate[index].original, children: /* @__PURE__ */ jsxRuntime.jsx(core.Highlight, { highlight, children: truncate[index].truncated }, index) }, index) : /* @__PURE__ */ jsxRuntime.jsx(core.Highlight, { highlight, children: c }, index);
|
|
9
|
+
return ((_a = truncate == null ? void 0 : truncate[index]) == null ? void 0 : _a.truncated) ? /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: truncate[index].original, ...tooltipProps, children: /* @__PURE__ */ jsxRuntime.jsx(core.Highlight, { highlight, ...highlightProps, children: truncate[index].truncated }, index) }, index) : /* @__PURE__ */ jsxRuntime.jsx(core.Highlight, { highlight, ...highlightProps, children: c }, index);
|
|
10
10
|
}
|
|
11
|
-
) : (truncate == null ? void 0 : truncate.truncated) ? /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: truncate.original, children: /* @__PURE__ */ jsxRuntime.jsx(core.Highlight, { highlight, children: truncate.truncated }) }) : /* @__PURE__ */ jsxRuntime.jsx(core.Highlight, { highlight, children });
|
|
11
|
+
) : (truncate == null ? void 0 : truncate.truncated) ? /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: truncate.original, ...tooltipProps, children: /* @__PURE__ */ jsxRuntime.jsx(core.Highlight, { highlight, ...highlightProps, children: truncate.truncated }) }) : /* @__PURE__ */ jsxRuntime.jsx(core.Highlight, { highlight, ...highlightProps, children });
|
|
12
12
|
}
|
|
13
13
|
exports.MultiLineHighlight = MultiLineHighlight;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const React = require("react");
|
|
4
4
|
const utils = require("fastapi-rtk/utils");
|
|
5
5
|
const hooks = require("@mantine/hooks");
|
|
6
|
-
const useQuery = require("../../../../../.external/cjs/@tanstack_react-query@5.80.
|
|
6
|
+
const useQuery = require("../../../../../.external/cjs/@tanstack_react-query@5.80.10_react@18.3.1/@tanstack/react-query/build/modern/useQuery.cjs");
|
|
7
7
|
const createItem = require("../utils/api/createItem.cjs");
|
|
8
8
|
const deleteItem = require("../utils/api/deleteItem.cjs");
|
|
9
9
|
const downloadItems = require("../utils/api/downloadItems.cjs");
|
|
@@ -15,7 +15,7 @@ const uploadItems = require("../utils/api/uploadItems.cjs");
|
|
|
15
15
|
const convertId = require("../utils/convertId.cjs");
|
|
16
16
|
const convertInfo = require("../utils/convertInfo.cjs");
|
|
17
17
|
const createQueryParams = require("../utils/createQueryParams.cjs");
|
|
18
|
-
const utils$1 = require("../../../../../.external/cjs/@tanstack_query-core@5.80.
|
|
18
|
+
const utils$1 = require("../../../../../.external/cjs/@tanstack_query-core@5.80.10/@tanstack/query-core/build/modern/utils.cjs");
|
|
19
19
|
function useProvideApi({
|
|
20
20
|
path,
|
|
21
21
|
initialQueryParams,
|
|
@@ -7,12 +7,15 @@ const initialQueryParams = {
|
|
|
7
7
|
page_size: 25
|
|
8
8
|
};
|
|
9
9
|
function createQueryParams(currentQueryParams, partialQueryParams = {}) {
|
|
10
|
-
return Object.entries(partialQueryParams).reduce(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
return Object.entries(partialQueryParams).reduce(
|
|
11
|
+
(acc, [key, value]) => {
|
|
12
|
+
if (value === null || value === void 0) {
|
|
13
|
+
delete acc[key];
|
|
14
|
+
return acc;
|
|
15
|
+
}
|
|
16
|
+
return { ...acc, [key]: value };
|
|
17
|
+
},
|
|
18
|
+
{ ...currentQueryParams ?? initialQueryParams }
|
|
19
|
+
);
|
|
17
20
|
}
|
|
18
21
|
exports.createQueryParams = createQueryParams;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const zustand = require("fastapi-rtk/zustand");
|
|
5
|
-
const queryClient = require("../../../../.external/cjs/@tanstack_query-core@5.80.
|
|
6
|
-
const QueryClientProvider = require("../../../../.external/cjs/@tanstack_react-query@5.80.
|
|
5
|
+
const queryClient = require("../../../../.external/cjs/@tanstack_query-core@5.80.10/@tanstack/query-core/build/modern/queryClient.cjs");
|
|
6
|
+
const QueryClientProvider = require("../../../../.external/cjs/@tanstack_react-query@5.80.10_react@18.3.1/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
|
|
7
7
|
const React = require("react");
|
|
8
8
|
const useProvideAuth = require("../../fab-react-toolkit-patch/auth/hooks/useProvideAuth.cjs");
|
|
9
9
|
const useProvideInfo = require("../../fab-react-toolkit-patch/auth/hooks/useProvideInfo.cjs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const useQuery = require("../../../../../.external/cjs/@tanstack_react-query@5.80.
|
|
4
|
-
const QueryClientProvider = require("../../../../../.external/cjs/@tanstack_react-query@5.80.
|
|
3
|
+
const useQuery = require("../../../../../.external/cjs/@tanstack_react-query@5.80.10_react@18.3.1/@tanstack/react-query/build/modern/useQuery.cjs");
|
|
4
|
+
const QueryClientProvider = require("../../../../../.external/cjs/@tanstack_react-query@5.80.10_react@18.3.1/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
|
|
5
5
|
const React = require("react");
|
|
6
6
|
const authFetch = require("../utils/authFetch.cjs");
|
|
7
7
|
const userCRUD = require("../utils/userCRUD.cjs");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const useQuery = require("../../../../../.external/cjs/@tanstack_react-query@5.80.
|
|
3
|
+
const useQuery = require("../../../../../.external/cjs/@tanstack_react-query@5.80.10_react@18.3.1/@tanstack/react-query/build/modern/useQuery.cjs");
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const authFetch = require("../utils/authFetch.cjs");
|
|
6
6
|
function useProvideInfo(baseUrl, auth) {
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const React = require("react");
|
|
4
4
|
const utils = require("fastapi-rtk/utils");
|
|
5
5
|
const hooks = require("@mantine/hooks");
|
|
6
|
-
const utils$1 = require("../../../../../.external/cjs/@tanstack_query-core@5.80.
|
|
7
|
-
const useQuery = require("../../../../../.external/cjs/@tanstack_react-query@5.80.
|
|
6
|
+
const utils$1 = require("../../../../../.external/cjs/@tanstack_query-core@5.80.10/@tanstack/query-core/build/modern/utils.cjs");
|
|
7
|
+
const useQuery = require("../../../../../.external/cjs/@tanstack_react-query@5.80.10_react@18.3.1/@tanstack/react-query/build/modern/useQuery.cjs");
|
|
8
8
|
const createItem = require("../utils/api/createItem.cjs");
|
|
9
9
|
const deleteItem = require("../utils/api/deleteItem.cjs");
|
|
10
10
|
const downloadItems = require("../utils/api/downloadItems.cjs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const useQuery = require("../../../../../.external/cjs/@tanstack_react-query@5.80.
|
|
4
|
-
const QueryClientProvider = require("../../../../../.external/cjs/@tanstack_react-query@5.80.
|
|
3
|
+
const useQuery = require("../../../../../.external/cjs/@tanstack_react-query@5.80.10_react@18.3.1/@tanstack/react-query/build/modern/useQuery.cjs");
|
|
4
|
+
const QueryClientProvider = require("../../../../../.external/cjs/@tanstack_react-query@5.80.10_react@18.3.1/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
|
|
5
5
|
const React = require("react");
|
|
6
6
|
const authFetch = require("../utils/authFetch.cjs");
|
|
7
7
|
const userCRUD = require("../utils/userCRUD.cjs");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const useQuery = require("../../../../../.external/cjs/@tanstack_react-query@5.80.
|
|
3
|
+
const useQuery = require("../../../../../.external/cjs/@tanstack_react-query@5.80.10_react@18.3.1/@tanstack/react-query/build/modern/useQuery.cjs");
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const authFetch = require("../utils/authFetch.cjs");
|
|
6
6
|
function useFabProvideInfo(baseUrl, auth) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { parseFromValuesOrFunc } from "fastapi-rtk/utils";
|
|
2
3
|
import { useMemo } from "react";
|
|
3
4
|
import { useApi } from "../../../../hooks/api/useApi.mjs";
|
|
4
5
|
import { useAuth } from "../../../../hooks/auth/useAuth.mjs";
|
|
@@ -10,7 +11,7 @@ const Body = ({ body, col, textFilterSeparator, mrtProps }) => {
|
|
|
10
11
|
const api = useApi();
|
|
11
12
|
const auth = useAuth();
|
|
12
13
|
const { specialKey } = useApi();
|
|
13
|
-
const { component, separator, truncate } = getProps(body, specialKey.all, col);
|
|
14
|
+
const { component, separator, truncate, tooltipProps, highlightProps } = getProps(body, specialKey.all, col);
|
|
14
15
|
const highlights = useMemo(() => {
|
|
15
16
|
const globalFilter = table.getState().globalFilter;
|
|
16
17
|
const columnTextFilter = column.getFilterValue();
|
|
@@ -26,7 +27,7 @@ const Body = ({ body, col, textFilterSeparator, mrtProps }) => {
|
|
|
26
27
|
const cellObj = useMemo(() => {
|
|
27
28
|
const result = { value: cell.getValue(), truncate: {}, highlight: [] };
|
|
28
29
|
if (typeof result.value === "number") {
|
|
29
|
-
result.value = result.value
|
|
30
|
+
result.value = String(result.value);
|
|
30
31
|
} else if (result.value === null || result.value === void 0) {
|
|
31
32
|
result.value = "";
|
|
32
33
|
}
|
|
@@ -53,7 +54,20 @@ const Body = ({ body, col, textFilterSeparator, mrtProps }) => {
|
|
|
53
54
|
return /* @__PURE__ */ jsx(
|
|
54
55
|
FallbackWrapper,
|
|
55
56
|
{
|
|
56
|
-
fallback: /* @__PURE__ */ jsx(
|
|
57
|
+
fallback: /* @__PURE__ */ jsx(
|
|
58
|
+
MultiLineHighlight,
|
|
59
|
+
{
|
|
60
|
+
highlight,
|
|
61
|
+
truncate: cellObj.truncate,
|
|
62
|
+
tooltipProps: parseFromValuesOrFunc(tooltipProps, { value: cellObj.value, data: cell.row.original, cellObj }),
|
|
63
|
+
highlightProps: parseFromValuesOrFunc(highlightProps, {
|
|
64
|
+
value: cellObj.value,
|
|
65
|
+
data: cell.row.original,
|
|
66
|
+
cellObj
|
|
67
|
+
}),
|
|
68
|
+
children: cellObj.value
|
|
69
|
+
}
|
|
70
|
+
),
|
|
57
71
|
functionProps: {
|
|
58
72
|
api,
|
|
59
73
|
auth,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Tooltip, Highlight } from "@mantine/core";
|
|
3
|
-
function MultiLineHighlight({ highlight, truncate, children }) {
|
|
3
|
+
function MultiLineHighlight({ highlight, truncate, tooltipProps, highlightProps, children }) {
|
|
4
4
|
return Array.isArray(children) ? children.map(
|
|
5
5
|
(c, index) => {
|
|
6
6
|
var _a;
|
|
7
|
-
return ((_a = truncate == null ? void 0 : truncate[index]) == null ? void 0 : _a.truncated) ? /* @__PURE__ */ jsx(Tooltip, { label: truncate[index].original, children: /* @__PURE__ */ jsx(Highlight, { highlight, children: truncate[index].truncated }, index) }, index) : /* @__PURE__ */ jsx(Highlight, { highlight, children: c }, index);
|
|
7
|
+
return ((_a = truncate == null ? void 0 : truncate[index]) == null ? void 0 : _a.truncated) ? /* @__PURE__ */ jsx(Tooltip, { label: truncate[index].original, ...tooltipProps, children: /* @__PURE__ */ jsx(Highlight, { highlight, ...highlightProps, children: truncate[index].truncated }, index) }, index) : /* @__PURE__ */ jsx(Highlight, { highlight, ...highlightProps, children: c }, index);
|
|
8
8
|
}
|
|
9
|
-
) : (truncate == null ? void 0 : truncate.truncated) ? /* @__PURE__ */ jsx(Tooltip, { label: truncate.original, children: /* @__PURE__ */ jsx(Highlight, { highlight, children: truncate.truncated }) }) : /* @__PURE__ */ jsx(Highlight, { highlight, children });
|
|
9
|
+
) : (truncate == null ? void 0 : truncate.truncated) ? /* @__PURE__ */ jsx(Tooltip, { label: truncate.original, ...tooltipProps, children: /* @__PURE__ */ jsx(Highlight, { highlight, ...highlightProps, children: truncate.truncated }) }) : /* @__PURE__ */ jsx(Highlight, { highlight, ...highlightProps, children });
|
|
10
10
|
}
|
|
11
11
|
export {
|
|
12
12
|
MultiLineHighlight
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useState, useRef, useEffect, useMemo, useCallback } from "react";
|
|
2
2
|
import { getItemId, urlJoin } from "fastapi-rtk/utils";
|
|
3
3
|
import { useDidUpdate, useSetState } from "@mantine/hooks";
|
|
4
|
-
import { useQuery } from "../../../../../.external/esm/@tanstack_react-query@5.80.
|
|
4
|
+
import { useQuery } from "../../../../../.external/esm/@tanstack_react-query@5.80.10_react@18.3.1/@tanstack/react-query/build/modern/useQuery.mjs";
|
|
5
5
|
import { createItem } from "../utils/api/createItem.mjs";
|
|
6
6
|
import { deleteItem } from "../utils/api/deleteItem.mjs";
|
|
7
7
|
import { downloadItems } from "../utils/api/downloadItems.mjs";
|
|
@@ -13,7 +13,7 @@ import { uploadItems } from "../utils/api/uploadItems.mjs";
|
|
|
13
13
|
import { convertId } from "../utils/convertId.mjs";
|
|
14
14
|
import { convertInfo } from "../utils/convertInfo.mjs";
|
|
15
15
|
import { createQueryParams } from "../utils/createQueryParams.mjs";
|
|
16
|
-
import { keepPreviousData } from "../../../../../.external/esm/@tanstack_query-core@5.80.
|
|
16
|
+
import { keepPreviousData } from "../../../../../.external/esm/@tanstack_query-core@5.80.10/@tanstack/query-core/build/modern/utils.mjs";
|
|
17
17
|
function useProvideApi({
|
|
18
18
|
path,
|
|
19
19
|
initialQueryParams,
|
|
@@ -5,13 +5,16 @@ const initialQueryParams = {
|
|
|
5
5
|
page_size: 25
|
|
6
6
|
};
|
|
7
7
|
function createQueryParams(currentQueryParams, partialQueryParams = {}) {
|
|
8
|
-
return Object.entries(partialQueryParams).reduce(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
return Object.entries(partialQueryParams).reduce(
|
|
9
|
+
(acc, [key, value]) => {
|
|
10
|
+
if (value === null || value === void 0) {
|
|
11
|
+
delete acc[key];
|
|
12
|
+
return acc;
|
|
13
|
+
}
|
|
14
|
+
return { ...acc, [key]: value };
|
|
15
|
+
},
|
|
16
|
+
{ ...currentQueryParams ?? initialQueryParams }
|
|
17
|
+
);
|
|
15
18
|
}
|
|
16
19
|
export {
|
|
17
20
|
createQueryParams
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useProxy } from "fastapi-rtk/zustand";
|
|
3
|
-
import { QueryClient } from "../../../../.external/esm/@tanstack_query-core@5.80.
|
|
4
|
-
import { QueryClientProvider } from "../../../../.external/esm/@tanstack_react-query@5.80.
|
|
3
|
+
import { QueryClient } from "../../../../.external/esm/@tanstack_query-core@5.80.10/@tanstack/query-core/build/modern/queryClient.mjs";
|
|
4
|
+
import { QueryClientProvider } from "../../../../.external/esm/@tanstack_react-query@5.80.10_react@18.3.1/@tanstack/react-query/build/modern/QueryClientProvider.mjs";
|
|
5
5
|
import { useState } from "react";
|
|
6
6
|
import { useFabProvideAuth } from "../../fab-react-toolkit-patch/auth/hooks/useProvideAuth.mjs";
|
|
7
7
|
import { useFabProvideInfo } from "../../fab-react-toolkit-patch/auth/hooks/useProvideInfo.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useQuery } from "../../../../../.external/esm/@tanstack_react-query@5.80.
|
|
2
|
-
import { useQueryClient } from "../../../../../.external/esm/@tanstack_react-query@5.80.
|
|
1
|
+
import { useQuery } from "../../../../../.external/esm/@tanstack_react-query@5.80.10_react@18.3.1/@tanstack/react-query/build/modern/useQuery.mjs";
|
|
2
|
+
import { useQueryClient } from "../../../../../.external/esm/@tanstack_react-query@5.80.10_react@18.3.1/@tanstack/react-query/build/modern/QueryClientProvider.mjs";
|
|
3
3
|
import { useState, useCallback } from "react";
|
|
4
4
|
import { authSignin, authSignout, authResetPassword, authOAuthSignin } from "../utils/authFetch.mjs";
|
|
5
5
|
import { getUser, updateUser } from "../utils/userCRUD.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useQuery } from "../../../../../.external/esm/@tanstack_react-query@5.80.
|
|
1
|
+
import { useQuery } from "../../../../../.external/esm/@tanstack_react-query@5.80.10_react@18.3.1/@tanstack/react-query/build/modern/useQuery.mjs";
|
|
2
2
|
import { useEffect } from "react";
|
|
3
3
|
import { authInfo } from "../utils/authFetch.mjs";
|
|
4
4
|
function useProvideInfo(baseUrl, auth) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useState, useRef, useEffect, useMemo, useCallback } from "react";
|
|
2
2
|
import { getItemId, urlJoin } from "fastapi-rtk/utils";
|
|
3
3
|
import { useDidUpdate, useSetState } from "@mantine/hooks";
|
|
4
|
-
import { keepPreviousData } from "../../../../../.external/esm/@tanstack_query-core@5.80.
|
|
5
|
-
import { useQuery } from "../../../../../.external/esm/@tanstack_react-query@5.80.
|
|
4
|
+
import { keepPreviousData } from "../../../../../.external/esm/@tanstack_query-core@5.80.10/@tanstack/query-core/build/modern/utils.mjs";
|
|
5
|
+
import { useQuery } from "../../../../../.external/esm/@tanstack_react-query@5.80.10_react@18.3.1/@tanstack/react-query/build/modern/useQuery.mjs";
|
|
6
6
|
import { createItem } from "../utils/api/createItem.mjs";
|
|
7
7
|
import { deleteItem } from "../utils/api/deleteItem.mjs";
|
|
8
8
|
import { downloadItems } from "../utils/api/downloadItems.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useQuery } from "../../../../../.external/esm/@tanstack_react-query@5.80.
|
|
2
|
-
import { useQueryClient } from "../../../../../.external/esm/@tanstack_react-query@5.80.
|
|
1
|
+
import { useQuery } from "../../../../../.external/esm/@tanstack_react-query@5.80.10_react@18.3.1/@tanstack/react-query/build/modern/useQuery.mjs";
|
|
2
|
+
import { useQueryClient } from "../../../../../.external/esm/@tanstack_react-query@5.80.10_react@18.3.1/@tanstack/react-query/build/modern/QueryClientProvider.mjs";
|
|
3
3
|
import { useState, useCallback } from "react";
|
|
4
4
|
import { authSignin, authSignout, authResetPassword, authOAuthSignin } from "../utils/authFetch.mjs";
|
|
5
5
|
import { getUser, updateUser } from "../utils/userCRUD.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useQuery } from "../../../../../.external/esm/@tanstack_react-query@5.80.
|
|
1
|
+
import { useQuery } from "../../../../../.external/esm/@tanstack_react-query@5.80.10_react@18.3.1/@tanstack/react-query/build/modern/useQuery.mjs";
|
|
2
2
|
import { useEffect } from "react";
|
|
3
3
|
import { authInfo } from "../utils/authFetch.mjs";
|
|
4
4
|
function useFabProvideInfo(baseUrl, auth) {
|
|
@@ -89,6 +89,14 @@ export type NextGenDataGridBodyProps = {
|
|
|
89
89
|
* - Truncate the value of a column to a certain length. Will be shown as `...` when it exceeds the length with a tooltip containing the full value
|
|
90
90
|
*/
|
|
91
91
|
truncate?: number;
|
|
92
|
+
/**
|
|
93
|
+
* - Props for the tooltip component that is shown when the value is truncated. The `value` is the value of the cell, either `string` or `string[]`, `data` is the row data, and `cellObj` is the cell object containing the value, truncate and highlight
|
|
94
|
+
*/
|
|
95
|
+
tooltipProps?: Record<string, any> | (({ value, data, cellObj }: any) => Record<string, any>);
|
|
96
|
+
/**
|
|
97
|
+
* - Props for the highlight component. The `value` is the value of the cell, either `string` or `string[]`, `data` is the row data, and `cellObj` is the cell object containing the value, truncate and highlight
|
|
98
|
+
*/
|
|
99
|
+
highlightProps?: Record<string, any> | (({ value, data, cellObj }: any) => Record<string, any>);
|
|
92
100
|
};
|
|
93
101
|
export type NextGenDataGridProps = {
|
|
94
102
|
/**
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* MultiLineHighlight component that can render single or multiple lines of text with optional truncation and highlighting.
|
|
3
|
+
* @param {Object} props - The component props.
|
|
4
|
+
* @param {string[]} props.highlight - An array of strings to highlight within the text.
|
|
5
|
+
* @param {Object} [props.truncate] - An object containing the original and truncated text.
|
|
6
|
+
* @param {Object} [props.tooltipProps] - Additional properties for the tooltip.
|
|
7
|
+
* @param {Object} [props.highlightProps] - Additional properties for the highlight.
|
|
8
|
+
* @param {React.ReactNode} props.children - The text or array of text to be displayed and highlighted.
|
|
9
|
+
* @returns The rendered component with highlights and tooltips applied as necessary.
|
|
10
|
+
*/
|
|
11
|
+
export function MultiLineHighlight({ highlight, truncate, tooltipProps, highlightProps, children }: {
|
|
12
|
+
highlight: string[];
|
|
13
|
+
truncate?: any;
|
|
14
|
+
tooltipProps?: any;
|
|
15
|
+
highlightProps?: any;
|
|
16
|
+
children: React.ReactNode;
|
|
5
17
|
}): import("react").JSX.Element | import("react").JSX.Element[];
|
|
@@ -16,6 +16,11 @@ export function useProvideApi({ path, initialQueryParams, relation, fetchInfo, c
|
|
|
16
16
|
info: unknown;
|
|
17
17
|
queryParams: {
|
|
18
18
|
filters?: any[];
|
|
19
|
+
} | {
|
|
20
|
+
filters: any[];
|
|
21
|
+
columns: any[];
|
|
22
|
+
page: number;
|
|
23
|
+
page_size: number;
|
|
19
24
|
};
|
|
20
25
|
loading: boolean;
|
|
21
26
|
error: any;
|
|
@@ -4,7 +4,14 @@
|
|
|
4
4
|
* is null or undefined, the corresponding key is removed from the resulting object.
|
|
5
5
|
*
|
|
6
6
|
* @param {Record<string, any> | null | undefined} currentQueryParams - The current query parameters.
|
|
7
|
-
* @param {Record<string, any>} partialQueryParams - The partial query parameters to merge.
|
|
8
|
-
* @returns
|
|
7
|
+
* @param {Record<string, any>} [partialQueryParams] - The partial query parameters to merge. Defaults to `{}`.
|
|
8
|
+
* @returns The new query parameters object.
|
|
9
9
|
*/
|
|
10
|
-
export function createQueryParams(currentQueryParams: Record<string, any> | null | undefined, partialQueryParams?: Record<string, any>):
|
|
10
|
+
export function createQueryParams(currentQueryParams: Record<string, any> | null | undefined, partialQueryParams?: Record<string, any>): {
|
|
11
|
+
[x: string]: any;
|
|
12
|
+
} | {
|
|
13
|
+
columns: any[];
|
|
14
|
+
filters: any[];
|
|
15
|
+
page: number;
|
|
16
|
+
page_size: number;
|
|
17
|
+
};
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|