@fluentui/react-table 9.2.11 → 9.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (555) hide show
  1. package/CHANGELOG.json +143 -1
  2. package/CHANGELOG.md +40 -2
  3. package/lib/DataGrid.js +0 -1
  4. package/lib/DataGrid.js.map +1 -1
  5. package/lib/DataGridBody.js +0 -1
  6. package/lib/DataGridBody.js.map +1 -1
  7. package/lib/DataGridCell.js +0 -1
  8. package/lib/DataGridCell.js.map +1 -1
  9. package/lib/DataGridHeader.js +0 -1
  10. package/lib/DataGridHeader.js.map +1 -1
  11. package/lib/DataGridHeaderCell.js +0 -1
  12. package/lib/DataGridHeaderCell.js.map +1 -1
  13. package/lib/DataGridRow.js +0 -1
  14. package/lib/DataGridRow.js.map +1 -1
  15. package/lib/DataGridSelectionCell.js +0 -1
  16. package/lib/DataGridSelectionCell.js.map +1 -1
  17. package/lib/Table.js +0 -1
  18. package/lib/Table.js.map +1 -1
  19. package/lib/TableBody.js +0 -1
  20. package/lib/TableBody.js.map +1 -1
  21. package/lib/TableCell.js +0 -1
  22. package/lib/TableCell.js.map +1 -1
  23. package/lib/TableCellActions.js +0 -1
  24. package/lib/TableCellActions.js.map +1 -1
  25. package/lib/TableCellLayout.js +0 -1
  26. package/lib/TableCellLayout.js.map +1 -1
  27. package/lib/TableCellPrimaryLayout.js +0 -1
  28. package/lib/TableCellPrimaryLayout.js.map +1 -1
  29. package/lib/TableHeader.js +0 -1
  30. package/lib/TableHeader.js.map +1 -1
  31. package/lib/TableHeaderCell.js +0 -1
  32. package/lib/TableHeaderCell.js.map +1 -1
  33. package/lib/TableResizeHandle.js +0 -1
  34. package/lib/TableResizeHandle.js.map +1 -1
  35. package/lib/TableRow.js +0 -1
  36. package/lib/TableRow.js.map +1 -1
  37. package/lib/TableSelectionCell.js +0 -1
  38. package/lib/TableSelectionCell.js.map +1 -1
  39. package/lib/components/DataGrid/DataGrid.js +5 -7
  40. package/lib/components/DataGrid/DataGrid.js.map +1 -1
  41. package/lib/components/DataGrid/DataGrid.types.js +0 -1
  42. package/lib/components/DataGrid/DataGrid.types.js.map +1 -1
  43. package/lib/components/DataGrid/index.js +0 -1
  44. package/lib/components/DataGrid/index.js.map +1 -1
  45. package/lib/components/DataGrid/renderDataGrid.js +4 -6
  46. package/lib/components/DataGrid/renderDataGrid.js.map +1 -1
  47. package/lib/components/DataGrid/useDataGrid.js +71 -89
  48. package/lib/components/DataGrid/useDataGrid.js.map +1 -1
  49. package/lib/components/DataGrid/useDataGridContextValues.js +12 -13
  50. package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -1
  51. package/lib/components/DataGrid/useDataGridStyles.styles.js.map +1 -1
  52. package/lib/components/DataGridBody/DataGridBody.js +5 -7
  53. package/lib/components/DataGridBody/DataGridBody.js.map +1 -1
  54. package/lib/components/DataGridBody/DataGridBody.types.js +0 -1
  55. package/lib/components/DataGridBody/DataGridBody.types.js.map +1 -1
  56. package/lib/components/DataGridBody/index.js +0 -1
  57. package/lib/components/DataGridBody/index.js.map +1 -1
  58. package/lib/components/DataGridBody/renderDataGridBody.js +7 -12
  59. package/lib/components/DataGridBody/renderDataGridBody.js.map +1 -1
  60. package/lib/components/DataGridBody/useDataGridBody.js +15 -19
  61. package/lib/components/DataGridBody/useDataGridBody.js.map +1 -1
  62. package/lib/components/DataGridBody/useDataGridBodyStyles.styles.js.map +1 -1
  63. package/lib/components/DataGridCell/DataGridCell.js +5 -7
  64. package/lib/components/DataGridCell/DataGridCell.js.map +1 -1
  65. package/lib/components/DataGridCell/DataGridCell.types.js +1 -2
  66. package/lib/components/DataGridCell/DataGridCell.types.js.map +1 -1
  67. package/lib/components/DataGridCell/index.js +0 -1
  68. package/lib/components/DataGridCell/index.js.map +1 -1
  69. package/lib/components/DataGridCell/renderDataGridCell.js +2 -4
  70. package/lib/components/DataGridCell/renderDataGridCell.js.map +1 -1
  71. package/lib/components/DataGridCell/useDataGridCell.js +12 -14
  72. package/lib/components/DataGridCell/useDataGridCell.js.map +1 -1
  73. package/lib/components/DataGridCell/useDataGridCellStyles.styles.js.map +1 -1
  74. package/lib/components/DataGridHeader/DataGridHeader.js +5 -7
  75. package/lib/components/DataGridHeader/DataGridHeader.js.map +1 -1
  76. package/lib/components/DataGridHeader/DataGridHeader.types.js +1 -2
  77. package/lib/components/DataGridHeader/DataGridHeader.types.js.map +1 -1
  78. package/lib/components/DataGridHeader/index.js +0 -1
  79. package/lib/components/DataGridHeader/index.js.map +1 -1
  80. package/lib/components/DataGridHeader/renderDataGridHeader.js +2 -4
  81. package/lib/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
  82. package/lib/components/DataGridHeader/useDataGridHeader.js +5 -7
  83. package/lib/components/DataGridHeader/useDataGridHeader.js.map +1 -1
  84. package/lib/components/DataGridHeader/useDataGridHeaderStyles.styles.js.map +1 -1
  85. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js +5 -7
  86. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
  87. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js +1 -2
  88. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -1
  89. package/lib/components/DataGridHeaderCell/index.js +0 -1
  90. package/lib/components/DataGridHeaderCell/index.js.map +1 -1
  91. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js +2 -4
  92. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
  93. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js +23 -26
  94. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  95. package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js.map +1 -1
  96. package/lib/components/DataGridRow/DataGridRow.js +5 -7
  97. package/lib/components/DataGridRow/DataGridRow.js.map +1 -1
  98. package/lib/components/DataGridRow/DataGridRow.types.js +0 -1
  99. package/lib/components/DataGridRow/DataGridRow.types.js.map +1 -1
  100. package/lib/components/DataGridRow/index.js +0 -1
  101. package/lib/components/DataGridRow/index.js.map +1 -1
  102. package/lib/components/DataGridRow/renderDataGridRow.js +7 -12
  103. package/lib/components/DataGridRow/renderDataGridRow.js.map +1 -1
  104. package/lib/components/DataGridRow/useDataGridRow.js +54 -56
  105. package/lib/components/DataGridRow/useDataGridRow.js.map +1 -1
  106. package/lib/components/DataGridRow/useDataGridRowStyles.styles.js.map +1 -1
  107. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js +5 -7
  108. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
  109. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js +1 -2
  110. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -1
  111. package/lib/components/DataGridSelectionCell/index.js +0 -1
  112. package/lib/components/DataGridSelectionCell/index.js.map +1 -1
  113. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js +2 -4
  114. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
  115. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js +31 -33
  116. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
  117. package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js.map +1 -1
  118. package/lib/components/Table/Table.js +5 -7
  119. package/lib/components/Table/Table.js.map +1 -1
  120. package/lib/components/Table/Table.types.js +1 -2
  121. package/lib/components/Table/Table.types.js.map +1 -1
  122. package/lib/components/Table/index.js +0 -1
  123. package/lib/components/Table/index.js.map +1 -1
  124. package/lib/components/Table/renderTable.js +6 -11
  125. package/lib/components/Table/renderTable.js.map +1 -1
  126. package/lib/components/Table/useTable.js +17 -19
  127. package/lib/components/Table/useTable.js.map +1 -1
  128. package/lib/components/Table/useTableContextValues.js +13 -14
  129. package/lib/components/Table/useTableContextValues.js.map +1 -1
  130. package/lib/components/Table/useTableStyles.styles.js.map +1 -1
  131. package/lib/components/TableBody/TableBody.js +5 -7
  132. package/lib/components/TableBody/TableBody.js.map +1 -1
  133. package/lib/components/TableBody/TableBody.types.js +1 -2
  134. package/lib/components/TableBody/TableBody.types.js.map +1 -1
  135. package/lib/components/TableBody/index.js +0 -1
  136. package/lib/components/TableBody/index.js.map +1 -1
  137. package/lib/components/TableBody/renderTableBody.js +4 -9
  138. package/lib/components/TableBody/renderTableBody.js.map +1 -1
  139. package/lib/components/TableBody/useTableBody.js +15 -19
  140. package/lib/components/TableBody/useTableBody.js.map +1 -1
  141. package/lib/components/TableBody/useTableBodyStyles.styles.js.map +1 -1
  142. package/lib/components/TableCell/TableCell.js +5 -7
  143. package/lib/components/TableCell/TableCell.js.map +1 -1
  144. package/lib/components/TableCell/TableCell.types.js +1 -2
  145. package/lib/components/TableCell/TableCell.types.js.map +1 -1
  146. package/lib/components/TableCell/index.js +0 -1
  147. package/lib/components/TableCell/index.js.map +1 -1
  148. package/lib/components/TableCell/renderTableCell.js +4 -9
  149. package/lib/components/TableCell/renderTableCell.js.map +1 -1
  150. package/lib/components/TableCell/useTableCell.js +16 -21
  151. package/lib/components/TableCell/useTableCell.js.map +1 -1
  152. package/lib/components/TableCell/useTableCellStyles.styles.js.map +1 -1
  153. package/lib/components/TableCellActions/TableCellActions.js +5 -7
  154. package/lib/components/TableCellActions/TableCellActions.js.map +1 -1
  155. package/lib/components/TableCellActions/TableCellActions.types.js +1 -2
  156. package/lib/components/TableCellActions/TableCellActions.types.js.map +1 -1
  157. package/lib/components/TableCellActions/index.js +0 -1
  158. package/lib/components/TableCellActions/index.js.map +1 -1
  159. package/lib/components/TableCellActions/renderTableCellActions.js +4 -9
  160. package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -1
  161. package/lib/components/TableCellActions/useTableCellActions.js +12 -14
  162. package/lib/components/TableCellActions/useTableCellActions.js.map +1 -1
  163. package/lib/components/TableCellActions/useTableCellActionsStyles.styles.js.map +1 -1
  164. package/lib/components/TableCellLayout/TableCellLayout.js +5 -7
  165. package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -1
  166. package/lib/components/TableCellLayout/TableCellLayout.types.js +1 -2
  167. package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  168. package/lib/components/TableCellLayout/index.js +0 -1
  169. package/lib/components/TableCellLayout/index.js.map +1 -1
  170. package/lib/components/TableCellLayout/renderTableCellLayout.js +6 -11
  171. package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  172. package/lib/components/TableCellLayout/useTableCellLayout.js +30 -34
  173. package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  174. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js +9 -10
  175. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
  176. package/lib/components/TableCellLayout/useTableCellLayoutStyles.styles.js.map +1 -1
  177. package/lib/components/TableHeader/TableHeader.js +5 -7
  178. package/lib/components/TableHeader/TableHeader.js.map +1 -1
  179. package/lib/components/TableHeader/TableHeader.types.js +1 -2
  180. package/lib/components/TableHeader/TableHeader.types.js.map +1 -1
  181. package/lib/components/TableHeader/index.js +0 -1
  182. package/lib/components/TableHeader/index.js.map +1 -1
  183. package/lib/components/TableHeader/renderTableHeader.js +6 -11
  184. package/lib/components/TableHeader/renderTableHeader.js.map +1 -1
  185. package/lib/components/TableHeader/useTableHeader.js +15 -19
  186. package/lib/components/TableHeader/useTableHeader.js.map +1 -1
  187. package/lib/components/TableHeader/useTableHeaderStyles.styles.js.map +1 -1
  188. package/lib/components/TableHeaderCell/TableHeaderCell.js +5 -7
  189. package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  190. package/lib/components/TableHeaderCell/TableHeaderCell.types.js +1 -2
  191. package/lib/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
  192. package/lib/components/TableHeaderCell/index.js +0 -1
  193. package/lib/components/TableHeaderCell/index.js.map +1 -1
  194. package/lib/components/TableHeaderCell/renderTableHeaderCell.js +4 -9
  195. package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  196. package/lib/components/TableHeaderCell/useTableHeaderCell.js +46 -51
  197. package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  198. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.styles.js +10 -2
  199. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.styles.js.map +1 -1
  200. package/lib/components/TableResizeHandle/TableResizeHandle.js +5 -7
  201. package/lib/components/TableResizeHandle/TableResizeHandle.js.map +1 -1
  202. package/lib/components/TableResizeHandle/TableResizeHandle.types.js +1 -2
  203. package/lib/components/TableResizeHandle/TableResizeHandle.types.js.map +1 -1
  204. package/lib/components/TableResizeHandle/index.js +0 -1
  205. package/lib/components/TableResizeHandle/index.js.map +1 -1
  206. package/lib/components/TableResizeHandle/renderTableResizeHandle.js +4 -9
  207. package/lib/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -1
  208. package/lib/components/TableResizeHandle/useTableResizeHandle.js +16 -18
  209. package/lib/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
  210. package/lib/components/TableResizeHandle/useTableResizeHandleStyles.styles.js.map +1 -1
  211. package/lib/components/TableRow/TableRow.js +5 -7
  212. package/lib/components/TableRow/TableRow.js.map +1 -1
  213. package/lib/components/TableRow/TableRow.types.js +1 -2
  214. package/lib/components/TableRow/TableRow.types.js.map +1 -1
  215. package/lib/components/TableRow/index.js +0 -1
  216. package/lib/components/TableRow/index.js.map +1 -1
  217. package/lib/components/TableRow/renderTableRow.js +4 -9
  218. package/lib/components/TableRow/renderTableRow.js.map +1 -1
  219. package/lib/components/TableRow/useTableRow.js +22 -27
  220. package/lib/components/TableRow/useTableRow.js.map +1 -1
  221. package/lib/components/TableRow/useTableRowStyles.styles.js.map +1 -1
  222. package/lib/components/TableSelectionCell/TableSelectionCell.js +5 -7
  223. package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  224. package/lib/components/TableSelectionCell/TableSelectionCell.types.js +1 -2
  225. package/lib/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
  226. package/lib/components/TableSelectionCell/index.js +0 -1
  227. package/lib/components/TableSelectionCell/index.js.map +1 -1
  228. package/lib/components/TableSelectionCell/renderTableSelectionCell.js +4 -9
  229. package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  230. package/lib/components/TableSelectionCell/useTableSelectionCell.js +32 -41
  231. package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  232. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.styles.js.map +1 -1
  233. package/lib/contexts/columnIdContext.js +2 -3
  234. package/lib/contexts/columnIdContext.js.map +1 -1
  235. package/lib/contexts/dataGridContext.js +7 -8
  236. package/lib/contexts/dataGridContext.js.map +1 -1
  237. package/lib/contexts/rowIdContext.js +2 -3
  238. package/lib/contexts/rowIdContext.js.map +1 -1
  239. package/lib/contexts/tableContext.js +5 -6
  240. package/lib/contexts/tableContext.js.map +1 -1
  241. package/lib/contexts/tableHeaderContext.js +2 -3
  242. package/lib/contexts/tableHeaderContext.js.map +1 -1
  243. package/lib/hooks/createColumn.js +21 -28
  244. package/lib/hooks/createColumn.js.map +1 -1
  245. package/lib/hooks/index.js +0 -1
  246. package/lib/hooks/index.js.map +1 -1
  247. package/lib/hooks/selectionManager.js +71 -68
  248. package/lib/hooks/selectionManager.js.map +1 -1
  249. package/lib/hooks/types.js +0 -1
  250. package/lib/hooks/types.js.map +1 -1
  251. package/lib/hooks/useKeyboardResizing.js +96 -87
  252. package/lib/hooks/useKeyboardResizing.js.map +1 -1
  253. package/lib/hooks/useMeasureElement.js +42 -40
  254. package/lib/hooks/useMeasureElement.js.map +1 -1
  255. package/lib/hooks/useTableColumnResizeMouseHandler.js +64 -61
  256. package/lib/hooks/useTableColumnResizeMouseHandler.js.map +1 -1
  257. package/lib/hooks/useTableColumnResizeState.js +100 -105
  258. package/lib/hooks/useTableColumnResizeState.js.map +1 -1
  259. package/lib/hooks/useTableColumnSizing.js +74 -74
  260. package/lib/hooks/useTableColumnSizing.js.map +1 -1
  261. package/lib/hooks/useTableFeatures.js +30 -35
  262. package/lib/hooks/useTableFeatures.js.map +1 -1
  263. package/lib/hooks/useTableSelection.js +64 -66
  264. package/lib/hooks/useTableSelection.js.map +1 -1
  265. package/lib/hooks/useTableSort.js +68 -76
  266. package/lib/hooks/useTableSort.js.map +1 -1
  267. package/lib/index.js +0 -1
  268. package/lib/index.js.map +1 -1
  269. package/lib/utils/columnResizeUtils.js +104 -108
  270. package/lib/utils/columnResizeUtils.js.map +1 -1
  271. package/lib-commonjs/DataGrid.js +0 -3
  272. package/lib-commonjs/DataGrid.js.map +1 -1
  273. package/lib-commonjs/DataGridBody.js +0 -3
  274. package/lib-commonjs/DataGridBody.js.map +1 -1
  275. package/lib-commonjs/DataGridCell.js +0 -3
  276. package/lib-commonjs/DataGridCell.js.map +1 -1
  277. package/lib-commonjs/DataGridHeader.js +0 -3
  278. package/lib-commonjs/DataGridHeader.js.map +1 -1
  279. package/lib-commonjs/DataGridHeaderCell.js +0 -3
  280. package/lib-commonjs/DataGridHeaderCell.js.map +1 -1
  281. package/lib-commonjs/DataGridRow.js +0 -3
  282. package/lib-commonjs/DataGridRow.js.map +1 -1
  283. package/lib-commonjs/DataGridSelectionCell.js +0 -3
  284. package/lib-commonjs/DataGridSelectionCell.js.map +1 -1
  285. package/lib-commonjs/Table.js +0 -3
  286. package/lib-commonjs/Table.js.map +1 -1
  287. package/lib-commonjs/TableBody.js +0 -3
  288. package/lib-commonjs/TableBody.js.map +1 -1
  289. package/lib-commonjs/TableCell.js +0 -3
  290. package/lib-commonjs/TableCell.js.map +1 -1
  291. package/lib-commonjs/TableCellActions.js +0 -3
  292. package/lib-commonjs/TableCellActions.js.map +1 -1
  293. package/lib-commonjs/TableCellLayout.js +0 -3
  294. package/lib-commonjs/TableCellLayout.js.map +1 -1
  295. package/lib-commonjs/TableCellPrimaryLayout.js +0 -3
  296. package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -1
  297. package/lib-commonjs/TableHeader.js +0 -3
  298. package/lib-commonjs/TableHeader.js.map +1 -1
  299. package/lib-commonjs/TableHeaderCell.js +0 -3
  300. package/lib-commonjs/TableHeaderCell.js.map +1 -1
  301. package/lib-commonjs/TableResizeHandle.js +0 -3
  302. package/lib-commonjs/TableResizeHandle.js.map +1 -1
  303. package/lib-commonjs/TableRow.js +0 -3
  304. package/lib-commonjs/TableRow.js.map +1 -1
  305. package/lib-commonjs/TableSelectionCell.js +0 -3
  306. package/lib-commonjs/TableSelectionCell.js.map +1 -1
  307. package/lib-commonjs/components/DataGrid/DataGrid.js +1 -3
  308. package/lib-commonjs/components/DataGrid/DataGrid.js.map +1 -1
  309. package/lib-commonjs/components/DataGrid/DataGrid.types.js +0 -3
  310. package/lib-commonjs/components/DataGrid/DataGrid.types.js.map +1 -1
  311. package/lib-commonjs/components/DataGrid/index.js +0 -3
  312. package/lib-commonjs/components/DataGrid/index.js.map +1 -1
  313. package/lib-commonjs/components/DataGrid/renderDataGrid.js +1 -3
  314. package/lib-commonjs/components/DataGrid/renderDataGrid.js.map +1 -1
  315. package/lib-commonjs/components/DataGrid/useDataGrid.js +1 -3
  316. package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -1
  317. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js +1 -3
  318. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -1
  319. package/lib-commonjs/components/DataGrid/useDataGridStyles.styles.js +0 -2
  320. package/lib-commonjs/components/DataGrid/useDataGridStyles.styles.js.map +1 -1
  321. package/lib-commonjs/components/DataGridBody/DataGridBody.js +1 -3
  322. package/lib-commonjs/components/DataGridBody/DataGridBody.js.map +1 -1
  323. package/lib-commonjs/components/DataGridBody/DataGridBody.types.js +0 -3
  324. package/lib-commonjs/components/DataGridBody/DataGridBody.types.js.map +1 -1
  325. package/lib-commonjs/components/DataGridBody/index.js +0 -3
  326. package/lib-commonjs/components/DataGridBody/index.js.map +1 -1
  327. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js +1 -3
  328. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js.map +1 -1
  329. package/lib-commonjs/components/DataGridBody/useDataGridBody.js +1 -3
  330. package/lib-commonjs/components/DataGridBody/useDataGridBody.js.map +1 -1
  331. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.styles.js +0 -2
  332. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.styles.js.map +1 -1
  333. package/lib-commonjs/components/DataGridCell/DataGridCell.js +1 -3
  334. package/lib-commonjs/components/DataGridCell/DataGridCell.js.map +1 -1
  335. package/lib-commonjs/components/DataGridCell/DataGridCell.types.js +0 -3
  336. package/lib-commonjs/components/DataGridCell/DataGridCell.types.js.map +1 -1
  337. package/lib-commonjs/components/DataGridCell/index.js +0 -3
  338. package/lib-commonjs/components/DataGridCell/index.js.map +1 -1
  339. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js +1 -3
  340. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js.map +1 -1
  341. package/lib-commonjs/components/DataGridCell/useDataGridCell.js +1 -3
  342. package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -1
  343. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.styles.js +0 -2
  344. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.styles.js.map +1 -1
  345. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js +1 -3
  346. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js.map +1 -1
  347. package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js +0 -3
  348. package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js.map +1 -1
  349. package/lib-commonjs/components/DataGridHeader/index.js +0 -3
  350. package/lib-commonjs/components/DataGridHeader/index.js.map +1 -1
  351. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js +1 -3
  352. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
  353. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js +1 -3
  354. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js.map +1 -1
  355. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.styles.js +0 -2
  356. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.styles.js.map +1 -1
  357. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js +1 -3
  358. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
  359. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js +0 -3
  360. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -1
  361. package/lib-commonjs/components/DataGridHeaderCell/index.js +0 -3
  362. package/lib-commonjs/components/DataGridHeaderCell/index.js.map +1 -1
  363. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js +1 -3
  364. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
  365. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js +2 -3
  366. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  367. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js +0 -2
  368. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js.map +1 -1
  369. package/lib-commonjs/components/DataGridRow/DataGridRow.js +1 -3
  370. package/lib-commonjs/components/DataGridRow/DataGridRow.js.map +1 -1
  371. package/lib-commonjs/components/DataGridRow/DataGridRow.types.js +0 -3
  372. package/lib-commonjs/components/DataGridRow/DataGridRow.types.js.map +1 -1
  373. package/lib-commonjs/components/DataGridRow/index.js +0 -3
  374. package/lib-commonjs/components/DataGridRow/index.js.map +1 -1
  375. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js +1 -3
  376. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js.map +1 -1
  377. package/lib-commonjs/components/DataGridRow/useDataGridRow.js +1 -3
  378. package/lib-commonjs/components/DataGridRow/useDataGridRow.js.map +1 -1
  379. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.styles.js +0 -2
  380. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.styles.js.map +1 -1
  381. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js +1 -3
  382. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
  383. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js +0 -3
  384. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -1
  385. package/lib-commonjs/components/DataGridSelectionCell/index.js +0 -3
  386. package/lib-commonjs/components/DataGridSelectionCell/index.js.map +1 -1
  387. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js +1 -3
  388. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
  389. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js +1 -3
  390. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
  391. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js +0 -2
  392. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js.map +1 -1
  393. package/lib-commonjs/components/Table/Table.js +1 -3
  394. package/lib-commonjs/components/Table/Table.js.map +1 -1
  395. package/lib-commonjs/components/Table/Table.types.js +0 -3
  396. package/lib-commonjs/components/Table/Table.types.js.map +1 -1
  397. package/lib-commonjs/components/Table/index.js +0 -3
  398. package/lib-commonjs/components/Table/index.js.map +1 -1
  399. package/lib-commonjs/components/Table/renderTable.js +1 -3
  400. package/lib-commonjs/components/Table/renderTable.js.map +1 -1
  401. package/lib-commonjs/components/Table/useTable.js +1 -3
  402. package/lib-commonjs/components/Table/useTable.js.map +1 -1
  403. package/lib-commonjs/components/Table/useTableContextValues.js +1 -3
  404. package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
  405. package/lib-commonjs/components/Table/useTableStyles.styles.js +0 -2
  406. package/lib-commonjs/components/Table/useTableStyles.styles.js.map +1 -1
  407. package/lib-commonjs/components/TableBody/TableBody.js +1 -3
  408. package/lib-commonjs/components/TableBody/TableBody.js.map +1 -1
  409. package/lib-commonjs/components/TableBody/TableBody.types.js +0 -3
  410. package/lib-commonjs/components/TableBody/TableBody.types.js.map +1 -1
  411. package/lib-commonjs/components/TableBody/index.js +0 -3
  412. package/lib-commonjs/components/TableBody/index.js.map +1 -1
  413. package/lib-commonjs/components/TableBody/renderTableBody.js +1 -3
  414. package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -1
  415. package/lib-commonjs/components/TableBody/useTableBody.js +1 -3
  416. package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
  417. package/lib-commonjs/components/TableBody/useTableBodyStyles.styles.js +0 -2
  418. package/lib-commonjs/components/TableBody/useTableBodyStyles.styles.js.map +1 -1
  419. package/lib-commonjs/components/TableCell/TableCell.js +1 -3
  420. package/lib-commonjs/components/TableCell/TableCell.js.map +1 -1
  421. package/lib-commonjs/components/TableCell/TableCell.types.js +0 -3
  422. package/lib-commonjs/components/TableCell/TableCell.types.js.map +1 -1
  423. package/lib-commonjs/components/TableCell/index.js +0 -3
  424. package/lib-commonjs/components/TableCell/index.js.map +1 -1
  425. package/lib-commonjs/components/TableCell/renderTableCell.js +1 -3
  426. package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
  427. package/lib-commonjs/components/TableCell/useTableCell.js +1 -3
  428. package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
  429. package/lib-commonjs/components/TableCell/useTableCellStyles.styles.js +0 -2
  430. package/lib-commonjs/components/TableCell/useTableCellStyles.styles.js.map +1 -1
  431. package/lib-commonjs/components/TableCellActions/TableCellActions.js +1 -3
  432. package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -1
  433. package/lib-commonjs/components/TableCellActions/TableCellActions.types.js +0 -3
  434. package/lib-commonjs/components/TableCellActions/TableCellActions.types.js.map +1 -1
  435. package/lib-commonjs/components/TableCellActions/index.js +0 -3
  436. package/lib-commonjs/components/TableCellActions/index.js.map +1 -1
  437. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js +1 -3
  438. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -1
  439. package/lib-commonjs/components/TableCellActions/useTableCellActions.js +1 -3
  440. package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -1
  441. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.styles.js +0 -2
  442. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.styles.js.map +1 -1
  443. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +1 -3
  444. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -1
  445. package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js +0 -3
  446. package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  447. package/lib-commonjs/components/TableCellLayout/index.js +0 -3
  448. package/lib-commonjs/components/TableCellLayout/index.js.map +1 -1
  449. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js +1 -3
  450. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  451. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +1 -3
  452. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  453. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js +1 -3
  454. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
  455. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.styles.js +0 -2
  456. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.styles.js.map +1 -1
  457. package/lib-commonjs/components/TableHeader/TableHeader.js +1 -3
  458. package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -1
  459. package/lib-commonjs/components/TableHeader/TableHeader.types.js +0 -3
  460. package/lib-commonjs/components/TableHeader/TableHeader.types.js.map +1 -1
  461. package/lib-commonjs/components/TableHeader/index.js +0 -3
  462. package/lib-commonjs/components/TableHeader/index.js.map +1 -1
  463. package/lib-commonjs/components/TableHeader/renderTableHeader.js +1 -3
  464. package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -1
  465. package/lib-commonjs/components/TableHeader/useTableHeader.js +1 -3
  466. package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
  467. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.styles.js +0 -2
  468. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.styles.js.map +1 -1
  469. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js +1 -3
  470. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  471. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js +0 -3
  472. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
  473. package/lib-commonjs/components/TableHeaderCell/index.js +0 -3
  474. package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -1
  475. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js +1 -3
  476. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  477. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +1 -3
  478. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  479. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.styles.js +27 -3
  480. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.styles.js.map +1 -1
  481. package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.js +1 -3
  482. package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.js.map +1 -1
  483. package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.types.js +0 -3
  484. package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.types.js.map +1 -1
  485. package/lib-commonjs/components/TableResizeHandle/index.js +0 -3
  486. package/lib-commonjs/components/TableResizeHandle/index.js.map +1 -1
  487. package/lib-commonjs/components/TableResizeHandle/renderTableResizeHandle.js +1 -3
  488. package/lib-commonjs/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -1
  489. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js +1 -3
  490. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
  491. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.styles.js +0 -2
  492. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.styles.js.map +1 -1
  493. package/lib-commonjs/components/TableRow/TableRow.js +1 -3
  494. package/lib-commonjs/components/TableRow/TableRow.js.map +1 -1
  495. package/lib-commonjs/components/TableRow/TableRow.types.js +0 -3
  496. package/lib-commonjs/components/TableRow/TableRow.types.js.map +1 -1
  497. package/lib-commonjs/components/TableRow/index.js +0 -3
  498. package/lib-commonjs/components/TableRow/index.js.map +1 -1
  499. package/lib-commonjs/components/TableRow/renderTableRow.js +1 -3
  500. package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -1
  501. package/lib-commonjs/components/TableRow/useTableRow.js +1 -3
  502. package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
  503. package/lib-commonjs/components/TableRow/useTableRowStyles.styles.js +0 -2
  504. package/lib-commonjs/components/TableRow/useTableRowStyles.styles.js.map +1 -1
  505. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js +1 -3
  506. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  507. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js +0 -3
  508. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
  509. package/lib-commonjs/components/TableSelectionCell/index.js +0 -3
  510. package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -1
  511. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js +1 -3
  512. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  513. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +1 -3
  514. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  515. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.styles.js +0 -2
  516. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.styles.js.map +1 -1
  517. package/lib-commonjs/contexts/columnIdContext.js +1 -3
  518. package/lib-commonjs/contexts/columnIdContext.js.map +1 -1
  519. package/lib-commonjs/contexts/dataGridContext.js +2 -4
  520. package/lib-commonjs/contexts/dataGridContext.js.map +1 -1
  521. package/lib-commonjs/contexts/rowIdContext.js +1 -3
  522. package/lib-commonjs/contexts/rowIdContext.js.map +1 -1
  523. package/lib-commonjs/contexts/tableContext.js +1 -3
  524. package/lib-commonjs/contexts/tableContext.js.map +1 -1
  525. package/lib-commonjs/contexts/tableHeaderContext.js +1 -3
  526. package/lib-commonjs/contexts/tableHeaderContext.js.map +1 -1
  527. package/lib-commonjs/hooks/createColumn.js +1 -3
  528. package/lib-commonjs/hooks/createColumn.js.map +1 -1
  529. package/lib-commonjs/hooks/index.js +0 -3
  530. package/lib-commonjs/hooks/index.js.map +1 -1
  531. package/lib-commonjs/hooks/selectionManager.js +1 -3
  532. package/lib-commonjs/hooks/selectionManager.js.map +1 -1
  533. package/lib-commonjs/hooks/types.js +0 -3
  534. package/lib-commonjs/hooks/types.js.map +1 -1
  535. package/lib-commonjs/hooks/useKeyboardResizing.js +17 -18
  536. package/lib-commonjs/hooks/useKeyboardResizing.js.map +1 -1
  537. package/lib-commonjs/hooks/useMeasureElement.js +1 -3
  538. package/lib-commonjs/hooks/useMeasureElement.js.map +1 -1
  539. package/lib-commonjs/hooks/useTableColumnResizeMouseHandler.js +1 -3
  540. package/lib-commonjs/hooks/useTableColumnResizeMouseHandler.js.map +1 -1
  541. package/lib-commonjs/hooks/useTableColumnResizeState.js +1 -3
  542. package/lib-commonjs/hooks/useTableColumnResizeState.js.map +1 -1
  543. package/lib-commonjs/hooks/useTableColumnSizing.js +10 -7
  544. package/lib-commonjs/hooks/useTableColumnSizing.js.map +1 -1
  545. package/lib-commonjs/hooks/useTableFeatures.js +1 -3
  546. package/lib-commonjs/hooks/useTableFeatures.js.map +1 -1
  547. package/lib-commonjs/hooks/useTableSelection.js +2 -4
  548. package/lib-commonjs/hooks/useTableSelection.js.map +1 -1
  549. package/lib-commonjs/hooks/useTableSort.js +1 -3
  550. package/lib-commonjs/hooks/useTableSort.js.map +1 -1
  551. package/lib-commonjs/index.js +0 -3
  552. package/lib-commonjs/index.js.map +1 -1
  553. package/lib-commonjs/utils/columnResizeUtils.js +1 -3
  554. package/lib-commonjs/utils/columnResizeUtils.js.map +1 -1
  555. package/package.json +11 -11
