@cartanova/qgrid-cli 1.5.5 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/dist/application/qgrid/oauth.js +1 -1
- package/bundle/dist/application/qgrid/qgrid.dispatcher.js +166 -0
- package/bundle/dist/application/qgrid/qgrid.frame.js +28 -36
- package/bundle/dist/application/qgrid/qgrid.types.js +5 -16
- package/bundle/dist/application/queries.generated.js +1 -1
- package/bundle/dist/application/sonamu.generated.js +1 -1
- package/bundle/dist/application/sonamu.generated.sso.js +1 -1
- package/bundle/dist/sonamu.config.js +6 -9
- package/bundle/src/application/qgrid/oauth.ts +1 -1
- package/bundle/src/application/qgrid/qgrid.dispatcher.ts +184 -0
- package/bundle/src/application/qgrid/qgrid.frame.ts +28 -50
- package/bundle/src/application/qgrid/qgrid.types.ts +2 -14
- package/bundle/src/application/queries.generated.ts +1 -0
- package/bundle/src/application/sonamu.generated.http +2 -1
- package/bundle/src/application/sonamu.generated.sso.ts +6 -5
- package/bundle/src/application/sonamu.generated.ts +1 -0
- package/bundle/src/sonamu.config.ts +4 -7
- package/bundle/web-dist/client/assets/index-BRZCFaFz.css +1 -0
- package/bundle/web-dist/client/assets/index-D8eEjsZj.js +78 -0
- package/bundle/web-dist/client/assets/{logs-CQDBOCud.js → logs-CKnJzuH6.js} +1 -1
- package/bundle/web-dist/client/assets/{routes-MR1DKizN.js → routes-DQKecVGa.js} +1 -1
- package/bundle/web-dist/client/assets/sd.generated-NHYHS_-0.js +47 -0
- package/bundle/web-dist/client/assets/services.generated-DDVXMid7.js +1 -0
- package/bundle/web-dist/client/assets/{show--z3WxDb0.js → show-D2z1qxJ5.js} +1 -1
- package/bundle/web-dist/client/assets/tokens-BaywaQkm.js +1 -0
- package/bundle/web-dist/client/assets/vendor-tanstack-DJRQAbrY.js +1 -0
- package/bundle/web-dist/client/index.html +4 -4
- package/bundle/web-dist/server/assets/{copy-GKsNP-2_.js → copy-BVWDOV2T.js} +1 -1
- package/bundle/web-dist/server/assets/{lazyRouteComponent-B78WDGgM.js → lazyRouteComponent-BJmwxFyJ.js} +2 -128
- package/bundle/web-dist/server/assets/{logs-BV6gEe15.js → logs-DgIbufNf.js} +4 -4
- package/bundle/web-dist/server/assets/{routes-B5FkWLUe.js → routes-x7-hqUm0.js} +3 -3
- package/bundle/web-dist/server/assets/{sd.generated-Mnbmi4YR.js → sd.generated-BZPIp4uL.js} +122 -1
- package/bundle/web-dist/server/assets/{services.generated-DjdxFvCg.js → services.generated-BA0gbdmd.js} +134 -20
- package/bundle/web-dist/server/assets/shim-DGrmZkac.js +129 -0
- package/bundle/web-dist/server/assets/{show-BqSxVXai.js → show-Bk3NayMH.js} +4 -4
- package/bundle/web-dist/server/assets/{tokens-BGaTdsEb.js → tokens-CVSwt0x0.js} +13 -24
- package/bundle/web-dist/server/entry-server.generated.js +19679 -17705
- package/package.json +2 -2
- package/bundle/dist/application/qgrid/pool.js +0 -128
- package/bundle/dist/application/qgrid/worker.js +0 -189
- package/bundle/src/application/qgrid/pool.ts +0 -165
- package/bundle/src/application/qgrid/worker.ts +0 -240
- package/bundle/web-dist/client/assets/index-DLrkHIo2.js +0 -116
- package/bundle/web-dist/client/assets/index-kQRqXaWM.css +0 -1
- package/bundle/web-dist/client/assets/sd.generated-DXtkTTGn.js +0 -47
- package/bundle/web-dist/client/assets/services.generated-C0OpNm5q.js +0 -1
- package/bundle/web-dist/client/assets/tokens-Bch6XO9K.js +0 -1
- package/bundle/web-dist/client/assets/vendor-tanstack-CUxlo6YN.js +0 -1
- /package/bundle/web-dist/server/assets/{cost-D0Ta7MJa.js → cost-DdHTzQDR.js} +0 -0
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/sonamu.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Qgrid</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-D8eEjsZj.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-Dw2cE7zH.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-ca-nBW7U.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-DH4kUfK2.js">
|
|
12
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-
|
|
13
|
-
<link rel="modulepreload" crossorigin href="/assets/sd.generated-
|
|
14
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
12
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-DJRQAbrY.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="/assets/sd.generated-NHYHS_-0.js">
|
|
14
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BRZCFaFz.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
17
17
|
<div id="root"></div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as require_react, E as require_jsx_runtime } from "./sd.generated-BZPIp4uL.js";
|
|
2
2
|
require_react();
|
|
3
3
|
var import_jsx_runtime = require_jsx_runtime();
|
|
4
4
|
var lucideCheck = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as require_react_dom, D as require_react, E as require_jsx_runtime, ot as __toESM, rt as __commonJSMin } from "./sd.generated-BZPIp4uL.js";
|
|
2
|
+
import { t as require_shim } from "./shim-DGrmZkac.js";
|
|
2
3
|
//#region ../../node_modules/.pnpm/@tanstack+router-core@1.143.6/node_modules/@tanstack/router-core/dist/esm/utils.js
|
|
3
4
|
function last(arr) {
|
|
4
5
|
return arr[arr.length - 1];
|
|
@@ -1061,133 +1062,6 @@ function warning(condition, message) {
|
|
|
1061
1062
|
}
|
|
1062
1063
|
}
|
|
1063
1064
|
//#endregion
|
|
1064
|
-
//#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js
|
|
1065
|
-
/**
|
|
1066
|
-
* @license React
|
|
1067
|
-
* use-sync-external-store-shim.production.js
|
|
1068
|
-
*
|
|
1069
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1070
|
-
*
|
|
1071
|
-
* This source code is licensed under the MIT license found in the
|
|
1072
|
-
* LICENSE file in the root directory of this source tree.
|
|
1073
|
-
*/
|
|
1074
|
-
var require_use_sync_external_store_shim_production = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1075
|
-
var React = require_react();
|
|
1076
|
-
function is(x, y) {
|
|
1077
|
-
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
1078
|
-
}
|
|
1079
|
-
var objectIs = "function" === typeof Object.is ? Object.is : is, useState = React.useState, useEffect = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue;
|
|
1080
|
-
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
1081
|
-
var value = getSnapshot(), _useState = useState({ inst: {
|
|
1082
|
-
value,
|
|
1083
|
-
getSnapshot
|
|
1084
|
-
} }), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
1085
|
-
useLayoutEffect(function() {
|
|
1086
|
-
inst.value = value;
|
|
1087
|
-
inst.getSnapshot = getSnapshot;
|
|
1088
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
1089
|
-
}, [
|
|
1090
|
-
subscribe,
|
|
1091
|
-
value,
|
|
1092
|
-
getSnapshot
|
|
1093
|
-
]);
|
|
1094
|
-
useEffect(function() {
|
|
1095
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
1096
|
-
return subscribe(function() {
|
|
1097
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
1098
|
-
});
|
|
1099
|
-
}, [subscribe]);
|
|
1100
|
-
useDebugValue(value);
|
|
1101
|
-
return value;
|
|
1102
|
-
}
|
|
1103
|
-
function checkIfSnapshotChanged(inst) {
|
|
1104
|
-
var latestGetSnapshot = inst.getSnapshot;
|
|
1105
|
-
inst = inst.value;
|
|
1106
|
-
try {
|
|
1107
|
-
var nextValue = latestGetSnapshot();
|
|
1108
|
-
return !objectIs(inst, nextValue);
|
|
1109
|
-
} catch (error) {
|
|
1110
|
-
return !0;
|
|
1111
|
-
}
|
|
1112
|
-
}
|
|
1113
|
-
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
1114
|
-
return getSnapshot();
|
|
1115
|
-
}
|
|
1116
|
-
var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
1117
|
-
exports.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
|
|
1118
|
-
}));
|
|
1119
|
-
//#endregion
|
|
1120
|
-
//#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
|
|
1121
|
-
/**
|
|
1122
|
-
* @license React
|
|
1123
|
-
* use-sync-external-store-shim.development.js
|
|
1124
|
-
*
|
|
1125
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1126
|
-
*
|
|
1127
|
-
* This source code is licensed under the MIT license found in the
|
|
1128
|
-
* LICENSE file in the root directory of this source tree.
|
|
1129
|
-
*/
|
|
1130
|
-
var require_use_sync_external_store_shim_development = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1131
|
-
"production" !== process.env.NODE_ENV && (function() {
|
|
1132
|
-
function is(x, y) {
|
|
1133
|
-
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
1134
|
-
}
|
|
1135
|
-
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
1136
|
-
didWarnOld18Alpha || void 0 === React.startTransition || (didWarnOld18Alpha = !0, console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
|
|
1137
|
-
var value = getSnapshot();
|
|
1138
|
-
if (!didWarnUncachedGetSnapshot) {
|
|
1139
|
-
var cachedValue = getSnapshot();
|
|
1140
|
-
objectIs(value, cachedValue) || (console.error("The result of getSnapshot should be cached to avoid an infinite loop"), didWarnUncachedGetSnapshot = !0);
|
|
1141
|
-
}
|
|
1142
|
-
cachedValue = useState({ inst: {
|
|
1143
|
-
value,
|
|
1144
|
-
getSnapshot
|
|
1145
|
-
} });
|
|
1146
|
-
var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
|
|
1147
|
-
useLayoutEffect(function() {
|
|
1148
|
-
inst.value = value;
|
|
1149
|
-
inst.getSnapshot = getSnapshot;
|
|
1150
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
1151
|
-
}, [
|
|
1152
|
-
subscribe,
|
|
1153
|
-
value,
|
|
1154
|
-
getSnapshot
|
|
1155
|
-
]);
|
|
1156
|
-
useEffect(function() {
|
|
1157
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
1158
|
-
return subscribe(function() {
|
|
1159
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
1160
|
-
});
|
|
1161
|
-
}, [subscribe]);
|
|
1162
|
-
useDebugValue(value);
|
|
1163
|
-
return value;
|
|
1164
|
-
}
|
|
1165
|
-
function checkIfSnapshotChanged(inst) {
|
|
1166
|
-
var latestGetSnapshot = inst.getSnapshot;
|
|
1167
|
-
inst = inst.value;
|
|
1168
|
-
try {
|
|
1169
|
-
var nextValue = latestGetSnapshot();
|
|
1170
|
-
return !objectIs(inst, nextValue);
|
|
1171
|
-
} catch (error) {
|
|
1172
|
-
return !0;
|
|
1173
|
-
}
|
|
1174
|
-
}
|
|
1175
|
-
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
1176
|
-
return getSnapshot();
|
|
1177
|
-
}
|
|
1178
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1179
|
-
var React = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState = React.useState, useEffect = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue, didWarnOld18Alpha = !1, didWarnUncachedGetSnapshot = !1, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
1180
|
-
exports.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
|
|
1181
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1182
|
-
})();
|
|
1183
|
-
}));
|
|
1184
|
-
//#endregion
|
|
1185
|
-
//#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/shim/index.js
|
|
1186
|
-
var require_shim = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1187
|
-
if (process.env.NODE_ENV === "production") module.exports = require_use_sync_external_store_shim_production();
|
|
1188
|
-
else module.exports = require_use_sync_external_store_shim_development();
|
|
1189
|
-
}));
|
|
1190
|
-
//#endregion
|
|
1191
1065
|
//#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.4/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js
|
|
1192
1066
|
/**
|
|
1193
1067
|
* @license React
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as RequestLogService, r as TokenService, t as QgridService } from "./services.generated-
|
|
3
|
-
import { a as Link, o as useNavigate } from "./lazyRouteComponent-
|
|
1
|
+
import { D as require_react, E as require_jsx_runtime, ot as __toESM } from "./sd.generated-BZPIp4uL.js";
|
|
2
|
+
import { n as RequestLogService, r as TokenService, t as QgridService } from "./services.generated-BA0gbdmd.js";
|
|
3
|
+
import { a as Link, o as useNavigate } from "./lazyRouteComponent-BJmwxFyJ.js";
|
|
4
4
|
import { n as Route } from "../entry-server.generated.js";
|
|
5
|
-
import { n as formatUsd, t as formatMicroUsd } from "./cost-
|
|
5
|
+
import { n as formatUsd, t as formatMicroUsd } from "./cost-DdHTzQDR.js";
|
|
6
6
|
//#region ~icons/lucide/chevron-left.jsx
|
|
7
7
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
8
8
|
var import_jsx_runtime = require_jsx_runtime();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as TokenService, t as QgridService } from "./services.generated-
|
|
3
|
-
import { n as formatUsd } from "./cost-
|
|
1
|
+
import { C as require_react_dom, D as require_react, E as require_jsx_runtime, T as useQueryClient, ot as __toESM } from "./sd.generated-BZPIp4uL.js";
|
|
2
|
+
import { r as TokenService, t as QgridService } from "./services.generated-BA0gbdmd.js";
|
|
3
|
+
import { n as formatUsd } from "./cost-DdHTzQDR.js";
|
|
4
4
|
//#region ../../node_modules/.pnpm/@dnd-kit+utilities@3.2.2_react@19.2.4/node_modules/@dnd-kit/utilities/dist/utilities.esm.js
|
|
5
5
|
var import_react_dom = /* @__PURE__ */ __toESM(require_react_dom());
|
|
6
6
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
@@ -984,6 +984,92 @@ function getDefaultState$1(options) {
|
|
|
984
984
|
};
|
|
985
985
|
}
|
|
986
986
|
//#endregion
|
|
987
|
+
//#region ../../node_modules/.pnpm/@tanstack+query-core@5.95.2/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js
|
|
988
|
+
function infiniteQueryBehavior(pages) {
|
|
989
|
+
return { onFetch: (context, query) => {
|
|
990
|
+
const options = context.options;
|
|
991
|
+
const direction = context.fetchOptions?.meta?.fetchMore?.direction;
|
|
992
|
+
const oldPages = context.state.data?.pages || [];
|
|
993
|
+
const oldPageParams = context.state.data?.pageParams || [];
|
|
994
|
+
let result = {
|
|
995
|
+
pages: [],
|
|
996
|
+
pageParams: []
|
|
997
|
+
};
|
|
998
|
+
let currentPage = 0;
|
|
999
|
+
const fetchFn = async () => {
|
|
1000
|
+
let cancelled = false;
|
|
1001
|
+
const addSignalProperty = (object) => {
|
|
1002
|
+
addConsumeAwareSignal(object, () => context.signal, () => cancelled = true);
|
|
1003
|
+
};
|
|
1004
|
+
const queryFn = ensureQueryFn(context.options, context.fetchOptions);
|
|
1005
|
+
const fetchPage = async (data, param, previous) => {
|
|
1006
|
+
if (cancelled) return Promise.reject();
|
|
1007
|
+
if (param == null && data.pages.length) return Promise.resolve(data);
|
|
1008
|
+
const createQueryFnContext = () => {
|
|
1009
|
+
const queryFnContext2 = {
|
|
1010
|
+
client: context.client,
|
|
1011
|
+
queryKey: context.queryKey,
|
|
1012
|
+
pageParam: param,
|
|
1013
|
+
direction: previous ? "backward" : "forward",
|
|
1014
|
+
meta: context.options.meta
|
|
1015
|
+
};
|
|
1016
|
+
addSignalProperty(queryFnContext2);
|
|
1017
|
+
return queryFnContext2;
|
|
1018
|
+
};
|
|
1019
|
+
const page = await queryFn(createQueryFnContext());
|
|
1020
|
+
const { maxPages } = context.options;
|
|
1021
|
+
const addTo = previous ? addToStart : addToEnd;
|
|
1022
|
+
return {
|
|
1023
|
+
pages: addTo(data.pages, page, maxPages),
|
|
1024
|
+
pageParams: addTo(data.pageParams, param, maxPages)
|
|
1025
|
+
};
|
|
1026
|
+
};
|
|
1027
|
+
if (direction && oldPages.length) {
|
|
1028
|
+
const previous = direction === "backward";
|
|
1029
|
+
const pageParamFn = previous ? getPreviousPageParam : getNextPageParam;
|
|
1030
|
+
const oldData = {
|
|
1031
|
+
pages: oldPages,
|
|
1032
|
+
pageParams: oldPageParams
|
|
1033
|
+
};
|
|
1034
|
+
result = await fetchPage(oldData, pageParamFn(options, oldData), previous);
|
|
1035
|
+
} else {
|
|
1036
|
+
const remainingPages = pages ?? oldPages.length;
|
|
1037
|
+
do {
|
|
1038
|
+
const param = currentPage === 0 ? oldPageParams[0] ?? options.initialPageParam : getNextPageParam(options, result);
|
|
1039
|
+
if (currentPage > 0 && param == null) break;
|
|
1040
|
+
result = await fetchPage(result, param);
|
|
1041
|
+
currentPage++;
|
|
1042
|
+
} while (currentPage < remainingPages);
|
|
1043
|
+
}
|
|
1044
|
+
return result;
|
|
1045
|
+
};
|
|
1046
|
+
if (context.options.persister) context.fetchFn = () => {
|
|
1047
|
+
return context.options.persister?.(fetchFn, {
|
|
1048
|
+
client: context.client,
|
|
1049
|
+
queryKey: context.queryKey,
|
|
1050
|
+
meta: context.options.meta,
|
|
1051
|
+
signal: context.signal
|
|
1052
|
+
}, query);
|
|
1053
|
+
};
|
|
1054
|
+
else context.fetchFn = fetchFn;
|
|
1055
|
+
} };
|
|
1056
|
+
}
|
|
1057
|
+
function getNextPageParam(options, { pages, pageParams }) {
|
|
1058
|
+
const lastIndex = pages.length - 1;
|
|
1059
|
+
return pages.length > 0 ? options.getNextPageParam(pages[lastIndex], pages, pageParams[lastIndex], pageParams) : void 0;
|
|
1060
|
+
}
|
|
1061
|
+
function getPreviousPageParam(options, { pages, pageParams }) {
|
|
1062
|
+
return pages.length > 0 ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) : void 0;
|
|
1063
|
+
}
|
|
1064
|
+
function hasNextPage(options, data) {
|
|
1065
|
+
if (!data) return false;
|
|
1066
|
+
return getNextPageParam(options, data) != null;
|
|
1067
|
+
}
|
|
1068
|
+
function hasPreviousPage(options, data) {
|
|
1069
|
+
if (!data || !options.getPreviousPageParam) return false;
|
|
1070
|
+
return getPreviousPageParam(options, data) != null;
|
|
1071
|
+
}
|
|
1072
|
+
//#endregion
|
|
987
1073
|
//#region ../../node_modules/.pnpm/@tanstack+query-core@5.95.2/node_modules/@tanstack/query-core/build/modern/mutation.js
|
|
988
1074
|
var Mutation = class extends Removable {
|
|
989
1075
|
#client;
|
|
@@ -21663,6 +21749,41 @@ function josa(word, type) {
|
|
|
21663
21749
|
으로: has받침 ? "으로" : "로"
|
|
21664
21750
|
}[type];
|
|
21665
21751
|
}
|
|
21752
|
+
function dedupeAndFlatten(data) {
|
|
21753
|
+
const seen = /* @__PURE__ */ new Set();
|
|
21754
|
+
const rows = [];
|
|
21755
|
+
for (const page of data.pages) for (const row of page?.rows ?? []) {
|
|
21756
|
+
const id = row?.id;
|
|
21757
|
+
if (id != null) {
|
|
21758
|
+
if (seen.has(id)) continue;
|
|
21759
|
+
seen.add(id);
|
|
21760
|
+
}
|
|
21761
|
+
rows.push(row);
|
|
21762
|
+
}
|
|
21763
|
+
const total = data.pages[0]?.total ?? 0;
|
|
21764
|
+
return {
|
|
21765
|
+
pages: data.pages,
|
|
21766
|
+
pageParams: data.pageParams,
|
|
21767
|
+
rows,
|
|
21768
|
+
total
|
|
21769
|
+
};
|
|
21770
|
+
}
|
|
21771
|
+
function useRefreshable(query) {
|
|
21772
|
+
const [isRefreshing, setIsRefreshing] = (0, import_react.useState)(false);
|
|
21773
|
+
const refresh = (0, import_react.useCallback)(async () => {
|
|
21774
|
+
setIsRefreshing(true);
|
|
21775
|
+
try {
|
|
21776
|
+
await query.refetch();
|
|
21777
|
+
} finally {
|
|
21778
|
+
setIsRefreshing(false);
|
|
21779
|
+
}
|
|
21780
|
+
}, [query]);
|
|
21781
|
+
return {
|
|
21782
|
+
...query,
|
|
21783
|
+
refresh,
|
|
21784
|
+
isRefreshing
|
|
21785
|
+
};
|
|
21786
|
+
}
|
|
21666
21787
|
//#endregion
|
|
21667
21788
|
//#region src/i18n/en.ts
|
|
21668
21789
|
/**
|
|
@@ -22027,4 +22148,4 @@ SD.enumLabels = (enumName) => {
|
|
|
22027
22148
|
} });
|
|
22028
22149
|
};
|
|
22029
22150
|
//#endregion
|
|
22030
|
-
export {
|
|
22151
|
+
export { timeUntilStale as $, hasNextPage as A, hashKey as B, require_react_dom as C, require_react as D, require_jsx_runtime as E, onlineManager as F, noop$1 as G, isValidTimeout as H, notifyManager as I, resolveEnabled as J, partialMatchKey as K, pendingThenable as L, infiniteQueryBehavior as M, Query as N, Mutation as O, fetchState as P, skipToken as Q, environmentManager as R, require_lib as S, useQueryClient as T, matchMutation as U, hashQueryKeyByOptions as V, matchQuery as W, shallowEqualObjects as X, resolveStaleTime as Y, shouldThrowError as Z, date as _, dedupeAndFlatten as a, __require as at, object as b, zArrayable as c, ZodObject as d, timeoutManager as et, ZodOptional as f, custom as g, boolean as h, SonamuQueryMode as i, __exportAll as it, hasPreviousPage as j, getDefaultState as k, ZodArray as l, bigint as m, SUPPORTED_LOCALES as n, Subscribable as nt, fetch$1 as o, __toESM as ot, _enum as p, replaceData as q, setLocale as r, __commonJSMin as rt, useRefreshable as s, SD as t, focusManager as tt, ZodNullable as u, int as v, QueryClientProvider as w, string as x, number as y, functionalUpdate as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { $ as timeUntilStale, A as hasNextPage, B as hashKey, D as require_react, E as require_jsx_runtime, G as noop, H as isValidTimeout, I as notifyManager, J as resolveEnabled, L as pendingThenable, M as infiniteQueryBehavior, P as fetchState, R as environmentManager, S as require_lib, T as useQueryClient, X as shallowEqualObjects, Y as resolveStaleTime, Z as shouldThrowError, a as dedupeAndFlatten, et as timeoutManager, j as hasPreviousPage, k as getDefaultState, nt as Subscribable, o as fetch, ot as __toESM, q as replaceData, s as useRefreshable, tt as focusManager } from "./sd.generated-BZPIp4uL.js";
|
|
2
2
|
//#region ../../node_modules/.pnpm/@tanstack+query-core@5.95.2/node_modules/@tanstack/query-core/build/modern/queryObserver.js
|
|
3
3
|
var QueryObserver = class extends Subscribable {
|
|
4
4
|
constructor(client, options) {
|
|
@@ -342,6 +342,63 @@ function shouldAssignObserverCurrentProperties(observer, optimisticResult) {
|
|
|
342
342
|
return false;
|
|
343
343
|
}
|
|
344
344
|
//#endregion
|
|
345
|
+
//#region ../../node_modules/.pnpm/@tanstack+query-core@5.95.2/node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js
|
|
346
|
+
var InfiniteQueryObserver = class extends QueryObserver {
|
|
347
|
+
constructor(client, options) {
|
|
348
|
+
super(client, options);
|
|
349
|
+
}
|
|
350
|
+
bindMethods() {
|
|
351
|
+
super.bindMethods();
|
|
352
|
+
this.fetchNextPage = this.fetchNextPage.bind(this);
|
|
353
|
+
this.fetchPreviousPage = this.fetchPreviousPage.bind(this);
|
|
354
|
+
}
|
|
355
|
+
setOptions(options) {
|
|
356
|
+
super.setOptions({
|
|
357
|
+
...options,
|
|
358
|
+
behavior: infiniteQueryBehavior()
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
getOptimisticResult(options) {
|
|
362
|
+
options.behavior = infiniteQueryBehavior();
|
|
363
|
+
return super.getOptimisticResult(options);
|
|
364
|
+
}
|
|
365
|
+
fetchNextPage(options) {
|
|
366
|
+
return this.fetch({
|
|
367
|
+
...options,
|
|
368
|
+
meta: { fetchMore: { direction: "forward" } }
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
fetchPreviousPage(options) {
|
|
372
|
+
return this.fetch({
|
|
373
|
+
...options,
|
|
374
|
+
meta: { fetchMore: { direction: "backward" } }
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
createResult(query, options) {
|
|
378
|
+
const { state } = query;
|
|
379
|
+
const parentResult = super.createResult(query, options);
|
|
380
|
+
const { isFetching, isRefetching, isError, isRefetchError } = parentResult;
|
|
381
|
+
const fetchDirection = state.fetchMeta?.fetchMore?.direction;
|
|
382
|
+
const isFetchNextPageError = isError && fetchDirection === "forward";
|
|
383
|
+
const isFetchingNextPage = isFetching && fetchDirection === "forward";
|
|
384
|
+
const isFetchPreviousPageError = isError && fetchDirection === "backward";
|
|
385
|
+
const isFetchingPreviousPage = isFetching && fetchDirection === "backward";
|
|
386
|
+
return {
|
|
387
|
+
...parentResult,
|
|
388
|
+
fetchNextPage: this.fetchNextPage,
|
|
389
|
+
fetchPreviousPage: this.fetchPreviousPage,
|
|
390
|
+
hasNextPage: hasNextPage(options, state.data),
|
|
391
|
+
hasPreviousPage: hasPreviousPage(options, state.data),
|
|
392
|
+
isFetchNextPageError,
|
|
393
|
+
isFetchingNextPage,
|
|
394
|
+
isFetchPreviousPageError,
|
|
395
|
+
isFetchingPreviousPage,
|
|
396
|
+
isRefetchError: isRefetchError && !isFetchNextPageError && !isFetchPreviousPageError,
|
|
397
|
+
isRefetching: isRefetching && !isFetchingNextPage && !isFetchingPreviousPage
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
//#endregion
|
|
345
402
|
//#region ../../node_modules/.pnpm/@tanstack+query-core@5.95.2/node_modules/@tanstack/query-core/build/modern/mutationObserver.js
|
|
346
403
|
var MutationObserver = class extends Subscribable {
|
|
347
404
|
#client;
|
|
@@ -556,6 +613,11 @@ function queryOptions(options) {
|
|
|
556
613
|
return options;
|
|
557
614
|
}
|
|
558
615
|
//#endregion
|
|
616
|
+
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.95.2_react@19.2.4/node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.js
|
|
617
|
+
function infiniteQueryOptions(options) {
|
|
618
|
+
return options;
|
|
619
|
+
}
|
|
620
|
+
//#endregion
|
|
559
621
|
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.95.2_react@19.2.4/node_modules/@tanstack/react-query/build/modern/useMutation.js
|
|
560
622
|
function useMutation(options, queryClient) {
|
|
561
623
|
const client = useQueryClient(queryClient);
|
|
@@ -575,6 +637,11 @@ function useMutation(options, queryClient) {
|
|
|
575
637
|
};
|
|
576
638
|
}
|
|
577
639
|
//#endregion
|
|
640
|
+
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.95.2_react@19.2.4/node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js
|
|
641
|
+
function useInfiniteQuery(options, queryClient) {
|
|
642
|
+
return useBaseQuery(options, InfiniteQueryObserver, queryClient);
|
|
643
|
+
}
|
|
644
|
+
//#endregion
|
|
578
645
|
//#region src/services/services.generated.ts
|
|
579
646
|
var import_lib = /* @__PURE__ */ __toESM(require_lib(), 1);
|
|
580
647
|
var TokenService;
|
|
@@ -598,10 +665,10 @@ var TokenService;
|
|
|
598
665
|
],
|
|
599
666
|
queryFn: () => getToken(subset, id)
|
|
600
667
|
});
|
|
601
|
-
_TokenService.useToken = (subset, id, options) => useQuery({
|
|
668
|
+
_TokenService.useToken = (subset, id, options) => useRefreshable(useQuery({
|
|
602
669
|
...getTokenQueryOptions(subset, id),
|
|
603
670
|
...options
|
|
604
|
-
});
|
|
671
|
+
}));
|
|
605
672
|
async function getTokens(subset, rawParams) {
|
|
606
673
|
return fetch({
|
|
607
674
|
method: "GET",
|
|
@@ -621,10 +688,33 @@ var TokenService;
|
|
|
621
688
|
],
|
|
622
689
|
queryFn: () => getTokens(subset, rawParams)
|
|
623
690
|
});
|
|
624
|
-
_TokenService.useTokens = (subset, rawParams, options) => useQuery({
|
|
691
|
+
_TokenService.useTokens = (subset, rawParams, options) => useRefreshable(useQuery({
|
|
625
692
|
...getTokensQueryOptions(subset, rawParams),
|
|
626
693
|
...options
|
|
694
|
+
}));
|
|
695
|
+
const getTokensInfiniteQueryOptions = _TokenService.getTokensInfiniteQueryOptions = (subset, rawParams) => infiniteQueryOptions({
|
|
696
|
+
queryKey: [
|
|
697
|
+
"Token",
|
|
698
|
+
"getTokens",
|
|
699
|
+
"infinite",
|
|
700
|
+
subset,
|
|
701
|
+
rawParams
|
|
702
|
+
],
|
|
703
|
+
queryFn: ({ pageParam }) => getTokens(subset, {
|
|
704
|
+
...rawParams,
|
|
705
|
+
page: pageParam
|
|
706
|
+
}),
|
|
707
|
+
initialPageParam: 1,
|
|
708
|
+
getNextPageParam: (lastPage, allPages) => {
|
|
709
|
+
const total = lastPage?.total ?? 0;
|
|
710
|
+
return allPages.reduce((sum, p) => sum + (p?.rows?.length ?? 0), 0) < total ? allPages.length + 1 : void 0;
|
|
711
|
+
},
|
|
712
|
+
select: dedupeAndFlatten
|
|
627
713
|
});
|
|
714
|
+
_TokenService.useTokensInfinite = (subset, rawParams, options) => useRefreshable(useInfiniteQuery({
|
|
715
|
+
...getTokensInfiniteQueryOptions(subset, rawParams),
|
|
716
|
+
...options
|
|
717
|
+
}));
|
|
628
718
|
async function save(spa) {
|
|
629
719
|
return fetch({
|
|
630
720
|
method: "POST",
|
|
@@ -674,10 +764,10 @@ var RequestLogService;
|
|
|
674
764
|
],
|
|
675
765
|
queryFn: () => getRequestLog(subset, id)
|
|
676
766
|
});
|
|
677
|
-
_RequestLogService.useRequestLog = (subset, id, options) => useQuery({
|
|
767
|
+
_RequestLogService.useRequestLog = (subset, id, options) => useRefreshable(useQuery({
|
|
678
768
|
...getRequestLogQueryOptions(subset, id),
|
|
679
769
|
...options
|
|
680
|
-
});
|
|
770
|
+
}));
|
|
681
771
|
async function getRequestLogs(subset, rawParams) {
|
|
682
772
|
return fetch({
|
|
683
773
|
method: "GET",
|
|
@@ -697,10 +787,33 @@ var RequestLogService;
|
|
|
697
787
|
],
|
|
698
788
|
queryFn: () => getRequestLogs(subset, rawParams)
|
|
699
789
|
});
|
|
700
|
-
_RequestLogService.useRequestLogs = (subset, rawParams, options) => useQuery({
|
|
790
|
+
_RequestLogService.useRequestLogs = (subset, rawParams, options) => useRefreshable(useQuery({
|
|
701
791
|
...getRequestLogsQueryOptions(subset, rawParams),
|
|
702
792
|
...options
|
|
793
|
+
}));
|
|
794
|
+
const getRequestLogsInfiniteQueryOptions = _RequestLogService.getRequestLogsInfiniteQueryOptions = (subset, rawParams) => infiniteQueryOptions({
|
|
795
|
+
queryKey: [
|
|
796
|
+
"RequestLog",
|
|
797
|
+
"getRequestLogs",
|
|
798
|
+
"infinite",
|
|
799
|
+
subset,
|
|
800
|
+
rawParams
|
|
801
|
+
],
|
|
802
|
+
queryFn: ({ pageParam }) => getRequestLogs(subset, {
|
|
803
|
+
...rawParams,
|
|
804
|
+
page: pageParam
|
|
805
|
+
}),
|
|
806
|
+
initialPageParam: 1,
|
|
807
|
+
getNextPageParam: (lastPage, allPages) => {
|
|
808
|
+
const total = lastPage?.total ?? 0;
|
|
809
|
+
return allPages.reduce((sum, p) => sum + (p?.rows?.length ?? 0), 0) < total ? allPages.length + 1 : void 0;
|
|
810
|
+
},
|
|
811
|
+
select: dedupeAndFlatten
|
|
703
812
|
});
|
|
813
|
+
_RequestLogService.useRequestLogsInfinite = (subset, rawParams, options) => useRefreshable(useInfiniteQuery({
|
|
814
|
+
...getRequestLogsInfiniteQueryOptions(subset, rawParams),
|
|
815
|
+
...options
|
|
816
|
+
}));
|
|
704
817
|
async function save(spa) {
|
|
705
818
|
return fetch({
|
|
706
819
|
method: "POST",
|
|
@@ -722,19 +835,20 @@ var RequestLogService;
|
|
|
722
835
|
})(RequestLogService || (RequestLogService = {}));
|
|
723
836
|
var QgridService;
|
|
724
837
|
(function(_QgridService) {
|
|
725
|
-
async function query(prompt, system, timeout) {
|
|
838
|
+
async function query(prompt, system, timeout, model) {
|
|
726
839
|
return fetch({
|
|
727
840
|
method: "POST",
|
|
728
841
|
url: `/api/qgrid/query`,
|
|
729
842
|
data: {
|
|
730
843
|
prompt,
|
|
731
844
|
system,
|
|
732
|
-
timeout
|
|
845
|
+
timeout,
|
|
846
|
+
model
|
|
733
847
|
}
|
|
734
848
|
});
|
|
735
849
|
}
|
|
736
850
|
_QgridService.query = query;
|
|
737
|
-
_QgridService.useQueryMutation = () => useMutation({ mutationFn: (params) => query(params.prompt, params.system, params.timeout) });
|
|
851
|
+
_QgridService.useQueryMutation = () => useMutation({ mutationFn: (params) => query(params.prompt, params.system, params.timeout, params.model) });
|
|
738
852
|
async function stats() {
|
|
739
853
|
return fetch({
|
|
740
854
|
method: "GET",
|
|
@@ -746,10 +860,10 @@ var QgridService;
|
|
|
746
860
|
queryKey: ["Qgrid", "stats"],
|
|
747
861
|
queryFn: () => stats()
|
|
748
862
|
});
|
|
749
|
-
_QgridService.useStats = (options) => useQuery({
|
|
863
|
+
_QgridService.useStats = (options) => useRefreshable(useQuery({
|
|
750
864
|
...statsQueryOptions(),
|
|
751
865
|
...options
|
|
752
|
-
});
|
|
866
|
+
}));
|
|
753
867
|
async function totalCost(tokenName) {
|
|
754
868
|
return fetch({
|
|
755
869
|
method: "GET",
|
|
@@ -765,10 +879,10 @@ var QgridService;
|
|
|
765
879
|
],
|
|
766
880
|
queryFn: () => totalCost(tokenName)
|
|
767
881
|
});
|
|
768
|
-
_QgridService.useTotalCost = (tokenName, options) => useQuery({
|
|
882
|
+
_QgridService.useTotalCost = (tokenName, options) => useRefreshable(useQuery({
|
|
769
883
|
...totalCostQueryOptions(tokenName),
|
|
770
884
|
...options
|
|
771
|
-
});
|
|
885
|
+
}));
|
|
772
886
|
async function addToken(token, name, refreshToken) {
|
|
773
887
|
return fetch({
|
|
774
888
|
method: "POST",
|
|
@@ -838,10 +952,10 @@ var QgridService;
|
|
|
838
952
|
],
|
|
839
953
|
queryFn: () => usage(tokenName)
|
|
840
954
|
});
|
|
841
|
-
_QgridService.useUsage = (tokenName, options) => useQuery({
|
|
955
|
+
_QgridService.useUsage = (tokenName, options) => useRefreshable(useQuery({
|
|
842
956
|
...usageQueryOptions(tokenName),
|
|
843
957
|
...options
|
|
844
|
-
});
|
|
958
|
+
}));
|
|
845
959
|
async function health() {
|
|
846
960
|
return fetch({
|
|
847
961
|
method: "GET",
|
|
@@ -853,12 +967,12 @@ var QgridService;
|
|
|
853
967
|
queryKey: ["Qgrid", "health"],
|
|
854
968
|
queryFn: () => health()
|
|
855
969
|
});
|
|
856
|
-
_QgridService.useHealth = (options) => useQuery({
|
|
970
|
+
_QgridService.useHealth = (options) => useRefreshable(useQuery({
|
|
857
971
|
...healthQueryOptions(),
|
|
858
972
|
...options
|
|
859
|
-
});
|
|
973
|
+
}));
|
|
860
974
|
})(QgridService || (QgridService = {}));
|
|
861
|
-
RequestLogService.useRequestLogs;
|
|
862
|
-
TokenService.useTokens;
|
|
975
|
+
RequestLogService.useRequestLogs, RequestLogService.useRequestLogsInfinite;
|
|
976
|
+
TokenService.useTokens, TokenService.useTokensInfinite;
|
|
863
977
|
//#endregion
|
|
864
978
|
export { RequestLogService as n, TokenService as r, QgridService as t };
|