@dolusoft/vue3-datatable 1.8.38 → 1.8.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.
- package/dist/vue3-datatable.cjs +91 -34
- package/dist/vue3-datatable.css +9 -9
- package/dist/vue3-datatable.js +91 -34
- package/package.json +1 -1
package/dist/vue3-datatable.cjs
CHANGED
|
@@ -2469,7 +2469,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
2469
2469
|
}
|
|
2470
2470
|
return target;
|
|
2471
2471
|
};
|
|
2472
|
-
const ButtonExpand = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
2472
|
+
const ButtonExpand = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-4d01a2fa"]]);
|
|
2473
2473
|
const __default__$4 = {
|
|
2474
2474
|
name: "ButtonRightPanel"
|
|
2475
2475
|
};
|
|
@@ -2495,7 +2495,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2495
2495
|
};
|
|
2496
2496
|
}
|
|
2497
2497
|
});
|
|
2498
|
-
const ButtonRightPanel = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-
|
|
2498
|
+
const ButtonRightPanel = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-d739c6bf"]]);
|
|
2499
2499
|
const sides = ["top", "right", "bottom", "left"];
|
|
2500
2500
|
const alignments = ["start", "end"];
|
|
2501
2501
|
const placements = /* @__PURE__ */ sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
|
|
@@ -5365,10 +5365,10 @@ const _hoisted_17$1 = {
|
|
|
5365
5365
|
key: 0,
|
|
5366
5366
|
class: "bh-filter bh-relative"
|
|
5367
5367
|
};
|
|
5368
|
-
const _hoisted_18$1 = ["onUpdate:modelValue"];
|
|
5369
|
-
const _hoisted_19$1 = ["onUpdate:modelValue"];
|
|
5370
|
-
const _hoisted_20$1 = ["onUpdate:modelValue"];
|
|
5371
|
-
const _hoisted_21$1 = ["onUpdate:modelValue"];
|
|
5368
|
+
const _hoisted_18$1 = ["onUpdate:modelValue", "onKeydown"];
|
|
5369
|
+
const _hoisted_19$1 = ["onUpdate:modelValue", "onKeydown"];
|
|
5370
|
+
const _hoisted_20$1 = ["onUpdate:modelValue", "onKeydown"];
|
|
5371
|
+
const _hoisted_21$1 = ["onUpdate:modelValue", "onKeydown"];
|
|
5372
5372
|
const _hoisted_22$1 = /* @__PURE__ */ vue.createElementVNode("option", { value: void 0 }, "All", -1);
|
|
5373
5373
|
const _hoisted_23$1 = /* @__PURE__ */ vue.createElementVNode("option", { value: true }, "True", -1);
|
|
5374
5374
|
const _hoisted_24$1 = /* @__PURE__ */ vue.createElementVNode("option", { value: false }, "False", -1);
|
|
@@ -5381,10 +5381,10 @@ const _hoisted_26$1 = {
|
|
|
5381
5381
|
key: 1,
|
|
5382
5382
|
class: "bh-filter-input-wrapper"
|
|
5383
5383
|
};
|
|
5384
|
-
const _hoisted_27$1 = ["onUpdate:modelValue"];
|
|
5385
|
-
const _hoisted_28$1 = ["onUpdate:modelValue"];
|
|
5386
|
-
const _hoisted_29$1 = ["onUpdate:modelValue"];
|
|
5387
|
-
const _hoisted_30$1 = ["onUpdate:modelValue"];
|
|
5384
|
+
const _hoisted_27$1 = ["onUpdate:modelValue", "onKeydown"];
|
|
5385
|
+
const _hoisted_28$1 = ["onUpdate:modelValue", "onKeydown"];
|
|
5386
|
+
const _hoisted_29$1 = ["onUpdate:modelValue", "onKeydown"];
|
|
5387
|
+
const _hoisted_30$1 = ["onUpdate:modelValue", "onKeydown"];
|
|
5388
5388
|
const _hoisted_31$1 = /* @__PURE__ */ vue.createElementVNode("option", { value: void 0 }, "All", -1);
|
|
5389
5389
|
const _hoisted_32$1 = /* @__PURE__ */ vue.createElementVNode("option", { value: true }, "True", -1);
|
|
5390
5390
|
const _hoisted_33$1 = /* @__PURE__ */ vue.createElementVNode("option", { value: false }, "False", -1);
|
|
@@ -5423,7 +5423,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5423
5423
|
"filterDatetimeUpdate",
|
|
5424
5424
|
"clearAllFilters"
|
|
5425
5425
|
],
|
|
5426
|
-
setup(__props, { emit: __emit }) {
|
|
5426
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
5427
5427
|
const selectedAll = vue.ref(null);
|
|
5428
5428
|
const props = __props;
|
|
5429
5429
|
const emit = __emit;
|
|
@@ -5436,6 +5436,8 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5436
5436
|
const filterInputs = vue.ref({});
|
|
5437
5437
|
const columnConditions = vue.ref({});
|
|
5438
5438
|
const watchedFields = vue.ref(/* @__PURE__ */ new Set());
|
|
5439
|
+
const debounceTimers = /* @__PURE__ */ new Map();
|
|
5440
|
+
const processChangeFunctions = /* @__PURE__ */ new Map();
|
|
5439
5441
|
const columnsMap = vue.computed(() => {
|
|
5440
5442
|
var _a;
|
|
5441
5443
|
const map = /* @__PURE__ */ new Map();
|
|
@@ -5457,18 +5459,20 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5457
5459
|
filterInputs.value[col.field] = col.value || "";
|
|
5458
5460
|
}
|
|
5459
5461
|
watchedFields.value.add(col.field);
|
|
5460
|
-
|
|
5462
|
+
debounceTimers.set(col.field, null);
|
|
5461
5463
|
vue.watch(
|
|
5462
5464
|
() => filterInputs.value[col.field],
|
|
5463
5465
|
(newValue) => {
|
|
5464
5466
|
const column = columnsMap.value.get(col.field);
|
|
5465
5467
|
if (!column) return;
|
|
5466
5468
|
const isEmpty = newValue === "" || newValue === null || newValue === void 0;
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5469
|
+
const existingTimer = debounceTimers.get(col.field);
|
|
5470
|
+
if (existingTimer) {
|
|
5471
|
+
clearTimeout(existingTimer);
|
|
5472
|
+
debounceTimers.set(col.field, null);
|
|
5470
5473
|
}
|
|
5471
5474
|
const processChange = () => {
|
|
5475
|
+
debounceTimers.set(col.field, null);
|
|
5472
5476
|
if (column.type === "string" || column.type === "String") {
|
|
5473
5477
|
column.value = isEmpty ? "" : typeof newValue === "string" ? newValue.trim() : newValue;
|
|
5474
5478
|
} else {
|
|
@@ -5485,16 +5489,43 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5485
5489
|
}
|
|
5486
5490
|
emit("filterChange");
|
|
5487
5491
|
};
|
|
5492
|
+
processChangeFunctions.set(col.field, processChange);
|
|
5488
5493
|
if (isEmpty) {
|
|
5489
5494
|
processChange();
|
|
5490
5495
|
} else {
|
|
5491
|
-
|
|
5496
|
+
debounceTimers.set(col.field, setTimeout(processChange, 100));
|
|
5492
5497
|
}
|
|
5493
5498
|
}
|
|
5494
5499
|
);
|
|
5495
5500
|
}
|
|
5496
5501
|
});
|
|
5497
5502
|
};
|
|
5503
|
+
const flushFilterDebounce = (field) => {
|
|
5504
|
+
const timer = debounceTimers.get(field);
|
|
5505
|
+
if (timer) {
|
|
5506
|
+
clearTimeout(timer);
|
|
5507
|
+
debounceTimers.set(field, null);
|
|
5508
|
+
const processChange = processChangeFunctions.get(field);
|
|
5509
|
+
if (processChange) {
|
|
5510
|
+
processChange();
|
|
5511
|
+
}
|
|
5512
|
+
}
|
|
5513
|
+
};
|
|
5514
|
+
const flushAllFilterDebounces = () => {
|
|
5515
|
+
debounceTimers.forEach((timer, field) => {
|
|
5516
|
+
if (timer) {
|
|
5517
|
+
clearTimeout(timer);
|
|
5518
|
+
debounceTimers.set(field, null);
|
|
5519
|
+
const processChange = processChangeFunctions.get(field);
|
|
5520
|
+
if (processChange) {
|
|
5521
|
+
processChange();
|
|
5522
|
+
}
|
|
5523
|
+
}
|
|
5524
|
+
});
|
|
5525
|
+
};
|
|
5526
|
+
const handleFilterEnter = (field) => {
|
|
5527
|
+
flushFilterDebounce(field);
|
|
5528
|
+
};
|
|
5498
5529
|
const handleClearAllFilters = () => {
|
|
5499
5530
|
var _a;
|
|
5500
5531
|
Object.keys(filterInputs.value).forEach((key) => {
|
|
@@ -5634,6 +5665,10 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5634
5665
|
}
|
|
5635
5666
|
emit("filterChange");
|
|
5636
5667
|
};
|
|
5668
|
+
__expose({
|
|
5669
|
+
flushFilterDebounce,
|
|
5670
|
+
flushAllFilterDebounces
|
|
5671
|
+
});
|
|
5637
5672
|
return (_ctx, _cache) => {
|
|
5638
5673
|
const _component_VDropdown = vue.resolveComponent("VDropdown");
|
|
5639
5674
|
return vue.openBlock(), vue.createElementBlock("tr", _hoisted_1$1, [
|
|
@@ -5806,16 +5841,18 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5806
5841
|
key: 0,
|
|
5807
5842
|
"onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
|
|
5808
5843
|
type: "text",
|
|
5809
|
-
class: "bh-form-control"
|
|
5810
|
-
|
|
5844
|
+
class: "bh-form-control",
|
|
5845
|
+
onKeydown: vue.withKeys(($event) => handleFilterEnter(col.field), ["enter"])
|
|
5846
|
+
}, null, 40, _hoisted_18$1)), [
|
|
5811
5847
|
[vue.vModelText, filterInputs.value[col.field]]
|
|
5812
5848
|
]) : vue.createCommentVNode("", true),
|
|
5813
5849
|
col.type === "number" || col.type === "integer" || col.type === "Integer" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
5814
5850
|
key: 1,
|
|
5815
5851
|
"onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
|
|
5816
5852
|
type: "number",
|
|
5817
|
-
class: "bh-form-control"
|
|
5818
|
-
|
|
5853
|
+
class: "bh-form-control",
|
|
5854
|
+
onKeydown: vue.withKeys(($event) => handleFilterEnter(col.field), ["enter"])
|
|
5855
|
+
}, null, 40, _hoisted_19$1)), [
|
|
5819
5856
|
[
|
|
5820
5857
|
vue.vModelText,
|
|
5821
5858
|
filterInputs.value[col.field],
|
|
@@ -5830,13 +5867,15 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5830
5867
|
updateValue: (val) => {
|
|
5831
5868
|
filterInputs.value[col.field] = val;
|
|
5832
5869
|
emit("filterDatetimeUpdate", col.field, val);
|
|
5833
|
-
}
|
|
5870
|
+
},
|
|
5871
|
+
onEnter: () => handleFilterEnter(col.field)
|
|
5834
5872
|
}) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
5835
5873
|
key: 1,
|
|
5836
5874
|
"onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
|
|
5837
5875
|
type: "date",
|
|
5838
|
-
class: "bh-form-control"
|
|
5839
|
-
|
|
5876
|
+
class: "bh-form-control",
|
|
5877
|
+
onKeydown: vue.withKeys(($event) => handleFilterEnter(col.field), ["enter"])
|
|
5878
|
+
}, null, 40, _hoisted_20$1)), [
|
|
5840
5879
|
[vue.vModelText, filterInputs.value[col.field]]
|
|
5841
5880
|
])
|
|
5842
5881
|
], 64)) : col.type === "bool" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("select", {
|
|
@@ -5844,8 +5883,9 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5844
5883
|
"onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
|
|
5845
5884
|
class: "bh-form-control",
|
|
5846
5885
|
onClick: _cache[1] || (_cache[1] = //@ts-ignore
|
|
5847
|
-
(...args) => props.isOpenFilter && props.isOpenFilter(...args))
|
|
5848
|
-
|
|
5886
|
+
(...args) => props.isOpenFilter && props.isOpenFilter(...args)),
|
|
5887
|
+
onKeydown: vue.withKeys(($event) => handleFilterEnter(col.field), ["enter"])
|
|
5888
|
+
}, _hoisted_25$1, 40, _hoisted_21$1)), [
|
|
5849
5889
|
[vue.vModelSelect, filterInputs.value[col.field]]
|
|
5850
5890
|
]) : vue.createCommentVNode("", true)
|
|
5851
5891
|
], 64)) : vue.createCommentVNode("", true),
|
|
@@ -5862,8 +5902,9 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5862
5902
|
type: "text",
|
|
5863
5903
|
class: vue.normalizeClass(["bh-form-control", {
|
|
5864
5904
|
"bh-form-control--with-label": hasConditionSet(col) && props.all.useNewColumnFilter
|
|
5865
|
-
}])
|
|
5866
|
-
|
|
5905
|
+
}]),
|
|
5906
|
+
onKeydown: vue.withKeys(($event) => handleFilterEnter(col.field), ["enter"])
|
|
5907
|
+
}, null, 42, _hoisted_27$1)), [
|
|
5867
5908
|
[vue.vModelText, filterInputs.value[col.field]]
|
|
5868
5909
|
]) : vue.createCommentVNode("", true),
|
|
5869
5910
|
col.type === "number" || col.type === "integer" || col.type === "Integer" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
@@ -5872,8 +5913,9 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5872
5913
|
type: "number",
|
|
5873
5914
|
class: vue.normalizeClass(["bh-form-control", {
|
|
5874
5915
|
"bh-form-control--with-label": hasConditionSet(col) && props.all.useNewColumnFilter
|
|
5875
|
-
}])
|
|
5876
|
-
|
|
5916
|
+
}]),
|
|
5917
|
+
onKeydown: vue.withKeys(($event) => handleFilterEnter(col.field), ["enter"])
|
|
5918
|
+
}, null, 42, _hoisted_28$1)), [
|
|
5877
5919
|
[
|
|
5878
5920
|
vue.vModelText,
|
|
5879
5921
|
filterInputs.value[col.field],
|
|
@@ -5889,15 +5931,17 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5889
5931
|
filterInputs.value[col.field] = val;
|
|
5890
5932
|
emit("filterDatetimeUpdate", col.field, val);
|
|
5891
5933
|
},
|
|
5892
|
-
hasLabel: hasConditionSet(col) && props.all.useNewColumnFilter
|
|
5934
|
+
hasLabel: hasConditionSet(col) && props.all.useNewColumnFilter,
|
|
5935
|
+
onEnter: () => handleFilterEnter(col.field)
|
|
5893
5936
|
}) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
5894
5937
|
key: 1,
|
|
5895
5938
|
"onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
|
|
5896
5939
|
type: "date",
|
|
5897
5940
|
class: vue.normalizeClass(["bh-form-control", {
|
|
5898
5941
|
"bh-form-control--with-label": hasConditionSet(col) && props.all.useNewColumnFilter
|
|
5899
|
-
}])
|
|
5900
|
-
|
|
5942
|
+
}]),
|
|
5943
|
+
onKeydown: vue.withKeys(($event) => handleFilterEnter(col.field), ["enter"])
|
|
5944
|
+
}, null, 42, _hoisted_29$1)), [
|
|
5901
5945
|
[vue.vModelText, filterInputs.value[col.field]]
|
|
5902
5946
|
])
|
|
5903
5947
|
], 64)) : col.type === "bool" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("select", {
|
|
@@ -5905,8 +5949,9 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5905
5949
|
"onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
|
|
5906
5950
|
class: "bh-form-control",
|
|
5907
5951
|
onClick: _cache[2] || (_cache[2] = //@ts-ignore
|
|
5908
|
-
(...args) => props.isOpenFilter && props.isOpenFilter(...args))
|
|
5909
|
-
|
|
5952
|
+
(...args) => props.isOpenFilter && props.isOpenFilter(...args)),
|
|
5953
|
+
onKeydown: vue.withKeys(($event) => handleFilterEnter(col.field), ["enter"])
|
|
5954
|
+
}, _hoisted_34$1, 40, _hoisted_30$1)), [
|
|
5910
5955
|
[vue.vModelSelect, filterInputs.value[col.field]]
|
|
5911
5956
|
]) : vue.createCommentVNode("", true)
|
|
5912
5957
|
])) : vue.createCommentVNode("", true),
|
|
@@ -6272,6 +6317,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
6272
6317
|
return (col == null ? void 0 : col.field) || null;
|
|
6273
6318
|
});
|
|
6274
6319
|
const hasAnyActiveFilter = vue.ref(false);
|
|
6320
|
+
const columnHeaderRef = vue.ref(null);
|
|
6275
6321
|
const updateHasAnyActiveFilter = () => {
|
|
6276
6322
|
hasAnyActiveFilter.value = props.columns.some((col) => {
|
|
6277
6323
|
return col.value !== void 0 && col.value !== null && col.value !== "";
|
|
@@ -6575,6 +6621,15 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
6575
6621
|
}
|
|
6576
6622
|
}
|
|
6577
6623
|
return !!column;
|
|
6624
|
+
},
|
|
6625
|
+
/**
|
|
6626
|
+
* Flush all pending filter debounces
|
|
6627
|
+
* Call this before getColumnFilters() when Enter is pressed
|
|
6628
|
+
* to ensure all filter values are immediately processed
|
|
6629
|
+
*/
|
|
6630
|
+
flushAllFilterDebounces() {
|
|
6631
|
+
var _a2, _b2;
|
|
6632
|
+
(_b2 = (_a2 = columnHeaderRef.value) == null ? void 0 : _a2.flushAllFilterDebounces) == null ? void 0 : _b2.call(_a2);
|
|
6578
6633
|
}
|
|
6579
6634
|
});
|
|
6580
6635
|
vue.watch(
|
|
@@ -7068,6 +7123,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
7068
7123
|
})
|
|
7069
7124
|
}, [
|
|
7070
7125
|
vue.createVNode(_sfc_main$1, {
|
|
7126
|
+
ref_key: "columnHeaderRef",
|
|
7127
|
+
ref: columnHeaderRef,
|
|
7071
7128
|
all: props,
|
|
7072
7129
|
expandedrows: expandedrows.value,
|
|
7073
7130
|
currentSortColumn: currentSortColumn.value,
|
package/dist/vue3-datatable.css
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
.expandbtn[data-v-
|
|
2
|
+
.expandbtn[data-v-4d01a2fa] {
|
|
3
3
|
cursor: pointer;
|
|
4
|
-
}
|
|
4
|
+
}
|
|
5
5
|
|
|
6
|
-
.rightpanelbtn[data-v-
|
|
7
|
-
cursor: pointer;
|
|
8
|
-
display: inline-flex;
|
|
9
|
-
align-items: center;
|
|
10
|
-
justify-content: center;
|
|
11
|
-
width: 24px;
|
|
6
|
+
.rightpanelbtn[data-v-d739c6bf] {
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
width: 24px;
|
|
12
12
|
height: 24px;
|
|
13
|
-
}
|
|
13
|
+
}
|
|
14
14
|
.splitpanes{display:flex;width:100%;height:100%}.splitpanes--vertical{flex-direction:row}.splitpanes--horizontal{flex-direction:column}.splitpanes--dragging .splitpanes__pane{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}.splitpanes__pane{width:100%;height:100%;overflow:hidden}.splitpanes--vertical .splitpanes__pane{transition:width .2s ease-out}.splitpanes--horizontal .splitpanes__pane{transition:height .2s ease-out}.splitpanes--dragging .splitpanes__pane{transition:none}.splitpanes__splitter{touch-action:none}.splitpanes--vertical>.splitpanes__splitter{min-width:1px;cursor:col-resize}.splitpanes--horizontal>.splitpanes__splitter{min-height:1px;cursor:row-resize}.splitpanes.default-theme .splitpanes__pane{background-color:#f2f2f2}.splitpanes.default-theme .splitpanes__splitter{background-color:#fff;box-sizing:border-box;position:relative;flex-shrink:0}.splitpanes.default-theme .splitpanes__splitter:before,.splitpanes.default-theme .splitpanes__splitter:after{content:"";position:absolute;top:50%;left:50%;background-color:#00000026;transition:background-color .3s}.splitpanes.default-theme .splitpanes__splitter:hover:before,.splitpanes.default-theme .splitpanes__splitter:hover:after{background-color:#00000040}.splitpanes.default-theme .splitpanes__splitter:first-child{cursor:auto}.default-theme.splitpanes .splitpanes .splitpanes__splitter{z-index:1}.default-theme.splitpanes--vertical>.splitpanes__splitter,.default-theme .splitpanes--vertical>.splitpanes__splitter{width:7px;border-left:1px solid #eee;margin-left:-1px}.default-theme.splitpanes--vertical>.splitpanes__splitter:before,.default-theme.splitpanes--vertical>.splitpanes__splitter:after,.default-theme .splitpanes--vertical>.splitpanes__splitter:before,.default-theme .splitpanes--vertical>.splitpanes__splitter:after{transform:translateY(-50%);width:1px;height:30px}.default-theme.splitpanes--vertical>.splitpanes__splitter:before,.default-theme .splitpanes--vertical>.splitpanes__splitter:before{margin-left:-2px}.default-theme.splitpanes--vertical>.splitpanes__splitter:after,.default-theme .splitpanes--vertical>.splitpanes__splitter:after{margin-left:1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter,.default-theme .splitpanes--horizontal>.splitpanes__splitter{height:7px;border-top:1px solid #eee;margin-top:-1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:before,.default-theme.splitpanes--horizontal>.splitpanes__splitter:after,.default-theme .splitpanes--horizontal>.splitpanes__splitter:before,.default-theme .splitpanes--horizontal>.splitpanes__splitter:after{transform:translate(-50%);width:30px;height:1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:before,.default-theme .splitpanes--horizontal>.splitpanes__splitter:before{margin-top:-2px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:after,.default-theme .splitpanes--horizontal>.splitpanes__splitter:after{margin-top:1px}
|
|
15
15
|
|
|
16
16
|
.left-menu-container {
|
package/dist/vue3-datatable.js
CHANGED
|
@@ -2468,7 +2468,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
2468
2468
|
}
|
|
2469
2469
|
return target;
|
|
2470
2470
|
};
|
|
2471
|
-
const ButtonExpand = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
2471
|
+
const ButtonExpand = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-4d01a2fa"]]);
|
|
2472
2472
|
const __default__$4 = {
|
|
2473
2473
|
name: "ButtonRightPanel"
|
|
2474
2474
|
};
|
|
@@ -2494,7 +2494,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
2494
2494
|
};
|
|
2495
2495
|
}
|
|
2496
2496
|
});
|
|
2497
|
-
const ButtonRightPanel = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-
|
|
2497
|
+
const ButtonRightPanel = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-d739c6bf"]]);
|
|
2498
2498
|
const sides = ["top", "right", "bottom", "left"];
|
|
2499
2499
|
const alignments = ["start", "end"];
|
|
2500
2500
|
const placements = /* @__PURE__ */ sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
|
|
@@ -5364,10 +5364,10 @@ const _hoisted_17$1 = {
|
|
|
5364
5364
|
key: 0,
|
|
5365
5365
|
class: "bh-filter bh-relative"
|
|
5366
5366
|
};
|
|
5367
|
-
const _hoisted_18$1 = ["onUpdate:modelValue"];
|
|
5368
|
-
const _hoisted_19$1 = ["onUpdate:modelValue"];
|
|
5369
|
-
const _hoisted_20$1 = ["onUpdate:modelValue"];
|
|
5370
|
-
const _hoisted_21$1 = ["onUpdate:modelValue"];
|
|
5367
|
+
const _hoisted_18$1 = ["onUpdate:modelValue", "onKeydown"];
|
|
5368
|
+
const _hoisted_19$1 = ["onUpdate:modelValue", "onKeydown"];
|
|
5369
|
+
const _hoisted_20$1 = ["onUpdate:modelValue", "onKeydown"];
|
|
5370
|
+
const _hoisted_21$1 = ["onUpdate:modelValue", "onKeydown"];
|
|
5371
5371
|
const _hoisted_22$1 = /* @__PURE__ */ createElementVNode("option", { value: void 0 }, "All", -1);
|
|
5372
5372
|
const _hoisted_23$1 = /* @__PURE__ */ createElementVNode("option", { value: true }, "True", -1);
|
|
5373
5373
|
const _hoisted_24$1 = /* @__PURE__ */ createElementVNode("option", { value: false }, "False", -1);
|
|
@@ -5380,10 +5380,10 @@ const _hoisted_26$1 = {
|
|
|
5380
5380
|
key: 1,
|
|
5381
5381
|
class: "bh-filter-input-wrapper"
|
|
5382
5382
|
};
|
|
5383
|
-
const _hoisted_27$1 = ["onUpdate:modelValue"];
|
|
5384
|
-
const _hoisted_28$1 = ["onUpdate:modelValue"];
|
|
5385
|
-
const _hoisted_29$1 = ["onUpdate:modelValue"];
|
|
5386
|
-
const _hoisted_30$1 = ["onUpdate:modelValue"];
|
|
5383
|
+
const _hoisted_27$1 = ["onUpdate:modelValue", "onKeydown"];
|
|
5384
|
+
const _hoisted_28$1 = ["onUpdate:modelValue", "onKeydown"];
|
|
5385
|
+
const _hoisted_29$1 = ["onUpdate:modelValue", "onKeydown"];
|
|
5386
|
+
const _hoisted_30$1 = ["onUpdate:modelValue", "onKeydown"];
|
|
5387
5387
|
const _hoisted_31$1 = /* @__PURE__ */ createElementVNode("option", { value: void 0 }, "All", -1);
|
|
5388
5388
|
const _hoisted_32$1 = /* @__PURE__ */ createElementVNode("option", { value: true }, "True", -1);
|
|
5389
5389
|
const _hoisted_33$1 = /* @__PURE__ */ createElementVNode("option", { value: false }, "False", -1);
|
|
@@ -5422,7 +5422,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5422
5422
|
"filterDatetimeUpdate",
|
|
5423
5423
|
"clearAllFilters"
|
|
5424
5424
|
],
|
|
5425
|
-
setup(__props, { emit: __emit }) {
|
|
5425
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
5426
5426
|
const selectedAll = ref(null);
|
|
5427
5427
|
const props = __props;
|
|
5428
5428
|
const emit = __emit;
|
|
@@ -5435,6 +5435,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5435
5435
|
const filterInputs = ref({});
|
|
5436
5436
|
const columnConditions = ref({});
|
|
5437
5437
|
const watchedFields = ref(/* @__PURE__ */ new Set());
|
|
5438
|
+
const debounceTimers = /* @__PURE__ */ new Map();
|
|
5439
|
+
const processChangeFunctions = /* @__PURE__ */ new Map();
|
|
5438
5440
|
const columnsMap = computed(() => {
|
|
5439
5441
|
var _a;
|
|
5440
5442
|
const map = /* @__PURE__ */ new Map();
|
|
@@ -5456,18 +5458,20 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5456
5458
|
filterInputs.value[col.field] = col.value || "";
|
|
5457
5459
|
}
|
|
5458
5460
|
watchedFields.value.add(col.field);
|
|
5459
|
-
|
|
5461
|
+
debounceTimers.set(col.field, null);
|
|
5460
5462
|
watch(
|
|
5461
5463
|
() => filterInputs.value[col.field],
|
|
5462
5464
|
(newValue) => {
|
|
5463
5465
|
const column = columnsMap.value.get(col.field);
|
|
5464
5466
|
if (!column) return;
|
|
5465
5467
|
const isEmpty = newValue === "" || newValue === null || newValue === void 0;
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5468
|
+
const existingTimer = debounceTimers.get(col.field);
|
|
5469
|
+
if (existingTimer) {
|
|
5470
|
+
clearTimeout(existingTimer);
|
|
5471
|
+
debounceTimers.set(col.field, null);
|
|
5469
5472
|
}
|
|
5470
5473
|
const processChange = () => {
|
|
5474
|
+
debounceTimers.set(col.field, null);
|
|
5471
5475
|
if (column.type === "string" || column.type === "String") {
|
|
5472
5476
|
column.value = isEmpty ? "" : typeof newValue === "string" ? newValue.trim() : newValue;
|
|
5473
5477
|
} else {
|
|
@@ -5484,16 +5488,43 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5484
5488
|
}
|
|
5485
5489
|
emit("filterChange");
|
|
5486
5490
|
};
|
|
5491
|
+
processChangeFunctions.set(col.field, processChange);
|
|
5487
5492
|
if (isEmpty) {
|
|
5488
5493
|
processChange();
|
|
5489
5494
|
} else {
|
|
5490
|
-
|
|
5495
|
+
debounceTimers.set(col.field, setTimeout(processChange, 100));
|
|
5491
5496
|
}
|
|
5492
5497
|
}
|
|
5493
5498
|
);
|
|
5494
5499
|
}
|
|
5495
5500
|
});
|
|
5496
5501
|
};
|
|
5502
|
+
const flushFilterDebounce = (field) => {
|
|
5503
|
+
const timer = debounceTimers.get(field);
|
|
5504
|
+
if (timer) {
|
|
5505
|
+
clearTimeout(timer);
|
|
5506
|
+
debounceTimers.set(field, null);
|
|
5507
|
+
const processChange = processChangeFunctions.get(field);
|
|
5508
|
+
if (processChange) {
|
|
5509
|
+
processChange();
|
|
5510
|
+
}
|
|
5511
|
+
}
|
|
5512
|
+
};
|
|
5513
|
+
const flushAllFilterDebounces = () => {
|
|
5514
|
+
debounceTimers.forEach((timer, field) => {
|
|
5515
|
+
if (timer) {
|
|
5516
|
+
clearTimeout(timer);
|
|
5517
|
+
debounceTimers.set(field, null);
|
|
5518
|
+
const processChange = processChangeFunctions.get(field);
|
|
5519
|
+
if (processChange) {
|
|
5520
|
+
processChange();
|
|
5521
|
+
}
|
|
5522
|
+
}
|
|
5523
|
+
});
|
|
5524
|
+
};
|
|
5525
|
+
const handleFilterEnter = (field) => {
|
|
5526
|
+
flushFilterDebounce(field);
|
|
5527
|
+
};
|
|
5497
5528
|
const handleClearAllFilters = () => {
|
|
5498
5529
|
var _a;
|
|
5499
5530
|
Object.keys(filterInputs.value).forEach((key) => {
|
|
@@ -5633,6 +5664,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5633
5664
|
}
|
|
5634
5665
|
emit("filterChange");
|
|
5635
5666
|
};
|
|
5667
|
+
__expose({
|
|
5668
|
+
flushFilterDebounce,
|
|
5669
|
+
flushAllFilterDebounces
|
|
5670
|
+
});
|
|
5636
5671
|
return (_ctx, _cache) => {
|
|
5637
5672
|
const _component_VDropdown = resolveComponent("VDropdown");
|
|
5638
5673
|
return openBlock(), createElementBlock("tr", _hoisted_1$1, [
|
|
@@ -5805,16 +5840,18 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5805
5840
|
key: 0,
|
|
5806
5841
|
"onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
|
|
5807
5842
|
type: "text",
|
|
5808
|
-
class: "bh-form-control"
|
|
5809
|
-
|
|
5843
|
+
class: "bh-form-control",
|
|
5844
|
+
onKeydown: withKeys(($event) => handleFilterEnter(col.field), ["enter"])
|
|
5845
|
+
}, null, 40, _hoisted_18$1)), [
|
|
5810
5846
|
[vModelText, filterInputs.value[col.field]]
|
|
5811
5847
|
]) : createCommentVNode("", true),
|
|
5812
5848
|
col.type === "number" || col.type === "integer" || col.type === "Integer" ? withDirectives((openBlock(), createElementBlock("input", {
|
|
5813
5849
|
key: 1,
|
|
5814
5850
|
"onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
|
|
5815
5851
|
type: "number",
|
|
5816
|
-
class: "bh-form-control"
|
|
5817
|
-
|
|
5852
|
+
class: "bh-form-control",
|
|
5853
|
+
onKeydown: withKeys(($event) => handleFilterEnter(col.field), ["enter"])
|
|
5854
|
+
}, null, 40, _hoisted_19$1)), [
|
|
5818
5855
|
[
|
|
5819
5856
|
vModelText,
|
|
5820
5857
|
filterInputs.value[col.field],
|
|
@@ -5829,13 +5866,15 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5829
5866
|
updateValue: (val) => {
|
|
5830
5867
|
filterInputs.value[col.field] = val;
|
|
5831
5868
|
emit("filterDatetimeUpdate", col.field, val);
|
|
5832
|
-
}
|
|
5869
|
+
},
|
|
5870
|
+
onEnter: () => handleFilterEnter(col.field)
|
|
5833
5871
|
}) : withDirectives((openBlock(), createElementBlock("input", {
|
|
5834
5872
|
key: 1,
|
|
5835
5873
|
"onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
|
|
5836
5874
|
type: "date",
|
|
5837
|
-
class: "bh-form-control"
|
|
5838
|
-
|
|
5875
|
+
class: "bh-form-control",
|
|
5876
|
+
onKeydown: withKeys(($event) => handleFilterEnter(col.field), ["enter"])
|
|
5877
|
+
}, null, 40, _hoisted_20$1)), [
|
|
5839
5878
|
[vModelText, filterInputs.value[col.field]]
|
|
5840
5879
|
])
|
|
5841
5880
|
], 64)) : col.type === "bool" ? withDirectives((openBlock(), createElementBlock("select", {
|
|
@@ -5843,8 +5882,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5843
5882
|
"onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
|
|
5844
5883
|
class: "bh-form-control",
|
|
5845
5884
|
onClick: _cache[1] || (_cache[1] = //@ts-ignore
|
|
5846
|
-
(...args) => props.isOpenFilter && props.isOpenFilter(...args))
|
|
5847
|
-
|
|
5885
|
+
(...args) => props.isOpenFilter && props.isOpenFilter(...args)),
|
|
5886
|
+
onKeydown: withKeys(($event) => handleFilterEnter(col.field), ["enter"])
|
|
5887
|
+
}, _hoisted_25$1, 40, _hoisted_21$1)), [
|
|
5848
5888
|
[vModelSelect, filterInputs.value[col.field]]
|
|
5849
5889
|
]) : createCommentVNode("", true)
|
|
5850
5890
|
], 64)) : createCommentVNode("", true),
|
|
@@ -5861,8 +5901,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5861
5901
|
type: "text",
|
|
5862
5902
|
class: normalizeClass(["bh-form-control", {
|
|
5863
5903
|
"bh-form-control--with-label": hasConditionSet(col) && props.all.useNewColumnFilter
|
|
5864
|
-
}])
|
|
5865
|
-
|
|
5904
|
+
}]),
|
|
5905
|
+
onKeydown: withKeys(($event) => handleFilterEnter(col.field), ["enter"])
|
|
5906
|
+
}, null, 42, _hoisted_27$1)), [
|
|
5866
5907
|
[vModelText, filterInputs.value[col.field]]
|
|
5867
5908
|
]) : createCommentVNode("", true),
|
|
5868
5909
|
col.type === "number" || col.type === "integer" || col.type === "Integer" ? withDirectives((openBlock(), createElementBlock("input", {
|
|
@@ -5871,8 +5912,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5871
5912
|
type: "number",
|
|
5872
5913
|
class: normalizeClass(["bh-form-control", {
|
|
5873
5914
|
"bh-form-control--with-label": hasConditionSet(col) && props.all.useNewColumnFilter
|
|
5874
|
-
}])
|
|
5875
|
-
|
|
5915
|
+
}]),
|
|
5916
|
+
onKeydown: withKeys(($event) => handleFilterEnter(col.field), ["enter"])
|
|
5917
|
+
}, null, 42, _hoisted_28$1)), [
|
|
5876
5918
|
[
|
|
5877
5919
|
vModelText,
|
|
5878
5920
|
filterInputs.value[col.field],
|
|
@@ -5888,15 +5930,17 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5888
5930
|
filterInputs.value[col.field] = val;
|
|
5889
5931
|
emit("filterDatetimeUpdate", col.field, val);
|
|
5890
5932
|
},
|
|
5891
|
-
hasLabel: hasConditionSet(col) && props.all.useNewColumnFilter
|
|
5933
|
+
hasLabel: hasConditionSet(col) && props.all.useNewColumnFilter,
|
|
5934
|
+
onEnter: () => handleFilterEnter(col.field)
|
|
5892
5935
|
}) : withDirectives((openBlock(), createElementBlock("input", {
|
|
5893
5936
|
key: 1,
|
|
5894
5937
|
"onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
|
|
5895
5938
|
type: "date",
|
|
5896
5939
|
class: normalizeClass(["bh-form-control", {
|
|
5897
5940
|
"bh-form-control--with-label": hasConditionSet(col) && props.all.useNewColumnFilter
|
|
5898
|
-
}])
|
|
5899
|
-
|
|
5941
|
+
}]),
|
|
5942
|
+
onKeydown: withKeys(($event) => handleFilterEnter(col.field), ["enter"])
|
|
5943
|
+
}, null, 42, _hoisted_29$1)), [
|
|
5900
5944
|
[vModelText, filterInputs.value[col.field]]
|
|
5901
5945
|
])
|
|
5902
5946
|
], 64)) : col.type === "bool" ? withDirectives((openBlock(), createElementBlock("select", {
|
|
@@ -5904,8 +5948,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5904
5948
|
"onUpdate:modelValue": ($event) => filterInputs.value[col.field] = $event,
|
|
5905
5949
|
class: "bh-form-control",
|
|
5906
5950
|
onClick: _cache[2] || (_cache[2] = //@ts-ignore
|
|
5907
|
-
(...args) => props.isOpenFilter && props.isOpenFilter(...args))
|
|
5908
|
-
|
|
5951
|
+
(...args) => props.isOpenFilter && props.isOpenFilter(...args)),
|
|
5952
|
+
onKeydown: withKeys(($event) => handleFilterEnter(col.field), ["enter"])
|
|
5953
|
+
}, _hoisted_34$1, 40, _hoisted_30$1)), [
|
|
5909
5954
|
[vModelSelect, filterInputs.value[col.field]]
|
|
5910
5955
|
]) : createCommentVNode("", true)
|
|
5911
5956
|
])) : createCommentVNode("", true),
|
|
@@ -6271,6 +6316,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
6271
6316
|
return (col == null ? void 0 : col.field) || null;
|
|
6272
6317
|
});
|
|
6273
6318
|
const hasAnyActiveFilter = ref(false);
|
|
6319
|
+
const columnHeaderRef = ref(null);
|
|
6274
6320
|
const updateHasAnyActiveFilter = () => {
|
|
6275
6321
|
hasAnyActiveFilter.value = props.columns.some((col) => {
|
|
6276
6322
|
return col.value !== void 0 && col.value !== null && col.value !== "";
|
|
@@ -6574,6 +6620,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
6574
6620
|
}
|
|
6575
6621
|
}
|
|
6576
6622
|
return !!column;
|
|
6623
|
+
},
|
|
6624
|
+
/**
|
|
6625
|
+
* Flush all pending filter debounces
|
|
6626
|
+
* Call this before getColumnFilters() when Enter is pressed
|
|
6627
|
+
* to ensure all filter values are immediately processed
|
|
6628
|
+
*/
|
|
6629
|
+
flushAllFilterDebounces() {
|
|
6630
|
+
var _a2, _b2;
|
|
6631
|
+
(_b2 = (_a2 = columnHeaderRef.value) == null ? void 0 : _a2.flushAllFilterDebounces) == null ? void 0 : _b2.call(_a2);
|
|
6577
6632
|
}
|
|
6578
6633
|
});
|
|
6579
6634
|
watch(
|
|
@@ -7067,6 +7122,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
7067
7122
|
})
|
|
7068
7123
|
}, [
|
|
7069
7124
|
createVNode(_sfc_main$1, {
|
|
7125
|
+
ref_key: "columnHeaderRef",
|
|
7126
|
+
ref: columnHeaderRef,
|
|
7070
7127
|
all: props,
|
|
7071
7128
|
expandedrows: expandedrows.value,
|
|
7072
7129
|
currentSortColumn: currentSortColumn.value,
|