eidos-ui 1.2.0 → 2.1.0

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 (225) hide show
  1. package/dist/Avatar.types-BY-C09Ke.d.cts +23 -0
  2. package/dist/Avatar.types-BY-C09Ke.d.ts +23 -0
  3. package/dist/{Header.types-BZi80bWz.d.cts → Header.types-B3QtuiL-.d.cts} +7 -3
  4. package/dist/{Header.types-DJt-q01P.d.ts → Header.types-C6w0FBY8.d.ts} +7 -3
  5. package/dist/Table.types-CPj-udMc.d.cts +278 -0
  6. package/dist/Table.types-CZZ7QWAI.d.ts +278 -0
  7. package/dist/Toolbar.types-DSk8z2iy.d.cts +38 -0
  8. package/dist/Toolbar.types-RN0klQzu.d.ts +38 -0
  9. package/dist/alert/index.cjs +4 -4
  10. package/dist/alert/index.d.cts +2 -1
  11. package/dist/alert/index.d.ts +2 -1
  12. package/dist/alert/index.js +3 -3
  13. package/dist/avatar/index.d.cts +3 -21
  14. package/dist/avatar/index.d.ts +3 -21
  15. package/dist/button/index.cjs +3 -3
  16. package/dist/button/index.js +2 -2
  17. package/dist/chip/index.cjs +3 -3
  18. package/dist/chip/index.js +2 -2
  19. package/dist/{chunk-KIXFSXIN.cjs → chunk-3E7TKBQI.cjs} +5 -3
  20. package/dist/chunk-3E7TKBQI.cjs.map +1 -0
  21. package/dist/{chunk-ZBKJ3EMK.cjs → chunk-442U3W6R.cjs} +3 -3
  22. package/dist/{chunk-ZBKJ3EMK.cjs.map → chunk-442U3W6R.cjs.map} +1 -1
  23. package/dist/{chunk-YQLCPKGV.js → chunk-5HUZYY54.js} +6 -4
  24. package/dist/chunk-5HUZYY54.js.map +1 -0
  25. package/dist/{chunk-G5IGADJI.cjs → chunk-5VM2256W.cjs} +7 -11
  26. package/dist/chunk-5VM2256W.cjs.map +1 -0
  27. package/dist/{chunk-Z4ZY7L7W.js → chunk-5ZL6PYU3.js} +3 -3
  28. package/dist/{chunk-A3NE2C7C.js → chunk-67RFMV6K.js} +2 -2
  29. package/dist/{chunk-2U7UJOOB.cjs → chunk-6HUHH6Y4.cjs} +17 -15
  30. package/dist/chunk-6HUHH6Y4.cjs.map +1 -0
  31. package/dist/{chunk-5WROPW7Z.js → chunk-A7WQINIG.js} +3 -3
  32. package/dist/{chunk-DKZTDYH5.cjs → chunk-AAA6TR5I.cjs} +3 -3
  33. package/dist/{chunk-DKZTDYH5.cjs.map → chunk-AAA6TR5I.cjs.map} +1 -1
  34. package/dist/{chunk-A7Z2QAFZ.cjs → chunk-APK5OQRV.cjs} +5 -5
  35. package/dist/{chunk-A7Z2QAFZ.cjs.map → chunk-APK5OQRV.cjs.map} +1 -1
  36. package/dist/{chunk-ISABZ2VX.cjs → chunk-AXBYJ2OY.cjs} +9 -9
  37. package/dist/{chunk-ISABZ2VX.cjs.map → chunk-AXBYJ2OY.cjs.map} +1 -1
  38. package/dist/{chunk-6RGJAQCU.cjs → chunk-B5G5XVFJ.cjs} +5 -5
  39. package/dist/{chunk-6RGJAQCU.cjs.map → chunk-B5G5XVFJ.cjs.map} +1 -1
  40. package/dist/{chunk-MW2S7PZ7.cjs → chunk-D5IY2HUV.cjs} +5 -5
  41. package/dist/{chunk-MW2S7PZ7.cjs.map → chunk-D5IY2HUV.cjs.map} +1 -1
  42. package/dist/{chunk-FMPXSF3H.cjs → chunk-DAXZRNNO.cjs} +4 -4
  43. package/dist/{chunk-FMPXSF3H.cjs.map → chunk-DAXZRNNO.cjs.map} +1 -1
  44. package/dist/{chunk-6DBCT5MK.js → chunk-EXITZVB2.js} +24 -9
  45. package/dist/chunk-EXITZVB2.js.map +1 -0
  46. package/dist/{chunk-AYMD4D4M.cjs → chunk-EZME5CLK.cjs} +3 -3
  47. package/dist/{chunk-AYMD4D4M.cjs.map → chunk-EZME5CLK.cjs.map} +1 -1
  48. package/dist/{chunk-IV4LM3MB.js → chunk-F26VIKNF.js} +9 -11
  49. package/dist/chunk-F26VIKNF.js.map +1 -0
  50. package/dist/{chunk-WPTMMOA6.cjs → chunk-G77YR73R.cjs} +10 -13
  51. package/dist/chunk-G77YR73R.cjs.map +1 -0
  52. package/dist/chunk-GEHL4LKK.cjs +32 -0
  53. package/dist/chunk-GEHL4LKK.cjs.map +1 -0
  54. package/dist/chunk-GGSII6Y2.cjs +921 -0
  55. package/dist/chunk-GGSII6Y2.cjs.map +1 -0
  56. package/dist/{chunk-3VRMTWUS.js → chunk-GHQ6SQPI.js} +7 -10
  57. package/dist/chunk-GHQ6SQPI.js.map +1 -0
  58. package/dist/{chunk-56B6RLOE.js → chunk-GI6VJYOS.js} +4 -4
  59. package/dist/{chunk-56B6RLOE.js.map → chunk-GI6VJYOS.js.map} +1 -1
  60. package/dist/{chunk-UGMONQGH.cjs → chunk-GR2PMCVN.cjs} +10 -12
  61. package/dist/chunk-GR2PMCVN.cjs.map +1 -0
  62. package/dist/{chunk-7AHZTHXR.cjs → chunk-GT22EGJP.cjs} +5 -5
  63. package/dist/{chunk-7AHZTHXR.cjs.map → chunk-GT22EGJP.cjs.map} +1 -1
  64. package/dist/{chunk-ALGX5X4N.js → chunk-IFVT5UCY.js} +3 -3
  65. package/dist/{chunk-5CLC3FJO.js → chunk-KBG77JHC.js} +13 -2
  66. package/dist/chunk-KBG77JHC.js.map +1 -0
  67. package/dist/{chunk-HLNKIAE5.cjs → chunk-KJZUYC4X.cjs} +5 -5
  68. package/dist/{chunk-HLNKIAE5.cjs.map → chunk-KJZUYC4X.cjs.map} +1 -1
  69. package/dist/{chunk-4BQM5F76.cjs → chunk-LFWPQYWX.cjs} +3 -3
  70. package/dist/{chunk-4BQM5F76.cjs.map → chunk-LFWPQYWX.cjs.map} +1 -1
  71. package/dist/{chunk-TKLWQWMT.cjs → chunk-LIFUHQH5.cjs} +35 -20
  72. package/dist/chunk-LIFUHQH5.cjs.map +1 -0
  73. package/dist/{chunk-PJC7NZUV.cjs → chunk-LUL6RZ4M.cjs} +3 -3
  74. package/dist/{chunk-PJC7NZUV.cjs.map → chunk-LUL6RZ4M.cjs.map} +1 -1
  75. package/dist/{chunk-4UJ7LG4W.cjs → chunk-N2IGZIEX.cjs} +3 -3
  76. package/dist/{chunk-4UJ7LG4W.cjs.map → chunk-N2IGZIEX.cjs.map} +1 -1
  77. package/dist/{chunk-3LHQUOGP.js → chunk-NGVOXM7P.js} +3 -3
  78. package/dist/{chunk-WTXASLBB.js → chunk-O5WEKLNF.js} +2 -2
  79. package/dist/{chunk-BOB5JJ7F.js → chunk-P7IQY5YH.js} +2 -2
  80. package/dist/{chunk-VZYLJSV5.js → chunk-R4PU2TBM.js} +2 -2
  81. package/dist/{chunk-P2GCAVUZ.js → chunk-RAZRQ57B.js} +2 -2
  82. package/dist/{chunk-K7IFNKMN.js → chunk-REVK7IGN.js} +2 -2
  83. package/dist/{chunk-6U2H26A4.cjs → chunk-RHOT7AEI.cjs} +3 -3
  84. package/dist/{chunk-6U2H26A4.cjs.map → chunk-RHOT7AEI.cjs.map} +1 -1
  85. package/dist/{chunk-P2ZHWFK4.js → chunk-RKA2OJRT.js} +228 -119
  86. package/dist/chunk-RKA2OJRT.js.map +1 -0
  87. package/dist/{chunk-JC4WLVBG.js → chunk-RWOX2NJN.js} +2 -2
  88. package/dist/{chunk-4LM33LDV.js → chunk-S3CT536K.js} +2 -2
  89. package/dist/{chunk-4M3LZLOH.js → chunk-SHYSLWQG.js} +2 -2
  90. package/dist/{chunk-EQEV7GPT.cjs → chunk-SKEWTQJ7.cjs} +5 -5
  91. package/dist/{chunk-EQEV7GPT.cjs.map → chunk-SKEWTQJ7.cjs.map} +1 -1
  92. package/dist/{chunk-6XB3QTHO.cjs → chunk-SKTDGCWJ.cjs} +268 -159
  93. package/dist/chunk-SKTDGCWJ.cjs.map +1 -0
  94. package/dist/{chunk-2BXCIWL7.js → chunk-SN6EWQDJ.js} +3 -3
  95. package/dist/{chunk-DW2YDWGN.js → chunk-TEJIPPZR.js} +2 -2
  96. package/dist/{chunk-OGKD5PLS.cjs → chunk-TRLBYA5G.cjs} +4 -4
  97. package/dist/{chunk-OGKD5PLS.cjs.map → chunk-TRLBYA5G.cjs.map} +1 -1
  98. package/dist/{chunk-WE5FTQGD.js → chunk-VHMOKXUT.js} +3 -7
  99. package/dist/chunk-VHMOKXUT.js.map +1 -0
  100. package/dist/{chunk-S77GR5YQ.cjs → chunk-VHQTDITV.cjs} +3 -3
  101. package/dist/{chunk-S77GR5YQ.cjs.map → chunk-VHQTDITV.cjs.map} +1 -1
  102. package/dist/{chunk-3HMKE2GJ.js → chunk-VSTQEHVZ.js} +6 -4
  103. package/dist/chunk-VSTQEHVZ.js.map +1 -0
  104. package/dist/{chunk-HNUTV3HR.cjs → chunk-WUBQJVB7.cjs} +3 -3
  105. package/dist/{chunk-HNUTV3HR.cjs.map → chunk-WUBQJVB7.cjs.map} +1 -1
  106. package/dist/{chunk-S7TWEVC3.js → chunk-Y53HCLGW.js} +2 -2
  107. package/dist/{chunk-WIE7HDIM.js → chunk-YJXZR7RL.js} +2 -2
  108. package/dist/{chunk-IJYYHBZC.cjs → chunk-Z4SLV6WG.cjs} +3 -3
  109. package/dist/{chunk-IJYYHBZC.cjs.map → chunk-Z4SLV6WG.cjs.map} +1 -1
  110. package/dist/chunk-ZEZK664O.js +921 -0
  111. package/dist/chunk-ZEZK664O.js.map +1 -0
  112. package/dist/{chunk-JMD3P4CY.js → chunk-ZHFPV43D.js} +2 -2
  113. package/dist/combobox/index.cjs +4 -4
  114. package/dist/combobox/index.js +3 -3
  115. package/dist/context-menu/index.cjs +4 -4
  116. package/dist/context-menu/index.js +3 -3
  117. package/dist/data-grid/index.cjs +13 -13
  118. package/dist/data-grid/index.d.cts +169 -51
  119. package/dist/data-grid/index.d.ts +169 -51
  120. package/dist/data-grid/index.js +12 -12
  121. package/dist/date-picker/index.cjs +6 -6
  122. package/dist/date-picker/index.js +5 -5
  123. package/dist/drawer/index.cjs +4 -4
  124. package/dist/drawer/index.d.cts +2 -1
  125. package/dist/drawer/index.d.ts +2 -1
  126. package/dist/drawer/index.js +3 -3
  127. package/dist/empty-state/index.d.cts +2 -2
  128. package/dist/empty-state/index.d.ts +2 -2
  129. package/dist/header/index.cjs +4 -4
  130. package/dist/header/index.d.cts +2 -2
  131. package/dist/header/index.d.ts +2 -2
  132. package/dist/header/index.js +3 -3
  133. package/dist/index.cjs +29 -29
  134. package/dist/index.css +318 -73
  135. package/dist/index.d.cts +6 -5
  136. package/dist/index.d.ts +6 -5
  137. package/dist/index.js +28 -28
  138. package/dist/inline-edit/index.cjs +4 -4
  139. package/dist/inline-edit/index.js +3 -3
  140. package/dist/input/index.cjs +3 -3
  141. package/dist/input/index.js +2 -2
  142. package/dist/menu/index.cjs +3 -3
  143. package/dist/menu/index.js +2 -2
  144. package/dist/modal/index.cjs +4 -4
  145. package/dist/modal/index.d.cts +2 -1
  146. package/dist/modal/index.d.ts +2 -1
  147. package/dist/modal/index.js +3 -3
  148. package/dist/navigation/index.cjs +4 -4
  149. package/dist/navigation/index.js +3 -3
  150. package/dist/page-layout/index.cjs +8 -8
  151. package/dist/page-layout/index.d.cts +3 -2
  152. package/dist/page-layout/index.d.ts +3 -2
  153. package/dist/page-layout/index.js +7 -7
  154. package/dist/pagination/index.cjs +6 -6
  155. package/dist/pagination/index.js +5 -5
  156. package/dist/popover/index.cjs +2 -2
  157. package/dist/popover/index.d.cts +2 -2
  158. package/dist/popover/index.d.ts +2 -2
  159. package/dist/popover/index.js +1 -1
  160. package/dist/segmented-control/index.cjs +3 -3
  161. package/dist/segmented-control/index.js +2 -2
  162. package/dist/select/index.cjs +4 -4
  163. package/dist/select/index.js +3 -3
  164. package/dist/snackbar/index.cjs +4 -4
  165. package/dist/snackbar/index.js +3 -3
  166. package/dist/split-button/index.cjs +4 -4
  167. package/dist/split-button/index.js +3 -3
  168. package/dist/table/index.cjs +11 -11
  169. package/dist/table/index.d.cts +5 -5
  170. package/dist/table/index.d.ts +5 -5
  171. package/dist/table/index.js +10 -10
  172. package/dist/tabs/index.cjs +3 -3
  173. package/dist/tabs/index.js +2 -2
  174. package/dist/tag-input/index.cjs +4 -4
  175. package/dist/tag-input/index.js +3 -3
  176. package/dist/textarea/index.cjs +3 -3
  177. package/dist/textarea/index.js +2 -2
  178. package/dist/toolbar/index.cjs +5 -5
  179. package/dist/toolbar/index.d.cts +3 -2
  180. package/dist/toolbar/index.d.ts +3 -2
  181. package/dist/toolbar/index.js +4 -4
  182. package/package.json +6 -5
  183. package/dist/Table.types-Bv9l7qxd.d.ts +0 -103
  184. package/dist/Table.types-DQ0ReOLj.d.cts +0 -103
  185. package/dist/Toolbar.types-BGD57Uhm.d.ts +0 -22
  186. package/dist/Toolbar.types-tQkLmPIu.d.cts +0 -22
  187. package/dist/chunk-2KO5ZCZC.js +0 -744
  188. package/dist/chunk-2KO5ZCZC.js.map +0 -1
  189. package/dist/chunk-2U7UJOOB.cjs.map +0 -1
  190. package/dist/chunk-3HMKE2GJ.js.map +0 -1
  191. package/dist/chunk-3VRMTWUS.js.map +0 -1
  192. package/dist/chunk-5CLC3FJO.js.map +0 -1
  193. package/dist/chunk-6DBCT5MK.js.map +0 -1
  194. package/dist/chunk-6XB3QTHO.cjs.map +0 -1
  195. package/dist/chunk-G5IGADJI.cjs.map +0 -1
  196. package/dist/chunk-GOR642KK.cjs +0 -21
  197. package/dist/chunk-GOR642KK.cjs.map +0 -1
  198. package/dist/chunk-IV4LM3MB.js.map +0 -1
  199. package/dist/chunk-KIXFSXIN.cjs.map +0 -1
  200. package/dist/chunk-NUK4NT5Q.cjs +0 -744
  201. package/dist/chunk-NUK4NT5Q.cjs.map +0 -1
  202. package/dist/chunk-P2ZHWFK4.js.map +0 -1
  203. package/dist/chunk-TKLWQWMT.cjs.map +0 -1
  204. package/dist/chunk-UGMONQGH.cjs.map +0 -1
  205. package/dist/chunk-WE5FTQGD.js.map +0 -1
  206. package/dist/chunk-WPTMMOA6.cjs.map +0 -1
  207. package/dist/chunk-YQLCPKGV.js.map +0 -1
  208. /package/dist/{chunk-Z4ZY7L7W.js.map → chunk-5ZL6PYU3.js.map} +0 -0
  209. /package/dist/{chunk-A3NE2C7C.js.map → chunk-67RFMV6K.js.map} +0 -0
  210. /package/dist/{chunk-5WROPW7Z.js.map → chunk-A7WQINIG.js.map} +0 -0
  211. /package/dist/{chunk-ALGX5X4N.js.map → chunk-IFVT5UCY.js.map} +0 -0
  212. /package/dist/{chunk-3LHQUOGP.js.map → chunk-NGVOXM7P.js.map} +0 -0
  213. /package/dist/{chunk-WTXASLBB.js.map → chunk-O5WEKLNF.js.map} +0 -0
  214. /package/dist/{chunk-BOB5JJ7F.js.map → chunk-P7IQY5YH.js.map} +0 -0
  215. /package/dist/{chunk-VZYLJSV5.js.map → chunk-R4PU2TBM.js.map} +0 -0
  216. /package/dist/{chunk-P2GCAVUZ.js.map → chunk-RAZRQ57B.js.map} +0 -0
  217. /package/dist/{chunk-K7IFNKMN.js.map → chunk-REVK7IGN.js.map} +0 -0
  218. /package/dist/{chunk-JC4WLVBG.js.map → chunk-RWOX2NJN.js.map} +0 -0
  219. /package/dist/{chunk-4LM33LDV.js.map → chunk-S3CT536K.js.map} +0 -0
  220. /package/dist/{chunk-4M3LZLOH.js.map → chunk-SHYSLWQG.js.map} +0 -0
  221. /package/dist/{chunk-2BXCIWL7.js.map → chunk-SN6EWQDJ.js.map} +0 -0
  222. /package/dist/{chunk-DW2YDWGN.js.map → chunk-TEJIPPZR.js.map} +0 -0
  223. /package/dist/{chunk-S7TWEVC3.js.map → chunk-Y53HCLGW.js.map} +0 -0
  224. /package/dist/{chunk-WIE7HDIM.js.map → chunk-YJXZR7RL.js.map} +0 -0
  225. /package/dist/{chunk-JMD3P4CY.js.map → chunk-ZHFPV43D.js.map} +0 -0
