@noxickon/onyx 6.4.0 → 6.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/dist/components/DataTable/DataTable.d.ts +7 -5
- package/dist/components/DataTable/DataTable.js +546 -367
- package/dist/components/DataTable/DataTable.styles.d.ts +21 -3
- package/dist/components/DataTable/DataTable.styles.js +13 -2
- package/dist/components/DataTable/DataTable.types.d.ts +29 -1
- package/dist/components/DataTable/index.d.ts +4 -2
- package/dist/components/DataTable/index.js +10 -8
- package/dist/connect/executors/connectExecutor.d.ts +3 -0
- package/dist/connect/executors/connectExecutor.js +21 -0
- package/dist/connect/executors/connectExecutor.types.d.ts +8 -0
- package/dist/connect/executors/errorDetails.d.ts +9 -0
- package/dist/connect/executors/errorDetails.js +21 -0
- package/dist/connect/index.d.ts +4 -0
- package/dist/connect/schemas/error_details_pb.d.ts +62 -0
- package/dist/connect/schemas/error_details_pb.js +5 -0
- package/dist/connect.js +3 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useQuery/index.d.ts +2 -0
- package/dist/hooks/useQuery/useQuery.d.ts +3 -0
- package/dist/hooks/useQuery/useQuery.js +53 -0
- package/dist/hooks/useQuery/useQuery.types.d.ts +12 -0
- package/dist/hooks.js +12 -11
- package/dist/index.js +21 -21
- package/dist/rest/executors/OxRestError.d.ts +5 -0
- package/dist/rest/executors/OxRestError.js +10 -0
- package/dist/rest/executors/restExecutor.js +91 -83
- package/dist/rest/index.d.ts +1 -0
- package/dist/rest.js +3 -2
- package/package.json +15 -1
|
@@ -31,7 +31,9 @@ export declare const dataTableVariants: import('tailwind-variants').TVReturnType
|
|
|
31
31
|
toolbar: string;
|
|
32
32
|
toolbarGroup: string;
|
|
33
33
|
divider: string;
|
|
34
|
-
|
|
34
|
+
collapse: string[];
|
|
35
|
+
collapseClip: string;
|
|
36
|
+
filterChipsRow: string;
|
|
35
37
|
selectionActions: string;
|
|
36
38
|
scroll: string;
|
|
37
39
|
selectCol: string;
|
|
@@ -59,6 +61,10 @@ export declare const dataTableVariants: import('tailwind-variants').TVReturnType
|
|
|
59
61
|
configLabel: string;
|
|
60
62
|
configActions: string;
|
|
61
63
|
configSeparator: string;
|
|
64
|
+
filterMenuItem: string;
|
|
65
|
+
skeleton: string;
|
|
66
|
+
skeletonToolbar: string;
|
|
67
|
+
skeletonBody: string;
|
|
62
68
|
}, undefined, {
|
|
63
69
|
density: {
|
|
64
70
|
comfortable: {};
|
|
@@ -91,7 +97,9 @@ export declare const dataTableVariants: import('tailwind-variants').TVReturnType
|
|
|
91
97
|
toolbar: string;
|
|
92
98
|
toolbarGroup: string;
|
|
93
99
|
divider: string;
|
|
94
|
-
|
|
100
|
+
collapse: string[];
|
|
101
|
+
collapseClip: string;
|
|
102
|
+
filterChipsRow: string;
|
|
95
103
|
selectionActions: string;
|
|
96
104
|
scroll: string;
|
|
97
105
|
selectCol: string;
|
|
@@ -119,6 +127,10 @@ export declare const dataTableVariants: import('tailwind-variants').TVReturnType
|
|
|
119
127
|
configLabel: string;
|
|
120
128
|
configActions: string;
|
|
121
129
|
configSeparator: string;
|
|
130
|
+
filterMenuItem: string;
|
|
131
|
+
skeleton: string;
|
|
132
|
+
skeletonToolbar: string;
|
|
133
|
+
skeletonBody: string;
|
|
122
134
|
}, import('tailwind-variants').TVReturnType<{
|
|
123
135
|
density: {
|
|
124
136
|
comfortable: {};
|
|
@@ -151,7 +163,9 @@ export declare const dataTableVariants: import('tailwind-variants').TVReturnType
|
|
|
151
163
|
toolbar: string;
|
|
152
164
|
toolbarGroup: string;
|
|
153
165
|
divider: string;
|
|
154
|
-
|
|
166
|
+
collapse: string[];
|
|
167
|
+
collapseClip: string;
|
|
168
|
+
filterChipsRow: string;
|
|
155
169
|
selectionActions: string;
|
|
156
170
|
scroll: string;
|
|
157
171
|
selectCol: string;
|
|
@@ -179,5 +193,9 @@ export declare const dataTableVariants: import('tailwind-variants').TVReturnType
|
|
|
179
193
|
configLabel: string;
|
|
180
194
|
configActions: string;
|
|
181
195
|
configSeparator: string;
|
|
196
|
+
filterMenuItem: string;
|
|
197
|
+
skeleton: string;
|
|
198
|
+
skeletonToolbar: string;
|
|
199
|
+
skeletonBody: string;
|
|
182
200
|
}, undefined, unknown, unknown, undefined>>;
|
|
183
201
|
export type DataTableVariants = VariantProps<typeof dataTableVariants>;
|
|
@@ -6,7 +6,14 @@ var t = e({
|
|
|
6
6
|
toolbar: "flex min-h-13 items-center justify-between gap-3 border-b border-line px-3 py-2.25 pointer-coarse:flex-col pointer-coarse:items-stretch pointer-coarse:gap-2.5",
|
|
7
7
|
toolbarGroup: "flex min-w-0 items-center gap-2",
|
|
8
8
|
divider: "mx-1 h-6 w-px shrink-0 bg-line",
|
|
9
|
-
|
|
9
|
+
collapse: [
|
|
10
|
+
"grid grid-rows-[1fr] transition-[grid-template-rows,opacity] duration-300 ease-spring",
|
|
11
|
+
"starting:grid-rows-[0fr] starting:opacity-0",
|
|
12
|
+
"data-collapsed:grid-rows-[0fr] data-collapsed:opacity-0",
|
|
13
|
+
"motion-reduce:transition-none"
|
|
14
|
+
],
|
|
15
|
+
collapseClip: "overflow-hidden",
|
|
16
|
+
filterChipsRow: "flex min-h-[calc(var(--control-h-md)+1.25rem+1px)] flex-wrap items-center gap-2 border-b border-line px-3.5 py-2.5",
|
|
10
17
|
selectionActions: "flex min-w-0 items-center gap-3",
|
|
11
18
|
scroll: "relative w-full overflow-auto [-webkit-overflow-scrolling:touch]",
|
|
12
19
|
selectCol: "pointer-coarse:w-11",
|
|
@@ -46,7 +53,11 @@ var t = e({
|
|
|
46
53
|
configHandleLocked: "shrink-0 text-fg-subtle opacity-30",
|
|
47
54
|
configLabel: "flex-1 truncate text-body",
|
|
48
55
|
configActions: "flex justify-end gap-2 p-2",
|
|
49
|
-
configSeparator: "h-px bg-line"
|
|
56
|
+
configSeparator: "h-px bg-line",
|
|
57
|
+
filterMenuItem: "flex cursor-pointer items-center gap-2.5 rounded-control px-2 py-1.5 select-none ox-interactive:hover:bg-fg/8",
|
|
58
|
+
skeleton: "w-full overflow-hidden rounded-card border border-line bg-card shadow-[var(--shadow-card)]",
|
|
59
|
+
skeletonToolbar: "flex items-center justify-between border-b border-line px-3 py-2.25",
|
|
60
|
+
skeletonBody: "flex flex-col gap-3.5 p-4"
|
|
50
61
|
},
|
|
51
62
|
variants: {
|
|
52
63
|
density: {
|
|
@@ -81,12 +81,39 @@ interface OxDataTableToolbarGroupProps {
|
|
|
81
81
|
interface OxDataTableFilterChipsProps {
|
|
82
82
|
children?: ReactNode;
|
|
83
83
|
className?: string;
|
|
84
|
+
clearLabel?: ReactNode;
|
|
85
|
+
onClearAll?: () => void;
|
|
84
86
|
}
|
|
87
|
+
interface OxDataTableFilterMenuOption {
|
|
88
|
+
label: ReactNode;
|
|
89
|
+
value: string;
|
|
90
|
+
}
|
|
91
|
+
interface OxDataTableFilterMenuGroup {
|
|
92
|
+
id?: string;
|
|
93
|
+
label: ReactNode;
|
|
94
|
+
onToggle: (value: string) => void;
|
|
95
|
+
options: readonly OxDataTableFilterMenuOption[];
|
|
96
|
+
selected: ReadonlySet<string>;
|
|
97
|
+
}
|
|
98
|
+
interface OxDataTableFilterMenuProps {
|
|
99
|
+
className?: string;
|
|
100
|
+
groups: readonly OxDataTableFilterMenuGroup[];
|
|
101
|
+
trigger?: ReactNode;
|
|
102
|
+
triggerLabel?: string;
|
|
103
|
+
}
|
|
104
|
+
interface OxDataTableSkeletonProps {
|
|
105
|
+
className?: string;
|
|
106
|
+
rows?: number;
|
|
107
|
+
toolbar?: boolean;
|
|
108
|
+
}
|
|
109
|
+
type DataTablePaginationVariant = 'simple' | 'numbered';
|
|
85
110
|
interface OxDataTablePaginationProps {
|
|
86
111
|
className?: string;
|
|
87
112
|
layout?: DataTablePaginationLayout;
|
|
88
113
|
nextLabel?: string;
|
|
89
114
|
previousLabel?: string;
|
|
115
|
+
summary?: ReactNode;
|
|
116
|
+
variant?: DataTablePaginationVariant;
|
|
90
117
|
}
|
|
91
118
|
interface OxDataTableFooterProps {
|
|
92
119
|
children?: ReactNode;
|
|
@@ -94,6 +121,7 @@ interface OxDataTableFooterProps {
|
|
|
94
121
|
}
|
|
95
122
|
interface OxDataTableSelectionActionsProps<TRow> {
|
|
96
123
|
children: (context: OxDataTableSelectionContext<TRow>) => ReactNode;
|
|
124
|
+
count?: number;
|
|
97
125
|
fallback?: ReactNode;
|
|
98
126
|
}
|
|
99
127
|
interface OxDataTableColumnConfigProps {
|
|
@@ -103,4 +131,4 @@ interface OxDataTableColumnConfigProps {
|
|
|
103
131
|
title?: ReactNode;
|
|
104
132
|
trigger?: ReactNode;
|
|
105
133
|
}
|
|
106
|
-
export type { ColumnAccessor, DataTableAlign, DataTableDensity, DataTablePaginationLayout, DataTablePaginationMode, OxDataTableColumn, OxDataTableColumnConfigProps, OxDataTableFilterChipsProps, OxDataTableFooterProps, OxDataTablePaginationProps, OxDataTableProps, OxDataTableSelectionActionsProps, OxDataTableSelectionContext, OxDataTableSortState, OxDataTableToolbarGroupProps, OxDataTableToolbarProps, SortDirection, };
|
|
134
|
+
export type { ColumnAccessor, DataTableAlign, DataTableDensity, DataTablePaginationLayout, DataTablePaginationMode, DataTablePaginationVariant, OxDataTableColumn, OxDataTableColumnConfigProps, OxDataTableFilterChipsProps, OxDataTableFilterMenuGroup, OxDataTableFilterMenuOption, OxDataTableFilterMenuProps, OxDataTableFooterProps, OxDataTablePaginationProps, OxDataTableProps, OxDataTableSelectionActionsProps, OxDataTableSelectionContext, OxDataTableSkeletonProps, OxDataTableSortState, OxDataTableToolbarGroupProps, OxDataTableToolbarProps, SortDirection, };
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { OxDataTableColumnConfig, OxDataTableDivider, OxDataTableFilterChips, OxDataTableFooter, OxDataTablePagination, OxDataTableRoot, OxDataTableSelectionActions, OxDataTableToolbar, OxDataTableToolbarGroup } from './DataTable';
|
|
1
|
+
import { OxDataTableColumnConfig, OxDataTableDivider, OxDataTableFilterChips, OxDataTableFilterMenu, OxDataTableFooter, OxDataTablePagination, OxDataTableRoot, OxDataTableSelectionActions, OxDataTableSkeleton, OxDataTableToolbar, OxDataTableToolbarGroup } from './DataTable';
|
|
2
2
|
declare const OxDataTable: typeof OxDataTableRoot & {
|
|
3
3
|
ColumnConfig: typeof OxDataTableColumnConfig;
|
|
4
4
|
Divider: typeof OxDataTableDivider;
|
|
5
5
|
FilterChips: typeof OxDataTableFilterChips;
|
|
6
|
+
FilterMenu: typeof OxDataTableFilterMenu;
|
|
6
7
|
Footer: typeof OxDataTableFooter;
|
|
7
8
|
Pagination: typeof OxDataTablePagination;
|
|
8
9
|
SelectionActions: typeof OxDataTableSelectionActions;
|
|
10
|
+
Skeleton: typeof OxDataTableSkeleton;
|
|
9
11
|
Toolbar: typeof OxDataTableToolbar;
|
|
10
12
|
ToolbarGroup: typeof OxDataTableToolbarGroup;
|
|
11
13
|
};
|
|
12
14
|
export { OxDataTable };
|
|
13
|
-
export type { ColumnAccessor, DataTableAlign, DataTableDensity, DataTablePaginationLayout, DataTablePaginationMode, OxDataTableColumn, OxDataTableColumnConfigProps, OxDataTableFilterChipsProps, OxDataTableFooterProps, OxDataTablePaginationProps, OxDataTableProps, OxDataTableSelectionActionsProps, OxDataTableSelectionContext, OxDataTableSortState, OxDataTableToolbarGroupProps, OxDataTableToolbarProps, SortDirection, } from './DataTable.types';
|
|
15
|
+
export type { ColumnAccessor, DataTableAlign, DataTableDensity, DataTablePaginationLayout, DataTablePaginationMode, DataTablePaginationVariant, OxDataTableColumn, OxDataTableColumnConfigProps, OxDataTableFilterChipsProps, OxDataTableFilterMenuGroup, OxDataTableFilterMenuOption, OxDataTableFilterMenuProps, OxDataTableFooterProps, OxDataTablePaginationProps, OxDataTableProps, OxDataTableSelectionActionsProps, OxDataTableSelectionContext, OxDataTableSkeletonProps, OxDataTableSortState, OxDataTableToolbarGroupProps, OxDataTableToolbarProps, SortDirection, } from './DataTable.types';
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { OxDataTableColumnConfig as e, OxDataTableDivider as t, OxDataTableFilterChips as n,
|
|
1
|
+
import { OxDataTableColumnConfig as e, OxDataTableDivider as t, OxDataTableFilterChips as n, OxDataTableFilterMenu as r, OxDataTableFooter as i, OxDataTablePagination as a, OxDataTableRoot as o, OxDataTableSelectionActions as s, OxDataTableSkeleton as c, OxDataTableToolbar as l, OxDataTableToolbarGroup as u } from "./DataTable.js";
|
|
2
2
|
//#region src/components/DataTable/index.ts
|
|
3
|
-
var
|
|
3
|
+
var d = Object.assign(o, {
|
|
4
4
|
ColumnConfig: e,
|
|
5
5
|
Divider: t,
|
|
6
6
|
FilterChips: n,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
FilterMenu: r,
|
|
8
|
+
Footer: i,
|
|
9
|
+
Pagination: a,
|
|
10
|
+
SelectionActions: s,
|
|
11
|
+
Skeleton: c,
|
|
12
|
+
Toolbar: l,
|
|
13
|
+
ToolbarGroup: u
|
|
12
14
|
});
|
|
13
15
|
//#endregion
|
|
14
|
-
export {
|
|
16
|
+
export { d as OxDataTable };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { OxExecutor } from '../../hooks';
|
|
2
|
+
import { ConnectCall, ConnectExecutorOptions } from './connectExecutor.types';
|
|
3
|
+
export declare function connectExecutor<TForm extends object, TResult = unknown>(call: ConnectCall<TForm, TResult>, options?: ConnectExecutorOptions<TForm>): OxExecutor<TForm, TResult>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { formErrors as e } from "../../hooks/useForm/useForm.js";
|
|
2
|
+
import { defaultParseErrors as t } from "./errorDetails.js";
|
|
3
|
+
import { ConnectError as n } from "@connectrpc/connect";
|
|
4
|
+
//#region src/connect/executors/connectExecutor.ts
|
|
5
|
+
function r(r, i = {}) {
|
|
6
|
+
let { parseErrors: a = t } = i;
|
|
7
|
+
return async ({ payload: t, signal: i, url: o }) => {
|
|
8
|
+
if (o !== void 0) throw Error("connectExecutor: ctx.url is meaningless for RPC (the call closes over its own client and endpoint)");
|
|
9
|
+
try {
|
|
10
|
+
return await r(t, { signal: i });
|
|
11
|
+
} catch (t) {
|
|
12
|
+
if (t instanceof n) {
|
|
13
|
+
let n = a(t);
|
|
14
|
+
if (n !== null) return e(n);
|
|
15
|
+
}
|
|
16
|
+
throw t;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { r as connectExecutor };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ConnectError } from '@connectrpc/connect';
|
|
2
|
+
import { OxFormDataErrors } from '../../internal/hooks';
|
|
3
|
+
export type ConnectCall<TForm extends object, TResult> = (payload: TForm, options: {
|
|
4
|
+
signal: AbortSignal;
|
|
5
|
+
}) => Promise<TResult>;
|
|
6
|
+
export interface ConnectExecutorOptions<TForm extends object> {
|
|
7
|
+
parseErrors?: (error: ConnectError) => OxFormDataErrors<TForm> | null;
|
|
8
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ConnectError } from '@connectrpc/connect';
|
|
2
|
+
import { OxFormDataErrors } from '../../internal/hooks';
|
|
3
|
+
export interface OxConnectErrorInfo {
|
|
4
|
+
domain: string;
|
|
5
|
+
metadata: Record<string, string>;
|
|
6
|
+
reason: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function connectErrorInfo(error: ConnectError): OxConnectErrorInfo | null;
|
|
9
|
+
export declare function defaultParseErrors<TForm extends object>(error: ConnectError): OxFormDataErrors<TForm> | null;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BadRequestSchema as e, ErrorInfoSchema as t } from "../schemas/error_details_pb.js";
|
|
2
|
+
import { Code as n } from "@connectrpc/connect";
|
|
3
|
+
//#region src/connect/executors/errorDetails.ts
|
|
4
|
+
function r(e) {
|
|
5
|
+
let [n] = e.findDetails(t);
|
|
6
|
+
return n ? {
|
|
7
|
+
domain: n.domain,
|
|
8
|
+
metadata: n.metadata,
|
|
9
|
+
reason: n.reason
|
|
10
|
+
} : null;
|
|
11
|
+
}
|
|
12
|
+
function i(t) {
|
|
13
|
+
if (t.code !== n.InvalidArgument) return null;
|
|
14
|
+
let [r] = t.findDetails(e);
|
|
15
|
+
if (!r) return null;
|
|
16
|
+
let i = {};
|
|
17
|
+
for (let { description: e, field: t } of r.fieldViolations) t && !Object.hasOwn(i, t) && (i[t] = e);
|
|
18
|
+
return Object.keys(i).length > 0 ? i : null;
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { r as connectErrorInfo, i as defaultParseErrors };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { connectExecutor } from './executors/connectExecutor';
|
|
2
|
+
export type { ConnectCall, ConnectExecutorOptions } from './executors/connectExecutor.types';
|
|
3
|
+
export { connectErrorInfo } from './executors/errorDetails';
|
|
4
|
+
export type { OxConnectErrorInfo } from './executors/errorDetails';
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { GenFile, GenMessage } from '@bufbuild/protobuf/codegenv2';
|
|
2
|
+
import { Message } from '@bufbuild/protobuf';
|
|
3
|
+
/**
|
|
4
|
+
* Describes the file error_details.proto.
|
|
5
|
+
*/
|
|
6
|
+
export declare const file_error_details: GenFile;
|
|
7
|
+
/**
|
|
8
|
+
* @generated from message google.rpc.ErrorInfo
|
|
9
|
+
*/
|
|
10
|
+
export type ErrorInfo = Message<"google.rpc.ErrorInfo"> & {
|
|
11
|
+
/**
|
|
12
|
+
* @generated from field: string reason = 1;
|
|
13
|
+
*/
|
|
14
|
+
reason: string;
|
|
15
|
+
/**
|
|
16
|
+
* @generated from field: string domain = 2;
|
|
17
|
+
*/
|
|
18
|
+
domain: string;
|
|
19
|
+
/**
|
|
20
|
+
* @generated from field: map<string, string> metadata = 3;
|
|
21
|
+
*/
|
|
22
|
+
metadata: {
|
|
23
|
+
[key: string]: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Describes the message google.rpc.ErrorInfo.
|
|
28
|
+
* Use `create(ErrorInfoSchema)` to create a new message.
|
|
29
|
+
*/
|
|
30
|
+
export declare const ErrorInfoSchema: GenMessage<ErrorInfo>;
|
|
31
|
+
/**
|
|
32
|
+
* @generated from message google.rpc.BadRequest
|
|
33
|
+
*/
|
|
34
|
+
export type BadRequest = Message<"google.rpc.BadRequest"> & {
|
|
35
|
+
/**
|
|
36
|
+
* @generated from field: repeated google.rpc.BadRequest.FieldViolation field_violations = 1;
|
|
37
|
+
*/
|
|
38
|
+
fieldViolations: BadRequest_FieldViolation[];
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Describes the message google.rpc.BadRequest.
|
|
42
|
+
* Use `create(BadRequestSchema)` to create a new message.
|
|
43
|
+
*/
|
|
44
|
+
export declare const BadRequestSchema: GenMessage<BadRequest>;
|
|
45
|
+
/**
|
|
46
|
+
* @generated from message google.rpc.BadRequest.FieldViolation
|
|
47
|
+
*/
|
|
48
|
+
export type BadRequest_FieldViolation = Message<"google.rpc.BadRequest.FieldViolation"> & {
|
|
49
|
+
/**
|
|
50
|
+
* @generated from field: string field = 1;
|
|
51
|
+
*/
|
|
52
|
+
field: string;
|
|
53
|
+
/**
|
|
54
|
+
* @generated from field: string description = 2;
|
|
55
|
+
*/
|
|
56
|
+
description: string;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Describes the message google.rpc.BadRequest.FieldViolation.
|
|
60
|
+
* Use `create(BadRequest_FieldViolationSchema)` to create a new message.
|
|
61
|
+
*/
|
|
62
|
+
export declare const BadRequest_FieldViolationSchema: GenMessage<BadRequest_FieldViolation>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { fileDesc as e, messageDesc as t } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
//#region src/connect/schemas/error_details_pb.ts
|
|
3
|
+
var n = /*@__PURE__*/ e("ChNlcnJvcl9kZXRhaWxzLnByb3RvEgpnb29nbGUucnBjIpMBCglFcnJvckluZm8SDgoGcmVhc29uGAEgASgJEg4KBmRvbWFpbhgCIAEoCRI1CghtZXRhZGF0YRgDIAMoCzIjLmdvb2dsZS5ycGMuRXJyb3JJbmZvLk1ldGFkYXRhRW50cnkaLwoNTWV0YWRhdGFFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBIoMBCgpCYWRSZXF1ZXN0Ej8KEGZpZWxkX3Zpb2xhdGlvbnMYASADKAsyJS5nb29nbGUucnBjLkJhZFJlcXVlc3QuRmllbGRWaW9sYXRpb24aNAoORmllbGRWaW9sYXRpb24SDQoFZmllbGQYASABKAkSEwoLZGVzY3JpcHRpb24YAiABKAliBnByb3RvMw"), r = /*@__PURE__*/ t(n, 0), i = /*@__PURE__*/ t(n, 1);
|
|
4
|
+
//#endregion
|
|
5
|
+
export { i as BadRequestSchema, r as ErrorInfoSchema, n as file_error_details };
|
package/dist/connect.js
ADDED
package/dist/hooks/index.d.ts
CHANGED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { c as e } from "react/compiler-runtime";
|
|
2
|
+
import { useEffect as t, useRef as n, useState as r } from "react";
|
|
3
|
+
//#region src/hooks/useQuery/useQuery.ts
|
|
4
|
+
function i(i, o) {
|
|
5
|
+
let s = e(14), [c, l] = r(void 0), [u, d] = r(void 0), [f, p] = r(!0), [m, h] = r(void 0), [g, _] = r(0), v = n(i), y;
|
|
6
|
+
s[0] === i ? y = s[1] : (y = () => {
|
|
7
|
+
v.current = i;
|
|
8
|
+
}, s[0] = i, s[1] = y), t(y);
|
|
9
|
+
let b;
|
|
10
|
+
s[2] !== o || s[3] !== g ? (b = JSON.stringify([...o, g]), s[2] = o, s[3] = g, s[4] = b) : b = s[4];
|
|
11
|
+
let x = b, [S, C] = r(x);
|
|
12
|
+
x !== S && (C(x), p(!0), h(void 0), d((e) => c ?? e), l(void 0));
|
|
13
|
+
let w;
|
|
14
|
+
s[5] === Symbol.for("react.memo_cache_sentinel") ? (w = () => {
|
|
15
|
+
let e = new AbortController(), t = !1;
|
|
16
|
+
return (async () => {
|
|
17
|
+
try {
|
|
18
|
+
let n = await v.current(e.signal);
|
|
19
|
+
if (t) return;
|
|
20
|
+
if (p(!1), n.error !== void 0) {
|
|
21
|
+
h(n.error);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
l(n.data);
|
|
25
|
+
} catch (e) {
|
|
26
|
+
let n = e;
|
|
27
|
+
if (t || n instanceof DOMException && n.name === "AbortError") return;
|
|
28
|
+
p(!1), h(n instanceof Error ? n : Error(String(n)));
|
|
29
|
+
}
|
|
30
|
+
})(), () => {
|
|
31
|
+
t = !0, e.abort();
|
|
32
|
+
};
|
|
33
|
+
}, s[5] = w) : w = s[5];
|
|
34
|
+
let T;
|
|
35
|
+
s[6] === x ? T = s[7] : (T = [x], s[6] = x, s[7] = T), t(w, T);
|
|
36
|
+
let E;
|
|
37
|
+
s[8] === Symbol.for("react.memo_cache_sentinel") ? (E = () => {
|
|
38
|
+
_(a);
|
|
39
|
+
}, s[8] = E) : E = s[8];
|
|
40
|
+
let D = E, O;
|
|
41
|
+
return s[9] !== c || s[10] !== m || s[11] !== f || s[12] !== u ? (O = {
|
|
42
|
+
data: c,
|
|
43
|
+
error: m,
|
|
44
|
+
loading: f,
|
|
45
|
+
previousData: u,
|
|
46
|
+
refetch: D
|
|
47
|
+
}, s[9] = c, s[10] = m, s[11] = f, s[12] = u, s[13] = O) : O = s[13], O;
|
|
48
|
+
}
|
|
49
|
+
function a(e) {
|
|
50
|
+
return e + 1;
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
export { i as useOxQuery };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface OxQueryFetcherResult<TData, TError = unknown> {
|
|
2
|
+
data?: TData;
|
|
3
|
+
error?: TError;
|
|
4
|
+
}
|
|
5
|
+
export type OxQueryFetcher<TData, TError = unknown> = (signal: AbortSignal) => Promise<OxQueryFetcherResult<TData, TError>>;
|
|
6
|
+
export interface OxQueryResult<TData, TError = unknown> {
|
|
7
|
+
data: TData | undefined;
|
|
8
|
+
error: Error | TError | undefined;
|
|
9
|
+
loading: boolean;
|
|
10
|
+
previousData: TData | undefined;
|
|
11
|
+
refetch: () => void;
|
|
12
|
+
}
|
package/dist/hooks.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { useOxMediaQuery as e } from "./hooks/useMediaQuery/useMediaQuery.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
2
|
+
import { useOxPagination as t } from "./hooks/usePagination/usePagination.js";
|
|
3
|
+
import { oxBreakpoints as n, useOxBreakpoint as r, useOxBreakpointDown as i, useOxBreakpointUp as a } from "./hooks/useBreakpoint/useBreakpoint.js";
|
|
4
|
+
import { useOxVirtualizer as o } from "./hooks/useVirtualizer/useVirtualizer.js";
|
|
5
|
+
import { useOxCommandShortcut as s } from "./hooks/useCommandShortcut/useCommandShortcut.js";
|
|
6
|
+
import { useOxDebounce as c, useOxDebouncedValue as l } from "./hooks/useDebounce/useDebounce.js";
|
|
7
|
+
import { OxFormErrors as u, formErrors as d, useOxForm as f } from "./hooks/useForm/useForm.js";
|
|
8
|
+
import { standardSchemaResolver as p } from "./hooks/useForm/standardSchemaResolver.js";
|
|
9
|
+
import { useOxFilter as m } from "./hooks/useFilter/useFilter.js";
|
|
10
10
|
import { useOxPoll as h } from "./hooks/usePoll/usePoll.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
11
|
+
import { useOxQuery as g } from "./hooks/useQuery/useQuery.js";
|
|
12
|
+
import { oxHistoryStateAdapter as _, oxLocalStorageAdapter as v, oxSessionStorageAdapter as y } from "./hooks/useRemember/useRemember.adapters.js";
|
|
13
|
+
import { useOxRemember as b } from "./hooks/useRemember/useRemember.js";
|
|
14
|
+
export { u as OxFormErrors, d as formErrors, n as oxBreakpoints, _ as oxHistoryStateAdapter, v as oxLocalStorageAdapter, y as oxSessionStorageAdapter, p as standardSchemaResolver, r as useOxBreakpoint, i as useOxBreakpointDown, a as useOxBreakpointUp, s as useOxCommandShortcut, c as useOxDebounce, l as useOxDebouncedValue, m as useOxFilter, f as useOxForm, e as useOxMediaQuery, t as useOxPagination, h as useOxPoll, g as useOxQuery, b as useOxRemember, o as useOxVirtualizer };
|
package/dist/index.js
CHANGED
|
@@ -22,26 +22,26 @@ import { OxContextMenu as T } from "./components/ContextMenu/index.js";
|
|
|
22
22
|
import { OxCopyButton as E } from "./components/CopyButton/CopyButton.js";
|
|
23
23
|
import { OxInput as D } from "./components/Input/index.js";
|
|
24
24
|
import { OxCopyInput as O } from "./components/CopyInput/CopyInput.js";
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
25
|
+
import { OxPagination as k } from "./components/Pagination/index.js";
|
|
26
|
+
import { OxPopover as A } from "./components/Popover/index.js";
|
|
27
|
+
import { OxSkeleton as j } from "./components/Skeleton/Skeleton2.js";
|
|
28
|
+
import { OxTable as M } from "./components/Table/index.js";
|
|
29
|
+
import { OxDataTable as N } from "./components/DataTable/index.js";
|
|
30
|
+
import { OxDescriptionList as P } from "./components/DescriptionList/index.js";
|
|
31
|
+
import { OxDialog as F } from "./components/Dialog/index.js";
|
|
32
|
+
import { OxDrawer as I } from "./components/Drawer/index.js";
|
|
33
|
+
import { OxField as L } from "./components/Field/index.js";
|
|
34
|
+
import { OxFieldset as R } from "./components/Fieldset/index.js";
|
|
35
|
+
import { OxFooter as z } from "./components/Footer/index.js";
|
|
36
|
+
import { OxHeader as B } from "./components/Header/index.js";
|
|
37
|
+
import { OxHoldToDelete as V } from "./components/HoldToDelete/HoldToDelete2.js";
|
|
38
|
+
import { OxKbd as H } from "./components/Kbd/Kbd.js";
|
|
39
|
+
import { OxMain as U } from "./components/Main/Main.js";
|
|
40
|
+
import { OxMeter as W } from "./components/Meter/index.js";
|
|
41
|
+
import { OxNavigationMenu as G } from "./components/NavigationMenu/index.js";
|
|
42
|
+
import { OxNumberInput as K } from "./components/NumberInput/index.js";
|
|
43
|
+
import { OxOtpField as q } from "./components/OtpField/OtpField.js";
|
|
44
|
+
import { OxPageProgress as J } from "./components/PageProgress/PageProgress.js";
|
|
45
45
|
import { OxProgress as Y } from "./components/Progress/index.js";
|
|
46
46
|
import { OxRadio as X, OxRadioGroup as Z } from "./components/Radio/Radio.js";
|
|
47
47
|
import { OxResponsiveOverlay as Q } from "./components/ResponsiveOverlay/index.js";
|
|
@@ -63,4 +63,4 @@ import { OxToast as ge } from "./components/Toast/index.js";
|
|
|
63
63
|
import { OxToggle as _e } from "./components/Toggle/index.js";
|
|
64
64
|
import { OxTypewriter as ve } from "./components/Typewriter/index.js";
|
|
65
65
|
import { OxVirtualList as ye } from "./components/VirtualList/VirtualList.js";
|
|
66
|
-
export { e as OxAccordion, t as OxAlert, r as OxAlertDialog, i as OxAnimatedGradientText, a as OxAppLayout, s as OxAutocomplete, u as OxAvatar, d as OxAvatarGroup, f as OxBadge, m as OxBlurSwitch, g as OxBreadcrumb, p as OxButton, _ as OxCard, C as OxCheckbox, w as OxCheckboxGroup, de as OxChip, v as OxCollapsible, y as OxCombobox, S as OxCommand, T as OxContextMenu, E as OxCopyButton, O as OxCopyInput,
|
|
66
|
+
export { e as OxAccordion, t as OxAlert, r as OxAlertDialog, i as OxAnimatedGradientText, a as OxAppLayout, s as OxAutocomplete, u as OxAvatar, d as OxAvatarGroup, f as OxBadge, m as OxBlurSwitch, g as OxBreadcrumb, p as OxButton, _ as OxCard, C as OxCheckbox, w as OxCheckboxGroup, de as OxChip, v as OxCollapsible, y as OxCombobox, S as OxCommand, T as OxContextMenu, E as OxCopyButton, O as OxCopyInput, N as OxDataTable, P as OxDescriptionList, F as OxDialog, I as OxDrawer, h as OxDropdown, L as OxField, R as OxFieldset, z as OxFooter, B as OxHeader, V as OxHoldToDelete, n as OxIconTile, D as OxInput, H as OxKbd, U as OxMain, W as OxMeter, G as OxNavigationMenu, K as OxNumberInput, q as OxOtpField, J as OxPageProgress, k as OxPagination, A as OxPopover, Y as OxProgress, X as OxRadio, Z as OxRadioGroup, Q as OxResponsiveOverlay, ee as OxScrollArea, $ as OxSelect, te as OxSeparator, ne as OxSidebar, ae as OxSidebarRail, j as OxSkeleton, le as OxSlider, o as OxSpinner, ue as OxStatusDisplay, oe as OxSwitch, se as OxTabBar, M as OxTable, ce as OxTabs, fe as OxTextarea, ge as OxToast, _e as OxToggle, re as OxTooltip, ie as OxTooltipProvider, ve as OxTypewriter, ye as OxVirtualList, pe as createOxToastManager, me as oxToast, c as useOxAutocompleteFilter, l as useOxAutocompleteFilteredItems, b as useOxComboboxFilter, x as useOxComboboxFilteredItems, he as useOxToast };
|