yuyeon 0.0.4 → 0.0.7
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/style.css +1 -1
- package/dist/yuyeon.mjs +1869 -1373
- package/dist/yuyeon.umd.js +1 -1
- package/lib/components/button/YButton.mjs +8 -5
- package/lib/components/button/YButton.mjs.map +1 -1
- package/lib/components/button/YButton.scss +117 -117
- package/lib/components/dialog/YDialog.mjs +4 -0
- package/lib/components/dialog/YDialog.mjs.map +1 -1
- package/lib/components/icons/YIconCheckbox.mjs +11 -2
- package/lib/components/icons/YIconCheckbox.mjs.map +1 -1
- package/lib/components/icons/YIconCheckbox.scss +34 -0
- package/lib/components/icons/YIconPageControl.mjs +36 -0
- package/lib/components/icons/YIconPageControl.mjs.map +1 -0
- package/lib/components/menu/YMenu.mjs +7 -9
- package/lib/components/menu/YMenu.mjs.map +1 -1
- package/lib/components/pagination/YPagination.mjs +210 -8
- package/lib/components/pagination/YPagination.mjs.map +1 -1
- package/lib/components/pagination/YPagination.scss +37 -0
- package/lib/components/table/YDataTable.mjs +16 -2
- package/lib/components/table/YDataTable.mjs.map +1 -1
- package/lib/components/table/YDataTableBody.mjs +11 -3
- package/lib/components/table/YDataTableBody.mjs.map +1 -1
- package/lib/components/table/YDataTableHead.mjs +11 -3
- package/lib/components/table/YDataTableHead.mjs.map +1 -1
- package/lib/components/table/YDataTableServer.mjs +8 -1
- package/lib/components/table/YDataTableServer.mjs.map +1 -1
- package/lib/components/tooltip/YTooltip.mjs +8 -10
- package/lib/components/tooltip/YTooltip.mjs.map +1 -1
- package/lib/components/tree-view/YTreeView.mjs +223 -24
- package/lib/components/tree-view/YTreeView.mjs.map +1 -1
- package/lib/components/tree-view/YTreeView.scss +34 -1
- package/lib/components/tree-view/YTreeViewNode.mjs +95 -31
- package/lib/components/tree-view/YTreeViewNode.mjs.map +1 -1
- package/lib/components/tree-view/types.mjs +2 -0
- package/lib/components/tree-view/types.mjs.map +1 -0
- package/lib/components/tree-view/util.mjs +14 -0
- package/lib/components/tree-view/util.mjs.map +1 -0
- package/lib/composables/ref.mjs +13 -0
- package/lib/composables/ref.mjs.map +1 -0
- package/lib/util/array.mjs +10 -0
- package/lib/util/array.mjs.map +1 -0
- package/lib/util/collection.mjs +10 -0
- package/lib/util/collection.mjs.map +1 -0
- package/lib/util/common.mjs +20 -0
- package/lib/util/common.mjs.map +1 -1
- package/lib/util/vue-component.mjs +9 -1
- package/lib/util/vue-component.mjs.map +1 -1
- package/package.json +1 -1
- package/types/components/button/YButton.d.ts +1 -0
- package/types/components/checkbox/YInputCheckbox.d.ts +10 -1
- package/types/components/dialog/YDialog.d.ts +9 -1
- package/types/components/icons/YIconCheckbox.d.ts +10 -1
- package/types/components/icons/YIconPageControl.d.ts +28 -0
- package/types/components/menu/YMenu.d.ts +1 -1
- package/types/components/pagination/YPagination.d.ts +71 -10
- package/types/components/table/YDataTable.d.ts +14 -2
- package/types/components/table/YDataTableBody.d.ts +9 -1
- package/types/components/table/YDataTableHead.d.ts +9 -1
- package/types/components/table/YDataTableServer.d.ts +15 -0
- package/types/components/tooltip/YTooltip.d.ts +1 -1
- package/types/components/tree-view/YTreeView.d.ts +97 -11
- package/types/components/tree-view/YTreeViewNode.d.ts +97 -6
- package/types/components/tree-view/types.d.ts +12 -0
- package/types/components/tree-view/util.d.ts +2 -0
- package/types/composables/ref.d.ts +5 -0
- package/types/util/array.d.ts +1 -0
- package/types/util/common.d.ts +2 -0
- package/types/util/vue-component.d.ts +2 -1
- package/types/vite-env.d.ts +0 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComponentPublicInstance } from 'vue';
|
|
1
2
|
export declare const pressYPaginationProps: <Defaults extends {
|
|
2
3
|
start?: unknown;
|
|
3
4
|
modelValue?: unknown;
|
|
@@ -5,6 +6,13 @@ export declare const pressYPaginationProps: <Defaults extends {
|
|
|
5
6
|
length?: unknown;
|
|
6
7
|
totalVisible?: unknown;
|
|
7
8
|
showEndButton?: unknown;
|
|
9
|
+
gap?: unknown;
|
|
10
|
+
color?: unknown;
|
|
11
|
+
activeColor?: unknown;
|
|
12
|
+
firstIcon?: unknown;
|
|
13
|
+
lastIcon?: unknown;
|
|
14
|
+
prevIcon?: unknown;
|
|
15
|
+
nextIcon?: unknown;
|
|
8
16
|
} = {}>(defaults?: Defaults | undefined) => {
|
|
9
17
|
start: unknown extends Defaults["start"] ? {
|
|
10
18
|
type: (StringConstructor | NumberConstructor)[];
|
|
@@ -50,6 +58,40 @@ export declare const pressYPaginationProps: <Defaults extends {
|
|
|
50
58
|
type: import("vue").PropType<unknown extends Defaults ? "showEndButton" : "showEndButton" | Defaults>;
|
|
51
59
|
default: unknown extends Defaults["showEndButton"] ? boolean : boolean | Defaults["showEndButton"];
|
|
52
60
|
};
|
|
61
|
+
gap: unknown extends Defaults["gap"] ? {
|
|
62
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
63
|
+
default: number;
|
|
64
|
+
} : Omit<{
|
|
65
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
66
|
+
default: number;
|
|
67
|
+
}, "default" | "type"> & {
|
|
68
|
+
type: import("vue").PropType<unknown extends Defaults["gap"] ? string | number : NonNullable<string | number> | Defaults["gap"]>;
|
|
69
|
+
default: unknown extends Defaults["gap"] ? string | number : NonNullable<string | number> | Defaults["gap"];
|
|
70
|
+
};
|
|
71
|
+
color: unknown extends Defaults["color"] ? StringConstructor : {
|
|
72
|
+
type: import("vue").PropType<unknown extends Defaults ? "color" : "color" | Defaults>;
|
|
73
|
+
default: unknown extends Defaults["color"] ? string : string | Defaults["color"];
|
|
74
|
+
};
|
|
75
|
+
activeColor: unknown extends Defaults["activeColor"] ? StringConstructor : {
|
|
76
|
+
type: import("vue").PropType<unknown extends Defaults ? "activeColor" : "activeColor" | Defaults>;
|
|
77
|
+
default: unknown extends Defaults["activeColor"] ? string : string | Defaults["activeColor"];
|
|
78
|
+
};
|
|
79
|
+
firstIcon: unknown extends Defaults["firstIcon"] ? StringConstructor : {
|
|
80
|
+
type: import("vue").PropType<unknown extends Defaults ? "firstIcon" : "firstIcon" | Defaults>;
|
|
81
|
+
default: unknown extends Defaults["firstIcon"] ? string : string | Defaults["firstIcon"];
|
|
82
|
+
};
|
|
83
|
+
lastIcon: unknown extends Defaults["lastIcon"] ? StringConstructor : {
|
|
84
|
+
type: import("vue").PropType<unknown extends Defaults ? "lastIcon" : "lastIcon" | Defaults>;
|
|
85
|
+
default: unknown extends Defaults["lastIcon"] ? string : string | Defaults["lastIcon"];
|
|
86
|
+
};
|
|
87
|
+
prevIcon: unknown extends Defaults["prevIcon"] ? StringConstructor : {
|
|
88
|
+
type: import("vue").PropType<unknown extends Defaults ? "prevIcon" : "prevIcon" | Defaults>;
|
|
89
|
+
default: unknown extends Defaults["prevIcon"] ? string : string | Defaults["prevIcon"];
|
|
90
|
+
};
|
|
91
|
+
nextIcon: unknown extends Defaults["nextIcon"] ? StringConstructor : {
|
|
92
|
+
type: import("vue").PropType<unknown extends Defaults ? "nextIcon" : "nextIcon" | Defaults>;
|
|
93
|
+
default: unknown extends Defaults["nextIcon"] ? string : string | Defaults["nextIcon"];
|
|
94
|
+
};
|
|
53
95
|
};
|
|
54
96
|
export declare const YPagination: import("vue").DefineComponent<{
|
|
55
97
|
start: {
|
|
@@ -68,12 +110,23 @@ export declare const YPagination: import("vue").DefineComponent<{
|
|
|
68
110
|
};
|
|
69
111
|
totalVisible: (StringConstructor | NumberConstructor)[];
|
|
70
112
|
showEndButton: BooleanConstructor;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
113
|
+
gap: {
|
|
114
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
115
|
+
default: number;
|
|
116
|
+
};
|
|
117
|
+
color: StringConstructor;
|
|
118
|
+
activeColor: StringConstructor;
|
|
119
|
+
firstIcon: StringConstructor;
|
|
120
|
+
lastIcon: StringConstructor;
|
|
121
|
+
prevIcon: StringConstructor;
|
|
122
|
+
nextIcon: StringConstructor;
|
|
123
|
+
}, {
|
|
124
|
+
itemCount: import("vue").ShallowRef<number>;
|
|
125
|
+
page: import("vue").WritableComputedRef<any>;
|
|
126
|
+
refs: import("vue").Ref<(ComponentPublicInstance | undefined)[]>;
|
|
127
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
128
|
+
'update:modelValue': (value: number) => true;
|
|
129
|
+
change: (value: number, control?: string) => true;
|
|
77
130
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
78
131
|
start: {
|
|
79
132
|
type: (StringConstructor | NumberConstructor)[];
|
|
@@ -91,16 +144,24 @@ export declare const YPagination: import("vue").DefineComponent<{
|
|
|
91
144
|
};
|
|
92
145
|
totalVisible: (StringConstructor | NumberConstructor)[];
|
|
93
146
|
showEndButton: BooleanConstructor;
|
|
147
|
+
gap: {
|
|
148
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
149
|
+
default: number;
|
|
150
|
+
};
|
|
151
|
+
color: StringConstructor;
|
|
152
|
+
activeColor: StringConstructor;
|
|
153
|
+
firstIcon: StringConstructor;
|
|
154
|
+
lastIcon: StringConstructor;
|
|
155
|
+
prevIcon: StringConstructor;
|
|
156
|
+
nextIcon: StringConstructor;
|
|
94
157
|
}>> & {
|
|
95
158
|
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
96
|
-
|
|
97
|
-
onLast?: ((value: number) => any) | undefined;
|
|
98
|
-
onPrev?: ((value: number) => any) | undefined;
|
|
99
|
-
onNext?: ((value: number) => any) | undefined;
|
|
159
|
+
onChange?: ((value: number, control?: string | undefined) => any) | undefined;
|
|
100
160
|
}, {
|
|
101
161
|
length: string | number;
|
|
102
162
|
disabled: boolean;
|
|
103
163
|
modelValue: number;
|
|
104
164
|
start: string | number;
|
|
105
165
|
showEndButton: boolean;
|
|
166
|
+
gap: string | number;
|
|
106
167
|
}, {}>;
|
|
@@ -45,7 +45,13 @@ export declare const YDataTable: import("vue").DefineComponent<{
|
|
|
45
45
|
};
|
|
46
46
|
width: PropType<string | number>;
|
|
47
47
|
search: PropType<string>;
|
|
48
|
-
}, void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
48
|
+
}, void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
49
|
+
'update:modelValue': (value: any[]) => boolean;
|
|
50
|
+
'update:page': (value: number) => boolean;
|
|
51
|
+
'update:pageSize': (value: number) => boolean;
|
|
52
|
+
'update:sortBy': (value: any) => boolean;
|
|
53
|
+
'update:options': (value: any) => boolean;
|
|
54
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
49
55
|
page: {
|
|
50
56
|
type: PropType<string | number>;
|
|
51
57
|
default: number;
|
|
@@ -56,7 +62,13 @@ export declare const YDataTable: import("vue").DefineComponent<{
|
|
|
56
62
|
};
|
|
57
63
|
width: PropType<string | number>;
|
|
58
64
|
search: PropType<string>;
|
|
59
|
-
}
|
|
65
|
+
}>> & {
|
|
66
|
+
"onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
|
|
67
|
+
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
68
|
+
"onUpdate:pageSize"?: ((value: number) => any) | undefined;
|
|
69
|
+
"onUpdate:sortBy"?: ((value: any) => any) | undefined;
|
|
70
|
+
"onUpdate:options"?: ((value: any) => any) | undefined;
|
|
71
|
+
}, {
|
|
60
72
|
page: string | number;
|
|
61
73
|
pageSize: string | number;
|
|
62
74
|
}, {}>;
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
export declare const YDataTableBody: import("vue").DefineComponent<{
|
|
1
|
+
export declare const YDataTableBody: import("vue").DefineComponent<{
|
|
2
|
+
headers: {
|
|
3
|
+
type: ArrayConstructor[];
|
|
4
|
+
};
|
|
5
|
+
}, void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
6
|
+
headers: {
|
|
7
|
+
type: ArrayConstructor[];
|
|
8
|
+
};
|
|
9
|
+
}>>, {}, {}>;
|
|
2
10
|
export type YDataTableBody = InstanceType<typeof YDataTableBody>;
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
export declare const YDataTableHead: import("vue").DefineComponent<{
|
|
1
|
+
export declare const YDataTableHead: import("vue").DefineComponent<{
|
|
2
|
+
headers: {
|
|
3
|
+
type: ArrayConstructor[];
|
|
4
|
+
};
|
|
5
|
+
}, void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
6
|
+
headers: {
|
|
7
|
+
type: ArrayConstructor[];
|
|
8
|
+
};
|
|
9
|
+
}>>, {}, {}>;
|
|
2
10
|
export type YDataTableHead = InstanceType<typeof YDataTableHead>;
|
|
@@ -5,6 +5,7 @@ export declare const pressDataTableServerProps: <Defaults extends {
|
|
|
5
5
|
width?: unknown;
|
|
6
6
|
search?: unknown;
|
|
7
7
|
total?: unknown;
|
|
8
|
+
headers?: unknown;
|
|
8
9
|
} = {}>(defaults?: Defaults | undefined) => {
|
|
9
10
|
page: unknown extends Defaults["page"] ? {
|
|
10
11
|
type: PropType<string | number>;
|
|
@@ -44,6 +45,14 @@ export declare const pressDataTableServerProps: <Defaults extends {
|
|
|
44
45
|
type: PropType<unknown extends Defaults["total"] ? string | number : NonNullable<string | number> | Defaults["total"]>;
|
|
45
46
|
default: unknown extends Defaults["total"] ? string | number : NonNullable<string | number> | Defaults["total"];
|
|
46
47
|
};
|
|
48
|
+
headers: unknown extends Defaults["headers"] ? {
|
|
49
|
+
type: ArrayConstructor[];
|
|
50
|
+
} : Omit<{
|
|
51
|
+
type: ArrayConstructor[];
|
|
52
|
+
}, "default" | "type"> & {
|
|
53
|
+
type: PropType<unknown extends Defaults["headers"] ? unknown[] : unknown[] | Defaults["headers"]>;
|
|
54
|
+
default: unknown extends Defaults["headers"] ? unknown[] : unknown[] | Defaults["headers"];
|
|
55
|
+
};
|
|
47
56
|
};
|
|
48
57
|
export declare const YDataTableServer: import("vue").DefineComponent<{
|
|
49
58
|
page: {
|
|
@@ -60,6 +69,9 @@ export declare const YDataTableServer: import("vue").DefineComponent<{
|
|
|
60
69
|
type: PropType<string | number>;
|
|
61
70
|
required: true;
|
|
62
71
|
};
|
|
72
|
+
headers: {
|
|
73
|
+
type: ArrayConstructor[];
|
|
74
|
+
};
|
|
63
75
|
}, void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
64
76
|
page: {
|
|
65
77
|
type: PropType<string | number>;
|
|
@@ -75,6 +87,9 @@ export declare const YDataTableServer: import("vue").DefineComponent<{
|
|
|
75
87
|
type: PropType<string | number>;
|
|
76
88
|
required: true;
|
|
77
89
|
};
|
|
90
|
+
headers: {
|
|
91
|
+
type: ArrayConstructor[];
|
|
92
|
+
};
|
|
78
93
|
}>>, {
|
|
79
94
|
page: string | number;
|
|
80
95
|
pageSize: string | number;
|
|
@@ -139,7 +139,7 @@ export declare const YTooltip: import("vue").DefineComponent<{
|
|
|
139
139
|
coordinatesStyles: import("vue").ComputedRef<CSSProperties>;
|
|
140
140
|
baseSlot: import("vue").Ref<any>;
|
|
141
141
|
active: import("vue").WritableComputedRef<boolean>;
|
|
142
|
-
}
|
|
142
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
143
143
|
transition: {
|
|
144
144
|
default: string;
|
|
145
145
|
type: PropType<string | (import("vue").TransitionProps & {
|
|
@@ -1,37 +1,123 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
|
|
1
|
+
import { PropType, Ref } from 'vue';
|
|
2
|
+
import { NodeKey } from './types';
|
|
3
3
|
export declare const YTreeView: import("vue").DefineComponent<{
|
|
4
|
-
items: {
|
|
5
|
-
type: PropType<any[]>;
|
|
6
|
-
default: () => never[];
|
|
7
|
-
};
|
|
8
4
|
itemKey: {
|
|
9
5
|
type: PropType<string>;
|
|
10
6
|
default: string;
|
|
11
7
|
};
|
|
8
|
+
textKey: {
|
|
9
|
+
type: PropType<string>;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
12
|
childrenKey: {
|
|
13
13
|
type: PropType<string>;
|
|
14
14
|
default: string;
|
|
15
15
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
disableTransition: BooleanConstructor;
|
|
17
|
+
enableActive: BooleanConstructor;
|
|
18
|
+
activeClass: (StringConstructor | ArrayConstructor)[];
|
|
19
|
+
activeColor: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
enableSelect: BooleanConstructor;
|
|
19
24
|
items: {
|
|
20
25
|
type: PropType<any[]>;
|
|
21
26
|
default: () => never[];
|
|
22
27
|
};
|
|
28
|
+
expanded: {
|
|
29
|
+
type: PropType<NodeKey[]>;
|
|
30
|
+
default: () => never[];
|
|
31
|
+
};
|
|
32
|
+
active: {
|
|
33
|
+
type: PropType<NodeKey[]>;
|
|
34
|
+
default: () => never[];
|
|
35
|
+
};
|
|
36
|
+
multipleActive: BooleanConstructor;
|
|
37
|
+
activeStrategy: {
|
|
38
|
+
type: PropType<"independent" | "cascade">;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
selected: {
|
|
42
|
+
type: PropType<NodeKey[]>;
|
|
43
|
+
default: () => never[];
|
|
44
|
+
};
|
|
45
|
+
selectStrategy: {
|
|
46
|
+
type: PropType<"independent" | "cascade">;
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
49
|
+
returnItem: BooleanConstructor;
|
|
50
|
+
}, {
|
|
51
|
+
nodes: Ref<Record<NodeKey, any>>;
|
|
52
|
+
expandedSet: Ref<Set<NodeKey>>;
|
|
53
|
+
selectedSet: Ref<Set<NodeKey>>;
|
|
54
|
+
activeSet: Ref<Set<NodeKey>>;
|
|
55
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:expanded" | "update:active" | "update:selected")[], "update:expanded" | "update:active" | "update:selected", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
56
|
itemKey: {
|
|
24
57
|
type: PropType<string>;
|
|
25
58
|
default: string;
|
|
26
59
|
};
|
|
60
|
+
textKey: {
|
|
61
|
+
type: PropType<string>;
|
|
62
|
+
default: string;
|
|
63
|
+
};
|
|
27
64
|
childrenKey: {
|
|
28
65
|
type: PropType<string>;
|
|
29
66
|
default: string;
|
|
30
67
|
};
|
|
31
|
-
|
|
68
|
+
disableTransition: BooleanConstructor;
|
|
69
|
+
enableActive: BooleanConstructor;
|
|
70
|
+
activeClass: (StringConstructor | ArrayConstructor)[];
|
|
71
|
+
activeColor: {
|
|
72
|
+
type: StringConstructor;
|
|
73
|
+
default: string;
|
|
74
|
+
};
|
|
75
|
+
enableSelect: BooleanConstructor;
|
|
76
|
+
items: {
|
|
77
|
+
type: PropType<any[]>;
|
|
78
|
+
default: () => never[];
|
|
79
|
+
};
|
|
80
|
+
expanded: {
|
|
81
|
+
type: PropType<NodeKey[]>;
|
|
82
|
+
default: () => never[];
|
|
83
|
+
};
|
|
84
|
+
active: {
|
|
85
|
+
type: PropType<NodeKey[]>;
|
|
86
|
+
default: () => never[];
|
|
87
|
+
};
|
|
88
|
+
multipleActive: BooleanConstructor;
|
|
89
|
+
activeStrategy: {
|
|
90
|
+
type: PropType<"independent" | "cascade">;
|
|
91
|
+
default: string;
|
|
92
|
+
};
|
|
93
|
+
selected: {
|
|
94
|
+
type: PropType<NodeKey[]>;
|
|
95
|
+
default: () => never[];
|
|
96
|
+
};
|
|
97
|
+
selectStrategy: {
|
|
98
|
+
type: PropType<"independent" | "cascade">;
|
|
99
|
+
default: string;
|
|
100
|
+
};
|
|
101
|
+
returnItem: BooleanConstructor;
|
|
102
|
+
}>> & {
|
|
103
|
+
"onUpdate:expanded"?: ((...args: any[]) => any) | undefined;
|
|
104
|
+
"onUpdate:active"?: ((...args: any[]) => any) | undefined;
|
|
105
|
+
"onUpdate:selected"?: ((...args: any[]) => any) | undefined;
|
|
106
|
+
}, {
|
|
107
|
+
active: NodeKey[];
|
|
32
108
|
itemKey: string;
|
|
109
|
+
textKey: string;
|
|
33
110
|
childrenKey: string;
|
|
111
|
+
disableTransition: boolean;
|
|
112
|
+
enableActive: boolean;
|
|
113
|
+
activeColor: string;
|
|
114
|
+
enableSelect: boolean;
|
|
115
|
+
expanded: NodeKey[];
|
|
116
|
+
selected: NodeKey[];
|
|
34
117
|
items: any[];
|
|
118
|
+
multipleActive: boolean;
|
|
119
|
+
activeStrategy: "independent" | "cascade";
|
|
120
|
+
selectStrategy: "independent" | "cascade";
|
|
121
|
+
returnItem: boolean;
|
|
35
122
|
}, {}>;
|
|
36
123
|
export type YTreeView = InstanceType<typeof YTreeView>;
|
|
37
|
-
export {};
|
|
@@ -1,8 +1,72 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
export declare const pressYTreeViewNodeProps: <Defaults extends {
|
|
3
|
+
itemKey?: unknown;
|
|
4
|
+
textKey?: unknown;
|
|
5
|
+
childrenKey?: unknown;
|
|
6
|
+
disableTransition?: unknown;
|
|
7
|
+
enableActive?: unknown;
|
|
8
|
+
activeClass?: unknown;
|
|
9
|
+
activeColor?: unknown;
|
|
10
|
+
enableSelect?: unknown;
|
|
11
|
+
} = {}>(defaults?: Defaults | undefined) => {
|
|
12
|
+
itemKey: unknown extends Defaults["itemKey"] ? {
|
|
13
|
+
type: PropType<string>;
|
|
14
|
+
default: string;
|
|
15
|
+
} : Omit<{
|
|
16
|
+
type: PropType<string>;
|
|
17
|
+
default: string;
|
|
18
|
+
}, "default" | "type"> & {
|
|
19
|
+
type: PropType<unknown extends Defaults["itemKey"] ? string : string | Defaults["itemKey"]>;
|
|
20
|
+
default: unknown extends Defaults["itemKey"] ? string : string | Defaults["itemKey"];
|
|
21
|
+
};
|
|
22
|
+
textKey: unknown extends Defaults["textKey"] ? {
|
|
23
|
+
type: PropType<string>;
|
|
24
|
+
default: string;
|
|
25
|
+
} : Omit<{
|
|
26
|
+
type: PropType<string>;
|
|
27
|
+
default: string;
|
|
28
|
+
}, "default" | "type"> & {
|
|
29
|
+
type: PropType<unknown extends Defaults["textKey"] ? string : string | Defaults["textKey"]>;
|
|
30
|
+
default: unknown extends Defaults["textKey"] ? string : string | Defaults["textKey"];
|
|
31
|
+
};
|
|
32
|
+
childrenKey: unknown extends Defaults["childrenKey"] ? {
|
|
33
|
+
type: PropType<string>;
|
|
34
|
+
default: string;
|
|
35
|
+
} : Omit<{
|
|
36
|
+
type: PropType<string>;
|
|
37
|
+
default: string;
|
|
38
|
+
}, "default" | "type"> & {
|
|
39
|
+
type: PropType<unknown extends Defaults["childrenKey"] ? string : string | Defaults["childrenKey"]>;
|
|
40
|
+
default: unknown extends Defaults["childrenKey"] ? string : string | Defaults["childrenKey"];
|
|
41
|
+
};
|
|
42
|
+
disableTransition: unknown extends Defaults["disableTransition"] ? BooleanConstructor : {
|
|
43
|
+
type: PropType<unknown extends Defaults ? "disableTransition" : "disableTransition" | Defaults>;
|
|
44
|
+
default: unknown extends Defaults["disableTransition"] ? boolean : boolean | Defaults["disableTransition"];
|
|
45
|
+
};
|
|
46
|
+
enableActive: unknown extends Defaults["enableActive"] ? BooleanConstructor : {
|
|
47
|
+
type: PropType<unknown extends Defaults ? "enableActive" : "enableActive" | Defaults>;
|
|
48
|
+
default: unknown extends Defaults["enableActive"] ? boolean : boolean | Defaults["enableActive"];
|
|
5
49
|
};
|
|
50
|
+
activeClass: unknown extends Defaults["activeClass"] ? (StringConstructor | ArrayConstructor)[] : {
|
|
51
|
+
type: PropType<unknown extends Defaults ? "activeClass" : "activeClass" | Defaults>;
|
|
52
|
+
default: unknown extends Defaults["activeClass"] ? string | unknown[] : Defaults["activeClass"] | NonNullable<string | unknown[]>;
|
|
53
|
+
};
|
|
54
|
+
activeColor: unknown extends Defaults["activeColor"] ? {
|
|
55
|
+
type: StringConstructor;
|
|
56
|
+
default: string;
|
|
57
|
+
} : Omit<{
|
|
58
|
+
type: StringConstructor;
|
|
59
|
+
default: string;
|
|
60
|
+
}, "default" | "type"> & {
|
|
61
|
+
type: PropType<unknown extends Defaults["activeColor"] ? string : string | Defaults["activeColor"]>;
|
|
62
|
+
default: unknown extends Defaults["activeColor"] ? string : string | Defaults["activeColor"];
|
|
63
|
+
};
|
|
64
|
+
enableSelect: unknown extends Defaults["enableSelect"] ? BooleanConstructor : {
|
|
65
|
+
type: PropType<unknown extends Defaults ? "enableSelect" : "enableSelect" | Defaults>;
|
|
66
|
+
default: unknown extends Defaults["enableSelect"] ? boolean : boolean | Defaults["enableSelect"];
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
export declare const YTreeViewNode: import("vue").DefineComponent<{
|
|
6
70
|
itemKey: {
|
|
7
71
|
type: PropType<string>;
|
|
8
72
|
default: string;
|
|
@@ -15,6 +79,17 @@ export declare const YTreeViewNode: import("vue").DefineComponent<{
|
|
|
15
79
|
type: PropType<string>;
|
|
16
80
|
default: string;
|
|
17
81
|
};
|
|
82
|
+
disableTransition: BooleanConstructor;
|
|
83
|
+
enableActive: BooleanConstructor;
|
|
84
|
+
activeClass: (StringConstructor | ArrayConstructor)[];
|
|
85
|
+
activeColor: {
|
|
86
|
+
type: StringConstructor;
|
|
87
|
+
default: string;
|
|
88
|
+
};
|
|
89
|
+
enableSelect: BooleanConstructor;
|
|
90
|
+
item: {
|
|
91
|
+
type: PropType<any>;
|
|
92
|
+
};
|
|
18
93
|
level: {
|
|
19
94
|
type: PropType<number>;
|
|
20
95
|
default: number;
|
|
@@ -22,10 +97,11 @@ export declare const YTreeViewNode: import("vue").DefineComponent<{
|
|
|
22
97
|
}, {
|
|
23
98
|
treeView: any;
|
|
24
99
|
myKey: import("vue").ComputedRef<any>;
|
|
100
|
+
expanded: import("vue").Ref<boolean>;
|
|
101
|
+
active: import("vue").Ref<boolean>;
|
|
102
|
+
selected: import("vue").Ref<boolean>;
|
|
103
|
+
immediate: import("vue").Ref<boolean>;
|
|
25
104
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
26
|
-
item: {
|
|
27
|
-
type: PropType<any>;
|
|
28
|
-
};
|
|
29
105
|
itemKey: {
|
|
30
106
|
type: PropType<string>;
|
|
31
107
|
default: string;
|
|
@@ -38,6 +114,17 @@ export declare const YTreeViewNode: import("vue").DefineComponent<{
|
|
|
38
114
|
type: PropType<string>;
|
|
39
115
|
default: string;
|
|
40
116
|
};
|
|
117
|
+
disableTransition: BooleanConstructor;
|
|
118
|
+
enableActive: BooleanConstructor;
|
|
119
|
+
activeClass: (StringConstructor | ArrayConstructor)[];
|
|
120
|
+
activeColor: {
|
|
121
|
+
type: StringConstructor;
|
|
122
|
+
default: string;
|
|
123
|
+
};
|
|
124
|
+
enableSelect: BooleanConstructor;
|
|
125
|
+
item: {
|
|
126
|
+
type: PropType<any>;
|
|
127
|
+
};
|
|
41
128
|
level: {
|
|
42
129
|
type: PropType<number>;
|
|
43
130
|
default: number;
|
|
@@ -46,6 +133,10 @@ export declare const YTreeViewNode: import("vue").DefineComponent<{
|
|
|
46
133
|
itemKey: string;
|
|
47
134
|
textKey: string;
|
|
48
135
|
childrenKey: string;
|
|
136
|
+
disableTransition: boolean;
|
|
137
|
+
enableActive: boolean;
|
|
138
|
+
activeColor: string;
|
|
139
|
+
enableSelect: boolean;
|
|
49
140
|
level: number;
|
|
50
141
|
}, {}>;
|
|
51
142
|
export type YTreeNode = InstanceType<typeof YTreeViewNode>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentPublicInstance } from "vue";
|
|
2
|
+
export type NodeKey = string | number;
|
|
3
|
+
export interface NodeState {
|
|
4
|
+
childKeys: NodeKey[];
|
|
5
|
+
item: any;
|
|
6
|
+
parentKey: null | NodeKey;
|
|
7
|
+
vnode: null | ComponentPublicInstance;
|
|
8
|
+
selected: false;
|
|
9
|
+
indeterminate: false;
|
|
10
|
+
active: false;
|
|
11
|
+
expanded: false;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function differenceBetween(inspect: any[], exclude: any[]): any[];
|
package/types/util/common.d.ts
CHANGED
|
@@ -6,3 +6,5 @@ export declare function mergeDeep(source?: Record<string, any>, overwrite?: Reco
|
|
|
6
6
|
export declare function getObjectValueByPath(obj: any, path: string, fallback?: any): any;
|
|
7
7
|
export declare function randomCharOne(str: string): string;
|
|
8
8
|
export declare function clamp(value: number, min?: number, max?: number): number;
|
|
9
|
+
export declare function getRangeArr(length: number, start?: number): number[];
|
|
10
|
+
export declare function deepEqual(a: any, b: any): boolean;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { IfAny } from '@vue/shared';
|
|
2
|
-
import type { ComponentObjectPropsOptions, ComponentPublicInstance, Prop, PropType, VNode } from 'vue';
|
|
2
|
+
import type { ComponentObjectPropsOptions, ComponentPublicInstance, ExtractPropTypes, Prop, PropType, VNode } from 'vue';
|
|
3
3
|
export declare function getSlot(vm: ComponentPublicInstance | any, name?: string, data?: any | (() => any), optional?: boolean): VNode[] | undefined;
|
|
4
4
|
export declare function getUid(): number | undefined;
|
|
5
|
+
export declare function chooseProps<PropsOptions extends ComponentObjectPropsOptions>(props: any, target: PropsOptions): ExtractPropTypes<PropsOptions>;
|
|
5
6
|
export declare function bindClasses(classes: string | string[] | Record<string, any> | undefined): Record<string, boolean>;
|
|
6
7
|
export declare function getHtmlElement<N extends object | undefined>(node: N): Exclude<N, ComponentPublicInstance> | HTMLElement;
|
|
7
8
|
export declare function propsFactory<PropsOptions extends ComponentObjectPropsOptions>(props: PropsOptions, source: string): <Defaults extends PartialKeys<PropsOptions> = {}>(defaults?: Defaults | undefined) => OverwrittenPropOptions<PropsOptions, Defaults>;
|
package/types/vite-env.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|