bkui-vue 2.0.2-beta.4 → 2.0.2-beta.40

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.
Files changed (71) hide show
  1. package/dist/cli.css +1 -0
  2. package/dist/index.cjs.js +132 -132
  3. package/dist/index.esm.js +15822 -14471
  4. package/dist/index.umd.js +132 -132
  5. package/dist/style.variable.css +1 -1
  6. package/lib/cascader/cascader.css +26 -24
  7. package/lib/cascader/cascader.d.ts +12 -0
  8. package/lib/cascader/cascader.less +78 -76
  9. package/lib/cascader/cascader.variable.css +26 -24
  10. package/lib/cascader/index.d.ts +26 -0
  11. package/lib/cascader/index.js +110 -60
  12. package/lib/checkbox/index.js +1 -1
  13. package/lib/color-picker/index.js +20 -16
  14. package/lib/components.d.ts +1 -2
  15. package/lib/components.js +1 -2
  16. package/lib/date-picker/index.js +53 -58
  17. package/lib/date-picker/panel/time.d.ts +1 -1
  18. package/lib/date-picker/utils.d.ts +5 -17
  19. package/lib/directives/index.js +17 -13
  20. package/lib/dropdown/dropdown.d.ts +1 -0
  21. package/lib/dropdown/index.d.ts +3 -0
  22. package/lib/dropdown/index.js +11 -6
  23. package/lib/form/form-item.d.ts +19 -0
  24. package/lib/form/form.css +16 -4
  25. package/lib/form/form.less +24 -6
  26. package/lib/form/form.variable.css +16 -4
  27. package/lib/form/index.d.ts +13 -0
  28. package/lib/form/index.js +33 -25
  29. package/lib/image/index.js +7 -10
  30. package/lib/index.d.ts +0 -1
  31. package/lib/index.js +1 -2
  32. package/lib/input/index.d.ts +39 -20
  33. package/lib/input/index.js +24 -21
  34. package/lib/input/input.d.ts +30 -16
  35. package/lib/message/index.js +1 -1
  36. package/lib/modal/index.js +2 -1
  37. package/lib/pop-confirm/index.d.ts +600 -2
  38. package/lib/pop-confirm/index.js +20 -8
  39. package/lib/pop-confirm/pop-confirm.d.ts +297 -1
  40. package/lib/pop-confirm/props.d.ts +146 -0
  41. package/lib/popover/index.js +7 -10
  42. package/lib/search-select/index.d.ts +21 -3
  43. package/lib/search-select/index.js +62 -30
  44. package/lib/search-select/input.d.ts +3 -0
  45. package/lib/search-select/search-select.d.ts +7 -1
  46. package/lib/search-select/selected.d.ts +6 -0
  47. package/lib/select/index.d.ts +19 -0
  48. package/lib/select/index.js +15 -16
  49. package/lib/select/select.d.ts +10 -0
  50. package/lib/sideslider/index.js +3 -1
  51. package/lib/slider/index.js +2 -1
  52. package/lib/tab/index.js +7 -10
  53. package/lib/table/index.js +7 -15
  54. package/lib/tag-input/index.d.ts +3 -0
  55. package/lib/tag-input/index.js +35 -24
  56. package/lib/tag-input/tag-input.d.ts +1 -0
  57. package/lib/tree/constant.d.ts +2 -0
  58. package/lib/tree/index.d.ts +48 -0
  59. package/lib/tree/index.js +209 -59
  60. package/lib/tree/props.d.ts +20 -0
  61. package/lib/tree/tree.css +46 -0
  62. package/lib/tree/tree.d.ts +22 -0
  63. package/lib/tree/tree.less +57 -2
  64. package/lib/tree/tree.variable.css +46 -0
  65. package/lib/tree/use-node-action.d.ts +2 -2
  66. package/package.json +1 -1
  67. package/dist/style.css +0 -1
  68. package/lib/plugin-popover/index.d.ts +0 -27
  69. package/lib/plugin-popover/index.js +0 -65
  70. package/lib/plugins/index.d.ts +0 -1
  71. package/lib/plugins/index.js +0 -64
