@blueking/bk-user-selector 0.0.25 → 0.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +1 -1
- package/typings/components/user-selector.vue.d.ts +3 -0
- package/typings/types/index.d.ts +4 -0
- package/vue2/index.es.min.js +84 -74
- package/vue2/index.iife.min.js +85 -75
- package/vue2/index.umd.min.js +85 -75
- package/vue2/vue2.css +32 -23
- package/vue3/index.es.min.js +84 -74
- package/vue3/index.iife.min.js +85 -75
- package/vue3/index.umd.min.js +85 -75
- package/vue3/vue3.css +32 -23
- package/typings/components/render-tag.d.ts +0 -8
package/vue3/index.es.min.js
CHANGED
|
@@ -3059,7 +3059,7 @@ const UserRender = defineComponent({
|
|
|
3059
3059
|
};
|
|
3060
3060
|
}
|
|
3061
3061
|
});
|
|
3062
|
-
const _hoisted_1$
|
|
3062
|
+
const _hoisted_1$2 = {
|
|
3063
3063
|
key: 0,
|
|
3064
3064
|
class: "no-data"
|
|
3065
3065
|
};
|
|
@@ -3204,7 +3204,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3204
3204
|
mode: "spin"
|
|
3205
3205
|
}, {
|
|
3206
3206
|
default: withCtx(() => [
|
|
3207
|
-
__props.options.length === 0 && __props.userGroup.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
3207
|
+
__props.options.length === 0 && __props.userGroup.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
3208
3208
|
createElementVNode(
|
|
3209
3209
|
"span",
|
|
3210
3210
|
null,
|
|
@@ -3283,7 +3283,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3283
3283
|
};
|
|
3284
3284
|
}
|
|
3285
3285
|
});
|
|
3286
|
-
const SelectionPopover = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
3286
|
+
const SelectionPopover = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-e3741833"]]);
|
|
3287
3287
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
3288
3288
|
...{
|
|
3289
3289
|
name: "UserTag"
|
|
@@ -3329,7 +3329,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3329
3329
|
}
|
|
3330
3330
|
});
|
|
3331
3331
|
const UserTag = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-655f7a5a"]]);
|
|
3332
|
-
const _hoisted_1$
|
|
3332
|
+
const _hoisted_1$1 = ["onClick"];
|
|
3333
3333
|
const _hoisted_2$1 = ["placeholder"];
|
|
3334
3334
|
const _hoisted_3 = ["placeholder"];
|
|
3335
3335
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
@@ -3350,6 +3350,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3350
3350
|
userGroup: { default: () => [] },
|
|
3351
3351
|
userGroupName: { default: "用户群组" },
|
|
3352
3352
|
emptyText: { default: "无匹配人员" },
|
|
3353
|
+
disabled: { type: Boolean },
|
|
3353
3354
|
renderListItem: {},
|
|
3354
3355
|
renderTag: {},
|
|
3355
3356
|
excludeUserIds: { default: () => [] }
|
|
@@ -3607,7 +3608,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3607
3608
|
{
|
|
3608
3609
|
ref_key: "containerRef",
|
|
3609
3610
|
ref: containerRef,
|
|
3610
|
-
class: "multiple-selector"
|
|
3611
|
+
class: normalizeClass(["multiple-selector", { "is-disabled": _ctx.disabled }])
|
|
3611
3612
|
},
|
|
3612
3613
|
[
|
|
3613
3614
|
createCommentVNode(" 聚焦状态 - 可编辑模式 "),
|
|
@@ -3670,7 +3671,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3670
3671
|
)), [
|
|
3671
3672
|
[vModelText, unref(searchQuery)]
|
|
3672
3673
|
]) : createCommentVNode("v-if", true)
|
|
3673
|
-
], 8, _hoisted_1$
|
|
3674
|
+
], 8, _hoisted_1$1);
|
|
3674
3675
|
}),
|
|
3675
3676
|
128
|
|
3676
3677
|
/* KEYED_FRAGMENT */
|
|
@@ -3815,14 +3816,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3815
3816
|
onSelectUser: addUser
|
|
3816
3817
|
}, null, 8, ["container-width", "cross-axis-offset", "empty-text", "is-show", "loading", "options", "render-list-item", "search-query", "tenant-id", "tenants", "user-group", "user-group-name"])
|
|
3817
3818
|
],
|
|
3818
|
-
|
|
3819
|
-
/*
|
|
3819
|
+
2
|
|
3820
|
+
/* CLASS */
|
|
3820
3821
|
);
|
|
3821
3822
|
};
|
|
3822
3823
|
}
|
|
3823
3824
|
});
|
|
3824
|
-
const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
3825
|
-
const _hoisted_1
|
|
3825
|
+
const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-19a0ebec"]]);
|
|
3826
|
+
const _hoisted_1 = { class: "input-container" };
|
|
3826
3827
|
const _hoisted_2 = ["placeholder"];
|
|
3827
3828
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
3828
3829
|
...{
|
|
@@ -3840,6 +3841,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3840
3841
|
userGroup: { default: () => [] },
|
|
3841
3842
|
userGroupName: { default: "用户群组" },
|
|
3842
3843
|
emptyText: { default: "无匹配人员" },
|
|
3844
|
+
disabled: { type: Boolean },
|
|
3843
3845
|
renderListItem: {},
|
|
3844
3846
|
renderTag: {},
|
|
3845
3847
|
excludeUserIds: { default: () => [] }
|
|
@@ -3957,70 +3959,72 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3957
3959
|
emit("update:modelValue", newVal);
|
|
3958
3960
|
});
|
|
3959
3961
|
return (_ctx, _cache) => {
|
|
3960
|
-
return withDirectives((openBlock(), createElementBlock(
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3962
|
+
return withDirectives((openBlock(), createElementBlock(
|
|
3963
|
+
"div",
|
|
3964
|
+
{
|
|
3965
|
+
ref_key: "containerRef",
|
|
3966
|
+
ref: containerRef,
|
|
3967
|
+
class: normalizeClass(["single-selector", { "is-disabled": _ctx.disabled }])
|
|
3968
|
+
},
|
|
3969
|
+
[
|
|
3970
|
+
createCommentVNode(" 输入框 "),
|
|
3971
|
+
createElementVNode("div", _hoisted_1, [
|
|
3972
|
+
createCommentVNode(" 用户标签显示 "),
|
|
3973
|
+
selectedUserInfo.value ? (openBlock(), createElementBlock("div", {
|
|
3974
|
+
key: 0,
|
|
3975
|
+
onClick: withModifiers(removeSelectedUser, ["stop"])
|
|
3976
|
+
}, [
|
|
3977
|
+
createVNode(UserTag, {
|
|
3978
|
+
"current-tenant-id": _ctx.tenantId,
|
|
3979
|
+
"render-tag": _ctx.renderTag,
|
|
3980
|
+
tenants: _ctx.tenants,
|
|
3981
|
+
user: selectedUserInfo.value,
|
|
3982
|
+
onClose: removeSelectedUser
|
|
3983
|
+
}, null, 8, ["current-tenant-id", "render-tag", "tenants", "user"])
|
|
3984
|
+
])) : createCommentVNode("v-if", true),
|
|
3985
|
+
withDirectives(createElementVNode("input", {
|
|
3986
|
+
ref_key: "inputRef",
|
|
3987
|
+
ref: inputRef,
|
|
3988
|
+
class: "search-input",
|
|
3989
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchQuery.value = $event),
|
|
3990
|
+
placeholder: selectedUserInfo.value ? "" : _ctx.placeholder,
|
|
3991
|
+
onFocus: handleInputFocus,
|
|
3992
|
+
onInput: handleInput
|
|
3993
|
+
}, null, 40, _hoisted_2), [
|
|
3994
|
+
[vModelText, searchQuery.value]
|
|
3995
|
+
]),
|
|
3996
|
+
createCommentVNode(' "我"标签 '),
|
|
3997
|
+
createVNode(MeTag, {
|
|
3998
|
+
"current-user-id": _ctx.currentUserId,
|
|
3999
|
+
"is-disabled": !!_ctx.currentUserId && !!selectedUserInfo.value && selectedUserInfo.value[_ctx.exactSearchKey] === _ctx.currentUserId,
|
|
4000
|
+
onClick: addCurrentUser
|
|
4001
|
+
}, null, 8, ["current-user-id", "is-disabled"])
|
|
3990
4002
|
]),
|
|
3991
|
-
createCommentVNode(
|
|
3992
|
-
createVNode(
|
|
3993
|
-
"
|
|
3994
|
-
"
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
"render-list-item"
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
"user-group-name": _ctx.userGroupName,
|
|
4011
|
-
onSelectUser: addUser
|
|
4012
|
-
}, null, 8, ["container-width", "empty-text", "is-show", "loading", "options", "render-list-item", "search-query", "tenant-id", "tenants", "user-group", "user-group-name"])
|
|
4013
|
-
])), [
|
|
4003
|
+
createCommentVNode(" 使用新的公共下拉选项组件 "),
|
|
4004
|
+
createVNode(SelectionPopover, {
|
|
4005
|
+
"container-width": containerRef.value ? containerRef.value.offsetWidth : "auto",
|
|
4006
|
+
"empty-text": _ctx.emptyText,
|
|
4007
|
+
"is-show": showDropdown.value,
|
|
4008
|
+
loading: isLoading.value,
|
|
4009
|
+
options: options.value,
|
|
4010
|
+
"render-list-item": _ctx.renderListItem,
|
|
4011
|
+
"search-query": searchQuery.value,
|
|
4012
|
+
"tenant-id": _ctx.tenantId,
|
|
4013
|
+
tenants: _ctx.tenants,
|
|
4014
|
+
"user-group": userGroupFilter.value,
|
|
4015
|
+
"user-group-name": _ctx.userGroupName,
|
|
4016
|
+
onSelectUser: addUser
|
|
4017
|
+
}, null, 8, ["container-width", "empty-text", "is-show", "loading", "options", "render-list-item", "search-query", "tenant-id", "tenants", "user-group", "user-group-name"])
|
|
4018
|
+
],
|
|
4019
|
+
2
|
|
4020
|
+
/* CLASS */
|
|
4021
|
+
)), [
|
|
4014
4022
|
[unref(clickoutside), handleClickOutside]
|
|
4015
4023
|
]);
|
|
4016
4024
|
};
|
|
4017
4025
|
}
|
|
4018
4026
|
});
|
|
4019
|
-
const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
4020
|
-
const _hoisted_1 = {
|
|
4021
|
-
ref: "containerRef",
|
|
4022
|
-
class: "bk-user-selector"
|
|
4023
|
-
};
|
|
4027
|
+
const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-b6af00c3"]]);
|
|
4024
4028
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4025
4029
|
...{
|
|
4026
4030
|
name: "BkUserSelector"
|
|
@@ -4038,6 +4042,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4038
4042
|
userGroup: { default: () => [] },
|
|
4039
4043
|
userGroupName: { default: "用户群组" },
|
|
4040
4044
|
emptyText: { default: "无匹配人员" },
|
|
4045
|
+
disabled: { type: Boolean, default: false },
|
|
4041
4046
|
renderListItem: {},
|
|
4042
4047
|
renderTag: {},
|
|
4043
4048
|
excludeUserIds: { default: () => [] }
|
|
@@ -4115,7 +4120,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4115
4120
|
return (_ctx, _cache) => {
|
|
4116
4121
|
return openBlock(), createElementBlock(
|
|
4117
4122
|
"section",
|
|
4118
|
-
|
|
4123
|
+
{
|
|
4124
|
+
ref: "containerRef",
|
|
4125
|
+
class: normalizeClass(["bk-user-selector", { "is-disabled": _ctx.disabled }])
|
|
4126
|
+
},
|
|
4119
4127
|
[
|
|
4120
4128
|
createCommentVNode(" 单选模式 "),
|
|
4121
4129
|
!_ctx.multiple ? (openBlock(), createBlock(SingleSelector, {
|
|
@@ -4124,6 +4132,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4124
4132
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedUser.value = $event),
|
|
4125
4133
|
"api-base-url": _ctx.apiBaseUrl,
|
|
4126
4134
|
"current-user-id": _ctx.currentUserId,
|
|
4135
|
+
disabled: _ctx.disabled,
|
|
4127
4136
|
"empty-text": _ctx.emptyText,
|
|
4128
4137
|
"exact-search-key": _ctx.exactSearchKey,
|
|
4129
4138
|
"exclude-user-ids": _ctx.excludeUserIds,
|
|
@@ -4135,7 +4144,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4135
4144
|
"user-group": _ctx.userGroup,
|
|
4136
4145
|
"user-group-name": _ctx.userGroupName,
|
|
4137
4146
|
onChange: handleUpdateUser
|
|
4138
|
-
}, null, 8, ["modelValue", "api-base-url", "current-user-id", "empty-text", "exact-search-key", "exclude-user-ids", "placeholder", "render-list-item", "render-tag", "tenant-id", "tenants", "user-group", "user-group-name"])) : (openBlock(), createElementBlock(
|
|
4147
|
+
}, null, 8, ["modelValue", "api-base-url", "current-user-id", "disabled", "empty-text", "exact-search-key", "exclude-user-ids", "placeholder", "render-list-item", "render-tag", "tenant-id", "tenants", "user-group", "user-group-name"])) : (openBlock(), createElementBlock(
|
|
4139
4148
|
Fragment,
|
|
4140
4149
|
{ key: 1 },
|
|
4141
4150
|
[
|
|
@@ -4145,6 +4154,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4145
4154
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => selectedUserIds.value = $event),
|
|
4146
4155
|
"api-base-url": _ctx.apiBaseUrl,
|
|
4147
4156
|
"current-user-id": _ctx.currentUserId,
|
|
4157
|
+
disabled: _ctx.disabled,
|
|
4148
4158
|
draggable: _ctx.draggable,
|
|
4149
4159
|
"empty-text": _ctx.emptyText,
|
|
4150
4160
|
"exact-search-key": _ctx.exactSearchKey,
|
|
@@ -4158,19 +4168,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4158
4168
|
"user-group": _ctx.userGroup,
|
|
4159
4169
|
"user-group-name": _ctx.userGroupName,
|
|
4160
4170
|
"onUpdate:selectedUsers": handleUpdateSelectedUsers
|
|
4161
|
-
}, null, 8, ["modelValue", "api-base-url", "current-user-id", "draggable", "empty-text", "exact-search-key", "exclude-user-ids", "placeholder", "render-list-item", "render-tag", "selected-users", "tenant-id", "tenants", "user-group", "user-group-name"])
|
|
4171
|
+
}, null, 8, ["modelValue", "api-base-url", "current-user-id", "disabled", "draggable", "empty-text", "exact-search-key", "exclude-user-ids", "placeholder", "render-list-item", "render-tag", "selected-users", "tenant-id", "tenants", "user-group", "user-group-name"])
|
|
4162
4172
|
],
|
|
4163
4173
|
2112
|
|
4164
4174
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
4165
4175
|
))
|
|
4166
4176
|
],
|
|
4167
|
-
|
|
4168
|
-
/*
|
|
4177
|
+
2
|
|
4178
|
+
/* CLASS */
|
|
4169
4179
|
);
|
|
4170
4180
|
};
|
|
4171
4181
|
}
|
|
4172
4182
|
});
|
|
4173
|
-
const BkUserSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4183
|
+
const BkUserSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c31311f7"]]);
|
|
4174
4184
|
export {
|
|
4175
4185
|
BkUserSelector,
|
|
4176
4186
|
BkUserSelector as default
|