@teammodlr/ui-kit 2.1.4 → 2.1.6
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/lib/call.d.ts +7 -0
- package/lib/components/confirm/Confirm.vue.d.ts +46 -0
- package/lib/components/{dialog/DialogProvider.vue.d.ts → confirm/ConfirmProvider.vue.d.ts} +5 -5
- package/lib/components/{dialog → confirm}/props.d.ts +2 -2
- package/lib/components/confirm/types.d.ts +27 -0
- package/lib/components/confirm/useConfirm.d.ts +2 -0
- package/lib/components/dialog/Dialog.vue.d.ts +90 -41
- package/lib/components/dialog/style/Dialog.css.d.ts +11 -0
- package/lib/components/dialog/style/index.d.ts +1 -0
- package/lib/components/dialog/types.d.ts +0 -27
- package/lib/components/index.d.ts +3 -1
- package/lib/components/select/Select.vue.d.ts +21 -1
- package/lib/components/select/style/Select.css.d.ts +6 -0
- package/lib/components/tree/Tree.vue.d.ts +103 -0
- package/lib/components/tree/TreeNode.vue.d.ts +18 -0
- package/lib/components/tree/props.d.ts +70 -0
- package/lib/components/tree/types.d.ts +53 -0
- package/lib/composables/index.d.ts +1 -1
- package/lib/composables/useMergedState.d.ts +2 -0
- package/lib/index.cjs.js +18 -2
- package/lib/index.es.js +4706 -2754
- package/lib/style.css +1 -1
- package/lib/styles/theme.css.d.ts +7 -1
- package/lib/utils/injection.d.ts +2 -0
- package/package.json +6 -4
- package/src/call.ts +34 -0
- package/src/components/confirm/Confirm.vue +60 -0
- package/src/components/{dialog/DialogProvider.vue → confirm/ConfirmProvider.vue} +18 -18
- package/src/components/confirm/examples/basic.vue +48 -0
- package/src/components/confirm/examples/index.stories.ts +29 -0
- package/src/components/confirm/examples/index.ts +1 -0
- package/src/components/{dialog → confirm}/props.ts +2 -2
- package/src/components/confirm/types.ts +34 -0
- package/src/components/confirm/useConfirm.ts +12 -0
- package/src/components/dialog/Dialog.vue +102 -44
- package/src/components/dialog/examples/basic.vue +8 -40
- package/src/components/dialog/examples/index.stories.ts +11 -22
- package/src/components/dialog/examples/index.ts +1 -1
- package/src/components/dialog/style/Dialog.css.ts +99 -0
- package/src/components/dialog/style/index.ts +1 -0
- package/src/components/dialog/types.ts +0 -34
- package/src/components/index.ts +3 -1
- package/src/components/select/Select.vue +100 -34
- package/src/components/select/examples/multiple.vue +1 -1
- package/src/components/select/style/Select.css.ts +91 -11
- package/src/components/tag/style/Tag.css.ts +0 -1
- package/src/components/tree/Tree.vue +126 -0
- package/src/components/tree/TreeNode.vue +71 -0
- package/src/components/tree/examples/basic.vue +33 -0
- package/src/components/tree/examples/index.stories.ts +16 -0
- package/src/components/tree/examples/index.ts +1 -0
- package/src/components/tree/props.ts +87 -0
- package/src/components/tree/types.ts +96 -0
- package/src/composables/index.ts +1 -1
- package/src/composables/useMergedState.ts +18 -0
- package/src/styles/theme.css.ts +3 -1
- package/src/utils/injection.ts +5 -0
- package/lib/components/dialog/useDialog.d.ts +0 -2
- package/lib/styles/typography.css.d.ts +0 -22
- package/src/components/dialog/useDialog.ts +0 -12
- package/src/styles/typography.css.ts +0 -91
- /package/lib/components/{dialog → confirm}/providerProps.d.ts +0 -0
- /package/src/components/{dialog → confirm}/examples/wrapper.vue +0 -0
- /package/src/components/{dialog → confirm}/providerProps.ts +0 -0
package/lib/call.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare function call(funcs: MaybeArray<() => void>): void;
|
|
2
|
+
declare function call<A1>(funcs: MaybeArray<(a1: A1) => void>, a1: A1): void;
|
|
3
|
+
declare function call<A1, A2>(funcs: MaybeArray<(a1: A1, a2: A2) => void>, a1: A1, a2: A2): void;
|
|
4
|
+
declare function call<A1, A2, A3>(funcs: MaybeArray<(a1: A1, a2: A2, a3: A3) => void>, a1: A1, a2: A2, a3: A3): void;
|
|
5
|
+
declare function call<A1, A2, A3, A4>(funcs: MaybeArray<(a1: A1, a2: A2, a3: A3, a4: A4) => void>, a1: A1, a2: A2, a3: A3, a4: A4): void;
|
|
6
|
+
export { call };
|
|
7
|
+
export type MaybeArray<T> = T | T[];
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
readonly title: StringConstructor;
|
|
3
|
+
readonly closable: {
|
|
4
|
+
readonly type: BooleanConstructor;
|
|
5
|
+
readonly default: true;
|
|
6
|
+
};
|
|
7
|
+
readonly okText: StringConstructor;
|
|
8
|
+
readonly cancelText: StringConstructor;
|
|
9
|
+
readonly content: import("vue").PropType<string | (() => import("vue").VNodeChild)>;
|
|
10
|
+
readonly action: import("vue").PropType<() => import("vue").VNodeChild>;
|
|
11
|
+
readonly loading: BooleanConstructor;
|
|
12
|
+
readonly onOk: import("vue").PropType<(e: MouseEvent) => void>;
|
|
13
|
+
readonly onCancel: import("vue").PropType<(e: MouseEvent) => void>;
|
|
14
|
+
readonly onClose: import("vue").PropType<() => void>;
|
|
15
|
+
readonly okVariant: {
|
|
16
|
+
readonly type: import("vue").PropType<import("../../types/props").Variant>;
|
|
17
|
+
readonly default: "primary";
|
|
18
|
+
};
|
|
19
|
+
}, {
|
|
20
|
+
modal: import("vue").Ref<any>;
|
|
21
|
+
handleOk: (event: MouseEvent) => Promise<void>;
|
|
22
|
+
handleCancel: (event: MouseEvent) => Promise<void>;
|
|
23
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
24
|
+
readonly title: StringConstructor;
|
|
25
|
+
readonly closable: {
|
|
26
|
+
readonly type: BooleanConstructor;
|
|
27
|
+
readonly default: true;
|
|
28
|
+
};
|
|
29
|
+
readonly okText: StringConstructor;
|
|
30
|
+
readonly cancelText: StringConstructor;
|
|
31
|
+
readonly content: import("vue").PropType<string | (() => import("vue").VNodeChild)>;
|
|
32
|
+
readonly action: import("vue").PropType<() => import("vue").VNodeChild>;
|
|
33
|
+
readonly loading: BooleanConstructor;
|
|
34
|
+
readonly onOk: import("vue").PropType<(e: MouseEvent) => void>;
|
|
35
|
+
readonly onCancel: import("vue").PropType<(e: MouseEvent) => void>;
|
|
36
|
+
readonly onClose: import("vue").PropType<() => void>;
|
|
37
|
+
readonly okVariant: {
|
|
38
|
+
readonly type: import("vue").PropType<import("../../types/props").Variant>;
|
|
39
|
+
readonly default: "primary";
|
|
40
|
+
};
|
|
41
|
+
}>>, {
|
|
42
|
+
readonly loading: boolean;
|
|
43
|
+
readonly closable: boolean;
|
|
44
|
+
readonly okVariant: import("../../types/props").Variant;
|
|
45
|
+
}, {}>;
|
|
46
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
interface
|
|
1
|
+
import type { Confirm, ConfirmOptions } from "./types";
|
|
2
|
+
interface PrivateConfirmRef extends Confirm {
|
|
3
3
|
key: string;
|
|
4
4
|
hide: () => void;
|
|
5
5
|
}
|
|
@@ -9,12 +9,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9
9
|
default: string;
|
|
10
10
|
};
|
|
11
11
|
}, {
|
|
12
|
-
dialogRefs: Record<string,
|
|
12
|
+
dialogRefs: Record<string, PrivateConfirmRef>;
|
|
13
13
|
dialogList: import("vue").Ref<{
|
|
14
14
|
key: string;
|
|
15
15
|
destroy: () => void;
|
|
16
16
|
title?: string | undefined;
|
|
17
|
-
render?: import("./types").
|
|
17
|
+
render?: import("./types").ConfirmContentRender | undefined;
|
|
18
18
|
content: string;
|
|
19
19
|
onClose?: (() => void) | undefined;
|
|
20
20
|
onOpen?: (() => void) | undefined;
|
|
@@ -24,7 +24,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
24
24
|
okText?: string | undefined;
|
|
25
25
|
cancelText?: string | undefined;
|
|
26
26
|
}[]>;
|
|
27
|
-
create: (options:
|
|
27
|
+
create: (options: ConfirmOptions) => Confirm;
|
|
28
28
|
destroyAll: () => void;
|
|
29
29
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
30
|
teleportTo: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Variant } from '../../types/props';
|
|
2
2
|
import type { ExtractPropTypes, PropType, VNodeChild } from 'vue';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const confirmProps: {
|
|
4
4
|
readonly title: StringConstructor;
|
|
5
5
|
readonly closable: {
|
|
6
6
|
readonly type: BooleanConstructor;
|
|
@@ -19,4 +19,4 @@ export declare const dialogProps: {
|
|
|
19
19
|
readonly default: "primary";
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
export type
|
|
22
|
+
export type ConfirmProps = ExtractPropTypes<typeof confirmProps>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Variant } from '../../types/props';
|
|
2
|
+
import type { VNodeChild } from 'vue';
|
|
3
|
+
export type ConfirmContentType = string;
|
|
4
|
+
export type ConfirmContentRender = (props: any) => VNodeChild;
|
|
5
|
+
export interface ConfirmOptions {
|
|
6
|
+
title?: string;
|
|
7
|
+
render?: ConfirmContentRender;
|
|
8
|
+
content: ConfirmContentType;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
onOpen?: () => void;
|
|
11
|
+
onOk?: () => void;
|
|
12
|
+
onCancel?: () => void;
|
|
13
|
+
okVariant?: Variant;
|
|
14
|
+
okText?: ConfirmContentType;
|
|
15
|
+
cancelText?: ConfirmContentType;
|
|
16
|
+
}
|
|
17
|
+
export interface ConfirmResponse {
|
|
18
|
+
result: boolean;
|
|
19
|
+
data: any;
|
|
20
|
+
}
|
|
21
|
+
export interface ConfirmApiInjection {
|
|
22
|
+
create: (options: ConfirmOptions) => Confirm;
|
|
23
|
+
destroyAll: () => void;
|
|
24
|
+
}
|
|
25
|
+
export interface Confirm extends ConfirmOptions {
|
|
26
|
+
destroy: () => void;
|
|
27
|
+
}
|
|
@@ -1,46 +1,95 @@
|
|
|
1
|
+
import { type PropType } from "vue";
|
|
2
|
+
import * as style from "./style";
|
|
1
3
|
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
readonly default: true;
|
|
6
|
-
};
|
|
7
|
-
readonly okText: StringConstructor;
|
|
8
|
-
readonly cancelText: StringConstructor;
|
|
9
|
-
readonly content: import("vue").PropType<string | (() => import("vue").VNodeChild)>;
|
|
10
|
-
readonly action: import("vue").PropType<() => import("vue").VNodeChild>;
|
|
11
|
-
readonly loading: BooleanConstructor;
|
|
12
|
-
readonly onOk: import("vue").PropType<(e: MouseEvent) => void>;
|
|
13
|
-
readonly onCancel: import("vue").PropType<(e: MouseEvent) => void>;
|
|
14
|
-
readonly onClose: import("vue").PropType<() => void>;
|
|
15
|
-
readonly okVariant: {
|
|
16
|
-
readonly type: import("vue").PropType<import("../../types/props").Variant>;
|
|
17
|
-
readonly default: "primary";
|
|
4
|
+
title: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: string;
|
|
18
7
|
};
|
|
8
|
+
draggable: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
backdrop: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
onClose: {
|
|
17
|
+
type: PropType<() => void>;
|
|
18
|
+
default: () => void;
|
|
19
|
+
};
|
|
20
|
+
zIndex: {
|
|
21
|
+
type: NumberConstructor;
|
|
22
|
+
};
|
|
23
|
+
width: {
|
|
24
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
transformOrigin: {
|
|
28
|
+
type: PropType<"center" | "mouse">;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
focusTrap: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
}, {
|
|
36
|
+
slots: Readonly<{
|
|
37
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
38
|
+
}>;
|
|
39
|
+
wrapper: import("vue").Ref<HTMLElement | null>;
|
|
40
|
+
dialog: import("vue").Ref<HTMLElement | null>;
|
|
41
|
+
handle: import("vue").Ref<HTMLElement | null>;
|
|
42
|
+
zIndex: import("vue").Ref<number>;
|
|
43
|
+
width: import("vue").ComputedRef<string>;
|
|
44
|
+
x: import("vue").Ref<number>;
|
|
45
|
+
y: import("vue").Ref<number>;
|
|
46
|
+
style: typeof style;
|
|
47
|
+
backdropClasses: import("vue").ComputedRef<{
|
|
48
|
+
[x: string]: boolean;
|
|
49
|
+
}>;
|
|
50
|
+
nextZIndex: () => number;
|
|
51
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onClose" | "onOpen")[], "onClose" | "onOpen", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
52
|
+
title: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
default: string;
|
|
55
|
+
};
|
|
56
|
+
draggable: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
60
|
+
backdrop: {
|
|
61
|
+
type: BooleanConstructor;
|
|
62
|
+
default: boolean;
|
|
63
|
+
};
|
|
64
|
+
onClose: {
|
|
65
|
+
type: PropType<() => void>;
|
|
66
|
+
default: () => void;
|
|
67
|
+
};
|
|
68
|
+
zIndex: {
|
|
69
|
+
type: NumberConstructor;
|
|
70
|
+
};
|
|
71
|
+
width: {
|
|
72
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
73
|
+
default: string;
|
|
74
|
+
};
|
|
75
|
+
transformOrigin: {
|
|
76
|
+
type: PropType<"center" | "mouse">;
|
|
77
|
+
default: string;
|
|
78
|
+
};
|
|
79
|
+
focusTrap: {
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
83
|
+
}>> & {
|
|
84
|
+
onOnClose?: ((...args: any[]) => any) | undefined;
|
|
85
|
+
onOnOpen?: ((...args: any[]) => any) | undefined;
|
|
19
86
|
}, {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
readonly default: true;
|
|
28
|
-
};
|
|
29
|
-
readonly okText: StringConstructor;
|
|
30
|
-
readonly cancelText: StringConstructor;
|
|
31
|
-
readonly content: import("vue").PropType<string | (() => import("vue").VNodeChild)>;
|
|
32
|
-
readonly action: import("vue").PropType<() => import("vue").VNodeChild>;
|
|
33
|
-
readonly loading: BooleanConstructor;
|
|
34
|
-
readonly onOk: import("vue").PropType<(e: MouseEvent) => void>;
|
|
35
|
-
readonly onCancel: import("vue").PropType<(e: MouseEvent) => void>;
|
|
36
|
-
readonly onClose: import("vue").PropType<() => void>;
|
|
37
|
-
readonly okVariant: {
|
|
38
|
-
readonly type: import("vue").PropType<import("../../types/props").Variant>;
|
|
39
|
-
readonly default: "primary";
|
|
40
|
-
};
|
|
41
|
-
}>>, {
|
|
42
|
-
readonly loading: boolean;
|
|
43
|
-
readonly closable: boolean;
|
|
44
|
-
readonly okVariant: import("../../types/props").Variant;
|
|
87
|
+
title: string;
|
|
88
|
+
width: string | number;
|
|
89
|
+
draggable: boolean;
|
|
90
|
+
transformOrigin: "center" | "mouse";
|
|
91
|
+
onClose: () => void;
|
|
92
|
+
backdrop: boolean;
|
|
93
|
+
focusTrap: boolean;
|
|
45
94
|
}, {}>;
|
|
46
95
|
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const vars: {};
|
|
2
|
+
export declare const root: string;
|
|
3
|
+
export declare const backdrop: string;
|
|
4
|
+
export declare const backdropColor: string;
|
|
5
|
+
export declare const wrapper: string;
|
|
6
|
+
export declare const dialog: string;
|
|
7
|
+
export declare const content: string;
|
|
8
|
+
export declare const header: string;
|
|
9
|
+
export declare const footer: string;
|
|
10
|
+
export declare const title: string;
|
|
11
|
+
export declare const close: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Dialog.css';
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { Variant } from '../../types/props';
|
|
2
|
-
import type { VNodeChild } from 'vue';
|
|
3
|
-
export type DialogContentType = string;
|
|
4
|
-
export type DialogContentRender = (props: any) => VNodeChild;
|
|
5
|
-
export interface DialogOptions {
|
|
6
|
-
title?: string;
|
|
7
|
-
render?: DialogContentRender;
|
|
8
|
-
content: DialogContentType;
|
|
9
|
-
onClose?: () => void;
|
|
10
|
-
onOpen?: () => void;
|
|
11
|
-
onOk?: () => void;
|
|
12
|
-
onCancel?: () => void;
|
|
13
|
-
okVariant?: Variant;
|
|
14
|
-
okText?: DialogContentType;
|
|
15
|
-
cancelText?: DialogContentType;
|
|
16
|
-
}
|
|
17
|
-
export interface DialogResponse {
|
|
18
|
-
result: boolean;
|
|
19
|
-
data: any;
|
|
20
|
-
}
|
|
21
|
-
export interface DialogApiInjection {
|
|
22
|
-
create: (options: DialogOptions) => Dialog;
|
|
23
|
-
destroyAll: () => void;
|
|
24
|
-
}
|
|
25
|
-
export interface Dialog extends DialogOptions {
|
|
26
|
-
destroy: () => void;
|
|
27
|
-
}
|
|
@@ -40,5 +40,7 @@ export { default as MTextarea } from './textarea/Textarea.vue';
|
|
|
40
40
|
export { default as MTooltip } from './tooltip/Tooltip.vue';
|
|
41
41
|
export { default as MTransfer } from './transfer/Transfer.vue';
|
|
42
42
|
export { default as MVirtualScroll } from './virtualscroll/VirtualScroll.vue';
|
|
43
|
+
export { default as MConfirm } from './confirm/Confirm.vue';
|
|
44
|
+
export { default as MConfirmProvider } from './confirm/ConfirmProvider.vue';
|
|
43
45
|
export { default as MDialog } from './dialog/Dialog.vue';
|
|
44
|
-
export { default as
|
|
46
|
+
export { default as MTree } from './tree/Tree.vue';
|
|
@@ -60,6 +60,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
60
60
|
type: BooleanConstructor;
|
|
61
61
|
default: boolean;
|
|
62
62
|
};
|
|
63
|
+
selectAll: {
|
|
64
|
+
type: BooleanConstructor;
|
|
65
|
+
default: boolean;
|
|
66
|
+
};
|
|
67
|
+
max: {
|
|
68
|
+
type: NumberConstructor;
|
|
69
|
+
default: number;
|
|
70
|
+
};
|
|
63
71
|
modelValue: PropType<string | number | boolean | object | any[] | undefined>;
|
|
64
72
|
name: StringConstructor;
|
|
65
73
|
readonly: BooleanConstructor;
|
|
@@ -75,11 +83,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
75
83
|
selectRef: import("vue").Ref<HTMLElement | undefined>;
|
|
76
84
|
popper: import("vue").Ref<HTMLElement | null | undefined>;
|
|
77
85
|
focusSelect: () => void;
|
|
78
|
-
focusOut: (e: Event) => void;
|
|
79
86
|
id: Readonly<import("vue").Ref<string>>;
|
|
80
87
|
isOpen: import("vue").ComputedRef<boolean>;
|
|
81
88
|
open: import("vue").Ref<boolean>;
|
|
82
89
|
selected: import("vue").WritableComputedRef<any>;
|
|
90
|
+
selectedMax: import("vue").ComputedRef<any>;
|
|
91
|
+
selectedCountNotShown: import("vue").ComputedRef<number>;
|
|
83
92
|
computedOptions: import("vue").ComputedRef<{
|
|
84
93
|
value: any;
|
|
85
94
|
label: any;
|
|
@@ -120,6 +129,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
120
129
|
enterFrom: string;
|
|
121
130
|
leaveTo: string;
|
|
122
131
|
};
|
|
132
|
+
toggleAllItems: () => void;
|
|
123
133
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
124
134
|
label: {
|
|
125
135
|
type: StringConstructor;
|
|
@@ -179,6 +189,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
179
189
|
type: BooleanConstructor;
|
|
180
190
|
default: boolean;
|
|
181
191
|
};
|
|
192
|
+
selectAll: {
|
|
193
|
+
type: BooleanConstructor;
|
|
194
|
+
default: boolean;
|
|
195
|
+
};
|
|
196
|
+
max: {
|
|
197
|
+
type: NumberConstructor;
|
|
198
|
+
default: number;
|
|
199
|
+
};
|
|
182
200
|
modelValue: PropType<string | number | boolean | object | any[] | undefined>;
|
|
183
201
|
name: StringConstructor;
|
|
184
202
|
readonly: BooleanConstructor;
|
|
@@ -195,6 +213,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
195
213
|
size: Size;
|
|
196
214
|
multiple: boolean;
|
|
197
215
|
disabled: boolean;
|
|
216
|
+
max: number;
|
|
198
217
|
loading: boolean;
|
|
199
218
|
readonly: boolean;
|
|
200
219
|
rules: unknown[];
|
|
@@ -205,5 +224,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
205
224
|
optionLabel: string;
|
|
206
225
|
consistentWidth: boolean;
|
|
207
226
|
allowBlank: boolean;
|
|
227
|
+
selectAll: boolean;
|
|
208
228
|
}, {}>;
|
|
209
229
|
export default _default;
|
|
@@ -30,4 +30,10 @@ export declare const options: string;
|
|
|
30
30
|
export declare const option: string;
|
|
31
31
|
export declare const optionFocused: string;
|
|
32
32
|
export declare const optionSelected: string;
|
|
33
|
+
export declare const optionLabel: string;
|
|
34
|
+
export declare const checkAll: string;
|
|
35
|
+
export declare const checkAllButton: string;
|
|
36
|
+
export declare const checkAllButtonActive: string;
|
|
37
|
+
export declare const optionIcon: string;
|
|
33
38
|
export declare const noResults: string;
|
|
39
|
+
export declare const clearable: string;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { Key, TreeOption } from "./types";
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
readonly expandedKeys: import("vue").PropType<Key[]>;
|
|
4
|
+
readonly defaultExpandAll: BooleanConstructor;
|
|
5
|
+
readonly keyField: {
|
|
6
|
+
readonly type: StringConstructor;
|
|
7
|
+
readonly default: "key";
|
|
8
|
+
};
|
|
9
|
+
readonly labelField: {
|
|
10
|
+
readonly type: StringConstructor;
|
|
11
|
+
readonly default: "label";
|
|
12
|
+
};
|
|
13
|
+
readonly childrenField: {
|
|
14
|
+
readonly type: StringConstructor;
|
|
15
|
+
readonly default: "children";
|
|
16
|
+
};
|
|
17
|
+
readonly onUpdateIndeterminateKeys: import("vue").PropType<import("../../call").MaybeArray<import("./types").OnUpdateIndeterminateKeys>>;
|
|
18
|
+
readonly 'onUpdate:indeterminateKeys': import("vue").PropType<import("../../call").MaybeArray<import("./types").OnUpdateIndeterminateKeys>>;
|
|
19
|
+
readonly onUpdateExpandedKeys: import("vue").PropType<import("../../call").MaybeArray<import("./types").onUpdateExpandedKeys>>;
|
|
20
|
+
readonly 'onUpdate:expandedKeys': import("vue").PropType<import("../../call").MaybeArray<import("./types").onUpdateExpandedKeys>>;
|
|
21
|
+
readonly data: {
|
|
22
|
+
readonly type: import("vue").PropType<import("./types").TreeOptions>;
|
|
23
|
+
readonly default: () => never[];
|
|
24
|
+
};
|
|
25
|
+
readonly checkedKeys: import("vue").PropType<Key[]>;
|
|
26
|
+
readonly defaultCheckedKeys: {
|
|
27
|
+
readonly type: import("vue").PropType<Key[]>;
|
|
28
|
+
readonly default: () => never[];
|
|
29
|
+
};
|
|
30
|
+
readonly selectedKeys: import("vue").PropType<Key[]>;
|
|
31
|
+
readonly defaultSelectedKeys: {
|
|
32
|
+
readonly type: import("vue").PropType<Key[]>;
|
|
33
|
+
readonly default: () => never[];
|
|
34
|
+
};
|
|
35
|
+
readonly multiple: BooleanConstructor;
|
|
36
|
+
readonly indent: {
|
|
37
|
+
readonly type: NumberConstructor;
|
|
38
|
+
readonly default: 16;
|
|
39
|
+
};
|
|
40
|
+
readonly expandOnClick: BooleanConstructor;
|
|
41
|
+
readonly virtualScroll: BooleanConstructor;
|
|
42
|
+
readonly nodeProps: import("vue").PropType<import("./types").TreeNodeProps>;
|
|
43
|
+
readonly getChildren: import("vue").PropType<import("./props").GetChildren>;
|
|
44
|
+
}, {
|
|
45
|
+
nodesRef: import("vue").ComputedRef<import("treemate").TreeNode<TreeOption, TreeOption, TreeOption>[]>;
|
|
46
|
+
displayTreeMateRef: import("vue").ComputedRef<import("treemate").TreeMate<TreeOption, TreeOption, TreeOption>>;
|
|
47
|
+
selfElRef: import("vue").Ref<HTMLDivElement | null>;
|
|
48
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
49
|
+
readonly expandedKeys: import("vue").PropType<Key[]>;
|
|
50
|
+
readonly defaultExpandAll: BooleanConstructor;
|
|
51
|
+
readonly keyField: {
|
|
52
|
+
readonly type: StringConstructor;
|
|
53
|
+
readonly default: "key";
|
|
54
|
+
};
|
|
55
|
+
readonly labelField: {
|
|
56
|
+
readonly type: StringConstructor;
|
|
57
|
+
readonly default: "label";
|
|
58
|
+
};
|
|
59
|
+
readonly childrenField: {
|
|
60
|
+
readonly type: StringConstructor;
|
|
61
|
+
readonly default: "children";
|
|
62
|
+
};
|
|
63
|
+
readonly onUpdateIndeterminateKeys: import("vue").PropType<import("../../call").MaybeArray<import("./types").OnUpdateIndeterminateKeys>>;
|
|
64
|
+
readonly 'onUpdate:indeterminateKeys': import("vue").PropType<import("../../call").MaybeArray<import("./types").OnUpdateIndeterminateKeys>>;
|
|
65
|
+
readonly onUpdateExpandedKeys: import("vue").PropType<import("../../call").MaybeArray<import("./types").onUpdateExpandedKeys>>;
|
|
66
|
+
readonly 'onUpdate:expandedKeys': import("vue").PropType<import("../../call").MaybeArray<import("./types").onUpdateExpandedKeys>>;
|
|
67
|
+
readonly data: {
|
|
68
|
+
readonly type: import("vue").PropType<import("./types").TreeOptions>;
|
|
69
|
+
readonly default: () => never[];
|
|
70
|
+
};
|
|
71
|
+
readonly checkedKeys: import("vue").PropType<Key[]>;
|
|
72
|
+
readonly defaultCheckedKeys: {
|
|
73
|
+
readonly type: import("vue").PropType<Key[]>;
|
|
74
|
+
readonly default: () => never[];
|
|
75
|
+
};
|
|
76
|
+
readonly selectedKeys: import("vue").PropType<Key[]>;
|
|
77
|
+
readonly defaultSelectedKeys: {
|
|
78
|
+
readonly type: import("vue").PropType<Key[]>;
|
|
79
|
+
readonly default: () => never[];
|
|
80
|
+
};
|
|
81
|
+
readonly multiple: BooleanConstructor;
|
|
82
|
+
readonly indent: {
|
|
83
|
+
readonly type: NumberConstructor;
|
|
84
|
+
readonly default: 16;
|
|
85
|
+
};
|
|
86
|
+
readonly expandOnClick: BooleanConstructor;
|
|
87
|
+
readonly virtualScroll: BooleanConstructor;
|
|
88
|
+
readonly nodeProps: import("vue").PropType<import("./types").TreeNodeProps>;
|
|
89
|
+
readonly getChildren: import("vue").PropType<import("./props").GetChildren>;
|
|
90
|
+
}>>, {
|
|
91
|
+
readonly data: import("./types").TreeOptions;
|
|
92
|
+
readonly multiple: boolean;
|
|
93
|
+
readonly defaultExpandAll: boolean;
|
|
94
|
+
readonly keyField: string;
|
|
95
|
+
readonly labelField: string;
|
|
96
|
+
readonly childrenField: string;
|
|
97
|
+
readonly defaultCheckedKeys: Key[];
|
|
98
|
+
readonly defaultSelectedKeys: Key[];
|
|
99
|
+
readonly indent: number;
|
|
100
|
+
readonly expandOnClick: boolean;
|
|
101
|
+
readonly virtualScroll: boolean;
|
|
102
|
+
}, {}>;
|
|
103
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type PropType } from "vue";
|
|
2
|
+
import type { TmNode } from "./types";
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
node: {
|
|
5
|
+
type: PropType<TmNode>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
}, {
|
|
9
|
+
selfElRef: import("vue").Ref<HTMLDivElement | null>;
|
|
10
|
+
handleLineClick: (e: MouseEvent) => void;
|
|
11
|
+
indentCount: import("vue").ComputedRef<number>;
|
|
12
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
+
node: {
|
|
14
|
+
type: PropType<TmNode>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
}>>, {}, {}>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { ExtractPublicPropTypes, PropType } from "vue";
|
|
2
|
+
import type { TreeOptions, Key, TreeNodeProps, OnUpdateIndeterminateKeys, onUpdateExpandedKeys } from "./types";
|
|
3
|
+
import type { TreeMateOptions } from "treemate";
|
|
4
|
+
import type { MaybeArray } from "../../call";
|
|
5
|
+
export declare const treeSharedProps: {
|
|
6
|
+
readonly expandedKeys: PropType<Key[]>;
|
|
7
|
+
readonly defaultExpandAll: BooleanConstructor;
|
|
8
|
+
readonly keyField: {
|
|
9
|
+
readonly type: StringConstructor;
|
|
10
|
+
readonly default: "key";
|
|
11
|
+
};
|
|
12
|
+
readonly labelField: {
|
|
13
|
+
readonly type: StringConstructor;
|
|
14
|
+
readonly default: "label";
|
|
15
|
+
};
|
|
16
|
+
readonly childrenField: {
|
|
17
|
+
readonly type: StringConstructor;
|
|
18
|
+
readonly default: "children";
|
|
19
|
+
};
|
|
20
|
+
readonly onUpdateIndeterminateKeys: PropType<MaybeArray<OnUpdateIndeterminateKeys>>;
|
|
21
|
+
readonly 'onUpdate:indeterminateKeys': PropType<MaybeArray<OnUpdateIndeterminateKeys>>;
|
|
22
|
+
readonly onUpdateExpandedKeys: PropType<MaybeArray<onUpdateExpandedKeys>>;
|
|
23
|
+
readonly 'onUpdate:expandedKeys': PropType<MaybeArray<onUpdateExpandedKeys>>;
|
|
24
|
+
};
|
|
25
|
+
export declare const treeProps: {
|
|
26
|
+
readonly expandedKeys: PropType<Key[]>;
|
|
27
|
+
readonly defaultExpandAll: BooleanConstructor;
|
|
28
|
+
readonly keyField: {
|
|
29
|
+
readonly type: StringConstructor;
|
|
30
|
+
readonly default: "key";
|
|
31
|
+
};
|
|
32
|
+
readonly labelField: {
|
|
33
|
+
readonly type: StringConstructor;
|
|
34
|
+
readonly default: "label";
|
|
35
|
+
};
|
|
36
|
+
readonly childrenField: {
|
|
37
|
+
readonly type: StringConstructor;
|
|
38
|
+
readonly default: "children";
|
|
39
|
+
};
|
|
40
|
+
readonly onUpdateIndeterminateKeys: PropType<MaybeArray<OnUpdateIndeterminateKeys>>;
|
|
41
|
+
readonly 'onUpdate:indeterminateKeys': PropType<MaybeArray<OnUpdateIndeterminateKeys>>;
|
|
42
|
+
readonly onUpdateExpandedKeys: PropType<MaybeArray<onUpdateExpandedKeys>>;
|
|
43
|
+
readonly 'onUpdate:expandedKeys': PropType<MaybeArray<onUpdateExpandedKeys>>;
|
|
44
|
+
readonly data: {
|
|
45
|
+
readonly type: PropType<TreeOptions>;
|
|
46
|
+
readonly default: () => never[];
|
|
47
|
+
};
|
|
48
|
+
readonly checkedKeys: PropType<Key[]>;
|
|
49
|
+
readonly defaultCheckedKeys: {
|
|
50
|
+
readonly type: PropType<Key[]>;
|
|
51
|
+
readonly default: () => never[];
|
|
52
|
+
};
|
|
53
|
+
readonly selectedKeys: PropType<Key[]>;
|
|
54
|
+
readonly defaultSelectedKeys: {
|
|
55
|
+
readonly type: PropType<Key[]>;
|
|
56
|
+
readonly default: () => never[];
|
|
57
|
+
};
|
|
58
|
+
readonly multiple: BooleanConstructor;
|
|
59
|
+
readonly indent: {
|
|
60
|
+
readonly type: NumberConstructor;
|
|
61
|
+
readonly default: 16;
|
|
62
|
+
};
|
|
63
|
+
readonly expandOnClick: BooleanConstructor;
|
|
64
|
+
readonly virtualScroll: BooleanConstructor;
|
|
65
|
+
readonly nodeProps: PropType<TreeNodeProps>;
|
|
66
|
+
readonly getChildren: PropType<GetChildren>;
|
|
67
|
+
};
|
|
68
|
+
export type TreeProps = ExtractPublicPropTypes<typeof treeProps>;
|
|
69
|
+
export type GetChildren = (option: any) => unknown;
|
|
70
|
+
export declare function createTreeMateOptions<T>(keyField: string, childrenField: string, disabledField: string, getChildren: GetChildren | undefined): TreeMateOptions<T, T, T>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { HTMLAttributes, Ref, InjectionKey } from "vue";
|
|
2
|
+
import type { TreeNode } from "treemate";
|
|
3
|
+
export type Key = string | number;
|
|
4
|
+
export interface TreeOptionBase {
|
|
5
|
+
key?: Key;
|
|
6
|
+
label?: string;
|
|
7
|
+
children?: TreeOption[];
|
|
8
|
+
}
|
|
9
|
+
export type TreeOption = TreeOptionBase & Record<string, unknown>;
|
|
10
|
+
export type TreeOptions = TreeOption[];
|
|
11
|
+
export type TreeNodeProps = (info: {
|
|
12
|
+
option: TreeOption;
|
|
13
|
+
}) => HTMLAttributes & Record<string, unknown>;
|
|
14
|
+
export interface TreeInjection {
|
|
15
|
+
indentRef: Ref<number>;
|
|
16
|
+
expandOnClickRef: Ref<boolean>;
|
|
17
|
+
nodePropsRef: Ref<TreeNodeProps | undefined>;
|
|
18
|
+
handleSwitcherClick: (node: TreeNode<TreeOption>) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const treeInjectionKey: InjectionKey<TreeInjection>;
|
|
21
|
+
export type TmNode = TreeNode<TreeOption>;
|
|
22
|
+
export type OnUpdateCheckedKeys = (value: Array<string & number>, option: Array<TreeOption | null>, meta: {
|
|
23
|
+
node: TreeOption | null;
|
|
24
|
+
action: 'check' | 'uncheck';
|
|
25
|
+
}) => void;
|
|
26
|
+
export type OnUpdateCheckedKeysImpl = (value: Key[], option: Array<TreeOption | null>, meta: {
|
|
27
|
+
node: TreeOption | null;
|
|
28
|
+
action: 'check' | 'uncheck';
|
|
29
|
+
}) => void;
|
|
30
|
+
export type OnUpdateIndeterminateKeys = (value: Array<string & number>, option: Array<TreeOption | null>) => void;
|
|
31
|
+
export type OnUpdateIndeterminateKeysImpl = (value: Key[], option: Array<TreeOption | null>) => void;
|
|
32
|
+
export type OnUpdateSelectedKeys = (value: Array<string & number>, option: Array<TreeOption | null>, meta: {
|
|
33
|
+
node: TreeOption | null;
|
|
34
|
+
action: 'select' | 'unselect';
|
|
35
|
+
}) => void;
|
|
36
|
+
export type OnUpdateSelectedKeysImpl = (value: Key[], option: Array<TreeOption | null>, meta: {
|
|
37
|
+
node: TreeOption | null;
|
|
38
|
+
action: 'select' | 'unselect';
|
|
39
|
+
}) => void;
|
|
40
|
+
export type onUpdateExpandedKeys = (value: Array<string & number>, option: Array<TreeOption | null>, meta: {
|
|
41
|
+
node: TreeOption;
|
|
42
|
+
action: 'expand' | 'collapse';
|
|
43
|
+
} | {
|
|
44
|
+
node: null;
|
|
45
|
+
action: 'filter';
|
|
46
|
+
}) => void;
|
|
47
|
+
export type OnUpdateExpandedKeysImpl = (value: Key[], option: Array<TreeOption | null>, meta: {
|
|
48
|
+
node: TreeOption;
|
|
49
|
+
action: 'expand' | 'collapse';
|
|
50
|
+
} | {
|
|
51
|
+
node: null;
|
|
52
|
+
action: 'filter';
|
|
53
|
+
}) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { useMessage } from '../components/messageprovider/useMessage';
|
|
2
|
-
export {
|
|
2
|
+
export { useConfirm } from '../components/confirm/useConfirm';
|
|
3
3
|
export { usePopper } from './usePopper';
|
|
4
4
|
export { useZIndex } from './useZIndex';
|