@fluentui/react-table 9.8.1 → 9.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (369) hide show
  1. package/CHANGELOG.json +88 -1
  2. package/CHANGELOG.md +23 -2
  3. package/lib/components/DataGrid/DataGrid.js.map +1 -1
  4. package/lib/components/DataGrid/renderDataGrid.js.map +1 -1
  5. package/lib/components/DataGrid/useDataGrid.js +5 -5
  6. package/lib/components/DataGrid/useDataGrid.js.map +1 -1
  7. package/lib/components/DataGrid/useDataGridContextValues.js +1 -1
  8. package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -1
  9. package/lib/components/DataGridBody/DataGridBody.js.map +1 -1
  10. package/lib/components/DataGridBody/renderDataGridBody.js +7 -5
  11. package/lib/components/DataGridBody/renderDataGridBody.js.map +1 -1
  12. package/lib/components/DataGridBody/useDataGridBody.js +1 -1
  13. package/lib/components/DataGridBody/useDataGridBody.js.map +1 -1
  14. package/lib/components/DataGridCell/DataGridCell.js.map +1 -1
  15. package/lib/components/DataGridCell/renderDataGridCell.js.map +1 -1
  16. package/lib/components/DataGridCell/useDataGridCell.js +1 -1
  17. package/lib/components/DataGridCell/useDataGridCell.js.map +1 -1
  18. package/lib/components/DataGridHeader/DataGridHeader.js.map +1 -1
  19. package/lib/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
  20. package/lib/components/DataGridHeader/useDataGridHeader.js.map +1 -1
  21. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
  22. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
  23. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js +3 -3
  24. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  25. package/lib/components/DataGridRow/DataGridRow.js.map +1 -1
  26. package/lib/components/DataGridRow/renderDataGridRow.js +10 -5
  27. package/lib/components/DataGridRow/renderDataGridRow.js.map +1 -1
  28. package/lib/components/DataGridRow/useDataGridRow.js +4 -4
  29. package/lib/components/DataGridRow/useDataGridRow.js.map +1 -1
  30. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
  31. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
  32. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js +2 -2
  33. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
  34. package/lib/components/Table/Table.js.map +1 -1
  35. package/lib/components/Table/renderTable.js +5 -4
  36. package/lib/components/Table/renderTable.js.map +1 -1
  37. package/lib/components/Table/useTable.js.map +1 -1
  38. package/lib/components/Table/useTableContextValues.js +1 -1
  39. package/lib/components/Table/useTableContextValues.js.map +1 -1
  40. package/lib/components/TableBody/TableBody.js.map +1 -1
  41. package/lib/components/TableBody/renderTableBody.js +2 -2
  42. package/lib/components/TableBody/renderTableBody.js.map +1 -1
  43. package/lib/components/TableBody/useTableBody.js +1 -1
  44. package/lib/components/TableBody/useTableBody.js.map +1 -1
  45. package/lib/components/TableCell/TableCell.js.map +1 -1
  46. package/lib/components/TableCell/renderTableCell.js +2 -2
  47. package/lib/components/TableCell/renderTableCell.js.map +1 -1
  48. package/lib/components/TableCell/useTableCell.js +1 -1
  49. package/lib/components/TableCell/useTableCell.js.map +1 -1
  50. package/lib/components/TableCellActions/TableCellActions.js.map +1 -1
  51. package/lib/components/TableCellActions/renderTableCellActions.js +2 -2
  52. package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -1
  53. package/lib/components/TableCellActions/useTableCellActions.js.map +1 -1
  54. package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -1
  55. package/lib/components/TableCellLayout/renderTableCellLayout.js +17 -4
  56. package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  57. package/lib/components/TableCellLayout/useTableCellLayout.js +1 -1
  58. package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  59. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js +1 -1
  60. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
  61. package/lib/components/TableCellLayout/useTableCellLayoutStyles.styles.js.map +1 -1
  62. package/lib/components/TableHeader/TableHeader.js.map +1 -1
  63. package/lib/components/TableHeader/renderTableHeader.js +5 -4
  64. package/lib/components/TableHeader/renderTableHeader.js.map +1 -1
  65. package/lib/components/TableHeader/useTableHeader.js +1 -1
  66. package/lib/components/TableHeader/useTableHeader.js.map +1 -1
  67. package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  68. package/lib/components/TableHeaderCell/renderTableHeaderCell.js +12 -2
  69. package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  70. package/lib/components/TableHeaderCell/useTableHeaderCell.js +1 -1
  71. package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  72. package/lib/components/TableResizeHandle/TableResizeHandle.js.map +1 -1
  73. package/lib/components/TableResizeHandle/renderTableResizeHandle.js +2 -2
  74. package/lib/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -1
  75. package/lib/components/TableResizeHandle/useTableResizeHandle.js +2 -2
  76. package/lib/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
  77. package/lib/components/TableRow/TableRow.js.map +1 -1
  78. package/lib/components/TableRow/renderTableRow.js +2 -2
  79. package/lib/components/TableRow/renderTableRow.js.map +1 -1
  80. package/lib/components/TableRow/useTableRow.js +1 -1
  81. package/lib/components/TableRow/useTableRow.js.map +1 -1
  82. package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  83. package/lib/components/TableSelectionCell/renderTableSelectionCell.js +7 -2
  84. package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  85. package/lib/components/TableSelectionCell/useTableSelectionCell.js +2 -2
  86. package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  87. package/lib/contexts/columnIdContext.js.map +1 -1
  88. package/lib/contexts/dataGridContext.js.map +1 -1
  89. package/lib/contexts/rowIdContext.js.map +1 -1
  90. package/lib/contexts/tableContext.js.map +1 -1
  91. package/lib/hooks/createColumn.js +1 -1
  92. package/lib/hooks/createColumn.js.map +1 -1
  93. package/lib/hooks/useKeyboardResizing.js +6 -6
  94. package/lib/hooks/useKeyboardResizing.js.map +1 -1
  95. package/lib/hooks/useMeasureElement.js +3 -2
  96. package/lib/hooks/useMeasureElement.js.map +1 -1
  97. package/lib/hooks/useTableColumnResizeMouseHandler.js +20 -16
  98. package/lib/hooks/useTableColumnResizeMouseHandler.js.map +1 -1
  99. package/lib/hooks/useTableColumnResizeState.js +5 -5
  100. package/lib/hooks/useTableColumnResizeState.js.map +1 -1
  101. package/lib/hooks/useTableColumnSizing.js +7 -6
  102. package/lib/hooks/useTableColumnSizing.js.map +1 -1
  103. package/lib/hooks/useTableCompositeNavigation.js +2 -2
  104. package/lib/hooks/useTableCompositeNavigation.js.map +1 -1
  105. package/lib/hooks/useTableFeatures.js +4 -5
  106. package/lib/hooks/useTableFeatures.js.map +1 -1
  107. package/lib/hooks/useTableSelection.js +6 -4
  108. package/lib/hooks/useTableSelection.js.map +1 -1
  109. package/lib/hooks/useTableSort.js +9 -6
  110. package/lib/hooks/useTableSort.js.map +1 -1
  111. package/lib/utils/columnResizeUtils.js +6 -4
  112. package/lib/utils/columnResizeUtils.js.map +1 -1
  113. package/lib-commonjs/DataGrid.js +2 -2
  114. package/lib-commonjs/DataGrid.js.map +1 -1
  115. package/lib-commonjs/DataGridBody.js +2 -2
  116. package/lib-commonjs/DataGridBody.js.map +1 -1
  117. package/lib-commonjs/DataGridCell.js +2 -2
  118. package/lib-commonjs/DataGridCell.js.map +1 -1
  119. package/lib-commonjs/DataGridHeader.js +2 -2
  120. package/lib-commonjs/DataGridHeader.js.map +1 -1
  121. package/lib-commonjs/DataGridHeaderCell.js +2 -2
  122. package/lib-commonjs/DataGridHeaderCell.js.map +1 -1
  123. package/lib-commonjs/DataGridRow.js +2 -2
  124. package/lib-commonjs/DataGridRow.js.map +1 -1
  125. package/lib-commonjs/DataGridSelectionCell.js +2 -2
  126. package/lib-commonjs/DataGridSelectionCell.js.map +1 -1
  127. package/lib-commonjs/Table.js +2 -2
  128. package/lib-commonjs/Table.js.map +1 -1
  129. package/lib-commonjs/TableBody.js +2 -2
  130. package/lib-commonjs/TableBody.js.map +1 -1
  131. package/lib-commonjs/TableCell.js +2 -2
  132. package/lib-commonjs/TableCell.js.map +1 -1
  133. package/lib-commonjs/TableCellActions.js +2 -2
  134. package/lib-commonjs/TableCellActions.js.map +1 -1
  135. package/lib-commonjs/TableCellLayout.js +2 -2
  136. package/lib-commonjs/TableCellLayout.js.map +1 -1
  137. package/lib-commonjs/TableCellPrimaryLayout.js +2 -2
  138. package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -1
  139. package/lib-commonjs/TableHeader.js +2 -2
  140. package/lib-commonjs/TableHeader.js.map +1 -1
  141. package/lib-commonjs/TableHeaderCell.js +2 -2
  142. package/lib-commonjs/TableHeaderCell.js.map +1 -1
  143. package/lib-commonjs/TableResizeHandle.js +2 -2
  144. package/lib-commonjs/TableResizeHandle.js.map +1 -1
  145. package/lib-commonjs/TableRow.js +2 -2
  146. package/lib-commonjs/TableRow.js.map +1 -1
  147. package/lib-commonjs/TableSelectionCell.js +2 -2
  148. package/lib-commonjs/TableSelectionCell.js.map +1 -1
  149. package/lib-commonjs/components/DataGrid/DataGrid.js +9 -7
  150. package/lib-commonjs/components/DataGrid/DataGrid.js.map +1 -1
  151. package/lib-commonjs/components/DataGrid/DataGrid.types.js +2 -2
  152. package/lib-commonjs/components/DataGrid/DataGrid.types.js.map +1 -1
  153. package/lib-commonjs/components/DataGrid/index.js +7 -7
  154. package/lib-commonjs/components/DataGrid/index.js.map +1 -1
  155. package/lib-commonjs/components/DataGrid/renderDataGrid.js +5 -3
  156. package/lib-commonjs/components/DataGrid/renderDataGrid.js.map +1 -1
  157. package/lib-commonjs/components/DataGrid/useDataGrid.js +20 -18
  158. package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -1
  159. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js +4 -2
  160. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -1
  161. package/lib-commonjs/components/DataGrid/useDataGridStyles.styles.js +8 -4
  162. package/lib-commonjs/components/DataGrid/useDataGridStyles.styles.js.map +1 -1
  163. package/lib-commonjs/components/DataGridBody/DataGridBody.js +9 -7
  164. package/lib-commonjs/components/DataGridBody/DataGridBody.js.map +1 -1
  165. package/lib-commonjs/components/DataGridBody/DataGridBody.types.js +2 -2
  166. package/lib-commonjs/components/DataGridBody/DataGridBody.types.js.map +1 -1
  167. package/lib-commonjs/components/DataGridBody/index.js +6 -6
  168. package/lib-commonjs/components/DataGridBody/index.js.map +1 -1
  169. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js +13 -9
  170. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js.map +1 -1
  171. package/lib-commonjs/components/DataGridBody/useDataGridBody.js +6 -4
  172. package/lib-commonjs/components/DataGridBody/useDataGridBody.js.map +1 -1
  173. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.styles.js +8 -4
  174. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.styles.js.map +1 -1
  175. package/lib-commonjs/components/DataGridCell/DataGridCell.js +9 -7
  176. package/lib-commonjs/components/DataGridCell/DataGridCell.js.map +1 -1
  177. package/lib-commonjs/components/DataGridCell/index.js +6 -6
  178. package/lib-commonjs/components/DataGridCell/index.js.map +1 -1
  179. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js +3 -1
  180. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js.map +1 -1
  181. package/lib-commonjs/components/DataGridCell/useDataGridCell.js +8 -6
  182. package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -1
  183. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.styles.js +8 -4
  184. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.styles.js.map +1 -1
  185. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js +9 -7
  186. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js.map +1 -1
  187. package/lib-commonjs/components/DataGridHeader/index.js +6 -6
  188. package/lib-commonjs/components/DataGridHeader/index.js.map +1 -1
  189. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js +3 -1
  190. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
  191. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js +5 -3
  192. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js.map +1 -1
  193. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.styles.js +8 -4
  194. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.styles.js.map +1 -1
  195. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js +9 -7
  196. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
  197. package/lib-commonjs/components/DataGridHeaderCell/index.js +6 -6
  198. package/lib-commonjs/components/DataGridHeaderCell/index.js.map +1 -1
  199. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js +3 -1
  200. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
  201. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js +10 -8
  202. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  203. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js +8 -4
  204. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js.map +1 -1
  205. package/lib-commonjs/components/DataGridRow/DataGridRow.js +9 -7
  206. package/lib-commonjs/components/DataGridRow/DataGridRow.js.map +1 -1
  207. package/lib-commonjs/components/DataGridRow/DataGridRow.types.js +2 -2
  208. package/lib-commonjs/components/DataGridRow/DataGridRow.types.js.map +1 -1
  209. package/lib-commonjs/components/DataGridRow/index.js +6 -6
  210. package/lib-commonjs/components/DataGridRow/index.js.map +1 -1
  211. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js +16 -9
  212. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js.map +1 -1
  213. package/lib-commonjs/components/DataGridRow/useDataGridRow.js +18 -16
  214. package/lib-commonjs/components/DataGridRow/useDataGridRow.js.map +1 -1
  215. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.styles.js +8 -4
  216. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.styles.js.map +1 -1
  217. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js +9 -7
  218. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
  219. package/lib-commonjs/components/DataGridSelectionCell/index.js +6 -6
  220. package/lib-commonjs/components/DataGridSelectionCell/index.js.map +1 -1
  221. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js +3 -1
  222. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
  223. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js +9 -7
  224. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
  225. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js +8 -4
  226. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js.map +1 -1
  227. package/lib-commonjs/components/Table/Table.js +9 -7
  228. package/lib-commonjs/components/Table/Table.js.map +1 -1
  229. package/lib-commonjs/components/Table/index.js +6 -6
  230. package/lib-commonjs/components/Table/index.js.map +1 -1
  231. package/lib-commonjs/components/Table/renderTable.js +11 -8
  232. package/lib-commonjs/components/Table/renderTable.js.map +1 -1
  233. package/lib-commonjs/components/Table/useTable.js +7 -5
  234. package/lib-commonjs/components/Table/useTable.js.map +1 -1
  235. package/lib-commonjs/components/Table/useTableContextValues.js +6 -4
  236. package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
  237. package/lib-commonjs/components/Table/useTableStyles.styles.js +12 -6
  238. package/lib-commonjs/components/Table/useTableStyles.styles.js.map +1 -1
  239. package/lib-commonjs/components/TableBody/TableBody.js +9 -7
  240. package/lib-commonjs/components/TableBody/TableBody.js.map +1 -1
  241. package/lib-commonjs/components/TableBody/index.js +6 -6
  242. package/lib-commonjs/components/TableBody/index.js.map +1 -1
  243. package/lib-commonjs/components/TableBody/renderTableBody.js +8 -6
  244. package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -1
  245. package/lib-commonjs/components/TableBody/useTableBody.js +8 -6
  246. package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
  247. package/lib-commonjs/components/TableBody/useTableBodyStyles.styles.js +11 -5
  248. package/lib-commonjs/components/TableBody/useTableBodyStyles.styles.js.map +1 -1
  249. package/lib-commonjs/components/TableCell/TableCell.js +9 -7
  250. package/lib-commonjs/components/TableCell/TableCell.js.map +1 -1
  251. package/lib-commonjs/components/TableCell/index.js +6 -6
  252. package/lib-commonjs/components/TableCell/index.js.map +1 -1
  253. package/lib-commonjs/components/TableCell/renderTableCell.js +8 -6
  254. package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
  255. package/lib-commonjs/components/TableCell/useTableCell.js +8 -6
  256. package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
  257. package/lib-commonjs/components/TableCell/useTableCellStyles.styles.js +12 -6
  258. package/lib-commonjs/components/TableCell/useTableCellStyles.styles.js.map +1 -1
  259. package/lib-commonjs/components/TableCellActions/TableCellActions.js +9 -7
  260. package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -1
  261. package/lib-commonjs/components/TableCellActions/index.js +6 -6
  262. package/lib-commonjs/components/TableCellActions/index.js.map +1 -1
  263. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js +8 -6
  264. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -1
  265. package/lib-commonjs/components/TableCellActions/useTableCellActions.js +7 -5
  266. package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -1
  267. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.styles.js +7 -3
  268. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.styles.js.map +1 -1
  269. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +9 -7
  270. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -1
  271. package/lib-commonjs/components/TableCellLayout/index.js +6 -6
  272. package/lib-commonjs/components/TableCellLayout/index.js.map +1 -1
  273. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js +24 -9
  274. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  275. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +12 -10
  276. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  277. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js +6 -4
  278. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
  279. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.styles.js +8 -4
  280. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.styles.js.map +1 -1
  281. package/lib-commonjs/components/TableHeader/TableHeader.js +9 -7
  282. package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -1
  283. package/lib-commonjs/components/TableHeader/index.js +6 -6
  284. package/lib-commonjs/components/TableHeader/index.js.map +1 -1
  285. package/lib-commonjs/components/TableHeader/renderTableHeader.js +11 -8
  286. package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -1
  287. package/lib-commonjs/components/TableHeader/useTableHeader.js +8 -6
  288. package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
  289. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.styles.js +11 -5
  290. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.styles.js.map +1 -1
  291. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js +9 -7
  292. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  293. package/lib-commonjs/components/TableHeaderCell/index.js +6 -6
  294. package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -1
  295. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js +18 -6
  296. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  297. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +17 -15
  298. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  299. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.styles.js +12 -6
  300. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.styles.js.map +1 -1
  301. package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.js +9 -7
  302. package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.js.map +1 -1
  303. package/lib-commonjs/components/TableResizeHandle/index.js +6 -6
  304. package/lib-commonjs/components/TableResizeHandle/index.js.map +1 -1
  305. package/lib-commonjs/components/TableResizeHandle/renderTableResizeHandle.js +8 -6
  306. package/lib-commonjs/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -1
  307. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js +10 -8
  308. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
  309. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.styles.js +7 -3
  310. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.styles.js.map +1 -1
  311. package/lib-commonjs/components/TableRow/TableRow.js +9 -7
  312. package/lib-commonjs/components/TableRow/TableRow.js.map +1 -1
  313. package/lib-commonjs/components/TableRow/index.js +6 -6
  314. package/lib-commonjs/components/TableRow/index.js.map +1 -1
  315. package/lib-commonjs/components/TableRow/renderTableRow.js +8 -6
  316. package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -1
  317. package/lib-commonjs/components/TableRow/useTableRow.js +12 -10
  318. package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
  319. package/lib-commonjs/components/TableRow/useTableRowStyles.styles.js +12 -6
  320. package/lib-commonjs/components/TableRow/useTableRowStyles.styles.js.map +1 -1
  321. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js +9 -7
  322. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  323. package/lib-commonjs/components/TableSelectionCell/index.js +6 -6
  324. package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -1
  325. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js +13 -6
  326. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  327. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +17 -15
  328. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  329. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.styles.js +12 -6
  330. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.styles.js.map +1 -1
  331. package/lib-commonjs/contexts/columnIdContext.js +11 -5
  332. package/lib-commonjs/contexts/columnIdContext.js.map +1 -1
  333. package/lib-commonjs/contexts/dataGridContext.js +9 -5
  334. package/lib-commonjs/contexts/dataGridContext.js.map +1 -1
  335. package/lib-commonjs/contexts/rowIdContext.js +11 -5
  336. package/lib-commonjs/contexts/rowIdContext.js.map +1 -1
  337. package/lib-commonjs/contexts/tableContext.js +11 -5
  338. package/lib-commonjs/contexts/tableContext.js.map +1 -1
  339. package/lib-commonjs/contexts/tableHeaderContext.js +8 -4
  340. package/lib-commonjs/contexts/tableHeaderContext.js.map +1 -1
  341. package/lib-commonjs/hooks/createColumn.js +4 -2
  342. package/lib-commonjs/hooks/createColumn.js.map +1 -1
  343. package/lib-commonjs/hooks/index.js +8 -8
  344. package/lib-commonjs/hooks/index.js.map +1 -1
  345. package/lib-commonjs/hooks/types.js +2 -2
  346. package/lib-commonjs/hooks/types.js.map +1 -1
  347. package/lib-commonjs/hooks/useKeyboardResizing.js +22 -20
  348. package/lib-commonjs/hooks/useKeyboardResizing.js.map +1 -1
  349. package/lib-commonjs/hooks/useMeasureElement.js +11 -8
  350. package/lib-commonjs/hooks/useMeasureElement.js.map +1 -1
  351. package/lib-commonjs/hooks/useTableColumnResizeMouseHandler.js +32 -26
  352. package/lib-commonjs/hooks/useTableColumnResizeMouseHandler.js.map +1 -1
  353. package/lib-commonjs/hooks/useTableColumnResizeState.js +15 -13
  354. package/lib-commonjs/hooks/useTableColumnResizeState.js.map +1 -1
  355. package/lib-commonjs/hooks/useTableColumnSizing.js +17 -12
  356. package/lib-commonjs/hooks/useTableColumnSizing.js.map +1 -1
  357. package/lib-commonjs/hooks/useTableCompositeNavigation.js +20 -18
  358. package/lib-commonjs/hooks/useTableCompositeNavigation.js.map +1 -1
  359. package/lib-commonjs/hooks/useTableFeatures.js +12 -9
  360. package/lib-commonjs/hooks/useTableFeatures.js.map +1 -1
  361. package/lib-commonjs/hooks/useTableSelection.js +24 -16
  362. package/lib-commonjs/hooks/useTableSelection.js.map +1 -1
  363. package/lib-commonjs/hooks/useTableSort.js +22 -13
  364. package/lib-commonjs/hooks/useTableSort.js.map +1 -1
  365. package/lib-commonjs/index.js +344 -126
  366. package/lib-commonjs/index.js.map +1 -1
  367. package/lib-commonjs/utils/columnResizeUtils.js +30 -12
  368. package/lib-commonjs/utils/columnResizeUtils.js.map +1 -1
  369. package/package.json +17 -17
