@gradient-ui/core 0.2.0 → 0.4.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/README.md +2 -0
- package/dist/{GLoading.vue_vue_type_style_index_0_lang-DDqJEYGf.js → GLoading.vue_vue_type_style_index_0_lang-CPzo3WD3.js} +195 -206
- package/dist/GLoading.vue_vue_type_style_index_0_lang-cokm-HBh.cjs +1 -0
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-BmbKqNgm.js +6421 -0
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-By_7hZOW.cjs +4 -0
- package/dist/components.cjs +1 -1
- package/dist/components.mjs +39 -38
- package/dist/directives.cjs +1 -1
- package/dist/directives.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +92 -88
- package/dist/{mask-BgaDaVWU.js → mask-Bu8cjwwH.js} +22 -21
- package/dist/mask-D1vJj5Hl.cjs +1 -0
- package/dist/propsFactory-DyyboUaC.cjs +1 -0
- package/dist/propsFactory-UhcvubZJ.js +13 -0
- package/dist/services.cjs +1 -1
- package/dist/services.mjs +1 -1
- package/dist/style.css +1 -1
- package/dist/tagName-CYG1CUfd.js +103 -0
- package/dist/tagName-CbsvFHGg.cjs +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/ui/GButton/GButton.vue.d.ts +62 -2
- package/dist/types/components/ui/GButton/types.d.ts +76 -40
- package/dist/types/components/ui/GNavbar/GNavbarItem.vue.d.ts +3 -3
- package/dist/types/components/ui/GNavbar/GNavbarMenu.vue.d.ts +3 -3
- package/dist/types/components/ui/GTable/GTable.vue.d.ts +143 -0
- package/dist/types/components/ui/GTable/GTableBody.vue.d.ts +69 -0
- package/dist/types/components/ui/GTable/GTableCell.vue.d.ts +35 -0
- package/dist/types/components/ui/GTable/GTableExpandedRow.vue.d.ts +25 -0
- package/dist/types/components/ui/GTable/GTableHead.vue.d.ts +30 -0
- package/dist/types/components/ui/GTable/GTableRow.vue.d.ts +40 -0
- package/dist/types/components/ui/GTable/context.d.ts +25 -0
- package/dist/types/components/ui/GTable/index.d.ts +3 -0
- package/dist/types/components/ui/GTable/types.d.ts +318 -0
- package/dist/types/components/ui/GTable/useTable.d.ts +22 -0
- package/dist/types/components/ui/GTable/useTableExpansion.d.ts +17 -0
- package/dist/types/components/ui/GTable/useTableSpans.d.ts +12 -0
- package/dist/types/use/index.d.ts +1 -0
- package/dist/types/use/tagName.d.ts +47 -0
- package/dist/use.cjs +1 -1
- package/dist/use.mjs +15 -12
- package/dist/useSnackbar-2iJU4bdd.js +769 -0
- package/dist/useSnackbar-3QuH25xm.cjs +1 -0
- package/package.json +2 -2
- package/dist/GLoading.vue_vue_type_style_index_0_lang-CqbeZChH.cjs +0 -1
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-Bufs8uqY.js +0 -5633
- package/dist/GSwitch.vue_vue_type_script_setup_true_lang-CH9jX5W1.cjs +0 -4
- package/dist/icon-0-mbYGMr.cjs +0 -1
- package/dist/icon-BrFRYYf3.js +0 -66
- package/dist/mask-pzGv8apS.cjs +0 -1
- package/dist/useSnackbar-CFrWSpt4.cjs +0 -1
- package/dist/useSnackbar-lGrTDbl-.js +0 -763
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { type GTableCellContext, type GTableKey, type GTableRowEvent, type GTableRowContext, type GTableRowAttrs } from './types';
|
|
2
|
+
declare const _default: <T extends Record<string, unknown>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{
|
|
4
|
+
loading: boolean;
|
|
5
|
+
caption: string;
|
|
6
|
+
rounded: boolean;
|
|
7
|
+
color: string;
|
|
8
|
+
variant: import("../../../use/variant").GVariant;
|
|
9
|
+
expanded: GTableKey[];
|
|
10
|
+
ariaLabel: string;
|
|
11
|
+
striped: boolean;
|
|
12
|
+
hover: boolean;
|
|
13
|
+
items: Record<string, unknown>[];
|
|
14
|
+
density: import("./types").GTableDensity;
|
|
15
|
+
headers: import("./types").GTableHeader<Record<string, unknown>>[];
|
|
16
|
+
itemKey: import("./types").GTableItemKey<Record<string, unknown>>;
|
|
17
|
+
stickyHeader: boolean;
|
|
18
|
+
fixedLayout: boolean;
|
|
19
|
+
clickableRows: boolean;
|
|
20
|
+
bordered: boolean;
|
|
21
|
+
hideHeader: boolean;
|
|
22
|
+
hideCaption: boolean;
|
|
23
|
+
ariaLabelledby: string;
|
|
24
|
+
loadingRows: number;
|
|
25
|
+
emptyText: string;
|
|
26
|
+
elevation: boolean;
|
|
27
|
+
showExpand: boolean;
|
|
28
|
+
singleExpand: boolean;
|
|
29
|
+
expandOnRowClick: boolean;
|
|
30
|
+
spans: import("./types").GTableCellSpan<Record<string, unknown>>[];
|
|
31
|
+
cellProps: ((context: GTableCellContext<Record<string, unknown>>) => import("./types").GTableCellAttrs | void) | undefined;
|
|
32
|
+
rowProps: ((context: GTableRowContext<Record<string, unknown>>) => GTableRowAttrs | void) | undefined;
|
|
33
|
+
headerProps: ((header: import("./types").GTableHeader<Record<string, unknown>>, index: number) => import("./types").GTableCellAttrs | void) | undefined;
|
|
34
|
+
}> & Omit<{
|
|
35
|
+
readonly loading: boolean;
|
|
36
|
+
readonly caption: string;
|
|
37
|
+
readonly rounded: boolean;
|
|
38
|
+
readonly color: string;
|
|
39
|
+
readonly variant: import("../../../use/variant").GVariant;
|
|
40
|
+
readonly expanded: GTableKey[];
|
|
41
|
+
readonly ariaLabel: string;
|
|
42
|
+
readonly striped: boolean;
|
|
43
|
+
readonly hover: boolean;
|
|
44
|
+
readonly items: Record<string, unknown>[];
|
|
45
|
+
readonly density: import("./types").GTableDensity;
|
|
46
|
+
readonly headers: import("./types").GTableHeader<Record<string, unknown>>[];
|
|
47
|
+
readonly itemKey: import("./types").GTableItemKey<Record<string, unknown>>;
|
|
48
|
+
readonly stickyHeader: boolean;
|
|
49
|
+
readonly fixedLayout: boolean;
|
|
50
|
+
readonly clickableRows: boolean;
|
|
51
|
+
readonly bordered: boolean;
|
|
52
|
+
readonly hideHeader: boolean;
|
|
53
|
+
readonly hideCaption: boolean;
|
|
54
|
+
readonly ariaLabelledby: string;
|
|
55
|
+
readonly loadingRows: number;
|
|
56
|
+
readonly emptyText: string;
|
|
57
|
+
readonly elevation: boolean;
|
|
58
|
+
readonly showExpand: boolean;
|
|
59
|
+
readonly singleExpand: boolean;
|
|
60
|
+
readonly expandOnRowClick: boolean;
|
|
61
|
+
readonly spans: import("./types").GTableCellSpan<Record<string, unknown>>[];
|
|
62
|
+
readonly cellProps: (context: GTableCellContext<Record<string, unknown>>) => import("./types").GTableCellAttrs | void;
|
|
63
|
+
readonly rowProps: (context: GTableRowContext<Record<string, unknown>>) => GTableRowAttrs | void;
|
|
64
|
+
readonly headerProps: (header: import("./types").GTableHeader<Record<string, unknown>>, index: number) => import("./types").GTableCellAttrs | void;
|
|
65
|
+
readonly onExpand?: ((item: T, expanded: boolean) => any) | undefined;
|
|
66
|
+
readonly "onUpdate:expanded"?: ((value: GTableKey[]) => any) | undefined;
|
|
67
|
+
readonly "onRow-click"?: ((item: T, event: GTableRowEvent) => any) | undefined;
|
|
68
|
+
readonly "onCell-click"?: ((context: GTableCellContext<T>, event: MouseEvent) => any) | undefined;
|
|
69
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "loading" | "caption" | "rounded" | "color" | "variant" | "expanded" | "ariaLabel" | "striped" | "hover" | "items" | "density" | "headers" | "itemKey" | "stickyHeader" | "fixedLayout" | "clickableRows" | "bordered" | "hideHeader" | "hideCaption" | "ariaLabelledby" | "loadingRows" | "emptyText" | "elevation" | "showExpand" | "singleExpand" | "expandOnRowClick" | "spans" | "cellProps" | "rowProps" | "headerProps">, "onExpand" | "onUpdate:expanded" | "onRow-click" | "onCell-click" | ("loading" | "caption" | "rounded" | "color" | "variant" | "expanded" | "ariaLabel" | "striped" | "hover" | "items" | "density" | "headers" | "itemKey" | "stickyHeader" | "fixedLayout" | "clickableRows" | "bordered" | "hideHeader" | "hideCaption" | "ariaLabelledby" | "loadingRows" | "emptyText" | "elevation" | "showExpand" | "singleExpand" | "expandOnRowClick" | "spans" | "cellProps" | "rowProps" | "headerProps")> & Partial<{}> & {}> & import("vue").PublicProps;
|
|
70
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
71
|
+
attrs: any;
|
|
72
|
+
slots: Partial<Record<string, (_: {
|
|
73
|
+
header: import("./types").GTableHeader<T>;
|
|
74
|
+
index: number;
|
|
75
|
+
}) => any>> & Partial<Record<string, (_: {
|
|
76
|
+
item: Record<string, unknown>;
|
|
77
|
+
header: import("./types").GTableHeader<Record<string, unknown>>;
|
|
78
|
+
value: unknown;
|
|
79
|
+
rowIndex: number;
|
|
80
|
+
columnIndex: number;
|
|
81
|
+
headers: import("./types").GTableHeader<Record<string, unknown>>[];
|
|
82
|
+
}) => any>> & {
|
|
83
|
+
top?(_: {}): any;
|
|
84
|
+
caption?(_: {}): any;
|
|
85
|
+
header?(_: {
|
|
86
|
+
header: import("./types").GTableHeader<T>;
|
|
87
|
+
index: number;
|
|
88
|
+
}): any;
|
|
89
|
+
header?(_: {
|
|
90
|
+
header: import("./types").GTableHeader<T>;
|
|
91
|
+
index: number;
|
|
92
|
+
}): any;
|
|
93
|
+
body?(_: {
|
|
94
|
+
columnCount: number;
|
|
95
|
+
classes: import("./types").GTableBodySlotClasses;
|
|
96
|
+
getCellContext: (item: Record<string, unknown>, header: import("./types").GTableHeader<Record<string, unknown>>, rowIndex: number, columnIndex: number) => GTableCellContext<Record<string, unknown>>;
|
|
97
|
+
getRowContext: (item: Record<string, unknown>, index: number) => GTableRowContext<Record<string, unknown>>;
|
|
98
|
+
headers: import("./types").GTableHeader<Record<string, unknown>>[];
|
|
99
|
+
items: Record<string, unknown>[];
|
|
100
|
+
}): any;
|
|
101
|
+
loading?(_: {}): any;
|
|
102
|
+
empty?(_: {}): any;
|
|
103
|
+
row?(_: {
|
|
104
|
+
headers: import("./types").GTableHeader<Record<string, unknown>>[];
|
|
105
|
+
item: Record<string, unknown>;
|
|
106
|
+
index: number;
|
|
107
|
+
key: GTableKey;
|
|
108
|
+
expanded: boolean;
|
|
109
|
+
toggleExpanded: () => void;
|
|
110
|
+
}): any;
|
|
111
|
+
expand?(_: {
|
|
112
|
+
item: Record<string, unknown>;
|
|
113
|
+
index: number;
|
|
114
|
+
key: GTableKey;
|
|
115
|
+
expanded: boolean;
|
|
116
|
+
toggleExpanded: () => void;
|
|
117
|
+
}): any;
|
|
118
|
+
item?(_: {
|
|
119
|
+
item: Record<string, unknown>;
|
|
120
|
+
header: import("./types").GTableHeader<Record<string, unknown>>;
|
|
121
|
+
value: unknown;
|
|
122
|
+
rowIndex: number;
|
|
123
|
+
columnIndex: number;
|
|
124
|
+
headers: import("./types").GTableHeader<Record<string, unknown>>[];
|
|
125
|
+
}): any;
|
|
126
|
+
"expanded-row"?(_: {
|
|
127
|
+
headers: import("./types").GTableHeader<Record<string, unknown>>[];
|
|
128
|
+
item: Record<string, unknown>;
|
|
129
|
+
index: number;
|
|
130
|
+
key: GTableKey;
|
|
131
|
+
expanded: boolean;
|
|
132
|
+
toggleExpanded: () => void;
|
|
133
|
+
}): any;
|
|
134
|
+
bottom?(_: {}): any;
|
|
135
|
+
};
|
|
136
|
+
emit: ((evt: "expand", item: T, expanded: boolean) => void) & ((evt: "update:expanded", value: GTableKey[]) => void) & ((evt: "row-click", item: T, event: GTableRowEvent) => void) & ((evt: "cell-click", context: GTableCellContext<T>, event: MouseEvent) => void);
|
|
137
|
+
}>) => import("vue").VNode & {
|
|
138
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
139
|
+
};
|
|
140
|
+
export default _default;
|
|
141
|
+
type __VLS_PrettifyLocal<T> = {
|
|
142
|
+
[K in keyof T]: T[K];
|
|
143
|
+
} & {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
declare const _default: <T extends Record<string, unknown>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
2
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & Partial<{}> & {
|
|
3
|
+
hasRows: boolean;
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
loadingRows?: number;
|
|
6
|
+
emptyText?: string;
|
|
7
|
+
showExpand?: boolean;
|
|
8
|
+
hasExpandedRowSlot?: boolean;
|
|
9
|
+
}> & import("vue").PublicProps;
|
|
10
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
11
|
+
attrs: any;
|
|
12
|
+
slots: Partial<Record<string, (_: {
|
|
13
|
+
item: T;
|
|
14
|
+
header: import("./types.js").GTableHeader<T>;
|
|
15
|
+
value: unknown;
|
|
16
|
+
rowIndex: number;
|
|
17
|
+
columnIndex: number;
|
|
18
|
+
headers: import("./types.js").GTableHeader<T>[];
|
|
19
|
+
}) => any>> & {
|
|
20
|
+
body?(_: {
|
|
21
|
+
columnCount: number;
|
|
22
|
+
classes: import("./types.js").GTableBodySlotClasses;
|
|
23
|
+
getCellContext: (item: T, header: import("./types.js").GTableHeader<T>, rowIndex: number, columnIndex: number) => import("./types.js").GTableCellContext<T>;
|
|
24
|
+
getRowContext: (item: T, index: number) => import("./types.js").GTableRowContext<T>;
|
|
25
|
+
headers: import("./types.js").GTableHeader<T>[];
|
|
26
|
+
items: T[];
|
|
27
|
+
}): any;
|
|
28
|
+
loading?(_: {}): any;
|
|
29
|
+
empty?(_: {}): any;
|
|
30
|
+
row?(_: {
|
|
31
|
+
headers: import("./types.js").GTableHeader<T>[];
|
|
32
|
+
item: T;
|
|
33
|
+
index: number;
|
|
34
|
+
key: import("./types.js").GTableKey;
|
|
35
|
+
expanded: boolean;
|
|
36
|
+
toggleExpanded: () => void;
|
|
37
|
+
}): any;
|
|
38
|
+
expand?(_: {
|
|
39
|
+
item: T;
|
|
40
|
+
index: number;
|
|
41
|
+
key: import("./types.js").GTableKey;
|
|
42
|
+
expanded: boolean;
|
|
43
|
+
toggleExpanded: () => void;
|
|
44
|
+
}): any;
|
|
45
|
+
item?(_: {
|
|
46
|
+
item: T;
|
|
47
|
+
header: import("./types.js").GTableHeader<T>;
|
|
48
|
+
value: unknown;
|
|
49
|
+
rowIndex: number;
|
|
50
|
+
columnIndex: number;
|
|
51
|
+
headers: import("./types.js").GTableHeader<T>[];
|
|
52
|
+
}): any;
|
|
53
|
+
"expanded-row"?(_: {
|
|
54
|
+
headers: import("./types.js").GTableHeader<T>[];
|
|
55
|
+
item: T;
|
|
56
|
+
index: number;
|
|
57
|
+
key: import("./types.js").GTableKey;
|
|
58
|
+
expanded: boolean;
|
|
59
|
+
toggleExpanded: () => void;
|
|
60
|
+
}): any;
|
|
61
|
+
};
|
|
62
|
+
emit: {};
|
|
63
|
+
}>) => import("vue").VNode & {
|
|
64
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
65
|
+
};
|
|
66
|
+
export default _default;
|
|
67
|
+
type __VLS_PrettifyLocal<T> = {
|
|
68
|
+
[K in keyof T]: T[K];
|
|
69
|
+
} & {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { GTableHeader } from './types';
|
|
2
|
+
declare const _default: <T extends Record<string, unknown>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & Partial<{}> & {
|
|
4
|
+
item: T;
|
|
5
|
+
header: GTableHeader<T>;
|
|
6
|
+
rowIndex: number;
|
|
7
|
+
columnIndex: number;
|
|
8
|
+
}> & import("vue").PublicProps;
|
|
9
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
10
|
+
attrs: any;
|
|
11
|
+
slots: Partial<Record<string, (_: {
|
|
12
|
+
item: T;
|
|
13
|
+
header: GTableHeader<T>;
|
|
14
|
+
value: unknown;
|
|
15
|
+
rowIndex: number;
|
|
16
|
+
columnIndex: number;
|
|
17
|
+
headers: GTableHeader<T>[];
|
|
18
|
+
}) => any>> & {
|
|
19
|
+
item?(_: {
|
|
20
|
+
item: T;
|
|
21
|
+
header: GTableHeader<T>;
|
|
22
|
+
value: unknown;
|
|
23
|
+
rowIndex: number;
|
|
24
|
+
columnIndex: number;
|
|
25
|
+
headers: GTableHeader<T>[];
|
|
26
|
+
}): any;
|
|
27
|
+
};
|
|
28
|
+
emit: {};
|
|
29
|
+
}>) => import("vue").VNode & {
|
|
30
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
31
|
+
};
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_PrettifyLocal<T> = {
|
|
34
|
+
[K in keyof T]: T[K];
|
|
35
|
+
} & {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare const _default: <T extends Record<string, unknown>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
2
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & Partial<{}> & {
|
|
3
|
+
item: T;
|
|
4
|
+
rowIndex: number;
|
|
5
|
+
}> & import("vue").PublicProps;
|
|
6
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
7
|
+
attrs: any;
|
|
8
|
+
slots: {
|
|
9
|
+
"expanded-row"?(_: {
|
|
10
|
+
headers: import("./types").GTableHeader<T>[];
|
|
11
|
+
item: T;
|
|
12
|
+
index: number;
|
|
13
|
+
key: import("./types").GTableKey;
|
|
14
|
+
expanded: boolean;
|
|
15
|
+
toggleExpanded: () => void;
|
|
16
|
+
}): any;
|
|
17
|
+
};
|
|
18
|
+
emit: {};
|
|
19
|
+
}>) => import("vue").VNode & {
|
|
20
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_PrettifyLocal<T> = {
|
|
24
|
+
[K in keyof T]: T[K];
|
|
25
|
+
} & {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { GTableCellAttrs, GTableHeader } from './types';
|
|
2
|
+
declare const _default: <T extends Record<string, unknown>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & Partial<{}> & {
|
|
4
|
+
headers: GTableHeader<T>[];
|
|
5
|
+
showExpand?: boolean;
|
|
6
|
+
getHeaderStyle: (header: GTableHeader<T>) => Record<string, string | undefined>;
|
|
7
|
+
getHeaderAlign: (header: GTableHeader<T>) => string;
|
|
8
|
+
getHeaderAttrs: (header: GTableHeader<T>, index: number) => GTableCellAttrs;
|
|
9
|
+
getColumnFixedAttrs: (header: GTableHeader<T>, index: number) => GTableCellAttrs;
|
|
10
|
+
getHeaderSlotName: (header: GTableHeader<T>) => string;
|
|
11
|
+
}> & import("vue").PublicProps;
|
|
12
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
13
|
+
attrs: any;
|
|
14
|
+
slots: Partial<Record<string, (_: {
|
|
15
|
+
header: GTableHeader<T>;
|
|
16
|
+
index: number;
|
|
17
|
+
}) => any>> & {
|
|
18
|
+
header?(_: {
|
|
19
|
+
header: GTableHeader<T>;
|
|
20
|
+
index: number;
|
|
21
|
+
}): any;
|
|
22
|
+
};
|
|
23
|
+
emit: {};
|
|
24
|
+
}>) => import("vue").VNode & {
|
|
25
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
26
|
+
};
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_PrettifyLocal<T> = {
|
|
29
|
+
[K in keyof T]: T[K];
|
|
30
|
+
} & {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
declare const _default: <T extends Record<string, unknown>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
2
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & Partial<{}> & {
|
|
3
|
+
item: T;
|
|
4
|
+
rowIndex: number;
|
|
5
|
+
showExpand?: boolean;
|
|
6
|
+
}> & import("vue").PublicProps;
|
|
7
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
8
|
+
attrs: any;
|
|
9
|
+
slots: Partial<Record<string, (_: {
|
|
10
|
+
item: T;
|
|
11
|
+
header: import("./types.js").GTableHeader<T>;
|
|
12
|
+
value: unknown;
|
|
13
|
+
rowIndex: number;
|
|
14
|
+
columnIndex: number;
|
|
15
|
+
headers: import("./types.js").GTableHeader<T>[];
|
|
16
|
+
}) => any>> & {
|
|
17
|
+
expand?(_: {
|
|
18
|
+
item: T;
|
|
19
|
+
index: number;
|
|
20
|
+
key: import("./types.js").GTableKey;
|
|
21
|
+
expanded: boolean;
|
|
22
|
+
toggleExpanded: () => void;
|
|
23
|
+
}): any;
|
|
24
|
+
item?(_: {
|
|
25
|
+
item: T;
|
|
26
|
+
header: import("./types.js").GTableHeader<T>;
|
|
27
|
+
value: unknown;
|
|
28
|
+
rowIndex: number;
|
|
29
|
+
columnIndex: number;
|
|
30
|
+
headers: import("./types.js").GTableHeader<T>[];
|
|
31
|
+
}): any;
|
|
32
|
+
};
|
|
33
|
+
emit: {};
|
|
34
|
+
}>) => import("vue").VNode & {
|
|
35
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
36
|
+
};
|
|
37
|
+
export default _default;
|
|
38
|
+
type __VLS_PrettifyLocal<T> = {
|
|
39
|
+
[K in keyof T]: T[K];
|
|
40
|
+
} & {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ComputedRef } from 'vue';
|
|
2
|
+
import type { GTableAlign, GTableBodySlotClasses, GTableCellAttrs, GTableCellContext, GTableHeader, GTableKey, GTableRowEvent, GTableRowAttrs, GTableRowContext } from './types';
|
|
3
|
+
export interface GTableContext<T extends Record<string, unknown>> {
|
|
4
|
+
headers: ComputedRef<GTableHeader<T>[]>;
|
|
5
|
+
items: ComputedRef<T[]>;
|
|
6
|
+
columnCount: ComputedRef<number>;
|
|
7
|
+
rowInteractive: ComputedRef<boolean>;
|
|
8
|
+
bodySlotClasses: GTableBodySlotClasses;
|
|
9
|
+
getItemKey: (item: T, index: number) => GTableKey;
|
|
10
|
+
getRowContext: (item: T, index: number) => GTableRowContext<T>;
|
|
11
|
+
getRowAttrs: (item: T, index: number) => GTableRowAttrs;
|
|
12
|
+
getCellContext: (item: T, header: GTableHeader<T>, rowIndex: number, columnIndex: number) => GTableCellContext<T>;
|
|
13
|
+
getCellAttrs: (context: GTableCellContext<T>) => GTableCellAttrs;
|
|
14
|
+
getColumnFixedAttrs: (header: GTableHeader<T>, index: number) => GTableCellAttrs;
|
|
15
|
+
getAlign: (header: GTableHeader<T>) => GTableAlign;
|
|
16
|
+
getItemSlotName: (header: GTableHeader<T>) => string;
|
|
17
|
+
isRowExpanded: (item: T, index: number) => boolean;
|
|
18
|
+
shouldRenderExpandedRow: (item: T, index: number) => boolean;
|
|
19
|
+
onExpandedAfterLeave: (item: T, index: number) => void;
|
|
20
|
+
toggleExpanded: (item: T, index: number) => void;
|
|
21
|
+
onRowClick: (item: T, index: number, event: GTableRowEvent) => void;
|
|
22
|
+
onCellClick: (context: GTableCellContext<T>, event: MouseEvent) => void;
|
|
23
|
+
}
|
|
24
|
+
export declare const provideTableContext: <T extends Record<string, unknown>>(context: GTableContext<T>) => void;
|
|
25
|
+
export declare const useTableContext: <T extends Record<string, unknown>>() => GTableContext<T>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { default as GTable } from './GTable.vue';
|
|
2
|
+
export { default } from './GTable.vue';
|
|
3
|
+
export type { GTableAlign, GTableBodySlotClasses, GTableBodySlotContext, GTableCellAttrs, GTableCellContext, GTableCellSpan, GTableDensity, GTableEmits, GTableHeader, GTableItemKey, GTableKey, GTableProps, GTableRowAttrs, GTableRowContext, GTableSlots } from './types';
|