knt-shared 1.7.11 → 1.7.12
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/components/Table/BasicTable.vue.d.ts.map +1 -1
- package/dist/index.cjs.js +26 -43
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +26 -43
- package/dist/index.esm.js.map +1 -1
- package/dist/style.css +9 -9
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasicTable.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Table/BasicTable.vue"],"names":[],"mappings":"AA0WA;AAYA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,KAAK,CAAC;AACpC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAC;AA8BpD,OAAO,KAAK,EACV,WAAW,EACX,eAAe,EAGf,qBAAqB,EAGtB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"BasicTable.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Table/BasicTable.vue"],"names":[],"mappings":"AA0WA;AAYA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,KAAK,CAAC;AACpC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAC;AA8BpD,OAAO,KAAK,EACV,WAAW,EACX,eAAe,EAGf,qBAAqB,EAGtB,MAAM,SAAS,CAAC;AAq2CjB,iBAAS,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmiC+D,GAAG,wCAClB,GAAG;wBAEzC,GAAG;;;QACN,GAAG;EAGhC;AA6ED,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BA/5Cc,SAAS,EAAE;mBAOlB;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAC;;;;;+BAeT,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE;4BAMtB,SAAS,EAAE;gCAIP,MAAM,GAAG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C,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AACxD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -6594,6 +6594,15 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
6594
6594
|
const handleFullscreen = () => {
|
|
6595
6595
|
isFullscreen.value = !isFullscreen.value;
|
|
6596
6596
|
};
|
|
6597
|
+
const dedupeRowsByKey = (rows) => {
|
|
6598
|
+
const seen = /* @__PURE__ */ new Set();
|
|
6599
|
+
return rows.filter((item) => {
|
|
6600
|
+
const key = getRowKey(item);
|
|
6601
|
+
if (seen.has(key)) return false;
|
|
6602
|
+
seen.add(key);
|
|
6603
|
+
return true;
|
|
6604
|
+
});
|
|
6605
|
+
};
|
|
6597
6606
|
const handleSelect = (rowKeys, rowKey, record) => {
|
|
6598
6607
|
var _a;
|
|
6599
6608
|
const onlyCurrent = ((_a = getMergedProps.value.rowSelection) == null ? void 0 : _a.onlyCurrent) ?? false;
|
|
@@ -6612,13 +6621,13 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
6612
6621
|
const otherPagesRows = selectedRows.value.filter(
|
|
6613
6622
|
(item) => !currentPageKeySet.has(getRowKey(item))
|
|
6614
6623
|
);
|
|
6615
|
-
selectedRowKeys.value = [...otherPagesKeys, ...rowKeys];
|
|
6616
|
-
selectedRows.value = [
|
|
6624
|
+
selectedRowKeys.value = [.../* @__PURE__ */ new Set([...otherPagesKeys, ...rowKeys])];
|
|
6625
|
+
selectedRows.value = dedupeRowsByKey([
|
|
6617
6626
|
...otherPagesRows,
|
|
6618
6627
|
...dataSource.value.filter(
|
|
6619
6628
|
(item) => rowKeys.includes(getRowKey(item))
|
|
6620
6629
|
)
|
|
6621
|
-
];
|
|
6630
|
+
]);
|
|
6622
6631
|
}
|
|
6623
6632
|
emit("select", selectedRowKeys.value, rowKey, record);
|
|
6624
6633
|
};
|
|
@@ -6646,17 +6655,10 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
6646
6655
|
if (onlyCurrent) {
|
|
6647
6656
|
if (checked) {
|
|
6648
6657
|
selectedRowKeys.value = [.../* @__PURE__ */ new Set([...frozenKeys, ...selectableKeys])];
|
|
6649
|
-
selectedRows.value = [
|
|
6650
|
-
...frozenRows,
|
|
6651
|
-
...selectableRows.filter(
|
|
6652
|
-
(item) => !frozenRows.some(
|
|
6653
|
-
(r) => getRowKey(r) === getRowKey(item)
|
|
6654
|
-
)
|
|
6655
|
-
)
|
|
6656
|
-
];
|
|
6658
|
+
selectedRows.value = dedupeRowsByKey([...frozenRows, ...selectableRows]);
|
|
6657
6659
|
} else {
|
|
6658
|
-
selectedRowKeys.value = [...frozenKeys];
|
|
6659
|
-
selectedRows.value =
|
|
6660
|
+
selectedRowKeys.value = [...new Set(frozenKeys)];
|
|
6661
|
+
selectedRows.value = dedupeRowsByKey(frozenRows);
|
|
6660
6662
|
}
|
|
6661
6663
|
} else {
|
|
6662
6664
|
const currentPageKeySet = new Set(
|
|
@@ -6669,38 +6671,19 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
6669
6671
|
(item) => !currentPageKeySet.has(getRowKey(item))
|
|
6670
6672
|
);
|
|
6671
6673
|
if (checked) {
|
|
6672
|
-
|
|
6673
|
-
...otherPagesKeys,
|
|
6674
|
-
...frozenKeys,
|
|
6675
|
-
...selectableKeys
|
|
6676
|
-
]);
|
|
6677
|
-
selectedRowKeys.value = [...mergedKeySet];
|
|
6678
|
-
selectedRows.value = [
|
|
6679
|
-
...otherPagesRows,
|
|
6680
|
-
...frozenRows.filter(
|
|
6681
|
-
(item) => !otherPagesRows.some(
|
|
6682
|
-
(r) => getRowKey(r) === getRowKey(item)
|
|
6683
|
-
)
|
|
6684
|
-
),
|
|
6685
|
-
...selectableRows.filter(
|
|
6686
|
-
(item) => !otherPagesRows.some(
|
|
6687
|
-
(r) => getRowKey(r) === getRowKey(item)
|
|
6688
|
-
) && !frozenRows.some(
|
|
6689
|
-
(r) => getRowKey(r) === getRowKey(item)
|
|
6690
|
-
)
|
|
6691
|
-
)
|
|
6674
|
+
selectedRowKeys.value = [
|
|
6675
|
+
.../* @__PURE__ */ new Set([...otherPagesKeys, ...frozenKeys, ...selectableKeys])
|
|
6692
6676
|
];
|
|
6693
|
-
|
|
6694
|
-
const mergedKeySet = /* @__PURE__ */ new Set([...otherPagesKeys, ...frozenKeys]);
|
|
6695
|
-
selectedRowKeys.value = [...mergedKeySet];
|
|
6696
|
-
selectedRows.value = [
|
|
6677
|
+
selectedRows.value = dedupeRowsByKey([
|
|
6697
6678
|
...otherPagesRows,
|
|
6698
|
-
...frozenRows
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6679
|
+
...frozenRows,
|
|
6680
|
+
...selectableRows
|
|
6681
|
+
]);
|
|
6682
|
+
} else {
|
|
6683
|
+
selectedRowKeys.value = [
|
|
6684
|
+
.../* @__PURE__ */ new Set([...otherPagesKeys, ...frozenKeys])
|
|
6703
6685
|
];
|
|
6686
|
+
selectedRows.value = dedupeRowsByKey([...otherPagesRows, ...frozenRows]);
|
|
6704
6687
|
}
|
|
6705
6688
|
}
|
|
6706
6689
|
emit("selectAll", checked);
|
|
@@ -7444,7 +7427,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
7444
7427
|
};
|
|
7445
7428
|
}
|
|
7446
7429
|
});
|
|
7447
|
-
const BasicTable = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-
|
|
7430
|
+
const BasicTable = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-4e9be0fe"]]);
|
|
7448
7431
|
function useTable(options = {}) {
|
|
7449
7432
|
const tableRef = vue.ref(null);
|
|
7450
7433
|
const formRef = vue.ref(null);
|