@blueking/bk-user-selector 0.0.34 → 0.0.35-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/typings/components/multiple-selector.vue.d.ts +4 -0
- package/typings/components/user-selector.vue.d.ts +4 -0
- package/vue2/index.es.min.js +23 -151
- package/vue2/index.iife.min.js +23 -151
- package/vue2/index.umd.min.js +23 -151
- package/vue2/vue2.css +14 -14
- package/vue3/index.es.min.js +12 -5
- package/vue3/index.iife.min.js +17 -151
- package/vue3/index.umd.min.js +13 -6
- package/vue3/vue3.css +14 -14
package/package.json
CHANGED
|
@@ -3,10 +3,14 @@ declare const _default: import("vue").DefineComponent<MultipleSelectorProps, {},
|
|
|
3
3
|
"update:selectedUsers": (...args: any[]) => void;
|
|
4
4
|
"add-user": (...args: any[]) => void;
|
|
5
5
|
"remove-user": (...args: any[]) => void;
|
|
6
|
+
dragStart: (...args: any[]) => void;
|
|
7
|
+
dragEnd: (...args: any[]) => void;
|
|
6
8
|
}, string, import("vue").PublicProps, Readonly<MultipleSelectorProps> & Readonly<{
|
|
7
9
|
"onUpdate:selectedUsers"?: ((...args: any[]) => any) | undefined;
|
|
8
10
|
"onAdd-user"?: ((...args: any[]) => any) | undefined;
|
|
9
11
|
"onRemove-user"?: ((...args: any[]) => any) | undefined;
|
|
12
|
+
onDragStart?: ((...args: any[]) => any) | undefined;
|
|
13
|
+
onDragEnd?: ((...args: any[]) => any) | undefined;
|
|
10
14
|
}>, {
|
|
11
15
|
tenantId: string;
|
|
12
16
|
apiBaseUrl: string;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { UserSelectorProps } from '../types';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<UserSelectorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
3
3
|
change: (...args: any[]) => void;
|
|
4
|
+
dragStart: (...args: any[]) => void;
|
|
5
|
+
dragEnd: (...args: any[]) => void;
|
|
4
6
|
"update:modelValue": (...args: any[]) => void;
|
|
5
7
|
}, string, import("vue").PublicProps, Readonly<UserSelectorProps> & Readonly<{
|
|
6
8
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
9
|
+
onDragStart?: ((...args: any[]) => any) | undefined;
|
|
10
|
+
onDragEnd?: ((...args: any[]) => any) | undefined;
|
|
7
11
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
8
12
|
}>, {
|
|
9
13
|
tenantId: string;
|
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
|
});
|
|
@@ -14414,7 +14273,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
14414
14273
|
enableMultiTenantMode: { type: Boolean },
|
|
14415
14274
|
allowCreate: { type: Boolean, default: false }
|
|
14416
14275
|
},
|
|
14417
|
-
emits: ["update:selectedUsers", "add-user", "remove-user"],
|
|
14276
|
+
emits: ["update:selectedUsers", "add-user", "remove-user", "dragStart", "dragEnd"],
|
|
14418
14277
|
setup(__props, { emit: __emit }) {
|
|
14419
14278
|
const props2 = __props;
|
|
14420
14279
|
const emit = __emit;
|
|
@@ -14459,6 +14318,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
14459
14318
|
sortableInstance.value = new Sortable(sortableContainerRef.value, {
|
|
14460
14319
|
animation: 150,
|
|
14461
14320
|
draggable: ".tag-wrapper",
|
|
14321
|
+
onStart: (event) => {
|
|
14322
|
+
emit("dragStart", event);
|
|
14323
|
+
},
|
|
14462
14324
|
onEnd: (evt) => {
|
|
14463
14325
|
const { oldIndex, newIndex } = evt;
|
|
14464
14326
|
if (oldIndex === newIndex || oldIndex === void 0 || newIndex === void 0) return;
|
|
@@ -14466,6 +14328,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
14466
14328
|
const [movedUser] = updatedUsers.splice(oldIndex, 1);
|
|
14467
14329
|
updatedUsers.splice(newIndex, 0, movedUser);
|
|
14468
14330
|
emit("update:selectedUsers", updatedUsers);
|
|
14331
|
+
emit("dragEnd", evt);
|
|
14469
14332
|
}
|
|
14470
14333
|
});
|
|
14471
14334
|
};
|
|
@@ -14586,7 +14449,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
14586
14449
|
const result = await lookupUsers({
|
|
14587
14450
|
apiBaseUrl: props2.apiBaseUrl,
|
|
14588
14451
|
tenantId: props2.tenantId,
|
|
14589
|
-
exactSearchKey:
|
|
14452
|
+
exactSearchKey: "login_name",
|
|
14590
14453
|
usersList: users,
|
|
14591
14454
|
enableMultiTenantMode: props2.enableMultiTenantMode
|
|
14592
14455
|
});
|
|
@@ -14920,7 +14783,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
14920
14783
|
};
|
|
14921
14784
|
}
|
|
14922
14785
|
});
|
|
14923
|
-
const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
14786
|
+
const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-7515c7a3"]]);
|
|
14924
14787
|
const _hoisted_1 = { class: "input-container" };
|
|
14925
14788
|
const _hoisted_2 = ["placeholder"];
|
|
14926
14789
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
@@ -15203,7 +15066,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15203
15066
|
enableMultiTenantMode: { type: Boolean, default: true },
|
|
15204
15067
|
allowCreate: { type: Boolean, default: false }
|
|
15205
15068
|
},
|
|
15206
|
-
emits: ["update:modelValue", "change"],
|
|
15069
|
+
emits: ["update:modelValue", "change", "dragStart", "dragEnd"],
|
|
15207
15070
|
setup(__props, { emit: __emit }) {
|
|
15208
15071
|
const { t: t2 } = useI18n();
|
|
15209
15072
|
__webpack_exports__provideGlobalConfig({
|
|
@@ -15283,6 +15146,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15283
15146
|
watch(
|
|
15284
15147
|
() => props2.modelValue,
|
|
15285
15148
|
() => {
|
|
15149
|
+
initSelectedUsers();
|
|
15286
15150
|
}
|
|
15287
15151
|
);
|
|
15288
15152
|
onBeforeMount(() => {
|
|
@@ -15342,6 +15206,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15342
15206
|
tenants: unref(tenants),
|
|
15343
15207
|
"user-group": _ctx.userGroup,
|
|
15344
15208
|
"user-group-name": userGroupName.value,
|
|
15209
|
+
onDragEnd: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("dragEnd", $event)),
|
|
15210
|
+
onDragStart: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("dragStart", $event)),
|
|
15345
15211
|
"onUpdate:selectedUsers": handleUpdateSelectedUsers
|
|
15346
15212
|
}, null, 8, ["modelValue", "allow-create", "api-base-url", "current-user-id", "disabled", "draggable", "empty-text", "enable-multi-tenant-mode", "exact-search-key", "exclude-user-ids", "placeholder", "render-list-item", "render-tag", "selected-users", "tenant-id", "tenants", "user-group", "user-group-name"])
|
|
15347
15213
|
],
|
|
@@ -15355,7 +15221,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15355
15221
|
};
|
|
15356
15222
|
}
|
|
15357
15223
|
});
|
|
15358
|
-
const BkUserSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
15224
|
+
const BkUserSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-20d45a5c"]]);
|
|
15359
15225
|
const vue2 = {
|
|
15360
15226
|
model: {
|
|
15361
15227
|
prop: "modelValue",
|
|
@@ -15379,6 +15245,12 @@ const vue2 = {
|
|
|
15379
15245
|
emit("update:modelValue", ...arguments);
|
|
15380
15246
|
emit("change", ...arguments);
|
|
15381
15247
|
},
|
|
15248
|
+
onDragStart: (event) => {
|
|
15249
|
+
emit("dragStart", event);
|
|
15250
|
+
},
|
|
15251
|
+
onDragEnd: (event) => {
|
|
15252
|
+
emit("dragEnd", event);
|
|
15253
|
+
},
|
|
15382
15254
|
ref: "userSelectorRef"
|
|
15383
15255
|
});
|
|
15384
15256
|
}
|