@uzum-tech/ui 2.0.4 → 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 +9 -8
  106. package/web-types.json +1 -1
package/dist/index.mjs CHANGED
@@ -2370,7 +2370,7 @@ function getSlot$1(scope, slots, slotName = 'default') {
2370
2370
  return slot();
2371
2371
  }
2372
2372
  // o(n) flatten
2373
- function flatten$3(vNodes, filterCommentNode = true, result = []) {
2373
+ function flatten$2(vNodes, filterCommentNode = true, result = []) {
2374
2374
  vNodes.forEach(vNode => {
2375
2375
  if (vNode === null) return;
2376
2376
  if (typeof vNode !== 'object') {
@@ -2380,13 +2380,13 @@ function flatten$3(vNodes, filterCommentNode = true, result = []) {
2380
2380
  return;
2381
2381
  }
2382
2382
  if (Array.isArray(vNode)) {
2383
- flatten$3(vNode, filterCommentNode, result);
2383
+ flatten$2(vNode, filterCommentNode, result);
2384
2384
  return;
2385
2385
  }
2386
2386
  if (vNode.type === Fragment) {
2387
2387
  if (vNode.children === null) return;
2388
2388
  if (Array.isArray(vNode.children)) {
2389
- flatten$3(vNode.children, filterCommentNode, result);
2389
+ flatten$2(vNode.children, filterCommentNode, result);
2390
2390
  }
2391
2391
  // rawSlot
2392
2392
  } else if (vNode.type !== Comment) {
@@ -2400,7 +2400,7 @@ function getFirstVNode(scope, slots, slotName = 'default') {
2400
2400
  if (slot === undefined) {
2401
2401
  throw new Error(`[vueuc/${scope}]: slot[${slotName}] is empty.`);
2402
2402
  }
2403
- const content = flatten$3(slot());
2403
+ const content = flatten$2(slot());
2404
2404
  // vue will normalize the slot, so slot must be an array
2405
2405
  if (content.length === 1) {
2406
2406
  return content[0];
@@ -5551,7 +5551,7 @@ function createRefSetter(ref) {
5551
5551
  };
5552
5552
  }
5553
5553
 
5554
- function flatten$2(vNodes, filterCommentNode = true, result = []) {
5554
+ function flatten$1(vNodes, filterCommentNode = true, result = []) {
5555
5555
  vNodes.forEach(vNode => {
5556
5556
  if (vNode === null) return;
5557
5557
  if (typeof vNode !== "object") {
@@ -5561,13 +5561,13 @@ function flatten$2(vNodes, filterCommentNode = true, result = []) {
5561
5561
  return;
5562
5562
  }
5563
5563
  if (Array.isArray(vNode)) {
5564
- flatten$2(vNode, filterCommentNode, result);
5564
+ flatten$1(vNode, filterCommentNode, result);
5565
5565
  return;
5566
5566
  }
5567
5567
  if (vNode.type === Fragment) {
5568
5568
  if (vNode.children === null) return;
5569
5569
  if (Array.isArray(vNode.children)) {
5570
- flatten$2(vNode.children, filterCommentNode, result);
5570
+ flatten$1(vNode.children, filterCommentNode, result);
5571
5571
  }
5572
5572
  } else if (vNode.type !== Comment) {
5573
5573
  result.push(vNode);
@@ -5582,7 +5582,7 @@ function getFirstSlotVNode(slots, slotName = "default", props = void 0) {
5582
5582
  warn("getFirstSlotVNode", `slot[${slotName}] is empty`);
5583
5583
  return null;
5584
5584
  }
5585
- const slotContent = flatten$2(slot(props));
5585
+ const slotContent = flatten$1(slot(props));
5586
5586
  if (slotContent.length === 1) {
5587
5587
  return slotContent[0];
5588
5588
  } else {
@@ -5594,7 +5594,7 @@ function getFirstSlotVNodeWithTypedProps(slotName, slot, props) {
5594
5594
  if (!slot) {
5595
5595
  return null;
5596
5596
  }
5597
- const slotContent = flatten$2(slot(props));
5597
+ const slotContent = flatten$1(slot(props));
5598
5598
  if (slotContent.length === 1) {
5599
5599
  return slotContent[0];
5600
5600
  } else {
@@ -14154,6 +14154,29 @@ var DownloadIcon = replaceable(
14154
14154
  /* @__PURE__ */ h("svg", { viewBox: "0 0 16 16", version: "1.1", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ h("g", { stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd" }, /* @__PURE__ */ h("g", { fill: "currentColor", "fill-rule": "nonzero" }, /* @__PURE__ */ 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" }))))
14155
14155
  );
14156
14156
 
14157
+ var DragHandleRound = defineComponent({
14158
+ name: "DragHandleRound",
14159
+ render() {
14160
+ return /* @__PURE__ */ h(
14161
+ "svg",
14162
+ {
14163
+ width: "24",
14164
+ height: "24",
14165
+ viewBox: "0 0 24 24",
14166
+ fill: "none",
14167
+ xmlns: "http://www.w3.org/2000/svg"
14168
+ },
14169
+ /* @__PURE__ */ h(
14170
+ "path",
14171
+ {
14172
+ 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",
14173
+ fill: "currentColor"
14174
+ }
14175
+ )
14176
+ );
14177
+ }
14178
+ });
14179
+
14157
14180
  var EditIcon = defineComponent({
14158
14181
  name: "Edit",
14159
14182
  render() {
@@ -18005,7 +18028,7 @@ const moveMethods = {
18005
18028
  }
18006
18029
  };
18007
18030
 
18008
- function flatten$1(treeNodes, expandedKeys) {
18031
+ function flatten(treeNodes, expandedKeys) {
18009
18032
  const expandedKeySet = expandedKeys ? new Set(expandedKeys) : undefined;
18010
18033
  const flattenedNodes = [];
18011
18034
  function traverse(treeNodes) {
@@ -18152,7 +18175,7 @@ function createTreeMate(rawNodes, options = {}) {
18152
18175
  maxLevel: Math.max(...levelTreeNodeMap.keys()),
18153
18176
  getChildren,
18154
18177
  getFlattenedNodes(expandedKeys) {
18155
- return flatten$1(treeNodes, expandedKeys);
18178
+ return flatten(treeNodes, expandedKeys);
18156
18179
  },
18157
18180
  getNode,
18158
18181
  getPrev,
@@ -21147,7 +21170,7 @@ var _UTagGroup = defineComponent({
21147
21170
  render() {
21148
21171
  const { mergedClsPrefix, mergedValue, mergedSize, mergedDisabled } = this;
21149
21172
  const children = mapSlot$1(
21150
- flatten$2(getSlot(this)),
21173
+ flatten$1(getSlot(this)),
21151
21174
  mergedValue,
21152
21175
  mergedSize,
21153
21176
  mergedDisabled,
@@ -39061,7 +39084,7 @@ var UGrid$1 = defineComponent({
39061
39084
  }
39062
39085
  const renderContent = () => {
39063
39086
  this.overflow = false;
39064
- const rawChildren = flatten$2(getSlot(this));
39087
+ const rawChildren = flatten$1(getSlot(this));
39065
39088
  const childrenAndRawSpan = [];
39066
39089
  const { collapsed, collapsedRows, responsiveCols, responsiveQuery } = this;
39067
39090
  rawChildren.forEach((child) => {
@@ -41023,7 +41046,7 @@ var _UCarousel = defineComponent({
41023
41046
  dotSlotProps,
41024
41047
  $slots: { default: defaultSlot, dots: dotsSlot, arrow: arrowSlot }
41025
41048
  } = this;
41026
- const children = defaultSlot && flatten$2(defaultSlot()) || [];
41049
+ const children = defaultSlot && flatten$1(defaultSlot()) || [];
41027
41050
  let slides = filterCarouselItem(children);
41028
41051
  if (!slides.length) {
41029
41052
  slides = children.map((ch) => /* @__PURE__ */ h(_UCarouselItem, null, {
@@ -43814,7 +43837,7 @@ var _UFlex = defineComponent({
43814
43837
  mergedClsPrefix,
43815
43838
  rtlEnabled
43816
43839
  } = this;
43817
- const children = flatten$2(getSlot(this), false);
43840
+ const children = flatten$1(getSlot(this), false);
43818
43841
  if (!children.length) {
43819
43842
  return null;
43820
43843
  }
@@ -46722,6 +46745,9 @@ function self$T(vars) {
46722
46745
  thButtonColorHover: elementsTertiary,
46723
46746
  thIconColor: elementsPrimary,
46724
46747
  thIconColorActive: brandPrimary500,
46748
+ dropMarkColor: brandPrimary500,
46749
+ dragGhostOpacity: "0.85",
46750
+ dragGhostFilter: "drop-shadow(0 4px 12px rgba(0, 0, 0, 0.18))",
46725
46751
  // modal
46726
46752
  borderColorModal: elementsQuaternary,
46727
46753
  tdColorHoverModal: elementsTertiary,
@@ -65788,6 +65814,7 @@ function areColumnWidthMapsEqual(previousWidths, nextWidths, keys) {
65788
65814
 
65789
65815
  const SELECTION_COL_WIDTH = 40;
65790
65816
  const EXPAND_COL_WIDTH = 40;
65817
+ const DRAGGABLE_COL_WIDTH = 40;
65791
65818
  function getNumberColWidth(column) {
65792
65819
  if (column.type === "selection") {
65793
65820
  return column.width === void 0 ? SELECTION_COL_WIDTH : depx(column.width);
@@ -65795,6 +65822,9 @@ function getNumberColWidth(column) {
65795
65822
  if (column.type === "expand") {
65796
65823
  return column.width === void 0 ? EXPAND_COL_WIDTH : depx(column.width);
65797
65824
  }
65825
+ if (column.type === "draggable") {
65826
+ return column.width === void 0 ? DRAGGABLE_COL_WIDTH : depx(column.width);
65827
+ }
65798
65828
  if ("children" in column) return void 0;
65799
65829
  if (typeof column.width === "string") {
65800
65830
  return depx(column.width);
@@ -65808,6 +65838,9 @@ function getStringColWidth(column) {
65808
65838
  if (column.type === "expand") {
65809
65839
  return formatLength(column.width ?? EXPAND_COL_WIDTH);
65810
65840
  }
65841
+ if (column.type === "draggable") {
65842
+ return formatLength(column.width ?? DRAGGABLE_COL_WIDTH);
65843
+ }
65811
65844
  if ("children" in column) {
65812
65845
  return void 0;
65813
65846
  }
@@ -65816,6 +65849,7 @@ function getStringColWidth(column) {
65816
65849
  function getColKey(column) {
65817
65850
  if (column.type === "selection") return "__n_selection__";
65818
65851
  if (column.type === "expand") return "__n_expand__";
65852
+ if (column.type === "draggable") return "__n_draggable__";
65819
65853
  return column.key;
65820
65854
  }
65821
65855
  function createCustomWidthStyle(column, resizedWidth) {
@@ -65876,7 +65910,7 @@ function formatCsvCell(value) {
65876
65910
  }
65877
65911
  }
65878
65912
  function generateCsv(columns, data, getCsvCell, getCsvHeader) {
65879
- const exportableColumns = columns.filter(column => column.type !== "expand" && column.type !== "selection" && column.allowExport !== false);
65913
+ const exportableColumns = columns.filter(column => column.type !== "expand" && column.type !== "selection" && column.type !== "draggable" && column.allowExport !== false);
65880
65914
  const header = exportableColumns.map(col => {
65881
65915
  return getCsvHeader ? getCsvHeader(col) : col.title;
65882
65916
  }).join(",");
@@ -65888,6 +65922,40 @@ function generateCsv(columns, data, getCsvCell, getCsvHeader) {
65888
65922
  return [header, ...rows].join("\n");
65889
65923
  }
65890
65924
 
65925
+ function flattenExpandedRows(rowInfos, expandedRowKeys) {
65926
+ const flattenedRows = [];
65927
+ function traverse(nodes, rootIndex) {
65928
+ nodes.forEach(node => {
65929
+ if (node.children && expandedRowKeys.has(node.key)) {
65930
+ flattenedRows.push({
65931
+ tmNode: node,
65932
+ striped: false,
65933
+ key: node.key,
65934
+ index: rootIndex
65935
+ });
65936
+ traverse(node.children, rootIndex);
65937
+ } else {
65938
+ flattenedRows.push({
65939
+ key: node.key,
65940
+ tmNode: node,
65941
+ striped: false,
65942
+ index: rootIndex
65943
+ });
65944
+ }
65945
+ });
65946
+ }
65947
+ rowInfos.forEach(rowInfo => {
65948
+ flattenedRows.push(rowInfo);
65949
+ const {
65950
+ children
65951
+ } = rowInfo.tmNode;
65952
+ if (children && expandedRowKeys.has(rowInfo.key)) {
65953
+ traverse(children, rowInfo.index);
65954
+ }
65955
+ });
65956
+ return flattenedRows;
65957
+ }
65958
+
65891
65959
  const REGEX = {
65892
65960
  ONLY_DIGITS: /\D/g};
65893
65961
  const defaultNumericMask = {
@@ -65960,6 +66028,39 @@ function isColumnSorting(column, mergedSortState) {
65960
66028
  return mergedSortState.some(state => state.columnKey === column.key && state.order);
65961
66029
  }
65962
66030
 
66031
+ function renderBodyEmpty(deps) {
66032
+ const {
66033
+ clsPrefix,
66034
+ loading,
66035
+ bodyStyle,
66036
+ dataTableSlots,
66037
+ mergedTheme,
66038
+ emptyProps
66039
+ } = deps;
66040
+ return /* @__PURE__ */ h(
66041
+ "div",
66042
+ {
66043
+ class: [
66044
+ `${clsPrefix}-data-table-empty`,
66045
+ loading && `${clsPrefix}-data-table-empty--hide`
66046
+ ],
66047
+ style: bodyStyle,
66048
+ ref: "emptyElRef"
66049
+ },
66050
+ resolveSlot(dataTableSlots.empty, () => [
66051
+ /* @__PURE__ */ h(
66052
+ UEmpty$1,
66053
+ {
66054
+ size: "large",
66055
+ theme: mergedTheme.peers.Empty,
66056
+ themeOverrides: mergedTheme.peerOverrides.Empty,
66057
+ ...emptyProps
66058
+ }
66059
+ )
66060
+ ])
66061
+ );
66062
+ }
66063
+
65963
66064
  var RenderSafeCheckbox = defineComponent({
65964
66065
  name: "DataTableBodyCheckbox",
65965
66066
  props: {
@@ -66618,7 +66719,7 @@ var _URadioGroup = defineComponent({
66618
66719
  render() {
66619
66720
  const { mergedValue, mergedClsPrefix, handleFocusin, handleFocusout } = this;
66620
66721
  const { children, isButtonGroup } = mapSlot(
66621
- flatten$2(getSlot(this)),
66722
+ flatten$1(getSlot(this)),
66622
66723
  mergedValue,
66623
66724
  mergedClsPrefix
66624
66725
  );
@@ -66682,90 +66783,6 @@ var RenderSafeRadio = defineComponent({
66682
66783
  }
66683
66784
  });
66684
66785
 
66685
- var BodySkeleton = defineComponent({
66686
- name: "DataTableBodySkeleton",
66687
- props: {
66688
- rowCount: {
66689
- type: Number,
66690
- default: 10
66691
- }
66692
- },
66693
- setup(props) {
66694
- const {
66695
- mergedClsPrefixRef,
66696
- colsRef,
66697
- props: dataTableProps
66698
- } = inject(dataTableInjectionKey);
66699
- const skeletonRowCount = computed(() => {
66700
- if (dataTableProps.pagination && typeof dataTableProps.pagination === "object" && dataTableProps.pagination.pageSize) {
66701
- return dataTableProps.pagination.pageSize;
66702
- }
66703
- return props.rowCount;
66704
- });
66705
- return {
66706
- mergedClsPrefix: mergedClsPrefixRef,
66707
- cols: colsRef,
66708
- skeletonRowCount
66709
- };
66710
- },
66711
- render() {
66712
- const { mergedClsPrefix, cols, skeletonRowCount } = this;
66713
- const skeletonRows = Array.from(
66714
- { length: skeletonRowCount },
66715
- (_, index) => /* @__PURE__ */ h(
66716
- "tr",
66717
- {
66718
- key: `skeleton-row-${index}`,
66719
- class: `${mergedClsPrefix}-data-table-tr ${mergedClsPrefix}-data-table-tr--skeleton`
66720
- },
66721
- cols.map((col) => /* @__PURE__ */ h(
66722
- "td",
66723
- {
66724
- key: col.key,
66725
- class: [
66726
- `${mergedClsPrefix}-data-table-td`,
66727
- `${mergedClsPrefix}-data-table-td--skeleton`,
66728
- col.column.fixed && `${mergedClsPrefix}-data-table-td--fixed-${col.column.fixed}`,
66729
- col.column.align && `${mergedClsPrefix}-data-table-td--${col.column.align}-align`
66730
- ],
66731
- style: {
66732
- textAlign: col.column.align || void 0,
66733
- padding: "var(--u-td-padding)"
66734
- }
66735
- },
66736
- col.column.fixed && /* @__PURE__ */ h(
66737
- "div",
66738
- {
66739
- class: `${mergedClsPrefix}-data-table-td__shadow-holder`
66740
- }
66741
- ),
66742
- /* @__PURE__ */ h(
66743
- _USkeleton,
66744
- {
66745
- height: "var(--u-line-height)",
66746
- width: col.column.type === "selection" ? "16px" : "85%",
66747
- animated: true,
66748
- style: {
66749
- borderRadius: "16px"
66750
- }
66751
- }
66752
- )
66753
- ))
66754
- )
66755
- );
66756
- return /* @__PURE__ */ h(
66757
- "tbody",
66758
- {
66759
- class: [
66760
- `${mergedClsPrefix}-data-table-tbody`,
66761
- `${mergedClsPrefix}-data-table-tbody--skeleton`
66762
- ]
66763
- },
66764
- skeletonRows
66765
- );
66766
- }
66767
- });
66768
-
66769
66786
  function applyMask(value, mask) {
66770
66787
  if (!mask) return value;
66771
66788
  if (!value || value.trim() === "") return "";
@@ -67079,6 +67096,404 @@ var ExpandTrigger = defineComponent({
67079
67096
  }
67080
67097
  });
67081
67098
 
67099
+ function renderExpandedRow(context, rowInfo, displayedRowIndex) {
67100
+ const {
67101
+ mergedClsPrefix,
67102
+ colCount,
67103
+ rowCount,
67104
+ stickyExpandedRows,
67105
+ bodyWidthPx,
67106
+ renderExpand
67107
+ } = context;
67108
+ const { index: actualRowIndex } = rowInfo;
67109
+ const {
67110
+ tmNode: { key, rawNode }
67111
+ } = rowInfo;
67112
+ return /* @__PURE__ */ h(
67113
+ "tr",
67114
+ {
67115
+ class: `${mergedClsPrefix}-data-table-tr ${mergedClsPrefix}-data-table-tr--expanded`,
67116
+ key: `${key}__expand`
67117
+ },
67118
+ /* @__PURE__ */ h(
67119
+ "td",
67120
+ {
67121
+ class: [
67122
+ `${mergedClsPrefix}-data-table-td`,
67123
+ `${mergedClsPrefix}-data-table-td--last-col`,
67124
+ displayedRowIndex + 1 === rowCount && `${mergedClsPrefix}-data-table-td--last-row`
67125
+ ],
67126
+ colspan: colCount
67127
+ },
67128
+ stickyExpandedRows ? /* @__PURE__ */ h(
67129
+ "div",
67130
+ {
67131
+ class: `${mergedClsPrefix}-data-table-expand`,
67132
+ style: {
67133
+ width: bodyWidthPx
67134
+ }
67135
+ },
67136
+ renderExpand(rawNode, actualRowIndex)
67137
+ ) : renderExpand(rawNode, actualRowIndex)
67138
+ )
67139
+ );
67140
+ }
67141
+ function renderBodyRow(context, rowInfo, displayedRowIndex, isVirtual) {
67142
+ if ("isExpandedRow" in rowInfo) {
67143
+ return renderExpandedRow(context, rowInfo, displayedRowIndex);
67144
+ }
67145
+ const {
67146
+ mergedClsPrefix,
67147
+ cols,
67148
+ colCount,
67149
+ rowCount,
67150
+ hasChildren,
67151
+ childTriggerColIndex,
67152
+ indentStyle,
67153
+ rowClassName,
67154
+ rowProps,
67155
+ mergedSortState,
67156
+ mergedExpandedRowKeySet,
67157
+ fixedColumnLeftMap,
67158
+ fixedColumnRightMap,
67159
+ currentPage,
67160
+ loadingKeySet,
67161
+ renderExpandIcon,
67162
+ renderCell,
67163
+ defaultEmptyValue,
67164
+ mergedTheme,
67165
+ rowIndexToKey,
67166
+ cordToPass,
67167
+ cordKey,
67168
+ draggableColumn,
67169
+ droppingRowKey,
67170
+ droppingPosition,
67171
+ draggingRowKeySet,
67172
+ hoverKey,
67173
+ dataTableSlots,
67174
+ setHoverKey,
67175
+ handleCheckboxUpdateChecked,
67176
+ handleRadioUpdateChecked,
67177
+ handleUpdateExpanded,
67178
+ handleRowDragStart,
67179
+ handleRowDragOver,
67180
+ handleRowDragLeave,
67181
+ handleRowDragEnd,
67182
+ handleRowDrop,
67183
+ emitEdit
67184
+ } = context;
67185
+ const { index: actualRowIndex } = rowInfo;
67186
+ const isSummary = "isSummaryRow" in rowInfo;
67187
+ const striped = !isSummary && rowInfo.striped;
67188
+ const { tmNode, key: rowKey } = rowInfo;
67189
+ const { rawNode: rowData } = tmNode;
67190
+ const expanded = mergedExpandedRowKeySet.has(rowKey);
67191
+ const props = rowProps ? rowProps(rowData, actualRowIndex) : void 0;
67192
+ const mergedRowClassName = typeof rowClassName === "string" ? rowClassName : createRowClassName(rowData, actualRowIndex, rowClassName);
67193
+ const { class: _class, ...restProps } = props || {};
67194
+ const isRowDraggable = !isSummary && !!draggableColumn && (typeof draggableColumn.draggable === "function" ? draggableColumn.draggable(rowData) : true);
67195
+ const isDropTarget = !!draggableColumn && droppingRowKey === rowKey;
67196
+ const dropPosition = isDropTarget ? droppingPosition : null;
67197
+ const isBeingDragged = !!draggableColumn && draggingRowKeySet.has(rowKey);
67198
+ const row = /* @__PURE__ */ h(
67199
+ "tr",
67200
+ {
67201
+ onMouseenter: () => {
67202
+ setHoverKey(rowKey);
67203
+ },
67204
+ key: rowKey,
67205
+ "data-row-key": String(rowKey),
67206
+ onDragover: draggableColumn && !isSummary ? (event) => handleRowDragOver(event, rowKey) : void 0,
67207
+ onDragleave: draggableColumn && !isSummary ? (event) => handleRowDragLeave(event, rowKey) : void 0,
67208
+ onDrop: draggableColumn && !isSummary ? (event) => handleRowDrop(event, rowKey) : void 0,
67209
+ class: [
67210
+ `${mergedClsPrefix}-data-table-tr`,
67211
+ rowInfo.tmNode.disabled && `${mergedClsPrefix}-data-table-tr--disabled`,
67212
+ isSummary && `${mergedClsPrefix}-data-table-tr--summary`,
67213
+ striped && `${mergedClsPrefix}-data-table-tr--striped`,
67214
+ expanded && `${mergedClsPrefix}-data-table-tr--expanded`,
67215
+ isBeingDragged && `${mergedClsPrefix}-data-table-tr--dragging`,
67216
+ isDropTarget && dropPosition === "before" && `${mergedClsPrefix}-data-table-tr--drop-before`,
67217
+ isDropTarget && dropPosition === "after" && `${mergedClsPrefix}-data-table-tr--drop-after`,
67218
+ mergedRowClassName,
67219
+ _class
67220
+ ],
67221
+ ...restProps
67222
+ },
67223
+ cols.map((col, colIndex) => {
67224
+ if (displayedRowIndex in cordToPass) {
67225
+ const cordOfRowToPass = cordToPass[displayedRowIndex];
67226
+ const indexInCordOfRowToPass = cordOfRowToPass.indexOf(colIndex);
67227
+ if (~indexInCordOfRowToPass) {
67228
+ cordOfRowToPass.splice(indexInCordOfRowToPass, 1);
67229
+ return null;
67230
+ }
67231
+ }
67232
+ const { column } = col;
67233
+ const colKey = getColKey(col);
67234
+ const { rowSpan, colSpan } = column;
67235
+ const mergedColSpan = isSummary ? rowInfo.tmNode.rawNode[colKey]?.colSpan || 1 : colSpan ? colSpan(rowData, actualRowIndex) : 1;
67236
+ const mergedRowSpan = isSummary ? rowInfo.tmNode.rawNode[colKey]?.rowSpan || 1 : rowSpan ? rowSpan(rowData, actualRowIndex) : 1;
67237
+ const isLastCol = colIndex + mergedColSpan === colCount;
67238
+ const isLastRow = displayedRowIndex + mergedRowSpan === rowCount;
67239
+ const isCrossRowTd = mergedRowSpan > 1;
67240
+ if (isCrossRowTd) {
67241
+ cordKey[displayedRowIndex] = {
67242
+ [colIndex]: []
67243
+ };
67244
+ }
67245
+ if (mergedColSpan > 1 || isCrossRowTd) {
67246
+ for (let i = displayedRowIndex; i < displayedRowIndex + mergedRowSpan; ++i) {
67247
+ if (isCrossRowTd) {
67248
+ cordKey[displayedRowIndex][colIndex].push(rowIndexToKey[i]);
67249
+ }
67250
+ for (let j = colIndex; j < colIndex + mergedColSpan; ++j) {
67251
+ if (i === displayedRowIndex && j === colIndex) {
67252
+ continue;
67253
+ }
67254
+ if (!(i in cordToPass)) {
67255
+ cordToPass[i] = [j];
67256
+ } else {
67257
+ cordToPass[i].push(j);
67258
+ }
67259
+ }
67260
+ }
67261
+ }
67262
+ const cellHoverKey = isCrossRowTd ? hoverKey : null;
67263
+ const { cellProps } = column;
67264
+ const resolvedCellProps = cellProps?.(rowData, actualRowIndex);
67265
+ const indentOffsetStyle = {
67266
+ "--indent-offset": ""
67267
+ };
67268
+ const isDraggableHandleCell = column.type === "draggable" && !isSummary && isRowDraggable;
67269
+ return /* @__PURE__ */ h(
67270
+ "td",
67271
+ {
67272
+ ...resolvedCellProps,
67273
+ key: colKey,
67274
+ draggable: isDraggableHandleCell || void 0,
67275
+ onDragstart: isDraggableHandleCell ? (event) => handleRowDragStart(event, rowKey) : void 0,
67276
+ onDragend: isDraggableHandleCell ? () => handleRowDragEnd() : void 0,
67277
+ style: [
67278
+ {
67279
+ textAlign: column.align || void 0,
67280
+ left: pxfy(fixedColumnLeftMap[colKey]?.start),
67281
+ right: pxfy(fixedColumnRightMap[colKey]?.start)
67282
+ },
67283
+ indentOffsetStyle,
67284
+ resolvedCellProps?.style || ""
67285
+ ],
67286
+ colspan: mergedColSpan,
67287
+ rowspan: isVirtual ? void 0 : mergedRowSpan,
67288
+ "data-col-key": colKey,
67289
+ class: [
67290
+ `${mergedClsPrefix}-data-table-td`,
67291
+ column.className,
67292
+ resolvedCellProps?.class,
67293
+ isSummary && `${mergedClsPrefix}-data-table-td--summary`,
67294
+ (cellHoverKey !== null && cordKey[displayedRowIndex][colIndex].includes(cellHoverKey) || isColumnSorting(column, mergedSortState)) && `${mergedClsPrefix}-data-table-td--hover`,
67295
+ column.fixed && `${mergedClsPrefix}-data-table-td--fixed-${column.fixed}`,
67296
+ column.align && `${mergedClsPrefix}-data-table-td--${column.align}-align`,
67297
+ column.type === "selection" && `${mergedClsPrefix}-data-table-td--selection`,
67298
+ column.type === "expand" && `${mergedClsPrefix}-data-table-td--expand`,
67299
+ column.type === "draggable" && `${mergedClsPrefix}-data-table-td--draggable`,
67300
+ isLastCol && `${mergedClsPrefix}-data-table-td--last-col`,
67301
+ isLastRow && `${mergedClsPrefix}-data-table-td--last-row`,
67302
+ "editable" in column && (typeof column.editable === "function" ? column.editable(rowData) : column.editable) && !isSummary && `${mergedClsPrefix}-data-table-td--editable`
67303
+ ]
67304
+ },
67305
+ column.fixed && /* @__PURE__ */ h(
67306
+ "div",
67307
+ {
67308
+ class: `${mergedClsPrefix}-data-table-td__shadow-holder`
67309
+ }
67310
+ ),
67311
+ hasChildren && colIndex === childTriggerColIndex ? [
67312
+ repeat(
67313
+ indentOffsetStyle["--indent-offset"] = isSummary ? 0 : rowInfo.tmNode.level,
67314
+ /* @__PURE__ */ h(
67315
+ "div",
67316
+ {
67317
+ class: `${mergedClsPrefix}-data-table-indent`,
67318
+ style: indentStyle
67319
+ }
67320
+ )
67321
+ ),
67322
+ isSummary || rowInfo.tmNode.isLeaf ? /* @__PURE__ */ h(
67323
+ "div",
67324
+ {
67325
+ class: `${mergedClsPrefix}-data-table-expand-placeholder`
67326
+ }
67327
+ ) : /* @__PURE__ */ h(
67328
+ ExpandTrigger,
67329
+ {
67330
+ class: `${mergedClsPrefix}-data-table-expand-trigger`,
67331
+ clsPrefix: mergedClsPrefix,
67332
+ expanded,
67333
+ renderExpandIcon,
67334
+ loading: loadingKeySet.has(rowInfo.key),
67335
+ onClick: () => {
67336
+ handleUpdateExpanded(rowKey, rowInfo.tmNode);
67337
+ }
67338
+ }
67339
+ )
67340
+ ] : null,
67341
+ column.type === "selection" ? !isSummary ? column.multiple === false ? /* @__PURE__ */ h(
67342
+ RenderSafeRadio,
67343
+ {
67344
+ key: currentPage,
67345
+ rowKey,
67346
+ disabled: rowInfo.tmNode.disabled,
67347
+ onClick: (event) => {
67348
+ event.stopPropagation();
67349
+ },
67350
+ onUpdateChecked: () => {
67351
+ handleRadioUpdateChecked(rowInfo.tmNode);
67352
+ }
67353
+ }
67354
+ ) : /* @__PURE__ */ h(
67355
+ RenderSafeCheckbox,
67356
+ {
67357
+ key: currentPage,
67358
+ rowKey,
67359
+ disabled: rowInfo.tmNode.disabled,
67360
+ onUpdateChecked: (checked, event) => {
67361
+ event.stopPropagation();
67362
+ handleCheckboxUpdateChecked(
67363
+ rowInfo.tmNode,
67364
+ checked,
67365
+ event.shiftKey
67366
+ );
67367
+ }
67368
+ }
67369
+ ) : null : column.type === "expand" ? !isSummary ? !column.expandable || column.expandable?.(rowData) ? /* @__PURE__ */ h(
67370
+ ExpandTrigger,
67371
+ {
67372
+ clsPrefix: mergedClsPrefix,
67373
+ expanded,
67374
+ renderExpandIcon,
67375
+ onClick: () => {
67376
+ handleUpdateExpanded(rowKey, null);
67377
+ }
67378
+ }
67379
+ ) : null : null : column.type === "draggable" ? isDraggableHandleCell ? /* @__PURE__ */ h(
67380
+ "span",
67381
+ {
67382
+ class: `${mergedClsPrefix}-data-table-td__drag-handle`,
67383
+ "aria-label": "Drag to reorder"
67384
+ },
67385
+ resolveSlot(dataTableSlots["drag-handle"], () => [
67386
+ /* @__PURE__ */ h(DragHandleRound, null)
67387
+ ])
67388
+ ) : null : /* @__PURE__ */ h(
67389
+ Cell,
67390
+ {
67391
+ clsPrefix: mergedClsPrefix,
67392
+ index: actualRowIndex,
67393
+ row: rowData,
67394
+ column,
67395
+ isSummary,
67396
+ mergedTheme,
67397
+ renderCell,
67398
+ defaultEmptyValue,
67399
+ onEdit: (value, row2, key) => {
67400
+ emitEdit(value, row2, key);
67401
+ }
67402
+ }
67403
+ )
67404
+ );
67405
+ })
67406
+ );
67407
+ return row;
67408
+ }
67409
+
67410
+ const ICON_COLUMN_SKELETON_WIDTH = "16px";
67411
+ const DEFAULT_COLUMN_SKELETON_WIDTH = "85%";
67412
+ const SKELETON_BORDER_RADIUS = "16px";
67413
+ var BodySkeleton = defineComponent({
67414
+ name: "DataTableBodySkeleton",
67415
+ props: {
67416
+ rowCount: {
67417
+ type: Number,
67418
+ default: 10
67419
+ }
67420
+ },
67421
+ setup(props) {
67422
+ const {
67423
+ mergedClsPrefixRef,
67424
+ colsRef,
67425
+ props: dataTableProps
67426
+ } = inject(dataTableInjectionKey);
67427
+ const skeletonRowCount = computed(() => {
67428
+ if (dataTableProps.pagination && typeof dataTableProps.pagination === "object" && dataTableProps.pagination.pageSize) {
67429
+ return dataTableProps.pagination.pageSize;
67430
+ }
67431
+ return props.rowCount;
67432
+ });
67433
+ return {
67434
+ mergedClsPrefix: mergedClsPrefixRef,
67435
+ cols: colsRef,
67436
+ skeletonRowCount
67437
+ };
67438
+ },
67439
+ render() {
67440
+ const { mergedClsPrefix, cols, skeletonRowCount } = this;
67441
+ const skeletonRows = Array.from(
67442
+ { length: skeletonRowCount },
67443
+ (_, index) => /* @__PURE__ */ h(
67444
+ "tr",
67445
+ {
67446
+ key: `skeleton-row-${index}`,
67447
+ class: `${mergedClsPrefix}-data-table-tr ${mergedClsPrefix}-data-table-tr--skeleton`
67448
+ },
67449
+ cols.map((col) => /* @__PURE__ */ h(
67450
+ "td",
67451
+ {
67452
+ key: col.key,
67453
+ class: [
67454
+ `${mergedClsPrefix}-data-table-td`,
67455
+ `${mergedClsPrefix}-data-table-td--skeleton`,
67456
+ col.column.fixed && `${mergedClsPrefix}-data-table-td--fixed-${col.column.fixed}`,
67457
+ col.column.align && `${mergedClsPrefix}-data-table-td--${col.column.align}-align`
67458
+ ],
67459
+ style: {
67460
+ textAlign: col.column.align || void 0,
67461
+ padding: "var(--u-td-padding)"
67462
+ }
67463
+ },
67464
+ col.column.fixed && /* @__PURE__ */ h(
67465
+ "div",
67466
+ {
67467
+ class: `${mergedClsPrefix}-data-table-td__shadow-holder`
67468
+ }
67469
+ ),
67470
+ /* @__PURE__ */ h(
67471
+ _USkeleton,
67472
+ {
67473
+ height: "var(--u-line-height)",
67474
+ width: col.column.type === "selection" || col.column.type === "draggable" ? ICON_COLUMN_SKELETON_WIDTH : DEFAULT_COLUMN_SKELETON_WIDTH,
67475
+ animated: true,
67476
+ style: {
67477
+ borderRadius: SKELETON_BORDER_RADIUS
67478
+ }
67479
+ }
67480
+ )
67481
+ ))
67482
+ )
67483
+ );
67484
+ return /* @__PURE__ */ h(
67485
+ "tbody",
67486
+ {
67487
+ class: [
67488
+ `${mergedClsPrefix}-data-table-tbody`,
67489
+ `${mergedClsPrefix}-data-table-tbody--skeleton`
67490
+ ]
67491
+ },
67492
+ skeletonRows
67493
+ );
67494
+ }
67495
+ });
67496
+
67082
67497
  var UDataTableFilterMenu = defineComponent({
67083
67498
  name: "DataTableFilterMenu",
67084
67499
  props: {
@@ -67661,6 +68076,8 @@ var SelectionMenu = defineComponent({
67661
68076
  });
67662
68077
 
67663
68078
  function renderTitle(column) {
68079
+ if (column.type === "draggable")
68080
+ return null;
67664
68081
  return typeof column.title === "function" ? column.title(column) : column.title;
67665
68082
  }
67666
68083
  var TableHeader = defineComponent({
@@ -67869,6 +68286,9 @@ var TableHeader = defineComponent({
67869
68286
  const { ellipsis } = column;
67870
68287
  const ellipsisEnabled = isColumnEllipsisEnabled(column);
67871
68288
  const createColumnVNode = () => {
68289
+ if (column.type === "draggable") {
68290
+ return null;
68291
+ }
67872
68292
  if (column.type === "selection") {
67873
68293
  return column.multiple !== false ? /* @__PURE__ */ h(Fragment, null, /* @__PURE__ */ h(
67874
68294
  _UCheckbox,
@@ -67960,7 +68380,7 @@ var TableHeader = defineComponent({
67960
68380
  },
67961
68381
  column.className
67962
68382
  ],
67963
- onClick: column.type !== "selection" && column.type !== "expand" && !("children" in column) ? (e) => {
68383
+ onClick: column.type !== "selection" && column.type !== "expand" && column.type !== "draggable" && !("children" in column) ? (e) => {
67964
68384
  handleColHeaderClick(e, column);
67965
68385
  } : void 0
67966
68386
  },
@@ -68003,38 +68423,8 @@ var TableHeader = defineComponent({
68003
68423
  }
68004
68424
  });
68005
68425
 
68006
- function flatten(rowInfos, expandedRowKeys) {
68007
- const fRows = [];
68008
- function traverse(rs, rootIndex) {
68009
- rs.forEach((r) => {
68010
- if (r.children && expandedRowKeys.has(r.key)) {
68011
- fRows.push({
68012
- tmNode: r,
68013
- striped: false,
68014
- key: r.key,
68015
- index: rootIndex
68016
- });
68017
- traverse(r.children, rootIndex);
68018
- } else {
68019
- fRows.push({
68020
- key: r.key,
68021
- tmNode: r,
68022
- striped: false,
68023
- index: rootIndex
68024
- });
68025
- }
68026
- });
68027
- }
68028
- rowInfos.forEach((rowInfo) => {
68029
- fRows.push(rowInfo);
68030
- const { children } = rowInfo.tmNode;
68031
- if (children && expandedRowKeys.has(rowInfo.key)) {
68032
- traverse(children, rowInfo.index);
68033
- }
68034
- });
68035
- return fRows;
68036
- }
68037
- const VirtualListItemWrapper = defineComponent({
68426
+ var VirtualListItemWrapper = defineComponent({
68427
+ name: "VirtualListItemWrapper",
68038
68428
  props: {
68039
68429
  clsPrefix: {
68040
68430
  type: String,
@@ -68067,6 +68457,7 @@ const VirtualListItemWrapper = defineComponent({
68067
68457
  );
68068
68458
  }
68069
68459
  });
68460
+
68070
68461
  var TableBody = defineComponent({
68071
68462
  name: "DataTableBody",
68072
68463
  emits: ["edit"],
@@ -68126,7 +68517,16 @@ var TableBody = defineComponent({
68126
68517
  doUncheck,
68127
68518
  renderCell,
68128
68519
  defaultEmptyValueRef,
68129
- emptyPropsRef
68520
+ emptyPropsRef,
68521
+ draggableColumnRef,
68522
+ draggingRowKeySetRef,
68523
+ droppingRowKeyRef,
68524
+ droppingPositionRef,
68525
+ handleRowDragStart,
68526
+ handleRowDragOver,
68527
+ handleRowDragLeave,
68528
+ handleRowDragEnd,
68529
+ handleRowDrop
68130
68530
  } = inject(dataTableInjectionKey);
68131
68531
  const UConfigProvider = inject(configProviderInjectionKey, null);
68132
68532
  const scrollbarInstRef = ref(null);
@@ -68429,6 +68829,15 @@ var TableBody = defineComponent({
68429
68829
  renderCell,
68430
68830
  defaultEmptyValueRef,
68431
68831
  emptyPropsRef,
68832
+ draggableColumn: draggableColumnRef,
68833
+ draggingRowKeySet: draggingRowKeySetRef,
68834
+ droppingRowKey: droppingRowKeyRef,
68835
+ droppingPosition: droppingPositionRef,
68836
+ handleRowDragStart,
68837
+ handleRowDragOver,
68838
+ handleRowDragLeave,
68839
+ handleRowDragEnd,
68840
+ handleRowDrop,
68432
68841
  ...exposedMethods
68433
68842
  };
68434
68843
  },
@@ -68505,7 +68914,7 @@ var TableBody = defineComponent({
68505
68914
  const { length: colCount } = cols;
68506
68915
  let mergedData;
68507
68916
  const { data: paginatedData, hasChildren } = paginatedDataAndInfo;
68508
- const mergedPaginationData = hasChildren ? flatten(paginatedData, mergedExpandedRowKeySet) : paginatedData;
68917
+ const mergedPaginationData = hasChildren ? flattenExpandedRows(paginatedData, mergedExpandedRowKeySet) : paginatedData;
68509
68918
  if (summary) {
68510
68919
  const summaryRows = summary(this.rawPaginatedData);
68511
68920
  if (Array.isArray(summaryRows)) {
@@ -68556,246 +68965,59 @@ var TableBody = defineComponent({
68556
68965
  });
68557
68966
  const bodyWidth = stickyExpandedRows ? this.bodyWidth : null;
68558
68967
  const bodyWidthPx = bodyWidth === null ? void 0 : `${bodyWidth}px`;
68559
- const renderRow = (rowInfo, displayedRowIndex, isVirtual) => {
68560
- const { index: actualRowIndex } = rowInfo;
68561
- if ("isExpandedRow" in rowInfo) {
68562
- const {
68563
- tmNode: { key, rawNode }
68564
- } = rowInfo;
68565
- return /* @__PURE__ */ h(
68566
- "tr",
68567
- {
68568
- class: `${mergedClsPrefix}-data-table-tr ${mergedClsPrefix}-data-table-tr--expanded`,
68569
- key: `${key}__expand`
68570
- },
68571
- /* @__PURE__ */ h(
68572
- "td",
68573
- {
68574
- class: [
68575
- `${mergedClsPrefix}-data-table-td`,
68576
- `${mergedClsPrefix}-data-table-td--last-col`,
68577
- displayedRowIndex + 1 === rowCount && `${mergedClsPrefix}-data-table-td--last-row`
68578
- ],
68579
- colspan: colCount
68580
- },
68581
- stickyExpandedRows ? /* @__PURE__ */ h(
68582
- "div",
68583
- {
68584
- class: `${mergedClsPrefix}-data-table-expand`,
68585
- style: {
68586
- width: bodyWidthPx
68587
- }
68588
- },
68589
- renderExpand(rawNode, actualRowIndex)
68590
- ) : renderExpand(rawNode, actualRowIndex)
68591
- )
68592
- );
68968
+ const renderContext = {
68969
+ mergedClsPrefix,
68970
+ cols,
68971
+ colCount,
68972
+ rowCount,
68973
+ hasChildren,
68974
+ childTriggerColIndex,
68975
+ indentStyle,
68976
+ rowClassName,
68977
+ rowProps,
68978
+ mergedSortState,
68979
+ mergedExpandedRowKeySet,
68980
+ fixedColumnLeftMap,
68981
+ fixedColumnRightMap,
68982
+ currentPage,
68983
+ loadingKeySet,
68984
+ stickyExpandedRows,
68985
+ bodyWidthPx,
68986
+ renderExpand,
68987
+ renderExpandIcon: this.renderExpandIcon,
68988
+ renderCell: this.renderCell,
68989
+ defaultEmptyValue: this.defaultEmptyValueRef,
68990
+ mergedTheme: mergedTheme2,
68991
+ rowIndexToKey,
68992
+ cordToPass,
68993
+ cordKey,
68994
+ draggableColumn: this.draggableColumn,
68995
+ droppingRowKey: this.droppingRowKey,
68996
+ droppingPosition: this.droppingPosition,
68997
+ draggingRowKeySet: this.draggingRowKeySet,
68998
+ hoverKey: this.hoverKey,
68999
+ dataTableSlots: this.dataTableSlots,
69000
+ setHoverKey: (key) => {
69001
+ this.hoverKey = key;
69002
+ },
69003
+ handleCheckboxUpdateChecked,
69004
+ handleRadioUpdateChecked,
69005
+ handleUpdateExpanded,
69006
+ handleRowDragStart: this.handleRowDragStart,
69007
+ handleRowDragOver: this.handleRowDragOver,
69008
+ handleRowDragLeave: this.handleRowDragLeave,
69009
+ handleRowDragEnd: this.handleRowDragEnd,
69010
+ handleRowDrop: this.handleRowDrop,
69011
+ emitEdit: (value, row, key) => {
69012
+ this.$emit("edit", value, row, key);
68593
69013
  }
68594
- const isSummary = "isSummaryRow" in rowInfo;
68595
- const striped = !isSummary && rowInfo.striped;
68596
- const { tmNode, key: rowKey } = rowInfo;
68597
- const { rawNode: rowData } = tmNode;
68598
- const expanded = mergedExpandedRowKeySet.has(rowKey);
68599
- const props = rowProps ? rowProps(rowData, actualRowIndex) : void 0;
68600
- const mergedRowClassName = typeof rowClassName === "string" ? rowClassName : createRowClassName(rowData, actualRowIndex, rowClassName);
68601
- const { class: _class, ...restProps } = props || {};
68602
- const row = /* @__PURE__ */ h(
68603
- "tr",
68604
- {
68605
- onMouseenter: () => {
68606
- this.hoverKey = rowKey;
68607
- },
68608
- key: rowKey,
68609
- class: [
68610
- `${mergedClsPrefix}-data-table-tr`,
68611
- rowInfo.tmNode.disabled && `${mergedClsPrefix}-data-table-tr--disabled`,
68612
- isSummary && `${mergedClsPrefix}-data-table-tr--summary`,
68613
- striped && `${mergedClsPrefix}-data-table-tr--striped`,
68614
- expanded && `${mergedClsPrefix}-data-table-tr--expanded`,
68615
- mergedRowClassName,
68616
- _class
68617
- ],
68618
- ...restProps
68619
- },
68620
- cols.map((col, colIndex) => {
68621
- if (displayedRowIndex in cordToPass) {
68622
- const cordOfRowToPass = cordToPass[displayedRowIndex];
68623
- const indexInCordOfRowToPass = cordOfRowToPass.indexOf(colIndex);
68624
- if (~indexInCordOfRowToPass) {
68625
- cordOfRowToPass.splice(indexInCordOfRowToPass, 1);
68626
- return null;
68627
- }
68628
- }
68629
- const { column } = col;
68630
- const colKey = getColKey(col);
68631
- const { rowSpan, colSpan } = column;
68632
- const mergedColSpan = isSummary ? rowInfo.tmNode.rawNode[colKey]?.colSpan || 1 : colSpan ? colSpan(rowData, actualRowIndex) : 1;
68633
- const mergedRowSpan = isSummary ? rowInfo.tmNode.rawNode[colKey]?.rowSpan || 1 : rowSpan ? rowSpan(rowData, actualRowIndex) : 1;
68634
- const isLastCol = colIndex + mergedColSpan === colCount;
68635
- const isLastRow = displayedRowIndex + mergedRowSpan === rowCount;
68636
- const isCrossRowTd = mergedRowSpan > 1;
68637
- if (isCrossRowTd) {
68638
- cordKey[displayedRowIndex] = {
68639
- [colIndex]: []
68640
- };
68641
- }
68642
- if (mergedColSpan > 1 || isCrossRowTd) {
68643
- for (let i = displayedRowIndex; i < displayedRowIndex + mergedRowSpan; ++i) {
68644
- if (isCrossRowTd) {
68645
- cordKey[displayedRowIndex][colIndex].push(
68646
- rowIndexToKey[i]
68647
- );
68648
- }
68649
- for (let j = colIndex; j < colIndex + mergedColSpan; ++j) {
68650
- if (i === displayedRowIndex && j === colIndex) {
68651
- continue;
68652
- }
68653
- if (!(i in cordToPass)) {
68654
- cordToPass[i] = [j];
68655
- } else {
68656
- cordToPass[i].push(j);
68657
- }
68658
- }
68659
- }
68660
- }
68661
- const hoverKey = isCrossRowTd ? this.hoverKey : null;
68662
- const { cellProps } = column;
68663
- const resolvedCellProps = cellProps?.(
68664
- rowData,
68665
- actualRowIndex
68666
- );
68667
- const indentOffsetStyle = {
68668
- "--indent-offset": ""
68669
- };
68670
- return /* @__PURE__ */ h(
68671
- "td",
68672
- {
68673
- ...resolvedCellProps,
68674
- key: colKey,
68675
- style: [
68676
- {
68677
- textAlign: column.align || void 0,
68678
- left: pxfy(fixedColumnLeftMap[colKey]?.start),
68679
- right: pxfy(fixedColumnRightMap[colKey]?.start)
68680
- },
68681
- indentOffsetStyle,
68682
- resolvedCellProps?.style || ""
68683
- ],
68684
- colspan: mergedColSpan,
68685
- rowspan: isVirtual ? void 0 : mergedRowSpan,
68686
- "data-col-key": colKey,
68687
- class: [
68688
- `${mergedClsPrefix}-data-table-td`,
68689
- column.className,
68690
- resolvedCellProps?.class,
68691
- isSummary && `${mergedClsPrefix}-data-table-td--summary`,
68692
- (hoverKey !== null && cordKey[displayedRowIndex][colIndex].includes(
68693
- hoverKey
68694
- ) || isColumnSorting(column, mergedSortState)) && `${mergedClsPrefix}-data-table-td--hover`,
68695
- column.fixed && `${mergedClsPrefix}-data-table-td--fixed-${column.fixed}`,
68696
- column.align && `${mergedClsPrefix}-data-table-td--${column.align}-align`,
68697
- column.type === "selection" && `${mergedClsPrefix}-data-table-td--selection`,
68698
- column.type === "expand" && `${mergedClsPrefix}-data-table-td--expand`,
68699
- isLastCol && `${mergedClsPrefix}-data-table-td--last-col`,
68700
- isLastRow && `${mergedClsPrefix}-data-table-td--last-row`,
68701
- "editable" in column && (typeof column.editable === "function" ? column.editable(rowData) : column.editable) && !isSummary && `${mergedClsPrefix}-data-table-td--editable`
68702
- ]
68703
- },
68704
- column.fixed && /* @__PURE__ */ h(
68705
- "div",
68706
- {
68707
- class: `${mergedClsPrefix}-data-table-td__shadow-holder`
68708
- }
68709
- ),
68710
- hasChildren && colIndex === childTriggerColIndex ? [
68711
- repeat(
68712
- indentOffsetStyle["--indent-offset"] = isSummary ? 0 : rowInfo.tmNode.level,
68713
- /* @__PURE__ */ h(
68714
- "div",
68715
- {
68716
- class: `${mergedClsPrefix}-data-table-indent`,
68717
- style: indentStyle
68718
- }
68719
- )
68720
- ),
68721
- isSummary || rowInfo.tmNode.isLeaf ? /* @__PURE__ */ h(
68722
- "div",
68723
- {
68724
- class: `${mergedClsPrefix}-data-table-expand-placeholder`
68725
- }
68726
- ) : /* @__PURE__ */ h(
68727
- ExpandTrigger,
68728
- {
68729
- class: `${mergedClsPrefix}-data-table-expand-trigger`,
68730
- clsPrefix: mergedClsPrefix,
68731
- expanded,
68732
- renderExpandIcon: this.renderExpandIcon,
68733
- loading: loadingKeySet.has(rowInfo.key),
68734
- onClick: () => {
68735
- handleUpdateExpanded(rowKey, rowInfo.tmNode);
68736
- }
68737
- }
68738
- )
68739
- ] : null,
68740
- column.type === "selection" ? !isSummary ? column.multiple === false ? /* @__PURE__ */ h(
68741
- RenderSafeRadio,
68742
- {
68743
- key: currentPage,
68744
- rowKey,
68745
- disabled: rowInfo.tmNode.disabled,
68746
- onClick: (event) => {
68747
- event.stopPropagation();
68748
- },
68749
- onUpdateChecked: () => {
68750
- handleRadioUpdateChecked(rowInfo.tmNode);
68751
- }
68752
- }
68753
- ) : /* @__PURE__ */ h(
68754
- RenderSafeCheckbox,
68755
- {
68756
- key: currentPage,
68757
- rowKey,
68758
- disabled: rowInfo.tmNode.disabled,
68759
- onUpdateChecked: (checked, event) => {
68760
- event.stopPropagation();
68761
- handleCheckboxUpdateChecked(
68762
- rowInfo.tmNode,
68763
- checked,
68764
- event.shiftKey
68765
- );
68766
- }
68767
- }
68768
- ) : null : column.type === "expand" ? !isSummary ? !column.expandable || column.expandable?.(rowData) ? /* @__PURE__ */ h(
68769
- ExpandTrigger,
68770
- {
68771
- clsPrefix: mergedClsPrefix,
68772
- expanded,
68773
- renderExpandIcon: this.renderExpandIcon,
68774
- onClick: () => {
68775
- handleUpdateExpanded(rowKey, null);
68776
- }
68777
- }
68778
- ) : null : null : /* @__PURE__ */ h(
68779
- Cell,
68780
- {
68781
- clsPrefix: mergedClsPrefix,
68782
- index: actualRowIndex,
68783
- row: rowData,
68784
- column,
68785
- isSummary,
68786
- mergedTheme: mergedTheme2,
68787
- renderCell: this.renderCell,
68788
- defaultEmptyValue: this.defaultEmptyValueRef,
68789
- onEdit: (value, row2, key) => {
68790
- this.$emit("edit", value, row2, key);
68791
- }
68792
- }
68793
- )
68794
- );
68795
- })
68796
- );
68797
- return row;
68798
69014
  };
69015
+ const renderRow = (rowInfo, displayedRowIndex, isVirtual) => renderBodyRow(
69016
+ renderContext,
69017
+ rowInfo,
69018
+ displayedRowIndex,
69019
+ isVirtual
69020
+ );
68799
69021
  if (!virtualScroll) {
68800
69022
  return /* @__PURE__ */ h(
68801
69023
  "table",
@@ -68869,28 +69091,14 @@ var TableBody = defineComponent({
68869
69091
  }
68870
69092
  );
68871
69093
  if (this.empty && !this.loadingSkeleton) {
68872
- const createEmptyNode = () => /* @__PURE__ */ h(
68873
- "div",
68874
- {
68875
- class: [
68876
- `${mergedClsPrefix}-data-table-empty`,
68877
- this.loading && `${mergedClsPrefix}-data-table-empty--hide`
68878
- ],
68879
- style: this.bodyStyle,
68880
- ref: "emptyElRef"
68881
- },
68882
- resolveSlot(this.dataTableSlots.empty, () => [
68883
- /* @__PURE__ */ h(
68884
- UEmpty$1,
68885
- {
68886
- size: "large",
68887
- theme: this.mergedTheme.peers.Empty,
68888
- themeOverrides: this.mergedTheme.peerOverrides.Empty,
68889
- ...emptyPropsRef
68890
- }
68891
- )
68892
- ])
68893
- );
69094
+ const createEmptyNode = () => renderBodyEmpty({
69095
+ clsPrefix: mergedClsPrefix,
69096
+ loading: this.loading,
69097
+ bodyStyle: this.bodyStyle,
69098
+ dataTableSlots: this.dataTableSlots,
69099
+ mergedTheme: this.mergedTheme,
69100
+ emptyProps: emptyPropsRef
69101
+ });
68894
69102
  if (this.shouldDisplaySomeTablePart) {
68895
69103
  return /* @__PURE__ */ h(Fragment, null, tableNode, createEmptyNode());
68896
69104
  } else {
@@ -69092,7 +69300,11 @@ c$1("&:last-child", "flex-grow: 1;")])])])])])])]), c$1(">", [cB("data-table-loa
69092
69300
  margin: calc(var(--u-th-padding) * -1);
69093
69301
  padding: var(--u-th-padding);
69094
69302
  box-sizing: border-box;
69095
- `), 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", `
69303
+ `), 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", `
69304
+ box-shadow: inset 0 2px 0 0 var(--u-drop-mark-color);
69305
+ `)])]), cM("drop-after", null, [c$1(">", [cB("data-table-td", `
69306
+ box-shadow: inset 0 -2px 0 0 var(--u-drop-mark-color);
69307
+ `)])]), 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", `
69096
69308
  padding: var(--u-th-padding);
69097
69309
  position: relative;
69098
69310
  height: var(--u-th-height);
@@ -69245,7 +69457,22 @@ c$1("&:last-child", "flex-grow: 1;")])])])])])])]), c$1(">", [cB("data-table-loa
69245
69457
  `), cM("selection, expand", `
69246
69458
  text-align: center;
69247
69459
  line-height: 0;
69248
- `), cM("editable", `
69460
+ `), cM("draggable", `
69461
+ text-align: center;
69462
+ line-height: 0;
69463
+ cursor: grab;
69464
+ `, [c$1("&:active", `
69465
+ cursor: grabbing;
69466
+ `), c$1("&:hover", [cE("drag-handle", `
69467
+ color: var(--u-th-icon-color-active);
69468
+ `)]), cE("drag-handle", `
69469
+ display: inline-flex;
69470
+ align-items: center;
69471
+ justify-content: center;
69472
+ color: var(--u-th-icon-color);
69473
+ line-height: 0;
69474
+ pointer-events: none;
69475
+ `)]), cM("editable", `
69249
69476
  cursor: pointer;
69250
69477
  position: relative;
69251
69478
  padding: 0;
@@ -69265,7 +69492,11 @@ c$1("&:last-child", "flex-grow: 1;")])])])])])])]), c$1(">", [cB("data-table-loa
69265
69492
  height: 100%;
69266
69493
  width: 100%;
69267
69494
  }
69268
- `), fixedColumnStyle]), cB("data-table-empty", `
69495
+ `), fixedColumnStyle]), cB("data-table-drag-ghost", `
69496
+ opacity: var(--u-drag-ghost-opacity);
69497
+ filter: var(--u-drag-ghost-filter);
69498
+ pointer-events: none;
69499
+ `), cB("data-table-empty", `
69269
69500
  box-sizing: border-box;
69270
69501
  padding: var(--u-empty-padding);
69271
69502
  flex-grow: 1;
@@ -69753,6 +69984,242 @@ function useResizable() {
69753
69984
  };
69754
69985
  }
69755
69986
 
69987
+ const DROP_HALF_DIVISOR = 2;
69988
+ const DROP_STEP_BIAS = 1;
69989
+ const FALLBACK_ORDER = 0;
69990
+ const SINGLE_ROW_DRAG_SIZE = 1;
69991
+ const DRAG_IMAGE_OFFSET = 0;
69992
+ const GHOST_OFFSCREEN_TOP_PX = -1e4;
69993
+ const GHOST_CLEANUP_DELAY_MS = 0;
69994
+ function useRowDrag(props, {
69995
+ paginatedDataRef,
69996
+ mergedCheckedRowKeySetRef,
69997
+ mergedClsPrefixRef
69998
+ }) {
69999
+ const draggableColumnRef = useMemo(() => {
70000
+ const findDraggableColumn = columns => {
70001
+ for (const column of columns) {
70002
+ if ("children" in column) {
70003
+ const nested = findDraggableColumn(column.children);
70004
+ if (nested) return nested;
70005
+ } else if (column.type === "draggable") {
70006
+ return column;
70007
+ }
70008
+ }
70009
+ return null;
70010
+ };
70011
+ return findDraggableColumn(props.columns);
70012
+ });
70013
+ const draggingRowKeysRef = ref([]);
70014
+ const draggingRowKeySetRef = computed(() => new Set(draggingRowKeysRef.value));
70015
+ const droppingRowKeyRef = ref(null);
70016
+ const droppingPositionRef = ref(null);
70017
+ function resetDropState() {
70018
+ droppingRowKeyRef.value = null;
70019
+ droppingPositionRef.value = null;
70020
+ }
70021
+ function isRowDraggable(rowData) {
70022
+ const column = draggableColumnRef.value;
70023
+ if (!column) return false;
70024
+ if (typeof column.draggable === "function") {
70025
+ return column.draggable(rowData);
70026
+ }
70027
+ return true;
70028
+ }
70029
+ function getRowByKey(targetKey) {
70030
+ return paginatedDataRef.value.find(node => node.key === targetKey)?.rawNode;
70031
+ }
70032
+ function resolveDragKeys(initialRowKey) {
70033
+ const checkedSet = mergedCheckedRowKeySetRef.value;
70034
+ if (!checkedSet.has(initialRowKey)) return [initialRowKey];
70035
+ const keysInOrder = [];
70036
+ for (const node of paginatedDataRef.value) {
70037
+ if (checkedSet.has(node.key) && isRowDraggable(node.rawNode)) {
70038
+ keysInOrder.push(node.key);
70039
+ }
70040
+ }
70041
+ return keysInOrder.length ? keysInOrder : [initialRowKey];
70042
+ }
70043
+ function applyDragImage(event) {
70044
+ if (!event.dataTransfer || typeof event.dataTransfer.setDragImage !== "function") {
70045
+ return;
70046
+ }
70047
+ const cellElement = event.currentTarget;
70048
+ const rowElement = cellElement?.closest("tr");
70049
+ if (!rowElement) return;
70050
+ const draggedSet = draggingRowKeySetRef.value;
70051
+ if (draggedSet.size <= SINGLE_ROW_DRAG_SIZE) {
70052
+ event.dataTransfer.setDragImage(rowElement, DRAG_IMAGE_OFFSET, DRAG_IMAGE_OFFSET);
70053
+ return;
70054
+ }
70055
+ const tableElement = rowElement.closest("table");
70056
+ if (!tableElement) {
70057
+ event.dataTransfer.setDragImage(rowElement, DRAG_IMAGE_OFFSET, DRAG_IMAGE_OFFSET);
70058
+ return;
70059
+ }
70060
+ const mergedClsPrefix = mergedClsPrefixRef.value;
70061
+ const keyStringSet = new Set(Array.from(draggedSet).map(String));
70062
+ const ghost = tableElement.cloneNode(true);
70063
+ ghost.classList.add(`${mergedClsPrefix}-data-table-drag-ghost`);
70064
+ ghost.querySelectorAll("thead").forEach(headElement => headElement.remove());
70065
+ ghost.querySelectorAll("tbody > tr").forEach(rowChild => {
70066
+ const childKey = rowChild.getAttribute("data-row-key");
70067
+ if (childKey === null || !keyStringSet.has(childKey)) rowChild.remove();
70068
+ });
70069
+ ghost.style.position = "fixed";
70070
+ ghost.style.top = `${GHOST_OFFSCREEN_TOP_PX}px`;
70071
+ ghost.style.left = "0";
70072
+ ghost.style.pointerEvents = "none";
70073
+ ghost.style.width = `${tableElement.offsetWidth}px`;
70074
+ const hostElement = tableElement.closest(`.${mergedClsPrefix}-data-table`) || document.body;
70075
+ hostElement.appendChild(ghost);
70076
+ event.dataTransfer.setDragImage(ghost, DRAG_IMAGE_OFFSET, DRAG_IMAGE_OFFSET);
70077
+ setTimeout(() => {
70078
+ if (ghost.parentNode) ghost.parentNode.removeChild(ghost);
70079
+ }, GHOST_CLEANUP_DELAY_MS);
70080
+ }
70081
+ function handleRowDragStart(event, rowKey) {
70082
+ const row = getRowByKey(rowKey);
70083
+ if (!row || !isRowDraggable(row)) {
70084
+ event.preventDefault();
70085
+ return;
70086
+ }
70087
+ draggingRowKeysRef.value = resolveDragKeys(rowKey);
70088
+ if (event.dataTransfer) {
70089
+ event.dataTransfer.effectAllowed = "move";
70090
+ event.dataTransfer.setData("text/plain", draggingRowKeysRef.value.map(String).join(","));
70091
+ }
70092
+ applyDragImage(event);
70093
+ }
70094
+ function handleRowDragOver(event, rowKey) {
70095
+ if (!draggableColumnRef.value) return;
70096
+ if (!draggingRowKeysRef.value.length) return;
70097
+ event.preventDefault();
70098
+ if (event.dataTransfer) {
70099
+ event.dataTransfer.dropEffect = "move";
70100
+ }
70101
+ if (draggingRowKeySetRef.value.has(rowKey)) {
70102
+ resetDropState();
70103
+ return;
70104
+ }
70105
+ const target = event.currentTarget;
70106
+ if (!target) return;
70107
+ const rect = target.getBoundingClientRect();
70108
+ const offset = event.clientY - rect.top;
70109
+ const position = offset < rect.height / DROP_HALF_DIVISOR ? "before" : "after";
70110
+ droppingRowKeyRef.value = rowKey;
70111
+ droppingPositionRef.value = position;
70112
+ }
70113
+ function handleRowDragLeave(event, rowKey) {
70114
+ if (droppingRowKeyRef.value !== rowKey) return;
70115
+ const related = event.relatedTarget;
70116
+ const current = event.currentTarget;
70117
+ if (related && current && current.contains(related)) {
70118
+ return;
70119
+ }
70120
+ resetDropState();
70121
+ }
70122
+ function handleRowDragEnd() {
70123
+ draggingRowKeysRef.value = [];
70124
+ resetDropState();
70125
+ }
70126
+ function readOrder(row, orderKey) {
70127
+ const value = row?.[orderKey];
70128
+ return typeof value === "number" ? value : Number(value) || FALLBACK_ORDER;
70129
+ }
70130
+ function computeNewOrders(draggedKeys, dropIndex, position, orderKey) {
70131
+ const rows = paginatedDataRef.value;
70132
+ if (!rows.length) return null;
70133
+ const draggedSet = new Set(draggedKeys);
70134
+ const draggedIndexes = rows.map((node, index) => draggedSet.has(node.key) ? index : -1).filter(index => index >= 0);
70135
+ if (!draggedIndexes.length) return null;
70136
+ const filtered = rows.filter(node => !draggedSet.has(node.key));
70137
+ const targetIndex = position === "before" ? dropIndex : dropIndex + 1;
70138
+ const removedBefore = draggedIndexes.filter(index => index < targetIndex).length;
70139
+ const insertAt = Math.max(0, targetIndex - removedBefore);
70140
+ const prev = filtered[insertAt - 1]?.rawNode;
70141
+ const next = filtered[insertAt]?.rawNode;
70142
+ const draggedCount = draggedKeys.length;
70143
+ const orders = [];
70144
+ if (prev && next) {
70145
+ const prevOrder = readOrder(prev, orderKey);
70146
+ const nextOrder = readOrder(next, orderKey);
70147
+ const step = (nextOrder - prevOrder) / (draggedCount + DROP_STEP_BIAS);
70148
+ for (let index = 0; index < draggedCount; index++) {
70149
+ orders.push(prevOrder + step * (index + DROP_STEP_BIAS));
70150
+ }
70151
+ } else if (!prev && next) {
70152
+ const nextOrder = readOrder(next, orderKey);
70153
+ for (let index = 0; index < draggedCount; index++) {
70154
+ orders.push(nextOrder - (draggedCount - index));
70155
+ }
70156
+ } else if (prev && !next) {
70157
+ const prevOrder = readOrder(prev, orderKey);
70158
+ for (let index = 0; index < draggedCount; index++) {
70159
+ orders.push(prevOrder + (index + DROP_STEP_BIAS));
70160
+ }
70161
+ } else {
70162
+ for (const key of draggedKeys) {
70163
+ const row = rows.find(node => node.key === key)?.rawNode;
70164
+ orders.push(readOrder(row, orderKey));
70165
+ }
70166
+ }
70167
+ return orders;
70168
+ }
70169
+ function handleRowDrop(event, rowKey) {
70170
+ event.preventDefault();
70171
+ const column = draggableColumnRef.value;
70172
+ const draggedKeys = draggingRowKeysRef.value;
70173
+ const position = droppingPositionRef.value;
70174
+ if (!column || !draggedKeys.length || position === null || draggingRowKeySetRef.value.has(rowKey)) {
70175
+ handleRowDragEnd();
70176
+ return;
70177
+ }
70178
+ const rows = paginatedDataRef.value;
70179
+ const dropIndex = rows.findIndex(node => node.key === rowKey);
70180
+ if (dropIndex < 0) {
70181
+ handleRowDragEnd();
70182
+ return;
70183
+ }
70184
+ const orderKey = column.key;
70185
+ const newOrders = computeNewOrders(draggedKeys, dropIndex, position, orderKey);
70186
+ const dispatchPlan = draggedKeys.map((key, index) => {
70187
+ const row = rows.find(node => node.key === key)?.rawNode;
70188
+ return row ? {
70189
+ row,
70190
+ oldOrder: readOrder(row, orderKey),
70191
+ newOrder: newOrders ? newOrders[index] : readOrder(row, orderKey)
70192
+ } : null;
70193
+ });
70194
+ const targetIndex = position === "before" ? dropIndex : dropIndex + 1;
70195
+ const draggedSet = draggingRowKeySetRef.value;
70196
+ const draggedIndexes = rows.map((node, index) => draggedSet.has(node.key) ? index : -1).filter(index => index >= 0);
70197
+ const removedBefore = draggedIndexes.filter(index => index < targetIndex).length;
70198
+ const baseIndex = Math.max(0, targetIndex - removedBefore);
70199
+ handleRowDragEnd();
70200
+ if (!newOrders) return;
70201
+ dispatchPlan.forEach((entry, index) => {
70202
+ if (!entry) return;
70203
+ column.onDragEnd?.(entry.row, {
70204
+ index: baseIndex + index,
70205
+ oldOrder: entry.oldOrder,
70206
+ newOrder: entry.newOrder
70207
+ });
70208
+ });
70209
+ }
70210
+ return {
70211
+ draggableColumnRef,
70212
+ draggingRowKeySetRef,
70213
+ droppingRowKeyRef,
70214
+ droppingPositionRef,
70215
+ handleRowDragStart,
70216
+ handleRowDragOver,
70217
+ handleRowDragLeave,
70218
+ handleRowDragEnd,
70219
+ handleRowDrop
70220
+ };
70221
+ }
70222
+
69756
70223
  function useScroll(props, {
69757
70224
  mainTableInstRef,
69758
70225
  mergedCurrentPageRef,
@@ -70018,7 +70485,7 @@ function useSorter(props, {
70018
70485
  });
70019
70486
  const uncontrolledSortStateRef = ref(defaultSortState);
70020
70487
  const mergedSortStateRef = computed(() => {
70021
- const columnsWithControlledSortOrder = dataRelatedColsRef.value.filter(column => column.type !== "selection" && column.sorter !== void 0 && (column.sortOrder === "ascend" || column.sortOrder === "descend" || column.sortOrder === false));
70488
+ 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));
70022
70489
  const columnToSort = columnsWithControlledSortOrder.filter(col => col.sortOrder !== false);
70023
70490
  if (columnToSort.length) {
70024
70491
  return columnToSort.map(column => {
@@ -70072,6 +70539,18 @@ function useSorter(props, {
70072
70539
  return compareResult;
70073
70540
  });
70074
70541
  }
70542
+ const draggableColumn = dataRelatedColsRef.value.find(column => column.type === "draggable" && column.sortByKey !== false);
70543
+ if (draggableColumn) {
70544
+ const orderKey = draggableColumn.key;
70545
+ return filteredDataRef.value.slice().sort((tmNode1, tmNode2) => {
70546
+ const order1 = tmNode1.rawNode[orderKey];
70547
+ const order2 = tmNode2.rawNode[orderKey];
70548
+ if (typeof order1 === "number" && typeof order2 === "number") {
70549
+ return order1 - order2;
70550
+ }
70551
+ return 0;
70552
+ });
70553
+ }
70075
70554
  return filteredDataRef.value;
70076
70555
  });
70077
70556
  function getUpdatedSorterState(sortState) {
@@ -70110,7 +70589,7 @@ function useSorter(props, {
70110
70589
  if (!columnKey) {
70111
70590
  clearSorter();
70112
70591
  } else {
70113
- const columnToSort = dataRelatedColsRef.value.find(column => column.type !== "selection" && column.type !== "expand" && column.key === columnKey);
70592
+ const columnToSort = dataRelatedColsRef.value.find(column => column.type !== "selection" && column.type !== "expand" && column.type !== "draggable" && column.key === columnKey);
70114
70593
  if (!columnToSort?.sorter) return;
70115
70594
  const sorter = columnToSort.sorter;
70116
70595
  deriveNextSorter({
@@ -70202,7 +70681,9 @@ function useTableData(props, {
70202
70681
  });
70203
70682
  const controlledFilterState = {};
70204
70683
  columnsWithControlledFilter.forEach(column => {
70205
- if (column.type === "selection" || column.type === "expand") return;
70684
+ if (column.type === "selection" || column.type === "expand" || column.type === "draggable") {
70685
+ return;
70686
+ }
70206
70687
  if (column.filterOptionValues === void 0) {
70207
70688
  controlledFilterState[column.key] = column.filterOptionValue ?? null;
70208
70689
  } else {
@@ -70227,7 +70708,7 @@ function useTableData(props, {
70227
70708
  } = treeMateRef;
70228
70709
  const columnEntries = [];
70229
70710
  columns.forEach(column => {
70230
- if (column.type === "selection" || column.type === "expand" || "children" in column) {
70711
+ if (column.type === "selection" || column.type === "expand" || column.type === "draggable" || "children" in column) {
70231
70712
  return;
70232
70713
  }
70233
70714
  columnEntries.push([column.key, column]);
@@ -70504,7 +70985,7 @@ function restoreSortStateFromStored(stored, dataRelatedCols) {
70504
70985
  if (!stored?.length) return null;
70505
70986
  const result = [];
70506
70987
  for (const item of stored) {
70507
- const column = dataRelatedCols.find(col => col.type !== "selection" && col.type !== "expand" && "key" in col && col.key === item.columnKey && col.sorter !== void 0);
70988
+ 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);
70508
70989
  if (column?.sorter) {
70509
70990
  result.push({
70510
70991
  columnKey: item.columnKey,
@@ -70650,6 +71131,21 @@ var _UDataTable = defineComponent({
70650
71131
  expandableRef,
70651
71132
  doUpdateExpandedRowKeys
70652
71133
  } = useExpand(props, treeMateRef);
71134
+ const {
71135
+ draggableColumnRef,
71136
+ draggingRowKeySetRef,
71137
+ droppingRowKeyRef,
71138
+ droppingPositionRef,
71139
+ handleRowDragStart,
71140
+ handleRowDragOver,
71141
+ handleRowDragLeave,
71142
+ handleRowDragEnd,
71143
+ handleRowDrop
71144
+ } = useRowDrag(props, {
71145
+ paginatedDataRef,
71146
+ mergedCheckedRowKeySetRef,
71147
+ mergedClsPrefixRef
71148
+ });
70653
71149
  const {
70654
71150
  handleTableBodyScroll,
70655
71151
  handleTableHeaderScroll,
@@ -71091,6 +71587,15 @@ var _UDataTable = defineComponent({
71091
71587
  "--u-action-divider-color": actionDividerColor
71092
71588
  };
71093
71589
  }),
71590
+ draggableColumnRef,
71591
+ draggingRowKeySetRef,
71592
+ droppingRowKeyRef,
71593
+ droppingPositionRef,
71594
+ handleRowDragStart,
71595
+ handleRowDragOver,
71596
+ handleRowDragLeave,
71597
+ handleRowDragEnd,
71598
+ handleRowDrop,
71094
71599
  onLoadRef: toRef(props, "onLoad"),
71095
71600
  mergedTableLayoutRef,
71096
71601
  resizableEnabledRef,
@@ -71166,6 +71671,9 @@ var _UDataTable = defineComponent({
71166
71671
  thButtonColorHover,
71167
71672
  thIconColor,
71168
71673
  thIconColorActive,
71674
+ dropMarkColor,
71675
+ dragGhostOpacity,
71676
+ dragGhostFilter,
71169
71677
  filterSize,
71170
71678
  borderRadius,
71171
71679
  lineHeight,
@@ -71234,6 +71742,9 @@ var _UDataTable = defineComponent({
71234
71742
  "--u-th-button-color-hover": thButtonColorHover,
71235
71743
  "--u-th-icon-color": thIconColor,
71236
71744
  "--u-th-icon-color-active": thIconColorActive,
71745
+ "--u-drop-mark-color": dropMarkColor,
71746
+ "--u-drag-ghost-opacity": dragGhostOpacity,
71747
+ "--u-drag-ghost-filter": dragGhostFilter,
71237
71748
  "--u-filter-size": filterSize,
71238
71749
  "--u-pagination-margin": paginationMargin,
71239
71750
  "--u-empty-padding": emptyPadding,
@@ -80200,7 +80711,7 @@ var _UDescriptions = defineComponent({
80200
80711
  },
80201
80712
  render() {
80202
80713
  const defaultSlots = this.$slots.default;
80203
- const children = defaultSlots ? flatten$2(defaultSlots()) : [];
80714
+ const children = defaultSlots ? flatten$1(defaultSlots()) : [];
80204
80715
  const memorizedLength = children.length;
80205
80716
  const {
80206
80717
  contentClass,
@@ -83860,7 +84371,7 @@ var USpace$1 = defineComponent({
83860
84371
  wrapItem,
83861
84372
  internalUseGap
83862
84373
  } = this;
83863
- const children = flatten$2(getSlot(this), false);
84374
+ const children = flatten$1(getSlot(this), false);
83864
84375
  if (!children.length)
83865
84376
  return null;
83866
84377
  const horizontalMargin = `${margin.horizontal}px`;
@@ -95381,6 +95892,10 @@ const mappingCardInjectionKey = createInjectionKey("u-mapping-card");
95381
95892
  const mappingCardProps = {
95382
95893
  title: [String, Function],
95383
95894
  description: [String, Function],
95895
+ subTitle: [String, Function],
95896
+ subDescription: [String, Function],
95897
+ headerInfo: Function,
95898
+ headerSubInfo: Function,
95384
95899
  rows: Array,
95385
95900
  cols: {
95386
95901
  type: Number,
@@ -95999,6 +96514,26 @@ var MappingCardHeader = defineComponent({
95999
96514
  const theme = mergedThemeRef.value;
96000
96515
  const locale = localeRef.value;
96001
96516
  const renderTextProp = (value) => typeof value === "function" ? value() : value;
96517
+ const renderInfoText = (title, description) => {
96518
+ if (!title && !description)
96519
+ return null;
96520
+ return /* @__PURE__ */ h("div", { class: `${prefix}-mapping-card__header-info-text` }, title && /* @__PURE__ */ h("div", { class: `${prefix}-mapping-card__header-title` }, renderTextProp(title)), description && /* @__PURE__ */ h("div", { class: `${prefix}-mapping-card__header-description` }, renderTextProp(description)));
96521
+ };
96522
+ const mainInfo = resolveSlot(slots.headerInfo, () => {
96523
+ const fromProp = props.headerInfo?.();
96524
+ if (fromProp)
96525
+ return [fromProp];
96526
+ const fallback = renderInfoText(props.title, props.description);
96527
+ return fallback ? [fallback] : [];
96528
+ });
96529
+ const subInfo = resolveSlot(slots.headerSubInfo, () => {
96530
+ const fromProp = props.headerSubInfo?.();
96531
+ if (fromProp)
96532
+ return [fromProp];
96533
+ const fallback = renderInfoText(props.subTitle, props.subDescription);
96534
+ return fallback ? [fallback] : [];
96535
+ });
96536
+ const hasSubInfo = subInfo.length > 0;
96002
96537
  return /* @__PURE__ */ h("div", { class: `${prefix}-mapping-card__header` }, /* @__PURE__ */ h(
96003
96538
  _UFlex,
96004
96539
  {
@@ -96007,7 +96542,7 @@ var MappingCardHeader = defineComponent({
96007
96542
  class: `${prefix}-mapping-card__header-info`
96008
96543
  },
96009
96544
  {
96010
- default: () => /* @__PURE__ */ h(Fragment, null, /* @__PURE__ */ h("div", { class: `${prefix}-mapping-card__header-info-text` }, /* @__PURE__ */ h("div", { class: `${prefix}-mapping-card__header-title` }, renderTextProp(props.title)), props.description && /* @__PURE__ */ h("div", { class: `${prefix}-mapping-card__header-description` }, renderTextProp(props.description))), !props.hideCopy && /* @__PURE__ */ h(_UTooltip, null, {
96545
+ default: () => /* @__PURE__ */ h(Fragment, null, mainInfo, !props.hideCopy && /* @__PURE__ */ h(_UTooltip, null, {
96011
96546
  trigger: () => /* @__PURE__ */ h(
96012
96547
  Button,
96013
96548
  {
@@ -96031,7 +96566,7 @@ var MappingCardHeader = defineComponent({
96031
96566
  }
96032
96567
  ),
96033
96568
  default: () => locale.copyTooltip
96034
- }))
96569
+ }), hasSubInfo && /* @__PURE__ */ h("div", { class: `${prefix}-mapping-card__header-info-divider` }), hasSubInfo && subInfo)
96035
96570
  }
96036
96571
  ), !props.hideHeaderActions && /* @__PURE__ */ h(_UFlex, { align: "center", size: "small" }, {
96037
96572
  default: () => resolveSlot(slots.headerActions, () => {
@@ -96044,7 +96579,7 @@ var MappingCardHeader = defineComponent({
96044
96579
  ...props.headerSwitchProps ?? {},
96045
96580
  theme: theme.peers.Switch,
96046
96581
  themeOverrides: theme.peerOverrides.Switch,
96047
- onUpdateValue: (val) => props.onSwitchChange?.(val)
96582
+ onUpdateValue: (value) => props.onSwitchChange?.(value)
96048
96583
  }
96049
96584
  ),
96050
96585
  default: () => locale.switchTooltip
@@ -96113,85 +96648,92 @@ var MappingCardHeader = defineComponent({
96113
96648
  });
96114
96649
 
96115
96650
  var style$o = c$1([cB("mapping-card", `
96116
- background-color: var(--u-background-color);
96117
- border: 1px solid var(--u-border-color);
96118
- border-radius: var(--u-border-radius);
96119
- overflow: hidden;
96120
- box-sizing: border-box;
96121
- `, [cE("header", `
96122
- padding: var(--u-header-padding);
96123
- display: flex;
96124
- align-items: center;
96125
- justify-content: space-between;
96126
- gap: 8px;
96127
- position: relative;
96128
- `, [c$1("&::after", `
96129
- content: '';
96130
- position: absolute;
96131
- left: 24px;
96132
- right: 24px;
96133
- bottom: 0;
96134
- height: 1px;
96651
+ background-color: var(--u-background-color);
96652
+ border: 1px solid var(--u-border-color);
96653
+ border-radius: var(--u-border-radius);
96654
+ overflow: hidden;
96655
+ box-sizing: border-box;
96656
+ `, [cE("header", `
96657
+ padding: var(--u-header-padding);
96658
+ display: flex;
96659
+ align-items: center;
96660
+ justify-content: space-between;
96661
+ gap: 8px;
96662
+ position: relative;
96663
+ `, [c$1("&::after", `
96664
+ content: '';
96665
+ position: absolute;
96666
+ left: 24px;
96667
+ right: 24px;
96668
+ bottom: 0;
96669
+ height: 1px;
96670
+ background: var(--u-border-color);
96671
+ `)]), cE("header-info", `
96672
+ min-width: 0;
96673
+ `), cE("header-info-text", `
96674
+ min-width: 0;
96675
+ margin-right: 12px;
96676
+ `), cE("header-title", `
96677
+ color: var(--u-title-color);
96678
+ `), cE("header-description", `
96679
+ color: var(--u-description-color);
96680
+ margin-top: 2px;
96681
+ `), cE("header-info-divider", `
96682
+ margin-right: 12px;
96683
+ width: 1px;
96684
+ align-self: stretch;
96135
96685
  background: var(--u-border-color);
96136
- `)]), cE("header-info", `
96137
- min-width: 0;
96138
- `), cE("header-info-text", `
96139
- min-width: 0;
96140
- `), cE("header-title", `
96141
- color: var(--u-title-color);
96142
- `), cE("header-description", `
96143
- color: var(--u-description-color);
96144
- margin-top: 2px;
96145
- `), cE("body", `
96146
- display: flex;
96147
- padding: var(--u-body-padding);
96148
- `), cE("body-group", `
96149
- flex: 1;
96150
- position: relative;
96151
- `, [c$1("&:last-child", `
96152
- padding: 0 0 12px 20px;
96153
- `), c$1("&:first-child", `
96154
- padding: 0 20px 12px 0;
96155
- `), c$1("&:only-child", `
96156
- padding: 0 0 12px 0;
96157
- `), c$1("&::after", `
96158
- content: '';
96686
+ flex-shrink: 0;
96687
+ `), cE("body", `
96688
+ display: flex;
96689
+ padding: var(--u-body-padding);
96690
+ `), cE("body-group", `
96691
+ flex: 1;
96692
+ position: relative;
96693
+ `, [c$1("&:last-child", `
96694
+ padding: 0 0 12px 20px;
96695
+ `), c$1("&:first-child", `
96696
+ padding: 0 20px 12px 0;
96697
+ `), c$1("&:only-child", `
96698
+ padding: 0 0 12px 0;
96699
+ `), c$1("&::after", `
96700
+ content: '';
96701
+ position: absolute;
96702
+ right: 0;
96703
+ top: 0;
96704
+ width: 1px;
96705
+ height: calc(100% - 12px);
96706
+ background: var(--u-border-color);
96707
+ `), c$1("&:last-child::after", `
96708
+ display: none;
96709
+ `)]), cE("body-items", `
96710
+ align-items: center;
96711
+ `), cE("body-item", [cM("text", `
96712
+ padding: 0 24px;
96713
+ `)]), cE("body-group-icon", `
96159
96714
  position: absolute;
96160
96715
  right: 0;
96161
- top: 0;
96162
- width: 1px;
96163
- height: calc(100% - 12px);
96164
- background: var(--u-border-color);
96165
- `), c$1("&:last-child::after", `
96166
- display: none;
96167
- `)]), cE("body-items", `
96168
- align-items: center;
96169
- `), cE("body-item", [cM("text", `
96170
- padding: 0 24px;
96171
- `)]), cE("body-group-icon", `
96172
- position: absolute;
96173
- right: 0;
96174
- top: 50%;
96175
- transform: translate(50%, -50%);
96176
- z-index: 1;
96177
- display: flex;
96178
- align-items: center;
96179
- height: 44px;
96180
- width: 44px;
96181
- border-radius: 100px;
96182
- justify-content: center;
96183
- background-color: var(--u-divider-background-color);
96184
- `), cE("side", `
96185
- flex: 1;
96186
- min-width: 0;
96187
- `), cE("arrow", `
96188
- display: flex;
96189
- align-items: center;
96190
- padding-top: 32px;
96191
- color: var(--u-arrow-color);
96192
- font-size: 16px;
96193
- flex-shrink: 0;
96194
- `)]), cB("mapping-card-list", `
96716
+ top: 50%;
96717
+ transform: translate(50%, -50%);
96718
+ z-index: 1;
96719
+ display: flex;
96720
+ align-items: center;
96721
+ height: 44px;
96722
+ width: 44px;
96723
+ border-radius: 100px;
96724
+ justify-content: center;
96725
+ background-color: var(--u-divider-background-color);
96726
+ `), cE("side", `
96727
+ flex: 1;
96728
+ min-width: 0;
96729
+ `), cE("arrow", `
96730
+ display: flex;
96731
+ align-items: center;
96732
+ padding-top: 32px;
96733
+ color: var(--u-arrow-color);
96734
+ font-size: 16px;
96735
+ flex-shrink: 0;
96736
+ `)]), cB("mapping-card-list", `
96195
96737
  display: flex;
96196
96738
  justify-content: space-between;
96197
96739
  flex-direction: column;
@@ -96268,7 +96810,11 @@ var _UMappingCard = defineComponent({
96268
96810
  class: [`${this.mergedClsPrefix}-mapping-card`, themeClass],
96269
96811
  style: cssVars
96270
96812
  },
96271
- /* @__PURE__ */ h(MappingCardHeader, null, { headerActions: this.$slots.headerActions }),
96813
+ /* @__PURE__ */ h(MappingCardHeader, null, {
96814
+ headerActions: this.$slots.headerActions,
96815
+ headerInfo: this.$slots.headerInfo,
96816
+ headerSubInfo: this.$slots.headerSubInfo
96817
+ }),
96272
96818
  /* @__PURE__ */ h(MappingCardBody, null)
96273
96819
  );
96274
96820
  }
@@ -103657,7 +104203,7 @@ var _USteps = defineComponent({
103657
104203
  (variantConfigs[this.variant]?.vertical ?? this.vertical) && `${mergedClsPrefix}-steps--vertical`
103658
104204
  ]
103659
104205
  },
103660
- stepsWithIndex(flatten$2(getSlot(this)))
104206
+ stepsWithIndex(flatten$1(getSlot(this)))
103661
104207
  );
103662
104208
  }
103663
104209
  });
@@ -104839,7 +105385,7 @@ var _UTabs = defineComponent({
104839
105385
  });
104840
105386
  const compitableValueRef = useCompitable(props, ["activeName", "value"]);
104841
105387
  const uncontrolledValueRef = ref(
104842
- compitableValueRef.value ?? props.defaultValue ?? (slots.default ? flatten$2(slots.default())[0]?.props?.name : null)
105388
+ compitableValueRef.value ?? props.defaultValue ?? (slots.default ? flatten$1(slots.default())[0]?.props?.name : null)
104843
105389
  );
104844
105390
  const mergedValueRef = useMergedState(
104845
105391
  compitableValueRef,
@@ -105334,10 +105880,10 @@ var _UTabs = defineComponent({
105334
105880
  $slots: { default: defaultSlot, prefix: prefixSlot, suffix: suffixSlot }
105335
105881
  } = this;
105336
105882
  onRender?.();
105337
- const tabPaneChildren = defaultSlot ? flatten$2(defaultSlot()).filter((v) => {
105883
+ const tabPaneChildren = defaultSlot ? flatten$1(defaultSlot()).filter((v) => {
105338
105884
  return v.type.name === "TabPane";
105339
105885
  }) : [];
105340
- const tabChildren = defaultSlot ? flatten$2(defaultSlot()).filter((v) => {
105886
+ const tabChildren = defaultSlot ? flatten$1(defaultSlot()).filter((v) => {
105341
105887
  return v.type.name === "Tab";
105342
105888
  }) : [];
105343
105889
  const showPane = !tabChildren.length;
@@ -108939,7 +109485,7 @@ var _UTree = defineComponent({
108939
109485
  if (~expandedNodeIndex) {
108940
109486
  const children = afNodesRef.value[expandedNodeIndex].children;
108941
109487
  if (children) {
108942
- const expandedChildren = flatten$1(children, value);
109488
+ const expandedChildren = flatten(children, value);
108943
109489
  afNodesRef.value.splice(expandedNodeIndex + 1, 0, {
108944
109490
  __motion: true,
108945
109491
  mode: "expand",
@@ -108958,7 +109504,7 @@ var _UTree = defineComponent({
108958
109504
  if (!collapsedNodeChildren)
108959
109505
  return;
108960
109506
  aipRef.value = true;
108961
- const collapsedChildren = flatten$1(collapsedNodeChildren, value);
109507
+ const collapsedChildren = flatten(collapsedNodeChildren, value);
108962
109508
  afNodesRef.value.splice(collapsedNodeIndex + 1, 0, {
108963
109509
  __motion: true,
108964
109510
  mode: "collapse",
@@ -112623,7 +113169,7 @@ function useThemeVars() {
112623
113169
  });
112624
113170
  }
112625
113171
 
112626
- var version = "2.0.4";
113172
+ var version = "2.0.6";
112627
113173
 
112628
113174
  function create({
112629
113175
  componentPrefix = "U",