@blueking/bk-user-selector 0.1.0 → 0.1.1-beta.2
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 +2 -0
- package/package.json +1 -1
- package/typings/components/selection-popover.vue.d.ts +6 -0
- package/typings/components/user-render.d.ts +20 -1
- package/typings/components/user-selector.vue.d.ts +2 -0
- package/typings/components/user-tag.vue.d.ts +16 -0
- package/typings/types/index.d.ts +10 -0
- package/vue2/index.es.min.js +392 -81
- package/vue2/index.iife.min.js +397 -109
- package/vue2/index.umd.min.js +392 -81
- package/vue2/vue2.css +24 -24
- package/vue3/index.es.min.js +87 -22
- package/vue3/index.iife.min.js +392 -81
- package/vue3/index.umd.min.js +88 -23
- package/vue3/vue3.css +24 -24
package/vue2/index.es.min.js
CHANGED
|
@@ -4546,6 +4546,10 @@ __webpack_require__$5.d(__webpack_exports__$5, {
|
|
|
4546
4546
|
/* reexport */
|
|
4547
4547
|
lang_en
|
|
4548
4548
|
),
|
|
4549
|
+
jp: () => (
|
|
4550
|
+
/* reexport */
|
|
4551
|
+
ja_jp
|
|
4552
|
+
),
|
|
4549
4553
|
zhCn: () => (
|
|
4550
4554
|
/* reexport */
|
|
4551
4555
|
zh_cn
|
|
@@ -4733,6 +4737,145 @@ var en = {
|
|
|
4733
4737
|
}
|
|
4734
4738
|
};
|
|
4735
4739
|
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: "or",
|
|
4802
|
+
and: "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: "OK",
|
|
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;
|
|
4736
4879
|
var zhCn = {
|
|
4737
4880
|
lang: "zh-cn",
|
|
4738
4881
|
steps: {
|
|
@@ -4817,7 +4960,7 @@ var zhCn = {
|
|
|
4817
4960
|
title: "表格设置",
|
|
4818
4961
|
fields: {
|
|
4819
4962
|
title: "字段显示设置",
|
|
4820
|
-
subtitle: function
|
|
4963
|
+
subtitle: function subtitle3(max2) {
|
|
4821
4964
|
return "(最多".concat(max2, "项)");
|
|
4822
4965
|
},
|
|
4823
4966
|
selectAll: "全选"
|
|
@@ -4916,6 +5059,7 @@ var zhCn = {
|
|
|
4916
5059
|
};
|
|
4917
5060
|
const zh_cn = zhCn;
|
|
4918
5061
|
__webpack_exports__$5.en;
|
|
5062
|
+
__webpack_exports__$5.jp;
|
|
4919
5063
|
var __webpack_exports__zhCn = __webpack_exports__$5.zhCn;
|
|
4920
5064
|
var __webpack_require__$4 = {};
|
|
4921
5065
|
(() => {
|
|
@@ -5574,21 +5718,28 @@ var vBkloading = {
|
|
|
5574
5718
|
mounted: function mounted(el, binding) {
|
|
5575
5719
|
if (binding.value) {
|
|
5576
5720
|
createInstance(el, binding);
|
|
5721
|
+
if (!binding.value.loading) {
|
|
5722
|
+
var _instance$vm;
|
|
5723
|
+
var instance = el[INSTANCE_KEY];
|
|
5724
|
+
if (instance !== null && instance !== void 0 && (_instance$vm = instance.vm) !== null && _instance$vm !== void 0 && (_instance$vm = _instance$vm.$el) !== null && _instance$vm !== void 0 && (_instance$vm = _instance$vm.parentNode) !== null && _instance$vm !== void 0 && _instance$vm.style) {
|
|
5725
|
+
instance.vm.$el.parentNode.style.display = "none";
|
|
5726
|
+
}
|
|
5727
|
+
}
|
|
5577
5728
|
}
|
|
5578
5729
|
},
|
|
5579
5730
|
updated: function updated(el, binding) {
|
|
5580
|
-
var _instance$
|
|
5731
|
+
var _instance$vm2;
|
|
5581
5732
|
var instance = el[INSTANCE_KEY];
|
|
5582
5733
|
var value = binding.value;
|
|
5583
5734
|
updateOptions(value, instance.options);
|
|
5584
|
-
if (instance !== null && instance !== void 0 && (_instance$
|
|
5735
|
+
if (instance !== null && instance !== void 0 && (_instance$vm2 = instance.vm) !== null && _instance$vm2 !== void 0 && (_instance$vm2 = _instance$vm2.$el) !== null && _instance$vm2 !== void 0 && (_instance$vm2 = _instance$vm2.parentNode) !== null && _instance$vm2 !== void 0 && _instance$vm2.style) {
|
|
5585
5736
|
instance.vm.$el.parentNode.style.display = value.loading ? "" : "none";
|
|
5586
5737
|
}
|
|
5587
5738
|
},
|
|
5588
5739
|
unmounted: function unmounted(el) {
|
|
5589
|
-
var _instance$
|
|
5740
|
+
var _instance$vm3, _instance$instance;
|
|
5590
5741
|
var instance = el[INSTANCE_KEY];
|
|
5591
|
-
el === null || el === void 0 || el.removeChild(instance === null || instance === void 0 || (_instance$
|
|
5742
|
+
el === null || el === void 0 || el.removeChild(instance === null || instance === void 0 || (_instance$vm3 = instance.vm) === null || _instance$vm3 === void 0 || (_instance$vm3 = _instance$vm3.$el) === null || _instance$vm3 === void 0 ? void 0 : _instance$vm3.parentNode);
|
|
5592
5743
|
instance === null || instance === void 0 || (_instance$instance = instance.instance) === null || _instance$instance === void 0 || _instance$instance.unmount();
|
|
5593
5744
|
el[INSTANCE_KEY] = null;
|
|
5594
5745
|
}
|
|
@@ -6054,7 +6205,7 @@ var __webpack_exports__$1 = {};
|
|
|
6054
6205
|
__webpack_require__$1.d(x3, y2);
|
|
6055
6206
|
return x3;
|
|
6056
6207
|
};
|
|
6057
|
-
const external_vue_namespaceObject2 = external_vue_x2({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["Teleport"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Teleport, ["Text"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Text, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createApp"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createApp, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["render"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.render, ["
|
|
6208
|
+
const external_vue_namespaceObject2 = external_vue_x2({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["Teleport"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Teleport, ["Text"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Text, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createApp"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createApp, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["render"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.render, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRefs, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
|
|
6058
6209
|
function _createForOfIteratorHelper(o2, allowArrayLike) {
|
|
6059
6210
|
var it = typeof Symbol !== "undefined" && o2[Symbol.iterator] || o2["@@iterator"];
|
|
6060
6211
|
if (!it) {
|
|
@@ -6336,7 +6487,6 @@ var __webpack_exports__$1 = {};
|
|
|
6336
6487
|
var refContent = (0, external_vue_namespaceObject2.ref)(null);
|
|
6337
6488
|
var refTimer = (0, external_vue_namespaceObject2.ref)(null);
|
|
6338
6489
|
var handleClick = function handleClick2(evt) {
|
|
6339
|
-
evt.stopPropagation();
|
|
6340
6490
|
emit("click", evt);
|
|
6341
6491
|
};
|
|
6342
6492
|
var resetPointerEvent = function resetPointerEvent2() {
|
|
@@ -6437,7 +6587,7 @@ var __webpack_exports__$1 = {};
|
|
|
6437
6587
|
/**
|
|
6438
6588
|
* 弹出内容绑定元素
|
|
6439
6589
|
*/
|
|
6440
|
-
boundary: shared_namespaceObject2.PropTypes.oneOfType([shared_namespaceObject2.PropTypes.string.def("parent"), shared_namespaceObject2.PropTypes.instanceOf(HTMLElement)]),
|
|
6590
|
+
boundary: shared_namespaceObject2.PropTypes.oneOfType([shared_namespaceObject2.PropTypes.string.def("parent"), shared_namespaceObject2.PropTypes.instanceOf(HTMLElement)]).def("body"),
|
|
6441
6591
|
zIndex: shared_namespaceObject2.PropTypes.number.def(void 0),
|
|
6442
6592
|
disableTeleport: shared_namespaceObject2.PropTypes.bool.def(false),
|
|
6443
6593
|
/**
|
|
@@ -8333,6 +8483,23 @@ var __webpack_exports__$1 = {};
|
|
|
8333
8483
|
}, {});
|
|
8334
8484
|
var contentClass = "".concat(customThemeCls);
|
|
8335
8485
|
var cleanup = null;
|
|
8486
|
+
var clearAllTimers = function clearAllTimers2() {
|
|
8487
|
+
if (popHideTimerId) {
|
|
8488
|
+
clearTimeout(popHideTimerId);
|
|
8489
|
+
popHideTimerId = void 0;
|
|
8490
|
+
}
|
|
8491
|
+
if (popShowTimerId) {
|
|
8492
|
+
clearTimeout(popShowTimerId);
|
|
8493
|
+
popShowTimerId = void 0;
|
|
8494
|
+
}
|
|
8495
|
+
};
|
|
8496
|
+
var wrappedCleanup = function wrappedCleanup2() {
|
|
8497
|
+
clearAllTimers();
|
|
8498
|
+
if (cleanup) {
|
|
8499
|
+
cleanup();
|
|
8500
|
+
cleanup = null;
|
|
8501
|
+
}
|
|
8502
|
+
};
|
|
8336
8503
|
var getRoundPixelVal = function getRoundPixelVal2(val) {
|
|
8337
8504
|
var dpr = window.devicePixelRatio || 1;
|
|
8338
8505
|
return Math.round(val * dpr) / dpr || 0;
|
|
@@ -8381,7 +8548,28 @@ var __webpack_exports__$1 = {};
|
|
|
8381
8548
|
}
|
|
8382
8549
|
};
|
|
8383
8550
|
var createPopInstance = function createPopInstance2() {
|
|
8551
|
+
var retryCount = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
8384
8552
|
var _resolvePopElements = resolvePopElements(), elReference = _resolvePopElements.elReference, elContent = _resolvePopElements.elContent;
|
|
8553
|
+
if (!elReference || !elContent) {
|
|
8554
|
+
if (retryCount >= 10) {
|
|
8555
|
+
console.warn("[Popover] Failed to create popover instance: elements not found after retries");
|
|
8556
|
+
return;
|
|
8557
|
+
}
|
|
8558
|
+
(0, external_vue_namespaceObject2.nextTick)(function() {
|
|
8559
|
+
createPopInstance2(retryCount + 1);
|
|
8560
|
+
});
|
|
8561
|
+
return;
|
|
8562
|
+
}
|
|
8563
|
+
if (!elReference.isConnected || !elContent.isConnected) {
|
|
8564
|
+
if (retryCount >= 10) {
|
|
8565
|
+
console.warn("[Popover] Failed to create popover instance: elements not connected to DOM after retries");
|
|
8566
|
+
return;
|
|
8567
|
+
}
|
|
8568
|
+
(0, external_vue_namespaceObject2.nextTick)(function() {
|
|
8569
|
+
createPopInstance2(retryCount + 1);
|
|
8570
|
+
});
|
|
8571
|
+
return;
|
|
8572
|
+
}
|
|
8385
8573
|
cleanup = autoUpdate(elReference, elContent, function() {
|
|
8386
8574
|
if (localIsShow.value) {
|
|
8387
8575
|
updatePopover(null, props);
|
|
@@ -8426,6 +8614,9 @@ var __webpack_exports__$1 = {};
|
|
|
8426
8614
|
var showPopover = function showPopover2() {
|
|
8427
8615
|
var delay = resolvePopoverDelay()[0];
|
|
8428
8616
|
popShowTimerId = setTimeout(function() {
|
|
8617
|
+
if (!refContent.value) {
|
|
8618
|
+
return;
|
|
8619
|
+
}
|
|
8429
8620
|
if (!props.disabled) {
|
|
8430
8621
|
localIsShow.value = true;
|
|
8431
8622
|
}
|
|
@@ -8434,6 +8625,9 @@ var __webpack_exports__$1 = {};
|
|
|
8434
8625
|
var hidePopover = function hidePopover2() {
|
|
8435
8626
|
var delay = resolvePopoverDelay()[1];
|
|
8436
8627
|
popHideTimerId = setTimeout(function() {
|
|
8628
|
+
if (!refContent.value) {
|
|
8629
|
+
return;
|
|
8630
|
+
}
|
|
8437
8631
|
popShowTimerId && clearTimeout(popShowTimerId);
|
|
8438
8632
|
localIsShow.value = false;
|
|
8439
8633
|
}, delay);
|
|
@@ -8441,20 +8635,30 @@ var __webpack_exports__$1 = {};
|
|
|
8441
8635
|
var handlePopoverShow = function handlePopoverShow2() {
|
|
8442
8636
|
var _refContent$value2;
|
|
8443
8637
|
var elContent = resolveTargetElement((_refContent$value2 = refContent.value) === null || _refContent$value2 === void 0 ? void 0 : _refContent$value2.$el);
|
|
8638
|
+
if (!elContent) {
|
|
8639
|
+
return;
|
|
8640
|
+
}
|
|
8444
8641
|
elContent.style.setProperty("display", "block");
|
|
8445
8642
|
elContent.style.setProperty("z-index", "".concat(props.zIndex ? props.zIndex : shared_namespaceObject2.bkZIndexManager.getPopperIndex()));
|
|
8446
8643
|
updatePopover();
|
|
8447
|
-
ctx.emit
|
|
8448
|
-
|
|
8449
|
-
|
|
8644
|
+
if (ctx !== null && ctx !== void 0 && ctx.emit) {
|
|
8645
|
+
ctx.emit(EMIT_EVENTS.CONTENT_AfterShow, {
|
|
8646
|
+
isShow: true
|
|
8647
|
+
});
|
|
8648
|
+
}
|
|
8450
8649
|
};
|
|
8451
8650
|
var handlePopoverHide = function handlePopoverHide2() {
|
|
8452
8651
|
var _refContent$value3;
|
|
8453
8652
|
var elContent = resolveTargetElement((_refContent$value3 = refContent.value) === null || _refContent$value3 === void 0 ? void 0 : _refContent$value3.$el);
|
|
8653
|
+
if (!elContent) {
|
|
8654
|
+
return;
|
|
8655
|
+
}
|
|
8454
8656
|
elContent.style.setProperty("display", "none");
|
|
8455
|
-
ctx.emit
|
|
8456
|
-
|
|
8457
|
-
|
|
8657
|
+
if (ctx !== null && ctx !== void 0 && ctx.emit) {
|
|
8658
|
+
ctx.emit(EMIT_EVENTS.CONTENT_AfterHidden, {
|
|
8659
|
+
isShow: false
|
|
8660
|
+
});
|
|
8661
|
+
}
|
|
8458
8662
|
};
|
|
8459
8663
|
var triggerPopover = function triggerPopover2() {
|
|
8460
8664
|
if (!localIsShow.value) {
|
|
@@ -8483,10 +8687,14 @@ var __webpack_exports__$1 = {};
|
|
|
8483
8687
|
emitPopContentMouseLeave(e);
|
|
8484
8688
|
};
|
|
8485
8689
|
var emitPopContentMouseEnter = function emitPopContentMouseEnter2(e) {
|
|
8486
|
-
ctx.emit
|
|
8690
|
+
if (ctx !== null && ctx !== void 0 && ctx.emit) {
|
|
8691
|
+
ctx.emit(EMIT_EVENTS.CONTENT_MOUSEENTER, e);
|
|
8692
|
+
}
|
|
8487
8693
|
};
|
|
8488
8694
|
var emitPopContentMouseLeave = function emitPopContentMouseLeave2(e) {
|
|
8489
|
-
ctx.emit
|
|
8695
|
+
if (ctx !== null && ctx !== void 0 && ctx.emit) {
|
|
8696
|
+
ctx.emit(EMIT_EVENTS.CONTENT_MOUSELEAVE, e);
|
|
8697
|
+
}
|
|
8490
8698
|
};
|
|
8491
8699
|
var resolveTriggerEvents = function resolveTriggerEvents2() {
|
|
8492
8700
|
var _triggerEvents$props$;
|
|
@@ -8538,13 +8746,13 @@ var __webpack_exports__$1 = {};
|
|
|
8538
8746
|
getFullscreenRoot: getFullscreenRoot3,
|
|
8539
8747
|
stopHide,
|
|
8540
8748
|
localIsShow,
|
|
8541
|
-
cleanup
|
|
8749
|
+
cleanup: wrappedCleanup
|
|
8542
8750
|
};
|
|
8543
8751
|
};
|
|
8544
|
-
var popContainerId2 =
|
|
8545
|
-
var parentNodeReferId = null;
|
|
8752
|
+
var popContainerId2 = "id_".concat(esm_browser_v42());
|
|
8546
8753
|
const use_popper_id = function(props) {
|
|
8547
8754
|
var prefix = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "#";
|
|
8755
|
+
var parentNodeReferId = "id_".concat(esm_browser_v42());
|
|
8548
8756
|
var getPrefixId = function getPrefixId2(root3) {
|
|
8549
8757
|
var resolvedBoundary = null;
|
|
8550
8758
|
var resolveBoundary = function resolveBoundary2(fn2) {
|
|
@@ -8553,8 +8761,7 @@ var __webpack_exports__$1 = {};
|
|
|
8553
8761
|
}
|
|
8554
8762
|
};
|
|
8555
8763
|
var resolveParentBoundary = function resolveParentBoundary2() {
|
|
8556
|
-
if (/^parent$/i.test(props.boundary)) {
|
|
8557
|
-
resolvedBoundary = "".concat(prefix).concat(popContainerId2);
|
|
8764
|
+
if (/^parent$/i.test(props.boundary) || !props.boundary) {
|
|
8558
8765
|
var _ref = root3 || {}, parentNode = _ref.parentNode;
|
|
8559
8766
|
if (parentNode !== null && parentNode !== void 0 && parentNode.parentNode) {
|
|
8560
8767
|
parentNode.parentNode.setAttribute("data-pnode-id", parentNodeReferId);
|
|
@@ -8563,42 +8770,53 @@ var __webpack_exports__$1 = {};
|
|
|
8563
8770
|
}
|
|
8564
8771
|
};
|
|
8565
8772
|
var resolveCommonBoundary = function resolveCommonBoundary2() {
|
|
8566
|
-
if (
|
|
8567
|
-
|
|
8568
|
-
|
|
8569
|
-
|
|
8570
|
-
|
|
8571
|
-
|
|
8572
|
-
|
|
8573
|
-
|
|
8574
|
-
|
|
8575
|
-
|
|
8576
|
-
|
|
8577
|
-
|
|
8578
|
-
|
|
8773
|
+
if (typeof props.boundary === "string" && /^body$/i.test(props.boundary)) {
|
|
8774
|
+
resolvedBoundary = "".concat(prefix).concat(popContainerId2);
|
|
8775
|
+
return;
|
|
8776
|
+
}
|
|
8777
|
+
if (props.boundary === document.body) {
|
|
8778
|
+
resolvedBoundary = "".concat(prefix).concat(popContainerId2);
|
|
8779
|
+
return;
|
|
8780
|
+
}
|
|
8781
|
+
if (typeof props.boundary === "string") {
|
|
8782
|
+
resolvedBoundary = props.boundary;
|
|
8783
|
+
return;
|
|
8784
|
+
}
|
|
8785
|
+
if (utils_isElement(props.boundary)) {
|
|
8786
|
+
resolvedBoundary = props.boundary;
|
|
8787
|
+
return;
|
|
8579
8788
|
}
|
|
8580
8789
|
};
|
|
8581
8790
|
resolveBoundary(resolveParentBoundary);
|
|
8582
8791
|
resolveBoundary(resolveCommonBoundary);
|
|
8583
8792
|
resolveBoundary(function() {
|
|
8584
|
-
resolvedBoundary =
|
|
8793
|
+
resolvedBoundary = "".concat(prefix).concat(popContainerId2);
|
|
8585
8794
|
});
|
|
8586
8795
|
return resolvedBoundary;
|
|
8587
8796
|
};
|
|
8588
|
-
if (
|
|
8589
|
-
popContainerId2 = "id_".concat(esm_browser_v42());
|
|
8797
|
+
if (!isAvailableId("#".concat(popContainerId2))) {
|
|
8590
8798
|
var popContainer = document.createElement("div");
|
|
8591
8799
|
popContainer.setAttribute("id", popContainerId2);
|
|
8592
8800
|
popContainer.setAttribute("data-popper-id", popContainerId2);
|
|
8593
8801
|
document.body.append(popContainer);
|
|
8594
8802
|
}
|
|
8595
|
-
|
|
8596
|
-
|
|
8597
|
-
|
|
8803
|
+
var clearParentNodeId = function clearParentNodeId2(root3) {
|
|
8804
|
+
if (/^parent$/i.test(props.boundary)) {
|
|
8805
|
+
var _ref2 = root3 || {}, parentNode = _ref2.parentNode;
|
|
8806
|
+
if (parentNode !== null && parentNode !== void 0 && parentNode.parentNode) {
|
|
8807
|
+
var attr = parentNode.parentNode.getAttribute("data-pnode-id");
|
|
8808
|
+
if (attr === parentNodeReferId) {
|
|
8809
|
+
parentNode.parentNode.removeAttribute("data-pnode-id");
|
|
8810
|
+
}
|
|
8811
|
+
}
|
|
8812
|
+
}
|
|
8813
|
+
};
|
|
8598
8814
|
return {
|
|
8599
8815
|
popContainerId: popContainerId2,
|
|
8600
8816
|
prefixId: getPrefixId(),
|
|
8601
|
-
getPrefixId
|
|
8817
|
+
getPrefixId,
|
|
8818
|
+
parentNodeReferId,
|
|
8819
|
+
clearParentNodeId
|
|
8602
8820
|
};
|
|
8603
8821
|
};
|
|
8604
8822
|
const use_popover_init = function(props, ctx, _ref) {
|
|
@@ -8633,7 +8851,18 @@ var __webpack_exports__$1 = {};
|
|
|
8633
8851
|
}
|
|
8634
8852
|
};
|
|
8635
8853
|
var addEventToPopTargetEl = function addEventToPopTargetEl2() {
|
|
8854
|
+
var retryCount = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
8636
8855
|
var _resolvePopElements = resolvePopElements(), elReference = _resolvePopElements.elReference, elContent = _resolvePopElements.elContent;
|
|
8856
|
+
if (!elReference) {
|
|
8857
|
+
if (retryCount >= 10) {
|
|
8858
|
+
console.warn("[Popover] Failed to add events: reference element not found after retries");
|
|
8859
|
+
return;
|
|
8860
|
+
}
|
|
8861
|
+
(0, external_vue_namespaceObject2.nextTick)(function() {
|
|
8862
|
+
addEventToPopTargetEl2(retryCount + 1);
|
|
8863
|
+
});
|
|
8864
|
+
return;
|
|
8865
|
+
}
|
|
8637
8866
|
storeEvents = resolveTriggerEvents();
|
|
8638
8867
|
storeEvents.forEach(function(storeEvent) {
|
|
8639
8868
|
if (Array.isArray(storeEvent)) {
|
|
@@ -8641,11 +8870,16 @@ var __webpack_exports__$1 = {};
|
|
|
8641
8870
|
} else {
|
|
8642
8871
|
var content2 = storeEvent.content, reference3 = storeEvent.reference;
|
|
8643
8872
|
addEventToTargetEl(elReference, reference3);
|
|
8644
|
-
|
|
8873
|
+
if (elContent) {
|
|
8874
|
+
addEventToTargetEl(elContent, content2);
|
|
8875
|
+
}
|
|
8645
8876
|
}
|
|
8646
8877
|
});
|
|
8647
8878
|
};
|
|
8648
8879
|
var addEventToTargetEl = function addEventToTargetEl2(target, evets) {
|
|
8880
|
+
if (!target) {
|
|
8881
|
+
return;
|
|
8882
|
+
}
|
|
8649
8883
|
evets.forEach(function(_ref2) {
|
|
8650
8884
|
var _ref3 = _slicedToArray(_ref2, 2), event = _ref3[0], listener = _ref3[1];
|
|
8651
8885
|
if (event && typeof listener === "function") {
|
|
@@ -8697,12 +8931,14 @@ var __webpack_exports__$1 = {};
|
|
|
8697
8931
|
if (isFullscreen.value) {
|
|
8698
8932
|
var _fullScreenTarget$val;
|
|
8699
8933
|
var _ref10 = elReference || root3 || {}, parentNode = _ref10.parentNode;
|
|
8700
|
-
|
|
8934
|
+
var fullscreenBoundary = (_fullScreenTarget$val = fullScreenTarget === null || fullScreenTarget === void 0 ? void 0 : fullScreenTarget.value) !== null && _fullScreenTarget$val !== void 0 ? _fullScreenTarget$val : getClosestFullscreenElement(parentNode);
|
|
8935
|
+
boundary.value = fullscreenBoundary || "body";
|
|
8701
8936
|
return;
|
|
8702
8937
|
}
|
|
8703
|
-
|
|
8938
|
+
var resolvedBoundary = getPrefixId(root3 || elReference);
|
|
8939
|
+
boundary.value = resolvedBoundary || "body";
|
|
8704
8940
|
};
|
|
8705
|
-
var _usePopperId = use_popper_id(props, "#"), getPrefixId = _usePopperId.getPrefixId;
|
|
8941
|
+
var _usePopperId = use_popper_id(props, "#"), getPrefixId = _usePopperId.getPrefixId, clearParentNodeId = _usePopperId.clearParentNodeId;
|
|
8706
8942
|
var setFullscreenTag = function setFullscreenTag2() {
|
|
8707
8943
|
var _fullScreenTarget$val2;
|
|
8708
8944
|
fullScreenTarget === null || fullScreenTarget === void 0 || (_fullScreenTarget$val2 = fullScreenTarget.value) === null || _fullScreenTarget$val2 === void 0 || _fullScreenTarget$val2.setAttribute("data-fllsrn-id", fullscreenReferId);
|
|
@@ -8714,7 +8950,7 @@ var __webpack_exports__$1 = {};
|
|
|
8714
8950
|
element === null || element === void 0 || element.removeAttribute("data-fllsrn-id");
|
|
8715
8951
|
});
|
|
8716
8952
|
};
|
|
8717
|
-
var boundary = (0, external_vue_namespaceObject2.ref)();
|
|
8953
|
+
var boundary = (0, external_vue_namespaceObject2.ref)("body");
|
|
8718
8954
|
var beforeInstanceUnmount = function beforeInstanceUnmount2() {
|
|
8719
8955
|
removeEventListener();
|
|
8720
8956
|
};
|
|
@@ -8736,25 +8972,39 @@ var __webpack_exports__$1 = {};
|
|
|
8736
8972
|
if (props.disabled) {
|
|
8737
8973
|
return;
|
|
8738
8974
|
}
|
|
8739
|
-
initPopInstance();
|
|
8740
8975
|
if (isElementFullScreen()) {
|
|
8741
8976
|
var query = "[data-fllsrn-id=".concat(fullscreenReferId, "]");
|
|
8742
8977
|
var target = getFullscreenRoot3(query);
|
|
8743
8978
|
updateFullscreen(target);
|
|
8744
8979
|
}
|
|
8745
8980
|
updateBoundary();
|
|
8981
|
+
initPopInstance();
|
|
8746
8982
|
document.body.addEventListener("fullscreenchange", handleFullscreenChange);
|
|
8983
|
+
document.addEventListener("click", handleClickOutside);
|
|
8747
8984
|
};
|
|
8748
8985
|
var onUnmountedFn = function onUnmountedFn2() {
|
|
8749
8986
|
beforeInstanceUnmount();
|
|
8987
|
+
var _resolvePopElements4 = resolvePopElements(), root3 = _resolvePopElements4.root;
|
|
8988
|
+
clearParentNodeId(root3);
|
|
8750
8989
|
document.body.removeEventListener("fullscreenchange", handleFullscreenChange);
|
|
8751
|
-
|
|
8752
|
-
|
|
8753
|
-
|
|
8990
|
+
document.removeEventListener("click", handleClickOutside);
|
|
8991
|
+
};
|
|
8992
|
+
var isClickInside = function isClickInside2(target) {
|
|
8993
|
+
var _refContent$value$$el, _refContent$value, _refContent$value$con;
|
|
8994
|
+
return (_refContent$value$$el = (_refContent$value = refContent.value) === null || _refContent$value === void 0 || (_refContent$value = _refContent$value.$el) === null || _refContent$value === void 0 || (_refContent$value$con = _refContent$value.contains) === null || _refContent$value$con === void 0 ? void 0 : _refContent$value$con.call(_refContent$value, target)) !== null && _refContent$value$$el !== void 0 ? _refContent$value$$el : false;
|
|
8995
|
+
};
|
|
8996
|
+
var handleClickOutside = function handleClickOutside2(e) {
|
|
8997
|
+
var target = e.target;
|
|
8998
|
+
if (isClickInside(target)) {
|
|
8999
|
+
e.preventDefault();
|
|
9000
|
+
e.stopPropagation();
|
|
9001
|
+
e.stopImmediatePropagation();
|
|
9002
|
+
return;
|
|
9003
|
+
}
|
|
8754
9004
|
var commonFunc = function commonFunc2() {
|
|
8755
9005
|
ctx.emit(EMIT_EVENTS.CLICK_OUTSIDE, {
|
|
8756
9006
|
isShow: localIsShow.value,
|
|
8757
|
-
event:
|
|
9007
|
+
event: e
|
|
8758
9008
|
});
|
|
8759
9009
|
var needExec = props.disableOutsideClick || props.always || props.disabled || props.trigger === "manual";
|
|
8760
9010
|
if (!props.forceClickoutside && needExec) {
|
|
@@ -8764,7 +9014,7 @@ var __webpack_exports__$1 = {};
|
|
|
8764
9014
|
hideFn();
|
|
8765
9015
|
}
|
|
8766
9016
|
};
|
|
8767
|
-
if (hideIgnoreReference) {
|
|
9017
|
+
if (props.hideIgnoreReference) {
|
|
8768
9018
|
setTimeout(function() {
|
|
8769
9019
|
if (ReferenceClickSharedState[uniqKey]) {
|
|
8770
9020
|
ReferenceClickSharedState[uniqKey] = false;
|
|
@@ -8825,7 +9075,7 @@ var __webpack_exports__$1 = {};
|
|
|
8825
9075
|
refContent,
|
|
8826
9076
|
refArrow,
|
|
8827
9077
|
refRoot
|
|
8828
|
-
}), onMountedFn = _usePopoverInit.onMountedFn, onUnmountedFn = _usePopoverInit.onUnmountedFn,
|
|
9078
|
+
}), onMountedFn = _usePopoverInit.onMountedFn, onUnmountedFn = _usePopoverInit.onUnmountedFn, beforeInstanceUnmount = _usePopoverInit.beforeInstanceUnmount, initPopInstance = _usePopoverInit.initPopInstance, showFn = _usePopoverInit.showFn, hideFn = _usePopoverInit.hideFn, showPopover = _usePopoverInit.showPopover, hidePopover = _usePopoverInit.hidePopover, updatePopover = _usePopoverInit.updatePopover, resetPopover = _usePopoverInit.resetPopover, stopHide = _usePopoverInit.stopHide, localIsShow = _usePopoverInit.localIsShow, boundary = _usePopoverInit.boundary, uniqKey = _usePopoverInit.uniqKey;
|
|
8829
9079
|
if (!props.always && !props.disabled) {
|
|
8830
9080
|
(0, external_vue_namespaceObject2.watch)(function() {
|
|
8831
9081
|
return props.isShow;
|
|
@@ -8844,7 +9094,6 @@ var __webpack_exports__$1 = {};
|
|
|
8844
9094
|
initPopInstance();
|
|
8845
9095
|
}
|
|
8846
9096
|
});
|
|
8847
|
-
updateBoundary();
|
|
8848
9097
|
(0, external_vue_namespaceObject2.onMounted)(onMountedFn);
|
|
8849
9098
|
(0, external_vue_namespaceObject2.onBeforeUnmount)(onUnmountedFn);
|
|
8850
9099
|
var isRenderModeShow = (0, external_vue_namespaceObject2.computed)(function() {
|
|
@@ -8891,7 +9140,6 @@ var __webpack_exports__$1 = {};
|
|
|
8891
9140
|
isRenderModeShow,
|
|
8892
9141
|
transBoundary,
|
|
8893
9142
|
handleClickContent,
|
|
8894
|
-
handleClickOutside,
|
|
8895
9143
|
updatePopover,
|
|
8896
9144
|
resetPopover,
|
|
8897
9145
|
hide: hide2,
|
|
@@ -8938,7 +9186,7 @@ var __webpack_exports__$1 = {};
|
|
|
8938
9186
|
"to": _this.boundary
|
|
8939
9187
|
}, {
|
|
8940
9188
|
"default": function _default2() {
|
|
8941
|
-
return [(0, external_vue_namespaceObject2.
|
|
9189
|
+
return [(0, external_vue_namespaceObject2.createVNode)(content, {
|
|
8942
9190
|
"ref": "refContent",
|
|
8943
9191
|
"width": _this.width,
|
|
8944
9192
|
"height": _this.height,
|
|
@@ -8963,9 +9211,7 @@ var __webpack_exports__$1 = {};
|
|
|
8963
9211
|
}
|
|
8964
9212
|
}) : "";
|
|
8965
9213
|
}
|
|
8966
|
-
})
|
|
8967
|
-
return _this.handleClickOutside(e, _this.hideIgnoreReference);
|
|
8968
|
-
}]])];
|
|
9214
|
+
})];
|
|
8969
9215
|
}
|
|
8970
9216
|
})];
|
|
8971
9217
|
}
|
|
@@ -12209,7 +12455,7 @@ const searchUsers = async (params) => {
|
|
|
12209
12455
|
};
|
|
12210
12456
|
const lookupUsers = async (params) => {
|
|
12211
12457
|
const { apiBaseUrl, tenantId, exactSearchKey = "bk_username", usersList = [], enableMultiTenantMode = true } = params;
|
|
12212
|
-
const users = usersList.filter(Boolean).map((user) => user.trim());
|
|
12458
|
+
const users = usersList.filter(Boolean).map((user) => typeof user === "string" ? user.trim() : String(user).trim());
|
|
12213
12459
|
if (!enableMultiTenantMode) {
|
|
12214
12460
|
try {
|
|
12215
12461
|
const userList = await getUserList(apiBaseUrl, { userIds: users });
|
|
@@ -12247,12 +12493,14 @@ const formatUsers = (users, enableMultiTenantMode = true) => {
|
|
|
12247
12493
|
...user,
|
|
12248
12494
|
id: user.username,
|
|
12249
12495
|
name: `${user.display_name}(${user.username})`,
|
|
12496
|
+
type: user.data_source_type,
|
|
12250
12497
|
tenantId: user.owner_tenant_id
|
|
12251
12498
|
}));
|
|
12252
12499
|
}
|
|
12253
12500
|
return users.map((user) => ({
|
|
12254
12501
|
id: user.bk_username,
|
|
12255
12502
|
name: user.display_name,
|
|
12503
|
+
type: user.data_source_type,
|
|
12256
12504
|
tenantId: user.owner_tenant_id,
|
|
12257
12505
|
...user
|
|
12258
12506
|
}));
|
|
@@ -12435,9 +12683,11 @@ const getPath = (obj, path, variables) => {
|
|
|
12435
12683
|
}
|
|
12436
12684
|
if (variables) {
|
|
12437
12685
|
target = target[pathStack[i2]];
|
|
12438
|
-
|
|
12439
|
-
|
|
12440
|
-
|
|
12686
|
+
if (typeof target === "string") {
|
|
12687
|
+
Object.keys(variables).forEach((key) => {
|
|
12688
|
+
target = target.replace(`{${key}}`, variables[key]);
|
|
12689
|
+
});
|
|
12690
|
+
}
|
|
12441
12691
|
} else {
|
|
12442
12692
|
target = target[pathStack[i2]];
|
|
12443
12693
|
}
|
|
@@ -12669,10 +12919,12 @@ const useUserSearch = (apiBaseUrl, tenantId, enableMultiTenantMode = true) => {
|
|
|
12669
12919
|
const performSearch = async (keyword) => {
|
|
12670
12920
|
if (!(keyword == null ? void 0 : keyword.length)) {
|
|
12671
12921
|
searchResults.value = [];
|
|
12922
|
+
loading2.value = false;
|
|
12672
12923
|
return;
|
|
12673
12924
|
}
|
|
12674
12925
|
if (enableMultiTenantMode && (!apiBaseUrl || !tenantId)) {
|
|
12675
12926
|
console.warn("执行用户搜索需要提供有效的API基础URL和租户ID");
|
|
12927
|
+
loading2.value = false;
|
|
12676
12928
|
return;
|
|
12677
12929
|
}
|
|
12678
12930
|
loading2.value = true;
|
|
@@ -12795,6 +13047,9 @@ const _export_sfc = (sfc, props) => {
|
|
|
12795
13047
|
return target;
|
|
12796
13048
|
};
|
|
12797
13049
|
const MeTag = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-4f251ce1"]]);
|
|
13050
|
+
const UserGroupAvatar = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20style='fill:%20%23A3C5FD;'%3e%3cpath%20fill-rule='evenodd'%20d='M405.7858816%20162.66256256C416.4461344%20160.6535248%20439.8986944%20159.44810208%20457.3815104%20160.25171712%20484.2453504%20161.05533248%20494.052784%20163.4661776%20516.226112%20174.7167888%20567.8217376%20200.43247136%20597.670448%20242.22045568%20606.6250624%20301.28616416%20617.711728%20374.415136%20593.4063488%20443.5260352%20535.8409792%20500.180896%20509.8299584%20525.8965792%20505.565856%20537.5489984%20514.0940608%20557.237568%20521.3430336%20572.9080608%20546.0748224%20586.5695168%20629.2248%20620.3213504%20691.054272%20645.2334208%20760.985536%20687.4232096%20767.8080992%20703.8973216%20774.6306624%20720.3714304%20784.8645056%20752.114224%20791.6870688%20777.4280992%20799.7888608%20807.1618592%20793.3927072%20818.8142784%20761.8383584%20832.4757344%20720.4765728%20850.155264%20669.3073536%20857.3878016%20546.9276416%20862.2094912%20392.9935776%20868.2366048%20227.12002944%20858.5932224%20162.30568672%20840.1100768%20134.5890272%20832.4757344%20108.15159776%20815.1980096%20100.47621504%20799.5275136%2093.6536528%20786.2678656%2094.08006304%20784.2588288%20105.59313696%20746.4889184%20116.67980096%20709.924432%20119.23826176%20705.5045504%20141.41158944%20685.4141728%20143.84821888%20683.2001312%20146.05397248%20681.2036448%20148.2232096%20679.3252416L152.13038144%20676.0501632C159.5946992%20670.0236288%20167.98497088%20664.6722176%20184.94031712%20656.0863296L191.29263904%20652.915344C215.97973152%20640.7492736%20256.51622304%20622.3959904%20329.458464%20589.3821696%20359.7335872%20575.3189056%20371.2466592%20563.6664896%20375.084352%20542.772496%20377.2164032%20530.316464%20374.6579424%20526.7001952%20345.2356416%20496.9664352%20295.34565344%20446.338688%20274.02514592%20396.9163584%20273.59873568%20331.0199232%20273.59873568%20291.24097568%20282.12693888%20265.52529312%20307.71154784%20228.15719168%20332.8697472%20191.19089792%20365.703328%20169.49329056%20405.7858816%20162.66256256ZM668.7713728%20226.60405184C756.683056%20211.50282816%20820.4190272%20263.09867616%20827.0124032%20354.9644544%20831.8475456%20416.6277856%20815.1443264%20461.931456%20770.3093664%20510.1714752%20752.287472%20529.4674848%20747.891888%20536.5986176%20748.3314464%20548.344016%20748.7710048%20555.8946272%20751.4083552%20565.123152%20754.485264%20568.8984576%20757.5621728%20572.2542848%20788.331264%20588.1944672%20823.0563776%20604.1346464%20944.3745024%20659.92528%20966.791984%20682.996592%20958.4403712%20744.6599232%20954.923904%20771.9260224%20956.6821376%20771.0870656%20890.308816%20787.0272448%20867.4517792%20792.8999456%20845.0343008%20798.3531648%20841.0782752%20799.6116%20835.3640128%20801.2895136%20833.1662208%20797.9336864%20830.5288704%20781.5740256%20824.3750528%20739.6261824%20812.0674176%20710.6821696%20790.0894976%20687.6108576%20752.287472%20647.3409248%20703.9360448%20619.6553504%20624.3759712%20593.6476864%20597.5629088%20584.4191616%20560.64%20550.8608864%20560.64%20534.920704%20560.64%20527.7895712%20569.8707264%20514.7857408%20589.6508544%20494.6507744%20620.859504%20461.931456%20639.7605152%20429.631616%20648.5516832%20394.8149056%20655.5846208%20366.7098496%20652.0681504%20283.23364096%20642.837424%20254.7091072%20635.3649312%20231.63779328%20634.4858144%20232.47675008%20668.7713728%20226.60405184Z'%3e%3c/path%3e%3c/svg%3e";
|
|
13051
|
+
const UserAvatar = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='32px'%20height='32px'%20viewBox='0%200%2032%2032'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIcon/用户%3c/title%3e%3cg%20id='Icon/用户'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='user-(1)'%20transform='translate(3,%202)'%20fill='%23A3C5FD'%20fill-rule='nonzero'%3e%3cpath%20d='M13.0077612,27.9989067%20C10.3002732,27.9989067%207.59285518,28.0018792%204.88515705,27.997455%20C3.95018807,27.9959342%203.05044678,27.8282323%202.22816433,27.3628696%20C0.998627601,26.6672451%200.29953695,25.6114692%200.0864200465,24.2387462%20C-0.0656962495,23.259079%200.0147040645,22.4675755%200.0874005263,21.4879775%20C0.187970957,20.13461%200.423078914,19.3321844%200.863249688,18.0430358%20C1.22365046,16.9873982%201.73014453,16.0067633%202.49702917,15.175719%20C3.42254341,14.1726178%204.6014447,13.7297906%205.9255989,13.6440041%20C6.33292322,13.6073668%206.66741099,13.712025%206.9979768,13.9263185%20C7.58886318,14.3094892%208.17393665,14.7060014%208.79220674,15.0421658%20C10.1097776,15.758321%2011.5447274,16.1099698%2013.0616182,16.0930337%20C14.6806203,16.0750607%2016.2142496,15.63963%2017.592821,14.8169502%20C18.0555431,14.5407189%2018.5150436,14.256538%2018.9569652,13.9491996%20C19.3610679,13.6681294%2019.7808585,13.5749462%2020.274326,13.6337733%20C21.462472,13.7340074%2022.3872158,14.1103345%2023.2340106,14.8851094%20C23.902636,15.496952%2024.3685096,16.2520257%2024.7518119,17.0611566%20C25.272453,18.1598604%2025.5462904,18.7976948%2025.7441396,19.9861253%20C25.9499728,21.2233595%2026.0256808,22.2792045%2025.9924842,23.5308171%20C25.9627193,24.6543374%2025.6405577,25.6840525%2024.8535729,26.5307194%20C24.1686994,27.2671979%2023.3129402,27.7090574%2022.3211027,27.8808379%20C21.9232331,27.9495501%2021.5154185,27.9922014%2021.1120162,27.9935148%20C18.4104811,28.0036073%2015.7090862,27.9989067%2013.0077612,27.9989067%20L13.0077612,27.9989067%20Z%20M5.91775495,6.98479749%20C5.84814002,3.25685016%209.08684454,-0.00255470186%2013.0162355,1.5025268e-06%20C16.9117994,0.00256071584%2020.1304739,3.23452217%2020.1095656,7.04113598%20C20.0884528,10.8082092%2016.8998935,14.015354%2013.0058002,14.0149393%20C9.10134181,14.0145245%205.83322254,10.7695672%205.91775495,6.98479749%20Z'%20id='形状'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e";
|
|
13052
|
+
const VirtualAvatar = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='32px'%20height='32px'%20viewBox='0%200%2032%2032'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIcon/虚拟icon%3c/title%3e%3cg%20id='Icon/虚拟icon'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M27.4705882,3%20C28.315259,3%2029,3.68474098%2029,4.52941178%20L29,22.4623054%20C29,23.3069762%2028.315259,23.9917172%2027.4705882,23.9917172%20L20.5882353,23.9917172%20L20.5882353,27.0244081%20L24.0294118,27.0244081%20C24.2405794,27.0244081%2024.4117647,27.1955933%2024.4117647,27.406761%20L24.4117647,28.617647%20C24.4117647,28.8288148%2024.2405795,29%2024.0294118,29%20L7.97058824,29%20C7.75942054,29%207.58823529,28.8288148%207.58823529,28.617647%20L7.58823529,27.406761%20C7.58823531,27.1955933%207.75942055,27.0244081%207.97058824,27.0244081%20L11.4117647,27.0244081%20L11.4117647,23.9917172%20L4.52941178,23.9917172%20C3.68474098,23.9917172%203,23.3069762%203,22.4623054%20L3,4.52941178%20C3,3.68474098%203.68474098,3%204.52941178,3%20L27.4705882,3%20Z%20M19,24%20L13,24%20L13,27%20L19,27%20L19,24%20Z%20M23.4117647,7%20L8.58823529,7%20C8.03595054,7%207.58823529,7.44771525%207.58823529,8%20L7.58823529,19%20C7.58823529,19.5522847%208.03595054,20%208.58823529,20%20L23.4117647,20%20C23.9640495,20%2024.4117647,19.5522847%2024.4117647,19%20L24.4117647,8%20C24.4117647,7.44771525%2023.9640495,7%2023.4117647,7%20Z%20M12,10%20C12.5522847,10%2013,10.4477153%2013,11%20L13,13%20C13,13.5522847%2012.5522847,14%2012,14%20C11.4477153,14%2011,13.5522847%2011,13%20L11,11%20C11,10.4477153%2011.4477153,10%2012,10%20Z%20M20,10%20C20.5522847,10%2021,10.4477153%2021,11%20L21,13%20C21,13.5522847%2020.5522847,14%2020,14%20C19.4477153,14%2019,13.5522847%2019,13%20L19,11%20C19,10.4477153%2019.4477153,10%2020,10%20Z%20M26,5%20C25.4477153,5%2025,5.44771525%2025,6%20C25,6.55228475%2025.4477153,7%2026,7%20C26.5522847,7%2027,6.55228475%2027,6%20C27,5.44771525%2026.5522847,5%2026,5%20Z'%20id='蒙版'%20fill='%23A3C5FD'%20fill-rule='nonzero'%3e%3c/path%3e%3c/g%3e%3c/svg%3e";
|
|
12798
13053
|
const UserRender = defineComponent({
|
|
12799
13054
|
name: "UserRender",
|
|
12800
13055
|
props: {
|
|
@@ -12813,23 +13068,63 @@ const UserRender = defineComponent({
|
|
|
12813
13068
|
render: {
|
|
12814
13069
|
type: Function,
|
|
12815
13070
|
required: false
|
|
13071
|
+
},
|
|
13072
|
+
hasAvatar: {
|
|
13073
|
+
type: Boolean,
|
|
13074
|
+
default: false
|
|
13075
|
+
},
|
|
13076
|
+
avatarBaseUrl: {
|
|
13077
|
+
type: String,
|
|
13078
|
+
default: ""
|
|
12816
13079
|
}
|
|
12817
13080
|
},
|
|
12818
13081
|
setup(props) {
|
|
13082
|
+
const getAvatarUrl = (user) => {
|
|
13083
|
+
if (user.type === "virtual") {
|
|
13084
|
+
return VirtualAvatar;
|
|
13085
|
+
}
|
|
13086
|
+
if (user.type === "userGroup") {
|
|
13087
|
+
return UserGroupAvatar;
|
|
13088
|
+
}
|
|
13089
|
+
if (!props.avatarBaseUrl) {
|
|
13090
|
+
return UserAvatar;
|
|
13091
|
+
}
|
|
13092
|
+
const loginName = user.login_name || user.bk_username || user.id;
|
|
13093
|
+
return `${props.avatarBaseUrl}${loginName}.png?default_when_absent=true`;
|
|
13094
|
+
};
|
|
12819
13095
|
const defaultRender = (h2, props2) => {
|
|
12820
|
-
return h2(
|
|
12821
|
-
|
|
12822
|
-
|
|
12823
|
-
|
|
12824
|
-
|
|
13096
|
+
return h2(
|
|
13097
|
+
"div",
|
|
13098
|
+
{
|
|
13099
|
+
style: {
|
|
13100
|
+
display: "flex",
|
|
13101
|
+
alignItems: "center"
|
|
13102
|
+
}
|
|
13103
|
+
},
|
|
13104
|
+
[
|
|
13105
|
+
props2.hasAvatar ? h2("img", {
|
|
13106
|
+
src: getAvatarUrl(props2.user),
|
|
12825
13107
|
style: {
|
|
12826
|
-
|
|
12827
|
-
|
|
13108
|
+
width: "20px",
|
|
13109
|
+
height: "20px",
|
|
13110
|
+
borderRadius: "50%",
|
|
13111
|
+
marginRight: "6px",
|
|
13112
|
+
flexShrink: 0
|
|
12828
13113
|
}
|
|
12829
|
-
},
|
|
12830
|
-
|
|
12831
|
-
|
|
12832
|
-
|
|
13114
|
+
}) : null,
|
|
13115
|
+
h2("span", props2.user.name),
|
|
13116
|
+
props2.user.tenantId !== props2.tenantId && props2.user.tenantId ? h2(
|
|
13117
|
+
"span",
|
|
13118
|
+
{
|
|
13119
|
+
style: {
|
|
13120
|
+
color: "#f59500",
|
|
13121
|
+
marginLeft: "4px"
|
|
13122
|
+
}
|
|
13123
|
+
},
|
|
13124
|
+
`@${props2.tenants[props2.user.tenantId] || props2.user.tenantId}`
|
|
13125
|
+
) : null
|
|
13126
|
+
]
|
|
13127
|
+
);
|
|
12833
13128
|
};
|
|
12834
13129
|
return () => {
|
|
12835
13130
|
try {
|
|
@@ -12854,8 +13149,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
12854
13149
|
},
|
|
12855
13150
|
__name: "selection-popover",
|
|
12856
13151
|
props: {
|
|
13152
|
+
avatarBaseUrl: { default: "" },
|
|
12857
13153
|
containerWidth: { default: "auto" },
|
|
12858
13154
|
emptyText: { default: "" },
|
|
13155
|
+
hasAvatar: { type: Boolean, default: false },
|
|
12859
13156
|
isShow: { type: Boolean, default: false },
|
|
12860
13157
|
loading: { type: Boolean, default: false },
|
|
12861
13158
|
options: { default: () => [] },
|
|
@@ -12981,11 +13278,13 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
12981
13278
|
}, ["prevent"]))
|
|
12982
13279
|
}, [
|
|
12983
13280
|
createVNode(unref(UserRender), {
|
|
13281
|
+
"avatar-base-url": _ctx.avatarBaseUrl,
|
|
13282
|
+
"has-avatar": _ctx.hasAvatar,
|
|
12984
13283
|
render: _ctx.renderListItem,
|
|
12985
13284
|
"tenant-id": _ctx.tenantId,
|
|
12986
13285
|
tenants: _ctx.tenants,
|
|
12987
13286
|
user
|
|
12988
|
-
}, null, 8, ["render", "tenant-id", "tenants", "user"])
|
|
13287
|
+
}, null, 8, ["avatar-base-url", "has-avatar", "render", "tenant-id", "tenants", "user"])
|
|
12989
13288
|
], 40, _hoisted_4);
|
|
12990
13289
|
}),
|
|
12991
13290
|
128
|
|
@@ -13025,7 +13324,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
13025
13324
|
};
|
|
13026
13325
|
}
|
|
13027
13326
|
});
|
|
13028
|
-
const SelectionPopover = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
13327
|
+
const SelectionPopover = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-d5a338f0"]]);
|
|
13029
13328
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
13030
13329
|
...{
|
|
13031
13330
|
name: "UserTag"
|
|
@@ -13033,8 +13332,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
13033
13332
|
__name: "user-tag",
|
|
13034
13333
|
props: {
|
|
13035
13334
|
active: { type: Boolean },
|
|
13335
|
+
avatarBaseUrl: {},
|
|
13036
13336
|
currentTenantId: {},
|
|
13037
13337
|
draggable: { type: Boolean },
|
|
13338
|
+
hasAvatar: { type: Boolean },
|
|
13038
13339
|
renderTag: { type: Function },
|
|
13039
13340
|
showTenant: { type: Boolean },
|
|
13040
13341
|
tenants: {},
|
|
@@ -13059,11 +13360,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
13059
13360
|
}, {
|
|
13060
13361
|
default: withCtx(() => [
|
|
13061
13362
|
createVNode(unref(UserRender), {
|
|
13363
|
+
"avatar-base-url": _ctx.avatarBaseUrl,
|
|
13364
|
+
"has-avatar": _ctx.hasAvatar,
|
|
13062
13365
|
render: _ctx.renderTag,
|
|
13063
13366
|
"tenant-id": _ctx.currentTenantId,
|
|
13064
13367
|
tenants: _ctx.tenants,
|
|
13065
13368
|
user: _ctx.user
|
|
13066
|
-
}, null, 8, ["render", "tenant-id", "tenants", "user"])
|
|
13369
|
+
}, null, 8, ["avatar-base-url", "has-avatar", "render", "tenant-id", "tenants", "user"])
|
|
13067
13370
|
]),
|
|
13068
13371
|
_: 1
|
|
13069
13372
|
/* STABLE */
|
|
@@ -13071,7 +13374,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
13071
13374
|
};
|
|
13072
13375
|
}
|
|
13073
13376
|
});
|
|
13074
|
-
const UserTag = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
13377
|
+
const UserTag = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-1f2e0737"]]);
|
|
13075
13378
|
const _hoisted_1 = ["placeholder"];
|
|
13076
13379
|
const _hoisted_2 = { class: "hidden-users" };
|
|
13077
13380
|
const _hoisted_3 = ["placeholder"];
|
|
@@ -13087,6 +13390,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13087
13390
|
multiple: { type: Boolean, default: false },
|
|
13088
13391
|
allowCreate: { type: Boolean, default: false },
|
|
13089
13392
|
apiBaseUrl: { default: "" },
|
|
13393
|
+
avatarBaseUrl: { default: "" },
|
|
13090
13394
|
currentUserId: { default: "" },
|
|
13091
13395
|
disabled: { type: Boolean, default: false },
|
|
13092
13396
|
emptyText: { default: "" },
|
|
@@ -13094,6 +13398,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13094
13398
|
exactSearchKey: { default: DEFAULT_EXACT_SEARCH_KEY },
|
|
13095
13399
|
excludeUserIds: { default: () => [] },
|
|
13096
13400
|
freePaste: { type: Boolean, default: false },
|
|
13401
|
+
hasAvatar: { type: Boolean, default: false },
|
|
13097
13402
|
placeholder: { default: "" },
|
|
13098
13403
|
renderListItem: {},
|
|
13099
13404
|
renderTag: {},
|
|
@@ -13156,7 +13461,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13156
13461
|
() => isMaxCountReached.value || !!props.currentUserId && selectedUsers.value.some((user) => user[props.exactSearchKey] === props.currentUserId)
|
|
13157
13462
|
);
|
|
13158
13463
|
const userTagCommonProps = computed(() => ({
|
|
13464
|
+
avatarBaseUrl: props.avatarBaseUrl,
|
|
13159
13465
|
currentTenantId: props.tenantId,
|
|
13466
|
+
hasAvatar: props.hasAvatar,
|
|
13160
13467
|
renderTag: props.renderTag,
|
|
13161
13468
|
tenants
|
|
13162
13469
|
}));
|
|
@@ -13461,8 +13768,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13461
13768
|
[
|
|
13462
13769
|
createCommentVNode(" 下拉选项列表 "),
|
|
13463
13770
|
createVNode(SelectionPopover, {
|
|
13771
|
+
"avatar-base-url": _ctx.avatarBaseUrl,
|
|
13464
13772
|
"container-width": containerRef.value ? containerRef.value.offsetWidth : "auto",
|
|
13465
13773
|
"empty-text": computedEmptyText.value,
|
|
13774
|
+
"has-avatar": _ctx.hasAvatar,
|
|
13466
13775
|
"is-show": showDropdown.value,
|
|
13467
13776
|
loading: unref(searchLoading),
|
|
13468
13777
|
options: displayOptions.value,
|
|
@@ -13608,10 +13917,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13608
13917
|
renderList(selectedUsers.value.slice(visibleUsers.value.length), (user) => {
|
|
13609
13918
|
return openBlock(), createBlock(unref(UserRender), {
|
|
13610
13919
|
key: user.id,
|
|
13920
|
+
"avatar-base-url": _ctx.avatarBaseUrl,
|
|
13921
|
+
"has-avatar": _ctx.hasAvatar,
|
|
13611
13922
|
"tenant-id": _ctx.tenantId,
|
|
13612
13923
|
tenants: unref(tenants),
|
|
13613
13924
|
user
|
|
13614
|
-
}, null, 8, ["tenant-id", "tenants", "user"]);
|
|
13925
|
+
}, null, 8, ["avatar-base-url", "has-avatar", "tenant-id", "tenants", "user"]);
|
|
13615
13926
|
}),
|
|
13616
13927
|
128
|
|
13617
13928
|
/* KEYED_FRAGMENT */
|
|
@@ -13658,7 +13969,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13658
13969
|
]),
|
|
13659
13970
|
_: 1
|
|
13660
13971
|
/* STABLE */
|
|
13661
|
-
}, 8, ["container-width", "empty-text", "is-show", "loading", "options", "render-list-item", "search-query", "tenant-id", "tenants", "user-group", "user-group-name"])
|
|
13972
|
+
}, 8, ["avatar-base-url", "container-width", "empty-text", "has-avatar", "is-show", "loading", "options", "render-list-item", "search-query", "tenant-id", "tenants", "user-group", "user-group-name"])
|
|
13662
13973
|
],
|
|
13663
13974
|
2
|
|
13664
13975
|
/* CLASS */
|
|
@@ -13666,7 +13977,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13666
13977
|
};
|
|
13667
13978
|
}
|
|
13668
13979
|
});
|
|
13669
|
-
const BkUserSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
13980
|
+
const BkUserSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9975c7e1"]]);
|
|
13670
13981
|
const vue2 = {
|
|
13671
13982
|
model: {
|
|
13672
13983
|
prop: "modelValue",
|