@fluentui/react-table 9.8.1 → 9.8.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.
Files changed (369) hide show
  1. package/CHANGELOG.json +145 -1
  2. package/CHANGELOG.md +39 -2
  3. package/lib/components/DataGrid/DataGrid.js.map +1 -1
  4. package/lib/components/DataGrid/renderDataGrid.js.map +1 -1
  5. package/lib/components/DataGrid/useDataGrid.js +5 -5
  6. package/lib/components/DataGrid/useDataGrid.js.map +1 -1
  7. package/lib/components/DataGrid/useDataGridContextValues.js +1 -1
  8. package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -1
  9. package/lib/components/DataGridBody/DataGridBody.js.map +1 -1
  10. package/lib/components/DataGridBody/renderDataGridBody.js +7 -5
  11. package/lib/components/DataGridBody/renderDataGridBody.js.map +1 -1
  12. package/lib/components/DataGridBody/useDataGridBody.js +1 -1
  13. package/lib/components/DataGridBody/useDataGridBody.js.map +1 -1
  14. package/lib/components/DataGridCell/DataGridCell.js.map +1 -1
  15. package/lib/components/DataGridCell/renderDataGridCell.js.map +1 -1
  16. package/lib/components/DataGridCell/useDataGridCell.js +1 -1
  17. package/lib/components/DataGridCell/useDataGridCell.js.map +1 -1
  18. package/lib/components/DataGridHeader/DataGridHeader.js.map +1 -1
  19. package/lib/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
  20. package/lib/components/DataGridHeader/useDataGridHeader.js.map +1 -1
  21. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
  22. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
  23. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js +3 -3
  24. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  25. package/lib/components/DataGridRow/DataGridRow.js.map +1 -1
  26. package/lib/components/DataGridRow/renderDataGridRow.js +10 -5
  27. package/lib/components/DataGridRow/renderDataGridRow.js.map +1 -1
  28. package/lib/components/DataGridRow/useDataGridRow.js +4 -4
  29. package/lib/components/DataGridRow/useDataGridRow.js.map +1 -1
  30. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
  31. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
  32. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js +2 -2
  33. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
  34. package/lib/components/Table/Table.js.map +1 -1
  35. package/lib/components/Table/renderTable.js +5 -4
  36. package/lib/components/Table/renderTable.js.map +1 -1
  37. package/lib/components/Table/useTable.js.map +1 -1
  38. package/lib/components/Table/useTableContextValues.js +1 -1
  39. package/lib/components/Table/useTableContextValues.js.map +1 -1
  40. package/lib/components/TableBody/TableBody.js.map +1 -1
  41. package/lib/components/TableBody/renderTableBody.js +2 -2
  42. package/lib/components/TableBody/renderTableBody.js.map +1 -1
  43. package/lib/components/TableBody/useTableBody.js +1 -1
  44. package/lib/components/TableBody/useTableBody.js.map +1 -1
  45. package/lib/components/TableCell/TableCell.js.map +1 -1
  46. package/lib/components/TableCell/renderTableCell.js +2 -2
  47. package/lib/components/TableCell/renderTableCell.js.map +1 -1
  48. package/lib/components/TableCell/useTableCell.js +1 -1
  49. package/lib/components/TableCell/useTableCell.js.map +1 -1
  50. package/lib/components/TableCellActions/TableCellActions.js.map +1 -1
  51. package/lib/components/TableCellActions/renderTableCellActions.js +2 -2
  52. package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -1
  53. package/lib/components/TableCellActions/useTableCellActions.js.map +1 -1
  54. package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -1
  55. package/lib/components/TableCellLayout/renderTableCellLayout.js +17 -4
  56. package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  57. package/lib/components/TableCellLayout/useTableCellLayout.js +1 -1
  58. package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  59. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js +1 -1
  60. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
  61. package/lib/components/TableCellLayout/useTableCellLayoutStyles.styles.js.map +1 -1
  62. package/lib/components/TableHeader/TableHeader.js.map +1 -1
  63. package/lib/components/TableHeader/renderTableHeader.js +5 -4
  64. package/lib/components/TableHeader/renderTableHeader.js.map +1 -1
  65. package/lib/components/TableHeader/useTableHeader.js +1 -1
  66. package/lib/components/TableHeader/useTableHeader.js.map +1 -1
  67. package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  68. package/lib/components/TableHeaderCell/renderTableHeaderCell.js +12 -2
  69. package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  70. package/lib/components/TableHeaderCell/useTableHeaderCell.js +1 -1
  71. package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  72. package/lib/components/TableResizeHandle/TableResizeHandle.js.map +1 -1
  73. package/lib/components/TableResizeHandle/renderTableResizeHandle.js +2 -2
  74. package/lib/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -1
  75. package/lib/components/TableResizeHandle/useTableResizeHandle.js +2 -2
  76. package/lib/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
  77. package/lib/components/TableRow/TableRow.js.map +1 -1
  78. package/lib/components/TableRow/renderTableRow.js +2 -2
  79. package/lib/components/TableRow/renderTableRow.js.map +1 -1
  80. package/lib/components/TableRow/useTableRow.js +1 -1
  81. package/lib/components/TableRow/useTableRow.js.map +1 -1
  82. package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  83. package/lib/components/TableSelectionCell/renderTableSelectionCell.js +7 -2
  84. package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  85. package/lib/components/TableSelectionCell/useTableSelectionCell.js +2 -2
  86. package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  87. package/lib/contexts/columnIdContext.js.map +1 -1
  88. package/lib/contexts/dataGridContext.js.map +1 -1
  89. package/lib/contexts/rowIdContext.js.map +1 -1
  90. package/lib/contexts/tableContext.js.map +1 -1
  91. package/lib/hooks/createColumn.js +1 -1
  92. package/lib/hooks/createColumn.js.map +1 -1
  93. package/lib/hooks/useKeyboardResizing.js +6 -6
  94. package/lib/hooks/useKeyboardResizing.js.map +1 -1
  95. package/lib/hooks/useMeasureElement.js +3 -2
  96. package/lib/hooks/useMeasureElement.js.map +1 -1
  97. package/lib/hooks/useTableColumnResizeMouseHandler.js +20 -16
  98. package/lib/hooks/useTableColumnResizeMouseHandler.js.map +1 -1
  99. package/lib/hooks/useTableColumnResizeState.js +5 -5
  100. package/lib/hooks/useTableColumnResizeState.js.map +1 -1
  101. package/lib/hooks/useTableColumnSizing.js +7 -6
  102. package/lib/hooks/useTableColumnSizing.js.map +1 -1
  103. package/lib/hooks/useTableCompositeNavigation.js +2 -2
  104. package/lib/hooks/useTableCompositeNavigation.js.map +1 -1
  105. package/lib/hooks/useTableFeatures.js +4 -5
  106. package/lib/hooks/useTableFeatures.js.map +1 -1
  107. package/lib/hooks/useTableSelection.js +6 -4
  108. package/lib/hooks/useTableSelection.js.map +1 -1
  109. package/lib/hooks/useTableSort.js +9 -6
  110. package/lib/hooks/useTableSort.js.map +1 -1
  111. package/lib/utils/columnResizeUtils.js +6 -4
  112. package/lib/utils/columnResizeUtils.js.map +1 -1
  113. package/lib-commonjs/DataGrid.js +2 -2
  114. package/lib-commonjs/DataGrid.js.map +1 -1
  115. package/lib-commonjs/DataGridBody.js +2 -2
  116. package/lib-commonjs/DataGridBody.js.map +1 -1
  117. package/lib-commonjs/DataGridCell.js +2 -2
  118. package/lib-commonjs/DataGridCell.js.map +1 -1
  119. package/lib-commonjs/DataGridHeader.js +2 -2
  120. package/lib-commonjs/DataGridHeader.js.map +1 -1
  121. package/lib-commonjs/DataGridHeaderCell.js +2 -2
  122. package/lib-commonjs/DataGridHeaderCell.js.map +1 -1
  123. package/lib-commonjs/DataGridRow.js +2 -2
  124. package/lib-commonjs/DataGridRow.js.map +1 -1
  125. package/lib-commonjs/DataGridSelectionCell.js +2 -2
  126. package/lib-commonjs/DataGridSelectionCell.js.map +1 -1
  127. package/lib-commonjs/Table.js +2 -2
  128. package/lib-commonjs/Table.js.map +1 -1
  129. package/lib-commonjs/TableBody.js +2 -2
  130. package/lib-commonjs/TableBody.js.map +1 -1
  131. package/lib-commonjs/TableCell.js +2 -2
  132. package/lib-commonjs/TableCell.js.map +1 -1
  133. package/lib-commonjs/TableCellActions.js +2 -2
  134. package/lib-commonjs/TableCellActions.js.map +1 -1
  135. package/lib-commonjs/TableCellLayout.js +2 -2
  136. package/lib-commonjs/TableCellLayout.js.map +1 -1
  137. package/lib-commonjs/TableCellPrimaryLayout.js +2 -2
  138. package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -1
  139. package/lib-commonjs/TableHeader.js +2 -2
  140. package/lib-commonjs/TableHeader.js.map +1 -1
  141. package/lib-commonjs/TableHeaderCell.js +2 -2
  142. package/lib-commonjs/TableHeaderCell.js.map +1 -1
  143. package/lib-commonjs/TableResizeHandle.js +2 -2
  144. package/lib-commonjs/TableResizeHandle.js.map +1 -1
  145. package/lib-commonjs/TableRow.js +2 -2
  146. package/lib-commonjs/TableRow.js.map +1 -1
  147. package/lib-commonjs/TableSelectionCell.js +2 -2
  148. package/lib-commonjs/TableSelectionCell.js.map +1 -1
  149. package/lib-commonjs/components/DataGrid/DataGrid.js +9 -7
  150. package/lib-commonjs/components/DataGrid/DataGrid.js.map +1 -1
  151. package/lib-commonjs/components/DataGrid/DataGrid.types.js +2 -2
  152. package/lib-commonjs/components/DataGrid/DataGrid.types.js.map +1 -1
  153. package/lib-commonjs/components/DataGrid/index.js +7 -7
  154. package/lib-commonjs/components/DataGrid/index.js.map +1 -1
  155. package/lib-commonjs/components/DataGrid/renderDataGrid.js +5 -3
  156. package/lib-commonjs/components/DataGrid/renderDataGrid.js.map +1 -1
  157. package/lib-commonjs/components/DataGrid/useDataGrid.js +20 -18
  158. package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -1
  159. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js +4 -2
  160. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -1
  161. package/lib-commonjs/components/DataGrid/useDataGridStyles.styles.js +8 -4
  162. package/lib-commonjs/components/DataGrid/useDataGridStyles.styles.js.map +1 -1
  163. package/lib-commonjs/components/DataGridBody/DataGridBody.js +9 -7
  164. package/lib-commonjs/components/DataGridBody/DataGridBody.js.map +1 -1
  165. package/lib-commonjs/components/DataGridBody/DataGridBody.types.js +2 -2
  166. package/lib-commonjs/components/DataGridBody/DataGridBody.types.js.map +1 -1
  167. package/lib-commonjs/components/DataGridBody/index.js +6 -6
  168. package/lib-commonjs/components/DataGridBody/index.js.map +1 -1
  169. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js +13 -9
  170. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js.map +1 -1
  171. package/lib-commonjs/components/DataGridBody/useDataGridBody.js +6 -4
  172. package/lib-commonjs/components/DataGridBody/useDataGridBody.js.map +1 -1
  173. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.styles.js +8 -4
  174. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.styles.js.map +1 -1
  175. package/lib-commonjs/components/DataGridCell/DataGridCell.js +9 -7
  176. package/lib-commonjs/components/DataGridCell/DataGridCell.js.map +1 -1
  177. package/lib-commonjs/components/DataGridCell/index.js +6 -6
  178. package/lib-commonjs/components/DataGridCell/index.js.map +1 -1
  179. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js +3 -1
  180. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js.map +1 -1
  181. package/lib-commonjs/components/DataGridCell/useDataGridCell.js +8 -6
  182. package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -1
  183. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.styles.js +8 -4
  184. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.styles.js.map +1 -1
  185. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js +9 -7
  186. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js.map +1 -1
  187. package/lib-commonjs/components/DataGridHeader/index.js +6 -6
  188. package/lib-commonjs/components/DataGridHeader/index.js.map +1 -1
  189. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js +3 -1
  190. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
  191. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js +5 -3
  192. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js.map +1 -1
  193. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.styles.js +8 -4
  194. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.styles.js.map +1 -1
  195. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js +9 -7
  196. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
  197. package/lib-commonjs/components/DataGridHeaderCell/index.js +6 -6
  198. package/lib-commonjs/components/DataGridHeaderCell/index.js.map +1 -1
  199. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js +3 -1
  200. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
  201. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js +10 -8
  202. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  203. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js +8 -4
  204. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js.map +1 -1
  205. package/lib-commonjs/components/DataGridRow/DataGridRow.js +9 -7
  206. package/lib-commonjs/components/DataGridRow/DataGridRow.js.map +1 -1
  207. package/lib-commonjs/components/DataGridRow/DataGridRow.types.js +2 -2
  208. package/lib-commonjs/components/DataGridRow/DataGridRow.types.js.map +1 -1
  209. package/lib-commonjs/components/DataGridRow/index.js +6 -6
  210. package/lib-commonjs/components/DataGridRow/index.js.map +1 -1
  211. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js +16 -9
  212. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js.map +1 -1
  213. package/lib-commonjs/components/DataGridRow/useDataGridRow.js +18 -16
  214. package/lib-commonjs/components/DataGridRow/useDataGridRow.js.map +1 -1
  215. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.styles.js +8 -4
  216. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.styles.js.map +1 -1
  217. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js +9 -7
  218. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
  219. package/lib-commonjs/components/DataGridSelectionCell/index.js +6 -6
  220. package/lib-commonjs/components/DataGridSelectionCell/index.js.map +1 -1
  221. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js +3 -1
  222. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
  223. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js +9 -7
  224. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
  225. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js +8 -4
  226. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js.map +1 -1
  227. package/lib-commonjs/components/Table/Table.js +9 -7
  228. package/lib-commonjs/components/Table/Table.js.map +1 -1
  229. package/lib-commonjs/components/Table/index.js +6 -6
  230. package/lib-commonjs/components/Table/index.js.map +1 -1
  231. package/lib-commonjs/components/Table/renderTable.js +11 -8
  232. package/lib-commonjs/components/Table/renderTable.js.map +1 -1
  233. package/lib-commonjs/components/Table/useTable.js +7 -5
  234. package/lib-commonjs/components/Table/useTable.js.map +1 -1
  235. package/lib-commonjs/components/Table/useTableContextValues.js +6 -4
  236. package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
  237. package/lib-commonjs/components/Table/useTableStyles.styles.js +12 -6
  238. package/lib-commonjs/components/Table/useTableStyles.styles.js.map +1 -1
  239. package/lib-commonjs/components/TableBody/TableBody.js +9 -7
  240. package/lib-commonjs/components/TableBody/TableBody.js.map +1 -1
  241. package/lib-commonjs/components/TableBody/index.js +6 -6
  242. package/lib-commonjs/components/TableBody/index.js.map +1 -1
  243. package/lib-commonjs/components/TableBody/renderTableBody.js +8 -6
  244. package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -1
  245. package/lib-commonjs/components/TableBody/useTableBody.js +8 -6
  246. package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
  247. package/lib-commonjs/components/TableBody/useTableBodyStyles.styles.js +11 -5
  248. package/lib-commonjs/components/TableBody/useTableBodyStyles.styles.js.map +1 -1
  249. package/lib-commonjs/components/TableCell/TableCell.js +9 -7
  250. package/lib-commonjs/components/TableCell/TableCell.js.map +1 -1
  251. package/lib-commonjs/components/TableCell/index.js +6 -6
  252. package/lib-commonjs/components/TableCell/index.js.map +1 -1
  253. package/lib-commonjs/components/TableCell/renderTableCell.js +8 -6
  254. package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
  255. package/lib-commonjs/components/TableCell/useTableCell.js +8 -6
  256. package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
  257. package/lib-commonjs/components/TableCell/useTableCellStyles.styles.js +12 -6
  258. package/lib-commonjs/components/TableCell/useTableCellStyles.styles.js.map +1 -1
  259. package/lib-commonjs/components/TableCellActions/TableCellActions.js +9 -7
  260. package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -1
  261. package/lib-commonjs/components/TableCellActions/index.js +6 -6
  262. package/lib-commonjs/components/TableCellActions/index.js.map +1 -1
  263. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js +8 -6
  264. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -1
  265. package/lib-commonjs/components/TableCellActions/useTableCellActions.js +7 -5
  266. package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -1
  267. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.styles.js +7 -3
  268. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.styles.js.map +1 -1
  269. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +9 -7
  270. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -1
  271. package/lib-commonjs/components/TableCellLayout/index.js +6 -6
  272. package/lib-commonjs/components/TableCellLayout/index.js.map +1 -1
  273. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js +24 -9
  274. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  275. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +12 -10
  276. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  277. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js +6 -4
  278. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
  279. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.styles.js +8 -4
  280. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.styles.js.map +1 -1
  281. package/lib-commonjs/components/TableHeader/TableHeader.js +9 -7
  282. package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -1
  283. package/lib-commonjs/components/TableHeader/index.js +6 -6
  284. package/lib-commonjs/components/TableHeader/index.js.map +1 -1
  285. package/lib-commonjs/components/TableHeader/renderTableHeader.js +11 -8
  286. package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -1
  287. package/lib-commonjs/components/TableHeader/useTableHeader.js +8 -6
  288. package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
  289. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.styles.js +11 -5
  290. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.styles.js.map +1 -1
  291. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js +9 -7
  292. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  293. package/lib-commonjs/components/TableHeaderCell/index.js +6 -6
  294. package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -1
  295. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js +18 -6
  296. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  297. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +17 -15
  298. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  299. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.styles.js +12 -6
  300. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.styles.js.map +1 -1
  301. package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.js +9 -7
  302. package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.js.map +1 -1
  303. package/lib-commonjs/components/TableResizeHandle/index.js +6 -6
  304. package/lib-commonjs/components/TableResizeHandle/index.js.map +1 -1
  305. package/lib-commonjs/components/TableResizeHandle/renderTableResizeHandle.js +8 -6
  306. package/lib-commonjs/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -1
  307. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js +10 -8
  308. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
  309. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.styles.js +7 -3
  310. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.styles.js.map +1 -1
  311. package/lib-commonjs/components/TableRow/TableRow.js +9 -7
  312. package/lib-commonjs/components/TableRow/TableRow.js.map +1 -1
  313. package/lib-commonjs/components/TableRow/index.js +6 -6
  314. package/lib-commonjs/components/TableRow/index.js.map +1 -1
  315. package/lib-commonjs/components/TableRow/renderTableRow.js +8 -6
  316. package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -1
  317. package/lib-commonjs/components/TableRow/useTableRow.js +12 -10
  318. package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
  319. package/lib-commonjs/components/TableRow/useTableRowStyles.styles.js +12 -6
  320. package/lib-commonjs/components/TableRow/useTableRowStyles.styles.js.map +1 -1
  321. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js +9 -7
  322. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  323. package/lib-commonjs/components/TableSelectionCell/index.js +6 -6
  324. package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -1
  325. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js +13 -6
  326. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  327. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +17 -15
  328. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  329. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.styles.js +12 -6
  330. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.styles.js.map +1 -1
  331. package/lib-commonjs/contexts/columnIdContext.js +11 -5
  332. package/lib-commonjs/contexts/columnIdContext.js.map +1 -1
  333. package/lib-commonjs/contexts/dataGridContext.js +9 -5
  334. package/lib-commonjs/contexts/dataGridContext.js.map +1 -1
  335. package/lib-commonjs/contexts/rowIdContext.js +11 -5
  336. package/lib-commonjs/contexts/rowIdContext.js.map +1 -1
  337. package/lib-commonjs/contexts/tableContext.js +11 -5
  338. package/lib-commonjs/contexts/tableContext.js.map +1 -1
  339. package/lib-commonjs/contexts/tableHeaderContext.js +8 -4
  340. package/lib-commonjs/contexts/tableHeaderContext.js.map +1 -1
  341. package/lib-commonjs/hooks/createColumn.js +4 -2
  342. package/lib-commonjs/hooks/createColumn.js.map +1 -1
  343. package/lib-commonjs/hooks/index.js +8 -8
  344. package/lib-commonjs/hooks/index.js.map +1 -1
  345. package/lib-commonjs/hooks/types.js +2 -2
  346. package/lib-commonjs/hooks/types.js.map +1 -1
  347. package/lib-commonjs/hooks/useKeyboardResizing.js +22 -20
  348. package/lib-commonjs/hooks/useKeyboardResizing.js.map +1 -1
  349. package/lib-commonjs/hooks/useMeasureElement.js +11 -8
  350. package/lib-commonjs/hooks/useMeasureElement.js.map +1 -1
  351. package/lib-commonjs/hooks/useTableColumnResizeMouseHandler.js +32 -26
  352. package/lib-commonjs/hooks/useTableColumnResizeMouseHandler.js.map +1 -1
  353. package/lib-commonjs/hooks/useTableColumnResizeState.js +15 -13
  354. package/lib-commonjs/hooks/useTableColumnResizeState.js.map +1 -1
  355. package/lib-commonjs/hooks/useTableColumnSizing.js +17 -12
  356. package/lib-commonjs/hooks/useTableColumnSizing.js.map +1 -1
  357. package/lib-commonjs/hooks/useTableCompositeNavigation.js +20 -18
  358. package/lib-commonjs/hooks/useTableCompositeNavigation.js.map +1 -1
  359. package/lib-commonjs/hooks/useTableFeatures.js +12 -9
  360. package/lib-commonjs/hooks/useTableFeatures.js.map +1 -1
  361. package/lib-commonjs/hooks/useTableSelection.js +24 -16
  362. package/lib-commonjs/hooks/useTableSelection.js.map +1 -1
  363. package/lib-commonjs/hooks/useTableSort.js +22 -13
  364. package/lib-commonjs/hooks/useTableSort.js.map +1 -1
  365. package/lib-commonjs/index.js +344 -126
  366. package/lib-commonjs/index.js.map +1 -1
  367. package/lib-commonjs/utils/columnResizeUtils.js +30 -12
  368. package/lib-commonjs/utils/columnResizeUtils.js.map +1 -1
  369. package/package.json +17 -17
