@blueking/bk-user-selector 0.0.29-beta.6 → 0.0.29-beta.8
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/package.json +1 -1
- package/typings/components/me-tag.vue.d.ts +5 -5
- package/typings/components/multiple-selector.vue.d.ts +49 -4
- package/typings/components/selection-popover.vue.d.ts +27 -5
- package/typings/components/single-selector.vue.d.ts +43 -4
- package/typings/components/user-render.d.ts +3 -3
- package/typings/components/user-selector.vue.d.ts +51 -4
- package/typings/components/user-tag.vue.d.ts +14 -5
- package/typings/hooks/useTenantData.d.ts +2 -2
- package/typings/hooks/useUserSearch.d.ts +3 -3
- package/vue2/index.es.min.js +4620 -3855
- package/vue2/index.iife.min.js +6080 -5840
- package/vue2/index.umd.min.js +4620 -3855
- package/vue2/vue2.css +23 -23
- package/vue3/index.es.min.js +2732 -2713
- package/vue3/index.iife.min.js +4620 -3855
- package/vue3/index.umd.min.js +2734 -2715
- package/vue3/vue3.css +23 -23
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
2
|
/**
|
|
3
3
|
* 当前用户ID
|
|
4
4
|
*/
|
|
@@ -13,7 +13,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
13
13
|
type: BooleanConstructor;
|
|
14
14
|
default: boolean;
|
|
15
15
|
};
|
|
16
|
-
}
|
|
16
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
17
|
click: (...args: any[]) => void;
|
|
18
18
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
19
|
/**
|
|
@@ -30,10 +30,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
30
30
|
type: BooleanConstructor;
|
|
31
31
|
default: boolean;
|
|
32
32
|
};
|
|
33
|
-
}>> &
|
|
33
|
+
}>> & {
|
|
34
34
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
35
|
-
}
|
|
35
|
+
}, {
|
|
36
36
|
currentUserId: string;
|
|
37
37
|
isDisabled: boolean;
|
|
38
|
-
}, {}
|
|
38
|
+
}, {}>;
|
|
39
39
|
export default _default;
|
|
@@ -1,13 +1,41 @@
|
|
|
1
1
|
import { FormattedUser, MultipleSelectorProps } from '../types';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<MultipleSelectorProps
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<MultipleSelectorProps>, {
|
|
3
|
+
modelValue: () => never[];
|
|
4
|
+
placeholder: string;
|
|
5
|
+
draggable: boolean;
|
|
6
|
+
apiBaseUrl: string;
|
|
7
|
+
tenantId: string;
|
|
8
|
+
selectedUsers: () => never[];
|
|
9
|
+
tenants: () => {};
|
|
10
|
+
currentUserId: string;
|
|
11
|
+
exactSearchKey: string;
|
|
12
|
+
userGroup: () => never[];
|
|
13
|
+
userGroupName: string;
|
|
14
|
+
emptyText: string;
|
|
15
|
+
excludeUserIds: () => never[];
|
|
16
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
3
17
|
"update:selectedUsers": (...args: any[]) => void;
|
|
4
18
|
"add-user": (...args: any[]) => void;
|
|
5
19
|
"remove-user": (...args: any[]) => void;
|
|
6
|
-
}, string, import("vue").PublicProps, Readonly<MultipleSelectorProps
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<MultipleSelectorProps>, {
|
|
21
|
+
modelValue: () => never[];
|
|
22
|
+
placeholder: string;
|
|
23
|
+
draggable: boolean;
|
|
24
|
+
apiBaseUrl: string;
|
|
25
|
+
tenantId: string;
|
|
26
|
+
selectedUsers: () => never[];
|
|
27
|
+
tenants: () => {};
|
|
28
|
+
currentUserId: string;
|
|
29
|
+
exactSearchKey: string;
|
|
30
|
+
userGroup: () => never[];
|
|
31
|
+
userGroupName: string;
|
|
32
|
+
emptyText: string;
|
|
33
|
+
excludeUserIds: () => never[];
|
|
34
|
+
}>>> & {
|
|
7
35
|
"onUpdate:selectedUsers"?: ((...args: any[]) => any) | undefined;
|
|
8
36
|
"onAdd-user"?: ((...args: any[]) => any) | undefined;
|
|
9
37
|
"onRemove-user"?: ((...args: any[]) => any) | undefined;
|
|
10
|
-
}
|
|
38
|
+
}, {
|
|
11
39
|
tenantId: string;
|
|
12
40
|
apiBaseUrl: string;
|
|
13
41
|
exactSearchKey: string;
|
|
@@ -29,5 +57,22 @@ declare const _default: import("vue").DefineComponent<MultipleSelectorProps, {},
|
|
|
29
57
|
selectedUsers: FormattedUser[];
|
|
30
58
|
placeholder: string;
|
|
31
59
|
excludeUserIds: string[];
|
|
32
|
-
}, {}
|
|
60
|
+
}, {}>;
|
|
33
61
|
export default _default;
|
|
62
|
+
type __VLS_WithDefaults<P, D> = {
|
|
63
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
64
|
+
default: D[K];
|
|
65
|
+
}> : P[K];
|
|
66
|
+
};
|
|
67
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
68
|
+
type __VLS_TypePropsToOption<T> = {
|
|
69
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
70
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
71
|
+
} : {
|
|
72
|
+
type: import('vue').PropType<T[K]>;
|
|
73
|
+
required: true;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
type __VLS_PrettifyLocal<T> = {
|
|
77
|
+
[K in keyof T]: T[K];
|
|
78
|
+
} & {};
|
|
@@ -3,7 +3,18 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { createVNode, VNode } from 'vue';
|
|
5
5
|
import { FormattedUser } from '../types';
|
|
6
|
-
declare
|
|
6
|
+
declare var __VLS_20: {};
|
|
7
|
+
declare var __VLS_inheritedAttrs: {};
|
|
8
|
+
declare const __VLS_refs: {};
|
|
9
|
+
declare const __VLS_templateResult: {
|
|
10
|
+
slots: {
|
|
11
|
+
default?(_: typeof __VLS_20): any;
|
|
12
|
+
};
|
|
13
|
+
refs: __VLS_PickRefsExpose<typeof __VLS_refs>;
|
|
14
|
+
attrs: Partial<typeof __VLS_inheritedAttrs>;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_Slots = typeof __VLS_templateResult['slots'];
|
|
17
|
+
declare const __VLS_component: import("vue").DefineComponent<{
|
|
7
18
|
/**
|
|
8
19
|
* 是否显示下拉菜单
|
|
9
20
|
*/
|
|
@@ -91,7 +102,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
91
102
|
renderListItem: {
|
|
92
103
|
type: () => (h: typeof createVNode, item: FormattedUser) => VNode;
|
|
93
104
|
};
|
|
94
|
-
}
|
|
105
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
95
106
|
"select-user": (...args: any[]) => void;
|
|
96
107
|
"click-outside": (...args: any[]) => void;
|
|
97
108
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -182,10 +193,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
182
193
|
renderListItem: {
|
|
183
194
|
type: () => (h: typeof createVNode, item: FormattedUser) => VNode;
|
|
184
195
|
};
|
|
185
|
-
}>> &
|
|
196
|
+
}>> & {
|
|
186
197
|
"onSelect-user"?: ((...args: any[]) => any) | undefined;
|
|
187
198
|
"onClick-outside"?: ((...args: any[]) => any) | undefined;
|
|
188
|
-
}
|
|
199
|
+
}, {
|
|
189
200
|
tenantId: string;
|
|
190
201
|
tenants: Record<string, string>;
|
|
191
202
|
isShow: boolean;
|
|
@@ -201,5 +212,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
201
212
|
}[];
|
|
202
213
|
userGroupName: string;
|
|
203
214
|
emptyText: string;
|
|
204
|
-
}, {}
|
|
215
|
+
}, {}>;
|
|
216
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_Slots>;
|
|
205
217
|
export default _default;
|
|
218
|
+
type __VLS_PickRefsExpose<T> = T extends object ? {
|
|
219
|
+
[K in keyof T]: (T[K] extends any[] ? Parameters<T[K][0]['expose']>[0][] : T[K] extends {
|
|
220
|
+
expose?: (exposed: infer E) => void;
|
|
221
|
+
} ? E : T[K]) | null;
|
|
222
|
+
} : never;
|
|
223
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
224
|
+
new (): {
|
|
225
|
+
$slots: S;
|
|
226
|
+
};
|
|
227
|
+
};
|
|
@@ -1,11 +1,33 @@
|
|
|
1
1
|
import { SingleSelectorProps } from '../types';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<SingleSelectorProps
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<SingleSelectorProps>, {
|
|
3
|
+
apiBaseUrl: string;
|
|
4
|
+
tenantId: string;
|
|
5
|
+
placeholder: string;
|
|
6
|
+
modelValue: string;
|
|
7
|
+
currentUserId: string;
|
|
8
|
+
exactSearchKey: string;
|
|
9
|
+
userGroup: () => never[];
|
|
10
|
+
userGroupName: string;
|
|
11
|
+
emptyText: string;
|
|
12
|
+
excludeUserIds: () => never[];
|
|
13
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
3
14
|
change: (...args: any[]) => void;
|
|
4
15
|
"update:modelValue": (...args: any[]) => void;
|
|
5
|
-
}, string, import("vue").PublicProps, Readonly<SingleSelectorProps
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<SingleSelectorProps>, {
|
|
17
|
+
apiBaseUrl: string;
|
|
18
|
+
tenantId: string;
|
|
19
|
+
placeholder: string;
|
|
20
|
+
modelValue: string;
|
|
21
|
+
currentUserId: string;
|
|
22
|
+
exactSearchKey: string;
|
|
23
|
+
userGroup: () => never[];
|
|
24
|
+
userGroupName: string;
|
|
25
|
+
emptyText: string;
|
|
26
|
+
excludeUserIds: () => never[];
|
|
27
|
+
}>>> & {
|
|
6
28
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
7
29
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
8
|
-
}
|
|
30
|
+
}, {
|
|
9
31
|
tenantId: string;
|
|
10
32
|
apiBaseUrl: string;
|
|
11
33
|
exactSearchKey: string;
|
|
@@ -24,5 +46,22 @@ declare const _default: import("vue").DefineComponent<SingleSelectorProps, {}, {
|
|
|
24
46
|
modelValue: string;
|
|
25
47
|
placeholder: string;
|
|
26
48
|
excludeUserIds: string[];
|
|
27
|
-
}, {}
|
|
49
|
+
}, {}>;
|
|
28
50
|
export default _default;
|
|
51
|
+
type __VLS_WithDefaults<P, D> = {
|
|
52
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
53
|
+
default: D[K];
|
|
54
|
+
}> : P[K];
|
|
55
|
+
};
|
|
56
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
57
|
+
type __VLS_TypePropsToOption<T> = {
|
|
58
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
59
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
60
|
+
} : {
|
|
61
|
+
type: import('vue').PropType<T[K]>;
|
|
62
|
+
required: true;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
type __VLS_PrettifyLocal<T> = {
|
|
66
|
+
[K in keyof T]: T[K];
|
|
67
|
+
} & {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FormattedUser } from '../types';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
3
|
user: {
|
|
4
4
|
type: () => FormattedUser;
|
|
5
5
|
required: true;
|
|
@@ -16,7 +16,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
16
16
|
type: FunctionConstructor;
|
|
17
17
|
required: false;
|
|
18
18
|
};
|
|
19
|
-
}
|
|
19
|
+
}, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
20
|
user: {
|
|
21
21
|
type: () => FormattedUser;
|
|
22
22
|
required: true;
|
|
@@ -33,5 +33,5 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
33
33
|
type: FunctionConstructor;
|
|
34
34
|
required: false;
|
|
35
35
|
};
|
|
36
|
-
}
|
|
36
|
+
}>>, {}, {}>;
|
|
37
37
|
export default _default;
|
|
@@ -1,11 +1,41 @@
|
|
|
1
1
|
import { UserSelectorProps } from '../types';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<UserSelectorProps
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<UserSelectorProps>, {
|
|
3
|
+
apiBaseUrl: string;
|
|
4
|
+
tenantId: string;
|
|
5
|
+
placeholder: string;
|
|
6
|
+
modelValue: string;
|
|
7
|
+
draggable: boolean;
|
|
8
|
+
multiple: boolean;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
currentUserId: string;
|
|
11
|
+
exactSearchKey: string;
|
|
12
|
+
userGroup: () => never[];
|
|
13
|
+
userGroupName: string;
|
|
14
|
+
emptyText: string;
|
|
15
|
+
excludeUserIds: () => never[];
|
|
16
|
+
enableMultiTenantMode: boolean;
|
|
17
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
3
18
|
change: (...args: any[]) => void;
|
|
4
19
|
"update:modelValue": (...args: any[]) => void;
|
|
5
|
-
}, string, import("vue").PublicProps, Readonly<UserSelectorProps
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<UserSelectorProps>, {
|
|
21
|
+
apiBaseUrl: string;
|
|
22
|
+
tenantId: string;
|
|
23
|
+
placeholder: string;
|
|
24
|
+
modelValue: string;
|
|
25
|
+
draggable: boolean;
|
|
26
|
+
multiple: boolean;
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
currentUserId: string;
|
|
29
|
+
exactSearchKey: string;
|
|
30
|
+
userGroup: () => never[];
|
|
31
|
+
userGroupName: string;
|
|
32
|
+
emptyText: string;
|
|
33
|
+
excludeUserIds: () => never[];
|
|
34
|
+
enableMultiTenantMode: boolean;
|
|
35
|
+
}>>> & {
|
|
6
36
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
7
37
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
8
|
-
}
|
|
38
|
+
}, {
|
|
9
39
|
tenantId: string;
|
|
10
40
|
apiBaseUrl: string;
|
|
11
41
|
enableMultiTenantMode: boolean;
|
|
@@ -29,5 +59,22 @@ declare const _default: import("vue").DefineComponent<UserSelectorProps, {}, {},
|
|
|
29
59
|
placeholder: string;
|
|
30
60
|
excludeUserIds: string[];
|
|
31
61
|
multiple: boolean;
|
|
32
|
-
}, {}
|
|
62
|
+
}, {}>;
|
|
33
63
|
export default _default;
|
|
64
|
+
type __VLS_WithDefaults<P, D> = {
|
|
65
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
66
|
+
default: D[K];
|
|
67
|
+
}> : P[K];
|
|
68
|
+
};
|
|
69
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
70
|
+
type __VLS_TypePropsToOption<T> = {
|
|
71
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
72
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
73
|
+
} : {
|
|
74
|
+
type: import('vue').PropType<T[K]>;
|
|
75
|
+
required: true;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
type __VLS_PrettifyLocal<T> = {
|
|
79
|
+
[K in keyof T]: T[K];
|
|
80
|
+
} & {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createVNode, VNode } from 'vue';
|
|
2
2
|
import { FormattedUser } from '../types';
|
|
3
|
-
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
4
4
|
/**
|
|
5
5
|
* 用户信息
|
|
6
6
|
*/
|
|
@@ -29,10 +29,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
29
29
|
* 渲染标签
|
|
30
30
|
*/
|
|
31
31
|
renderTag?: (h: typeof createVNode, userInfo: FormattedUser) => VNode;
|
|
32
|
-
}
|
|
32
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
33
33
|
click: (...args: any[]) => void;
|
|
34
34
|
close: (...args: any[]) => void;
|
|
35
|
-
}, string, import("vue").PublicProps, Readonly<{
|
|
35
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
36
36
|
/**
|
|
37
37
|
* 用户信息
|
|
38
38
|
*/
|
|
@@ -61,8 +61,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
61
61
|
* 渲染标签
|
|
62
62
|
*/
|
|
63
63
|
renderTag?: (h: typeof createVNode, userInfo: FormattedUser) => VNode;
|
|
64
|
-
}
|
|
64
|
+
}>>> & {
|
|
65
65
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
66
66
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
67
|
-
}
|
|
67
|
+
}, {}, {}>;
|
|
68
68
|
export default _default;
|
|
69
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
70
|
+
type __VLS_TypePropsToOption<T> = {
|
|
71
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
72
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
73
|
+
} : {
|
|
74
|
+
type: import('vue').PropType<T[K]>;
|
|
75
|
+
required: true;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
@@ -11,7 +11,7 @@ import { type Ref } from 'vue';
|
|
|
11
11
|
* @returns 租户数据和加载状态
|
|
12
12
|
*/
|
|
13
13
|
export declare const useTenantData: (apiBaseUrl: string, tenantId: string, enableMultiTenantMode?: boolean) => {
|
|
14
|
-
tenants: Ref<Record<string, string
|
|
15
|
-
loading: Ref<boolean
|
|
14
|
+
tenants: Ref<Record<string, string>>;
|
|
15
|
+
loading: Ref<boolean>;
|
|
16
16
|
fetchTenants: () => Promise<void>;
|
|
17
17
|
};
|
|
@@ -11,9 +11,9 @@ import { type FormattedUser } from '../types';
|
|
|
11
11
|
* @returns 用户搜索相关状态和方法
|
|
12
12
|
*/
|
|
13
13
|
export declare const useUserSearch: (apiBaseUrl: string, tenantId: string, enableMultiTenantMode?: boolean) => {
|
|
14
|
-
searchResults: Ref<FormattedUser[]
|
|
15
|
-
loading: Ref<boolean
|
|
16
|
-
searchQuery: Ref<string
|
|
14
|
+
searchResults: Ref<FormattedUser[]>;
|
|
15
|
+
loading: Ref<boolean>;
|
|
16
|
+
searchQuery: Ref<string>;
|
|
17
17
|
performSearch: (keyword: string) => Promise<void>;
|
|
18
18
|
handleSearchInput: (value: string) => void;
|
|
19
19
|
clearSearch: () => void;
|