@uzum-tech/ui 2.0.5 → 2.0.7
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.js +1183 -573
- package/dist/index.mjs +1183 -573
- package/dist/index.prod.js +2 -2
- package/dist/index.prod.mjs +2 -2
- package/es/_internal/icons/DragHandleRound.mjs +16 -0
- package/es/_internal/icons/index.d.ts +1 -1
- package/es/_internal/icons/index.mjs +1 -1
- package/es/components.d.ts +99 -30
- package/es/data-table/src/DataTable.d.ts +24 -0
- package/es/data-table/src/DataTable.mjs +31 -0
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +6 -0
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +6 -0
- package/es/data-table/src/TableParts/Body.d.ts +17 -9
- package/es/data-table/src/TableParts/Body.mjs +81 -274
- package/es/data-table/src/TableParts/BodyEmpty.d.ts +3 -0
- package/es/data-table/src/TableParts/BodyEmpty.mjs +22 -0
- package/es/data-table/src/TableParts/BodyRow.d.ts +3 -0
- package/es/data-table/src/TableParts/BodyRow.mjs +257 -0
- package/es/data-table/src/TableParts/BodySkeleton.mjs +5 -2
- package/es/data-table/src/TableParts/Header.d.ts +6 -0
- package/es/data-table/src/TableParts/Header.mjs +5 -1
- package/es/data-table/src/TableParts/VirtualListItemWrapper.d.ts +36 -0
- package/es/data-table/src/TableParts/VirtualListItemWrapper.mjs +46 -0
- package/es/data-table/src/interface.d.ts +161 -2
- package/es/data-table/src/styles/index.cssr.mjs +26 -3
- package/es/data-table/src/use-group-header.d.ts +3 -3
- package/es/data-table/src/use-row-drag.d.ts +2 -0
- package/es/data-table/src/use-row-drag.mjs +241 -0
- package/es/data-table/src/use-sorter.d.ts +4 -8
- package/es/data-table/src/use-sorter.mjs +14 -2
- package/es/data-table/src/use-table-data.d.ts +11 -14
- package/es/data-table/src/use-table-data.mjs +4 -2
- package/es/data-table/src/use-table-storage.d.ts +2 -2
- package/es/data-table/src/use-table-storage.mjs +1 -1
- package/es/data-table/src/utils/column-utils.d.ts +3 -2
- package/es/data-table/src/utils/column-utils.mjs +9 -1
- package/es/data-table/src/utils/csv-utils.mjs +1 -1
- package/es/data-table/src/utils/flatten-rows.d.ts +2 -0
- package/es/data-table/src/utils/flatten-rows.mjs +33 -0
- package/es/data-table/src/utils/index.d.ts +1 -0
- package/es/data-table/src/utils/index.mjs +1 -0
- package/es/data-table/src/utils/resize-orchestrator-utils.d.ts +3 -5
- package/es/data-table/src/utils/width-utils.d.ts +2 -2
- package/es/data-table/styles/light.d.ts +6 -0
- package/es/data-table/styles/light.mjs +3 -0
- package/es/mapping-card/src/MappingCard.d.ts +8 -0
- package/es/mapping-card/src/MappingCard.mjs +3 -1
- package/es/mapping-card/src/MappingCardParts/Header.mjs +31 -10
- package/es/mapping-card/src/interface.d.ts +8 -0
- package/es/mapping-card/src/interface.mjs +4 -0
- package/es/mapping-card/src/styles/index.cssr.mjs +8 -1
- package/es/tree/src/Tree.d.ts +49 -24
- package/es/tree/src/Tree.mjs +18 -13
- package/es/tree/src/TreeNodeCheckbox.d.ts +4 -0
- package/es/tree/src/TreeNodeSwitcher.mjs +24 -26
- package/es/tree/src/styles/index.cssr.mjs +11 -8
- package/es/tree/styles/light.d.ts +4 -0
- package/es/tree/styles/light.mjs +2 -0
- package/es/tree-select/index.d.ts +1 -1
- package/es/tree-select/src/TreeSelect.d.ts +43 -16
- package/es/tree-select/src/TreeSelect.mjs +65 -35
- package/es/tree-select/src/interface.d.ts +6 -1
- package/es/tree-select/src/scroll-option-end.d.ts +3 -0
- package/es/tree-select/src/scroll-option-end.mjs +28 -0
- package/es/tree-select/styles/light.d.ts +2 -0
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/lib/_internal/icons/DragHandleRound.js +10 -0
- package/lib/_internal/icons/index.d.ts +1 -1
- package/lib/_internal/icons/index.js +4 -4
- package/lib/components.d.ts +99 -30
- package/lib/data-table/src/DataTable.d.ts +24 -0
- package/lib/data-table/src/DataTable.js +19 -1
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +6 -0
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +6 -0
- package/lib/data-table/src/TableParts/Body.d.ts +18 -10
- package/lib/data-table/src/TableParts/Body.js +65 -237
- package/lib/data-table/src/TableParts/BodyEmpty.d.ts +3 -0
- package/lib/data-table/src/TableParts/BodyEmpty.js +15 -0
- package/lib/data-table/src/TableParts/BodyRow.d.ts +3 -0
- package/lib/data-table/src/TableParts/BodyRow.js +210 -0
- package/lib/data-table/src/TableParts/BodySkeleton.js +8 -2
- package/lib/data-table/src/TableParts/Header.d.ts +6 -0
- package/lib/data-table/src/TableParts/Header.js +6 -0
- package/lib/data-table/src/TableParts/VirtualListItemWrapper.d.ts +36 -0
- package/lib/data-table/src/TableParts/VirtualListItemWrapper.js +29 -0
- package/lib/data-table/src/interface.d.ts +161 -2
- package/lib/data-table/src/styles/index.cssr.js +26 -3
- package/lib/data-table/src/use-group-header.d.ts +3 -3
- package/lib/data-table/src/use-row-drag.d.ts +2 -0
- package/lib/data-table/src/use-row-drag.js +270 -0
- package/lib/data-table/src/use-sorter.d.ts +4 -8
- package/lib/data-table/src/use-sorter.js +14 -0
- package/lib/data-table/src/use-table-data.d.ts +11 -14
- package/lib/data-table/src/use-table-data.js +5 -1
- package/lib/data-table/src/use-table-storage.d.ts +2 -2
- package/lib/data-table/src/use-table-storage.js +1 -0
- package/lib/data-table/src/utils/column-utils.d.ts +3 -2
- package/lib/data-table/src/utils/column-utils.js +11 -2
- package/lib/data-table/src/utils/csv-utils.js +1 -0
- package/lib/data-table/src/utils/flatten-rows.d.ts +2 -0
- package/lib/data-table/src/utils/flatten-rows.js +35 -0
- package/lib/data-table/src/utils/index.d.ts +1 -0
- package/lib/data-table/src/utils/index.js +1 -0
- package/lib/data-table/src/utils/resize-orchestrator-utils.d.ts +3 -5
- package/lib/data-table/src/utils/width-utils.d.ts +2 -2
- package/lib/data-table/styles/light.d.ts +6 -0
- package/lib/data-table/styles/light.js +3 -0
- package/lib/mapping-card/src/MappingCard.d.ts +8 -0
- package/lib/mapping-card/src/MappingCard.js +5 -1
- package/lib/mapping-card/src/MappingCardParts/Header.js +29 -5
- package/lib/mapping-card/src/interface.d.ts +8 -0
- package/lib/mapping-card/src/interface.js +4 -0
- package/lib/mapping-card/src/styles/index.cssr.js +8 -1
- package/lib/tree/src/Tree.d.ts +49 -24
- package/lib/tree/src/Tree.js +16 -15
- package/lib/tree/src/TreeNodeCheckbox.d.ts +4 -0
- package/lib/tree/src/TreeNodeSwitcher.js +11 -14
- package/lib/tree/src/styles/index.cssr.js +11 -8
- package/lib/tree/styles/light.d.ts +4 -0
- package/lib/tree/styles/light.js +2 -0
- package/lib/tree-select/index.d.ts +1 -1
- package/lib/tree-select/src/TreeSelect.d.ts +43 -16
- package/lib/tree-select/src/TreeSelect.js +66 -40
- package/lib/tree-select/src/interface.d.ts +6 -1
- package/lib/tree-select/src/scroll-option-end.d.ts +3 -0
- package/lib/tree-select/src/scroll-option-end.js +30 -0
- package/lib/tree-select/styles/light.d.ts +2 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -2
- package/web-types.json +21 -1
- package/es/_internal/icons/Switcher.mjs +0 -12
- package/lib/_internal/icons/Switcher.js +0 -10
- /package/es/_internal/icons/{Switcher.d.ts → DragHandleRound.d.ts} +0 -0
- /package/lib/_internal/icons/{Switcher.d.ts → DragHandleRound.d.ts} +0 -0
package/dist/index.js
CHANGED
|
@@ -2374,7 +2374,7 @@
|
|
|
2374
2374
|
return slot();
|
|
2375
2375
|
}
|
|
2376
2376
|
// o(n) flatten
|
|
2377
|
-
function flatten$
|
|
2377
|
+
function flatten$2(vNodes, filterCommentNode = true, result = []) {
|
|
2378
2378
|
vNodes.forEach(vNode => {
|
|
2379
2379
|
if (vNode === null) return;
|
|
2380
2380
|
if (typeof vNode !== 'object') {
|
|
@@ -2384,13 +2384,13 @@
|
|
|
2384
2384
|
return;
|
|
2385
2385
|
}
|
|
2386
2386
|
if (Array.isArray(vNode)) {
|
|
2387
|
-
flatten$
|
|
2387
|
+
flatten$2(vNode, filterCommentNode, result);
|
|
2388
2388
|
return;
|
|
2389
2389
|
}
|
|
2390
2390
|
if (vNode.type === vue.Fragment) {
|
|
2391
2391
|
if (vNode.children === null) return;
|
|
2392
2392
|
if (Array.isArray(vNode.children)) {
|
|
2393
|
-
flatten$
|
|
2393
|
+
flatten$2(vNode.children, filterCommentNode, result);
|
|
2394
2394
|
}
|
|
2395
2395
|
// rawSlot
|
|
2396
2396
|
} else if (vNode.type !== vue.Comment) {
|
|
@@ -2404,7 +2404,7 @@
|
|
|
2404
2404
|
if (slot === undefined) {
|
|
2405
2405
|
throw new Error(`[vueuc/${scope}]: slot[${slotName}] is empty.`);
|
|
2406
2406
|
}
|
|
2407
|
-
const content = flatten$
|
|
2407
|
+
const content = flatten$2(slot());
|
|
2408
2408
|
// vue will normalize the slot, so slot must be an array
|
|
2409
2409
|
if (content.length === 1) {
|
|
2410
2410
|
return content[0];
|
|
@@ -5555,7 +5555,7 @@
|
|
|
5555
5555
|
};
|
|
5556
5556
|
}
|
|
5557
5557
|
|
|
5558
|
-
function flatten$
|
|
5558
|
+
function flatten$1(vNodes, filterCommentNode = true, result = []) {
|
|
5559
5559
|
vNodes.forEach(vNode => {
|
|
5560
5560
|
if (vNode === null) return;
|
|
5561
5561
|
if (typeof vNode !== "object") {
|
|
@@ -5565,13 +5565,13 @@
|
|
|
5565
5565
|
return;
|
|
5566
5566
|
}
|
|
5567
5567
|
if (Array.isArray(vNode)) {
|
|
5568
|
-
flatten$
|
|
5568
|
+
flatten$1(vNode, filterCommentNode, result);
|
|
5569
5569
|
return;
|
|
5570
5570
|
}
|
|
5571
5571
|
if (vNode.type === vue.Fragment) {
|
|
5572
5572
|
if (vNode.children === null) return;
|
|
5573
5573
|
if (Array.isArray(vNode.children)) {
|
|
5574
|
-
flatten$
|
|
5574
|
+
flatten$1(vNode.children, filterCommentNode, result);
|
|
5575
5575
|
}
|
|
5576
5576
|
} else if (vNode.type !== vue.Comment) {
|
|
5577
5577
|
result.push(vNode);
|
|
@@ -5586,7 +5586,7 @@
|
|
|
5586
5586
|
warn("getFirstSlotVNode", `slot[${slotName}] is empty`);
|
|
5587
5587
|
return null;
|
|
5588
5588
|
}
|
|
5589
|
-
const slotContent = flatten$
|
|
5589
|
+
const slotContent = flatten$1(slot(props));
|
|
5590
5590
|
if (slotContent.length === 1) {
|
|
5591
5591
|
return slotContent[0];
|
|
5592
5592
|
} else {
|
|
@@ -5598,7 +5598,7 @@
|
|
|
5598
5598
|
if (!slot) {
|
|
5599
5599
|
return null;
|
|
5600
5600
|
}
|
|
5601
|
-
const slotContent = flatten$
|
|
5601
|
+
const slotContent = flatten$1(slot(props));
|
|
5602
5602
|
if (slotContent.length === 1) {
|
|
5603
5603
|
return slotContent[0];
|
|
5604
5604
|
} else {
|
|
@@ -11174,7 +11174,7 @@
|
|
|
11174
11174
|
* @name has
|
|
11175
11175
|
* @memberOf SetCache
|
|
11176
11176
|
* @param {*} value The value to search for.
|
|
11177
|
-
* @returns {
|
|
11177
|
+
* @returns {boolean} Returns `true` if `value` is found, else `false`.
|
|
11178
11178
|
*/
|
|
11179
11179
|
function setCacheHas(value) {
|
|
11180
11180
|
return this.__data__.has(value);
|
|
@@ -14158,6 +14158,29 @@
|
|
|
14158
14158
|
/* @__PURE__ */ vue.h("svg", { viewBox: "0 0 16 16", version: "1.1", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ vue.h("g", { stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd" }, /* @__PURE__ */ vue.h("g", { fill: "currentColor", "fill-rule": "nonzero" }, /* @__PURE__ */ vue.h("path", { d: "M3.5,13 L12.5,13 C12.7761424,13 13,13.2238576 13,13.5 C13,13.7454599 12.8231248,13.9496084 12.5898756,13.9919443 L12.5,14 L3.5,14 C3.22385763,14 3,13.7761424 3,13.5 C3,13.2545401 3.17687516,13.0503916 3.41012437,13.0080557 L3.5,13 L12.5,13 L3.5,13 Z M7.91012437,1.00805567 L8,1 C8.24545989,1 8.44960837,1.17687516 8.49194433,1.41012437 L8.5,1.5 L8.5,10.292 L11.1819805,7.6109127 C11.3555469,7.43734635 11.6249713,7.4180612 11.8198394,7.55305725 L11.8890873,7.6109127 C12.0626536,7.78447906 12.0819388,8.05390346 11.9469427,8.2487716 L11.8890873,8.31801948 L8.35355339,11.8535534 C8.17998704,12.0271197 7.91056264,12.0464049 7.7156945,11.9114088 L7.64644661,11.8535534 L4.1109127,8.31801948 C3.91565056,8.12275734 3.91565056,7.80617485 4.1109127,7.6109127 C4.28447906,7.43734635 4.55390346,7.4180612 4.7487716,7.55305725 L4.81801948,7.6109127 L7.5,10.292 L7.5,1.5 C7.5,1.25454011 7.67687516,1.05039163 7.91012437,1.00805567 L8,1 L7.91012437,1.00805567 Z" }))))
|
|
14159
14159
|
);
|
|
14160
14160
|
|
|
14161
|
+
var DragHandleRound = vue.defineComponent({
|
|
14162
|
+
name: "DragHandleRound",
|
|
14163
|
+
render() {
|
|
14164
|
+
return /* @__PURE__ */ vue.h(
|
|
14165
|
+
"svg",
|
|
14166
|
+
{
|
|
14167
|
+
width: "24",
|
|
14168
|
+
height: "24",
|
|
14169
|
+
viewBox: "0 0 24 24",
|
|
14170
|
+
fill: "none",
|
|
14171
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
14172
|
+
},
|
|
14173
|
+
/* @__PURE__ */ vue.h(
|
|
14174
|
+
"path",
|
|
14175
|
+
{
|
|
14176
|
+
d: "M9 20C8.45 20 7.97917 19.8042 7.5875 19.4125C7.19583 19.0208 7 18.55 7 18C7 17.45 7.19583 16.9792 7.5875 16.5875C7.97917 16.1958 8.45 16 9 16C9.55 16 10.0208 16.1958 10.4125 16.5875C10.8042 16.9792 11 17.45 11 18C11 18.55 10.8042 19.0208 10.4125 19.4125C10.0208 19.8042 9.55 20 9 20ZM15 20C14.45 20 13.9792 19.8042 13.5875 19.4125C13.1958 19.0208 13 18.55 13 18C13 17.45 13.1958 16.9792 13.5875 16.5875C13.9792 16.1958 14.45 16 15 16C15.55 16 16.0208 16.1958 16.4125 16.5875C16.8042 16.9792 17 17.45 17 18C17 18.55 16.8042 19.0208 16.4125 19.4125C16.0208 19.8042 15.55 20 15 20ZM9 14C8.45 14 7.97917 13.8042 7.5875 13.4125C7.19583 13.0208 7 12.55 7 12C7 11.45 7.19583 10.9792 7.5875 10.5875C7.97917 10.1958 8.45 10 9 10C9.55 10 10.0208 10.1958 10.4125 10.5875C10.8042 10.9792 11 11.45 11 12C11 12.55 10.8042 13.0208 10.4125 13.4125C10.0208 13.8042 9.55 14 9 14ZM15 14C14.45 14 13.9792 13.8042 13.5875 13.4125C13.1958 13.0208 13 12.55 13 12C13 11.45 13.1958 10.9792 13.5875 10.5875C13.9792 10.1958 14.45 10 15 10C15.55 10 16.0208 10.1958 16.4125 10.5875C16.8042 10.9792 17 11.45 17 12C17 12.55 16.8042 13.0208 16.4125 13.4125C16.0208 13.8042 15.55 14 15 14ZM9 8C8.45 8 7.97917 7.80417 7.5875 7.4125C7.19583 7.02083 7 6.55 7 6C7 5.45 7.19583 4.97917 7.5875 4.5875C7.97917 4.19583 8.45 4 9 4C9.55 4 10.0208 4.19583 10.4125 4.5875C10.8042 4.97917 11 5.45 11 6C11 6.55 10.8042 7.02083 10.4125 7.4125C10.0208 7.80417 9.55 8 9 8ZM15 8C14.45 8 13.9792 7.80417 13.5875 7.4125C13.1958 7.02083 13 6.55 13 6C13 5.45 13.1958 4.97917 13.5875 4.5875C13.9792 4.19583 14.45 4 15 4C15.55 4 16.0208 4.19583 16.4125 4.5875C16.8042 4.97917 17 5.45 17 6C17 6.55 16.8042 7.02083 16.4125 7.4125C16.0208 7.80417 15.55 8 15 8Z",
|
|
14177
|
+
fill: "currentColor"
|
|
14178
|
+
}
|
|
14179
|
+
)
|
|
14180
|
+
);
|
|
14181
|
+
}
|
|
14182
|
+
});
|
|
14183
|
+
|
|
14161
14184
|
var EditIcon = vue.defineComponent({
|
|
14162
14185
|
name: "Edit",
|
|
14163
14186
|
render() {
|
|
@@ -14787,13 +14810,6 @@
|
|
|
14787
14810
|
))
|
|
14788
14811
|
);
|
|
14789
14812
|
|
|
14790
|
-
var SwitcherIcon = vue.defineComponent({
|
|
14791
|
-
name: "Switcher",
|
|
14792
|
-
render() {
|
|
14793
|
-
return /* @__PURE__ */ vue.h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, /* @__PURE__ */ vue.h("path", { d: "M12 8l10 8l-10 8z" }));
|
|
14794
|
-
}
|
|
14795
|
-
});
|
|
14796
|
-
|
|
14797
14813
|
var TimeIcon = replaceable(
|
|
14798
14814
|
"time",
|
|
14799
14815
|
/* @__PURE__ */ vue.h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512" }, /* @__PURE__ */ vue.h(
|
|
@@ -18009,7 +18025,7 @@
|
|
|
18009
18025
|
}
|
|
18010
18026
|
};
|
|
18011
18027
|
|
|
18012
|
-
function flatten
|
|
18028
|
+
function flatten(treeNodes, expandedKeys) {
|
|
18013
18029
|
const expandedKeySet = expandedKeys ? new Set(expandedKeys) : undefined;
|
|
18014
18030
|
const flattenedNodes = [];
|
|
18015
18031
|
function traverse(treeNodes) {
|
|
@@ -18156,7 +18172,7 @@
|
|
|
18156
18172
|
maxLevel: Math.max(...levelTreeNodeMap.keys()),
|
|
18157
18173
|
getChildren,
|
|
18158
18174
|
getFlattenedNodes(expandedKeys) {
|
|
18159
|
-
return flatten
|
|
18175
|
+
return flatten(treeNodes, expandedKeys);
|
|
18160
18176
|
},
|
|
18161
18177
|
getNode,
|
|
18162
18178
|
getPrev,
|
|
@@ -21151,7 +21167,7 @@
|
|
|
21151
21167
|
render() {
|
|
21152
21168
|
const { mergedClsPrefix, mergedValue, mergedSize, mergedDisabled } = this;
|
|
21153
21169
|
const children = mapSlot$1(
|
|
21154
|
-
flatten$
|
|
21170
|
+
flatten$1(getSlot(this)),
|
|
21155
21171
|
mergedValue,
|
|
21156
21172
|
mergedSize,
|
|
21157
21173
|
mergedDisabled,
|
|
@@ -39065,7 +39081,7 @@
|
|
|
39065
39081
|
}
|
|
39066
39082
|
const renderContent = () => {
|
|
39067
39083
|
this.overflow = false;
|
|
39068
|
-
const rawChildren = flatten$
|
|
39084
|
+
const rawChildren = flatten$1(getSlot(this));
|
|
39069
39085
|
const childrenAndRawSpan = [];
|
|
39070
39086
|
const { collapsed, collapsedRows, responsiveCols, responsiveQuery } = this;
|
|
39071
39087
|
rawChildren.forEach((child) => {
|
|
@@ -41027,7 +41043,7 @@
|
|
|
41027
41043
|
dotSlotProps,
|
|
41028
41044
|
$slots: { default: defaultSlot, dots: dotsSlot, arrow: arrowSlot }
|
|
41029
41045
|
} = this;
|
|
41030
|
-
const children = defaultSlot && flatten$
|
|
41046
|
+
const children = defaultSlot && flatten$1(defaultSlot()) || [];
|
|
41031
41047
|
let slides = filterCarouselItem(children);
|
|
41032
41048
|
if (!slides.length) {
|
|
41033
41049
|
slides = children.map((ch) => /* @__PURE__ */ vue.h(_UCarouselItem, null, {
|
|
@@ -43818,7 +43834,7 @@
|
|
|
43818
43834
|
mergedClsPrefix,
|
|
43819
43835
|
rtlEnabled
|
|
43820
43836
|
} = this;
|
|
43821
|
-
const children = flatten$
|
|
43837
|
+
const children = flatten$1(getSlot(this), false);
|
|
43822
43838
|
if (!children.length) {
|
|
43823
43839
|
return null;
|
|
43824
43840
|
}
|
|
@@ -46726,6 +46742,9 @@
|
|
|
46726
46742
|
thButtonColorHover: elementsTertiary,
|
|
46727
46743
|
thIconColor: elementsPrimary,
|
|
46728
46744
|
thIconColorActive: brandPrimary500,
|
|
46745
|
+
dropMarkColor: brandPrimary500,
|
|
46746
|
+
dragGhostOpacity: "0.85",
|
|
46747
|
+
dragGhostFilter: "drop-shadow(0 4px 12px rgba(0, 0, 0, 0.18))",
|
|
46729
46748
|
// modal
|
|
46730
46749
|
borderColorModal: elementsQuaternary,
|
|
46731
46750
|
tdColorHoverModal: elementsTertiary,
|
|
@@ -49195,6 +49214,8 @@
|
|
|
49195
49214
|
nodeColorPressed: elementsQuaternary,
|
|
49196
49215
|
nodeColorActive: brandPrimary100,
|
|
49197
49216
|
arrowColor: elementsPrimary,
|
|
49217
|
+
switcherColor: elementsTertiary,
|
|
49218
|
+
switcherSize: "22px",
|
|
49198
49219
|
nodeTextColor: textPrimary,
|
|
49199
49220
|
nodeTextColorDisabled: textSecondary,
|
|
49200
49221
|
loadingColor: elementsPrimary,
|
|
@@ -65792,6 +65813,7 @@
|
|
|
65792
65813
|
|
|
65793
65814
|
const SELECTION_COL_WIDTH = 40;
|
|
65794
65815
|
const EXPAND_COL_WIDTH = 40;
|
|
65816
|
+
const DRAGGABLE_COL_WIDTH = 40;
|
|
65795
65817
|
function getNumberColWidth(column) {
|
|
65796
65818
|
if (column.type === "selection") {
|
|
65797
65819
|
return column.width === void 0 ? SELECTION_COL_WIDTH : depx(column.width);
|
|
@@ -65799,6 +65821,9 @@
|
|
|
65799
65821
|
if (column.type === "expand") {
|
|
65800
65822
|
return column.width === void 0 ? EXPAND_COL_WIDTH : depx(column.width);
|
|
65801
65823
|
}
|
|
65824
|
+
if (column.type === "draggable") {
|
|
65825
|
+
return column.width === void 0 ? DRAGGABLE_COL_WIDTH : depx(column.width);
|
|
65826
|
+
}
|
|
65802
65827
|
if ("children" in column) return void 0;
|
|
65803
65828
|
if (typeof column.width === "string") {
|
|
65804
65829
|
return depx(column.width);
|
|
@@ -65812,6 +65837,9 @@
|
|
|
65812
65837
|
if (column.type === "expand") {
|
|
65813
65838
|
return formatLength(column.width ?? EXPAND_COL_WIDTH);
|
|
65814
65839
|
}
|
|
65840
|
+
if (column.type === "draggable") {
|
|
65841
|
+
return formatLength(column.width ?? DRAGGABLE_COL_WIDTH);
|
|
65842
|
+
}
|
|
65815
65843
|
if ("children" in column) {
|
|
65816
65844
|
return void 0;
|
|
65817
65845
|
}
|
|
@@ -65820,6 +65848,7 @@
|
|
|
65820
65848
|
function getColKey(column) {
|
|
65821
65849
|
if (column.type === "selection") return "__n_selection__";
|
|
65822
65850
|
if (column.type === "expand") return "__n_expand__";
|
|
65851
|
+
if (column.type === "draggable") return "__n_draggable__";
|
|
65823
65852
|
return column.key;
|
|
65824
65853
|
}
|
|
65825
65854
|
function createCustomWidthStyle(column, resizedWidth) {
|
|
@@ -65880,7 +65909,7 @@
|
|
|
65880
65909
|
}
|
|
65881
65910
|
}
|
|
65882
65911
|
function generateCsv(columns, data, getCsvCell, getCsvHeader) {
|
|
65883
|
-
const exportableColumns = columns.filter(column => column.type !== "expand" && column.type !== "selection" && column.allowExport !== false);
|
|
65912
|
+
const exportableColumns = columns.filter(column => column.type !== "expand" && column.type !== "selection" && column.type !== "draggable" && column.allowExport !== false);
|
|
65884
65913
|
const header = exportableColumns.map(col => {
|
|
65885
65914
|
return getCsvHeader ? getCsvHeader(col) : col.title;
|
|
65886
65915
|
}).join(",");
|
|
@@ -65892,6 +65921,40 @@
|
|
|
65892
65921
|
return [header, ...rows].join("\n");
|
|
65893
65922
|
}
|
|
65894
65923
|
|
|
65924
|
+
function flattenExpandedRows(rowInfos, expandedRowKeys) {
|
|
65925
|
+
const flattenedRows = [];
|
|
65926
|
+
function traverse(nodes, rootIndex) {
|
|
65927
|
+
nodes.forEach(node => {
|
|
65928
|
+
if (node.children && expandedRowKeys.has(node.key)) {
|
|
65929
|
+
flattenedRows.push({
|
|
65930
|
+
tmNode: node,
|
|
65931
|
+
striped: false,
|
|
65932
|
+
key: node.key,
|
|
65933
|
+
index: rootIndex
|
|
65934
|
+
});
|
|
65935
|
+
traverse(node.children, rootIndex);
|
|
65936
|
+
} else {
|
|
65937
|
+
flattenedRows.push({
|
|
65938
|
+
key: node.key,
|
|
65939
|
+
tmNode: node,
|
|
65940
|
+
striped: false,
|
|
65941
|
+
index: rootIndex
|
|
65942
|
+
});
|
|
65943
|
+
}
|
|
65944
|
+
});
|
|
65945
|
+
}
|
|
65946
|
+
rowInfos.forEach(rowInfo => {
|
|
65947
|
+
flattenedRows.push(rowInfo);
|
|
65948
|
+
const {
|
|
65949
|
+
children
|
|
65950
|
+
} = rowInfo.tmNode;
|
|
65951
|
+
if (children && expandedRowKeys.has(rowInfo.key)) {
|
|
65952
|
+
traverse(children, rowInfo.index);
|
|
65953
|
+
}
|
|
65954
|
+
});
|
|
65955
|
+
return flattenedRows;
|
|
65956
|
+
}
|
|
65957
|
+
|
|
65895
65958
|
const REGEX = {
|
|
65896
65959
|
ONLY_DIGITS: /\D/g};
|
|
65897
65960
|
const defaultNumericMask = {
|
|
@@ -65964,6 +66027,39 @@
|
|
|
65964
66027
|
return mergedSortState.some(state => state.columnKey === column.key && state.order);
|
|
65965
66028
|
}
|
|
65966
66029
|
|
|
66030
|
+
function renderBodyEmpty(deps) {
|
|
66031
|
+
const {
|
|
66032
|
+
clsPrefix,
|
|
66033
|
+
loading,
|
|
66034
|
+
bodyStyle,
|
|
66035
|
+
dataTableSlots,
|
|
66036
|
+
mergedTheme,
|
|
66037
|
+
emptyProps
|
|
66038
|
+
} = deps;
|
|
66039
|
+
return /* @__PURE__ */ vue.h(
|
|
66040
|
+
"div",
|
|
66041
|
+
{
|
|
66042
|
+
class: [
|
|
66043
|
+
`${clsPrefix}-data-table-empty`,
|
|
66044
|
+
loading && `${clsPrefix}-data-table-empty--hide`
|
|
66045
|
+
],
|
|
66046
|
+
style: bodyStyle,
|
|
66047
|
+
ref: "emptyElRef"
|
|
66048
|
+
},
|
|
66049
|
+
resolveSlot(dataTableSlots.empty, () => [
|
|
66050
|
+
/* @__PURE__ */ vue.h(
|
|
66051
|
+
UEmpty$1,
|
|
66052
|
+
{
|
|
66053
|
+
size: "large",
|
|
66054
|
+
theme: mergedTheme.peers.Empty,
|
|
66055
|
+
themeOverrides: mergedTheme.peerOverrides.Empty,
|
|
66056
|
+
...emptyProps
|
|
66057
|
+
}
|
|
66058
|
+
)
|
|
66059
|
+
])
|
|
66060
|
+
);
|
|
66061
|
+
}
|
|
66062
|
+
|
|
65967
66063
|
var RenderSafeCheckbox = vue.defineComponent({
|
|
65968
66064
|
name: "DataTableBodyCheckbox",
|
|
65969
66065
|
props: {
|
|
@@ -66622,7 +66718,7 @@
|
|
|
66622
66718
|
render() {
|
|
66623
66719
|
const { mergedValue, mergedClsPrefix, handleFocusin, handleFocusout } = this;
|
|
66624
66720
|
const { children, isButtonGroup } = mapSlot(
|
|
66625
|
-
flatten$
|
|
66721
|
+
flatten$1(getSlot(this)),
|
|
66626
66722
|
mergedValue,
|
|
66627
66723
|
mergedClsPrefix
|
|
66628
66724
|
);
|
|
@@ -66686,90 +66782,6 @@
|
|
|
66686
66782
|
}
|
|
66687
66783
|
});
|
|
66688
66784
|
|
|
66689
|
-
var BodySkeleton = vue.defineComponent({
|
|
66690
|
-
name: "DataTableBodySkeleton",
|
|
66691
|
-
props: {
|
|
66692
|
-
rowCount: {
|
|
66693
|
-
type: Number,
|
|
66694
|
-
default: 10
|
|
66695
|
-
}
|
|
66696
|
-
},
|
|
66697
|
-
setup(props) {
|
|
66698
|
-
const {
|
|
66699
|
-
mergedClsPrefixRef,
|
|
66700
|
-
colsRef,
|
|
66701
|
-
props: dataTableProps
|
|
66702
|
-
} = vue.inject(dataTableInjectionKey);
|
|
66703
|
-
const skeletonRowCount = vue.computed(() => {
|
|
66704
|
-
if (dataTableProps.pagination && typeof dataTableProps.pagination === "object" && dataTableProps.pagination.pageSize) {
|
|
66705
|
-
return dataTableProps.pagination.pageSize;
|
|
66706
|
-
}
|
|
66707
|
-
return props.rowCount;
|
|
66708
|
-
});
|
|
66709
|
-
return {
|
|
66710
|
-
mergedClsPrefix: mergedClsPrefixRef,
|
|
66711
|
-
cols: colsRef,
|
|
66712
|
-
skeletonRowCount
|
|
66713
|
-
};
|
|
66714
|
-
},
|
|
66715
|
-
render() {
|
|
66716
|
-
const { mergedClsPrefix, cols, skeletonRowCount } = this;
|
|
66717
|
-
const skeletonRows = Array.from(
|
|
66718
|
-
{ length: skeletonRowCount },
|
|
66719
|
-
(_, index) => /* @__PURE__ */ vue.h(
|
|
66720
|
-
"tr",
|
|
66721
|
-
{
|
|
66722
|
-
key: `skeleton-row-${index}`,
|
|
66723
|
-
class: `${mergedClsPrefix}-data-table-tr ${mergedClsPrefix}-data-table-tr--skeleton`
|
|
66724
|
-
},
|
|
66725
|
-
cols.map((col) => /* @__PURE__ */ vue.h(
|
|
66726
|
-
"td",
|
|
66727
|
-
{
|
|
66728
|
-
key: col.key,
|
|
66729
|
-
class: [
|
|
66730
|
-
`${mergedClsPrefix}-data-table-td`,
|
|
66731
|
-
`${mergedClsPrefix}-data-table-td--skeleton`,
|
|
66732
|
-
col.column.fixed && `${mergedClsPrefix}-data-table-td--fixed-${col.column.fixed}`,
|
|
66733
|
-
col.column.align && `${mergedClsPrefix}-data-table-td--${col.column.align}-align`
|
|
66734
|
-
],
|
|
66735
|
-
style: {
|
|
66736
|
-
textAlign: col.column.align || void 0,
|
|
66737
|
-
padding: "var(--u-td-padding)"
|
|
66738
|
-
}
|
|
66739
|
-
},
|
|
66740
|
-
col.column.fixed && /* @__PURE__ */ vue.h(
|
|
66741
|
-
"div",
|
|
66742
|
-
{
|
|
66743
|
-
class: `${mergedClsPrefix}-data-table-td__shadow-holder`
|
|
66744
|
-
}
|
|
66745
|
-
),
|
|
66746
|
-
/* @__PURE__ */ vue.h(
|
|
66747
|
-
_USkeleton,
|
|
66748
|
-
{
|
|
66749
|
-
height: "var(--u-line-height)",
|
|
66750
|
-
width: col.column.type === "selection" ? "16px" : "85%",
|
|
66751
|
-
animated: true,
|
|
66752
|
-
style: {
|
|
66753
|
-
borderRadius: "16px"
|
|
66754
|
-
}
|
|
66755
|
-
}
|
|
66756
|
-
)
|
|
66757
|
-
))
|
|
66758
|
-
)
|
|
66759
|
-
);
|
|
66760
|
-
return /* @__PURE__ */ vue.h(
|
|
66761
|
-
"tbody",
|
|
66762
|
-
{
|
|
66763
|
-
class: [
|
|
66764
|
-
`${mergedClsPrefix}-data-table-tbody`,
|
|
66765
|
-
`${mergedClsPrefix}-data-table-tbody--skeleton`
|
|
66766
|
-
]
|
|
66767
|
-
},
|
|
66768
|
-
skeletonRows
|
|
66769
|
-
);
|
|
66770
|
-
}
|
|
66771
|
-
});
|
|
66772
|
-
|
|
66773
66785
|
function applyMask(value, mask) {
|
|
66774
66786
|
if (!mask) return value;
|
|
66775
66787
|
if (!value || value.trim() === "") return "";
|
|
@@ -67083,6 +67095,404 @@
|
|
|
67083
67095
|
}
|
|
67084
67096
|
});
|
|
67085
67097
|
|
|
67098
|
+
function renderExpandedRow(context, rowInfo, displayedRowIndex) {
|
|
67099
|
+
const {
|
|
67100
|
+
mergedClsPrefix,
|
|
67101
|
+
colCount,
|
|
67102
|
+
rowCount,
|
|
67103
|
+
stickyExpandedRows,
|
|
67104
|
+
bodyWidthPx,
|
|
67105
|
+
renderExpand
|
|
67106
|
+
} = context;
|
|
67107
|
+
const { index: actualRowIndex } = rowInfo;
|
|
67108
|
+
const {
|
|
67109
|
+
tmNode: { key, rawNode }
|
|
67110
|
+
} = rowInfo;
|
|
67111
|
+
return /* @__PURE__ */ vue.h(
|
|
67112
|
+
"tr",
|
|
67113
|
+
{
|
|
67114
|
+
class: `${mergedClsPrefix}-data-table-tr ${mergedClsPrefix}-data-table-tr--expanded`,
|
|
67115
|
+
key: `${key}__expand`
|
|
67116
|
+
},
|
|
67117
|
+
/* @__PURE__ */ vue.h(
|
|
67118
|
+
"td",
|
|
67119
|
+
{
|
|
67120
|
+
class: [
|
|
67121
|
+
`${mergedClsPrefix}-data-table-td`,
|
|
67122
|
+
`${mergedClsPrefix}-data-table-td--last-col`,
|
|
67123
|
+
displayedRowIndex + 1 === rowCount && `${mergedClsPrefix}-data-table-td--last-row`
|
|
67124
|
+
],
|
|
67125
|
+
colspan: colCount
|
|
67126
|
+
},
|
|
67127
|
+
stickyExpandedRows ? /* @__PURE__ */ vue.h(
|
|
67128
|
+
"div",
|
|
67129
|
+
{
|
|
67130
|
+
class: `${mergedClsPrefix}-data-table-expand`,
|
|
67131
|
+
style: {
|
|
67132
|
+
width: bodyWidthPx
|
|
67133
|
+
}
|
|
67134
|
+
},
|
|
67135
|
+
renderExpand(rawNode, actualRowIndex)
|
|
67136
|
+
) : renderExpand(rawNode, actualRowIndex)
|
|
67137
|
+
)
|
|
67138
|
+
);
|
|
67139
|
+
}
|
|
67140
|
+
function renderBodyRow(context, rowInfo, displayedRowIndex, isVirtual) {
|
|
67141
|
+
if ("isExpandedRow" in rowInfo) {
|
|
67142
|
+
return renderExpandedRow(context, rowInfo, displayedRowIndex);
|
|
67143
|
+
}
|
|
67144
|
+
const {
|
|
67145
|
+
mergedClsPrefix,
|
|
67146
|
+
cols,
|
|
67147
|
+
colCount,
|
|
67148
|
+
rowCount,
|
|
67149
|
+
hasChildren,
|
|
67150
|
+
childTriggerColIndex,
|
|
67151
|
+
indentStyle,
|
|
67152
|
+
rowClassName,
|
|
67153
|
+
rowProps,
|
|
67154
|
+
mergedSortState,
|
|
67155
|
+
mergedExpandedRowKeySet,
|
|
67156
|
+
fixedColumnLeftMap,
|
|
67157
|
+
fixedColumnRightMap,
|
|
67158
|
+
currentPage,
|
|
67159
|
+
loadingKeySet,
|
|
67160
|
+
renderExpandIcon,
|
|
67161
|
+
renderCell,
|
|
67162
|
+
defaultEmptyValue,
|
|
67163
|
+
mergedTheme,
|
|
67164
|
+
rowIndexToKey,
|
|
67165
|
+
cordToPass,
|
|
67166
|
+
cordKey,
|
|
67167
|
+
draggableColumn,
|
|
67168
|
+
droppingRowKey,
|
|
67169
|
+
droppingPosition,
|
|
67170
|
+
draggingRowKeySet,
|
|
67171
|
+
hoverKey,
|
|
67172
|
+
dataTableSlots,
|
|
67173
|
+
setHoverKey,
|
|
67174
|
+
handleCheckboxUpdateChecked,
|
|
67175
|
+
handleRadioUpdateChecked,
|
|
67176
|
+
handleUpdateExpanded,
|
|
67177
|
+
handleRowDragStart,
|
|
67178
|
+
handleRowDragOver,
|
|
67179
|
+
handleRowDragLeave,
|
|
67180
|
+
handleRowDragEnd,
|
|
67181
|
+
handleRowDrop,
|
|
67182
|
+
emitEdit
|
|
67183
|
+
} = context;
|
|
67184
|
+
const { index: actualRowIndex } = rowInfo;
|
|
67185
|
+
const isSummary = "isSummaryRow" in rowInfo;
|
|
67186
|
+
const striped = !isSummary && rowInfo.striped;
|
|
67187
|
+
const { tmNode, key: rowKey } = rowInfo;
|
|
67188
|
+
const { rawNode: rowData } = tmNode;
|
|
67189
|
+
const expanded = mergedExpandedRowKeySet.has(rowKey);
|
|
67190
|
+
const props = rowProps ? rowProps(rowData, actualRowIndex) : void 0;
|
|
67191
|
+
const mergedRowClassName = typeof rowClassName === "string" ? rowClassName : createRowClassName(rowData, actualRowIndex, rowClassName);
|
|
67192
|
+
const { class: _class, ...restProps } = props || {};
|
|
67193
|
+
const isRowDraggable = !isSummary && !!draggableColumn && (typeof draggableColumn.draggable === "function" ? draggableColumn.draggable(rowData) : true);
|
|
67194
|
+
const isDropTarget = !!draggableColumn && droppingRowKey === rowKey;
|
|
67195
|
+
const dropPosition = isDropTarget ? droppingPosition : null;
|
|
67196
|
+
const isBeingDragged = !!draggableColumn && draggingRowKeySet.has(rowKey);
|
|
67197
|
+
const row = /* @__PURE__ */ vue.h(
|
|
67198
|
+
"tr",
|
|
67199
|
+
{
|
|
67200
|
+
onMouseenter: () => {
|
|
67201
|
+
setHoverKey(rowKey);
|
|
67202
|
+
},
|
|
67203
|
+
key: rowKey,
|
|
67204
|
+
"data-row-key": String(rowKey),
|
|
67205
|
+
onDragover: draggableColumn && !isSummary ? (event) => handleRowDragOver(event, rowKey) : void 0,
|
|
67206
|
+
onDragleave: draggableColumn && !isSummary ? (event) => handleRowDragLeave(event, rowKey) : void 0,
|
|
67207
|
+
onDrop: draggableColumn && !isSummary ? (event) => handleRowDrop(event, rowKey) : void 0,
|
|
67208
|
+
class: [
|
|
67209
|
+
`${mergedClsPrefix}-data-table-tr`,
|
|
67210
|
+
rowInfo.tmNode.disabled && `${mergedClsPrefix}-data-table-tr--disabled`,
|
|
67211
|
+
isSummary && `${mergedClsPrefix}-data-table-tr--summary`,
|
|
67212
|
+
striped && `${mergedClsPrefix}-data-table-tr--striped`,
|
|
67213
|
+
expanded && `${mergedClsPrefix}-data-table-tr--expanded`,
|
|
67214
|
+
isBeingDragged && `${mergedClsPrefix}-data-table-tr--dragging`,
|
|
67215
|
+
isDropTarget && dropPosition === "before" && `${mergedClsPrefix}-data-table-tr--drop-before`,
|
|
67216
|
+
isDropTarget && dropPosition === "after" && `${mergedClsPrefix}-data-table-tr--drop-after`,
|
|
67217
|
+
mergedRowClassName,
|
|
67218
|
+
_class
|
|
67219
|
+
],
|
|
67220
|
+
...restProps
|
|
67221
|
+
},
|
|
67222
|
+
cols.map((col, colIndex) => {
|
|
67223
|
+
if (displayedRowIndex in cordToPass) {
|
|
67224
|
+
const cordOfRowToPass = cordToPass[displayedRowIndex];
|
|
67225
|
+
const indexInCordOfRowToPass = cordOfRowToPass.indexOf(colIndex);
|
|
67226
|
+
if (~indexInCordOfRowToPass) {
|
|
67227
|
+
cordOfRowToPass.splice(indexInCordOfRowToPass, 1);
|
|
67228
|
+
return null;
|
|
67229
|
+
}
|
|
67230
|
+
}
|
|
67231
|
+
const { column } = col;
|
|
67232
|
+
const colKey = getColKey(col);
|
|
67233
|
+
const { rowSpan, colSpan } = column;
|
|
67234
|
+
const mergedColSpan = isSummary ? rowInfo.tmNode.rawNode[colKey]?.colSpan || 1 : colSpan ? colSpan(rowData, actualRowIndex) : 1;
|
|
67235
|
+
const mergedRowSpan = isSummary ? rowInfo.tmNode.rawNode[colKey]?.rowSpan || 1 : rowSpan ? rowSpan(rowData, actualRowIndex) : 1;
|
|
67236
|
+
const isLastCol = colIndex + mergedColSpan === colCount;
|
|
67237
|
+
const isLastRow = displayedRowIndex + mergedRowSpan === rowCount;
|
|
67238
|
+
const isCrossRowTd = mergedRowSpan > 1;
|
|
67239
|
+
if (isCrossRowTd) {
|
|
67240
|
+
cordKey[displayedRowIndex] = {
|
|
67241
|
+
[colIndex]: []
|
|
67242
|
+
};
|
|
67243
|
+
}
|
|
67244
|
+
if (mergedColSpan > 1 || isCrossRowTd) {
|
|
67245
|
+
for (let i = displayedRowIndex; i < displayedRowIndex + mergedRowSpan; ++i) {
|
|
67246
|
+
if (isCrossRowTd) {
|
|
67247
|
+
cordKey[displayedRowIndex][colIndex].push(rowIndexToKey[i]);
|
|
67248
|
+
}
|
|
67249
|
+
for (let j = colIndex; j < colIndex + mergedColSpan; ++j) {
|
|
67250
|
+
if (i === displayedRowIndex && j === colIndex) {
|
|
67251
|
+
continue;
|
|
67252
|
+
}
|
|
67253
|
+
if (!(i in cordToPass)) {
|
|
67254
|
+
cordToPass[i] = [j];
|
|
67255
|
+
} else {
|
|
67256
|
+
cordToPass[i].push(j);
|
|
67257
|
+
}
|
|
67258
|
+
}
|
|
67259
|
+
}
|
|
67260
|
+
}
|
|
67261
|
+
const cellHoverKey = isCrossRowTd ? hoverKey : null;
|
|
67262
|
+
const { cellProps } = column;
|
|
67263
|
+
const resolvedCellProps = cellProps?.(rowData, actualRowIndex);
|
|
67264
|
+
const indentOffsetStyle = {
|
|
67265
|
+
"--indent-offset": ""
|
|
67266
|
+
};
|
|
67267
|
+
const isDraggableHandleCell = column.type === "draggable" && !isSummary && isRowDraggable;
|
|
67268
|
+
return /* @__PURE__ */ vue.h(
|
|
67269
|
+
"td",
|
|
67270
|
+
{
|
|
67271
|
+
...resolvedCellProps,
|
|
67272
|
+
key: colKey,
|
|
67273
|
+
draggable: isDraggableHandleCell || void 0,
|
|
67274
|
+
onDragstart: isDraggableHandleCell ? (event) => handleRowDragStart(event, rowKey) : void 0,
|
|
67275
|
+
onDragend: isDraggableHandleCell ? () => handleRowDragEnd() : void 0,
|
|
67276
|
+
style: [
|
|
67277
|
+
{
|
|
67278
|
+
textAlign: column.align || void 0,
|
|
67279
|
+
left: pxfy(fixedColumnLeftMap[colKey]?.start),
|
|
67280
|
+
right: pxfy(fixedColumnRightMap[colKey]?.start)
|
|
67281
|
+
},
|
|
67282
|
+
indentOffsetStyle,
|
|
67283
|
+
resolvedCellProps?.style || ""
|
|
67284
|
+
],
|
|
67285
|
+
colspan: mergedColSpan,
|
|
67286
|
+
rowspan: isVirtual ? void 0 : mergedRowSpan,
|
|
67287
|
+
"data-col-key": colKey,
|
|
67288
|
+
class: [
|
|
67289
|
+
`${mergedClsPrefix}-data-table-td`,
|
|
67290
|
+
column.className,
|
|
67291
|
+
resolvedCellProps?.class,
|
|
67292
|
+
isSummary && `${mergedClsPrefix}-data-table-td--summary`,
|
|
67293
|
+
(cellHoverKey !== null && cordKey[displayedRowIndex][colIndex].includes(cellHoverKey) || isColumnSorting(column, mergedSortState)) && `${mergedClsPrefix}-data-table-td--hover`,
|
|
67294
|
+
column.fixed && `${mergedClsPrefix}-data-table-td--fixed-${column.fixed}`,
|
|
67295
|
+
column.align && `${mergedClsPrefix}-data-table-td--${column.align}-align`,
|
|
67296
|
+
column.type === "selection" && `${mergedClsPrefix}-data-table-td--selection`,
|
|
67297
|
+
column.type === "expand" && `${mergedClsPrefix}-data-table-td--expand`,
|
|
67298
|
+
column.type === "draggable" && `${mergedClsPrefix}-data-table-td--draggable`,
|
|
67299
|
+
isLastCol && `${mergedClsPrefix}-data-table-td--last-col`,
|
|
67300
|
+
isLastRow && `${mergedClsPrefix}-data-table-td--last-row`,
|
|
67301
|
+
"editable" in column && (typeof column.editable === "function" ? column.editable(rowData) : column.editable) && !isSummary && `${mergedClsPrefix}-data-table-td--editable`
|
|
67302
|
+
]
|
|
67303
|
+
},
|
|
67304
|
+
column.fixed && /* @__PURE__ */ vue.h(
|
|
67305
|
+
"div",
|
|
67306
|
+
{
|
|
67307
|
+
class: `${mergedClsPrefix}-data-table-td__shadow-holder`
|
|
67308
|
+
}
|
|
67309
|
+
),
|
|
67310
|
+
hasChildren && colIndex === childTriggerColIndex ? [
|
|
67311
|
+
repeat(
|
|
67312
|
+
indentOffsetStyle["--indent-offset"] = isSummary ? 0 : rowInfo.tmNode.level,
|
|
67313
|
+
/* @__PURE__ */ vue.h(
|
|
67314
|
+
"div",
|
|
67315
|
+
{
|
|
67316
|
+
class: `${mergedClsPrefix}-data-table-indent`,
|
|
67317
|
+
style: indentStyle
|
|
67318
|
+
}
|
|
67319
|
+
)
|
|
67320
|
+
),
|
|
67321
|
+
isSummary || rowInfo.tmNode.isLeaf ? /* @__PURE__ */ vue.h(
|
|
67322
|
+
"div",
|
|
67323
|
+
{
|
|
67324
|
+
class: `${mergedClsPrefix}-data-table-expand-placeholder`
|
|
67325
|
+
}
|
|
67326
|
+
) : /* @__PURE__ */ vue.h(
|
|
67327
|
+
ExpandTrigger,
|
|
67328
|
+
{
|
|
67329
|
+
class: `${mergedClsPrefix}-data-table-expand-trigger`,
|
|
67330
|
+
clsPrefix: mergedClsPrefix,
|
|
67331
|
+
expanded,
|
|
67332
|
+
renderExpandIcon,
|
|
67333
|
+
loading: loadingKeySet.has(rowInfo.key),
|
|
67334
|
+
onClick: () => {
|
|
67335
|
+
handleUpdateExpanded(rowKey, rowInfo.tmNode);
|
|
67336
|
+
}
|
|
67337
|
+
}
|
|
67338
|
+
)
|
|
67339
|
+
] : null,
|
|
67340
|
+
column.type === "selection" ? !isSummary ? column.multiple === false ? /* @__PURE__ */ vue.h(
|
|
67341
|
+
RenderSafeRadio,
|
|
67342
|
+
{
|
|
67343
|
+
key: currentPage,
|
|
67344
|
+
rowKey,
|
|
67345
|
+
disabled: rowInfo.tmNode.disabled,
|
|
67346
|
+
onClick: (event) => {
|
|
67347
|
+
event.stopPropagation();
|
|
67348
|
+
},
|
|
67349
|
+
onUpdateChecked: () => {
|
|
67350
|
+
handleRadioUpdateChecked(rowInfo.tmNode);
|
|
67351
|
+
}
|
|
67352
|
+
}
|
|
67353
|
+
) : /* @__PURE__ */ vue.h(
|
|
67354
|
+
RenderSafeCheckbox,
|
|
67355
|
+
{
|
|
67356
|
+
key: currentPage,
|
|
67357
|
+
rowKey,
|
|
67358
|
+
disabled: rowInfo.tmNode.disabled,
|
|
67359
|
+
onUpdateChecked: (checked, event) => {
|
|
67360
|
+
event.stopPropagation();
|
|
67361
|
+
handleCheckboxUpdateChecked(
|
|
67362
|
+
rowInfo.tmNode,
|
|
67363
|
+
checked,
|
|
67364
|
+
event.shiftKey
|
|
67365
|
+
);
|
|
67366
|
+
}
|
|
67367
|
+
}
|
|
67368
|
+
) : null : column.type === "expand" ? !isSummary ? !column.expandable || column.expandable?.(rowData) ? /* @__PURE__ */ vue.h(
|
|
67369
|
+
ExpandTrigger,
|
|
67370
|
+
{
|
|
67371
|
+
clsPrefix: mergedClsPrefix,
|
|
67372
|
+
expanded,
|
|
67373
|
+
renderExpandIcon,
|
|
67374
|
+
onClick: () => {
|
|
67375
|
+
handleUpdateExpanded(rowKey, null);
|
|
67376
|
+
}
|
|
67377
|
+
}
|
|
67378
|
+
) : null : null : column.type === "draggable" ? isDraggableHandleCell ? /* @__PURE__ */ vue.h(
|
|
67379
|
+
"span",
|
|
67380
|
+
{
|
|
67381
|
+
class: `${mergedClsPrefix}-data-table-td__drag-handle`,
|
|
67382
|
+
"aria-label": "Drag to reorder"
|
|
67383
|
+
},
|
|
67384
|
+
resolveSlot(dataTableSlots["drag-handle"], () => [
|
|
67385
|
+
/* @__PURE__ */ vue.h(DragHandleRound, null)
|
|
67386
|
+
])
|
|
67387
|
+
) : null : /* @__PURE__ */ vue.h(
|
|
67388
|
+
Cell,
|
|
67389
|
+
{
|
|
67390
|
+
clsPrefix: mergedClsPrefix,
|
|
67391
|
+
index: actualRowIndex,
|
|
67392
|
+
row: rowData,
|
|
67393
|
+
column,
|
|
67394
|
+
isSummary,
|
|
67395
|
+
mergedTheme,
|
|
67396
|
+
renderCell,
|
|
67397
|
+
defaultEmptyValue,
|
|
67398
|
+
onEdit: (value, row2, key) => {
|
|
67399
|
+
emitEdit(value, row2, key);
|
|
67400
|
+
}
|
|
67401
|
+
}
|
|
67402
|
+
)
|
|
67403
|
+
);
|
|
67404
|
+
})
|
|
67405
|
+
);
|
|
67406
|
+
return row;
|
|
67407
|
+
}
|
|
67408
|
+
|
|
67409
|
+
const ICON_COLUMN_SKELETON_WIDTH = "16px";
|
|
67410
|
+
const DEFAULT_COLUMN_SKELETON_WIDTH = "85%";
|
|
67411
|
+
const SKELETON_BORDER_RADIUS = "16px";
|
|
67412
|
+
var BodySkeleton = vue.defineComponent({
|
|
67413
|
+
name: "DataTableBodySkeleton",
|
|
67414
|
+
props: {
|
|
67415
|
+
rowCount: {
|
|
67416
|
+
type: Number,
|
|
67417
|
+
default: 10
|
|
67418
|
+
}
|
|
67419
|
+
},
|
|
67420
|
+
setup(props) {
|
|
67421
|
+
const {
|
|
67422
|
+
mergedClsPrefixRef,
|
|
67423
|
+
colsRef,
|
|
67424
|
+
props: dataTableProps
|
|
67425
|
+
} = vue.inject(dataTableInjectionKey);
|
|
67426
|
+
const skeletonRowCount = vue.computed(() => {
|
|
67427
|
+
if (dataTableProps.pagination && typeof dataTableProps.pagination === "object" && dataTableProps.pagination.pageSize) {
|
|
67428
|
+
return dataTableProps.pagination.pageSize;
|
|
67429
|
+
}
|
|
67430
|
+
return props.rowCount;
|
|
67431
|
+
});
|
|
67432
|
+
return {
|
|
67433
|
+
mergedClsPrefix: mergedClsPrefixRef,
|
|
67434
|
+
cols: colsRef,
|
|
67435
|
+
skeletonRowCount
|
|
67436
|
+
};
|
|
67437
|
+
},
|
|
67438
|
+
render() {
|
|
67439
|
+
const { mergedClsPrefix, cols, skeletonRowCount } = this;
|
|
67440
|
+
const skeletonRows = Array.from(
|
|
67441
|
+
{ length: skeletonRowCount },
|
|
67442
|
+
(_, index) => /* @__PURE__ */ vue.h(
|
|
67443
|
+
"tr",
|
|
67444
|
+
{
|
|
67445
|
+
key: `skeleton-row-${index}`,
|
|
67446
|
+
class: `${mergedClsPrefix}-data-table-tr ${mergedClsPrefix}-data-table-tr--skeleton`
|
|
67447
|
+
},
|
|
67448
|
+
cols.map((col) => /* @__PURE__ */ vue.h(
|
|
67449
|
+
"td",
|
|
67450
|
+
{
|
|
67451
|
+
key: col.key,
|
|
67452
|
+
class: [
|
|
67453
|
+
`${mergedClsPrefix}-data-table-td`,
|
|
67454
|
+
`${mergedClsPrefix}-data-table-td--skeleton`,
|
|
67455
|
+
col.column.fixed && `${mergedClsPrefix}-data-table-td--fixed-${col.column.fixed}`,
|
|
67456
|
+
col.column.align && `${mergedClsPrefix}-data-table-td--${col.column.align}-align`
|
|
67457
|
+
],
|
|
67458
|
+
style: {
|
|
67459
|
+
textAlign: col.column.align || void 0,
|
|
67460
|
+
padding: "var(--u-td-padding)"
|
|
67461
|
+
}
|
|
67462
|
+
},
|
|
67463
|
+
col.column.fixed && /* @__PURE__ */ vue.h(
|
|
67464
|
+
"div",
|
|
67465
|
+
{
|
|
67466
|
+
class: `${mergedClsPrefix}-data-table-td__shadow-holder`
|
|
67467
|
+
}
|
|
67468
|
+
),
|
|
67469
|
+
/* @__PURE__ */ vue.h(
|
|
67470
|
+
_USkeleton,
|
|
67471
|
+
{
|
|
67472
|
+
height: "var(--u-line-height)",
|
|
67473
|
+
width: col.column.type === "selection" || col.column.type === "draggable" ? ICON_COLUMN_SKELETON_WIDTH : DEFAULT_COLUMN_SKELETON_WIDTH,
|
|
67474
|
+
animated: true,
|
|
67475
|
+
style: {
|
|
67476
|
+
borderRadius: SKELETON_BORDER_RADIUS
|
|
67477
|
+
}
|
|
67478
|
+
}
|
|
67479
|
+
)
|
|
67480
|
+
))
|
|
67481
|
+
)
|
|
67482
|
+
);
|
|
67483
|
+
return /* @__PURE__ */ vue.h(
|
|
67484
|
+
"tbody",
|
|
67485
|
+
{
|
|
67486
|
+
class: [
|
|
67487
|
+
`${mergedClsPrefix}-data-table-tbody`,
|
|
67488
|
+
`${mergedClsPrefix}-data-table-tbody--skeleton`
|
|
67489
|
+
]
|
|
67490
|
+
},
|
|
67491
|
+
skeletonRows
|
|
67492
|
+
);
|
|
67493
|
+
}
|
|
67494
|
+
});
|
|
67495
|
+
|
|
67086
67496
|
var UDataTableFilterMenu = vue.defineComponent({
|
|
67087
67497
|
name: "DataTableFilterMenu",
|
|
67088
67498
|
props: {
|
|
@@ -67665,6 +68075,8 @@
|
|
|
67665
68075
|
});
|
|
67666
68076
|
|
|
67667
68077
|
function renderTitle(column) {
|
|
68078
|
+
if (column.type === "draggable")
|
|
68079
|
+
return null;
|
|
67668
68080
|
return typeof column.title === "function" ? column.title(column) : column.title;
|
|
67669
68081
|
}
|
|
67670
68082
|
var TableHeader = vue.defineComponent({
|
|
@@ -67873,6 +68285,9 @@
|
|
|
67873
68285
|
const { ellipsis } = column;
|
|
67874
68286
|
const ellipsisEnabled = isColumnEllipsisEnabled(column);
|
|
67875
68287
|
const createColumnVNode = () => {
|
|
68288
|
+
if (column.type === "draggable") {
|
|
68289
|
+
return null;
|
|
68290
|
+
}
|
|
67876
68291
|
if (column.type === "selection") {
|
|
67877
68292
|
return column.multiple !== false ? /* @__PURE__ */ vue.h(vue.Fragment, null, /* @__PURE__ */ vue.h(
|
|
67878
68293
|
_UCheckbox,
|
|
@@ -67964,7 +68379,7 @@
|
|
|
67964
68379
|
},
|
|
67965
68380
|
column.className
|
|
67966
68381
|
],
|
|
67967
|
-
onClick: column.type !== "selection" && column.type !== "expand" && !("children" in column) ? (e) => {
|
|
68382
|
+
onClick: column.type !== "selection" && column.type !== "expand" && column.type !== "draggable" && !("children" in column) ? (e) => {
|
|
67968
68383
|
handleColHeaderClick(e, column);
|
|
67969
68384
|
} : void 0
|
|
67970
68385
|
},
|
|
@@ -68007,38 +68422,8 @@
|
|
|
68007
68422
|
}
|
|
68008
68423
|
});
|
|
68009
68424
|
|
|
68010
|
-
|
|
68011
|
-
|
|
68012
|
-
function traverse(rs, rootIndex) {
|
|
68013
|
-
rs.forEach((r) => {
|
|
68014
|
-
if (r.children && expandedRowKeys.has(r.key)) {
|
|
68015
|
-
fRows.push({
|
|
68016
|
-
tmNode: r,
|
|
68017
|
-
striped: false,
|
|
68018
|
-
key: r.key,
|
|
68019
|
-
index: rootIndex
|
|
68020
|
-
});
|
|
68021
|
-
traverse(r.children, rootIndex);
|
|
68022
|
-
} else {
|
|
68023
|
-
fRows.push({
|
|
68024
|
-
key: r.key,
|
|
68025
|
-
tmNode: r,
|
|
68026
|
-
striped: false,
|
|
68027
|
-
index: rootIndex
|
|
68028
|
-
});
|
|
68029
|
-
}
|
|
68030
|
-
});
|
|
68031
|
-
}
|
|
68032
|
-
rowInfos.forEach((rowInfo) => {
|
|
68033
|
-
fRows.push(rowInfo);
|
|
68034
|
-
const { children } = rowInfo.tmNode;
|
|
68035
|
-
if (children && expandedRowKeys.has(rowInfo.key)) {
|
|
68036
|
-
traverse(children, rowInfo.index);
|
|
68037
|
-
}
|
|
68038
|
-
});
|
|
68039
|
-
return fRows;
|
|
68040
|
-
}
|
|
68041
|
-
const VirtualListItemWrapper = vue.defineComponent({
|
|
68425
|
+
var VirtualListItemWrapper = vue.defineComponent({
|
|
68426
|
+
name: "VirtualListItemWrapper",
|
|
68042
68427
|
props: {
|
|
68043
68428
|
clsPrefix: {
|
|
68044
68429
|
type: String,
|
|
@@ -68071,6 +68456,7 @@
|
|
|
68071
68456
|
);
|
|
68072
68457
|
}
|
|
68073
68458
|
});
|
|
68459
|
+
|
|
68074
68460
|
var TableBody = vue.defineComponent({
|
|
68075
68461
|
name: "DataTableBody",
|
|
68076
68462
|
emits: ["edit"],
|
|
@@ -68130,7 +68516,16 @@
|
|
|
68130
68516
|
doUncheck,
|
|
68131
68517
|
renderCell,
|
|
68132
68518
|
defaultEmptyValueRef,
|
|
68133
|
-
emptyPropsRef
|
|
68519
|
+
emptyPropsRef,
|
|
68520
|
+
draggableColumnRef,
|
|
68521
|
+
draggingRowKeySetRef,
|
|
68522
|
+
droppingRowKeyRef,
|
|
68523
|
+
droppingPositionRef,
|
|
68524
|
+
handleRowDragStart,
|
|
68525
|
+
handleRowDragOver,
|
|
68526
|
+
handleRowDragLeave,
|
|
68527
|
+
handleRowDragEnd,
|
|
68528
|
+
handleRowDrop
|
|
68134
68529
|
} = vue.inject(dataTableInjectionKey);
|
|
68135
68530
|
const UConfigProvider = vue.inject(configProviderInjectionKey, null);
|
|
68136
68531
|
const scrollbarInstRef = vue.ref(null);
|
|
@@ -68433,6 +68828,15 @@
|
|
|
68433
68828
|
renderCell,
|
|
68434
68829
|
defaultEmptyValueRef,
|
|
68435
68830
|
emptyPropsRef,
|
|
68831
|
+
draggableColumn: draggableColumnRef,
|
|
68832
|
+
draggingRowKeySet: draggingRowKeySetRef,
|
|
68833
|
+
droppingRowKey: droppingRowKeyRef,
|
|
68834
|
+
droppingPosition: droppingPositionRef,
|
|
68835
|
+
handleRowDragStart,
|
|
68836
|
+
handleRowDragOver,
|
|
68837
|
+
handleRowDragLeave,
|
|
68838
|
+
handleRowDragEnd,
|
|
68839
|
+
handleRowDrop,
|
|
68436
68840
|
...exposedMethods
|
|
68437
68841
|
};
|
|
68438
68842
|
},
|
|
@@ -68509,7 +68913,7 @@
|
|
|
68509
68913
|
const { length: colCount } = cols;
|
|
68510
68914
|
let mergedData;
|
|
68511
68915
|
const { data: paginatedData, hasChildren } = paginatedDataAndInfo;
|
|
68512
|
-
const mergedPaginationData = hasChildren ?
|
|
68916
|
+
const mergedPaginationData = hasChildren ? flattenExpandedRows(paginatedData, mergedExpandedRowKeySet) : paginatedData;
|
|
68513
68917
|
if (summary) {
|
|
68514
68918
|
const summaryRows = summary(this.rawPaginatedData);
|
|
68515
68919
|
if (Array.isArray(summaryRows)) {
|
|
@@ -68560,246 +68964,59 @@
|
|
|
68560
68964
|
});
|
|
68561
68965
|
const bodyWidth = stickyExpandedRows ? this.bodyWidth : null;
|
|
68562
68966
|
const bodyWidthPx = bodyWidth === null ? void 0 : `${bodyWidth}px`;
|
|
68563
|
-
const
|
|
68564
|
-
|
|
68565
|
-
|
|
68566
|
-
|
|
68567
|
-
|
|
68568
|
-
|
|
68569
|
-
|
|
68570
|
-
|
|
68571
|
-
|
|
68572
|
-
|
|
68573
|
-
|
|
68574
|
-
|
|
68575
|
-
|
|
68576
|
-
|
|
68577
|
-
|
|
68578
|
-
|
|
68579
|
-
|
|
68580
|
-
|
|
68581
|
-
|
|
68582
|
-
|
|
68583
|
-
|
|
68584
|
-
|
|
68585
|
-
|
|
68586
|
-
|
|
68587
|
-
|
|
68588
|
-
|
|
68589
|
-
|
|
68590
|
-
|
|
68591
|
-
|
|
68592
|
-
|
|
68593
|
-
|
|
68594
|
-
|
|
68595
|
-
|
|
68596
|
-
|
|
68967
|
+
const renderContext = {
|
|
68968
|
+
mergedClsPrefix,
|
|
68969
|
+
cols,
|
|
68970
|
+
colCount,
|
|
68971
|
+
rowCount,
|
|
68972
|
+
hasChildren,
|
|
68973
|
+
childTriggerColIndex,
|
|
68974
|
+
indentStyle,
|
|
68975
|
+
rowClassName,
|
|
68976
|
+
rowProps,
|
|
68977
|
+
mergedSortState,
|
|
68978
|
+
mergedExpandedRowKeySet,
|
|
68979
|
+
fixedColumnLeftMap,
|
|
68980
|
+
fixedColumnRightMap,
|
|
68981
|
+
currentPage,
|
|
68982
|
+
loadingKeySet,
|
|
68983
|
+
stickyExpandedRows,
|
|
68984
|
+
bodyWidthPx,
|
|
68985
|
+
renderExpand,
|
|
68986
|
+
renderExpandIcon: this.renderExpandIcon,
|
|
68987
|
+
renderCell: this.renderCell,
|
|
68988
|
+
defaultEmptyValue: this.defaultEmptyValueRef,
|
|
68989
|
+
mergedTheme: mergedTheme2,
|
|
68990
|
+
rowIndexToKey,
|
|
68991
|
+
cordToPass,
|
|
68992
|
+
cordKey,
|
|
68993
|
+
draggableColumn: this.draggableColumn,
|
|
68994
|
+
droppingRowKey: this.droppingRowKey,
|
|
68995
|
+
droppingPosition: this.droppingPosition,
|
|
68996
|
+
draggingRowKeySet: this.draggingRowKeySet,
|
|
68997
|
+
hoverKey: this.hoverKey,
|
|
68998
|
+
dataTableSlots: this.dataTableSlots,
|
|
68999
|
+
setHoverKey: (key) => {
|
|
69000
|
+
this.hoverKey = key;
|
|
69001
|
+
},
|
|
69002
|
+
handleCheckboxUpdateChecked,
|
|
69003
|
+
handleRadioUpdateChecked,
|
|
69004
|
+
handleUpdateExpanded,
|
|
69005
|
+
handleRowDragStart: this.handleRowDragStart,
|
|
69006
|
+
handleRowDragOver: this.handleRowDragOver,
|
|
69007
|
+
handleRowDragLeave: this.handleRowDragLeave,
|
|
69008
|
+
handleRowDragEnd: this.handleRowDragEnd,
|
|
69009
|
+
handleRowDrop: this.handleRowDrop,
|
|
69010
|
+
emitEdit: (value, row, key) => {
|
|
69011
|
+
this.$emit("edit", value, row, key);
|
|
68597
69012
|
}
|
|
68598
|
-
const isSummary = "isSummaryRow" in rowInfo;
|
|
68599
|
-
const striped = !isSummary && rowInfo.striped;
|
|
68600
|
-
const { tmNode, key: rowKey } = rowInfo;
|
|
68601
|
-
const { rawNode: rowData } = tmNode;
|
|
68602
|
-
const expanded = mergedExpandedRowKeySet.has(rowKey);
|
|
68603
|
-
const props = rowProps ? rowProps(rowData, actualRowIndex) : void 0;
|
|
68604
|
-
const mergedRowClassName = typeof rowClassName === "string" ? rowClassName : createRowClassName(rowData, actualRowIndex, rowClassName);
|
|
68605
|
-
const { class: _class, ...restProps } = props || {};
|
|
68606
|
-
const row = /* @__PURE__ */ vue.h(
|
|
68607
|
-
"tr",
|
|
68608
|
-
{
|
|
68609
|
-
onMouseenter: () => {
|
|
68610
|
-
this.hoverKey = rowKey;
|
|
68611
|
-
},
|
|
68612
|
-
key: rowKey,
|
|
68613
|
-
class: [
|
|
68614
|
-
`${mergedClsPrefix}-data-table-tr`,
|
|
68615
|
-
rowInfo.tmNode.disabled && `${mergedClsPrefix}-data-table-tr--disabled`,
|
|
68616
|
-
isSummary && `${mergedClsPrefix}-data-table-tr--summary`,
|
|
68617
|
-
striped && `${mergedClsPrefix}-data-table-tr--striped`,
|
|
68618
|
-
expanded && `${mergedClsPrefix}-data-table-tr--expanded`,
|
|
68619
|
-
mergedRowClassName,
|
|
68620
|
-
_class
|
|
68621
|
-
],
|
|
68622
|
-
...restProps
|
|
68623
|
-
},
|
|
68624
|
-
cols.map((col, colIndex) => {
|
|
68625
|
-
if (displayedRowIndex in cordToPass) {
|
|
68626
|
-
const cordOfRowToPass = cordToPass[displayedRowIndex];
|
|
68627
|
-
const indexInCordOfRowToPass = cordOfRowToPass.indexOf(colIndex);
|
|
68628
|
-
if (~indexInCordOfRowToPass) {
|
|
68629
|
-
cordOfRowToPass.splice(indexInCordOfRowToPass, 1);
|
|
68630
|
-
return null;
|
|
68631
|
-
}
|
|
68632
|
-
}
|
|
68633
|
-
const { column } = col;
|
|
68634
|
-
const colKey = getColKey(col);
|
|
68635
|
-
const { rowSpan, colSpan } = column;
|
|
68636
|
-
const mergedColSpan = isSummary ? rowInfo.tmNode.rawNode[colKey]?.colSpan || 1 : colSpan ? colSpan(rowData, actualRowIndex) : 1;
|
|
68637
|
-
const mergedRowSpan = isSummary ? rowInfo.tmNode.rawNode[colKey]?.rowSpan || 1 : rowSpan ? rowSpan(rowData, actualRowIndex) : 1;
|
|
68638
|
-
const isLastCol = colIndex + mergedColSpan === colCount;
|
|
68639
|
-
const isLastRow = displayedRowIndex + mergedRowSpan === rowCount;
|
|
68640
|
-
const isCrossRowTd = mergedRowSpan > 1;
|
|
68641
|
-
if (isCrossRowTd) {
|
|
68642
|
-
cordKey[displayedRowIndex] = {
|
|
68643
|
-
[colIndex]: []
|
|
68644
|
-
};
|
|
68645
|
-
}
|
|
68646
|
-
if (mergedColSpan > 1 || isCrossRowTd) {
|
|
68647
|
-
for (let i = displayedRowIndex; i < displayedRowIndex + mergedRowSpan; ++i) {
|
|
68648
|
-
if (isCrossRowTd) {
|
|
68649
|
-
cordKey[displayedRowIndex][colIndex].push(
|
|
68650
|
-
rowIndexToKey[i]
|
|
68651
|
-
);
|
|
68652
|
-
}
|
|
68653
|
-
for (let j = colIndex; j < colIndex + mergedColSpan; ++j) {
|
|
68654
|
-
if (i === displayedRowIndex && j === colIndex) {
|
|
68655
|
-
continue;
|
|
68656
|
-
}
|
|
68657
|
-
if (!(i in cordToPass)) {
|
|
68658
|
-
cordToPass[i] = [j];
|
|
68659
|
-
} else {
|
|
68660
|
-
cordToPass[i].push(j);
|
|
68661
|
-
}
|
|
68662
|
-
}
|
|
68663
|
-
}
|
|
68664
|
-
}
|
|
68665
|
-
const hoverKey = isCrossRowTd ? this.hoverKey : null;
|
|
68666
|
-
const { cellProps } = column;
|
|
68667
|
-
const resolvedCellProps = cellProps?.(
|
|
68668
|
-
rowData,
|
|
68669
|
-
actualRowIndex
|
|
68670
|
-
);
|
|
68671
|
-
const indentOffsetStyle = {
|
|
68672
|
-
"--indent-offset": ""
|
|
68673
|
-
};
|
|
68674
|
-
return /* @__PURE__ */ vue.h(
|
|
68675
|
-
"td",
|
|
68676
|
-
{
|
|
68677
|
-
...resolvedCellProps,
|
|
68678
|
-
key: colKey,
|
|
68679
|
-
style: [
|
|
68680
|
-
{
|
|
68681
|
-
textAlign: column.align || void 0,
|
|
68682
|
-
left: pxfy(fixedColumnLeftMap[colKey]?.start),
|
|
68683
|
-
right: pxfy(fixedColumnRightMap[colKey]?.start)
|
|
68684
|
-
},
|
|
68685
|
-
indentOffsetStyle,
|
|
68686
|
-
resolvedCellProps?.style || ""
|
|
68687
|
-
],
|
|
68688
|
-
colspan: mergedColSpan,
|
|
68689
|
-
rowspan: isVirtual ? void 0 : mergedRowSpan,
|
|
68690
|
-
"data-col-key": colKey,
|
|
68691
|
-
class: [
|
|
68692
|
-
`${mergedClsPrefix}-data-table-td`,
|
|
68693
|
-
column.className,
|
|
68694
|
-
resolvedCellProps?.class,
|
|
68695
|
-
isSummary && `${mergedClsPrefix}-data-table-td--summary`,
|
|
68696
|
-
(hoverKey !== null && cordKey[displayedRowIndex][colIndex].includes(
|
|
68697
|
-
hoverKey
|
|
68698
|
-
) || isColumnSorting(column, mergedSortState)) && `${mergedClsPrefix}-data-table-td--hover`,
|
|
68699
|
-
column.fixed && `${mergedClsPrefix}-data-table-td--fixed-${column.fixed}`,
|
|
68700
|
-
column.align && `${mergedClsPrefix}-data-table-td--${column.align}-align`,
|
|
68701
|
-
column.type === "selection" && `${mergedClsPrefix}-data-table-td--selection`,
|
|
68702
|
-
column.type === "expand" && `${mergedClsPrefix}-data-table-td--expand`,
|
|
68703
|
-
isLastCol && `${mergedClsPrefix}-data-table-td--last-col`,
|
|
68704
|
-
isLastRow && `${mergedClsPrefix}-data-table-td--last-row`,
|
|
68705
|
-
"editable" in column && (typeof column.editable === "function" ? column.editable(rowData) : column.editable) && !isSummary && `${mergedClsPrefix}-data-table-td--editable`
|
|
68706
|
-
]
|
|
68707
|
-
},
|
|
68708
|
-
column.fixed && /* @__PURE__ */ vue.h(
|
|
68709
|
-
"div",
|
|
68710
|
-
{
|
|
68711
|
-
class: `${mergedClsPrefix}-data-table-td__shadow-holder`
|
|
68712
|
-
}
|
|
68713
|
-
),
|
|
68714
|
-
hasChildren && colIndex === childTriggerColIndex ? [
|
|
68715
|
-
repeat(
|
|
68716
|
-
indentOffsetStyle["--indent-offset"] = isSummary ? 0 : rowInfo.tmNode.level,
|
|
68717
|
-
/* @__PURE__ */ vue.h(
|
|
68718
|
-
"div",
|
|
68719
|
-
{
|
|
68720
|
-
class: `${mergedClsPrefix}-data-table-indent`,
|
|
68721
|
-
style: indentStyle
|
|
68722
|
-
}
|
|
68723
|
-
)
|
|
68724
|
-
),
|
|
68725
|
-
isSummary || rowInfo.tmNode.isLeaf ? /* @__PURE__ */ vue.h(
|
|
68726
|
-
"div",
|
|
68727
|
-
{
|
|
68728
|
-
class: `${mergedClsPrefix}-data-table-expand-placeholder`
|
|
68729
|
-
}
|
|
68730
|
-
) : /* @__PURE__ */ vue.h(
|
|
68731
|
-
ExpandTrigger,
|
|
68732
|
-
{
|
|
68733
|
-
class: `${mergedClsPrefix}-data-table-expand-trigger`,
|
|
68734
|
-
clsPrefix: mergedClsPrefix,
|
|
68735
|
-
expanded,
|
|
68736
|
-
renderExpandIcon: this.renderExpandIcon,
|
|
68737
|
-
loading: loadingKeySet.has(rowInfo.key),
|
|
68738
|
-
onClick: () => {
|
|
68739
|
-
handleUpdateExpanded(rowKey, rowInfo.tmNode);
|
|
68740
|
-
}
|
|
68741
|
-
}
|
|
68742
|
-
)
|
|
68743
|
-
] : null,
|
|
68744
|
-
column.type === "selection" ? !isSummary ? column.multiple === false ? /* @__PURE__ */ vue.h(
|
|
68745
|
-
RenderSafeRadio,
|
|
68746
|
-
{
|
|
68747
|
-
key: currentPage,
|
|
68748
|
-
rowKey,
|
|
68749
|
-
disabled: rowInfo.tmNode.disabled,
|
|
68750
|
-
onClick: (event) => {
|
|
68751
|
-
event.stopPropagation();
|
|
68752
|
-
},
|
|
68753
|
-
onUpdateChecked: () => {
|
|
68754
|
-
handleRadioUpdateChecked(rowInfo.tmNode);
|
|
68755
|
-
}
|
|
68756
|
-
}
|
|
68757
|
-
) : /* @__PURE__ */ vue.h(
|
|
68758
|
-
RenderSafeCheckbox,
|
|
68759
|
-
{
|
|
68760
|
-
key: currentPage,
|
|
68761
|
-
rowKey,
|
|
68762
|
-
disabled: rowInfo.tmNode.disabled,
|
|
68763
|
-
onUpdateChecked: (checked, event) => {
|
|
68764
|
-
event.stopPropagation();
|
|
68765
|
-
handleCheckboxUpdateChecked(
|
|
68766
|
-
rowInfo.tmNode,
|
|
68767
|
-
checked,
|
|
68768
|
-
event.shiftKey
|
|
68769
|
-
);
|
|
68770
|
-
}
|
|
68771
|
-
}
|
|
68772
|
-
) : null : column.type === "expand" ? !isSummary ? !column.expandable || column.expandable?.(rowData) ? /* @__PURE__ */ vue.h(
|
|
68773
|
-
ExpandTrigger,
|
|
68774
|
-
{
|
|
68775
|
-
clsPrefix: mergedClsPrefix,
|
|
68776
|
-
expanded,
|
|
68777
|
-
renderExpandIcon: this.renderExpandIcon,
|
|
68778
|
-
onClick: () => {
|
|
68779
|
-
handleUpdateExpanded(rowKey, null);
|
|
68780
|
-
}
|
|
68781
|
-
}
|
|
68782
|
-
) : null : null : /* @__PURE__ */ vue.h(
|
|
68783
|
-
Cell,
|
|
68784
|
-
{
|
|
68785
|
-
clsPrefix: mergedClsPrefix,
|
|
68786
|
-
index: actualRowIndex,
|
|
68787
|
-
row: rowData,
|
|
68788
|
-
column,
|
|
68789
|
-
isSummary,
|
|
68790
|
-
mergedTheme: mergedTheme2,
|
|
68791
|
-
renderCell: this.renderCell,
|
|
68792
|
-
defaultEmptyValue: this.defaultEmptyValueRef,
|
|
68793
|
-
onEdit: (value, row2, key) => {
|
|
68794
|
-
this.$emit("edit", value, row2, key);
|
|
68795
|
-
}
|
|
68796
|
-
}
|
|
68797
|
-
)
|
|
68798
|
-
);
|
|
68799
|
-
})
|
|
68800
|
-
);
|
|
68801
|
-
return row;
|
|
68802
69013
|
};
|
|
69014
|
+
const renderRow = (rowInfo, displayedRowIndex, isVirtual) => renderBodyRow(
|
|
69015
|
+
renderContext,
|
|
69016
|
+
rowInfo,
|
|
69017
|
+
displayedRowIndex,
|
|
69018
|
+
isVirtual
|
|
69019
|
+
);
|
|
68803
69020
|
if (!virtualScroll) {
|
|
68804
69021
|
return /* @__PURE__ */ vue.h(
|
|
68805
69022
|
"table",
|
|
@@ -68873,28 +69090,14 @@
|
|
|
68873
69090
|
}
|
|
68874
69091
|
);
|
|
68875
69092
|
if (this.empty && !this.loadingSkeleton) {
|
|
68876
|
-
const createEmptyNode = () =>
|
|
68877
|
-
|
|
68878
|
-
|
|
68879
|
-
|
|
68880
|
-
|
|
68881
|
-
|
|
68882
|
-
|
|
68883
|
-
|
|
68884
|
-
ref: "emptyElRef"
|
|
68885
|
-
},
|
|
68886
|
-
resolveSlot(this.dataTableSlots.empty, () => [
|
|
68887
|
-
/* @__PURE__ */ vue.h(
|
|
68888
|
-
UEmpty$1,
|
|
68889
|
-
{
|
|
68890
|
-
size: "large",
|
|
68891
|
-
theme: this.mergedTheme.peers.Empty,
|
|
68892
|
-
themeOverrides: this.mergedTheme.peerOverrides.Empty,
|
|
68893
|
-
...emptyPropsRef
|
|
68894
|
-
}
|
|
68895
|
-
)
|
|
68896
|
-
])
|
|
68897
|
-
);
|
|
69093
|
+
const createEmptyNode = () => renderBodyEmpty({
|
|
69094
|
+
clsPrefix: mergedClsPrefix,
|
|
69095
|
+
loading: this.loading,
|
|
69096
|
+
bodyStyle: this.bodyStyle,
|
|
69097
|
+
dataTableSlots: this.dataTableSlots,
|
|
69098
|
+
mergedTheme: this.mergedTheme,
|
|
69099
|
+
emptyProps: emptyPropsRef
|
|
69100
|
+
});
|
|
68898
69101
|
if (this.shouldDisplaySomeTablePart) {
|
|
68899
69102
|
return /* @__PURE__ */ vue.h(vue.Fragment, null, tableNode, createEmptyNode());
|
|
68900
69103
|
} else {
|
|
@@ -69096,7 +69299,11 @@
|
|
|
69096
69299
|
margin: calc(var(--u-th-padding) * -1);
|
|
69097
69300
|
padding: var(--u-th-padding);
|
|
69098
69301
|
box-sizing: border-box;
|
|
69099
|
-
`), cM("disabled", null, [cB("data-table-td", "color: var(--u-td-opacity-disabled);")]), cM("
|
|
69302
|
+
`), cM("disabled", null, [cB("data-table-td", "color: var(--u-td-opacity-disabled);")]), cM("dragging", "opacity: 0.4;"), cM("drop-before", null, [c$1(">", [cB("data-table-td", `
|
|
69303
|
+
box-shadow: inset 0 2px 0 0 var(--u-drop-mark-color);
|
|
69304
|
+
`)])]), cM("drop-after", null, [c$1(">", [cB("data-table-td", `
|
|
69305
|
+
box-shadow: inset 0 -2px 0 0 var(--u-drop-mark-color);
|
|
69306
|
+
`)])]), cM("striped", "background-color: var(--u-merged-td-color-striped);", [cB("data-table-td", "background-color: var(--u-merged-td-color-striped);")]), c$1("&:hover", "background-color: var(--u-merged-td-color-hover);", [c$1(">", [cB("data-table-td", "background-color: var(--u-merged-td-color-hover);")])]), c$1("&:has(.u-data-table-td--editable:hover)", [c$1(">", [cB("data-table-td", "background-color: var(--u-merged-td-color);", [cM("editable", [c$1("&:hover", "background-color: var(--u-merged-td-color-hover);")])])])])]), cB("data-table-th", `
|
|
69100
69307
|
padding: var(--u-th-padding);
|
|
69101
69308
|
position: relative;
|
|
69102
69309
|
height: var(--u-th-height);
|
|
@@ -69249,7 +69456,22 @@
|
|
|
69249
69456
|
`), cM("selection, expand", `
|
|
69250
69457
|
text-align: center;
|
|
69251
69458
|
line-height: 0;
|
|
69252
|
-
`), cM("
|
|
69459
|
+
`), cM("draggable", `
|
|
69460
|
+
text-align: center;
|
|
69461
|
+
line-height: 0;
|
|
69462
|
+
cursor: grab;
|
|
69463
|
+
`, [c$1("&:active", `
|
|
69464
|
+
cursor: grabbing;
|
|
69465
|
+
`), c$1("&:hover", [cE("drag-handle", `
|
|
69466
|
+
color: var(--u-th-icon-color-active);
|
|
69467
|
+
`)]), cE("drag-handle", `
|
|
69468
|
+
display: inline-flex;
|
|
69469
|
+
align-items: center;
|
|
69470
|
+
justify-content: center;
|
|
69471
|
+
color: var(--u-th-icon-color);
|
|
69472
|
+
line-height: 0;
|
|
69473
|
+
pointer-events: none;
|
|
69474
|
+
`)]), cM("editable", `
|
|
69253
69475
|
cursor: pointer;
|
|
69254
69476
|
position: relative;
|
|
69255
69477
|
padding: 0;
|
|
@@ -69269,7 +69491,11 @@
|
|
|
69269
69491
|
height: 100%;
|
|
69270
69492
|
width: 100%;
|
|
69271
69493
|
}
|
|
69272
|
-
`), fixedColumnStyle]), cB("data-table-
|
|
69494
|
+
`), fixedColumnStyle]), cB("data-table-drag-ghost", `
|
|
69495
|
+
opacity: var(--u-drag-ghost-opacity);
|
|
69496
|
+
filter: var(--u-drag-ghost-filter);
|
|
69497
|
+
pointer-events: none;
|
|
69498
|
+
`), cB("data-table-empty", `
|
|
69273
69499
|
box-sizing: border-box;
|
|
69274
69500
|
padding: var(--u-empty-padding);
|
|
69275
69501
|
flex-grow: 1;
|
|
@@ -69757,6 +69983,242 @@
|
|
|
69757
69983
|
};
|
|
69758
69984
|
}
|
|
69759
69985
|
|
|
69986
|
+
const DROP_HALF_DIVISOR = 2;
|
|
69987
|
+
const DROP_STEP_BIAS = 1;
|
|
69988
|
+
const FALLBACK_ORDER = 0;
|
|
69989
|
+
const SINGLE_ROW_DRAG_SIZE = 1;
|
|
69990
|
+
const DRAG_IMAGE_OFFSET = 0;
|
|
69991
|
+
const GHOST_OFFSCREEN_TOP_PX = -1e4;
|
|
69992
|
+
const GHOST_CLEANUP_DELAY_MS = 0;
|
|
69993
|
+
function useRowDrag(props, {
|
|
69994
|
+
paginatedDataRef,
|
|
69995
|
+
mergedCheckedRowKeySetRef,
|
|
69996
|
+
mergedClsPrefixRef
|
|
69997
|
+
}) {
|
|
69998
|
+
const draggableColumnRef = useMemo(() => {
|
|
69999
|
+
const findDraggableColumn = columns => {
|
|
70000
|
+
for (const column of columns) {
|
|
70001
|
+
if ("children" in column) {
|
|
70002
|
+
const nested = findDraggableColumn(column.children);
|
|
70003
|
+
if (nested) return nested;
|
|
70004
|
+
} else if (column.type === "draggable") {
|
|
70005
|
+
return column;
|
|
70006
|
+
}
|
|
70007
|
+
}
|
|
70008
|
+
return null;
|
|
70009
|
+
};
|
|
70010
|
+
return findDraggableColumn(props.columns);
|
|
70011
|
+
});
|
|
70012
|
+
const draggingRowKeysRef = vue.ref([]);
|
|
70013
|
+
const draggingRowKeySetRef = vue.computed(() => new Set(draggingRowKeysRef.value));
|
|
70014
|
+
const droppingRowKeyRef = vue.ref(null);
|
|
70015
|
+
const droppingPositionRef = vue.ref(null);
|
|
70016
|
+
function resetDropState() {
|
|
70017
|
+
droppingRowKeyRef.value = null;
|
|
70018
|
+
droppingPositionRef.value = null;
|
|
70019
|
+
}
|
|
70020
|
+
function isRowDraggable(rowData) {
|
|
70021
|
+
const column = draggableColumnRef.value;
|
|
70022
|
+
if (!column) return false;
|
|
70023
|
+
if (typeof column.draggable === "function") {
|
|
70024
|
+
return column.draggable(rowData);
|
|
70025
|
+
}
|
|
70026
|
+
return true;
|
|
70027
|
+
}
|
|
70028
|
+
function getRowByKey(targetKey) {
|
|
70029
|
+
return paginatedDataRef.value.find(node => node.key === targetKey)?.rawNode;
|
|
70030
|
+
}
|
|
70031
|
+
function resolveDragKeys(initialRowKey) {
|
|
70032
|
+
const checkedSet = mergedCheckedRowKeySetRef.value;
|
|
70033
|
+
if (!checkedSet.has(initialRowKey)) return [initialRowKey];
|
|
70034
|
+
const keysInOrder = [];
|
|
70035
|
+
for (const node of paginatedDataRef.value) {
|
|
70036
|
+
if (checkedSet.has(node.key) && isRowDraggable(node.rawNode)) {
|
|
70037
|
+
keysInOrder.push(node.key);
|
|
70038
|
+
}
|
|
70039
|
+
}
|
|
70040
|
+
return keysInOrder.length ? keysInOrder : [initialRowKey];
|
|
70041
|
+
}
|
|
70042
|
+
function applyDragImage(event) {
|
|
70043
|
+
if (!event.dataTransfer || typeof event.dataTransfer.setDragImage !== "function") {
|
|
70044
|
+
return;
|
|
70045
|
+
}
|
|
70046
|
+
const cellElement = event.currentTarget;
|
|
70047
|
+
const rowElement = cellElement?.closest("tr");
|
|
70048
|
+
if (!rowElement) return;
|
|
70049
|
+
const draggedSet = draggingRowKeySetRef.value;
|
|
70050
|
+
if (draggedSet.size <= SINGLE_ROW_DRAG_SIZE) {
|
|
70051
|
+
event.dataTransfer.setDragImage(rowElement, DRAG_IMAGE_OFFSET, DRAG_IMAGE_OFFSET);
|
|
70052
|
+
return;
|
|
70053
|
+
}
|
|
70054
|
+
const tableElement = rowElement.closest("table");
|
|
70055
|
+
if (!tableElement) {
|
|
70056
|
+
event.dataTransfer.setDragImage(rowElement, DRAG_IMAGE_OFFSET, DRAG_IMAGE_OFFSET);
|
|
70057
|
+
return;
|
|
70058
|
+
}
|
|
70059
|
+
const mergedClsPrefix = mergedClsPrefixRef.value;
|
|
70060
|
+
const keyStringSet = new Set(Array.from(draggedSet).map(String));
|
|
70061
|
+
const ghost = tableElement.cloneNode(true);
|
|
70062
|
+
ghost.classList.add(`${mergedClsPrefix}-data-table-drag-ghost`);
|
|
70063
|
+
ghost.querySelectorAll("thead").forEach(headElement => headElement.remove());
|
|
70064
|
+
ghost.querySelectorAll("tbody > tr").forEach(rowChild => {
|
|
70065
|
+
const childKey = rowChild.getAttribute("data-row-key");
|
|
70066
|
+
if (childKey === null || !keyStringSet.has(childKey)) rowChild.remove();
|
|
70067
|
+
});
|
|
70068
|
+
ghost.style.position = "fixed";
|
|
70069
|
+
ghost.style.top = `${GHOST_OFFSCREEN_TOP_PX}px`;
|
|
70070
|
+
ghost.style.left = "0";
|
|
70071
|
+
ghost.style.pointerEvents = "none";
|
|
70072
|
+
ghost.style.width = `${tableElement.offsetWidth}px`;
|
|
70073
|
+
const hostElement = tableElement.closest(`.${mergedClsPrefix}-data-table`) || document.body;
|
|
70074
|
+
hostElement.appendChild(ghost);
|
|
70075
|
+
event.dataTransfer.setDragImage(ghost, DRAG_IMAGE_OFFSET, DRAG_IMAGE_OFFSET);
|
|
70076
|
+
setTimeout(() => {
|
|
70077
|
+
if (ghost.parentNode) ghost.parentNode.removeChild(ghost);
|
|
70078
|
+
}, GHOST_CLEANUP_DELAY_MS);
|
|
70079
|
+
}
|
|
70080
|
+
function handleRowDragStart(event, rowKey) {
|
|
70081
|
+
const row = getRowByKey(rowKey);
|
|
70082
|
+
if (!row || !isRowDraggable(row)) {
|
|
70083
|
+
event.preventDefault();
|
|
70084
|
+
return;
|
|
70085
|
+
}
|
|
70086
|
+
draggingRowKeysRef.value = resolveDragKeys(rowKey);
|
|
70087
|
+
if (event.dataTransfer) {
|
|
70088
|
+
event.dataTransfer.effectAllowed = "move";
|
|
70089
|
+
event.dataTransfer.setData("text/plain", draggingRowKeysRef.value.map(String).join(","));
|
|
70090
|
+
}
|
|
70091
|
+
applyDragImage(event);
|
|
70092
|
+
}
|
|
70093
|
+
function handleRowDragOver(event, rowKey) {
|
|
70094
|
+
if (!draggableColumnRef.value) return;
|
|
70095
|
+
if (!draggingRowKeysRef.value.length) return;
|
|
70096
|
+
event.preventDefault();
|
|
70097
|
+
if (event.dataTransfer) {
|
|
70098
|
+
event.dataTransfer.dropEffect = "move";
|
|
70099
|
+
}
|
|
70100
|
+
if (draggingRowKeySetRef.value.has(rowKey)) {
|
|
70101
|
+
resetDropState();
|
|
70102
|
+
return;
|
|
70103
|
+
}
|
|
70104
|
+
const target = event.currentTarget;
|
|
70105
|
+
if (!target) return;
|
|
70106
|
+
const rect = target.getBoundingClientRect();
|
|
70107
|
+
const offset = event.clientY - rect.top;
|
|
70108
|
+
const position = offset < rect.height / DROP_HALF_DIVISOR ? "before" : "after";
|
|
70109
|
+
droppingRowKeyRef.value = rowKey;
|
|
70110
|
+
droppingPositionRef.value = position;
|
|
70111
|
+
}
|
|
70112
|
+
function handleRowDragLeave(event, rowKey) {
|
|
70113
|
+
if (droppingRowKeyRef.value !== rowKey) return;
|
|
70114
|
+
const related = event.relatedTarget;
|
|
70115
|
+
const current = event.currentTarget;
|
|
70116
|
+
if (related && current && current.contains(related)) {
|
|
70117
|
+
return;
|
|
70118
|
+
}
|
|
70119
|
+
resetDropState();
|
|
70120
|
+
}
|
|
70121
|
+
function handleRowDragEnd() {
|
|
70122
|
+
draggingRowKeysRef.value = [];
|
|
70123
|
+
resetDropState();
|
|
70124
|
+
}
|
|
70125
|
+
function readOrder(row, orderKey) {
|
|
70126
|
+
const value = row?.[orderKey];
|
|
70127
|
+
return typeof value === "number" ? value : Number(value) || FALLBACK_ORDER;
|
|
70128
|
+
}
|
|
70129
|
+
function computeNewOrders(draggedKeys, dropIndex, position, orderKey) {
|
|
70130
|
+
const rows = paginatedDataRef.value;
|
|
70131
|
+
if (!rows.length) return null;
|
|
70132
|
+
const draggedSet = new Set(draggedKeys);
|
|
70133
|
+
const draggedIndexes = rows.map((node, index) => draggedSet.has(node.key) ? index : -1).filter(index => index >= 0);
|
|
70134
|
+
if (!draggedIndexes.length) return null;
|
|
70135
|
+
const filtered = rows.filter(node => !draggedSet.has(node.key));
|
|
70136
|
+
const targetIndex = position === "before" ? dropIndex : dropIndex + 1;
|
|
70137
|
+
const removedBefore = draggedIndexes.filter(index => index < targetIndex).length;
|
|
70138
|
+
const insertAt = Math.max(0, targetIndex - removedBefore);
|
|
70139
|
+
const prev = filtered[insertAt - 1]?.rawNode;
|
|
70140
|
+
const next = filtered[insertAt]?.rawNode;
|
|
70141
|
+
const draggedCount = draggedKeys.length;
|
|
70142
|
+
const orders = [];
|
|
70143
|
+
if (prev && next) {
|
|
70144
|
+
const prevOrder = readOrder(prev, orderKey);
|
|
70145
|
+
const nextOrder = readOrder(next, orderKey);
|
|
70146
|
+
const step = (nextOrder - prevOrder) / (draggedCount + DROP_STEP_BIAS);
|
|
70147
|
+
for (let index = 0; index < draggedCount; index++) {
|
|
70148
|
+
orders.push(prevOrder + step * (index + DROP_STEP_BIAS));
|
|
70149
|
+
}
|
|
70150
|
+
} else if (!prev && next) {
|
|
70151
|
+
const nextOrder = readOrder(next, orderKey);
|
|
70152
|
+
for (let index = 0; index < draggedCount; index++) {
|
|
70153
|
+
orders.push(nextOrder - (draggedCount - index));
|
|
70154
|
+
}
|
|
70155
|
+
} else if (prev && !next) {
|
|
70156
|
+
const prevOrder = readOrder(prev, orderKey);
|
|
70157
|
+
for (let index = 0; index < draggedCount; index++) {
|
|
70158
|
+
orders.push(prevOrder + (index + DROP_STEP_BIAS));
|
|
70159
|
+
}
|
|
70160
|
+
} else {
|
|
70161
|
+
for (const key of draggedKeys) {
|
|
70162
|
+
const row = rows.find(node => node.key === key)?.rawNode;
|
|
70163
|
+
orders.push(readOrder(row, orderKey));
|
|
70164
|
+
}
|
|
70165
|
+
}
|
|
70166
|
+
return orders;
|
|
70167
|
+
}
|
|
70168
|
+
function handleRowDrop(event, rowKey) {
|
|
70169
|
+
event.preventDefault();
|
|
70170
|
+
const column = draggableColumnRef.value;
|
|
70171
|
+
const draggedKeys = draggingRowKeysRef.value;
|
|
70172
|
+
const position = droppingPositionRef.value;
|
|
70173
|
+
if (!column || !draggedKeys.length || position === null || draggingRowKeySetRef.value.has(rowKey)) {
|
|
70174
|
+
handleRowDragEnd();
|
|
70175
|
+
return;
|
|
70176
|
+
}
|
|
70177
|
+
const rows = paginatedDataRef.value;
|
|
70178
|
+
const dropIndex = rows.findIndex(node => node.key === rowKey);
|
|
70179
|
+
if (dropIndex < 0) {
|
|
70180
|
+
handleRowDragEnd();
|
|
70181
|
+
return;
|
|
70182
|
+
}
|
|
70183
|
+
const orderKey = column.key;
|
|
70184
|
+
const newOrders = computeNewOrders(draggedKeys, dropIndex, position, orderKey);
|
|
70185
|
+
const dispatchPlan = draggedKeys.map((key, index) => {
|
|
70186
|
+
const row = rows.find(node => node.key === key)?.rawNode;
|
|
70187
|
+
return row ? {
|
|
70188
|
+
row,
|
|
70189
|
+
oldOrder: readOrder(row, orderKey),
|
|
70190
|
+
newOrder: newOrders ? newOrders[index] : readOrder(row, orderKey)
|
|
70191
|
+
} : null;
|
|
70192
|
+
});
|
|
70193
|
+
const targetIndex = position === "before" ? dropIndex : dropIndex + 1;
|
|
70194
|
+
const draggedSet = draggingRowKeySetRef.value;
|
|
70195
|
+
const draggedIndexes = rows.map((node, index) => draggedSet.has(node.key) ? index : -1).filter(index => index >= 0);
|
|
70196
|
+
const removedBefore = draggedIndexes.filter(index => index < targetIndex).length;
|
|
70197
|
+
const baseIndex = Math.max(0, targetIndex - removedBefore);
|
|
70198
|
+
handleRowDragEnd();
|
|
70199
|
+
if (!newOrders) return;
|
|
70200
|
+
dispatchPlan.forEach((entry, index) => {
|
|
70201
|
+
if (!entry) return;
|
|
70202
|
+
column.onDragEnd?.(entry.row, {
|
|
70203
|
+
index: baseIndex + index,
|
|
70204
|
+
oldOrder: entry.oldOrder,
|
|
70205
|
+
newOrder: entry.newOrder
|
|
70206
|
+
});
|
|
70207
|
+
});
|
|
70208
|
+
}
|
|
70209
|
+
return {
|
|
70210
|
+
draggableColumnRef,
|
|
70211
|
+
draggingRowKeySetRef,
|
|
70212
|
+
droppingRowKeyRef,
|
|
70213
|
+
droppingPositionRef,
|
|
70214
|
+
handleRowDragStart,
|
|
70215
|
+
handleRowDragOver,
|
|
70216
|
+
handleRowDragLeave,
|
|
70217
|
+
handleRowDragEnd,
|
|
70218
|
+
handleRowDrop
|
|
70219
|
+
};
|
|
70220
|
+
}
|
|
70221
|
+
|
|
69760
70222
|
function useScroll(props, {
|
|
69761
70223
|
mainTableInstRef,
|
|
69762
70224
|
mergedCurrentPageRef,
|
|
@@ -70022,7 +70484,7 @@
|
|
|
70022
70484
|
});
|
|
70023
70485
|
const uncontrolledSortStateRef = vue.ref(defaultSortState);
|
|
70024
70486
|
const mergedSortStateRef = vue.computed(() => {
|
|
70025
|
-
const columnsWithControlledSortOrder = dataRelatedColsRef.value.filter(column => column.type !== "selection" && column.sorter !== void 0 && (column.sortOrder === "ascend" || column.sortOrder === "descend" || column.sortOrder === false));
|
|
70487
|
+
const columnsWithControlledSortOrder = dataRelatedColsRef.value.filter(column => column.type !== "selection" && column.type !== "draggable" && column.sorter !== void 0 && (column.sortOrder === "ascend" || column.sortOrder === "descend" || column.sortOrder === false));
|
|
70026
70488
|
const columnToSort = columnsWithControlledSortOrder.filter(col => col.sortOrder !== false);
|
|
70027
70489
|
if (columnToSort.length) {
|
|
70028
70490
|
return columnToSort.map(column => {
|
|
@@ -70076,6 +70538,18 @@
|
|
|
70076
70538
|
return compareResult;
|
|
70077
70539
|
});
|
|
70078
70540
|
}
|
|
70541
|
+
const draggableColumn = dataRelatedColsRef.value.find(column => column.type === "draggable" && column.sortByKey !== false);
|
|
70542
|
+
if (draggableColumn) {
|
|
70543
|
+
const orderKey = draggableColumn.key;
|
|
70544
|
+
return filteredDataRef.value.slice().sort((tmNode1, tmNode2) => {
|
|
70545
|
+
const order1 = tmNode1.rawNode[orderKey];
|
|
70546
|
+
const order2 = tmNode2.rawNode[orderKey];
|
|
70547
|
+
if (typeof order1 === "number" && typeof order2 === "number") {
|
|
70548
|
+
return order1 - order2;
|
|
70549
|
+
}
|
|
70550
|
+
return 0;
|
|
70551
|
+
});
|
|
70552
|
+
}
|
|
70079
70553
|
return filteredDataRef.value;
|
|
70080
70554
|
});
|
|
70081
70555
|
function getUpdatedSorterState(sortState) {
|
|
@@ -70114,7 +70588,7 @@
|
|
|
70114
70588
|
if (!columnKey) {
|
|
70115
70589
|
clearSorter();
|
|
70116
70590
|
} else {
|
|
70117
|
-
const columnToSort = dataRelatedColsRef.value.find(column => column.type !== "selection" && column.type !== "expand" && column.key === columnKey);
|
|
70591
|
+
const columnToSort = dataRelatedColsRef.value.find(column => column.type !== "selection" && column.type !== "expand" && column.type !== "draggable" && column.key === columnKey);
|
|
70118
70592
|
if (!columnToSort?.sorter) return;
|
|
70119
70593
|
const sorter = columnToSort.sorter;
|
|
70120
70594
|
deriveNextSorter({
|
|
@@ -70206,7 +70680,9 @@
|
|
|
70206
70680
|
});
|
|
70207
70681
|
const controlledFilterState = {};
|
|
70208
70682
|
columnsWithControlledFilter.forEach(column => {
|
|
70209
|
-
if (column.type === "selection" || column.type === "expand")
|
|
70683
|
+
if (column.type === "selection" || column.type === "expand" || column.type === "draggable") {
|
|
70684
|
+
return;
|
|
70685
|
+
}
|
|
70210
70686
|
if (column.filterOptionValues === void 0) {
|
|
70211
70687
|
controlledFilterState[column.key] = column.filterOptionValue ?? null;
|
|
70212
70688
|
} else {
|
|
@@ -70231,7 +70707,7 @@
|
|
|
70231
70707
|
} = treeMateRef;
|
|
70232
70708
|
const columnEntries = [];
|
|
70233
70709
|
columns.forEach(column => {
|
|
70234
|
-
if (column.type === "selection" || column.type === "expand" || "children" in column) {
|
|
70710
|
+
if (column.type === "selection" || column.type === "expand" || column.type === "draggable" || "children" in column) {
|
|
70235
70711
|
return;
|
|
70236
70712
|
}
|
|
70237
70713
|
columnEntries.push([column.key, column]);
|
|
@@ -70508,7 +70984,7 @@
|
|
|
70508
70984
|
if (!stored?.length) return null;
|
|
70509
70985
|
const result = [];
|
|
70510
70986
|
for (const item of stored) {
|
|
70511
|
-
const column = dataRelatedCols.find(col => col.type !== "selection" && col.type !== "expand" && "key" in col && col.key === item.columnKey && col.sorter !== void 0);
|
|
70987
|
+
const column = dataRelatedCols.find(col => col.type !== "selection" && col.type !== "expand" && col.type !== "draggable" && "key" in col && col.key === item.columnKey && col.sorter !== void 0);
|
|
70512
70988
|
if (column?.sorter) {
|
|
70513
70989
|
result.push({
|
|
70514
70990
|
columnKey: item.columnKey,
|
|
@@ -70654,6 +71130,21 @@
|
|
|
70654
71130
|
expandableRef,
|
|
70655
71131
|
doUpdateExpandedRowKeys
|
|
70656
71132
|
} = useExpand(props, treeMateRef);
|
|
71133
|
+
const {
|
|
71134
|
+
draggableColumnRef,
|
|
71135
|
+
draggingRowKeySetRef,
|
|
71136
|
+
droppingRowKeyRef,
|
|
71137
|
+
droppingPositionRef,
|
|
71138
|
+
handleRowDragStart,
|
|
71139
|
+
handleRowDragOver,
|
|
71140
|
+
handleRowDragLeave,
|
|
71141
|
+
handleRowDragEnd,
|
|
71142
|
+
handleRowDrop
|
|
71143
|
+
} = useRowDrag(props, {
|
|
71144
|
+
paginatedDataRef,
|
|
71145
|
+
mergedCheckedRowKeySetRef,
|
|
71146
|
+
mergedClsPrefixRef
|
|
71147
|
+
});
|
|
70657
71148
|
const {
|
|
70658
71149
|
handleTableBodyScroll,
|
|
70659
71150
|
handleTableHeaderScroll,
|
|
@@ -71095,6 +71586,15 @@
|
|
|
71095
71586
|
"--u-action-divider-color": actionDividerColor
|
|
71096
71587
|
};
|
|
71097
71588
|
}),
|
|
71589
|
+
draggableColumnRef,
|
|
71590
|
+
draggingRowKeySetRef,
|
|
71591
|
+
droppingRowKeyRef,
|
|
71592
|
+
droppingPositionRef,
|
|
71593
|
+
handleRowDragStart,
|
|
71594
|
+
handleRowDragOver,
|
|
71595
|
+
handleRowDragLeave,
|
|
71596
|
+
handleRowDragEnd,
|
|
71597
|
+
handleRowDrop,
|
|
71098
71598
|
onLoadRef: vue.toRef(props, "onLoad"),
|
|
71099
71599
|
mergedTableLayoutRef,
|
|
71100
71600
|
resizableEnabledRef,
|
|
@@ -71170,6 +71670,9 @@
|
|
|
71170
71670
|
thButtonColorHover,
|
|
71171
71671
|
thIconColor,
|
|
71172
71672
|
thIconColorActive,
|
|
71673
|
+
dropMarkColor,
|
|
71674
|
+
dragGhostOpacity,
|
|
71675
|
+
dragGhostFilter,
|
|
71173
71676
|
filterSize,
|
|
71174
71677
|
borderRadius,
|
|
71175
71678
|
lineHeight,
|
|
@@ -71238,6 +71741,9 @@
|
|
|
71238
71741
|
"--u-th-button-color-hover": thButtonColorHover,
|
|
71239
71742
|
"--u-th-icon-color": thIconColor,
|
|
71240
71743
|
"--u-th-icon-color-active": thIconColorActive,
|
|
71744
|
+
"--u-drop-mark-color": dropMarkColor,
|
|
71745
|
+
"--u-drag-ghost-opacity": dragGhostOpacity,
|
|
71746
|
+
"--u-drag-ghost-filter": dragGhostFilter,
|
|
71241
71747
|
"--u-filter-size": filterSize,
|
|
71242
71748
|
"--u-pagination-margin": paginationMargin,
|
|
71243
71749
|
"--u-empty-padding": emptyPadding,
|
|
@@ -80204,7 +80710,7 @@
|
|
|
80204
80710
|
},
|
|
80205
80711
|
render() {
|
|
80206
80712
|
const defaultSlots = this.$slots.default;
|
|
80207
|
-
const children = defaultSlots ? flatten$
|
|
80713
|
+
const children = defaultSlots ? flatten$1(defaultSlots()) : [];
|
|
80208
80714
|
const memorizedLength = children.length;
|
|
80209
80715
|
const {
|
|
80210
80716
|
contentClass,
|
|
@@ -83864,7 +84370,7 @@
|
|
|
83864
84370
|
wrapItem,
|
|
83865
84371
|
internalUseGap
|
|
83866
84372
|
} = this;
|
|
83867
|
-
const children = flatten$
|
|
84373
|
+
const children = flatten$1(getSlot(this), false);
|
|
83868
84374
|
if (!children.length)
|
|
83869
84375
|
return null;
|
|
83870
84376
|
const horizontalMargin = `${margin.horizontal}px`;
|
|
@@ -95385,6 +95891,10 @@
|
|
|
95385
95891
|
const mappingCardProps = {
|
|
95386
95892
|
title: [String, Function],
|
|
95387
95893
|
description: [String, Function],
|
|
95894
|
+
subTitle: [String, Function],
|
|
95895
|
+
subDescription: [String, Function],
|
|
95896
|
+
headerInfo: Function,
|
|
95897
|
+
headerSubInfo: Function,
|
|
95388
95898
|
rows: Array,
|
|
95389
95899
|
cols: {
|
|
95390
95900
|
type: Number,
|
|
@@ -96003,6 +96513,26 @@
|
|
|
96003
96513
|
const theme = mergedThemeRef.value;
|
|
96004
96514
|
const locale = localeRef.value;
|
|
96005
96515
|
const renderTextProp = (value) => typeof value === "function" ? value() : value;
|
|
96516
|
+
const renderInfoText = (title, description) => {
|
|
96517
|
+
if (!title && !description)
|
|
96518
|
+
return null;
|
|
96519
|
+
return /* @__PURE__ */ vue.h("div", { class: `${prefix}-mapping-card__header-info-text` }, title && /* @__PURE__ */ vue.h("div", { class: `${prefix}-mapping-card__header-title` }, renderTextProp(title)), description && /* @__PURE__ */ vue.h("div", { class: `${prefix}-mapping-card__header-description` }, renderTextProp(description)));
|
|
96520
|
+
};
|
|
96521
|
+
const mainInfo = resolveSlot(slots.headerInfo, () => {
|
|
96522
|
+
const fromProp = props.headerInfo?.();
|
|
96523
|
+
if (fromProp)
|
|
96524
|
+
return [fromProp];
|
|
96525
|
+
const fallback = renderInfoText(props.title, props.description);
|
|
96526
|
+
return fallback ? [fallback] : [];
|
|
96527
|
+
});
|
|
96528
|
+
const subInfo = resolveSlot(slots.headerSubInfo, () => {
|
|
96529
|
+
const fromProp = props.headerSubInfo?.();
|
|
96530
|
+
if (fromProp)
|
|
96531
|
+
return [fromProp];
|
|
96532
|
+
const fallback = renderInfoText(props.subTitle, props.subDescription);
|
|
96533
|
+
return fallback ? [fallback] : [];
|
|
96534
|
+
});
|
|
96535
|
+
const hasSubInfo = subInfo.length > 0;
|
|
96006
96536
|
return /* @__PURE__ */ vue.h("div", { class: `${prefix}-mapping-card__header` }, /* @__PURE__ */ vue.h(
|
|
96007
96537
|
_UFlex,
|
|
96008
96538
|
{
|
|
@@ -96011,7 +96541,7 @@
|
|
|
96011
96541
|
class: `${prefix}-mapping-card__header-info`
|
|
96012
96542
|
},
|
|
96013
96543
|
{
|
|
96014
|
-
default: () => /* @__PURE__ */ vue.h(vue.Fragment, null,
|
|
96544
|
+
default: () => /* @__PURE__ */ vue.h(vue.Fragment, null, mainInfo, !props.hideCopy && /* @__PURE__ */ vue.h(_UTooltip, null, {
|
|
96015
96545
|
trigger: () => /* @__PURE__ */ vue.h(
|
|
96016
96546
|
Button,
|
|
96017
96547
|
{
|
|
@@ -96035,7 +96565,7 @@
|
|
|
96035
96565
|
}
|
|
96036
96566
|
),
|
|
96037
96567
|
default: () => locale.copyTooltip
|
|
96038
|
-
}))
|
|
96568
|
+
}), hasSubInfo && /* @__PURE__ */ vue.h("div", { class: `${prefix}-mapping-card__header-info-divider` }), hasSubInfo && subInfo)
|
|
96039
96569
|
}
|
|
96040
96570
|
), !props.hideHeaderActions && /* @__PURE__ */ vue.h(_UFlex, { align: "center", size: "small" }, {
|
|
96041
96571
|
default: () => resolveSlot(slots.headerActions, () => {
|
|
@@ -96048,7 +96578,7 @@
|
|
|
96048
96578
|
...props.headerSwitchProps ?? {},
|
|
96049
96579
|
theme: theme.peers.Switch,
|
|
96050
96580
|
themeOverrides: theme.peerOverrides.Switch,
|
|
96051
|
-
onUpdateValue: (
|
|
96581
|
+
onUpdateValue: (value) => props.onSwitchChange?.(value)
|
|
96052
96582
|
}
|
|
96053
96583
|
),
|
|
96054
96584
|
default: () => locale.switchTooltip
|
|
@@ -96117,85 +96647,92 @@
|
|
|
96117
96647
|
});
|
|
96118
96648
|
|
|
96119
96649
|
var style$o = c$1([cB("mapping-card", `
|
|
96120
|
-
|
|
96121
|
-
|
|
96122
|
-
|
|
96123
|
-
|
|
96124
|
-
|
|
96125
|
-
`, [cE("header", `
|
|
96126
|
-
|
|
96127
|
-
|
|
96128
|
-
|
|
96129
|
-
|
|
96130
|
-
|
|
96131
|
-
|
|
96132
|
-
|
|
96133
|
-
|
|
96134
|
-
|
|
96135
|
-
|
|
96136
|
-
|
|
96137
|
-
|
|
96138
|
-
|
|
96650
|
+
background-color: var(--u-background-color);
|
|
96651
|
+
border: 1px solid var(--u-border-color);
|
|
96652
|
+
border-radius: var(--u-border-radius);
|
|
96653
|
+
overflow: hidden;
|
|
96654
|
+
box-sizing: border-box;
|
|
96655
|
+
`, [cE("header", `
|
|
96656
|
+
padding: var(--u-header-padding);
|
|
96657
|
+
display: flex;
|
|
96658
|
+
align-items: center;
|
|
96659
|
+
justify-content: space-between;
|
|
96660
|
+
gap: 8px;
|
|
96661
|
+
position: relative;
|
|
96662
|
+
`, [c$1("&::after", `
|
|
96663
|
+
content: '';
|
|
96664
|
+
position: absolute;
|
|
96665
|
+
left: 24px;
|
|
96666
|
+
right: 24px;
|
|
96667
|
+
bottom: 0;
|
|
96668
|
+
height: 1px;
|
|
96669
|
+
background: var(--u-border-color);
|
|
96670
|
+
`)]), cE("header-info", `
|
|
96671
|
+
min-width: 0;
|
|
96672
|
+
`), cE("header-info-text", `
|
|
96673
|
+
min-width: 0;
|
|
96674
|
+
margin-right: 12px;
|
|
96675
|
+
`), cE("header-title", `
|
|
96676
|
+
color: var(--u-title-color);
|
|
96677
|
+
`), cE("header-description", `
|
|
96678
|
+
color: var(--u-description-color);
|
|
96679
|
+
margin-top: 2px;
|
|
96680
|
+
`), cE("header-info-divider", `
|
|
96681
|
+
margin-right: 12px;
|
|
96682
|
+
width: 1px;
|
|
96683
|
+
align-self: stretch;
|
|
96139
96684
|
background: var(--u-border-color);
|
|
96140
|
-
|
|
96141
|
-
|
|
96142
|
-
|
|
96143
|
-
|
|
96144
|
-
|
|
96145
|
-
|
|
96146
|
-
|
|
96147
|
-
|
|
96148
|
-
|
|
96149
|
-
|
|
96150
|
-
|
|
96151
|
-
|
|
96152
|
-
|
|
96153
|
-
|
|
96154
|
-
|
|
96155
|
-
|
|
96156
|
-
|
|
96157
|
-
|
|
96158
|
-
|
|
96159
|
-
|
|
96160
|
-
|
|
96161
|
-
|
|
96162
|
-
|
|
96685
|
+
flex-shrink: 0;
|
|
96686
|
+
`), cE("body", `
|
|
96687
|
+
display: flex;
|
|
96688
|
+
padding: var(--u-body-padding);
|
|
96689
|
+
`), cE("body-group", `
|
|
96690
|
+
flex: 1;
|
|
96691
|
+
position: relative;
|
|
96692
|
+
`, [c$1("&:last-child", `
|
|
96693
|
+
padding: 0 0 12px 20px;
|
|
96694
|
+
`), c$1("&:first-child", `
|
|
96695
|
+
padding: 0 20px 12px 0;
|
|
96696
|
+
`), c$1("&:only-child", `
|
|
96697
|
+
padding: 0 0 12px 0;
|
|
96698
|
+
`), c$1("&::after", `
|
|
96699
|
+
content: '';
|
|
96700
|
+
position: absolute;
|
|
96701
|
+
right: 0;
|
|
96702
|
+
top: 0;
|
|
96703
|
+
width: 1px;
|
|
96704
|
+
height: calc(100% - 12px);
|
|
96705
|
+
background: var(--u-border-color);
|
|
96706
|
+
`), c$1("&:last-child::after", `
|
|
96707
|
+
display: none;
|
|
96708
|
+
`)]), cE("body-items", `
|
|
96709
|
+
align-items: center;
|
|
96710
|
+
`), cE("body-item", [cM("text", `
|
|
96711
|
+
padding: 0 24px;
|
|
96712
|
+
`)]), cE("body-group-icon", `
|
|
96163
96713
|
position: absolute;
|
|
96164
96714
|
right: 0;
|
|
96165
|
-
top:
|
|
96166
|
-
|
|
96167
|
-
|
|
96168
|
-
|
|
96169
|
-
|
|
96170
|
-
|
|
96171
|
-
|
|
96172
|
-
|
|
96173
|
-
|
|
96174
|
-
|
|
96175
|
-
`)
|
|
96176
|
-
|
|
96177
|
-
|
|
96178
|
-
|
|
96179
|
-
|
|
96180
|
-
|
|
96181
|
-
|
|
96182
|
-
|
|
96183
|
-
|
|
96184
|
-
|
|
96185
|
-
|
|
96186
|
-
justify-content: center;
|
|
96187
|
-
background-color: var(--u-divider-background-color);
|
|
96188
|
-
`), cE("side", `
|
|
96189
|
-
flex: 1;
|
|
96190
|
-
min-width: 0;
|
|
96191
|
-
`), cE("arrow", `
|
|
96192
|
-
display: flex;
|
|
96193
|
-
align-items: center;
|
|
96194
|
-
padding-top: 32px;
|
|
96195
|
-
color: var(--u-arrow-color);
|
|
96196
|
-
font-size: 16px;
|
|
96197
|
-
flex-shrink: 0;
|
|
96198
|
-
`)]), cB("mapping-card-list", `
|
|
96715
|
+
top: 50%;
|
|
96716
|
+
transform: translate(50%, -50%);
|
|
96717
|
+
z-index: 1;
|
|
96718
|
+
display: flex;
|
|
96719
|
+
align-items: center;
|
|
96720
|
+
height: 44px;
|
|
96721
|
+
width: 44px;
|
|
96722
|
+
border-radius: 100px;
|
|
96723
|
+
justify-content: center;
|
|
96724
|
+
background-color: var(--u-divider-background-color);
|
|
96725
|
+
`), cE("side", `
|
|
96726
|
+
flex: 1;
|
|
96727
|
+
min-width: 0;
|
|
96728
|
+
`), cE("arrow", `
|
|
96729
|
+
display: flex;
|
|
96730
|
+
align-items: center;
|
|
96731
|
+
padding-top: 32px;
|
|
96732
|
+
color: var(--u-arrow-color);
|
|
96733
|
+
font-size: 16px;
|
|
96734
|
+
flex-shrink: 0;
|
|
96735
|
+
`)]), cB("mapping-card-list", `
|
|
96199
96736
|
display: flex;
|
|
96200
96737
|
justify-content: space-between;
|
|
96201
96738
|
flex-direction: column;
|
|
@@ -96272,7 +96809,11 @@
|
|
|
96272
96809
|
class: [`${this.mergedClsPrefix}-mapping-card`, themeClass],
|
|
96273
96810
|
style: cssVars
|
|
96274
96811
|
},
|
|
96275
|
-
/* @__PURE__ */ vue.h(MappingCardHeader, null, {
|
|
96812
|
+
/* @__PURE__ */ vue.h(MappingCardHeader, null, {
|
|
96813
|
+
headerActions: this.$slots.headerActions,
|
|
96814
|
+
headerInfo: this.$slots.headerInfo,
|
|
96815
|
+
headerSubInfo: this.$slots.headerSubInfo
|
|
96816
|
+
}),
|
|
96276
96817
|
/* @__PURE__ */ vue.h(MappingCardBody, null)
|
|
96277
96818
|
);
|
|
96278
96819
|
}
|
|
@@ -103661,7 +104202,7 @@
|
|
|
103661
104202
|
(variantConfigs[this.variant]?.vertical ?? this.vertical) && `${mergedClsPrefix}-steps--vertical`
|
|
103662
104203
|
]
|
|
103663
104204
|
},
|
|
103664
|
-
stepsWithIndex(flatten$
|
|
104205
|
+
stepsWithIndex(flatten$1(getSlot(this)))
|
|
103665
104206
|
);
|
|
103666
104207
|
}
|
|
103667
104208
|
});
|
|
@@ -104843,7 +105384,7 @@
|
|
|
104843
105384
|
});
|
|
104844
105385
|
const compitableValueRef = useCompitable(props, ["activeName", "value"]);
|
|
104845
105386
|
const uncontrolledValueRef = vue.ref(
|
|
104846
|
-
compitableValueRef.value ?? props.defaultValue ?? (slots.default ? flatten$
|
|
105387
|
+
compitableValueRef.value ?? props.defaultValue ?? (slots.default ? flatten$1(slots.default())[0]?.props?.name : null)
|
|
104847
105388
|
);
|
|
104848
105389
|
const mergedValueRef = useMergedState(
|
|
104849
105390
|
compitableValueRef,
|
|
@@ -105338,10 +105879,10 @@
|
|
|
105338
105879
|
$slots: { default: defaultSlot, prefix: prefixSlot, suffix: suffixSlot }
|
|
105339
105880
|
} = this;
|
|
105340
105881
|
onRender?.();
|
|
105341
|
-
const tabPaneChildren = defaultSlot ? flatten$
|
|
105882
|
+
const tabPaneChildren = defaultSlot ? flatten$1(defaultSlot()).filter((v) => {
|
|
105342
105883
|
return v.type.name === "TabPane";
|
|
105343
105884
|
}) : [];
|
|
105344
|
-
const tabChildren = defaultSlot ? flatten$
|
|
105885
|
+
const tabChildren = defaultSlot ? flatten$1(defaultSlot()).filter((v) => {
|
|
105345
105886
|
return v.type.name === "Tab";
|
|
105346
105887
|
}) : [];
|
|
105347
105888
|
const showPane = !tabChildren.length;
|
|
@@ -107657,6 +108198,16 @@
|
|
|
107657
108198
|
treeInjectionKey,
|
|
107658
108199
|
null
|
|
107659
108200
|
);
|
|
108201
|
+
const renderSwitchIcon = () => {
|
|
108202
|
+
const { value: renderSwitcherIcon } = renderSwitcherIconRef;
|
|
108203
|
+
return /* @__PURE__ */ vue.h(UIconSwitchTransition, null, {
|
|
108204
|
+
default: () => renderSwitcherIcon ? renderSwitcherIcon({
|
|
108205
|
+
expanded: props.expanded,
|
|
108206
|
+
selected: props.selected,
|
|
108207
|
+
option: props.tmNode.rawNode
|
|
108208
|
+
}) : /* @__PURE__ */ vue.h(UBaseIcon, { clsPrefix: props.clsPrefix, key: "switcher" }, { default: () => /* @__PURE__ */ vue.h(ChevronRightIcon, null) })
|
|
108209
|
+
});
|
|
108210
|
+
};
|
|
107660
108211
|
return () => {
|
|
107661
108212
|
const { clsPrefix, expanded, hide, indent, onClick } = props;
|
|
107662
108213
|
return /* @__PURE__ */ vue.h(
|
|
@@ -107671,28 +108222,16 @@
|
|
|
107671
108222
|
style: { width: `${indent}px` },
|
|
107672
108223
|
onClick
|
|
107673
108224
|
},
|
|
107674
|
-
/* @__PURE__ */ vue.h("div", { class: `${clsPrefix}-tree-node-switcher__icon` }, /* @__PURE__ */ vue.h(
|
|
107675
|
-
|
|
107676
|
-
|
|
107677
|
-
|
|
107678
|
-
|
|
107679
|
-
|
|
107680
|
-
|
|
107681
|
-
|
|
107682
|
-
radius: 85,
|
|
107683
|
-
strokeWidth: 20,
|
|
107684
|
-
...spinPropsRef?.value
|
|
107685
|
-
}
|
|
107686
|
-
);
|
|
107687
|
-
}
|
|
107688
|
-
const { value: renderSwitcherIcon } = renderSwitcherIconRef;
|
|
107689
|
-
return renderSwitcherIcon ? renderSwitcherIcon({
|
|
107690
|
-
expanded: props.expanded,
|
|
107691
|
-
selected: props.selected,
|
|
107692
|
-
option: props.tmNode.rawNode
|
|
107693
|
-
}) : /* @__PURE__ */ vue.h(UBaseIcon, { clsPrefix, key: "switcher" }, { default: () => /* @__PURE__ */ vue.h(SwitcherIcon, null) });
|
|
108225
|
+
/* @__PURE__ */ vue.h("div", { class: `${clsPrefix}-tree-node-switcher__icon` }, props.loading ? /* @__PURE__ */ vue.h(
|
|
108226
|
+
UBaseLoading,
|
|
108227
|
+
{
|
|
108228
|
+
clsPrefix,
|
|
108229
|
+
key: "loading",
|
|
108230
|
+
radius: 85,
|
|
108231
|
+
strokeWidth: 20,
|
|
108232
|
+
...spinPropsRef?.value
|
|
107694
108233
|
}
|
|
107695
|
-
|
|
108234
|
+
) : renderSwitchIcon())
|
|
107696
108235
|
);
|
|
107697
108236
|
};
|
|
107698
108237
|
}
|
|
@@ -108380,19 +108919,20 @@
|
|
|
108380
108919
|
vertical-align: bottom;
|
|
108381
108920
|
`, [cE("icon", `
|
|
108382
108921
|
position: relative;
|
|
108383
|
-
height:
|
|
108384
|
-
width:
|
|
108922
|
+
height: var(--u-switcher-size);
|
|
108923
|
+
width: var(--u-switcher-size);
|
|
108385
108924
|
display: flex;
|
|
108925
|
+
align-items: center;
|
|
108926
|
+
justify-content: center;
|
|
108927
|
+
border-radius: 50%;
|
|
108386
108928
|
color: var(--u-arrow-color);
|
|
108387
|
-
|
|
108929
|
+
background-color: var(--u-switcher-color);
|
|
108930
|
+
transition:
|
|
108931
|
+
color .3s var(--u-bezier),
|
|
108932
|
+
background-color .3s var(--u-bezier);
|
|
108388
108933
|
font-size: 14px;
|
|
108389
108934
|
`, [cB("icon", [iconSwitchTransitionNode]), cB("base-loading", `
|
|
108390
108935
|
color: var(--u-loading-color);
|
|
108391
|
-
position: absolute;
|
|
108392
|
-
left: 0;
|
|
108393
|
-
top: 0;
|
|
108394
|
-
right: 0;
|
|
108395
|
-
bottom: 0;
|
|
108396
108936
|
`, [iconSwitchTransitionNode]), cB("base-icon", [iconSwitchTransitionNode])]), cM("hide", "visibility: hidden;"), cM("expanded", "transform: rotate(90deg);")]), cB("tree-node-checkbox", `
|
|
108397
108937
|
display: inline-flex;
|
|
108398
108938
|
height: var(--u-node-content-height);
|
|
@@ -108529,7 +109069,7 @@
|
|
|
108529
109069
|
scrollbarProps: Object,
|
|
108530
109070
|
indent: {
|
|
108531
109071
|
type: Number,
|
|
108532
|
-
default:
|
|
109072
|
+
default: 36
|
|
108533
109073
|
},
|
|
108534
109074
|
allowDrop: {
|
|
108535
109075
|
type: Function,
|
|
@@ -108565,6 +109105,7 @@
|
|
|
108565
109105
|
"onUpdate:checkedKeys": [Function, Array],
|
|
108566
109106
|
onUpdateSelectedKeys: [Function, Array],
|
|
108567
109107
|
"onUpdate:selectedKeys": [Function, Array],
|
|
109108
|
+
onScroll: [Function, Array],
|
|
108568
109109
|
...treeSharedProps,
|
|
108569
109110
|
// internal props for tree-select
|
|
108570
109111
|
internalTreeSelect: Boolean,
|
|
@@ -108943,7 +109484,7 @@
|
|
|
108943
109484
|
if (~expandedNodeIndex) {
|
|
108944
109485
|
const children = afNodesRef.value[expandedNodeIndex].children;
|
|
108945
109486
|
if (children) {
|
|
108946
|
-
const expandedChildren = flatten
|
|
109487
|
+
const expandedChildren = flatten(children, value);
|
|
108947
109488
|
afNodesRef.value.splice(expandedNodeIndex + 1, 0, {
|
|
108948
109489
|
__motion: true,
|
|
108949
109490
|
mode: "expand",
|
|
@@ -108962,7 +109503,7 @@
|
|
|
108962
109503
|
if (!collapsedNodeChildren)
|
|
108963
109504
|
return;
|
|
108964
109505
|
aipRef.value = true;
|
|
108965
|
-
const collapsedChildren = flatten
|
|
109506
|
+
const collapsedChildren = flatten(collapsedNodeChildren, value);
|
|
108966
109507
|
afNodesRef.value.splice(collapsedNodeIndex + 1, 0, {
|
|
108967
109508
|
__motion: true,
|
|
108968
109509
|
mode: "collapse",
|
|
@@ -109304,8 +109845,8 @@
|
|
|
109304
109845
|
}
|
|
109305
109846
|
doDragLeave({ event, node: node.rawNode });
|
|
109306
109847
|
}
|
|
109307
|
-
function handleDragLeaveTree(
|
|
109308
|
-
if (
|
|
109848
|
+
function handleDragLeaveTree(event) {
|
|
109849
|
+
if (event.target !== event.currentTarget)
|
|
109309
109850
|
return;
|
|
109310
109851
|
resetDropState();
|
|
109311
109852
|
}
|
|
@@ -109502,22 +110043,26 @@
|
|
|
109502
110043
|
});
|
|
109503
110044
|
resetDndState();
|
|
109504
110045
|
}
|
|
109505
|
-
function
|
|
110046
|
+
function doScroll(event) {
|
|
110047
|
+
props.onScroll && call(props.onScroll, event);
|
|
110048
|
+
}
|
|
110049
|
+
function handleScroll(event) {
|
|
109506
110050
|
syncScrollbar();
|
|
110051
|
+
doScroll(event);
|
|
109507
110052
|
}
|
|
109508
110053
|
function handleResize() {
|
|
109509
110054
|
syncScrollbar();
|
|
109510
110055
|
}
|
|
109511
|
-
function handleFocusout(
|
|
110056
|
+
function handleFocusout(event) {
|
|
109512
110057
|
if (props.virtualScroll || props.internalScrollable) {
|
|
109513
110058
|
const { value: scrollbarInst } = scrollbarInstRef;
|
|
109514
|
-
if (scrollbarInst?.containerRef?.contains(
|
|
110059
|
+
if (scrollbarInst?.containerRef?.contains(event.relatedTarget)) {
|
|
109515
110060
|
return;
|
|
109516
110061
|
}
|
|
109517
110062
|
pendingNodeKeyRef.value = null;
|
|
109518
110063
|
} else {
|
|
109519
110064
|
const { value: selfEl } = selfElRef;
|
|
109520
|
-
if (selfEl?.contains(
|
|
110065
|
+
if (selfEl?.contains(event.relatedTarget))
|
|
109521
110066
|
return;
|
|
109522
110067
|
pendingNodeKeyRef.value = null;
|
|
109523
110068
|
}
|
|
@@ -109630,6 +110175,8 @@
|
|
|
109630
110175
|
nodeColorPressed,
|
|
109631
110176
|
nodeColorActive,
|
|
109632
110177
|
arrowColor,
|
|
110178
|
+
switcherColor,
|
|
110179
|
+
switcherSize,
|
|
109633
110180
|
loadingColor,
|
|
109634
110181
|
nodeTextColor,
|
|
109635
110182
|
nodeTextColorDisabled,
|
|
@@ -109646,6 +110193,8 @@
|
|
|
109646
110193
|
);
|
|
109647
110194
|
return {
|
|
109648
110195
|
"--u-arrow-color": arrowColor,
|
|
110196
|
+
"--u-switcher-color": switcherColor,
|
|
110197
|
+
"--u-switcher-size": switcherSize,
|
|
109649
110198
|
"--u-loading-color": loadingColor,
|
|
109650
110199
|
"--u-bezier": cubicBezierEaseInOut,
|
|
109651
110200
|
"--u-font-size": fontSize,
|
|
@@ -109794,6 +110343,7 @@
|
|
|
109794
110343
|
...scrollbarProps,
|
|
109795
110344
|
class: treeClass,
|
|
109796
110345
|
tabindex,
|
|
110346
|
+
onScroll: this.handleScroll,
|
|
109797
110347
|
onKeydown: mergedFocusable ? handleKeydown : void 0,
|
|
109798
110348
|
onFocusout: mergedFocusable ? handleFocusout : void 0,
|
|
109799
110349
|
style: this.cssVars,
|
|
@@ -109837,6 +110387,34 @@
|
|
|
109837
110387
|
}
|
|
109838
110388
|
});
|
|
109839
110389
|
|
|
110390
|
+
function isVerticallyVisibleWithin(element, containerRect) {
|
|
110391
|
+
const elementRect = element.getBoundingClientRect();
|
|
110392
|
+
return elementRect.top < containerRect.bottom && elementRect.bottom > containerRect.top;
|
|
110393
|
+
}
|
|
110394
|
+
function scanReachedRootOptions(scrollElement, rootNodes, expandedKeys, previousVisibleKeys) {
|
|
110395
|
+
const containerRect = scrollElement.getBoundingClientRect();
|
|
110396
|
+
const visibleKeys = /* @__PURE__ */new Set();
|
|
110397
|
+
const reachedOptions = [];
|
|
110398
|
+
for (const rootNode of rootNodes) {
|
|
110399
|
+
const {
|
|
110400
|
+
children
|
|
110401
|
+
} = rootNode;
|
|
110402
|
+
if (!children?.length || !expandedKeys?.includes(rootNode.key)) continue;
|
|
110403
|
+
const lastChild = children[children.length - 1];
|
|
110404
|
+
const lastChildElement = scrollElement.querySelector(`[data-key="${createDataKey(lastChild.key)}"]`);
|
|
110405
|
+
const isHiddenOrMissing = !lastChildElement || !isVerticallyVisibleWithin(lastChildElement, containerRect);
|
|
110406
|
+
if (isHiddenOrMissing) continue;
|
|
110407
|
+
visibleKeys.add(rootNode.key);
|
|
110408
|
+
if (!previousVisibleKeys.has(rootNode.key)) {
|
|
110409
|
+
reachedOptions.push(rootNode.rawNode);
|
|
110410
|
+
}
|
|
110411
|
+
}
|
|
110412
|
+
return {
|
|
110413
|
+
reachedOptions,
|
|
110414
|
+
visibleKeys
|
|
110415
|
+
};
|
|
110416
|
+
}
|
|
110417
|
+
|
|
109840
110418
|
var style$2 = c$1([cB("tree-select", `
|
|
109841
110419
|
z-index: auto;
|
|
109842
110420
|
outline: none;
|
|
@@ -109955,6 +110533,8 @@
|
|
|
109955
110533
|
nodeProps: Function,
|
|
109956
110534
|
onBlur: Function,
|
|
109957
110535
|
onFocus: Function,
|
|
110536
|
+
onScroll: [Function, Array],
|
|
110537
|
+
onScrollOptionEnd: [Function, Array],
|
|
109958
110538
|
onLoad: Function,
|
|
109959
110539
|
onUpdateShow: [Function, Array],
|
|
109960
110540
|
onUpdateValue: [Function, Array],
|
|
@@ -110043,6 +110623,7 @@
|
|
|
110043
110623
|
uncontrolledExpandedKeysRef
|
|
110044
110624
|
);
|
|
110045
110625
|
const focusedRef = vue.ref(false);
|
|
110626
|
+
let visibleRootEndKeys = /* @__PURE__ */ new Set();
|
|
110046
110627
|
const mergedPlaceholderRef = vue.computed(() => {
|
|
110047
110628
|
const { placeholder } = props;
|
|
110048
110629
|
if (placeholder !== void 0)
|
|
@@ -110185,17 +110766,17 @@
|
|
|
110185
110766
|
}
|
|
110186
110767
|
uncontrolledExpandedKeysRef.value = keys;
|
|
110187
110768
|
}
|
|
110188
|
-
function doFocus(
|
|
110769
|
+
function doFocus(event) {
|
|
110189
110770
|
const { onFocus } = props;
|
|
110190
110771
|
if (onFocus)
|
|
110191
|
-
onFocus(
|
|
110772
|
+
onFocus(event);
|
|
110192
110773
|
triggerFormFocus();
|
|
110193
110774
|
}
|
|
110194
|
-
function doBlur(
|
|
110775
|
+
function doBlur(event) {
|
|
110195
110776
|
closeMenu();
|
|
110196
110777
|
const { onBlur } = props;
|
|
110197
110778
|
if (onBlur)
|
|
110198
|
-
onBlur(
|
|
110779
|
+
onBlur(event);
|
|
110199
110780
|
triggerFormBlur();
|
|
110200
110781
|
}
|
|
110201
110782
|
function closeMenu() {
|
|
@@ -110212,11 +110793,12 @@
|
|
|
110212
110793
|
}
|
|
110213
110794
|
function handleMenuLeave() {
|
|
110214
110795
|
patternRef.value = "";
|
|
110796
|
+
visibleRootEndKeys = /* @__PURE__ */ new Set();
|
|
110215
110797
|
}
|
|
110216
|
-
function handleMenuClickoutside(
|
|
110798
|
+
function handleMenuClickoutside(event) {
|
|
110217
110799
|
if (mergedShowRef.value) {
|
|
110218
110800
|
if (!triggerInstRef.value?.$el.contains(
|
|
110219
|
-
getPreciseEventTarget(
|
|
110801
|
+
getPreciseEventTarget(event)
|
|
110220
110802
|
)) {
|
|
110221
110803
|
closeMenu();
|
|
110222
110804
|
}
|
|
@@ -110264,34 +110846,34 @@
|
|
|
110264
110846
|
doUpdateIndeterminateKeys(keys, getOptionsByKeys(keys));
|
|
110265
110847
|
}
|
|
110266
110848
|
}
|
|
110267
|
-
function handleTriggerFocus(
|
|
110268
|
-
if (menuElRef.value?.contains(
|
|
110849
|
+
function handleTriggerFocus(event) {
|
|
110850
|
+
if (menuElRef.value?.contains(event.relatedTarget))
|
|
110269
110851
|
return;
|
|
110270
110852
|
focusedRef.value = true;
|
|
110271
|
-
doFocus(
|
|
110853
|
+
doFocus(event);
|
|
110272
110854
|
}
|
|
110273
|
-
function handleTriggerBlur(
|
|
110274
|
-
if (menuElRef.value?.contains(
|
|
110855
|
+
function handleTriggerBlur(event) {
|
|
110856
|
+
if (menuElRef.value?.contains(event.relatedTarget))
|
|
110275
110857
|
return;
|
|
110276
110858
|
focusedRef.value = false;
|
|
110277
|
-
doBlur(
|
|
110859
|
+
doBlur(event);
|
|
110278
110860
|
}
|
|
110279
|
-
function handleMenuFocusin(
|
|
110280
|
-
if (menuElRef.value?.contains(
|
|
110861
|
+
function handleMenuFocusin(event) {
|
|
110862
|
+
if (menuElRef.value?.contains(event.relatedTarget) || triggerInstRef.value?.$el?.contains(event.relatedTarget)) {
|
|
110281
110863
|
return;
|
|
110282
110864
|
}
|
|
110283
110865
|
focusedRef.value = true;
|
|
110284
|
-
doFocus(
|
|
110866
|
+
doFocus(event);
|
|
110285
110867
|
}
|
|
110286
|
-
function handleMenuFocusout(
|
|
110287
|
-
if (menuElRef.value?.contains(
|
|
110868
|
+
function handleMenuFocusout(event) {
|
|
110869
|
+
if (menuElRef.value?.contains(event.relatedTarget) || triggerInstRef.value?.$el?.contains(event.relatedTarget)) {
|
|
110288
110870
|
return;
|
|
110289
110871
|
}
|
|
110290
110872
|
focusedRef.value = false;
|
|
110291
|
-
doBlur(
|
|
110873
|
+
doBlur(event);
|
|
110292
110874
|
}
|
|
110293
|
-
function handleClear(
|
|
110294
|
-
|
|
110875
|
+
function handleClear(event) {
|
|
110876
|
+
event.stopPropagation();
|
|
110295
110877
|
const { multiple } = props;
|
|
110296
110878
|
if (!multiple && props.filterable) {
|
|
110297
110879
|
closeMenu();
|
|
@@ -110344,20 +110926,20 @@
|
|
|
110344
110926
|
}
|
|
110345
110927
|
}
|
|
110346
110928
|
}
|
|
110347
|
-
function handlePatternInput(
|
|
110348
|
-
const { value } =
|
|
110929
|
+
function handlePatternInput(event) {
|
|
110930
|
+
const { value } = event.target;
|
|
110349
110931
|
patternRef.value = value;
|
|
110350
110932
|
}
|
|
110351
|
-
function treeHandleKeydown(
|
|
110933
|
+
function treeHandleKeydown(event) {
|
|
110352
110934
|
const { value: treeInst } = treeInstRef;
|
|
110353
110935
|
if (treeInst) {
|
|
110354
|
-
treeInst.handleKeydown(
|
|
110936
|
+
treeInst.handleKeydown(event);
|
|
110355
110937
|
}
|
|
110356
110938
|
}
|
|
110357
|
-
function handleKeydown(
|
|
110358
|
-
if (
|
|
110939
|
+
function handleKeydown(event) {
|
|
110940
|
+
if (event.key === "Enter") {
|
|
110359
110941
|
if (mergedShowRef.value) {
|
|
110360
|
-
treeHandleKeydown(
|
|
110942
|
+
treeHandleKeydown(event);
|
|
110361
110943
|
if (!props.multiple) {
|
|
110362
110944
|
closeMenu();
|
|
110363
110945
|
focusSelection();
|
|
@@ -110365,17 +110947,17 @@
|
|
|
110365
110947
|
} else {
|
|
110366
110948
|
openMenu();
|
|
110367
110949
|
}
|
|
110368
|
-
|
|
110369
|
-
} else if (
|
|
110950
|
+
event.preventDefault();
|
|
110951
|
+
} else if (event.key === "Escape") {
|
|
110370
110952
|
if (mergedShowRef.value) {
|
|
110371
|
-
markEventEffectPerformed(
|
|
110953
|
+
markEventEffectPerformed(event);
|
|
110372
110954
|
closeMenu();
|
|
110373
110955
|
focusSelection();
|
|
110374
110956
|
}
|
|
110375
110957
|
} else {
|
|
110376
110958
|
if (mergedShowRef.value) {
|
|
110377
|
-
treeHandleKeydown(
|
|
110378
|
-
} else if (
|
|
110959
|
+
treeHandleKeydown(event);
|
|
110960
|
+
} else if (event.key === "ArrowDown") {
|
|
110379
110961
|
openMenu();
|
|
110380
110962
|
}
|
|
110381
110963
|
}
|
|
@@ -110384,9 +110966,35 @@
|
|
|
110384
110966
|
closeMenu();
|
|
110385
110967
|
focusSelection();
|
|
110386
110968
|
}
|
|
110387
|
-
function handleMenuMousedown(
|
|
110388
|
-
if (!happensIn(
|
|
110389
|
-
|
|
110969
|
+
function handleMenuMousedown(event) {
|
|
110970
|
+
if (!happensIn(event, "action"))
|
|
110971
|
+
event.preventDefault();
|
|
110972
|
+
}
|
|
110973
|
+
function doScroll(event) {
|
|
110974
|
+
const { onScroll } = props;
|
|
110975
|
+
if (onScroll)
|
|
110976
|
+
call(onScroll, event);
|
|
110977
|
+
}
|
|
110978
|
+
function doScrollOptionEnd(option, event) {
|
|
110979
|
+
props.onScrollOptionEnd && call(props.onScrollOptionEnd, option, event);
|
|
110980
|
+
}
|
|
110981
|
+
function handleTreeScroll(event) {
|
|
110982
|
+
doScroll(event);
|
|
110983
|
+
if (!props.onScrollOptionEnd)
|
|
110984
|
+
return;
|
|
110985
|
+
const scrollElement = event.currentTarget || event.target;
|
|
110986
|
+
if (!scrollElement)
|
|
110987
|
+
return;
|
|
110988
|
+
const { reachedOptions, visibleKeys } = scanReachedRootOptions(
|
|
110989
|
+
scrollElement,
|
|
110990
|
+
dataTreeMateRef.value.treeNodes,
|
|
110991
|
+
mergedExpandedKeysRef.value,
|
|
110992
|
+
visibleRootEndKeys
|
|
110993
|
+
);
|
|
110994
|
+
visibleRootEndKeys = visibleKeys;
|
|
110995
|
+
for (const reachedOption of reachedOptions) {
|
|
110996
|
+
doScrollOptionEnd(reachedOption, event);
|
|
110997
|
+
}
|
|
110390
110998
|
}
|
|
110391
110999
|
const selectionRenderTagRef = vue.computed(() => {
|
|
110392
111000
|
const { renderTag } = props;
|
|
@@ -110539,6 +111147,7 @@
|
|
|
110539
111147
|
handleKeydown,
|
|
110540
111148
|
handleTabOut,
|
|
110541
111149
|
handleMenuMousedown,
|
|
111150
|
+
handleTreeScroll,
|
|
110542
111151
|
mergedTheme: themeRef,
|
|
110543
111152
|
cssVars: inlineThemeDisabled ? void 0 : cssVarsRef,
|
|
110544
111153
|
themeClass: themeClassHandle?.themeClass,
|
|
@@ -110699,7 +111308,8 @@
|
|
|
110699
111308
|
onLoad: this.onLoad,
|
|
110700
111309
|
onUpdateCheckedKeys: this.handleUpdateCheckedKeys,
|
|
110701
111310
|
onUpdateIndeterminateKeys: this.handleUpdateIndeterminateKeys,
|
|
110702
|
-
onUpdateExpandedKeys: this.doUpdateExpandedKeys
|
|
111311
|
+
onUpdateExpandedKeys: this.doUpdateExpandedKeys,
|
|
111312
|
+
onScroll: this.handleTreeScroll
|
|
110703
111313
|
}
|
|
110704
111314
|
),
|
|
110705
111315
|
resolveWrappedSlot($slots.action, (children) => {
|
|
@@ -112627,7 +113237,7 @@
|
|
|
112627
113237
|
});
|
|
112628
113238
|
}
|
|
112629
113239
|
|
|
112630
|
-
var version = "2.0.
|
|
113240
|
+
var version = "2.0.7";
|
|
112631
113241
|
|
|
112632
113242
|
function create({
|
|
112633
113243
|
componentPrefix = "U",
|