@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/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -16471,8 +16471,8 @@ var ds_table_row_selectable_cell_module_default = { "cell": "_cell_1da1f_1" };
|
|
|
16471
16471
|
//#endregion
|
|
16472
16472
|
//#region src/components/ds-table/components/ds-table-row-selectable-cell/ds-table-row-selectable-cell.tsx
|
|
16473
16473
|
const DsTableRowSelectableCell = (t0) => {
|
|
16474
|
-
const $ = (0, react_compiler_runtime.c)(
|
|
16475
|
-
const { row, className } = t0;
|
|
16474
|
+
const $ = (0, react_compiler_runtime.c)(13);
|
|
16475
|
+
const { row, isSelected, className } = t0;
|
|
16476
16476
|
let t1;
|
|
16477
16477
|
if ($[0] !== className) {
|
|
16478
16478
|
t1 = (0, classnames.default)(ds_table_row_selectable_cell_module_default.cell, className);
|
|
@@ -16481,51 +16481,45 @@ const DsTableRowSelectableCell = (t0) => {
|
|
|
16481
16481
|
} else t1 = $[1];
|
|
16482
16482
|
let t2;
|
|
16483
16483
|
if ($[2] !== row) {
|
|
16484
|
-
t2 = row.
|
|
16484
|
+
t2 = row.getCanSelect();
|
|
16485
16485
|
$[2] = row;
|
|
16486
16486
|
$[3] = t2;
|
|
16487
16487
|
} else t2 = $[3];
|
|
16488
|
-
|
|
16488
|
+
const t3 = !t2;
|
|
16489
|
+
let t4;
|
|
16489
16490
|
if ($[4] !== row) {
|
|
16490
|
-
|
|
16491
|
-
$[4] = row;
|
|
16492
|
-
$[5] = t3;
|
|
16493
|
-
} else t3 = $[5];
|
|
16494
|
-
const t4 = !t3;
|
|
16495
|
-
let t5;
|
|
16496
|
-
if ($[6] !== row) {
|
|
16497
|
-
t5 = (e) => {
|
|
16491
|
+
t4 = (e) => {
|
|
16498
16492
|
e.stopPropagation();
|
|
16499
16493
|
row.getToggleSelectedHandler()(e);
|
|
16500
16494
|
};
|
|
16501
|
-
$[
|
|
16502
|
-
$[
|
|
16503
|
-
} else
|
|
16504
|
-
let
|
|
16505
|
-
if ($[
|
|
16506
|
-
|
|
16495
|
+
$[4] = row;
|
|
16496
|
+
$[5] = t4;
|
|
16497
|
+
} else t4 = $[5];
|
|
16498
|
+
let t5;
|
|
16499
|
+
if ($[6] !== isSelected || $[7] !== t3 || $[8] !== t4) {
|
|
16500
|
+
t5 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsCheckbox, {
|
|
16507
16501
|
className: ds_table_shared_module_default.checkboxContainer,
|
|
16508
|
-
checked:
|
|
16509
|
-
disabled:
|
|
16510
|
-
onClick:
|
|
16502
|
+
checked: isSelected,
|
|
16503
|
+
disabled: t3,
|
|
16504
|
+
onClick: t4,
|
|
16511
16505
|
onDoubleClick: _temp$4
|
|
16512
16506
|
});
|
|
16513
|
-
$[
|
|
16514
|
-
$[
|
|
16515
|
-
$[
|
|
16516
|
-
$[
|
|
16517
|
-
} else
|
|
16518
|
-
let
|
|
16519
|
-
if ($[
|
|
16520
|
-
|
|
16507
|
+
$[6] = isSelected;
|
|
16508
|
+
$[7] = t3;
|
|
16509
|
+
$[8] = t4;
|
|
16510
|
+
$[9] = t5;
|
|
16511
|
+
} else t5 = $[9];
|
|
16512
|
+
let t6;
|
|
16513
|
+
if ($[10] !== t1 || $[11] !== t5) {
|
|
16514
|
+
t6 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableCell, {
|
|
16521
16515
|
className: t1,
|
|
16522
|
-
children:
|
|
16516
|
+
children: t5
|
|
16523
16517
|
});
|
|
16524
|
-
$[
|
|
16525
|
-
$[
|
|
16526
|
-
$[
|
|
16527
|
-
} else
|
|
16528
|
-
return
|
|
16518
|
+
$[10] = t1;
|
|
16519
|
+
$[11] = t5;
|
|
16520
|
+
$[12] = t6;
|
|
16521
|
+
} else t6 = $[12];
|
|
16522
|
+
return t6;
|
|
16529
16523
|
};
|
|
16530
16524
|
function _temp$4(e_0) {
|
|
16531
16525
|
e_0.stopPropagation();
|
|
@@ -16666,8 +16660,8 @@ const DsRowDragHandle = (t0) => {
|
|
|
16666
16660
|
return t5;
|
|
16667
16661
|
};
|
|
16668
16662
|
const DsTableRow = (t0) => {
|
|
16669
|
-
const $ = (0, react_compiler_runtime.c)(
|
|
16670
|
-
const { ref, row } = t0;
|
|
16663
|
+
const $ = (0, react_compiler_runtime.c)(58);
|
|
16664
|
+
const { ref, row, isSelected } = t0;
|
|
16671
16665
|
const { expandable, selectable, reorderable, onRowClick, onRowDoubleClick, renderExpandedRow, bordered, rowSize, primaryRowActions, secondaryRowActions, activeRowId } = useDsTableContext();
|
|
16672
16666
|
const isExpanded = row.getIsExpanded();
|
|
16673
16667
|
let t1;
|
|
@@ -16719,7 +16713,7 @@ const DsTableRow = (t0) => {
|
|
|
16719
16713
|
$[12] = t5;
|
|
16720
16714
|
$[13] = t6;
|
|
16721
16715
|
} else t6 = $[13];
|
|
16722
|
-
const t7 = isActive ? "active" :
|
|
16716
|
+
const t7 = isActive ? "active" : isSelected ? "selected" : void 0;
|
|
16723
16717
|
const t8 = (0, classnames.default)(ds_table_row_module_default.tableRow, {
|
|
16724
16718
|
[ds_table_row_module_default.sizeSmall]: rowSize === "small",
|
|
16725
16719
|
[ds_table_row_module_default.sizeMedium]: rowSize === "medium",
|
|
@@ -16740,41 +16734,43 @@ const DsTableRow = (t0) => {
|
|
|
16740
16734
|
$[19] = t10;
|
|
16741
16735
|
} else t10 = $[19];
|
|
16742
16736
|
let t11;
|
|
16743
|
-
if ($[20] !==
|
|
16737
|
+
if ($[20] !== isSelected || $[21] !== row || $[22] !== selectable) {
|
|
16744
16738
|
t11 = selectable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableRowSelectableCell, {
|
|
16745
16739
|
row,
|
|
16740
|
+
isSelected,
|
|
16746
16741
|
className: ds_table_row_module_default.selectableCell
|
|
16747
16742
|
});
|
|
16748
|
-
$[20] =
|
|
16749
|
-
$[21] =
|
|
16750
|
-
$[22] =
|
|
16751
|
-
|
|
16743
|
+
$[20] = isSelected;
|
|
16744
|
+
$[21] = row;
|
|
16745
|
+
$[22] = selectable;
|
|
16746
|
+
$[23] = t11;
|
|
16747
|
+
} else t11 = $[23];
|
|
16752
16748
|
let t12;
|
|
16753
|
-
if ($[
|
|
16749
|
+
if ($[24] !== expandable || $[25] !== row) {
|
|
16754
16750
|
t12 = expandable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableRowExpandableCell, {
|
|
16755
16751
|
row,
|
|
16756
16752
|
className: ds_table_row_module_default.expandableCell,
|
|
16757
16753
|
buttonClassName: ds_table_row_module_default.expandToggleButton
|
|
16758
16754
|
});
|
|
16759
|
-
$[
|
|
16760
|
-
$[
|
|
16761
|
-
$[
|
|
16762
|
-
} else t12 = $[
|
|
16755
|
+
$[24] = expandable;
|
|
16756
|
+
$[25] = row;
|
|
16757
|
+
$[26] = t12;
|
|
16758
|
+
} else t12 = $[26];
|
|
16763
16759
|
let t13;
|
|
16764
|
-
if ($[
|
|
16760
|
+
if ($[27] !== attributes || $[28] !== isDragging || $[29] !== listeners || $[30] !== reorderable) {
|
|
16765
16761
|
t13 = reorderable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsRowDragHandle, {
|
|
16766
16762
|
isDragging,
|
|
16767
16763
|
attributes,
|
|
16768
16764
|
listeners
|
|
16769
16765
|
});
|
|
16770
|
-
$[
|
|
16771
|
-
$[
|
|
16772
|
-
$[
|
|
16773
|
-
$[
|
|
16774
|
-
$[
|
|
16775
|
-
} else t13 = $[
|
|
16766
|
+
$[27] = attributes;
|
|
16767
|
+
$[28] = isDragging;
|
|
16768
|
+
$[29] = listeners;
|
|
16769
|
+
$[30] = reorderable;
|
|
16770
|
+
$[31] = t13;
|
|
16771
|
+
} else t13 = $[31];
|
|
16776
16772
|
let t14;
|
|
16777
|
-
if ($[
|
|
16773
|
+
if ($[32] !== primaryRowActions || $[33] !== row || $[34] !== secondaryRowActions) {
|
|
16778
16774
|
t14 = row.getVisibleCells().map((cell, idx) => {
|
|
16779
16775
|
const isLastColumn = idx === row.getVisibleCells().length - 1;
|
|
16780
16776
|
const cellStyle = getColumnSizeStyle(cell.column.getSize());
|
|
@@ -16792,13 +16788,13 @@ const DsTableRow = (t0) => {
|
|
|
16792
16788
|
})
|
|
16793
16789
|
}, cell.id);
|
|
16794
16790
|
});
|
|
16795
|
-
$[
|
|
16796
|
-
$[
|
|
16797
|
-
$[
|
|
16798
|
-
$[
|
|
16799
|
-
} else t14 = $[
|
|
16791
|
+
$[32] = primaryRowActions;
|
|
16792
|
+
$[33] = row;
|
|
16793
|
+
$[34] = secondaryRowActions;
|
|
16794
|
+
$[35] = t14;
|
|
16795
|
+
} else t14 = $[35];
|
|
16800
16796
|
let t15;
|
|
16801
|
-
if ($[
|
|
16797
|
+
if ($[36] !== T0 || $[37] !== rowStyle || $[38] !== t10 || $[39] !== t11 || $[40] !== t12 || $[41] !== t13 || $[42] !== t14 || $[43] !== t6 || $[44] !== t7 || $[45] !== t8 || $[46] !== t9) {
|
|
16802
16798
|
t15 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(T0, {
|
|
16803
16799
|
ref: t6,
|
|
16804
16800
|
"data-state": t7,
|
|
@@ -16813,21 +16809,21 @@ const DsTableRow = (t0) => {
|
|
|
16813
16809
|
t14
|
|
16814
16810
|
]
|
|
16815
16811
|
});
|
|
16816
|
-
$[
|
|
16817
|
-
$[
|
|
16818
|
-
$[
|
|
16819
|
-
$[
|
|
16820
|
-
$[
|
|
16821
|
-
$[
|
|
16822
|
-
$[
|
|
16823
|
-
$[
|
|
16824
|
-
$[
|
|
16825
|
-
$[
|
|
16826
|
-
$[
|
|
16827
|
-
$[
|
|
16828
|
-
} else t15 = $[
|
|
16812
|
+
$[36] = T0;
|
|
16813
|
+
$[37] = rowStyle;
|
|
16814
|
+
$[38] = t10;
|
|
16815
|
+
$[39] = t11;
|
|
16816
|
+
$[40] = t12;
|
|
16817
|
+
$[41] = t13;
|
|
16818
|
+
$[42] = t14;
|
|
16819
|
+
$[43] = t6;
|
|
16820
|
+
$[44] = t7;
|
|
16821
|
+
$[45] = t8;
|
|
16822
|
+
$[46] = t9;
|
|
16823
|
+
$[47] = t15;
|
|
16824
|
+
} else t15 = $[47];
|
|
16829
16825
|
let t16;
|
|
16830
|
-
if ($[
|
|
16826
|
+
if ($[48] !== isExpandable || $[49] !== isExpanded || $[50] !== renderExpandedRow || $[51] !== reorderable || $[52] !== row || $[53] !== selectable) {
|
|
16831
16827
|
t16 = isExpanded && renderExpandedRow && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableRow, {
|
|
16832
16828
|
className: ds_table_row_module_default.expandedRow,
|
|
16833
16829
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableCell, {
|
|
@@ -16836,21 +16832,21 @@ const DsTableRow = (t0) => {
|
|
|
16836
16832
|
children: renderExpandedRow(row.original)
|
|
16837
16833
|
})
|
|
16838
16834
|
});
|
|
16839
|
-
$[
|
|
16840
|
-
$[
|
|
16841
|
-
$[
|
|
16842
|
-
$[
|
|
16843
|
-
$[
|
|
16844
|
-
$[
|
|
16845
|
-
$[
|
|
16846
|
-
} else t16 = $[
|
|
16835
|
+
$[48] = isExpandable;
|
|
16836
|
+
$[49] = isExpanded;
|
|
16837
|
+
$[50] = renderExpandedRow;
|
|
16838
|
+
$[51] = reorderable;
|
|
16839
|
+
$[52] = row;
|
|
16840
|
+
$[53] = selectable;
|
|
16841
|
+
$[54] = t16;
|
|
16842
|
+
} else t16 = $[54];
|
|
16847
16843
|
let t17;
|
|
16848
|
-
if ($[
|
|
16844
|
+
if ($[55] !== t15 || $[56] !== t16) {
|
|
16849
16845
|
t17 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [t15, t16] });
|
|
16850
|
-
$[
|
|
16851
|
-
$[
|
|
16852
|
-
$[
|
|
16853
|
-
} else t17 = $[
|
|
16846
|
+
$[55] = t15;
|
|
16847
|
+
$[56] = t16;
|
|
16848
|
+
$[57] = t17;
|
|
16849
|
+
} else t17 = $[57];
|
|
16854
16850
|
return t17;
|
|
16855
16851
|
};
|
|
16856
16852
|
function _temp$2(e) {
|
|
@@ -17012,20 +17008,20 @@ var ds_table_row_virtualized_module_default = {
|
|
|
17012
17008
|
//#endregion
|
|
17013
17009
|
//#region src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.tsx
|
|
17014
17010
|
const DsTableRowVirtualized = (t0) => {
|
|
17015
|
-
const $ = (0, react_compiler_runtime.c)(
|
|
17016
|
-
const { row, rowsMapRef, rowHeightsMapRef, rowVirtualizer, virtualRow, isExpandedRowContent } = t0;
|
|
17011
|
+
const $ = (0, react_compiler_runtime.c)(48);
|
|
17012
|
+
const { row, isSelected, rowsMapRef, rowHeightsMapRef, rowVirtualizer, virtualRow, isExpandedRowContent } = t0;
|
|
17017
17013
|
const { selectable, expandable, bordered, rowSize, activeRowId, primaryRowActions, secondaryRowActions, renderExpandedRow, onRowClick, onRowDoubleClick } = useDsTableContext();
|
|
17018
17014
|
let T0;
|
|
17019
17015
|
let t1;
|
|
17020
17016
|
let t2;
|
|
17021
17017
|
let t3;
|
|
17022
17018
|
let t4;
|
|
17023
|
-
if ($[0] !== activeRowId || $[1] !== bordered || $[2] !== isExpandedRowContent || $[3] !==
|
|
17019
|
+
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) {
|
|
17024
17020
|
const isExpanded = row.getIsExpanded();
|
|
17025
17021
|
const isActive = activeRowId === row.id;
|
|
17026
17022
|
T0 = TableRow;
|
|
17027
17023
|
t1 = virtualRow.index;
|
|
17028
|
-
if ($[
|
|
17024
|
+
if ($[17] !== rowHeightsMapRef || $[18] !== rowVirtualizer || $[19] !== rowsMapRef || $[20] !== virtualRow.key) {
|
|
17029
17025
|
t2 = (row_0) => {
|
|
17030
17026
|
const key = String(virtualRow.key);
|
|
17031
17027
|
if (row_0) {
|
|
@@ -17035,13 +17031,13 @@ const DsTableRowVirtualized = (t0) => {
|
|
|
17035
17031
|
rowHeightsMapRef.current.set(key, height);
|
|
17036
17032
|
} else rowsMapRef.current.delete(key);
|
|
17037
17033
|
};
|
|
17038
|
-
$[
|
|
17039
|
-
$[
|
|
17040
|
-
$[
|
|
17041
|
-
$[
|
|
17042
|
-
$[
|
|
17043
|
-
} else t2 = $[
|
|
17044
|
-
t3 = isActive ? "active" :
|
|
17034
|
+
$[17] = rowHeightsMapRef;
|
|
17035
|
+
$[18] = rowVirtualizer;
|
|
17036
|
+
$[19] = rowsMapRef;
|
|
17037
|
+
$[20] = virtualRow.key;
|
|
17038
|
+
$[21] = t2;
|
|
17039
|
+
} else t2 = $[21];
|
|
17040
|
+
t3 = isActive ? "active" : isSelected ? "selected" : void 0;
|
|
17045
17041
|
t4 = (0, classnames.default)(ds_table_row_virtualized_module_default.row, {
|
|
17046
17042
|
[ds_table_row_virtualized_module_default.sizeSmall]: rowSize === "small",
|
|
17047
17043
|
[ds_table_row_virtualized_module_default.sizeMedium]: rowSize === "medium",
|
|
@@ -17050,47 +17046,49 @@ const DsTableRowVirtualized = (t0) => {
|
|
|
17050
17046
|
$[0] = activeRowId;
|
|
17051
17047
|
$[1] = bordered;
|
|
17052
17048
|
$[2] = isExpandedRowContent;
|
|
17053
|
-
$[3] =
|
|
17054
|
-
$[4] =
|
|
17055
|
-
$[5] =
|
|
17056
|
-
$[6] =
|
|
17057
|
-
$[7] =
|
|
17058
|
-
$[8] =
|
|
17059
|
-
$[9] =
|
|
17060
|
-
$[10] = virtualRow.
|
|
17061
|
-
$[11] =
|
|
17062
|
-
$[12] =
|
|
17063
|
-
$[13] =
|
|
17064
|
-
$[14] =
|
|
17065
|
-
$[15] =
|
|
17049
|
+
$[3] = isSelected;
|
|
17050
|
+
$[4] = onRowClick;
|
|
17051
|
+
$[5] = row;
|
|
17052
|
+
$[6] = rowHeightsMapRef;
|
|
17053
|
+
$[7] = rowSize;
|
|
17054
|
+
$[8] = rowVirtualizer;
|
|
17055
|
+
$[9] = rowsMapRef;
|
|
17056
|
+
$[10] = virtualRow.index;
|
|
17057
|
+
$[11] = virtualRow.key;
|
|
17058
|
+
$[12] = T0;
|
|
17059
|
+
$[13] = t1;
|
|
17060
|
+
$[14] = t2;
|
|
17061
|
+
$[15] = t3;
|
|
17062
|
+
$[16] = t4;
|
|
17066
17063
|
} else {
|
|
17067
|
-
T0 = $[
|
|
17068
|
-
t1 = $[
|
|
17069
|
-
t2 = $[
|
|
17070
|
-
t3 = $[
|
|
17071
|
-
t4 = $[
|
|
17064
|
+
T0 = $[12];
|
|
17065
|
+
t1 = $[13];
|
|
17066
|
+
t2 = $[14];
|
|
17067
|
+
t3 = $[15];
|
|
17068
|
+
t4 = $[16];
|
|
17072
17069
|
}
|
|
17073
17070
|
let t5;
|
|
17074
|
-
if ($[
|
|
17071
|
+
if ($[22] !== isExpandedRowContent || $[23] !== onRowClick || $[24] !== row.original) {
|
|
17075
17072
|
t5 = isExpandedRowContent ? void 0 : () => onRowClick?.(row.original);
|
|
17076
|
-
$[
|
|
17077
|
-
$[
|
|
17078
|
-
$[
|
|
17079
|
-
$[
|
|
17080
|
-
} else t5 = $[
|
|
17073
|
+
$[22] = isExpandedRowContent;
|
|
17074
|
+
$[23] = onRowClick;
|
|
17075
|
+
$[24] = row.original;
|
|
17076
|
+
$[25] = t5;
|
|
17077
|
+
} else t5 = $[25];
|
|
17081
17078
|
let t6;
|
|
17082
|
-
if ($[
|
|
17079
|
+
if ($[26] !== isExpandedRowContent || $[27] !== onRowDoubleClick || $[28] !== row.original) {
|
|
17083
17080
|
t6 = isExpandedRowContent ? void 0 : () => onRowDoubleClick?.(row.original);
|
|
17084
|
-
$[
|
|
17085
|
-
$[
|
|
17086
|
-
$[
|
|
17087
|
-
$[
|
|
17088
|
-
} else t6 = $[
|
|
17081
|
+
$[26] = isExpandedRowContent;
|
|
17082
|
+
$[27] = onRowDoubleClick;
|
|
17083
|
+
$[28] = row.original;
|
|
17084
|
+
$[29] = t6;
|
|
17085
|
+
} else t6 = $[29];
|
|
17089
17086
|
let t7;
|
|
17090
|
-
if ($[
|
|
17087
|
+
if ($[30] !== expandable || $[31] !== isExpandedRowContent || $[32] !== isSelected || $[33] !== primaryRowActions || $[34] !== renderExpandedRow || $[35] !== row || $[36] !== secondaryRowActions || $[37] !== selectable) {
|
|
17091
17088
|
t7 = isExpandedRowContent ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableCell, { children: renderExpandedRow?.(row.original) }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
17092
17089
|
selectable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableRowSelectableCell, {
|
|
17093
17090
|
row,
|
|
17091
|
+
isSelected,
|
|
17094
17092
|
className: ds_table_row_virtualized_module_default.selectableCell
|
|
17095
17093
|
}),
|
|
17096
17094
|
expandable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableRowExpandableCell, {
|
|
@@ -17114,17 +17112,18 @@ const DsTableRowVirtualized = (t0) => {
|
|
|
17114
17112
|
}, cell.id);
|
|
17115
17113
|
})
|
|
17116
17114
|
] });
|
|
17117
|
-
$[
|
|
17118
|
-
$[
|
|
17119
|
-
$[
|
|
17120
|
-
$[
|
|
17121
|
-
$[
|
|
17122
|
-
$[
|
|
17123
|
-
$[
|
|
17124
|
-
$[
|
|
17125
|
-
|
|
17115
|
+
$[30] = expandable;
|
|
17116
|
+
$[31] = isExpandedRowContent;
|
|
17117
|
+
$[32] = isSelected;
|
|
17118
|
+
$[33] = primaryRowActions;
|
|
17119
|
+
$[34] = renderExpandedRow;
|
|
17120
|
+
$[35] = row;
|
|
17121
|
+
$[36] = secondaryRowActions;
|
|
17122
|
+
$[37] = selectable;
|
|
17123
|
+
$[38] = t7;
|
|
17124
|
+
} else t7 = $[38];
|
|
17126
17125
|
let t8;
|
|
17127
|
-
if ($[
|
|
17126
|
+
if ($[39] !== T0 || $[40] !== t1 || $[41] !== t2 || $[42] !== t3 || $[43] !== t4 || $[44] !== t5 || $[45] !== t6 || $[46] !== t7) {
|
|
17128
17127
|
t8 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(T0, {
|
|
17129
17128
|
"data-index": t1,
|
|
17130
17129
|
ref: t2,
|
|
@@ -17134,21 +17133,21 @@ const DsTableRowVirtualized = (t0) => {
|
|
|
17134
17133
|
onDoubleClick: t6,
|
|
17135
17134
|
children: t7
|
|
17136
17135
|
});
|
|
17137
|
-
$[
|
|
17138
|
-
$[
|
|
17139
|
-
$[
|
|
17140
|
-
$[
|
|
17141
|
-
$[
|
|
17142
|
-
$[
|
|
17143
|
-
$[
|
|
17144
|
-
$[
|
|
17145
|
-
$[
|
|
17146
|
-
} else t8 = $[
|
|
17136
|
+
$[39] = T0;
|
|
17137
|
+
$[40] = t1;
|
|
17138
|
+
$[41] = t2;
|
|
17139
|
+
$[42] = t3;
|
|
17140
|
+
$[43] = t4;
|
|
17141
|
+
$[44] = t5;
|
|
17142
|
+
$[45] = t6;
|
|
17143
|
+
$[46] = t7;
|
|
17144
|
+
$[47] = t8;
|
|
17145
|
+
} else t8 = $[47];
|
|
17147
17146
|
return t8;
|
|
17148
17147
|
};
|
|
17149
17148
|
//#endregion
|
|
17150
17149
|
//#region src/components/ds-table/components/ds-table-body-virtualized/ds-table-body-virtualized.tsx
|
|
17151
|
-
const DsTableBodyVirtualized = ({ table, tableContainerRef, emptyState, estimateSize, overscan, onScroll }) => {
|
|
17150
|
+
const DsTableBodyVirtualized = ({ table, tableContainerRef, emptyState, estimateSize, overscan, onScroll, rowSelection }) => {
|
|
17152
17151
|
const rowsMapRef = (0, react.useRef)(/* @__PURE__ */ new Map());
|
|
17153
17152
|
const rowHeightsMapRef = (0, react.useRef)(/* @__PURE__ */ new Map());
|
|
17154
17153
|
const { rows } = table.getRowModel();
|
|
@@ -17200,28 +17199,29 @@ const DsTableBodyVirtualized = ({ table, tableContainerRef, emptyState, estimate
|
|
|
17200
17199
|
rowHeightsMapRef,
|
|
17201
17200
|
rowVirtualizer,
|
|
17202
17201
|
rowsAndExpandedRowContent,
|
|
17203
|
-
emptyState
|
|
17202
|
+
emptyState,
|
|
17203
|
+
rowSelection
|
|
17204
17204
|
});
|
|
17205
17205
|
};
|
|
17206
17206
|
function DsTableBody(t0) {
|
|
17207
|
-
const $ = (0, react_compiler_runtime.c)(
|
|
17208
|
-
const { rowVirtualizer, rowsMapRef, rowHeightsMapRef, rowsAndExpandedRowContent, emptyState } = t0;
|
|
17207
|
+
const $ = (0, react_compiler_runtime.c)(11);
|
|
17208
|
+
const { rowVirtualizer, rowsMapRef, rowHeightsMapRef, rowsAndExpandedRowContent, emptyState, rowSelection } = t0;
|
|
17209
17209
|
let t1;
|
|
17210
|
-
if ($[0] !== emptyState || $[1] !== rowHeightsMapRef || $[2] !==
|
|
17210
|
+
if ($[0] !== emptyState || $[1] !== rowHeightsMapRef || $[2] !== rowSelection || $[3] !== rowVirtualizer || $[4] !== rowsAndExpandedRowContent || $[5] !== rowsMapRef) {
|
|
17211
17211
|
const virtualRows = rowVirtualizer.getVirtualItems();
|
|
17212
17212
|
let t2;
|
|
17213
|
-
if ($[
|
|
17213
|
+
if ($[7] !== rowVirtualizer) {
|
|
17214
17214
|
t2 = rowVirtualizer.getTotalSize().toString();
|
|
17215
|
-
$[
|
|
17216
|
-
$[
|
|
17217
|
-
} else t2 = $[
|
|
17215
|
+
$[7] = rowVirtualizer;
|
|
17216
|
+
$[8] = t2;
|
|
17217
|
+
} else t2 = $[8];
|
|
17218
17218
|
const t3 = `${t2}px`;
|
|
17219
17219
|
let t4;
|
|
17220
|
-
if ($[
|
|
17220
|
+
if ($[9] !== t3) {
|
|
17221
17221
|
t4 = { height: t3 };
|
|
17222
|
-
$[
|
|
17223
|
-
$[
|
|
17224
|
-
} else t4 = $[
|
|
17222
|
+
$[9] = t3;
|
|
17223
|
+
$[10] = t4;
|
|
17224
|
+
} else t4 = $[10];
|
|
17225
17225
|
t1 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableBody, {
|
|
17226
17226
|
className: ds_table_body_virtualized_module_default.body,
|
|
17227
17227
|
style: t4,
|
|
@@ -17230,6 +17230,7 @@ function DsTableBody(t0) {
|
|
|
17230
17230
|
if (!row) return null;
|
|
17231
17231
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableRowVirtualized, {
|
|
17232
17232
|
row: row.row,
|
|
17233
|
+
isSelected: !!rowSelection[row.row.id],
|
|
17233
17234
|
isExpandedRowContent: row.isExpandedRowContent,
|
|
17234
17235
|
rowsMapRef,
|
|
17235
17236
|
rowHeightsMapRef,
|
|
@@ -17243,11 +17244,12 @@ function DsTableBody(t0) {
|
|
|
17243
17244
|
});
|
|
17244
17245
|
$[0] = emptyState;
|
|
17245
17246
|
$[1] = rowHeightsMapRef;
|
|
17246
|
-
$[2] =
|
|
17247
|
-
$[3] =
|
|
17248
|
-
$[4] =
|
|
17249
|
-
$[5] =
|
|
17250
|
-
|
|
17247
|
+
$[2] = rowSelection;
|
|
17248
|
+
$[3] = rowVirtualizer;
|
|
17249
|
+
$[4] = rowsAndExpandedRowContent;
|
|
17250
|
+
$[5] = rowsMapRef;
|
|
17251
|
+
$[6] = t1;
|
|
17252
|
+
} else t1 = $[6];
|
|
17251
17253
|
return t1;
|
|
17252
17254
|
}
|
|
17253
17255
|
//#endregion
|
|
@@ -17392,8 +17394,12 @@ const DsTable = ({ ref, columns, data: tableData, virtualized = false, virtualiz
|
|
|
17392
17394
|
emptyState,
|
|
17393
17395
|
estimateSize: virtualizedOptions?.estimateSize || ROW_SIZE_HEIGHT_MAP[rowSize],
|
|
17394
17396
|
overscan: virtualizedOptions?.overscan,
|
|
17395
|
-
onScroll
|
|
17396
|
-
|
|
17397
|
+
onScroll,
|
|
17398
|
+
rowSelection
|
|
17399
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableBody, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SortableWrapper, { children: rows.length ? rows.map((row_1) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableRow, {
|
|
17400
|
+
row: row_1,
|
|
17401
|
+
isSelected: !!rowSelection[row_1.id]
|
|
17402
|
+
}, row_1.id)) : renderEmptyState() }) })]
|
|
17397
17403
|
}) })
|
|
17398
17404
|
}), selectable && actions.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableBulkActions, {
|
|
17399
17405
|
numSelectedRows: selectedRows.length,
|