bkui-vue 0.0.1-beta.155 → 0.0.1-beta.158

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 (125) hide show
  1. package/dist/index.cjs.js +39 -39
  2. package/dist/index.esm.js +290 -164
  3. package/dist/index.umd.js +40 -40
  4. package/dist/style.css +1 -1
  5. package/dist/style.variable.css +1 -1
  6. package/lib/affix/affix.variable.css +2 -2
  7. package/lib/alert/alert.variable.css +2 -2
  8. package/lib/backtop/backtop.variable.css +2 -2
  9. package/lib/badge/badge.variable.css +2 -2
  10. package/lib/breadcrumb/breadcrumb.variable.css +2 -2
  11. package/lib/button/button.variable.css +2 -2
  12. package/lib/card/card.variable.css +2 -2
  13. package/lib/cascader/cascader-panel.d.ts +4 -4
  14. package/lib/cascader/cascader.css +13 -3
  15. package/lib/cascader/cascader.d.ts +2 -2
  16. package/lib/cascader/cascader.less +14 -1
  17. package/lib/cascader/cascader.variable.css +13 -3
  18. package/lib/cascader/index.d.ts +10 -10
  19. package/lib/cascader/index.js +1 -1
  20. package/lib/checkbox/checkbox-group.d.ts +16 -0
  21. package/lib/checkbox/checkbox.variable.css +2 -2
  22. package/lib/checkbox/index.d.ts +11 -0
  23. package/lib/checkbox/index.js +1 -1
  24. package/lib/code-diff/code-diff.variable.css +2 -2
  25. package/lib/collapse/collapse.variable.css +2 -2
  26. package/lib/color-picker/color-picker.d.ts +16 -0
  27. package/lib/color-picker/color-picker.variable.css +2 -2
  28. package/lib/color-picker/index.d.ts +24 -1
  29. package/lib/color-picker/index.js +1 -1
  30. package/lib/container/container.variable.css +2 -2
  31. package/lib/date-picker/date-picker.d.ts +9 -0
  32. package/lib/date-picker/date-picker.variable.css +2 -2
  33. package/lib/date-picker/index.d.ts +20 -1
  34. package/lib/date-picker/index.js +1 -1
  35. package/lib/date-picker/props.d.ts +4 -0
  36. package/lib/divider/divider.variable.css +2 -2
  37. package/lib/dropdown/dropdown.variable.css +2 -2
  38. package/lib/exception/exception.css +40 -14
  39. package/lib/exception/exception.d.ts +10 -3
  40. package/lib/exception/exception.less +59 -22
  41. package/lib/exception/exception.variable.css +42 -16
  42. package/lib/exception/index.d.ts +23 -8
  43. package/lib/exception/index.js +1 -1
  44. package/lib/fixed-navbar/fixed-navbar.variable.css +2 -2
  45. package/lib/form/form-item.d.ts +1 -1
  46. package/lib/form/form.css +6 -0
  47. package/lib/form/form.less +9 -0
  48. package/lib/form/form.variable.css +8 -2
  49. package/lib/form/index.d.ts +1 -1
  50. package/lib/form/index.js +1 -1
  51. package/lib/input/index.d.ts +27 -4
  52. package/lib/input/index.js +1 -1
  53. package/lib/input/input.d.ts +17 -1
  54. package/lib/input/input.variable.css +2 -2
  55. package/lib/link/link.variable.css +2 -2
  56. package/lib/loading/loading.variable.css +2 -2
  57. package/lib/menu/menu.variable.css +2 -2
  58. package/lib/menu/submenu.variable.css +2 -2
  59. package/lib/message/message.variable.css +2 -2
  60. package/lib/navigation/navigation.variable.css +2 -2
  61. package/lib/notify/notify.variable.css +2 -2
  62. package/lib/pagination/pagination.variable.css +2 -2
  63. package/lib/popover/popover.variable.css +2 -2
  64. package/lib/popover2/popover2.variable.css +2 -2
  65. package/lib/process/index.js +1 -1
  66. package/lib/process/process.variable.css +2 -2
  67. package/lib/progress/progress.variable.css +2 -2
  68. package/lib/radio/index.d.ts +11 -0
  69. package/lib/radio/index.js +1 -1
  70. package/lib/radio/radio-group.d.ts +16 -0
  71. package/lib/radio/radio.variable.css +2 -2
  72. package/lib/rate/index.d.ts +24 -1
  73. package/lib/rate/index.js +1 -1
  74. package/lib/rate/rate.d.ts +11 -0
  75. package/lib/resize-layout/index.d.ts +4 -4
  76. package/lib/resize-layout/resize-layout.d.ts +1 -1
  77. package/lib/resize-layout/resize-layout.variable.css +2 -2
  78. package/lib/select/index.d.ts +88 -25
  79. package/lib/select/index.js +1 -1
  80. package/lib/select/select.css +54 -24
  81. package/lib/select/select.d.ts +39 -8
  82. package/lib/select/select.less +62 -24
  83. package/lib/select/select.variable.css +56 -26
  84. package/lib/select/selectTagInput.d.ts +1 -3
  85. package/lib/shared/dom.d.ts +2 -0
  86. package/lib/shared/index.d.ts +1 -0
  87. package/lib/shared/index.js +1 -1
  88. package/lib/sideslider/sideslider.variable.css +2 -2
  89. package/lib/slider/slider.variable.css +2 -2
  90. package/lib/steps/steps.variable.css +2 -2
  91. package/lib/styles/mixins/scroll.variable.css +2 -2
  92. package/lib/styles/themes/themes.less +2 -2
  93. package/lib/switcher/index.d.ts +24 -1
  94. package/lib/switcher/index.js +1 -1
  95. package/lib/switcher/switcher.d.ts +11 -0
  96. package/lib/switcher/switcher.variable.css +2 -2
  97. package/lib/tab/tab.variable.css +2 -2
  98. package/lib/table/const.d.ts +2 -2
  99. package/lib/table/index.d.ts +6 -6
  100. package/lib/table/index.js +1 -1
  101. package/lib/table/plugins/head-filter.variable.css +2 -2
  102. package/lib/table/plugins/head-sort.variable.css +2 -2
  103. package/lib/table/plugins/settings.variable.css +2 -2
  104. package/lib/table/table.css +52 -18
  105. package/lib/table/table.d.ts +2 -2
  106. package/lib/table/table.less +13 -6
  107. package/lib/table/table.variable.css +54 -20
  108. package/lib/tag/tag.css +23 -8
  109. package/lib/tag/tag.less +25 -8
  110. package/lib/tag/tag.variable.css +25 -10
  111. package/lib/tag-input/index.d.ts +20 -1
  112. package/lib/tag-input/index.js +1 -1
  113. package/lib/tag-input/tag-input.d.ts +10 -1
  114. package/lib/tag-input/tag-input.variable.css +2 -2
  115. package/lib/tag-input/tag-props.d.ts +4 -0
  116. package/lib/timeline/timeline.variable.css +2 -2
  117. package/lib/transfer/index.d.ts +4 -4
  118. package/lib/transfer/transfer.d.ts +1 -1
  119. package/lib/transfer/transfer.variable.css +2 -2
  120. package/lib/tree/tree.css +5 -1
  121. package/lib/tree/tree.less +8 -1
  122. package/lib/tree/tree.variable.css +7 -3
  123. package/lib/upload/upload.variable.css +2 -2
  124. package/lib/virtual-render/virtual-render.variable.css +2 -2
  125. package/package.json +1 -1
package/lib/tag/tag.css CHANGED
@@ -8,49 +8,64 @@
8
8
  line-height: 22px;
9
9
  color: #63656e;
10
10
  cursor: default;
11
- background-color: rgba(151, 155, 165, 0.1);
12
- border-color: rgba(217, 220, 230, 0.6);
11
+ background-color: #f0f1f5;
12
+ border-color: rgba(151, 155, 165, 0.3);
13
13
  box-sizing: border-box;
14
14
  }
15
15
  .bk-tag.bk-tag-success {
16
16
  color: #14a568;
17
17
  border-color: rgba(20, 165, 104, 0.3);
18
- background-color: rgba(20, 165, 104, 0.1);
18
+ background-color: #E4FAF0;
19
19
  }
20
20
  .bk-tag.bk-tag-success.bk-tag-filled {
21
21
  background-color: #14a568;
22
22
  }
23
+ .bk-tag.bk-tag-success:hover:not(.bk-tag-filled) {
24
+ background-color: #DCF8EC;
25
+ }
23
26
  .bk-tag.bk-tag-info {
24
27
  color: #3a84ff;
25
28
  border-color: rgba(58, 132, 255, 0.3);
26
- background-color: rgba(58, 132, 255, 0.1);
29
+ background-color: #EDF4FF;
27
30
  }
28
31
  .bk-tag.bk-tag-info.bk-tag-filled {
29
32
  background-color: #3a84ff;
30
33
  }
34
+ .bk-tag.bk-tag-info:hover:not(.bk-tag-filled) {
35
+ background-color: #E1ECFF;
36
+ }
31
37
  .bk-tag.bk-tag-warning {
32
38
  color: #fe9c00;
33
39
  border-color: rgba(254, 165, 0, 0.3);
34
- background-color: rgba(254, 156, 0, 0.1);
40
+ background-color: #FFF1DB;
35
41
  }
36
42
  .bk-tag.bk-tag-warning.bk-tag-filled {
37
43
  background-color: #fe9c00;
38
44
  }
45
+ .bk-tag.bk-tag-warning:hover:not(.bk-tag-filled) {
46
+ background-color: #FFE8C3;
47
+ }
39
48
  .bk-tag.bk-tag-danger {
40
49
  color: #ea3636;
41
50
  border-color: rgba(234, 53, 54, 0.3);
42
- background-color: rgba(234, 53, 54, 0.1);
51
+ background-color: #FEEBEA;
43
52
  }
44
53
  .bk-tag.bk-tag-danger.bk-tag-filled {
45
54
  background-color: #ea3636;
46
55
  }
