@blueking/bk-user-selector 0.0.29-beta.8 → 0.0.29-beta.9

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueking/bk-user-selector",
3
- "version": "0.0.29-beta.8",
3
+ "version": "0.0.29-beta.9",
4
4
  "description": "蓝鲸用户选择器",
5
5
  "license": "MIT",
6
6
  "author": "Tencent BlueKing",
@@ -1,4 +1,4 @@
1
- declare const _default: import("vue").DefineComponent<{
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
2
  /**
3
3
  * 当前用户ID
4
4
  */
@@ -13,7 +13,7 @@ declare const _default: import("vue").DefineComponent<{
13
13
  type: BooleanConstructor;
14
14
  default: boolean;
15
15
  };
16
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ }>, {}, {}, {}, {}, 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<{
30
30
  type: BooleanConstructor;
31
31
  default: boolean;
32
32
  };
33
- }>> & {
33
+ }>> & Readonly<{
34
34
  onClick?: ((...args: any[]) => any) | undefined;
35
- }, {
35
+ }>, {
36
36
  currentUserId: string;
37
37
  isDisabled: boolean;
38
- }, {}>;
38
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
39
39
  export default _default;
@@ -1,41 +1,13 @@
1
1
  import { FormattedUser, MultipleSelectorProps } from '../types';
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, {
2
+ declare const _default: import("vue").DefineComponent<MultipleSelectorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
17
3
  "update:selectedUsers": (...args: any[]) => void;
18
4
  "add-user": (...args: any[]) => void;
19
5
  "remove-user": (...args: any[]) => void;
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
- }>>> & {
6
+ }, string, import("vue").PublicProps, Readonly<MultipleSelectorProps> & Readonly<{
35
7
  "onUpdate:selectedUsers"?: ((...args: any[]) => any) | undefined;
36
8
  "onAdd-user"?: ((...args: any[]) => any) | undefined;
37
9
  "onRemove-user"?: ((...args: any[]) => any) | undefined;
38
- }, {
10
+ }>, {
39
11
  tenantId: string;
40
12
  apiBaseUrl: string;
41
13
  exactSearchKey: string;
@@ -57,22 +29,5 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
57
29
  selectedUsers: FormattedUser[];
58
30
  placeholder: string;
59
31
  excludeUserIds: string[];
60
- }, {}>;
32
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
61
33
  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,18 +3,7 @@
3
3
  */
4
4
  import { createVNode, VNode } from 'vue';
5
5
  import { FormattedUser } from '../types';
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<{
6
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
18
7
  /**
19
8
  * 是否显示下拉菜单
20
9
  */
@@ -102,7 +91,7 @@ declare const __VLS_component: import("vue").DefineComponent<{
102
91
  renderListItem: {
103
92
  type: () => (h: typeof createVNode, item: FormattedUser) => VNode;
104
93
  };
105
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
94
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
106
95
  "select-user": (...args: any[]) => void;
107
96
  "click-outside": (...args: any[]) => void;
108
97
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -193,10 +182,10 @@ declare const __VLS_component: import("vue").DefineComponent<{
193
182
  renderListItem: {
194
183
  type: () => (h: typeof createVNode, item: FormattedUser) => VNode;
195
184
  };
196
- }>> & {
185
+ }>> & Readonly<{
197
186
  "onSelect-user"?: ((...args: any[]) => any) | undefined;
198
187
  "onClick-outside"?: ((...args: any[]) => any) | undefined;
199
- }, {
188
+ }>, {
200
189
  tenantId: string;
201
190
  tenants: Record<string, string>;
202
191
  isShow: boolean;
@@ -212,16 +201,5 @@ declare const __VLS_component: import("vue").DefineComponent<{
212
201
  }[];
213
202
  userGroupName: string;
214
203
  emptyText: string;
215
- }, {}>;
216
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_Slots>;
204
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
217
205
  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,33 +1,11 @@
1
1
  import { SingleSelectorProps } from '../types';
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, {
2
+ declare const _default: import("vue").DefineComponent<SingleSelectorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
3
  change: (...args: any[]) => void;
15
4
  "update:modelValue": (...args: any[]) => void;
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
- }>>> & {
5
+ }, string, import("vue").PublicProps, Readonly<SingleSelectorProps> & Readonly<{
28
6
  onChange?: ((...args: any[]) => any) | undefined;
29
7
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
30
- }, {
8
+ }>, {
31
9
  tenantId: string;
32
10
  apiBaseUrl: string;
33
11
  exactSearchKey: string;
@@ -46,22 +24,5 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
46
24
  modelValue: string;
47
25
  placeholder: string;
48
26
  excludeUserIds: string[];
49
- }, {}>;
27
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
50
28
  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<import("vue").ExtractPropTypes<{
3
3
  user: {
4
4
  type: () => FormattedUser;
5
5
  required: true;
@@ -16,7 +16,7 @@ declare const _default: import("vue").DefineComponent<{
16
16
  type: FunctionConstructor;
17
17
  required: false;
18
18
  };
19
- }, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
19
+ }>, () => any, {}, {}, {}, 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<{
33
33
  type: FunctionConstructor;
34
34
  required: false;
35
35
  };
36
- }>>, {}, {}>;
36
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
37
37
  export default _default;
@@ -1,41 +1,11 @@
1
1
  import { UserSelectorProps } from '../types';
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, {
2
+ declare const _default: import("vue").DefineComponent<UserSelectorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
3
  change: (...args: any[]) => void;
19
4
  "update:modelValue": (...args: any[]) => void;
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
- }>>> & {
5
+ }, string, import("vue").PublicProps, Readonly<UserSelectorProps> & Readonly<{
36
6
  onChange?: ((...args: any[]) => any) | undefined;
37
7
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
38
- }, {
8
+ }>, {
39
9
  tenantId: string;
40
10
  apiBaseUrl: string;
41
11
  enableMultiTenantMode: boolean;
@@ -59,22 +29,5 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
59
29
  placeholder: string;
60
30
  excludeUserIds: string[];
61
31
  multiple: boolean;
62
- }, {}>;
32
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
63
33
  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<__VLS_TypePropsToOption<{
3
+ declare const _default: import("vue").DefineComponent<{
4
4
  /**
5
5
  * 用户信息
6
6
  */
@@ -29,10 +29,10 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
29
29
  * 渲染标签
30
30
  */
31
31
  renderTag?: (h: typeof createVNode, userInfo: FormattedUser) => VNode;
32
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
32
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
33
33
  click: (...args: any[]) => void;
34
34
  close: (...args: any[]) => void;
35
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
35
+ }, string, import("vue").PublicProps, Readonly<{
36
36
  /**
37
37
  * 用户信息
38
38
  */
@@ -61,17 +61,8 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
61
61
  * 渲染标签
62
62
  */
63
63
  renderTag?: (h: typeof createVNode, userInfo: FormattedUser) => VNode;
64
- }>>> & {
64
+ }> & Readonly<{
65
65
  onClick?: ((...args: any[]) => any) | undefined;
66
66
  onClose?: ((...args: any[]) => any) | undefined;
67
- }, {}, {}>;
67
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
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>, Record<string, string>>;
15
+ loading: Ref<boolean, 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[], FormattedUser[]>;
15
+ loading: Ref<boolean, boolean>;
16
+ searchQuery: Ref<string, string>;
17
17
  performSearch: (keyword: string) => Promise<void>;
18
18
  handleSearchInput: (value: string) => void;
19
19
  clearSearch: () => void;