@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
@@ -1,106 +1,19 @@
1
- var __rest = this && this.__rest || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
4
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
5
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
6
- }
7
- return t;
8
- };
9
- import { depx, pxfy, repeat } from 'seemly';
1
+ import { depx, pxfy } from 'seemly';
10
2
  import { useMemo } from 'vooks';
11
3
  import { computed, defineComponent, Fragment, h, inject, onUnmounted, ref, watchEffect } from 'vue';
12
4
  import { VirtualList, VResizeObserver } from 'vueuc';
13
5
  import { UScrollbar } from "../../../_internal/index.mjs";
14
6
  import { cssrAnchorMetaName } from "../../../_mixins/common.mjs";
15
- import { formatLength, resolveSlot, warn } from "../../../_utils/index.mjs";
7
+ import { formatLength, warn } from "../../../_utils/index.mjs";
16
8
  import { c } from "../../../_utils/cssr/index.mjs";
17
9
  import { configProviderInjectionKey } from "../../../config-provider/src/context.mjs";
18
- import { UEmpty } from "../../../empty/index.mjs";
19
10
  import { dataTableInjectionKey } from "../interface.mjs";
20
- import { createRowClassName, getColKey, isColumnSorting } from "../utils/index.mjs";
21
- import RenderSafeCheckbox from "./BodyCheckbox.mjs";
22
- import RenderSafeRadio from "./BodyRadio.mjs";
11
+ import { flattenExpandedRows } from "../utils/index.mjs";
12
+ import { renderBodyEmpty } from "./BodyEmpty.mjs";
13
+ import { renderBodyRow } from "./BodyRow.mjs";
23
14
  import BodySkeleton from "./BodySkeleton.mjs";
24
- import Cell from "./Cell.mjs";
25
- import ExpandTrigger from "./ExpandTrigger.mjs";
26
15
  import TableHeader from "./Header.mjs";
