@blueking/bk-user-selector 0.0.39-beta.1 → 0.0.39-beta.3
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/types/index.d.ts +8 -8
- package/vue2/index.es.min.js +21 -160
- package/vue2/index.iife.min.js +21 -160
- package/vue2/index.umd.min.js +21 -160
- package/vue2/vue2.css +16 -16
- package/vue3/index.es.min.js +16 -14
- package/vue3/index.iife.min.js +21 -160
- package/vue3/index.umd.min.js +17 -15
- package/vue3/vue3.css +16 -16
package/package.json
CHANGED
package/typings/types/index.d.ts
CHANGED
|
@@ -29,14 +29,14 @@ export interface FormattedUser {
|
|
|
29
29
|
* 多选模式属性
|
|
30
30
|
*/
|
|
31
31
|
export interface MultipleSelectorProps extends BaseSelectorProps {
|
|
32
|
-
/**
|
|
33
|
-
* 是否允许粘贴任意文本
|
|
34
|
-
*/
|
|
35
|
-
freePaste?: boolean;
|
|
36
32
|
/**
|
|
37
33
|
* 是否支持拖拽排序
|
|
38
34
|
*/
|
|
39
35
|
draggable?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* 是否允许粘贴任意文本
|
|
38
|
+
*/
|
|
39
|
+
freePaste?: boolean;
|
|
40
40
|
/**
|
|
41
41
|
* 选中的用户ID列表
|
|
42
42
|
*/
|
|
@@ -134,10 +134,6 @@ interface BaseSelectorProps {
|
|
|
134
134
|
* 是否允许创建用户
|
|
135
135
|
*/
|
|
136
136
|
allowCreate?: boolean;
|
|
137
|
-
/**
|
|
138
|
-
* 是否允许粘贴任意文本
|
|
139
|
-
*/
|
|
140
|
-
freePaste?: boolean;
|
|
141
137
|
/**
|
|
142
138
|
* 接口基础URL
|
|
143
139
|
*/
|
|
@@ -166,6 +162,10 @@ interface BaseSelectorProps {
|
|
|
166
162
|
* 排除的用户ID列表
|
|
167
163
|
*/
|
|
168
164
|
excludeUserIds?: string[];
|
|
165
|
+
/**
|
|
166
|
+
* 是否允许粘贴任意文本
|
|
167
|
+
*/
|
|
168
|
+
freePaste?: boolean;
|
|
169
169
|
/**
|
|
170
170
|
* 占位文字
|
|
171
171
|
*/
|
package/vue2/index.es.min.js
CHANGED
|
@@ -4546,10 +4546,6 @@ __webpack_require__$7.d(__webpack_exports__$7, {
|
|
|
4546
4546
|
/* reexport */
|
|
4547
4547
|
lang_en
|
|
4548
4548
|
),
|
|
4549
|
-
jp: () => (
|
|
4550
|
-
/* reexport */
|
|
4551
|
-
ja_jp
|
|
4552
|
-
),
|
|
4553
4549
|
zhCn: () => (
|
|
4554
4550
|
/* reexport */
|
|
4555
4551
|
zh_cn
|
|
@@ -4737,145 +4733,6 @@ var en = {
|
|
|
4737
4733
|
}
|
|
4738
4734
|
};
|
|
4739
4735
|
const lang_en = en;
|
|
4740
|
-
var jp = {
|
|
4741
|
-
lang: "ja",
|
|
4742
|
-
steps: {
|
|
4743
|
-
step1: "ステップ1",
|
|
4744
|
-
step2: "ステップ2",
|
|
4745
|
-
step3: "ステップ3"
|
|
4746
|
-
},
|
|
4747
|
-
datePicker: {
|
|
4748
|
-
selectDate: "日付を選択",
|
|
4749
|
-
selectTime: "時間を選択",
|
|
4750
|
-
clear: "クリア",
|
|
4751
|
-
ok: "OK",
|
|
4752
|
-
weekdays: {
|
|
4753
|
-
sun: "日",
|
|
4754
|
-
mon: "月",
|
|
4755
|
-
tue: "火",
|
|
4756
|
-
wed: "水",
|
|
4757
|
-
thu: "木",
|
|
4758
|
-
fri: "金",
|
|
4759
|
-
sat: "土"
|
|
4760
|
-
},
|
|
4761
|
-
hour: "時間",
|
|
4762
|
-
min: "分",
|
|
4763
|
-
sec: "秒",
|
|
4764
|
-
toNow: "現在まで"
|
|
4765
|
-
},
|
|
4766
|
-
dialog: {
|
|
4767
|
-
ok: "OK",
|
|
4768
|
-
cancel: "キャンセル",
|
|
4769
|
-
prev: "前へ",
|
|
4770
|
-
next: "次へ"
|
|
4771
|
-
},
|
|
4772
|
-
popConfirm: {
|
|
4773
|
-
ok: "OK",
|
|
4774
|
-
cancel: "キャンセル"
|
|
4775
|
-
},
|
|
4776
|
-
form: {
|
|
4777
|
-
notBeEmpty: "空にできません",
|
|
4778
|
-
incorrectFormat: "形式が正しくありません",
|
|
4779
|
-
max: "最大値",
|
|
4780
|
-
min: "最小値",
|
|
4781
|
-
maxLen: "最大長",
|
|
4782
|
-
verifyError: "検証エラー"
|
|
4783
|
-
},
|
|
4784
|
-
pagination: {
|
|
4785
|
-
eachPage: "各ページ",
|
|
4786
|
-
strip: "",
|
|
4787
|
-
total: "合計"
|
|
4788
|
-
},
|
|
4789
|
-
process: {
|
|
4790
|
-
step1: "ステップ1",
|
|
4791
|
-
step2: "ステップ2",
|
|
4792
|
-
step3: "ステップ3",
|
|
4793
|
-
step4: "ステップ4"
|
|
4794
|
-
},
|
|
4795
|
-
searchSelect: {
|
|
4796
|
-
pleaseSelect: "選択してください",
|
|
4797
|
-
loading: "ロード中...",
|
|
4798
|
-
filterQueryMustHasValue: "フィルタークエリに値を含める必要があります",
|
|
4799
|
-
ok: "OK",
|
|
4800
|
-
cancel: "キャンセル",
|
|
4801
|
-
or: "または",
|
|
4802
|
-
and: "そして",
|
|
4803
|
-
logical: "論理:"
|
|
4804
|
-
},
|
|
4805
|
-
select: {
|
|
4806
|
-
noData: "データなし",
|
|
4807
|
-
noMatchedData: "一致するデータがありません",
|
|
4808
|
-
loading: "読み込み中...",
|
|
4809
|
-
pleaseSelect: "選んでください",
|
|
4810
|
-
enterKeywords: "キーワードを入力してください",
|
|
4811
|
-
all: "すべて",
|
|
4812
|
-
selectAll: "すべて選択"
|
|
4813
|
-
},
|
|
4814
|
-
table: {
|
|
4815
|
-
emptyText: "データがありません",
|
|
4816
|
-
confirm: "確認",
|
|
4817
|
-
reset: "リセット",
|
|
4818
|
-
sort: "ソート",
|
|
4819
|
-
setting: {
|
|
4820
|
-
title: "テーブル設定",
|
|
4821
|
-
fields: {
|
|
4822
|
-
title: "表示フィールド設定",
|
|
4823
|
-
subtitle: function subtitle2(max2) {
|
|
4824
|
-
return "(".concat(max2, "フィールド最大)");
|
|
4825
|
-
},
|
|
4826
|
-
selectAll: "すべて選択"
|
|
4827
|
-
},
|
|
4828
|
-
lineHeight: {
|
|
4829
|
-
title: "テーブル行の高さ",
|
|
4830
|
-
small: "小",
|
|
4831
|
-
medium: "中",
|
|
4832
|
-
large: "大"
|
|
4833
|
-
},
|
|
4834
|
-
options: {
|
|
4835
|
-
ok: "OK",
|
|
4836
|
-
cancel: "キャンセル"
|
|
4837
|
-
}
|
|
4838
|
-
}
|
|
4839
|
-
},
|
|
4840
|
-
transfer: {
|
|
4841
|
-
sourceList: "ソースリスト",
|
|
4842
|
-
targetList: "ターゲットリスト",
|
|
4843
|
-
removeAll: "すべて削除",
|
|
4844
|
-
selectAll: "すべて選択",
|
|
4845
|
-
noData: "データがありません",
|
|
4846
|
-
noSelected: "選択されていません",
|
|
4847
|
-
search: "検索"
|
|
4848
|
-
},
|
|
4849
|
-
upload: {
|
|
4850
|
-
uploadSuccess: "アップロード成功",
|
|
4851
|
-
uploadFailed: "アップロード失敗",
|
|
4852
|
-
drapFileOr: "ここにファイルをドラッグまたは",
|
|
4853
|
-
clickUpload: "クリックしてアップロード",
|
|
4854
|
-
uploadLabel: "ファイルをアップロード"
|
|
4855
|
-
},
|
|
4856
|
-
input: {
|
|
4857
|
-
placeholder: "入力してください",
|
|
4858
|
-
maxlengthLimitTips: "文字数制限に達しました"
|
|
4859
|
-
},
|
|
4860
|
-
tagInput: {
|
|
4861
|
-
placeholder: "入力してEnterキーで終了"
|
|
4862
|
-
},
|
|
4863
|
-
message: {
|
|
4864
|
-
assistant: "アシスタント",
|
|
4865
|
-
details: "詳細",
|
|
4866
|
-
copySuccess: "コピー成功",
|
|
4867
|
-
copyFailed: "コピー失敗"
|
|
4868
|
-
},
|
|
4869
|
-
cascader: {
|
|
4870
|
-
pleaseSelect: "選択してください",
|
|
4871
|
-
noData: "データがありません",
|
|
4872
|
-
emptyText: "データがありません"
|
|
4873
|
-
},
|
|
4874
|
-
versionLog: {
|
|
4875
|
-
current: "現在のバージョン"
|
|
4876
|
-
}
|
|
4877
|
-
};
|
|
4878
|
-
const ja_jp = jp;
|
|
4879
4736
|
var zhCn = {
|
|
4880
4737
|
lang: "zh-cn",
|
|
4881
4738
|
steps: {
|
|
@@ -4960,7 +4817,7 @@ var zhCn = {
|
|
|
4960
4817
|
title: "表格设置",
|
|
4961
4818
|
fields: {
|
|
4962
4819
|
title: "字段显示设置",
|
|
4963
|
-
subtitle: function
|
|
4820
|
+
subtitle: function subtitle2(max2) {
|
|
4964
4821
|
return "(最多".concat(max2, "项)");
|
|
4965
4822
|
},
|
|
4966
4823
|
selectAll: "全选"
|
|
@@ -5059,7 +4916,6 @@ var zhCn = {
|
|
|
5059
4916
|
};
|
|
5060
4917
|
const zh_cn = zhCn;
|
|
5061
4918
|
__webpack_exports__$7.en;
|
|
5062
|
-
__webpack_exports__$7.jp;
|
|
5063
4919
|
var __webpack_exports__zhCn = __webpack_exports__$7.zhCn;
|
|
5064
4920
|
var __webpack_require__$6 = {};
|
|
5065
4921
|
(() => {
|
|
@@ -10617,6 +10473,9 @@ var __webpack_exports__ = {};
|
|
|
10617
10473
|
hide2(el);
|
|
10618
10474
|
}, 100);
|
|
10619
10475
|
});
|
|
10476
|
+
el.addEventListener("click", function() {
|
|
10477
|
+
hide2(el);
|
|
10478
|
+
});
|
|
10620
10479
|
popper2.addEventListener("mouseleave", function() {
|
|
10621
10480
|
clearTimeout(delayTimeout);
|
|
10622
10481
|
hideTimeout = setTimeout(function() {
|
|
@@ -10630,7 +10489,7 @@ var __webpack_exports__ = {};
|
|
|
10630
10489
|
show(el);
|
|
10631
10490
|
clearTimeout(delayTimeout);
|
|
10632
10491
|
}, opts.delay);
|
|
10633
|
-
} else if (
|
|
10492
|
+
} else if (popper2.hasAttribute("data-show")) {
|
|
10634
10493
|
hide2(el);
|
|
10635
10494
|
}
|
|
10636
10495
|
});
|
|
@@ -10819,15 +10678,11 @@ const generateCallbackName = () => {
|
|
|
10819
10678
|
const jsonpRequest = (requestUrl, options = {}) => {
|
|
10820
10679
|
return new Promise((resolve, reject) => {
|
|
10821
10680
|
const url = unref(requestUrl);
|
|
10822
|
-
const { timeout = 1e3 * 60 * 2, params
|
|
10681
|
+
const { timeout = 1e3 * 60 * 2, params } = options;
|
|
10823
10682
|
const callbackName = generateCallbackName();
|
|
10824
10683
|
const script = document.createElement("script");
|
|
10825
|
-
let timeoutId;
|
|
10826
|
-
|
|
10827
|
-
script.crossOrigin = "use-credentials";
|
|
10828
|
-
} else {
|
|
10829
|
-
script.crossOrigin = "anonymous";
|
|
10830
|
-
}
|
|
10684
|
+
let timeoutId = null;
|
|
10685
|
+
script.setAttribute("type", "text/javascript");
|
|
10831
10686
|
const cleanup = () => {
|
|
10832
10687
|
if (timeoutId) {
|
|
10833
10688
|
clearTimeout(timeoutId);
|
|
@@ -14338,7 +14193,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
14338
14193
|
};
|
|
14339
14194
|
}
|
|
14340
14195
|
});
|
|
14341
|
-
const SelectionPopover = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
14196
|
+
const SelectionPopover = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-78875ea6"]]);
|
|
14342
14197
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
14343
14198
|
...{
|
|
14344
14199
|
name: "UserTag"
|
|
@@ -14395,8 +14250,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
14395
14250
|
},
|
|
14396
14251
|
__name: "multiple-selector",
|
|
14397
14252
|
props: {
|
|
14398
|
-
freePaste: { type: Boolean, default: false },
|
|
14399
14253
|
draggable: { type: Boolean, default: false },
|
|
14254
|
+
freePaste: { type: Boolean, default: false },
|
|
14400
14255
|
modelValue: { default: () => [] },
|
|
14401
14256
|
selectedUsers: { default: () => [] },
|
|
14402
14257
|
tenants: { default: () => ({}) },
|
|
@@ -14984,7 +14839,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
14984
14839
|
modelValue: { default: "" },
|
|
14985
14840
|
tenants: {},
|
|
14986
14841
|
allowCreate: { type: Boolean },
|
|
14987
|
-
freePaste: { type: Boolean },
|
|
14988
14842
|
apiBaseUrl: { default: "" },
|
|
14989
14843
|
currentUserId: { default: "" },
|
|
14990
14844
|
disabled: { type: Boolean },
|
|
@@ -14992,6 +14846,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
14992
14846
|
enableMultiTenantMode: { type: Boolean },
|
|
14993
14847
|
exactSearchKey: { default: "bk_username" },
|
|
14994
14848
|
excludeUserIds: { default: () => [] },
|
|
14849
|
+
freePaste: { type: Boolean },
|
|
14995
14850
|
placeholder: { default: "" },
|
|
14996
14851
|
tenantId: { default: "" },
|
|
14997
14852
|
userGroupName: { default: "" },
|
|
@@ -15095,6 +14950,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
15095
14950
|
const fetchUsers = async (keyword = "") => {
|
|
15096
14951
|
if (!(keyword == null ? void 0 : keyword.length)) {
|
|
15097
14952
|
options.value = [];
|
|
14953
|
+
isLoading.value = false;
|
|
15098
14954
|
return;
|
|
15099
14955
|
}
|
|
15100
14956
|
isLoading.value = true;
|
|
@@ -15154,9 +15010,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
15154
15010
|
}
|
|
15155
15011
|
emit("focus");
|
|
15156
15012
|
};
|
|
15013
|
+
let timer = null;
|
|
15157
15014
|
const handleInput = () => {
|
|
15158
|
-
fetchUsers(searchQuery.value);
|
|
15159
15015
|
showDropdown.value = searchQuery.value.length >= 1;
|
|
15016
|
+
isLoading.value = true;
|
|
15017
|
+
clearTimeout(timer);
|
|
15018
|
+
timer = setTimeout(() => {
|
|
15019
|
+
fetchUsers(searchQuery.value);
|
|
15020
|
+
}, 300);
|
|
15160
15021
|
};
|
|
15161
15022
|
const handleClickOutside = () => {
|
|
15162
15023
|
setTimeout(() => {
|
|
@@ -15246,7 +15107,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
15246
15107
|
};
|
|
15247
15108
|
}
|
|
15248
15109
|
});
|
|
15249
|
-
const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
15110
|
+
const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-cbe352a6"]]);
|
|
15250
15111
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15251
15112
|
...{
|
|
15252
15113
|
name: "BkUserSelector"
|
|
@@ -15257,7 +15118,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15257
15118
|
modelValue: { default: "" },
|
|
15258
15119
|
multiple: { type: Boolean, default: false },
|
|
15259
15120
|
allowCreate: { type: Boolean, default: false },
|
|
15260
|
-
freePaste: { type: Boolean, default: false },
|
|
15261
15121
|
apiBaseUrl: { default: "" },
|
|
15262
15122
|
currentUserId: { default: "" },
|
|
15263
15123
|
disabled: { type: Boolean, default: false },
|
|
@@ -15265,6 +15125,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15265
15125
|
enableMultiTenantMode: { type: Boolean, default: true },
|
|
15266
15126
|
exactSearchKey: { default: "bk_username" },
|
|
15267
15127
|
excludeUserIds: { default: () => [] },
|
|
15128
|
+
freePaste: { type: Boolean, default: false },
|
|
15268
15129
|
placeholder: { default: "" },
|
|
15269
15130
|
tenantId: { default: "" },
|
|
15270
15131
|
userGroupName: { default: "" },
|
|
@@ -15440,7 +15301,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15440
15301
|
};
|
|
15441
15302
|
}
|
|
15442
15303
|
});
|
|
15443
|
-
const BkUserSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
15304
|
+
const BkUserSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9c628c83"]]);
|
|
15444
15305
|
const vue2 = {
|
|
15445
15306
|
model: {
|
|
15446
15307
|
prop: "modelValue",
|