@uzum-tech/ui 2.0.5 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/dist/index.js +1039 -493
  2. package/dist/index.mjs +1039 -493
  3. package/dist/index.prod.js +2 -2
  4. package/dist/index.prod.mjs +2 -2
  5. package/es/_internal/icons/DragHandleRound.d.ts +2 -0
  6. package/es/_internal/icons/DragHandleRound.mjs +16 -0
  7. package/es/_internal/icons/index.d.ts +1 -0
  8. package/es/_internal/icons/index.mjs +1 -0
  9. package/es/components.d.ts +32 -0
  10. package/es/data-table/src/DataTable.d.ts +24 -0
  11. package/es/data-table/src/DataTable.mjs +31 -0
  12. package/es/data-table/src/HeaderButton/FilterButton.d.ts +6 -0
  13. package/es/data-table/src/HeaderButton/FilterMenu.d.ts +6 -0
  14. package/es/data-table/src/TableParts/Body.d.ts +17 -9
  15. package/es/data-table/src/TableParts/Body.mjs +81 -274
  16. package/es/data-table/src/TableParts/BodyEmpty.d.ts +3 -0
  17. package/es/data-table/src/TableParts/BodyEmpty.mjs +22 -0
  18. package/es/data-table/src/TableParts/BodyRow.d.ts +3 -0
  19. package/es/data-table/src/TableParts/BodyRow.mjs +257 -0
  20. package/es/data-table/src/TableParts/BodySkeleton.mjs +5 -2
  21. package/es/data-table/src/TableParts/Header.d.ts +6 -0
  22. package/es/data-table/src/TableParts/Header.mjs +5 -1
  23. package/es/data-table/src/TableParts/VirtualListItemWrapper.d.ts +36 -0
  24. package/es/data-table/src/TableParts/VirtualListItemWrapper.mjs +46 -0
  25. package/es/data-table/src/interface.d.ts +161 -2
  26. package/es/data-table/src/styles/index.cssr.mjs +26 -3
  27. package/es/data-table/src/use-group-header.d.ts +3 -3
  28. package/es/data-table/src/use-row-drag.d.ts +2 -0
  29. package/es/data-table/src/use-row-drag.mjs +241 -0
  30. package/es/data-table/src/use-sorter.d.ts +4 -8
  31. package/es/data-table/src/use-sorter.mjs +14 -2
  32. package/es/data-table/src/use-table-data.d.ts +11 -14
  33. package/es/data-table/src/use-table-data.mjs +4 -2
  34. package/es/data-table/src/use-table-storage.d.ts +2 -2
  35. package/es/data-table/src/use-table-storage.mjs +1 -1
  36. package/es/data-table/src/utils/column-utils.d.ts +3 -2
  37. package/es/data-table/src/utils/column-utils.mjs +9 -1
  38. package/es/data-table/src/utils/csv-utils.mjs +1 -1
  39. package/es/data-table/src/utils/flatten-rows.d.ts +2 -0
  40. package/es/data-table/src/utils/flatten-rows.mjs +33 -0
  41. package/es/data-table/src/utils/index.d.ts +1 -0
  42. package/es/data-table/src/utils/index.mjs +1 -0
  43. package/es/data-table/src/utils/resize-orchestrator-utils.d.ts +3 -5
  44. package/es/data-table/src/utils/width-utils.d.ts +2 -2
  45. package/es/data-table/styles/light.d.ts +6 -0
  46. package/es/data-table/styles/light.mjs +3 -0
  47. package/es/mapping-card/src/MappingCard.d.ts +8 -0
  48. package/es/mapping-card/src/MappingCard.mjs +3 -1
  49. package/es/mapping-card/src/MappingCardParts/Header.mjs +31 -10
  50. package/es/mapping-card/src/interface.d.ts +8 -0
  51. package/es/mapping-card/src/interface.mjs +4 -0
  52. package/es/mapping-card/src/styles/index.cssr.mjs +8 -1
  53. package/es/version.d.ts +1 -1
  54. package/es/version.mjs +1 -1
  55. package/lib/_internal/icons/DragHandleRound.d.ts +2 -0
  56. package/lib/_internal/icons/DragHandleRound.js +10 -0
  57. package/lib/_internal/icons/index.d.ts +1 -0
  58. package/lib/_internal/icons/index.js +4 -2
  59. package/lib/components.d.ts +32 -0
  60. package/lib/data-table/src/DataTable.d.ts +24 -0
  61. package/lib/data-table/src/DataTable.js +19 -1
  62. package/lib/data-table/src/HeaderButton/FilterButton.d.ts +6 -0
  63. package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +6 -0
  64. package/lib/data-table/src/TableParts/Body.d.ts +18 -10
  65. package/lib/data-table/src/TableParts/Body.js +65 -237
  66. package/lib/data-table/src/TableParts/BodyEmpty.d.ts +3 -0
  67. package/lib/data-table/src/TableParts/BodyEmpty.js +15 -0
  68. package/lib/data-table/src/TableParts/BodyRow.d.ts +3 -0
  69. package/lib/data-table/src/TableParts/BodyRow.js +210 -0
  70. package/lib/data-table/src/TableParts/BodySkeleton.js +8 -2
  71. package/lib/data-table/src/TableParts/Header.d.ts +6 -0
  72. package/lib/data-table/src/TableParts/Header.js +6 -0
  73. package/lib/data-table/src/TableParts/VirtualListItemWrapper.d.ts +36 -0
  74. package/lib/data-table/src/TableParts/VirtualListItemWrapper.js +29 -0
  75. package/lib/data-table/src/interface.d.ts +161 -2
  76. package/lib/data-table/src/styles/index.cssr.js +26 -3
  77. package/lib/data-table/src/use-group-header.d.ts +3 -3
  78. package/lib/data-table/src/use-row-drag.d.ts +2 -0
  79. package/lib/data-table/src/use-row-drag.js +270 -0
  80. package/lib/data-table/src/use-sorter.d.ts +4 -8
  81. package/lib/data-table/src/use-sorter.js +14 -0
  82. package/lib/data-table/src/use-table-data.d.ts +11 -14
  83. package/lib/data-table/src/use-table-data.js +5 -1
  84. package/lib/data-table/src/use-table-storage.d.ts +2 -2
  85. package/lib/data-table/src/use-table-storage.js +1 -0
  86. package/lib/data-table/src/utils/column-utils.d.ts +3 -2
  87. package/lib/data-table/src/utils/column-utils.js +11 -2
  88. package/lib/data-table/src/utils/csv-utils.js +1 -0
  89. package/lib/data-table/src/utils/flatten-rows.d.ts +2 -0
  90. package/lib/data-table/src/utils/flatten-rows.js +35 -0
  91. package/lib/data-table/src/utils/index.d.ts +1 -0
  92. package/lib/data-table/src/utils/index.js +1 -0
  93. package/lib/data-table/src/utils/resize-orchestrator-utils.d.ts +3 -5
  94. package/lib/data-table/src/utils/width-utils.d.ts +2 -2
  95. package/lib/data-table/styles/light.d.ts +6 -0
  96. package/lib/data-table/styles/light.js +3 -0
  97. package/lib/mapping-card/src/MappingCard.d.ts +8 -0
  98. package/lib/mapping-card/src/MappingCard.js +5 -1
  99. package/lib/mapping-card/src/MappingCardParts/Header.js +29 -5
  100. package/lib/mapping-card/src/interface.d.ts +8 -0
  101. package/lib/mapping-card/src/interface.js +4 -0
  102. package/lib/mapping-card/src/styles/index.cssr.js +8 -1
  103. package/lib/version.d.ts +1 -1
  104. package/lib/version.js +1 -1
  105. package/package.json +1 -1
  106. package/web-types.json +1 -1
package/dist/index.js CHANGED
@@ -2374,7 +2374,7 @@
2374
2374
  return slot();
2375
2375
  }
2376
2376
  // o(n) flatten