package/CHANGELOG.json CHANGED
@@ -2,7 +2,151 @@
2
2
  "name": "@fluentui/react-table",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 29 Aug 2023 12:53:35 GMT",
5
+ "date": "Tue, 05 Sep 2023 15:35:07 GMT",
6
+ "tag": "@fluentui/react-table_v9.8.3",
7
+ "version": "9.8.3",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@fluentui/react-table",
13
+ "comment": "Bump @fluentui/react-aria to v9.3.35",
14
+ "commit": "94019033dfe3fd39ec0cde7dfb3b57c22805aa91"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-table",
19
+ "comment": "Bump @fluentui/react-avatar to v9.5.27",
20
+ "commit": "94019033dfe3fd39ec0cde7dfb3b57c22805aa91"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-table",
25
+ "comment": "Bump @fluentui/react-checkbox to v9.1.37",
26
+ "commit": "94019033dfe3fd39ec0cde7dfb3b57c22805aa91"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-table",
31
+ "comment": "Bump @fluentui/react-context-selector to v9.1.33",
32
+ "commit": "94019033dfe3fd39ec0cde7dfb3b57c22805aa91"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-table",
37
+ "comment": "Bump @fluentui/react-radio to v9.1.37",
38
+ "commit": "94019033dfe3fd39ec0cde7dfb3b57c22805aa91"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui/react-table",
43
+ "comment": "Bump @fluentui/react-tabster to v9.12.7",
44
+ "commit": "94019033dfe3fd39ec0cde7dfb3b57c22805aa91"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@fluentui/react-table",
49
+ "comment": "Bump @fluentui/react-utilities to v9.13.2",
50
+ "commit": "94019033dfe3fd39ec0cde7dfb3b57c22805aa91"
51
+ },
52
+ {
53
+ "author": "beachball",
54
+ "package": "@fluentui/react-table",
55
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.5",
56
+ "commit": "94019033dfe3fd39ec0cde7dfb3b57c22805aa91"
57
+ }
58
+ ]
59
+ }
60
+ },
61
+ {
62
+ "date": "Tue, 05 Sep 2023 13:29:05 GMT",
63
+ "tag": "@fluentui/react-table_v9.8.2",
64
+ "version": "9.8.2",
65
+ "comments": {
66
+ "patch": [
67
+ {
68
+ "author": "bernardo.sunderhus@gmail.com",
69
+ "package": "@fluentui/react-table",
70
+ "commit": "eea6d93a62249ba4fba3347fb291c67ee1a3fb24",
71
+ "comment": "chore: migrate package to use JSX importSource"
72
+ },
73
+ {
74
+ "author": "bernardo.sunderhus@gmail.com",
75
+ "package": "@fluentui/react-table",
76
+ "commit": "b93c2ac22355b6cb6f33dd509c6cd9c21f4fffc8",
77
+ "comment": "bumps @swc/helpers version to 0.5.1"
78
+ },
79
+ {
80
+ "author": "beachball",
81
+ "package": "@fluentui/react-table",
82
+ "comment": "Bump @fluentui/keyboard-keys to v9.0.4",
83
+ "commit": "da959e66f36b429e40ae61810d08dc71c16e154a"
84
+ },
85
+ {
86
+ "author": "beachball",
87
+ "package": "@fluentui/react-table",
88
+ "comment": "Bump @fluentui/react-aria to v9.3.34",
89
+ "commit": "da959e66f36b429e40ae61810d08dc71c16e154a"
90
+ },
91
+ {
92
+ "author": "beachball",
93
+ "package": "@fluentui/react-table",
94
+ "comment": "Bump @fluentui/react-avatar to v9.5.26",
95
+ "commit": "da959e66f36b429e40ae61810d08dc71c16e154a"
96
+ },
97
+ {
98
+ "author": "beachball",
99
+ "package": "@fluentui/react-table",
100
+ "comment": "Bump @fluentui/react-checkbox to v9.1.36",
101
+ "commit": "da959e66f36b429e40ae61810d08dc71c16e154a"
102
+ },
103
+ {
104
+ "author": "beachball",
105
+ "package": "@fluentui/react-table",
106
+ "comment": "Bump @fluentui/react-context-selector to v9.1.32",
107
+ "commit": "da959e66f36b429e40ae61810d08dc71c16e154a"
108
+ },
109
+ {
110
+ "author": "beachball",
111
+ "package": "@fluentui/react-table",
112
+ "comment": "Bump @fluentui/react-radio to v9.1.36",
113
+ "commit": "da959e66f36b429e40ae61810d08dc71c16e154a"
114
+ },
115
+ {
116
+ "author": "beachball",
117
+ "package": "@fluentui/react-table",
118
+ "comment": "Bump @fluentui/react-shared-contexts to v9.7.3",
119
+ "commit": "da959e66f36b429e40ae61810d08dc71c16e154a"
120
+ },
121
+ {
122
+ "author": "beachball",
123
+ "package": "@fluentui/react-table",
124
+ "comment": "Bump @fluentui/react-tabster to v9.12.6",
125
+ "commit": "da959e66f36b429e40ae61810d08dc71c16e154a"
126
+ },
127
+ {
128
+ "author": "beachball",
129
+ "package": "@fluentui/react-table",
130
+ "comment": "Bump @fluentui/react-theme to v9.1.12",
131
+ "commit": "da959e66f36b429e40ae61810d08dc71c16e154a"
132
+ },
133
+ {
134
+ "author": "beachball",
135
+ "package": "@fluentui/react-table",
136
+ "comment": "Bump @fluentui/react-utilities to v9.13.1",
137
+ "commit": "da959e66f36b429e40ae61810d08dc71c16e154a"
138
+ },
139
+ {
140
+ "author": "beachball",
141
+ "package": "@fluentui/react-table",
142
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.4",
143
+ "commit": "da959e66f36b429e40ae61810d08dc71c16e154a"
144
+ }
145
+ ]
146
+ }
147
+ },
148
+ {
149
+ "date": "Tue, 29 Aug 2023 12:57:35 GMT",
6
150
  "tag": "@fluentui/react-table_v9.8.1",
7
151
  "version": "9.8.1",
8
152
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,49 @@
1
1
  # Change Log - @fluentui/react-table
2
2
 
3
- This log was last generated on Tue, 29 Aug 2023 12:53:35 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 05 Sep 2023 15:35:07 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.8.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.8.3)
8
+
9
+ Tue, 05 Sep 2023 15:35:07 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.8.2..@fluentui/react-table_v9.8.3)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-aria to v9.3.35 ([PR #29055](https://github.com/microsoft/fluentui/pull/29055) by beachball)
15
+ - Bump @fluentui/react-avatar to v9.5.27 ([PR #29055](https://github.com/microsoft/fluentui/pull/29055) by beachball)
16
+ - Bump @fluentui/react-checkbox to v9.1.37 ([PR #29055](https://github.com/microsoft/fluentui/pull/29055) by beachball)
17
+ - Bump @fluentui/react-context-selector to v9.1.33 ([PR #29055](https://github.com/microsoft/fluentui/pull/29055) by beachball)
18
+ - Bump @fluentui/react-radio to v9.1.37 ([PR #29055](https://github.com/microsoft/fluentui/pull/29055) by beachball)
19
+ - Bump @fluentui/react-tabster to v9.12.7 ([PR #29055](https://github.com/microsoft/fluentui/pull/29055) by beachball)
20
+ - Bump @fluentui/react-utilities to v9.13.2 ([PR #29055](https://github.com/microsoft/fluentui/pull/29055) by beachball)
21
+ - Bump @fluentui/react-jsx-runtime to v9.0.5 ([PR #29055](https://github.com/microsoft/fluentui/pull/29055) by beachball)
22
+
23
+ ## [9.8.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.8.2)
24
+
25
+ Tue, 05 Sep 2023 13:29:05 GMT
26
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.8.1..@fluentui/react-table_v9.8.2)
27
+
28
+ ### Patches
29
+
30
+ - chore: migrate package to use JSX importSource ([PR #28959](https://github.com/microsoft/fluentui/pull/28959) by bernardo.sunderhus@gmail.com)
31
+ - bumps @swc/helpers version to 0.5.1 ([PR #28989](https://github.com/microsoft/fluentui/pull/28989) by bernardo.sunderhus@gmail.com)
32
+ - Bump @fluentui/keyboard-keys to v9.0.4 ([PR #29056](https://github.com/microsoft/fluentui/pull/29056) by beachball)
33
+ - Bump @fluentui/react-aria to v9.3.34 ([PR #29056](https://github.com/microsoft/fluentui/pull/29056) by beachball)
34
+ - Bump @fluentui/react-avatar to v9.5.26 ([PR #29056](https://github.com/microsoft/fluentui/pull/29056) by beachball)
35
+ - Bump @fluentui/react-checkbox to v9.1.36 ([PR #29056](https://github.com/microsoft/fluentui/pull/29056) by beachball)
36
+ - Bump @fluentui/react-context-selector to v9.1.32 ([PR #29056](https://github.com/microsoft/fluentui/pull/29056) by beachball)
37
+ - Bump @fluentui/react-radio to v9.1.36 ([PR #29056](https://github.com/microsoft/fluentui/pull/29056) by beachball)
38
+ - Bump @fluentui/react-shared-contexts to v9.7.3 ([PR #29056](https://github.com/microsoft/fluentui/pull/29056) by beachball)
39
+ - Bump @fluentui/react-tabster to v9.12.6 ([PR #29056](https://github.com/microsoft/fluentui/pull/29056) by beachball)
40
+ - Bump @fluentui/react-theme to v9.1.12 ([PR #29056](https://github.com/microsoft/fluentui/pull/29056) by beachball)
41
+ - Bump @fluentui/react-utilities to v9.13.1 ([PR #29056](https://github.com/microsoft/fluentui/pull/29056) by beachball)
42
+ - Bump @fluentui/react-jsx-runtime to v9.0.4 ([PR #29056](https://github.com/microsoft/fluentui/pull/29056) by beachball)
43
+
7
44
  ## [9.8.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.8.1)
8
45
 
9
- Tue, 29 Aug 2023 12:53:35 GMT
46
+ Tue, 29 Aug 2023 12:57:35 GMT
10
47
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.8.0..@fluentui/react-table_v9.8.1)
11
48
 
12
49
  ### Patches
@@ -1 +1 @@
1
- {"version":3,"sources":["DataGrid.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGrid_unstable } from './useDataGrid';\nimport { renderDataGrid_unstable } from './renderDataGrid';\nimport { useDataGridStyles_unstable } from './useDataGridStyles.styles';\nimport type { DataGridProps } from './DataGrid.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useDataGridContextValues_unstable } from './useDataGridContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGrid component\n */\nexport const DataGrid: ForwardRefComponent<DataGridProps> = React.forwardRef((props, ref) => {\n const state = useDataGrid_unstable(props, ref);\n\n useDataGridStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridStyles_unstable')(state);\n\n return renderDataGrid_unstable(state, useDataGridContextValues_unstable(state));\n});\n\nDataGrid.displayName = 'DataGrid';\n"],"names":["React","useDataGrid_unstable","renderDataGrid_unstable","useDataGridStyles_unstable","useDataGridContextValues_unstable","useCustomStyleHook_unstable","DataGrid","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,6BAA6B;AAGxE,SAASC,iCAAiC,QAAQ,6BAA6B;AAC/E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,yBAA+CN,MAAMO,UAAU,CAAC,CAACC,OAAOC,MAAQ;IAC3F,MAAMC,QAAQT,qBAAqBO,OAAOC;IAE1CN,2BAA2BO;IAE3BL,4BAA4B,8BAA8BK;IAE1D,OAAOR,wBAAwBQ,OAAON,kCAAkCM;AAC1E,GAAG;AAEHJ,SAASK,WAAW,GAAG"}
1
+ {"version":3,"sources":["DataGrid.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGrid_unstable } from './useDataGrid';\nimport { renderDataGrid_unstable } from './renderDataGrid';\nimport { useDataGridStyles_unstable } from './useDataGridStyles.styles';\nimport type { DataGridProps } from './DataGrid.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useDataGridContextValues_unstable } from './useDataGridContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGrid component\n */\nexport const DataGrid: ForwardRefComponent<DataGridProps> = React.forwardRef((props, ref) => {\n const state = useDataGrid_unstable(props, ref);\n\n useDataGridStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridStyles_unstable')(state);\n\n return renderDataGrid_unstable(state, useDataGridContextValues_unstable(state));\n});\n\nDataGrid.displayName = 'DataGrid';\n"],"names":["React","useDataGrid_unstable","renderDataGrid_unstable","useDataGridStyles_unstable","useDataGridContextValues_unstable","useCustomStyleHook_unstable","DataGrid","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,6BAA6B;AAGxE,SAASC,iCAAiC,QAAQ,6BAA6B;AAC/E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,yBAA+CN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,QAAQT,qBAAqBO,OAAOC;IAE1CN,2BAA2BO;IAE3BL,4BAA4B,8BAA8BK;IAE1D,OAAOR,wBAAwBQ,OAAON,kCAAkCM;AAC1E,GAAG;AAEHJ,SAASK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderDataGrid.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { DataGridContextValues, DataGridState } from './DataGrid.types';\nimport { renderTable_unstable } from '../Table/renderTable';\nimport { DataGridContextProvider } from '../../contexts/dataGridContext';\n\n/**\n * Render the final JSX of DataGrid\n */\nexport const renderDataGrid_unstable = (state: DataGridState, contextValues: DataGridContextValues) => {\n return (\n <DataGridContextProvider value={contextValues.dataGrid}>\n {renderTable_unstable(state, contextValues)}\n </DataGridContextProvider>\n );\n};\n"],"names":["React","renderTable_unstable","DataGridContextProvider","renderDataGrid_unstable","state","contextValues","value","dataGrid"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,oBAAoB,QAAQ,uBAAuB;AAC5D,SAASC,uBAAuB,QAAQ,iCAAiC;AAEzE;;CAEC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAsBC,gBAAyC;IACrG,qBACE,oBAACH;QAAwBI,OAAOD,cAAcE,QAAQ;OACnDN,qBAAqBG,OAAOC;AAGnC,EAAE"}
1
+ {"version":3,"sources":["renderDataGrid.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { DataGridContextValues, DataGridState } from './DataGrid.types';\nimport { renderTable_unstable } from '../Table/renderTable';\nimport { DataGridContextProvider } from '../../contexts/dataGridContext';\n\n/**\n * Render the final JSX of DataGrid\n */\nexport const renderDataGrid_unstable = (state: DataGridState, contextValues: DataGridContextValues) => {\n return (\n <DataGridContextProvider value={contextValues.dataGrid}>\n {renderTable_unstable(state, contextValues)}\n </DataGridContextProvider>\n );\n};\n"],"names":["React","renderTable_unstable","DataGridContextProvider","renderDataGrid_unstable","state","contextValues","value","dataGrid"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,oBAAoB,QAAQ,uBAAuB;AAC5D,SAASC,uBAAuB,QAAQ,iCAAiC;AAEzE;;CAEC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAsBC;IAC5D,qBACE,oBAACH;QAAwBI,OAAOD,cAAcE,QAAQ;OACnDN,qBAAqBG,OAAOC;AAGnC,EAAE"}
@@ -14,12 +14,12 @@ import { CELL_WIDTH } from '../TableSelectionCell';
14
14
  * @param props - props from this instance of DataGrid
15
15
  * @param ref - reference to root HTMLElement of DataGrid
16
16
  */ export const useDataGrid_unstable = (props, ref)=>{
17
- const { items , columns , focusMode ='cell' , selectionMode , onSortChange , onSelectionChange , defaultSortState , sortState , selectedItems , defaultSelectedItems , subtleSelection =false , selectionAppearance ='brand' , getRowId , resizableColumns , columnSizingOptions , onColumnResize , containerWidthOffset } = props;
17
+ const { items, columns, focusMode = 'cell', selectionMode, onSortChange, onSelectionChange, defaultSortState, sortState, selectedItems, defaultSelectedItems, subtleSelection = false, selectionAppearance = 'brand', getRowId, resizableColumns, columnSizingOptions, onColumnResize, containerWidthOffset } = props;
18
18
  const widthOffset = containerWidthOffset !== null && containerWidthOffset !== void 0 ? containerWidthOffset : selectionMode ? -CELL_WIDTH : 0;
19
19
  const gridTabsterAttribute = useArrowNavigationGroup({
20
20
  axis: 'grid'
21
21
  });
22
- const { onTableKeyDown: onCompositeKeyDown , tableTabsterAttribute: compositeTabsterAttribute , tableRowTabsterAttribute: compositeRowTabsterAttribute } = useTableCompositeNavigation();
22
+ const { onTableKeyDown: onCompositeKeyDown, tableTabsterAttribute: compositeTabsterAttribute, tableRowTabsterAttribute: compositeRowTabsterAttribute } = useTableCompositeNavigation();
23
23
  const tableState = useTableFeatures({
24
24
  items,
25
25
  columns,
@@ -45,10 +45,10 @@ import { CELL_WIDTH } from '../TableSelectionCell';
45
45
  })
46
46
  ]);
47
47
  const innerRef = React.useRef(null);
48
- const { findFirstFocusable , findLastFocusable } = useFocusFinders();
48
+ const { findFirstFocusable, findLastFocusable } = useFocusFinders();
49
49
  const onKeyDown = useEventCallback((e)=>{
50
- var _props_onKeyDown;
51
- (_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(props, e);
50
+ var _props_onKeyDown, _props;
51
+ (_props_onKeyDown = (_props = props).onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(_props, e);
52
52
  focusMode === 'composite' && onCompositeKeyDown(e);
53
53
  // handle ctrl+home and ctrl+end
54
54
  if (!innerRef.current || !e.ctrlKey || e.defaultPrevented) {
@@ -1 +1 @@
1
- {"version":3,"sources":["useDataGrid.ts"],"sourcesContent":["import * as React from 'react';\nimport { useArrowNavigationGroup, useFocusFinders } from '@fluentui/react-tabster';\nimport type { DataGridProps, DataGridState } from './DataGrid.types';\nimport { useTable_unstable } from '../Table/useTable';\nimport { useEventCallback, useMergedRefs } from '@fluentui/react-utilities';\nimport { End, Home } from '@fluentui/keyboard-keys';\nimport {\n useTableFeatures,\n useTableSort,\n useTableSelection,\n useTableColumnSizing_unstable,\n useTableCompositeNavigation,\n} from '../../hooks';\nimport { CELL_WIDTH } from '../TableSelectionCell';\n\n/**\n * Create the state required to render DataGrid.\n *\n * The returned state can be modified with hooks such as useDataGridStyles_unstable,\n * before being passed to renderDataGrid_unstable.\n *\n * @param props - props from this instance of DataGrid\n * @param ref - reference to root HTMLElement of DataGrid\n */\nexport const useDataGrid_unstable = (props: DataGridProps, ref: React.Ref<HTMLElement>): DataGridState => {\n const {\n items,\n columns,\n focusMode = 'cell',\n selectionMode,\n onSortChange,\n onSelectionChange,\n defaultSortState,\n sortState,\n selectedItems,\n defaultSelectedItems,\n subtleSelection = false,\n selectionAppearance = 'brand',\n getRowId,\n resizableColumns,\n columnSizingOptions,\n onColumnResize,\n containerWidthOffset,\n } = props;\n\n const widthOffset = containerWidthOffset ?? (selectionMode ? -CELL_WIDTH : 0);\n\n const gridTabsterAttribute = useArrowNavigationGroup({\n axis: 'grid',\n });\n\n const {\n onTableKeyDown: onCompositeKeyDown,\n tableTabsterAttribute: compositeTabsterAttribute,\n tableRowTabsterAttribute: compositeRowTabsterAttribute,\n } = useTableCompositeNavigation();\n\n const tableState = useTableFeatures({ items, columns, getRowId }, [\n useTableSort({\n defaultSortState,\n sortState,\n onSortChange,\n }),\n useTableSelection({\n defaultSelectedItems,\n selectedItems,\n onSelectionChange,\n selectionMode: selectionMode ?? 'multiselect',\n }),\n useTableColumnSizing_unstable({\n onColumnResize,\n columnSizingOptions,\n // The selection cell is not part of the columns, therefore its width needs to be subtracted\n // from the container to make sure the columns don't overflow the table.\n containerWidthOffset: widthOffset,\n }),\n ]);\n\n const innerRef = React.useRef<HTMLDivElement>(null);\n const { findFirstFocusable, findLastFocusable } = useFocusFinders();\n const onKeyDown = useEventCallback((e: React.KeyboardEvent<HTMLTableElement>) => {\n props.onKeyDown?.(e);\n focusMode === 'composite' && onCompositeKeyDown(e);\n\n // handle ctrl+home and ctrl+end\n if (!innerRef.current || !e.ctrlKey || e.defaultPrevented) {\n return;\n }\n\n if (e.key === Home) {\n const firstRow = innerRef.current.querySelector('[role=\"row\"]') as HTMLElement | null;\n if (firstRow) {\n findFirstFocusable(firstRow)?.focus();\n }\n }\n\n if (e.key === End) {\n const rows = innerRef.current.querySelectorAll('[role=\"row\"]');\n if (rows.length) {\n const lastRow = rows.item(rows.length - 1);\n findLastFocusable(lastRow as HTMLElement)?.focus();\n }\n }\n });\n\n const baseTableState = useTable_unstable(\n {\n role: 'grid',\n as: 'div',\n noNativeElements: true,\n ...(focusMode === 'cell' && gridTabsterAttribute),\n ...(focusMode === 'composite' && compositeTabsterAttribute),\n ...props,\n onKeyDown,\n ...(resizableColumns ? tableState.columnSizing_unstable.getTableProps(props) : {}),\n },\n useMergedRefs(ref, tableState.tableRef, innerRef),\n );\n\n return {\n ...baseTableState,\n focusMode,\n tableState,\n selectableRows: !!selectionMode,\n subtleSelection,\n selectionAppearance,\n resizableColumns,\n compositeRowTabsterAttribute,\n };\n};\n"],"names":["React","useArrowNavigationGroup","useFocusFinders","useTable_unstable","useEventCallback","useMergedRefs","End","Home","useTableFeatures","useTableSort","useTableSelection","useTableColumnSizing_unstable","useTableCompositeNavigation","CELL_WIDTH","useDataGrid_unstable","props","ref","items","columns","focusMode","selectionMode","onSortChange","onSelectionChange","defaultSortState","sortState","selectedItems","defaultSelectedItems","subtleSelection","selectionAppearance","getRowId","resizableColumns","columnSizingOptions","onColumnResize","containerWidthOffset","widthOffset","gridTabsterAttribute","axis","onTableKeyDown","onCompositeKeyDown","tableTabsterAttribute","compositeTabsterAttribute","tableRowTabsterAttribute","compositeRowTabsterAttribute","tableState","innerRef","useRef","findFirstFocusable","findLastFocusable","onKeyDown","e","current","ctrlKey","defaultPrevented","key","firstRow","querySelector","focus","rows","querySelectorAll","length","lastRow","item","baseTableState","role","as","noNativeElements","columnSizing_unstable","getTableProps","tableRef","selectableRows"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,uBAAuB,EAAEC,eAAe,QAAQ,0BAA0B;AAEnF,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,SAASC,gBAAgB,EAAEC,aAAa,QAAQ,4BAA4B;AAC5E,SAASC,GAAG,EAAEC,IAAI,QAAQ,0BAA0B;AACpD,SACEC,gBAAgB,EAChBC,YAAY,EACZC,iBAAiB,EACjBC,6BAA6B,EAC7BC,2BAA2B,QACtB,cAAc;AACrB,SAASC,UAAU,QAAQ,wBAAwB;AAEnD;;;;;;;;CAQC,GACD,OAAO,MAAMC,uBAAuB,CAACC,OAAsBC,MAA+C;IACxG,MAAM,EACJC,MAAK,EACLC,QAAO,EACPC,WAAY,OAAM,EAClBC,cAAa,EACbC,aAAY,EACZC,kBAAiB,EACjBC,iBAAgB,EAChBC,UAAS,EACTC,cAAa,EACbC,qBAAoB,EACpBC,iBAAkB,KAAK,CAAA,EACvBC,qBAAsB,QAAO,EAC7BC,SAAQ,EACRC,iBAAgB,EAChBC,oBAAmB,EACnBC,eAAc,EACdC,qBAAoB,EACrB,GAAGlB;IAEJ,MAAMmB,cAAcD,iCAAAA,kCAAAA,uBAAyBb,gBAAgB,CAACP,aAAa,CAAC,AAAC;IAE7E,MAAMsB,uBAAuBlC,wBAAwB;QACnDmC,MAAM;IACR;IAEA,MAAM,EACJC,gBAAgBC,mBAAkB,EAClCC,uBAAuBC,0BAAyB,EAChDC,0BAA0BC,6BAA4B,EACvD,GAAG9B;IAEJ,MAAM+B,aAAanC,iBAAiB;QAAES;QAAOC;QAASW;IAAS,GAAG;QAChEpB,aAAa;YACXc;YACAC;YACAH;QACF;QACAX,kBAAkB;YAChBgB;YACAD;YACAH;YACAF,eAAeA,0BAAAA,2BAAAA,gBAAiB,aAAa;QAC/C;QACAT,8BAA8B;YAC5BqB;YACAD;YACA,4FAA4F;YAC5F,wEAAwE;YACxEE,sBAAsBC;QACxB;KACD;IAED,MAAMU,WAAW5C,MAAM6C,MAAM,CAAiB,IAAI;IAClD,MAAM,EAAEC,mBAAkB,EAAEC,kBAAiB,EAAE,GAAG7C;IAClD,MAAM8C,YAAY5C,iBAAiB,CAAC6C,IAA6C;YAC/ElC;QAAAA,CAAAA,mBAAAA,MAAMiC,SAAS,cAAfjC,8BAAAA,KAAAA,IAAAA,iBAAAA,KAAAA,OAAkBkC;QAClB9B,cAAc,eAAemB,mBAAmBW;QAEhD,gCAAgC;QAChC,IAAI,CAACL,SAASM,OAAO,IAAI,CAACD,EAAEE,OAAO,IAAIF,EAAEG,gBAAgB,EAAE;YACzD;QACF,CAAC;QAED,IAAIH,EAAEI,GAAG,KAAK9C,MAAM;YAClB,MAAM+C,WAAWV,SAASM,OAAO,CAACK,aAAa,CAAC;YAChD,IAAID,UAAU;oBACZR;gBAAAA,CAAAA,sBAAAA,mBAAmBQ,uBAAnBR,iCAAAA,KAAAA,IAAAA,oBAA8BU;YAChC,CAAC;QACH,CAAC;QAED,IAAIP,EAAEI,GAAG,KAAK/C,KAAK;YACjB,MAAMmD,OAAOb,SAASM,OAAO,CAACQ,gBAAgB,CAAC;YAC/C,IAAID,KAAKE,MAAM,EAAE;oBAEfZ;gBADA,MAAMa,UAAUH,KAAKI,IAAI,CAACJ,KAAKE,MAAM,GAAG;gBACxCZ,CAAAA,qBAAAA,kBAAkBa,sBAAlBb,gCAAAA,KAAAA,IAAAA,mBAA2CS;YAC7C,CAAC;QACH,CAAC;IACH;IAEA,MAAMM,iBAAiB3D,kBACrB;QACE4D,MAAM;QACNC,IAAI;QACJC,kBAAkB,IAAI;QACtB,GAAI9C,cAAc,UAAUgB,oBAAoB;QAChD,GAAIhB,cAAc,eAAeqB,yBAAyB;QAC1D,GAAGzB,KAAK;QACRiC;QACA,GAAIlB,mBAAmBa,WAAWuB,qBAAqB,CAACC,aAAa,CAACpD,SAAS,CAAC,CAAC;IACnF,GACAV,cAAcW,KAAK2B,WAAWyB,QAAQ,EAAExB;IAG1C,OAAO;QACL,GAAGkB,cAAc;QACjB3C;QACAwB;QACA0B,gBAAgB,CAAC,CAACjD;QAClBO;QACAC;QACAE;QACAY;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["useDataGrid.ts"],"sourcesContent":["import * as React from 'react';\nimport { useArrowNavigationGroup, useFocusFinders } from '@fluentui/react-tabster';\nimport type { DataGridProps, DataGridState } from './DataGrid.types';\nimport { useTable_unstable } from '../Table/useTable';\nimport { useEventCallback, useMergedRefs } from '@fluentui/react-utilities';\nimport { End, Home } from '@fluentui/keyboard-keys';\nimport {\n useTableFeatures,\n useTableSort,\n useTableSelection,\n useTableColumnSizing_unstable,\n useTableCompositeNavigation,\n} from '../../hooks';\nimport { CELL_WIDTH } from '../TableSelectionCell';\n\n/**\n * Create the state required to render DataGrid.\n *\n * The returned state can be modified with hooks such as useDataGridStyles_unstable,\n * before being passed to renderDataGrid_unstable.\n *\n * @param props - props from this instance of DataGrid\n * @param ref - reference to root HTMLElement of DataGrid\n */\nexport const useDataGrid_unstable = (props: DataGridProps, ref: React.Ref<HTMLElement>): DataGridState => {\n const {\n items,\n columns,\n focusMode = 'cell',\n selectionMode,\n onSortChange,\n onSelectionChange,\n defaultSortState,\n sortState,\n selectedItems,\n defaultSelectedItems,\n subtleSelection = false,\n selectionAppearance = 'brand',\n getRowId,\n resizableColumns,\n columnSizingOptions,\n onColumnResize,\n containerWidthOffset,\n } = props;\n\n const widthOffset = containerWidthOffset ?? (selectionMode ? -CELL_WIDTH : 0);\n\n const gridTabsterAttribute = useArrowNavigationGroup({\n axis: 'grid',\n });\n\n const {\n onTableKeyDown: onCompositeKeyDown,\n tableTabsterAttribute: compositeTabsterAttribute,\n tableRowTabsterAttribute: compositeRowTabsterAttribute,\n } = useTableCompositeNavigation();\n\n const tableState = useTableFeatures({ items, columns, getRowId }, [\n useTableSort({\n defaultSortState,\n sortState,\n onSortChange,\n }),\n useTableSelection({\n defaultSelectedItems,\n selectedItems,\n onSelectionChange,\n selectionMode: selectionMode ?? 'multiselect',\n }),\n useTableColumnSizing_unstable({\n onColumnResize,\n columnSizingOptions,\n // The selection cell is not part of the columns, therefore its width needs to be subtracted\n // from the container to make sure the columns don't overflow the table.\n containerWidthOffset: widthOffset,\n }),\n ]);\n\n const innerRef = React.useRef<HTMLDivElement>(null);\n const { findFirstFocusable, findLastFocusable } = useFocusFinders();\n const onKeyDown = useEventCallback((e: React.KeyboardEvent<HTMLTableElement>) => {\n props.onKeyDown?.(e);\n focusMode === 'composite' && onCompositeKeyDown(e);\n\n // handle ctrl+home and ctrl+end\n if (!innerRef.current || !e.ctrlKey || e.defaultPrevented) {\n return;\n }\n\n if (e.key === Home) {\n const firstRow = innerRef.current.querySelector('[role=\"row\"]') as HTMLElement | null;\n if (firstRow) {\n findFirstFocusable(firstRow)?.focus();\n }\n }\n\n if (e.key === End) {\n const rows = innerRef.current.querySelectorAll('[role=\"row\"]');\n if (rows.length) {\n const lastRow = rows.item(rows.length - 1);\n findLastFocusable(lastRow as HTMLElement)?.focus();\n }\n }\n });\n\n const baseTableState = useTable_unstable(\n {\n role: 'grid',\n as: 'div',\n noNativeElements: true,\n ...(focusMode === 'cell' && gridTabsterAttribute),\n ...(focusMode === 'composite' && compositeTabsterAttribute),\n ...props,\n onKeyDown,\n ...(resizableColumns ? tableState.columnSizing_unstable.getTableProps(props) : {}),\n },\n useMergedRefs(ref, tableState.tableRef, innerRef),\n );\n\n return {\n ...baseTableState,\n focusMode,\n tableState,\n selectableRows: !!selectionMode,\n subtleSelection,\n selectionAppearance,\n resizableColumns,\n compositeRowTabsterAttribute,\n };\n};\n"],"names":["React","useArrowNavigationGroup","useFocusFinders","useTable_unstable","useEventCallback","useMergedRefs","End","Home","useTableFeatures","useTableSort","useTableSelection","useTableColumnSizing_unstable","useTableCompositeNavigation","CELL_WIDTH","useDataGrid_unstable","props","ref","items","columns","focusMode","selectionMode","onSortChange","onSelectionChange","defaultSortState","sortState","selectedItems","defaultSelectedItems","subtleSelection","selectionAppearance","getRowId","resizableColumns","columnSizingOptions","onColumnResize","containerWidthOffset","widthOffset","gridTabsterAttribute","axis","onTableKeyDown","onCompositeKeyDown","tableTabsterAttribute","compositeTabsterAttribute","tableRowTabsterAttribute","compositeRowTabsterAttribute","tableState","innerRef","useRef","findFirstFocusable","findLastFocusable","onKeyDown","e","current","ctrlKey","defaultPrevented","key","firstRow","querySelector","focus","rows","querySelectorAll","length","lastRow","item","baseTableState","role","as","noNativeElements","columnSizing_unstable","getTableProps","tableRef","selectableRows"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,uBAAuB,EAAEC,eAAe,QAAQ,0BAA0B;AAEnF,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,SAASC,gBAAgB,EAAEC,aAAa,QAAQ,4BAA4B;AAC5E,SAASC,GAAG,EAAEC,IAAI,QAAQ,0BAA0B;AACpD,SACEC,gBAAgB,EAChBC,YAAY,EACZC,iBAAiB,EACjBC,6BAA6B,EAC7BC,2BAA2B,QACtB,cAAc;AACrB,SAASC,UAAU,QAAQ,wBAAwB;AAEnD;;;;;;;;CAQC,GACD,OAAO,MAAMC,uBAAuB,CAACC,OAAsBC;IACzD,MAAM,EACJC,KAAK,EACLC,OAAO,EACPC,YAAY,MAAM,EAClBC,aAAa,EACbC,YAAY,EACZC,iBAAiB,EACjBC,gBAAgB,EAChBC,SAAS,EACTC,aAAa,EACbC,oBAAoB,EACpBC,kBAAkB,KAAK,EACvBC,sBAAsB,OAAO,EAC7BC,QAAQ,EACRC,gBAAgB,EAChBC,mBAAmB,EACnBC,cAAc,EACdC,oBAAoB,EACrB,GAAGlB;IAEJ,MAAMmB,cAAcD,iCAAAA,kCAAAA,uBAAyBb,gBAAgB,CAACP,aAAa;IAE3E,MAAMsB,uBAAuBlC,wBAAwB;QACnDmC,MAAM;IACR;IAEA,MAAM,EACJC,gBAAgBC,kBAAkB,EAClCC,uBAAuBC,yBAAyB,EAChDC,0BAA0BC,4BAA4B,EACvD,GAAG9B;IAEJ,MAAM+B,aAAanC,iBAAiB;QAAES;QAAOC;QAASW;IAAS,GAAG;QAChEpB,aAAa;YACXc;YACAC;YACAH;QACF;QACAX,kBAAkB;YAChBgB;YACAD;YACAH;YACAF,eAAeA,0BAAAA,2BAAAA,gBAAiB;QAClC;QACAT,8BAA8B;YAC5BqB;YACAD;YACA,4FAA4F;YAC5F,wEAAwE;YACxEE,sBAAsBC;QACxB;KACD;IAED,MAAMU,WAAW5C,MAAM6C,MAAM,CAAiB;IAC9C,MAAM,EAAEC,kBAAkB,EAAEC,iBAAiB,EAAE,GAAG7C;IAClD,MAAM8C,YAAY5C,iBAAiB,CAAC6C;YAClClC,kBAAAA;SAAAA,mBAAAA,CAAAA,SAAAA,OAAMiC,SAAS,cAAfjC,uCAAAA,sBAAAA,QAAkBkC;QAClB9B,cAAc,eAAemB,mBAAmBW;QAEhD,gCAAgC;QAChC,IAAI,CAACL,SAASM,OAAO,IAAI,CAACD,EAAEE,OAAO,IAAIF,EAAEG,gBAAgB,EAAE;YACzD;QACF;QAEA,IAAIH,EAAEI,GAAG,KAAK9C,MAAM;YAClB,MAAM+C,WAAWV,SAASM,OAAO,CAACK,aAAa,CAAC;YAChD,IAAID,UAAU;oBACZR;iBAAAA,sBAAAA,mBAAmBQ,uBAAnBR,0CAAAA,oBAA8BU,KAAK;YACrC;QACF;QAEA,IAAIP,EAAEI,GAAG,KAAK/C,KAAK;YACjB,MAAMmD,OAAOb,SAASM,OAAO,CAACQ,gBAAgB,CAAC;YAC/C,IAAID,KAAKE,MAAM,EAAE;oBAEfZ;gBADA,MAAMa,UAAUH,KAAKI,IAAI,CAACJ,KAAKE,MAAM,GAAG;iBACxCZ,qBAAAA,kBAAkBa,sBAAlBb,yCAAAA,mBAA2CS,KAAK;YAClD;QACF;IACF;IAEA,MAAMM,iBAAiB3D,kBACrB;QACE4D,MAAM;QACNC,IAAI;QACJC,kBAAkB;QAClB,GAAI9C,cAAc,UAAUgB,oBAAoB;QAChD,GAAIhB,cAAc,eAAeqB,yBAAyB;QAC1D,GAAGzB,KAAK;QACRiC;QACA,GAAIlB,mBAAmBa,WAAWuB,qBAAqB,CAACC,aAAa,CAACpD,SAAS,CAAC,CAAC;IACnF,GACAV,cAAcW,KAAK2B,WAAWyB,QAAQ,EAAExB;IAG1C,OAAO;QACL,GAAGkB,cAAc;QACjB3C;QACAwB;QACA0B,gBAAgB,CAAC,CAACjD;QAClBO;QACAC;QACAE;QACAY;IACF;AACF,EAAE"}
@@ -1,7 +1,7 @@
1
1
  import { useTableContextValues_unstable } from '../Table/useTableContextValues';
2
2
  export function useDataGridContextValues_unstable(state) {
3
3
  const tableContextValues = useTableContextValues_unstable(state);
4
- const { tableState , focusMode , selectableRows , subtleSelection , selectionAppearance , resizableColumns , compositeRowTabsterAttribute } = state;
4
+ const { tableState, focusMode, selectableRows, subtleSelection, selectionAppearance, resizableColumns, compositeRowTabsterAttribute } = state;
5
5
  return {
6
6
  ...tableContextValues,
7
7
  dataGrid: {
@@ -1 +1 @@
1
- {"version":3,"sources":["useDataGridContextValues.ts"],"sourcesContent":["import { useTableContextValues_unstable } from '../Table/useTableContextValues';\nimport { DataGridContextValues, DataGridState } from './DataGrid.types';\n\nexport function useDataGridContextValues_unstable(state: DataGridState): DataGridContextValues {\n const tableContextValues = useTableContextValues_unstable(state);\n const {\n tableState,\n focusMode,\n selectableRows,\n subtleSelection,\n selectionAppearance,\n resizableColumns,\n compositeRowTabsterAttribute,\n } = state;\n return {\n ...tableContextValues,\n dataGrid: {\n ...tableState,\n focusMode,\n selectableRows,\n subtleSelection,\n selectionAppearance,\n resizableColumns,\n compositeRowTabsterAttribute,\n },\n };\n}\n"],"names":["useTableContextValues_unstable","useDataGridContextValues_unstable","state","tableContextValues","tableState","focusMode","selectableRows","subtleSelection","selectionAppearance","resizableColumns","compositeRowTabsterAttribute","dataGrid"],"mappings":"AAAA,SAASA,8BAA8B,QAAQ,iCAAiC;AAGhF,OAAO,SAASC,kCAAkCC,KAAoB,EAAyB;IAC7F,MAAMC,qBAAqBH,+BAA+BE;IAC1D,MAAM,EACJE,WAAU,EACVC,UAAS,EACTC,eAAc,EACdC,gBAAe,EACfC,oBAAmB,EACnBC,iBAAgB,EAChBC,6BAA4B,EAC7B,GAAGR;IACJ,OAAO;QACL,GAAGC,kBAAkB;QACrBQ,UAAU;YACR,GAAGP,UAAU;YACbC;YACAC;YACAC;YACAC;YACAC;YACAC;QACF;IACF;AACF,CAAC"}
1
+ {"version":3,"sources":["useDataGridContextValues.ts"],"sourcesContent":["import { useTableContextValues_unstable } from '../Table/useTableContextValues';\nimport { DataGridContextValues, DataGridState } from './DataGrid.types';\n\nexport function useDataGridContextValues_unstable(state: DataGridState): DataGridContextValues {\n const tableContextValues = useTableContextValues_unstable(state);\n const {\n tableState,\n focusMode,\n selectableRows,\n subtleSelection,\n selectionAppearance,\n resizableColumns,\n compositeRowTabsterAttribute,\n } = state;\n return {\n ...tableContextValues,\n dataGrid: {\n ...tableState,\n focusMode,\n selectableRows,\n subtleSelection,\n selectionAppearance,\n resizableColumns,\n compositeRowTabsterAttribute,\n },\n };\n}\n"],"names":["useTableContextValues_unstable","useDataGridContextValues_unstable","state","tableContextValues","tableState","focusMode","selectableRows","subtleSelection","selectionAppearance","resizableColumns","compositeRowTabsterAttribute","dataGrid"],"mappings":"AAAA,SAASA,8BAA8B,QAAQ,iCAAiC;AAGhF,OAAO,SAASC,kCAAkCC,KAAoB;IACpE,MAAMC,qBAAqBH,+BAA+BE;IAC1D,MAAM,EACJE,UAAU,EACVC,SAAS,EACTC,cAAc,EACdC,eAAe,EACfC,mBAAmB,EACnBC,gBAAgB,EAChBC,4BAA4B,EAC7B,GAAGR;IACJ,OAAO;QACL,GAAGC,kBAAkB;QACrBQ,UAAU;YACR,GAAGP,UAAU;YACbC;YACAC;YACAC;YACAC;YACAC;YACAC;QACF;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["DataGridBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridBody_unstable } from './useDataGridBody';\nimport { renderDataGridBody_unstable } from './renderDataGridBody';\nimport { useDataGridBodyStyles_unstable } from './useDataGridBodyStyles.styles';\nimport type { DataGridBodyProps } from './DataGridBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridBody component\n */\nexport const DataGridBody: ForwardRefComponent<DataGridBodyProps> &\n (<TItem>(props: DataGridBodyProps<TItem>) => JSX.Element) = React.forwardRef((props, ref) => {\n const state = useDataGridBody_unstable(props, ref);\n\n useDataGridBodyStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridBodyStyles_unstable')(state);\n\n return renderDataGridBody_unstable(state);\n}) as ForwardRefComponent<DataGridBodyProps> & (<TItem>(props: DataGridBodyProps<TItem>) => JSX.Element);\n\nDataGridBody.displayName = 'DataGridBody';\n"],"names":["React","useDataGridBody_unstable","renderDataGridBody_unstable","useDataGridBodyStyles_unstable","useCustomStyleHook_unstable","DataGridBody","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,8BAA8B,QAAQ,iCAAiC;AAGhF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,6BACiDL,MAAMM,UAAU,CAAC,CAACC,OAAOC,MAAQ;IAC7F,MAAMC,QAAQR,yBAAyBM,OAAOC;IAE9CL,+BAA+BM;IAE/BL,4BAA4B,kCAAkCK;IAE9D,OAAOP,4BAA4BO;AACrC,GAAyG;AAEzGJ,aAAaK,WAAW,GAAG"}
1
+ {"version":3,"sources":["DataGridBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridBody_unstable } from './useDataGridBody';\nimport { renderDataGridBody_unstable } from './renderDataGridBody';\nimport { useDataGridBodyStyles_unstable } from './useDataGridBodyStyles.styles';\nimport type { DataGridBodyProps } from './DataGridBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridBody component\n */\nexport const DataGridBody: ForwardRefComponent<DataGridBodyProps> &\n (<TItem>(props: DataGridBodyProps<TItem>) => JSX.Element) = React.forwardRef((props, ref) => {\n const state = useDataGridBody_unstable(props, ref);\n\n useDataGridBodyStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridBodyStyles_unstable')(state);\n\n return renderDataGridBody_unstable(state);\n}) as ForwardRefComponent<DataGridBodyProps> & (<TItem>(props: DataGridBodyProps<TItem>) => JSX.Element);\n\nDataGridBody.displayName = 'DataGridBody';\n"],"names":["React","useDataGridBody_unstable","renderDataGridBody_unstable","useDataGridBodyStyles_unstable","useCustomStyleHook_unstable","DataGridBody","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,8BAA8B,QAAQ,iCAAiC;AAGhF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,6BACiDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQR,yBAAyBM,OAAOC;IAE9CL,+BAA+BM;IAE/BL,4BAA4B,kCAAkCK;IAE9D,OAAOP,4BAA4BO;AACrC,GAAyG;AAEzGJ,aAAaK,WAAW,GAAG"}
@@ -1,12 +1,14 @@
1
- /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
1
+ /** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
2
  import { assertSlots } from '@fluentui/react-utilities';
3
3
  import { TableRowIdContextProvider } from '../../contexts/rowIdContext';
4
4
  /**
5
5
  * Render the final JSX of DataGridBody
6
6
  */ export const renderDataGridBody_unstable = (state)=>{
7
7
  assertSlots(state);
8
- return /*#__PURE__*/ createElement(state.root, null, state.rows.map((row)=>/*#__PURE__*/ createElement(TableRowIdContextProvider, {
9
- key: row.rowId,
10
- value: row.rowId
11
- }, state.renderRow(row))));
8
+ return /*#__PURE__*/ _jsx(state.root, {
9
+ children: state.rows.map((row)=>/*#__PURE__*/ _jsx(TableRowIdContextProvider, {
10
+ value: row.rowId,
11
+ children: state.renderRow(row)
12
+ }, row.rowId))
13
+ });
12
14
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderDataGridBody.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { DataGridBodyState, DataGridBodySlots } from './DataGridBody.types';\nimport { TableRowIdContextProvider } from '../../contexts/rowIdContext';\n\n/**\n * Render the final JSX of DataGridBody\n */\nexport const renderDataGridBody_unstable = (state: DataGridBodyState) => {\n assertSlots<DataGridBodySlots>(state);\n\n return (\n <state.root>\n {state.rows.map(row => (\n <TableRowIdContextProvider key={row.rowId} value={row.rowId}>\n {state.renderRow(row)}\n </TableRowIdContextProvider>\n ))}\n </state.root>\n );\n};\n"],"names":["createElement","assertSlots","TableRowIdContextProvider","renderDataGridBody_unstable","state","root","rows","map","row","key","rowId","value","renderRow"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,WAAW,QAAQ,4BAA4B;AAExD,SAASC,yBAAyB,QAAQ,8BAA8B;AAExE;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC,QAA6B;IACvEH,YAA+BG;IAE/B,qBACE,AAdJ,cAcKA,MAAMC,IAAI,QACRD,MAAME,IAAI,CAACC,GAAG,CAACC,CAAAA,oBACd,AAhBR,cAgBSN;YAA0BO,KAAKD,IAAIE,KAAK;YAAEC,OAAOH,IAAIE,KAAK;WACxDN,MAAMQ,SAAS,CAACJ;AAK3B,EAAE"}
1
+ {"version":3,"sources":["renderDataGridBody.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { DataGridBodyState, DataGridBodySlots } from './DataGridBody.types';\nimport { TableRowIdContextProvider } from '../../contexts/rowIdContext';\n\n/**\n * Render the final JSX of DataGridBody\n */\nexport const renderDataGridBody_unstable = (state: DataGridBodyState) => {\n assertSlots<DataGridBodySlots>(state);\n\n return (\n <state.root>\n {state.rows.map(row => (\n <TableRowIdContextProvider key={row.rowId} value={row.rowId}>\n {state.renderRow(row)}\n </TableRowIdContextProvider>\n ))}\n </state.root>\n );\n};\n"],"names":["assertSlots","TableRowIdContextProvider","renderDataGridBody_unstable","state","root","rows","map","row","value","rowId","renderRow"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAExD,SAASC,yBAAyB,QAAQ,8BAA8B;AAExE;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC;IAC1CH,YAA+BG;IAE/B,qBACE,KAACA,MAAMC,IAAI;kBACRD,MAAME,IAAI,CAACC,GAAG,CAACC,CAAAA,oBACd,KAACN;gBAA0CO,OAAOD,IAAIE,KAAK;0BACxDN,MAAMO,SAAS,CAACH;eADaA,IAAIE,KAAK;;AAMjD,EAAE"}
@@ -11,7 +11,7 @@ import { useTableContext } from '../../contexts/tableContext';
11
11
  * @param props - props from this instance of DataGridBody
12
12
  * @param ref - reference to root HTMLElement of DataGridBody
13
13
  */ export const useDataGridBody_unstable = (props, ref)=>{
14
- const { sortable } = useTableContext();
14
+ const { sortable } = useTableContext();
15
15
  const getRows = useDataGridContext_unstable((ctx)=>ctx.getRows);
16
16
  const sort = useDataGridContext_unstable((ctx)=>ctx.sort.sort);
17
17
  const rows = sortable ? sort(getRows()) : getRows();
@@ -1 +1 @@
1
- {"version":3,"sources":["useDataGridBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { DataGridBodyProps, DataGridBodyState } from './DataGridBody.types';\nimport { useTableBody_unstable } from '../TableBody/useTableBody';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render DataGridBody.\n *\n * The returned state can be modified with hooks such as useDataGridBodyStyles_unstable,\n * before being passed to renderDataGridBody_unstable.\n *\n * @param props - props from this instance of DataGridBody\n * @param ref - reference to root HTMLElement of DataGridBody\n */\nexport const useDataGridBody_unstable = (props: DataGridBodyProps, ref: React.Ref<HTMLElement>): DataGridBodyState => {\n const { sortable } = useTableContext();\n const getRows = useDataGridContext_unstable(ctx => ctx.getRows);\n const sort = useDataGridContext_unstable(ctx => ctx.sort.sort);\n const rows = sortable ? sort(getRows()) : getRows();\n\n const baseState = useTableBody_unstable({ ...props, children: null, as: 'div' }, ref);\n return {\n ...baseState,\n rows,\n renderRow: props.children,\n };\n};\n"],"names":["React","useTableBody_unstable","useDataGridContext_unstable","useTableContext","useDataGridBody_unstable","props","ref","sortable","getRows","ctx","sort","rows","baseState","children","as","renderRow"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,qBAAqB,QAAQ,4BAA4B;AAClE,SAASC,2BAA2B,QAAQ,iCAAiC;AAC7E,SAASC,eAAe,QAAQ,8BAA8B;AAE9D;;;;;;;;CAQC,GACD,OAAO,MAAMC,2BAA2B,CAACC,OAA0BC,MAAmD;IACpH,MAAM,EAAEC,SAAQ,EAAE,GAAGJ;IACrB,MAAMK,UAAUN,4BAA4BO,CAAAA,MAAOA,IAAID,OAAO;IAC9D,MAAME,OAAOR,4BAA4BO,CAAAA,MAAOA,IAAIC,IAAI,CAACA,IAAI;IAC7D,MAAMC,OAAOJ,WAAWG,KAAKF,aAAaA,SAAS;IAEnD,MAAMI,YAAYX,sBAAsB;QAAE,GAAGI,KAAK;QAAEQ,UAAU,IAAI;QAAEC,IAAI;IAAM,GAAGR;IACjF,OAAO;QACL,GAAGM,SAAS;QACZD;QACAI,WAAWV,MAAMQ,QAAQ;IAC3B;AACF,EAAE"}
1
+ {"version":3,"sources":["useDataGridBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { DataGridBodyProps, DataGridBodyState } from './DataGridBody.types';\nimport { useTableBody_unstable } from '../TableBody/useTableBody';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render DataGridBody.\n *\n * The returned state can be modified with hooks such as useDataGridBodyStyles_unstable,\n * before being passed to renderDataGridBody_unstable.\n *\n * @param props - props from this instance of DataGridBody\n * @param ref - reference to root HTMLElement of DataGridBody\n */\nexport const useDataGridBody_unstable = (props: DataGridBodyProps, ref: React.Ref<HTMLElement>): DataGridBodyState => {\n const { sortable } = useTableContext();\n const getRows = useDataGridContext_unstable(ctx => ctx.getRows);\n const sort = useDataGridContext_unstable(ctx => ctx.sort.sort);\n const rows = sortable ? sort(getRows()) : getRows();\n\n const baseState = useTableBody_unstable({ ...props, children: null, as: 'div' }, ref);\n return {\n ...baseState,\n rows,\n renderRow: props.children,\n };\n};\n"],"names":["React","useTableBody_unstable","useDataGridContext_unstable","useTableContext","useDataGridBody_unstable","props","ref","sortable","getRows","ctx","sort","rows","baseState","children","as","renderRow"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,qBAAqB,QAAQ,4BAA4B;AAClE,SAASC,2BAA2B,QAAQ,iCAAiC;AAC7E,SAASC,eAAe,QAAQ,8BAA8B;AAE9D;;;;;;;;CAQC,GACD,OAAO,MAAMC,2BAA2B,CAACC,OAA0BC;IACjE,MAAM,EAAEC,QAAQ,EAAE,GAAGJ;IACrB,MAAMK,UAAUN,4BAA4BO,CAAAA,MAAOA,IAAID,OAAO;IAC9D,MAAME,OAAOR,4BAA4BO,CAAAA,MAAOA,IAAIC,IAAI,CAACA,IAAI;IAC7D,MAAMC,OAAOJ,WAAWG,KAAKF,aAAaA;IAE1C,MAAMI,YAAYX,sBAAsB;QAAE,GAAGI,KAAK;QAAEQ,UAAU;QAAMC,IAAI;IAAM,GAAGR;IACjF,OAAO;QACL,GAAGM,SAAS;QACZD;QACAI,WAAWV,MAAMQ,QAAQ;IAC3B;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["DataGridCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridCell_unstable } from './useDataGridCell';\nimport { renderDataGridCell_unstable } from './renderDataGridCell';\nimport { useDataGridCellStyles_unstable } from './useDataGridCellStyles.styles';\nimport type { DataGridCellProps } from './DataGridCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridCell component\n */\nexport const DataGridCell: ForwardRefComponent<DataGridCellProps> = React.forwardRef((props, ref) => {\n const state = useDataGridCell_unstable(props, ref);\n\n useDataGridCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridCellStyles_unstable')(state);\n\n return renderDataGridCell_unstable(state);\n});\n\nDataGridCell.displayName = 'DataGridCell';\n"],"names":["React","useDataGridCell_unstable","renderDataGridCell_unstable","useDataGridCellStyles_unstable","useCustomStyleHook_unstable","DataGridCell","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,8BAA8B,QAAQ,iCAAiC;AAGhF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,6BAAuDL,MAAMM,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACnG,MAAMC,QAAQR,yBAAyBM,OAAOC;IAE9CL,+BAA+BM;IAE/BL,4BAA4B,kCAAkCK;IAE9D,OAAOP,4BAA4BO;AACrC,GAAG;AAEHJ,aAAaK,WAAW,GAAG"}
1
+ {"version":3,"sources":["DataGridCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridCell_unstable } from './useDataGridCell';\nimport { renderDataGridCell_unstable } from './renderDataGridCell';\nimport { useDataGridCellStyles_unstable } from './useDataGridCellStyles.styles';\nimport type { DataGridCellProps } from './DataGridCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridCell component\n */\nexport const DataGridCell: ForwardRefComponent<DataGridCellProps> = React.forwardRef((props, ref) => {\n const state = useDataGridCell_unstable(props, ref);\n\n useDataGridCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridCellStyles_unstable')(state);\n\n return renderDataGridCell_unstable(state);\n});\n\nDataGridCell.displayName = 'DataGridCell';\n"],"names":["React","useDataGridCell_unstable","renderDataGridCell_unstable","useDataGridCellStyles_unstable","useCustomStyleHook_unstable","DataGridCell","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,8BAA8B,QAAQ,iCAAiC;AAGhF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,6BAAuDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,QAAQR,yBAAyBM,OAAOC;IAE9CL,+BAA+BM;IAE/BL,4BAA4B,kCAAkCK;IAE9D,OAAOP,4BAA4BO;AACrC,GAAG;AAEHJ,aAAaK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderDataGridCell.tsx"],"sourcesContent":["import type { DataGridCellState } from './DataGridCell.types';\nimport { renderTableCell_unstable } from '../TableCell/renderTableCell';\n\n/**\n * Render the final JSX of DataGridCell\n */\nexport const renderDataGridCell_unstable = (state: DataGridCellState) => {\n return renderTableCell_unstable(state);\n};\n"],"names":["renderTableCell_unstable","renderDataGridCell_unstable","state"],"mappings":"AACA,SAASA,wBAAwB,QAAQ,+BAA+B;AAExE;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC,QAA6B;IACvE,OAAOF,yBAAyBE;AAClC,EAAE"}
1
+ {"version":3,"sources":["renderDataGridCell.tsx"],"sourcesContent":["import type { DataGridCellState } from './DataGridCell.types';\nimport { renderTableCell_unstable } from '../TableCell/renderTableCell';\n\n/**\n * Render the final JSX of DataGridCell\n */\nexport const renderDataGridCell_unstable = (state: DataGridCellState) => {\n return renderTableCell_unstable(state);\n};\n"],"names":["renderTableCell_unstable","renderDataGridCell_unstable","state"],"mappings":"AACA,SAASA,wBAAwB,QAAQ,+BAA+B;AAExE;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC;IAC1C,OAAOF,yBAAyBE;AAClC,EAAE"}
@@ -12,7 +12,7 @@ import { useColumnIdContext } from '../../contexts/columnIdContext';
12
12
  * @param props - props from this instance of DataGridCell
13
13
  * @param ref - reference to root HTMLElement of DataGridCell
14
14
  */ export const useDataGridCell_unstable = (props, ref)=>{
15
- const { focusMode ='cell' } = props;
15
+ const { focusMode = 'cell' } = props;
16
16
  const columnId = useColumnIdContext();
17
17
  const tabbable = useDataGridContext_unstable((ctx)=>(ctx.focusMode === 'cell' || ctx.focusMode === 'composite') && focusMode !== 'none');
18
18
  const resizableColumns = useDataGridContext_unstable((ctx)=>ctx.resizableColumns);
@@ -1 +1 @@
1
- {"version":3,"sources":["useDataGridCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport type { DataGridCellProps, DataGridCellState } from './DataGridCell.types';\nimport { useTableCell_unstable } from '../TableCell/useTableCell';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useColumnIdContext } from '../../contexts/columnIdContext';\n\n/**\n * Create the state required to render DataGridCell.\n *\n * The returned state can be modified with hooks such as useDataGridCellStyles_unstable,\n * before being passed to renderDataGridCell_unstable.\n *\n * @param props - props from this instance of DataGridCell\n * @param ref - reference to root HTMLElement of DataGridCell\n */\nexport const useDataGridCell_unstable = (props: DataGridCellProps, ref: React.Ref<HTMLElement>): DataGridCellState => {\n const { focusMode = 'cell' } = props;\n const columnId = useColumnIdContext();\n const tabbable = useDataGridContext_unstable(\n ctx => (ctx.focusMode === 'cell' || ctx.focusMode === 'composite') && focusMode !== 'none',\n );\n const resizableColumns = useDataGridContext_unstable(ctx => ctx.resizableColumns);\n const columnSizing = useDataGridContext_unstable(ctx => ctx.columnSizing_unstable);\n const focusableGroupAttr = useFocusableGroup({ tabBehavior: 'limited-trap-focus' });\n return useTableCell_unstable(\n {\n as: 'div',\n role: 'gridcell',\n ...(focusMode === 'group' && focusableGroupAttr),\n tabIndex: tabbable ? 0 : undefined,\n ...(resizableColumns ? columnSizing.getTableCellProps(columnId) : {}),\n ...props,\n },\n ref,\n );\n};\n"],"names":["React","useFocusableGroup","useTableCell_unstable","useDataGridContext_unstable","useColumnIdContext","useDataGridCell_unstable","props","ref","focusMode","columnId","tabbable","ctx","resizableColumns","columnSizing","columnSizing_unstable","focusableGroupAttr","tabBehavior","as","role","tabIndex","undefined","getTableCellProps"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,iBAAiB,QAAQ,0BAA0B;AAE5D,SAASC,qBAAqB,QAAQ,4BAA4B;AAClE,SAASC,2BAA2B,QAAQ,iCAAiC;AAC7E,SAASC,kBAAkB,QAAQ,iCAAiC;AAEpE;;;;;;;;CAQC,GACD,OAAO,MAAMC,2BAA2B,CAACC,OAA0BC,MAAmD;IACpH,MAAM,EAAEC,WAAY,OAAM,EAAE,GAAGF;IAC/B,MAAMG,WAAWL;IACjB,MAAMM,WAAWP,4BACfQ,CAAAA,MAAO,AAACA,CAAAA,IAAIH,SAAS,KAAK,UAAUG,IAAIH,SAAS,KAAK,WAAU,KAAMA,cAAc;IAEtF,MAAMI,mBAAmBT,4BAA4BQ,CAAAA,MAAOA,IAAIC,gBAAgB;IAChF,MAAMC,eAAeV,4BAA4BQ,CAAAA,MAAOA,IAAIG,qBAAqB;IACjF,MAAMC,qBAAqBd,kBAAkB;QAAEe,aAAa;IAAqB;IACjF,OAAOd,sBACL;QACEe,IAAI;QACJC,MAAM;QACN,GAAIV,cAAc,WAAWO,kBAAkB;QAC/CI,UAAUT,WAAW,IAAIU,SAAS;QAClC,GAAIR,mBAAmBC,aAAaQ,iBAAiB,CAACZ,YAAY,CAAC,CAAC;QACpE,GAAGH,KAAK;IACV,GACAC;AAEJ,EAAE"}
1
+ {"version":3,"sources":["useDataGridCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport type { DataGridCellProps, DataGridCellState } from './DataGridCell.types';\nimport { useTableCell_unstable } from '../TableCell/useTableCell';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useColumnIdContext } from '../../contexts/columnIdContext';\n\n/**\n * Create the state required to render DataGridCell.\n *\n * The returned state can be modified with hooks such as useDataGridCellStyles_unstable,\n * before being passed to renderDataGridCell_unstable.\n *\n * @param props - props from this instance of DataGridCell\n * @param ref - reference to root HTMLElement of DataGridCell\n */\nexport const useDataGridCell_unstable = (props: DataGridCellProps, ref: React.Ref<HTMLElement>): DataGridCellState => {\n const { focusMode = 'cell' } = props;\n const columnId = useColumnIdContext();\n const tabbable = useDataGridContext_unstable(\n ctx => (ctx.focusMode === 'cell' || ctx.focusMode === 'composite') && focusMode !== 'none',\n );\n const resizableColumns = useDataGridContext_unstable(ctx => ctx.resizableColumns);\n const columnSizing = useDataGridContext_unstable(ctx => ctx.columnSizing_unstable);\n const focusableGroupAttr = useFocusableGroup({ tabBehavior: 'limited-trap-focus' });\n return useTableCell_unstable(\n {\n as: 'div',\n role: 'gridcell',\n ...(focusMode === 'group' && focusableGroupAttr),\n tabIndex: tabbable ? 0 : undefined,\n ...(resizableColumns ? columnSizing.getTableCellProps(columnId) : {}),\n ...props,\n },\n ref,\n );\n};\n"],"names":["React","useFocusableGroup","useTableCell_unstable","useDataGridContext_unstable","useColumnIdContext","useDataGridCell_unstable","props","ref","focusMode","columnId","tabbable","ctx","resizableColumns","columnSizing","columnSizing_unstable","focusableGroupAttr","tabBehavior","as","role","tabIndex","undefined","getTableCellProps"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,iBAAiB,QAAQ,0BAA0B;AAE5D,SAASC,qBAAqB,QAAQ,4BAA4B;AAClE,SAASC,2BAA2B,QAAQ,iCAAiC;AAC7E,SAASC,kBAAkB,QAAQ,iCAAiC;AAEpE;;;;;;;;CAQC,GACD,OAAO,MAAMC,2BAA2B,CAACC,OAA0BC;IACjE,MAAM,EAAEC,YAAY,MAAM,EAAE,GAAGF;IAC/B,MAAMG,WAAWL;IACjB,MAAMM,WAAWP,4BACfQ,CAAAA,MAAO,AAACA,CAAAA,IAAIH,SAAS,KAAK,UAAUG,IAAIH,SAAS,KAAK,WAAU,KAAMA,cAAc;IAEtF,MAAMI,mBAAmBT,4BAA4BQ,CAAAA,MAAOA,IAAIC,gBAAgB;IAChF,MAAMC,eAAeV,4BAA4BQ,CAAAA,MAAOA,IAAIG,qBAAqB;IACjF,MAAMC,qBAAqBd,kBAAkB;QAAEe,aAAa;IAAqB;IACjF,OAAOd,sBACL;QACEe,IAAI;QACJC,MAAM;QACN,GAAIV,cAAc,WAAWO,kBAAkB;QAC/CI,UAAUT,WAAW,IAAIU;QACzB,GAAIR,mBAAmBC,aAAaQ,iBAAiB,CAACZ,YAAY,CAAC,CAAC;QACpE,GAAGH,KAAK;IACV,GACAC;AAEJ,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["DataGridHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridHeader_unstable } from './useDataGridHeader';\nimport { renderDataGridHeader_unstable } from './renderDataGridHeader';\nimport { useDataGridHeaderStyles_unstable } from './useDataGridHeaderStyles.styles';\nimport type { DataGridHeaderProps } from './DataGridHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridHeader component\n */\nexport const DataGridHeader: ForwardRefComponent<DataGridHeaderProps> = React.forwardRef((props, ref) => {\n const state = useDataGridHeader_unstable(props, ref);\n\n useDataGridHeaderStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridHeaderStyles_unstable')(state);\n\n return renderDataGridHeader_unstable(state);\n});\n\nDataGridHeader.displayName = 'DataGridHeader';\n"],"names":["React","useDataGridHeader_unstable","renderDataGridHeader_unstable","useDataGridHeaderStyles_unstable","useCustomStyleHook_unstable","DataGridHeader","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,mCAAmC;AAGpF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,+BAA2DL,MAAMM,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACvG,MAAMC,QAAQR,2BAA2BM,OAAOC;IAEhDL,iCAAiCM;IAEjCL,4BAA4B,oCAAoCK;IAEhE,OAAOP,8BAA8BO;AACvC,GAAG;AAEHJ,eAAeK,WAAW,GAAG"}
1
+ {"version":3,"sources":["DataGridHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridHeader_unstable } from './useDataGridHeader';\nimport { renderDataGridHeader_unstable } from './renderDataGridHeader';\nimport { useDataGridHeaderStyles_unstable } from './useDataGridHeaderStyles.styles';\nimport type { DataGridHeaderProps } from './DataGridHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridHeader component\n */\nexport const DataGridHeader: ForwardRefComponent<DataGridHeaderProps> = React.forwardRef((props, ref) => {\n const state = useDataGridHeader_unstable(props, ref);\n\n useDataGridHeaderStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridHeaderStyles_unstable')(state);\n\n return renderDataGridHeader_unstable(state);\n});\n\nDataGridHeader.displayName = 'DataGridHeader';\n"],"names":["React","useDataGridHeader_unstable","renderDataGridHeader_unstable","useDataGridHeaderStyles_unstable","useCustomStyleHook_unstable","DataGridHeader","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,mCAAmC;AAGpF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,+BAA2DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQR,2BAA2BM,OAAOC;IAEhDL,iCAAiCM;IAEjCL,4BAA4B,oCAAoCK;IAEhE,OAAOP,8BAA8BO;AACvC,GAAG;AAEHJ,eAAeK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderDataGridHeader.tsx"],"sourcesContent":["import { renderTableHeader_unstable } from '../TableHeader/renderTableHeader';\nimport type { DataGridHeaderState } from './DataGridHeader.types';\n\n/**\n * Render the final JSX of DataGridHeader\n */\nexport const renderDataGridHeader_unstable = (state: DataGridHeaderState) => {\n return renderTableHeader_unstable(state);\n};\n"],"names":["renderTableHeader_unstable","renderDataGridHeader_unstable","state"],"mappings":"AAAA,SAASA,0BAA0B,QAAQ,mCAAmC;AAG9E;;CAEC,GACD,OAAO,MAAMC,gCAAgC,CAACC,QAA+B;IAC3E,OAAOF,2BAA2BE;AACpC,EAAE"}
1
+ {"version":3,"sources":["renderDataGridHeader.tsx"],"sourcesContent":["import { renderTableHeader_unstable } from '../TableHeader/renderTableHeader';\nimport type { DataGridHeaderState } from './DataGridHeader.types';\n\n/**\n * Render the final JSX of DataGridHeader\n */\nexport const renderDataGridHeader_unstable = (state: DataGridHeaderState) => {\n return renderTableHeader_unstable(state);\n};\n"],"names":["renderTableHeader_unstable","renderDataGridHeader_unstable","state"],"mappings":"AAAA,SAASA,0BAA0B,QAAQ,mCAAmC;AAG9E;;CAEC,GACD,OAAO,MAAMC,gCAAgC,CAACC;IAC5C,OAAOF,2BAA2BE;AACpC,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useDataGridHeader.ts"],"sourcesContent":["import * as React from 'react';\nimport type { DataGridHeaderProps, DataGridHeaderState } from './DataGridHeader.types';\nimport { useTableHeader_unstable } from '../TableHeader/useTableHeader';\n\n/**\n * Create the state required to render DataGridHeader.\n *\n * The returned state can be modified with hooks such as useDataGridHeaderStyles_unstable,\n * before being passed to renderDataGridHeader_unstable.\n *\n * @param props - props from this instance of DataGridHeader\n * @param ref - reference to root HTMLElement of DataGridHeader\n */\nexport const useDataGridHeader_unstable = (\n props: DataGridHeaderProps,\n ref: React.Ref<HTMLElement>,\n): DataGridHeaderState => {\n return useTableHeader_unstable({ ...props, as: 'div' }, ref);\n};\n"],"names":["React","useTableHeader_unstable","useDataGridHeader_unstable","props","ref","as"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,uBAAuB,QAAQ,gCAAgC;AAExE;;;;;;;;CAQC,GACD,OAAO,MAAMC,6BAA6B,CACxCC,OACAC,MACwB;IACxB,OAAOH,wBAAwB;QAAE,GAAGE,KAAK;QAAEE,IAAI;IAAM,GAAGD;AAC1D,EAAE"}
1
+ {"version":3,"sources":["useDataGridHeader.ts"],"sourcesContent":["import * as React from 'react';\nimport type { DataGridHeaderProps, DataGridHeaderState } from './DataGridHeader.types';\nimport { useTableHeader_unstable } from '../TableHeader/useTableHeader';\n\n/**\n * Create the state required to render DataGridHeader.\n *\n * The returned state can be modified with hooks such as useDataGridHeaderStyles_unstable,\n * before being passed to renderDataGridHeader_unstable.\n *\n * @param props - props from this instance of DataGridHeader\n * @param ref - reference to root HTMLElement of DataGridHeader\n */\nexport const useDataGridHeader_unstable = (\n props: DataGridHeaderProps,\n ref: React.Ref<HTMLElement>,\n): DataGridHeaderState => {\n return useTableHeader_unstable({ ...props, as: 'div' }, ref);\n};\n"],"names":["React","useTableHeader_unstable","useDataGridHeader_unstable","props","ref","as"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,uBAAuB,QAAQ,gCAAgC;AAExE;;;;;;;;CAQC,GACD,OAAO,MAAMC,6BAA6B,CACxCC,OACAC;IAEA,OAAOH,wBAAwB;QAAE,GAAGE,KAAK;QAAEE,IAAI;IAAM,GAAGD;AAC1D,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["DataGridHeaderCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridHeaderCell_unstable } from './useDataGridHeaderCell';\nimport { renderDataGridHeaderCell_unstable } from './renderDataGridHeaderCell';\nimport { useDataGridHeaderCellStyles_unstable } from './useDataGridHeaderCellStyles.styles';\nimport type { DataGridHeaderCellProps } from './DataGridHeaderCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridHeaderCell component\n */\nexport const DataGridHeaderCell: ForwardRefComponent<DataGridHeaderCellProps> = React.forwardRef((props, ref) => {\n const state = useDataGridHeaderCell_unstable(props, ref);\n\n useDataGridHeaderCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridHeaderCellStyles_unstable')(state);\n\n return renderDataGridHeaderCell_unstable(state);\n});\n\nDataGridHeaderCell.displayName = 'DataGridHeaderCell';\n"],"names":["React","useDataGridHeaderCell_unstable","renderDataGridHeaderCell_unstable","useDataGridHeaderCellStyles_unstable","useCustomStyleHook_unstable","DataGridHeaderCell","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,8BAA8B,QAAQ,0BAA0B;AACzE,SAASC,iCAAiC,QAAQ,6BAA6B;AAC/E,SAASC,oCAAoC,QAAQ,uCAAuC;AAG5F,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,mCAAmEL,MAAMM,UAAU,CAAC,CAACC,OAAOC,MAAQ;IAC/G,MAAMC,QAAQR,+BAA+BM,OAAOC;IAEpDL,qCAAqCM;IAErCL,4BAA4B,wCAAwCK;IAEpE,OAAOP,kCAAkCO;AAC3C,GAAG;AAEHJ,mBAAmBK,WAAW,GAAG"}
1
+ {"version":3,"sources":["DataGridHeaderCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridHeaderCell_unstable } from './useDataGridHeaderCell';\nimport { renderDataGridHeaderCell_unstable } from './renderDataGridHeaderCell';\nimport { useDataGridHeaderCellStyles_unstable } from './useDataGridHeaderCellStyles.styles';\nimport type { DataGridHeaderCellProps } from './DataGridHeaderCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridHeaderCell component\n */\nexport const DataGridHeaderCell: ForwardRefComponent<DataGridHeaderCellProps> = React.forwardRef((props, ref) => {\n const state = useDataGridHeaderCell_unstable(props, ref);\n\n useDataGridHeaderCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridHeaderCellStyles_unstable')(state);\n\n return renderDataGridHeaderCell_unstable(state);\n});\n\nDataGridHeaderCell.displayName = 'DataGridHeaderCell';\n"],"names":["React","useDataGridHeaderCell_unstable","renderDataGridHeaderCell_unstable","useDataGridHeaderCellStyles_unstable","useCustomStyleHook_unstable","DataGridHeaderCell","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,8BAA8B,QAAQ,0BAA0B;AACzE,SAASC,iCAAiC,QAAQ,6BAA6B;AAC/E,SAASC,oCAAoC,QAAQ,uCAAuC;AAG5F,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,mCAAmEL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACvG,MAAMC,QAAQR,+BAA+BM,OAAOC;IAEpDL,qCAAqCM;IAErCL,4BAA4B,wCAAwCK;IAEpE,OAAOP,kCAAkCO;AAC3C,GAAG;AAEHJ,mBAAmBK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderDataGridHeaderCell.tsx"],"sourcesContent":["import type { DataGridHeaderCellState } from './DataGridHeaderCell.types';\nimport { renderTableHeaderCell_unstable } from '../TableHeaderCell/renderTableHeaderCell';\n\n/**\n * Render the final JSX of DataGridHeaderCell\n */\nexport const renderDataGridHeaderCell_unstable = (state: DataGridHeaderCellState) => {\n return renderTableHeaderCell_unstable(state);\n};\n"],"names":["renderTableHeaderCell_unstable","renderDataGridHeaderCell_unstable","state"],"mappings":"AACA,SAASA,8BAA8B,QAAQ,2CAA2C;AAE1F;;CAEC,GACD,OAAO,MAAMC,oCAAoC,CAACC,QAAmC;IACnF,OAAOF,+BAA+BE;AACxC,EAAE"}
1
+ {"version":3,"sources":["renderDataGridHeaderCell.tsx"],"sourcesContent":["import type { DataGridHeaderCellState } from './DataGridHeaderCell.types';\nimport { renderTableHeaderCell_unstable } from '../TableHeaderCell/renderTableHeaderCell';\n\n/**\n * Render the final JSX of DataGridHeaderCell\n */\nexport const renderDataGridHeaderCell_unstable = (state: DataGridHeaderCellState) => {\n return renderTableHeaderCell_unstable(state);\n};\n"],"names":["renderTableHeaderCell_unstable","renderDataGridHeaderCell_unstable","state"],"mappings":"AACA,SAASA,8BAA8B,QAAQ,2CAA2C;AAE1F;;CAEC,GACD,OAAO,MAAMC,oCAAoC,CAACC;IAChD,OAAOF,+BAA+BE;AACxC,EAAE"}
@@ -14,18 +14,18 @@ import { useTableContext } from '../../contexts/tableContext';
14
14
  * @param ref - reference to root HTMLElement of DataGridHeaderCell
15
15
  */ export const useDataGridHeaderCell_unstable = (props, ref)=>{
16
16
  const columnId = useColumnIdContext();
17
- const { sortable } = useTableContext();
17
+ const { sortable } = useTableContext();
18
18
  const toggleColumnSort = useDataGridContext_unstable((ctx)=>ctx.sort.toggleColumnSort);
19
19
  const sortDirection = useDataGridContext_unstable((ctx)=>sortable ? ctx.sort.getSortDirection(columnId) : undefined);
20
20
  const resizableColumns = useDataGridContext_unstable((ctx)=>ctx.resizableColumns);
21
21
  const columnSizing = useDataGridContext_unstable((ctx)=>ctx.columnSizing_unstable);
22
22
  // eslint-disable-next-line deprecation/deprecation -- prefer HTMLTableCellElement
23
23
  const onClick = useEventCallback((e)=>{
24
- var _props_onClick;
24
+ var _props_onClick, _props;
25
25
  if (sortable) {
26
26
  toggleColumnSort(e, columnId);
27
27
  }
28
- (_props_onClick = props.onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(props, e);
28
+ (_props_onClick = (_props = props).onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(_props, e);
29
29
  });
30
30
  return useTableHeaderCell_unstable({
31
31
  sortDirection,
@@ -1 +1 @@
1
- {"version":3,"sources":["useDataGridHeaderCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport type { DataGridHeaderCellProps, DataGridHeaderCellState } from './DataGridHeaderCell.types';\nimport { useTableHeaderCell_unstable } from '../TableHeaderCell/useTableHeaderCell';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useColumnIdContext } from '../../contexts/columnIdContext';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render DataGridHeaderCell.\n *\n * The returned state can be modified with hooks such as useDataGridHeaderCellStyles_unstable,\n * before being passed to renderDataGridHeaderCell_unstable.\n *\n * @param props - props from this instance of DataGridHeaderCell\n * @param ref - reference to root HTMLElement of DataGridHeaderCell\n */\nexport const useDataGridHeaderCell_unstable = (\n props: DataGridHeaderCellProps,\n ref: React.Ref<HTMLElement>,\n): DataGridHeaderCellState => {\n const columnId = useColumnIdContext();\n const { sortable } = useTableContext();\n const toggleColumnSort = useDataGridContext_unstable(ctx => ctx.sort.toggleColumnSort);\n const sortDirection = useDataGridContext_unstable(ctx =>\n sortable ? ctx.sort.getSortDirection(columnId) : undefined,\n );\n\n const resizableColumns = useDataGridContext_unstable(ctx => ctx.resizableColumns);\n const columnSizing = useDataGridContext_unstable(ctx => ctx.columnSizing_unstable);\n\n // eslint-disable-next-line deprecation/deprecation -- prefer HTMLTableCellElement\n const onClick = useEventCallback((e: React.MouseEvent<HTMLTableHeaderCellElement>) => {\n if (sortable) {\n toggleColumnSort(e, columnId);\n }\n props.onClick?.(e);\n });\n\n return useTableHeaderCell_unstable(\n {\n sortDirection,\n as: 'div',\n tabIndex: sortable ? undefined : 0,\n ...(resizableColumns ? columnSizing.getTableHeaderCellProps(columnId) : {}),\n ...props,\n onClick,\n },\n ref,\n );\n};\n"],"names":["React","useEventCallback","useTableHeaderCell_unstable","useDataGridContext_unstable","useColumnIdContext","useTableContext","useDataGridHeaderCell_unstable","props","ref","columnId","sortable","toggleColumnSort","ctx","sort","sortDirection","getSortDirection","undefined","resizableColumns","columnSizing","columnSizing_unstable","onClick","e","as","tabIndex","getTableHeaderCellProps"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,gBAAgB,QAAQ,4BAA4B;AAE7D,SAASC,2BAA2B,QAAQ,wCAAwC;AACpF,SAASC,2BAA2B,QAAQ,iCAAiC;AAC7E,SAASC,kBAAkB,QAAQ,iCAAiC;AACpE,SAASC,eAAe,QAAQ,8BAA8B;AAE9D;;;;;;;;CAQC,GACD,OAAO,MAAMC,iCAAiC,CAC5CC,OACAC,MAC4B;IAC5B,MAAMC,WAAWL;IACjB,MAAM,EAAEM,SAAQ,EAAE,GAAGL;IACrB,MAAMM,mBAAmBR,4BAA4BS,CAAAA,MAAOA,IAAIC,IAAI,CAACF,gBAAgB;IACrF,MAAMG,gBAAgBX,4BAA4BS,CAAAA,MAChDF,WAAWE,IAAIC,IAAI,CAACE,gBAAgB,CAACN,YAAYO,SAAS;IAG5D,MAAMC,mBAAmBd,4BAA4BS,CAAAA,MAAOA,IAAIK,gBAAgB;IAChF,MAAMC,eAAef,4BAA4BS,CAAAA,MAAOA,IAAIO,qBAAqB;IAEjF,kFAAkF;IAClF,MAAMC,UAAUnB,iBAAiB,CAACoB,IAAoD;YAIpFd;QAHA,IAAIG,UAAU;YACZC,iBAAiBU,GAAGZ;QACtB,CAAC;QACDF,CAAAA,iBAAAA,MAAMa,OAAO,cAAbb,4BAAAA,KAAAA,IAAAA,eAAAA,KAAAA,OAAgBc;IAClB;IAEA,OAAOnB,4BACL;QACEY;QACAQ,IAAI;QACJC,UAAUb,WAAWM,YAAY,CAAC;QAClC,GAAIC,mBAAmBC,aAAaM,uBAAuB,CAACf,YAAY,CAAC,CAAC;QAC1E,GAAGF,KAAK;QACRa;IACF,GACAZ;AAEJ,EAAE"}
1
+ {"version":3,"sources":["useDataGridHeaderCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport type { DataGridHeaderCellProps, DataGridHeaderCellState } from './DataGridHeaderCell.types';\nimport { useTableHeaderCell_unstable } from '../TableHeaderCell/useTableHeaderCell';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useColumnIdContext } from '../../contexts/columnIdContext';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render DataGridHeaderCell.\n *\n * The returned state can be modified with hooks such as useDataGridHeaderCellStyles_unstable,\n * before being passed to renderDataGridHeaderCell_unstable.\n *\n * @param props - props from this instance of DataGridHeaderCell\n * @param ref - reference to root HTMLElement of DataGridHeaderCell\n */\nexport const useDataGridHeaderCell_unstable = (\n props: DataGridHeaderCellProps,\n ref: React.Ref<HTMLElement>,\n): DataGridHeaderCellState => {\n const columnId = useColumnIdContext();\n const { sortable } = useTableContext();\n const toggleColumnSort = useDataGridContext_unstable(ctx => ctx.sort.toggleColumnSort);\n const sortDirection = useDataGridContext_unstable(ctx =>\n sortable ? ctx.sort.getSortDirection(columnId) : undefined,\n );\n\n const resizableColumns = useDataGridContext_unstable(ctx => ctx.resizableColumns);\n const columnSizing = useDataGridContext_unstable(ctx => ctx.columnSizing_unstable);\n\n // eslint-disable-next-line deprecation/deprecation -- prefer HTMLTableCellElement\n const onClick = useEventCallback((e: React.MouseEvent<HTMLTableHeaderCellElement>) => {\n if (sortable) {\n toggleColumnSort(e, columnId);\n }\n props.onClick?.(e);\n });\n\n return useTableHeaderCell_unstable(\n {\n sortDirection,\n as: 'div',\n tabIndex: sortable ? undefined : 0,\n ...(resizableColumns ? columnSizing.getTableHeaderCellProps(columnId) : {}),\n ...props,\n onClick,\n },\n ref,\n );\n};\n"],"names":["React","useEventCallback","useTableHeaderCell_unstable","useDataGridContext_unstable","useColumnIdContext","useTableContext","useDataGridHeaderCell_unstable","props","ref","columnId","sortable","toggleColumnSort","ctx","sort","sortDirection","getSortDirection","undefined","resizableColumns","columnSizing","columnSizing_unstable","onClick","e","as","tabIndex","getTableHeaderCellProps"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,gBAAgB,QAAQ,4BAA4B;AAE7D,SAASC,2BAA2B,QAAQ,wCAAwC;AACpF,SAASC,2BAA2B,QAAQ,iCAAiC;AAC7E,SAASC,kBAAkB,QAAQ,iCAAiC;AACpE,SAASC,eAAe,QAAQ,8BAA8B;AAE9D;;;;;;;;CAQC,GACD,OAAO,MAAMC,iCAAiC,CAC5CC,OACAC;IAEA,MAAMC,WAAWL;IACjB,MAAM,EAAEM,QAAQ,EAAE,GAAGL;IACrB,MAAMM,mBAAmBR,4BAA4BS,CAAAA,MAAOA,IAAIC,IAAI,CAACF,gBAAgB;IACrF,MAAMG,gBAAgBX,4BAA4BS,CAAAA,MAChDF,WAAWE,IAAIC,IAAI,CAACE,gBAAgB,CAACN,YAAYO;IAGnD,MAAMC,mBAAmBd,4BAA4BS,CAAAA,MAAOA,IAAIK,gBAAgB;IAChF,MAAMC,eAAef,4BAA4BS,CAAAA,MAAOA,IAAIO,qBAAqB;IAEjF,kFAAkF;IAClF,MAAMC,UAAUnB,iBAAiB,CAACoB;YAIhCd,gBAAAA;QAHA,IAAIG,UAAU;YACZC,iBAAiBU,GAAGZ;QACtB;SACAF,iBAAAA,CAAAA,SAAAA,OAAMa,OAAO,cAAbb,qCAAAA,oBAAAA,QAAgBc;IAClB;IAEA,OAAOnB,4BACL;QACEY;QACAQ,IAAI;QACJC,UAAUb,WAAWM,YAAY;QACjC,GAAIC,mBAAmBC,aAAaM,uBAAuB,CAACf,YAAY,CAAC,CAAC;QAC1E,GAAGF,KAAK;QACRa;IACF,GACAZ;AAEJ,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["DataGridRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridRow_unstable } from './useDataGridRow';\nimport { renderDataGridRow_unstable } from './renderDataGridRow';\nimport { useDataGridRowStyles_unstable } from './useDataGridRowStyles.styles';\nimport type { DataGridRowProps } from './DataGridRow.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridRow component\n */\nexport const DataGridRow: ForwardRefComponent<DataGridRowProps> &\n (<TItem>(props: DataGridRowProps<TItem>) => JSX.Element) = React.forwardRef((props, ref) => {\n const state = useDataGridRow_unstable(props, ref);\n\n useDataGridRowStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridRowStyles_unstable')(state);\n\n return renderDataGridRow_unstable(state);\n}) as ForwardRefComponent<DataGridRowProps> & (<TItem>(props: DataGridRowProps<TItem>) => JSX.Element);\n\nDataGridRow.displayName = 'DataGridRow';\n"],"names":["React","useDataGridRow_unstable","renderDataGridRow_unstable","useDataGridRowStyles_unstable","useCustomStyleHook_unstable","DataGridRow","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,6BAA6B,QAAQ,gCAAgC;AAG9E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,4BACgDL,MAAMM,UAAU,CAAC,CAACC,OAAOC,MAAQ;IAC5F,MAAMC,QAAQR,wBAAwBM,OAAOC;IAE7CL,8BAA8BM;IAE9BL,4BAA4B,iCAAiCK;IAE7D,OAAOP,2BAA2BO;AACpC,GAAuG;AAEvGJ,YAAYK,WAAW,GAAG"}
1
+ {"version":3,"sources":["DataGridRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridRow_unstable } from './useDataGridRow';\nimport { renderDataGridRow_unstable } from './renderDataGridRow';\nimport { useDataGridRowStyles_unstable } from './useDataGridRowStyles.styles';\nimport type { DataGridRowProps } from './DataGridRow.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridRow component\n */\nexport const DataGridRow: ForwardRefComponent<DataGridRowProps> &\n (<TItem>(props: DataGridRowProps<TItem>) => JSX.Element) = React.forwardRef((props, ref) => {\n const state = useDataGridRow_unstable(props, ref);\n\n useDataGridRowStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridRowStyles_unstable')(state);\n\n return renderDataGridRow_unstable(state);\n}) as ForwardRefComponent<DataGridRowProps> & (<TItem>(props: DataGridRowProps<TItem>) => JSX.Element);\n\nDataGridRow.displayName = 'DataGridRow';\n"],"names":["React","useDataGridRow_unstable","renderDataGridRow_unstable","useDataGridRowStyles_unstable","useCustomStyleHook_unstable","DataGridRow","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,6BAA6B,QAAQ,gCAAgC;AAG9E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,4BACgDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACpF,MAAMC,QAAQR,wBAAwBM,OAAOC;IAE7CL,8BAA8BM;IAE9BL,4BAA4B,iCAAiCK;IAE7D,OAAOP,2BAA2BO;AACpC,GAAuG;AAEvGJ,YAAYK,WAAW,GAAG"}
@@ -1,12 +1,17 @@
1
- /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
1
+ /** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
2
  import { assertSlots } from '@fluentui/react-utilities';
3
3
  import { ColumnIdContextProvider } from '../../contexts/columnIdContext';
4
4
  /**
5
5
  * Render the final JSX of DataGridRow
6
6
  */ export const renderDataGridRow_unstable = (state)=>{
7
7
  assertSlots(state);
8
- return /*#__PURE__*/ createElement(state.root, null, state.selectionCell && /*#__PURE__*/ createElement(state.selectionCell, null), state.columnDefs.map((columnDef)=>/*#__PURE__*/ createElement(ColumnIdContextProvider, {
9
- value: columnDef.columnId,
10
- key: columnDef.columnId
11
- }, state.renderCell(columnDef, state.dataGridContextValue))));
8
+ return /*#__PURE__*/ _jsxs(state.root, {
9
+ children: [
10
+ state.selectionCell && /*#__PURE__*/ _jsx(state.selectionCell, {}),
11
+ state.columnDefs.map((columnDef)=>/*#__PURE__*/ _jsx(ColumnIdContextProvider, {
12
+ value: columnDef.columnId,
13
+ children: state.renderCell(columnDef, state.dataGridContextValue)
14
+ }, columnDef.columnId))
15
+ ]
16
+ });
12
17
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderDataGridRow.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { DataGridRowState, DataGridRowSlots } from './DataGridRow.types';\nimport { ColumnIdContextProvider } from '../../contexts/columnIdContext';\n\n/**\n * Render the final JSX of DataGridRow\n */\nexport const renderDataGridRow_unstable = (state: DataGridRowState) => {\n assertSlots<DataGridRowSlots>(state);\n\n return (\n <state.root>\n {state.selectionCell && <state.selectionCell />}\n {state.columnDefs.map(columnDef => (\n <ColumnIdContextProvider value={columnDef.columnId} key={columnDef.columnId}>\n {state.renderCell(columnDef, state.dataGridContextValue)}\n </ColumnIdContextProvider>\n ))}\n </state.root>\n );\n};\n"],"names":["createElement","assertSlots","ColumnIdContextProvider","renderDataGridRow_unstable","state","root","selectionCell","columnDefs","map","columnDef","value","columnId","key","renderCell","dataGridContextValue"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,WAAW,QAAQ,4BAA4B;AAExD,SAASC,uBAAuB,QAAQ,iCAAiC;AAEzE;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC,QAA4B;IACrEH,YAA8BG;IAE9B,qBACE,AAdJ,cAcKA,MAAMC,IAAI,QACRD,MAAME,aAAa,kBAAI,AAf9B,cAe+BF,MAAME,aAAa,SAC3CF,MAAMG,UAAU,CAACC,GAAG,CAACC,CAAAA,0BACpB,AAjBR,cAiBSP;YAAwBQ,OAAOD,UAAUE,QAAQ;YAAEC,KAAKH,UAAUE,QAAQ;WACxEP,MAAMS,UAAU,CAACJ,WAAWL,MAAMU,oBAAoB;AAKjE,EAAE"}
1
+ {"version":3,"sources":["renderDataGridRow.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { DataGridRowState, DataGridRowSlots } from './DataGridRow.types';\nimport { ColumnIdContextProvider } from '../../contexts/columnIdContext';\n\n/**\n * Render the final JSX of DataGridRow\n */\nexport const renderDataGridRow_unstable = (state: DataGridRowState) => {\n assertSlots<DataGridRowSlots>(state);\n\n return (\n <state.root>\n {state.selectionCell && <state.selectionCell />}\n {state.columnDefs.map(columnDef => (\n <ColumnIdContextProvider value={columnDef.columnId} key={columnDef.columnId}>\n {state.renderCell(columnDef, state.dataGridContextValue)}\n </ColumnIdContextProvider>\n ))}\n </state.root>\n );\n};\n"],"names":["assertSlots","ColumnIdContextProvider","renderDataGridRow_unstable","state","root","selectionCell","columnDefs","map","columnDef","value","columnId","renderCell","dataGridContextValue"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAExD,SAASC,uBAAuB,QAAQ,iCAAiC;AAEzE;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC;IACzCH,YAA8BG;IAE9B,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,aAAa,kBAAI,KAACF,MAAME,aAAa;YAC3CF,MAAMG,UAAU,CAACC,GAAG,CAACC,CAAAA,0BACpB,KAACP;oBAAwBQ,OAAOD,UAAUE,QAAQ;8BAC/CP,MAAMQ,UAAU,CAACH,WAAWL,MAAMS,oBAAoB;mBADAJ,UAAUE,QAAQ;;;AAMnF,EAAE"}