@blueking/bk-user-selector 0.0.38-beta.1 → 0.0.38

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.
@@ -4546,6 +4546,10 @@ __webpack_require__$7.d(__webpack_exports__$7, {
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: "または",
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;
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 subtitle2(max2) {
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__$7.en;
5062
+ __webpack_exports__$7.jp;
4919
5063
  var __webpack_exports__zhCn = __webpack_exports__$7.zhCn;
4920
5064
  var __webpack_require__$6 = {};
4921
5065
  (() => {
@@ -10473,9 +10617,6 @@ var __webpack_exports__ = {};
10473
10617
  hide2(el);
10474
10618
  }, 100);
10475
10619
  });
10476
- el.addEventListener("click", function() {
10477
- hide2(el);
10478
- });
10479
10620
  popper2.addEventListener("mouseleave", function() {
10480
10621
  clearTimeout(delayTimeout);
10481
10622
  hideTimeout = setTimeout(function() {
@@ -10489,7 +10630,7 @@ var __webpack_exports__ = {};
10489
10630
  show(el);
10490
10631
  clearTimeout(delayTimeout);
10491
10632
  }, opts.delay);
10492
- } else if (popper2.hasAttribute("data-show")) {
10633
+ } else if (!el.contains(event.target) && popper2.hasAttribute("data-show")) {
10493
10634
  hide2(el);
10494
10635
  }
10495
10636
  });
@@ -13928,7 +14069,7 @@ const _export_sfc = (sfc, props2) => {
13928
14069
  }
13929
14070
  return target;
13930
14071
  };