@@ -11,22 +11,22 @@ import {
11
11
  useSensors,
12
12
  useSortable,
13
13
  verticalListSortingStrategy
14
- } from "./chunk-6DBCT5MK.js";
14
+ } from "./chunk-EXITZVB2.js";
15
15
  import {
16
16
  Spinner
17
17
  } from "./chunk-6ZAT5CGB.js";
18
18
  import {
19
19
  SplitButton
20
- } from "./chunk-3LHQUOGP.js";
20
+ } from "./chunk-NGVOXM7P.js";
21
21
  import {
22
22
  Pagination
23
- } from "./chunk-56B6RLOE.js";
23
+ } from "./chunk-GI6VJYOS.js";
24
24
  import {
25
25
  SegmentedControl
26
- } from "./chunk-BOB5JJ7F.js";
26
+ } from "./chunk-P7IQY5YH.js";
27
27
  import {
28
28
  Select
29
- } from "./chunk-5WROPW7Z.js";
29
+ } from "./chunk-A7WQINIG.js";
30
30
  import {
31
31
  EmptyState
32
32
  } from "./chunk-3TUCQAYL.js";
@@ -35,22 +35,23 @@ import {
35
35
  } from "./chunk-H6CWTMAH.js";
36
36
  import {
37
37
  Combobox
38
- } from "./chunk-DW2YDWGN.js";
38
+ } from "./chunk-TEJIPPZR.js";
39
39
  import {
40
40
  Input
41
- } from "./chunk-WE5FTQGD.js";
41
+ } from "./chunk-VHMOKXUT.js";
42
42
  import {
43
43
  Menu
44
- } from "./chunk-JMD3P4CY.js";
44
+ } from "./chunk-ZHFPV43D.js";
45
45
  import {
46
46
  Dropdown
47
47
  } from "./chunk-4BKTBV2I.js";
