@shwfed/nuxt 0.7.8 → 0.7.10
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/module.json +1 -1
- package/dist/runtime/components/app.d.vue.ts +7 -58
- package/dist/runtime/components/app.vue +18 -411
- package/dist/runtime/components/app.vue.d.ts +7 -58
- package/dist/runtime/components/fields.d.vue.ts +177 -0
- package/dist/runtime/components/fields.vue +47 -0
- package/dist/runtime/components/fields.vue.d.ts +177 -0
- package/dist/runtime/components/table.d.vue.ts +63 -59
- package/dist/runtime/components/table.vue +52 -617
- package/dist/runtime/components/table.vue.d.ts +63 -59
- package/dist/runtime/components/ui/app/App.d.vue.ts +86 -0
- package/dist/runtime/components/ui/app/App.vue +414 -0
- package/dist/runtime/components/ui/app/App.vue.d.ts +86 -0
- package/dist/runtime/components/ui/button-group/ButtonGroupSeparator.vue +1 -1
- package/dist/runtime/components/ui/button-group/ButtonGroupText.vue +1 -1
- package/dist/runtime/components/ui/calendar/Calendar.d.vue.ts +5 -12
- package/dist/runtime/components/ui/calendar/Calendar.vue +77 -92
- package/dist/runtime/components/ui/calendar/Calendar.vue.d.ts +5 -12
- package/dist/runtime/components/ui/calendar/CalendarCellTrigger.vue +1 -1
- package/dist/runtime/components/ui/calendar/index.d.ts +1 -1
- package/dist/runtime/components/ui/checkbox/Checkbox.vue +6 -2
- package/dist/runtime/components/ui/command/CommandGroup.vue +4 -0
- package/dist/runtime/components/ui/dialog/DialogOverlay.vue +1 -1
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +1 -1
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +1 -1
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.d.vue.ts +30 -0
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue +87 -0
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue.d.ts +30 -0
- package/dist/runtime/components/ui/expression-editor/index.d.ts +1 -0
- package/dist/runtime/components/ui/expression-editor/index.js +1 -0
- package/dist/runtime/components/ui/field/FieldContent.vue +1 -1
- package/dist/runtime/components/ui/field/FieldDescription.vue +1 -1
- package/dist/runtime/components/ui/field/FieldError.vue +2 -2
- package/dist/runtime/components/ui/field/FieldLabel.vue +1 -1
- package/dist/runtime/components/ui/field/FieldSeparator.vue +1 -1
- package/dist/runtime/components/ui/field/index.js +7 -5
- package/dist/runtime/components/ui/fields/Fields.d.vue.ts +376 -0
- package/dist/runtime/components/ui/fields/Fields.vue +441 -0
- package/dist/runtime/components/ui/fields/Fields.vue.d.ts +376 -0
- package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.d.vue.ts +163 -0
- package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.vue +363 -0
- package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.vue.d.ts +163 -0
- package/dist/runtime/components/ui/input/Input.d.vue.ts +1 -0
- package/dist/runtime/components/ui/input/Input.vue +3 -1
- package/dist/runtime/components/ui/input/Input.vue.d.ts +1 -0
- package/dist/runtime/components/ui/input-group/InputGroup.vue +3 -0
- package/dist/runtime/components/ui/input-group/InputGroupAddon.vue +4 -1
- package/dist/runtime/components/ui/input-group/InputGroupCombobox.d.vue.ts +11 -3
- package/dist/runtime/components/ui/input-group/InputGroupCombobox.vue +16 -5
- package/dist/runtime/components/ui/input-group/InputGroupCombobox.vue.d.ts +11 -3
- package/dist/runtime/components/ui/input-group/InputGroupComboboxInput.d.vue.ts +8 -1
- package/dist/runtime/components/ui/input-group/InputGroupComboboxInput.vue +12 -1
- package/dist/runtime/components/ui/input-group/InputGroupComboboxInput.vue.d.ts +8 -1
- package/dist/runtime/components/ui/input-group/InputGroupInput.vue +1 -1
- package/dist/runtime/components/ui/input-group/InputGroupNumberField.d.vue.ts +5 -2
- package/dist/runtime/components/ui/input-group/InputGroupNumberField.vue +10 -4
- package/dist/runtime/components/ui/input-group/InputGroupNumberField.vue.d.ts +5 -2
- package/dist/runtime/components/ui/input-group/InputGroupText.vue +1 -1
- package/dist/runtime/components/ui/input-group/InputGroupTextarea.vue +1 -1
- package/dist/runtime/components/ui/input-group/index.js +2 -2
- package/dist/runtime/components/ui/label/Label.vue +1 -1
- package/dist/runtime/components/ui/locale/Locale.d.vue.ts +20 -0
- package/dist/runtime/components/ui/locale/Locale.vue +291 -0
- package/dist/runtime/components/ui/locale/Locale.vue.d.ts +20 -0
- package/dist/runtime/components/ui/locale/index.d.ts +1 -0
- package/dist/runtime/components/ui/locale/index.js +1 -0
- package/dist/runtime/components/ui/native-select/NativeSelect.vue +3 -3
- package/dist/runtime/components/ui/native-select/NativeSelectOption.d.vue.ts +1 -0
- package/dist/runtime/components/ui/native-select/NativeSelectOption.vue +4 -1
- package/dist/runtime/components/ui/native-select/NativeSelectOption.vue.d.ts +1 -0
- package/dist/runtime/components/ui/navigation-menu/NavigationMenuLink.vue +1 -1
- package/dist/runtime/components/ui/navigation-menu/NavigationMenuViewport.vue +1 -1
- package/dist/runtime/components/ui/number-field/NumberFieldInput.vue +1 -1
- package/dist/runtime/components/ui/range-calendar/RangeCalendarCell.vue +1 -1
- package/dist/runtime/components/ui/range-calendar/RangeCalendarCellTrigger.vue +1 -1
- package/dist/runtime/components/ui/sheet/SheetOverlay.vue +1 -1
- package/dist/runtime/components/ui/switch/Switch.d.vue.ts +24 -0
- package/dist/runtime/components/ui/switch/Switch.vue +46 -0
- package/dist/runtime/components/ui/switch/Switch.vue.d.ts +24 -0
- package/dist/runtime/components/ui/switch/index.d.ts +1 -0
- package/dist/runtime/components/ui/switch/index.js +1 -0
- package/dist/runtime/components/ui/table/Table.d.vue.ts +81 -0
- package/dist/runtime/components/ui/table/Table.vue +792 -0
- package/dist/runtime/components/ui/table/Table.vue.d.ts +81 -0
- package/dist/runtime/components/ui/table/schema.d.ts +48 -0
- package/dist/runtime/components/ui/table/schema.js +126 -0
- package/dist/runtime/components/ui/table-configurator/TableConfiguratorDialog.d.vue.ts +62 -0
- package/dist/runtime/components/ui/table-configurator/TableConfiguratorDialog.vue +2233 -0
- package/dist/runtime/components/ui/table-configurator/TableConfiguratorDialog.vue.d.ts +62 -0
- package/dist/runtime/components/ui/table-configurator/menu.d.ts +37 -0
- package/dist/runtime/components/ui/table-configurator/menu.js +227 -0
- package/dist/runtime/components/ui/tabs/Tabs.d.vue.ts +24 -0
- package/dist/runtime/components/ui/tabs/Tabs.vue +30 -0
- package/dist/runtime/components/ui/tabs/Tabs.vue.d.ts +24 -0
- package/dist/runtime/components/ui/tabs/TabsContent.d.vue.ts +18 -0
- package/dist/runtime/components/ui/tabs/TabsContent.vue +23 -0
- package/dist/runtime/components/ui/tabs/TabsContent.vue.d.ts +18 -0
- package/dist/runtime/components/ui/tabs/TabsList.d.vue.ts +18 -0
- package/dist/runtime/components/ui/tabs/TabsList.vue +25 -0
- package/dist/runtime/components/ui/tabs/TabsList.vue.d.ts +18 -0
- package/dist/runtime/components/ui/tabs/TabsTrigger.d.vue.ts +18 -0
- package/dist/runtime/components/ui/tabs/TabsTrigger.vue +27 -0
- package/dist/runtime/components/ui/tabs/TabsTrigger.vue.d.ts +18 -0
- package/dist/runtime/components/ui/tabs/index.d.ts +4 -0
- package/dist/runtime/components/ui/tabs/index.js +4 -0
- package/dist/runtime/components/ui/textarea/Textarea.d.vue.ts +1 -0
- package/dist/runtime/components/ui/textarea/Textarea.vue +4 -2
- package/dist/runtime/components/ui/textarea/Textarea.vue.d.ts +1 -0
- package/dist/runtime/components/ui/toggle/Toggle.d.vue.ts +34 -0
- package/dist/runtime/components/ui/toggle/Toggle.vue +32 -0
- package/dist/runtime/components/ui/toggle/Toggle.vue.d.ts +34 -0
- package/dist/runtime/components/ui/toggle/index.d.ts +7 -0
- package/dist/runtime/components/ui/toggle/index.js +22 -0
- package/dist/runtime/composables/useTableRenderers.d.ts +2 -1
- package/dist/runtime/composables/useTableRenderers.js +2 -1
- package/dist/runtime/plugins/cel/env.d.ts +2 -2
- package/dist/runtime/plugins/cel/env.js +5 -4
- package/dist/runtime/plugins/cel/index.d.ts +3 -3
- package/dist/runtime/plugins/cel/index.js +7 -3
- package/dist/runtime/plugins/markdown/index.d.ts +1 -1
- package/dist/runtime/style.css +1 -1
- package/dist/runtime/table-renderers/builtins.js +213 -98
- package/dist/runtime/table-renderers/registry.d.ts +1 -0
- package/dist/runtime/table-renderers/registry.js +3 -0
- package/dist/runtime/utils/coders.d.ts +32 -0
- package/dist/runtime/utils/coders.js +64 -0
- package/dist/runtime/vendor/cel/index.d.ts +17 -0
- package/dist/runtime/vendor/cel/index.js +10 -0
- package/dist/runtime/vendor/cel-js/LICENSE +21 -0
- package/dist/runtime/vendor/cel-js/UPSTREAM.md +17 -0
- package/dist/runtime/vendor/cel-js/lib/errors.d.ts +21 -0
- package/dist/runtime/vendor/cel-js/lib/errors.js +97 -0
- package/dist/runtime/vendor/cel-js/lib/evaluator.d.ts +4 -0
- package/dist/runtime/vendor/cel-js/lib/evaluator.js +192 -0
- package/dist/runtime/vendor/cel-js/lib/functions.d.ts +53 -0
- package/dist/runtime/vendor/cel-js/lib/functions.js +513 -0
- package/dist/runtime/vendor/cel-js/lib/globals.d.ts +27 -0
- package/dist/runtime/vendor/cel-js/lib/globals.js +33 -0
- package/dist/runtime/vendor/cel-js/lib/index.d.ts +469 -0
- package/dist/runtime/vendor/cel-js/lib/index.js +18 -0
- package/dist/runtime/vendor/cel-js/lib/macros.d.ts +1 -0
- package/dist/runtime/vendor/cel-js/lib/macros.js +230 -0
- package/dist/runtime/vendor/cel-js/lib/operators.d.ts +117 -0
- package/dist/runtime/vendor/cel-js/lib/operators.js +739 -0
- package/dist/runtime/vendor/cel-js/lib/optional.d.ts +14 -0
- package/dist/runtime/vendor/cel-js/lib/optional.js +161 -0
- package/dist/runtime/vendor/cel-js/lib/options.d.ts +23 -0
- package/dist/runtime/vendor/cel-js/lib/options.js +47 -0
- package/dist/runtime/vendor/cel-js/lib/overloads.d.ts +1 -0
- package/dist/runtime/vendor/cel-js/lib/overloads.js +214 -0
- package/dist/runtime/vendor/cel-js/lib/parser.d.ts +56 -0
- package/dist/runtime/vendor/cel-js/lib/parser.js +827 -0
- package/dist/runtime/vendor/cel-js/lib/registry.d.ts +279 -0
- package/dist/runtime/vendor/cel-js/lib/registry.js +1596 -0
- package/dist/runtime/vendor/cel-js/lib/serialize.d.ts +1 -0
- package/dist/runtime/vendor/cel-js/lib/serialize.js +259 -0
- package/dist/runtime/vendor/cel-js/lib/type-checker.d.ts +26 -0
- package/dist/runtime/vendor/cel-js/lib/type-checker.js +81 -0
- package/package.json +9 -4
- package/dist/runtime/components/locale.d.vue.ts +0 -14
- package/dist/runtime/components/locale.vue +0 -89
- package/dist/runtime/components/locale.vue.d.ts +0 -14
- package/dist/runtime/components/query.d.vue.ts +0 -30
- package/dist/runtime/components/query.vue +0 -266
- package/dist/runtime/components/query.vue.d.ts +0 -30
- package/dist/runtime/utilities/query-config/global.d.ts +0 -4
- package/dist/runtime/utilities/query-config/global.js +0 -18
- package/dist/runtime/utilities/query-config/index.d.ts +0 -3
- package/dist/runtime/utilities/query-config/index.js +0 -14
- package/dist/runtime/utilities/query-config/schema.d.ts +0 -96
- package/dist/runtime/utilities/query-config/schema.js +0 -51
- /package/dist/runtime/components/{logo.d.vue.ts → ui/logo/Logo.d.vue.ts} +0 -0
- /package/dist/runtime/components/{logo.vue → ui/logo/Logo.vue} +0 -0
- /package/dist/runtime/components/{logo.vue.d.ts → ui/logo/Logo.vue.d.ts} +0 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { type CellContext, type TableOptions } from '@tanstack/vue-table';
|
|
2
|
+
import { Effect } from 'effect';
|
|
3
|
+
import { type TableConfig } from './schema.js';
|
|
4
|
+
export type { Accessor, Column, Expression, Markdown, Render, TableConfig } from './schema.js';
|
|
5
|
+
export { AccessorC, ColumnC, RenderC, TableConfigC } from './schema.js';
|
|
6
|
+
declare module '@tanstack/vue-table' {
|
|
7
|
+
interface ColumnMeta<TData extends import('@tanstack/vue-table').RowData, TValue> {
|
|
8
|
+
tooltip?: string;
|
|
9
|
+
grow?: boolean;
|
|
10
|
+
accessor?: import('./schema').Accessor;
|
|
11
|
+
__types?: [TData, TValue];
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
17
|
+
config: Effect.Effect<TableConfig>;
|
|
18
|
+
data: Array<unknown>;
|
|
19
|
+
rowCount?: number;
|
|
20
|
+
}, import("@tanstack/table-core").Table<unknown>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
|
+
"update:config": (args_0: Readonly<{
|
|
22
|
+
getRowId?: import("./schema.js").Expression;
|
|
23
|
+
getSubRows?: import("./schema.js").Expression;
|
|
24
|
+
enableRowSelection?: import("./schema.js").Expression;
|
|
25
|
+
enableMultiRowSelection?: import("./schema.js").Expression;
|
|
26
|
+
columns: readonly Readonly<{
|
|
27
|
+
id?: string;
|
|
28
|
+
title?: import("../../../utils/coders.js").LocaleValue;
|
|
29
|
+
accessor?: import("./schema.js").Accessor;
|
|
30
|
+
renderer?: import("./schema.js").Render;
|
|
31
|
+
tooltip?: import("../../../utils/coders.js").LocaleValue;
|
|
32
|
+
size?: number;
|
|
33
|
+
enableSorting?: boolean;
|
|
34
|
+
enableMultiSorting?: boolean;
|
|
35
|
+
enablePinning?: boolean;
|
|
36
|
+
columns?: readonly Readonly</*elided*/ any>[];
|
|
37
|
+
grow?: boolean;
|
|
38
|
+
}>[];
|
|
39
|
+
cellStyles?: import("./schema.js").Expression;
|
|
40
|
+
props?: Omit<TableOptions<unknown>, "columns" | "data" | "getRowId" | "getCoreRowModel">;
|
|
41
|
+
paginationLeft?: import("./schema.js").Markdown;
|
|
42
|
+
paginationRight?: import("./schema.js").Markdown;
|
|
43
|
+
}>) => any;
|
|
44
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
45
|
+
config: Effect.Effect<TableConfig>;
|
|
46
|
+
data: Array<unknown>;
|
|
47
|
+
rowCount?: number;
|
|
48
|
+
}> & Readonly<{
|
|
49
|
+
"onUpdate:config"?: ((args_0: Readonly<{
|
|
50
|
+
getRowId?: import("./schema.js").Expression;
|
|
51
|
+
getSubRows?: import("./schema.js").Expression;
|
|
52
|
+
enableRowSelection?: import("./schema.js").Expression;
|
|
53
|
+
enableMultiRowSelection?: import("./schema.js").Expression;
|
|
54
|
+
columns: readonly Readonly<{
|
|
55
|
+
id?: string;
|
|
56
|
+
title?: import("../../../utils/coders.js").LocaleValue;
|
|
57
|
+
accessor?: import("./schema.js").Accessor;
|
|
58
|
+
renderer?: import("./schema.js").Render;
|
|
59
|
+
tooltip?: import("../../../utils/coders.js").LocaleValue;
|
|
60
|
+
size?: number;
|
|
61
|
+
enableSorting?: boolean;
|
|
62
|
+
enableMultiSorting?: boolean;
|
|
63
|
+
enablePinning?: boolean;
|
|
64
|
+
columns?: readonly Readonly</*elided*/ any>[];
|
|
65
|
+
grow?: boolean;
|
|
66
|
+
}>[];
|
|
67
|
+
cellStyles?: import("./schema.js").Expression;
|
|
68
|
+
props?: Omit<TableOptions<unknown>, "columns" | "data" | "getRowId" | "getCoreRowModel">;
|
|
69
|
+
paginationLeft?: import("./schema.js").Markdown;
|
|
70
|
+
paginationRight?: import("./schema.js").Markdown;
|
|
71
|
+
}>) => any) | undefined;
|
|
72
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
73
|
+
[key: string]: (props: Readonly<{
|
|
74
|
+
cell: CellContext<unknown, unknown>;
|
|
75
|
+
}>) => void;
|
|
76
|
+
}>;
|
|
77
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
78
|
+
new (): {
|
|
79
|
+
$slots: S;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { TableOptions } from '@tanstack/vue-table';
|
|
2
|
+
import z from 'zod';
|
|
3
|
+
import type { LocaleValue } from '../../../utils/coders.js';
|
|
4
|
+
export type Expression = string;
|
|
5
|
+
export type Markdown = string;
|
|
6
|
+
export type Render = string | Readonly<{
|
|
7
|
+
id: string;
|
|
8
|
+
props: unknown;
|
|
9
|
+
}>;
|
|
10
|
+
export type Accessor = string | Readonly<{
|
|
11
|
+
read: Expression;
|
|
12
|
+
write: Expression;
|
|
13
|
+
}>;
|
|
14
|
+
export type Column = Readonly<{
|
|
15
|
+
id?: string;
|
|
16
|
+
title?: LocaleValue;
|
|
17
|
+
accessor?: Accessor;
|
|
18
|
+
renderer?: Render;
|
|
19
|
+
tooltip?: LocaleValue;
|
|
20
|
+
size?: number;
|
|
21
|
+
enableSorting?: boolean;
|
|
22
|
+
enableMultiSorting?: boolean;
|
|
23
|
+
enablePinning?: boolean;
|
|
24
|
+
columns?: ReadonlyArray<Column>;
|
|
25
|
+
grow?: boolean;
|
|
26
|
+
}>;
|
|
27
|
+
export declare const RenderC: z.ZodType<Render>;
|
|
28
|
+
export declare const AccessorC: z.ZodType<Accessor>;
|
|
29
|
+
export declare const ColumnC: z.ZodType<Column>;
|
|
30
|
+
export type TableConfig = Readonly<{
|
|
31
|
+
getRowId?: Expression;
|
|
32
|
+
getSubRows?: Expression;
|
|
33
|
+
enableRowSelection?: Expression;
|
|
34
|
+
enableMultiRowSelection?: Expression;
|
|
35
|
+
columns: ReadonlyArray<Column>;
|
|
36
|
+
cellStyles?: Expression;
|
|
37
|
+
props?: Omit<TableOptions<unknown>, 'columns' | 'data' | 'getRowId' | 'getCoreRowModel'>;
|
|
38
|
+
paginationLeft?: Markdown;
|
|
39
|
+
paginationRight?: Markdown;
|
|
40
|
+
}>;
|
|
41
|
+
export declare const TableConfigGetRowIdC: z.ZodOptional<z.ZodString>;
|
|
42
|
+
export declare const TableConfigGetSubRowsC: z.ZodOptional<z.ZodString>;
|
|
43
|
+
export declare const TableConfigEnableRowSelectionC: z.ZodOptional<z.ZodString>;
|
|
44
|
+
export declare const TableConfigEnableMultiRowSelectionC: z.ZodOptional<z.ZodString>;
|
|
45
|
+
export declare const TableConfigCellStylesC: z.ZodOptional<z.ZodString>;
|
|
46
|
+
export declare const TableConfigC: z.ZodType<TableConfig>;
|
|
47
|
+
export declare function getLocalizedText(messages: LocaleValue | undefined, locale: string): string | undefined;
|
|
48
|
+
export declare function getColumnTechnicalKey(column: Column): string | undefined;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
import { dotPropC, expressionC, localeC } from "../../../utils/coders.js";
|
|
3
|
+
export const RenderC = z.union([
|
|
4
|
+
z.string(),
|
|
5
|
+
z.object({
|
|
6
|
+
id: z.string(),
|
|
7
|
+
props: z.unknown()
|
|
8
|
+
}).readonly()
|
|
9
|
+
]);
|
|
10
|
+
export const AccessorC = z.union([
|
|
11
|
+
dotPropC,
|
|
12
|
+
z.object({
|
|
13
|
+
read: expressionC(/.+/, { row: "dyn", index: "int" }),
|
|
14
|
+
write: z.string()
|
|
15
|
+
}).readonly()
|
|
16
|
+
]);
|
|
17
|
+
export const ColumnC = z.object({
|
|
18
|
+
id: z.string().optional(),
|
|
19
|
+
title: localeC.optional(),
|
|
20
|
+
accessor: AccessorC.optional(),
|
|
21
|
+
renderer: RenderC.optional(),
|
|
22
|
+
tooltip: localeC.optional(),
|
|
23
|
+
size: z.number().optional(),
|
|
24
|
+
enableSorting: z.boolean().optional(),
|
|
25
|
+
enableMultiSorting: z.boolean().optional(),
|
|
26
|
+
enablePinning: z.boolean().optional(),
|
|
27
|
+
columns: z.lazy(() => z.array(ColumnC).readonly()).optional(),
|
|
28
|
+
grow: z.boolean().optional()
|
|
29
|
+
}).strict().readonly();
|
|
30
|
+
const InitialTableStateC = z.object({
|
|
31
|
+
columnVisibility: z.record(z.string(), z.boolean()).optional(),
|
|
32
|
+
columnOrder: z.array(z.string()).readonly().optional(),
|
|
33
|
+
columnPinning: z.object({
|
|
34
|
+
left: z.array(z.string()).readonly().optional(),
|
|
35
|
+
right: z.array(z.string()).readonly().optional()
|
|
36
|
+
}).readonly().optional(),
|
|
37
|
+
rowPinning: z.object({
|
|
38
|
+
top: z.array(z.string()).readonly().optional(),
|
|
39
|
+
bottom: z.array(z.string()).readonly().optional()
|
|
40
|
+
}).readonly().optional(),
|
|
41
|
+
columnFilters: z.array(z.object({
|
|
42
|
+
id: z.string(),
|
|
43
|
+
value: z.unknown()
|
|
44
|
+
}).readonly()).readonly().optional(),
|
|
45
|
+
globalFilter: z.unknown().optional(),
|
|
46
|
+
sorting: z.array(z.object({
|
|
47
|
+
id: z.string(),
|
|
48
|
+
desc: z.boolean()
|
|
49
|
+
}).readonly()).readonly().optional(),
|
|
50
|
+
expanded: z.union([
|
|
51
|
+
z.boolean(),
|
|
52
|
+
z.record(z.string(), z.boolean())
|
|
53
|
+
]).optional(),
|
|
54
|
+
grouping: z.array(z.string()).readonly().optional(),
|
|
55
|
+
columnSizing: z.record(z.string(), z.number()).optional(),
|
|
56
|
+
columnSizingInfo: z.record(z.string(), z.unknown()).optional(),
|
|
57
|
+
pagination: z.object({
|
|
58
|
+
pageIndex: z.number().optional(),
|
|
59
|
+
pageSize: z.number().optional()
|
|
60
|
+
}).readonly().optional(),
|
|
61
|
+
rowSelection: z.record(z.string(), z.boolean()).optional()
|
|
62
|
+
}).readonly();
|
|
63
|
+
const TablePropsC = z.any().optional().superRefine((value, ctx) => {
|
|
64
|
+
if (value === void 0) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
68
|
+
ctx.addIssue({
|
|
69
|
+
code: "custom",
|
|
70
|
+
message: "table props \u5FC5\u987B\u662F\u5BF9\u8C61"
|
|
71
|
+
});
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (!Reflect.has(value, "initialState")) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const result = InitialTableStateC.safeParse(Reflect.get(value, "initialState"));
|
|
78
|
+
if (!result.success) {
|
|
79
|
+
ctx.addIssue({
|
|
80
|
+
code: "custom",
|
|
81
|
+
message: "\u65E0\u6548\u7684 props.initialState \u914D\u7F6E",
|
|
82
|
+
path: ["initialState"]
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
export const TableConfigGetRowIdC = expressionC("string", { row: "dyn", index: "int", parent: "dyn" }).optional();
|
|
87
|
+
export const TableConfigGetSubRowsC = expressionC(/.+/, { row: "dyn", index: "int" }).optional();
|
|
88
|
+
export const TableConfigEnableRowSelectionC = expressionC("bool", { row: "dyn", index: "int", id: "string" }).optional();
|
|
89
|
+
export const TableConfigEnableMultiRowSelectionC = expressionC("bool", { row: "dyn", index: "int", id: "string" }).optional();
|
|
90
|
+
export const TableConfigCellStylesC = expressionC(/^map/, {
|
|
91
|
+
row: "dyn",
|
|
92
|
+
index: "int",
|
|
93
|
+
id: "string",
|
|
94
|
+
selected: "bool",
|
|
95
|
+
pinned: "dyn"
|
|
96
|
+
}).optional();
|
|
97
|
+
export const TableConfigC = z.object({
|
|
98
|
+
getRowId: TableConfigGetRowIdC,
|
|
99
|
+
getSubRows: TableConfigGetSubRowsC,
|
|
100
|
+
enableRowSelection: TableConfigEnableRowSelectionC,
|
|
101
|
+
enableMultiRowSelection: TableConfigEnableMultiRowSelectionC,
|
|
102
|
+
columns: z.array(ColumnC).readonly(),
|
|
103
|
+
cellStyles: TableConfigCellStylesC,
|
|
104
|
+
props: TablePropsC,
|
|
105
|
+
paginationLeft: z.string().optional(),
|
|
106
|
+
paginationRight: z.string().optional()
|
|
107
|
+
}).readonly();
|
|
108
|
+
export function getLocalizedText(messages, locale) {
|
|
109
|
+
if (!messages) {
|
|
110
|
+
return void 0;
|
|
111
|
+
}
|
|
112
|
+
const localizedMessage = messages.find((message) => message.locale === locale && message.message.trim().length > 0);
|
|
113
|
+
if (localizedMessage) {
|
|
114
|
+
return localizedMessage.message;
|
|
115
|
+
}
|
|
116
|
+
return messages.find((message) => message.message.trim().length > 0)?.message;
|
|
117
|
+
}
|
|
118
|
+
export function getColumnTechnicalKey(column) {
|
|
119
|
+
if (typeof column.accessor === "string") {
|
|
120
|
+
return column.accessor;
|
|
121
|
+
}
|
|
122
|
+
if (column.id) {
|
|
123
|
+
return column.id;
|
|
124
|
+
}
|
|
125
|
+
return column.accessor?.read;
|
|
126
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type LocaleValue } from '../../../utils/coders.js';
|
|
2
|
+
import type { TableConfig } from '../table/schema.js';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
config: TableConfig;
|
|
5
|
+
};
|
|
6
|
+
type __VLS_ModelProps = {
|
|
7
|
+
'open'?: boolean;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
"update:open": (value: boolean) => any;
|
|
12
|
+
confirm: (args_0: Readonly<{
|
|
13
|
+
getRowId?: import("../table/schema.js").Expression;
|
|
14
|
+
getSubRows?: import("../table/schema.js").Expression;
|
|
15
|
+
enableRowSelection?: import("../table/schema.js").Expression;
|
|
16
|
+
enableMultiRowSelection?: import("../table/schema.js").Expression;
|
|
17
|
+
columns: readonly Readonly<{
|
|
18
|
+
id?: string;
|
|
19
|
+
title?: LocaleValue;
|
|
20
|
+
accessor?: import("../table/schema.js").Accessor;
|
|
21
|
+
renderer?: import("../table/schema.js").Render;
|
|
22
|
+
tooltip?: LocaleValue;
|
|
23
|
+
size?: number;
|
|
24
|
+
enableSorting?: boolean;
|
|
25
|
+
enableMultiSorting?: boolean;
|
|
26
|
+
enablePinning?: boolean;
|
|
27
|
+
columns?: readonly Readonly</*elided*/ any>[];
|
|
28
|
+
grow?: boolean;
|
|
29
|
+
}>[];
|
|
30
|
+
cellStyles?: import("../table/schema.js").Expression;
|
|
31
|
+
props?: Omit<import("@tanstack/table-core").TableOptions<unknown>, "columns" | "data" | "getRowId" | "getCoreRowModel">;
|
|
32
|
+
paginationLeft?: import("../table/schema.js").Markdown;
|
|
33
|
+
paginationRight?: import("../table/schema.js").Markdown;
|
|
34
|
+
}>) => any;
|
|
35
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
36
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
37
|
+
onConfirm?: ((args_0: Readonly<{
|
|
38
|
+
getRowId?: import("../table/schema.js").Expression;
|
|
39
|
+
getSubRows?: import("../table/schema.js").Expression;
|
|
40
|
+
enableRowSelection?: import("../table/schema.js").Expression;
|
|
41
|
+
enableMultiRowSelection?: import("../table/schema.js").Expression;
|
|
42
|
+
columns: readonly Readonly<{
|
|
43
|
+
id?: string;
|
|
44
|
+
title?: LocaleValue;
|
|
45
|
+
accessor?: import("../table/schema.js").Accessor;
|
|
46
|
+
renderer?: import("../table/schema.js").Render;
|
|
47
|
+
tooltip?: LocaleValue;
|
|
48
|
+
size?: number;
|
|
49
|
+
enableSorting?: boolean;
|
|
50
|
+
enableMultiSorting?: boolean;
|
|
51
|
+
enablePinning?: boolean;
|
|
52
|
+
columns?: readonly Readonly</*elided*/ any>[];
|
|
53
|
+
grow?: boolean;
|
|
54
|
+
}>[];
|
|
55
|
+
cellStyles?: import("../table/schema.js").Expression;
|
|
56
|
+
props?: Omit<import("@tanstack/table-core").TableOptions<unknown>, "columns" | "data" | "getRowId" | "getCoreRowModel">;
|
|
57
|
+
paginationLeft?: import("../table/schema.js").Markdown;
|
|
58
|
+
paginationRight?: import("../table/schema.js").Markdown;
|
|
59
|
+
}>) => any) | undefined;
|
|
60
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
61
|
+
declare const _default: typeof __VLS_export;
|
|
62
|
+
export default _default;
|