@@ -90,6 +90,7 @@ declare const BkSearchSelect: {
90
90
  menuList: import("vue").Ref<import("./utils").ISearchItem[]>;
91
91
  menuHoverId: import("vue").Ref<string>;
92
92
  isFocus: import("vue").Ref<boolean>;
93
+ isComposition: import("vue").Ref<boolean>;
93
94
  usingItem: import("vue").Ref<import("./utils").SelectedItem>;
94
95
  showPopover: import("vue").Ref<boolean>;
95
96
  showNoSelectValueError: import("vue").Ref<boolean>;
@@ -125,6 +126,8 @@ declare const BkSearchSelect: {
125
126
  logical: string;
126
127
  }>;
127
128
  inputKey: import("vue").Ref<string>;
129
+ handleCompositionEnd: (event: CompositionEvent) => void;
130
+ handleCompositionStart: () => void;
128
131
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focus" | "delete" | "add" | "selectKey")[], import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
129
132
  data: {
130
133
  type: import("vue").PropType<import("./utils").ISearchItem[]>;
@@ -223,6 +226,7 @@ declare const BkSearchSelect: {
223
226
  menuList: import("vue").Ref<import("./utils").ISearchItem[]>;
224
227
  menuHoverId: import("vue").Ref<string>;
225
228
  isFocus: import("vue").Ref<boolean>;
229
+ isComposition: import("vue").Ref<boolean>;
226
230
  usingItem: import("vue").Ref<import("./utils").SelectedItem>;
227
231
  showPopover: import("vue").Ref<boolean>;
228
232
  showNoSelectValueError: import("vue").Ref<boolean>;
@@ -258,6 +262,8 @@ declare const BkSearchSelect: {
258
262
  logical: string;
259
263
  }>;
260
264
  inputKey: import("vue").Ref<string>;
265
+ handleCompositionEnd: (event: CompositionEvent) => void;
266
+ handleCompositionStart: () => void;
261
267
  }, {}, {}, {}, {
262
268
  maxHeight: number;
263
269
  mode: import("./utils").SearchInputMode;
@@ -374,7 +380,7 @@ declare const BkSearchSelect: {
374
380
  handleWrapClick: () => void;
375
381
  handleInputFocus: (v: boolean) => void;
376
382
  handleResize: () => void;
377
- handleClearAll: () => void;
383
+ handleClearAll: (e: MouseEvent) => void;
378
384
  handleInputOutside: (target: Node) => boolean;
379
385
  handleAddSelected: (item: import("./utils").SelectedItem) => void;
380
386
  handleDeleteSelected: (index?: number) => void;
@@ -546,6 +552,7 @@ declare const BkSearchSelect: {
546
552
  menuList: import("vue").Ref<import("./utils").ISearchItem[]>;
547
553
  menuHoverId: import("vue").Ref<string>;
548
554
  isFocus: import("vue").Ref<boolean>;
555
+ isComposition: import("vue").Ref<boolean>;
549
556
  usingItem: import("vue").Ref<import("./utils").SelectedItem>;
550
557
  showPopover: import("vue").Ref<boolean>;
551
558
  showNoSelectValueError: import("vue").Ref<boolean>;
@@ -581,6 +588,8 @@ declare const BkSearchSelect: {
581
588
  logical: string;
582
589
  }>;
583
590
  inputKey: import("vue").Ref<string>;
591
+ handleCompositionEnd: (event: CompositionEvent) => void;
592
+ handleCompositionStart: () => void;
584
593
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focus" | "delete" | "add" | "selectKey")[], import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
585
594
  data: {
586
595
  type: import("vue").PropType<import("./utils").ISearchItem[]>;
@@ -679,6 +688,7 @@ declare const BkSearchSelect: {
679
688
  menuList: import("vue").Ref<import("./utils").ISearchItem[]>;
680
689
  menuHoverId: import("vue").Ref<string>;
681
690
  isFocus: import("vue").Ref<boolean>;
691
+ isComposition: import("vue").Ref<boolean>;
682
692
  usingItem: import("vue").Ref<import("./utils").SelectedItem>;
683
693
  showPopover: import("vue").Ref<boolean>;
684
694
  showNoSelectValueError: import("vue").Ref<boolean>;
@@ -714,6 +724,8 @@ declare const BkSearchSelect: {
714
724
  logical: string;
715
725
  }>;
716
726
  inputKey: import("vue").Ref<string>;
727
+ handleCompositionEnd: (event: CompositionEvent) => void;
728
+ handleCompositionStart: () => void;
717
729
  }, {}, {}, {}, {
718
730
  maxHeight: number;
719
731
  mode: import("./utils").SearchInputMode;
@@ -830,7 +842,7 @@ declare const BkSearchSelect: {
830
842
  handleWrapClick: () => void;
831
843
  handleInputFocus: (v: boolean) => void;
832
844
  handleResize: () => void;
833
- handleClearAll: () => void;
845
+ handleClearAll: (e: MouseEvent) => void;
834
846
  handleInputOutside: (target: Node) => boolean;
835
847
  handleAddSelected: (item: import("./utils").SelectedItem) => void;
836
848
  handleDeleteSelected: (index?: number) => void;
@@ -951,6 +963,7 @@ declare const BkSearchSelect: {
951
963
  menuList: import("vue").Ref<import("./utils").ISearchItem[]>;
952
964
  menuHoverId: import("vue").Ref<string>;
953
965
  isFocus: import("vue").Ref<boolean>;
966
+ isComposition: import("vue").Ref<boolean>;
954
967
  usingItem: import("vue").Ref<import("./utils").SelectedItem>;
955
968
  showPopover: import("vue").Ref<boolean>;
956
969
  showNoSelectValueError: import("vue").Ref<boolean>;
@@ -986,6 +999,8 @@ declare const BkSearchSelect: {
986
999
  logical: string;
987
1000
  }>;
988
1001
  inputKey: import("vue").Ref<string>;
1002
+ handleCompositionEnd: (event: CompositionEvent) => void;
1003
+ handleCompositionStart: () => void;
989
1004
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focus" | "delete" | "add" | "selectKey")[], import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
990
1005
  data: {
991
1006
  type: import("vue").PropType<import("./utils").ISearchItem[]>;
@@ -1084,6 +1099,7 @@ declare const BkSearchSelect: {
1084
1099
  menuList: import("vue").Ref<import("./utils").ISearchItem[]>;
1085
1100
  menuHoverId: import("vue").Ref<string>;
1086
1101
  isFocus: import("vue").Ref<boolean>;
1102
+ isComposition: import("vue").Ref<boolean>;
1087
1103
  usingItem: import("vue").Ref<import("./utils").SelectedItem>;
1088
1104
  showPopover: import("vue").Ref<boolean>;
1089
1105
  showNoSelectValueError: import("vue").Ref<boolean>;
@@ -1119,6 +1135,8 @@ declare const BkSearchSelect: {
1119
1135
  logical: string;
1120
1136
  }>;
1121
1137
  inputKey: import("vue").Ref<string>;
1138
+ handleCompositionEnd: (event: CompositionEvent) => void;
1139
+ handleCompositionStart: () => void;
1122
1140
  }, {}, {}, {}, {
1123
1141
  maxHeight: number;
1124
1142
  mode: import("./utils").SearchInputMode;
@@ -1235,7 +1253,7 @@ declare const BkSearchSelect: {
1235
1253
  handleWrapClick: () => void;
1236
1254
  handleInputFocus: (v: boolean) => void;
1237
1255
  handleResize: () => void;
1238
- handleClearAll: () => void;
1256
+ handleClearAll: (e: MouseEvent) => void;
1239
1257
  handleInputOutside: (target: Node) => boolean;
1240
1258
  handleAddSelected: (item: import("./utils").SelectedItem) => void;
1241
1259
  handleDeleteSelected: (index?: number) => void;
@@ -3,12 +3,11 @@ import "./search-select.less";
3
3
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__ from "../shared";
4
4
  import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
5
5
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__ from "../config-provider";
6
- import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_plugin_popover_300e25d0__ from "../plugin-popover";
6
+ import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__ from "../popover";
7
7
  import * as __WEBPACK_EXTERNAL_MODULE__popperjs_core_a5c7319c__ from "@popperjs/core";
8
8
  import * as __WEBPACK_EXTERNAL_MODULE__loading_4d683b23__ from "../loading";
9
9
  import * as __WEBPACK_EXTERNAL_MODULE__overflow_title_f9bafa47__ from "../overflow-title";
10
10
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__ from "../icon";
11
- import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__ from "../popover";
12
11
  import "../popover/popover.less";
13
12
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_checkbox_13b1cb4a__ from "../checkbox";
14
13
  import "../checkbox/checkbox.less";
@@ -1219,10 +1218,10 @@ ClickOutside.install = function (app) {
1219
1218
  app.directive('bkTooltips', ClickOutside);
1220
1219
  };
1221
1220
  /* harmony default export */ const clickoutside = (ClickOutside);
1222
- ;// CONCATENATED MODULE: external "../plugin-popover"
1223
- var plugin_popover_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
1224
- var plugin_popover_y = x => () => x
1225
- const plugin_popover_namespaceObject = plugin_popover_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_plugin_popover_300e25d0__["default"] });
1221
+ ;// CONCATENATED MODULE: external "../popover"
1222
+ var popover_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
1223
+ var popover_y = x => () => x
1224
+ const popover_namespaceObject = popover_x({ ["$bkPopover"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__.$bkPopover, ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__["default"] });
1226
1225
  ;// CONCATENATED MODULE: ../../packages/directives/src/ellipsis.ts
1227
1226
 
1228
1227
  /*
@@ -1300,7 +1299,7 @@ var createInstance = function createInstance(el, binding) {
1300
1299
  onContentMouseenter: handleContentEnter,
1301
1300
  onContentMouseleave: handleContentLeave
1302
1301
  });
1303
- instance = (0,plugin_popover_namespaceObject["default"])(targetOptions);
1302
+ instance = (0,popover_namespaceObject.$bkPopover)(targetOptions);
1304
1303
  }, 300);
1305
1304
  };
1306
1305
  var handleMouseLeave = function handleMouseLeave() {
@@ -1484,9 +1483,6 @@ var tooltips = {
1484
1483
  hide(el);
1485
1484
  }, 100);
1486
1485
  });
1487
- el.addEventListener('click', function () {
1488
- hide(el);
1489
- });
1490
1486
  popper.addEventListener('mouseleave', function () {
1491
1487
  clearTimeout(delayTimeout);
1492
1488
  hideTimeout = setTimeout(function () {
@@ -1500,7 +1496,7 @@ var tooltips = {
1500
1496
  show(el);
1501
1497
  clearTimeout(delayTimeout);
1502
1498
  }, opts.delay);
1503
- } else if (popper.hasAttribute('data-show')) {
1499
+ } else if (!el.contains(event.target) && popper.hasAttribute('data-show')) {
1504
1500
  hide(el);
1505
1501
  }
1506
1502
  });
@@ -2150,10 +2146,6 @@ function _asyncToGenerator(fn) {
2150
2146
  // EXTERNAL MODULE: ../../node_modules/@babel/runtime/regenerator/index.js
2151
2147
  var regenerator = __webpack_require__(2841);
2152
2148
  var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
2153
- ;// CONCATENATED MODULE: external "../popover"
2154
- var popover_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
2155
- var popover_y = x => () => x
2156
- const popover_namespaceObject = popover_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__["default"] });
2157
2149
  ;// CONCATENATED MODULE: external "../popover/popover.less"
2158
2150
  var popover_less_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
2159
2151
  var popover_less_y = x => () => x
@@ -2588,11 +2580,11 @@ var SelectedItem = /*#__PURE__*/function () {
2588
2580
  var _keyword;
2589
2581
  if (!str) return str;
2590
2582
  var keyword = props.keyword;
2591
- var len = keyword.length;
2592
- if (!((_keyword = keyword) !== null && _keyword !== void 0 && _keyword.trim().length) || !str.toLocaleLowerCase().includes(keyword.toLocaleLowerCase())) return str;
2583
+ if (!((_keyword = keyword) !== null && _keyword !== void 0 && _keyword.trim().length) || !str.toLocaleLowerCase().includes(keyword.toLocaleLowerCase().trim())) return str;
2584
+ var len = keyword.trim().length;
2593
2585
  var list = [];
2594
2586
  var lastIndex = -1;
2595
- keyword = keyword.replace(/([.*/]{1})/gim, '\\$1');
2587
+ keyword = keyword.replace(/([.*/]{1})/gim, '\\$1').trim();
2596
2588
  str.replace(new RegExp("".concat(keyword), 'igm'), function (key, index) {
2597
2589
  if (list.length === 0 && index !== 0) {
2598
2590
  list.push(str.slice(0, index));
@@ -2815,6 +2807,7 @@ function input_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { va
2815
2807
  return ((_usingItem$value = usingItem.value) === null || _usingItem$value === void 0 ? void 0 : _usingItem$value.logical) || SearchLogical.OR;
2816
2808
  });
2817
2809
  var inputKey = (0,external_vue_namespaceObject.ref)((0,shared_namespaceObject.random)(10));
2810
+ var isComposition = (0,external_vue_namespaceObject.ref)(false);
2818
2811
  (0,external_vue_namespaceObject.watch)(editKey, function () {
2819
2812
  if (props.mode === SearchInputMode.DEFAULT && editKey.value) {
2820
2813
  showPopover.value = false;
@@ -2964,7 +2957,9 @@ function input_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { va
2964
2957
  debounceSetMenuList();
2965
2958
  }
2966
2959
  function handleInputChange(event) {
2967
- var text = event.target.innerText.trim();
2960
+ if (isComposition.value) return;
2961
+ clearInputBr();
2962
+ var text = event.target.innerText;
2968
2963
  if (!usingItem.value) {
2969
2964
  keyword.value = text;
2970
2965
  debounceSetMenuList();
@@ -2983,7 +2978,7 @@ function input_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { va
2983
2978
  return;
2984
2979
  }
2985
2980
  }
2986
- keyword.value = usingItem.value.isSpecialType() ? text : text.replace(usingItem.value.name, '').replace(':', '').trim();
2981
+ keyword.value = usingItem.value.isSpecialType() ? text : text.replace(usingItem.value.name, '').replace(':', '');
2987
2982
  debounceSetMenuList();
2988
2983
  }
2989
2984
  function handleInputKeyup(event) {
@@ -2996,9 +2991,11 @@ function input_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { va
2996
2991
  // }
2997
2992
  // return;
2998
2993
  // }
2994
+ if (isComposition.value) return;
2999
2995
  switch (event.code) {
3000
2996
  case 'Enter':
3001
2997
  case 'NumpadEnter':
2998
+ event.preventDefault();
3002
2999
  if (props.valueBehavior === ValueBehavior.NEED_KEY && menuList.value.some(function (item) {
3003
3000
  return item.id === menuHoverId.value;
3004
3001
  })) {
@@ -3013,7 +3010,9 @@ function input_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { va
3013
3010
  });
3014
3011
  break;
3015
3012
  case 'Backspace':
3013
+ case 'Delete':
3016
3014
  handleKeyBackspace(event);
3015
+ break;
3017
3016
  default:
3018
3017
  showNoSelectValueError.value = false;
3019
3018
  break;
@@ -3119,7 +3118,7 @@ function input_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { va
3119
3118
  setInputFocus(false, false);
3120
3119
  return;
3121
3120
  }
3122
- } else if (!keyword.value) {
3121
+ } else if (!keyword.value || keyword.value.length === 1) {
3123
3122
  usingItem.value = null;
3124
3123
  keyword.value = '';
3125
3124
  setMenuList();
@@ -3338,7 +3337,7 @@ function input_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { va
3338
3337
  }
3339
3338
  loading.value = true;
3340
3339
  _context5.next = 5;
3341
- return props.getMenuList((_usingItem$value14 = usingItem.value) === null || _usingItem$value14 === void 0 ? void 0 : _usingItem$value14.searchItem, keyword.value)["catch"](function () {
3340
+ return props.getMenuList((_usingItem$value14 = usingItem.value) === null || _usingItem$value14 === void 0 ? void 0 : _usingItem$value14.searchItem, keyword.value.trim())["catch"](function () {
3342
3341
  return [];
3343
3342
  });
3344
3343
  case 5:
@@ -3395,7 +3394,7 @@ function input_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { va
3395
3394
  try {
3396
3395
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
3397
3396
  _child = _step3.value;
3398
- if (_child.name.toLocaleLowerCase().includes(keyword.value.toLocaleLowerCase())) {
3397
+ if (_child.name.toLocaleLowerCase().includes(keyword.value.toLocaleLowerCase().trim())) {
3399
3398
  _filterList.push(input_objectSpread(input_objectSpread({}, item), {}, {
3400
3399
  realId: item.id,
3401
3400
  id: (0,shared_namespaceObject.random)(10),
@@ -3429,11 +3428,12 @@ function input_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { va
3429
3428
  list = props.conditions;
3430
3429
  } else if (!((_usingItem$value$valu = usingItem.value.values) !== null && _usingItem$value$valu !== void 0 && _usingItem$value$valu.length) || usingItem.value.multiple || props.mode === SearchInputMode.EDIT) {
3431
3430
  list = usingItem.value.children.filter(function (item) {
3432
- return item.name.toLocaleLowerCase().includes(keyword.value.toLocaleLowerCase());
3431
+ return item.name.toLocaleLowerCase().includes(keyword.value.toLocaleLowerCase().trim());
3433
3432
  });
3434
3433
  }
3435
3434
  case 10:
3436
3435
  menuList.value = list;
3436
+ console.log('list', list);
3437
3437
  if (props.valueBehavior === ValueBehavior.NEED_KEY) {
3438
3438
  hoverItem = list.find(function (item) {
3439
3439
  return !item.disabled;
@@ -3444,7 +3444,7 @@ function input_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { va
3444
3444
  menuHoverId.value = hoverItem.id;
3445
3445
  }
3446
3446
  }
3447
- case 12:
3447
+ case 13:
3448
3448
  case "end":
3449
3449
  return _context5.stop();
3450
3450
  }
@@ -3568,11 +3568,29 @@ function input_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { va
3568
3568
  (0,external_vue_namespaceObject.nextTick)(clearInput);
3569
3569
  }
3570
3570
  }
3571
+ function clearInputBr() {
3572
+ if (!inputRef.value) return;
3573
+ var brs = inputRef.value.querySelectorAll('br');
3574
+ brs === null || brs === void 0 || brs.forEach(function (br) {
3575
+ return br.remove();
3576
+ });
3577
+ }
3571
3578
  function clearInput() {
3572
3579
  if (!inputRef.value) return;
3580
+ // magic code 判断是否是 windows 系统
3581
+ // const isWindows = navigator.userAgent.includes('Windows');
3582
+ // if (isWindows) {
3583
+ // setTimeout(() => {
3584
+ // keyword.value = '';
3585
+ // inputRef.value.innerText = '';
3586
+ // clearInputBr();
3587
+ // }, 32);
3588
+ // return;
3589
+ // }
3573
3590
  keyword.value = '';
3574
3591
  (0,external_vue_namespaceObject.nextTick)(function () {
3575
- return inputRef.value.innerText = '';
3592
+ inputRef.value.innerText = '';
3593
+ clearInputBr();
3576
3594
  });
3577
3595
  }
3578
3596
  function str2SelectedItem(str) {
@@ -3653,6 +3671,14 @@ function input_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { va
3653
3671
  menuHoverId.value = '';
3654
3672
  }
3655
3673
  }
3674
+ function handleCompositionEnd(event) {
3675
+ isComposition.value = false;
3676
+ keyword.value = event.data;
3677
+ handleInputChange(event);
3678
+ }
3679
+ function handleCompositionStart() {
3680
+ isComposition.value = true;
3681
+ }
3656
3682
  // expose
3657
3683
  expose({
3658
3684
  inputFocusForWrapper: inputFocusForWrapper,
@@ -3671,6 +3697,7 @@ function input_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { va
3671
3697
  menuList: menuList,
3672
3698
  menuHoverId: menuHoverId,
3673
3699
  isFocus: isFocus,
3700
+ isComposition: isComposition,
3674
3701
  usingItem: usingItem,
3675
3702
  showPopover: showPopover,
3676
3703
  showNoSelectValueError: showNoSelectValueError,
@@ -3693,7 +3720,9 @@ function input_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { va
3693
3720
  customPanelSubmit: customPanelSubmit,
3694
3721
  refleshMenuHover: refleshMenuHover,
3695
3722
  t: t,
3696
- inputKey: inputKey
3723
+ inputKey: inputKey,
3724
+ handleCompositionEnd: handleCompositionEnd,
3725
+ handleCompositionStart: handleCompositionStart
3697
3726
  };
3698
3727
  },
3699
3728
  render: function render() {
@@ -3720,9 +3749,11 @@ function input_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { va
3720
3749
  'input-after': showInputAfter
3721
3750
  },
3722
3751
  "contenteditable": true,
3723
- "data-placeholder": !inputInnerHtml && !_this.keyword ? _this.placeholder : '',
3724
- "data-tips": placeholder || '',
3752
+ "data-placeholder": !_this.isComposition && !inputInnerHtml && !_this.keyword ? _this.placeholder : '',
3753
+ "data-tips": !_this.isComposition ? placeholder || '' : '',
3725
3754
  "spellcheck": "false",
3755
+ "onCompositionend": _this.handleCompositionEnd,
3756
+ "onCompositionstart": _this.handleCompositionStart,
3726
3757
  "onFocus": _this.handleInputFocus,
3727
3758
  "onInput": _this.handleInputChange,
3728
3759
  "onKeydown": _this.handleInputKeyup,
@@ -4290,7 +4321,8 @@ var SearchSelectProps = {
4290
4321
  inputRef.value.inputFocusForWrapper();
4291
4322
  }
4292
4323
  }
4293
- function handleClearAll() {
4324
+ function handleClearAll(e) {
4325
+ e.stopPropagation();
4294
4326
  selectedList.value = [];
4295
4327
  overflowIndex.value = -1;
4296
4328
  inputRef.value.inputClearForWrapper();
@@ -49,6 +49,7 @@ declare const _default: import("vue").DefineComponent<{
49
49
  menuList: Ref<ISearchItem[]>;
50
50
  menuHoverId: Ref<string>;
51
51
  isFocus: Ref<boolean>;
52
+ isComposition: Ref<boolean>;
52
53
  usingItem: Ref<SelectedItem>;
53
54
  showPopover: Ref<boolean>;
54
55
  showNoSelectValueError: Ref<boolean>;
@@ -84,6 +85,8 @@ declare const _default: import("vue").DefineComponent<{
84
85
  logical: string;
85
86
  }>;
86
87
  inputKey: Ref<string>;
88
+ handleCompositionEnd: (event: CompositionEvent) => void;
89
+ handleCompositionStart: () => void;
87
90
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focus" | "delete" | "add" | "selectKey")[], "focus" | "delete" | "add" | "selectKey", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
88
91
  data: {
89
92
  type: PropType<ISearchItem[]>;
@@ -122,6 +122,7 @@ declare const _default: import("vue").DefineComponent<{
122
122
  menuList: import("vue").Ref<ISearchItem[]>;
123
123
  menuHoverId: import("vue").Ref<string>;
124
124
  isFocus: import("vue").Ref<boolean>;
125
+ isComposition: import("vue").Ref<boolean>;
125
126
  usingItem: import("vue").Ref<SelectedItem>;
126
127
  showPopover: import("vue").Ref<boolean>;
127
128
  showNoSelectValueError: import("vue").Ref<boolean>;
@@ -157,6 +158,8 @@ declare const _default: import("vue").DefineComponent<{
157
158
  logical: string;
158
159
  }>;
159
160
  inputKey: import("vue").Ref<string>;
161
+ handleCompositionEnd: (event: CompositionEvent) => void;
162
+ handleCompositionStart: () => void;
160
163
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focus" | "delete" | "add" | "selectKey")[], import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
161
164
  data: {
162
165
  type: PropType<ISearchItem[]>;
@@ -255,6 +258,7 @@ declare const _default: import("vue").DefineComponent<{
255
258
  menuList: import("vue").Ref<ISearchItem[]>;
256
259
  menuHoverId: import("vue").Ref<string>;
257
260
  isFocus: import("vue").Ref<boolean>;
261
+ isComposition: import("vue").Ref<boolean>;
258
262
  usingItem: import("vue").Ref<SelectedItem>;
259
263
  showPopover: import("vue").Ref<boolean>;
260
264
  showNoSelectValueError: import("vue").Ref<boolean>;
@@ -290,6 +294,8 @@ declare const _default: import("vue").DefineComponent<{
290
294
  logical: string;
291
295
  }>;
292
296
  inputKey: import("vue").Ref<string>;
297
+ handleCompositionEnd: (event: CompositionEvent) => void;
298
+ handleCompositionStart: () => void;
293
299
  }, {}, {}, {}, {
294
300
  maxHeight: number;
295
301
  mode: import("./utils").SearchInputMode;
@@ -406,7 +412,7 @@ declare const _default: import("vue").DefineComponent<{
406
412
  handleWrapClick: () => void;
407
413
  handleInputFocus: (v: boolean) => void;
408
414
  handleResize: () => void;
409
- handleClearAll: () => void;
415
+ handleClearAll: (e: MouseEvent) => void;
410
416
  handleInputOutside: (target: Node) => boolean;
411
417
  handleAddSelected: (item: SelectedItem) => void;
412
418
  handleDeleteSelected: (index?: number) => void;
@@ -78,6 +78,7 @@ declare const _default: import("vue").DefineComponent<{
78
78
  menuList: import("vue").Ref<ISearchItem[]>;
79
79
  menuHoverId: import("vue").Ref<string>;
80
80
  isFocus: import("vue").Ref<boolean>;
81
+ isComposition: import("vue").Ref<boolean>;
81
82
  usingItem: import("vue").Ref<SelectedItem>;
82
83
  showPopover: import("vue").Ref<boolean>;
83
84
  showNoSelectValueError: import("vue").Ref<boolean>;
@@ -113,6 +114,8 @@ declare const _default: import("vue").DefineComponent<{
113
114
  logical: string;
114
115
  }>;
115
116
  inputKey: import("vue").Ref<string>;
117
+ handleCompositionEnd: (event: CompositionEvent) => void;
118
+ handleCompositionStart: () => void;
116
119
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focus" | "delete" | "add" | "selectKey")[], import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
117
120
  data: {
118
121
  type: PropType<ISearchItem[]>;
@@ -211,6 +214,7 @@ declare const _default: import("vue").DefineComponent<{
211
214
  menuList: import("vue").Ref<ISearchItem[]>;
212
215
  menuHoverId: import("vue").Ref<string>;
213
216
  isFocus: import("vue").Ref<boolean>;
217
+ isComposition: import("vue").Ref<boolean>;
214
218
  usingItem: import("vue").Ref<SelectedItem>;
215
219
  showPopover: import("vue").Ref<boolean>;
216
220
  showNoSelectValueError: import("vue").Ref<boolean>;
@@ -246,6 +250,8 @@ declare const _default: import("vue").DefineComponent<{
246
250
  logical: string;
247
251
  }>;
248
252
  inputKey: import("vue").Ref<string>;
253
+ handleCompositionEnd: (event: CompositionEvent) => void;
254
+ handleCompositionStart: () => void;
249
255
  }, {}, {}, {}, {
250
256
  maxHeight: number;
251
257
  mode: SearchInputMode;
@@ -348,6 +348,10 @@ declare const BkSelect: {
348
348
  } & {
349
349
  default: boolean;
350
350
  };
351
+ inputTooltipsOptions: {
352
+ type: import("vue").PropType<Partial<import("../../bkui-vue").IOptions>>;
353
+ default: () => {};
354
+ };
351
355
  }>> & {
352
356
  onFocus?: (...args: any[]) => any;
353
357
  onBlur?: (...args: any[]) => any;
@@ -1112,6 +1116,10 @@ declare const BkSelect: {
1112
1116
  } & {
1113
1117
  default: boolean;
1114
1118
  };
1119
+ inputTooltipsOptions: {
1120
+ type: import("vue").PropType<Partial<import("../../bkui-vue").IOptions>>;
1121
+ default: () => {};
1122
+ };
1115
1123
  }>> & {
1116
1124
  onFocus?: (...args: any[]) => any;
1117
1125
  onBlur?: (...args: any[]) => any;
@@ -1170,6 +1178,7 @@ declare const BkSelect: {
1170
1178
  keepSearchValue: boolean;
1171
1179
  searchWithPinyin: boolean;
1172
1180
  disableScrollToSelectedOption: boolean;
1181
+ inputTooltipsOptions: {};
1173
1182
  }, true, {}, {}, {
1174
1183
  P: {};
1175
1184
  B: {};
@@ -1523,6 +1532,10 @@ declare const BkSelect: {
1523
1532
  } & {
1524
1533
  default: boolean;
1525
1534
  };
1535
+ inputTooltipsOptions: {
1536
+ type: import("vue").PropType<Partial<import("../../bkui-vue").IOptions>>;
1537
+ default: () => {};
1538
+ };
1526
1539
  }>> & {
1527
1540
  onFocus?: (...args: any[]) => any;
1528
1541
  onBlur?: (...args: any[]) => any;
@@ -1987,6 +2000,7 @@ declare const BkSelect: {
1987
2000
  keepSearchValue: boolean;
1988
2001
  searchWithPinyin: boolean;
1989
2002
  disableScrollToSelectedOption: boolean;
2003
+ inputTooltipsOptions: {};
1990
2004
  }>;
1991
2005
  __isFragment?: never;
1992
2006
  __isTeleport?: never;
@@ -2337,6 +2351,10 @@ declare const BkSelect: {
2337
2351
  } & {
2338
2352
  default: boolean;
2339
2353
  };
2354
+ inputTooltipsOptions: {
2355
+ type: import("vue").PropType<Partial<import("../../bkui-vue").IOptions>>;
2356
+ default: () => {};
2357
+ };
2340
2358
  }>> & {
2341
2359
  onFocus?: (...args: any[]) => any;
2342
2360
  onBlur?: (...args: any[]) => any;
@@ -2801,6 +2819,7 @@ declare const BkSelect: {
2801
2819
  keepSearchValue: boolean;
2802
2820
  searchWithPinyin: boolean;
2803
2821
  disableScrollToSelectedOption: boolean;
2822
+ inputTooltipsOptions: {};
2804
2823
  }, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin<any[]> & Readonly<{
2805
2824
  Option: import("vue").DefineComponent<{
2806
2825
  id: {
@@ -7,7 +7,7 @@ import "../checkbox/checkbox.less";
7
7
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__ from "../config-provider";
8
8
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__ from "../icon";
9
9
  import * as __WEBPACK_EXTERNAL_MODULE_lodash_isEqual_ce045a54__ from "lodash/isEqual";
10
- import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_plugin_popover_300e25d0__ from "../plugin-popover";
10
+ import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__ from "../popover";
11
11
  import * as __WEBPACK_EXTERNAL_MODULE__popperjs_core_a5c7319c__ from "@popperjs/core";
12
12
  import * as __WEBPACK_EXTERNAL_MODULE__loading_4d683b23__ from "../loading";
13
13
  import * as __WEBPACK_EXTERNAL_MODULE__overflow_title_f9bafa47__ from "../overflow-title";
@@ -15,7 +15,6 @@ import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_input_d525237e__ from "../inp
15
15
  import "../input/input.less";
16
16
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_loading_dcf0e69a__ from "../loading";
17
17
  import "../loading/loading.less";
18
- import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__ from "../popover";
19
18
  import "../popover/popover.less";
20
19
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_virtual_render_927587a8__ from "../virtual-render";
21
20
  import "../virtual-render/virtual-render.less";
@@ -1797,10 +1796,10 @@ ClickOutside.install = function (app) {
1797
1796
  app.directive('bkTooltips', ClickOutside);
1798
1797
  };
1799
1798
  /* harmony default export */ const clickoutside = (ClickOutside);
1800
- ;// CONCATENATED MODULE: external "../plugin-popover"
1801
- var plugin_popover_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
1802
- var plugin_popover_y = x => () => x
1803
- const plugin_popover_namespaceObject = plugin_popover_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_plugin_popover_300e25d0__["default"] });
1799
+ ;// CONCATENATED MODULE: external "../popover"
1800
+ var popover_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
1801
+ var popover_y = x => () => x
1802
+ const popover_namespaceObject = popover_x({ ["$bkPopover"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__.$bkPopover, ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__["default"] });
1804
1803
  ;// CONCATENATED MODULE: ../../packages/directives/src/ellipsis.ts
1805
1804
 
1806
1805
  /*
@@ -1878,7 +1877,7 @@ var createInstance = function createInstance(el, binding) {
1878
1877
  onContentMouseenter: handleContentEnter,
1879
1878
  onContentMouseleave: handleContentLeave
1880
1879
  });
1881
- instance = (0,plugin_popover_namespaceObject["default"])(targetOptions);
1880
+ instance = (0,popover_namespaceObject.$bkPopover)(targetOptions);
1882
1881
  }, 300);
1883
1882
  };
1884
1883
  var handleMouseLeave = function handleMouseLeave() {
@@ -2025,9 +2024,6 @@ var tooltips = {
2025
2024
  hide(el);
2026
2025
  }, 100);
2027
2026
  });
2028
- el.addEventListener('click', function () {
2029
- hide(el);
2030
- });
2031
2027
  popper.addEventListener('mouseleave', function () {
2032
2028
  clearTimeout(delayTimeout);
2033
2029
  hideTimeout = setTimeout(function () {
@@ -2041,7 +2037,7 @@ var tooltips = {
2041
2037
  show(el);
2042
2038
  clearTimeout(delayTimeout);
2043
2039
  }, opts.delay);
2044
- } else if (popper.hasAttribute('data-show')) {
2040
+ } else if (!el.contains(event.target) && popper.hasAttribute('data-show')) {
2045
2041
  hide(el);
2046
2042
  }
2047
2043
  });
@@ -2309,10 +2305,6 @@ const loading_namespaceObject = loading_x({ ["default"]: () => __WEBPACK_EXTERNA
2309
2305
  var loading_less_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
2310
2306
  var loading_less_y = x => () => x
2311
2307
  const loading_less_namespaceObject = loading_less_x({ });
2312
- ;// CONCATENATED MODULE: external "../popover"
2313
- var popover_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
2314
- var popover_y = x => () => x
2315
- const popover_namespaceObject = popover_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__["default"] });
2316
2308
  ;// CONCATENATED MODULE: external "../popover/popover.less"
2317
2309
  var popover_less_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
2318
2310
  var popover_less_y = x => () => x
@@ -3909,7 +3901,13 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
3909
3901
  type: String,
3910
3902
  "default": 'default'
3911
3903
  },
3912
- disableScrollToSelectedOption: shared_namespaceObject.PropTypes.bool.def(false) // 是否禁用滚动到选中option的功能
3904
+ disableScrollToSelectedOption: shared_namespaceObject.PropTypes.bool.def(false),
3905
+ inputTooltipsOptions: {
3906
+ type: Object,
3907
+ "default": function _default() {
3908
+ return {};
3909
+ }
3910
+ } // 透传Input组件的tooltips配置
3913
3911
  },
3914
3912
  emits: ['update:modelValue', 'change', 'toggle', 'clear', 'scroll-end', 'focus', 'blur', 'tag-remove', 'select', 'deselect', 'search-change'],
3915
3913
  setup: function setup(props, _ref) {
@@ -4840,6 +4838,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
4840
4838
  "selectReadonly": true,
4841
4839
  "size": _this.size,
4842
4840
  "stopPropagation": false,
4841
+ "tooltipsOptions": _this.inputTooltipsOptions,
4843
4842
  "type": "text",
4844
4843
  "withValidate": false,
4845
4844
  "onEnter": _this.handleCreateCustomOption,