@cartanova/qgrid-cli 1.5.4 → 1.5.6
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/pool.js +2 -2
- package/bundle/dist/application/qgrid/worker.js +10 -4
- 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/i18n/sd.generated.js +2 -2
- package/bundle/src/application/qgrid/pool.ts +1 -1
- package/bundle/src/application/qgrid/worker.ts +8 -2
- package/bundle/src/application/queries.generated.ts +1 -0
- package/bundle/src/application/sonamu.generated.sso.ts +6 -5
- package/bundle/src/application/sonamu.generated.ts +1 -0
- package/bundle/src/i18n/sd.generated.ts +1 -1
- package/bundle/web-dist/client/assets/index-BRZCFaFz.css +1 -0
- package/bundle/web-dist/client/assets/index-BnqlZB1V.js +78 -0
- package/bundle/web-dist/client/assets/logs-KoJtGoEG.js +1 -0
- package/bundle/web-dist/client/assets/{routes-MR1DKizN.js → routes-CqzIoGYg.js} +1 -1
- package/bundle/web-dist/client/assets/sd.generated-Duipc8HN.js +47 -0
- package/bundle/web-dist/client/assets/services.generated-Ccs6tru4.js +1 -0
- package/bundle/web-dist/client/assets/{show-DaKh4LaA.js → show-BuMxiSr1.js} +1 -1
- package/bundle/web-dist/client/assets/tokens--z-eVto5.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-BPyN_0Dp.js} +1 -1
- package/bundle/web-dist/server/assets/{lazyRouteComponent-B78WDGgM.js → lazyRouteComponent-Bmjwy0OA.js} +2 -128
- package/bundle/web-dist/server/assets/{logs-Dcv1XCUK.js → logs-BgcF7jVg.js} +29 -9
- package/bundle/web-dist/server/assets/{routes-B5FkWLUe.js → routes-DVA-nsZ-.js} +3 -3
- package/bundle/web-dist/server/assets/{sd.generated-Mnbmi4YR.js → sd.generated-CDVQy4CJ.js} +122 -1
- package/bundle/web-dist/server/assets/{services.generated-DjdxFvCg.js → services.generated-DWyvb1vb.js} +130 -17
- package/bundle/web-dist/server/assets/shim-CqVZY710.js +129 -0
- package/bundle/web-dist/server/assets/{show-BqSxVXai.js → show-BnKnfNFP.js} +4 -4
- package/bundle/web-dist/server/assets/{tokens-BGaTdsEb.js → tokens-7z55hPRV.js} +10 -10
- package/bundle/web-dist/server/entry-server.generated.js +19679 -17705
- package/package.json +2 -2
- package/bundle/web-dist/client/assets/index-CiLfNFWG.js +0 -116
- package/bundle/web-dist/client/assets/index-kQRqXaWM.css +0 -1
- package/bundle/web-dist/client/assets/logs-9Q-LQWWo.js +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-FnhMN5oT.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-BnqlZB1V.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-Duipc8HN.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_jsx_runtime, O as require_react } from "./sd.generated-CDVQy4CJ.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 { D as require_jsx_runtime, O as require_react, it as __commonJSMin, st as __toESM, w as require_react_dom } from "./sd.generated-CDVQy4CJ.js";
|
|
2
|
+
import { t as require_shim } from "./shim-CqVZY710.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 { o as useNavigate } from "./lazyRouteComponent-
|
|
1
|
+
import { D as require_jsx_runtime, O as require_react, st as __toESM } from "./sd.generated-CDVQy4CJ.js";
|
|
2
|
+
import { n as RequestLogService, r as TokenService, t as QgridService } from "./services.generated-DWyvb1vb.js";
|
|
3
|
+
import { a as Link, o as useNavigate } from "./lazyRouteComponent-Bmjwy0OA.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();
|
|
@@ -112,6 +112,10 @@ function RequestLogTable({ page: externalPage, onPageChange } = {}) {
|
|
|
112
112
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", {
|
|
113
113
|
className: "border-b border-sand-200",
|
|
114
114
|
children: [
|
|
115
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
|
|
116
|
+
className: "text-left px-3 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium",
|
|
117
|
+
children: "ID"
|
|
118
|
+
}),
|
|
115
119
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
|
|
116
120
|
className: "text-left px-3 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium",
|
|
117
121
|
children: "Date"
|
|
@@ -154,11 +158,27 @@ function RequestLogTable({ page: externalPage, onPageChange } = {}) {
|
|
|
154
158
|
className: "divide-y divide-sand-200/60",
|
|
155
159
|
children: rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", {
|
|
156
160
|
className: "transition-colors duration-150 hover:bg-sand-100/60 cursor-pointer",
|
|
157
|
-
onClick: () =>
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
+
onClick: (e) => {
|
|
162
|
+
if (e.metaKey || e.ctrlKey) {
|
|
163
|
+
window.open(`/requests/show?id=${row.id}`, "_blank");
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
navigate({
|
|
167
|
+
to: "/requests/show",
|
|
168
|
+
search: { id: row.id }
|
|
169
|
+
});
|
|
170
|
+
},
|
|
161
171
|
children: [
|
|
172
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
173
|
+
className: "px-3 py-2.5",
|
|
174
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
|
|
175
|
+
to: "/requests/show",
|
|
176
|
+
search: { id: row.id },
|
|
177
|
+
onClick: (e) => e.stopPropagation(),
|
|
178
|
+
className: "text-xs text-sand-500 tabular-nums hover:text-sienna-500",
|
|
179
|
+
children: row.id
|
|
180
|
+
})
|
|
181
|
+
}),
|
|
162
182
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
163
183
|
className: "px-3 py-2.5",
|
|
164
184
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
@@ -203,7 +223,7 @@ function RequestLogTable({ page: externalPage, onPageChange } = {}) {
|
|
|
203
223
|
}),
|
|
204
224
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
205
225
|
className: "px-3 py-2.5 text-right tabular-nums text-sand-700",
|
|
206
|
-
children: row.cost_usd
|
|
226
|
+
children: row.cost_usd !== null ? formatMicroUsd(row.cost_usd) : "-"
|
|
207
227
|
}),
|
|
208
228
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
|
|
209
229
|
className: "px-2 py-2.5",
|
|
@@ -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 { D as require_jsx_runtime, E as useQueryClient, O as require_react, st as __toESM, w as require_react_dom } from "./sd.generated-CDVQy4CJ.js";
|
|
2
|
+
import { r as TokenService, t as QgridService } from "./services.generated-DWyvb1vb.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 { skipToken as $, getDefaultState as A, functionalUpdate as B, require_lib as C, require_jsx_runtime as D, useQueryClient as E, fetchState as F, matchQuery as G, hashQueryKeyByOptions as H, onlineManager as I, replaceData as J, noop$1 as K, notifyManager as L, hasPreviousPage as M, infiniteQueryBehavior as N, require_react as O, Query as P, shouldThrowError as Q, pendingThenable as R, string as S, QueryClientProvider as T, isValidTimeout as U, hashKey as V, matchMutation as W, resolveStaleTime as X, resolveEnabled as Y, shallowEqualObjects as Z, custom as _, dedupeAndFlatten as a, __exportAll as at, number as b, zArrayable as c, ZodObject as d, timeUntilStale as et, ZodOptional as f, boolean as g, bigint as h, SonamuQueryMode as i, __commonJSMin as it, hasNextPage as j, Mutation as k, ZodArray as l, array as m, SUPPORTED_LOCALES as n, focusManager as nt, fetch$1 as o, __require as ot, _enum as p, partialMatchKey as q, setLocale as r, Subscribable as rt, useRefreshable as s, __toESM as st, SD as t, timeoutManager as tt, ZodNullable as u, date as v, require_react_dom as w, object as x, int as y, environmentManager as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as getDefaultState, C as require_lib, D as require_jsx_runtime, E as useQueryClient, F as fetchState, J as replaceData, K as noop, L as notifyManager, M as hasPreviousPage, N as infiniteQueryBehavior, O as require_react, Q as shouldThrowError, R as pendingThenable, U as isValidTimeout, V as hashKey, X as resolveStaleTime, Y as resolveEnabled, Z as shallowEqualObjects, a as dedupeAndFlatten, et as timeUntilStale, j as hasNextPage, nt as focusManager, o as fetch, rt as Subscribable, s as useRefreshable, st as __toESM, tt as timeoutManager, z as environmentManager } from "./sd.generated-CDVQy4CJ.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",
|
|
@@ -746,10 +859,10 @@ var QgridService;
|
|
|
746
859
|
queryKey: ["Qgrid", "stats"],
|
|
747
860
|
queryFn: () => stats()
|
|
748
861
|
});
|
|
749
|
-
_QgridService.useStats = (options) => useQuery({
|
|
862
|
+
_QgridService.useStats = (options) => useRefreshable(useQuery({
|
|
750
863
|
...statsQueryOptions(),
|
|
751
864
|
...options
|
|
752
|
-
});
|
|
865
|
+
}));
|
|
753
866
|
async function totalCost(tokenName) {
|
|
754
867
|
return fetch({
|
|
755
868
|
method: "GET",
|
|
@@ -765,10 +878,10 @@ var QgridService;
|
|
|
765
878
|
],
|
|
766
879
|
queryFn: () => totalCost(tokenName)
|
|
767
880
|
});
|
|
768
|
-
_QgridService.useTotalCost = (tokenName, options) => useQuery({
|
|
881
|
+
_QgridService.useTotalCost = (tokenName, options) => useRefreshable(useQuery({
|
|
769
882
|
...totalCostQueryOptions(tokenName),
|
|
770
883
|
...options
|
|
771
|
-
});
|
|
884
|
+
}));
|
|
772
885
|
async function addToken(token, name, refreshToken) {
|
|
773
886
|
return fetch({
|
|
774
887
|
method: "POST",
|
|
@@ -838,10 +951,10 @@ var QgridService;
|
|
|
838
951
|
],
|
|
839
952
|
queryFn: () => usage(tokenName)
|
|
840
953
|
});
|
|
841
|
-
_QgridService.useUsage = (tokenName, options) => useQuery({
|
|
954
|
+
_QgridService.useUsage = (tokenName, options) => useRefreshable(useQuery({
|
|
842
955
|
...usageQueryOptions(tokenName),
|
|
843
956
|
...options
|
|
844
|
-
});
|
|
957
|
+
}));
|
|
845
958
|
async function health() {
|
|
846
959
|
return fetch({
|
|
847
960
|
method: "GET",
|
|
@@ -853,12 +966,12 @@ var QgridService;
|
|
|
853
966
|
queryKey: ["Qgrid", "health"],
|
|
854
967
|
queryFn: () => health()
|
|
855
968
|
});
|
|
856
|
-
_QgridService.useHealth = (options) => useQuery({
|
|
969
|
+
_QgridService.useHealth = (options) => useRefreshable(useQuery({
|
|
857
970
|
...healthQueryOptions(),
|
|
858
971
|
...options
|
|
859
|
-
});
|
|
972
|
+
}));
|
|
860
973
|
})(QgridService || (QgridService = {}));
|
|
861
|
-
RequestLogService.useRequestLogs;
|
|
862
|
-
TokenService.useTokens;
|
|
974
|
+
RequestLogService.useRequestLogs, RequestLogService.useRequestLogsInfinite;
|
|
975
|
+
TokenService.useTokens, TokenService.useTokensInfinite;
|
|
863
976
|
//#endregion
|
|
864
977
|
export { RequestLogService as n, TokenService as r, QgridService as t };
|