fastapi-rtk 0.1.26 → 0.1.28
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_react-query@5.80.2_react@18.3.1 → @tanstack_react-query@5.80.7_react@18.3.1}/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs +1 -1
- package/dist/.external/cjs/{@tanstack_react-query@5.80.2_react@18.3.1 → @tanstack_react-query@5.80.7_react@18.3.1}/@tanstack/react-query/build/modern/useBaseQuery.cjs +2 -2
- package/dist/.external/cjs/{@tanstack_react-query@5.80.2_react@18.3.1 → @tanstack_react-query@5.80.7_react@18.3.1}/@tanstack/react-query/build/modern/useQuery.cjs +1 -1
- package/dist/.external/cjs/lodash@4.17.21/lodash/lodash.cjs +5 -5
- package/dist/.external/cjs/lodash@4.17.21/lodash/toFinite.cjs +1 -1
- package/dist/.external/esm/{@tanstack_react-query@5.80.2_react@18.3.1 → @tanstack_react-query@5.80.7_react@18.3.1}/@tanstack/react-query/build/modern/errorBoundaryUtils.mjs +1 -1
- package/dist/.external/esm/{@tanstack_react-query@5.80.2_react@18.3.1 → @tanstack_react-query@5.80.7_react@18.3.1}/@tanstack/react-query/build/modern/useBaseQuery.mjs +2 -2
- package/dist/.external/esm/{@tanstack_react-query@5.80.2_react@18.3.1 → @tanstack_react-query@5.80.7_react@18.3.1}/@tanstack/react-query/build/modern/useQuery.mjs +1 -1
- package/dist/.external/esm/lodash@4.17.21/lodash/lodash.mjs +5 -5
- package/dist/.external/esm/lodash@4.17.21/lodash/toFinite.mjs +1 -1
- package/dist/core/cjs/ActionIcons/Download/Download.cjs +1 -15
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilterInput/ColumnHeaderFilterInput.cjs +4 -18
- package/dist/core/cjs/Wrappers/ApiProvider/Contexts/ApiContext.cjs +1 -1
- package/dist/core/cjs/Wrappers/ApiProvider/hooks/useProvideApi.cjs +14 -19
- package/dist/core/cjs/Wrappers/InfiniteScroll/InfiniteScroll.cjs +12 -11
- package/dist/core/cjs/Wrappers/Provider/Provider.cjs +3 -3
- 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 +14 -19
- 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/ActionIcons/Download/Download.mjs +2 -16
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilterInput/ColumnHeaderFilterInput.mjs +4 -18
- package/dist/core/esm/Wrappers/ApiProvider/Contexts/ApiContext.mjs +1 -1
- package/dist/core/esm/Wrappers/ApiProvider/hooks/useProvideApi.mjs +14 -19
- package/dist/core/esm/Wrappers/InfiniteScroll/InfiniteScroll.mjs +12 -11
- package/dist/core/esm/Wrappers/Provider/Provider.mjs +3 -3
- 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 +14 -19
- 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 +3 -3
- package/dist/core/lib/Wrappers/ApiProvider/ApiProvider.d.ts +55 -13
- package/dist/core/lib/Wrappers/ApiProvider/Contexts/ApiContext.d.ts +2 -1
- package/dist/core/lib/Wrappers/ApiProvider/hooks/useProvideApi.d.ts +1 -1
- package/dist/core/lib/Wrappers/InfiniteScroll/InfiniteScroll.d.ts +29 -0
- package/dist/core/lib/Wrappers/Provider/Provider.d.ts +4 -0
- package/dist/core/lib/fab-react-toolkit-patch/api/hooks/useProvideApi.d.ts +1 -1
- package/dist/core/lib/hooks/api/useApi.d.ts +1 -0
- package/dist/hooks/cjs/useSyncValues/useSyncValues.cjs +5 -8
- package/dist/hooks/esm/useSyncValues/useSyncValues.mjs +5 -8
- package/dist/hooks/lib/useSyncValues/useSyncValues.d.ts +1 -1
- package/package.json +1 -1
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/focusManager.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/mutation.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/mutationCache.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/notifyManager.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/onlineManager.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/query.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/queryCache.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/queryClient.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/queryObserver.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/removable.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/retryer.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/subscribable.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/thenable.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/utils.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_react-query@5.80.2_react@18.3.1 → @tanstack_react-query@5.80.7_react@18.3.1}/@tanstack/react-query/build/modern/IsRestoringProvider.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_react-query@5.80.2_react@18.3.1 → @tanstack_react-query@5.80.7_react@18.3.1}/@tanstack/react-query/build/modern/QueryClientProvider.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_react-query@5.80.2_react@18.3.1 → @tanstack_react-query@5.80.7_react@18.3.1}/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs +0 -0
- /package/dist/.external/cjs/{@tanstack_react-query@5.80.2_react@18.3.1 → @tanstack_react-query@5.80.7_react@18.3.1}/@tanstack/react-query/build/modern/suspense.cjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/focusManager.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/infiniteQueryBehavior.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/mutation.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/mutationCache.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/notifyManager.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/onlineManager.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/query.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/queryCache.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/queryClient.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/queryObserver.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/removable.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/retryer.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/subscribable.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/thenable.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_query-core@5.80.2 → @tanstack_query-core@5.80.7}/@tanstack/query-core/build/modern/utils.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_react-query@5.80.2_react@18.3.1 → @tanstack_react-query@5.80.7_react@18.3.1}/@tanstack/react-query/build/modern/IsRestoringProvider.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_react-query@5.80.2_react@18.3.1 → @tanstack_react-query@5.80.7_react@18.3.1}/@tanstack/react-query/build/modern/QueryClientProvider.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_react-query@5.80.2_react@18.3.1 → @tanstack_react-query@5.80.7_react@18.3.1}/@tanstack/react-query/build/modern/QueryErrorResetBoundary.mjs +0 -0
- /package/dist/.external/esm/{@tanstack_react-query@5.80.2_react@18.3.1 → @tanstack_react-query@5.80.7_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.7/@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.7/@tanstack/query-core/build/modern/notifyManager.cjs");
|
|
5
|
+
const utils = require("../../../../../@tanstack_query-core@5.80.7/@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.7/@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);
|
|
@@ -1902,7 +1902,7 @@ function requireLodash() {
|
|
|
1902
1902
|
return symbolToString ? symbolToString.call(value) : "";
|
|
1903
1903
|
}
|
|
1904
1904
|
var result2 = value + "";
|
|
1905
|
-
return result2 == "0" && 1 / value == -
|
|
1905
|
+
return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2;
|
|
1906
1906
|
}
|
|
1907
1907
|
function baseUniq(array, iteratee2, comparator) {
|
|
1908
1908
|
var index = -1, includes2 = arrayIncludes, length = array.length, isCommon = true, result2 = [], seen = result2;
|
|
@@ -3109,7 +3109,7 @@ function requireLodash() {
|
|
|
3109
3109
|
return value;
|
|
3110
3110
|
}
|
|
3111
3111
|
var result2 = value + "";
|
|
3112
|
-
return result2 == "0" && 1 / value == -
|
|
3112
|
+
return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2;
|
|
3113
3113
|
}
|
|
3114
3114
|
function toSource(func) {
|
|
3115
3115
|
if (func != null) {
|
|
@@ -4173,7 +4173,7 @@ function requireLodash() {
|
|
|
4173
4173
|
}
|
|
4174
4174
|
var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
|
|
4175
4175
|
function isSafeInteger(value) {
|
|
4176
|
-
return isInteger(value) && value >= -
|
|
4176
|
+
return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
|
|
4177
4177
|
}
|
|
4178
4178
|
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
|
4179
4179
|
function isString(value) {
|
|
@@ -4214,7 +4214,7 @@ function requireLodash() {
|
|
|
4214
4214
|
return value === 0 ? value : 0;
|
|
4215
4215
|
}
|
|
4216
4216
|
value = toNumber(value);
|
|
4217
|
-
if (value === INFINITY || value === -
|
|
4217
|
+
if (value === INFINITY || value === -INFINITY) {
|
|
4218
4218
|
var sign = value < 0 ? -1 : 1;
|
|
4219
4219
|
return sign * MAX_INTEGER;
|
|
4220
4220
|
}
|
|
@@ -4249,7 +4249,7 @@ function requireLodash() {
|
|
|
4249
4249
|
return copyObject(value, keysIn(value));
|
|
4250
4250
|
}
|
|
4251
4251
|
function toSafeInteger(value) {
|
|
4252
|
-
return value ? baseClamp(toInteger(value), -
|
|
4252
|
+
return value ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) : value === 0 ? value : 0;
|
|
4253
4253
|
}
|
|
4254
4254
|
function toString(value) {
|
|
4255
4255
|
return value == null ? "" : baseToString(value);
|
|
@@ -13,7 +13,7 @@ function requireToFinite() {
|
|
|
13
13
|
return value === 0 ? value : 0;
|
|
14
14
|
}
|
|
15
15
|
value = toNumber$1(value);
|
|
16
|
-
if (value === INFINITY || value === -
|
|
16
|
+
if (value === INFINITY || value === -INFINITY) {
|
|
17
17
|
var sign = value < 0 ? -1 : 1;
|
|
18
18
|
return sign * MAX_INTEGER;
|
|
19
19
|
}
|
|
@@ -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.7/@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.7/@tanstack/query-core/build/modern/notifyManager.mjs";
|
|
3
|
+
import { noop, isServer } from "../../../../../@tanstack_query-core@5.80.7/@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.7/@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);
|
|
@@ -1900,7 +1900,7 @@ function requireLodash() {
|
|
|
1900
1900
|
return symbolToString ? symbolToString.call(value) : "";
|
|
1901
1901
|
}
|
|
1902
1902
|
var result2 = value + "";
|
|
1903
|
-
return result2 == "0" && 1 / value == -
|
|
1903
|
+
return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2;
|
|
1904
1904
|
}
|
|
1905
1905
|
function baseUniq(array, iteratee2, comparator) {
|
|
1906
1906
|
var index = -1, includes2 = arrayIncludes, length = array.length, isCommon = true, result2 = [], seen = result2;
|
|
@@ -3107,7 +3107,7 @@ function requireLodash() {
|
|
|
3107
3107
|
return value;
|
|
3108
3108
|
}
|
|
3109
3109
|
var result2 = value + "";
|
|
3110
|
-
return result2 == "0" && 1 / value == -
|
|
3110
|
+
return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2;
|
|
3111
3111
|
}
|
|
3112
3112
|
function toSource(func) {
|
|
3113
3113
|
if (func != null) {
|
|
@@ -4171,7 +4171,7 @@ function requireLodash() {
|
|
|
4171
4171
|
}
|
|
4172
4172
|
var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
|
|
4173
4173
|
function isSafeInteger(value) {
|
|
4174
|
-
return isInteger(value) && value >= -
|
|
4174
|
+
return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
|
|
4175
4175
|
}
|
|
4176
4176
|
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
|
4177
4177
|
function isString(value) {
|
|
@@ -4212,7 +4212,7 @@ function requireLodash() {
|
|
|
4212
4212
|
return value === 0 ? value : 0;
|
|
4213
4213
|
}
|
|
4214
4214
|
value = toNumber(value);
|
|
4215
|
-
if (value === INFINITY || value === -
|
|
4215
|
+
if (value === INFINITY || value === -INFINITY) {
|
|
4216
4216
|
var sign = value < 0 ? -1 : 1;
|
|
4217
4217
|
return sign * MAX_INTEGER;
|
|
4218
4218
|
}
|
|
@@ -4247,7 +4247,7 @@ function requireLodash() {
|
|
|
4247
4247
|
return copyObject(value, keysIn(value));
|
|
4248
4248
|
}
|
|
4249
4249
|
function toSafeInteger(value) {
|
|
4250
|
-
return value ? baseClamp(toInteger(value), -
|
|
4250
|
+
return value ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) : value === 0 ? value : 0;
|
|
4251
4251
|
}
|
|
4252
4252
|
function toString(value) {
|
|
4253
4253
|
return value == null ? "" : baseToString(value);
|
|
@@ -11,7 +11,7 @@ function requireToFinite() {
|
|
|
11
11
|
return value === 0 ? value : 0;
|
|
12
12
|
}
|
|
13
13
|
value = toNumber(value);
|
|
14
|
-
if (value === INFINITY || value === -
|
|
14
|
+
if (value === INFINITY || value === -INFINITY) {
|
|
15
15
|
var sign = value < 0 ? -1 : 1;
|
|
16
16
|
return sign * MAX_INTEGER;
|
|
17
17
|
}
|
|
@@ -8,21 +8,19 @@ const hooks = require("@mantine/hooks");
|
|
|
8
8
|
const React = require("react");
|
|
9
9
|
const useApi = require("../../hooks/api/useApi.cjs");
|
|
10
10
|
const IconSeparatorVertical = require("../../../../.external/cjs/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconSeparatorVertical.cjs");
|
|
11
|
-
const IconQuote = require("../../../../.external/cjs/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconQuote.cjs");
|
|
12
11
|
const IconDownload = require("../../../../.external/cjs/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconDownload.cjs");
|
|
13
12
|
const Download = React.memo(({ tooltipProps, ...props }) => {
|
|
14
13
|
const { download } = useApi.useApi();
|
|
15
14
|
const [opened, { toggle, close }] = hooks.useDisclosure();
|
|
16
15
|
const [loading, setLoading] = hooks.useDebouncedState(false, constants.DEBOUNCE_LOADING_DELAY);
|
|
17
16
|
const [delimiter, setDelimiter] = React.useState(constants.DEFAULT_DELIMITER);
|
|
18
|
-
const [quotechar, setQuotechar] = React.useState(constants.DEFAULT_QUOTECHAR);
|
|
19
17
|
const actionIconProps = hooks$1.useActionIcon({
|
|
20
18
|
onClick: toggle,
|
|
21
19
|
...props
|
|
22
20
|
});
|
|
23
21
|
const onDownload = () => {
|
|
24
22
|
setLoading(true);
|
|
25
|
-
download(void 0, { delimiter
|
|
23
|
+
download(void 0, { delimiter }).catch(() => {
|
|
26
24
|
}).finally(() => {
|
|
27
25
|
setLoading(false);
|
|
28
26
|
close();
|
|
@@ -43,18 +41,6 @@ const Download = React.memo(({ tooltipProps, ...props }) => {
|
|
|
43
41
|
leftSection: /* @__PURE__ */ jsxRuntime.jsx(IconSeparatorVertical, {})
|
|
44
42
|
}
|
|
45
43
|
),
|
|
46
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
47
|
-
core.Select,
|
|
48
|
-
{
|
|
49
|
-
label: "Quote character",
|
|
50
|
-
description: "Select the quote character used in the CSV file",
|
|
51
|
-
value: quotechar,
|
|
52
|
-
onChange: setQuotechar,
|
|
53
|
-
data: constants.QUOTECHAR_DATA,
|
|
54
|
-
placeholder: "Select quote character",
|
|
55
|
-
leftSection: /* @__PURE__ */ jsxRuntime.jsx(IconQuote, {})
|
|
56
|
-
}
|
|
57
|
-
),
|
|
58
44
|
/* @__PURE__ */ jsxRuntime.jsx(core.Group, { justify: "end", children: /* @__PURE__ */ jsxRuntime.jsx(core.Button, { mt: "md", onClick: onDownload, loading, children: "Download" }) })
|
|
59
45
|
] }) }),
|
|
60
46
|
loading ? /* @__PURE__ */ jsxRuntime.jsx(core.ThemeIcon, { variant: "transparent", size: actionIconProps.size, c: actionIconProps.c, children: /* @__PURE__ */ jsxRuntime.jsx(core.Loader, { size: "100%", color: actionIconProps.c }) }) : /* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { ...tooltipProps, label: (tooltipProps == null ? void 0 : tooltipProps.label) ?? "Download", children: /* @__PURE__ */ jsxRuntime.jsx(core.ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsxRuntime.jsx(IconDownload, {}) }) })
|
|
@@ -54,22 +54,9 @@ function ColumnHeaderFilterInput({
|
|
|
54
54
|
const field = form.useField({ mode: "controlled" });
|
|
55
55
|
hooks$1.useSyncValues(
|
|
56
56
|
[
|
|
57
|
-
{
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
log: (value) => console.log(`Field value changed to: ${value}`)
|
|
61
|
-
},
|
|
62
|
-
...filterState ? [
|
|
63
|
-
{
|
|
64
|
-
...filterState,
|
|
65
|
-
log: (value) => console.log(`filterState value changed to: ${value}`)
|
|
66
|
-
}
|
|
67
|
-
] : [],
|
|
68
|
-
{
|
|
69
|
-
value: column.getFilterValue(),
|
|
70
|
-
onChange: column.setFilterValue,
|
|
71
|
-
log: (value) => console.log(`Column filter value changed to: ${value}`)
|
|
72
|
-
},
|
|
57
|
+
{ value: field.getValue(), onChange: field.getInputProps().onChange },
|
|
58
|
+
{ value: column.getFilterValue(), onChange: column.setFilterValue },
|
|
59
|
+
...filterState ? [filterState] : [],
|
|
73
60
|
...updateQueryParams ? [
|
|
74
61
|
{
|
|
75
62
|
value: (_b = (_a = queryParams == null ? void 0 : queryParams.filters) == null ? void 0 : _a.find((qpFilter) => qpFilter.id === column.id)) == null ? void 0 : _b.value,
|
|
@@ -93,8 +80,7 @@ function ColumnHeaderFilterInput({
|
|
|
93
80
|
}
|
|
94
81
|
return { ...prev, filters: newFilters };
|
|
95
82
|
});
|
|
96
|
-
}
|
|
97
|
-
log: (value) => console.log(`Query Params filter value changed to: ${value}`)
|
|
83
|
+
}
|
|
98
84
|
}
|
|
99
85
|
] : []
|
|
100
86
|
],
|
|
@@ -4,7 +4,7 @@ const React = require("react");
|
|
|
4
4
|
const ApiContext = React.createContext({
|
|
5
5
|
path: "",
|
|
6
6
|
/**
|
|
7
|
-
* @type {{count: number, description_columns: Record<string, string>, ids: number[] | string[], label_columns: Record<string, string>, list_columns: string[], list_title: string, order_columns: string[], result: Record<string, any>[], path: string} | null}
|
|
7
|
+
* @type {{count: number, description_columns: Record<string, string>, ids: number[] | string[], label_columns: Record<string, string>, list_columns: string[], list_title: string, order_columns: string[], result: Record<string, any>[], path: string, queryParams: Record<string, any>} | null}
|
|
8
8
|
*/
|
|
9
9
|
data: null,
|
|
10
10
|
/**
|
|
@@ -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.7_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.7/@tanstack/query-core/build/modern/utils.cjs");
|
|
19
19
|
function useProvideApi({
|
|
20
20
|
path,
|
|
21
21
|
initialQueryParams,
|
|
@@ -112,7 +112,8 @@ function useProvideApi({
|
|
|
112
112
|
queryFn: ({ signal }) => memoizedQueryParams ? getItems.getItems(utils.urlJoin(memoizedQueryParamsPathRef.current, "/"), memoizedQueryParams, signal).then((data2) => ({
|
|
113
113
|
...data2,
|
|
114
114
|
result: data2.result.map((item, index) => ({ ...item, id: data2.ids[index] })),
|
|
115
|
-
path: memoizedQueryParamsPathRef.current
|
|
115
|
+
path: memoizedQueryParamsPathRef.current,
|
|
116
|
+
queryParams: memoizedQueryParams
|
|
116
117
|
})) : null,
|
|
117
118
|
placeholderData: clearDataOnRefetch ? null : utils$1.keepPreviousData,
|
|
118
119
|
retry: false,
|
|
@@ -232,16 +233,8 @@ function useProvideApi({
|
|
|
232
233
|
const [streaming, setStreaming] = hooks.useSetState({
|
|
233
234
|
data: {},
|
|
234
235
|
isEnd: false,
|
|
235
|
-
fetch: () => null
|
|
236
|
+
fetch: streamingMode ? () => setQueryParamsCallback({ page: 0, streaming: true }) : () => null
|
|
236
237
|
});
|
|
237
|
-
React.useEffect(() => {
|
|
238
|
-
if (!streamingMode) {
|
|
239
|
-
return;
|
|
240
|
-
}
|
|
241
|
-
setStreaming({
|
|
242
|
-
fetch: () => setQueryParamsCallback({ page: 0, streaming: true })
|
|
243
|
-
});
|
|
244
|
-
}, [setQueryParamsCallback, setStreaming, streamingMode]);
|
|
245
238
|
React.useEffect(() => {
|
|
246
239
|
if (!streamingMode) {
|
|
247
240
|
return;
|
|
@@ -250,19 +243,21 @@ function useProvideApi({
|
|
|
250
243
|
return;
|
|
251
244
|
}
|
|
252
245
|
setStreaming((prev) => {
|
|
253
|
-
|
|
246
|
+
var _a;
|
|
254
247
|
const newStreaming = { isEnd: false };
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
248
|
+
const currentPage = Object.keys(prev.data).length;
|
|
249
|
+
const nextPage = ((_a = data.queryParams) == null ? void 0 : _a.page) ?? 0;
|
|
250
|
+
if (nextPage < currentPage) {
|
|
251
|
+
newStreaming.data = {};
|
|
258
252
|
} else {
|
|
259
|
-
newStreaming.data = { ...prev.data
|
|
253
|
+
newStreaming.data = { ...prev.data };
|
|
260
254
|
}
|
|
261
|
-
|
|
255
|
+
newStreaming.data[nextPage] = data.result;
|
|
256
|
+
if (data.result.length < data.queryParams.page_size) {
|
|
262
257
|
newStreaming.isEnd = true;
|
|
263
258
|
newStreaming.fetch = () => null;
|
|
264
259
|
} else {
|
|
265
|
-
newStreaming.fetch = () => setQueryParamsCallback({ page:
|
|
260
|
+
newStreaming.fetch = () => setQueryParamsCallback({ page: nextPage + 1, streaming: true });
|
|
266
261
|
}
|
|
267
262
|
return newStreaming;
|
|
268
263
|
});
|
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const utils = require("fastapi-rtk/utils");
|
|
4
5
|
const core = require("@mantine/core");
|
|
5
6
|
const hooks = require("@mantine/hooks");
|
|
6
7
|
const React = require("react");
|
|
7
8
|
const useApi = require("../../hooks/api/useApi.cjs");
|
|
8
|
-
|
|
9
|
+
const InfiniteScroll = ({
|
|
9
10
|
children,
|
|
10
11
|
fetch = true,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
components: {
|
|
13
|
+
Loading = /* @__PURE__ */ jsxRuntime.jsx(core.Center, { children: /* @__PURE__ */ jsxRuntime.jsx(core.Loader, {}) }),
|
|
14
|
+
End = /* @__PURE__ */ jsxRuntime.jsx(core.Center, { children: "End of data" }),
|
|
15
|
+
FetchWrapper = core.Center
|
|
16
|
+
} = {},
|
|
14
17
|
fetchWrapperProps
|
|
15
|
-
}) {
|
|
18
|
+
}) => {
|
|
16
19
|
const { streaming, loading } = useApi.useApi();
|
|
17
20
|
const { ref, inViewport } = hooks.useInViewport();
|
|
18
21
|
const items = React.useMemo(() => Object.values(streaming.data).flat(), [streaming.data]);
|
|
19
|
-
const Children = React.useMemo(() => typeof children === "function" ? children(items) : children, [children, items]);
|
|
20
22
|
React.useEffect(() => {
|
|
21
23
|
if (inViewport && fetch) {
|
|
22
24
|
streaming.fetch();
|
|
23
25
|
}
|
|
24
|
-
}, [inViewport]);
|
|
26
|
+
}, [fetch, inViewport]);
|
|
25
27
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
26
|
-
|
|
27
|
-
loading && Loading,
|
|
28
|
+
utils.parseFromValuesOrFunc(children, { items, loading }),
|
|
28
29
|
streaming.isEnd && End,
|
|
29
|
-
/* @__PURE__ */ jsxRuntime.jsx(FetchWrapper, { ref, id: "IS-load-trigger", mih: "1%", ...fetchWrapperProps })
|
|
30
|
+
loading ? Loading : /* @__PURE__ */ jsxRuntime.jsx(FetchWrapper, { ref, id: "IS-load-trigger", mih: "1%", ...fetchWrapperProps })
|
|
30
31
|
] });
|
|
31
|
-
}
|
|
32
|
+
};
|
|
32
33
|
exports.InfiniteScroll = InfiniteScroll;
|
|
@@ -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.7/@tanstack/query-core/build/modern/queryClient.cjs");
|
|
6
|
+
const QueryClientProvider = require("../../../../.external/cjs/@tanstack_react-query@5.80.7_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");
|
|
@@ -33,7 +33,7 @@ function InnerProvider(props) {
|
|
|
33
33
|
return /* @__PURE__ */ jsxRuntime.jsx(AuthContext.AuthContext.Provider, { value: authProxy, children: /* @__PURE__ */ jsxRuntime.jsx(InfoContext.InfoContext.Provider, { value: infoProxy, children }) });
|
|
34
34
|
}
|
|
35
35
|
const Provider = (props) => {
|
|
36
|
-
const [queryClient$1] = React.useState(() => new queryClient.QueryClient());
|
|
36
|
+
const [queryClient$1] = React.useState(() => new queryClient.QueryClient(props.queryClientProps));
|
|
37
37
|
return /* @__PURE__ */ jsxRuntime.jsx(QueryClientProvider.QueryClientProvider, { client: queryClient$1, children: /* @__PURE__ */ jsxRuntime.jsx(InnerProvider, { ...props }) });
|
|
38
38
|
};
|
|
39
39
|
exports.Provider = Provider;
|
|
@@ -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.7_react@18.3.1/@tanstack/react-query/build/modern/useQuery.cjs");
|
|
4
|
+
const QueryClientProvider = require("../../../../../.external/cjs/@tanstack_react-query@5.80.7_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.7_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.7/@tanstack/query-core/build/modern/utils.cjs");
|
|
7
|
+
const useQuery = require("../../../../../.external/cjs/@tanstack_react-query@5.80.7_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");
|
|
@@ -112,7 +112,8 @@ function useFabProvideApi({
|
|
|
112
112
|
queryFn: ({ signal }) => memoizedQueryParams ? getItems.getItems(utils.urlJoin(memoizedQueryParamsPathRef.current, "/"), memoizedQueryParams, signal).then((data2) => ({
|
|
113
113
|
...data2,
|
|
114
114
|
result: data2.result.map((item, index) => ({ ...item, id: data2.ids[index] })),
|
|
115
|
-
path: memoizedQueryParamsPathRef.current
|
|
115
|
+
path: memoizedQueryParamsPathRef.current,
|
|
116
|
+
queryParams: memoizedQueryParams
|
|
116
117
|
})) : null,
|
|
117
118
|
placeholderData: clearDataOnRefetch ? null : utils$1.keepPreviousData,
|
|
118
119
|
retry: false,
|
|
@@ -232,16 +233,8 @@ function useFabProvideApi({
|
|
|
232
233
|
const [streaming, setStreaming] = hooks.useSetState({
|
|
233
234
|
data: {},
|
|
234
235
|
isEnd: false,
|
|
235
|
-
fetch: () => null
|
|
236
|
+
fetch: streamingMode ? () => setQueryParamsCallback({ page: 0, streaming: true }) : () => null
|
|
236
237
|
});
|
|
237
|
-
React.useEffect(() => {
|
|
238
|
-
if (!streamingMode) {
|
|
239
|
-
return;
|
|
240
|
-
}
|
|
241
|
-
setStreaming({
|
|
242
|
-
fetch: () => setQueryParamsCallback({ page: 0, streaming: true })
|
|
243
|
-
});
|
|
244
|
-
}, [setQueryParamsCallback, setStreaming, streamingMode]);
|
|
245
238
|
React.useEffect(() => {
|
|
246
239
|
if (!streamingMode) {
|
|
247
240
|
return;
|
|
@@ -250,19 +243,21 @@ function useFabProvideApi({
|
|
|
250
243
|
return;
|
|
251
244
|
}
|
|
252
245
|
setStreaming((prev) => {
|
|
253
|
-
|
|
246
|
+
var _a;
|
|
254
247
|
const newStreaming = { isEnd: false };
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
248
|
+
const currentPage = Object.keys(prev.data).length;
|
|
249
|
+
const nextPage = ((_a = data.queryParams) == null ? void 0 : _a.page) ?? 0;
|
|
250
|
+
if (nextPage < currentPage) {
|
|
251
|
+
newStreaming.data = {};
|
|
258
252
|
} else {
|
|
259
|
-
newStreaming.data = { ...prev.data
|
|
253
|
+
newStreaming.data = { ...prev.data };
|
|
260
254
|
}
|
|
261
|
-
|
|
255
|
+
newStreaming.data[nextPage] = data.result;
|
|
256
|
+
if (data.result.length < data.queryParams.page_size) {
|
|
262
257
|
newStreaming.isEnd = true;
|
|
263
258
|
newStreaming.fetch = () => null;
|
|
264
259
|
} else {
|
|
265
|
-
newStreaming.fetch = () => setQueryParamsCallback({ page:
|
|
260
|
+
newStreaming.fetch = () => setQueryParamsCallback({ page: nextPage + 1, streaming: true });
|
|
266
261
|
}
|
|
267
262
|
return newStreaming;
|
|
268
263
|
});
|
|
@@ -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.7_react@18.3.1/@tanstack/react-query/build/modern/useQuery.cjs");
|
|
4
|
+
const QueryClientProvider = require("../../../../../.external/cjs/@tanstack_react-query@5.80.7_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.7_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,26 +1,24 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { DEBOUNCE_LOADING_DELAY, DEFAULT_DELIMITER,
|
|
2
|
+
import { DEBOUNCE_LOADING_DELAY, DEFAULT_DELIMITER, DELIMITER_DATA } from "fastapi-rtk/constants";
|
|
3
3
|
import { useActionIcon } from "fastapi-rtk/hooks";
|
|
4
4
|
import { Modal, Stack, Select, Group, Button, ThemeIcon, Loader, Tooltip, ActionIcon } from "@mantine/core";
|
|
5
5
|
import { useDisclosure, useDebouncedState } from "@mantine/hooks";
|
|
6
6
|
import { memo, useState } from "react";
|
|
7
7
|
import { useApi } from "../../hooks/api/useApi.mjs";
|
|
8
8
|
import IconSeparatorVertical from "../../../../.external/esm/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconSeparatorVertical.mjs";
|
|
9
|
-
import IconQuote from "../../../../.external/esm/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconQuote.mjs";
|
|
10
9
|
import IconDownload from "../../../../.external/esm/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconDownload.mjs";
|
|
11
10
|
const Download = memo(({ tooltipProps, ...props }) => {
|
|
12
11
|
const { download } = useApi();
|
|
13
12
|
const [opened, { toggle, close }] = useDisclosure();
|
|
14
13
|
const [loading, setLoading] = useDebouncedState(false, DEBOUNCE_LOADING_DELAY);
|
|
15
14
|
const [delimiter, setDelimiter] = useState(DEFAULT_DELIMITER);
|
|
16
|
-
const [quotechar, setQuotechar] = useState(DEFAULT_QUOTECHAR);
|
|
17
15
|
const actionIconProps = useActionIcon({
|
|
18
16
|
onClick: toggle,
|
|
19
17
|
...props
|
|
20
18
|
});
|
|
21
19
|
const onDownload = () => {
|
|
22
20
|
setLoading(true);
|
|
23
|
-
download(void 0, { delimiter
|
|
21
|
+
download(void 0, { delimiter }).catch(() => {
|
|
24
22
|
}).finally(() => {
|
|
25
23
|
setLoading(false);
|
|
26
24
|
close();
|
|
@@ -41,18 +39,6 @@ const Download = memo(({ tooltipProps, ...props }) => {
|
|
|
41
39
|
leftSection: /* @__PURE__ */ jsx(IconSeparatorVertical, {})
|
|
42
40
|
}
|
|
43
41
|
),
|
|
44
|
-
/* @__PURE__ */ jsx(
|
|
45
|
-
Select,
|
|
46
|
-
{
|
|
47
|
-
label: "Quote character",
|
|
48
|
-
description: "Select the quote character used in the CSV file",
|
|
49
|
-
value: quotechar,
|
|
50
|
-
onChange: setQuotechar,
|
|
51
|
-
data: QUOTECHAR_DATA,
|
|
52
|
-
placeholder: "Select quote character",
|
|
53
|
-
leftSection: /* @__PURE__ */ jsx(IconQuote, {})
|
|
54
|
-
}
|
|
55
|
-
),
|
|
56
42
|
/* @__PURE__ */ jsx(Group, { justify: "end", children: /* @__PURE__ */ jsx(Button, { mt: "md", onClick: onDownload, loading, children: "Download" }) })
|
|
57
43
|
] }) }),
|
|
58
44
|
loading ? /* @__PURE__ */ jsx(ThemeIcon, { variant: "transparent", size: actionIconProps.size, c: actionIconProps.c, children: /* @__PURE__ */ jsx(Loader, { size: "100%", color: actionIconProps.c }) }) : /* @__PURE__ */ jsx(Tooltip, { ...tooltipProps, label: (tooltipProps == null ? void 0 : tooltipProps.label) ?? "Download", children: /* @__PURE__ */ jsx(ActionIcon, { ...actionIconProps, children: /* @__PURE__ */ jsx(IconDownload, {}) }) })
|
|
@@ -52,22 +52,9 @@ function ColumnHeaderFilterInput({
|
|
|
52
52
|
const field = useField({ mode: "controlled" });
|
|
53
53
|
useSyncValues(
|
|
54
54
|
[
|
|
55
|
-
{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
log: (value) => console.log(`Field value changed to: ${value}`)
|
|
59
|
-
},
|
|
60
|
-
...filterState ? [
|
|
61
|
-
{
|
|
62
|
-
...filterState,
|
|
63
|
-
log: (value) => console.log(`filterState value changed to: ${value}`)
|
|
64
|
-
}
|
|
65
|
-
] : [],
|
|
66
|
-
{
|
|
67
|
-
value: column.getFilterValue(),
|
|
68
|
-
onChange: column.setFilterValue,
|
|
69
|
-
log: (value) => console.log(`Column filter value changed to: ${value}`)
|
|
70
|
-
},
|
|
55
|
+
{ value: field.getValue(), onChange: field.getInputProps().onChange },
|
|
56
|
+
{ value: column.getFilterValue(), onChange: column.setFilterValue },
|
|
57
|
+
...filterState ? [filterState] : [],
|
|
71
58
|
...updateQueryParams ? [
|
|
72
59
|
{
|
|
73
60
|
value: (_b = (_a = queryParams == null ? void 0 : queryParams.filters) == null ? void 0 : _a.find((qpFilter) => qpFilter.id === column.id)) == null ? void 0 : _b.value,
|
|
@@ -91,8 +78,7 @@ function ColumnHeaderFilterInput({
|
|
|
91
78
|
}
|
|
92
79
|
return { ...prev, filters: newFilters };
|
|
93
80
|
});
|
|
94
|
-
}
|
|
95
|
-
log: (value) => console.log(`Query Params filter value changed to: ${value}`)
|
|
81
|
+
}
|
|
96
82
|
}
|
|
97
83
|
] : []
|
|
98
84
|
],
|
|
@@ -2,7 +2,7 @@ import { createContext } from "react";
|
|
|
2
2
|
const ApiContext = createContext({
|
|
3
3
|
path: "",
|
|
4
4
|
/**
|
|
5
|
-
* @type {{count: number, description_columns: Record<string, string>, ids: number[] | string[], label_columns: Record<string, string>, list_columns: string[], list_title: string, order_columns: string[], result: Record<string, any>[], path: string} | null}
|
|
5
|
+
* @type {{count: number, description_columns: Record<string, string>, ids: number[] | string[], label_columns: Record<string, string>, list_columns: string[], list_title: string, order_columns: string[], result: Record<string, any>[], path: string, queryParams: Record<string, any>} | null}
|
|
6
6
|
*/
|
|
7
7
|
data: null,
|
|
8
8
|
/**
|