@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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @drivenets/design-system
2
2
 
3
+ ## 0.7.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 0a8cdaa: Add `isSelected` prop to `DsTableRow`
8
+
3
9
  ## 0.7.2
4
10
 
5
11
  ### Patch Changes
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)(15);
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.getIsSelected();
16484
+ t2 = row.getCanSelect();
16485
16485
  $[2] = row;
16486
16486
  $[3] = t2;
16487
16487
  } else t2 = $[3];
16488
- let t3;
16488
+ const t3 = !t2;
16489
+ let t4;
16489
16490
  if ($[4] !== row) {
16490
- t3 = row.getCanSelect();
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
- $[6] = row;
16502
- $[7] = t5;
16503
- } else t5 = $[7];
16504
- let t6;
16505
- if ($[8] !== t2 || $[9] !== t4 || $[10] !== t5) {
16506
- t6 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsCheckbox, {
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: t2,
16509
- disabled: t4,
16510
- onClick: t5,
16502
+ checked: isSelected,
16503
+ disabled: t3,
16504
+ onClick: t4,
16511
16505
  onDoubleClick: _temp$4
16512
16506
  });
16513
- $[8] = t2;
16514
- $[9] = t4;
16515
- $[10] = t5;
16516
- $[11] = t6;
16517
- } else t6 = $[11];
16518
- let t7;
16519
- if ($[12] !== t1 || $[13] !== t6) {
16520
- t7 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableCell, {
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: t6
16516
+ children: t5
16523
16517
  });
16524
- $[12] = t1;
16525
- $[13] = t6;
16526
- $[14] = t7;
16527
- } else t7 = $[14];
16528
- return t7;
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)(57);
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" : row.getIsSelected() ? "selected" : void 0;
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] !== row || $[21] !== selectable) {
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] = row;
16749
- $[21] = selectable;
16750
- $[22] = t11;
16751
- } else t11 = $[22];
16743
+ $[20] = isSelected;
16744
+ $[21] = row;
16745
+ $[22] = selectable;
16746
+ $[23] = t11;
16747
+ } else t11 = $[23];
16752
16748
  let t12;
16753
- if ($[23] !== expandable || $[24] !== row) {
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
- $[23] = expandable;
16760
- $[24] = row;
16761
- $[25] = t12;
16762
- } else t12 = $[25];
16755
+ $[24] = expandable;
16756
+ $[25] = row;
16757
+ $[26] = t12;
16758
+ } else t12 = $[26];
16763
16759
  let t13;
16764
- if ($[26] !== attributes || $[27] !== isDragging || $[28] !== listeners || $[29] !== reorderable) {
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
- $[26] = attributes;
16771
- $[27] = isDragging;
16772
- $[28] = listeners;
16773
- $[29] = reorderable;
16774
- $[30] = t13;
16775
- } else t13 = $[30];
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 ($[31] !== primaryRowActions || $[32] !== row || $[33] !== secondaryRowActions) {
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
- $[31] = primaryRowActions;
16796
- $[32] = row;
16797
- $[33] = secondaryRowActions;
16798
- $[34] = t14;
16799
- } else t14 = $[34];
16791
+ $[32] = primaryRowActions;
16792
+ $[33] = row;
16793
+ $[34] = secondaryRowActions;
16794
+ $[35] = t14;
16795
+ } else t14 = $[35];
16800
16796
  let t15;
16801
- if ($[35] !== T0 || $[36] !== rowStyle || $[37] !== t10 || $[38] !== t11 || $[39] !== t12 || $[40] !== t13 || $[41] !== t14 || $[42] !== t6 || $[43] !== t7 || $[44] !== t8 || $[45] !== t9) {
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
- $[35] = T0;
16817
- $[36] = rowStyle;
16818
- $[37] = t10;
16819
- $[38] = t11;
16820
- $[39] = t12;
16821
- $[40] = t13;
16822
- $[41] = t14;
16823
- $[42] = t6;
16824
- $[43] = t7;
16825
- $[44] = t8;
16826
- $[45] = t9;
16827
- $[46] = t15;
16828
- } else t15 = $[46];
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 ($[47] !== isExpandable || $[48] !== isExpanded || $[49] !== renderExpandedRow || $[50] !== reorderable || $[51] !== row || $[52] !== selectable) {
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
- $[47] = isExpandable;
16840
- $[48] = isExpanded;
16841
- $[49] = renderExpandedRow;
16842
- $[50] = reorderable;
16843
- $[51] = row;
16844
- $[52] = selectable;
16845
- $[53] = t16;
16846
- } else t16 = $[53];
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 ($[54] !== t15 || $[55] !== t16) {
16844
+ if ($[55] !== t15 || $[56] !== t16) {
16849
16845
  t17 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [t15, t16] });
