@godxjp/ui 8.2.0 → 9.0.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/dist/{chunk-3EMDVI7X.js → chunk-2ACNEQOI.js} +1 -1
- package/dist/{chunk-PZ4LO723.js → chunk-32ZUUKML.js} +19 -10
- package/dist/{chunk-YXJ3FS6O.js → chunk-442ULAA6.js} +12 -4
- package/dist/{chunk-C5H655GK.js → chunk-6PA2YHRE.js} +129 -30
- package/dist/chunk-B73NA66T.js +122 -0
- package/dist/chunk-HCM4JAC2.js +134 -0
- package/dist/chunk-HL3G4SVG.js +131 -0
- package/dist/{chunk-3FUXNL5A.js → chunk-INSF6K3Y.js} +4 -40
- package/dist/chunk-JKHWLPM5.js +101 -0
- package/dist/{chunk-MISVV4IT.js → chunk-JOLM73YQ.js} +1 -1
- package/dist/chunk-LFW37FGG.js +68 -0
- package/dist/{chunk-67HEX3OS.js → chunk-LJLGABFV.js} +2 -2
- package/dist/{chunk-IAKROVSG.js → chunk-N3JPLJ3B.js} +2 -2
- package/dist/chunk-QLMXEJSY.js +114 -0
- package/dist/{chunk-SEG2YBXF.js → chunk-QTUJSRDH.js} +9 -1
- package/dist/{chunk-Q7AU6WDX.js → chunk-RSC5K7RP.js} +1 -1
- package/dist/{chunk-V45EK6S7.js → chunk-TBXQJCBQ.js} +1 -1
- package/dist/chunk-W4REF4TD.js +42 -0
- package/dist/chunk-WGWI7EGL.js +83 -0
- package/dist/{chunk-TMDGV4CN.js → chunk-ZRRLOOBX.js} +1 -10
- package/dist/components/admin/index.d.ts +5 -23
- package/dist/components/admin/index.js +23 -19
- package/dist/components/data-display/carousel.d.ts +25 -0
- package/dist/components/data-display/carousel.js +2 -0
- package/dist/components/data-display/index.d.ts +2 -0
- package/dist/components/data-display/index.js +4 -3
- package/dist/components/data-entry/autocomplete.js +3 -3
- package/dist/components/data-entry/calendar.js +2 -2
- package/dist/components/data-entry/cascader.js +2 -2
- package/dist/components/data-entry/combobox.d.ts +22 -0
- package/dist/components/data-entry/combobox.js +6 -0
- package/dist/components/data-entry/command.d.ts +1 -1
- package/dist/components/data-entry/date-picker.js +3 -3
- package/dist/components/data-entry/date-range-picker.js +3 -3
- package/dist/components/data-entry/index.d.ts +2 -0
- package/dist/components/data-entry/index.js +19 -16
- package/dist/components/data-entry/select.js +3 -3
- package/dist/components/data-entry/time-input.d.ts +12 -0
- package/dist/components/data-entry/time-input.js +3 -0
- package/dist/components/data-entry/time-picker.js +2 -2
- package/dist/components/data-entry/transfer.js +4 -3
- package/dist/components/data-entry/tree-select.js +2 -2
- package/dist/components/data-entry/upload.js +3 -3
- package/dist/components/feedback/alert.js +1 -1
- package/dist/components/feedback/index.js +3 -3
- package/dist/components/layout/index.d.ts +9 -6
- package/dist/components/layout/index.js +2 -1
- package/dist/components/layout/resizable.d.ts +18 -0
- package/dist/components/layout/resizable.js +2 -0
- package/dist/components/navigation/context-menu.d.ts +25 -0
- package/dist/components/navigation/context-menu.js +2 -0
- package/dist/components/navigation/index.d.ts +9 -2
- package/dist/components/navigation/index.js +9 -6
- package/dist/components/navigation/menubar.d.ts +29 -0
- package/dist/components/navigation/menubar.js +2 -0
- package/dist/components/navigation/navigation-menu.d.ts +13 -0
- package/dist/components/navigation/navigation-menu.js +2 -0
- package/dist/components/navigation/pagination.js +4 -4
- package/dist/components/query/index.d.ts +2 -2
- package/dist/components/query/index.js +193 -4
- package/dist/components/ui/index.d.ts +13 -0
- package/dist/components/ui/index.js +26 -19
- package/dist/{filter-bar-DvVXm_d1.d.ts → filter-bar-BycYH10i.d.ts} +3 -3
- package/dist/form/index.js +71 -3
- package/dist/index.d.ts +5 -13
- package/dist/index.js +34 -29
- package/dist/{inline-DqfYlGKj.d.ts → inline-DCqn4O29.d.ts} +2 -2
- package/dist/{layout.prop-Baq9muDN.d.ts → layout.prop-DwJKI6ka.d.ts} +2 -0
- package/dist/lib/hooks.d.ts +17 -0
- package/dist/lib/hooks.js +1 -0
- package/dist/props/components/index.d.ts +2 -2
- package/dist/props/index.d.ts +2 -2
- package/dist/props/index.js +1 -1
- package/dist/props/registry.js +1 -1
- package/dist/{query.prop-DuODxsiU.d.ts → query.prop-BDdz9L1G.d.ts} +1 -1
- package/dist/styles/data-display-layout.css +55 -0
- package/dist/styles/data-entry-layout.css +93 -0
- package/dist/styles/index.css +2 -0
- package/dist/styles/layout.css +35 -3
- package/dist/styles/navigation-layout.css +271 -0
- package/package.json +41 -3
- package/dist/chunk-7WRZG2IG.js +0 -71
- package/dist/chunk-N43OKOFT.js +0 -193
- package/dist/{chunk-TV7WEENM.js → chunk-6J7GRCDA.js} +1 -1
- package/dist/{chunk-RGPF3HU6.js → chunk-6YBYAEXD.js} +1 -1
- package/dist/{chunk-WY4RSEYC.js → chunk-GKED65NV.js} +1 -1
- package/dist/{chunk-PKGPNZA4.js → chunk-HB2OHB5X.js} +1 -1
- package/dist/{chunk-7577VIAC.js → chunk-IOGU3ZWF.js} +1 -1
- package/dist/{chunk-N5SDFNSJ.js → chunk-JBHXILI4.js} +1 -1
- package/dist/{chunk-HKD6ERY7.js → chunk-LDSLS6HE.js} +0 -0
- package/dist/{chunk-NGT3I6OG.js → chunk-Z6HNY2PL.js} +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@godxjp/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "@godxjp/ui — shared React UI framework (shadcn + Radix + Tailwind v4).",
|
|
6
6
|
"files": [
|
|
@@ -89,6 +89,10 @@
|
|
|
89
89
|
"types": "./dist/lib/utils.d.ts",
|
|
90
90
|
"import": "./dist/lib/utils.js"
|
|
91
91
|
},
|
|
92
|
+
"./hooks": {
|
|
93
|
+
"types": "./dist/lib/hooks.d.ts",
|
|
94
|
+
"import": "./dist/lib/hooks.js"
|
|
95
|
+
},
|
|
92
96
|
"./ui/button": {
|
|
93
97
|
"types": "./dist/components/general/button.d.ts",
|
|
94
98
|
"import": "./dist/components/general/button.js"
|
|
@@ -165,6 +169,10 @@
|
|
|
165
169
|
"types": "./dist/components/data-entry/cascader.d.ts",
|
|
166
170
|
"import": "./dist/components/data-entry/cascader.js"
|
|
167
171
|
},
|
|
172
|
+
"./ui/carousel": {
|
|
173
|
+
"types": "./dist/components/data-display/carousel.d.ts",
|
|
174
|
+
"import": "./dist/components/data-display/carousel.js"
|
|
175
|
+
},
|
|
168
176
|
"./ui/tree-select": {
|
|
169
177
|
"types": "./dist/components/data-entry/tree-select.d.ts",
|
|
170
178
|
"import": "./dist/components/data-entry/tree-select.js"
|
|
@@ -173,10 +181,30 @@
|
|
|
173
181
|
"types": "./dist/components/data-entry/transfer.d.ts",
|
|
174
182
|
"import": "./dist/components/data-entry/transfer.js"
|
|
175
183
|
},
|
|
184
|
+
"./ui/combobox": {
|
|
185
|
+
"types": "./dist/components/data-entry/combobox.d.ts",
|
|
186
|
+
"import": "./dist/components/data-entry/combobox.js"
|
|
187
|
+
},
|
|
176
188
|
"./ui/command": {
|
|
177
189
|
"types": "./dist/components/data-entry/command.d.ts",
|
|
178
190
|
"import": "./dist/components/data-entry/command.js"
|
|
179
191
|
},
|
|
192
|
+
"./ui/context-menu": {
|
|
193
|
+
"types": "./dist/components/navigation/context-menu.d.ts",
|
|
194
|
+
"import": "./dist/components/navigation/context-menu.js"
|
|
195
|
+
},
|
|
196
|
+
"./ui/menubar": {
|
|
197
|
+
"types": "./dist/components/navigation/menubar.d.ts",
|
|
198
|
+
"import": "./dist/components/navigation/menubar.js"
|
|
199
|
+
},
|
|
200
|
+
"./ui/navigation-menu": {
|
|
201
|
+
"types": "./dist/components/navigation/navigation-menu.d.ts",
|
|
202
|
+
"import": "./dist/components/navigation/navigation-menu.js"
|
|
203
|
+
},
|
|
204
|
+
"./ui/resizable": {
|
|
205
|
+
"types": "./dist/components/layout/resizable.d.ts",
|
|
206
|
+
"import": "./dist/components/layout/resizable.js"
|
|
207
|
+
},
|
|
180
208
|
"./ui/scroll-area": {
|
|
181
209
|
"types": "./dist/components/data-display/scroll-area.d.ts",
|
|
182
210
|
"import": "./dist/components/data-display/scroll-area.js"
|
|
@@ -189,6 +217,10 @@
|
|
|
189
217
|
"types": "./dist/components/data-entry/textarea.d.ts",
|
|
190
218
|
"import": "./dist/components/data-entry/textarea.js"
|
|
191
219
|
},
|
|
220
|
+
"./ui/time-input": {
|
|
221
|
+
"types": "./dist/components/data-entry/time-input.d.ts",
|
|
222
|
+
"import": "./dist/components/data-entry/time-input.js"
|
|
223
|
+
},
|
|
192
224
|
"./ui/dialog": {
|
|
193
225
|
"types": "./dist/components/feedback/dialog.d.ts",
|
|
194
226
|
"import": "./dist/components/feedback/dialog.js"
|
|
@@ -235,12 +267,13 @@
|
|
|
235
267
|
"test": "vitest run",
|
|
236
268
|
"test:watch": "vitest",
|
|
237
269
|
"test:coverage": "vitest run --coverage",
|
|
238
|
-
"verify": "pnpm typecheck && pnpm lint && pnpm format && pnpm check:prop-vocabulary && pnpm check:token-tiers && pnpm check:mcp-sync && pnpm check:mcp-orphans && pnpm test",
|
|
239
|
-
"verify:release": "pnpm typecheck && pnpm lint && pnpm check:prop-vocabulary && pnpm check:token-tiers && pnpm check:mcp-sync && pnpm check:mcp-orphans && pnpm
|
|
270
|
+
"verify": "pnpm typecheck && pnpm lint && pnpm format && pnpm build && pnpm check:core-isolation && pnpm check:prop-vocabulary && pnpm check:token-tiers && pnpm check:mcp-sync && pnpm check:mcp-orphans && pnpm test",
|
|
271
|
+
"verify:release": "pnpm typecheck && pnpm lint && pnpm build && pnpm check:core-isolation && pnpm check:prop-vocabulary && pnpm check:token-tiers && pnpm check:mcp-sync && pnpm check:mcp-orphans && pnpm test",
|
|
240
272
|
"check:mcp-sync": "node scripts/check-mcp-sync.mjs",
|
|
241
273
|
"check:mcp-orphans": "node scripts/check-mcp-orphans.mjs",
|
|
242
274
|
"check:prop-vocabulary": "node scripts/check-prop-vocabulary.mjs",
|
|
243
275
|
"check:token-tiers": "node scripts/check-token-tiers.mjs",
|
|
276
|
+
"check:core-isolation": "node scripts/check-core-isolation.mjs",
|
|
244
277
|
"release": "node scripts/release.mjs",
|
|
245
278
|
"preview": "node preview/scripts/kill-port.mjs && vite --config preview/vite.config.ts --port 6008 --strictPort",
|
|
246
279
|
"preview:build": "vite build --config preview/vite.config.ts",
|
|
@@ -269,10 +302,13 @@
|
|
|
269
302
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
270
303
|
"@radix-ui/react-collapsible": "^1.1.12",
|
|
271
304
|
"@radix-ui/react-context": "^1.1.2",
|
|
305
|
+
"@radix-ui/react-context-menu": "^2.2.16",
|
|
272
306
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
273
307
|
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
274
308
|
"@radix-ui/react-hover-card": "^1.1.15",
|
|
275
309
|
"@radix-ui/react-label": "^2.1.8",
|
|
310
|
+
"@radix-ui/react-menubar": "^1.1.16",
|
|
311
|
+
"@radix-ui/react-navigation-menu": "^1.2.14",
|
|
276
312
|
"@radix-ui/react-popover": "^1.1.15",
|
|
277
313
|
"@radix-ui/react-radio-group": "^1.3.8",
|
|
278
314
|
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
@@ -289,9 +325,11 @@
|
|
|
289
325
|
"clsx": "^2.1.1",
|
|
290
326
|
"cmdk": "^1.1.1",
|
|
291
327
|
"date-fns": "^4.1.0",
|
|
328
|
+
"embla-carousel-react": "^8.6.0",
|
|
292
329
|
"input-otp": "^1.4.2",
|
|
293
330
|
"lucide-react": "^1.14.0",
|
|
294
331
|
"react-day-picker": "^10.0.1",
|
|
332
|
+
"react-resizable-panels": "^4.11.2",
|
|
295
333
|
"sonner": "^2.0.7",
|
|
296
334
|
"tailwind-merge": "^3.5.0",
|
|
297
335
|
"tailwindcss-animate": "^1.0.7",
|
package/dist/chunk-7WRZG2IG.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { FormField } from './chunk-F7PG4OEV.js';
|
|
2
|
-
import { cn } from './chunk-U7N2A7A3.js';
|
|
3
|
-
import { useForm, FormProvider, useFormContext, Controller } from 'react-hook-form';
|
|
4
|
-
import { zodResolver } from '@hookform/resolvers/zod';
|
|
5
|
-
import { jsx } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
function useZodForm(schema, options) {
|
|
8
|
-
return useForm({
|
|
9
|
-
...options,
|
|
10
|
-
// zodResolver + Zod 4 inference gap — runtime types are correct.
|
|
11
|
-
resolver: zodResolver(schema)
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
function FormRoot({
|
|
15
|
-
form,
|
|
16
|
-
onSubmit,
|
|
17
|
-
children,
|
|
18
|
-
className,
|
|
19
|
-
id
|
|
20
|
-
}) {
|
|
21
|
-
return /* @__PURE__ */ jsx(FormProvider, { ...form, children: /* @__PURE__ */ jsx(
|
|
22
|
-
"form",
|
|
23
|
-
{
|
|
24
|
-
id,
|
|
25
|
-
className: cn("ui-stack-md", className),
|
|
26
|
-
onSubmit: (event) => {
|
|
27
|
-
void form.handleSubmit((values) => onSubmit(values))(event);
|
|
28
|
-
},
|
|
29
|
-
noValidate: true,
|
|
30
|
-
children
|
|
31
|
-
}
|
|
32
|
-
) });
|
|
33
|
-
}
|
|
34
|
-
function FormFieldControl({
|
|
35
|
-
name,
|
|
36
|
-
label,
|
|
37
|
-
required,
|
|
38
|
-
helper,
|
|
39
|
-
className,
|
|
40
|
-
children
|
|
41
|
-
}) {
|
|
42
|
-
const { control } = useFormContext();
|
|
43
|
-
return /* @__PURE__ */ jsx(
|
|
44
|
-
Controller,
|
|
45
|
-
{
|
|
46
|
-
name,
|
|
47
|
-
control,
|
|
48
|
-
render: ({ field, fieldState }) => /* @__PURE__ */ jsx(
|
|
49
|
-
FormField,
|
|
50
|
-
{
|
|
51
|
-
id: String(name),
|
|
52
|
-
label,
|
|
53
|
-
required,
|
|
54
|
-
helper,
|
|
55
|
-
error: fieldState.error?.message,
|
|
56
|
-
className,
|
|
57
|
-
children: children({
|
|
58
|
-
id: String(name),
|
|
59
|
-
name: field.name,
|
|
60
|
-
value: field.value,
|
|
61
|
-
onChange: field.onChange,
|
|
62
|
-
onBlur: field.onBlur,
|
|
63
|
-
ref: field.ref
|
|
64
|
-
})
|
|
65
|
-
}
|
|
66
|
-
)
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export { FormFieldControl, FormRoot, useZodForm };
|
package/dist/chunk-N43OKOFT.js
DELETED
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
import { AlertQueryError } from './chunk-TMDGV4CN.js';
|
|
2
|
-
import { Button } from './chunk-M4PZNAMV.js';
|
|
3
|
-
import { useTranslation } from './chunk-RLGHEV4A.js';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
6
|
-
import { RefreshCw } from 'lucide-react';
|
|
7
|
-
import { Link } from 'react-router-dom';
|
|
8
|
-
import { useQueryClient } from '@tanstack/react-query';
|
|
9
|
-
|
|
10
|
-
function defaultIsEmpty(data) {
|
|
11
|
-
if (!data) return true;
|
|
12
|
-
if (Array.isArray(data)) return data.length === 0;
|
|
13
|
-
if (typeof data === "object" && data !== null) {
|
|
14
|
-
const obj = data;
|
|
15
|
-
if (Array.isArray(obj.items)) return obj.items.length === 0;
|
|
16
|
-
if (typeof obj.length === "number") return obj.length === 0;
|
|
17
|
-
}
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
function DataState({
|
|
21
|
-
query,
|
|
22
|
-
skeleton,
|
|
23
|
-
empty,
|
|
24
|
-
isEmpty = defaultIsEmpty,
|
|
25
|
-
errorRenderer,
|
|
26
|
-
showRetry = true,
|
|
27
|
-
onRetry,
|
|
28
|
-
children
|
|
29
|
-
}) {
|
|
30
|
-
const retry = React.useCallback(() => {
|
|
31
|
-
if (onRetry) {
|
|
32
|
-
void onRetry();
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
void query.refetch();
|
|
36
|
-
}, [onRetry, query]);
|
|
37
|
-
if (query.isPending) return /* @__PURE__ */ jsx(Fragment, { children: skeleton });
|
|
38
|
-
if (query.isError) {
|
|
39
|
-
if (query.isFetching) return /* @__PURE__ */ jsx(Fragment, { children: skeleton });
|
|
40
|
-
if (errorRenderer) return /* @__PURE__ */ jsx(Fragment, { children: errorRenderer(query.error, retry) });
|
|
41
|
-
return /* @__PURE__ */ jsx(AlertQueryError, { error: query.error, onRetry: showRetry ? retry : void 0 });
|
|
42
|
-
}
|
|
43
|
-
const data = query.data;
|
|
44
|
-
if (data === void 0) return /* @__PURE__ */ jsx(Fragment, { children: skeleton });
|
|
45
|
-
if (empty && (data === null || isEmpty(data))) return /* @__PURE__ */ jsx(Fragment, { children: empty });
|
|
46
|
-
return /* @__PURE__ */ jsx(Fragment, { children: children(data) });
|
|
47
|
-
}
|
|
48
|
-
function AlertMutationFeedback({
|
|
49
|
-
mutation,
|
|
50
|
-
onRetry,
|
|
51
|
-
showRetry = true,
|
|
52
|
-
pending,
|
|
53
|
-
className
|
|
54
|
-
}) {
|
|
55
|
-
if (mutation.isPending && pending) return /* @__PURE__ */ jsx(Fragment, { children: pending });
|
|
56
|
-
if (!mutation.isError || mutation.error == null) return null;
|
|
57
|
-
return /* @__PURE__ */ jsx(
|
|
58
|
-
AlertQueryError,
|
|
59
|
-
{
|
|
60
|
-
className,
|
|
61
|
-
error: mutation.error,
|
|
62
|
-
onRetry: showRetry ? onRetry : void 0
|
|
63
|
-
}
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
var MutationFeedback = AlertMutationFeedback;
|
|
67
|
-
function ButtonRefetch({
|
|
68
|
-
query,
|
|
69
|
-
label = "Refresh",
|
|
70
|
-
children,
|
|
71
|
-
variant = "outline",
|
|
72
|
-
size = "sm",
|
|
73
|
-
className,
|
|
74
|
-
...props
|
|
75
|
-
}) {
|
|
76
|
-
const text = children ?? label;
|
|
77
|
-
return /* @__PURE__ */ jsxs(
|
|
78
|
-
Button,
|
|
79
|
-
{
|
|
80
|
-
type: "button",
|
|
81
|
-
variant,
|
|
82
|
-
size,
|
|
83
|
-
className,
|
|
84
|
-
onClick: () => void query.refetch(),
|
|
85
|
-
disabled: query.isFetching,
|
|
86
|
-
...props,
|
|
87
|
-
children: [
|
|
88
|
-
/* @__PURE__ */ jsx(
|
|
89
|
-
RefreshCw,
|
|
90
|
-
{
|
|
91
|
-
className: "ui-query-refetch-icon",
|
|
92
|
-
"data-fetching": query.isFetching,
|
|
93
|
-
"aria-hidden": "true"
|
|
94
|
-
}
|
|
95
|
-
),
|
|
96
|
-
text
|
|
97
|
-
]
|
|
98
|
-
}
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
var QueryRefetchButton = ButtonRefetch;
|
|
102
|
-
function flattenItemPages(data) {
|
|
103
|
-
if (!data) return [];
|
|
104
|
-
return data.pages.flatMap((page) => page.items);
|
|
105
|
-
}
|
|
106
|
-
function defaultIsEmptyFlat(flat) {
|
|
107
|
-
if (Array.isArray(flat)) return flat.length === 0;
|
|
108
|
-
return !flat;
|
|
109
|
-
}
|
|
110
|
-
function InfiniteQueryState({
|
|
111
|
-
query,
|
|
112
|
-
skeleton,
|
|
113
|
-
empty,
|
|
114
|
-
flatten,
|
|
115
|
-
isEmpty = defaultIsEmptyFlat,
|
|
116
|
-
errorRenderer,
|
|
117
|
-
showRetry = true,
|
|
118
|
-
onRetry,
|
|
119
|
-
loadingMore,
|
|
120
|
-
loadMore,
|
|
121
|
-
showLoadMore = true,
|
|
122
|
-
children
|
|
123
|
-
}) {
|
|
124
|
-
const { t } = useTranslation();
|
|
125
|
-
const retry = React.useCallback(() => {
|
|
126
|
-
if (onRetry) {
|
|
127
|
-
void onRetry();
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
void query.refetch();
|
|
131
|
-
}, [onRetry, query]);
|
|
132
|
-
if (query.isPending) return /* @__PURE__ */ jsx(Fragment, { children: skeleton });
|
|
133
|
-
if (query.isError) {
|
|
134
|
-
if (query.isFetching && !query.isFetchingNextPage) return /* @__PURE__ */ jsx(Fragment, { children: skeleton });
|
|
135
|
-
if (errorRenderer) return /* @__PURE__ */ jsx(Fragment, { children: errorRenderer(query.error, retry) });
|
|
136
|
-
return /* @__PURE__ */ jsx(AlertQueryError, { error: query.error, onRetry: showRetry ? retry : void 0 });
|
|
137
|
-
}
|
|
138
|
-
const data = query.data;
|
|
139
|
-
if (!data) return /* @__PURE__ */ jsx(Fragment, { children: skeleton });
|
|
140
|
-
const flat = flatten(data);
|
|
141
|
-
if (empty && isEmpty(flat)) return /* @__PURE__ */ jsx(Fragment, { children: empty });
|
|
142
|
-
const footer = showLoadMore && query.hasNextPage ? loadMore ?? /* @__PURE__ */ jsx("div", { className: "flex justify-center pt-4", children: /* @__PURE__ */ jsx(
|
|
143
|
-
Button,
|
|
144
|
-
{
|
|
145
|
-
type: "button",
|
|
146
|
-
variant: "outline",
|
|
147
|
-
size: "sm",
|
|
148
|
-
disabled: query.isFetchingNextPage,
|
|
149
|
-
onClick: () => void query.fetchNextPage(),
|
|
150
|
-
children: query.isFetchingNextPage ? t("common.working") : t("query.loadMore")
|
|
151
|
-
}
|
|
152
|
-
) }) : null;
|
|
153
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
154
|
-
children(flat, {
|
|
155
|
-
fetchNextPage: () => void query.fetchNextPage(),
|
|
156
|
-
hasNextPage: !!query.hasNextPage,
|
|
157
|
-
isFetchingNextPage: query.isFetchingNextPage
|
|
158
|
-
}),
|
|
159
|
-
query.isFetchingNextPage && (loadingMore ?? /* @__PURE__ */ jsx("p", { className: "text-muted-foreground pt-2 text-center text-xs", children: t("common.working") })),
|
|
160
|
-
footer
|
|
161
|
-
] });
|
|
162
|
-
}
|
|
163
|
-
function PrefetchLink({
|
|
164
|
-
queryKey,
|
|
165
|
-
queryFn,
|
|
166
|
-
prefetchOn = "both",
|
|
167
|
-
staleTime = 3e4,
|
|
168
|
-
onMouseEnter,
|
|
169
|
-
onFocus,
|
|
170
|
-
...linkProps
|
|
171
|
-
}) {
|
|
172
|
-
const queryClient = useQueryClient();
|
|
173
|
-
const prefetch = React.useCallback(() => {
|
|
174
|
-
if (prefetchOn === "none") return;
|
|
175
|
-
void queryClient.prefetchQuery({ queryKey, queryFn, staleTime });
|
|
176
|
-
}, [prefetchOn, queryClient, queryFn, queryKey, staleTime]);
|
|
177
|
-
return /* @__PURE__ */ jsx(
|
|
178
|
-
Link,
|
|
179
|
-
{
|
|
180
|
-
...linkProps,
|
|
181
|
-
onMouseEnter: (event) => {
|
|
182
|
-
if (prefetchOn === "hover" || prefetchOn === "both") prefetch();
|
|
183
|
-
onMouseEnter?.(event);
|
|
184
|
-
},
|
|
185
|
-
onFocus: (event) => {
|
|
186
|
-
if (prefetchOn === "focus" || prefetchOn === "both") prefetch();
|
|
187
|
-
onFocus?.(event);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export { AlertMutationFeedback, ButtonRefetch, DataState, InfiniteQueryState, MutationFeedback, PrefetchLink, QueryRefetchButton, flattenItemPages };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { normalizeTreeOptions, collectAllExpandableKeys, filterVisibleTree, flattenVisibleTree, findNodeByValue, reactNodeText, getDescendantValues } from './chunk-SMLKNECP.js';
|
|
2
2
|
import { Checkbox } from './chunk-O24Z3ULJ.js';
|
|
3
3
|
import { Command, CommandInput } from './chunk-HTEL5DQI.js';
|
|
4
|
+
import { Button } from './chunk-M4PZNAMV.js';
|
|
4
5
|
import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
|
|
5
6
|
import { ScrollArea } from './chunk-3KPEZ5CF.js';
|
|
6
|
-
import { Button } from './chunk-M4PZNAMV.js';
|
|
7
7
|
import { useTranslation } from './chunk-RLGHEV4A.js';
|
|
8
8
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
9
9
|
import * as React from 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Input } from './chunk-VOHTRR5X.js';
|
|
2
|
-
import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
|
|
3
2
|
import { Button } from './chunk-M4PZNAMV.js';
|
|
3
|
+
import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
|
|
4
4
|
import { useTranslation } from './chunk-RLGHEV4A.js';
|
|
5
5
|
import { normalizeHhmm, isValidHhmm } from './chunk-FXFJF4YA.js';
|
|
6
6
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Input } from './chunk-VOHTRR5X.js';
|
|
2
2
|
import { Command, CommandList, CommandItem, CommandGroup } from './chunk-HTEL5DQI.js';
|
|
3
|
-
import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
|
|
4
3
|
import { Button } from './chunk-M4PZNAMV.js';
|
|
4
|
+
import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
|
|
5
5
|
import { useTranslation } from './chunk-RLGHEV4A.js';
|
|
6
6
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
7
7
|
import * as React from 'react';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { normalizeTreeOptions, formatPathLabels, getNodeByPath, filterTreeOptions, pathsEqual, pathKey } from './chunk-SMLKNECP.js';
|
|
2
2
|
import { Checkbox } from './chunk-O24Z3ULJ.js';
|
|
3
3
|
import { Command, CommandInput } from './chunk-HTEL5DQI.js';
|
|
4
|
+
import { Button } from './chunk-M4PZNAMV.js';
|
|
4
5
|
import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
|
|
5
6
|
import { ScrollArea, ScrollBar } from './chunk-3KPEZ5CF.js';
|
|
6
|
-
import { Button } from './chunk-M4PZNAMV.js';
|
|
7
7
|
import { useTranslation } from './chunk-RLGHEV4A.js';
|
|
8
8
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
9
9
|
import * as React from 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { controlIconSmClass } from './chunk-IBK5D2Q6.js';
|
|
2
1
|
import { buttonVariants } from './chunk-M4PZNAMV.js';
|
|
2
|
+
import { controlIconSmClass } from './chunk-IBK5D2Q6.js';
|
|
3
3
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
4
4
|
import { ChevronLeft, ChevronRight } from 'lucide-react';
|
|
5
5
|
import { DayPicker } from 'react-day-picker';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Inline, densityClass } from './chunk-TILFZBTE.js';
|
|
2
|
+
import { Button } from './chunk-M4PZNAMV.js';
|
|
2
3
|
import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from './chunk-4MMIMZMK.js';
|
|
3
4
|
import { tableCellPaddingClass, tableRowHeightClass, controlIconSmClass } from './chunk-IBK5D2Q6.js';
|
|
4
|
-
import { Button } from './chunk-M4PZNAMV.js';
|
|
5
5
|
import { useTranslation } from './chunk-RLGHEV4A.js';
|
|
6
6
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
7
7
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
File without changes
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Slider } from './chunk-CRERCLIZ.js';
|
|
2
1
|
import { formatBytes } from './chunk-4R7QL3MW.js';
|
|
3
2
|
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from './chunk-P4HFJQID.js';
|
|
4
|
-
import {
|
|
3
|
+
import { Slider } from './chunk-CRERCLIZ.js';
|
|
5
4
|
import { Button } from './chunk-M4PZNAMV.js';
|
|
5
|
+
import { controlIconClass } from './chunk-IBK5D2Q6.js';
|
|
6
6
|
import { useTranslation } from './chunk-RLGHEV4A.js';
|
|
7
7
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
8
8
|
import * as React2 from 'react';
|