27
- function flatten(rowInfos, expandedRowKeys) {
28
- const fRows = [];
29
- function traverse(rs, rootIndex) {
30
- rs.forEach(r => {
31
- if (r.children && expandedRowKeys.has(r.key)) {
32
- fRows.push({
33
- tmNode: r,
34
- striped: false,
35
- key: r.key,
36
- index: rootIndex
37
- });
38
- traverse(r.children, rootIndex);
39
- } else {
40
- fRows.push({
41
- key: r.key,
42
- tmNode: r,
43
- striped: false,
44
- index: rootIndex
45
- });
46
- }
47
- });
48
- }
49
- rowInfos.forEach(rowInfo => {
50
- fRows.push(rowInfo);
51
- const {
52
- children
53
- } = rowInfo.tmNode;
54
- if (children && expandedRowKeys.has(rowInfo.key)) {
55
- traverse(children, rowInfo.index);
56
- }
57
- });
58
- return fRows;
59
- }
60
- const VirtualListItemWrapper = defineComponent({
61
- props: {
62
- clsPrefix: {
63
- type: String,
64
- required: true
65
- },
66
- id: {
67
- type: String,
68
- required: true
69
- },
70
- cols: {
71
- type: Array,
72
- required: true
73
- },
74
- tableWidth: String,
75
- onMouseenter: Function,
76
- onMouseleave: Function
77
- },
78
- render() {
79
- const {
80
- clsPrefix,
81
- id,
82
- cols,
83
- tableWidth,
84
- onMouseenter,
85
- onMouseleave
86
- } = this;
87
- return h("table", {
88
- style: {
89
- tableLayout: 'fixed',
90
- width: tableWidth
91
- },
92
- class: `${clsPrefix}-data-table-table`,
93
- onMouseenter: onMouseenter,
94
- onMouseleave: onMouseleave
95
- }, h("colgroup", null, cols.map(col => h("col", {
96
- key: col.key,
97
- style: col.style
98
- }))), h("tbody", {
99
- "data-u-id": id,
100
- class: `${clsPrefix}-data-table-tbody`
101
- }, this.$slots));
102
- }
103
- });
16
+ import VirtualListItemWrapper from "./VirtualListItemWrapper.mjs";
104
17
  export default defineComponent({
105
18
  name: 'DataTableBody',
106
19
  emits: ['edit'],
@@ -160,7 +73,16 @@ export default defineComponent({
160
73
  doUncheck,
161
74
  renderCell,
162
75
  defaultEmptyValueRef,
163
- emptyPropsRef
76
+ emptyPropsRef,
77
+ draggableColumnRef,
78
+ draggingRowKeySetRef,
79
+ droppingRowKeyRef,
80
+ droppingPositionRef,
81
+ handleRowDragStart,
82
+ handleRowDragOver,
83
+ handleRowDragLeave,
84
+ handleRowDragEnd,
85
+ handleRowDrop
164
86
  } = inject(dataTableInjectionKey);
165
87
  const UConfigProvider = inject(configProviderInjectionKey, null);
166
88
  const scrollbarInstRef = ref(null);
@@ -467,7 +389,16 @@ export default defineComponent({
467
389
  handleUpdateExpanded,
468
390
  renderCell,
469
391
  defaultEmptyValueRef,
470
- emptyPropsRef
392
+ emptyPropsRef,
393
+ draggableColumn: draggableColumnRef,
394
+ draggingRowKeySet: draggingRowKeySetRef,
395
+ droppingRowKey: droppingRowKeyRef,
396
+ droppingPosition: droppingPositionRef,
397
+ handleRowDragStart,
398
+ handleRowDragOver,
399
+ handleRowDragLeave,
400
+ handleRowDragEnd,
401
+ handleRowDrop
471
402
  }, exposedMethods);
472
403
  },
473
404
  render() {
@@ -554,7 +485,7 @@ export default defineComponent({
554
485
  data: paginatedData,
555
486
  hasChildren
556
487
  } = paginatedDataAndInfo;
557
- const mergedPaginationData = hasChildren ? flatten(paginatedData, mergedExpandedRowKeySet) : paginatedData;
488
+ const mergedPaginationData = hasChildren ? flattenExpandedRows(paginatedData, mergedExpandedRowKeySet) : paginatedData;
558
489
  if (summary) {
559
490
  const summaryRows = summary(this.rawPaginatedData);
560
491
  if (Array.isArray(summaryRows)) {
@@ -612,177 +543,54 @@ export default defineComponent({
612
543
  });
613
544
  const bodyWidth = stickyExpandedRows ? this.bodyWidth : null;
614
545
  const bodyWidthPx = bodyWidth === null ? undefined : `${bodyWidth}px`;
615
- const renderRow = (rowInfo, displayedRowIndex, isVirtual) => {
616
- const {
617
- index: actualRowIndex
618
- } = rowInfo;
619
- if ('isExpandedRow' in rowInfo) {
620
- const {
621
- tmNode: {
622
- key,
623
- rawNode
624
- }
625
- } = rowInfo;
626
- return h("tr", {
627
- class: `${mergedClsPrefix}-data-table-tr ${mergedClsPrefix}-data-table-tr--expanded`,
628
- key: `${key}__expand`
629
- }, h("td", {
630
- class: [`${mergedClsPrefix}-data-table-td`, `${mergedClsPrefix}-data-table-td--last-col`, displayedRowIndex + 1 === rowCount && `${mergedClsPrefix}-data-table-td--last-row`],
631
- colspan: colCount
632
- }, stickyExpandedRows ? h("div", {
633
- class: `${mergedClsPrefix}-data-table-expand`,
634
- style: {
635
- width: bodyWidthPx
636
- }
637
- }, renderExpand(rawNode, actualRowIndex)) : renderExpand(rawNode, actualRowIndex)));
546
+ const renderContext = {
547
+ mergedClsPrefix,
548
+ cols,
549
+ colCount,
550
+ rowCount,
551
+ hasChildren,
552
+ childTriggerColIndex,
553
+ indentStyle,
554
+ rowClassName,
555
+ rowProps,
556
+ mergedSortState,
557
+ mergedExpandedRowKeySet,
558
+ fixedColumnLeftMap,
559
+ fixedColumnRightMap,
560
+ currentPage,
561
+ loadingKeySet,
562
+ stickyExpandedRows,
563
+ bodyWidthPx,
564
+ renderExpand,
565
+ renderExpandIcon: this.renderExpandIcon,
566
+ renderCell: this.renderCell,
567
+ defaultEmptyValue: this.defaultEmptyValueRef,
568
+ mergedTheme,
569
+ rowIndexToKey,
570
+ cordToPass,
571
+ cordKey,
572
+ draggableColumn: this.draggableColumn,
573
+ droppingRowKey: this.droppingRowKey,
574
+ droppingPosition: this.droppingPosition,
575
+ draggingRowKeySet: this.draggingRowKeySet,
576
+ hoverKey: this.hoverKey,
577
+ dataTableSlots: this.dataTableSlots,
578
+ setHoverKey: key => {
579
+ this.hoverKey = key;
580
+ },
581
+ handleCheckboxUpdateChecked,
582
+ handleRadioUpdateChecked,
583
+ handleUpdateExpanded,
584
+ handleRowDragStart: this.handleRowDragStart,
585
+ handleRowDragOver: this.handleRowDragOver,
586
+ handleRowDragLeave: this.handleRowDragLeave,
587
+ handleRowDragEnd: this.handleRowDragEnd,
588
+ handleRowDrop: this.handleRowDrop,
589
+ emitEdit: (value, row, key) => {
590
+ this.$emit('edit', value, row, key);
638
591
  }
639
- const isSummary = 'isSummaryRow' in rowInfo;
640
- const striped = !isSummary && rowInfo.striped;
641
- const {
642
- tmNode,
643
- key: rowKey
644
- } = rowInfo;
645
- const {
646
- rawNode: rowData
647
- } = tmNode;
648
- const expanded = mergedExpandedRowKeySet.has(rowKey);
649
- const props = rowProps ? rowProps(rowData, actualRowIndex) : undefined;
650
- const mergedRowClassName = typeof rowClassName === 'string' ? rowClassName : createRowClassName(rowData, actualRowIndex, rowClassName);
651
- const _a = props || {},
652
- {
653
- class: _class
654
- } = _a,
655
- restProps = __rest(_a, ["class"]);
656
- const row = h("tr", Object.assign({
657
- onMouseenter: () => {
658
- this.hoverKey = rowKey;
659
- },
660
- key: rowKey,
661
- class: [`${mergedClsPrefix}-data-table-tr`, rowInfo.tmNode.disabled && `${mergedClsPrefix}-data-table-tr--disabled`, isSummary && `${mergedClsPrefix}-data-table-tr--summary`, striped && `${mergedClsPrefix}-data-table-tr--striped`, expanded && `${mergedClsPrefix}-data-table-tr--expanded`, mergedRowClassName, _class]
662
- }, restProps), cols.map((col, colIndex) => {
663
- var _a, _b, _c, _d, _e;
664
- if (displayedRowIndex in cordToPass) {
665
- const cordOfRowToPass = cordToPass[displayedRowIndex];
666
- const indexInCordOfRowToPass = cordOfRowToPass.indexOf(colIndex);
667
- if (~indexInCordOfRowToPass) {
668
- cordOfRowToPass.splice(indexInCordOfRowToPass, 1);
669
- return null;
670
- }
671
- }
672
- // TODO: Simplify row calculation
673
- const {
674
- column
675
- } = col;
676
- const colKey = getColKey(col);
677
- const {
678
- rowSpan,
679
- colSpan
680
- } = column;
681
- const mergedColSpan = isSummary ? ((_a = rowInfo.tmNode.rawNode[colKey]) === null || _a === void 0 ? void 0 : _a.colSpan) || 1 // optional for #1276
682
- : colSpan ? colSpan(rowData, actualRowIndex) : 1;
683
- const mergedRowSpan = isSummary ? ((_b = rowInfo.tmNode.rawNode[colKey]) === null || _b === void 0 ? void 0 : _b.rowSpan) || 1 // optional for #1276
684
- : rowSpan ? rowSpan(rowData, actualRowIndex) : 1;
685
- const isLastCol = colIndex + mergedColSpan === colCount;
686
- const isLastRow = displayedRowIndex + mergedRowSpan === rowCount;
687
- const isCrossRowTd = mergedRowSpan > 1;
688
- if (isCrossRowTd) {
689
- cordKey[displayedRowIndex] = {
690
- [colIndex]: []
691
- };
692
- }
693
- if (mergedColSpan > 1 || isCrossRowTd) {
694
- for (let i = displayedRowIndex; i < displayedRowIndex + mergedRowSpan; ++i) {
695
- if (isCrossRowTd) {
696
- cordKey[displayedRowIndex][colIndex].push(rowIndexToKey[i]);
697
- }
698
- for (let j = colIndex; j < colIndex + mergedColSpan; ++j) {
699
- if (i === displayedRowIndex && j === colIndex) {
700
- continue;
701
- }
702
- if (!(i in cordToPass)) {
703
- cordToPass[i] = [j];
704
- } else {
705
- cordToPass[i].push(j);
706
- }
707
- }
708
- }
709
- }
710
- const hoverKey = isCrossRowTd ? this.hoverKey : null;
711
- const {
712
- cellProps
713
- } = column;
714
- const resolvedCellProps = cellProps === null || cellProps === void 0 ? void 0 : cellProps(rowData, actualRowIndex);
715
- const indentOffsetStyle = {
716
- '--indent-offset': ''
717
- };
718
- return h("td", Object.assign({}, resolvedCellProps, {
719
- key: colKey,
720
- style: [{
721
- textAlign: column.align || undefined,
722
- left: pxfy((_c = fixedColumnLeftMap[colKey]) === null || _c === void 0 ? void 0 : _c.start),
723
- right: pxfy((_d = fixedColumnRightMap[colKey]) === null || _d === void 0 ? void 0 : _d.start)
724
- }, indentOffsetStyle, (resolvedCellProps === null || resolvedCellProps === void 0 ? void 0 : resolvedCellProps.style) || ''],
725
- colspan: mergedColSpan,
726
- rowspan: isVirtual ? undefined : mergedRowSpan,
727
- "data-col-key": colKey,
728
- class: [`${mergedClsPrefix}-data-table-td`, column.className, resolvedCellProps === null || resolvedCellProps === void 0 ? void 0 : resolvedCellProps.class, isSummary && `${mergedClsPrefix}-data-table-td--summary`, (hoverKey !== null && cordKey[displayedRowIndex][colIndex].includes(hoverKey) || isColumnSorting(column, mergedSortState)) && `${mergedClsPrefix}-data-table-td--hover`, column.fixed && `${mergedClsPrefix}-data-table-td--fixed-${column.fixed}`, column.align && `${mergedClsPrefix}-data-table-td--${column.align}-align`, column.type === 'selection' && `${mergedClsPrefix}-data-table-td--selection`, column.type === 'expand' && `${mergedClsPrefix}-data-table-td--expand`, isLastCol && `${mergedClsPrefix}-data-table-td--last-col`, isLastRow && `${mergedClsPrefix}-data-table-td--last-row`, 'editable' in column && (typeof column.editable === 'function' ? column.editable(rowData) : column.editable) && !isSummary && `${mergedClsPrefix}-data-table-td--editable`]
729
- }), column.fixed && h("div", {
730
- class: `${mergedClsPrefix}-data-table-td__shadow-holder`
731
- }), hasChildren && colIndex === childTriggerColIndex ? [repeat(indentOffsetStyle['--indent-offset'] = isSummary ? 0 : rowInfo.tmNode.level, h("div", {
732
- class: `${mergedClsPrefix}-data-table-indent`,
733
- style: indentStyle
734
- })), isSummary || rowInfo.tmNode.isLeaf ? h("div", {
735
- class: `${mergedClsPrefix}-data-table-expand-placeholder`
736
- }) : h(ExpandTrigger, {
737
- class: `${mergedClsPrefix}-data-table-expand-trigger`,
738
- clsPrefix: mergedClsPrefix,
739
- expanded: expanded,
740
- renderExpandIcon: this.renderExpandIcon,
741
- loading: loadingKeySet.has(rowInfo.key),
742
- onClick: () => {
743
- handleUpdateExpanded(rowKey, rowInfo.tmNode);
744
- }
745
- })] : null, column.type === 'selection' ? !isSummary ? column.multiple === false ? h(RenderSafeRadio, {
746
- key: currentPage,
747
- rowKey: rowKey,
748
- disabled: rowInfo.tmNode.disabled,
749
- onClick: event => {
750
- event.stopPropagation();
751
- },
752
- onUpdateChecked: () => {
753
- handleRadioUpdateChecked(rowInfo.tmNode);
754
- }
755
- }) : h(RenderSafeCheckbox, {
756
- key: currentPage,
757
- rowKey: rowKey,
758
- disabled: rowInfo.tmNode.disabled,
759
- onUpdateChecked: (checked, event) => {
760
- event.stopPropagation();
761
- handleCheckboxUpdateChecked(rowInfo.tmNode, checked, event.shiftKey);
762
- }
763
- }) : null : column.type === 'expand' ? !isSummary ? !column.expandable || ((_e = column.expandable) === null || _e === void 0 ? void 0 : _e.call(column, rowData)) ? h(ExpandTrigger, {
764
- clsPrefix: mergedClsPrefix,
765
- expanded: expanded,
766
- renderExpandIcon: this.renderExpandIcon,
767
- onClick: () => {
768
- handleUpdateExpanded(rowKey, null);
769
- }
770
- }) : null : null : h(Cell, {
771
- clsPrefix: mergedClsPrefix,
772
- index: actualRowIndex,
773
- row: rowData,
774
- column: column,
775
- isSummary: isSummary,
776
- mergedTheme: mergedTheme,
777
- renderCell: this.renderCell,
778
- defaultEmptyValue: this.defaultEmptyValueRef,
779
- onEdit: (value, row, key) => {
780
- this.$emit('edit', value, row, key);
781
- }
782
- }));
783
- }));
784
- return row;
785
592
  };
593
+ const renderRow = (rowInfo, displayedRowIndex, isVirtual) => renderBodyRow(renderContext, rowInfo, displayedRowIndex, isVirtual);
786
594
  if (!virtualScroll) {
787
595
  return h("table", {
788
596
  class: `${mergedClsPrefix}-data-table-table`,
@@ -845,15 +653,14 @@ export default defineComponent({
845
653
  }
846
654
  });
847
655
  if (this.empty && !this.loadingSkeleton) {
848
- const createEmptyNode = () => h("div", {
849
- class: [`${mergedClsPrefix}-data-table-empty`, this.loading && `${mergedClsPrefix}-data-table-empty--hide`],
850
- style: this.bodyStyle,
851
- ref: "emptyElRef"
852
- }, resolveSlot(this.dataTableSlots.empty, () => [h(UEmpty, Object.assign({
853
- size: "large",
854
- theme: this.mergedTheme.peers.Empty,
855
- themeOverrides: this.mergedTheme.peerOverrides.Empty
856
- }, emptyPropsRef))]));
656
+ const createEmptyNode = () => renderBodyEmpty({
657
+ clsPrefix: mergedClsPrefix,
658
+ loading: this.loading,
659
+ bodyStyle: this.bodyStyle,
660
+ dataTableSlots: this.dataTableSlots,
661
+ mergedTheme: this.mergedTheme,
662
+ emptyProps: emptyPropsRef
663
+ });
857
664
  if (this.shouldDisplaySomeTablePart) {
858
665
  return h(Fragment, null, tableNode, createEmptyNode());
859
666
  } else {
@@ -0,0 +1,3 @@
1
+ import type { VNode } from 'vue';
2
+ import type { BodyEmptyDeps } from '../interface';
3
+ export declare function renderBodyEmpty(deps: BodyEmptyDeps): VNode;
@@ -0,0 +1,22 @@
1
+ import { h } from 'vue';
2
+ import { resolveSlot } from "../../../_utils/index.mjs";
3
+ import { UEmpty } from "../../../empty/index.mjs";
4
+ export function renderBodyEmpty(deps) {
5
+ const {
6
+ clsPrefix,
7
+ loading,
8
+ bodyStyle,
9
+ dataTableSlots,
10
+ mergedTheme,
11
+ emptyProps
12
+ } = deps;
13
+ return h("div", {
14
+ class: [`${clsPrefix}-data-table-empty`, loading && `${clsPrefix}-data-table-empty--hide`],
15
+ style: bodyStyle,
16
+ ref: "emptyElRef"
17
+ }, resolveSlot(dataTableSlots.empty, () => [h(UEmpty, Object.assign({
18
+ size: "large",
19
+ theme: mergedTheme.peers.Empty,
20
+ themeOverrides: mergedTheme.peerOverrides.Empty
21
+ }, emptyProps))]));
22
+ }
@@ -0,0 +1,3 @@
1
+ import type { VNode } from 'vue';
2
+ import type { BodyRowRenderContext, RowRenderInfo } from '../interface';
3
+ export declare function renderBodyRow(context: BodyRowRenderContext, rowInfo: RowRenderInfo, displayedRowIndex: number, isVirtual: boolean): VNode;