16850
- $[54] = t15;
16851
- $[55] = t16;
16852
- $[56] = t17;
16853
- } else t17 = $[56];
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)(46);
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] !== onRowClick || $[4] !== row || $[5] !== rowHeightsMapRef || $[6] !== rowSize || $[7] !== rowVirtualizer || $[8] !== rowsMapRef || $[9] !== virtualRow.index || $[10] !== virtualRow.key) {
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 ($[16] !== rowHeightsMapRef || $[17] !== rowVirtualizer || $[18] !== rowsMapRef || $[19] !== virtualRow.key) {
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
- $[16] = rowHeightsMapRef;
17039
- $[17] = rowVirtualizer;
17040
- $[18] = rowsMapRef;
17041
- $[19] = virtualRow.key;
17042
- $[20] = t2;
17043
- } else t2 = $[20];
17044
- t3 = isActive ? "active" : row.getIsSelected() ? "selected" : void 0;
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] = onRowClick;
17054
- $[4] = row;
17055
- $[5] = rowHeightsMapRef;
17056
- $[6] = rowSize;
17057
- $[7] = rowVirtualizer;
17058
- $[8] = rowsMapRef;
17059
- $[9] = virtualRow.index;
17060
- $[10] = virtualRow.key;
17061
- $[11] = T0;
17062
- $[12] = t1;
17063
- $[13] = t2;
17064
- $[14] = t3;
17065
- $[15] = t4;
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 = $[11];
17068
- t1 = $[12];
17069
- t2 = $[13];
17070
- t3 = $[14];
17071
- t4 = $[15];
17064
+ T0 = $[12];
17065
+ t1 = $[13];
17066
+ t2 = $[14];
17067
+ t3 = $[15];
17068
+ t4 = $[16];
17072
17069
  }
17073
17070
  let t5;
17074
- if ($[21] !== isExpandedRowContent || $[22] !== onRowClick || $[23] !== row.original) {
17071
+ if ($[22] !== isExpandedRowContent || $[23] !== onRowClick || $[24] !== row.original) {
17075
17072
  t5 = isExpandedRowContent ? void 0 : () => onRowClick?.(row.original);
17076
- $[21] = isExpandedRowContent;
17077
- $[22] = onRowClick;
17078
- $[23] = row.original;
17079
- $[24] = t5;
17080
- } else t5 = $[24];
17073
+ $[22] = isExpandedRowContent;
17074
+ $[23] = onRowClick;
17075
+ $[24] = row.original;
17076
+ $[25] = t5;
17077
+ } else t5 = $[25];
17081
17078
  let t6;
17082
- if ($[25] !== isExpandedRowContent || $[26] !== onRowDoubleClick || $[27] !== row.original) {
17079
+ if ($[26] !== isExpandedRowContent || $[27] !== onRowDoubleClick || $[28] !== row.original) {
17083
17080
  t6 = isExpandedRowContent ? void 0 : () => onRowDoubleClick?.(row.original);
17084
- $[25] = isExpandedRowContent;
17085
- $[26] = onRowDoubleClick;
17086
- $[27] = row.original;
17087
- $[28] = t6;
17088
- } else t6 = $[28];
17081
+ $[26] = isExpandedRowContent;
17082
+ $[27] = onRowDoubleClick;
17083
+ $[28] = row.original;
17084
+ $[29] = t6;
17085
+ } else t6 = $[29];
17089
17086
  let t7;
17090
- if ($[29] !== expandable || $[30] !== isExpandedRowContent || $[31] !== primaryRowActions || $[32] !== renderExpandedRow || $[33] !== row || $[34] !== secondaryRowActions || $[35] !== selectable) {
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
- $[29] = expandable;
17118
- $[30] = isExpandedRowContent;
17119
- $[31] = primaryRowActions;
17120
- $[32] = renderExpandedRow;
17121
- $[33] = row;
17122
- $[34] = secondaryRowActions;
17123
- $[35] = selectable;
17124
- $[36] = t7;
17125
- } else t7 = $[36];
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 ($[37] !== T0 || $[38] !== t1 || $[39] !== t2 || $[40] !== t3 || $[41] !== t4 || $[42] !== t5 || $[43] !== t6 || $[44] !== t7) {
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
- $[37] = T0;
17138
- $[38] = t1;
17139
- $[39] = t2;
17140
- $[40] = t3;
17141
- $[41] = t4;
17142
- $[42] = t5;
17143
- $[43] = t6;
17144
- $[44] = t7;
17145
- $[45] = t8;
17146
- } else t8 = $[45];
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)(10);
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] !== rowVirtualizer || $[3] !== rowsAndExpandedRowContent || $[4] !== rowsMapRef) {
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 ($[6] !== rowVirtualizer) {
17213
+ if ($[7] !== rowVirtualizer) {
17214
17214
  t2 = rowVirtualizer.getTotalSize().toString();
17215
- $[6] = rowVirtualizer;
17216
- $[7] = t2;
17217
- } else t2 = $[7];
17215
+ $[7] = rowVirtualizer;
17216
+ $[8] = t2;
17217
+ } else t2 = $[8];
17218
17218
  const t3 = `${t2}px`;
17219
17219
  let t4;
17220
- if ($[8] !== t3) {
17220
+ if ($[9] !== t3) {
17221
17221
  t4 = { height: t3 };
17222
- $[8] = t3;
17223
- $[9] = t4;
17224
- } else t4 = $[9];
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] = rowVirtualizer;
17247
- $[3] = rowsAndExpandedRowContent;
17248
- $[4] = rowsMapRef;
17249
- $[5] = t1;
17250
- } else t1 = $[5];
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
- }) : /* @__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, { row: row_1 }, row_1.id)) : renderEmptyState() }) })]
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,