13931
- const MeTag = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-ef4a05c4"]]);
14072
+ const MeTag = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-44fec2ba"]]);
13932
14073
  const UserRender = defineComponent({
13933
14074
  name: "UserRender",
13934
14075
  props: {
@@ -14103,22 +14244,22 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
14103
14244
  };
14104
14245
  return (_ctx, _cache) => {
14105
14246
  return openBlock(), createBlock(unref(__webpack_exports__default$1), {
14106
- arrow: false,
14107
14247
  "ext-cls": "bk-user-selector-popover",
14248
+ arrow: false,
14108
14249
  "is-show": __props.isShow,
14109
14250
  offset: { mainAxis: 4, crossAxis: __props.crossAxisOffset },
14251
+ width: __props.containerWidth,
14110
14252
  placement: "bottom-start",
14111
14253
  theme: "light",
14112
14254
  trigger: "manual",
14113
- width: __props.containerWidth,
14114
14255
  onClickoutside: handleClickOutside
14115
14256
  }, {
14116
14257
  content: withCtx(() => [
14117
14258
  createVNode(unref(__webpack_exports__default$2), {
14118
14259
  class: "dropdown-content",
14119
14260
  loading: __props.loading,
14120
- mode: "spin",
14121
- size: "mini"
14261
+ size: "mini",
14262
+ mode: "spin"
14122
14263
  }, {
14123
14264
  default: withCtx(() => [
14124
14265
  __props.options.length === 0 && __props.userGroup.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_1$2, [
@@ -14134,8 +14275,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
14134
14275
  { key: 1 },
14135
14276
  renderList(groupedUsers.value, (group, groupName) => {
14136
14277
  return openBlock(), createElementBlock("div", {
14137
- key: groupName,
14138
- class: "user-group"
14278
+ class: "user-group",
14279
+ key: groupName
14139
14280
  }, [
14140
14281
  Object.keys(groupedUsers.value).length > 1 || group.some((user) => user.type === "userGroup") ? (openBlock(), createElementBlock("div", {
14141
14282
  key: 0,
@@ -14163,8 +14304,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
14163
14304
  null,
14164
14305
  renderList(group, (user) => {
14165
14306
  return openBlock(), createElementBlock("div", {
14166
- key: user.id,
14167
14307
  class: "user-option",
14308
+ key: user.id,
14168
14309
  onClick: withModifiers(($event) => selectUser(user), ["prevent"])
14169
14310
  }, [
14170
14311
  createVNode(unref(UserRender), {
@@ -14197,20 +14338,20 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
14197
14338
  };
14198
14339
  }
14199
14340
  });
14200
- const SelectionPopover = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-ee78cf72"]]);
14341
+ const SelectionPopover = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-e11d7af7"]]);
14201
14342
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
14202
14343
  ...{
14203
14344
  name: "UserTag"
14204
14345
  },
14205
14346
  __name: "user-tag",
14206
14347
  props: {
14207
- active: { type: Boolean },
14348
+ user: {},
14349
+ tenants: {},
14208
14350
  currentTenantId: {},
14209
14351
  draggable: { type: Boolean },
14210
- renderTag: { type: Function },
14352
+ active: { type: Boolean },
14211
14353
  showTenant: { type: Boolean },
14212
- tenants: {},
14213
- user: {}
14354
+ renderTag: { type: Function }
14214
14355
  },
14215
14356
  emits: ["click", "close"],
14216
14357
  setup(__props, { emit: __emit }) {
@@ -14243,7 +14384,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
14243
14384
  };
14244
14385
  }
14245
14386
  });
14246
- const UserTag = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-48ac8fc1"]]);
14387
+ const UserTag = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-3ff46050"]]);
14247
14388
  const _hoisted_1$1 = ["onClick"];
14248
14389
  const _hoisted_2$1 = ["placeholder"];
14249
14390
  const _hoisted_3 = { class: "hidden-users" };
@@ -14254,24 +14395,24 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
14254
14395
  },
14255
14396
  __name: "multiple-selector",
14256
14397
  props: {
14257
- draggable: { type: Boolean, default: false },
14258
14398
  modelValue: { default: () => [] },
14399
+ draggable: { type: Boolean, default: false },
14259
14400
  selectedUsers: { default: () => [] },
14260
14401
  tenants: { default: () => ({}) },
14261
- allowCreate: { type: Boolean, default: false },
14262
14402
  apiBaseUrl: { default: "" },
14403
+ tenantId: { default: "" },
14404
+ placeholder: { default: "" },
14263
14405
  currentUserId: { default: "" },
14264
- disabled: { type: Boolean },
14265
- emptyText: { default: "" },
14266
- enableMultiTenantMode: { type: Boolean },
14267
14406
  exactSearchKey: { default: "bk_username" },
14268
- excludeUserIds: { default: () => [] },
14269
- placeholder: { default: "" },
14270
- tenantId: { default: "" },
14407
+ userGroup: { default: () => [] },
14271
14408
  userGroupName: { default: "" },
14409
+ emptyText: { default: "" },
14410
+ disabled: { type: Boolean },
14272
14411
  renderListItem: {},
14273
14412
  renderTag: {},
14274
- userGroup: { default: () => [] }
14413
+ excludeUserIds: { default: () => [] },
14414
+ enableMultiTenantMode: { type: Boolean },
14415
+ allowCreate: { type: Boolean, default: false }
14275
14416
  },
14276
14417
  emits: [
14277
14418
  "update:selectedUsers",
@@ -14372,6 +14513,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
14372
14513
  });
14373
14514
  };
14374
14515
  const handleClickOutside = (event) => {
14516
+ event.stopPropagation();
14375
14517
  const target = event.target;
14376
14518
  const container = containerRef.value;
14377
14519
  if ((container == null ? void 0 : container.contains(target)) || container === target) {
@@ -14619,8 +14761,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
14619
14761
  null,
14620
14762
  renderList(_ctx.selectedUsers, (user, index) => {
14621
14763
  return openBlock(), createElementBlock("div", {
14622
- key: user.id,
14623
14764
  class: "tag-wrapper",
14765
+ key: user.id,
14624
14766
  onClick: withModifiers(($event) => handleTagClick(index), ["stop"])
14625
14767
  }, [
14626
14768
  createVNode(UserTag, {
@@ -14641,8 +14783,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
14641
14783
  ref_for: true,
14642
14784
  ref_key: "inlineInputRef",
14643
14785
  ref: inlineInputRef,
14644
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchQuery) ? searchQuery.value = $event : null),
14645
14786
  class: "search-input inline",
14787
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(searchQuery) ? searchQuery.value = $event : null),
14646
14788
  onFocus: handleInputFocus,
14647
14789
  onInput: handleInput,
14648
14790
  onKeydown: handleKeyDown,
@@ -14664,8 +14806,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
14664
14806
  key: 0,
14665
14807
  ref_key: "lastInputRef",
14666
14808
  ref: lastInputRef,
14667
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(searchQuery) ? searchQuery.value = $event : null),
14668
14809
  class: "search-input last",
14810
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(searchQuery) ? searchQuery.value = $event : null),
14669
14811
  placeholder: !_ctx.selectedUsers.length ? _ctx.placeholder : "",
14670
14812
  onFocus: handleInputFocus,
14671
14813
  onInput: handleInput,
@@ -14706,8 +14848,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
14706
14848
  null,
14707
14849
  renderList(visibleUsers.value, (user) => {
14708
14850
  return openBlock(), createBlock(UserTag, {
14709
- key: user.id,
14710
14851
  "current-tenant-id": _ctx.tenantId,
14852
+ key: user.id,
14711
14853
  "render-tag": _ctx.renderTag,
14712
14854
  "show-tenant": true,
14713
14855
  tenants: _ctx.tenants,
@@ -14762,8 +14904,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
14762
14904
  withDirectives(createElementVNode("input", {
14763
14905
  ref_key: "collapsedInputRef",
14764
14906
  ref: collapsedInputRef,
14765
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(searchQuery) ? searchQuery.value = $event : null),
14766
14907
  class: "search-input collapsed",
14908
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(searchQuery) ? searchQuery.value = $event : null),
14767
14909
  placeholder: !_ctx.selectedUsers.length ? _ctx.placeholder : "",
14768
14910
  onFocus: handleFocus
14769
14911
  }, null, 40, _hoisted_4), [
@@ -14794,7 +14936,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
14794
14936
  };
14795
14937
  }
14796
14938
  });
14797
- const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-6c9ac297"]]);
14939
+ const MultipleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-49f3716b"]]);
14798
14940
  const _hoisted_1 = { class: "input-container" };
14799
14941
  const _hoisted_2 = ["placeholder"];
14800
14942
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
@@ -14805,20 +14947,20 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
14805
14947
  props: {
14806
14948
  modelValue: { default: "" },
14807
14949
  tenants: {},
14808
- allowCreate: { type: Boolean },
14809
14950
  apiBaseUrl: { default: "" },
14951
+ tenantId: { default: "" },
14952
+ placeholder: { default: "" },
14810
14953
  currentUserId: { default: "" },
14811
- disabled: { type: Boolean },
14812
- emptyText: { default: "" },
14813
- enableMultiTenantMode: { type: Boolean },
14814
14954
  exactSearchKey: { default: "bk_username" },
14815
- excludeUserIds: { default: () => [] },
14816
- placeholder: { default: "" },
14817
- tenantId: { default: "" },
14955
+ userGroup: { default: () => [] },
14818
14956
  userGroupName: { default: "" },
14957
+ emptyText: { default: "" },
14958
+ disabled: { type: Boolean },
14819
14959
  renderListItem: {},
14820
14960
  renderTag: {},
14821
- userGroup: { default: () => [] }
14961
+ excludeUserIds: { default: () => [] },
14962
+ enableMultiTenantMode: { type: Boolean },
14963
+ allowCreate: { type: Boolean }
14822
14964
  },
14823
14965
  emits: ["update:modelValue", "change", "focus", "blur"],
14824
14966
  setup(__props, { emit: __emit }) {
@@ -15024,8 +15166,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
15024
15166
  withDirectives(createElementVNode("input", {
15025
15167
  ref_key: "inputRef",
15026
15168
  ref: inputRef,
15027
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchQuery.value = $event),
15028
15169
  class: "search-input",
15170
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchQuery.value = $event),
15029
15171
  placeholder: selectedUserInfo.value ? "" : _ctx.placeholder,
15030
15172
  onBlur: _cache[1] || (_cache[1] = ($event) => emit("blur")),
15031
15173
  onFocus: handleInputFocus,
@@ -15054,30 +15196,30 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
15054
15196
  };
15055
15197
  }
15056
15198
  });
15057
- const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-2a791ec6"]]);
15199
+ const SingleSelector = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-726a967e"]]);
15058
15200
  const _sfc_main = /* @__PURE__ */ defineComponent({
15059
15201
  ...{
15060
15202
  name: "BkUserSelector"
15061
15203
  },
15062
15204
  __name: "user-selector",
15063
15205
  props: {
15064
- draggable: { type: Boolean, default: false },
15065
15206
  modelValue: { default: "" },
15207
+ draggable: { type: Boolean, default: false },
15066
15208
  multiple: { type: Boolean, default: false },
15067
- allowCreate: { type: Boolean, default: false },
15068
15209
  apiBaseUrl: { default: "" },
15210
+ tenantId: { default: "" },
15211
+ placeholder: { default: "" },
15069
15212
  currentUserId: { default: "" },
15070
- disabled: { type: Boolean, default: false },
15071
- emptyText: { default: "" },
15072
- enableMultiTenantMode: { type: Boolean, default: true },
15073
15213
  exactSearchKey: { default: "bk_username" },
15074
- excludeUserIds: { default: () => [] },
15075
- placeholder: { default: "" },
15076
- tenantId: { default: "" },
15214
+ userGroup: { default: () => [] },
15077
15215
  userGroupName: { default: "" },
15216
+ emptyText: { default: "" },
15217
+ disabled: { type: Boolean, default: false },
15078
15218
  renderListItem: {},
15079
15219
  renderTag: {},
15080
- userGroup: { default: () => [] }
15220
+ excludeUserIds: { default: () => [] },
15221
+ enableMultiTenantMode: { type: Boolean, default: true },
15222
+ allowCreate: { type: Boolean, default: false }
15081
15223
  },
15082
15224
  emits: ["update:modelValue", "change", "dragStart", "dragEnd", "focus", "blur"],
15083
15225
  setup(__props, { emit: __emit }) {
@@ -15245,7 +15387,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15245
15387
  };
15246
15388
  }
15247
15389
  });
15248
- const BkUserSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f4c00173"]]);
15390
+ const BkUserSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-879a2fa1"]]);
15249
15391
  const vue2 = {
15250
15392
  model: {
15251
15393
  prop: "modelValue",