@@ -1,8 +1,8 @@
1
- /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
1
+ /** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
2
  import { assertSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Render the final JSX of TableResizeHandle
5
5
  */ export const renderTableResizeHandle_unstable = (state)=>{
6
6
  assertSlots(state);
7
- return /*#__PURE__*/ createElement(state.root, null);
7
+ return /*#__PURE__*/ _jsx(state.root, {});
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderTableResizeHandle.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TableResizeHandleState, TableResizeHandleSlots } from './TableResizeHandle.types';\n\n/**\n * Render the final JSX of TableResizeHandle\n */\nexport const renderTableResizeHandle_unstable = (state: TableResizeHandleState) => {\n assertSlots<TableResizeHandleSlots>(state);\n return <state.root />;\n};\n"],"names":["createElement","assertSlots","renderTableResizeHandle_unstable","state","root"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAACC,QAAkC;IACjFF,YAAoCE;IACpC,qBAAO,AAXT,cAWUA,MAAMC,IAAI;AACpB,EAAE"}
1
+ {"version":3,"sources":["renderTableResizeHandle.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TableResizeHandleState, TableResizeHandleSlots } from './TableResizeHandle.types';\n\n/**\n * Render the final JSX of TableResizeHandle\n */\nexport const renderTableResizeHandle_unstable = (state: TableResizeHandleState) => {\n assertSlots<TableResizeHandleSlots>(state);\n return <state.root />;\n};\n"],"names":["assertSlots","renderTableResizeHandle_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAACC;IAC/CF,YAAoCE;IACpC,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
@@ -10,8 +10,8 @@ import { getNativeElementProps, useEventCallback, slot } from '@fluentui/react-u
10
10
  * @param ref - reference to root HTMLElement of TableResizeHandle
11
11
  */ export const useTableResizeHandle_unstable = (props, ref)=>{
12
12
  const onClick = useEventCallback((event)=>{
13
- var _props_onClick;
14
- (_props_onClick = props.onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(props, event);
13
+ var _props_onClick, _props;
14
+ (_props_onClick = (_props = props).onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(_props, event);
15
15
  event.stopPropagation();
16
16
  });
17
17
  return {
@@ -1 +1 @@
1
- {"version":3,"sources":["useTableResizeHandle.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useEventCallback, slot } from '@fluentui/react-utilities';\nimport type { TableResizeHandleProps, TableResizeHandleState } from './TableResizeHandle.types';\n\n/**\n * Create the state required to render TableResizeHandle.\n *\n * The returned state can be modified with hooks such as useTableResizeHandleStyles_unstable,\n * before being passed to renderTableResizeHandle_unstable.\n *\n * @param props - props from this instance of TableResizeHandle\n * @param ref - reference to root HTMLElement of TableResizeHandle\n */\nexport const useTableResizeHandle_unstable = (\n props: TableResizeHandleProps,\n ref: React.Ref<HTMLElement>,\n): TableResizeHandleState => {\n const onClick = useEventCallback((event: React.MouseEvent<HTMLDivElement>) => {\n props.onClick?.(event);\n event.stopPropagation();\n });\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getNativeElementProps('div', {\n ref,\n ...props,\n onClick,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["React","getNativeElementProps","useEventCallback","slot","useTableResizeHandle_unstable","props","ref","onClick","event","stopPropagation","components","root","always","elementType"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,4BAA4B;AAG1F;;;;;;;;CAQC,GACD,OAAO,MAAMC,gCAAgC,CAC3CC,OACAC,MAC2B;IAC3B,MAAMC,UAAUL,iBAAiB,CAACM,QAA4C;YAC5EH;QAAAA,CAAAA,iBAAAA,MAAME,OAAO,cAAbF,4BAAAA,KAAAA,IAAAA,eAAAA,KAAAA,OAAgBG;QAChBA,MAAMC,eAAe;IACvB;IACA,OAAO;QACLC,YAAY;YACVC,MAAM;QACR;QACAA,MAAMR,KAAKS,MAAM,CACfX,sBAAsB,OAAO;YAC3BK;YACA,GAAGD,KAAK;YACRE;QACF,IACA;YAAEM,aAAa;QAAM;IAEzB;AACF,EAAE"}
1
+ {"version":3,"sources":["useTableResizeHandle.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useEventCallback, slot } from '@fluentui/react-utilities';\nimport type { TableResizeHandleProps, TableResizeHandleState } from './TableResizeHandle.types';\n\n/**\n * Create the state required to render TableResizeHandle.\n *\n * The returned state can be modified with hooks such as useTableResizeHandleStyles_unstable,\n * before being passed to renderTableResizeHandle_unstable.\n *\n * @param props - props from this instance of TableResizeHandle\n * @param ref - reference to root HTMLElement of TableResizeHandle\n */\nexport const useTableResizeHandle_unstable = (\n props: TableResizeHandleProps,\n ref: React.Ref<HTMLElement>,\n): TableResizeHandleState => {\n const onClick = useEventCallback((event: React.MouseEvent<HTMLDivElement>) => {\n props.onClick?.(event);\n event.stopPropagation();\n });\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getNativeElementProps('div', {\n ref,\n ...props,\n onClick,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["React","getNativeElementProps","useEventCallback","slot","useTableResizeHandle_unstable","props","ref","onClick","event","stopPropagation","components","root","always","elementType"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,4BAA4B;AAG1F;;;;;;;;CAQC,GACD,OAAO,MAAMC,gCAAgC,CAC3CC,OACAC;IAEA,MAAMC,UAAUL,iBAAiB,CAACM;YAChCH,gBAAAA;SAAAA,iBAAAA,CAAAA,SAAAA,OAAME,OAAO,cAAbF,qCAAAA,oBAAAA,QAAgBG;QAChBA,MAAMC,eAAe;IACvB;IACA,OAAO;QACLC,YAAY;YACVC,MAAM;QACR;QACAA,MAAMR,KAAKS,MAAM,CACfX,sBAAsB,OAAO;YAC3BK;YACA,GAAGD,KAAK;YACRE;QACF,IACA;YAAEM,aAAa;QAAM;IAEzB;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["TableRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableRow_unstable } from './useTableRow';\nimport { renderTableRow_unstable } from './renderTableRow';\nimport { useTableRowStyles_unstable } from './useTableRowStyles.styles';\nimport type { TableRowProps } from './TableRow.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TableRow component\n */\nexport const TableRow: ForwardRefComponent<TableRowProps> = React.forwardRef((props, ref) => {\n const state = useTableRow_unstable(props, ref);\n\n useTableRowStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTableRowStyles_unstable')(state);\n\n return renderTableRow_unstable(state);\n});\n\nTableRow.displayName = 'TableRow';\n"],"names":["React","useTableRow_unstable","renderTableRow_unstable","useTableRowStyles_unstable","useCustomStyleHook_unstable","TableRow","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,6BAA6B;AAGxE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,yBAA+CL,MAAMM,UAAU,CAAC,CAACC,OAAOC,MAAQ;IAC3F,MAAMC,QAAQR,qBAAqBM,OAAOC;IAE1CL,2BAA2BM;IAE3BL,4BAA4B,8BAA8BK;IAE1D,OAAOP,wBAAwBO;AACjC,GAAG;AAEHJ,SAASK,WAAW,GAAG"}
1
+ {"version":3,"sources":["TableRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableRow_unstable } from './useTableRow';\nimport { renderTableRow_unstable } from './renderTableRow';\nimport { useTableRowStyles_unstable } from './useTableRowStyles.styles';\nimport type { TableRowProps } from './TableRow.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TableRow component\n */\nexport const TableRow: ForwardRefComponent<TableRowProps> = React.forwardRef((props, ref) => {\n const state = useTableRow_unstable(props, ref);\n\n useTableRowStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTableRowStyles_unstable')(state);\n\n return renderTableRow_unstable(state);\n});\n\nTableRow.displayName = 'TableRow';\n"],"names":["React","useTableRow_unstable","renderTableRow_unstable","useTableRowStyles_unstable","useCustomStyleHook_unstable","TableRow","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,6BAA6B;AAGxE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,yBAA+CL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,QAAQR,qBAAqBM,OAAOC;IAE1CL,2BAA2BM;IAE3BL,4BAA4B,8BAA8BK;IAE1D,OAAOP,wBAAwBO;AACjC,GAAG;AAEHJ,SAASK,WAAW,GAAG"}
@@ -1,8 +1,8 @@
1
- /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
1
+ /** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
2
  import { assertSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Render the final JSX of TableRow
5
5
  */ export const renderTableRow_unstable = (state)=>{
6
6
  assertSlots(state);
7
- return /*#__PURE__*/ createElement(state.root, null);
7
+ return /*#__PURE__*/ _jsx(state.root, {});
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderTableRow.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TableRowState, TableRowSlots } from './TableRow.types';\n\n/**\n * Render the final JSX of TableRow\n */\nexport const renderTableRow_unstable = (state: TableRowState) => {\n assertSlots<TableRowSlots>(state);\n\n return <state.root />;\n};\n"],"names":["createElement","assertSlots","renderTableRow_unstable","state","root"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,0BAA0B,CAACC,QAAyB;IAC/DF,YAA2BE;IAE3B,qBAAO,AAZT,cAYUA,MAAMC,IAAI;AACpB,EAAE"}
1
+ {"version":3,"sources":["renderTableRow.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TableRowState, TableRowSlots } from './TableRow.types';\n\n/**\n * Render the final JSX of TableRow\n */\nexport const renderTableRow_unstable = (state: TableRowState) => {\n assertSlots<TableRowSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderTableRow_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,0BAA0B,CAACC;IACtCF,YAA2BE;IAE3B,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
@@ -12,7 +12,7 @@ import { useIsInTableHeader } from '../../contexts/tableHeaderContext';
12
12
  * @param props - props from this instance of TableRow
13
13
  * @param ref - reference to root HTMLElement of TableRow
14
14
  */ export const useTableRow_unstable = (props, ref)=>{
15
- const { noNativeElements , size } = useTableContext();
15
+ const { noNativeElements, size } = useTableContext();
16
16
  var _props_as;
17
17
  const rootComponent = ((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : noNativeElements) ? 'div' : 'tr';
18
18
  const focusVisibleRef = useFocusVisible();
@@ -1 +1 @@
1
- {"version":3,"sources":["useTableRow.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useFocusVisible, useFocusWithin } from '@fluentui/react-tabster';\nimport type { TableRowProps, TableRowState } from './TableRow.types';\nimport { useTableContext } from '../../contexts/tableContext';\nimport { useIsInTableHeader } from '../../contexts/tableHeaderContext';\n\n/**\n * Create the state required to render TableRow.\n *\n * The returned state can be modified with hooks such as useTableRowStyles_unstable,\n * before being passed to renderTableRow_unstable.\n *\n * @param props - props from this instance of TableRow\n * @param ref - reference to root HTMLElement of TableRow\n */\nexport const useTableRow_unstable = (props: TableRowProps, ref: React.Ref<HTMLElement>): TableRowState => {\n const { noNativeElements, size } = useTableContext();\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'tr';\n const focusVisibleRef = useFocusVisible();\n const focusWithinRef = useFocusWithin();\n const isHeaderRow = useIsInTableHeader();\n\n return {\n components: {\n root: rootComponent,\n },\n root: slot.always(\n getNativeElementProps(rootComponent, {\n ref: useMergedRefs(ref, focusVisibleRef, focusWithinRef),\n role: rootComponent === 'div' ? 'row' : undefined,\n ...props,\n }),\n { elementType: rootComponent },\n ),\n size,\n noNativeElements,\n appearance: props.appearance ?? 'none',\n isHeaderRow,\n };\n};\n"],"names":["React","getNativeElementProps","useMergedRefs","slot","useFocusVisible","useFocusWithin","useTableContext","useIsInTableHeader","useTableRow_unstable","props","ref","noNativeElements","size","rootComponent","as","focusVisibleRef","focusWithinRef","isHeaderRow","components","root","always","role","undefined","elementType","appearance"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,aAAa,EAAEC,IAAI,QAAQ,4BAA4B;AACvF,SAASC,eAAe,EAAEC,cAAc,QAAQ,0BAA0B;AAE1E,SAASC,eAAe,QAAQ,8BAA8B;AAC9D,SAASC,kBAAkB,QAAQ,oCAAoC;AAEvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,uBAAuB,CAACC,OAAsBC,MAA+C;IACxG,MAAM,EAAEC,iBAAgB,EAAEC,KAAI,EAAE,GAAGN;QACbG;IAAtB,MAAMI,gBAAgBJ,CAAAA,CAAAA,YAAAA,MAAMK,EAAE,cAARL,uBAAAA,YAAYE,gBAAgB,AAAD,IAAI,QAAQ,IAAI;IACjE,MAAMI,kBAAkBX;IACxB,MAAMY,iBAAiBX;IACvB,MAAMY,cAAcV;QAgBNE;IAdd,OAAO;QACLS,YAAY;YACVC,MAAMN;QACR;QACAM,MAAMhB,KAAKiB,MAAM,CACfnB,sBAAsBY,eAAe;YACnCH,KAAKR,cAAcQ,KAAKK,iBAAiBC;YACzCK,MAAMR,kBAAkB,QAAQ,QAAQS,SAAS;YACjD,GAAGb,KAAK;QACV,IACA;YAAEc,aAAaV;QAAc;QAE/BD;QACAD;QACAa,YAAYf,CAAAA,oBAAAA,MAAMe,UAAU,cAAhBf,+BAAAA,oBAAoB,MAAM;QACtCQ;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["useTableRow.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useFocusVisible, useFocusWithin } from '@fluentui/react-tabster';\nimport type { TableRowProps, TableRowState } from './TableRow.types';\nimport { useTableContext } from '../../contexts/tableContext';\nimport { useIsInTableHeader } from '../../contexts/tableHeaderContext';\n\n/**\n * Create the state required to render TableRow.\n *\n * The returned state can be modified with hooks such as useTableRowStyles_unstable,\n * before being passed to renderTableRow_unstable.\n *\n * @param props - props from this instance of TableRow\n * @param ref - reference to root HTMLElement of TableRow\n */\nexport const useTableRow_unstable = (props: TableRowProps, ref: React.Ref<HTMLElement>): TableRowState => {\n const { noNativeElements, size } = useTableContext();\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'tr';\n const focusVisibleRef = useFocusVisible();\n const focusWithinRef = useFocusWithin();\n const isHeaderRow = useIsInTableHeader();\n\n return {\n components: {\n root: rootComponent,\n },\n root: slot.always(\n getNativeElementProps(rootComponent, {\n ref: useMergedRefs(ref, focusVisibleRef, focusWithinRef),\n role: rootComponent === 'div' ? 'row' : undefined,\n ...props,\n }),\n { elementType: rootComponent },\n ),\n size,\n noNativeElements,\n appearance: props.appearance ?? 'none',\n isHeaderRow,\n };\n};\n"],"names":["React","getNativeElementProps","useMergedRefs","slot","useFocusVisible","useFocusWithin","useTableContext","useIsInTableHeader","useTableRow_unstable","props","ref","noNativeElements","size","rootComponent","as","focusVisibleRef","focusWithinRef","isHeaderRow","components","root","always","role","undefined","elementType","appearance"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,aAAa,EAAEC,IAAI,QAAQ,4BAA4B;AACvF,SAASC,eAAe,EAAEC,cAAc,QAAQ,0BAA0B;AAE1E,SAASC,eAAe,QAAQ,8BAA8B;AAC9D,SAASC,kBAAkB,QAAQ,oCAAoC;AAEvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,uBAAuB,CAACC,OAAsBC;IACzD,MAAM,EAAEC,gBAAgB,EAAEC,IAAI,EAAE,GAAGN;QACbG;IAAtB,MAAMI,gBAAgBJ,CAAAA,CAAAA,YAAAA,MAAMK,EAAE,cAARL,uBAAAA,YAAYE,gBAAe,IAAI,QAAQ;IAC7D,MAAMI,kBAAkBX;IACxB,MAAMY,iBAAiBX;IACvB,MAAMY,cAAcV;QAgBNE;IAdd,OAAO;QACLS,YAAY;YACVC,MAAMN;QACR;QACAM,MAAMhB,KAAKiB,MAAM,CACfnB,sBAAsBY,eAAe;YACnCH,KAAKR,cAAcQ,KAAKK,iBAAiBC;YACzCK,MAAMR,kBAAkB,QAAQ,QAAQS;YACxC,GAAGb,KAAK;QACV,IACA;YAAEc,aAAaV;QAAc;QAE/BD;QACAD;QACAa,YAAYf,CAAAA,oBAAAA,MAAMe,UAAU,cAAhBf,+BAAAA,oBAAoB;QAChCQ;IACF;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["TableSelectionCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableSelectionCell_unstable } from './useTableSelectionCell';\nimport { renderTableSelectionCell_unstable } from './renderTableSelectionCell';\nimport { useTableSelectionCellStyles_unstable } from './useTableSelectionCellStyles.styles';\nimport type { TableSelectionCellProps } from './TableSelectionCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TableSelectionCell component\n */\nexport const TableSelectionCell: ForwardRefComponent<TableSelectionCellProps> = React.forwardRef((props, ref) => {\n const state = useTableSelectionCell_unstable(props, ref);\n\n useTableSelectionCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTableSelectionCellStyles_unstable')(state);\n\n return renderTableSelectionCell_unstable(state);\n});\n\nTableSelectionCell.displayName = 'TableSelectionCell';\n"],"names":["React","useTableSelectionCell_unstable","renderTableSelectionCell_unstable","useTableSelectionCellStyles_unstable","useCustomStyleHook_unstable","TableSelectionCell","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,8BAA8B,QAAQ,0BAA0B;AACzE,SAASC,iCAAiC,QAAQ,6BAA6B;AAC/E,SAASC,oCAAoC,QAAQ,uCAAuC;AAG5F,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,mCAAmEL,MAAMM,UAAU,CAAC,CAACC,OAAOC,MAAQ;IAC/G,MAAMC,QAAQR,+BAA+BM,OAAOC;IAEpDL,qCAAqCM;IAErCL,4BAA4B,wCAAwCK;IAEpE,OAAOP,kCAAkCO;AAC3C,GAAG;AAEHJ,mBAAmBK,WAAW,GAAG"}
1
+ {"version":3,"sources":["TableSelectionCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableSelectionCell_unstable } from './useTableSelectionCell';\nimport { renderTableSelectionCell_unstable } from './renderTableSelectionCell';\nimport { useTableSelectionCellStyles_unstable } from './useTableSelectionCellStyles.styles';\nimport type { TableSelectionCellProps } from './TableSelectionCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TableSelectionCell component\n */\nexport const TableSelectionCell: ForwardRefComponent<TableSelectionCellProps> = React.forwardRef((props, ref) => {\n const state = useTableSelectionCell_unstable(props, ref);\n\n useTableSelectionCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTableSelectionCellStyles_unstable')(state);\n\n return renderTableSelectionCell_unstable(state);\n});\n\nTableSelectionCell.displayName = 'TableSelectionCell';\n"],"names":["React","useTableSelectionCell_unstable","renderTableSelectionCell_unstable","useTableSelectionCellStyles_unstable","useCustomStyleHook_unstable","TableSelectionCell","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,8BAA8B,QAAQ,0BAA0B;AACzE,SAASC,iCAAiC,QAAQ,6BAA6B;AAC/E,SAASC,oCAAoC,QAAQ,uCAAuC;AAG5F,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,mCAAmEL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACvG,MAAMC,QAAQR,+BAA+BM,OAAOC;IAEpDL,qCAAqCM;IAErCL,4BAA4B,wCAAwCK;IAEpE,OAAOP,kCAAkCO;AAC3C,GAAG;AAEHJ,mBAAmBK,WAAW,GAAG"}
@@ -1,8 +1,13 @@
1
- /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
1
+ /** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
2
  import { assertSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Render the final JSX of TableSelectionCell
5
5
  */ export const renderTableSelectionCell_unstable = (state)=>{
6
6
  assertSlots(state);
7
- return /*#__PURE__*/ createElement(state.root, null, state.type === 'checkbox' && state.checkboxIndicator && /*#__PURE__*/ createElement(state.checkboxIndicator, null), state.type === 'radio' && state.radioIndicator && /*#__PURE__*/ createElement(state.radioIndicator, null));
7
+ return /*#__PURE__*/ _jsxs(state.root, {
8
+ children: [
9
+ state.type === 'checkbox' && state.checkboxIndicator && /*#__PURE__*/ _jsx(state.checkboxIndicator, {}),
10
+ state.type === 'radio' && state.radioIndicator && /*#__PURE__*/ _jsx(state.radioIndicator, {})
11
+ ]
12
+ });
8
13
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderTableSelectionCell.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TableSelectionCellState, TableSelectionCellSlots } from './TableSelectionCell.types';\n\n/**\n * Render the final JSX of TableSelectionCell\n */\nexport const renderTableSelectionCell_unstable = (state: TableSelectionCellState) => {\n assertSlots<TableSelectionCellSlots>(state);\n\n return (\n <state.root>\n {state.type === 'checkbox' && state.checkboxIndicator && <state.checkboxIndicator />}\n\n {state.type === 'radio' && state.radioIndicator && <state.radioIndicator />}\n </state.root>\n );\n};\n"],"names":["createElement","assertSlots","renderTableSelectionCell_unstable","state","root","type","checkboxIndicator","radioIndicator"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,oCAAoC,CAACC,QAAmC;IACnFF,YAAqCE;IAErC,qBACE,AAbJ,cAaKA,MAAMC,IAAI,QACRD,MAAME,IAAI,KAAK,cAAcF,MAAMG,iBAAiB,kBAAI,AAd/D,cAcgEH,MAAMG,iBAAiB,SAEhFH,MAAME,IAAI,KAAK,WAAWF,MAAMI,cAAc,kBAAI,AAhBzD,cAgB0DJ,MAAMI,cAAc;AAG9E,EAAE"}
1
+ {"version":3,"sources":["renderTableSelectionCell.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TableSelectionCellState, TableSelectionCellSlots } from './TableSelectionCell.types';\n\n/**\n * Render the final JSX of TableSelectionCell\n */\nexport const renderTableSelectionCell_unstable = (state: TableSelectionCellState) => {\n assertSlots<TableSelectionCellSlots>(state);\n\n return (\n <state.root>\n {state.type === 'checkbox' && state.checkboxIndicator && <state.checkboxIndicator />}\n\n {state.type === 'radio' && state.radioIndicator && <state.radioIndicator />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderTableSelectionCell_unstable","state","root","type","checkboxIndicator","radioIndicator"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,oCAAoC,CAACC;IAChDF,YAAqCE;IAErC,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,IAAI,KAAK,cAAcF,MAAMG,iBAAiB,kBAAI,KAACH,MAAMG,iBAAiB;YAEhFH,MAAME,IAAI,KAAK,WAAWF,MAAMI,cAAc,kBAAI,KAACJ,MAAMI,cAAc;;;AAG9E,EAAE"}
@@ -14,8 +14,8 @@ import { useTableContext } from '../../contexts/tableContext';
14
14
  * @param ref - reference to root HTMLElement of TableSelectionCell
15
15
  */ export const useTableSelectionCell_unstable = (props, ref)=>{
16
16
  const tableCellState = useTableCell_unstable(props, ref);
17
- const { noNativeElements } = useTableContext();
18
- const { type ='checkbox' , checked =false , subtle =false , hidden =false } = props;
17
+ const { noNativeElements } = useTableContext();
18
+ const { type = 'checkbox', checked = false, subtle = false, hidden = false } = props;
19
19
  return {
20
20
  ...tableCellState,
21
21
  components: {
@@ -1 +1 @@
1
- {"version":3,"sources":["useTableSelectionCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useId, slot } from '@fluentui/react-utilities';\nimport { Checkbox } from '@fluentui/react-checkbox';\nimport { Radio } from '@fluentui/react-radio';\nimport type { TableSelectionCellProps, TableSelectionCellState } from './TableSelectionCell.types';\nimport { useTableCell_unstable } from '../TableCell/useTableCell';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableSelectionCell.\n *\n * The returned state can be modified with hooks such as useTableSelectionCellStyles_unstable,\n * before being passed to renderTableSelectionCell_unstable.\n *\n * @param props - props from this instance of TableSelectionCell\n * @param ref - reference to root HTMLElement of TableSelectionCell\n */\nexport const useTableSelectionCell_unstable = (\n props: TableSelectionCellProps,\n ref: React.Ref<HTMLElement>,\n): TableSelectionCellState => {\n const tableCellState = useTableCell_unstable(props, ref);\n const { noNativeElements } = useTableContext();\n const { type = 'checkbox', checked = false, subtle = false, hidden = false } = props;\n\n return {\n ...tableCellState,\n components: {\n ...tableCellState.components,\n checkboxIndicator: Checkbox,\n radioIndicator: Radio,\n },\n checkboxIndicator: slot.optional(props.checkboxIndicator, {\n renderByDefault: type === 'checkbox',\n defaultProps: { checked: props.checked },\n elementType: Checkbox,\n }),\n radioIndicator: slot.optional(props.radioIndicator, {\n renderByDefault: type === 'radio',\n defaultProps: { checked: !!checked, input: { name: useId('table-selection-radio') } },\n elementType: Radio,\n }),\n type,\n checked,\n noNativeElements,\n subtle,\n hidden,\n };\n};\n"],"names":["React","useId","slot","Checkbox","Radio","useTableCell_unstable","useTableContext","useTableSelectionCell_unstable","props","ref","tableCellState","noNativeElements","type","checked","subtle","hidden","components","checkboxIndicator","radioIndicator","optional","renderByDefault","defaultProps","elementType","input","name"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AACxD,SAASC,QAAQ,QAAQ,2BAA2B;AACpD,SAASC,KAAK,QAAQ,wBAAwB;AAE9C,SAASC,qBAAqB,QAAQ,4BAA4B;AAClE,SAASC,eAAe,QAAQ,8BAA8B;AAE9D;;;;;;;;CAQC,GACD,OAAO,MAAMC,iCAAiC,CAC5CC,OACAC,MAC4B;IAC5B,MAAMC,iBAAiBL,sBAAsBG,OAAOC;IACpD,MAAM,EAAEE,iBAAgB,EAAE,GAAGL;IAC7B,MAAM,EAAEM,MAAO,WAAU,EAAEC,SAAU,KAAK,CAAA,EAAEC,QAAS,KAAK,CAAA,EAAEC,QAAS,KAAK,CAAA,EAAE,GAAGP;IAE/E,OAAO;QACL,GAAGE,cAAc;QACjBM,YAAY;YACV,GAAGN,eAAeM,UAAU;YAC5BC,mBAAmBd;YACnBe,gBAAgBd;QAClB;QACAa,mBAAmBf,KAAKiB,QAAQ,CAACX,MAAMS,iBAAiB,EAAE;YACxDG,iBAAiBR,SAAS;YAC1BS,cAAc;gBAAER,SAASL,MAAMK,OAAO;YAAC;YACvCS,aAAanB;QACf;QACAe,gBAAgBhB,KAAKiB,QAAQ,CAACX,MAAMU,cAAc,EAAE;YAClDE,iBAAiBR,SAAS;YAC1BS,cAAc;gBAAER,SAAS,CAAC,CAACA;gBAASU,OAAO;oBAAEC,MAAMvB,MAAM;gBAAyB;YAAE;YACpFqB,aAAalB;QACf;QACAQ;QACAC;QACAF;QACAG;QACAC;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["useTableSelectionCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useId, slot } from '@fluentui/react-utilities';\nimport { Checkbox } from '@fluentui/react-checkbox';\nimport { Radio } from '@fluentui/react-radio';\nimport type { TableSelectionCellProps, TableSelectionCellState } from './TableSelectionCell.types';\nimport { useTableCell_unstable } from '../TableCell/useTableCell';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableSelectionCell.\n *\n * The returned state can be modified with hooks such as useTableSelectionCellStyles_unstable,\n * before being passed to renderTableSelectionCell_unstable.\n *\n * @param props - props from this instance of TableSelectionCell\n * @param ref - reference to root HTMLElement of TableSelectionCell\n */\nexport const useTableSelectionCell_unstable = (\n props: TableSelectionCellProps,\n ref: React.Ref<HTMLElement>,\n): TableSelectionCellState => {\n const tableCellState = useTableCell_unstable(props, ref);\n const { noNativeElements } = useTableContext();\n const { type = 'checkbox', checked = false, subtle = false, hidden = false } = props;\n\n return {\n ...tableCellState,\n components: {\n ...tableCellState.components,\n checkboxIndicator: Checkbox,\n radioIndicator: Radio,\n },\n checkboxIndicator: slot.optional(props.checkboxIndicator, {\n renderByDefault: type === 'checkbox',\n defaultProps: { checked: props.checked },\n elementType: Checkbox,\n }),\n radioIndicator: slot.optional(props.radioIndicator, {\n renderByDefault: type === 'radio',\n defaultProps: { checked: !!checked, input: { name: useId('table-selection-radio') } },\n elementType: Radio,\n }),\n type,\n checked,\n noNativeElements,\n subtle,\n hidden,\n };\n};\n"],"names":["React","useId","slot","Checkbox","Radio","useTableCell_unstable","useTableContext","useTableSelectionCell_unstable","props","ref","tableCellState","noNativeElements","type","checked","subtle","hidden","components","checkboxIndicator","radioIndicator","optional","renderByDefault","defaultProps","elementType","input","name"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AACxD,SAASC,QAAQ,QAAQ,2BAA2B;AACpD,SAASC,KAAK,QAAQ,wBAAwB;AAE9C,SAASC,qBAAqB,QAAQ,4BAA4B;AAClE,SAASC,eAAe,QAAQ,8BAA8B;AAE9D;;;;;;;;CAQC,GACD,OAAO,MAAMC,iCAAiC,CAC5CC,OACAC;IAEA,MAAMC,iBAAiBL,sBAAsBG,OAAOC;IACpD,MAAM,EAAEE,gBAAgB,EAAE,GAAGL;IAC7B,MAAM,EAAEM,OAAO,UAAU,EAAEC,UAAU,KAAK,EAAEC,SAAS,KAAK,EAAEC,SAAS,KAAK,EAAE,GAAGP;IAE/E,OAAO;QACL,GAAGE,cAAc;QACjBM,YAAY;YACV,GAAGN,eAAeM,UAAU;YAC5BC,mBAAmBd;YACnBe,gBAAgBd;QAClB;QACAa,mBAAmBf,KAAKiB,QAAQ,CAACX,MAAMS,iBAAiB,EAAE;YACxDG,iBAAiBR,SAAS;YAC1BS,cAAc;gBAAER,SAASL,MAAMK,OAAO;YAAC;YACvCS,aAAanB;QACf;QACAe,gBAAgBhB,KAAKiB,QAAQ,CAACX,MAAMU,cAAc,EAAE;YAClDE,iBAAiBR,SAAS;YAC1BS,cAAc;gBAAER,SAAS,CAAC,CAACA;gBAASU,OAAO;oBAAEC,MAAMvB,MAAM;gBAAyB;YAAE;YACpFqB,aAAalB;QACf;QACAQ;QACAC;QACAF;QACAG;QACAC;IACF;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["columnIdContext.ts"],"sourcesContent":["import * as React from 'react';\nimport type { TableColumnId } from '../hooks/';\n\nconst columnIdContext = React.createContext<TableColumnId | undefined>(undefined);\n\nexport const columnIdContextDefaultValue = '';\n\nexport const useColumnIdContext = () => React.useContext(columnIdContext) ?? columnIdContextDefaultValue;\n\nexport const ColumnIdContextProvider = columnIdContext.Provider;\n"],"names":["React","columnIdContext","createContext","undefined","columnIdContextDefaultValue","useColumnIdContext","useContext","ColumnIdContextProvider","Provider"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,MAAMC,kBAAkBD,MAAME,aAAa,CAA4BC;AAEvE,OAAO,MAAMC,8BAA8B,GAAG;IAENJ;AAAxC,OAAO,MAAMK,qBAAqB,IAAML,CAAAA,oBAAAA,MAAMM,UAAU,CAACL,8BAAjBD,+BAAAA,oBAAqCI,2BAA2B,CAAC;AAEzG,OAAO,MAAMG,0BAA0BN,gBAAgBO,QAAQ,CAAC"}
1
+ {"version":3,"sources":["columnIdContext.ts"],"sourcesContent":["import * as React from 'react';\nimport type { TableColumnId } from '../hooks/';\n\nconst columnIdContext = React.createContext<TableColumnId | undefined>(undefined);\n\nexport const columnIdContextDefaultValue = '';\n\nexport const useColumnIdContext = () => React.useContext(columnIdContext) ?? columnIdContextDefaultValue;\n\nexport const ColumnIdContextProvider = columnIdContext.Provider;\n"],"names":["React","columnIdContext","createContext","undefined","columnIdContextDefaultValue","useColumnIdContext","useContext","ColumnIdContextProvider","Provider"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,MAAMC,kBAAkBD,MAAME,aAAa,CAA4BC;AAEvE,OAAO,MAAMC,8BAA8B,GAAG;IAENJ;AAAxC,OAAO,MAAMK,qBAAqB,IAAML,CAAAA,oBAAAA,MAAMM,UAAU,CAACL,8BAAjBD,+BAAAA,oBAAqCI,4BAA4B;AAEzG,OAAO,MAAMG,0BAA0BN,gBAAgBO,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["dataGridContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { ContextSelector } from '@fluentui/react-context-selector';\nimport { TabsterDOMAttribute } from '@fluentui/react-tabster';\nimport { DataGridContextValue } from '../components/DataGrid/DataGrid.types';\nimport { defaultTableState } from '../hooks';\n\nconst dataGridContext = createContext<DataGridContextValue | undefined>(undefined);\n\nconst dataGridContextDefaultValue: DataGridContextValue = {\n ...defaultTableState,\n subtleSelection: false,\n selectableRows: false,\n selectionAppearance: 'brand',\n focusMode: 'none',\n compositeRowTabsterAttribute: {} as TabsterDOMAttribute,\n};\n\nexport const DataGridContextProvider = dataGridContext.Provider;\n\nexport const useDataGridContext_unstable = <T>(selector: ContextSelector<DataGridContextValue, T>) =>\n useContextSelector(dataGridContext, (ctx = dataGridContextDefaultValue) => selector(ctx));\n"],"names":["createContext","useContextSelector","defaultTableState","dataGridContext","undefined","dataGridContextDefaultValue","subtleSelection","selectableRows","selectionAppearance","focusMode","compositeRowTabsterAttribute","DataGridContextProvider","Provider","useDataGridContext_unstable","selector","ctx"],"mappings":"AAAA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAIrF,SAASC,iBAAiB,QAAQ,WAAW;AAE7C,MAAMC,kBAAkBH,cAAgDI;AAExE,MAAMC,8BAAoD;IACxD,GAAGH,iBAAiB;IACpBI,iBAAiB,KAAK;IACtBC,gBAAgB,KAAK;IACrBC,qBAAqB;IACrBC,WAAW;IACXC,8BAA8B,CAAC;AACjC;AAEA,OAAO,MAAMC,0BAA0BR,gBAAgBS,QAAQ,CAAC;AAEhE,OAAO,MAAMC,8BAA8B,CAAIC,WAC7Cb,mBAAmBE,iBAAiB,CAACY,MAAMV,2BAA2B,GAAKS,SAASC,MAAM"}
1
+ {"version":3,"sources":["dataGridContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { ContextSelector } from '@fluentui/react-context-selector';\nimport { TabsterDOMAttribute } from '@fluentui/react-tabster';\nimport { DataGridContextValue } from '../components/DataGrid/DataGrid.types';\nimport { defaultTableState } from '../hooks';\n\nconst dataGridContext = createContext<DataGridContextValue | undefined>(undefined);\n\nconst dataGridContextDefaultValue: DataGridContextValue = {\n ...defaultTableState,\n subtleSelection: false,\n selectableRows: false,\n selectionAppearance: 'brand',\n focusMode: 'none',\n compositeRowTabsterAttribute: {} as TabsterDOMAttribute,\n};\n\nexport const DataGridContextProvider = dataGridContext.Provider;\n\nexport const useDataGridContext_unstable = <T>(selector: ContextSelector<DataGridContextValue, T>) =>\n useContextSelector(dataGridContext, (ctx = dataGridContextDefaultValue) => selector(ctx));\n"],"names":["createContext","useContextSelector","defaultTableState","dataGridContext","undefined","dataGridContextDefaultValue","subtleSelection","selectableRows","selectionAppearance","focusMode","compositeRowTabsterAttribute","DataGridContextProvider","Provider","useDataGridContext_unstable","selector","ctx"],"mappings":"AAAA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAIrF,SAASC,iBAAiB,QAAQ,WAAW;AAE7C,MAAMC,kBAAkBH,cAAgDI;AAExE,MAAMC,8BAAoD;IACxD,GAAGH,iBAAiB;IACpBI,iBAAiB;IACjBC,gBAAgB;IAChBC,qBAAqB;IACrBC,WAAW;IACXC,8BAA8B,CAAC;AACjC;AAEA,OAAO,MAAMC,0BAA0BR,gBAAgBS,QAAQ,CAAC;AAEhE,OAAO,MAAMC,8BAA8B,CAAIC,WAC7Cb,mBAAmBE,iBAAiB,CAACY,MAAMV,2BAA2B,GAAKS,SAASC,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["rowIdContext.ts"],"sourcesContent":["import * as React from 'react';\nimport type { TableRowId } from '../hooks/';\n\nconst rowIdContext = React.createContext<TableRowId | undefined>(undefined);\n\nexport const tableRowIdContextDefaultValue = '';\n\nexport const useTableRowIdContext = () => React.useContext(rowIdContext) ?? tableRowIdContextDefaultValue;\n\nexport const TableRowIdContextProvider = rowIdContext.Provider;\n"],"names":["React","rowIdContext","createContext","undefined","tableRowIdContextDefaultValue","useTableRowIdContext","useContext","TableRowIdContextProvider","Provider"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,MAAMC,eAAeD,MAAME,aAAa,CAAyBC;AAEjE,OAAO,MAAMC,gCAAgC,GAAG;IAENJ;AAA1C,OAAO,MAAMK,uBAAuB,IAAML,CAAAA,oBAAAA,MAAMM,UAAU,CAACL,2BAAjBD,+BAAAA,oBAAkCI,6BAA6B,CAAC;AAE1G,OAAO,MAAMG,4BAA4BN,aAAaO,QAAQ,CAAC"}
1
+ {"version":3,"sources":["rowIdContext.ts"],"sourcesContent":["import * as React from 'react';\nimport type { TableRowId } from '../hooks/';\n\nconst rowIdContext = React.createContext<TableRowId | undefined>(undefined);\n\nexport const tableRowIdContextDefaultValue = '';\n\nexport const useTableRowIdContext = () => React.useContext(rowIdContext) ?? tableRowIdContextDefaultValue;\n\nexport const TableRowIdContextProvider = rowIdContext.Provider;\n"],"names":["React","rowIdContext","createContext","undefined","tableRowIdContextDefaultValue","useTableRowIdContext","useContext","TableRowIdContextProvider","Provider"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,MAAMC,eAAeD,MAAME,aAAa,CAAyBC;AAEjE,OAAO,MAAMC,gCAAgC,GAAG;IAENJ;AAA1C,OAAO,MAAMK,uBAAuB,IAAML,CAAAA,oBAAAA,MAAMM,UAAU,CAACL,2BAAjBD,+BAAAA,oBAAkCI,8BAA8B;AAE1G,OAAO,MAAMG,4BAA4BN,aAAaO,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["tableContext.ts"],"sourcesContent":["import * as React from 'react';\nimport { TableContextValue } from '../components/Table/Table.types';\n\nconst tableContext = React.createContext<TableContextValue | undefined>(undefined);\n\nexport const tableContextDefaultValue: TableContextValue = {\n size: 'medium',\n noNativeElements: false,\n sortable: false,\n};\n\nexport const TableContextProvider = tableContext.Provider;\nexport const useTableContext = () => React.useContext(tableContext) ?? tableContextDefaultValue;\n"],"names":["React","tableContext","createContext","undefined","tableContextDefaultValue","size","noNativeElements","sortable","TableContextProvider","Provider","useTableContext","useContext"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,MAAMC,eAAeD,MAAME,aAAa,CAAgCC;AAExE,OAAO,MAAMC,2BAA8C;IACzDC,MAAM;IACNC,kBAAkB,KAAK;IACvBC,UAAU,KAAK;AACjB,EAAE;AAEF,OAAO,MAAMC,uBAAuBP,aAAaQ,QAAQ,CAAC;IACrBT;AAArC,OAAO,MAAMU,kBAAkB,IAAMV,CAAAA,oBAAAA,MAAMW,UAAU,CAACV,2BAAjBD,+BAAAA,oBAAkCI,wBAAwB,CAAC"}
1
+ {"version":3,"sources":["tableContext.ts"],"sourcesContent":["import * as React from 'react';\nimport { TableContextValue } from '../components/Table/Table.types';\n\nconst tableContext = React.createContext<TableContextValue | undefined>(undefined);\n\nexport const tableContextDefaultValue: TableContextValue = {\n size: 'medium',\n noNativeElements: false,\n sortable: false,\n};\n\nexport const TableContextProvider = tableContext.Provider;\nexport const useTableContext = () => React.useContext(tableContext) ?? tableContextDefaultValue;\n"],"names":["React","tableContext","createContext","undefined","tableContextDefaultValue","size","noNativeElements","sortable","TableContextProvider","Provider","useTableContext","useContext"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,MAAMC,eAAeD,MAAME,aAAa,CAAgCC;AAExE,OAAO,MAAMC,2BAA8C;IACzDC,MAAM;IACNC,kBAAkB;IAClBC,UAAU;AACZ,EAAE;AAEF,OAAO,MAAMC,uBAAuBP,aAAaQ,QAAQ,CAAC;IACrBT;AAArC,OAAO,MAAMU,kBAAkB,IAAMV,CAAAA,oBAAAA,MAAMW,UAAU,CAACV,2BAAjBD,+BAAAA,oBAAkCI,yBAAyB"}
@@ -18,7 +18,7 @@ const defaultRenderHeaderCell = ()=>{
18
18
  * @param options - column definition options
19
19
  * @returns - column definition with defaults
20
20
  */ export function createTableColumn(options) {
21
- const { columnId , renderCell =defaultRenderCell , renderHeaderCell =defaultRenderHeaderCell , compare =defaultCompare } = options;
21
+ const { columnId, renderCell = defaultRenderCell, renderHeaderCell = defaultRenderHeaderCell, compare = defaultCompare } = options;
22
22
  return {
23
23
  columnId,
24
24
  renderCell,
@@ -1 +1 @@
1
- {"version":3,"sources":["createColumn.ts"],"sourcesContent":["import { CreateTableColumnOptions } from './types';\n\nconst defaultCompare = () => 0;\n\nconst defaultRenderCell = () => {\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn('@fluentui/react-table: You are using the default column renderCell function that renders null');\n }\n\n return null;\n};\n\nconst defaultRenderHeaderCell = () => {\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn('@fluentui/react-table: You are using the default column renderHeaderCell function that renders null');\n }\n\n return null;\n};\n\n/**\n * Helper function to create column definition with defaults\n * @param options - column definition options\n * @returns - column definition with defaults\n */\nexport function createTableColumn<TItem>(options: CreateTableColumnOptions<TItem>) {\n const {\n columnId,\n renderCell = defaultRenderCell,\n renderHeaderCell = defaultRenderHeaderCell,\n compare = defaultCompare,\n } = options;\n\n return {\n columnId,\n renderCell,\n renderHeaderCell,\n compare,\n };\n}\n"],"names":["defaultCompare","defaultRenderCell","process","env","NODE_ENV","console","warn","defaultRenderHeaderCell","createTableColumn","options","columnId","renderCell","renderHeaderCell","compare"],"mappings":"AAEA,MAAMA,iBAAiB,IAAM;AAE7B,MAAMC,oBAAoB,IAAM;IAC9B,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,sCAAsC;QACtCC,QAAQC,IAAI,CAAC;IACf,CAAC;IAED,OAAO,IAAI;AACb;AAEA,MAAMC,0BAA0B,IAAM;IACpC,IAAIL,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,sCAAsC;QACtCC,QAAQC,IAAI,CAAC;IACf,CAAC;IAED,OAAO,IAAI;AACb;AAEA;;;;CAIC,GACD,OAAO,SAASE,kBAAyBC,OAAwC,EAAE;IACjF,MAAM,EACJC,SAAQ,EACRC,YAAaV,kBAAiB,EAC9BW,kBAAmBL,wBAAuB,EAC1CM,SAAUb,eAAc,EACzB,GAAGS;IAEJ,OAAO;QACLC;QACAC;QACAC;QACAC;IACF;AACF,CAAC"}
1
+ {"version":3,"sources":["createColumn.ts"],"sourcesContent":["import { CreateTableColumnOptions } from './types';\n\nconst defaultCompare = () => 0;\n\nconst defaultRenderCell = () => {\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn('@fluentui/react-table: You are using the default column renderCell function that renders null');\n }\n\n return null;\n};\n\nconst defaultRenderHeaderCell = () => {\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn('@fluentui/react-table: You are using the default column renderHeaderCell function that renders null');\n }\n\n return null;\n};\n\n/**\n * Helper function to create column definition with defaults\n * @param options - column definition options\n * @returns - column definition with defaults\n */\nexport function createTableColumn<TItem>(options: CreateTableColumnOptions<TItem>) {\n const {\n columnId,\n renderCell = defaultRenderCell,\n renderHeaderCell = defaultRenderHeaderCell,\n compare = defaultCompare,\n } = options;\n\n return {\n columnId,\n renderCell,\n renderHeaderCell,\n compare,\n };\n}\n"],"names":["defaultCompare","defaultRenderCell","process","env","NODE_ENV","console","warn","defaultRenderHeaderCell","createTableColumn","options","columnId","renderCell","renderHeaderCell","compare"],"mappings":"AAEA,MAAMA,iBAAiB,IAAM;AAE7B,MAAMC,oBAAoB;IACxB,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,sCAAsC;QACtCC,QAAQC,IAAI,CAAC;IACf;IAEA,OAAO;AACT;AAEA,MAAMC,0BAA0B;IAC9B,IAAIL,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,sCAAsC;QACtCC,QAAQC,IAAI,CAAC;IACf;IAEA,OAAO;AACT;AAEA;;;;CAIC,GACD,OAAO,SAASE,kBAAyBC,OAAwC;IAC/E,MAAM,EACJC,QAAQ,EACRC,aAAaV,iBAAiB,EAC9BW,mBAAmBL,uBAAuB,EAC1CM,UAAUb,cAAc,EACzB,GAAGS;IAEJ,OAAO;QACLC;QACAC;QACAC;QACAC;IACF;AACF"}
@@ -8,7 +8,7 @@ const PRECISION_FACTOR = 1 / 4;
8
8
  export function useKeyboardResizing(columnResizeState) {
9
9
  const [columnId, setColumnId] = React.useState();
10
10
  const onChangeRef = React.useRef();
11
- const { findPrevFocusable } = useFocusFinders();
11
+ const { findPrevFocusable } = useFocusFinders();
12
12
  const columnResizeStateRef = React.useRef(columnResizeState);
13
13
  React.useEffect(()=>{
14
14
  columnResizeStateRef.current = columnResizeState;
@@ -45,16 +45,16 @@ export function useKeyboardResizing(columnResizeState) {
45
45
  case Enter:
46
46
  case Escape:
47
47
  var // Just blur here, the onBlur handler will take care of the rest (disableInteractiveMode).
48
- _resizeHandleRefs_get, _resizeHandleRefs_get_current;
48
+ _resizeHandleRefs_get_current, _resizeHandleRefs_get;
49
49
  stopEvent();
50
50
  (_resizeHandleRefs_get = resizeHandleRefs.get(columnId)) === null || _resizeHandleRefs_get === void 0 ? void 0 : (_resizeHandleRefs_get_current = _resizeHandleRefs_get.current) === null || _resizeHandleRefs_get_current === void 0 ? void 0 : _resizeHandleRefs_get_current.blur();
51
51
  break;
52
52
  }
53
53
  });
54
54
  const enableInteractiveMode = React.useCallback((colId)=>{
55
- var _onChangeRef_current, _resizeHandleRefs_get;
55
+ var _onChangeRef_current, _onChangeRef, _resizeHandleRefs_get;
56
56
  setColumnId(colId);
57
- (_onChangeRef_current = onChangeRef.current) === null || _onChangeRef_current === void 0 ? void 0 : _onChangeRef_current.call(onChangeRef, colId, true);
57
+ (_onChangeRef_current = (_onChangeRef = onChangeRef).current) === null || _onChangeRef_current === void 0 ? void 0 : _onChangeRef_current.call(_onChangeRef, colId, true);
58
58
  const handle = (_resizeHandleRefs_get = resizeHandleRefs.get(colId)) === null || _resizeHandleRefs_get === void 0 ? void 0 : _resizeHandleRefs_get.current;
59
59
  if (handle) {
60
60
  handle.setAttribute('tabindex', '-1');
@@ -66,11 +66,11 @@ export function useKeyboardResizing(columnResizeState) {
66
66
  ]);
67
67
  const disableInteractiveMode = React.useCallback(()=>{
68
68
  var // Notify the onChange listener that we are disabling interactive mode.
69
- _onChangeRef_current, _resizeHandleRefs_get;
69
+ _onChangeRef_current, _onChangeRef, _resizeHandleRefs_get;
70
70
  if (!columnId) {
71
71
  return;
72
72
  }
73
- (_onChangeRef_current = onChangeRef.current) === null || _onChangeRef_current === void 0 ? void 0 : _onChangeRef_current.call(onChangeRef, columnId, false);
73
+ (_onChangeRef_current = (_onChangeRef = onChangeRef).current) === null || _onChangeRef_current === void 0 ? void 0 : _onChangeRef_current.call(_onChangeRef, columnId, false);
74
74
  // Find the previous focusable element (table header button) and focus it.
75
75
  const el = (_resizeHandleRefs_get = resizeHandleRefs.get(columnId)) === null || _resizeHandleRefs_get === void 0 ? void 0 : _resizeHandleRefs_get.current;
76
76
  if (el) {
@@ -1 +1 @@
1
- {"version":3,"sources":["useKeyboardResizing.ts"],"sourcesContent":["import * as React from 'react';\nimport { ArrowLeft, ArrowRight, Enter, Escape, Shift, Space } from '@fluentui/keyboard-keys';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport { ColumnResizeState, EnableKeyboardModeOnChangeCallback, TableColumnId } from './types';\nimport { useFocusFinders, useTabsterAttributes } from '@fluentui/react-tabster';\n\nconst STEP = 20;\nconst PRECISION_MODIFIER = Shift;\nconst PRECISION_FACTOR = 1 / 4;\n\nexport function useKeyboardResizing(columnResizeState: ColumnResizeState) {\n const [columnId, setColumnId] = React.useState<TableColumnId>();\n const onChangeRef = React.useRef<EnableKeyboardModeOnChangeCallback>();\n const { findPrevFocusable } = useFocusFinders();\n\n const columnResizeStateRef = React.useRef<ColumnResizeState>(columnResizeState);\n React.useEffect(() => {\n columnResizeStateRef.current = columnResizeState;\n }, [columnResizeState]);\n\n const [resizeHandleRefs] = React.useState(() => new Map<TableColumnId, React.RefObject<HTMLDivElement>>());\n\n const keyboardHandler = useEventCallback((event: React.KeyboardEvent) => {\n if (!columnId) {\n return;\n }\n\n const width = columnResizeStateRef.current.getColumnWidth(columnId);\n const precisionModifier = event.getModifierState(PRECISION_MODIFIER);\n\n const stopEvent = () => {\n event.preventDefault();\n event.stopPropagation();\n };\n\n switch (event.key) {\n case ArrowLeft:\n stopEvent();\n columnResizeStateRef.current.setColumnWidth(event.nativeEvent, {\n columnId,\n width: width - (precisionModifier ? STEP * PRECISION_FACTOR : STEP),\n });\n return;\n\n case ArrowRight:\n stopEvent();\n columnResizeStateRef.current.setColumnWidth(event.nativeEvent, {\n columnId,\n width: width + (precisionModifier ? STEP * PRECISION_FACTOR : STEP),\n });\n return;\n\n case Space:\n case Enter:\n case Escape:\n stopEvent();\n // Just blur here, the onBlur handler will take care of the rest (disableInteractiveMode).\n resizeHandleRefs.get(columnId)?.current?.blur();\n break;\n }\n });\n\n const enableInteractiveMode = React.useCallback(\n (colId: TableColumnId) => {\n setColumnId(colId);\n onChangeRef.current?.(colId, true);\n\n const handle = resizeHandleRefs.get(colId)?.current;\n if (handle) {\n handle.setAttribute('tabindex', '-1');\n handle.tabIndex = -1;\n handle.focus();\n }\n },\n [resizeHandleRefs],\n );\n\n const disableInteractiveMode = React.useCallback(() => {\n if (!columnId) {\n return;\n }\n // Notify the onChange listener that we are disabling interactive mode.\n onChangeRef.current?.(columnId, false);\n // Find the previous focusable element (table header button) and focus it.\n const el = resizeHandleRefs.get(columnId)?.current;\n if (el) {\n findPrevFocusable(el)?.focus(); // Focus the previous focusable element (header button).\n el.removeAttribute('tabindex');\n }\n\n setColumnId(undefined);\n }, [columnId, findPrevFocusable, resizeHandleRefs]);\n\n const toggleInteractiveMode = (colId: TableColumnId, onChange?: EnableKeyboardModeOnChangeCallback) => {\n onChangeRef.current = onChange;\n if (!columnId) {\n enableInteractiveMode(colId);\n } else if (colId && columnId !== colId) {\n enableInteractiveMode(colId);\n setColumnId(colId);\n } else {\n disableInteractiveMode();\n }\n };\n\n const getKeyboardResizingRef = React.useCallback(\n (colId: TableColumnId) => {\n const ref = resizeHandleRefs.get(colId) || React.createRef<HTMLDivElement>();\n resizeHandleRefs.set(colId, ref);\n return ref;\n },\n [resizeHandleRefs],\n );\n\n // This makes sure the left and right arrow keys are ignored in tabster,\n // so that they can be used for resizing.\n const tabsterAttrs = useTabsterAttributes({\n focusable: {\n ignoreKeydown: {\n ArrowLeft: true,\n ArrowRight: true,\n },\n },\n });\n\n return {\n toggleInteractiveMode,\n columnId,\n getKeyboardResizingProps: (colId: TableColumnId, currentWidth: number) => ({\n onKeyDown: keyboardHandler,\n onBlur: disableInteractiveMode,\n ref: getKeyboardResizingRef(colId),\n role: 'separator',\n 'aria-label': 'Resize column',\n 'aria-valuetext': `${currentWidth} pixels`,\n 'aria-hidden': colId === columnId ? false : true,\n tabIndex: colId === columnId ? 0 : undefined,\n ...tabsterAttrs,\n }),\n };\n}\n"],"names":["React","ArrowLeft","ArrowRight","Enter","Escape","Shift","Space","useEventCallback","useFocusFinders","useTabsterAttributes","STEP","PRECISION_MODIFIER","PRECISION_FACTOR","useKeyboardResizing","columnResizeState","columnId","setColumnId","useState","onChangeRef","useRef","findPrevFocusable","columnResizeStateRef","useEffect","current","resizeHandleRefs","Map","keyboardHandler","event","width","getColumnWidth","precisionModifier","getModifierState","stopEvent","preventDefault","stopPropagation","key","setColumnWidth","nativeEvent","get","blur","enableInteractiveMode","useCallback","colId","handle","setAttribute","tabIndex","focus","disableInteractiveMode","el","removeAttribute","undefined","toggleInteractiveMode","onChange","getKeyboardResizingRef","ref","createRef","set","tabsterAttrs","focusable","ignoreKeydown","getKeyboardResizingProps","currentWidth","onKeyDown","onBlur","role"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,SAAS,EAAEC,UAAU,EAAEC,KAAK,EAAEC,MAAM,EAAEC,KAAK,EAAEC,KAAK,QAAQ,0BAA0B;AAC7F,SAASC,gBAAgB,QAAQ,4BAA4B;AAE7D,SAASC,eAAe,EAAEC,oBAAoB,QAAQ,0BAA0B;AAEhF,MAAMC,OAAO;AACb,MAAMC,qBAAqBN;AAC3B,MAAMO,mBAAmB,IAAI;AAE7B,OAAO,SAASC,oBAAoBC,iBAAoC,EAAE;IACxE,MAAM,CAACC,UAAUC,YAAY,GAAGhB,MAAMiB,QAAQ;IAC9C,MAAMC,cAAclB,MAAMmB,MAAM;IAChC,MAAM,EAAEC,kBAAiB,EAAE,GAAGZ;IAE9B,MAAMa,uBAAuBrB,MAAMmB,MAAM,CAAoBL;IAC7Dd,MAAMsB,SAAS,CAAC,IAAM;QACpBD,qBAAqBE,OAAO,GAAGT;IACjC,GAAG;QAACA;KAAkB;IAEtB,MAAM,CAACU,iBAAiB,GAAGxB,MAAMiB,QAAQ,CAAC,IAAM,IAAIQ;IAEpD,MAAMC,kBAAkBnB,iBAAiB,CAACoB,QAA+B;QACvE,IAAI,CAACZ,UAAU;YACb;QACF,CAAC;QAED,MAAMa,QAAQP,qBAAqBE,OAAO,CAACM,cAAc,CAACd;QAC1D,MAAMe,oBAAoBH,MAAMI,gBAAgB,CAACpB;QAEjD,MA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eAAenB,UAAU3B,WAAW,KAAK,GAAG,IAAI;gBAChD8B,UAAUH,UAAU3B,WAAW,IAAImC,SAAS;gBAC5C,GAAGO,YAAY;YACjB,CAAA;IACF;AACF,CAAC"}
1
+ {"version":3,"sources":["useKeyboardResizing.ts"],"sourcesContent":["import * as React from 'react';\nimport { ArrowLeft, ArrowRight, Enter, Escape, Shift, Space } from '@fluentui/keyboard-keys';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport { ColumnResizeState, EnableKeyboardModeOnChangeCallback, TableColumnId } from './types';\nimport { useFocusFinders, useTabsterAttributes } from '@fluentui/react-tabster';\n\nconst STEP = 20;\nconst PRECISION_MODIFIER = Shift;\nconst PRECISION_FACTOR = 1 / 4;\n\nexport function useKeyboardResizing(columnResizeState: ColumnResizeState) {\n const [columnId, setColumnId] = React.useState<TableColumnId>();\n const onChangeRef = React.useRef<EnableKeyboardModeOnChangeCallback>();\n const { findPrevFocusable } = useFocusFinders();\n\n const columnResizeStateRef = React.useRef<ColumnResizeState>(columnResizeState);\n React.useEffect(() => {\n columnResizeStateRef.current = columnResizeState;\n }, [columnResizeState]);\n\n const [resizeHandleRefs] = React.useState(() => new Map<TableColumnId, React.RefObject<HTMLDivElement>>());\n\n const keyboardHandler = useEventCallback((event: React.KeyboardEvent) => {\n if (!columnId) {\n return;\n }\n\n const width = columnResizeStateRef.current.getColumnWidth(columnId);\n const precisionModifier = event.getModifierState(PRECISION_MODIFIER);\n\n const stopEvent = () => {\n event.preventDefault();\n event.stopPropagation();\n };\n\n switch (event.key) {\n case ArrowLeft:\n stopEvent();\n columnResizeStateRef.current.setColumnWidth(event.nativeEvent, {\n columnId,\n width: width - (precisionModifier ? STEP * PRECISION_FACTOR : STEP),\n });\n return;\n\n case ArrowRight:\n stopEvent();\n columnResizeStateRef.current.setColumnWidth(event.nativeEvent, {\n columnId,\n width: width + (precisionModifier ? STEP * PRECISION_FACTOR : STEP),\n });\n return;\n\n case Space:\n case Enter:\n case Escape:\n stopEvent();\n // Just blur here, the onBlur handler will take care of the rest (disableInteractiveMode).\n resizeHandleRefs.get(columnId)?.current?.blur();\n break;\n }\n });\n\n const enableInteractiveMode = React.useCallback(\n (colId: TableColumnId) => {\n setColumnId(colId);\n onChangeRef.current?.(colId, true);\n\n const handle = resizeHandleRefs.get(colId)?.current;\n if (handle) {\n handle.setAttribute('tabindex', '-1');\n handle.tabIndex = -1;\n handle.focus();\n }\n },\n [resizeHandleRefs],\n );\n\n const disableInteractiveMode = React.useCallback(() => {\n if (!columnId) {\n return;\n }\n // Notify the onChange listener that we are disabling interactive mode.\n onChangeRef.current?.(columnId, false);\n // Find the previous focusable element (table header button) and focus it.\n const el = resizeHandleRefs.get(columnId)?.current;\n if (el) {\n findPrevFocusable(el)?.focus(); // Focus the previous focusable element (header button).\n el.removeAttribute('tabindex');\n }\n\n setColumnId(undefined);\n }, [columnId, findPrevFocusable, resizeHandleRefs]);\n\n const toggleInteractiveMode = (colId: TableColumnId, onChange?: EnableKeyboardModeOnChangeCallback) => {\n onChangeRef.current = onChange;\n if (!columnId) {\n enableInteractiveMode(colId);\n } else if (colId && columnId !== colId) {\n enableInteractiveMode(colId);\n setColumnId(colId);\n } else {\n disableInteractiveMode();\n }\n };\n\n const getKeyboardResizingRef = React.useCallback(\n (colId: TableColumnId) => {\n const ref = resizeHandleRefs.get(colId) || React.createRef<HTMLDivElement>();\n resizeHandleRefs.set(colId, ref);\n return ref;\n },\n [resizeHandleRefs],\n );\n\n // This makes sure the left and right arrow keys are ignored in tabster,\n // so that they can be used for resizing.\n const tabsterAttrs = useTabsterAttributes({\n focusable: {\n ignoreKeydown: {\n ArrowLeft: true,\n ArrowRight: true,\n },\n },\n });\n\n return {\n toggleInteractiveMode,\n columnId,\n getKeyboardResizingProps: (colId: TableColumnId, currentWidth: number) => ({\n onKeyDown: keyboardHandler,\n onBlur: disableInteractiveMode,\n ref: getKeyboardResizingRef(colId),\n role: 'separator',\n 'aria-label': 'Resize column',\n 'aria-valuetext': `${currentWidth} pixels`,\n 'aria-hidden': colId === columnId ? false : true,\n tabIndex: colId === columnId ? 0 : undefined,\n ...tabsterAttrs,\n }),\n };\n}\n"],"names":["React","ArrowLeft","ArrowRight","Enter","Escape","Shift","Space","useEventCallback","useFocusFinders","useTabsterAttributes","STEP","PRECISION_MODIFIER","PRECISION_FACTOR","useKeyboardResizing","columnResizeState","columnId","setColumnId","useState","onChangeRef","useRef","findPrevFocusable","columnResizeStateRef","useEffect","current","resizeHandleRefs","Map","keyboardHandler","event","width","getColumnWidth","precisionModifier","getModifierState","stopEvent","preventDefault","stopPropagation","key","setColumnWidth","nativeEvent","get","blur","enableInteractiveMode","useCallback","colId","handle","setAttribute","tabIndex","focus","disableInteractiveMode","el","removeAttribute","undefined","toggleInteractiveMode","onChange","getKeyboardResizingRef","ref","createRef","set","tabsterAttrs","focusable","ignoreKeydown","getKeyboardResizingProps","currentWidth","onKeyDown","onBlur","role"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,SAAS,EAAEC,UAAU,EAAEC,KAAK,EAAEC,MAAM,EAAEC,KAAK,EAAEC,KAAK,QAAQ,0BAA0B;AAC7F,SAASC,gBAAgB,QAAQ,4BAA4B;AAE7D,SAASC,eAAe,EAAEC,oBAAoB,QAAQ,0BAA0B;AAEhF,MAAMC,OAAO;AACb,MAAMC,qBAAqBN;AAC3B,MAAMO,mBAAmB,IAAI;AAE7B,OAAO,SAASC,oBAAoBC,iBAAoC;IACtE,MAAM,CAACC,UAAUC,YAAY,GAAGhB,MAAMiB,QAAQ;IAC9C,MAAMC,cAAclB,MAAMmB,MAAM;IAChC,MAAM,EAAEC,iBAAiB,EAAE,GAAGZ;IAE9B,MAAMa,uBAAuBrB,MAAMmB,MAAM,CAAoBL;IAC7Dd,MAAMsB,SAAS,CAAC;QACdD,qBAAqBE,OAAO,GAAGT;IACjC,GAAG;QAACA;KAAkB;IAEtB,MAAM,CAACU,iBAAiB,GAAGxB,MAAMiB,QAAQ,CAAC,IAA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CAAC;gBAC1C,eAAenB,UAAU3B,WAAW,QAAQ;gBAC5C8B,UAAUH,UAAU3B,WAAW,IAAImC;gBACnC,GAAGO,YAAY;YACjB,CAAA;IACF;AACF"}
@@ -9,7 +9,7 @@ import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts
9
9
  */ export function useMeasureElement() {
10
10
  const [width, setWidth] = React.useState(0);
11
11
  const container = React.useRef(undefined);
12
- const { targetDocument } = useFluent();
12
+ const { targetDocument } = useFluent();
13
13
  // the handler for resize observer
14
14
  const handleResize = React.useCallback(()=>{
15
15
  var _container_current;
@@ -40,7 +40,8 @@ import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts
40
40
  ]);
41
41
  React.useEffect(()=>{
42
42
  return ()=>{
43
- return resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();
43
+ var _resizeObserver;
44
+ return (_resizeObserver = resizeObserver) === null || _resizeObserver === void 0 ? void 0 : _resizeObserver.disconnect();
44
45
  };
45
46
  }, [
46
47
  resizeObserver
@@ -1 +1 @@
1
- {"version":3,"sources":["useMeasureElement.ts"],"sourcesContent":["import { canUseDOM } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\n/**\n * Provides a way of reporting element width.\n * Returns\n * `width` - current element width (0 by default),\n * `measureElementRef` - a ref function to be passed as `ref` to the element you want to measure\n */\nexport function useMeasureElement<TElement extends HTMLElement = HTMLElement>() {\n const [width, setWidth] = React.useState(0);\n const container = React.useRef<HTMLElement | undefined>(undefined);\n\n const { targetDocument } = useFluent();\n\n // the handler for resize observer\n const handleResize = React.useCallback(() => {\n const containerWidth = container.current?.getBoundingClientRect().width;\n setWidth(containerWidth || 0);\n }, []);\n\n // Keep the reference of ResizeObserver in the state, as it should live through renders\n const [resizeObserver] = React.useState(canUseDOM() ? new ResizeObserver(handleResize) : undefined);\n const measureElementRef = React.useCallback(\n (el: TElement | null) => {\n if (!targetDocument || !resizeObserver) {\n return;\n }\n\n // cleanup previous container\n if (container.current) {\n resizeObserver.unobserve(container.current);\n container.current.remove();\n }\n\n if (el) {\n container.current = targetDocument.createElement('div');\n el.insertAdjacentElement('beforebegin', container.current);\n resizeObserver.observe(container.current);\n handleResize();\n }\n },\n [targetDocument, resizeObserver, handleResize],\n );\n\n React.useEffect(() => {\n return () => resizeObserver?.disconnect();\n }, [resizeObserver]);\n\n return { width, measureElementRef };\n}\n"],"names":["canUseDOM","React","useFluent_unstable","useFluent","useMeasureElement","width","setWidth","useState","container","useRef","undefined","targetDocument","handleResize","useCallback","containerWidth","current","getBoundingClientRect","resizeObserver","ResizeObserver","measureElementRef","el","unobserve","remove","createElement","insertAdjacentElement","observe","useEffect","disconnect"],"mappings":"AAAA,SAASA,SAAS,QAAQ,4BAA4B;AACtD,YAAYC,WAAW,QAAQ;AAC/B,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAElF;;;;;CAKC,GACD,OAAO,SAASC,oBAAgE;IAC9E,MAAM,CAACC,OAAOC,SAAS,GAAGL,MAAMM,QAAQ,CAAC;IACzC,MAAMC,YAAYP,MAAMQ,MAAM,CAA0BC;IAExD,MAAM,EAAEC,eAAc,EAAE,GAAGR;IAE3B,kCAAkC;IAClC,MAAMS,eAAeX,MAAMY,WAAW,CAAC,IAAM;YACpBL;QAAvB,MAAMM,iBAAiBN,CAAAA,qBAAAA,UAAUO,OAAO,cAAjBP,gCAAAA,KAAAA,IAAAA,mBAAmBQ,wBAAwBX,KAAK;QACvEC,SAASQ,kBAAkB;IAC7B,GAAG,EAAE;IAEL,uFAAuF;IACvF,MAAM,CAACG,eAAe,GAAGhB,MAAMM,QAAQ,CAACP,cAAc,IAAIkB,eAAeN,gBAAgBF,SAAS;IAClG,MAAMS,oBAAoBlB,MAAMY,WAAW,CACzC,CAACO,KAAwB;QACvB,IAAI,CAACT,kBAAkB,CAACM,gBAAgB;YACtC;QACF,CAAC;QAED,6BAA6B;QAC7B,IAAIT,UAAUO,OAAO,EAAE;YACrBE,eAAeI,SAAS,CAACb,UAAUO,OAAO;YAC1CP,UAAUO,OAAO,CAACO,MAAM;QAC1B,CAAC;QAED,IAAIF,IAAI;YACNZ,UAAUO,OAAO,GAAGJ,eAAeY,aAAa,CAAC;YACjDH,GAAGI,qBAAqB,CAAC,eAAehB,UAAUO,OAAO;YACzDE,eAAeQ,OAAO,CAACjB,UAAUO,OAAO;YACxCH;QACF,CAAC;IACH,GACA;QAACD;QAAgBM;QAAgBL;KAAa;IAGhDX,MAAMyB,SAAS,CAAC,IAAM;QACpB,OAAO;YAAMT,OAAAA,2BAAAA,4BAAAA,KAAAA,IAAAA,eAAgBU,UAAU;;IACzC,GAAG;QAACV;KAAe;IAEnB,OAAO;QAAEZ;QAAOc;IAAkB;AACpC,CAAC"}
1
+ {"version":3,"sources":["useMeasureElement.ts"],"sourcesContent":["import { canUseDOM } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\n/**\n * Provides a way of reporting element width.\n * Returns\n * `width` - current element width (0 by default),\n * `measureElementRef` - a ref function to be passed as `ref` to the element you want to measure\n */\nexport function useMeasureElement<TElement extends HTMLElement = HTMLElement>() {\n const [width, setWidth] = React.useState(0);\n const container = React.useRef<HTMLElement | undefined>(undefined);\n\n const { targetDocument } = useFluent();\n\n // the handler for resize observer\n const handleResize = React.useCallback(() => {\n const containerWidth = container.current?.getBoundingClientRect().width;\n setWidth(containerWidth || 0);\n }, []);\n\n // Keep the reference of ResizeObserver in the state, as it should live through renders\n const [resizeObserver] = React.useState(canUseDOM() ? new ResizeObserver(handleResize) : undefined);\n const measureElementRef = React.useCallback(\n (el: TElement | null) => {\n if (!targetDocument || !resizeObserver) {\n return;\n }\n\n // cleanup previous container\n if (container.current) {\n resizeObserver.unobserve(container.current);\n container.current.remove();\n }\n\n if (el) {\n container.current = targetDocument.createElement('div');\n el.insertAdjacentElement('beforebegin', container.current);\n resizeObserver.observe(container.current);\n handleResize();\n }\n },\n [targetDocument, resizeObserver, handleResize],\n );\n\n React.useEffect(() => {\n return () => resizeObserver?.disconnect();\n }, [resizeObserver]);\n\n return { width, measureElementRef };\n}\n"],"names":["canUseDOM","React","useFluent_unstable","useFluent","useMeasureElement","width","setWidth","useState","container","useRef","undefined","targetDocument","handleResize","useCallback","containerWidth","current","getBoundingClientRect","resizeObserver","ResizeObserver","measureElementRef","el","unobserve","remove","createElement","insertAdjacentElement","observe","useEffect","disconnect"],"mappings":"AAAA,SAASA,SAAS,QAAQ,4BAA4B;AACtD,YAAYC,WAAW,QAAQ;AAC/B,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAElF;;;;;CAKC,GACD,OAAO,SAASC;IACd,MAAM,CAACC,OAAOC,SAAS,GAAGL,MAAMM,QAAQ,CAAC;IACzC,MAAMC,YAAYP,MAAMQ,MAAM,CAA0BC;IAExD,MAAM,EAAEC,cAAc,EAAE,GAAGR;IAE3B,kCAAkC;IAClC,MAAMS,eAAeX,MAAMY,WAAW,CAAC;YACdL;QAAvB,MAAMM,kBAAiBN,qBAAAA,UAAUO,OAAO,cAAjBP,yCAAAA,mBAAmBQ,qBAAqB,GAAGX,KAAK;QACvEC,SAASQ,kBAAkB;IAC7B,GAAG,EAAE;IAEL,uFAAuF;IACvF,MAAM,CAACG,eAAe,GAAGhB,MAAMM,QAAQ,CAACP,cAAc,IAAIkB,eAAeN,gBAAgBF;IACzF,MAAMS,oBAAoBlB,MAAMY,WAAW,CACzC,CAACO;QACC,IAAI,CAACT,kBAAkB,CAACM,gBAAgB;YACtC;QACF;QAEA,6BAA6B;QAC7B,IAAIT,UAAUO,OAAO,EAAE;YACrBE,eAAeI,SAAS,CAACb,UAAUO,OAAO;YAC1CP,UAAUO,OAAO,CAACO,MAAM;QAC1B;QAEA,IAAIF,IAAI;YACNZ,UAAUO,OAAO,GAAGJ,eAAeY,aAAa,CAAC;YACjDH,GAAGI,qBAAqB,CAAC,eAAehB,UAAUO,OAAO;YACzDE,eAAeQ,OAAO,CAACjB,UAAUO,OAAO;YACxCH;QACF;IACF,GACA;QAACD;QAAgBM;QAAgBL;KAAa;IAGhDX,MAAMyB,SAAS,CAAC;QACd,OAAO;gBAAMT;oBAAAA,kBAAAA,4BAAAA,sCAAAA,gBAAgBU,UAAU;;IACzC,GAAG;QAACV;KAAe;IAEnB,OAAO;QAAEZ;QAAOc;IAAkB;AACpC"}
@@ -2,13 +2,14 @@ import * as React from 'react';
2
2
  import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';
3
3
  import { getEventClientCoords, isMouseEvent, isTouchEvent } from '@fluentui/react-utilities';
4
4
  export function useTableColumnResizeMouseHandler(columnResizeState) {
5
+ var _targetDocument, _globalWin;
5
6
  const mouseX = React.useRef(0);
6
7
  const currentWidth = React.useRef(0);
7
8
  const colId = React.useRef(undefined);
8
- const { targetDocument } = useFluent();
9
- const globalWin = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView;
9
+ const { targetDocument } = useFluent();
10
+ const globalWin = (_targetDocument = targetDocument) === null || _targetDocument === void 0 ? void 0 : _targetDocument.defaultView;
10
11
  const recalculatePosition = React.useCallback((e)=>{
11
- const { clientX } = getEventClientCoords(e);
12
+ const { clientX } = getEventClientCoords(e);
12
13
  const dx = clientX - mouseX.current;
13
14
  // Update the local width for the column and set it
14
15
  currentWidth.current += dx;
@@ -21,50 +22,53 @@ export function useTableColumnResizeMouseHandler(columnResizeState) {
21
22
  columnResizeState
22
23
  ]);
23
24
  const onDrag = React.useCallback((e)=>{
25
+ var _globalWin;
24
26
  // Using requestAnimationFrame here drastically improves resizing experience on slower CPUs
25
- if (typeof (globalWin === null || globalWin === void 0 ? void 0 : globalWin.requestAnimationFrame) === 'function') {
27
+ if (typeof ((_globalWin = globalWin) === null || _globalWin === void 0 ? void 0 : _globalWin.requestAnimationFrame) === 'function') {
26
28
  requestAnimationFrame(()=>recalculatePosition(e));
27
29
  } else {
28
30
  recalculatePosition(e);
29
31
  }
30
32
  }, [
31
- globalWin === null || globalWin === void 0 ? void 0 : globalWin.requestAnimationFrame,
33
+ (_globalWin = globalWin) === null || _globalWin === void 0 ? void 0 : _globalWin.requestAnimationFrame,
32
34
  recalculatePosition
33
35
  ]);
34
36
  const onDragEnd = React.useCallback((event)=>{
35
37
  if (isMouseEvent(event)) {
36
- targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.removeEventListener('mouseup', onDragEnd);
37
- targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.removeEventListener('mousemove', onDrag);
38
+ var _targetDocument, _targetDocument1;
39
+ (_targetDocument = targetDocument) === null || _targetDocument === void 0 ? void 0 : _targetDocument.removeEventListener('mouseup', onDragEnd);
40
+ (_targetDocument1 = targetDocument) === null || _targetDocument1 === void 0 ? void 0 : _targetDocument1.removeEventListener('mousemove', onDrag);
38
41
  }
39
42
  if (isTouchEvent(event)) {
40
- targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.removeEventListener('touchend', onDragEnd);
41
- targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.removeEventListener('touchmove', onDrag);
43
+ var _targetDocument2, _targetDocument3;
44
+ (_targetDocument2 = targetDocument) === null || _targetDocument2 === void 0 ? void 0 : _targetDocument2.removeEventListener('touchend', onDragEnd);
45
+ (_targetDocument3 = targetDocument) === null || _targetDocument3 === void 0 ? void 0 : _targetDocument3.removeEventListener('touchmove', onDrag);
42
46
  }
43
47
  }, [
44
48
  onDrag,
45
49
  targetDocument
46
50
  ]);
47
- const getOnMouseDown = (columnId)=>{
48
- return (event)=>{
51
+ const getOnMouseDown = (columnId)=>(event)=>{
49
52
  // Keep the width locally so that we decouple the calculation of the next with from rendering.
50
53
  // This makes the whole experience much faster and more precise
51
54
  currentWidth.current = columnResizeState.getColumnWidth(columnId);
52
55
  mouseX.current = getEventClientCoords(event).clientX;
53
56
  colId.current = columnId;
54
57
  if (isMouseEvent(event)) {
58
+ var _targetDocument, _targetDocument1;
55
59
  // ignore other buttons than primary mouse button
56
60
  if (event.target !== event.currentTarget || event.button !== 0) {
57
61
  return;
58
62
  }
59
- targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.addEventListener('mouseup', onDragEnd);
60
- targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.addEventListener('mousemove', onDrag);
63
+ (_targetDocument = targetDocument) === null || _targetDocument === void 0 ? void 0 : _targetDocument.addEventListener('mouseup', onDragEnd);
64
+ (_targetDocument1 = targetDocument) === null || _targetDocument1 === void 0 ? void 0 : _targetDocument1.addEventListener('mousemove', onDrag);
61
65
  }
62
66
  if (isTouchEvent(event)) {
63
- targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.addEventListener('touchend', onDragEnd);
64
- targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.addEventListener('touchmove', onDrag);
67
+ var _targetDocument2, _targetDocument3;
68
+ (_targetDocument2 = targetDocument) === null || _targetDocument2 === void 0 ? void 0 : _targetDocument2.addEventListener('touchend', onDragEnd);
69
+ (_targetDocument3 = targetDocument) === null || _targetDocument3 === void 0 ? void 0 : _targetDocument3.addEventListener('touchmove', onDrag);
65
70
  }
66
71
  };
67
- };
68
72
  return {
69
73
  getOnMouseDown: (columnId)=>getOnMouseDown(columnId)
70
74
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["useTableColumnResizeMouseHandler.ts"],"sourcesContent":["import * as React from 'react';\nimport { TableColumnId, ColumnResizeState } from './types';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport {\n NativeTouchOrMouseEvent,\n ReactTouchOrMouseEvent,\n getEventClientCoords,\n isMouseEvent,\n isTouchEvent,\n} from '@fluentui/react-utilities';\n\nexport function useTableColumnResizeMouseHandler(columnResizeState: ColumnResizeState) {\n const mouseX = React.useRef(0);\n const currentWidth = React.useRef(0);\n const colId = React.useRef<TableColumnId | undefined>(undefined);\n\n const { targetDocument } = useFluent();\n const globalWin = targetDocument?.defaultView;\n\n const recalculatePosition = React.useCallback(\n (e: NativeTouchOrMouseEvent) => {\n const { clientX } = getEventClientCoords(e);\n const dx = clientX - mouseX.current;\n\n // Update the local width for the column and set it\n currentWidth.current += dx;\n colId.current && columnResizeState.setColumnWidth(e, { columnId: colId.current, width: currentWidth.current });\n mouseX.current = clientX;\n },\n [columnResizeState],\n );\n\n const onDrag = React.useCallback(\n (e: NativeTouchOrMouseEvent) => {\n // Using requestAnimationFrame here drastically improves resizing experience on slower CPUs\n if (typeof globalWin?.requestAnimationFrame === 'function') {\n requestAnimationFrame(() => recalculatePosition(e));\n } else {\n recalculatePosition(e);\n }\n },\n [globalWin?.requestAnimationFrame, recalculatePosition],\n );\n\n const onDragEnd = React.useCallback(\n (event: NativeTouchOrMouseEvent) => {\n if (isMouseEvent(event)) {\n targetDocument?.removeEventListener('mouseup', onDragEnd);\n targetDocument?.removeEventListener('mousemove', onDrag);\n }\n if (isTouchEvent(event)) {\n targetDocument?.removeEventListener('touchend', onDragEnd);\n targetDocument?.removeEventListener('touchmove', onDrag);\n }\n },\n [onDrag, targetDocument],\n );\n\n const getOnMouseDown = (columnId: TableColumnId) => (event: ReactTouchOrMouseEvent) => {\n // Keep the width locally so that we decouple the calculation of the next with from rendering.\n // This makes the whole experience much faster and more precise\n currentWidth.current = columnResizeState.getColumnWidth(columnId);\n mouseX.current = getEventClientCoords(event).clientX;\n colId.current = columnId;\n\n if (isMouseEvent(event)) {\n // ignore other buttons than primary mouse button\n if (event.target !== event.currentTarget || event.button !== 0) {\n return;\n }\n targetDocument?.addEventListener('mouseup', onDragEnd);\n targetDocument?.addEventListener('mousemove', onDrag);\n }\n\n if (isTouchEvent(event)) {\n targetDocument?.addEventListener('touchend', onDragEnd);\n targetDocument?.addEventListener('touchmove', onDrag);\n }\n };\n\n return {\n getOnMouseDown: (columnId: TableColumnId) => getOnMouseDown(columnId),\n };\n}\n"],"names":["React","useFluent_unstable","useFluent","getEventClientCoords","isMouseEvent","isTouchEvent","useTableColumnResizeMouseHandler","columnResizeState","mouseX","useRef","currentWidth","colId","undefined","targetDocument","globalWin","defaultView","recalculatePosition","useCallback","e","clientX","dx","current","setColumnWidth","columnId","width","onDrag","requestAnimationFrame","onDragEnd","event","removeEventListener","getOnMouseDown","getColumnWidth","target","currentTarget","button","addEventListener"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAClF,SAGEC,oBAAoB,EACpBC,YAAY,EACZC,YAAY,QACP,4BAA4B;AAEnC,OAAO,SAASC,iCAAiCC,iBAAoC,EAAE;IACrF,MAAMC,SAASR,MAAMS,MAAM,CAAC;IAC5B,MAAMC,eAAeV,MAAMS,MAAM,CAAC;IAClC,MAAME,QAAQX,MAAMS,MAAM,CAA4BG;IAEtD,MAAM,EAAEC,eAAc,EAAE,GAAGX;IAC3B,MAAMY,YAAYD,2BAAAA,4BAAAA,KAAAA,IAAAA,eAAgBE,WAAW;IAE7C,MAAMC,sBAAsBhB,MAAMiB,WAAW,CAC3C,CAACC,IAA+B;QAC9B,MAAM,EAAEC,QAAO,EAAE,GAAGhB,qBAAqBe;QACzC,MAAME,KAAKD,UAAUX,OAAOa,OAAO;QAEnC,mDAAmD;QACnDX,aAAaW,OAAO,IAAID;QACxBT,MAAMU,OAAO,IAAId,kBAAkBe,cAAc,CAACJ,GAAG;YAAEK,UAAUZ,MAAMU,OAAO;YAAEG,OAAOd,aAAaW,OAAO;QAAC;QAC5Gb,OAAOa,OAAO,GAAGF;IACnB,GACA;QAACZ;KAAkB;IAGrB,MAAMkB,SAASzB,MAAMiB,WAAW,CAC9B,CAACC,IAA+B;QAC9B,2FAA2F;QAC3F,IAAI,OAAOJ,CAAAA,sBAAAA,uBAAAA,KAAAA,IAAAA,UAAWY,qBAAqB,AAAD,MAAM,YAAY;YAC1DA,sBAAsB,IAAMV,oBAAoBE;QAClD,OAAO;YACLF,oBAAoBE;QACtB,CAAC;IACH,GACA;QAACJ,sBAAAA,uBAAAA,KAAAA,IAAAA,UAAWY,q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;IAC9D;AACF,CAAC"}
1
+ {"version":3,"sources":["useTableColumnResizeMouseHandler.ts"],"sourcesContent":["import * as React from 'react';\nimport { TableColumnId, ColumnResizeState } from './types';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport {\n NativeTouchOrMouseEvent,\n ReactTouchOrMouseEvent,\n getEventClientCoords,\n isMouseEvent,\n isTouchEvent,\n} from '@fluentui/react-utilities';\n\nexport function useTableColumnResizeMouseHandler(columnResizeState: ColumnResizeState) {\n const mouseX = React.useRef(0);\n const currentWidth = React.useRef(0);\n const colId = React.useRef<TableColumnId | undefined>(undefined);\n\n const { targetDocument } = useFluent();\n const globalWin = targetDocument?.defaultView;\n\n const recalculatePosition = React.useCallback(\n (e: NativeTouchOrMouseEvent) => {\n const { clientX } = getEventClientCoords(e);\n const dx = clientX - mouseX.current;\n\n // Update the local width for the column and set it\n currentWidth.current += dx;\n colId.current && columnResizeState.setColumnWidth(e, { columnId: colId.current, width: currentWidth.current });\n mouseX.current = clientX;\n },\n [columnResizeState],\n );\n\n const onDrag = React.useCallback(\n (e: NativeTouchOrMouseEvent) => {\n // Using requestAnimationFrame here drastically improves resizing experience on slower CPUs\n if (typeof globalWin?.requestAnimationFrame === 'function') {\n requestAnimationFrame(() => recalculatePosition(e));\n } else {\n recalculatePosition(e);\n }\n },\n [globalWin?.requestAnimationFrame, recalculatePosition],\n );\n\n const onDragEnd = React.useCallback(\n (event: NativeTouchOrMouseEvent) => {\n if (isMouseEvent(event)) {\n targetDocument?.removeEventListener('mouseup', onDragEnd);\n targetDocument?.removeEventListener('mousemove', onDrag);\n }\n if (isTouchEvent(event)) {\n targetDocument?.removeEventListener('touchend', onDragEnd);\n targetDocument?.removeEventListener('touchmove', onDrag);\n }\n },\n [onDrag, targetDocument],\n );\n\n const getOnMouseDown = (columnId: TableColumnId) => (event: ReactTouchOrMouseEvent) => {\n // Keep the width locally so that we decouple the calculation of the next with from rendering.\n // This makes the whole experience much faster and more precise\n currentWidth.current = columnResizeState.getColumnWidth(columnId);\n mouseX.current = getEventClientCoords(event).clientX;\n colId.current = columnId;\n\n if (isMouseEvent(event)) {\n // ignore other buttons than primary mouse button\n if (event.target !== event.currentTarget || event.button !== 0) {\n return;\n }\n targetDocument?.addEventListener('mouseup', onDragEnd);\n targetDocument?.addEventListener('mousemove', onDrag);\n }\n\n if (isTouchEvent(event)) {\n targetDocument?.addEventListener('touchend', onDragEnd);\n targetDocument?.addEventListener('touchmove', onDrag);\n }\n };\n\n return {\n getOnMouseDown: (columnId: TableColumnId) => getOnMouseDown(columnId),\n };\n}\n"],"names":["React","useFluent_unstable","useFluent","getEventClientCoords","isMouseEvent","isTouchEvent","useTableColumnResizeMouseHandler","columnResizeState","targetDocument","globalWin","mouseX","useRef","currentWidth","colId","undefined","defaultView","recalculatePosition","useCallback","e","clientX","dx","current","setColumnWidth","columnId","width","onDrag","requestAnimationFrame","onDragEnd","event","removeEventListener","getOnMouseDown","getColumnWidth","target","currentTarget","button","addEventListener"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAClF,SAGEC,oBAAoB,EACpBC,YAAY,EACZC,YAAY,QACP,4BAA4B;AAEnC,OAAO,SAASC,iCAAiCC,iBAAoC;QAMjEC,iBAwBfC;IA7BH,MAAMC,SAASV,MAAMW,MAAM,CAAC;IAC5B,MAAMC,eAAeZ,MAAMW,MAAM,CAAC;IAClC,MAAME,QAAQb,MAAMW,MAAM,CAA4BG;IAEtD,MAAM,EAAEN,cAAc,EAAE,GAAGN;IAC3B,MAAMO,aAAYD,kBAAAA,4BAAAA,sCAAAA,gBAAgBO,WAAW;IAE7C,MAAMC,sBAAsBhB,MAAMiB,WAAW,CAC3C,CAACC;QACC,MAAM,EAAEC,OAAO,EAAE,GAAGhB,qBAAqBe;QACzC,MAAME,KAAKD,UAAUT,OAAOW,OAAO;QAEnC,mDAAmD;QACnDT,aAAaS,OAAO,IAAID;QACxBP,MAA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AK,GAAG;oBAC9D;gBACF;iBACA1B,kBAAAA,4BAAAA,sCAAAA,gBAAgB2B,gBAAgB,CAAC,WAAWR;iBAC5CnB,mBAAAA,4BAAAA,uCAAAA,iBAAgB2B,gBAAgB,CAAC,aAAaV;YAChD;YAEA,IAAIpB,aAAauB,QAAQ;oBACvBpB,kBACAA;iBADAA,mBAAAA,4BAAAA,uCAAAA,iBAAgB2B,gBAAgB,CAAC,YAAYR;iBAC7CnB,mBAAAA,4BAAAA,uCAAAA,iBAAgB2B,gBAAgB,CAAC,aAAaV;YAChD;QACF;IAEA,OAAO;QACLK,gBAAgB,CAACP,WAA4BO,eAAeP;IAC9D;AACF"}
@@ -24,8 +24,8 @@ const createReducer = ()=>(state, action)=>{
24
24
  columnWidthState: adjustColumnWidthsToFitContainer(newState, state.containerWidth)
25
25
  };
26
26
  case 'SET_COLUMN_WIDTH':
27
- const { columnId , width } = action;
28
- const { containerWidth } = state;
27
+ const { columnId, width } = action;
28
+ const { containerWidth } = state;
29
29
  const column = getColumnById(state.columnWidthState, columnId);
30
30
  let newColumnWidthState = [
31
31
  ...state.columnWidthState
@@ -46,7 +46,7 @@ const createReducer = ()=>(state, action)=>{
46
46
  }
47
47
  };
48
48
  export function useTableColumnResizeState(columns, containerWidth, params = {}) {
49
- const { onColumnResize , columnSizingOptions } = params;
49
+ const { onColumnResize, columnSizingOptions } = params;
50
50
  const reducer = React.useMemo(()=>createReducer(), []);
51
51
  const [state, dispatch] = React.useReducer(reducer, {
52
52
  columns,
@@ -79,8 +79,8 @@ export function useTableColumnResizeState(columns, containerWidth, params = {})
79
79
  columnSizingOptions
80
80
  ]);
81
81
  const setColumnWidth = useEventCallback((event, data)=>{
82
- let { width } = data;
83
- const { columnId } = data;
82
+ let { width } = data;
83
+ const { columnId } = data;
84
84
  const col = getColumnById(state.columnWidthState, columnId);
85
85
  if (!col) {
86
86
  return;
@@ -1 +1 @@
1
- {"version":3,"sources":["useTableColumnResizeState.ts"],"sourcesContent":["import { useEventCallback, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport {\n TableColumnDefinition,\n TableColumnId,\n ColumnResizeState,\n ColumnWidthState,\n UseTableColumnSizingParams,\n TableColumnSizingOptions,\n} from './types';\nimport {\n columnDefinitionsToState,\n adjustColumnWidthsToFitContainer,\n getColumnById,\n setColumnProperty,\n getColumnWidth,\n} from '../utils/columnResizeUtils';\n\ntype ComponentState<T> = {\n columns: TableColumnDefinition<T>[];\n containerWidth: number;\n columnWidthState: ColumnWidthState[];\n columnSizingOptions: TableColumnSizingOptions | undefined;\n};\n\ntype ColumnResizeStateAction<T> =\n | {\n type: 'CONTAINER_WIDTH_UPDATED';\n containerWidth: number;\n }\n | {\n type: 'COLUMNS_UPDATED';\n columns: TableColumnDefinition<T>[];\n }\n | {\n type: 'COLUMN_SIZING_OPTIONS_UPDATED';\n columnSizingOptions: TableColumnSizingOptions | undefined;\n }\n | {\n type: 'SET_COLUMN_WIDTH';\n columnId: TableColumnId;\n width: number;\n };\n\nconst createReducer =\n <T>() =>\n (state: ComponentState<T>, action: ColumnResizeStateAction<T>): ComponentState<T> => {\n switch (action.type) {\n case 'CONTAINER_WIDTH_UPDATED':\n return {\n ...state,\n containerWidth: action.containerWidth,\n columnWidthState: adjustColumnWidthsToFitContainer(state.columnWidthState, action.containerWidth),\n };\n\n case 'COLUMNS_UPDATED':\n const newS = columnDefinitionsToState(action.columns, state.columnWidthState, state.columnSizingOptions);\n return {\n ...state,\n columns: action.columns,\n columnWidthState: adjustColumnWidthsToFitContainer(newS, state.containerWidth),\n };\n\n case 'COLUMN_SIZING_OPTIONS_UPDATED':\n const newState = columnDefinitionsToState(state.columns, state.columnWidthState, action.columnSizingOptions);\n return {\n ...state,\n columnSizingOptions: action.columnSizingOptions,\n columnWidthState: adjustColumnWidthsToFitContainer(newState, state.containerWidth),\n };\n\n case 'SET_COLUMN_WIDTH':\n const { columnId, width } = action;\n const { containerWidth } = state;\n\n const column = getColumnById(state.columnWidthState, columnId);\n let newColumnWidthState = [...state.columnWidthState];\n\n if (!column) {\n return state;\n }\n\n // Adjust the column width and measure the new total width\n newColumnWidthState = setColumnProperty(newColumnWidthState, columnId, 'width', width);\n // Set this width as idealWidth, because its a deliberate change, not a recalculation because of container\n newColumnWidthState = setColumnProperty(newColumnWidthState, columnId, 'idealWidth', width);\n // Adjust the widths to the container size\n newColumnWidthState = adjustColumnWidthsToFitContainer(newColumnWidthState, containerWidth);\n\n return { ...state, columnWidthState: newColumnWidthState };\n }\n };\n\nexport function useTableColumnResizeState<T>(\n columns: TableColumnDefinition<T>[],\n containerWidth: number,\n params: UseTableColumnSizingParams = {},\n): ColumnResizeState {\n const { onColumnResize, columnSizingOptions } = params;\n\n const reducer = React.useMemo(() => createReducer<T>(), []);\n\n const [state, dispatch] = React.useReducer(reducer, {\n columns,\n containerWidth: 0,\n columnWidthState: columnDefinitionsToState(columns, undefined, columnSizingOptions),\n columnSizingOptions,\n });\n\n useIsomorphicLayoutEffect(() => {\n dispatch({ type: 'CONTAINER_WIDTH_UPDATED', containerWidth });\n }, [containerWidth]);\n\n useIsomorphicLayoutEffect(() => {\n dispatch({ type: 'COLUMNS_UPDATED', columns });\n }, [columns]);\n\n useIsomorphicLayoutEffect(() => {\n dispatch({ type: 'COLUMN_SIZING_OPTIONS_UPDATED', columnSizingOptions });\n }, [columnSizingOptions]);\n\n const setColumnWidth = useEventCallback(\n (event: KeyboardEvent | MouseEvent | TouchEvent | undefined, data: { columnId: TableColumnId; width: number }) => {\n let { width } = data;\n const { columnId } = data;\n const col = getColumnById(state.columnWidthState, columnId);\n if (!col) {\n return;\n }\n\n width = Math.max(col.minWidth || 0, width);\n\n if (onColumnResize) {\n onColumnResize(event, { columnId, width });\n }\n dispatch({ type: 'SET_COLUMN_WIDTH', columnId, width });\n },\n );\n\n return {\n getColumnById: (colId: TableColumnId) => getColumnById(state.columnWidthState, colId),\n getColumns: () => state.columnWidthState,\n getColumnWidth: (colId: TableColumnId) => getColumnWidth(state.columnWidthState, colId),\n setColumnWidth,\n };\n}\n"],"names":["useEventCallback","useIsomorphicLayoutEffect","React","columnDefinitionsToState","adjustColumnWidthsToFitContainer","getColumnById","setColumnProperty","getColumnWidth","createReducer","state","action","type","containerWidth","columnWidthState","newS","columns","columnSizingOptions","newState","columnId","width","column","newColumnWidthState","useTableColumnResizeState","params","onColumnResize","reducer","useMemo","dispatch","useReducer","undefined","setColumnWidth","event","data","col","Math","max","minWidth","colId","getColumns"],"mappings":"AAAA,SAASA,gBAAgB,EAAEC,yBAAyB,QAAQ,4BAA4B;AACxF,YAAYC,WAAW,QAAQ;AAS/B,SACEC,wBAAwB,EACxBC,gCAAgC,EAChCC,aAAa,EACbC,iBAAiB,EACjBC,cAAc,QACT,6BAA6B;AA4BpC,MAAMC,gBACJ,IACA,CAACC,OAA0BC,SAA0D;QACnF,OAAQA,OAAOC,IAAI;YACjB,KAAK;gBACH,OAAO;oBACL,GAAGF,KAAK;oBACRG,gBAAgBF,OAAOE,cAAc;oBACrCC,kBAAkBT,iCAAiCK,MAAMI,gBAAgB,EAAEH,OAAOE,cAAc;gBAClG;YAEF,KAAK;gBACH,MAAME,OAAOX,yBAAyBO,OAAOK,OAAO,EAAEN,MAAMI,gBAAgB,EAAEJ,MAAMO,mBAAmB;gBACvG,OAAO;oBACL,GAAGP,KAAK;oBACRM,SAASL,OAAOK,OAAO;oBACvBF,kBAAkBT,iCAAiCU,MAAML,MAAMG,cAAc;gBAC/E;YAEF,KAAK;gBACH,MAAMK,WAAWd,yBAAyBM,MAAMM,OAAO,EAAEN,MAAMI,gBAAgB,EAAEH,OAAOM,mBAAmB;gBAC3G,OAAO;oBACL,GAAGP,KAAK;oBACRO,qBAAqBN,OAAOM,mBAAmB;oBAC/CH,kBAAkBT,iCAAiCa,UAAUR,MAAMG,cAAc;gBACnF;YAEF,KAAK;gBACH,MAAM,EAAEM,SAAQ,EAAEC,MAAK,EAAE,GAAGT;gBAC5B,MAAM,EAAEE,eAAc,EAA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AEK;QAClD,IAAI,CAACe,KAAK;YACR;QACF,CAAC;QAEDd,QAAQe,KAAKC,GAAG,CAACF,IAAIG,QAAQ,IAAI,GAAGjB;QAEpC,IAAIK,gBAAgB;YAClBA,eAAeO,OAAO;gBAAEb;gBAAUC;YAAM;QAC1C,CAAC;QACDQ,SAAS;YAAEhB,MAAM;YAAoBO;YAAUC;QAAM;IACvD;IAGF,OAAO;QACLd,eAAe,CAACgC,QAAyBhC,cAAcI,MAAMI,gBAAgB,EAAEwB;QAC/EC,YAAY,IAAM7B,MAAMI,gBAAgB;QACxCN,gBAAgB,CAAC8B,QAAyB9B,eAAeE,MAAMI,gBAAgB,EAAEwB;QACjFP;IACF;AACF,CAAC"}
1
+ {"version":3,"sources":["useTableColumnResizeState.ts"],"sourcesContent":["import { useEventCallback, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport {\n TableColumnDefinition,\n TableColumnId,\n ColumnResizeState,\n ColumnWidthState,\n UseTableColumnSizingParams,\n TableColumnSizingOptions,\n} from './types';\nimport {\n columnDefinitionsToState,\n adjustColumnWidthsToFitContainer,\n getColumnById,\n setColumnProperty,\n getColumnWidth,\n} from '../utils/columnResizeUtils';\n\ntype ComponentState<T> = {\n columns: TableColumnDefinition<T>[];\n containerWidth: number;\n columnWidthState: ColumnWidthState[];\n columnSizingOptions: TableColumnSizingOptions | undefined;\n};\n\ntype ColumnResizeStateAction<T> =\n | {\n type: 'CONTAINER_WIDTH_UPDATED';\n containerWidth: number;\n }\n | {\n type: 'COLUMNS_UPDATED';\n columns: TableColumnDefinition<T>[];\n }\n | {\n type: 'COLUMN_SIZING_OPTIONS_UPDATED';\n columnSizingOptions: TableColumnSizingOptions | undefined;\n }\n | {\n type: 'SET_COLUMN_WIDTH';\n columnId: TableColumnId;\n width: number;\n };\n\nconst createReducer =\n <T>() =>\n (state: ComponentState<T>, action: ColumnResizeStateAction<T>): ComponentState<T> => {\n switch (action.type) {\n case 'CONTAINER_WIDTH_UPDATED':\n return {\n ...state,\n containerWidth: action.containerWidth,\n columnWidthState: adjustColumnWidthsToFitContainer(state.columnWidthState, action.containerWidth),\n };\n\n case 'COLUMNS_UPDATED':\n const newS = columnDefinitionsToState(action.columns, state.columnWidthState, state.columnSizingOptions);\n return {\n ...state,\n columns: action.columns,\n columnWidthState: adjustColumnWidthsToFitContainer(newS, state.containerWidth),\n };\n\n case 'COLUMN_SIZING_OPTIONS_UPDATED':\n const newState = columnDefinitionsToState(state.columns, state.columnWidthState, action.columnSizingOptions);\n return {\n ...state,\n columnSizingOptions: action.columnSizingOptions,\n columnWidthState: adjustColumnWidthsToFitContainer(newState, state.containerWidth),\n };\n\n case 'SET_COLUMN_WIDTH':\n const { columnId, width } = action;\n const { containerWidth } = state;\n\n const column = getColumnById(state.columnWidthState, columnId);\n let newColumnWidthState = [...state.columnWidthState];\n\n if (!column) {\n return state;\n }\n\n // Adjust the column width and measure the new total width\n newColumnWidthState = setColumnProperty(newColumnWidthState, columnId, 'width', width);\n // Set this width as idealWidth, because its a deliberate change, not a recalculation because of container\n newColumnWidthState = setColumnProperty(newColumnWidthState, columnId, 'idealWidth', width);\n // Adjust the widths to the container size\n newColumnWidthState = adjustColumnWidthsToFitContainer(newColumnWidthState, containerWidth);\n\n return { ...state, columnWidthState: newColumnWidthState };\n }\n };\n\nexport function useTableColumnResizeState<T>(\n columns: TableColumnDefinition<T>[],\n containerWidth: number,\n params: UseTableColumnSizingParams = {},\n): ColumnResizeState {\n const { onColumnResize, columnSizingOptions } = params;\n\n const reducer = React.useMemo(() => createReducer<T>(), []);\n\n const [state, dispatch] = React.useReducer(reducer, {\n columns,\n containerWidth: 0,\n columnWidthState: columnDefinitionsToState(columns, undefined, columnSizingOptions),\n columnSizingOptions,\n });\n\n useIsomorphicLayoutEffect(() => {\n dispatch({ type: 'CONTAINER_WIDTH_UPDATED', containerWidth });\n }, [containerWidth]);\n\n useIsomorphicLayoutEffect(() => {\n dispatch({ type: 'COLUMNS_UPDATED', columns });\n }, [columns]);\n\n useIsomorphicLayoutEffect(() => {\n dispatch({ type: 'COLUMN_SIZING_OPTIONS_UPDATED', columnSizingOptions });\n }, [columnSizingOptions]);\n\n const setColumnWidth = useEventCallback(\n (event: KeyboardEvent | MouseEvent | TouchEvent | undefined, data: { columnId: TableColumnId; width: number }) => {\n let { width } = data;\n const { columnId } = data;\n const col = getColumnById(state.columnWidthState, columnId);\n if (!col) {\n return;\n }\n\n width = Math.max(col.minWidth || 0, width);\n\n if (onColumnResize) {\n onColumnResize(event, { columnId, width });\n }\n dispatch({ type: 'SET_COLUMN_WIDTH', columnId, width });\n },\n );\n\n return {\n getColumnById: (colId: TableColumnId) => getColumnById(state.columnWidthState, colId),\n getColumns: () => state.columnWidthState,\n getColumnWidth: (colId: TableColumnId) => getColumnWidth(state.columnWidthState, colId),\n setColumnWidth,\n };\n}\n"],"names":["useEventCallback","useIsomorphicLayoutEffect","React","columnDefinitionsToState","adjustColumnWidthsToFitContainer","getColumnById","setColumnProperty","getColumnWidth","createReducer","state","action","type","containerWidth","columnWidthState","newS","columns","columnSizingOptions","newState","columnId","width","column","newColumnWidthState","useTableColumnResizeState","params","onColumnResize","reducer","useMemo","dispatch","useReducer","undefined","setColumnWidth","event","data","col","Math","max","minWidth","colId","getColumns"],"mappings":"AAAA,SAASA,gBAAgB,EAAEC,yBAAyB,QAAQ,4BAA4B;AACxF,YAAYC,WAAW,QAAQ;AAS/B,SACEC,wBAAwB,EACxBC,gCAAgC,EAChCC,aAAa,EACbC,iBAAiB,EACjBC,cAAc,QACT,6BAA6B;AA4BpC,MAAMC,gBACJ,IACA,CAACC,OAA0BC;QACzB,OAAQA,OAAOC,IAAI;YACjB,KAAK;gBACH,OAAO;oBACL,GAAGF,KAAK;oBACRG,gBAAgBF,OAAOE,cAAc;oBACrCC,kBAAkBT,iCAAiCK,MAAMI,gBAAgB,EAAEH,OAAOE,cAAc;gBAClG;YAEF,KAAK;gBACH,MAAME,OAAOX,yBAAyBO,OAAOK,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