bkui-vue 0.0.1-beta.360 → 0.0.1-beta.361
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +32 -32
- package/dist/index.esm.js +81 -19
- package/dist/index.umd.js +32 -32
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/affix.css +0 -357
- package/lib/affix/affix.variable.css +2 -715
- package/lib/alert/alert.css +3 -360
- package/lib/alert/alert.variable.css +2 -715
- package/lib/backtop/backtop.css +3 -360
- package/lib/backtop/backtop.variable.css +2 -715
- package/lib/badge/badge.css +26 -383
- package/lib/badge/badge.variable.css +2 -715
- package/lib/breadcrumb/breadcrumb.css +5 -362
- package/lib/breadcrumb/breadcrumb.variable.css +2 -715
- package/lib/button/button.css +115 -472
- package/lib/button/button.variable.css +2 -715
- package/lib/card/card.css +4 -361
- package/lib/card/card.variable.css +2 -715
- package/lib/cascader/cascader.css +11 -368
- package/lib/cascader/cascader.variable.css +2 -715
- package/lib/checkbox/checkbox.css +7 -364
- package/lib/checkbox/checkbox.variable.css +2 -715
- package/lib/code-diff/code-diff.css +0 -357
- package/lib/code-diff/code-diff.variable.css +2 -715
- package/lib/collapse/collapse.css +1 -358
- package/lib/collapse/collapse.variable.css +2 -715
- package/lib/color-picker/color-picker.css +0 -357
- package/lib/color-picker/color-picker.variable.css +2 -715
- package/lib/container/container.css +0 -357
- package/lib/container/container.variable.css +2 -715
- package/lib/date-picker/date-picker.css +17 -374
- package/lib/date-picker/date-picker.variable.css +2 -715
- package/lib/divider/divider.css +3 -360
- package/lib/divider/divider.variable.css +2 -715
- package/lib/dropdown/dropdown.css +0 -357
- package/lib/dropdown/dropdown.variable.css +2 -715
- package/lib/exception/exception.css +0 -357
- package/lib/exception/exception.variable.css +2 -715
- package/lib/fixed-navbar/fixed-navbar.css +4 -361
- package/lib/fixed-navbar/fixed-navbar.variable.css +2 -715
- package/lib/form/form.css +0 -357
- package/lib/form/form.variable.css +2 -715
- package/lib/input/input.css +59 -417
- package/lib/input/input.variable.css +2 -715
- package/lib/link/link.css +16 -373
- package/lib/link/link.variable.css +2 -715
- package/lib/loading/loading.css +16 -373
- package/lib/loading/loading.variable.css +2 -715
- package/lib/menu/menu.css +18 -375
- package/lib/menu/menu.variable.css +2 -715
- package/lib/menu/submenu.css +0 -357
- package/lib/menu/submenu.variable.css +2 -715
- package/lib/message/message.css +21 -378
- package/lib/message/message.variable.css +2 -715
- package/lib/navigation/navigation.css +2 -359
- package/lib/navigation/navigation.variable.css +2 -715
- package/lib/notify/notify.css +7 -364
- package/lib/notify/notify.variable.css +2 -715
- package/lib/pagination/pagination.css +1 -358
- package/lib/pagination/pagination.variable.css +2 -715
- package/lib/popover/popover.css +0 -357
- package/lib/popover/popover.variable.css +2 -715
- package/lib/process/process.css +13 -370
- package/lib/process/process.variable.css +2 -715
- package/lib/progress/progress.css +4 -361
- package/lib/progress/progress.variable.css +2 -715
- package/lib/radio/radio.css +30 -387
- package/lib/radio/radio.variable.css +2 -715
- package/lib/resize-layout/resize-layout.css +0 -357
- package/lib/resize-layout/resize-layout.variable.css +2 -715
- package/lib/search-select/index.d.ts +30 -1
- package/lib/search-select/index.js +1 -1
- package/lib/search-select/input.d.ts +3 -1
- package/lib/search-select/search-select.css +37 -394
- package/lib/search-select/search-select.d.ts +19 -1
- package/lib/search-select/search-select.less +5 -5
- package/lib/search-select/search-select.variable.css +7 -720
- package/lib/search-select/selected.d.ts +5 -1
- package/lib/search-select/utils.d.ts +4 -0
- package/lib/select/select.css +24 -381
- package/lib/select/select.variable.css +2 -715
- package/lib/sideslider/sideslider.css +1 -358
- package/lib/sideslider/sideslider.variable.css +2 -715
- package/lib/slider/slider.css +4 -361
- package/lib/slider/slider.variable.css +2 -715
- package/lib/steps/steps.css +36 -393
- package/lib/steps/steps.variable.css +2 -715
- package/lib/styles/mixins/scroll.css +0 -357
- package/lib/styles/mixins/scroll.variable.css +2 -715
- package/lib/styles/themes/themes.less +118 -614
- package/lib/switcher/switcher.css +17 -374
- package/lib/switcher/switcher.variable.css +2 -715
- package/lib/tab/tab.css +21 -378
- package/lib/tab/tab.variable.css +2 -715
- package/lib/table/index.js +1 -1
- package/lib/table/plugins/head-filter.css +2 -359
- package/lib/table/plugins/head-filter.variable.css +2 -715
- package/lib/table/plugins/head-sort.css +0 -357
- package/lib/table/plugins/head-sort.variable.css +2 -715
- package/lib/table/plugins/settings.css +0 -357
- package/lib/table/plugins/settings.variable.css +2 -715
- package/lib/table/table.css +147 -504
- package/lib/table/table.variable.css +149 -1219
- package/lib/table/utils.d.ts +1 -0
- package/lib/table-column/index.js +1 -1
- package/lib/tag/tag.css +5 -362
- package/lib/tag/tag.variable.css +2 -715
- package/lib/tag-input/tag-input.css +18 -375
- package/lib/tag-input/tag-input.variable.css +2 -715
- package/lib/time-picker/time-picker.css +0 -357
- package/lib/time-picker/time-picker.variable.css +2 -715
- package/lib/timeline/timeline.css +19 -376
- package/lib/timeline/timeline.variable.css +2 -715
- package/lib/transfer/transfer.css +12 -369
- package/lib/transfer/transfer.variable.css +2 -715
- package/lib/tree/tree.css +7 -364
- package/lib/tree/tree.variable.css +9 -1079
- package/lib/upload/upload.css +27 -384
- package/lib/upload/upload.variable.css +2 -715
- package/lib/virtual-render/virtual-render.css +0 -357
- package/lib/virtual-render/virtual-render.variable.css +2 -1072
- package/package.json +1 -1
- package/lib/styles/themes/themes.css +0 -357
- package/lib/styles/themes/themes.variable.css +0 -357
package/dist/index.esm.js
CHANGED
@@ -16559,7 +16559,7 @@ var Column = defineComponent({
|
|
16559
16559
|
return () => {
|
16560
16560
|
var _a;
|
16561
16561
|
return createVNode(Fragment, null, [(_a = slots.default) == null ? void 0 : _a.call(slots, {
|
16562
|
-
|
16562
|
+
row: {}
|
16563
16563
|
})]);
|
16564
16564
|
};
|
16565
16565
|
}
|
@@ -17650,7 +17650,6 @@ const getColumnReactWidth = (colmun, orders = ["resizeWidth", "calcWidth", "widt
|
|
17650
17650
|
return (_b = (_a = colmun[orders[0]]) != null ? _a : colmun[orders[1]]) != null ? _b : colmun[orders[2]];
|
17651
17651
|
};
|
17652
17652
|
const resolveColumnWidth = (root, colgroups, autoWidth = COL_MIN_WIDTH, offsetWidth = 0) => {
|
17653
|
-
console.log("resolveColumnWidth");
|
17654
17653
|
const {
|
17655
17654
|
width
|
17656
17655
|
} = root.getBoundingClientRect() || {};
|
@@ -17756,6 +17755,10 @@ const observerResize = (root, callbackFn, delay = 60, immediate = false, resizer
|
|
17756
17755
|
return {
|
17757
17756
|
start: () => {
|
17758
17757
|
resizeObserver.observe(root);
|
17758
|
+
},
|
17759
|
+
disconnect: () => {
|
17760
|
+
resizeObserver.unobserve(root);
|
17761
|
+
resizeObserver.disconnect();
|
17759
17762
|
}
|
17760
17763
|
};
|
17761
17764
|
};
|
@@ -19356,6 +19359,9 @@ const useClass = (props2, targetColumns, root, reactiveProp, pageData) => {
|
|
19356
19359
|
}
|
19357
19360
|
};
|
19358
19361
|
const updateBorderClass = (root2) => {
|
19362
|
+
if (!root2) {
|
19363
|
+
return;
|
19364
|
+
}
|
19359
19365
|
const querySelector = props2.virtualEnabled ? `.${resolveClassName("virtual-section")}` : `.${resolveClassName("table-body-content")}`;
|
19360
19366
|
const rootBody = root2.querySelector(".bk-table-body");
|
19361
19367
|
hasScrollY.value = hasRootScrollY(rootBody, querySelector, 0);
|
@@ -19943,6 +19949,9 @@ var Component$e = defineComponent({
|
|
19943
19949
|
};
|
19944
19950
|
onMounted(() => {
|
19945
19951
|
observerIns = observerResize(root.value, () => {
|
19952
|
+
if (!root.value) {
|
19953
|
+
return;
|
19954
|
+
}
|
19946
19955
|
if (props2.height === "100%" || props2.height === "auto") {
|
19947
19956
|
resetTableHeight(root.value);
|
19948
19957
|
}
|
@@ -19953,6 +19962,7 @@ var Component$e = defineComponent({
|
|
19953
19962
|
observerIns.start();
|
19954
19963
|
});
|
19955
19964
|
onBeforeUnmount(() => {
|
19965
|
+
observerIns.disconnect();
|
19956
19966
|
observerIns = null;
|
19957
19967
|
tableRender.destroy();
|
19958
19968
|
});
|
@@ -38244,6 +38254,11 @@ var SearchSelectMenu = defineComponent({
|
|
38244
38254
|
}, [item.name]))])]);
|
38245
38255
|
}
|
38246
38256
|
});
|
38257
|
+
var ValueBehavior = /* @__PURE__ */ ((ValueBehavior2) => {
|
38258
|
+
ValueBehavior2["ALL"] = "all";
|
38259
|
+
ValueBehavior2["NEEDKEY"] = "need-key";
|
38260
|
+
return ValueBehavior2;
|
38261
|
+
})(ValueBehavior || {});
|
38247
38262
|
const SEARCH_SLECT_PROVIDER_KEY = Symbol("SEARCH_SLECT_PROVIDER_KEY");
|
38248
38263
|
const useSearchSelectProvider = (data2) => {
|
38249
38264
|
provide(SEARCH_SLECT_PROVIDER_KEY, data2);
|
@@ -38356,7 +38371,8 @@ var SearchSelectInput = defineComponent({
|
|
38356
38371
|
default: SearchInputMode.DEFAULT
|
38357
38372
|
},
|
38358
38373
|
getMenuList: Function,
|
38359
|
-
validateValues: Function
|
38374
|
+
validateValues: Function,
|
38375
|
+
valueBehavior: String
|
38360
38376
|
},
|
38361
38377
|
emits: ["focus", "add", "delete"],
|
38362
38378
|
setup(props2, {
|
@@ -38397,14 +38413,20 @@ var SearchSelectInput = defineComponent({
|
|
38397
38413
|
var _a;
|
38398
38414
|
if (((_a = menuList.value) == null ? void 0 : _a.some((item) => !item.disabled)) && showPopover.value) {
|
38399
38415
|
if (!isBindEvent) {
|
38400
|
-
|
38416
|
+
if (props2.valueBehavior === ValueBehavior.NEEDKEY) {
|
38417
|
+
menuHoverId.value = menuList.value.find((item) => !item.disabled).id;
|
38418
|
+
} else {
|
38419
|
+
menuHoverId.value = "";
|
38420
|
+
}
|
38401
38421
|
isBindEvent = true;
|
38402
38422
|
document.addEventListener("keydown", handleDocumentKeydown);
|
38403
38423
|
}
|
38404
38424
|
} else {
|
38405
38425
|
document.removeEventListener("keydown", handleDocumentKeydown);
|
38406
38426
|
isBindEvent = false;
|
38407
|
-
|
38427
|
+
if (props2.valueBehavior !== ValueBehavior.NEEDKEY) {
|
38428
|
+
menuHoverId.value = "";
|
38429
|
+
}
|
38408
38430
|
}
|
38409
38431
|
});
|
38410
38432
|
function handleDocumentKeydown(e) {
|
@@ -38430,7 +38452,7 @@ var SearchSelectInput = defineComponent({
|
|
38430
38452
|
index2 = e.code === "ArrowDown" ? index2 + 1 : index2 - 1;
|
38431
38453
|
index2 = index2 > len - 1 ? 0 : index2 < 0 ? len - 1 : index2;
|
38432
38454
|
const item = menuList.value[index2];
|
38433
|
-
if (!item.disabled) {
|
38455
|
+
if (item && !item.disabled) {
|
38434
38456
|
i2 = -1;
|
38435
38457
|
const dom = document.getElementById(item.id);
|
38436
38458
|
dom == null ? void 0 : dom.focus();
|
@@ -38487,6 +38509,8 @@ var SearchSelectInput = defineComponent({
|
|
38487
38509
|
switch (event.code) {
|
38488
38510
|
case "Enter":
|
38489
38511
|
case "NumpadEnter":
|
38512
|
+
if (props2.valueBehavior === ValueBehavior.NEEDKEY && menuList.value.some((item) => item.id === menuHoverId.value))
|
38513
|
+
return;
|
38490
38514
|
handleKeyEnter(event);
|
38491
38515
|
break;
|
38492
38516
|
case "Backspace":
|
@@ -38499,8 +38523,9 @@ var SearchSelectInput = defineComponent({
|
|
38499
38523
|
async function handleKeyEnter(event) {
|
38500
38524
|
var _a;
|
38501
38525
|
event == null ? void 0 : event.preventDefault();
|
38526
|
+
await new Promise((r2) => setTimeout(r2, 0));
|
38502
38527
|
if (!usingItem.value) {
|
38503
|
-
if (!keyword.value)
|
38528
|
+
if (!keyword.value || props2.valueBehavior === ValueBehavior.NEEDKEY)
|
38504
38529
|
return;
|
38505
38530
|
const value = {
|
38506
38531
|
id: keyword.value,
|
@@ -38544,6 +38569,7 @@ var SearchSelectInput = defineComponent({
|
|
38544
38569
|
emit("add", usingItem.value);
|
38545
38570
|
keyword.value = "";
|
38546
38571
|
usingItem.value = null;
|
38572
|
+
setInputFocus(true);
|
38547
38573
|
return;
|
38548
38574
|
}
|
38549
38575
|
showNoSelectValueError.value = true;
|
@@ -38568,18 +38594,28 @@ var SearchSelectInput = defineComponent({
|
|
38568
38594
|
setInputFocus();
|
38569
38595
|
return;
|
38570
38596
|
}
|
38597
|
+
} else if (!keyword.value) {
|
38598
|
+
usingItem.value = null;
|
38599
|
+
keyword.value = "";
|
38600
|
+
setMenuList();
|
38571
38601
|
}
|
38572
38602
|
onValidate("");
|
38573
38603
|
}
|
38574
38604
|
async function handleSelectItem(item, type) {
|
38575
38605
|
var _a, _b, _c, _d;
|
38576
38606
|
if ((_a = item.value) == null ? void 0 : _a.id) {
|
38577
|
-
|
38578
|
-
|
38579
|
-
|
38580
|
-
|
38581
|
-
|
38582
|
-
|
38607
|
+
if (props2.valueBehavior === ValueBehavior.NEEDKEY && item.value || !props2.validateValues) {
|
38608
|
+
const seleted = new SelectedItem(__spreadProps(__spreadValues({}, item), {
|
38609
|
+
id: (_b = item.realId) != null ? _b : item.id
|
38610
|
+
}), type, valueSplitCode.value);
|
38611
|
+
seleted.addValue(item.value);
|
38612
|
+
setSelectedItem(seleted);
|
38613
|
+
if (props2.valueBehavior === ValueBehavior.NEEDKEY && menuHoverId.value) {
|
38614
|
+
setInputFocus(true);
|
38615
|
+
}
|
38616
|
+
menuHoverId.value = "";
|
38617
|
+
return;
|
38618
|
+
}
|
38583
38619
|
}
|
38584
38620
|
if (!usingItem.value || !((_c = inputRef == null ? void 0 : inputRef.value) == null ? void 0 : _c.innerText)) {
|
38585
38621
|
usingItem.value = new SelectedItem(item, type, valueSplitCode.value);
|
@@ -38587,7 +38623,7 @@ var SearchSelectInput = defineComponent({
|
|
38587
38623
|
const isCondition = type === "condition";
|
38588
38624
|
isCondition && setSelectedItem();
|
38589
38625
|
showPopover.value = isCondition || !!usingItem.value.children.length;
|
38590
|
-
setInputFocus();
|
38626
|
+
setInputFocus(props2.valueBehavior === ValueBehavior.NEEDKEY && !!menuHoverId.value);
|
38591
38627
|
return;
|
38592
38628
|
}
|
38593
38629
|
if (((_d = usingItem.value) == null ? void 0 : _d.type) === "condition") {
|
@@ -38599,7 +38635,11 @@ var SearchSelectInput = defineComponent({
|
|
38599
38635
|
const res = await validateUsingItemValues(item);
|
38600
38636
|
if (!res)
|
38601
38637
|
return;
|
38602
|
-
|
38638
|
+
if (props2.valueBehavior === ValueBehavior.NEEDKEY && usingItem.value.multiple) {
|
38639
|
+
setInputFocus();
|
38640
|
+
} else {
|
38641
|
+
setSelectedItem();
|
38642
|
+
}
|
38603
38643
|
}
|
38604
38644
|
function handleSelectCondtionItem(item) {
|
38605
38645
|
handleSelectItem(item, "condition");
|
@@ -38611,7 +38651,7 @@ var SearchSelectInput = defineComponent({
|
|
38611
38651
|
break;
|
38612
38652
|
case "cancel":
|
38613
38653
|
usingItem.value.values = [];
|
38614
|
-
|
38654
|
+
showPopover.value = false;
|
38615
38655
|
break;
|
38616
38656
|
}
|
38617
38657
|
}
|
@@ -38640,7 +38680,12 @@ var SearchSelectInput = defineComponent({
|
|
38640
38680
|
onValidate("");
|
38641
38681
|
return true;
|
38642
38682
|
}
|
38643
|
-
function setInputFocus() {
|
38683
|
+
function setInputFocus(refleshMenuList = false) {
|
38684
|
+
if (refleshMenuList) {
|
38685
|
+
nextTick().then(() => {
|
38686
|
+
setMenuList();
|
38687
|
+
});
|
38688
|
+
}
|
38644
38689
|
isFocus.value = true;
|
38645
38690
|
showPopover.value = true;
|
38646
38691
|
showNoSelectValueError.value = false;
|
@@ -38712,12 +38757,18 @@ var SearchSelectInput = defineComponent({
|
|
38712
38757
|
list = usingItem.value.children.filter((item) => item.name.toLocaleLowerCase().includes(keyword.value.toLocaleLowerCase()));
|
38713
38758
|
}
|
38714
38759
|
menuList.value = list;
|
38760
|
+
if (props2.valueBehavior === ValueBehavior.NEEDKEY) {
|
38761
|
+
const hoverItem = list.find((item) => !item.disabled);
|
38762
|
+
if (hoverItem && (!menuHoverId.value || menuHoverId.value && !list.some((item) => item.id === menuHoverId.value))) {
|
38763
|
+
menuHoverId.value = hoverItem.id;
|
38764
|
+
}
|
38765
|
+
}
|
38715
38766
|
}
|
38716
38767
|
function setSelectedItem(item) {
|
38717
38768
|
emit("add", item != null ? item : usingItem.value);
|
38718
38769
|
usingItem.value = null;
|
38719
38770
|
keyword.value = "";
|
38720
|
-
setInputFocus();
|
38771
|
+
setInputFocus(props2.valueBehavior === ValueBehavior.NEEDKEY);
|
38721
38772
|
}
|
38722
38773
|
function clearInput() {
|
38723
38774
|
const text = inputRef.value.innerText;
|
@@ -38853,7 +38904,8 @@ var SearchSelected = defineComponent({
|
|
38853
38904
|
default: () => []
|
38854
38905
|
},
|
38855
38906
|
getMenuList: Function,
|
38856
|
-
validateValues: Function
|
38907
|
+
validateValues: Function,
|
38908
|
+
valueBehavior: String
|
38857
38909
|
},
|
38858
38910
|
emits: ["delete"],
|
38859
38911
|
setup(_props, {
|
@@ -38918,6 +38970,7 @@ var SearchSelected = defineComponent({
|
|
38918
38970
|
"clickOutside": this.handleInputOutside,
|
38919
38971
|
"getMenuList": this.getMenuList,
|
38920
38972
|
"validateValues": this.validateValues,
|
38973
|
+
"valueBehavior": this.valueBehavior,
|
38921
38974
|
"onAdd": (v2) => this.handleAddSelected(v2, index2),
|
38922
38975
|
"onFocus": this.handleInputFocus
|
38923
38976
|
}, null)]) : createVNode("li", {
|
@@ -38981,6 +39034,13 @@ const SearchSelectProps = {
|
|
38981
39034
|
uniqueSelect: {
|
38982
39035
|
type: Boolean,
|
38983
39036
|
default: false
|
39037
|
+
},
|
39038
|
+
valueBehavior: {
|
39039
|
+
type: String,
|
39040
|
+
default: ValueBehavior.ALL,
|
39041
|
+
validator(v2) {
|
39042
|
+
return [ValueBehavior.ALL, ValueBehavior.NEEDKEY].includes(v2);
|
39043
|
+
}
|
38984
39044
|
}
|
38985
39045
|
};
|
38986
39046
|
var Component = defineComponent({
|
@@ -39193,6 +39253,7 @@ var Component = defineComponent({
|
|
39193
39253
|
"overflowIndex": this.overflowIndex,
|
39194
39254
|
"getMenuList": this.getMenuList,
|
39195
39255
|
"validateValues": this.validateValues,
|
39256
|
+
"valueBehavior": this.valueBehavior,
|
39196
39257
|
"onDelete": this.handleDeleteSelected
|
39197
39258
|
}, __spreadValues({}, menuSlots)), createVNode("div", {
|
39198
39259
|
"class": "search-container-input"
|
@@ -39205,6 +39266,7 @@ var Component = defineComponent({
|
|
39205
39266
|
"clickOutside": this.handleInputOutside,
|
39206
39267
|
"getMenuList": this.getMenuList,
|
39207
39268
|
"validateValues": this.validateValues,
|
39269
|
+
"valueBehavior": this.valueBehavior,
|
39208
39270
|
"onAdd": this.handleAddSelected,
|
39209
39271
|
"onDelete": this.handleDeleteSelected,
|
39210
39272
|
"onFocus": this.handleInputFocus
|