@drivenets/design-system 0.7.2 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.cjs +177 -171
- package/dist/index.d.cts +93 -93
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +93 -93
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +177 -171
- package/dist/index.js.map +1 -1
- package/dist/index.min.css +1 -1
- package/package.json +14 -14
- package/src/components/ds-table/components/ds-table-body-virtualized/ds-table-body-virtualized.tsx +10 -5
- package/src/components/ds-table/components/ds-table-body-virtualized/ds-table-body-virtualized.types.ts +5 -3
- package/src/components/ds-table/components/ds-table-row/ds-table-row.tsx +5 -3
- package/src/components/ds-table/components/ds-table-row/ds-table-row.types.ts +4 -0
- package/src/components/ds-table/components/ds-table-row-selectable-cell/ds-table-row-selectable-cell.tsx +2 -1
- package/src/components/ds-table/components/ds-table-row-selectable-cell/ds-table-row-selectable-cell.types.ts +1 -0
- package/src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.tsx +5 -2
- package/src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.types.ts +4 -2
- package/src/components/ds-table/ds-table.tsx +4 -1
package/dist/index.js
CHANGED
|
@@ -16439,8 +16439,8 @@ var ds_table_row_selectable_cell_module_default = { "cell": "_cell_1da1f_1" };
|
|
|
16439
16439
|
//#endregion
|
|
16440
16440
|
//#region src/components/ds-table/components/ds-table-row-selectable-cell/ds-table-row-selectable-cell.tsx
|
|
16441
16441
|
const DsTableRowSelectableCell = (t0) => {
|
|
16442
|
-
const $ = c(
|
|
16443
|
-
const { row, className } = t0;
|
|
16442
|
+
const $ = c(13);
|
|
16443
|
+
const { row, isSelected, className } = t0;
|
|
16444
16444
|
let t1;
|
|
16445
16445
|
if ($[0] !== className) {
|
|
16446
16446
|
t1 = classNames(ds_table_row_selectable_cell_module_default.cell, className);
|
|
@@ -16449,51 +16449,45 @@ const DsTableRowSelectableCell = (t0) => {
|
|
|
16449
16449
|
} else t1 = $[1];
|
|
16450
16450
|
let t2;
|
|
16451
16451
|
if ($[2] !== row) {
|
|
16452
|
-
t2 = row.
|
|
16452
|
+
t2 = row.getCanSelect();
|
|
16453
16453
|
$[2] = row;
|
|
16454
16454
|
$[3] = t2;
|
|
16455
16455
|
} else t2 = $[3];
|
|
16456
|
-
|
|
16456
|
+
const t3 = !t2;
|
|
16457
|
+
let t4;
|
|
16457
16458
|
if ($[4] !== row) {
|
|
16458
|
-
|
|
16459
|
-
$[4] = row;
|
|
16460
|
-
$[5] = t3;
|
|
16461
|
-
} else t3 = $[5];
|
|
16462
|
-
const t4 = !t3;
|
|
16463
|
-
let t5;
|
|
16464
|
-
if ($[6] !== row) {
|
|
16465
|
-
t5 = (e) => {
|
|
16459
|
+
t4 = (e) => {
|
|
16466
16460
|
e.stopPropagation();
|
|
16467
16461
|
row.getToggleSelectedHandler()(e);
|
|
16468
16462
|
};
|
|
16469
|
-
$[
|
|
16470
|
-
$[
|
|
16471
|
-
} else
|
|
16472
|
-
let
|
|
16473
|
-
if ($[
|
|
16474
|
-
|
|
16463
|
+
$[4] = row;
|
|
16464
|
+
$[5] = t4;
|
|
16465
|
+
} else t4 = $[5];
|
|
16466
|
+
let t5;
|
|
16467
|
+
if ($[6] !== isSelected || $[7] !== t3 || $[8] !== t4) {
|
|
16468
|
+
t5 = /* @__PURE__ */ jsx(DsCheckbox, {
|
|
16475
16469
|
className: ds_table_shared_module_default.checkboxContainer,
|
|
16476
|
-
checked:
|
|
16477
|
-
disabled:
|
|
16478
|
-
onClick:
|
|
16470
|
+
checked: isSelected,
|
|
16471
|
+
disabled: t3,
|
|
16472
|
+
onClick: t4,
|
|
16479
16473
|
onDoubleClick: _temp$4
|
|
16480
16474
|
});
|
|
16481
|
-
$[
|
|
16482
|
-
$[
|
|
16483
|
-
$[
|
|
16484
|
-
$[
|
|
16485
|
-
} else
|
|
16486
|
-
let
|
|
16487
|
-
if ($[
|
|
16488
|
-
|
|
16475
|
+
$[6] = isSelected;
|
|
16476
|
+
$[7] = t3;
|
|
16477
|
+
$[8] = t4;
|
|
16478
|
+
$[9] = t5;
|
|
16479
|
+
} else t5 = $[9];
|
|
16480
|
+
let t6;
|
|
16481
|
+
if ($[10] !== t1 || $[11] !== t5) {
|
|
16482
|
+
t6 = /* @__PURE__ */ jsx(TableCell, {
|
|
16489
16483
|
className: t1,
|
|
16490
|
-
children:
|
|
16484
|
+
children: t5
|
|
16491
16485
|
});
|
|
16492
|
-
$[
|
|
16493
|
-
$[
|
|
16494
|
-
$[
|
|
16495
|
-
} else
|
|
16496
|
-
return
|
|
16486
|
+
$[10] = t1;
|
|
16487
|
+
$[11] = t5;
|
|
16488
|
+
$[12] = t6;
|
|
16489
|
+
} else t6 = $[12];
|
|
16490
|
+
return t6;
|
|
16497
16491
|
};
|
|
16498
16492
|
function _temp$4(e_0) {
|
|
16499
16493
|
e_0.stopPropagation();
|
|
@@ -16634,8 +16628,8 @@ const DsRowDragHandle = (t0) => {
|
|
|
16634
16628
|
return t5;
|
|
16635
16629
|
};
|
|
16636
16630
|
const DsTableRow = (t0) => {
|
|
16637
|
-
const $ = c(
|
|
16638
|
-
const { ref, row } = t0;
|
|
16631
|
+
const $ = c(58);
|
|
16632
|
+
const { ref, row, isSelected } = t0;
|
|
16639
16633
|
const { expandable, selectable, reorderable, onRowClick, onRowDoubleClick, renderExpandedRow, bordered, rowSize, primaryRowActions, secondaryRowActions, activeRowId } = useDsTableContext();
|
|
16640
16634
|
const isExpanded = row.getIsExpanded();
|
|
16641
16635
|
let t1;
|
|
@@ -16687,7 +16681,7 @@ const DsTableRow = (t0) => {
|
|
|
16687
16681
|
$[12] = t5;
|
|
16688
16682
|
$[13] = t6;
|
|
16689
16683
|
} else t6 = $[13];
|
|
16690
|
-
const t7 = isActive ? "active" :
|
|
16684
|
+
const t7 = isActive ? "active" : isSelected ? "selected" : void 0;
|
|
16691
16685
|
const t8 = classNames(ds_table_row_module_default.tableRow, {
|
|
16692
16686
|
[ds_table_row_module_default.sizeSmall]: rowSize === "small",
|
|
16693
16687
|
[ds_table_row_module_default.sizeMedium]: rowSize === "medium",
|
|
@@ -16708,41 +16702,43 @@ const DsTableRow = (t0) => {
|
|
|
16708
16702
|
$[19] = t10;
|
|
16709
16703
|
} else t10 = $[19];
|
|
16710
16704
|
let t11;
|
|
16711
|
-
if ($[20] !==
|
|
16705
|
+
if ($[20] !== isSelected || $[21] !== row || $[22] !== selectable) {
|
|
16712
16706
|
t11 = selectable && /* @__PURE__ */ jsx(DsTableRowSelectableCell, {
|
|
16713
16707
|
row,
|
|
16708
|
+
isSelected,
|
|
16714
16709
|
className: ds_table_row_module_default.selectableCell
|
|
16715
16710
|
});
|
|
16716
|
-
$[20] =
|
|
16717
|
-
$[21] =
|
|
16718
|
-
$[22] =
|
|
16719
|
-
|
|
16711
|
+
$[20] = isSelected;
|
|
16712
|
+
$[21] = row;
|
|
16713
|
+
$[22] = selectable;
|
|
16714
|
+
$[23] = t11;
|
|
16715
|
+
} else t11 = $[23];
|
|
16720
16716
|
let t12;
|
|
16721
|
-
if ($[
|
|
16717
|
+
if ($[24] !== expandable || $[25] !== row) {
|
|
16722
16718
|
t12 = expandable && /* @__PURE__ */ jsx(DsTableRowExpandableCell, {
|
|
16723
16719
|
row,
|
|
16724
16720
|
className: ds_table_row_module_default.expandableCell,
|
|
16725
16721
|
buttonClassName: ds_table_row_module_default.expandToggleButton
|
|
16726
16722
|
});
|
|
16727
|
-
$[
|
|
16728
|
-
$[
|
|
16729
|
-
$[
|
|
16730
|
-
} else t12 = $[
|
|
16723
|
+
$[24] = expandable;
|
|
16724
|
+
$[25] = row;
|
|
16725
|
+
$[26] = t12;
|
|
16726
|
+
} else t12 = $[26];
|
|
16731
16727
|
let t13;
|
|
16732
|
-
if ($[
|
|
16728
|
+
if ($[27] !== attributes || $[28] !== isDragging || $[29] !== listeners || $[30] !== reorderable) {
|
|
16733
16729
|
t13 = reorderable && /* @__PURE__ */ jsx(DsRowDragHandle, {
|
|
16734
16730
|
isDragging,
|
|
16735
16731
|
attributes,
|
|
16736
16732
|
listeners
|
|
16737
16733
|
});
|
|
16738
|
-
$[
|
|
16739
|
-
$[
|
|
16740
|
-
$[
|
|
16741
|
-
$[
|
|
16742
|
-
$[
|
|
16743
|
-
} else t13 = $[
|
|
16734
|
+
$[27] = attributes;
|
|
16735
|
+
$[28] = isDragging;
|
|
16736
|
+
$[29] = listeners;
|
|
16737
|
+
$[30] = reorderable;
|
|
16738
|
+
$[31] = t13;
|
|
16739
|
+
} else t13 = $[31];
|
|
16744
16740
|
let t14;
|
|
16745
|
-
if ($[
|
|
16741
|
+
if ($[32] !== primaryRowActions || $[33] !== row || $[34] !== secondaryRowActions) {
|
|
16746
16742
|
t14 = row.getVisibleCells().map((cell, idx) => {
|
|
16747
16743
|
const isLastColumn = idx === row.getVisibleCells().length - 1;
|
|
16748
16744
|
const cellStyle = getColumnSizeStyle(cell.column.getSize());
|
|
@@ -16760,13 +16756,13 @@ const DsTableRow = (t0) => {
|
|
|
16760
16756
|
})
|
|
16761
16757
|
}, cell.id);
|
|
16762
16758
|
});
|
|
16763
|
-
$[
|
|
16764
|
-
$[
|
|
16765
|
-
$[
|
|
16766
|
-
$[
|
|
16767
|
-
} else t14 = $[
|
|
16759
|
+
$[32] = primaryRowActions;
|
|
16760
|
+
$[33] = row;
|
|
16761
|
+
$[34] = secondaryRowActions;
|
|
16762
|
+
$[35] = t14;
|
|
16763
|
+
} else t14 = $[35];
|
|
16768
16764
|
let t15;
|
|
16769
|
-
if ($[
|
|
16765
|
+
if ($[36] !== T0 || $[37] !== rowStyle || $[38] !== t10 || $[39] !== t11 || $[40] !== t12 || $[41] !== t13 || $[42] !== t14 || $[43] !== t6 || $[44] !== t7 || $[45] !== t8 || $[46] !== t9) {
|
|
16770
16766
|
t15 = /* @__PURE__ */ jsxs(T0, {
|
|
16771
16767
|
ref: t6,
|
|
16772
16768
|
"data-state": t7,
|
|
@@ -16781,21 +16777,21 @@ const DsTableRow = (t0) => {
|
|
|
16781
16777
|
t14
|
|
16782
16778
|
]
|
|
16783
16779
|
});
|
|
16784
|
-
$[
|
|
16785
|
-
$[
|
|
16786
|
-
$[
|
|
16787
|
-
$[
|
|
16788
|
-
$[
|
|
16789
|
-
$[
|
|
16790
|
-
$[
|
|
16791
|
-
$[
|
|
16792
|
-
$[
|
|
16793
|
-
$[
|
|
16794
|
-
$[
|
|
16795
|
-
$[
|
|
16796
|
-
} else t15 = $[
|
|
16780
|
+
$[36] = T0;
|
|
16781
|
+
$[37] = rowStyle;
|
|
16782
|
+
$[38] = t10;
|
|
16783
|
+
$[39] = t11;
|
|
16784
|
+
$[40] = t12;
|
|
16785
|
+
$[41] = t13;
|
|
16786
|
+
$[42] = t14;
|
|
16787
|
+
$[43] = t6;
|
|
16788
|
+
$[44] = t7;
|
|
16789
|
+
$[45] = t8;
|
|
16790
|
+
$[46] = t9;
|
|
16791
|
+
$[47] = t15;
|
|
16792
|
+
} else t15 = $[47];
|
|
16797
16793
|
let t16;
|
|
16798
|
-
if ($[
|
|
16794
|
+
if ($[48] !== isExpandable || $[49] !== isExpanded || $[50] !== renderExpandedRow || $[51] !== reorderable || $[52] !== row || $[53] !== selectable) {
|
|
16799
16795
|
t16 = isExpanded && renderExpandedRow && /* @__PURE__ */ jsx(TableRow, {
|
|
16800
16796
|
className: ds_table_row_module_default.expandedRow,
|
|
16801
16797
|
children: /* @__PURE__ */ jsx(TableCell, {
|
|
@@ -16804,21 +16800,21 @@ const DsTableRow = (t0) => {
|
|
|
16804
16800
|
children: renderExpandedRow(row.original)
|
|
16805
16801
|
})
|
|
16806
16802
|
});
|
|
16807
|
-
$[
|
|
16808
|
-
$[
|
|
16809
|
-
$[
|
|
16810
|
-
$[
|
|
16811
|
-
$[
|
|
16812
|
-
$[
|
|
16813
|
-
$[
|
|
16814
|
-
} else t16 = $[
|
|
16803
|
+
$[48] = isExpandable;
|
|
16804
|
+
$[49] = isExpanded;
|
|
16805
|
+
$[50] = renderExpandedRow;
|
|
16806
|
+
$[51] = reorderable;
|
|
16807
|
+
$[52] = row;
|
|
16808
|
+
$[53] = selectable;
|
|
16809
|
+
$[54] = t16;
|
|
16810
|
+
} else t16 = $[54];
|
|
16815
16811
|
let t17;
|
|
16816
|
-
if ($[
|
|
16812
|
+
if ($[55] !== t15 || $[56] !== t16) {
|
|
16817
16813
|
t17 = /* @__PURE__ */ jsxs(Fragment, { children: [t15, t16] });
|
|
16818
|
-
$[
|
|
16819
|
-
$[
|
|
16820
|
-
$[
|
|
16821
|
-
} else t17 = $[
|
|
16814
|
+
$[55] = t15;
|
|
16815
|
+
$[56] = t16;
|
|
16816
|
+
$[57] = t17;
|
|
16817
|
+
} else t17 = $[57];
|
|
16822
16818
|
return t17;
|
|
16823
16819
|
};
|
|
16824
16820
|
function _temp$2(e) {
|
|
@@ -16980,20 +16976,20 @@ var ds_table_row_virtualized_module_default = {
|
|
|
16980
16976
|
//#endregion
|
|
16981
16977
|
//#region src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.tsx
|
|
16982
16978
|
const DsTableRowVirtualized = (t0) => {
|
|
16983
|
-
const $ = c(
|
|
16984
|
-
const { row, rowsMapRef, rowHeightsMapRef, rowVirtualizer, virtualRow, isExpandedRowContent } = t0;
|
|
16979
|
+
const $ = c(48);
|
|
16980
|
+
const { row, isSelected, rowsMapRef, rowHeightsMapRef, rowVirtualizer, virtualRow, isExpandedRowContent } = t0;
|
|
16985
16981
|
const { selectable, expandable, bordered, rowSize, activeRowId, primaryRowActions, secondaryRowActions, renderExpandedRow, onRowClick, onRowDoubleClick } = useDsTableContext();
|
|
16986
16982
|
let T0;
|
|
16987
16983
|
let t1;
|
|
16988
16984
|
let t2;
|
|
16989
16985
|
let t3;
|
|
16990
16986
|
let t4;
|
|
16991
|
-
if ($[0] !== activeRowId || $[1] !== bordered || $[2] !== isExpandedRowContent || $[3] !==
|
|
16987
|
+
if ($[0] !== activeRowId || $[1] !== bordered || $[2] !== isExpandedRowContent || $[3] !== isSelected || $[4] !== onRowClick || $[5] !== row || $[6] !== rowHeightsMapRef || $[7] !== rowSize || $[8] !== rowVirtualizer || $[9] !== rowsMapRef || $[10] !== virtualRow.index || $[11] !== virtualRow.key) {
|
|
16992
16988
|
const isExpanded = row.getIsExpanded();
|
|
16993
16989
|
const isActive = activeRowId === row.id;
|
|
16994
16990
|
T0 = TableRow;
|
|
16995
16991
|
t1 = virtualRow.index;
|
|
16996
|
-
if ($[
|
|
16992
|
+
if ($[17] !== rowHeightsMapRef || $[18] !== rowVirtualizer || $[19] !== rowsMapRef || $[20] !== virtualRow.key) {
|
|
16997
16993
|
t2 = (row_0) => {
|
|
16998
16994
|
const key = String(virtualRow.key);
|
|
16999
16995
|
if (row_0) {
|
|
@@ -17003,13 +16999,13 @@ const DsTableRowVirtualized = (t0) => {
|
|
|
17003
16999
|
rowHeightsMapRef.current.set(key, height);
|
|
17004
17000
|
} else rowsMapRef.current.delete(key);
|
|
17005
17001
|
};
|
|
17006
|
-
$[
|
|
17007
|
-
$[
|
|
17008
|
-
$[
|
|
17009
|
-
$[
|
|
17010
|
-
$[
|
|
17011
|
-
} else t2 = $[
|
|
17012
|
-
t3 = isActive ? "active" :
|
|
17002
|
+
$[17] = rowHeightsMapRef;
|
|
17003
|
+
$[18] = rowVirtualizer;
|
|
17004
|
+
$[19] = rowsMapRef;
|
|
17005
|
+
$[20] = virtualRow.key;
|
|
17006
|
+
$[21] = t2;
|
|
17007
|
+
} else t2 = $[21];
|
|
17008
|
+
t3 = isActive ? "active" : isSelected ? "selected" : void 0;
|
|
17013
17009
|
t4 = classNames(ds_table_row_virtualized_module_default.row, {
|
|
17014
17010
|
[ds_table_row_virtualized_module_default.sizeSmall]: rowSize === "small",
|
|
17015
17011
|
[ds_table_row_virtualized_module_default.sizeMedium]: rowSize === "medium",
|
|
@@ -17018,47 +17014,49 @@ const DsTableRowVirtualized = (t0) => {
|
|
|
17018
17014
|
$[0] = activeRowId;
|
|
17019
17015
|
$[1] = bordered;
|
|
17020
17016
|
$[2] = isExpandedRowContent;
|
|
17021
|
-
$[3] =
|
|
17022
|
-
$[4] =
|
|
17023
|
-
$[5] =
|
|
17024
|
-
$[6] =
|
|
17025
|
-
$[7] =
|
|
17026
|
-
$[8] =
|
|
17027
|
-
$[9] =
|
|
17028
|
-
$[10] = virtualRow.
|
|
17029
|
-
$[11] =
|
|
17030
|
-
$[12] =
|
|
17031
|
-
$[13] =
|
|
17032
|
-
$[14] =
|
|
17033
|
-
$[15] =
|
|
17017
|
+
$[3] = isSelected;
|
|
17018
|
+
$[4] = onRowClick;
|
|
17019
|
+
$[5] = row;
|
|
17020
|
+
$[6] = rowHeightsMapRef;
|
|
17021
|
+
$[7] = rowSize;
|
|
17022
|
+
$[8] = rowVirtualizer;
|
|
17023
|
+
$[9] = rowsMapRef;
|
|
17024
|
+
$[10] = virtualRow.index;
|
|
17025
|
+
$[11] = virtualRow.key;
|
|
17026
|
+
$[12] = T0;
|
|
17027
|
+
$[13] = t1;
|
|
17028
|
+
$[14] = t2;
|
|
17029
|
+
$[15] = t3;
|
|
17030
|
+
$[16] = t4;
|
|
17034
17031
|
} else {
|
|
17035
|
-
T0 = $[
|
|
17036
|
-
t1 = $[
|
|
17037
|
-
t2 = $[
|
|
17038
|
-
t3 = $[
|
|
17039
|
-
t4 = $[
|
|
17032
|
+
T0 = $[12];
|
|
17033
|
+
t1 = $[13];
|
|
17034
|
+
t2 = $[14];
|
|
17035
|
+
t3 = $[15];
|
|
17036
|
+
t4 = $[16];
|
|
17040
17037
|
}
|
|
17041
17038
|
let t5;
|
|
17042
|
-
if ($[
|
|
17039
|
+
if ($[22] !== isExpandedRowContent || $[23] !== onRowClick || $[24] !== row.original) {
|
|
17043
17040
|
t5 = isExpandedRowContent ? void 0 : () => onRowClick?.(row.original);
|
|
17044
|
-
$[
|
|
17045
|
-
$[
|
|
17046
|
-
$[
|
|
17047
|
-
$[
|
|
17048
|
-
} else t5 = $[
|
|
17041
|
+
$[22] = isExpandedRowContent;
|
|
17042
|
+
$[23] = onRowClick;
|
|
17043
|
+
$[24] = row.original;
|
|
17044
|
+
$[25] = t5;
|
|
17045
|
+
} else t5 = $[25];
|
|
17049
17046
|
let t6;
|
|
17050
|
-
if ($[
|
|
17047
|
+
if ($[26] !== isExpandedRowContent || $[27] !== onRowDoubleClick || $[28] !== row.original) {
|
|
17051
17048
|
t6 = isExpandedRowContent ? void 0 : () => onRowDoubleClick?.(row.original);
|
|
17052
|
-
$[
|
|
17053
|
-
$[
|
|
17054
|
-
$[
|
|
17055
|
-
$[
|
|
17056
|
-
} else t6 = $[
|
|
17049
|
+
$[26] = isExpandedRowContent;
|
|
17050
|
+
$[27] = onRowDoubleClick;
|
|
17051
|
+
$[28] = row.original;
|
|
17052
|
+
$[29] = t6;
|
|
17053
|
+
} else t6 = $[29];
|
|
17057
17054
|
let t7;
|
|
17058
|
-
if ($[
|
|
17055
|
+
if ($[30] !== expandable || $[31] !== isExpandedRowContent || $[32] !== isSelected || $[33] !== primaryRowActions || $[34] !== renderExpandedRow || $[35] !== row || $[36] !== secondaryRowActions || $[37] !== selectable) {
|
|
17059
17056
|
t7 = isExpandedRowContent ? /* @__PURE__ */ jsx(TableCell, { children: renderExpandedRow?.(row.original) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17060
17057
|
selectable && /* @__PURE__ */ jsx(DsTableRowSelectableCell, {
|
|
17061
17058
|
row,
|
|
17059
|
+
isSelected,
|
|
17062
17060
|
className: ds_table_row_virtualized_module_default.selectableCell
|
|
17063
17061
|
}),
|
|
17064
17062
|
expandable && /* @__PURE__ */ jsx(DsTableRowExpandableCell, {
|
|
@@ -17082,17 +17080,18 @@ const DsTableRowVirtualized = (t0) => {
|
|
|
17082
17080
|
}, cell.id);
|
|
17083
17081
|
})
|
|
17084
17082
|
] });
|
|
17085
|
-
$[
|
|
17086
|
-
$[
|
|
17087
|
-
$[
|
|
17088
|
-
$[
|
|
17089
|
-
$[
|
|
17090
|
-
$[
|
|
17091
|
-
$[
|
|
17092
|
-
$[
|
|
17093
|
-
|
|
17083
|
+
$[30] = expandable;
|
|
17084
|
+
$[31] = isExpandedRowContent;
|
|
17085
|
+
$[32] = isSelected;
|
|
17086
|
+
$[33] = primaryRowActions;
|
|
17087
|
+
$[34] = renderExpandedRow;
|
|
17088
|
+
$[35] = row;
|
|
17089
|
+
$[36] = secondaryRowActions;
|
|
17090
|
+
$[37] = selectable;
|
|
17091
|
+
$[38] = t7;
|
|
17092
|
+
} else t7 = $[38];
|
|
17094
17093
|
let t8;
|
|
17095
|
-
if ($[
|
|
17094
|
+
if ($[39] !== T0 || $[40] !== t1 || $[41] !== t2 || $[42] !== t3 || $[43] !== t4 || $[44] !== t5 || $[45] !== t6 || $[46] !== t7) {
|
|
17096
17095
|
t8 = /* @__PURE__ */ jsx(T0, {
|
|
17097
17096
|
"data-index": t1,
|
|
17098
17097
|
ref: t2,
|
|
@@ -17102,21 +17101,21 @@ const DsTableRowVirtualized = (t0) => {
|
|
|
17102
17101
|
onDoubleClick: t6,
|
|
17103
17102
|
children: t7
|
|
17104
17103
|
});
|
|
17105
|
-
$[
|
|
17106
|
-
$[
|
|
17107
|
-
$[
|
|
17108
|
-
$[
|
|
17109
|
-
$[
|
|
17110
|
-
$[
|
|
17111
|
-
$[
|
|
17112
|
-
$[
|
|
17113
|
-
$[
|
|
17114
|
-
} else t8 = $[
|
|
17104
|
+
$[39] = T0;
|
|
17105
|
+
$[40] = t1;
|
|
17106
|
+
$[41] = t2;
|
|
17107
|
+
$[42] = t3;
|
|
17108
|
+
$[43] = t4;
|
|
17109
|
+
$[44] = t5;
|
|
17110
|
+
$[45] = t6;
|
|
17111
|
+
$[46] = t7;
|
|
17112
|
+
$[47] = t8;
|
|
17113
|
+
} else t8 = $[47];
|
|
17115
17114
|
return t8;
|
|
17116
17115
|
};
|
|
17117
17116
|
//#endregion
|
|
17118
17117
|
//#region src/components/ds-table/components/ds-table-body-virtualized/ds-table-body-virtualized.tsx
|
|
17119
|
-
const DsTableBodyVirtualized = ({ table, tableContainerRef, emptyState, estimateSize, overscan, onScroll }) => {
|
|
17118
|
+
const DsTableBodyVirtualized = ({ table, tableContainerRef, emptyState, estimateSize, overscan, onScroll, rowSelection }) => {
|
|
17120
17119
|
const rowsMapRef = useRef(/* @__PURE__ */ new Map());
|
|
17121
17120
|
const rowHeightsMapRef = useRef(/* @__PURE__ */ new Map());
|
|
17122
17121
|
const { rows } = table.getRowModel();
|
|
@@ -17168,28 +17167,29 @@ const DsTableBodyVirtualized = ({ table, tableContainerRef, emptyState, estimate
|
|
|
17168
17167
|
rowHeightsMapRef,
|
|
17169
17168
|
rowVirtualizer,
|
|
17170
17169
|
rowsAndExpandedRowContent,
|
|
17171
|
-
emptyState
|
|
17170
|
+
emptyState,
|
|
17171
|
+
rowSelection
|
|
17172
17172
|
});
|
|
17173
17173
|
};
|
|
17174
17174
|
function DsTableBody(t0) {
|
|
17175
|
-
const $ = c(
|
|
17176
|
-
const { rowVirtualizer, rowsMapRef, rowHeightsMapRef, rowsAndExpandedRowContent, emptyState } = t0;
|
|
17175
|
+
const $ = c(11);
|
|
17176
|
+
const { rowVirtualizer, rowsMapRef, rowHeightsMapRef, rowsAndExpandedRowContent, emptyState, rowSelection } = t0;
|
|
17177
17177
|
let t1;
|
|
17178
|
-
if ($[0] !== emptyState || $[1] !== rowHeightsMapRef || $[2] !==
|
|
17178
|
+
if ($[0] !== emptyState || $[1] !== rowHeightsMapRef || $[2] !== rowSelection || $[3] !== rowVirtualizer || $[4] !== rowsAndExpandedRowContent || $[5] !== rowsMapRef) {
|
|
17179
17179
|
const virtualRows = rowVirtualizer.getVirtualItems();
|
|
17180
17180
|
let t2;
|
|
17181
|
-
if ($[
|
|
17181
|
+
if ($[7] !== rowVirtualizer) {
|
|
17182
17182
|
t2 = rowVirtualizer.getTotalSize().toString();
|
|
17183
|
-
$[
|
|
17184
|
-
$[
|
|
17185
|
-
} else t2 = $[
|
|
17183
|
+
$[7] = rowVirtualizer;
|
|
17184
|
+
$[8] = t2;
|
|
17185
|
+
} else t2 = $[8];
|
|
17186
17186
|
const t3 = `${t2}px`;
|
|
17187
17187
|
let t4;
|
|
17188
|
-
if ($[
|
|
17188
|
+
if ($[9] !== t3) {
|
|
17189
17189
|
t4 = { height: t3 };
|
|
17190
|
-
$[
|
|
17191
|
-
$[
|
|
17192
|
-
} else t4 = $[
|
|
17190
|
+
$[9] = t3;
|
|
17191
|
+
$[10] = t4;
|
|
17192
|
+
} else t4 = $[10];
|
|
17193
17193
|
t1 = /* @__PURE__ */ jsx(TableBody, {
|
|
17194
17194
|
className: ds_table_body_virtualized_module_default.body,
|
|
17195
17195
|
style: t4,
|
|
@@ -17198,6 +17198,7 @@ function DsTableBody(t0) {
|
|
|
17198
17198
|
if (!row) return null;
|
|
17199
17199
|
return /* @__PURE__ */ jsx(DsTableRowVirtualized, {
|
|
17200
17200
|
row: row.row,
|
|
17201
|
+
isSelected: !!rowSelection[row.row.id],
|
|
17201
17202
|
isExpandedRowContent: row.isExpandedRowContent,
|
|
17202
17203
|
rowsMapRef,
|
|
17203
17204
|
rowHeightsMapRef,
|
|
@@ -17211,11 +17212,12 @@ function DsTableBody(t0) {
|
|
|
17211
17212
|
});
|
|
17212
17213
|
$[0] = emptyState;
|
|
17213
17214
|
$[1] = rowHeightsMapRef;
|
|
17214
|
-
$[2] =
|
|
17215
|
-
$[3] =
|
|
17216
|
-
$[4] =
|
|
17217
|
-
$[5] =
|
|
17218
|
-
|
|
17215
|
+
$[2] = rowSelection;
|
|
17216
|
+
$[3] = rowVirtualizer;
|
|
17217
|
+
$[4] = rowsAndExpandedRowContent;
|
|
17218
|
+
$[5] = rowsMapRef;
|
|
17219
|
+
$[6] = t1;
|
|
17220
|
+
} else t1 = $[6];
|
|
17219
17221
|
return t1;
|
|
17220
17222
|
}
|
|
17221
17223
|
//#endregion
|
|
@@ -17360,8 +17362,12 @@ const DsTable = ({ ref, columns, data: tableData, virtualized = false, virtualiz
|
|
|
17360
17362
|
emptyState,
|
|
17361
17363
|
estimateSize: virtualizedOptions?.estimateSize || ROW_SIZE_HEIGHT_MAP[rowSize],
|
|
17362
17364
|
overscan: virtualizedOptions?.overscan,
|
|
17363
|
-
onScroll
|
|
17364
|
-
|
|
17365
|
+
onScroll,
|
|
17366
|
+
rowSelection
|
|
17367
|
+
}) : /* @__PURE__ */ jsx(TableBody, { children: /* @__PURE__ */ jsx(SortableWrapper, { children: rows.length ? rows.map((row_1) => /* @__PURE__ */ jsx(DsTableRow, {
|
|
17368
|
+
row: row_1,
|
|
17369
|
+
isSelected: !!rowSelection[row_1.id]
|
|
17370
|
+
}, row_1.id)) : renderEmptyState() }) })]
|
|
17365
17371
|
}) })
|
|
17366
17372
|
}), selectable && actions.length > 0 && /* @__PURE__ */ jsx(DsTableBulkActions, {
|
|
17367
17373
|
numSelectedRows: selectedRows.length,
|