@@ -1 +1 @@
1
- {"version":3,"names":["React","useDataGridHeader_unstable","renderDataGridHeader_unstable","useDataGridHeaderStyles_unstable","useCustomStyleHook_unstable","DataGridHeader","forwardRef","props","ref","state","displayName"],"sources":["../../../src/components/DataGridHeader/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"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,0BAA0B,QAAQ;AAC3C,SAASC,6BAA6B,QAAQ;AAC9C,SAASC,gCAAgC,QAAQ;AAGjD,SAASC,2BAA2B,QAAQ;AAE5C;;;AAGA,OAAO,MAAMC,cAAA,gBAA2DL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACvG,MAAMC,KAAA,GAAQR,0BAAA,CAA2BM,KAAA,EAAOC,GAAA;EAEhDL,gCAAA,CAAiCM,KAAA;EAEjCL,2BAAA,CAA4B,oCAAoCK,KAAA;EAEhE,OAAOP,6BAAA,CAA8BO,KAAA;AACvC;AAEAJ,cAAA,CAAeK,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,MAAQ;IACvG,MAAMC,QAAQR,2BAA2BM,OAAOC;IAEhDL,iCAAiCM;IAEjCL,4BAA4B,oCAAoCK;IAEhE,OAAOP,8BAA8BO;AACvC,GAAG;AAEHJ,eAAeK,WAAW,GAAG"}
@@ -1,2 +1 @@
1
- export {};
2
- //# sourceMappingURL=DataGridHeader.types.js.map
1
+ export { };
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/DataGridHeader/DataGridHeader.types.ts"],"sourcesContent":["import { TableHeaderProps, TableHeaderSlots, TableHeaderState } from '../TableHeader/TableHeader.types';\n\nexport type DataGridHeaderSlots = TableHeaderSlots;\n\n/**\n * DataGridHeader Props\n */\nexport type DataGridHeaderProps = TableHeaderProps;\n\n/**\n * State used in rendering DataGridHeader\n */\nexport type DataGridHeaderState = TableHeaderState;\n"],"mappings":"AAAA"}
1
+ {"version":3,"sources":["DataGridHeader.types.ts"],"sourcesContent":["import { TableHeaderProps, TableHeaderSlots, TableHeaderState } from '../TableHeader/TableHeader.types';\n\nexport type DataGridHeaderSlots = TableHeaderSlots;\n\n/**\n * DataGridHeader Props\n */\nexport type DataGridHeaderProps = TableHeaderProps;\n\n/**\n * State used in rendering DataGridHeader\n */\nexport type DataGridHeaderState = TableHeaderState;\n"],"names":[],"mappings":"AAAA,WAYmD"}
@@ -3,4 +3,3 @@ export * from './DataGridHeader.types';
3
3
  export * from './renderDataGridHeader';
4
4
  export * from './useDataGridHeader';
5
5
  export * from './useDataGridHeaderStyles.styles';
6
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/DataGridHeader/index.ts"],"sourcesContent":["export * from './DataGridHeader';\nexport * from './DataGridHeader.types';\nexport * from './renderDataGridHeader';\nexport * from './useDataGridHeader';\nexport * from './useDataGridHeaderStyles.styles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './DataGridHeader';\nexport * from './DataGridHeader.types';\nexport * from './renderDataGridHeader';\nexport * from './useDataGridHeader';\nexport * from './useDataGridHeaderStyles.styles';\n"],"names":[],"mappings":"AAAA,cAAc,mBAAmB;AACjC,cAAc,yBAAyB;AACvC,cAAc,yBAAyB;AACvC,cAAc,sBAAsB;AACpC,cAAc,mCAAmC"}
@@ -1,8 +1,6 @@
1
1
  import { renderTableHeader_unstable } from '../TableHeader/renderTableHeader';
2
2
  /**
3
3
  * Render the final JSX of DataGridHeader
4
- */
5
- export const renderDataGridHeader_unstable = state => {
6
- return renderTableHeader_unstable(state);
4
+ */ export const renderDataGridHeader_unstable = (state)=>{
5
+ return renderTableHeader_unstable(state);
7
6
  };
8
- //# sourceMappingURL=renderDataGridHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["renderTableHeader_unstable","renderDataGridHeader_unstable","state"],"sources":["../../../src/components/DataGridHeader/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"],"mappings":"AAAA,SAASA,0BAA0B,QAAQ;AAG3C;;;AAGA,OAAO,MAAMC,6BAAA,GAAiCC,KAAA,IAA+B;EAC3E,OAAOF,0BAAA,CAA2BE,KAAA;AACpC"}
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"}
@@ -8,11 +8,9 @@ import { useTableHeader_unstable } from '../TableHeader/useTableHeader';
8
8
  *
9
9
  * @param props - props from this instance of DataGridHeader
10
10
  * @param ref - reference to root HTMLElement of DataGridHeader
11
- */
12
- export const useDataGridHeader_unstable = (props, ref) => {
13
- return useTableHeader_unstable({
14
- ...props,
15
- as: 'div'
16
- }, ref);
11
+ */ export const useDataGridHeader_unstable = (props, ref)=>{
12
+ return useTableHeader_unstable({
13
+ ...props,
14
+ as: 'div'
15
+ }, ref);
17
16
  };
18
- //# sourceMappingURL=useDataGridHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useTableHeader_unstable","useDataGridHeader_unstable","props","ref","as"],"sources":["../../../src/components/DataGridHeader/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"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AAEvB,SAASC,uBAAuB,QAAQ;AAExC;;;;;;;;;AASA,OAAO,MAAMC,0BAAA,GAA6BA,CACxCC,KAAA,EACAC,GAAA,KACwB;EACxB,OAAOH,uBAAA,CAAwB;IAAE,GAAGE,KAAK;IAAEE,EAAA,EAAI;EAAM,GAAGD,GAAA;AAC1D"}
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 +1 @@
1
- {"version":3,"names":["mergeClasses","useTableHeaderStyles_unstable","dataGridHeaderClassNames","root","useDataGridHeaderStyles_unstable","state","className"],"sources":["../../../src/components/DataGridHeader/useDataGridHeaderStyles.styles.ts"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport type { DataGridHeaderSlots, DataGridHeaderState } from './DataGridHeader.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useTableHeaderStyles_unstable } from '../TableHeader/useTableHeaderStyles.styles';\n\nexport const dataGridHeaderClassNames: SlotClassNames<DataGridHeaderSlots> = {\n root: 'fui-DataGridHeader',\n};\n\n/**\n * Apply styling to the DataGridHeader slots based on the state\n */\nexport const useDataGridHeaderStyles_unstable = (state: DataGridHeaderState): DataGridHeaderState => {\n useTableHeaderStyles_unstable(state);\n state.root.className = mergeClasses(dataGridHeaderClassNames.root, state.root.className);\n\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ;AAG7B,SAASC,6BAA6B,QAAQ;AAE9C,OAAO,MAAMC,wBAAA,GAAgE;EAC3EC,IAAA,EAAM;AACR;AAEA;;;AAGA,OAAO,MAAMC,gCAAA,GAAoCC,KAAA,IAAoD;EACnGJ,6BAAA,CAA8BI,KAAA;EAC9BA,KAAA,CAAMF,IAAI,CAACG,SAAS,GAAGN,YAAA,CAAaE,wBAAA,CAAyBC,IAAI,EAAEE,KAAA,CAAMF,IAAI,CAACG,SAAS;EAEvF,OAAOD,KAAA;AACT"}
1
+ {"version":3,"names":["mergeClasses","useTableHeaderStyles_unstable","dataGridHeaderClassNames","root","useDataGridHeaderStyles_unstable","state","className"],"sources":["useDataGridHeaderStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useTableHeaderStyles_unstable } from '../TableHeader/useTableHeaderStyles.styles';\nexport const dataGridHeaderClassNames = {\n root: 'fui-DataGridHeader'\n};\n/**\n * Apply styling to the DataGridHeader slots based on the state\n */ export const useDataGridHeaderStyles_unstable = (state)=>{\n useTableHeaderStyles_unstable(state);\n state.root.className = mergeClasses(dataGridHeaderClassNames.root, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,6BAA6B,QAAQ,4CAA4C;AAC1F,OAAO,MAAMC,wBAAwB,GAAG;EACpCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,OAAO,MAAMC,gCAAgC,GAAIC,KAAK,IAAG;EACzDJ,6BAA6B,CAACI,KAAK,CAAC;EACpCA,KAAK,CAACF,IAAI,CAACG,SAAS,GAAGN,YAAY,CAACE,wBAAwB,CAACC,IAAI,EAAEE,KAAK,CAACF,IAAI,CAACG,SAAS,CAAC;EACxF,OAAOD,KAAK;AAChB,CAAC"}
@@ -5,12 +5,10 @@ import { useDataGridHeaderCellStyles_unstable } from './useDataGridHeaderCellSty
5
5
  import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
6
6
  /**
7
7
  * DataGridHeaderCell component
8
- */
9
- export const DataGridHeaderCell = /*#__PURE__*/React.forwardRef((props, ref) => {
10
- const state = useDataGridHeaderCell_unstable(props, ref);
11
- useDataGridHeaderCellStyles_unstable(state);
12
- useCustomStyleHook_unstable('useDataGridHeaderCellStyles_unstable')(state);
13
- return renderDataGridHeaderCell_unstable(state);
8
+ */ export const DataGridHeaderCell = /*#__PURE__*/ React.forwardRef((props, ref)=>{
9
+ const state = useDataGridHeaderCell_unstable(props, ref);
10
+ useDataGridHeaderCellStyles_unstable(state);
11
+ useCustomStyleHook_unstable('useDataGridHeaderCellStyles_unstable')(state);
12
+ return renderDataGridHeaderCell_unstable(state);
14
13
  });
15
14
  DataGridHeaderCell.displayName = 'DataGridHeaderCell';
16
- //# sourceMappingURL=DataGridHeaderCell.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useDataGridHeaderCell_unstable","renderDataGridHeaderCell_unstable","useDataGridHeaderCellStyles_unstable","useCustomStyleHook_unstable","DataGridHeaderCell","forwardRef","props","ref","state","displayName"],"sources":["../../../src/components/DataGridHeaderCell/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"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,8BAA8B,QAAQ;AAC/C,SAASC,iCAAiC,QAAQ;AAClD,SAASC,oCAAoC,QAAQ;AAGrD,SAASC,2BAA2B,QAAQ;AAE5C;;;AAGA,OAAO,MAAMC,kBAAA,gBAAmEL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EAC/G,MAAMC,KAAA,GAAQR,8BAAA,CAA+BM,KAAA,EAAOC,GAAA;EAEpDL,oCAAA,CAAqCM,KAAA;EAErCL,2BAAA,CAA4B,wCAAwCK,KAAA;EAEpE,OAAOP,iCAAA,CAAkCO,KAAA;AAC3C;AAEAJ,kBAAA,CAAmBK,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,MAAQ;IAC/G,MAAMC,QAAQR,+BAA+BM,OAAOC;IAEpDL,qCAAqCM;IAErCL,4BAA4B,wCAAwCK;IAEpE,OAAOP,kCAAkCO;AAC3C,GAAG;AAEHJ,mBAAmBK,WAAW,GAAG"}
@@ -1,2 +1 @@
1
- export {};
2
- //# sourceMappingURL=DataGridHeaderCell.types.js.map
1
+ export { };
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/DataGridHeaderCell/DataGridHeaderCell.types.ts"],"sourcesContent":["import {\n TableHeaderCellProps,\n TableHeaderCellSlots,\n TableHeaderCellState,\n} from '../TableHeaderCell/TableHeaderCell.types';\n\nexport type DataGridHeaderCellSlots = TableHeaderCellSlots;\n\n/**\n * DataGridHeaderCell Props\n */\nexport type DataGridHeaderCellProps = TableHeaderCellProps;\n\n/**\n * State used in rendering DataGridHeaderCell\n */\nexport type DataGridHeaderCellState = TableHeaderCellState;\n"],"mappings":"AAAA"}
1
+ {"version":3,"sources":["DataGridHeaderCell.types.ts"],"sourcesContent":["import {\n TableHeaderCellProps,\n TableHeaderCellSlots,\n TableHeaderCellState,\n} from '../TableHeaderCell/TableHeaderCell.types';\n\nexport type DataGridHeaderCellSlots = TableHeaderCellSlots;\n\n/**\n * DataGridHeaderCell Props\n */\nexport type DataGridHeaderCellProps = TableHeaderCellProps;\n\n/**\n * State used in rendering DataGridHeaderCell\n */\nexport type DataGridHeaderCellState = TableHeaderCellState;\n"],"names":[],"mappings":"AAAA,WAgB2D"}
@@ -3,4 +3,3 @@ export * from './DataGridHeaderCell.types';
3
3
  export * from './renderDataGridHeaderCell';
4
4
  export * from './useDataGridHeaderCell';
5
5
  export * from './useDataGridHeaderCellStyles.styles';
6
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/DataGridHeaderCell/index.ts"],"sourcesContent":["export * from './DataGridHeaderCell';\nexport * from './DataGridHeaderCell.types';\nexport * from './renderDataGridHeaderCell';\nexport * from './useDataGridHeaderCell';\nexport * from './useDataGridHeaderCellStyles.styles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './DataGridHeaderCell';\nexport * from './DataGridHeaderCell.types';\nexport * from './renderDataGridHeaderCell';\nexport * from './useDataGridHeaderCell';\nexport * from './useDataGridHeaderCellStyles.styles';\n"],"names":[],"mappings":"AAAA,cAAc,uBAAuB;AACrC,cAAc,6BAA6B;AAC3C,cAAc,6BAA6B;AAC3C,cAAc,0BAA0B;AACxC,cAAc,uCAAuC"}
@@ -1,8 +1,6 @@
1
1
  import { renderTableHeaderCell_unstable } from '../TableHeaderCell/renderTableHeaderCell';
2
2
  /**
3
3
  * Render the final JSX of DataGridHeaderCell
4
- */
5
- export const renderDataGridHeaderCell_unstable = state => {
6
- return renderTableHeaderCell_unstable(state);
4
+ */ export const renderDataGridHeaderCell_unstable = (state)=>{
5
+ return renderTableHeaderCell_unstable(state);
7
6
  };
8
- //# sourceMappingURL=renderDataGridHeaderCell.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["renderTableHeaderCell_unstable","renderDataGridHeaderCell_unstable","state"],"sources":["../../../src/components/DataGridHeaderCell/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"],"mappings":"AACA,SAASA,8BAA8B,QAAQ;AAE/C;;;AAGA,OAAO,MAAMC,iCAAA,GAAqCC,KAAA,IAAmC;EACnF,OAAOF,8BAAA,CAA+BE,KAAA;AACxC"}
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"}
@@ -12,30 +12,27 @@ import { useTableContext } from '../../contexts/tableContext';
12
12
  *
13
13
  * @param props - props from this instance of DataGridHeaderCell
14
14
  * @param ref - reference to root HTMLElement of DataGridHeaderCell
15
- */
16
- export const useDataGridHeaderCell_unstable = (props, ref) => {
17
- const columnId = useColumnIdContext();
18
- const {
19
- sortable
20
- } = useTableContext();
21
- const toggleColumnSort = useDataGridContext_unstable(ctx => ctx.sort.toggleColumnSort);
22
- const sortDirection = useDataGridContext_unstable(ctx => sortable ? ctx.sort.getSortDirection(columnId) : undefined);
23
- const resizableColumns = useDataGridContext_unstable(ctx => ctx.resizableColumns);
24
- const columnSizing = useDataGridContext_unstable(ctx => ctx.columnSizing_unstable);
25
- const onClick = useEventCallback(e => {
26
- var _props_onClick;
27
- if (sortable) {
28
- toggleColumnSort(e, columnId);
29
- }
30
- (_props_onClick = props.onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(props, e);
31
- });
32
- return useTableHeaderCell_unstable({
33
- sortDirection,
34
- as: 'div',
35
- tabIndex: sortable ? undefined : 0,
36
- ...(resizableColumns ? columnSizing.getTableHeaderCellProps(columnId) : {}),
37
- ...props,
38
- onClick
39
- }, ref);
15
+ */ export const useDataGridHeaderCell_unstable = (props, ref)=>{
16
+ const columnId = useColumnIdContext();
17
+ const { sortable } = useTableContext();
18
+ const toggleColumnSort = useDataGridContext_unstable((ctx)=>ctx.sort.toggleColumnSort);
19
+ const sortDirection = useDataGridContext_unstable((ctx)=>sortable ? ctx.sort.getSortDirection(columnId) : undefined);
20
+ const resizableColumns = useDataGridContext_unstable((ctx)=>ctx.resizableColumns);
21
+ const columnSizing = useDataGridContext_unstable((ctx)=>ctx.columnSizing_unstable);
22
+ // eslint-disable-next-line deprecation/deprecation -- prefer HTMLTableCellElement
23
+ const onClick = useEventCallback((e)=>{
24
+ var _props_onClick;
25
+ if (sortable) {
26
+ toggleColumnSort(e, columnId);
27
+ }
28
+ (_props_onClick = props.onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(props, e);
29
+ });
30
+ return useTableHeaderCell_unstable({
31
+ sortDirection,
32
+ as: 'div',
33
+ tabIndex: sortable ? undefined : 0,
34
+ ...resizableColumns ? columnSizing.getTableHeaderCellProps(columnId) : {},
35
+ ...props,
36
+ onClick
37
+ }, ref);
40
38
  };
41
- //# sourceMappingURL=useDataGridHeaderCell.js.map
@@ -1 +1 @@
1
- {"version":3,"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","_props_onClick","call","as","tabIndex","getTableHeaderCellProps"],"sources":["../../../src/components/DataGridHeaderCell/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 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"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,gBAAgB,QAAQ;AAEjC,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,kBAAkB,QAAQ;AACnC,SAASC,eAAe,QAAQ;AAEhC;;;;;;;;;AASA,OAAO,MAAMC,8BAAA,GAAiCA,CAC5CC,KAAA,EACAC,GAAA,KAC4B;EAC5B,MAAMC,QAAA,GAAWL,kBAAA;EACjB,MAAM;IAAEM;EAAQ,CAAE,GAAGL,eAAA;EACrB,MAAMM,gBAAA,GAAmBR,2BAAA,CAA4BS,GAAA,IAAOA,GAAA,CAAIC,IAAI,CAACF,gBAAgB;EACrF,MAAMG,aAAA,GAAgBX,2BAAA,CAA4BS,GAAA,IAChDF,QAAA,GAAWE,GAAA,CAAIC,IAAI,CAACE,gBAAgB,CAACN,QAAA,IAAYO,SAAS;EAG5D,MAAMC,gBAAA,GAAmBd,2BAAA,CAA4BS,GAAA,IAAOA,GAAA,CAAIK,gBAAgB;EAChF,MAAMC,YAAA,GAAef,2BAAA,CAA4BS,GAAA,IAAOA,GAAA,CAAIO,qBAAqB;EAEjF,MAAMC,OAAA,GAAUnB,gBAAA,CAAkBoB,CAAA,IAAoD;QAIpFC,cAAA;IAHA,IAAIZ,QAAA,EAAU;MACZC,gBAAA,CAAiBU,CAAA,EAAGZ,QAAA;IACtB;IACA,CAAAa,cAAA,GAAAf,KAAA,CAAMa,OAAO,cAAbE,cAAA,uBAAAA,cAAA,CAAAC,IAAA,CAAAhB,KAAA,EAAgBc,CAAA;EAClB;EAEA,OAAOnB,2BAAA,CACL;IACEY,aAAA;IACAU,EAAA,EAAI;IACJC,QAAA,EAAUf,QAAA,GAAWM,SAAA,GAAY,CAAC;IAClC,IAAIC,gBAAA,GAAmBC,YAAA,CAAaQ,uBAAuB,CAACjB,QAAA,IAAY,CAAC,CAAC;IAC1E,GAAGF,KAAK;IACRa;EACF,GACAZ,GAAA;AAEJ"}
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 +1 @@
1
- {"version":3,"names":["mergeClasses","useTableHeaderCellStyles_unstable","dataGridHeaderCellClassNames","root","button","sortIcon","aside","useDataGridHeaderCellStyles_unstable","state","className"],"sources":["../../../src/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.ts"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport type { DataGridHeaderCellSlots, DataGridHeaderCellState } from './DataGridHeaderCell.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useTableHeaderCellStyles_unstable } from '../TableHeaderCell/useTableHeaderCellStyles.styles';\n\nexport const dataGridHeaderCellClassNames: SlotClassNames<DataGridHeaderCellSlots> = {\n root: 'fui-DataGridHeaderCell',\n button: 'fui-DataGridHeaderCell__button',\n sortIcon: 'fui-DataGridHeaderCell__sortIcon',\n aside: 'fui-DataGridHeaderCell__aside',\n};\n\n/**\n * Apply styling to the DataGridHeaderCell slots based on the state\n */\nexport const useDataGridHeaderCellStyles_unstable = (state: DataGridHeaderCellState): DataGridHeaderCellState => {\n useTableHeaderCellStyles_unstable(state);\n state.root.className = mergeClasses(dataGridHeaderCellClassNames.root, state.root.className);\n\n if (state.button) {\n state.button.className = mergeClasses(dataGridHeaderCellClassNames.button, state.button.className);\n }\n\n if (state.sortIcon) {\n state.sortIcon.className = mergeClasses(dataGridHeaderCellClassNames.sortIcon, state.sortIcon.className);\n }\n\n if (state.aside) {\n state.aside.className = mergeClasses(dataGridHeaderCellClassNames.aside, state.aside.className);\n }\n\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ;AAG7B,SAASC,iCAAiC,QAAQ;AAElD,OAAO,MAAMC,4BAAA,GAAwE;EACnFC,IAAA,EAAM;EACNC,MAAA,EAAQ;EACRC,QAAA,EAAU;EACVC,KAAA,EAAO;AACT;AAEA;;;AAGA,OAAO,MAAMC,oCAAA,GAAwCC,KAAA,IAA4D;EAC/GP,iCAAA,CAAkCO,KAAA;EAClCA,KAAA,CAAML,IAAI,CAACM,SAAS,GAAGT,YAAA,CAAaE,4BAAA,CAA6BC,IAAI,EAAEK,KAAA,CAAML,IAAI,CAACM,SAAS;EAE3F,IAAID,KAAA,CAAMJ,MAAM,EAAE;IAChBI,KAAA,CAAMJ,MAAM,CAACK,SAAS,GAAGT,YAAA,CAAaE,4BAAA,CAA6BE,MAAM,EAAEI,KAAA,CAAMJ,MAAM,CAACK,SAAS;EACnG;EAEA,IAAID,KAAA,CAAMH,QAAQ,EAAE;IAClBG,KAAA,CAAMH,QAAQ,CAACI,SAAS,GAAGT,YAAA,CAAaE,4BAAA,CAA6BG,QAAQ,EAAEG,KAAA,CAAMH,QAAQ,CAACI,SAAS;EACzG;EAEA,IAAID,KAAA,CAAMF,KAAK,EAAE;IACfE,KAAA,CAAMF,KAAK,CAACG,SAAS,GAAGT,YAAA,CAAaE,4BAAA,CAA6BI,KAAK,EAAEE,KAAA,CAAMF,KAAK,CAACG,SAAS;EAChG;EAEA,OAAOD,KAAA;AACT"}
1
+ {"version":3,"names":["mergeClasses","useTableHeaderCellStyles_unstable","dataGridHeaderCellClassNames","root","button","sortIcon","aside","useDataGridHeaderCellStyles_unstable","state","className"],"sources":["useDataGridHeaderCellStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useTableHeaderCellStyles_unstable } from '../TableHeaderCell/useTableHeaderCellStyles.styles';\nexport const dataGridHeaderCellClassNames = {\n root: 'fui-DataGridHeaderCell',\n button: 'fui-DataGridHeaderCell__button',\n sortIcon: 'fui-DataGridHeaderCell__sortIcon',\n aside: 'fui-DataGridHeaderCell__aside'\n};\n/**\n * Apply styling to the DataGridHeaderCell slots based on the state\n */ export const useDataGridHeaderCellStyles_unstable = (state)=>{\n useTableHeaderCellStyles_unstable(state);\n state.root.className = mergeClasses(dataGridHeaderCellClassNames.root, state.root.className);\n if (state.button) {\n state.button.className = mergeClasses(dataGridHeaderCellClassNames.button, state.button.className);\n }\n if (state.sortIcon) {\n state.sortIcon.className = mergeClasses(dataGridHeaderCellClassNames.sortIcon, state.sortIcon.className);\n }\n if (state.aside) {\n state.aside.className = mergeClasses(dataGridHeaderCellClassNames.aside, state.aside.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,iCAAiC,QAAQ,oDAAoD;AACtG,OAAO,MAAMC,4BAA4B,GAAG;EACxCC,IAAI,EAAE,wBAAwB;EAC9BC,MAAM,EAAE,gCAAgC;EACxCC,QAAQ,EAAE,kCAAkC;EAC5CC,KAAK,EAAE;AACX,CAAC;AACD;AACA;AACA;AAAI,OAAO,MAAMC,oCAAoC,GAAIC,KAAK,IAAG;EAC7DP,iCAAiC,CAACO,KAAK,CAAC;EACxCA,KAAK,CAACL,IAAI,CAACM,SAAS,GAAGT,YAAY,CAACE,4BAA4B,CAACC,IAAI,EAAEK,KAAK,CAACL,IAAI,CAACM,SAAS,CAAC;EAC5F,IAAID,KAAK,CAACJ,MAAM,EAAE;IACdI,KAAK,CAACJ,MAAM,CAACK,SAAS,GAAGT,YAAY,CAACE,4BAA4B,CAACE,MAAM,EAAEI,KAAK,CAACJ,MAAM,CAACK,SAAS,CAAC;EACtG;EACA,IAAID,KAAK,CAACH,QAAQ,EAAE;IAChBG,KAAK,CAACH,QAAQ,CAACI,SAAS,GAAGT,YAAY,CAACE,4BAA4B,CAACG,QAAQ,EAAEG,KAAK,CAACH,QAAQ,CAACI,SAAS,CAAC;EAC5G;EACA,IAAID,KAAK,CAACF,KAAK,EAAE;IACbE,KAAK,CAACF,KAAK,CAACG,SAAS,GAAGT,YAAY,CAACE,4BAA4B,CAACI,KAAK,EAAEE,KAAK,CAACF,KAAK,CAACG,SAAS,CAAC;EACnG;EACA,OAAOD,KAAK;AAChB,CAAC"}
@@ -5,12 +5,10 @@ import { useDataGridRowStyles_unstable } from './useDataGridRowStyles.styles';
5
5
  import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
6
6
  /**
7
7
  * DataGridRow component
8
- */
9
- export const DataGridRow = /*#__PURE__*/React.forwardRef((props, ref) => {
10
- const state = useDataGridRow_unstable(props, ref);
11
- useDataGridRowStyles_unstable(state);
12
- useCustomStyleHook_unstable('useDataGridRowStyles_unstable')(state);
13
- return renderDataGridRow_unstable(state);
8
+ */ export const DataGridRow = /*#__PURE__*/ React.forwardRef((props, ref)=>{
9
+ const state = useDataGridRow_unstable(props, ref);
10
+ useDataGridRowStyles_unstable(state);
11
+ useCustomStyleHook_unstable('useDataGridRowStyles_unstable')(state);
12
+ return renderDataGridRow_unstable(state);
14
13
  });
15
14
  DataGridRow.displayName = 'DataGridRow';
16
- //# sourceMappingURL=DataGridRow.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useDataGridRow_unstable","renderDataGridRow_unstable","useDataGridRowStyles_unstable","useCustomStyleHook_unstable","DataGridRow","forwardRef","props","ref","state","displayName"],"sources":["../../../src/components/DataGridRow/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"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,uBAAuB,QAAQ;AACxC,SAASC,0BAA0B,QAAQ;AAC3C,SAASC,6BAA6B,QAAQ;AAG9C,SAASC,2BAA2B,QAAQ;AAE5C;;;AAGA,OAAO,MAAMC,WAAA,gBACgDL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EAC5F,MAAMC,KAAA,GAAQR,uBAAA,CAAwBM,KAAA,EAAOC,GAAA;EAE7CL,6BAAA,CAA8BM,KAAA;EAE9BL,2BAAA,CAA4B,iCAAiCK,KAAA;EAE7D,OAAOP,0BAAA,CAA2BO,KAAA;AACpC;AAEAJ,WAAA,CAAYK,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,MAAQ;IAC5F,MAAMC,QAAQR,wBAAwBM,OAAOC;IAE7CL,8BAA8BM;IAE9BL,4BAA4B,iCAAiCK;IAE7D,OAAOP,2BAA2BO;AACpC,GAAuG;AAEvGJ,YAAYK,WAAW,GAAG"}
@@ -1,2 +1 @@
1
1
  import * as React from 'react';
2
- //# sourceMappingURL=DataGridRow.types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React"],"sources":["../../../src/components/DataGridRow/DataGridRow.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { TableColumnDefinition } from '../../hooks';\nimport { DataGridContextValue } from '../DataGrid/DataGrid.types';\nimport type { TableRowProps, TableRowSlots, TableRowState } from '../TableRow/TableRow.types';\nimport type { TableSelectionCell } from '../TableSelectionCell/TableSelectionCell';\n\nexport type DataGridRowSlots = TableRowSlots & {\n /**\n * When selection is enabled on the @see DataGrid, all rows\n * will render the selection cell.\n */\n selectionCell?: Slot<typeof TableSelectionCell>;\n};\n\nexport type CellRenderFunction<TItem = unknown> = (\n column: TableColumnDefinition<TItem>,\n dataGridContextValue: DataGridContextValue,\n) => React.ReactNode;\n\n/**\n * DataGridRow Props\n */\nexport type DataGridRowProps<TItem = unknown> = Omit<TableRowProps, 'children'> &\n Omit<ComponentProps<DataGridRowSlots>, 'children'> & {\n children: CellRenderFunction<TItem>;\n };\n\n/**\n * State used in rendering DataGridRow\n */\nexport type DataGridRowState = TableRowState &\n ComponentState<DataGridRowSlots> & {\n renderCell: CellRenderFunction;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n columnDefs: TableColumnDefinition<any>[];\n dataGridContextValue: DataGridContextValue;\n };\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW"}
1
+ {"version":3,"sources":["DataGridRow.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { TableColumnDefinition } from '../../hooks';\nimport { DataGridContextValue } from '../DataGrid/DataGrid.types';\nimport type { TableRowProps, TableRowSlots, TableRowState } from '../TableRow/TableRow.types';\nimport type { TableSelectionCell } from '../TableSelectionCell/TableSelectionCell';\n\nexport type DataGridRowSlots = TableRowSlots & {\n /**\n * When selection is enabled on the @see DataGrid, all rows\n * will render the selection cell.\n */\n selectionCell?: Slot<typeof TableSelectionCell>;\n};\n\nexport type CellRenderFunction<TItem = unknown> = (\n column: TableColumnDefinition<TItem>,\n dataGridContextValue: DataGridContextValue,\n) => React.ReactNode;\n\n/**\n * DataGridRow Props\n */\nexport type DataGridRowProps<TItem = unknown> = Omit<TableRowProps, 'children'> &\n Omit<ComponentProps<DataGridRowSlots>, 'children'> & {\n children: CellRenderFunction<TItem>;\n };\n\n/**\n * State used in rendering DataGridRow\n */\nexport type DataGridRowState = TableRowState &\n ComponentState<DataGridRowSlots> & {\n renderCell: CellRenderFunction;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n columnDefs: TableColumnDefinition<any>[];\n dataGridContextValue: DataGridContextValue;\n };\n"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
@@ -3,4 +3,3 @@ export * from './DataGridRow.types';
3
3
  export * from './renderDataGridRow';
4
4
  export * from './useDataGridRow';
5
5
  export * from './useDataGridRowStyles.styles';
6
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/DataGridRow/index.ts"],"sourcesContent":["export * from './DataGridRow';\nexport * from './DataGridRow.types';\nexport * from './renderDataGridRow';\nexport * from './useDataGridRow';\nexport * from './useDataGridRowStyles.styles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './DataGridRow';\nexport * from './DataGridRow.types';\nexport * from './renderDataGridRow';\nexport * from './useDataGridRow';\nexport * from './useDataGridRowStyles.styles';\n"],"names":[],"mappings":"AAAA,cAAc,gBAAgB;AAC9B,cAAc,sBAAsB;AACpC,cAAc,sBAAsB;AACpC,cAAc,mBAAmB;AACjC,cAAc,gCAAgC"}
@@ -1,17 +1,12 @@
1
- /** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';
1
+ /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
2
2
  import { getSlotsNext } from '@fluentui/react-utilities';
3
3
  import { ColumnIdContextProvider } from '../../contexts/columnIdContext';
4
4
  /**
5
5
  * Render the final JSX of DataGridRow
6
- */
7
- export const renderDataGridRow_unstable = state => {
8
- const {
9
- slots,
10
- slotProps
11
- } = getSlotsNext(state);
12
- return /*#__PURE__*/createElement(slots.root, slotProps.root, slots.selectionCell && /*#__PURE__*/createElement(slots.selectionCell, slotProps.selectionCell), state.columnDefs.map(columnDef => /*#__PURE__*/createElement(ColumnIdContextProvider, {
13
- value: columnDef.columnId,
14
- key: columnDef.columnId
15
- }, state.renderCell(columnDef, state.dataGridContextValue))));
6
+ */ export const renderDataGridRow_unstable = (state)=>{
7
+ const { slots , slotProps } = getSlotsNext(state);
8
+ return /*#__PURE__*/ createElement(slots.root, slotProps.root, slots.selectionCell && /*#__PURE__*/ createElement(slots.selectionCell, slotProps.selectionCell), state.columnDefs.map((columnDef)=>/*#__PURE__*/ createElement(ColumnIdContextProvider, {
9
+ value: columnDef.columnId,
10
+ key: columnDef.columnId
11
+ }, state.renderCell(columnDef, state.dataGridContextValue))));
16
12
  };
17
- //# sourceMappingURL=renderDataGridRow.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createElement","getSlotsNext","ColumnIdContextProvider","renderDataGridRow_unstable","state","slots","slotProps","root","selectionCell","columnDefs","map","columnDef","value","columnId","key","renderCell","dataGridContextValue"],"sources":["../../../src/components/DataGridRow/renderDataGridRow.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } 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 const { slots, slotProps } = getSlotsNext<DataGridRowSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.selectionCell && <slots.selectionCell {...slotProps.selectionCell} />}\n {state.columnDefs.map(columnDef => (\n <ColumnIdContextProvider value={columnDef.columnId} key={columnDef.columnId}>\n {state.renderCell(columnDef, state.dataGridContextValue)}\n </ColumnIdContextProvider>\n ))}\n </slots.root>\n );\n};\n"],"mappings":"AAAA,2BACA,yBAEA,SAASA,aAAa,QAAQ;AAC9B,SAASC,YAAY,QAAQ;AAE7B,SAASC,uBAAuB,QAAQ;AAExC;;;AAGA,OAAO,MAAMC,0BAAA,GAA8BC,KAAA,IAA4B;EACrE,MAAM;IAAEC,KAAA;IAAOC;EAAS,CAAE,GAAGL,YAAA,CAA+BG,KAAA;EAE5D,oBACEJ,aAdJ,CAcKK,KAAA,CAAME,IAAI,EAAKD,SAAA,CAAUC,IAAI,EAC3BF,KAAA,CAAMG,aAAa,iBAAIR,aAf9B,CAe+BK,KAAA,CAAMG,aAAa,EAAKF,SAAA,CAAUE,aAAa,GACvEJ,KAAA,CAAMK,UAAU,CAACC,GAAG,CAACC,SAAA,iBACpBX,aAjBR,CAiBSE,uBAAA;IAAwBU,KAAA,EAAOD,SAAA,CAAUE,QAAQ;IAAEC,GAAA,EAAKH,SAAA,CAAUE;KAChET,KAAA,CAAMW,UAAU,CAACJ,SAAA,EAAWP,KAAA,CAAMY,oBAAoB;AAKjE"}
1
+ {"version":3,"sources":["renderDataGridRow.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } 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 const { slots, slotProps } = getSlotsNext<DataGridRowSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.selectionCell && <slots.selectionCell {...slotProps.selectionCell} />}\n {state.columnDefs.map(columnDef => (\n <ColumnIdContextProvider value={columnDef.columnId} key={columnDef.columnId}>\n {state.renderCell(columnDef, state.dataGridContextValue)}\n </ColumnIdContextProvider>\n ))}\n </slots.root>\n );\n};\n"],"names":["createElement","getSlotsNext","ColumnIdContextProvider","renderDataGridRow_unstable","state","slots","slotProps","root","selectionCell","columnDefs","map","columnDef","value","columnId","key","renderCell","dataGridContextValue"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,YAAY,QAAQ,4BAA4B;AAEzD,SAASC,uBAAuB,QAAQ,iCAAiC;AAEzE;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC,QAA4B;IACrE,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGL,aAA+BG;IAE5D,qBACE,AAdJ,cAcKC,MAAME,IAAI,EAAKD,UAAUC,IAAI,EAC3BF,MAAMG,aAAa,kBAAI,AAf9B,cAe+BH,MAAMG,aAAa,EAAKF,UAAUE,aAAa,GACvEJ,MAAMK,UAAU,CAACC,GAAG,CAACC,CAAAA,0BACpB,AAjBR,cAiBST;YAAwBU,OAAOD,UAAUE,QAAQ;YAAEC,KAAKH,UAAUE,QAAQ;WACxET,MAAMW,UAAU,CAACJ,WAAWP,MAAMY,oBAAoB;AAKjE,EAAE"}
@@ -14,60 +14,58 @@ import { useIsInTableHeader } from '../../contexts/tableHeaderContext';
14
14
  *
15
15
  * @param props - props from this instance of DataGridRow
16
16
  * @param ref - reference to root HTMLElement of DataGridRow
17
- */
18
- export const useDataGridRow_unstable = (props, ref) => {
19
- const rowId = useTableRowIdContext();
20
- const isHeader = useIsInTableHeader();
21
- const columnDefs = useDataGridContext_unstable(ctx => ctx.columns);
22
- const selectable = useDataGridContext_unstable(ctx => ctx.selectableRows);
23
- const selected = useDataGridContext_unstable(ctx => ctx.selection.isRowSelected(rowId));
24
- const tabbable = useDataGridContext_unstable(ctx => ctx.focusMode === 'row_unstable');
25
- const appearance = useDataGridContext_unstable(ctx => {
26
- if (!isHeader && selectable && ctx.selection.isRowSelected(rowId)) {
27
- return ctx.selectionAppearance;
28
- }
29
- return 'none';
30
- });
31
- const toggleRow = useDataGridContext_unstable(ctx => ctx.selection.toggleRow);
32
- const dataGridContextValue = useDataGridContext_unstable(ctx => ctx);
33
- const onClick = useEventCallback(e => {
34
- var _props_onClick;
35
- if (selectable && !isHeader) {
36
- toggleRow(e, rowId);
37
- }
38
- (_props_onClick = props.onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(props, e);
39
- });
40
- const onKeyDown = useEventCallback(e => {
41
- var _props_onKeyDown;
42
- if (selectable && !isHeader && e.key === Space && !isInteractiveHTMLElement(e.target)) {
43
- // stop scrolling
44
- e.preventDefault();
45
- toggleRow(e, rowId);
46
- }
47
- (_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(props, e);
48
- });
49
- const baseState = useTableRow_unstable({
50
- appearance,
51
- 'aria-selected': selectable ? selected : undefined,
52
- ...props,
53
- onClick,
54
- onKeyDown,
55
- children: null,
56
- as: 'div',
57
- tabIndex: tabbable && !isHeader ? 0 : undefined
58
- }, ref);
59
- return {
60
- ...baseState,
61
- components: {
62
- ...baseState.components,
63
- selectionCell: DataGridSelectionCell
64
- },
65
- selectionCell: resolveShorthand(props.selectionCell, {
66
- required: selectable
67
- }),
68
- renderCell: props.children,
69
- columnDefs,
70
- dataGridContextValue
71
- };
17
+ */ export const useDataGridRow_unstable = (props, ref)=>{
18
+ const rowId = useTableRowIdContext();
19
+ const isHeader = useIsInTableHeader();
20
+ const columnDefs = useDataGridContext_unstable((ctx)=>ctx.columns);
21
+ const selectable = useDataGridContext_unstable((ctx)=>ctx.selectableRows);
22
+ const selected = useDataGridContext_unstable((ctx)=>ctx.selection.isRowSelected(rowId));
23
+ const tabbable = useDataGridContext_unstable((ctx)=>ctx.focusMode === 'row_unstable');
24
+ const appearance = useDataGridContext_unstable((ctx)=>{
25
+ if (!isHeader && selectable && ctx.selection.isRowSelected(rowId)) {
26
+ return ctx.selectionAppearance;
27
+ }
28
+ return 'none';
29
+ });
30
+ const toggleRow = useDataGridContext_unstable((ctx)=>ctx.selection.toggleRow);
31
+ const dataGridContextValue = useDataGridContext_unstable((ctx)=>ctx);
32
+ const onClick = useEventCallback((e)=>{
33
+ var _props_onClick;
34
+ if (selectable && !isHeader) {
35
+ toggleRow(e, rowId);
36
+ }
37
+ (_props_onClick = props.onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(props, e);
38
+ });
39
+ const onKeyDown = useEventCallback((e)=>{
40
+ var _props_onKeyDown;
41
+ if (selectable && !isHeader && e.key === Space && !isInteractiveHTMLElement(e.target)) {
42
+ // stop scrolling
43
+ e.preventDefault();
44
+ toggleRow(e, rowId);
45
+ }
46
+ (_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(props, e);
47
+ });
48
+ const baseState = useTableRow_unstable({
49
+ appearance,
50
+ 'aria-selected': selectable ? selected : undefined,
51
+ ...props,
52
+ onClick,
53
+ onKeyDown,
54
+ children: null,
55
+ as: 'div',
56
+ tabIndex: tabbable && !isHeader ? 0 : undefined
57
+ }, ref);
58
+ return {
59
+ ...baseState,
60
+ components: {
61
+ ...baseState.components,
62
+ selectionCell: DataGridSelectionCell
63
+ },
64
+ selectionCell: resolveShorthand(props.selectionCell, {
65
+ required: selectable
66
+ }),
67
+ renderCell: props.children,
68
+ columnDefs,
69
+ dataGridContextValue
70
+ };
72
71
  };
73
- //# sourceMappingURL=useDataGridRow.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","isInteractiveHTMLElement","useEventCallback","resolveShorthand","Space","useTableRow_unstable","useDataGridContext_unstable","DataGridSelectionCell","useTableRowIdContext","useIsInTableHeader","useDataGridRow_unstable","props","ref","rowId","isHeader","columnDefs","ctx","columns","selectable","selectableRows","selected","selection","isRowSelected","tabbable","focusMode","appearance","selectionAppearance","toggleRow","dataGridContextValue","onClick","e","_props_onClick","call","onKeyDown","_props_onKeyDown","key","target","preventDefault","baseState","undefined","children","as","tabIndex","components","selectionCell","required","renderCell"],"sources":["../../../src/components/DataGridRow/useDataGridRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { isInteractiveHTMLElement, useEventCallback, resolveShorthand } from '@fluentui/react-utilities';\nimport { Space } from '@fluentui/keyboard-keys';\nimport type { DataGridRowProps, DataGridRowState } from './DataGridRow.types';\nimport { useTableRow_unstable } from '../TableRow/useTableRow';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { DataGridSelectionCell } from '../DataGridSelectionCell/DataGridSelectionCell';\nimport { useTableRowIdContext } from '../../contexts/rowIdContext';\nimport { useIsInTableHeader } from '../../contexts/tableHeaderContext';\n\n/**\n * Create the state required to render DataGridRow.\n *\n * The returned state can be modified with hooks such as useDataGridRowStyles_unstable,\n * before being passed to renderDataGridRow_unstable.\n *\n * @param props - props from this instance of DataGridRow\n * @param ref - reference to root HTMLElement of DataGridRow\n */\nexport const useDataGridRow_unstable = (props: DataGridRowProps, ref: React.Ref<HTMLElement>): DataGridRowState => {\n const rowId = useTableRowIdContext();\n const isHeader = useIsInTableHeader();\n const columnDefs = useDataGridContext_unstable(ctx => ctx.columns);\n const selectable = useDataGridContext_unstable(ctx => ctx.selectableRows);\n const selected = useDataGridContext_unstable(ctx => ctx.selection.isRowSelected(rowId));\n const tabbable = useDataGridContext_unstable(ctx => ctx.focusMode === 'row_unstable');\n const appearance = useDataGridContext_unstable(ctx => {\n if (!isHeader && selectable && ctx.selection.isRowSelected(rowId)) {\n return ctx.selectionAppearance;\n }\n\n return 'none';\n });\n const toggleRow = useDataGridContext_unstable(ctx => ctx.selection.toggleRow);\n const dataGridContextValue = useDataGridContext_unstable(ctx => ctx);\n\n const onClick = useEventCallback((e: React.MouseEvent<HTMLTableRowElement>) => {\n if (selectable && !isHeader) {\n toggleRow(e, rowId);\n }\n\n props.onClick?.(e);\n });\n\n const onKeyDown = useEventCallback((e: React.KeyboardEvent<HTMLTableRowElement>) => {\n if (selectable && !isHeader && e.key === Space && !isInteractiveHTMLElement(e.target as HTMLElement)) {\n // stop scrolling\n e.preventDefault();\n toggleRow(e, rowId);\n }\n\n props.onKeyDown?.(e);\n });\n\n const baseState = useTableRow_unstable(\n {\n appearance,\n 'aria-selected': selectable ? selected : undefined,\n ...props,\n onClick,\n onKeyDown,\n children: null,\n as: 'div',\n tabIndex: tabbable && !isHeader ? 0 : undefined,\n },\n ref,\n );\n\n return {\n ...baseState,\n components: {\n ...baseState.components,\n selectionCell: DataGridSelectionCell,\n },\n selectionCell: resolveShorthand(props.selectionCell, { required: selectable }),\n renderCell: props.children,\n columnDefs,\n dataGridContextValue,\n };\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,wBAAwB,EAAEC,gBAAgB,EAAEC,gBAAgB,QAAQ;AAC7E,SAASC,KAAK,QAAQ;AAEtB,SAASC,oBAAoB,QAAQ;AACrC,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,qBAAqB,QAAQ;AACtC,SAASC,oBAAoB,QAAQ;AACrC,SAASC,kBAAkB,QAAQ;AAEnC;;;;;;;;;AASA,OAAO,MAAMC,uBAAA,GAA0BA,CAACC,KAAA,EAAyBC,GAAA,KAAkD;EACjH,MAAMC,KAAA,GAAQL,oBAAA;EACd,MAAMM,QAAA,GAAWL,kBAAA;EACjB,MAAMM,UAAA,GAAaT,2BAAA,CAA4BU,GAAA,IAAOA,GAAA,CAAIC,OAAO;EACjE,MAAMC,UAAA,GAAaZ,2BAAA,CAA4BU,GAAA,IAAOA,GAAA,CAAIG,cAAc;EACxE,MAAMC,QAAA,GAAWd,2BAAA,CAA4BU,GAAA,IAAOA,GAAA,CAAIK,SAAS,CAACC,aAAa,CAACT,KAAA;EAChF,MAAMU,QAAA,GAAWjB,2BAAA,CAA4BU,GAAA,IAAOA,GAAA,CAAIQ,SAAS,KAAK;EACtE,MAAMC,UAAA,GAAanB,2BAAA,CAA4BU,GAAA,IAAO;IACpD,IAAI,CAACF,QAAA,IAAYI,UAAA,IAAcF,GAAA,CAAIK,SAAS,CAACC,aAAa,CAACT,KAAA,GAAQ;MACjE,OAAOG,GAAA,CAAIU,mBAAmB;IAChC;IAEA,OAAO;EACT;EACA,MAAMC,SAAA,GAAYrB,2BAAA,CAA4BU,GAAA,IAAOA,GAAA,CAAIK,SAAS,CAACM,SAAS;EAC5E,MAAMC,oBAAA,GAAuBtB,2BAAA,CAA4BU,GAAA,IAAOA,GAAA;EAEhE,MAAMa,OAAA,GAAU3B,gBAAA,CAAkB4B,CAAA,IAA6C;QAK7EC,cAAA;IAJA,IAAIb,UAAA,IAAc,CAACJ,QAAA,EAAU;MAC3Ba,SAAA,CAAUG,CAAA,EAAGjB,KAAA;IACf;IAEA,CAAAkB,cAAA,GAAApB,KAAA,CAAMkB,OAAO,cAAbE,cAAA,uBAAAA,cAAA,CAAAC,IAAA,CAAArB,KAAA,EAAgBmB,CAAA;EAClB;EAEA,MAAMG,SAAA,GAAY/B,gBAAA,CAAkB4B,CAAA,IAAgD;QAOlFI,gBAAA;IANA,IAAIhB,UAAA,IAAc,CAACJ,QAAA,IAAYgB,CAAA,CAAEK,GAAG,KAAK/B,KAAA,IAAS,CAACH,wBAAA,CAAyB6B,CAAA,CAAEM,MAAM,GAAkB;MACpG;MACAN,CAAA,CAAEO,cAAc;MAChBV,SAAA,CAAUG,CAAA,EAAGjB,KAAA;IACf;IAEA,CAAAqB,gBAAA,GAAAvB,KAAA,CAAMsB,SAAS,cAAfC,gBAAA,uBAAAA,gBAAA,CAAAF,IAAA,CAAArB,KAAA,EAAkBmB,CAAA;EACpB;EAEA,MAAMQ,SAAA,GAAYjC,oBAAA,CAChB;IACEoB,UAAA;IACA,iBAAiBP,UAAA,GAAaE,QAAA,GAAWmB,SAAS;IAClD,GAAG5B,KAAK;IACRkB,OAAA;IACAI,SAAA;IACAO,QAAA,EAAU,IAAI;IACdC,EAAA,EAAI;IACJC,QAAA,EAAUnB,QAAA,IAAY,CAACT,QAAA,GAAW,IAAIyB;EACxC,GACA3B,GAAA;EAGF,OAAO;IACL,GAAG0B,SAAS;IACZK,UAAA,EAAY;MACV,GAAGL,SAAA,CAAUK,UAAU;MACvBC,aAAA,EAAerC;IACjB;IACAqC,aAAA,EAAezC,gBAAA,CAAiBQ,KAAA,CAAMiC,aAAa,EAAE;MAAEC,QAAA,EAAU3B;IAAW;IAC5E4B,UAAA,EAAYnC,KAAA,CAAM6B,QAAQ;IAC1BzB,UAAA;IACAa;EACF;AACF"}
1
+ {"version":3,"sources":["useDataGridRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { isInteractiveHTMLElement, useEventCallback, resolveShorthand } from '@fluentui/react-utilities';\nimport { Space } from '@fluentui/keyboard-keys';\nimport type { DataGridRowProps, DataGridRowState } from './DataGridRow.types';\nimport { useTableRow_unstable } from '../TableRow/useTableRow';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { DataGridSelectionCell } from '../DataGridSelectionCell/DataGridSelectionCell';\nimport { useTableRowIdContext } from '../../contexts/rowIdContext';\nimport { useIsInTableHeader } from '../../contexts/tableHeaderContext';\n\n/**\n * Create the state required to render DataGridRow.\n *\n * The returned state can be modified with hooks such as useDataGridRowStyles_unstable,\n * before being passed to renderDataGridRow_unstable.\n *\n * @param props - props from this instance of DataGridRow\n * @param ref - reference to root HTMLElement of DataGridRow\n */\nexport const useDataGridRow_unstable = (props: DataGridRowProps, ref: React.Ref<HTMLElement>): DataGridRowState => {\n const rowId = useTableRowIdContext();\n const isHeader = useIsInTableHeader();\n const columnDefs = useDataGridContext_unstable(ctx => ctx.columns);\n const selectable = useDataGridContext_unstable(ctx => ctx.selectableRows);\n const selected = useDataGridContext_unstable(ctx => ctx.selection.isRowSelected(rowId));\n const tabbable = useDataGridContext_unstable(ctx => ctx.focusMode === 'row_unstable');\n const appearance = useDataGridContext_unstable(ctx => {\n if (!isHeader && selectable && ctx.selection.isRowSelected(rowId)) {\n return ctx.selectionAppearance;\n }\n\n return 'none';\n });\n const toggleRow = useDataGridContext_unstable(ctx => ctx.selection.toggleRow);\n const dataGridContextValue = useDataGridContext_unstable(ctx => ctx);\n\n const onClick = useEventCallback((e: React.MouseEvent<HTMLTableRowElement>) => {\n if (selectable && !isHeader) {\n toggleRow(e, rowId);\n }\n\n props.onClick?.(e);\n });\n\n const onKeyDown = useEventCallback((e: React.KeyboardEvent<HTMLTableRowElement>) => {\n if (selectable && !isHeader && e.key === Space && !isInteractiveHTMLElement(e.target as HTMLElement)) {\n // stop scrolling\n e.preventDefault();\n toggleRow(e, rowId);\n }\n\n props.onKeyDown?.(e);\n });\n\n const baseState = useTableRow_unstable(\n {\n appearance,\n 'aria-selected': selectable ? selected : undefined,\n ...props,\n onClick,\n onKeyDown,\n children: null,\n as: 'div',\n tabIndex: tabbable && !isHeader ? 0 : undefined,\n },\n ref,\n );\n\n return {\n ...baseState,\n components: {\n ...baseState.components,\n selectionCell: DataGridSelectionCell,\n },\n selectionCell: resolveShorthand(props.selectionCell, { required: selectable }),\n renderCell: props.children,\n columnDefs,\n dataGridContextValue,\n };\n};\n"],"names":["React","isInteractiveHTMLElement","useEventCallback","resolveShorthand","Space","useTableRow_unstable","useDataGridContext_unstable","DataGridSelectionCell","useTableRowIdContext","useIsInTableHeader","useDataGridRow_unstable","props","ref","rowId","isHeader","columnDefs","ctx","columns","selectable","selectableRows","selected","selection","isRowSelected","tabbable","focusMode","appearance","selectionAppearance","toggleRow","dataGridContextValue","onClick","e","onKeyDown","key","target","preventDefault","baseState","undefined","children","as","tabIndex","components","selectionCell","required","renderCell"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,gBAAgB,EAAEC,gBAAgB,QAAQ,4BAA4B;AACzG,SAASC,KAAK,QAAQ,0BAA0B;AAEhD,SAASC,oBAAoB,QAAQ,0BAA0B;AAC/D,SAASC,2BAA2B,QAAQ,iCAAiC;AAC7E,SAASC,qBAAqB,QAAQ,iDAAiD;AACvF,SAASC,oBAAoB,QAAQ,8BAA8B;AACnE,SAASC,kBAAkB,QAAQ,oCAAoC;AAEvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAyBC,MAAkD;IACjH,MAAMC,QAAQL;IACd,MAAMM,WAAWL;IACjB,MAAMM,aAAaT,4BAA4BU,CAAAA,MAAOA,IAAIC,OAAO;IACjE,MAAMC,aAAaZ,4BAA4BU,CAAAA,MAAOA,IAAIG,cAAc;IACxE,MAAMC,WAAWd,4BAA4BU,CAAAA,MAAOA,IAAIK,SAAS,CAACC,aAAa,CAACT;IAChF,MAAMU,WAAWjB,4BAA4BU,CAAAA,MAAOA,IAAIQ,SAAS,KAAK;IACtE,MAAMC,aAAanB,4BAA4BU,CAAAA,MAAO;QACpD,IAAI,CAACF,YAAYI,cAAcF,IAAIK,SAAS,CAACC,aAAa,CAACT,QAAQ;YACjE,OAAOG,IAAIU,mBAAmB;QAChC,CAAC;QAED,OAAO;IACT;IACA,MAAMC,YAAYrB,4BAA4BU,CAAAA,MAAOA,IAAIK,SAAS,CAACM,SAAS;IAC5E,MAAMC,uBAAuBtB,4BAA4BU,CAAAA,MAAOA;IAEhE,MAAMa,UAAU3B,iBAAiB,CAAC4B,IAA6C;YAK7EnB;QAJA,IAAIO,cAAc,CAACJ,UAAU;YAC3Ba,UAAUG,GAAGjB;QACf,CAAC;QAEDF,CAAAA,iBAAAA,MAAMkB,OAAO,cAAblB,4BAAAA,KAAAA,IAAAA,eAAAA,KAAAA,OAAgBmB;IAClB;IAEA,MAAMC,YAAY7B,iBAAiB,CAAC4B,IAAgD;YAOlFnB;QANA,IAAIO,cAAc,CAACJ,YAAYgB,EAAEE,GAAG,KAAK5B,SAAS,CAACH,yBAAyB6B,EAAEG,MAAM,GAAkB;YACpG,iBAAiB;YACjBH,EAAEI,cAAc;YAChBP,UAAUG,GAAGjB;QACf,CAAC;QAEDF,CAAAA,mBAAAA,MAAMoB,SAAS,cAAfpB,8BAAAA,KAAAA,IAAAA,iBAAAA,KAAAA,OAAkBmB;IACpB;IAEA,MAAMK,YAAY9B,qBAChB;QACEoB;QACA,iBAAiBP,aAAaE,WAAWgB,SAAS;QAClD,GAAGzB,KAAK;QACRkB;QACAE;QACAM,UAAU,IAAI;QACdC,IAAI;QACJC,UAAUhB,YAAY,CAACT,WAAW,IAAIsB,SAAS;IACjD,GACAxB;IAGF,OAAO;QACL,GAAGuB,SAAS;QACZK,YAAY;YACV,GAAGL,UAAUK,UAAU;YACvBC,eAAelC;QACjB;QACAkC,eAAetC,iBAAiBQ,MAAM8B,aAAa,EAAE;YAAEC,UAAUxB;QAAW;QAC5EyB,YAAYhC,MAAM0B,QAAQ;QAC1BtB;QACAa;IACF;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"names":["mergeClasses","useTableRowStyles_unstable","dataGridRowClassNames","root","selectionCell","useDataGridRowStyles_unstable","state","className"],"sources":["../../../src/components/DataGridRow/useDataGridRowStyles.styles.ts"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport type { DataGridRowSlots, DataGridRowState } from './DataGridRow.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useTableRowStyles_unstable } from '../TableRow/useTableRowStyles.styles';\n\nexport const dataGridRowClassNames: SlotClassNames<DataGridRowSlots> = {\n root: 'fui-DataGridRow',\n selectionCell: 'fui-DataGridRow__selectionCell',\n};\n\n/**\n * Apply styling to the DataGridRow slots based on the state\n */\nexport const useDataGridRowStyles_unstable = (state: DataGridRowState): DataGridRowState => {\n useTableRowStyles_unstable(state);\n state.root.className = mergeClasses(dataGridRowClassNames.root, state.root.className);\n if (state.selectionCell) {\n state.selectionCell.className = mergeClasses(dataGridRowClassNames.selectionCell, state.selectionCell.className);\n }\n\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ;AAG7B,SAASC,0BAA0B,QAAQ;AAE3C,OAAO,MAAMC,qBAAA,GAA0D;EACrEC,IAAA,EAAM;EACNC,aAAA,EAAe;AACjB;AAEA;;;AAGA,OAAO,MAAMC,6BAAA,GAAiCC,KAAA,IAA8C;EAC1FL,0BAAA,CAA2BK,KAAA;EAC3BA,KAAA,CAAMH,IAAI,CAACI,SAAS,GAAGP,YAAA,CAAaE,qBAAA,CAAsBC,IAAI,EAAEG,KAAA,CAAMH,IAAI,CAACI,SAAS;EACpF,IAAID,KAAA,CAAMF,aAAa,EAAE;IACvBE,KAAA,CAAMF,aAAa,CAACG,SAAS,GAAGP,YAAA,CAAaE,qBAAA,CAAsBE,aAAa,EAAEE,KAAA,CAAMF,aAAa,CAACG,SAAS;EACjH;EAEA,OAAOD,KAAA;AACT"}
1
+ {"version":3,"names":["mergeClasses","useTableRowStyles_unstable","dataGridRowClassNames","root","selectionCell","useDataGridRowStyles_unstable","state","className"],"sources":["useDataGridRowStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useTableRowStyles_unstable } from '../TableRow/useTableRowStyles.styles';\nexport const dataGridRowClassNames = {\n root: 'fui-DataGridRow',\n selectionCell: 'fui-DataGridRow__selectionCell'\n};\n/**\n * Apply styling to the DataGridRow slots based on the state\n */ export const useDataGridRowStyles_unstable = (state)=>{\n useTableRowStyles_unstable(state);\n state.root.className = mergeClasses(dataGridRowClassNames.root, state.root.className);\n if (state.selectionCell) {\n state.selectionCell.className = mergeClasses(dataGridRowClassNames.selectionCell, state.selectionCell.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,0BAA0B,QAAQ,sCAAsC;AACjF,OAAO,MAAMC,qBAAqB,GAAG;EACjCC,IAAI,EAAE,iBAAiB;EACvBC,aAAa,EAAE;AACnB,CAAC;AACD;AACA;AACA;AAAI,OAAO,MAAMC,6BAA6B,GAAIC,KAAK,IAAG;EACtDL,0BAA0B,CAACK,KAAK,CAAC;EACjCA,KAAK,CAACH,IAAI,CAACI,SAAS,GAAGP,YAAY,CAACE,qBAAqB,CAACC,IAAI,EAAEG,KAAK,CAACH,IAAI,CAACI,SAAS,CAAC;EACrF,IAAID,KAAK,CAACF,aAAa,EAAE;IACrBE,KAAK,CAACF,aAAa,CAACG,SAAS,GAAGP,YAAY,CAACE,qBAAqB,CAACE,aAAa,EAAEE,KAAK,CAACF,aAAa,CAACG,SAAS,CAAC;EACpH;EACA,OAAOD,KAAK;AAChB,CAAC"}
@@ -5,12 +5,10 @@ import { useDataGridSelectionCellStyles_unstable } from './useDataGridSelectionC
5
5
  import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
6
6
  /**
7
7
  * DataGridSelectionCell component
8
- */
9
- export const DataGridSelectionCell = /*#__PURE__*/React.forwardRef((props, ref) => {
10
- const state = useDataGridSelectionCell_unstable(props, ref);
11
- useDataGridSelectionCellStyles_unstable(state);
12
- useCustomStyleHook_unstable('useDataGridSelectionCellStyles_unstable')(state);
13
- return renderDataGridSelectionCell_unstable(state);
8
+ */ export const DataGridSelectionCell = /*#__PURE__*/ React.forwardRef((props, ref)=>{
9
+ const state = useDataGridSelectionCell_unstable(props, ref);
10
+ useDataGridSelectionCellStyles_unstable(state);
11
+ useCustomStyleHook_unstable('useDataGridSelectionCellStyles_unstable')(state);
12
+ return renderDataGridSelectionCell_unstable(state);
14
13
  });
15
14
  DataGridSelectionCell.displayName = 'DataGridSelectionCell';
16
- //# sourceMappingURL=DataGridSelectionCell.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useDataGridSelectionCell_unstable","renderDataGridSelectionCell_unstable","useDataGridSelectionCellStyles_unstable","useCustomStyleHook_unstable","DataGridSelectionCell","forwardRef","props","ref","state","displayName"],"sources":["../../../src/components/DataGridSelectionCell/DataGridSelectionCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridSelectionCell_unstable } from './useDataGridSelectionCell';\nimport { renderDataGridSelectionCell_unstable } from './renderDataGridSelectionCell';\nimport { useDataGridSelectionCellStyles_unstable } from './useDataGridSelectionCellStyles.styles';\nimport type { DataGridSelectionCellProps } from './DataGridSelectionCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridSelectionCell component\n */\nexport const DataGridSelectionCell: ForwardRefComponent<DataGridSelectionCellProps> = React.forwardRef((props, ref) => {\n const state = useDataGridSelectionCell_unstable(props, ref);\n\n useDataGridSelectionCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridSelectionCellStyles_unstable')(state);\n\n return renderDataGridSelectionCell_unstable(state);\n});\n\nDataGridSelectionCell.displayName = 'DataGridSelectionCell';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,iCAAiC,QAAQ;AAClD,SAASC,oCAAoC,QAAQ;AACrD,SAASC,uCAAuC,QAAQ;AAGxD,SAASC,2BAA2B,QAAQ;AAE5C;;;AAGA,OAAO,MAAMC,qBAAA,gBAAyEL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACrH,MAAMC,KAAA,GAAQR,iCAAA,CAAkCM,KAAA,EAAOC,GAAA;EAEvDL,uCAAA,CAAwCM,KAAA;EAExCL,2BAAA,CAA4B,2CAA2CK,KAAA;EAEvE,OAAOP,oCAAA,CAAqCO,KAAA;AAC9C;AAEAJ,qBAAA,CAAsBK,WAAW,GAAG"}
1
+ {"version":3,"sources":["DataGridSelectionCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridSelectionCell_unstable } from './useDataGridSelectionCell';\nimport { renderDataGridSelectionCell_unstable } from './renderDataGridSelectionCell';\nimport { useDataGridSelectionCellStyles_unstable } from './useDataGridSelectionCellStyles.styles';\nimport type { DataGridSelectionCellProps } from './DataGridSelectionCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridSelectionCell component\n */\nexport const DataGridSelectionCell: ForwardRefComponent<DataGridSelectionCellProps> = React.forwardRef((props, ref) => {\n const state = useDataGridSelectionCell_unstable(props, ref);\n\n useDataGridSelectionCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridSelectionCellStyles_unstable')(state);\n\n return renderDataGridSelectionCell_unstable(state);\n});\n\nDataGridSelectionCell.displayName = 'DataGridSelectionCell';\n"],"names":["React","useDataGridSelectionCell_unstable","renderDataGridSelectionCell_unstable","useDataGridSelectionCellStyles_unstable","useCustomStyleHook_unstable","DataGridSelectionCell","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,iCAAiC,QAAQ,6BAA6B;AAC/E,SAASC,oCAAoC,QAAQ,gCAAgC;AACrF,SAASC,uCAAuC,QAAQ,0CAA0C;AAGlG,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,sCAAyEL,MAAMM,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACrH,MAAMC,QAAQR,kCAAkCM,OAAOC;IAEvDL,wCAAwCM;IAExCL,4BAA4B,2CAA2CK;IAEvE,OAAOP,qCAAqCO;AAC9C,GAAG;AAEHJ,sBAAsBK,WAAW,GAAG"}