56
+ .bk-tag.bk-tag-danger:hover:not(.bk-tag-filled) {
57
+ background-color: #FEDDDC;
58
+ }
47
59
  .bk-tag:hover {
48
- opacity: 0.8;
60
+ background-color: #dcdee5;
49
61
  }
50
62
  .bk-tag.bk-tag-filled {
51
63
  color: #fff;
52
64
  background-color: #979ba5;
53
65
  }
66
+ .bk-tag.bk-tag-filled:hover {
67
+ opacity: 0.8;
68
+ }
54
69
  .bk-tag.bk-tag-stroke {
55
70
  padding: 0 9px;
56
71
  line-height: 20px;
@@ -65,7 +80,7 @@
65
80
  background: none;
66
81
  }
67
82
  .bk-tag.bk-tag-checkable:hover {
68
- background: rgba(151, 155, 165, 0.15);
83
+ background: #F0F1F5;
69
84
  }
70
85
  .bk-tag.bk-tag-check {
71
86
  color: #fff;
package/lib/tag/tag.less CHANGED
@@ -6,10 +6,10 @@
6
6
  @tag-warning-color: #fe9c00;
7
7
  @tag-danger-color: @danger-color;
8
8
 
9
- @tag-success-bg-color: rgba(20,165,104,.1);
10
- @tag-info-bg-color: rgba(58,132,255,.1);
11
- @tag-warning-bg-color: rgba(254,156,0,.1);
12
- @tag-danger-bg-color: rgba(234,53,54,.1);
9
+ @tag-success-bg-color: #E4FAF0;
10
+ @tag-info-bg-color: #EDF4FF;
11
+ @tag-warning-bg-color: #FFF1DB;
12
+ @tag-danger-bg-color: #FEEBEA;
13
13
  @tag-filled-bg-color: #979ba5;
14
14
 
15
15
  @tag-success-border-color: rgba(20,165,104,.3);
@@ -17,7 +17,15 @@
17
17
  @tag-warning-border-color: rgba(254,165,0,.3);
18
18
  @tag-danger-border-color: rgba(234,53,54,.3);
19
19
 
20
- @tag-checkable-hover-bg-color: rgba(151,155,165,.15);
20
+ @tag-success-hover-bg-color: #DCF8EC;
21
+ @tag-info-hover-bg-color: #E1ECFF;
22
+ @tag-warning-hover-bg-color: #FFE8C3;
23
+ @tag-danger-hover-bg-color: #FEDDDC;
24
+ @tag-filled-success-hover-bg-color: #42B685;
25
+ @tag-filled-info-hover-bg-color: #609CFE;
26
+ @tag-filled-warning-hover-bg-color: #FDAF32;
27
+ @tag-filled-danger-hover-bg-color: #ED5C5D;
28
+ @tag-checkable-hover-bg-color: #F0F1F5;
21
29
 
22
30
  @themeSelectors: success, info, warning, danger;
23
31
 
@@ -31,14 +39,16 @@
31
39
  line-height: 22px;
32
40
  color: @default-color;
33
41
  cursor: default;
34
- background-color: rgba(151,155,165,.1);
35
- border-color: rgba(217, 220, 230, .6);
42
+ background-color: #f0f1f5;
43
+ border-color: rgba(151,155,165,.3);
36
44
  box-sizing: border-box;
37
45
 
38
46
  each(@themeSelectors, {
39
47
  @color: 'tag-@{value}-color';
40
48
  @borderColor: 'tag-@{value}-border-color';
41
49
  @bgColor: 'tag-@{value}-bg-color';
50
+ @bgHoverColor: 'tag-@{value}-hover-bg-color';
51
+ @filledBgHoverColor: 'tag-filled-@{value}-hover-bg-color';
42
52
  &.bk-tag-@{value} {
43
53
  color: @@color;
44
54
  border-color: @@borderColor;
@@ -46,16 +56,23 @@
46
56
  &.bk-tag-filled {
47
57
  background-color: @@color;
48
58
  }
59
+ &:hover:not(.bk-tag-filled) {
60
+ background-color: @@bgHoverColor;
61
+ }
49
62
  }
50
63
  });
51
64
 
52
65
  &:hover {
53
- opacity: .8;
66
+ background-color: #dcdee5;
54
67
  }
55
68
 
56
69
  &.bk-tag-filled {
57
70
  color: @tag-base-color;
58
71
  background-color: @tag-filled-bg-color;
72
+
73
+ &:hover {
74
+ opacity: .8;
75
+ }
59
76
  }
60
77
 
61
78
  &.bk-tag-stroke {
@@ -107,8 +107,8 @@
107
107
  --table-row-hover-bg-color: #f5f7fa;
108
108
  --table-row-active-bg-color: #f0f1f5;
109
109
  --cascader-panel-border-color: #dcdee5;
110
- --cascader-panel-hover: #eaf3ff;
111
- --cascader-panel-active: #f4f6fa;
110
+ --cascader-panel-hover: #f5f7fa;
111
+ --cascader-panel-active: #e1ecff;
112
112
  --cascader-panel-disabled-bg: #fff;
113
113
  }
114
114
  .bk-tag {
@@ -121,49 +121,64 @@
121
121
  line-height: 22px;
122
122
  color: var(--default-color);
123
123
  cursor: default;
124
- background-color: rgba(151, 155, 165, 0.1);
125
- border-color: rgba(217, 220, 230, 0.6);
124
+ background-color: #f0f1f5;
125
+ border-color: rgba(151, 155, 165, 0.3);
126
126
  box-sizing: border-box;
127
127
  }
128
128
  .bk-tag.bk-tag-success {
129
129
  color: #14a568;
130
130
  border-color: rgba(20, 165, 104, 0.3);
131
- background-color: rgba(20, 165, 104, 0.1);
131
+ background-color: #E4FAF0;
132
132
  }
133
133
  .bk-tag.bk-tag-success.bk-tag-filled {
134
134
  background-color: #14a568;
135
135
  }
136
+ .bk-tag.bk-tag-success:hover:not(.bk-tag-filled) {
137
+ background-color: #DCF8EC;
138
+ }
136
139
  .bk-tag.bk-tag-info {
137
140
  color: var(--primary-color);
138
141
  border-color: rgba(58, 132, 255, 0.3);
139
- background-color: rgba(58, 132, 255, 0.1);
142
+ background-color: #EDF4FF;
140
143
  }
141
144
  .bk-tag.bk-tag-info.bk-tag-filled {
142
145
  background-color: var(--primary-color);
143
146
  }
147
+ .bk-tag.bk-tag-info:hover:not(.bk-tag-filled) {
148
+ background-color: #E1ECFF;
149
+ }
144
150
  .bk-tag.bk-tag-warning {
145
151
  color: #fe9c00;
146
152
  border-color: rgba(254, 165, 0, 0.3);
147
- background-color: rgba(254, 156, 0, 0.1);
153
+ background-color: #FFF1DB;
148
154
  }
149
155
  .bk-tag.bk-tag-warning.bk-tag-filled {
150
156
  background-color: #fe9c00;
151
157
  }
158
+ .bk-tag.bk-tag-warning:hover:not(.bk-tag-filled) {
159
+ background-color: #FFE8C3;
160
+ }
152
161
  .bk-tag.bk-tag-danger {
153
162
  color: var(--danger-color);
154
163
  border-color: rgba(234, 53, 54, 0.3);
155
- background-color: rgba(234, 53, 54, 0.1);
164
+ background-color: #FEEBEA;
156
165
  }
157
166
  .bk-tag.bk-tag-danger.bk-tag-filled {
158
167
  background-color: var(--danger-color);
159
168
  }
169
+ .bk-tag.bk-tag-danger:hover:not(.bk-tag-filled) {
170
+ background-color: #FEDDDC;
171
+ }
160
172
  .bk-tag:hover {
161
- opacity: 0.8;
173
+ background-color: #dcdee5;
162
174
  }
163
175
  .bk-tag.bk-tag-filled {
164
176
  color: #fff;
165
177
  background-color: #979ba5;
166
178
  }
179
+ .bk-tag.bk-tag-filled:hover {
180
+ opacity: 0.8;
181
+ }
167
182
  .bk-tag.bk-tag-stroke {
168
183
  padding: 0 9px;
169
184
  line-height: 20px;
@@ -178,7 +193,7 @@
178
193
  background: none;
179
194
  }
180
195
  .bk-tag.bk-tag-checkable:hover {
181
- background: rgba(151, 155, 165, 0.15);
196
+ background: #F0F1F5;
182
197
  }
183
198
  .bk-tag.bk-tag-check {
184
199
  color: #fff;
@@ -13,6 +13,7 @@ declare const TagInput: {
13
13
  clearable: boolean;
14
14
  showClearOnlyHover: boolean;
15
15
  modelValue: string[];
16
+ withValidate: boolean;
16
17
  allowCreate: boolean;
17
18
  displayKey: string;
18
19
  searchKey: string | string[];
@@ -175,6 +176,10 @@ declare const TagInput: {
175
176
  type: import("vue").PropType<(value: string) => any[]>;
176
177
  default: any;
177
178
  };
179
+ withValidate: {
180
+ type: BooleanConstructor;
181
+ default: boolean;
182
+ };
178
183
  }>> & {
179
184
  onBlur?: (...args: any[]) => any;
180
185
  onChange?: (...args: any[]) => any;
@@ -182,7 +187,7 @@ declare const TagInput: {
182
187
  "onUpdate:modelValue"?: (...args: any[]) => any;
183
188
  onRemove?: (...args: any[]) => any;
184
189
  onRemoveAll?: (...args: any[]) => any;
185
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "trigger" | "placeholder" | "list" | "separator" | "clearable" | "showClearOnlyHover" | "modelValue" | "allowCreate" | "displayKey" | "searchKey" | "tooltipKey" | "saveKey" | "hasDeleteIcon" | "useGroup" | "maxData" | "maxResult" | "contentMaxHeight" | "contentWidth" | "allowNextFocus" | "allowAutoMatch" | "leftSpace" | "createTagValidator" | "filterCallback" | "tagTpl" | "tpl" | "pasteFn">;
190
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "trigger" | "placeholder" | "list" | "separator" | "clearable" | "showClearOnlyHover" | "modelValue" | "withValidate" | "allowCreate" | "displayKey" | "searchKey" | "tooltipKey" | "saveKey" | "hasDeleteIcon" | "useGroup" | "maxData" | "maxResult" | "contentMaxHeight" | "contentWidth" | "allowNextFocus" | "allowAutoMatch" | "leftSpace" | "createTagValidator" | "filterCallback" | "tagTpl" | "tpl" | "pasteFn">;
186
191
  $attrs: {
187
192
  [x: string]: unknown;
188
193
  };
@@ -331,6 +336,10 @@ declare const TagInput: {
331
336
  type: import("vue").PropType<(value: string) => any[]>;
332
337
  default: any;
333
338
  };
339
+ withValidate: {
340
+ type: BooleanConstructor;
341
+ default: boolean;
342
+ };
334
343
  }>> & {
335
344
  onBlur?: (...args: any[]) => any;
336
345
  onChange?: (...args: any[]) => any;
@@ -405,6 +414,7 @@ declare const TagInput: {
405
414
  clearable: boolean;
406
415
  showClearOnlyHover: boolean;
407
416
  modelValue: string[];
417
+ withValidate: boolean;
408
418
  allowCreate: boolean;
409
419
  displayKey: string;
410
420
  searchKey: string | string[];
@@ -587,6 +597,10 @@ declare const TagInput: {
587
597
  type: import("vue").PropType<(value: string) => any[]>;
588
598
  default: any;
589
599
  };
600
+ withValidate: {
601
+ type: BooleanConstructor;
602
+ default: boolean;
603
+ };
590
604
  }>> & {
591
605
  onBlur?: (...args: any[]) => any;
592
606
  onChange?: (...args: any[]) => any;
@@ -789,6 +803,10 @@ declare const TagInput: {
789
803
  type: import("vue").PropType<(value: string) => any[]>;
790
804
  default: any;
791
805
  };
806
+ withValidate: {
807
+ type: BooleanConstructor;
808
+ default: boolean;
809
+ };
792
810
  }>> & {
793
811
  onBlur?: (...args: any[]) => any;
794
812
  onChange?: (...args: any[]) => any;
@@ -863,6 +881,7 @@ declare const TagInput: {
863
881
  clearable: boolean;
864
882
  showClearOnlyHover: boolean;
865
883
  modelValue: string[];
884
+ withValidate: boolean;
866
885
  allowCreate: boolean;
867
886
  displayKey: string;
868
887
  searchKey: string | string[];
@@ -1 +1 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("lodash"),require("../directives"),require("../icon"),require("../loading"),require("../popover"));else if("function"==typeof define&&define.amd)define(["../shared","vue","lodash","../directives","../icon","../loading","../popover"],t);else{var r="object"==typeof exports?t(require("../shared"),require("vue"),require("lodash"),require("../directives"),require("../icon"),require("../loading"),require("../popover")):t(e["../shared"],e.vue,e.lodash,e["../directives"],e["../icon"],e["../loading"],e["../popover"]);for(var a in r)("object"==typeof exports?exports:e)[a]=r[a]}}(self,((e,t,r,a,n,o,l)=>(()=>{"use strict";var i={4061:e=>{e.exports=a},6870:e=>{e.exports=n},4870:e=>{e.exports=o},5537:e=>{e.exports=l},4212:t=>{t.exports=e},467:e=>{e.exports=r},748:e=>{e.exports=t}},s={};function u(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return i[e](r,r.exports,u),r.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{u.r(c),u.d(c,{default:()=>L});var e=u(4212);function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function a(e,t){if(e){if("string"==typeof e)return r(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?r(e,t):void 0}}function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var l=u(748),i=u(467),s=u(4061),d=u(6870),p=u(4870),f=u.n(p),v=u(5537),g=u.n(v),h=12,y=function(e){for(var t=e.length,r=0,a=0;a<t;a++)0!=(65280&e.charCodeAt(a))&&(r+=1),r+=1;return r};const m=(0,l.defineComponent)({name:"ListTagRender",props:{node:e.PropTypes.object,searchKey:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.arrayOf(e.PropTypes.string)]),displayKey:e.PropTypes.string,searchKeyword:e.PropTypes.string,tpl:{type:Function,default:null}},render:function(){var e=this,t=function(t){if(e.searchKeyword){var r=new RegExp("(".concat(e.searchKeyword,")"),"i");return t.replace(r,'<strong class="highlight-text">$1</strong>')}return t};if(this.tpl)return this.tpl(this.node,t,l.h,this);var r=this.node[this.displayKey];return(0,l.createVNode)("div",{class:"bk-selector-node"},[(0,l.createVNode)("span",{class:"text",innerHTML:t(r)},[r])])}}),b=(0,l.defineComponent)({name:"TagRender",props:{node:e.PropTypes.object,displayKey:e.PropTypes.string,tpl:{type:Function,default:null}},render:function(){return this.tpl?this.tpl(this.node,l.h,this):(0,l.createVNode)("div",{class:"tag"},[(0,l.createVNode)("span",{class:"text"},[this.node[this.displayKey]])])}}),T=(0,l.defineComponent)({name:"TagInput",directives:{bkTooltips:s.bkTooltips},props:{modelValue:e.PropTypes.arrayOf(e.PropTypes.string).def([]),placeholder:e.PropTypes.string.def("请输入并按 Enter 结束"),list:e.PropTypes.arrayOf(e.PropTypes.object).def([]),disabled:e.PropTypes.bool.def(!1),tooltipKey:e.PropTypes.string.def(""),saveKey:e.PropTypes.string.def("id"),displayKey:e.PropTypes.string.def("name"),hasDeleteIcon:e.PropTypes.bool.def(!1),clearable:e.PropTypes.bool.def(!0),trigger:e.PropTypes.commonType(["focus","search"]).def("search"),searchKey:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.arrayOf(e.PropTypes.string)]).def("name"),useGroup:e.PropTypes.bool.def(!1),allowCreate:e.PropTypes.bool.def(!1),maxData:e.PropTypes.number.def(-1),maxResult:e.PropTypes.number.def(10),contentMaxHeight:e.PropTypes.number.def(300),contentWidth:e.PropTypes.number.def(190),separator:e.PropTypes.string.def(""),allowNextFocus:e.PropTypes.bool.def(!0),allowAutoMatch:e.PropTypes.bool.def(!1),showClearOnlyHover:e.PropTypes.bool.def(!1),leftSpace:e.PropTypes.number.def(0),createTagValidator:{type:Function,default:null},filterCallback:{type:Function,default:null},tagTpl:{type:Function,default:null},tpl:{type:Function,default:null},pasteFn:{type:Function,default:null}},emits:["update:modelValue","change","select","blur","remove","removeAll"],setup:function(r,s){var u=s.emit,c=(0,e.useFormItem)(),d=(0,l.reactive)({isEdit:!1,isHover:!1,focusItemIndex:r.allowCreate?-1:0}),p=(0,l.reactive)({isShow:!1,width:190,modifiers:[{name:"offset",options:{offset:[0,4]}}]}),f=function(e){var t=(0,l.reactive)({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:t,initPage:function(){var e,r,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.curPage=1,t.totalSize=a.length,t.totalPage=Math.ceil(t.totalSize/t.pageSize)||1;var n=[];if(t.pageSize>0)for(var l=0;l<t.totalSize;l+=t.pageSize)n.push(a.slice(l,l+t.pageSize));(e=t.renderListPaged).splice.apply(e,[0,t.renderListPaged.length].concat(n)),(r=t.curPageList).splice.apply(r,[0,t.curPageList.length].concat(o(t.renderListPaged[t.curPage-1]||[])))},pageChange:function(e){var r;t.curPage=e,(r=t.curPageList).splice.apply(r,[t.curPageList.length,0].concat(o(t.renderListPaged[t.curPage-1]||[]))),t.isPageLoading=!1}}}((0,l.toRefs)(r).maxResult),v=f.pageState,g=f.initPage,m=f.pageChange,b=(0,l.ref)(""),T=(0,l.ref)(null),L=(0,l.ref)(null),w=(0,l.ref)(null),P=(0,l.ref)(null),x=(0,l.ref)(null),I=(0,l.ref)(null),S=(0,l.ref)(null),C=(0,l.computed)((function(){return!r.disabled&&r.hasDeleteIcon})),K=(0,l.computed)((function(){return 1===r.maxData})),V=(0,l.computed)((function(){return 0===E.selectedTagList.length&&""===b.value&&!d.isEdit})),k=(0,l.computed)((function(){return r.clearable&&!r.disabled&&0!==E.selectedTagList.length&&(!r.showClearOnlyHover||d.isHover)})),N=(0,l.computed)((function(){return{"bk-tag-input-trigger":!0,active:d.isEdit,disabled:r.disabled}}));(0,l.watch)([function(){return o(r.modelValue)},function(){return o(r.list)}],(function(){z()})),(0,l.watch)(b,(0,i.debounce)((function(){var e=0!==v.curPageList.length,t=b.value;""!==t&&e||""===t&&"focus"===r.trigger&&e?p.isShow=!0:"focus"===r.trigger&&e||(p.isShow=!1)}),150)),(0,l.watch)((function(){return p.isShow}),(function(e){A(),e&&x.value&&((0,l.nextTick)((function(){x.value.scrollTop=0})),x.value.removeEventListener("scroll",O),x.value.addEventListener("scroll",O))}));var A=function(){var e,t,r=K.value?0:null===(e=P.value)||void 0===e?void 0:e.offsetLeft;p.modifiers=[{name:"offset",options:{offset:[r,4]}}],null===(t=I.value)||void 0===t||t.update()},O=function(){if(!v.isPageLoading&&0!==x.value.scrollTop){var e=x.value;if(e.scrollTop+e.offsetHeight>=e.scrollHeight){var t=v.curPage+1;t<=v.totalPage&&(v.isPageLoading=!0,setTimeout((function(){m(t)}),500))}}},R=function(){var e;return Array.from((null===(e=w.value)||void 0===e?void 0:e.childNodes)||[]).filter((function(e){return e.nodeType!==Node.TEXT_NODE}))},j=function(e){if(!r.disabled){if(null==e?void 0:e.target){var t=e.target.className;(t.indexOf("bk-tag-input-trigger")>-1||t.indexOf("tag-list")>-1)&&w.value.appendChild(P.value)}clearTimeout(S.value),K.value&&D.value.length&&(E.tagListCache=o(D.value),E.selectedTagListCache=o(E.selectedTagList),b.value=E.selectedTagListCache[0][r.saveKey],J(E.selectedTagList[0],0),G()),d.isEdit=!0,(0,l.nextTick)((function(){var e;null===(e=T.value)||void 0===e||e.focus(),"focus"===r.trigger&&0!==E.localList.length&&(_(),p.isShow?A():p.isShow=!0)}))}},E=(0,l.reactive)({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),D=(0,l.computed)((function(){return E.selectedTagList.map((function(e){return e[r.saveKey]}))})),F=function(e){var t=(0,l.toRefs)(e),r=t.useGroup,a=t.saveKey,n=t.displayKey,i=t.list,s=(0,l.reactive)({flatList:[]});return(0,l.watch)([r,a,n,i],(function(){s.flatList=[];var e=i.value;r.value&&(e=i.value.reduce((function(e,t){var r=[];return t.children&&(r=t.children.map((function(e){return Object.assign({group:{groupId:t[a.value],groupName:t[n.value]}},e)}))),e.concat(r)}),[])),s.flatList=o(e)}),{immediate:!0,deep:!0}),s.flatList}(r),q=(0,l.computed)((function(){if(r.useGroup){var e={};return v.curPageList.forEach((function(t,r){t.__index__=r,e[t.group.groupId]||(e[t.group.groupId]={id:t.group.groupId,name:t.group.groupName,children:[]}),e[t.group.groupId].children.push(t)})),Object.keys(e).map((function(t){return e[t]}))}return v.curPageList})),z=function(){var e=r.saveKey,t=r.modelValue,a=r.displayKey,l=r.allowCreate,i=r.trigger;E.selectedTagList=[],E.localList=o(F),t.length&&(t.forEach((function(t){var r=E.localList.find((function(r){return t===r[e]}));if(void 0!==r)E.selectedTagList.push(r);else if(l&&!D.value.includes(t)){var o;E.selectedTagList.push((n(o={},e,t),n(o,a,t),o))}})),K.value||(E.localList=E.localList.filter((function(r){return!t.includes(r[e])})))),"focus"===i&&_()},_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=r.searchKey,a=r.filterCallback,n=e.toLowerCase(),o=[];if("function"==typeof a)o=a(n,t,E.localList)||[];else if(Array.isArray(t)){var l=t.map((function(e){return E.localList.filter((function(t){return-1!==t[e].toLowerCase().indexOf(n)}))}));o=Array.from(new Set(l.flat()))}else o=E.localList.filter((function(e){return-1!==e[t].toLowerCase().indexOf(n)}));g(o)};(0,l.onMounted)((function(){z()}));var M=function(){b.value=""},H=function(){if(K.value)return 0;var e=R().findIndex((function(e){return"tagInputItem"===e.id}));return e>=0?e:0},B=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t&&e){var a=t;r&&(a=t.nextElementSibling||null),t.parentNode.insertBefore(e,a)}},G=function(e){var t=r.maxData,a=r.trigger,n=r.allowCreate;if(-1===t||t>D.value.length){var o=((null==e?void 0:e.target)?e.target:b).value,l=y(o);l?(_(o),T.value.style.width="".concat(l*h,"px")):"focus"===a&&_()}else Z(),b.value="",p.isShow=!1;d.isEdit=!0,d.focusItemIndex=n?-1:0},Z=function(){S.value=setTimeout((function(){var e,t,n,o=b.value;if(M(),d.isEdit=!1,K.value){var l=(t=E.tagListCache,n=1,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,o=[],l=!0,i=!1;try{for(r=r.call(e);!(l=(a=r.next()).done)&&(o.push(a.value),!t||o.length!==t);l=!0);}catch(e){i=!0,n=e}finally{try{l||null==r.return||r.return()}finally{if(i)throw n}}return o}}(t,n)||a(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];o&&o===l&&E.selectedTagListCache.length?X(E.selectedTagListCache[0],"select"):W("remove")}else if(r.allowAutoMatch&&o){var i=v.curPageList.find((function(e){return Array.isArray(r.searchKey)?r.searchKey.map((function(t){return e[t]})).includes(o):e[r.searchKey]===o}));i?U(i,"select"):r.allowCreate&&U(o,"custom")}p.isShow=!1,u("blur",o,D.value),null===(e=null==c?void 0:c.validate)||void 0===e||e.call(c,"blur")}),200)},U=function(e,t,r){null==r||r.stopPropagation(),e&&!e.disabled&&(K.value&&(E.tagListCache=[],E.selectedTagListCache=[],E.selectedTagList=[]),X(e,t),W("select"),M(),p.isShow=!1)},W=function(e,t){var r;u("change",D.value),u(e,t),u("update:modelValue",D.value),null===(r=null==c?void 0:c.validate)||void 0===r||r.call(c,"change")},$=function(){var e=x.value.clientHeight,t=x.value.getBoundingClientRect().y;(0,l.nextTick)((function(){var r=x.value.querySelector(".bk-selector-actived");if(r){var a=r.clientHeight,n=r.getBoundingClientRect().y;n<t&&(x.value.scrollTop=x.value.scrollTop-(t-n));var o=n+a-t;o>e&&(x.value.scrollTop=x.value.scrollTop+o-e)}}))},X=function(e,a){if(!(E.selectedTagList.length>=r.maxData&&-1!==r.maxData)){var i,s=r.separator,u=r.saveKey,c=r.displayKey,d=r.createTagValidator,p=H(),f=1,v=!1,g=function(e){return"function"!=typeof d||d(e)},y=function(e){return E.localList.find((function(t){return t[u]===e}))};if("custom"===a)if(s){var m,b=e.split(s),L=(b=b.filter((function(e){return(null==e?void 0:e.trim())&&!D.value.includes(e)&&g(e)}))).map((function(e){var t;return y(e)||(n(t={},u,e),n(t,c,e),t)}));b.length&&((m=E.selectedTagList).splice.apply(m,[p,0].concat(o(L))),f=L.length,v=!0)}else{var w="object"===t(e);if(void 0!==(i=(i=w?e[u]:e.trim()).replace(/\s+/g,""))&&!D.value.includes(i)&&g(i)){var x,I=y(i)||(w?e:(n(x={},u,i),n(x,c,i),x));E.selectedTagList.splice(p,0,I),v=!0}}else e&&(void 0===(i=e[u])||D.value.includes(i)||(E.selectedTagList.splice(p,0,e),v=!0));v&&(0,l.nextTick)((function(){for(var e=1;e<=f;e++){var t=R()[p+e];B(t,P.value)}T.value.style.width="".concat(h,"px"),K.value||(r.allowNextFocus&&j(),E.localList=E.localList.filter((function(e){return!D.value.includes(e[u])})))}))}},J=function(e,t){E.selectedTagList.splice(t,1);var a=F.some((function(t){return t===e[r.saveKey]}));(r.allowCreate&&a||!r.allowCreate)&&!K.value&&E.localList.push(e)};return Object.assign(Object.assign(Object.assign(Object.assign({popoverProps:p},(0,l.toRefs)(d)),(0,l.toRefs)(E)),(0,l.toRefs)(v)),{isShowPlaceholder:V,isShowClear:k,curInputValue:b,formatList:F,renderList:q,showTagClose:C,tagInputRef:T,bkTagSelectorRef:L,tagListRef:w,tagInputItemRef:P,selectorListRef:x,popoverRef:I,triggerClass:N,focusInputTrigger:j,activeClass:function(e,t){var a={"bk-selector-actived":!1,"bk-selector-selected":D.value.includes(e[r.saveKey])};return r.useGroup?a["bk-selector-actived"]=e.__index__===d.focusItemIndex:a["bk-selector-actived"]=t===d.focusItemIndex,a},handleInput:G,handleFocus:function(){var e;p.width=K.value?null===(e=L.value)||void 0===e?void 0:e.clientWidth:r.contentWidth},handleBlur:Z,handleTagSelected:U,handleTagRemove:function(e,t,r){null==r||r.stopPropagation(),J(e,t),M(),W("remove",e),T.value.style.width="".concat(h,"px")},handleClear:function(e){e.stopPropagation();var t=E.selectedTagList;E.selectedTagList=[];var a,n=F.filter((function(e){return t.some((function(t){return t[r.saveKey]===e[r.saveKey]}))}));(!r.allowCreate||0===n.length)&&r.allowCreate||K.value||(a=E.localList).push.apply(a,o(n)),W("removeAll")},tagFocus:function(e){r.disabled||(B(P.value,e.currentTarget,!0),T.value.style.width="".concat(h,"px"),p.isShow&&A())},handleKeydown:function(e){if(!v.isPageLoading){var t=e.target.value,a=y(t),n=H(),o=R();switch(e.code){case"ArrowUp":if(e.preventDefault(),!p.isShow)return;d.focusItemIndex=d.focusItemIndex-1,d.focusItemIndex=d.focusItemIndex<0?-1:d.focusItemIndex,-1===d.focusItemIndex&&(d.focusItemIndex=v.curPageList.length-1),$();break;case"ArrowDown":if(e.preventDefault(),!p.isShow)return;d.focusItemIndex=d.focusItemIndex+1,d.focusItemIndex=d.focusItemIndex>v.curPageList.length-1?v.curPageList.length:d.focusItemIndex,d.focusItemIndex===v.curPageList.length&&(d.focusItemIndex=0),$();break;case"ArrowLeft":if(d.isEdit=!0,!a){if(n<1)return;B(P.value,o[n-1]),j()}break;case"ArrowRight":if(d.isEdit=!0,!a){if(n===o.length-1)return;B(o[n+1],P.value),j()}break;case"Enter":case"NumpadEnter":!r.allowCreate&&p.isShow||r.allowCreate&&d.focusItemIndex>=0&&p.isShow?U(v.curPageList[d.focusItemIndex],"select",e):r.allowCreate&&U(b.value,"custom",e),e.preventDefault();break;case"Backspace":0===n||b.value||function(e,t){var a=R();B(P.value,a[e-1]),E.selectedTagList.splice(e-1,1),j();var n=F.some((function(e){return e===t[r.saveKey]}));(r.allowCreate&&n||!r.allowCreate)&&!K.value&&E.localList.push(t),T.value="".concat(h,"px"),W("remove")}(n,E.selectedTagList[n-1])}}},handlePaste:function(e){if(e.preventDefault(),K.value)return!1;var t=r.maxData,a=r.saveKey,l=r.pasteFn,i=e.clipboardData.getData("text"),s=l?l(i):function(e){var t=[];return e.split(";").forEach((function(e){if(e.match(/^[a-zA-Z][a-zA-Z_]+/g)){var a,o=e.match(/^[a-zA-Z][a-zA-Z_]+/g).join("");t.push((n(a={},r.saveKey,o),n(a,r.displayKey,o),a))}})),t}(i),u=s.map((function(e){return e[a]}));if(u.length){var c=R(),d=H(),p=E.localList.map((function(e){return e[a]}));if(u=u.filter((function(e){return(null==e?void 0:e.trim())&&!D.value.includes(e)&&p.includes(e)})),-1!==t){var f=E.selectedTagList.length;if(f<t){var v=t-f;u.length>v&&(u=o(u.slice(0,v)))}else u=[]}var g,y=E.localList.filter((function(e){return u.includes(e[a])}));u.length&&((g=E.selectedTagList).splice.apply(g,[d,0].concat(o(y))),B(P.value,c[d]),T.value.style.width="".concat(h,"px"),E.localList=E.localList.filter((function(e){return!u.includes(e[a])})),W("select"),j())}}})},render:function(){var e=this;return(0,l.createVNode)("div",{class:"bk-tag-input",ref:"bkTagSelectorRef",onClick:this.focusInputTrigger,onMouseenter:function(){return e.isHover=!0},onMouseleave:function(){return e.isHover=!1}},[(0,l.createVNode)(g(),{ref:"popoverRef",theme:"light",trigger:"manual",placement:"bottom-start",arrow:!1,width:this.popoverProps.width,isShow:this.popoverProps.isShow,modifiers:this.popoverProps.modifiers},{default:function(){var t,r,a;return(0,l.createVNode)("div",{class:e.triggerClass},[(0,l.createVNode)("ul",{class:"tag-list",ref:"tagListRef",style:{marginLeft:"".concat(e.leftSpace,"px")}},[e.selectedTagList.map((function(t,r){var a={boundary:"window",theme:"light",distance:12,content:t[e.tooltipKey],disabled:!e.tooltipKey};return(0,l.withDirectives)((0,l.createVNode)("li",{class:"tag-item",onClick:e.tagFocus},[(0,l.createVNode)(b,{node:t,tpl:e.tagTpl,displayKey:e.displayKey},null),e.showTagClose?(0,l.createVNode)(d.Error,{class:"remove-tag",onClick:e.handleTagRemove.bind(e,t,r)},null):null]),[[(0,l.resolveDirective)("bk-tooltips"),a]])})),(0,l.withDirectives)((0,l.createVNode)("li",{ref:"tagInputItemRef",id:"tagInputItem",class:"tag-input-item",role:"input"},[(0,l.withDirectives)((0,l.createVNode)("input",{type:"text",class:"tag-input",ref:"tagInputRef","onUpdate:modelValue":function(t){return e.curInputValue=t},onInput:e.handleInput,onFocus:e.handleFocus,onBlur:e.handleBlur,onKeydown:e.handleKeydown,onPaste:e.handlePaste},null),[[l.vModelText,e.curInputValue]])]),[[l.vShow,e.isEdit]])]),(0,l.withDirectives)((0,l.createVNode)("p",{class:"placeholder"},[e.placeholder]),[[l.vShow,e.isShowPlaceholder]]),null!==(a=null===(r=null===(t=e.$slots)||void 0===t?void 0:t.suffix)||void 0===r?void 0:r.call(t))&&void 0!==a?a:e.isShowClear&&(0,l.createVNode)(d.Close,{class:"clear-icon",onClick:e.handleClear},null)])},content:function(){return(0,l.createVNode)("div",{class:"bk-selector-list"},[(0,l.createVNode)("ul",{ref:"selectorListRef",style:{"max-height":"".concat(e.contentMaxHeight,"px")},class:"outside-ul"},[e.useGroup?e.renderList.map((function(t){return(0,l.createVNode)("li",{class:"bk-selector-group-item"},[(0,l.createVNode)("span",{class:"group-name"},[t.name,(0,l.createTextVNode)(" ("),t.children.length,(0,l.createTextVNode)(")")]),(0,l.createVNode)("ul",{class:"bk-selector-group-list-item"},[t.children.map((function(t,r){return(0,l.createVNode)("li",{class:["bk-selector-list-item",{disabled:t.disabled},e.activeClass(t,r)],onClick:e.handleTagSelected.bind(e,t,"select")},[(0,l.createVNode)(m,{node:t,displayKey:e.displayKey,tpl:e.tpl,searchKey:e.searchKey,searchKeyword:e.curInputValue},null)])}))])])})):e.renderList.map((function(t,r){return(0,l.createVNode)("li",{class:["bk-selector-list-item",{disabled:t.disabled},e.activeClass(t,r)],onClick:e.handleTagSelected.bind(e,t,"select")},[(0,l.createVNode)(m,{node:t,displayKey:e.displayKey,tpl:e.tpl,searchKey:e.searchKey,searchKeyword:e.curInputValue},null)])})),e.isPageLoading?(0,l.createVNode)("li",{class:"bk-selector-list-item loading"},[(0,l.createVNode)(f(),{theme:"primary",size:p.BkLoadingSize.Small},null)]):null])])}})])}}),L=(0,e.withInstall)(T)})(),c})()));
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("lodash"),require("../directives"),require("../icon"),require("../loading"),require("../popover"));else if("function"==typeof define&&define.amd)define(["../shared","vue","lodash","../directives","../icon","../loading","../popover"],t);else{var r="object"==typeof exports?t(require("../shared"),require("vue"),require("lodash"),require("../directives"),require("../icon"),require("../loading"),require("../popover")):t(e["../shared"],e.vue,e.lodash,e["../directives"],e["../icon"],e["../loading"],e["../popover"]);for(var a in r)("object"==typeof exports?exports:e)[a]=r[a]}}(self,((e,t,r,a,n,o,l)=>(()=>{"use strict";var i={4061:e=>{e.exports=a},6870:e=>{e.exports=n},4870:e=>{e.exports=o},5537:e=>{e.exports=l},4212:t=>{t.exports=e},467:e=>{e.exports=r},748:e=>{e.exports=t}},s={};function u(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return i[e](r,r.exports,u),r.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{u.r(c),u.d(c,{default:()=>L});var e=u(4212);function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function a(e,t){if(e){if("string"==typeof e)return r(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?r(e,t):void 0}}function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var l=u(748),i=u(467),s=u(4061),d=u(6870),p=u(4870),f=u.n(p),v=u(5537),g=u.n(v),h=12;var y=function(e){for(var t=e.length,r=0,a=0;a<t;a++)0!=(65280&e.charCodeAt(a))&&(r+=1),r+=1;return r};const m=(0,l.defineComponent)({name:"ListTagRender",props:{node:e.PropTypes.object,searchKey:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.arrayOf(e.PropTypes.string)]),displayKey:e.PropTypes.string,searchKeyword:e.PropTypes.string,tpl:{type:Function,default:null}},render:function(){var e=this,t=function(t){if(e.searchKeyword){var r=new RegExp("(".concat(e.searchKeyword,")"),"i");return t.replace(r,'<strong class="highlight-text">$1</strong>')}return t};if(this.tpl)return this.tpl(this.node,t,l.h,this);var r=this.node[this.displayKey];return(0,l.createVNode)("div",{class:"bk-selector-node"},[(0,l.createVNode)("span",{class:"text",innerHTML:t(r)},[r])])}}),b=(0,l.defineComponent)({name:"TagRender",props:{node:e.PropTypes.object,displayKey:e.PropTypes.string,tpl:{type:Function,default:null}},render:function(){return this.tpl?this.tpl(this.node,l.h,this):(0,l.createVNode)("div",{class:"tag"},[(0,l.createVNode)("span",{class:"text"},[this.node[this.displayKey]])])}}),T=(0,l.defineComponent)({name:"TagInput",directives:{bkTooltips:s.bkTooltips},props:{modelValue:e.PropTypes.arrayOf(e.PropTypes.string).def([]),placeholder:e.PropTypes.string.def("请输入并按 Enter 结束"),list:e.PropTypes.arrayOf(e.PropTypes.object).def([]),disabled:e.PropTypes.bool.def(!1),tooltipKey:e.PropTypes.string.def(""),saveKey:e.PropTypes.string.def("id"),displayKey:e.PropTypes.string.def("name"),hasDeleteIcon:e.PropTypes.bool.def(!1),clearable:e.PropTypes.bool.def(!0),trigger:e.PropTypes.commonType(["focus","search"]).def("search"),searchKey:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.arrayOf(e.PropTypes.string)]).def("name"),useGroup:e.PropTypes.bool.def(!1),allowCreate:e.PropTypes.bool.def(!1),maxData:e.PropTypes.number.def(-1),maxResult:e.PropTypes.number.def(10),contentMaxHeight:e.PropTypes.number.def(300),contentWidth:e.PropTypes.number.def(190),separator:e.PropTypes.string.def(""),allowNextFocus:e.PropTypes.bool.def(!0),allowAutoMatch:e.PropTypes.bool.def(!1),showClearOnlyHover:e.PropTypes.bool.def(!1),leftSpace:e.PropTypes.number.def(0),createTagValidator:{type:Function,default:null},filterCallback:{type:Function,default:null},tagTpl:{type:Function,default:null},tpl:{type:Function,default:null},pasteFn:{type:Function,default:null},withValidate:{type:Boolean,default:!0}},emits:["update:modelValue","change","select","blur","remove","removeAll"],setup:function(r,s){var u=s.emit,c=(0,e.useFormItem)(),d=(0,l.reactive)({isEdit:!1,isHover:!1,focusItemIndex:r.allowCreate?-1:0}),p=(0,l.reactive)({isShow:!1,width:190,modifiers:[{name:"offset",options:{offset:[0,4]}}]}),f=function(e){var t=(0,l.reactive)({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:t,initPage:function(){var e,r,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.curPage=1,t.totalSize=a.length,t.totalPage=Math.ceil(t.totalSize/t.pageSize)||1;var n=[];if(t.pageSize>0)for(var l=0;l<t.totalSize;l+=t.pageSize)n.push(a.slice(l,l+t.pageSize));(e=t.renderListPaged).splice.apply(e,[0,t.renderListPaged.length].concat(n)),(r=t.curPageList).splice.apply(r,[0,t.curPageList.length].concat(o(t.renderListPaged[t.curPage-1]||[])))},pageChange:function(e){var r;t.curPage=e,(r=t.curPageList).splice.apply(r,[t.curPageList.length,0].concat(o(t.renderListPaged[t.curPage-1]||[]))),t.isPageLoading=!1}}}((0,l.toRefs)(r).maxResult),v=f.pageState,g=f.initPage,m=f.pageChange,b=(0,l.ref)(""),T=(0,l.ref)(null),L=(0,l.ref)(null),w=(0,l.ref)(null),P=(0,l.ref)(null),x=(0,l.ref)(null),I=(0,l.ref)(null),S=(0,l.ref)(null),C=(0,l.computed)((function(){return!r.disabled&&r.hasDeleteIcon})),K=(0,l.computed)((function(){return 1===r.maxData})),V=(0,l.computed)((function(){return 0===E.selectedTagList.length&&""===b.value&&!d.isEdit})),k=(0,l.computed)((function(){return r.clearable&&!r.disabled&&0!==E.selectedTagList.length&&(!r.showClearOnlyHover||d.isHover)})),N=(0,l.computed)((function(){return{"bk-tag-input-trigger":!0,active:d.isEdit,disabled:r.disabled}}));(0,l.watch)([function(){return o(r.modelValue)},function(){return o(r.list)}],(function(){var e;(0,l.nextTick)((function(){z()})),r.withValidate&&(null===(e=null==c?void 0:c.validate)||void 0===e||e.call(c,"change"))})),(0,l.watch)(b,(0,i.debounce)((function(){var e=0!==v.curPageList.length,t=b.value;""!==t&&e||""===t&&"focus"===r.trigger&&e?p.isShow=!0:"focus"===r.trigger&&e||(p.isShow=!1)}),150)),(0,l.watch)((function(){return p.isShow}),(function(e){A(),e&&x.value&&((0,l.nextTick)((function(){x.value.scrollTop=0})),x.value.removeEventListener("scroll",O),x.value.addEventListener("scroll",O))}));var A=function(){var e,t,r=K.value?0:null===(e=P.value)||void 0===e?void 0:e.offsetLeft;p.modifiers=[{name:"offset",options:{offset:[r,4]}}],null===(t=I.value)||void 0===t||t.update()},O=function(){if(!v.isPageLoading&&0!==x.value.scrollTop){var e=x.value;if(e.scrollTop+e.offsetHeight>=e.scrollHeight){var t=v.curPage+1;t<=v.totalPage&&(v.isPageLoading=!0,setTimeout((function(){m(t)}),500))}}},R=function(){var e;return Array.from((null===(e=w.value)||void 0===e?void 0:e.childNodes)||[]).filter((function(e){return e.nodeType!==Node.TEXT_NODE}))},j=function(e){if(!r.disabled){if(null==e?void 0:e.target){var t=e.target.className;(t.indexOf("bk-tag-input-trigger")>-1||t.indexOf("tag-list")>-1)&&w.value.appendChild(P.value)}clearTimeout(S.value),K.value&&D.value.length&&(E.tagListCache=o(D.value),E.selectedTagListCache=o(E.selectedTagList),b.value=E.selectedTagListCache[0][r.saveKey],J(E.selectedTagList[0],0),G()),d.isEdit=!0,(0,l.nextTick)((function(){var e;null===(e=T.value)||void 0===e||e.focus(),"focus"===r.trigger&&0!==E.localList.length&&(M(),p.isShow?A():p.isShow=!0)}))}},E=(0,l.reactive)({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),D=(0,l.computed)((function(){return E.selectedTagList.map((function(e){return e[r.saveKey]}))})),F=function(e){var t=(0,l.toRefs)(e),r=t.useGroup,a=t.saveKey,n=t.displayKey,i=t.list,s=(0,l.reactive)([]);return(0,l.watch)([r,a,n,i],(function(){s.splice(0,s.length);var e=i.value;r.value&&(e=i.value.reduce((function(e,t){var r=[];return t.children&&(r=t.children.map((function(e){return Object.assign({group:{groupId:t[a.value],groupName:t[n.value]}},e)}))),e.concat(r)}),[])),function(e){for(var t=e.length,r=0;r<t;r+=3e4){var a=e.slice(r,Math.min(r+3e4,t));s.push.apply(s,o(a))}}(e)}),{immediate:!0,deep:!0}),s}(r),q=(0,l.computed)((function(){if(r.useGroup){var e={};return v.curPageList.forEach((function(t,r){t.__index__=r,e[t.group.groupId]||(e[t.group.groupId]={id:t.group.groupId,name:t.group.groupName,children:[]}),e[t.group.groupId].children.push(t)})),Object.keys(e).map((function(t){return e[t]}))}return v.curPageList})),z=function(){var e=r.saveKey,t=r.modelValue,a=r.displayKey,l=r.allowCreate,i=r.trigger;E.selectedTagList=[],E.localList=o(F),t.length&&(t.forEach((function(t){var r=E.localList.find((function(r){return t===r[e]}));if(void 0!==r)E.selectedTagList.push(r);else if(l&&!D.value.includes(t)){var o;E.selectedTagList.push((n(o={},e,t),n(o,a,t),o))}})),K.value||(E.localList=E.localList.filter((function(r){return!t.includes(r[e])})))),"focus"===i&&M()},M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=r.searchKey,a=r.filterCallback,n=e.toLowerCase(),o=[];if("function"==typeof a)o=a(n,t,E.localList)||[];else if(Array.isArray(t)){var l=t.map((function(e){return E.localList.filter((function(t){return-1!==t[e].toLowerCase().indexOf(n)}))}));o=Array.from(new Set(l.flat()))}else o=E.localList.filter((function(e){return-1!==e[t].toLowerCase().indexOf(n)}));g(o)};(0,l.onMounted)((function(){z()}));var _=function(){b.value=""},H=function(){if(K.value)return 0;var e=R().findIndex((function(e){return"tagInputItem"===e.id}));return e>=0?e:0},B=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t&&e){var a=t;r&&(a=t.nextElementSibling||null),t.parentNode.insertBefore(e,a)}},G=function(e){var t=r.maxData,a=r.trigger,n=r.allowCreate;if(-1===t||t>D.value.length){var o=((null==e?void 0:e.target)?e.target:b).value,l=y(o);l?(M(o),T.value.style.width="".concat(l*h,"px")):"focus"===a&&M()}else Z(),b.value="",p.isShow=!1;d.isEdit=!0,d.focusItemIndex=n?-1:0},Z=function(){S.value=setTimeout((function(){var e,t,n,o=b.value;if(_(),d.isEdit=!1,K.value){var l=(t=E.tagListCache,n=1,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,o=[],l=!0,i=!1;try{for(r=r.call(e);!(l=(a=r.next()).done)&&(o.push(a.value),!t||o.length!==t);l=!0);}catch(e){i=!0,n=e}finally{try{l||null==r.return||r.return()}finally{if(i)throw n}}return o}}(t,n)||a(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];o&&o===l&&E.selectedTagListCache.length?X(E.selectedTagListCache[0],"select"):W("remove")}else if(r.allowAutoMatch&&o){var i=v.curPageList.find((function(e){return Array.isArray(r.searchKey)?r.searchKey.map((function(t){return e[t]})).includes(o):e[r.searchKey]===o}));i?U(i,"select"):r.allowCreate&&U(o,"custom")}p.isShow=!1,u("blur",o,D.value),null===(e=null==c?void 0:c.validate)||void 0===e||e.call(c,"blur")}),200)},U=function(e,t,r){null==r||r.stopPropagation(),e&&!e.disabled&&(K.value&&(E.tagListCache=[],E.selectedTagListCache=[],E.selectedTagList=[]),X(e,t),W("select"),_(),p.isShow=!1)},W=function(e,t){u("change",D.value),u(e,t),u("update:modelValue",D.value)},$=function(){var e=x.value.clientHeight,t=x.value.getBoundingClientRect().y;(0,l.nextTick)((function(){var r=x.value.querySelector(".bk-selector-actived");if(r){var a=r.clientHeight,n=r.getBoundingClientRect().y;n<t&&(x.value.scrollTop=x.value.scrollTop-(t-n));var o=n+a-t;o>e&&(x.value.scrollTop=x.value.scrollTop+o-e)}}))},X=function(e,a){if(!(E.selectedTagList.length>=r.maxData&&-1!==r.maxData)){var i,s=r.separator,u=r.saveKey,c=r.displayKey,d=r.createTagValidator,p=H(),f=1,v=!1,g=function(e){return"function"!=typeof d||d(e)},y=function(e){return E.localList.find((function(t){return t[u]===e}))};if("custom"===a)if(s){var m,b=e.split(s),L=(b=b.filter((function(e){return(null==e?void 0:e.trim())&&!D.value.includes(e)&&g(e)}))).map((function(e){var t;return y(e)||(n(t={},u,e),n(t,c,e),t)}));b.length&&((m=E.selectedTagList).splice.apply(m,[p,0].concat(o(L))),f=L.length,v=!0)}else{var w="object"===t(e);if(void 0!==(i=(i=w?e[u]:e.trim()).replace(/\s+/g,""))&&!D.value.includes(i)&&g(i)){var x,I=y(i)||(w?e:(n(x={},u,i),n(x,c,i),x));E.selectedTagList.splice(p,0,I),v=!0}}else e&&(void 0===(i=e[u])||D.value.includes(i)||(E.selectedTagList.splice(p,0,e),v=!0));v&&(0,l.nextTick)((function(){for(var e=1;e<=f;e++){var t=R()[p+e];B(t,P.value)}T.value.style.width="".concat(h,"px"),K.value||(r.allowNextFocus&&j(),E.localList=E.localList.filter((function(e){return!D.value.includes(e[u])})))}))}},J=function(e,t){E.selectedTagList.splice(t,1);var a=F.some((function(t){return t===e[r.saveKey]}));(r.allowCreate&&a||!r.allowCreate)&&!K.value&&E.localList.push(e)};return Object.assign(Object.assign(Object.assign(Object.assign({popoverProps:p},(0,l.toRefs)(d)),(0,l.toRefs)(E)),(0,l.toRefs)(v)),{isShowPlaceholder:V,isShowClear:k,curInputValue:b,formatList:F,renderList:q,showTagClose:C,tagInputRef:T,bkTagSelectorRef:L,tagListRef:w,tagInputItemRef:P,selectorListRef:x,popoverRef:I,triggerClass:N,focusInputTrigger:j,activeClass:function(e,t){var a={"bk-selector-actived":!1,"bk-selector-selected":D.value.includes(e[r.saveKey])};return r.useGroup?a["bk-selector-actived"]=e.__index__===d.focusItemIndex:a["bk-selector-actived"]=t===d.focusItemIndex,a},handleInput:G,handleFocus:function(){var e;p.width=K.value?null===(e=L.value)||void 0===e?void 0:e.clientWidth:r.contentWidth},handleBlur:Z,handleTagSelected:U,handleTagRemove:function(e,t,r){null==r||r.stopPropagation(),J(e,t),_(),W("remove",e),T.value.style.width="".concat(h,"px")},handleClear:function(e){e.stopPropagation();var t=E.selectedTagList;E.selectedTagList=[];var a,n=F.filter((function(e){return t.some((function(t){return t[r.saveKey]===e[r.saveKey]}))}));(!r.allowCreate||0===n.length)&&r.allowCreate||K.value||(a=E.localList).push.apply(a,o(n)),W("removeAll")},tagFocus:function(e){r.disabled||(B(P.value,e.currentTarget,!0),T.value.style.width="".concat(h,"px"),p.isShow&&A())},handleKeydown:function(e){if(!v.isPageLoading){var t=e.target.value,a=y(t),n=H(),o=R();switch(e.code){case"ArrowUp":if(e.preventDefault(),!p.isShow)return;d.focusItemIndex=d.focusItemIndex-1,d.focusItemIndex=d.focusItemIndex<0?-1:d.focusItemIndex,-1===d.focusItemIndex&&(d.focusItemIndex=v.curPageList.length-1),$();break;case"ArrowDown":if(e.preventDefault(),!p.isShow)return;d.focusItemIndex=d.focusItemIndex+1,d.focusItemIndex=d.focusItemIndex>v.curPageList.length-1?v.curPageList.length:d.focusItemIndex,d.focusItemIndex===v.curPageList.length&&(d.focusItemIndex=0),$();break;case"ArrowLeft":if(d.isEdit=!0,!a){if(n<1)return;B(P.value,o[n-1]),j()}break;case"ArrowRight":if(d.isEdit=!0,!a){if(n===o.length-1)return;B(o[n+1],P.value),j()}break;case"Enter":case"NumpadEnter":!r.allowCreate&&p.isShow||r.allowCreate&&d.focusItemIndex>=0&&p.isShow?U(v.curPageList[d.focusItemIndex],"select",e):r.allowCreate&&U(b.value,"custom",e),e.preventDefault();break;case"Backspace":0===n||b.value||function(e,t){var a=R();B(P.value,a[e-1]),E.selectedTagList.splice(e-1,1),j();var n=F.some((function(e){return e===t[r.saveKey]}));(r.allowCreate&&n||!r.allowCreate)&&!K.value&&E.localList.push(t),T.value="".concat(h,"px"),W("remove")}(n,E.selectedTagList[n-1])}}},handlePaste:function(e){if(e.preventDefault(),K.value)return!1;var t=r.maxData,a=r.saveKey,l=r.pasteFn,i=e.clipboardData.getData("text"),s=l?l(i):function(e){var t=[];return e.split(";").forEach((function(e){if(e.match(/^[a-zA-Z][a-zA-Z_]+/g)){var a,o=e.match(/^[a-zA-Z][a-zA-Z_]+/g).join("");t.push((n(a={},r.saveKey,o),n(a,r.displayKey,o),a))}})),t}(i),u=s.map((function(e){return e[a]}));if(u.length){var c=R(),d=H(),p=E.localList.map((function(e){return e[a]}));if(u=u.filter((function(e){return(null==e?void 0:e.trim())&&!D.value.includes(e)&&p.includes(e)})),-1!==t){var f=E.selectedTagList.length;if(f<t){var v=t-f;u.length>v&&(u=o(u.slice(0,v)))}else u=[]}var g,y=E.localList.filter((function(e){return u.includes(e[a])}));u.length&&((g=E.selectedTagList).splice.apply(g,[d,0].concat(o(y))),B(P.value,c[d]),T.value.style.width="".concat(h,"px"),E.localList=E.localList.filter((function(e){return!u.includes(e[a])})),W("select"),j())}}})},render:function(){var e=this;return(0,l.createVNode)("div",{class:"bk-tag-input",ref:"bkTagSelectorRef",onClick:this.focusInputTrigger,onMouseenter:function(){return e.isHover=!0},onMouseleave:function(){return e.isHover=!1}},[(0,l.createVNode)(g(),{ref:"popoverRef",theme:"light",trigger:"manual",placement:"bottom-start",arrow:!1,width:this.popoverProps.width,isShow:this.popoverProps.isShow,modifiers:this.popoverProps.modifiers},{default:function(){var t,r,a;return(0,l.createVNode)("div",{class:e.triggerClass},[(0,l.createVNode)("ul",{class:"tag-list",ref:"tagListRef",style:{marginLeft:"".concat(e.leftSpace,"px")}},[e.selectedTagList.map((function(t,r){var a={boundary:"window",theme:"light",distance:12,content:t[e.tooltipKey],disabled:!e.tooltipKey};return(0,l.withDirectives)((0,l.createVNode)("li",{class:"tag-item",onClick:e.tagFocus},[(0,l.createVNode)(b,{node:t,tpl:e.tagTpl,displayKey:e.displayKey},null),e.showTagClose?(0,l.createVNode)(d.Error,{class:"remove-tag",onClick:e.handleTagRemove.bind(e,t,r)},null):null]),[[(0,l.resolveDirective)("bk-tooltips"),a]])})),(0,l.withDirectives)((0,l.createVNode)("li",{ref:"tagInputItemRef",id:"tagInputItem",class:"tag-input-item",role:"input"},[(0,l.withDirectives)((0,l.createVNode)("input",{type:"text",class:"tag-input",ref:"tagInputRef","onUpdate:modelValue":function(t){return e.curInputValue=t},onInput:e.handleInput,onFocus:e.handleFocus,onBlur:e.handleBlur,onKeydown:e.handleKeydown,onPaste:e.handlePaste},null),[[l.vModelText,e.curInputValue]])]),[[l.vShow,e.isEdit]])]),(0,l.withDirectives)((0,l.createVNode)("p",{class:"placeholder"},[e.placeholder]),[[l.vShow,e.isShowPlaceholder]]),null!==(a=null===(r=null===(t=e.$slots)||void 0===t?void 0:t.suffix)||void 0===r?void 0:r.call(t))&&void 0!==a?a:e.isShowClear&&(0,l.createVNode)(d.Close,{class:"clear-icon",onClick:e.handleClear},null)])},content:function(){return(0,l.createVNode)("div",{class:"bk-selector-list"},[(0,l.createVNode)("ul",{ref:"selectorListRef",style:{"max-height":"".concat(e.contentMaxHeight,"px")},class:"outside-ul"},[e.useGroup?e.renderList.map((function(t){return(0,l.createVNode)("li",{class:"bk-selector-group-item"},[(0,l.createVNode)("span",{class:"group-name"},[t.name,(0,l.createTextVNode)(" ("),t.children.length,(0,l.createTextVNode)(")")]),(0,l.createVNode)("ul",{class:"bk-selector-group-list-item"},[t.children.map((function(t,r){return(0,l.createVNode)("li",{class:["bk-selector-list-item",{disabled:t.disabled},e.activeClass(t,r)],onClick:e.handleTagSelected.bind(e,t,"select")},[(0,l.createVNode)(m,{node:t,displayKey:e.displayKey,tpl:e.tpl,searchKey:e.searchKey,searchKeyword:e.curInputValue},null)])}))])])})):e.renderList.map((function(t,r){return(0,l.createVNode)("li",{class:["bk-selector-list-item",{disabled:t.disabled},e.activeClass(t,r)],onClick:e.handleTagSelected.bind(e,t,"select")},[(0,l.createVNode)(m,{node:t,displayKey:e.displayKey,tpl:e.tpl,searchKey:e.searchKey,searchKeyword:e.curInputValue},null)])})),e.isPageLoading?(0,l.createVNode)("li",{class:"bk-selector-list-item loading"},[(0,l.createVNode)(f(),{theme:"primary",size:p.BkLoadingSize.Small},null)]):null])])}})])}}),L=(0,e.withInstall)(T)})(),c})()));
@@ -1,4 +1,4 @@
1
- import { Ref } from 'vue';
1
+ import { type Ref } from 'vue';
2
2
  declare const _default: import("vue").DefineComponent<{
3
3
  modelValue: import("vue-types").VueTypeDef<string[]> & {
4
4
  default: () => string[];
@@ -134,6 +134,10 @@ declare const _default: import("vue").DefineComponent<{
134
134
  type: import("vue").PropType<(value: string) => any[]>;
135
135
  default: any;
136
136
  };
137
+ withValidate: {
138
+ type: BooleanConstructor;
139
+ default: boolean;
140
+ };
137
141
  }, {
138
142
  isShowPlaceholder: import("vue").ComputedRef<boolean>;
139
143
  isShowClear: import("vue").ComputedRef<boolean>;
@@ -325,6 +329,10 @@ declare const _default: import("vue").DefineComponent<{
325
329
  type: import("vue").PropType<(value: string) => any[]>;
326
330
  default: any;
327
331
  };
332
+ withValidate: {
333
+ type: BooleanConstructor;
334
+ default: boolean;
335
+ };
328
336
  }>> & {
329
337
  onBlur?: (...args: any[]) => any;
330
338
  onChange?: (...args: any[]) => any;
@@ -343,6 +351,7 @@ declare const _default: import("vue").DefineComponent<{
343
351
  clearable: boolean;
344
352
  showClearOnlyHover: boolean;
345
353
  modelValue: string[];
354
+ withValidate: boolean;
346
355
  allowCreate: boolean;
347
356
  displayKey: string;
348
357
  searchKey: string | string[];
@@ -107,8 +107,8 @@
107
107
  --table-row-hover-bg-color: #f5f7fa;
108
108
  --table-row-active-bg-color: #f0f1f5;
109
109
  --cascader-panel-border-color: #dcdee5;
110
- --cascader-panel-hover: #eaf3ff;
111
- --cascader-panel-active: #f4f6fa;
110
+ --cascader-panel-hover: #f5f7fa;
111
+ --cascader-panel-active: #e1ecff;
112
112
  --cascader-panel-disabled-bg: #fff;
113
113
  }
114
114
  .bk-tag-input {
@@ -126,6 +126,10 @@ declare const tagProps: () => {
126
126
  type: PropType<(value: string) => any[]>;
127
127
  default: any;
128
128
  };
129
+ withValidate: {
130
+ type: BooleanConstructor;
131
+ default: boolean;
132
+ };
129
133
  };
130
134
  export default tagProps;
131
135
  export declare type TagProps = Partial<ExtractPropTypes<ReturnType<typeof tagProps>>>;
@@ -107,8 +107,8 @@
107
107
  --table-row-hover-bg-color: #f5f7fa;
108
108
  --table-row-active-bg-color: #f0f1f5;
109
109
  --cascader-panel-border-color: #dcdee5;
110
- --cascader-panel-hover: #eaf3ff;
111
- --cascader-panel-active: #f4f6fa;
110
+ --cascader-panel-hover: #f5f7fa;
111
+ --cascader-panel-active: #e1ecff;
112
112
  --cascader-panel-disabled-bg: #fff;
113
113
  }
114
114
  * {
@@ -30,9 +30,9 @@ declare const Transfer: {
30
30
  $props: Partial<{
31
31
  title: string[];
32
32
  extCls: string;
33
+ searchPlaceholder: string;
33
34
  displayKey: string;
34
35
  sortable: boolean;
35
- searchPlaceholder: string;
36
36
  settingKey: string;
37
37
  sortKey: string;
38
38
  showOverflowTips: boolean;
@@ -96,7 +96,7 @@ declare const Transfer: {
96
96
  }>> & {
97
97
  onChange?: (...args: any[]) => any;
98
98
  "onUpdate:targetList"?: (...args: any[]) => any;
99
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "title" | "extCls" | "displayKey" | "sortable" | "searchPlaceholder" | "settingKey" | "sortKey" | "showOverflowTips" | "searchable" | "sourceList" | "targetList" | "emptyContent">;
99
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "title" | "extCls" | "searchPlaceholder" | "displayKey" | "sortable" | "settingKey" | "sortKey" | "showOverflowTips" | "searchable" | "sourceList" | "targetList" | "emptyContent">;
100
100
  $attrs: {
101
101
  [x: string]: unknown;
102
102
  };
@@ -180,9 +180,9 @@ declare const Transfer: {
180
180
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:targetList")[], string, {
181
181
  title: string[];
182
182
  extCls: string;
183
+ searchPlaceholder: string;
183
184
  displayKey: string;
184
185
  sortable: boolean;
185
- searchPlaceholder: string;
186
186
  settingKey: string;
187
187
  sortKey: string;
188
188
  showOverflowTips: boolean;
@@ -351,9 +351,9 @@ declare const Transfer: {
351
351
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:targetList")[], "change" | "update:targetList", {
352
352
  title: string[];
353
353
  extCls: string;
354
+ searchPlaceholder: string;
354
355
  displayKey: string;
355
356
  sortable: boolean;
356
- searchPlaceholder: string;
357
357
  settingKey: string;
358
358
  sortKey: string;
359
359
  showOverflowTips: boolean;
@@ -146,9 +146,9 @@ declare const _default: import("vue").DefineComponent<{
146
146
  }, {
147
147
  title: string[];
148
148
  extCls: string;
149
+ searchPlaceholder: string;
149
150
  displayKey: string;
150
151
  sortable: boolean;
151
- searchPlaceholder: string;
152
152
  settingKey: string;
153
153
  sortKey: string;
154
154
  showOverflowTips: boolean;
@@ -107,8 +107,8 @@
107
107
  --table-row-hover-bg-color: #f5f7fa;
108
108
  --table-row-active-bg-color: #f0f1f5;
109
109
  --cascader-panel-border-color: #dcdee5;
110
- --cascader-panel-hover: #eaf3ff;
111
- --cascader-panel-active: #f4f6fa;
110
+ --cascader-panel-hover: #f5f7fa;
111
+ --cascader-panel-active: #e1ecff;
112
112
  --cascader-panel-disabled-bg: #fff;
113
113
  }
114
114
  /* 边框色 */
package/lib/tree/tree.css CHANGED
@@ -154,6 +154,9 @@
154
154
  border-bottom: var(--level-line);
155
155
  content: '';
156
156
  }
157
+ .bk-tree .bk-tree-node.is-open .bk-node-action {
158
+ color: #63656e;
159
+ }
157
160
  .bk-tree .bk-tree-node .node-virtual-line {
158
161
  position: absolute;
159
162
  top: -12px;
@@ -171,7 +174,8 @@
171
174
  justify-content: center;
172
175
  }
173
176
  .bk-tree .bk-tree-node .bk-node-action {
174
- margin-right: 2px;
177
+ margin-right: 6px;
178
+ color: #979ba5;
175
179
  }
176
180
  .bk-tree .bk-tree-node .bk-tree-icon {
177
181
  margin: 0 6px 0 4px;
@@ -41,6 +41,12 @@
41
41
  }
42
42
  }
43
43
 
44
+ &.is-open {
45
+ .@{bk-prefix}-node-action {
46
+ color: #63656e;
47
+ }
48
+ }
49
+
44
50
  .node-virtual-line {
45
51
  position: absolute;
46
52
  top: -12px;
@@ -60,7 +66,8 @@
60
66
  }
61
67
 
62
68
  .@{bk-prefix}-node-action {
63
- margin-right: 2px;
69
+ margin-right: 6px;
70
+ color: #979ba5;
64
71
  }
65
72
 
66
73
  .@{bk-prefix}-tree-icon {
@@ -107,8 +107,8 @@
107
107
  --table-row-hover-bg-color: #f5f7fa;
108
108
  --table-row-active-bg-color: #f0f1f5;
109
109
  --cascader-panel-border-color: #dcdee5;
110
- --cascader-panel-hover: #eaf3ff;
111
- --cascader-panel-active: #f4f6fa;
110
+ --cascader-panel-hover: #f5f7fa;
111
+ --cascader-panel-active: #e1ecff;
112
112
  --cascader-panel-disabled-bg: #fff;
113
113
  }
114
114
  .bk-F-scroll-x {
@@ -267,6 +267,9 @@
267
267
  border-bottom: var(--level-line);
268
268
  content: '';
269
269
  }
270
+ .bk-tree .bk-tree-node.is-open .bk-node-action {
271
+ color: #63656e;
272
+ }
270
273
  .bk-tree .bk-tree-node .node-virtual-line {
271
274
  position: absolute;
272
275
  top: -12px;
@@ -284,7 +287,8 @@
284
287
  justify-content: center;
285
288
  }
286
289
  .bk-tree .bk-tree-node .bk-node-action {
287
- margin-right: 2px;
290
+ margin-right: 6px;
291
+ color: #979ba5;
288
292
  }
289
293
  .bk-tree .bk-tree-node .bk-tree-icon {
290
294
  margin: 0 6px 0 4px;
@@ -107,8 +107,8 @@
107
107
  --table-row-hover-bg-color: #f5f7fa;
108
108
  --table-row-active-bg-color: #f0f1f5;
109
109
  --cascader-panel-border-color: #dcdee5;
110
- --cascader-panel-hover: #eaf3ff;
111
- --cascader-panel-active: #f4f6fa;
110
+ --cascader-panel-hover: #f5f7fa;
111
+ --cascader-panel-active: #e1ecff;
112
112
  --cascader-panel-disabled-bg: #fff;
113
113
  }
114
114
  @keyframes loading-scale-animate {