48
48
  import {
49
49
  Button
50
- } from "./chunk-WIE7HDIM.js";
50
+ } from "./chunk-YJXZR7RL.js";
51
51
  import {
52
+ devWarn,
52
53
  renderIcon
53
- } from "./chunk-5CLC3FJO.js";
54
+ } from "./chunk-KBG77JHC.js";
54
55
 
55
56
  // src/components/DataGrid/DataGrid.component.tsx
56
57
  import React, { useState, useEffect, useRef, useCallback, useMemo, useLayoutEffect } from "react";
@@ -61,7 +62,6 @@ import {
61
62
  ArrowDown,
62
63
  ChevronsUpDown,
63
64
  ChevronRight,
64
- X,
65
65
  Plus,
66
66
  AlignJustify,
67
67
  Check,
@@ -70,7 +70,14 @@ import {
70
70
  MoreVertical
71
71
  } from "lucide-react";
72
72
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
73
- var MIN_COLUMN_WIDTH_PX = 100;
73
+ var MIN_DATA_COLUMN_WIDTH_PX = 100;
74
+ var ACTIONS_COLUMN_WIDTH_PX = 48;
75
+ var CHECKBOX_COLUMN_WIDTH_PX = 40;
76
+ var ROW_NUMBER_COLUMN_WIDTH_PX = 40;
77
+ var DRAG_HANDLE_COLUMN_WIDTH_PX = 32;
78
+ var EXPAND_COLUMN_WIDTH_PX = 32;
79
+ var COMPACT_TOOLBAR_WIDTH_PX = 560;
80
+ var cellOf = (row, key) => row[key];
74
81
  var QUICK_FILTER_RESET_VALUE = "";
75
82
  var hasFilterValue = (value) => {
76
83
  if (value === void 0 || value === null || value === "") return false;
@@ -167,9 +174,9 @@ function ExpandedCardPanel({
167
174
  }
168
175
  function DataGridInner({
169
176
  // ── Existing props ─────────────────────────────────────────────────────────
170
- columns,
177
+ columns: columnsProp,
171
178
  data,
172
- rowKey = "id",
179
+ rowKey,
173
180
  onChange,
174
181
  onRowAdd,
175
182
  editable = false,
@@ -202,6 +209,8 @@ function DataGridInner({
202
209
  selectedRows: controlledSelectedRows,
203
210
  defaultSelectedRows,
204
211
  onSelectionChange,
212
+ selectAllScope = "all",
213
+ onSelectAllMatching,
205
214
  bulkActions,
206
215
  // ── Row expansion ────────────────────────────────────────────────────────────
207
216
  expandable = false,
@@ -219,6 +228,8 @@ function DataGridInner({
219
228
  cardViewBreakpoint = 640,
220
229
  cardMinWidth = 280
221
230
  }) {
231
+ const columns = columnsProp;
232
+ const rowKeyField = rowKey ?? "id";
222
233
  const [localData, _setLocalData] = useState(data);
223
234
  const localDataRef = useRef(data);
224
235
  const [editingCell, _setEditingCell] = useState(null);
@@ -272,22 +283,26 @@ function DataGridInner({
272
283
  );
273
284
  const [containerWidth, setContainerWidth] = useState(null);
274
285
  const resizeObserverRef = useRef(null);
275
- const setContainerRef = useCallback(
276
- (el) => {
277
- resizeObserverRef.current?.disconnect();
278
- resizeObserverRef.current = null;
279
- if (!el || !hasCardView) return;
280
- const observer = new ResizeObserver((entries) => {
281
- const width = entries[0]?.contentRect.width;
282
- if (width != null) setContainerWidth(width);
283
- });
284
- observer.observe(el);
285
- resizeObserverRef.current = observer;
286
- },
287
- [hasCardView]
286
+ const setContainerRef = useCallback((el) => {
287
+ resizeObserverRef.current?.disconnect();
288
+ resizeObserverRef.current = null;
289
+ if (!el) return;
290
+ const observer = new ResizeObserver((entries) => {
291
+ const width = entries[0]?.contentRect.width;
292
+ if (width != null) setContainerWidth(width);
293
+ });
294
+ observer.observe(el);
295
+ resizeObserverRef.current = observer;
296
+ }, []);
297
+ const minTableWidth = useMemo(
298
+ () => columns.reduce(
299
+ (total, column) => total + (column.type === "actions" ? ACTIONS_COLUMN_WIDTH_PX : MIN_DATA_COLUMN_WIDTH_PX),
300
+ (showRowNumbers ? ROW_NUMBER_COLUMN_WIDTH_PX : 0) + (draggableRows ? DRAG_HANDLE_COLUMN_WIDTH_PX : 0) + (selectable ? CHECKBOX_COLUMN_WIDTH_PX : 0) + (expandable ? EXPAND_COLUMN_WIDTH_PX : 0)
301
+ ),
302
+ [columns, showRowNumbers, draggableRows, selectable, expandable]
288
303
  );
289
- const columnCountForCardView = columns.length + (showRowNumbers ? 1 : 0) + (draggableRows ? 1 : 0) + (selectable ? 1 : 0) + (expandable ? 1 : 0);
290
- const isCardView = hasCardView && containerWidth !== null && (containerWidth < cardViewBreakpoint || containerWidth < columnCountForCardView * MIN_COLUMN_WIDTH_PX);
304
+ const isCardView = hasCardView && containerWidth !== null && (containerWidth < cardViewBreakpoint || containerWidth < minTableWidth);
305
+ const isCompactToolbar = containerWidth !== null && containerWidth < COMPACT_TOOLBAR_WIDTH_PX;
291
306
  const cardHeaderColumn = useMemo(() => columns.find((c) => c.cardHeader), [columns]);
292
307
  const cardSubheaderColumn = useMemo(() => columns.find((c) => c.cardSubheader), [columns]);
293
308
  const actionsColumn = useMemo(() => columns.find((c) => c.type === "actions"), [columns]);
@@ -295,6 +310,7 @@ function DataGridInner({
295
310
  () => columns.filter((c) => c !== actionsColumn),
296
311
  [columns, actionsColumn]
297
312
  );
313
+ const hasCardToolbar = selectable || showRowNumbers || expandable || !!cardHeaderColumn || !!cardSubheaderColumn || !!actionsColumn;
298
314
  const cardFieldColumns = useMemo(
299
315
  () => dataColumns.filter((c) => c !== cardHeaderColumn && c !== cardSubheaderColumn),
300
316
  [dataColumns, cardHeaderColumn, cardSubheaderColumn]
@@ -325,16 +341,36 @@ function DataGridInner({
325
341
  () => new Set(isControlledSelection ? controlledSelectedRows ?? [] : [...internalSelectedKeys]),
326
342
  [isControlledSelection, controlledSelectedRows, internalSelectedKeys]
327
343
  );
328
- const allKeys = useMemo(
329
- () => localData.map((row, idx) => String(row[rowKey] ?? idx)),
330
- [localData, rowKey]
331
- );
332
- const allSelected = allKeys.length > 0 && allKeys.every((k) => selectedSet.has(k));
333
- const someSelected = !allSelected && allKeys.some((k) => selectedSet.has(k));
334
344
  const hasSelection = selectedSet.size > 0;
345
+ const selectedRowCacheRef = useRef(/* @__PURE__ */ new Map());
346
+ const rowsForKeys = useCallback(
347
+ (keys) => {
348
+ const current = /* @__PURE__ */ new Map();
349
+ localDataRef.current.forEach(
350
+ (row, idx) => current.set(String(cellOf(row, rowKeyField) ?? idx), row)
351
+ );
352
+ const cache = selectedRowCacheRef.current;
353
+ return keys.map((key) => current.get(key) ?? cache.get(key)).filter((row) => row !== void 0);
354
+ },
355
+ [rowKeyField]
356
+ );
357
+ useEffect(() => {
358
+ const cache = selectedRowCacheRef.current;
359
+ const current = /* @__PURE__ */ new Map();
360
+ localData.forEach((row, idx) => current.set(String(cellOf(row, rowKeyField) ?? idx), row));
361
+ const next = /* @__PURE__ */ new Map();
362
+ selectedSet.forEach((key) => {
363
+ const row = current.get(key) ?? cache.get(key);
364
+ if (row) next.set(key, row);
365
+ });
366
+ selectedRowCacheRef.current = next;
367
+ }, [localData, selectedSet, rowKeyField]);
335
368
  const selectedItems = useMemo(
336
- () => localData.filter((row, idx) => selectedSet.has(String(row[rowKey] ?? idx))),
337
- [localData, selectedSet, rowKey]
369
+ () => rowsForKeys([...selectedSet]),
370
+ // `localData` isn't read directly here - `rowsForKeys` reads it through a
371
+ // ref - but it must still retrigger this when the loaded rows change.
372
+ // eslint-disable-next-line react-hooks/exhaustive-deps
373
+ [rowsForKeys, selectedSet, localData]
338
374
  );
339
375
  const expandedSet = useMemo(
340
376
  () => new Set(isControlledExpansion ? controlledExpandedRows ?? [] : [...internalExpandedKeys]),
@@ -373,7 +409,7 @@ function DataGridInner({
373
409
  if (filterEntries.length === 0) return localData;
374
410
  return localData.filter(
375
411
  (row) => filterEntries.every(([key, filterValue]) => {
376
- const cellValue = row[key];
412
+ const cellValue = cellOf(row, key);
377
413
  if (Array.isArray(filterValue)) {
378
414
  return filterValue.includes(String(cellValue ?? ""));
379
415
  }
@@ -394,8 +430,8 @@ function DataGridInner({
394
430
  const sortedData = useMemo(() => {
395
431
  if (onSortChange || !activeSort) return filteredData;
396
432
  return [...filteredData].sort((a, b) => {
397
- const aVal = a[activeSort.key];
398
- const bVal = b[activeSort.key];
433
+ const aVal = cellOf(a, activeSort.key);
434
+ const bVal = cellOf(b, activeSort.key);
399
435
  if (aVal == null && bVal == null) return 0;
400
436
  if (aVal == null) return 1;
401
437
  if (bVal == null) return -1;
@@ -411,6 +447,22 @@ function DataGridInner({
411
447
  }, [sortedData, showPagination, currentPage, currentPageSize, onPageChange]);
412
448
  const totalItemCount = totalRowsProp ?? sortedData.length;
413
449
  const totalPages = Math.max(1, Math.ceil(totalItemCount / currentPageSize));
450
+ const selectAllKeys = useMemo(
451
+ () => (selectAllScope === "page" ? displayData : localData).map(
452
+ (row, idx) => String(cellOf(row, rowKeyField) ?? idx)
453
+ ),
454
+ [selectAllScope, displayData, localData, rowKeyField]
455
+ );
456
+ const allSelected = selectAllKeys.length > 0 && selectAllKeys.every((key) => selectedSet.has(key));
457
+ const someSelected = !allSelected && selectAllKeys.some((key) => selectedSet.has(key));
458
+ useEffect(() => {
459
+ if (!selectable || selectAllScope !== "all") return;
460
+ if (totalItemCount <= localData.length) return;
461
+ devWarn(
462
+ `datagrid-select-all-scope:${localData.length}/${totalItemCount}`,
463
+ `DataGrid: selectAllScope="all" can only select the ${localData.length} row(s) currently loaded, but there are ${totalItemCount} in total. The keys of rows the grid has never received cannot be known here - use selectAllScope="page" to make the scope explicit, or resolve the full key set yourself and pass it as \`selectedRows\`.`
464
+ );
465
+ }, [selectable, selectAllScope, totalItemCount, localData.length]);
414
466
  const activeFiltersKey = useMemo(() => JSON.stringify(activeFilters), [activeFilters]);
415
467
  useEffect(() => {
416
468
  setCurrentPage(1);
@@ -509,7 +561,7 @@ function DataGridInner({
509
561
  localData.forEach((row, rowIndex) => {
510
562
  for (const col of columns) {
511
563
  if (!isCellEditable(col)) continue;
512
- const error = validateCell(col, row[col.key]);
564
+ const error = validateCell(col, cellOf(row, col.key));
513
565
  if (error) errors[cellErrorKey(rowIndex, col.key)] = error;
514
566
  }
515
567
  });
@@ -575,11 +627,12 @@ function DataGridInner({
575
627
  );
576
628
  const handleCellClick = useCallback(
577
629
  (rowIndex, col) => {
578
- const value = localDataRef.current[rowIndex]?.[col.key];
630
+ const row = localDataRef.current[rowIndex];
631
+ const value = row === void 0 ? void 0 : cellOf(row, col.key);
579
632
  if (col.type === "checkbox") {
580
633
  if (!editable || col.editable === false) return;
581
634
  const newData = localDataRef.current.map(
582
- (row, idx) => idx === rowIndex ? { ...row, [col.key]: !value } : row
635
+ (row2, idx) => idx === rowIndex ? { ...row2, [col.key]: !value } : row2
583
636
  );
584
637
  setLocalData(newData);
585
638
  onChange?.(newData);
@@ -620,7 +673,7 @@ function DataGridInner({
620
673
  commitValue(rowIndex, colKey, editValueRef.current);
621
674
  if (next) {
622
675
  setEditingCell(next);
623
- setEditValue(localDataRef.current[next.rowIndex][next.colKey]);
676
+ setEditValue(cellOf(localDataRef.current[next.rowIndex], next.colKey));
624
677
  setEditError(cellErrors[cellErrorKey(next.rowIndex, next.colKey)] ?? null);
625
678
  } else {
626
679
  setEditingCell(null);
@@ -650,12 +703,9 @@ function DataGridInner({
650
703
  const commitSelection = useCallback(
651
704
  (keys) => {
652
705
  if (!isControlledSelection) setInternalSelectedKeys(new Set(keys));
653
- const rows = localDataRef.current.filter(
654
- (row, idx) => keys.includes(String(row[rowKey] ?? idx))
655
- );
656
- onSelectionChange?.(keys, rows);
706
+ onSelectionChange?.(keys, rowsForKeys(keys));
657
707
  },
658
- [isControlledSelection, rowKey, onSelectionChange]
708
+ [isControlledSelection, onSelectionChange, rowsForKeys]
659
709
  );
660
710
  const toggleRow = useCallback(
661
711
  (key) => {
@@ -664,9 +714,30 @@ function DataGridInner({
664
714
  },
665
715
  [selectedSet, commitSelection]
666
716
  );
717
+ const [isSelectingAllMatching, setIsSelectingAllMatching] = useState(false);
718
+ const holdsEveryRow = totalItemCount <= localData.length;
719
+ const hasSelectedAllMatching = !holdsEveryRow && selectedSet.size >= totalItemCount;
720
+ const canSelectAllMatching = !!onSelectAllMatching && selectable && !holdsEveryRow && allSelected && !hasSelectedAllMatching;
721
+ const selectAllMatching = useCallback(async () => {
722
+ if (!onSelectAllMatching) return;
723
+ setIsSelectingAllMatching(true);
724
+ try {
725
+ commitSelection(await onSelectAllMatching());
726
+ } catch (error) {
727
+ devWarn(
728
+ "datagrid-select-all-matching-failed",
729
+ `DataGrid: onSelectAllMatching() rejected, so the selection was left untouched. ${String(error)}`
730
+ );
731
+ } finally {
732
+ setIsSelectingAllMatching(false);
733
+ }
734
+ }, [onSelectAllMatching, commitSelection]);
667
735
  const toggleAll = useCallback(() => {
668
- commitSelection(allSelected ? [] : allKeys);
669
- }, [allSelected, allKeys, commitSelection]);
736
+ const inScope = new Set(selectAllKeys);
737
+ commitSelection(
738
+ allSelected ? [...selectedSet].filter((key) => !inScope.has(key)) : [.../* @__PURE__ */ new Set([...selectedSet, ...selectAllKeys])]
739
+ );
740
+ }, [allSelected, selectAllKeys, selectedSet, commitSelection]);
670
741
  const clearSelection = useCallback(() => commitSelection([]), [commitSelection]);
671
742
  const commitExpanded = useCallback(
672
743
  (keys) => {
@@ -757,10 +828,10 @@ function DataGridInner({
757
828
  const { active, over } = event;
758
829
  if (!over || active.id === over.id) return;
759
830
  const oldIndex = localDataRef.current.findIndex(
760
- (row, i) => String(row[rowKey] ?? i) === String(active.id)
831
+ (row, i) => String(cellOf(row, rowKeyField) ?? i) === String(active.id)
761
832
  );
762
833
  const newIndex = localDataRef.current.findIndex(
763
- (row, i) => String(row[rowKey] ?? i) === String(over.id)
834
+ (row, i) => String(cellOf(row, rowKeyField) ?? i) === String(over.id)
764
835
  );
765
836
  if (oldIndex === -1 || newIndex === -1) return;
766
837
  const newData = arrayMove(localDataRef.current, oldIndex, newIndex);
@@ -768,7 +839,7 @@ function DataGridInner({
768
839
  onChange?.(newData);
769
840
  onRowReorder?.(newData);
770
841
  },
771
- [draggableRows, rowKey, setLocalData, onChange, onRowReorder]
842
+ [draggableRows, rowKeyField, setLocalData, onChange, onRowReorder]
772
843
  );
773
844
  const renderViewCell = (col, value, row, rowIndex) => {
774
845
  if (col.renderCell) return col.renderCell(value, row, rowIndex);
@@ -874,7 +945,7 @@ function DataGridInner({
874
945
  }
875
946
  };
876
947
  const renderCardValue = (col, row, localIndex, baseClassName) => {
877
- const value = row[col.key];
948
+ const value = cellOf(row, col.key);
878
949
  const isEditing = editingCell?.rowIndex === localIndex && editingCell?.colKey === col.key;
879
950
  const canEdit = isCellEditable(col);
880
951
  const isFlagged = cellErrorKey(localIndex, col.key) in cellErrors;
@@ -948,7 +1019,7 @@ function DataGridInner({
948
1019
  [dataColumns]
949
1020
  );
950
1021
  const totalCols = dataColumns.length + (showRowNumbers ? 1 : 0) + (actionsColumn ? 1 : 0) + (draggableRows ? 1 : 0) + (selectable ? 1 : 0) + (expandable ? 1 : 0);
951
- const rowIds = displayData.map((row, i) => String(row[rowKey] ?? i));
1022
+ const rowIds = displayData.map((row, i) => String(cellOf(row, rowKeyField) ?? i));
952
1023
  const containerStyle = {};
953
1024
  if (stickyHeader && maxHeight) {
954
1025
  containerStyle.maxHeight = typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight;
@@ -970,6 +1041,7 @@ function DataGridInner({
970
1041
  size: "sm",
971
1042
  color: quickFilter.color,
972
1043
  disabled,
1044
+ fullWidth: isCompactToolbar,
973
1045
  options: [
974
1046
  { value: QUICK_FILTER_RESET_VALUE, label: quickFilter.allLabel ?? "All" },
975
1047
  ...quickFilter.options
@@ -1069,12 +1141,43 @@ function DataGridInner({
1069
1141
  children: [
1070
1142
  showToolbar && /* @__PURE__ */ jsxs("div", { className: "eidos-datagrid-toolbar", children: [
1071
1143
  /* @__PURE__ */ jsxs("div", { className: "eidos-datagrid-toolbar-left", children: [
1072
- showQuickFilters && /* @__PURE__ */ jsx("div", { className: "eidos-datagrid-quick-filters", children: quickFilters.map(renderQuickFilter) }),
1144
+ selectable && isCardView && /* @__PURE__ */ jsx(
1145
+ Checkbox,
1146
+ {
1147
+ size: "sm",
1148
+ checked: allSelected,
1149
+ indeterminate: someSelected,
1150
+ onChange: toggleAll,
1151
+ label: "Select all",
1152
+ "aria-label": "Select all rows"
1153
+ }
1154
+ ),
1155
+ showQuickFilters && /* @__PURE__ */ jsx(
1156
+ "div",
1157
+ {
1158
+ className: [
1159
+ "eidos-datagrid-quick-filters",
1160
+ isCompactToolbar && "eidos-datagrid-quick-filters--compact"
1161
+ ].filter(Boolean).join(" "),
1162
+ children: quickFilters.map(renderQuickFilter)
1163
+ }
1164
+ ),
1073
1165
  selectable && hasSelection && /* @__PURE__ */ jsxs(Fragment, { children: [
1074
1166
  /* @__PURE__ */ jsxs("span", { className: "eidos-datagrid-selection-count", children: [
1075
1167
  selectedSet.size,
1076
1168
  " selected"
1077
1169
  ] }),
1170
+ canSelectAllMatching && /* @__PURE__ */ jsx(
1171
+ Button,
1172
+ {
1173
+ variant: "text",
1174
+ size: "sm",
1175
+ loading: isSelectingAllMatching,
1176
+ onClick: () => void selectAllMatching(),
1177
+ children: `Select all ${totalItemCount}`
1178
+ }
1179
+ ),
1180
+ hasSelectedAllMatching && /* @__PURE__ */ jsx(Button, { variant: "text", size: "sm", color: "secondary", onClick: clearSelection, children: "Clear selection" }),
1078
1181
  bulkActions && bulkActions.length > 0 && /* @__PURE__ */ jsx("div", { className: "eidos-datagrid-bulk-actions", children: bulkActions.map((action) => {
1079
1182
  const isDisabled = typeof action.disabled === "function" ? action.disabled(selectedItems) : action.disabled ?? false;
1080
1183
  if (action.type === "split-button") {
@@ -1124,17 +1227,7 @@ function DataGridInner({
1124
1227
  },
1125
1228
  action.id
1126
1229
  ) : null;
1127
- }) }),
1128
- /* @__PURE__ */ jsx(
1129
- "button",
1130
- {
1131
- type: "button",
1132
- className: "eidos-datagrid-clear-selection",
1133
- onClick: clearSelection,
1134
- "aria-label": "Clear selection",
1135
- children: /* @__PURE__ */ jsx(X, { size: 14 })
1136
- }
1137
- )
1230
+ }) })
1138
1231
  ] })
1139
1232
  ] }),
1140
1233
  /* @__PURE__ */ jsxs("div", { className: "eidos-datagrid-toolbar-right", children: [
@@ -1144,7 +1237,7 @@ function DataGridInner({
1144
1237
  placement: "bottom",
1145
1238
  align: "end",
1146
1239
  autoWidth: false,
1147
- trigger: /* @__PURE__ */ jsx(Button, { variant: "text", size: "sm", preIcon: AlignJustify, children: "Density" }),
1240
+ trigger: isCompactToolbar ? /* @__PURE__ */ jsx(Button, { variant: "text", size: "sm", icon: AlignJustify, tooltip: "Density" }) : /* @__PURE__ */ jsx(Button, { variant: "text", size: "sm", preIcon: AlignJustify, children: "Density" }),
1148
1241
  content: /* @__PURE__ */ jsx("div", { className: "eidos-table-menu-panel", children: [
1149
1242
  { value: "compact", label: "Compact" },
1150
1243
  { value: "comfortable", label: "Comfortable" },
@@ -1174,7 +1267,16 @@ function DataGridInner({
1174
1267
  onFiltersChange: handleFiltersChange
1175
1268
  }
1176
1269
  ),
1177
- onRowAdd && /* @__PURE__ */ jsx(Button, { variant: "outlined", size: "sm", preIcon: Plus, onClick: handleRowAdd, children: "Add row" })
1270
+ onRowAdd && (isCompactToolbar ? /* @__PURE__ */ jsx(
1271
+ Button,
1272
+ {
1273
+ variant: "outlined",
1274
+ size: "sm",
1275
+ icon: Plus,
1276
+ tooltip: "Add row",
1277
+ onClick: handleRowAdd
1278
+ }
1279
+ ) : /* @__PURE__ */ jsx(Button, { variant: "outlined", size: "sm", preIcon: Plus, onClick: handleRowAdd, children: "Add row" }))
1178
1280
  ] })
1179
1281
  ] }),
1180
1282
  isCardView ? (
@@ -1186,7 +1288,7 @@ function DataGridInner({
1186
1288
  style: { "--eidos-datagrid-card-min-width": `${cardMinWidth}px` },
1187
1289
  children: displayData.length > 0 ? displayData.map((row, displayIndex) => {
1188
1290
  const localIndex = localData.indexOf(row);
1189
- const rowKeyValue = String(row[rowKey] ?? displayIndex);
1291
+ const rowKeyValue = String(cellOf(row, rowKeyField) ?? displayIndex);
1190
1292
  const isRowSelected = selectable && selectedSet.has(rowKeyValue);
1191
1293
  const isRowExpanded = expandable && expandedSet.has(rowKeyValue);
1192
1294
  const canExpandRow = !isRowExpandable || isRowExpandable(row);
@@ -1198,51 +1300,58 @@ function DataGridInner({
1198
1300
  isRowSelected && "eidos-datagrid-card--selected"
1199
1301
  ].filter(Boolean).join(" "),
1200
1302
  children: [
1201
- /* @__PURE__ */ jsxs("div", { className: "eidos-datagrid-card-toolbar", onClick: (e) => e.stopPropagation(), children: [
1202
- /* @__PURE__ */ jsxs("div", { className: "eidos-datagrid-card-toolbar-left", children: [
1203
- expandable && canExpandRow && /* @__PURE__ */ jsx(
1204
- "button",
1205
- {
1206
- type: "button",
1207
- className: [
1208
- "eidos-datagrid-expand-toggle",
1209
- isRowExpanded && "eidos-datagrid-expand-toggle--open"
1210
- ].filter(Boolean).join(" "),
1211
- onClick: () => toggleExpanded(rowKeyValue),
1212
- "aria-expanded": isRowExpanded,
1213
- "aria-label": isRowExpanded ? "Collapse row" : "Expand row",
1214
- children: /* @__PURE__ */ jsx(ChevronRight, { size: 14 })
1215
- }
1216
- ),
1217
- selectable && /* @__PURE__ */ jsx(
1218
- Checkbox,
1219
- {
1220
- checked: isRowSelected,
1221
- onChange: () => toggleRow(rowKeyValue),
1222
- size: "sm"
1223
- }
1224
- ),
1225
- showRowNumbers && /* @__PURE__ */ jsxs("span", { className: "eidos-datagrid-card-row-number", children: [
1226
- "#",
1227
- localIndex + 1
1228
- ] })
1229
- ] }),
1230
- /* @__PURE__ */ jsxs("div", { className: "eidos-datagrid-card-heading", children: [
1231
- cardHeaderColumn && renderCardValue(
1232
- cardHeaderColumn,
1233
- row,
1234
- localIndex,
1235
- "eidos-datagrid-card-heading-title"
1236
- ),
1237
- cardSubheaderColumn && renderCardValue(
1238
- cardSubheaderColumn,
1239
- row,
1240
- localIndex,
1241
- "eidos-datagrid-card-heading-subtitle"
1242
- )
1243
- ] }),
1244
- /* @__PURE__ */ jsx("div", { className: "eidos-datagrid-card-toolbar-right", children: renderActionsMenu(row, localIndex) })
1245
- ] }),
1303
+ hasCardToolbar && /* @__PURE__ */ jsxs(
1304
+ "div",
1305
+ {
1306
+ className: "eidos-datagrid-card-toolbar",
1307
+ onClick: (e) => e.stopPropagation(),
1308
+ children: [
1309
+ /* @__PURE__ */ jsxs("div", { className: "eidos-datagrid-card-toolbar-left", children: [
1310
+ expandable && canExpandRow && /* @__PURE__ */ jsx(
1311
+ "button",
1312
+ {
1313
+ type: "button",
1314
+ className: [
1315
+ "eidos-datagrid-expand-toggle",
1316
+ isRowExpanded && "eidos-datagrid-expand-toggle--open"
1317
+ ].filter(Boolean).join(" "),
1318
+ onClick: () => toggleExpanded(rowKeyValue),
1319
+ "aria-expanded": isRowExpanded,
1320
+ "aria-label": isRowExpanded ? "Collapse row" : "Expand row",
1321
+ children: /* @__PURE__ */ jsx(ChevronRight, { size: 14 })
1322
+ }
1323
+ ),
1324
+ selectable && /* @__PURE__ */ jsx(
1325
+ Checkbox,
1326
+ {
1327
+ checked: isRowSelected,
1328
+ onChange: () => toggleRow(rowKeyValue),
1329
+ size: "sm"
1330
+ }
1331
+ ),
1332
+ showRowNumbers && /* @__PURE__ */ jsxs("span", { className: "eidos-datagrid-card-row-number", children: [
1333
+ "#",
1334
+ localIndex + 1
1335
+ ] })
1336
+ ] }),
1337
+ /* @__PURE__ */ jsxs("div", { className: "eidos-datagrid-card-heading", children: [
1338
+ cardHeaderColumn && renderCardValue(
1339
+ cardHeaderColumn,
1340
+ row,
1341
+ localIndex,
1342
+ "eidos-datagrid-card-heading-title"
1343
+ ),
1344
+ cardSubheaderColumn && renderCardValue(
1345
+ cardSubheaderColumn,
1346
+ row,
1347
+ localIndex,
1348
+ "eidos-datagrid-card-heading-subtitle"
1349
+ )
1350
+ ] }),
1351
+ /* @__PURE__ */ jsx("div", { className: "eidos-datagrid-card-toolbar-right", children: renderActionsMenu(row, localIndex) })
1352
+ ]
1353
+ }
1354
+ ),
1246
1355
  /* @__PURE__ */ jsx("div", { className: "eidos-datagrid-card-fields", children: cardFieldColumns.map((col) => renderCardField(col, row, localIndex)) }),
1247
1356
  expandable && renderExpandedContent && /* @__PURE__ */ jsx(
1248
1357
  ExpandedCardPanel,
@@ -1387,7 +1496,7 @@ function DataGridInner({
1387
1496
  ] }) }),
1388
1497
  /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsx(SortableContext, { items: rowIds, strategy: verticalListSortingStrategy, children: displayData.length > 0 ? displayData.map((row, displayIndex) => {
1389
1498
  const localIndex = localData.indexOf(row);
1390
- const rowKeyValue = String(row[rowKey] ?? displayIndex);
1499
+ const rowKeyValue = String(cellOf(row, rowKeyField) ?? displayIndex);
1391
1500
  const isRowSelected = selectable && selectedSet.has(rowKeyValue);
1392
1501
  const isRowExpanded = expandable && expandedSet.has(rowKeyValue);
1393
1502
  const canExpandRow = !isRowExpandable || isRowExpandable(row);
@@ -1489,7 +1598,7 @@ function DataGridInner({
1489
1598
  }
1490
1599
  ),
1491
1600
  sortedColumns.map((col) => {
1492
- const value = row[col.key];
1601
+ const value = cellOf(row, col.key);
1493
1602
  const isEditing = editingCell?.rowIndex === localIndex && editingCell?.colKey === col.key;
1494
1603
  const canEdit = isCellEditable(col);
1495
1604
  const isFlagged = cellErrorKey(localIndex, col.key) in cellErrors;
@@ -1609,4 +1718,4 @@ var DataGrid = Object.assign(DataGridInner, { displayName: "DataGrid" });
1609
1718
  export {
1610
1719
  DataGrid
1611
1720
  };
1612
- //# sourceMappingURL=chunk-P2ZHWFK4.js.map
1721
+ //# sourceMappingURL=chunk-RKA2OJRT.js.map