2377
- function flatten$3(vNodes, filterCommentNode = true, result = []) {
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$3(vNode, filterCommentNode, result);
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$3(vNode.children, filterCommentNode, result);
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$3(slot());
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$2(vNodes, filterCommentNode = true, result = []) {
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$2(vNode, filterCommentNode, result);
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$2(vNode.children, filterCommentNode, result);
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$2(slot(props));
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$2(slot(props));
5601
+ const slotContent = flatten$1(slot(props));
5602
5602
  if (slotContent.length === 1) {
5603
5603
  return slotContent[0];
5604
5604
  } else {
@@ -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() {
@@ -18009,7 +18032,7 @@
18009
18032
  }
18010
18033
  };
18011
18034
 
18012
- function flatten$1(treeNodes, expandedKeys) {
18035
+ function flatten(treeNodes, expandedKeys) {
18013
18036
  const expandedKeySet = expandedKeys ? new Set(expandedKeys) : undefined;
18014
18037
  const flattenedNodes = [];
18015
18038
  function traverse(treeNodes) {
@@ -18156,7 +18179,7 @@
18156
18179
  maxLevel: Math.max(...levelTreeNodeMap.keys()),
18157
18180
  getChildren,
18158
18181
  getFlattenedNodes(expandedKeys) {
18159
- return flatten$1(treeNodes, expandedKeys);
18182
+ return flatten(treeNodes, expandedKeys);
18160
18183
  },
18161
18184
  getNode,
18162
18185
  getPrev,
@@ -21151,7 +21174,7 @@
21151
21174
  render() {
21152
21175
  const { mergedClsPrefix, mergedValue, mergedSize, mergedDisabled } = this;
21153
21176
  const children = mapSlot$1(
21154
- flatten$2(getSlot(this)),
21177
+ flatten$1(getSlot(this)),
21155
21178
  mergedValue,
21156
21179
  mergedSize,
21157
21180
  mergedDisabled,
@@ -39065,7 +39088,7 @@
39065
39088
  }
39066
39089
  const renderContent = () => {
39067
39090
  this.overflow = false;
39068
- const rawChildren = flatten$2(getSlot(this));
39091
+ const rawChildren = flatten$1(getSlot(this));
39069
39092
  const childrenAndRawSpan = [];
39070
39093
  const { collapsed, collapsedRows, responsiveCols, responsiveQuery } = this;
39071
39094
  rawChildren.forEach((child) => {
@@ -41027,7 +41050,7 @@
41027
41050
  dotSlotProps,
41028
41051
  $slots: { default: defaultSlot, dots: dotsSlot, arrow: arrowSlot }
41029
41052
  } = this;
41030
- const children = defaultSlot && flatten$2(defaultSlot()) || [];
41053
+ const children = defaultSlot && flatten$1(defaultSlot()) || [];
41031
41054
  let slides = filterCarouselItem(children);
41032
41055
  if (!slides.length) {
41033
41056
  slides = children.map((ch) => /* @__PURE__ */ vue.h(_UCarouselItem, null, {
@@ -43818,7 +43841,7 @@
43818
43841
  mergedClsPrefix,
43819
43842
  rtlEnabled
43820
43843
  } = this;
43821
- const children = flatten$2(getSlot(this), false);
43844
+ const children = flatten$1(getSlot(this), false);
43822
43845
  if (!children.length) {
43823
43846
  return null;
43824
43847
  }
@@ -46726,6 +46749,9 @@
46726
46749
  thButtonColorHover: elementsTertiary,
46727
46750
  thIconColor: elementsPrimary,
46728
46751
  thIconColorActive: brandPrimary500,
46752
+ dropMarkColor: brandPrimary500,
46753
+ dragGhostOpacity: "0.85",
46754
+ dragGhostFilter: "drop-shadow(0 4px 12px rgba(0, 0, 0, 0.18))",
46729
46755
  // modal
46730
46756
  borderColorModal: elementsQuaternary,
46731
46757
  tdColorHoverModal: elementsTertiary,
@@ -65792,6 +65818,7 @@
65792
65818
 
65793
65819
  const SELECTION_COL_WIDTH = 40;
65794
65820
  const EXPAND_COL_WIDTH = 40;
65821
+ const DRAGGABLE_COL_WIDTH = 40;
65795
65822
  function getNumberColWidth(column) {
65796
65823
  if (column.type === "selection") {
65797
65824
  return column.width === void 0 ? SELECTION_COL_WIDTH : depx(column.width);
@@ -65799,6 +65826,9 @@
65799
65826
  if (column.type === "expand") {
65800
65827
  return column.width === void 0 ? EXPAND_COL_WIDTH : depx(column.width);
65801
65828
  }
65829
+ if (column.type === "draggable") {
65830
+ return column.width === void 0 ? DRAGGABLE_COL_WIDTH : depx(column.width);
65831
+ }
65802
65832
  if ("children" in column) return void 0;
65803
65833
  if (typeof column.width === "string") {
65804
65834
  return depx(column.width);
@@ -65812,6 +65842,9 @@
65812
65842
  if (column.type === "expand") {
65813
65843
  return formatLength(column.width ?? EXPAND_COL_WIDTH);
65814
65844
  }
65845
+ if (column.type === "draggable") {
65846
+ return formatLength(column.width ?? DRAGGABLE_COL_WIDTH);
65847
+ }
65815
65848
  if ("children" in column) {
65816
65849
  return void 0;
65817
65850
  }
@@ -65820,6 +65853,7 @@
65820
65853
  function getColKey(column) {
65821
65854
  if (column.type === "selection") return "__n_selection__";
65822
65855
  if (column.type === "expand") return "__n_expand__";
65856
+ if (column.type === "draggable") return "__n_draggable__";
65823
65857
  return column.key;
65824
65858
  }
65825
65859
  function createCustomWidthStyle(column, resizedWidth) {
@@ -65880,7 +65914,7 @@
65880
65914
  }
65881
65915
  }
65882
65916
  function generateCsv(columns, data, getCsvCell, getCsvHeader) {
65883
- const exportableColumns = columns.filter(column => column.type !== "expand" && column.type !== "selection" && column.allowExport !== false);
65917
+ const exportableColumns = columns.filter(column => column.type !== "expand" && column.type !== "selection" && column.type !== "draggable" && column.allowExport !== false);
65884
65918
  const header = exportableColumns.map(col => {
65885
65919
  return getCsvHeader ? getCsvHeader(col) : col.title;
65886
65920
  }).join(",");
@@ -65892,6 +65926,40 @@
65892
65926
  return [header, ...rows].join("\n");
65893
65927
  }
65894
65928
 
65929
+ function flattenExpandedRows(rowInfos, expandedRowKeys) {
65930
+ const flattenedRows = [];
65931
+ function traverse(nodes, rootIndex) {
65932
+ nodes.forEach(node => {
65933
+ if (node.children && expandedRowKeys.has(node.key)) {
65934
+ flattenedRows.push({
65935
+ tmNode: node,
65936
+ striped: false,
65937
+ key: node.key,
65938
+ index: rootIndex
65939
+ });
65940
+ traverse(node.children, rootIndex);
65941
+ } else {
65942
+ flattenedRows.push({
65943
+ key: node.key,
65944
+ tmNode: node,
65945
+ striped: false,
65946
+ index: rootIndex
65947
+ });
65948
+ }
65949
+ });
65950
+ }
65951
+ rowInfos.forEach(rowInfo => {
65952
+ flattenedRows.push(rowInfo);
65953
+ const {
65954
+ children
65955
+ } = rowInfo.tmNode;
65956
+ if (children && expandedRowKeys.has(rowInfo.key)) {
65957
+ traverse(children, rowInfo.index);
65958
+ }
65959
+ });
65960
+ return flattenedRows;
65961
+ }
65962
+
65895
65963
  const REGEX = {
65896
65964
  ONLY_DIGITS: /\D/g};
65897
65965
  const defaultNumericMask = {
@@ -65964,6 +66032,39 @@
65964
66032
  return mergedSortState.some(state => state.columnKey === column.key && state.order);
65965
66033
  }
65966
66034
 
66035
+ function renderBodyEmpty(deps) {
66036
+ const {
66037
+ clsPrefix,
66038
+ loading,
66039
+ bodyStyle,
66040
+ dataTableSlots,
66041
+ mergedTheme,
66042
+ emptyProps
66043
+ } = deps;
66044
+ return /* @__PURE__ */ vue.h(
66045
+ "div",
66046
+ {
66047
+ class: [
66048
+ `${clsPrefix}-data-table-empty`,
66049
+ loading && `${clsPrefix}-data-table-empty--hide`
66050
+ ],
66051
+ style: bodyStyle,
66052
+ ref: "emptyElRef"
66053
+ },
66054
+ resolveSlot(dataTableSlots.empty, () => [
66055
+ /* @__PURE__ */ vue.h(
66056
+ UEmpty$1,
66057
+ {
66058
+ size: "large",
66059
+ theme: mergedTheme.peers.Empty,
66060
+ themeOverrides: mergedTheme.peerOverrides.Empty,
66061
+ ...emptyProps
66062
+ }
66063
+ )
66064
+ ])
66065
+ );
66066
+ }
66067
+
65967
66068
  var RenderSafeCheckbox = vue.defineComponent({
65968
66069
  name: "DataTableBodyCheckbox",
65969
66070
  props: {
@@ -66622,7 +66723,7 @@
66622
66723
  render() {
66623
66724
  const { mergedValue, mergedClsPrefix, handleFocusin, handleFocusout } = this;
66624
66725
  const { children, isButtonGroup } = mapSlot(
66625
- flatten$2(getSlot(this)),
66726
+ flatten$1(getSlot(this)),
66626
66727
  mergedValue,
66627
66728
  mergedClsPrefix
66628
66729
  );
@@ -66686,90 +66787,6 @@
66686
66787
  }
66687
66788
  });
66688
66789
 
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
66790
  function applyMask(value, mask) {
66774
66791
  if (!mask) return value;
66775
66792
  if (!value || value.trim() === "") return "";
@@ -67083,6 +67100,404 @@
67083
67100
  }
67084
67101
  });
67085
67102
 
67103
+ function renderExpandedRow(context, rowInfo, displayedRowIndex) {
67104
+ const {
67105
+ mergedClsPrefix,
67106
+ colCount,
67107
+ rowCount,
67108
+ stickyExpandedRows,
67109
+ bodyWidthPx,
67110
+ renderExpand
67111
+ } = context;
67112
+ const { index: actualRowIndex } = rowInfo;
67113
+ const {
67114
+ tmNode: { key, rawNode }
67115
+ } = rowInfo;
67116
+ return /* @__PURE__ */ vue.h(
67117
+ "tr",
67118
+ {
67119
+ class: `${mergedClsPrefix}-data-table-tr ${mergedClsPrefix}-data-table-tr--expanded`,
67120
+ key: `${key}__expand`
67121
+ },
67122
+ /* @__PURE__ */ vue.h(
67123
+ "td",
67124
+ {
67125
+ class: [
67126
+ `${mergedClsPrefix}-data-table-td`,
67127
+ `${mergedClsPrefix}-data-table-td--last-col`,
67128
+ displayedRowIndex + 1 === rowCount && `${mergedClsPrefix}-data-table-td--last-row`
67129
+ ],
67130
+ colspan: colCount
67131
+ },
67132
+ stickyExpandedRows ? /* @__PURE__ */ vue.h(
67133
+ "div",
67134
+ {
67135
+ class: `${mergedClsPrefix}-data-table-expand`,
67136
+ style: {
67137
+ width: bodyWidthPx
67138
+ }
67139
+ },
67140
+ renderExpand(rawNode, actualRowIndex)
67141
+ ) : renderExpand(rawNode, actualRowIndex)
67142
+ )
67143
+ );
67144
+ }
67145
+ function renderBodyRow(context, rowInfo, displayedRowIndex, isVirtual) {
67146
+ if ("isExpandedRow" in rowInfo) {
67147
+ return renderExpandedRow(context, rowInfo, displayedRowIndex);
67148
+ }
67149
+ const {
67150
+ mergedClsPrefix,
67151
+ cols,
67152
+ colCount,
67153
+ rowCount,
67154
+ hasChildren,
67155
+ childTriggerColIndex,
67156
+ indentStyle,
67157
+ rowClassName,
67158
+ rowProps,
67159
+ mergedSortState,
67160
+ mergedExpandedRowKeySet,
67161
+ fixedColumnLeftMap,
67162
+ fixedColumnRightMap,
67163
+ currentPage,
67164
+ loadingKeySet,
67165
+ renderExpandIcon,
67166
+ renderCell,
67167
+ defaultEmptyValue,
67168
+ mergedTheme,
67169
+ rowIndexToKey,
67170
+ cordToPass,
67171
+ cordKey,
67172
+ draggableColumn,
67173
+ droppingRowKey,
67174
+ droppingPosition,
67175
+ draggingRowKeySet,
67176
+ hoverKey,
67177
+ dataTableSlots,
67178
+ setHoverKey,
67179
+ handleCheckboxUpdateChecked,
67180
+ handleRadioUpdateChecked,
67181
+ handleUpdateExpanded,
67182
+ handleRowDragStart,
67183
+ handleRowDragOver,
67184
+ handleRowDragLeave,
67185
+ handleRowDragEnd,
67186
+ handleRowDrop,
67187
+ emitEdit
67188
+ } = context;
67189
+ const { index: actualRowIndex } = rowInfo;
67190
+ const isSummary = "isSummaryRow" in rowInfo;
67191
+ const striped = !isSummary && rowInfo.striped;
67192
+ const { tmNode, key: rowKey } = rowInfo;
67193
+ const { rawNode: rowData } = tmNode;
67194
+ const expanded = mergedExpandedRowKeySet.has(rowKey);
67195
+ const props = rowProps ? rowProps(rowData, actualRowIndex) : void 0;
67196
+ const mergedRowClassName = typeof rowClassName === "string" ? rowClassName : createRowClassName(rowData, actualRowIndex, rowClassName);
67197
+ const { class: _class, ...restProps } = props || {};
67198
+ const isRowDraggable = !isSummary && !!draggableColumn && (typeof draggableColumn.draggable === "function" ? draggableColumn.draggable(rowData) : true);
67199
+ const isDropTarget = !!draggableColumn && droppingRowKey === rowKey;
67200
+ const dropPosition = isDropTarget ? droppingPosition : null;
67201
+ const isBeingDragged = !!draggableColumn && draggingRowKeySet.has(rowKey);
67202
+ const row = /* @__PURE__ */ vue.h(
67203
+ "tr",
67204
+ {
67205
+ onMouseenter: () => {
67206
+ setHoverKey(rowKey);
67207
+ },
67208
+ key: rowKey,
67209
+ "data-row-key": String(rowKey),
67210
+ onDragover: draggableColumn && !isSummary ? (event) => handleRowDragOver(event, rowKey) : void 0,
67211
+ onDragleave: draggableColumn && !isSummary ? (event) => handleRowDragLeave(event, rowKey) : void 0,
67212
+ onDrop: draggableColumn && !isSummary ? (event) => handleRowDrop(event, rowKey) : void 0,
67213
+ class: [
67214
+ `${mergedClsPrefix}-data-table-tr`,
67215
+ rowInfo.tmNode.disabled && `${mergedClsPrefix}-data-table-tr--disabled`,
67216
+ isSummary && `${mergedClsPrefix}-data-table-tr--summary`,
67217
+ striped && `${mergedClsPrefix}-data-table-tr--striped`,
67218
+ expanded && `${mergedClsPrefix}-data-table-tr--expanded`,
67219
+ isBeingDragged && `${mergedClsPrefix}-data-table-tr--dragging`,
67220
+ isDropTarget && dropPosition === "before" && `${mergedClsPrefix}-data-table-tr--drop-before`,
67221
+ isDropTarget && dropPosition === "after" && `${mergedClsPrefix}-data-table-tr--drop-after`,
67222
+ mergedRowClassName,
67223
+ _class
67224
+ ],
67225
+ ...restProps
67226
+ },
67227
+ cols.map((col, colIndex) => {
67228
+ if (displayedRowIndex in cordToPass) {
67229
+ const cordOfRowToPass = cordToPass[displayedRowIndex];
67230
+ const indexInCordOfRowToPass = cordOfRowToPass.indexOf(colIndex);
67231
+ if (~indexInCordOfRowToPass) {
67232
+ cordOfRowToPass.splice(indexInCordOfRowToPass, 1);
67233
+ return null;
67234
+ }
67235
+ }
67236
+ const { column } = col;
67237
+ const colKey = getColKey(col);
67238
+ const { rowSpan, colSpan } = column;
67239
+ const mergedColSpan = isSummary ? rowInfo.tmNode.rawNode[colKey]?.colSpan || 1 : colSpan ? colSpan(rowData, actualRowIndex) : 1;
67240
+ const mergedRowSpan = isSummary ? rowInfo.tmNode.rawNode[colKey]?.rowSpan || 1 : rowSpan ? rowSpan(rowData, actualRowIndex) : 1;
67241
+ const isLastCol = colIndex + mergedColSpan === colCount;
67242
+ const isLastRow = displayedRowIndex + mergedRowSpan === rowCount;
67243
+ const isCrossRowTd = mergedRowSpan > 1;
67244
+ if (isCrossRowTd) {
67245
+ cordKey[displayedRowIndex] = {
67246
+ [colIndex]: []
67247
+ };
67248
+ }
67249
+ if (mergedColSpan > 1 || isCrossRowTd) {
67250
+ for (let i = displayedRowIndex; i < displayedRowIndex + mergedRowSpan; ++i) {
67251
+ if (isCrossRowTd) {
67252
+ cordKey[displayedRowIndex][colIndex].push(rowIndexToKey[i]);
67253
+ }
67254
+ for (let j = colIndex; j < colIndex + mergedColSpan; ++j) {
67255
+ if (i === displayedRowIndex && j === colIndex) {
67256
+ continue;
67257
+ }
67258
+ if (!(i in cordToPass)) {
67259
+ cordToPass[i] = [j];
67260
+ } else {
67261
+ cordToPass[i].push(j);
67262
+ }
67263
+ }
67264
+ }
67265
+ }
67266
+ const cellHoverKey = isCrossRowTd ? hoverKey : null;
67267
+ const { cellProps } = column;
67268
+ const resolvedCellProps = cellProps?.(rowData, actualRowIndex);
67269
+ const indentOffsetStyle = {
67270
+ "--indent-offset": ""
67271
+ };
67272
+ const isDraggableHandleCell = column.type === "draggable" && !isSummary && isRowDraggable;
67273
+ return /* @__PURE__ */ vue.h(
67274
+ "td",
67275
+ {
67276
+ ...resolvedCellProps,
67277
+ key: colKey,
67278
+ draggable: isDraggableHandleCell || void 0,
67279
+ onDragstart: isDraggableHandleCell ? (event) => handleRowDragStart(event, rowKey) : void 0,
67280
+ onDragend: isDraggableHandleCell ? () => handleRowDragEnd() : void 0,
67281
+ style: [
67282
+ {
67283
+ textAlign: column.align || void 0,
67284
+ left: pxfy(fixedColumnLeftMap[colKey]?.start),
67285
+ right: pxfy(fixedColumnRightMap[colKey]?.start)
67286
+ },
67287
+ indentOffsetStyle,
67288
+ resolvedCellProps?.style || ""
67289
+ ],
67290
+ colspan: mergedColSpan,
67291
+ rowspan: isVirtual ? void 0 : mergedRowSpan,
67292
+ "data-col-key": colKey,
67293
+ class: [
67294
+ `${mergedClsPrefix}-data-table-td`,
67295
+ column.className,
67296
+ resolvedCellProps?.class,
67297
+ isSummary && `${mergedClsPrefix}-data-table-td--summary`,
67298
+ (cellHoverKey !== null && cordKey[displayedRowIndex][colIndex].includes(cellHoverKey) || isColumnSorting(column, mergedSortState)) && `${mergedClsPrefix}-data-table-td--hover`,
67299
+ column.fixed && `${mergedClsPrefix}-data-table-td--fixed-${column.fixed}`,
67300
+ column.align && `${mergedClsPrefix}-data-table-td--${column.align}-align`,
67301
+ column.type === "selection" && `${mergedClsPrefix}-data-table-td--selection`,
67302
+ column.type === "expand" && `${mergedClsPrefix}-data-table-td--expand`,
67303
+ column.type === "draggable" && `${mergedClsPrefix}-data-table-td--draggable`,
67304
+ isLastCol && `${mergedClsPrefix}-data-table-td--last-col`,
67305
+ isLastRow && `${mergedClsPrefix}-data-table-td--last-row`,
67306
+ "editable" in column && (typeof column.editable === "function" ? column.editable(rowData) : column.editable) && !isSummary && `${mergedClsPrefix}-data-table-td--editable`
67307
+ ]
67308
+ },
67309
+ column.fixed && /* @__PURE__ */ vue.h(
67310
+ "div",
67311
+ {
67312
+ class: `${mergedClsPrefix}-data-table-td__shadow-holder`
67313
+ }
67314
+ ),
67315
+ hasChildren && colIndex === childTriggerColIndex ? [
67316
+ repeat(
67317
+ indentOffsetStyle["--indent-offset"] = isSummary ? 0 : rowInfo.tmNode.level,
67318
+ /* @__PURE__ */ vue.h(
67319
+ "div",
67320
+ {
67321
+ class: `${mergedClsPrefix}-data-table-indent`,
67322
+ style: indentStyle
67323
+ }
67324
+ )
67325
+ ),
67326
+ isSummary || rowInfo.tmNode.isLeaf ? /* @__PURE__ */ vue.h(
67327
+ "div",
67328
+ {
67329
+ class: `${mergedClsPrefix}-data-table-expand-placeholder`
67330
+ }
67331
+ ) : /* @__PURE__ */ vue.h(
67332
+ ExpandTrigger,
67333
+ {
67334
+ class: `${mergedClsPrefix}-data-table-expand-trigger`,
67335
+ clsPrefix: mergedClsPrefix,
67336
+ expanded,
67337
+ renderExpandIcon,
67338
+ loading: loadingKeySet.has(rowInfo.key),
67339
+ onClick: () => {
67340
+ handleUpdateExpanded(rowKey, rowInfo.tmNode);
67341
+ }
67342
+ }
67343
+ )
67344
+ ] : null,
67345
+ column.type === "selection" ? !isSummary ? column.multiple === false ? /* @__PURE__ */ vue.h(
67346
+ RenderSafeRadio,
67347
+ {
67348
+ key: currentPage,
67349
+ rowKey,
67350
+ disabled: rowInfo.tmNode.disabled,
67351
+ onClick: (event) => {
67352
+ event.stopPropagation();
67353
+ },
67354
+ onUpdateChecked: () => {
67355
+ handleRadioUpdateChecked(rowInfo.tmNode);
67356
+ }
67357
+ }
67358
+ ) : /* @__PURE__ */ vue.h(
67359
+ RenderSafeCheckbox,
67360
+ {
67361
+ key: currentPage,
67362
+ rowKey,
67363
+ disabled: rowInfo.tmNode.disabled,
67364
+ onUpdateChecked: (checked, event) => {
67365
+ event.stopPropagation();
67366
+ handleCheckboxUpdateChecked(
67367
+ rowInfo.tmNode,
67368
+ checked,
67369
+ event.shiftKey
67370
+ );
67371
+ }
67372
+ }
67373
+ ) : null : column.type === "expand" ? !isSummary ? !column.expandable || column.expandable?.(rowData) ? /* @__PURE__ */ vue.h(
67374
+ ExpandTrigger,
67375
+ {
67376
+ clsPrefix: mergedClsPrefix,
67377
+ expanded,
67378
+ renderExpandIcon,
67379
+ onClick: () => {
67380
+ handleUpdateExpanded(rowKey, null);
67381
+ }
67382
+ }
67383
+ ) : null : null : column.type === "draggable" ? isDraggableHandleCell ? /* @__PURE__ */ vue.h(
67384
+ "span",
67385
+ {
67386
+ class: `${mergedClsPrefix}-data-table-td__drag-handle`,
67387
+ "aria-label": "Drag to reorder"
67388
+ },
67389
+ resolveSlot(dataTableSlots["drag-handle"], () => [
67390
+ /* @__PURE__ */ vue.h(DragHandleRound, null)
67391
+ ])
67392
+ ) : null : /* @__PURE__ */ vue.h(
67393
+ Cell,
67394
+ {
67395
+ clsPrefix: mergedClsPrefix,
67396
+ index: actualRowIndex,
67397
+ row: rowData,
67398
+ column,
67399
+ isSummary,
67400
+ mergedTheme,
67401
+ renderCell,
67402
+ defaultEmptyValue,
67403
+ onEdit: (value, row2, key) => {
67404
+ emitEdit(value, row2, key);
67405
+ }
67406
+ }
67407
+ )
67408
+ );
67409
+ })
67410
+ );
67411
+ return row;
67412
+ }
67413
+
67414
+ const ICON_COLUMN_SKELETON_WIDTH = "16px";
67415
+ const DEFAULT_COLUMN_SKELETON_WIDTH = "85%";
67416
+ const SKELETON_BORDER_RADIUS = "16px";
67417
+ var BodySkeleton = vue.defineComponent({
67418
+ name: "DataTableBodySkeleton",
67419
+ props: {
67420
+ rowCount: {
67421
+ type: Number,
67422
+ default: 10
67423
+ }
67424
+ },
67425
+ setup(props) {
67426
+ const {
67427
+ mergedClsPrefixRef,
67428
+ colsRef,
67429
+ props: dataTableProps
67430
+ } = vue.inject(dataTableInjectionKey);
67431
+ const skeletonRowCount = vue.computed(() => {
67432
+ if (dataTableProps.pagination && typeof dataTableProps.pagination === "object" && dataTableProps.pagination.pageSize) {
67433
+ return dataTableProps.pagination.pageSize;
67434
+ }
67435
+ return props.rowCount;
67436
+ });
67437
+ return {
67438
+ mergedClsPrefix: mergedClsPrefixRef,
67439
+ cols: colsRef,
67440
+ skeletonRowCount
67441
+ };
67442
+ },
67443
+ render() {
67444
+ const { mergedClsPrefix, cols, skeletonRowCount } = this;
67445
+ const skeletonRows = Array.from(
67446
+ { length: skeletonRowCount },
67447
+ (_, index) => /* @__PURE__ */ vue.h(
67448
+ "tr",
67449
+ {
67450
+ key: `skeleton-row-${index}`,
67451
+ class: `${mergedClsPrefix}-data-table-tr ${mergedClsPrefix}-data-table-tr--skeleton`
67452
+ },
67453
+ cols.map((col) => /* @__PURE__ */ vue.h(
67454
+ "td",
67455
+ {
67456
+ key: col.key,
67457
+ class: [
67458
+ `${mergedClsPrefix}-data-table-td`,
67459
+ `${mergedClsPrefix}-data-table-td--skeleton`,
67460
+ col.column.fixed && `${mergedClsPrefix}-data-table-td--fixed-${col.column.fixed}`,
67461
+ col.column.align && `${mergedClsPrefix}-data-table-td--${col.column.align}-align`
67462
+ ],
67463
+ style: {
67464
+ textAlign: col.column.align || void 0,
67465
+ padding: "var(--u-td-padding)"
67466
+ }
67467
+ },
67468
+ col.column.fixed && /* @__PURE__ */ vue.h(
67469
+ "div",
67470
+ {
67471
+ class: `${mergedClsPrefix}-data-table-td__shadow-holder`
67472
+ }
67473
+ ),
67474
+ /* @__PURE__ */ vue.h(
67475
+ _USkeleton,
67476
+ {
67477
+ height: "var(--u-line-height)",
67478
+ width: col.column.type === "selection" || col.column.type === "draggable" ? ICON_COLUMN_SKELETON_WIDTH : DEFAULT_COLUMN_SKELETON_WIDTH,
67479
+ animated: true,
67480
+ style: {
67481
+ borderRadius: SKELETON_BORDER_RADIUS
67482
+ }
67483
+ }
67484
+ )
67485
+ ))
67486
+ )
67487
+ );
67488
+ return /* @__PURE__ */ vue.h(
67489
+ "tbody",
67490
+ {
67491
+ class: [
67492
+ `${mergedClsPrefix}-data-table-tbody`,
67493
+ `${mergedClsPrefix}-data-table-tbody--skeleton`
67494
+ ]
67495
+ },
67496
+ skeletonRows
67497
+ );
67498
+ }
67499
+ });
67500
+
67086
67501
  var UDataTableFilterMenu = vue.defineComponent({
67087
67502
  name: "DataTableFilterMenu",
67088
67503
  props: {
@@ -67665,6 +68080,8 @@
67665
68080
  });
67666
68081
 
67667
68082
  function renderTitle(column) {
68083
+ if (column.type === "draggable")
68084
+ return null;
67668
68085
  return typeof column.title === "function" ? column.title(column) : column.title;
67669
68086
  }
67670
68087
  var TableHeader = vue.defineComponent({
@@ -67873,6 +68290,9 @@
67873
68290
  const { ellipsis } = column;
67874
68291
  const ellipsisEnabled = isColumnEllipsisEnabled(column);
67875
68292
  const createColumnVNode = () => {
68293
+ if (column.type === "draggable") {
68294
+ return null;
68295
+ }
67876
68296
  if (column.type === "selection") {
67877
68297
  return column.multiple !== false ? /* @__PURE__ */ vue.h(vue.Fragment, null, /* @__PURE__ */ vue.h(
67878
68298
  _UCheckbox,
@@ -67964,7 +68384,7 @@
67964
68384
  },
67965
68385
  column.className
67966
68386
  ],
67967
- onClick: column.type !== "selection" && column.type !== "expand" && !("children" in column) ? (e) => {
68387
+ onClick: column.type !== "selection" && column.type !== "expand" && column.type !== "draggable" && !("children" in column) ? (e) => {
67968
68388
  handleColHeaderClick(e, column);
67969
68389
  } : void 0
67970
68390
  },
@@ -68007,38 +68427,8 @@
68007
68427
  }
68008
68428
  });
68009
68429
 
68010
- function flatten(rowInfos, expandedRowKeys) {
68011
- const fRows = [];
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({
68430
+ var VirtualListItemWrapper = vue.defineComponent({
68431
+ name: "VirtualListItemWrapper",
68042
68432
  props: {
68043
68433
  clsPrefix: {
68044
68434
  type: String,
@@ -68071,6 +68461,7 @@
68071
68461
  );
68072
68462
  }
68073
68463
  });
68464
+
68074
68465
  var TableBody = vue.defineComponent({
68075
68466
  name: "DataTableBody",
68076
68467
  emits: ["edit"],
@@ -68130,7 +68521,16 @@
68130
68521
  doUncheck,
68131
68522
  renderCell,
68132
68523
  defaultEmptyValueRef,
68133
- emptyPropsRef
68524
+ emptyPropsRef,
68525
+ draggableColumnRef,
68526
+ draggingRowKeySetRef,
68527
+ droppingRowKeyRef,
68528
+ droppingPositionRef,
68529
+ handleRowDragStart,
68530
+ handleRowDragOver,
68531
+ handleRowDragLeave,
68532
+ handleRowDragEnd,
68533
+ handleRowDrop
68134
68534
  } = vue.inject(dataTableInjectionKey);
68135
68535
  const UConfigProvider = vue.inject(configProviderInjectionKey, null);
68136
68536
  const scrollbarInstRef = vue.ref(null);
@@ -68433,6 +68833,15 @@
68433
68833
  renderCell,
68434
68834
  defaultEmptyValueRef,
68435
68835
  emptyPropsRef,
68836
+ draggableColumn: draggableColumnRef,
68837
+ draggingRowKeySet: draggingRowKeySetRef,
68838
+ droppingRowKey: droppingRowKeyRef,
68839
+ droppingPosition: droppingPositionRef,
68840
+ handleRowDragStart,
68841
+ handleRowDragOver,
68842
+ handleRowDragLeave,
68843
+ handleRowDragEnd,
68844
+ handleRowDrop,
68436
68845
  ...exposedMethods
68437
68846
  };
68438
68847
  },
@@ -68509,7 +68918,7 @@
68509
68918
  const { length: colCount } = cols;
68510
68919
  let mergedData;
68511
68920
  const { data: paginatedData, hasChildren } = paginatedDataAndInfo;
68512
- const mergedPaginationData = hasChildren ? flatten(paginatedData, mergedExpandedRowKeySet) : paginatedData;
68921
+ const mergedPaginationData = hasChildren ? flattenExpandedRows(paginatedData, mergedExpandedRowKeySet) : paginatedData;
68513
68922
  if (summary) {
68514
68923
  const summaryRows = summary(this.rawPaginatedData);
68515
68924
  if (Array.isArray(summaryRows)) {
@@ -68560,246 +68969,59 @@
68560
68969
  });
68561
68970
  const bodyWidth = stickyExpandedRows ? this.bodyWidth : null;
68562
68971
  const bodyWidthPx = bodyWidth === null ? void 0 : `${bodyWidth}px`;
68563
- const renderRow = (rowInfo, displayedRowIndex, isVirtual) => {
68564
- const { index: actualRowIndex } = rowInfo;
68565
- if ("isExpandedRow" in rowInfo) {
68566
- const {
68567
- tmNode: { key, rawNode }
68568
- } = rowInfo;
68569
- return /* @__PURE__ */ vue.h(
68570
- "tr",
68571
- {
68572
- class: `${mergedClsPrefix}-data-table-tr ${mergedClsPrefix}-data-table-tr--expanded`,
68573
- key: `${key}__expand`
68574
- },
68575
- /* @__PURE__ */ vue.h(
68576
- "td",
68577
- {
68578
- class: [
68579
- `${mergedClsPrefix}-data-table-td`,
68580
- `${mergedClsPrefix}-data-table-td--last-col`,
68581
- displayedRowIndex + 1 === rowCount && `${mergedClsPrefix}-data-table-td--last-row`
68582
- ],
68583
- colspan: colCount
68584
- },
68585
- stickyExpandedRows ? /* @__PURE__ */ vue.h(
68586
- "div",
68587
- {
68588
- class: `${mergedClsPrefix}-data-table-expand`,
68589
- style: {
68590
- width: bodyWidthPx
68591
- }
68592
- },
68593
- renderExpand(rawNode, actualRowIndex)
68594
- ) : renderExpand(rawNode, actualRowIndex)
68595
- )
68596
- );
68972
+ const renderContext = {
68973
+ mergedClsPrefix,
68974
+ cols,
68975
+ colCount,
68976
+ rowCount,
68977
+ hasChildren,
68978
+ childTriggerColIndex,
68979
+ indentStyle,
68980
+ rowClassName,
68981
+ rowProps,
68982
+ mergedSortState,
68983
+ mergedExpandedRowKeySet,
68984
+ fixedColumnLeftMap,
68985
+ fixedColumnRightMap,
68986
+ currentPage,
68987
+ loadingKeySet,
68988
+ stickyExpandedRows,
68989
+ bodyWidthPx,
68990
+ renderExpand,
68991
+ renderExpandIcon: this.renderExpandIcon,
68992
+ renderCell: this.renderCell,
68993
+ defaultEmptyValue: this.defaultEmptyValueRef,
68994
+ mergedTheme: mergedTheme2,
68995
+ rowIndexToKey,
68996
+ cordToPass,
68997
+ cordKey,
68998
+ draggableColumn: this.draggableColumn,
68999
+ droppingRowKey: this.droppingRowKey,
69000
+ droppingPosition: this.droppingPosition,
69001
+ draggingRowKeySet: this.draggingRowKeySet,
69002
+ hoverKey: this.hoverKey,
69003
+ dataTableSlots: this.dataTableSlots,
69004
+ setHoverKey: (key) => {
69005
+ this.hoverKey = key;
69006
+ },
69007
+ handleCheckboxUpdateChecked,
69008
+ handleRadioUpdateChecked,
69009
+ handleUpdateExpanded,
69010
+ handleRowDragStart: this.handleRowDragStart,
69011
+ handleRowDragOver: this.handleRowDragOver,
69012
+ handleRowDragLeave: this.handleRowDragLeave,
69013
+ handleRowDragEnd: this.handleRowDragEnd,
69014
+ handleRowDrop: this.handleRowDrop,
69015
+ emitEdit: (value, row, key) => {
69016
+ this.$emit("edit", value, row, key);
68597
69017
  }
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
69018
  };
69019
+ const renderRow = (rowInfo, displayedRowIndex, isVirtual) => renderBodyRow(
69020
+ renderContext,
69021
+ rowInfo,
69022
+ displayedRowIndex,
69023
+ isVirtual
69024
+ );
68803
69025
  if (!virtualScroll) {
68804
69026
  return /* @__PURE__ */ vue.h(
68805
69027
  "table",
@@ -68873,28 +69095,14 @@
68873
69095
  }
68874
69096
  );
68875
69097
  if (this.empty && !this.loadingSkeleton) {
68876
- const createEmptyNode = () => /* @__PURE__ */ vue.h(
68877
- "div",
68878
- {
68879
- class: [
68880
- `${mergedClsPrefix}-data-table-empty`,
68881
- this.loading && `${mergedClsPrefix}-data-table-empty--hide`
68882
- ],
68883
- style: this.bodyStyle,
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
- );
69098
+ const createEmptyNode = () => renderBodyEmpty({
69099
+ clsPrefix: mergedClsPrefix,
69100
+ loading: this.loading,
69101
+ bodyStyle: this.bodyStyle,
69102
+ dataTableSlots: this.dataTableSlots,
69103
+ mergedTheme: this.mergedTheme,
69104
+ emptyProps: emptyPropsRef
69105
+ });
68898
69106
  if (this.shouldDisplaySomeTablePart) {
68899
69107
  return /* @__PURE__ */ vue.h(vue.Fragment, null, tableNode, createEmptyNode());
68900
69108
  } else {
@@ -69096,7 +69304,11 @@
69096
69304
  margin: calc(var(--u-th-padding) * -1);
69097
69305
  padding: var(--u-th-padding);
69098
69306
  box-sizing: border-box;
69099
- `), cM("disabled", null, [cB("data-table-td", "color: var(--u-td-opacity-disabled);")]), 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", `
69307
+ `), 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", `
69308
+ box-shadow: inset 0 2px 0 0 var(--u-drop-mark-color);
69309
+ `)])]), cM("drop-after", null, [c$1(">", [cB("data-table-td", `
69310
+ box-shadow: inset 0 -2px 0 0 var(--u-drop-mark-color);
69311
+ `)])]), 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
69312
  padding: var(--u-th-padding);
69101
69313
  position: relative;
69102
69314
  height: var(--u-th-height);
@@ -69249,7 +69461,22 @@
69249
69461
  `), cM("selection, expand", `
69250
69462
  text-align: center;
69251
69463
  line-height: 0;
69252
- `), cM("editable", `
69464
+ `), cM("draggable", `
69465
+ text-align: center;
69466
+ line-height: 0;
69467
+ cursor: grab;
69468
+ `, [c$1("&:active", `
69469
+ cursor: grabbing;
69470
+ `), c$1("&:hover", [cE("drag-handle", `
69471
+ color: var(--u-th-icon-color-active);
69472
+ `)]), cE("drag-handle", `
69473
+ display: inline-flex;
69474
+ align-items: center;
69475
+ justify-content: center;
69476
+ color: var(--u-th-icon-color);
69477
+ line-height: 0;
69478
+ pointer-events: none;
69479
+ `)]), cM("editable", `
69253
69480
  cursor: pointer;
69254
69481
  position: relative;
69255
69482
  padding: 0;
@@ -69269,7 +69496,11 @@
69269
69496
  height: 100%;
69270
69497
  width: 100%;
69271
69498
  }
69272
- `), fixedColumnStyle]), cB("data-table-empty", `
69499
+ `), fixedColumnStyle]), cB("data-table-drag-ghost", `
69500
+ opacity: var(--u-drag-ghost-opacity);
69501
+ filter: var(--u-drag-ghost-filter);
69502
+ pointer-events: none;
69503
+ `), cB("data-table-empty", `
69273
69504
  box-sizing: border-box;
69274
69505
  padding: var(--u-empty-padding);
69275
69506
  flex-grow: 1;
@@ -69757,6 +69988,242 @@
69757
69988
  };
69758
69989
  }
69759
69990
 
69991
+ const DROP_HALF_DIVISOR = 2;
69992
+ const DROP_STEP_BIAS = 1;
69993
+ const FALLBACK_ORDER = 0;
69994
+ const SINGLE_ROW_DRAG_SIZE = 1;
69995
+ const DRAG_IMAGE_OFFSET = 0;
69996
+ const GHOST_OFFSCREEN_TOP_PX = -1e4;
69997
+ const GHOST_CLEANUP_DELAY_MS = 0;
69998
+ function useRowDrag(props, {
69999
+ paginatedDataRef,
70000
+ mergedCheckedRowKeySetRef,
70001
+ mergedClsPrefixRef
70002
+ }) {
70003
+ const draggableColumnRef = useMemo(() => {
70004
+ const findDraggableColumn = columns => {
70005
+ for (const column of columns) {
70006
+ if ("children" in column) {
70007
+ const nested = findDraggableColumn(column.children);
70008
+ if (nested) return nested;
70009
+ } else if (column.type === "draggable") {
70010
+ return column;
70011
+ }
70012
+ }
70013
+ return null;
70014
+ };
70015
+ return findDraggableColumn(props.columns);
70016
+ });
70017
+ const draggingRowKeysRef = vue.ref([]);
70018
+ const draggingRowKeySetRef = vue.computed(() => new Set(draggingRowKeysRef.value));
70019
+ const droppingRowKeyRef = vue.ref(null);
70020
+ const droppingPositionRef = vue.ref(null);
70021
+ function resetDropState() {
70022
+ droppingRowKeyRef.value = null;
70023
+ droppingPositionRef.value = null;
70024
+ }
70025
+ function isRowDraggable(rowData) {
70026
+ const column = draggableColumnRef.value;
70027
+ if (!column) return false;
70028
+ if (typeof column.draggable === "function") {
70029
+ return column.draggable(rowData);
70030
+ }
70031
+ return true;
70032
+ }
70033
+ function getRowByKey(targetKey) {
70034
+ return paginatedDataRef.value.find(node => node.key === targetKey)?.rawNode;
70035
+ }
70036
+ function resolveDragKeys(initialRowKey) {
70037
+ const checkedSet = mergedCheckedRowKeySetRef.value;
70038
+ if (!checkedSet.has(initialRowKey)) return [initialRowKey];
70039
+ const keysInOrder = [];
70040
+ for (const node of paginatedDataRef.value) {
70041
+ if (checkedSet.has(node.key) && isRowDraggable(node.rawNode)) {
70042
+ keysInOrder.push(node.key);
70043
+ }
70044
+ }
70045
+ return keysInOrder.length ? keysInOrder : [initialRowKey];
70046
+ }
70047
+ function applyDragImage(event) {
70048
+ if (!event.dataTransfer || typeof event.dataTransfer.setDragImage !== "function") {
70049
+ return;
70050
+ }
70051
+ const cellElement = event.currentTarget;
70052
+ const rowElement = cellElement?.closest("tr");
70053
+ if (!rowElement) return;
70054
+ const draggedSet = draggingRowKeySetRef.value;
70055
+ if (draggedSet.size <= SINGLE_ROW_DRAG_SIZE) {
70056
+ event.dataTransfer.setDragImage(rowElement, DRAG_IMAGE_OFFSET, DRAG_IMAGE_OFFSET);
70057
+ return;
70058
+ }
70059
+ const tableElement = rowElement.closest("table");
70060
+ if (!tableElement) {
70061
+ event.dataTransfer.setDragImage(rowElement, DRAG_IMAGE_OFFSET, DRAG_IMAGE_OFFSET);
70062
+ return;
70063
+ }
70064
+ const mergedClsPrefix = mergedClsPrefixRef.value;
70065
+ const keyStringSet = new Set(Array.from(draggedSet).map(String));
70066
+ const ghost = tableElement.cloneNode(true);
70067
+ ghost.classList.add(`${mergedClsPrefix}-data-table-drag-ghost`);
70068
+ ghost.querySelectorAll("thead").forEach(headElement => headElement.remove());
70069
+ ghost.querySelectorAll("tbody > tr").forEach(rowChild => {
70070
+ const childKey = rowChild.getAttribute("data-row-key");
70071
+ if (childKey === null || !keyStringSet.has(childKey)) rowChild.remove();
70072
+ });
70073
+ ghost.style.position = "fixed";
70074
+ ghost.style.top = `${GHOST_OFFSCREEN_TOP_PX}px`;
70075
+ ghost.style.left = "0";
70076
+ ghost.style.pointerEvents = "none";
70077
+ ghost.style.width = `${tableElement.offsetWidth}px`;
70078
+ const hostElement = tableElement.closest(`.${mergedClsPrefix}-data-table`) || document.body;
70079
+ hostElement.appendChild(ghost);
70080
+ event.dataTransfer.setDragImage(ghost, DRAG_IMAGE_OFFSET, DRAG_IMAGE_OFFSET);
70081
+ setTimeout(() => {
70082
+ if (ghost.parentNode) ghost.parentNode.removeChild(ghost);
70083
+ }, GHOST_CLEANUP_DELAY_MS);
70084
+ }
70085
+ function handleRowDragStart(event, rowKey) {
70086
+ const row = getRowByKey(rowKey);
70087
+ if (!row || !isRowDraggable(row)) {
70088
+ event.preventDefault();
70089
+ return;
70090
+ }
70091
+ draggingRowKeysRef.value = resolveDragKeys(rowKey);
70092
+ if (event.dataTransfer) {
70093
+ event.dataTransfer.effectAllowed = "move";
70094
+ event.dataTransfer.setData("text/plain", draggingRowKeysRef.value.map(String).join(","));
70095
+ }
70096
+ applyDragImage(event);
70097
+ }
70098
+ function handleRowDragOver(event, rowKey) {
70099
+ if (!draggableColumnRef.value) return;
70100
+ if (!draggingRowKeysRef.value.length) return;
70101
+ event.preventDefault();
70102
+ if (event.dataTransfer) {
70103
+ event.dataTransfer.dropEffect = "move";
70104
+ }
70105
+ if (draggingRowKeySetRef.value.has(rowKey)) {
70106
+ resetDropState();
70107
+ return;
70108
+ }
70109
+ const target = event.currentTarget;
70110
+ if (!target) return;
70111
+ const rect = target.getBoundingClientRect();
70112
+ const offset = event.clientY - rect.top;
70113
+ const position = offset < rect.height / DROP_HALF_DIVISOR ? "before" : "after";
70114
+ droppingRowKeyRef.value = rowKey;
70115
+ droppingPositionRef.value = position;
70116
+ }
70117
+ function handleRowDragLeave(event, rowKey) {
70118
+ if (droppingRowKeyRef.value !== rowKey) return;
70119
+ const related = event.relatedTarget;
70120
+ const current = event.currentTarget;
70121
+ if (related && current && current.contains(related)) {
70122
+ return;
70123
+ }
70124
+ resetDropState();
70125
+ }
70126
+ function handleRowDragEnd() {
70127
+ draggingRowKeysRef.value = [];
70128
+ resetDropState();
70129
+ }
70130
+ function readOrder(row, orderKey) {
70131
+ const value = row?.[orderKey];
70132
+ return typeof value === "number" ? value : Number(value) || FALLBACK_ORDER;
70133
+ }
70134
+ function computeNewOrders(draggedKeys, dropIndex, position, orderKey) {
70135
+ const rows = paginatedDataRef.value;
70136
+ if (!rows.length) return null;
70137
+ const draggedSet = new Set(draggedKeys);
70138
+ const draggedIndexes = rows.map((node, index) => draggedSet.has(node.key) ? index : -1).filter(index => index >= 0);
70139
+ if (!draggedIndexes.length) return null;
70140
+ const filtered = rows.filter(node => !draggedSet.has(node.key));
70141
+ const targetIndex = position === "before" ? dropIndex : dropIndex + 1;
70142
+ const removedBefore = draggedIndexes.filter(index => index < targetIndex).length;
70143
+ const insertAt = Math.max(0, targetIndex - removedBefore);
70144
+ const prev = filtered[insertAt - 1]?.rawNode;
70145
+ const next = filtered[insertAt]?.rawNode;
70146
+ const draggedCount = draggedKeys.length;
70147
+ const orders = [];
70148
+ if (prev && next) {
70149
+ const prevOrder = readOrder(prev, orderKey);
70150
+ const nextOrder = readOrder(next, orderKey);
70151
+ const step = (nextOrder - prevOrder) / (draggedCount + DROP_STEP_BIAS);
70152
+ for (let index = 0; index < draggedCount; index++) {
70153
+ orders.push(prevOrder + step * (index + DROP_STEP_BIAS));
70154
+ }
70155
+ } else if (!prev && next) {
70156
+ const nextOrder = readOrder(next, orderKey);
70157
+ for (let index = 0; index < draggedCount; index++) {
70158
+ orders.push(nextOrder - (draggedCount - index));
70159
+ }
70160
+ } else if (prev && !next) {
70161
+ const prevOrder = readOrder(prev, orderKey);
70162
+ for (let index = 0; index < draggedCount; index++) {
70163
+ orders.push(prevOrder + (index + DROP_STEP_BIAS));
70164
+ }
70165
+ } else {
70166
+ for (const key of draggedKeys) {
70167
+ const row = rows.find(node => node.key === key)?.rawNode;
70168
+ orders.push(readOrder(row, orderKey));
70169
+ }
70170
+ }
70171
+ return orders;
70172
+ }
70173
+ function handleRowDrop(event, rowKey) {
70174
+ event.preventDefault();
70175
+ const column = draggableColumnRef.value;
70176
+ const draggedKeys = draggingRowKeysRef.value;
70177
+ const position = droppingPositionRef.value;
70178
+ if (!column || !draggedKeys.length || position === null || draggingRowKeySetRef.value.has(rowKey)) {
70179
+ handleRowDragEnd();
70180
+ return;
70181
+ }
70182
+ const rows = paginatedDataRef.value;
70183
+ const dropIndex = rows.findIndex(node => node.key === rowKey);
70184
+ if (dropIndex < 0) {
70185
+ handleRowDragEnd();
70186
+ return;
70187
+ }
70188
+ const orderKey = column.key;
70189
+ const newOrders = computeNewOrders(draggedKeys, dropIndex, position, orderKey);
70190
+ const dispatchPlan = draggedKeys.map((key, index) => {
70191
+ const row = rows.find(node => node.key === key)?.rawNode;
70192
+ return row ? {
70193
+ row,
70194
+ oldOrder: readOrder(row, orderKey),
70195
+ newOrder: newOrders ? newOrders[index] : readOrder(row, orderKey)
70196
+ } : null;
70197
+ });
70198
+ const targetIndex = position === "before" ? dropIndex : dropIndex + 1;
70199
+ const draggedSet = draggingRowKeySetRef.value;
70200
+ const draggedIndexes = rows.map((node, index) => draggedSet.has(node.key) ? index : -1).filter(index => index >= 0);
70201
+ const removedBefore = draggedIndexes.filter(index => index < targetIndex).length;
70202
+ const baseIndex = Math.max(0, targetIndex - removedBefore);
70203
+ handleRowDragEnd();
70204
+ if (!newOrders) return;
70205
+ dispatchPlan.forEach((entry, index) => {
70206
+ if (!entry) return;
70207
+ column.onDragEnd?.(entry.row, {
70208
+ index: baseIndex + index,
70209
+ oldOrder: entry.oldOrder,
70210
+ newOrder: entry.newOrder
70211
+ });
70212
+ });
70213
+ }
70214
+ return {
70215
+ draggableColumnRef,
70216
+ draggingRowKeySetRef,
70217
+ droppingRowKeyRef,
70218
+ droppingPositionRef,
70219
+ handleRowDragStart,
70220
+ handleRowDragOver,
70221
+ handleRowDragLeave,
70222
+ handleRowDragEnd,
70223
+ handleRowDrop
70224
+ };
70225
+ }
70226
+
69760
70227
  function useScroll(props, {
69761
70228
  mainTableInstRef,
69762
70229
  mergedCurrentPageRef,
@@ -70022,7 +70489,7 @@
70022
70489
  });
70023
70490
  const uncontrolledSortStateRef = vue.ref(defaultSortState);
70024
70491
  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));
70492
+ 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
70493
  const columnToSort = columnsWithControlledSortOrder.filter(col => col.sortOrder !== false);
70027
70494
  if (columnToSort.length) {
70028
70495
  return columnToSort.map(column => {
@@ -70076,6 +70543,18 @@
70076
70543
  return compareResult;
70077
70544
  });
70078
70545
  }
70546
+ const draggableColumn = dataRelatedColsRef.value.find(column => column.type === "draggable" && column.sortByKey !== false);
70547
+ if (draggableColumn) {
70548
+ const orderKey = draggableColumn.key;
70549
+ return filteredDataRef.value.slice().sort((tmNode1, tmNode2) => {
70550
+ const order1 = tmNode1.rawNode[orderKey];
70551
+ const order2 = tmNode2.rawNode[orderKey];
70552
+ if (typeof order1 === "number" && typeof order2 === "number") {
70553
+ return order1 - order2;
70554
+ }
70555
+ return 0;
70556
+ });
70557
+ }
70079
70558
  return filteredDataRef.value;
70080
70559
  });
70081
70560
  function getUpdatedSorterState(sortState) {
@@ -70114,7 +70593,7 @@
70114
70593
  if (!columnKey) {
70115
70594
  clearSorter();
70116
70595
  } else {
70117
- const columnToSort = dataRelatedColsRef.value.find(column => column.type !== "selection" && column.type !== "expand" && column.key === columnKey);
70596
+ const columnToSort = dataRelatedColsRef.value.find(column => column.type !== "selection" && column.type !== "expand" && column.type !== "draggable" && column.key === columnKey);
70118
70597
  if (!columnToSort?.sorter) return;
70119
70598
  const sorter = columnToSort.sorter;
70120
70599
  deriveNextSorter({
@@ -70206,7 +70685,9 @@
70206
70685
  });
70207
70686
  const controlledFilterState = {};
70208
70687
  columnsWithControlledFilter.forEach(column => {
70209
- if (column.type === "selection" || column.type === "expand") return;
70688
+ if (column.type === "selection" || column.type === "expand" || column.type === "draggable") {
70689
+ return;
70690
+ }
70210
70691
  if (column.filterOptionValues === void 0) {
70211
70692
  controlledFilterState[column.key] = column.filterOptionValue ?? null;
70212
70693
  } else {
@@ -70231,7 +70712,7 @@
70231
70712
  } = treeMateRef;
70232
70713
  const columnEntries = [];
70233
70714
  columns.forEach(column => {
70234
- if (column.type === "selection" || column.type === "expand" || "children" in column) {
70715
+ if (column.type === "selection" || column.type === "expand" || column.type === "draggable" || "children" in column) {
70235
70716
  return;
70236
70717
  }
70237
70718
  columnEntries.push([column.key, column]);
@@ -70508,7 +70989,7 @@
70508
70989
  if (!stored?.length) return null;
70509
70990
  const result = [];
70510
70991
  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);
70992
+ 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
70993
  if (column?.sorter) {
70513
70994
  result.push({
70514
70995
  columnKey: item.columnKey,
@@ -70654,6 +71135,21 @@
70654
71135
  expandableRef,
70655
71136
  doUpdateExpandedRowKeys
70656
71137
  } = useExpand(props, treeMateRef);
71138
+ const {
71139
+ draggableColumnRef,
71140
+ draggingRowKeySetRef,
71141
+ droppingRowKeyRef,
71142
+ droppingPositionRef,
71143
+ handleRowDragStart,
71144
+ handleRowDragOver,
71145
+ handleRowDragLeave,
71146
+ handleRowDragEnd,
71147
+ handleRowDrop
71148
+ } = useRowDrag(props, {
71149
+ paginatedDataRef,
71150
+ mergedCheckedRowKeySetRef,
71151
+ mergedClsPrefixRef
71152
+ });
70657
71153
  const {
70658
71154
  handleTableBodyScroll,
70659
71155
  handleTableHeaderScroll,
@@ -71095,6 +71591,15 @@
71095
71591
  "--u-action-divider-color": actionDividerColor
71096
71592
  };
71097
71593
  }),
71594
+ draggableColumnRef,
71595
+ draggingRowKeySetRef,
71596
+ droppingRowKeyRef,
71597
+ droppingPositionRef,
71598
+ handleRowDragStart,
71599
+ handleRowDragOver,
71600
+ handleRowDragLeave,
71601
+ handleRowDragEnd,
71602
+ handleRowDrop,
71098
71603
  onLoadRef: vue.toRef(props, "onLoad"),
71099
71604
  mergedTableLayoutRef,
71100
71605
  resizableEnabledRef,
@@ -71170,6 +71675,9 @@
71170
71675
  thButtonColorHover,
71171
71676
  thIconColor,
71172
71677
  thIconColorActive,
71678
+ dropMarkColor,
71679
+ dragGhostOpacity,
71680
+ dragGhostFilter,
71173
71681
  filterSize,
71174
71682
  borderRadius,
71175
71683
  lineHeight,
@@ -71238,6 +71746,9 @@
71238
71746
  "--u-th-button-color-hover": thButtonColorHover,
71239
71747
  "--u-th-icon-color": thIconColor,
71240
71748
  "--u-th-icon-color-active": thIconColorActive,
71749
+ "--u-drop-mark-color": dropMarkColor,
71750
+ "--u-drag-ghost-opacity": dragGhostOpacity,
71751
+ "--u-drag-ghost-filter": dragGhostFilter,
71241
71752
  "--u-filter-size": filterSize,
71242
71753
  "--u-pagination-margin": paginationMargin,
71243
71754
  "--u-empty-padding": emptyPadding,
@@ -80204,7 +80715,7 @@
80204
80715
  },
80205
80716
  render() {
80206
80717
  const defaultSlots = this.$slots.default;
80207
- const children = defaultSlots ? flatten$2(defaultSlots()) : [];
80718
+ const children = defaultSlots ? flatten$1(defaultSlots()) : [];
80208
80719
  const memorizedLength = children.length;
80209
80720
  const {
80210
80721
  contentClass,
@@ -83864,7 +84375,7 @@
83864
84375
  wrapItem,
83865
84376
  internalUseGap
83866
84377
  } = this;
83867
- const children = flatten$2(getSlot(this), false);
84378
+ const children = flatten$1(getSlot(this), false);
83868
84379
  if (!children.length)
83869
84380
  return null;
83870
84381
  const horizontalMargin = `${margin.horizontal}px`;
@@ -95385,6 +95896,10 @@
95385
95896
  const mappingCardProps = {
95386
95897
  title: [String, Function],
95387
95898
  description: [String, Function],
95899
+ subTitle: [String, Function],
95900
+ subDescription: [String, Function],
95901
+ headerInfo: Function,
95902
+ headerSubInfo: Function,
95388
95903
  rows: Array,
95389
95904
  cols: {
95390
95905
  type: Number,
@@ -96003,6 +96518,26 @@
96003
96518
  const theme = mergedThemeRef.value;
96004
96519
  const locale = localeRef.value;
96005
96520
  const renderTextProp = (value) => typeof value === "function" ? value() : value;
96521
+ const renderInfoText = (title, description) => {
96522
+ if (!title && !description)
96523
+ return null;
96524
+ 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)));
96525
+ };
96526
+ const mainInfo = resolveSlot(slots.headerInfo, () => {
96527
+ const fromProp = props.headerInfo?.();
96528
+ if (fromProp)
96529
+ return [fromProp];
96530
+ const fallback = renderInfoText(props.title, props.description);
96531
+ return fallback ? [fallback] : [];
96532
+ });
96533
+ const subInfo = resolveSlot(slots.headerSubInfo, () => {
96534
+ const fromProp = props.headerSubInfo?.();
96535
+ if (fromProp)
96536
+ return [fromProp];
96537
+ const fallback = renderInfoText(props.subTitle, props.subDescription);
96538
+ return fallback ? [fallback] : [];
96539
+ });
96540
+ const hasSubInfo = subInfo.length > 0;
96006
96541
  return /* @__PURE__ */ vue.h("div", { class: `${prefix}-mapping-card__header` }, /* @__PURE__ */ vue.h(
96007
96542
  _UFlex,
96008
96543
  {
@@ -96011,7 +96546,7 @@
96011
96546
  class: `${prefix}-mapping-card__header-info`
96012
96547
  },
96013
96548
  {
96014
- default: () => /* @__PURE__ */ vue.h(vue.Fragment, null, /* @__PURE__ */ vue.h("div", { class: `${prefix}-mapping-card__header-info-text` }, /* @__PURE__ */ vue.h("div", { class: `${prefix}-mapping-card__header-title` }, renderTextProp(props.title)), props.description && /* @__PURE__ */ vue.h("div", { class: `${prefix}-mapping-card__header-description` }, renderTextProp(props.description))), !props.hideCopy && /* @__PURE__ */ vue.h(_UTooltip, null, {
96549
+ default: () => /* @__PURE__ */ vue.h(vue.Fragment, null, mainInfo, !props.hideCopy && /* @__PURE__ */ vue.h(_UTooltip, null, {
96015
96550
  trigger: () => /* @__PURE__ */ vue.h(
96016
96551
  Button,
96017
96552
  {
@@ -96035,7 +96570,7 @@
96035
96570
  }
96036
96571
  ),
96037
96572
  default: () => locale.copyTooltip
96038
- }))
96573
+ }), hasSubInfo && /* @__PURE__ */ vue.h("div", { class: `${prefix}-mapping-card__header-info-divider` }), hasSubInfo && subInfo)
96039
96574
  }
96040
96575
  ), !props.hideHeaderActions && /* @__PURE__ */ vue.h(_UFlex, { align: "center", size: "small" }, {
96041
96576
  default: () => resolveSlot(slots.headerActions, () => {
@@ -96048,7 +96583,7 @@
96048
96583
  ...props.headerSwitchProps ?? {},
96049
96584
  theme: theme.peers.Switch,
96050
96585
  themeOverrides: theme.peerOverrides.Switch,
96051
- onUpdateValue: (val) => props.onSwitchChange?.(val)
96586
+ onUpdateValue: (value) => props.onSwitchChange?.(value)
96052
96587
  }
96053
96588
  ),
96054
96589
  default: () => locale.switchTooltip
@@ -96117,85 +96652,92 @@
96117
96652
  });
96118
96653
 
96119
96654
  var style$o = c$1([cB("mapping-card", `
96120
- background-color: var(--u-background-color);
96121
- border: 1px solid var(--u-border-color);
96122
- border-radius: var(--u-border-radius);
96123
- overflow: hidden;
96124
- box-sizing: border-box;
96125
- `, [cE("header", `
96126
- padding: var(--u-header-padding);
96127
- display: flex;
96128
- align-items: center;
96129
- justify-content: space-between;
96130
- gap: 8px;
96131
- position: relative;
96132
- `, [c$1("&::after", `
96133
- content: '';
96134
- position: absolute;
96135
- left: 24px;
96136
- right: 24px;
96137
- bottom: 0;
96138
- height: 1px;
96655
+ background-color: var(--u-background-color);
96656
+ border: 1px solid var(--u-border-color);
96657
+ border-radius: var(--u-border-radius);
96658
+ overflow: hidden;
96659
+ box-sizing: border-box;
96660
+ `, [cE("header", `
96661
+ padding: var(--u-header-padding);
96662
+ display: flex;
96663
+ align-items: center;
96664
+ justify-content: space-between;
96665
+ gap: 8px;
96666
+ position: relative;
96667
+ `, [c$1("&::after", `
96668
+ content: '';
96669
+ position: absolute;
96670
+ left: 24px;
96671
+ right: 24px;
96672
+ bottom: 0;
96673
+ height: 1px;
96674
+ background: var(--u-border-color);
96675
+ `)]), cE("header-info", `
96676
+ min-width: 0;
96677
+ `), cE("header-info-text", `
96678
+ min-width: 0;
96679
+ margin-right: 12px;
96680
+ `), cE("header-title", `
96681
+ color: var(--u-title-color);
96682
+ `), cE("header-description", `
96683
+ color: var(--u-description-color);
96684
+ margin-top: 2px;
96685
+ `), cE("header-info-divider", `
96686
+ margin-right: 12px;
96687
+ width: 1px;
96688
+ align-self: stretch;
96139
96689
  background: var(--u-border-color);
96140
- `)]), cE("header-info", `
96141
- min-width: 0;
96142
- `), cE("header-info-text", `
96143
- min-width: 0;
96144
- `), cE("header-title", `
96145
- color: var(--u-title-color);
96146
- `), cE("header-description", `
96147
- color: var(--u-description-color);
96148
- margin-top: 2px;
96149
- `), cE("body", `
96150
- display: flex;
96151
- padding: var(--u-body-padding);
96152
- `), cE("body-group", `
96153
- flex: 1;
96154
- position: relative;
96155
- `, [c$1("&:last-child", `
96156
- padding: 0 0 12px 20px;
96157
- `), c$1("&:first-child", `
96158
- padding: 0 20px 12px 0;
96159
- `), c$1("&:only-child", `
96160
- padding: 0 0 12px 0;
96161
- `), c$1("&::after", `
96162
- content: '';
96690
+ flex-shrink: 0;
96691
+ `), cE("body", `
96692
+ display: flex;
96693
+ padding: var(--u-body-padding);
96694
+ `), cE("body-group", `
96695
+ flex: 1;
96696
+ position: relative;
96697
+ `, [c$1("&:last-child", `
96698
+ padding: 0 0 12px 20px;
96699
+ `), c$1("&:first-child", `
96700
+ padding: 0 20px 12px 0;
96701
+ `), c$1("&:only-child", `
96702
+ padding: 0 0 12px 0;
96703
+ `), c$1("&::after", `
96704
+ content: '';
96705
+ position: absolute;
96706
+ right: 0;
96707
+ top: 0;
96708
+ width: 1px;
96709
+ height: calc(100% - 12px);
96710
+ background: var(--u-border-color);
96711
+ `), c$1("&:last-child::after", `
96712
+ display: none;
96713
+ `)]), cE("body-items", `
96714
+ align-items: center;
96715
+ `), cE("body-item", [cM("text", `
96716
+ padding: 0 24px;
96717
+ `)]), cE("body-group-icon", `
96163
96718
  position: absolute;
96164
96719
  right: 0;
96165
- top: 0;
96166
- width: 1px;
96167
- height: calc(100% - 12px);
96168
- background: var(--u-border-color);
96169
- `), c$1("&:last-child::after", `
96170
- display: none;
96171
- `)]), cE("body-items", `
96172
- align-items: center;
96173
- `), cE("body-item", [cM("text", `
96174
- padding: 0 24px;
96175
- `)]), cE("body-group-icon", `
96176
- position: absolute;
96177
- right: 0;
96178
- top: 50%;
96179
- transform: translate(50%, -50%);
96180
- z-index: 1;
96181
- display: flex;
96182
- align-items: center;
96183
- height: 44px;
96184
- width: 44px;
96185
- border-radius: 100px;
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", `
96720
+ top: 50%;
96721
+ transform: translate(50%, -50%);
96722
+ z-index: 1;
96723
+ display: flex;
96724
+ align-items: center;
96725
+ height: 44px;
96726
+ width: 44px;
96727
+ border-radius: 100px;
96728
+ justify-content: center;
96729
+ background-color: var(--u-divider-background-color);
96730
+ `), cE("side", `
96731
+ flex: 1;
96732
+ min-width: 0;
96733
+ `), cE("arrow", `
96734
+ display: flex;
96735
+ align-items: center;
96736
+ padding-top: 32px;
96737
+ color: var(--u-arrow-color);
96738
+ font-size: 16px;
96739
+ flex-shrink: 0;
96740
+ `)]), cB("mapping-card-list", `
96199
96741
  display: flex;
96200
96742
  justify-content: space-between;
96201
96743
  flex-direction: column;
@@ -96272,7 +96814,11 @@
96272
96814
  class: [`${this.mergedClsPrefix}-mapping-card`, themeClass],
96273
96815
  style: cssVars
96274
96816
  },
96275
- /* @__PURE__ */ vue.h(MappingCardHeader, null, { headerActions: this.$slots.headerActions }),
96817
+ /* @__PURE__ */ vue.h(MappingCardHeader, null, {
96818
+ headerActions: this.$slots.headerActions,
96819
+ headerInfo: this.$slots.headerInfo,
96820
+ headerSubInfo: this.$slots.headerSubInfo
96821
+ }),
96276
96822
  /* @__PURE__ */ vue.h(MappingCardBody, null)
96277
96823
  );
96278
96824
  }
@@ -103661,7 +104207,7 @@
103661
104207
  (variantConfigs[this.variant]?.vertical ?? this.vertical) && `${mergedClsPrefix}-steps--vertical`
103662
104208
  ]
103663
104209
  },
103664
- stepsWithIndex(flatten$2(getSlot(this)))
104210
+ stepsWithIndex(flatten$1(getSlot(this)))
103665
104211
  );
103666
104212
  }
103667
104213
  });
@@ -104843,7 +105389,7 @@
104843
105389
  });
104844
105390
  const compitableValueRef = useCompitable(props, ["activeName", "value"]);
104845
105391
  const uncontrolledValueRef = vue.ref(
104846
- compitableValueRef.value ?? props.defaultValue ?? (slots.default ? flatten$2(slots.default())[0]?.props?.name : null)
105392
+ compitableValueRef.value ?? props.defaultValue ?? (slots.default ? flatten$1(slots.default())[0]?.props?.name : null)
104847
105393
  );
104848
105394
  const mergedValueRef = useMergedState(
104849
105395
  compitableValueRef,
@@ -105338,10 +105884,10 @@
105338
105884
  $slots: { default: defaultSlot, prefix: prefixSlot, suffix: suffixSlot }
105339
105885
  } = this;
105340
105886
  onRender?.();
105341
- const tabPaneChildren = defaultSlot ? flatten$2(defaultSlot()).filter((v) => {
105887
+ const tabPaneChildren = defaultSlot ? flatten$1(defaultSlot()).filter((v) => {
105342
105888
  return v.type.name === "TabPane";
105343
105889
  }) : [];
105344
- const tabChildren = defaultSlot ? flatten$2(defaultSlot()).filter((v) => {
105890
+ const tabChildren = defaultSlot ? flatten$1(defaultSlot()).filter((v) => {
105345
105891
  return v.type.name === "Tab";
105346
105892
  }) : [];
105347
105893
  const showPane = !tabChildren.length;
@@ -108943,7 +109489,7 @@
108943
109489
  if (~expandedNodeIndex) {
108944
109490
  const children = afNodesRef.value[expandedNodeIndex].children;
108945
109491
  if (children) {
108946
- const expandedChildren = flatten$1(children, value);
109492
+ const expandedChildren = flatten(children, value);
108947
109493
  afNodesRef.value.splice(expandedNodeIndex + 1, 0, {
108948
109494
  __motion: true,
108949
109495
  mode: "expand",
@@ -108962,7 +109508,7 @@
108962
109508
  if (!collapsedNodeChildren)
108963
109509
  return;
108964
109510
  aipRef.value = true;
108965
- const collapsedChildren = flatten$1(collapsedNodeChildren, value);
109511
+ const collapsedChildren = flatten(collapsedNodeChildren, value);
108966
109512
  afNodesRef.value.splice(collapsedNodeIndex + 1, 0, {
108967
109513
  __motion: true,
108968
109514
  mode: "collapse",
@@ -112627,7 +113173,7 @@
112627
113173
  });
112628
113174
  }
112629
113175
 
112630
- var version = "2.0.5";
113176
+ var version = "2.0.6";
112631
113177
 
112632
113178
  function create({
112633
113179
  componentPrefix = "U",