@fluentui/react-table 9.15.9 → 9.15.11

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 (306) hide show
  1. package/CHANGELOG.md +37 -2
  2. package/lib/DataGrid.js.map +1 -1
  3. package/lib/DataGridBody.js.map +1 -1
  4. package/lib/DataGridCell.js.map +1 -1
  5. package/lib/DataGridHeader.js.map +1 -1
  6. package/lib/DataGridHeaderCell.js.map +1 -1
  7. package/lib/DataGridRow.js.map +1 -1
  8. package/lib/DataGridSelectionCell.js.map +1 -1
  9. package/lib/Table.js.map +1 -1
  10. package/lib/TableBody.js.map +1 -1
  11. package/lib/TableCell.js.map +1 -1
  12. package/lib/TableCellActions.js.map +1 -1
  13. package/lib/TableCellLayout.js.map +1 -1
  14. package/lib/TableCellPrimaryLayout.js.map +1 -1
  15. package/lib/TableHeader.js.map +1 -1
  16. package/lib/TableHeaderCell.js.map +1 -1
  17. package/lib/TableResizeHandle.js.map +1 -1
  18. package/lib/TableRow.js.map +1 -1
  19. package/lib/TableSelectionCell.js.map +1 -1
  20. package/lib/components/DataGrid/DataGrid.js.map +1 -1
  21. package/lib/components/DataGrid/DataGrid.types.js.map +1 -1
  22. package/lib/components/DataGrid/index.js.map +1 -1
  23. package/lib/components/DataGrid/renderDataGrid.js.map +1 -1
  24. package/lib/components/DataGrid/useDataGrid.js.map +1 -1
  25. package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -1
  26. package/lib/components/DataGridBody/DataGridBody.js.map +1 -1
  27. package/lib/components/DataGridBody/DataGridBody.types.js.map +1 -1
  28. package/lib/components/DataGridBody/index.js.map +1 -1
  29. package/lib/components/DataGridBody/renderDataGridBody.js.map +1 -1
  30. package/lib/components/DataGridBody/useDataGridBody.js.map +1 -1
  31. package/lib/components/DataGridCell/DataGridCell.js.map +1 -1
  32. package/lib/components/DataGridCell/DataGridCell.types.js +3 -1
  33. package/lib/components/DataGridCell/DataGridCell.types.js.map +1 -1
  34. package/lib/components/DataGridCell/index.js.map +1 -1
  35. package/lib/components/DataGridCell/renderDataGridCell.js.map +1 -1
  36. package/lib/components/DataGridCell/useDataGridCell.js.map +1 -1
  37. package/lib/components/DataGridHeader/DataGridHeader.js.map +1 -1
  38. package/lib/components/DataGridHeader/DataGridHeader.types.js +3 -1
  39. package/lib/components/DataGridHeader/DataGridHeader.types.js.map +1 -1
  40. package/lib/components/DataGridHeader/index.js.map +1 -1
  41. package/lib/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
  42. package/lib/components/DataGridHeader/useDataGridHeader.js.map +1 -1
  43. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
  44. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js +3 -1
  45. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -1
  46. package/lib/components/DataGridHeaderCell/index.js.map +1 -1
  47. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
  48. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  49. package/lib/components/DataGridRow/DataGridRow.js.map +1 -1
  50. package/lib/components/DataGridRow/DataGridRow.types.js.map +1 -1
  51. package/lib/components/DataGridRow/index.js.map +1 -1
  52. package/lib/components/DataGridRow/renderDataGridRow.js.map +1 -1
  53. package/lib/components/DataGridRow/useDataGridRow.js.map +1 -1
  54. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
  55. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js +3 -1
  56. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -1
  57. package/lib/components/DataGridSelectionCell/index.js.map +1 -1
  58. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
  59. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
  60. package/lib/components/Table/Table.js.map +1 -1
  61. package/lib/components/Table/Table.types.js +3 -1
  62. package/lib/components/Table/Table.types.js.map +1 -1
  63. package/lib/components/Table/index.js.map +1 -1
  64. package/lib/components/Table/renderTable.js.map +1 -1
  65. package/lib/components/Table/useTable.js.map +1 -1
  66. package/lib/components/Table/useTableContextValues.js.map +1 -1
  67. package/lib/components/TableBody/TableBody.js.map +1 -1
  68. package/lib/components/TableBody/TableBody.types.js +3 -1
  69. package/lib/components/TableBody/TableBody.types.js.map +1 -1
  70. package/lib/components/TableBody/index.js.map +1 -1
  71. package/lib/components/TableBody/renderTableBody.js.map +1 -1
  72. package/lib/components/TableBody/useTableBody.js.map +1 -1
  73. package/lib/components/TableCell/TableCell.js.map +1 -1
  74. package/lib/components/TableCell/TableCell.types.js +3 -1
  75. package/lib/components/TableCell/TableCell.types.js.map +1 -1
  76. package/lib/components/TableCell/index.js.map +1 -1
  77. package/lib/components/TableCell/renderTableCell.js.map +1 -1
  78. package/lib/components/TableCell/useTableCell.js.map +1 -1
  79. package/lib/components/TableCellActions/TableCellActions.js.map +1 -1
  80. package/lib/components/TableCellActions/TableCellActions.types.js +3 -1
  81. package/lib/components/TableCellActions/TableCellActions.types.js.map +1 -1
  82. package/lib/components/TableCellActions/index.js.map +1 -1
  83. package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -1
  84. package/lib/components/TableCellActions/useTableCellActions.js.map +1 -1
  85. package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -1
  86. package/lib/components/TableCellLayout/TableCellLayout.types.js +3 -1
  87. package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  88. package/lib/components/TableCellLayout/index.js.map +1 -1
  89. package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  90. package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  91. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
  92. package/lib/components/TableHeader/TableHeader.js.map +1 -1
  93. package/lib/components/TableHeader/TableHeader.types.js +3 -1
  94. package/lib/components/TableHeader/TableHeader.types.js.map +1 -1
  95. package/lib/components/TableHeader/index.js.map +1 -1
  96. package/lib/components/TableHeader/renderTableHeader.js.map +1 -1
  97. package/lib/components/TableHeader/useTableHeader.js.map +1 -1
  98. package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  99. package/lib/components/TableHeaderCell/TableHeaderCell.types.js +3 -1
  100. package/lib/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
  101. package/lib/components/TableHeaderCell/index.js.map +1 -1
  102. package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  103. package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  104. package/lib/components/TableResizeHandle/TableResizeHandle.js.map +1 -1
  105. package/lib/components/TableResizeHandle/TableResizeHandle.types.js +3 -1
  106. package/lib/components/TableResizeHandle/TableResizeHandle.types.js.map +1 -1
  107. package/lib/components/TableResizeHandle/index.js.map +1 -1
  108. package/lib/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -1
  109. package/lib/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
  110. package/lib/components/TableRow/TableRow.js.map +1 -1
  111. package/lib/components/TableRow/TableRow.types.js +3 -1
  112. package/lib/components/TableRow/TableRow.types.js.map +1 -1
  113. package/lib/components/TableRow/index.js.map +1 -1
  114. package/lib/components/TableRow/renderTableRow.js.map +1 -1
  115. package/lib/components/TableRow/useTableRow.js.map +1 -1
  116. package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  117. package/lib/components/TableSelectionCell/TableSelectionCell.types.js +3 -1
  118. package/lib/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
  119. package/lib/components/TableSelectionCell/index.js.map +1 -1
  120. package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  121. package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  122. package/lib/contexts/columnIdContext.js.map +1 -1
  123. package/lib/contexts/dataGridContext.js.map +1 -1
  124. package/lib/contexts/rowIdContext.js.map +1 -1
  125. package/lib/contexts/tableContext.js.map +1 -1
  126. package/lib/contexts/tableHeaderContext.js.map +1 -1
  127. package/lib/hooks/createColumn.js.map +1 -1
  128. package/lib/hooks/index.js.map +1 -1
  129. package/lib/hooks/types.js.map +1 -1
  130. package/lib/hooks/useKeyboardResizing.js.map +1 -1
  131. package/lib/hooks/useMeasureElement.js.map +1 -1
  132. package/lib/hooks/useTableColumnResizeMouseHandler.js.map +1 -1
  133. package/lib/hooks/useTableColumnResizeState.js.map +1 -1
  134. package/lib/hooks/useTableColumnSizing.js.map +1 -1
  135. package/lib/hooks/useTableCompositeNavigation.js.map +1 -1
  136. package/lib/hooks/useTableFeatures.js.map +1 -1
  137. package/lib/hooks/useTableSelection.js.map +1 -1
  138. package/lib/hooks/useTableSort.js.map +1 -1
  139. package/lib/index.js.map +1 -1
  140. package/lib/utils/columnResizeUtils.js.map +1 -1
  141. package/lib/utils/isColumnSortable.js.map +1 -1
  142. package/lib-commonjs/DataGrid.js.map +1 -1
  143. package/lib-commonjs/DataGridBody.js.map +1 -1
  144. package/lib-commonjs/DataGridCell.js.map +1 -1
  145. package/lib-commonjs/DataGridHeader.js.map +1 -1
  146. package/lib-commonjs/DataGridHeaderCell.js.map +1 -1
  147. package/lib-commonjs/DataGridRow.js.map +1 -1
  148. package/lib-commonjs/DataGridSelectionCell.js.map +1 -1
  149. package/lib-commonjs/Table.js.map +1 -1
  150. package/lib-commonjs/TableBody.js.map +1 -1
  151. package/lib-commonjs/TableCell.js.map +1 -1
  152. package/lib-commonjs/TableCellActions.js.map +1 -1
  153. package/lib-commonjs/TableCellLayout.js.map +1 -1
  154. package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -1
  155. package/lib-commonjs/TableHeader.js.map +1 -1
  156. package/lib-commonjs/TableHeaderCell.js.map +1 -1
  157. package/lib-commonjs/TableResizeHandle.js.map +1 -1
  158. package/lib-commonjs/TableRow.js.map +1 -1
  159. package/lib-commonjs/TableSelectionCell.js.map +1 -1
  160. package/lib-commonjs/components/DataGrid/DataGrid.js.map +1 -1
  161. package/lib-commonjs/components/DataGrid/DataGrid.types.js.map +1 -1
  162. package/lib-commonjs/components/DataGrid/index.js.map +1 -1
  163. package/lib-commonjs/components/DataGrid/renderDataGrid.js.map +1 -1
  164. package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -1
  165. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -1
  166. package/lib-commonjs/components/DataGrid/useDataGridStyles.styles.js.map +1 -1
  167. package/lib-commonjs/components/DataGridBody/DataGridBody.js.map +1 -1
  168. package/lib-commonjs/components/DataGridBody/DataGridBody.types.js.map +1 -1
  169. package/lib-commonjs/components/DataGridBody/index.js.map +1 -1
  170. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js.map +1 -1
  171. package/lib-commonjs/components/DataGridBody/useDataGridBody.js.map +1 -1
  172. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.styles.js.map +1 -1
  173. package/lib-commonjs/components/DataGridCell/DataGridCell.js.map +1 -1
  174. package/lib-commonjs/components/DataGridCell/DataGridCell.types.js +3 -1
  175. package/lib-commonjs/components/DataGridCell/DataGridCell.types.js.map +1 -1
  176. package/lib-commonjs/components/DataGridCell/index.js.map +1 -1
  177. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js.map +1 -1
  178. package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -1
  179. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.styles.js.map +1 -1
  180. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js.map +1 -1
  181. package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js +3 -1
  182. package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js.map +1 -1
  183. package/lib-commonjs/components/DataGridHeader/index.js.map +1 -1
  184. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
  185. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js.map +1 -1
  186. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.styles.js.map +1 -1
  187. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
  188. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js +3 -1
  189. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -1
  190. package/lib-commonjs/components/DataGridHeaderCell/index.js.map +1 -1
  191. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
  192. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  193. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js.map +1 -1
  194. package/lib-commonjs/components/DataGridRow/DataGridRow.js.map +1 -1
  195. package/lib-commonjs/components/DataGridRow/DataGridRow.types.js.map +1 -1
  196. package/lib-commonjs/components/DataGridRow/index.js.map +1 -1
  197. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js.map +1 -1
  198. package/lib-commonjs/components/DataGridRow/useDataGridRow.js.map +1 -1
  199. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.styles.js.map +1 -1
  200. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
  201. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js +3 -1
  202. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -1
  203. package/lib-commonjs/components/DataGridSelectionCell/index.js.map +1 -1
  204. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
  205. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
  206. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js.map +1 -1
  207. package/lib-commonjs/components/Table/Table.js.map +1 -1
  208. package/lib-commonjs/components/Table/Table.types.js +3 -1
  209. package/lib-commonjs/components/Table/Table.types.js.map +1 -1
  210. package/lib-commonjs/components/Table/index.js.map +1 -1
  211. package/lib-commonjs/components/Table/renderTable.js.map +1 -1
  212. package/lib-commonjs/components/Table/useTable.js.map +1 -1
  213. package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
  214. package/lib-commonjs/components/Table/useTableStyles.styles.js.map +1 -1
  215. package/lib-commonjs/components/TableBody/TableBody.js.map +1 -1
  216. package/lib-commonjs/components/TableBody/TableBody.types.js +3 -1
  217. package/lib-commonjs/components/TableBody/TableBody.types.js.map +1 -1
  218. package/lib-commonjs/components/TableBody/index.js.map +1 -1
  219. package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -1
  220. package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
  221. package/lib-commonjs/components/TableBody/useTableBodyStyles.styles.js.map +1 -1
  222. package/lib-commonjs/components/TableCell/TableCell.js.map +1 -1
  223. package/lib-commonjs/components/TableCell/TableCell.types.js +3 -1
  224. package/lib-commonjs/components/TableCell/TableCell.types.js.map +1 -1
  225. package/lib-commonjs/components/TableCell/index.js.map +1 -1
  226. package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
  227. package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
  228. package/lib-commonjs/components/TableCell/useTableCellStyles.styles.js.map +1 -1
  229. package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -1
  230. package/lib-commonjs/components/TableCellActions/TableCellActions.types.js +3 -1
  231. package/lib-commonjs/components/TableCellActions/TableCellActions.types.js.map +1 -1
  232. package/lib-commonjs/components/TableCellActions/index.js.map +1 -1
  233. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -1
  234. package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -1
  235. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.styles.js.map +1 -1
  236. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -1
  237. package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js +3 -1
  238. package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  239. package/lib-commonjs/components/TableCellLayout/index.js.map +1 -1
  240. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  241. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  242. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
  243. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.styles.js.map +1 -1
  244. package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -1
  245. package/lib-commonjs/components/TableHeader/TableHeader.types.js +3 -1
  246. package/lib-commonjs/components/TableHeader/TableHeader.types.js.map +1 -1
  247. package/lib-commonjs/components/TableHeader/index.js.map +1 -1
  248. package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -1
  249. package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
  250. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.styles.js.map +1 -1
  251. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  252. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js +3 -1
  253. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
  254. package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -1
  255. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  256. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  257. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.styles.js.map +1 -1
  258. package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.js.map +1 -1
  259. package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.types.js +3 -1
  260. package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.types.js.map +1 -1
  261. package/lib-commonjs/components/TableResizeHandle/index.js.map +1 -1
  262. package/lib-commonjs/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -1
  263. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
  264. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.styles.js.map +1 -1
  265. package/lib-commonjs/components/TableRow/TableRow.js.map +1 -1
  266. package/lib-commonjs/components/TableRow/TableRow.types.js +3 -1
  267. package/lib-commonjs/components/TableRow/TableRow.types.js.map +1 -1
  268. package/lib-commonjs/components/TableRow/index.js.map +1 -1
  269. package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -1
  270. package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
  271. package/lib-commonjs/components/TableRow/useTableRowStyles.styles.js.map +1 -1
  272. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  273. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js +3 -1
  274. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
  275. package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -1
  276. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  277. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  278. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.styles.js.map +1 -1
  279. package/lib-commonjs/contexts/columnIdContext.js +3 -3
  280. package/lib-commonjs/contexts/columnIdContext.js.map +1 -1
  281. package/lib-commonjs/contexts/dataGridContext.js +3 -3
  282. package/lib-commonjs/contexts/dataGridContext.js.map +1 -1
  283. package/lib-commonjs/contexts/rowIdContext.js +3 -3
  284. package/lib-commonjs/contexts/rowIdContext.js.map +1 -1
  285. package/lib-commonjs/contexts/tableContext.js +3 -3
  286. package/lib-commonjs/contexts/tableContext.js.map +1 -1
  287. package/lib-commonjs/contexts/tableHeaderContext.js.map +1 -1
  288. package/lib-commonjs/hooks/createColumn.js.map +1 -1
  289. package/lib-commonjs/hooks/index.js.map +1 -1
  290. package/lib-commonjs/hooks/types.js.map +1 -1
  291. package/lib-commonjs/hooks/useKeyboardResizing.js.map +1 -1
  292. package/lib-commonjs/hooks/useMeasureElement.js +3 -3
  293. package/lib-commonjs/hooks/useMeasureElement.js.map +1 -1
  294. package/lib-commonjs/hooks/useTableColumnResizeMouseHandler.js.map +1 -1
  295. package/lib-commonjs/hooks/useTableColumnResizeState.js.map +1 -1
  296. package/lib-commonjs/hooks/useTableColumnSizing.js.map +1 -1
  297. package/lib-commonjs/hooks/useTableCompositeNavigation.js.map +1 -1
  298. package/lib-commonjs/hooks/useTableFeatures.js.map +1 -1
  299. package/lib-commonjs/hooks/useTableSelection.js.map +1 -1
  300. package/lib-commonjs/hooks/useTableSort.js.map +1 -1
  301. package/lib-commonjs/index.js +213 -213
  302. package/lib-commonjs/index.js.map +1 -1
  303. package/lib-commonjs/utils/columnResizeUtils.js +7 -7
  304. package/lib-commonjs/utils/columnResizeUtils.js.map +1 -1
  305. package/lib-commonjs/utils/isColumnSortable.js.map +1 -1
  306. package/package.json +10 -10
@@ -1,4 +1,6 @@
1
- "use strict";
1
+ /**
2
+ * State used in rendering TableRow
3
+ */ "use strict";
2
4
  Object.defineProperty(exports, "__esModule", {
3
5
  value: true
4
6
  });
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":""}
1
+ {"version":3,"sources":["TableRow.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableRowSlots = {\n root: Slot<'tr', 'div'>;\n};\n\n/**\n * TableRow Props\n */\nexport type TableRowProps = ComponentProps<TableRowSlots> & {\n /**\n * A table row can have different variants. These appearances are\n * intended to be used with selection.\n * @default none\n */\n appearance?: 'brand' | 'neutral' | 'none';\n};\n\n/**\n * State used in rendering TableRow\n */\nexport type TableRowState = ComponentState<TableRowSlots> &\n Pick<TableContextValue, 'noNativeElements' | 'size'> &\n Pick<Required<TableRowProps>, 'appearance'> & {\n isHeaderRow: boolean;\n };\n"],"names":[],"rangeMappings":";;","mappings":"AAmBA;;CAEC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './TableRow';\nexport * from './TableRow.types';\nexport * from './renderTableRow';\nexport * from './useTableRow';\nexport * from './useTableRowStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './TableRow';\nexport * from './TableRow.types';\nexport * from './renderTableRow';\nexport * from './useTableRow';\nexport * from './useTableRowStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderTableRow.js"],"sourcesContent":[" import { jsx as _jsx } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of TableRow\n */ export const renderTableRow_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ _jsx(state.root, {});\n};\n"],"names":["renderTableRow_unstable","state","assertSlots","_jsx","root"],"mappings":";;;;+BAIiBA;;;eAAAA;;;4BAJa;gCACF;AAGjB,MAAMA,0BAA0B,CAACC;IACxCC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,eAAI,EAACF,MAAMG,IAAI,EAAE,CAAC;AAC3C"}
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":["renderTableRow_unstable","state","assertSlots","_jsx","root"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;4BAPb;gCAC4B;AAMrB,MAAMA,0BAA0B,CAACC;IACtCC,IAAAA,2BAAAA,EAA2BD;IAE3B,OAAA,WAAA,GAAOE,IAAAA,eAAA,EAACF,MAAMG,IAAI,EAAA,CAAA;AACpB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useTableRow.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useFocusVisible, useFocusWithin } from '@fluentui/react-tabster';\nimport { useTableContext } from '../../contexts/tableContext';\nimport { useIsInTableHeader } from '../../contexts/tableHeaderContext';\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 */ export const useTableRow_unstable = (props, ref)=>{\n const { noNativeElements, size } = useTableContext();\n var _props_as;\n const rootComponent = ((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : noNativeElements) ? 'div' : 'tr';\n const focusVisibleRef = useFocusVisible();\n const focusWithinRef = useFocusWithin();\n const isHeaderRow = useIsInTableHeader();\n var _props_appearance;\n return {\n components: {\n root: rootComponent\n },\n root: slot.always(getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\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 = props.appearance) !== null && _props_appearance !== void 0 ? _props_appearance : 'none',\n isHeaderRow\n };\n};\n"],"names":["useTableRow_unstable","props","ref","noNativeElements","size","useTableContext","_props_as","rootComponent","as","focusVisibleRef","useFocusVisible","focusWithinRef","useFocusWithin","isHeaderRow","useIsInTableHeader","_props_appearance","components","root","slot","always","getIntrinsicElementProps","useMergedRefs","role","undefined","elementType","appearance"],"mappings":";;;;+BAaiBA;;;eAAAA;;;;iEAbM;gCACuC;8BACd;8BAChB;oCACG;AASxB,MAAMA,uBAAuB,CAACC,OAAOC;IAC5C,MAAM,EAAEC,gBAAgB,EAAEC,IAAI,EAAE,GAAGC,IAAAA,6BAAe;IAClD,IAAIC;IACJ,MAAMC,gBAAgB,AAAC,CAAA,AAACD,CAAAA,YAAYL,MAAMO,EAAE,AAAD,MAAO,QAAQF,cAAc,KAAK,IAAIA,YAAYH,gBAAe,IAAK,QAAQ;IACzH,MAAMM,kBAAkBC,IAAAA,6BAAe;IACvC,MAAMC,iBAAiBC,IAAAA,4BAAc;IACrC,MAAMC,cAAcC,IAAAA,sCAAkB;IACtC,IAAIC;IACJ,OAAO;QACHC,YAAY;YACRC,MAAMV;QACV;QACAU,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAACb,eAAe;YACtD,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FL,KAAKmB,IAAAA,6BAAa,EAACnB,KAAKO,iBAAiBE;YACzCW,MAAMf,kBAAkB,QAAQ,QAAQgB;YACxC,GAAGtB,KAAK;QACZ,IAAI;YACAuB,aAAajB;QACjB;QACAH;QACAD;QACAsB,YAAY,AAACV,CAAAA,oBAAoBd,MAAMwB,UAAU,AAAD,MAAO,QAAQV,sBAAsB,KAAK,IAAIA,oBAAoB;QAClHF;IACJ;AACJ"}
1
+ {"version":3,"sources":["useTableRow.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, 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 getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, focusVisibleRef, focusWithinRef) as React.Ref<HTMLDivElement>,\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":["useTableRow_unstable","props","ref","noNativeElements","size","useTableContext","rootComponent","as","focusVisibleRef","useFocusVisible","focusWithinRef","useFocusWithin","isHeaderRow","useIsInTableHeader","components","root","slot","always","getIntrinsicElementProps","useMergedRefs","role","undefined","elementType","appearance"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAgBaA;;;eAAAA;;;;iEAhBU;gCACuC;8BACd;8BAEhB;oCACG;AAW5B,MAAMA,uBAAuB,CAACC,OAAsBC;IACzD,MAAM,EAAEC,gBAAgB,EAAEC,IAAI,EAAE,GAAGC,IAAAA,6BAAAA;QACbJ;IAAtB,MAAMK,gBAAgBL,CAAAA,CAAAA,YAAAA,MAAMM,EAAE,AAAFA,MAAE,QAARN,cAAAA,KAAAA,IAAAA,YAAYE,gBAAAA,IAAmB,QAAQ;IAC7D,MAAMK,kBAAkBC,IAAAA,6BAAAA;IACxB,MAAMC,iBAAiBC,IAAAA,4BAAAA;IACvB,MAAMC,cAAcC,IAAAA,sCAAAA;QAmBNZ;IAjBd,OAAO;QACLa,YAAY;YACVC,MAAMT;QACR;QACAS,MAAMC,oBAAAA,CAAKC,MAAM,CACfC,IAAAA,wCAAAA,EAAyBZ,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FJ,KAAKiB,IAAAA,6BAAAA,EAAcjB,KAAKM,iBAAiBE;YACzCU,MAAMd,kBAAkB,QAAQ,QAAQe;YACxC,GAAGpB,KAAK;QACV,IACA;YAAEqB,aAAahB;QAAc;QAE/BF;QACAD;QACAoB,YAAYtB,CAAAA,oBAAAA,MAAMsB,UAAU,AAAVA,MAAU,QAAhBtB,sBAAAA,KAAAA,IAAAA,oBAAoB;QAChCW;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useTableRowStyles.styles.js"],"sourcesContent":["import { __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { tableCellActionsClassNames } from '../TableCellActions/useTableCellActionsStyles.styles';\nimport { tableSelectionCellClassNames } from '../TableSelectionCell/useTableSelectionCellStyles.styles';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nexport const tableRowClassName = 'fui-TableRow';\nexport const tableRowClassNames = {\n root: tableRowClassName\n};\nconst useTableLayoutStyles = /*#__PURE__*/__styles({\n root: {\n mc9l5x: \"f1u0rzck\"\n }\n}, {\n d: [\".f1u0rzck{display:table-row;}\"]\n});\nconst useFlexLayoutStyles = /*#__PURE__*/__styles({\n root: {\n mc9l5x: \"f22iagw\",\n Bt984gj: \"f122n59\"\n }\n}, {\n d: [\".f22iagw{display:flex;}\", \".f122n59{align-items:center;}\"]\n});\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n sj55zd: \"f19n0e5\",\n B7ck84d: \"f1ewtqcl\",\n Bconypa: \"f1jazu75\",\n B6guboy: \"f1xeqee6\",\n Bfpq7zp: 0,\n g9k6zt: 0,\n Bn4voq9: 0,\n giviqs: \"f1dxfoyt\",\n Bw81rd7: 0,\n kdpuga: 0,\n dm238s: 0,\n B6xbmo0: 0,\n B3whbx2: \"f2krc9w\"\n },\n rootInteractive: {\n ecr2s2: \"f1wfn5kd\",\n lj723h: \"f1g4hkjv\",\n B43xm9u: \"f15ngxrw\",\n i921ia: \"fjbbrdp\",\n Jwef8y: \"f1t94bn6\",\n Bi91k9c: \"feu1g3u\",\n Bpt6rm4: \"f1uorfem\",\n ff6mpl: \"fw60kww\",\n ze5xyy: \"f4xjyn1\",\n pgvf35: \"ff1wgvm\",\n Bh7lczh: [\"fiob0tu\", \"f1x4h75k\"],\n dpv3f4: \"f1j6scgf\",\n Bpnjhaq: [\"f1x4h75k\", \"fiob0tu\"]\n },\n medium: {\n B9xav0g: 0,\n oivjwe: 0,\n Bn0qgzm: 0,\n Bgfg5da: \"f1facbz3\"\n },\n small: {\n B9xav0g: 0,\n oivjwe: 0,\n Bn0qgzm: 0,\n Bgfg5da: \"f1facbz3\"\n },\n \"extra-small\": {\n Be2twd7: \"fy9rknc\"\n },\n brand: {\n De3pzq: \"f16xkysk\",\n g2u3we: \"f1bh3yvw\",\n h3c5rm: [\"fmi79ni\", \"f11fozsx\"],\n B9xav0g: \"fnzw4c6\",\n zhjwy3: [\"f11fozsx\", \"fmi79ni\"],\n ecr2s2: \"f7tkmfy\",\n lj723h: \"f1r2dosr\",\n uu68id: 0,\n Bxeuatn: 0,\n felo30: 0,\n Bc736ss: 0,\n Bhz882k: 0,\n n51gp8: 0,\n Eshu5l: 0,\n Bk6ri7n: 0,\n v49c4f: 0,\n Bn1d65q: 0,\n c4eypz: 0,\n v3aym: 0,\n hft9gk: 0,\n Bjwas2f: 0,\n Bk5ld8o: 0,\n gwxt9v: 0,\n B6k8go: \"f95l9gw\",\n h6lo6r: 0,\n Beo2b4z: 0,\n w1pwid: 0,\n Btyw6ap: 0,\n Hkxhyr: \"fw8kmcu\",\n Brwvgy3: \"fd94n53\",\n yadkgm: \"f1e0wld5\"\n },\n neutral: {\n uu68id: 0,\n Bxeuatn: 0,\n felo30: 0,\n Bc736ss: 0,\n Bhz882k: 0,\n n51gp8: 0,\n Eshu5l: 0,\n Bk6ri7n: 0,\n v49c4f: 0,\n Bn1d65q: 0,\n c4eypz: 0,\n v3aym: 0,\n hft9gk: 0,\n Bjwas2f: 0,\n Bk5ld8o: 0,\n gwxt9v: 0,\n B6k8go: \"f95l9gw\",\n h6lo6r: 0,\n Beo2b4z: 0,\n w1pwid: 0,\n Btyw6ap: 0,\n Hkxhyr: \"fw8kmcu\",\n Brwvgy3: \"fd94n53\",\n yadkgm: \"f1e0wld5\",\n De3pzq: \"fq5gl1p\",\n sj55zd: \"f1cgsbmv\",\n Jwef8y: \"f1uqaxdt\",\n ecr2s2: \"fa9o754\",\n g2u3we: \"frmsihh\",\n h3c5rm: [\"frttxa5\", \"f11o2r7f\"],\n B9xav0g: \"fem5et0\",\n zhjwy3: [\"f11o2r7f\", \"frttxa5\"]\n },\n none: {}\n}, {\n d: [\".f19n0e5{color:var(--colorNeutralForeground1);}\", \".f1ewtqcl{box-sizing:border-box;}\", \".f1jazu75[data-fui-focus-within]:focus-within .fui-TableSelectionCell{opacity:1;}\", \".f1xeqee6[data-fui-focus-within]:focus-within .fui-TableCellActions{opacity:1;}\", [\".f1dxfoyt[data-fui-focus-visible]{outline:2px solid var(--colorStrokeFocus2);}\", {\n p: -1\n }], [\".f2krc9w[data-fui-focus-visible]{border-radius:var(--borderRadiusMedium);}\", {\n p: -1\n }], [\".f1facbz3{border-bottom:var(--strokeWidthThin) solid var(--colorNeutralStroke2);}\", {\n p: -1\n }], [\".f1facbz3{border-bottom:var(--strokeWidthThin) solid var(--colorNeutralStroke2);}\", {\n p: -1\n }], \".fy9rknc{font-size:var(--fontSizeBase200);}\", \".f16xkysk{background-color:var(--colorBrandBackground2);}\", \".f1bh3yvw{border-top-color:var(--colorTransparentStrokeInteractive);}\", \".fmi79ni{border-right-color:var(--colorTransparentStrokeInteractive);}\", \".f11fozsx{border-left-color:var(--colorTransparentStrokeInteractive);}\", \".fnzw4c6{border-bottom-color:var(--colorTransparentStrokeInteractive);}\", \".fq5gl1p{background-color:var(--colorSubtleBackgroundSelected);}\", \".f1cgsbmv{color:var(--colorNeutralForeground1Hover);}\", \".frmsihh{border-top-color:var(--colorNeutralStrokeOnBrand);}\", \".frttxa5{border-right-color:var(--colorNeutralStrokeOnBrand);}\", \".f11o2r7f{border-left-color:var(--colorNeutralStrokeOnBrand);}\", \".fem5et0{border-bottom-color:var(--colorNeutralStrokeOnBrand);}\"],\n a: [\".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}\", \".f1g4hkjv:active{color:var(--colorNeutralForeground1Pressed);}\", \".f15ngxrw:active .fui-TableCellActions{opacity:1;}\", \".fjbbrdp:active .fui-TableSelectionCell{opacity:1;}\", \".f7tkmfy:active{background-color:var(--colorBrandBackground2);}\", \".f1r2dosr:active{color:var(--colorNeutralForeground1);}\", \".fa9o754:active{background-color:var(--colorSubtleBackgroundSelected);}\"],\n h: [\".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}\", \".feu1g3u:hover{color:var(--colorNeutralForeground1Hover);}\", \".f1uorfem:hover .fui-TableCellActions{opacity:1;}\", \".fw60kww:hover .fui-TableSelectionCell{opacity:1;}\", \".f1uqaxdt:hover{background-color:var(--colorSubtleBackgroundSelected);}\"],\n m: [[\"@media (forced-colors: active){.f4xjyn1:hover{color:Highlight;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.ff1wgvm:hover{border-top-color:Highlight;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1x4h75k:hover{border-left-color:Highlight;}.fiob0tu:hover{border-right-color:Highlight;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1j6scgf:hover{border-bottom-color:Highlight;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f95l9gw{border:2px solid transparent;}}\", {\n p: -2,\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fw8kmcu{border-radius:var(--borderRadiusMedium);}}\", {\n p: -1,\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fd94n53{box-sizing:border-box;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1e0wld5:focus-visible{outline-offset:-4px;}}\", {\n m: \"(forced-colors: active)\"\n }]]\n});\n/**\n * Apply styling to the TableRow slots based on the state\n */\nexport const useTableRowStyles_unstable = state => {\n 'use no memo';\n\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles()\n };\n state.root.className = mergeClasses(tableRowClassNames.root, styles.root, !state.isHeaderRow && styles.rootInteractive, styles[state.size], state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, styles[state.appearance], state.root.className);\n return state;\n};\n//# sourceMappingURL=useTableRowStyles.styles.js.map"],"names":["tableRowClassName","tableRowClassNames","useTableRowStyles_unstable","root","useTableLayoutStyles","__styles","mc9l5x","d","useFlexLayoutStyles","Bt984gj","useStyles","sj55zd","B7ck84d","Bconypa","B6guboy","Bfpq7zp","g9k6zt","Bn4voq9","giviqs","Bw81rd7","kdpuga","dm238s","B6xbmo0","B3whbx2","rootInteractive","ecr2s2","lj723h","B43xm9u","i921ia","Jwef8y","Bi91k9c","Bpt6rm4","ff6mpl","ze5xyy","pgvf35","Bh7lczh","dpv3f4","Bpnjhaq","medium","B9xav0g","oivjwe","Bn0qgzm","Bgfg5da","small","Be2twd7","brand","De3pzq","g2u3we","h3c5rm","zhjwy3","uu68id","Bxeuatn","felo30","Bc736ss","Bhz882k","n51gp8","Eshu5l","Bk6ri7n","v49c4f","Bn1d65q","c4eypz","v3aym","hft9gk","Bjwas2f","Bk5ld8o","gwxt9v","B6k8go","h6lo6r","Beo2b4z","w1pwid","Btyw6ap","Hkxhyr","Brwvgy3","yadkgm","neutral","none","p","a","h","m","state","styles","layoutStyles","table","flex","className","mergeClasses","isHeaderRow","size","noNativeElements","appearance"],"mappings":";;;;;;;;;;;IAKaA,iBAAi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A0E;IAC/TC,GAAG;QAAC;YAAC;YAAoE;gBACvEA,GAAG;YACL;SAAE;QAAE;YAAC;YAA+E;gBAClFA,GAAG;YACL;SAAE;QAAE;YAAC;YAA8H;gBACjIA,GAAG;YACL;SAAE;QAAE;YAAC;YAAmF;gBACtFA,GAAG;YACL;SAAE;QAAE;YAAC;YAA2E;gBAC9EH,GAAG,CAAC;gBACJG,GAAG;YACL;SAAE;QAAE;YAAC;YAAsF;gBACzFH,GAAG,CAAC;gBACJG,GAAG;YACL;SAAE;QAAE;YAAC;YAAoE;gBACvEA,GAAG;YACL;SAAE;QAAE;YAAC;YAAiF;gBACpFA,GAAG;YACL;SAAE;KAAC;AACL;AAIO,MAAM7E,6BAA6B8E,CAAAA;IACxC;IAEA,MAAMC,SAASvE;IACf,MAAMwE,eAAe;QACnBC,OAAO/E;QACPgF,MAAM5E;IACR;IACAwE,MAAM7E,IAAI,CAACkF,SAAS,GAAGC,IAAAA,mBAAY,EAACrF,mBAAmBE,IAAI,EAAE8E,OAAO9E,IAAI,EAAE,CAAC6E,MAAMO,WAAW,IAAIN,OAAOzD,eAAe,EAAEyD,MAAM,CAACD,MAAMQ,IAAI,CAAC,EAAER,MAAMS,gBAAgB,GAAGP,aAAaE,IAAI,CAACjF,IAAI,GAAG+E,aAAaC,KAAK,CAAChF,IAAI,EAAE8E,MAAM,CAACD,MAAMU,UAAU,CAAC,EAAEV,MAAM7E,IAAI,CAACkF,SAAS;IACrQ,OAAOL;AACT,GACA,oDAAoD"}
1
+ {"version":3,"sources":["useTableRowStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { tableCellActionsClassNames } from '../TableCellActions/useTableCellActionsStyles.styles';\nimport { tableSelectionCellClassNames } from '../TableSelectionCell/useTableSelectionCellStyles.styles';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nexport const tableRowClassName = 'fui-TableRow';\nexport const tableRowClassNames = {\n root: tableRowClassName\n};\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-row'\n }\n});\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center'\n }\n});\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForeground1,\n boxSizing: 'border-box',\n ...createCustomFocusIndicatorStyle({\n [`& .${tableSelectionCellClassNames.root}`]: {\n opacity: 1\n },\n [`& .${tableCellActionsClassNames.root}`]: {\n opacity: 1\n }\n }, {\n selector: 'focus-within'\n }),\n ...createCustomFocusIndicatorStyle({\n outline: `2px solid ${tokens.colorStrokeFocus2}`,\n borderRadius: tokens.borderRadiusMedium\n }, {\n selector: 'focus'\n })\n },\n rootInteractive: {\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n color: tokens.colorNeutralForeground1Pressed,\n [`& .${tableCellActionsClassNames.root}`]: {\n opacity: 1\n },\n [`& .${tableSelectionCellClassNames.root}`]: {\n opacity: 1\n }\n },\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n color: tokens.colorNeutralForeground1Hover,\n [`& .${tableCellActionsClassNames.root}`]: {\n opacity: 1\n },\n [`& .${tableSelectionCellClassNames.root}`]: {\n opacity: 1\n }\n },\n // High contrast styles\n '@media (forced-colors: active)': {\n ':hover': {\n color: 'Highlight',\n ...shorthands.borderColor('Highlight')\n }\n }\n },\n medium: {\n borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}`\n },\n small: {\n borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}`\n },\n 'extra-small': {\n fontSize: tokens.fontSizeBase200\n },\n brand: {\n backgroundColor: tokens.colorBrandBackground2,\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n ':active': {\n backgroundColor: tokens.colorBrandBackground2,\n color: tokens.colorNeutralForeground1\n },\n '@media(forced-colors: active)': {\n border: '2px solid transparent',\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n ':focus-visible': {\n outlineOffset: '-4px'\n }\n }\n },\n neutral: {\n '@media(forced-colors: active)': {\n border: '2px solid transparent',\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n ':focus-visible': {\n outlineOffset: '-4px'\n }\n },\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n color: tokens.colorNeutralForeground1Hover,\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundSelected\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundSelected\n },\n ...shorthands.borderColor(tokens.colorNeutralStrokeOnBrand)\n },\n none: {}\n});\n/**\n * Apply styling to the TableRow slots based on the state\n */ export const useTableRowStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles()\n };\n state.root.className = mergeClasses(tableRowClassNames.root, styles.root, !state.isHeaderRow && styles.rootInteractive, styles[state.size], state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, styles[state.appearance], state.root.className);\n return state;\n};\n"],"names":["tableRowClassName","tableRowClassNames","useTableRowStyles_unstable","root","useTableLayoutStyles","__styles","mc9l5x","d","useFlexLayoutStyles","Bt984gj","useStyles","sj55zd","B7ck84d","Bconypa","B6guboy","Bfpq7zp","g9k6zt","Bn4voq9","giviqs","Bw81rd7","kdpuga","dm238s","B6xbmo0","B3whbx2","rootInteractive","ecr2s2","lj723h","B43xm9u","i921ia","Jwef8y","Bi91k9c","Bpt6rm4","ff6mpl","ze5xyy","pgvf35","Bh7lczh","dpv3f4","Bpnjhaq","medium","B9xav0g","oivjwe","Bn0qgzm","Bgfg5da","small","Be2twd7","brand","De3pzq","g2u3we","h3c5rm","zhjwy3","uu68id","Bxeuatn","felo30","Bc736ss","Bhz882k","n51gp8","Eshu5l","Bk6ri7n","v49c4f","Bn1d65q","c4eypz","v3aym","hft9gk","Bjwas2f","Bk5ld8o","gwxt9v","B6k8go","h6lo6r","Beo2b4z","w1pwid","Btyw6ap","Hkxhyr","Brwvgy3","yadkgm","neutral","none","p","a","h","m","state","styles","layoutStyles","table","flex","className","mergeClasses","isHeaderRow","size","noNativeElements","appearance"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,iBAAiB;eAAjBA;;IACAC,kBAAkB;eAAlBA;;IAkHIC,0BAA0B;eAA1BA;;;uBAxHoC;AAK9C,MAAMF,oBAAoB;AAC1B,MAAMC,qBAAqB;IAC9BE,MAAMH;AACV;AACA,MAAMI,uBAAoB,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAF,MAAA;QAAAG,QAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;KAAA;AAAA;AAK7B,MAAMC,sBAAmB,WAAA,GAAGH,IAAAA,eAAA,EAAA;IAAAF,MAAA;QAAAG,QAAA;QAAAG,SAAA;IAAA;AAAA,GAAA;IAAAF,GAAA;QAAA;QAAA;KAAA;AAAA;AAM5B;;CAEA,GAAI,MAAMG,YAAS,WAAA,GAAGL,IAAAA,eAAA,EAAA;IAAAF,MAAA;QAAAQ,QAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,SAAA;IAAA;IAAAC,iBAAA;QA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O,WAAW,IAAIN,OAAOzD,eAAe,EAAEyD,MAAM,CAACD,MAAMQ,IAAI,CAAC,EAAER,MAAMS,gBAAgB,GAAGP,aAAaE,IAAI,CAACjF,IAAI,GAAG+E,aAAaC,KAAK,CAAChF,IAAI,EAAE8E,MAAM,CAACD,MAAMU,UAAU,CAAC,EAAEV,MAAM7E,IAAI,CAACkF,SAAS;IACrQ,OAAOL;AACX"}
@@ -1 +1 @@
1
- {"version":3,"sources":["TableSelectionCell.js"],"sourcesContent":["import * as React from 'react';\nimport { useTableSelectionCell_unstable } from './useTableSelectionCell';\nimport { renderTableSelectionCell_unstable } from './renderTableSelectionCell';\nimport { useTableSelectionCellStyles_unstable } from './useTableSelectionCellStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * TableSelectionCell component\n */ export const TableSelectionCell = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useTableSelectionCell_unstable(props, ref);\n useTableSelectionCellStyles_unstable(state);\n useCustomStyleHook_unstable('useTableSelectionCellStyles_unstable')(state);\n return renderTableSelectionCell_unstable(state);\n});\nTableSelectionCell.displayName = 'TableSelectionCell';\n"],"names":["TableSelectionCell","React","forwardRef","props","ref","state","useTableSelectionCell_unstable","useTableSelectionCellStyles_unstable","useCustomStyleHook_unstable","renderTableSelectionCell_unstable","displayName"],"mappings":";;;;+BAOiBA;;;eAAAA;;;;iEAPM;uCACwB;0CACG;mDACG;qCACT;AAGjC,MAAMA,qBAAqB,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACzE,MAAMC,QAAQC,IAAAA,qDAA8B,EAACH,OAAOC;IACpDG,IAAAA,uEAAoC,EAACF;IACrCG,IAAAA,gDAA2B,EAAC,wCAAwCH;IACpE,OAAOI,IAAAA,2DAAiC,EAACJ;AAC7C;AACAL,mBAAmBU,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":["TableSelectionCell","React","forwardRef","props","ref","state","useTableSelectionCell_unstable","useTableSelectionCellStyles_unstable","useCustomStyleHook_unstable","renderTableSelectionCell_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;uCACwB;0CACG;mDACG;qCAGT;AAKrC,MAAMA,qBAAAA,WAAAA,GAAmEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACvG,MAAMC,QAAQC,IAAAA,qDAAAA,EAA+BH,OAAOC;IAEpDG,IAAAA,uEAAAA,EAAqCF;IAErCG,IAAAA,gDAAAA,EAA4B,wCAAwCH;IAEpE,OAAOI,IAAAA,2DAAAA,EAAkCJ;AAC3C;AAEAL,mBAAmBU,WAAW,GAAG"}
@@ -1,4 +1,6 @@
1
- "use strict";
1
+ /**
2
+ * State used in rendering TableSelectionCell
3
+ */ "use strict";
2
4
  Object.defineProperty(exports, "__esModule", {
3
5
  value: true
4
6
  });
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":""}
1
+ {"version":3,"sources":["TableSelectionCell.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { Checkbox, CheckboxProps } from '@fluentui/react-checkbox';\nimport type { Radio } from '@fluentui/react-radio';\nimport { TableCellSlots } from '../TableCell/TableCell.types';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableSelectionCellSlots = {\n /**\n * Selection indicator if selection type is checkbox\n */\n checkboxIndicator: Slot<typeof Checkbox>;\n /**\n * Selection indicator if selection type is radio\n */\n radioIndicator: Slot<typeof Radio>;\n} & Pick<TableCellSlots, 'root'>;\n\n/**\n * TableSelectionCell Props\n */\nexport type TableSelectionCellProps = ComponentProps<Partial<TableSelectionCellSlots>> & {\n /**\n * A table can have two kinds of selection modes.\n * @default checkbox\n */\n type?: 'checkbox' | 'radio';\n\n /**\n * @default false\n */\n checked?: CheckboxProps['checked'];\n\n /**\n * Only visible when checked or the parent row is hovered/focused\n * @default false\n */\n subtle?: boolean;\n\n /**\n * Completely hides the selection cell\n * @deprecated cells should never use hidden, since doing so breaks table structure and screen reader navigation. Use `invisible` instead.\n */\n hidden?: boolean;\n\n /**\n * Hides the selection cell visually but takes up the same space\n * @default false\n */\n invisible?: boolean;\n};\n\n/**\n * State used in rendering TableSelectionCell\n */\nexport type TableSelectionCellState = ComponentState<TableSelectionCellSlots> &\n Pick<Required<TableSelectionCellProps>, 'type' | 'checked' | 'subtle'> &\n Pick<TableContextValue, 'noNativeElements'> & {\n /* Visually hides the selection cell; not deprecated on state */\n hidden: boolean;\n };\n"],"names":[],"rangeMappings":";;","mappings":"AAmDA;;CAEC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './TableSelectionCell';\nexport * from './TableSelectionCell.types';\nexport * from './renderTableSelectionCell';\nexport * from './useTableSelectionCell';\nexport * from './useTableSelectionCellStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './TableSelectionCell';\nexport * from './TableSelectionCell.types';\nexport * from './renderTableSelectionCell';\nexport * from './useTableSelectionCell';\nexport * from './useTableSelectionCellStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderTableSelectionCell.js"],"sourcesContent":[" import { jsx as _jsx, jsxs as _jsxs } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of TableSelectionCell\n */ export const renderTableSelectionCell_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ _jsxs(state.root, {\n children: [\n state.type === 'checkbox' && state.checkboxIndicator && /*#__PURE__*/ _jsx(state.checkboxIndicator, {}),\n state.type === 'radio' && state.radioIndicator && /*#__PURE__*/ _jsx(state.radioIndicator, {})\n ]\n });\n};\n"],"names":["renderTableSelectionCell_unstable","state","assertSlots","_jsxs","root","children","type","checkboxIndicator","_jsx","radioIndicator"],"mappings":";;;;+BAIiBA;;;eAAAA;;;4BAJ4B;gCACjB;AAGjB,MAAMA,oCAAoC,CAACC;IAClDC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,gBAAK,EAACF,MAAMG,IAAI,EAAE;QACnCC,UAAU;YACNJ,MAAMK,IAAI,KAAK,cAAcL,MAAMM,iBAAiB,IAAI,WAAW,GAAGC,IAAAA,eAAI,EAACP,MAAMM,iBAAiB,EAAE,CAAC;YACrGN,MAAMK,IAAI,KAAK,WAAWL,MAAMQ,cAAc,IAAI,WAAW,GAAGD,IAAAA,eAAI,EAACP,MAAMQ,cAAc,EAAE,CAAC;SAC/F;IACL;AACJ"}
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":["renderTableSelectionCell_unstable","state","assertSlots","_jsxs","root","type","checkboxIndicator","_jsx","radioIndicator"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;4BAPb;gCAC4B;AAMrB,MAAMA,oCAAoC,CAACC;IAChDC,IAAAA,2BAAAA,EAAqCD;IAErC,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAACF,MAAMG,IAAI,EAAA;;YACRH,MAAMI,IAAI,KAAK,cAAcJ,MAAMK,iBAAiB,IAAA,WAAA,GAAIC,IAAAA,eAAA,EAACN,MAAMK,iBAAiB,EAAA,CAAA;YAEhFL,MAAMI,IAAI,KAAK,WAAWJ,MAAMO,cAAc,IAAA,WAAA,GAAID,IAAAA,eAAA,EAACN,MAAMO,cAAc,EAAA,CAAA;;;AAG9E"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useTableSelectionCell.js"],"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 { useTableCell_unstable } from '../TableCell/useTableCell';\nimport { useTableContext } from '../../contexts/tableContext';\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 */ export const useTableSelectionCell_unstable = (props, ref)=>{\n const tableCellState = useTableCell_unstable(props, ref);\n const { noNativeElements } = useTableContext();\n const { type = 'checkbox', checked = false, subtle = false, // eslint-disable-next-line deprecation/deprecation\n hidden = false, invisible = false } = props;\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' && !invisible,\n defaultProps: {\n checked: props.checked\n },\n elementType: Checkbox\n }),\n radioIndicator: slot.optional(props.radioIndicator, {\n renderByDefault: type === 'radio' && !invisible,\n defaultProps: {\n checked: !!checked,\n input: {\n name: useId('table-selection-radio')\n }\n },\n elementType: Radio\n }),\n type,\n checked,\n noNativeElements,\n subtle,\n hidden: invisible || hidden\n };\n};\n"],"names":["useTableSelectionCell_unstable","props","ref","tableCellState","useTableCell_unstable","noNativeElements","useTableContext","type","checked","subtle","hidden","invisible","components","checkboxIndicator","Checkbox","radioIndicator","Radio","slot","optional","renderByDefault","defaultProps","elementType","input","name","useId"],"mappings":";;;;+BAciBA;;;eAAAA;;;;iEAdM;gCACK;+BACH;4BACH;8BACgB;8BACN;AASrB,MAAMA,iCAAiC,CAACC,OAAOC;IACtD,MAAMC,iBAAiBC,IAAAA,mCAAqB,EAACH,OAAOC;IACpD,MAAM,EAAEG,gBAAgB,EAAE,GAAGC,IAAAA,6BAAe;IAC5C,MAAM,EAAEC,OAAO,UAAU,EAAEC,UAAU,KAAK,EAAEC,SAAS,KAAK,EAC1DC,SAAS,KAAK,EAAEC,YAAY,KAAK,EAAE,GAAGV;IACtC,OAAO;QACH,GAAGE,cAAc;QACjBS,YAAY;YACR,GAAGT,eAAeS,UAAU;YAC5BC,mBAAmBC,uBAAQ;YAC3BC,gBAAgBC,iBAAK;QACzB;QACAH,mBAAmBI,oBAAI,CAACC,QAAQ,CAACjB,MAAMY,iBAAiB,EAAE;YACtDM,iBAAiBZ,SAAS,cAAc,CAACI;YACzCS,cAAc;gBACVZ,SAASP,MAAMO,OAAO;YAC1B;YACAa,aAAaP,uBAAQ;QACzB;QACAC,gBAAgBE,oBAAI,CAACC,QAAQ,CAACjB,MAAMc,cAAc,EAAE;YAChDI,iBAAiBZ,SAAS,WAAW,CAACI;YACtCS,cAAc;gBACVZ,SAAS,CAAC,CAACA;gBACXc,OAAO;oBACHC,MAAMC,IAAAA,qBAAK,EAAC;gBAChB;YACJ;YACAH,aAAaL,iBAAK;QACtB;QACAT;QACAC;QACAH;QACAI;QACAC,QAAQC,aAAaD;IACzB;AACJ"}
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 {\n type = 'checkbox',\n checked = false,\n subtle = false,\n // eslint-disable-next-line deprecation/deprecation\n hidden = false,\n invisible = false,\n } = 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' && !invisible,\n defaultProps: { checked: props.checked },\n elementType: Checkbox,\n }),\n radioIndicator: slot.optional(props.radioIndicator, {\n renderByDefault: type === 'radio' && !invisible,\n defaultProps: { checked: !!checked, input: { name: useId('table-selection-radio') } },\n elementType: Radio,\n }),\n type,\n checked,\n noNativeElements,\n subtle,\n hidden: invisible || hidden,\n };\n};\n"],"names":["useTableSelectionCell_unstable","props","ref","tableCellState","useTableCell_unstable","noNativeElements","useTableContext","type","checked","subtle","hidden","invisible","components","checkboxIndicator","Checkbox","radioIndicator","Radio","slot","optional","renderByDefault","defaultProps","elementType","input","name","useId"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAiBaA;;;eAAAA;;;;iEAjBU;gCACK;+BACH;4BACH;8BAEgB;8BACN;AAWzB,MAAMA,iCAAiC,CAC5CC,OACAC;IAEA,MAAMC,iBAAiBC,IAAAA,mCAAAA,EAAsBH,OAAOC;IACpD,MAAM,EAAEG,gBAAgB,EAAE,GAAGC,IAAAA,6BAAAA;IAC7B,MAAM,EACJC,OAAO,UAAU,EACjBC,UAAU,KAAK,EACfC,SAAS,KAAK,EAEdC,SAAS,KAAK,EACdC,YAAY,KAAK,EAClB,GAAGV;IAEJ,OAAO;QACL,GAAGE,cAAc;QACjBS,YAAY;YACV,GAAGT,eAAeS,UAAU;YAC5BC,mBAAmBC,uBAAAA;YACnBC,gBAAgBC,iBAAAA;QAClB;QACAH,mBAAmBI,oBAAAA,CAAKC,QAAQ,CAACjB,MAAMY,iBAAiB,EAAE;YACxDM,iBAAiBZ,SAAS,cAAc,CAACI;YACzCS,cAAc;gBAAEZ,SAASP,MAAMO,OAAO;YAAC;YACvCa,aAAaP,uBAAAA;QACf;QACAC,gBAAgBE,oBAAAA,CAAKC,QAAQ,CAACjB,MAAMc,cAAc,EAAE;YAClDI,iBAAiBZ,SAAS,WAAW,CAACI;YACtCS,cAAc;gBAAEZ,SAAS,CAAC,CAACA;gBAASc,OAAO;oBAAEC,MAAMC,IAAAA,qBAAAA,EAAM;gBAAyB;YAAE;YACpFH,aAAaL,iBAAAA;QACf;QACAT;QACAC;QACAH;QACAI;QACAC,QAAQC,aAAaD;IACvB;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useTableSelectionCellStyles.styles.js"],"sourcesContent":["import { __styles, mergeClasses } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nexport const CELL_WIDTH = 44;\nexport const tableSelectionCellClassNames = {\n root: 'fui-TableSelectionCell',\n checkboxIndicator: 'fui-TableSelectionCell__checkboxIndicator',\n radioIndicator: 'fui-TableSelectionCell__radioIndicator'\n};\nconst useTableLayoutStyles = /*#__PURE__*/__styles({\n root: {\n mc9l5x: \"f15pt5es\",\n a9b677: \"fksc0bp\"\n }\n}, {\n d: [\".f15pt5es{display:table-cell;}\", \".fksc0bp{width:44px;}\"]\n});\nconst useFlexLayoutStyles = /*#__PURE__*/__styles({\n root: {\n mc9l5x: \"f22iagw\",\n xawz: 0,\n Bh6795r: 0,\n Bnnss6s: 0,\n fkmc3a: \"f1izfyrr\",\n Bf4jedk: \"fvrlu0f\",\n B2u0y6b: \"f1c71y05\",\n Brf1p80: \"f4d9j23\"\n }\n}, {\n d: [\".f22iagw{display:flex;}\", [\".f1izfyrr{flex:1 1 0px;}\", {\n p: -1\n }], \".fvrlu0f{min-width:44px;}\", \".f1c71y05{max-width:44px;}\", \".f4d9j23{justify-content:center;}\"]\n});\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n fsow6f: \"f17mccla\",\n Huce71: \"fz5stix\",\n Byoj8tv: 0,\n uwmqm3: 0,\n z189sj: 0,\n z8tnut: 0,\n B0ocmuz: \"f1mk8lai\",\n Bfpq7zp: 0,\n g9k6zt: 0,\n Bn4voq9: 0,\n giviqs: \"f1dxfoyt\",\n Bw81rd7: 0,\n kdpuga: 0,\n dm238s: 0,\n B6xbmo0: 0,\n B3whbx2: \"f2krc9w\"\n },\n radioIndicator: {\n mc9l5x: \"f22iagw\",\n Bh6795r: \"fqerorx\",\n Bt984gj: \"f122n59\",\n Brf1p80: \"f4d9j23\"\n },\n subtle: {\n abs64n: \"fk73vx1\",\n B8a84jv: \"f1y7ij6c\"\n },\n hidden: {\n abs64n: \"fk73vx1\"\n }\n}, {\n d: [\".f17mccla{text-align:center;}\", \".fz5stix{white-space:nowrap;}\", [\".f1mk8lai{padding:0;}\", {\n p: -1\n }], [\".f1dxfoyt[data-fui-focus-visible]{outline:2px solid var(--colorStrokeFocus2);}\", {\n p: -1\n }], [\".f2krc9w[data-fui-focus-visible]{border-radius:var(--borderRadiusMedium);}\", {\n p: -1\n }], \".f22iagw{display:flex;}\", \".fqerorx{flex-grow:1;}\", \".f122n59{align-items:center;}\", \".f4d9j23{justify-content:center;}\", \".fk73vx1{opacity:0;}\", \".f1y7ij6c[data-fui-focus-within]:focus-within{opacity:1;}\"]\n});\n/**\n * Apply styling to the TableSelectionCell slots based on the state\n */\nexport const useTableSelectionCellStyles_unstable = state => {\n 'use no memo';\n\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles()\n };\n state.root.className = mergeClasses(tableSelectionCellClassNames.root, styles.root, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.subtle && state.checked === false && styles.subtle, state.hidden && styles.hidden, state.root.className);\n if (state.checkboxIndicator) {\n state.checkboxIndicator.className = mergeClasses(tableSelectionCellClassNames.checkboxIndicator, state.checkboxIndicator.className);\n }\n if (state.radioIndicator) {\n state.radioIndicator.className = mergeClasses(tableSelectionCellClassNames.radioIndicator, styles.radioIndicator, state.radioIndicator.className);\n }\n return state;\n};\n//# sourceMappingURL=useTableSelectionCellStyles.styles.js.map"],"names":["CELL_WIDTH","tableSelectionCellClassNames","useTableSelectionCellStyles_unstable","root","checkboxIndicator","radioIndicator","useTableLayoutStyles","__styles","mc9l5x","a9b677","d","useFlexLayoutStyles","xawz","Bh6795r","Bnnss6s","fkmc3a","Bf4jedk","B2u0y6b","Brf1p80","p","useStyles","fsow6f","Huce71","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","Bfpq7zp","g9k6zt","Bn4voq9","giviqs","Bw81rd7","kdpuga","dm238s","B6xbmo0","B3whbx2","Bt984gj","subtle","abs64n","B8a84jv","hidden","state","styles","layoutStyles","table","flex","className","mergeClasses","noNativeElements","checked"],"mappings":";;;;;;;;;;;IAGaA,UAAU;eAAVA;;IACAC,4BAA4B;eAA5BA;;IA4EAC,oCAAoC;eAApCA;;;uBAhF0B;AAGhC,MAAMF,aAAa;AACnB,MAAMC,+BAA+B;IAC1CE,MAAM;IACNC,mBAAmB;IACnBC,gBAAgB;AAClB;AACA,MAAMC,uBAAuB,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IACjDJ,MAAM;QACJK,QAAQ;QACRC,QAAQ;IACV;AACF,GAAG;IACDC,GAAG;QAAC;QAAkC;KAAwB;AAChE;AACA,MAAMC,sBAAsB,WAAW,GAAEJ,IAAAA,eAAQ,EAAC;IAChDJ,MAAM;QACJK,QAAQ;QACRI,MAAM;QACNC,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,SAAS;IACX;AACF,GAAG;IACDR,GAAG;QAAC;QAA2B;YAAC;YAA4B;gBAC1DS,GAAG,CAAC;YACN;SAAE;QAAE;QAA6B;QAA8B;KAAoC;AACrG;AACA;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEb,IAAAA,eAAQ,EAAC;IACtCJ,MAAM;QACJkB,QAAQ;QACRC,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,QAAQ;QACRC,SAAS;QACTC,SAAS;IACX;IACA/B,gBAAgB;QACdG,QAAQ;QACRK,SAAS;QACTwB,SAAS;QACTnB,SAAS;IACX;IACAoB,QAAQ;QACNC,QAAQ;QACRC,SAAS;IACX;IACAC,QAAQ;QACNF,QAAQ;IACV;AACF,GAAG;IACD7B,GAAG;QAAC;QAAiC;QAAiC;YAAC;YAAyB;gBAC9FS,GAAG,CAAC;YACN;SAAE;QAAE;YAAC;YAAkF;gBACrFA,GAAG,CAAC;YACN;SAAE;QAAE;YAAC;YAA8E;gBACjFA,GAAG,CAAC;YACN;SAAE;QAAE;QAA2B;QAA0B;QAAiC;QAAqC;QAAwB;KAA4D;AACrN;AAIO,MAAMjB,uCAAuCwC,CAAAA;IAClD;IAEA,MAAMC,SAASvB;IACf,MAAMwB,eAAe;QACnBC,OAAOvC;QACPwC,MAAMnC;IACR;IACA+B,MAAMvC,IAAI,CAAC4C,SAAS,GAAGC,IAAAA,mBAAY,EAAC/C,6BAA6BE,IAAI,EAAEwC,OAAOxC,IAAI,EAAEuC,MAAMO,gBAAgB,GAAGL,aAAaE,IAAI,CAAC3C,IAAI,GAAGyC,aAAaC,KAAK,CAAC1C,IAAI,EAAEuC,MAAMJ,MAAM,IAAII,MAAMQ,OAAO,KAAK,SAASP,OAAOL,MAAM,EAAEI,MAAMD,MAAM,IAAIE,OAAOF,MAAM,EAAEC,MAAMvC,IAAI,CAAC4C,SAAS;IAC5Q,IAAIL,MAAMtC,iBAAiB,EAAE;QAC3BsC,MAAMtC,iBAAiB,CAAC2C,SAAS,GAAGC,IAAAA,mBAAY,EAAC/C,6BAA6BG,iBAAiB,EAAEsC,MAAMtC,iBAAiB,CAAC2C,SAAS;IACpI;IACA,IAAIL,MAAMrC,cAAc,EAAE;QACxBqC,MAAMrC,cAAc,CAAC0C,SAAS,GAAGC,IAAAA,mBAAY,EAAC/C,6BAA6BI,cAAc,EAAEsC,OAAOtC,cAAc,EAAEqC,MAAMrC,cAAc,CAAC0C,SAAS;IAClJ;IACA,OAAOL;AACT,GACA,8DAA8D"}
1
+ {"version":3,"sources":["useTableSelectionCellStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nexport const CELL_WIDTH = 44;\nexport const tableSelectionCellClassNames = {\n root: 'fui-TableSelectionCell',\n checkboxIndicator: 'fui-TableSelectionCell__checkboxIndicator',\n radioIndicator: 'fui-TableSelectionCell__radioIndicator'\n};\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-cell',\n width: `${CELL_WIDTH}px`\n }\n});\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'flex',\n flex: '1 1 0px',\n minWidth: `${CELL_WIDTH}px`,\n maxWidth: `${CELL_WIDTH}px`,\n justifyContent: 'center'\n }\n});\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n textAlign: 'center',\n whiteSpace: 'nowrap',\n padding: '0',\n ...createCustomFocusIndicatorStyle({\n outline: `2px solid ${tokens.colorStrokeFocus2}`,\n borderRadius: tokens.borderRadiusMedium\n }, {\n selector: 'focus'\n })\n },\n radioIndicator: {\n display: 'flex',\n flexGrow: 1,\n alignItems: 'center',\n justifyContent: 'center'\n },\n subtle: {\n opacity: 0,\n ...createCustomFocusIndicatorStyle({\n opacity: 1\n }, {\n selector: 'focus-within'\n })\n },\n hidden: {\n opacity: 0\n }\n});\n/**\n * Apply styling to the TableSelectionCell slots based on the state\n */ export const useTableSelectionCellStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles()\n };\n state.root.className = mergeClasses(tableSelectionCellClassNames.root, styles.root, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.subtle && state.checked === false && styles.subtle, state.hidden && styles.hidden, state.root.className);\n if (state.checkboxIndicator) {\n state.checkboxIndicator.className = mergeClasses(tableSelectionCellClassNames.checkboxIndicator, state.checkboxIndicator.className);\n }\n if (state.radioIndicator) {\n state.radioIndicator.className = mergeClasses(tableSelectionCellClassNames.radioIndicator, styles.radioIndicator, state.radioIndicator.className);\n }\n return state;\n};\n"],"names":["CELL_WIDTH","tableSelectionCellClassNames","useTableSelectionCellStyles_unstable","root","checkboxIndicator","radioIndicator","useTableLayoutStyles","__styles","mc9l5x","a9b677","d","useFlexLayoutStyles","xawz","Bh6795r","Bnnss6s","fkmc3a","Bf4jedk","B2u0y6b","Brf1p80","p","useStyles","fsow6f","Huce71","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","Bfpq7zp","g9k6zt","Bn4voq9","giviqs","Bw81rd7","kdpuga","dm238s","B6xbmo0","B3whbx2","Bt984gj","subtle","abs64n","B8a84jv","hidden","state","styles","layoutStyles","table","flex","className","mergeClasses","noNativeElements","checked"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAGaA,UAAU;eAAVA;;IACAC,4BAA4B;eAA5BA;;IAsDIC,oCAAoC;eAApCA;;;uBA1DwB;AAGlC,MAAMF,aAAa;AACnB,MAAMC,+BAA+B;IACxCE,MAAM;IACNC,mBAAmB;IACnBC,gBAAgB;AACpB;AACA,MAAMC,uBAAoB,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAJ,MAAA;QAAAK,QAAA;QAAAC,QAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;QAAA;KAAA;AAAA;AAM7B,MAAMC,sBAAmB,WAAA,GAAGJ,IAAAA,eAAA,EAAA;IAAAJ,MAAA;QAAAK,QAAA;QAAAI,MAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;IAAA;AAAA,GAAA;IAAAR,GAAA;QAAA;QAAA;YAAA;YAAA;gBAAAS,GAAA,CAAA;YAAA;SAAA;QAAA;QAAA;QAAA;KAAA;AAAA;AAS5B;;CAEA,GAAI,MAAMC,YAAS,WAAA,GAAGb,IAAAA,eAAA,EAAA;IAAAJ,MAAA;QAAAkB,QA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I;IACA,IAAIL,MAAMrC,cAAc,EAAE;QACtBqC,MAAMrC,cAAc,CAAC0C,SAAS,GAAGC,IAAAA,mBAAY,EAAC/C,6BAA6BI,cAAc,EAAEsC,OAAOtC,cAAc,EAAEqC,MAAMrC,cAAc,CAAC0C,SAAS;IACpJ;IACA,OAAOL;AACX"}
@@ -9,14 +9,14 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
+ ColumnIdContextProvider: function() {
13
+ return ColumnIdContextProvider;
14
+ },
12
15
  columnIdContextDefaultValue: function() {
13
16
  return columnIdContextDefaultValue;
14
17
  },
15
18
  useColumnIdContext: function() {
16
19
  return useColumnIdContext;
17
- },
18
- ColumnIdContextProvider: function() {
19
- return ColumnIdContextProvider;
20
20
  }
21
21
  });
22
22
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
@@ -1 +1 @@
1
- {"version":3,"sources":["columnIdContext.js"],"sourcesContent":["import * as React from 'react';\nconst columnIdContext = React.createContext(undefined);\nexport const columnIdContextDefaultValue = '';\nexport const useColumnIdContext = ()=>{\n var _React_useContext;\n return (_React_useContext = React.useContext(columnIdContext)) !== null && _React_useContext !== void 0 ? _React_useContext : columnIdContextDefaultValue;\n};\nexport const ColumnIdContextProvider = columnIdContext.Provider;\n"],"names":["columnIdContextDefaultValue","useColumnIdContext","ColumnIdContextProvider","columnIdContext","React","createContext","undefined","_React_useContext","useContext","Provider"],"mappings":";;;;;;;;;;;IAEaA,2BAA2B;eAA3BA;;IACAC,kBAAkB;eAAlBA;;IAIAC,uBAAuB;eAAvBA;;;;iEAPU;AACvB,MAAMC,gCAAkBC,OAAMC,aAAa,CAACC;AACrC,MAAMN,8BAA8B;AACpC,MAAMC,qBAAqB;IAC9B,IAAIM;IACJ,OAAO,AAACA,CAAAA,oBAAoBH,OAAMI,UAAU,CAACL,gBAAe,MAAO,QAAQI,sBAAsB,KAAK,IAAIA,oBAAoBP;AAClI;AACO,MAAME,0BAA0BC,gBAAgBM,QAAQ"}
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":["ColumnIdContextProvider","columnIdContextDefaultValue","useColumnIdContext","columnIdContext","React","createContext","undefined","useContext","Provider"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IASaA,uBAAAA;eAAAA;;IAJAC,2BAAAA;eAAAA;;IAEAC,kBAAAA;eAAAA;;;;iEAPU;AAGvB,MAAMC,gCAAkBC,OAAMC,aAAa,CAA4BC;AAEhE,MAAML,8BAA8B;AAEpC,MAAMC,qBAAqB;QAAME;WAAAA,CAAAA,oBAAAA,OAAMG,UAAU,CAACJ,gBAAAA,MAAAA,QAAjBC,sBAAAA,KAAAA,IAAAA,oBAAqCH;AAA0B;AAEhG,MAAMD,0BAA0BG,gBAAgBK,QAAQ"}
@@ -9,12 +9,12 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- dataGridContextDefaultValue: function() {
13
- return dataGridContextDefaultValue;
14
- },
15
12
  DataGridContextProvider: function() {
16
13
  return DataGridContextProvider;
17
14
  },
15
+ dataGridContextDefaultValue: function() {
16
+ return dataGridContextDefaultValue;
17
+ },
18
18
  useDataGridContext_unstable: function() {
19
19
  return useDataGridContext_unstable;
20
20
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["dataGridContext.js"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport { defaultTableState } from '../hooks';\nconst dataGridContext = createContext(undefined);\nexport const dataGridContextDefaultValue = {\n ...defaultTableState,\n subtleSelection: false,\n selectableRows: false,\n selectionAppearance: 'brand',\n focusMode: 'none',\n compositeRowTabsterAttribute: {}\n};\nexport const DataGridContextProvider = dataGridContext.Provider;\nexport const useDataGridContext_unstable = (selector)=>useContextSelector(dataGridContext, (ctx = dataGridContextDefaultValue)=>selector(ctx));\n"],"names":["dataGridContextDefaultValue","DataGridContextProvider","useDataGridContext_unstable","dataGridContext","createContext","undefined","defaultTableState","subtleSelection","selectableRows","selectionAppearance","focusMode","compositeRowTabsterAttribute","Provider","selector","useContextSelector","ctx"],"mappings":";;;;;;;;;;;IAGaA,2BAA2B;eAA3BA;;IAQAC,uBAAuB;eAAvBA;;IACAC,2BAA2B;eAA3BA;;;sCAZqC;uBAChB;AAClC,MAAMC,kBAAkBC,IAAAA,mCAAa,EAACC;AAC/B,MAAML,8BAA8B;IACvC,GAAGM,wBAAiB;IACpBC,iBAAiB;IACjBC,gBAAgB;IAChBC,qBAAqB;IACrBC,WAAW;IACXC,8BAA8B,CAAC;AACnC;AACO,MAAMV,0BAA0BE,gBAAgBS,QAAQ;AACxD,MAAMV,8BAA8B,CAACW,WAAWC,IAAAA,wCAAkB,EAACX,iBAAiB,CAACY,MAAMf,2BAA2B,GAAGa,SAASE"}
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\nexport const 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":["DataGridContextProvider","dataGridContextDefaultValue","useDataGridContext_unstable","dataGridContext","createContext","undefined","defaultTableState","subtleSelection","selectableRows","selectionAppearance","focusMode","compositeRowTabsterAttribute","Provider","selector","useContextSelector","ctx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAiBaA,uBAAAA;eAAAA;;IATAC,2BAAAA;eAAAA;;IAWAC,2BAAAA;eAAAA;;;sCAnBqC;uBAIhB;AAElC,MAAMC,kBAAkBC,IAAAA,mCAAAA,EAAgDC;AAEjE,MAAMJ,8BAAoD;IAC/D,GAAGK,wBAAiB;IACpBC,iBAAiB;IACjBC,gBAAgB;IAChBC,qBAAqB;IACrBC,WAAW;IACXC,8BAA8B,CAAC;AACjC;AAEO,MAAMX,0BAA0BG,gBAAgBS,QAAQ;AAExD,MAAMV,8BAA8B,CAAIW,WAC7CC,IAAAA,wCAAAA,EAAmBX,iBAAiB,CAACY,MAAMd,2BAA2B,GAAKY,SAASE"}
@@ -9,14 +9,14 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
+ TableRowIdContextProvider: function() {
13
+ return TableRowIdContextProvider;
14
+ },
12
15
  tableRowIdContextDefaultValue: function() {
13
16
  return tableRowIdContextDefaultValue;
14
17
  },
15
18
  useTableRowIdContext: function() {
16
19
  return useTableRowIdContext;
17
- },
18
- TableRowIdContextProvider: function() {
19
- return TableRowIdContextProvider;
20
20
  }
21
21
  });
22
22
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
@@ -1 +1 @@
1
- {"version":3,"sources":["rowIdContext.js"],"sourcesContent":["import * as React from 'react';\nconst rowIdContext = React.createContext(undefined);\nexport const tableRowIdContextDefaultValue = '';\nexport const useTableRowIdContext = ()=>{\n var _React_useContext;\n return (_React_useContext = React.useContext(rowIdContext)) !== null && _React_useContext !== void 0 ? _React_useContext : tableRowIdContextDefaultValue;\n};\nexport const TableRowIdContextProvider = rowIdContext.Provider;\n"],"names":["tableRowIdContextDefaultValue","useTableRowIdContext","TableRowIdContextProvider","rowIdContext","React","createContext","undefined","_React_useContext","useContext","Provider"],"mappings":";;;;;;;;;;;IAEaA,6BAA6B;eAA7BA;;IACAC,oBAAoB;eAApBA;;IAIAC,yBAAyB;eAAzBA;;;;iEAPU;AACvB,MAAMC,6BAAeC,OAAMC,aAAa,CAACC;AAClC,MAAMN,gCAAgC;AACtC,MAAMC,uBAAuB;IAChC,IAAIM;IACJ,OAAO,AAACA,CAAAA,oBAAoBH,OAAMI,UAAU,CAACL,aAAY,MAAO,QAAQI,sBAAsB,KAAK,IAAIA,oBAAoBP;AAC/H;AACO,MAAME,4BAA4BC,aAAaM,QAAQ"}
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":["TableRowIdContextProvider","tableRowIdContextDefaultValue","useTableRowIdContext","rowIdContext","React","createContext","undefined","useContext","Provider"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IASaA,yBAAAA;eAAAA;;IAJAC,6BAAAA;eAAAA;;IAEAC,oBAAAA;eAAAA;;;;iEAPU;AAGvB,MAAMC,6BAAeC,OAAMC,aAAa,CAAyBC;AAE1D,MAAML,gCAAgC;AAEtC,MAAMC,uBAAuB;QAAME;WAAAA,CAAAA,oBAAAA,OAAMG,UAAU,CAACJ,aAAAA,MAAAA,QAAjBC,sBAAAA,KAAAA,IAAAA,oBAAkCH;AAA4B;AAEjG,MAAMD,4BAA4BG,aAAaK,QAAQ"}
@@ -9,12 +9,12 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- tableContextDefaultValue: function() {
13
- return tableContextDefaultValue;
14
- },
15
12
  TableContextProvider: function() {
16
13
  return TableContextProvider;
17
14
  },
15
+ tableContextDefaultValue: function() {
16
+ return tableContextDefaultValue;
17
+ },
18
18
  useTableContext: function() {
19
19
  return useTableContext;
20
20
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["tableContext.js"],"sourcesContent":["import * as React from 'react';\nconst tableContext = React.createContext(undefined);\nexport const tableContextDefaultValue = {\n size: 'medium',\n noNativeElements: false,\n sortable: false\n};\nexport const TableContextProvider = tableContext.Provider;\nexport const useTableContext = ()=>{\n var _React_useContext;\n return (_React_useContext = React.useContext(tableContext)) !== null && _React_useContext !== void 0 ? _React_useContext : tableContextDefaultValue;\n};\n"],"names":["tableContextDefaultValue","TableContextProvider","useTableContext","tableContext","React","createContext","undefined","size","noNativeElements","sortable","Provider","_React_useContext","useContext"],"mappings":";;;;;;;;;;;IAEaA,wBAAwB;eAAxBA;;IAKAC,oBAAoB;eAApBA;;IACAC,eAAe;eAAfA;;;;iEARU;AACvB,MAAMC,6BAAeC,OAAMC,aAAa,CAACC;AAClC,MAAMN,2BAA2B;IACpCO,MAAM;IACNC,kBAAkB;IAClBC,UAAU;AACd;AACO,MAAMR,uBAAuBE,aAAaO,QAAQ;AAClD,MAAMR,kBAAkB;IAC3B,IAAIS;IACJ,OAAO,AAACA,CAAAA,oBAAoBP,OAAMQ,UAAU,CAACT,aAAY,MAAO,QAAQQ,sBAAsB,KAAK,IAAIA,oBAAoBX;AAC/H"}
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":["TableContextProvider","tableContextDefaultValue","useTableContext","tableContext","React","createContext","undefined","size","noNativeElements","sortable","Provider","useContext"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAWaA,oBAAAA;eAAAA;;IANAC,wBAAAA;eAAAA;;IAOAC,eAAAA;eAAAA;;;;iEAZU;AAGvB,MAAMC,6BAAeC,OAAMC,aAAa,CAAgCC;AAEjE,MAAML,2BAA8C;IACzDM,MAAM;IACNC,kBAAkB;IAClBC,UAAU;AACZ;AAEO,MAAMT,uBAAuBG,aAAaO,QAAQ;AAClD,MAAMR,kBAAkB;QAAME;WAAAA,CAAAA,oBAAAA,OAAMO,UAAU,CAACR,aAAAA,MAAAA,QAAjBC,sBAAAA,KAAAA,IAAAA,oBAAkCH;AAAuB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["tableHeaderContext.js"],"sourcesContent":["import * as React from 'react';\nconst tableHeaderContext = React.createContext(undefined);\nconst tableHeaderContextDefaultValue = '';\nexport const TableHeaderContextProvider = tableHeaderContext.Provider;\nexport const useIsInTableHeader = ()=>React.useContext(tableHeaderContext) === tableHeaderContextDefaultValue;\n"],"names":["TableHeaderContextProvider","useIsInTableHeader","tableHeaderContext","React","createContext","undefined","tableHeaderContextDefaultValue","Provider","useContext"],"mappings":";;;;;;;;;;;IAGaA,0BAA0B;eAA1BA;;IACAC,kBAAkB;eAAlBA;;;;iEAJU;AACvB,MAAMC,mCAAqBC,OAAMC,aAAa,CAACC;AAC/C,MAAMC,iCAAiC;AAChC,MAAMN,6BAA6BE,mBAAmBK,QAAQ;AAC9D,MAAMN,qBAAqB,IAAIE,OAAMK,UAAU,CAACN,wBAAwBI"}
1
+ {"version":3,"sources":["tableHeaderContext.ts"],"sourcesContent":["import * as React from 'react';\n\nconst tableHeaderContext = React.createContext<string | undefined>(undefined);\n\nconst tableHeaderContextDefaultValue = '';\n\nexport const TableHeaderContextProvider = tableHeaderContext.Provider;\nexport const useIsInTableHeader = () => React.useContext(tableHeaderContext) === tableHeaderContextDefaultValue;\n"],"names":["TableHeaderContextProvider","useIsInTableHeader","tableHeaderContext","React","createContext","undefined","tableHeaderContextDefaultValue","Provider","useContext"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAMaA,0BAAAA;eAAAA;;IACAC,kBAAAA;eAAAA;;;;iEAPU;AAEvB,MAAMC,mCAAqBC,OAAMC,aAAa,CAAqBC;AAEnE,MAAMC,iCAAiC;AAEhC,MAAMN,6BAA6BE,mBAAmBK,QAAQ;AAC9D,MAAMN,qBAAqB,IAAME,OAAMK,UAAU,CAACN,wBAAwBI"}
@@ -1 +1 @@
1
- {"version":3,"sources":["createColumn.js"],"sourcesContent":["const defaultCompare = ()=>0;\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 return null;\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 return null;\n};\n/**\n * Helper function to create column definition with defaults\n * @param options - column definition options\n * @returns - column definition with defaults\n */ export function createTableColumn(options) {\n const { columnId, renderCell = defaultRenderCell, renderHeaderCell = defaultRenderHeaderCell, compare = defaultCompare } = options;\n return {\n columnId,\n renderCell,\n renderHeaderCell,\n compare\n };\n}\n"],"names":["createTableColumn","defaultCompare","defaultRenderCell","process","env","NODE_ENV","console","warn","defaultRenderHeaderCell","options","columnId","renderCell","renderHeaderCell","compare"],"mappings":";;;;+BAmBoBA;;;eAAAA;;;AAnBpB,MAAMC,iBAAiB,IAAI;AAC3B,MAAMC,oBAAoB;IACtB,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACvC,sCAAsC;QACtCC,QAAQC,IAAI,CAAC;IACjB;IACA,OAAO;AACX;AACA,MAAMC,0BAA0B;IAC5B,IAAIL,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACvC,sCAAsC;QACtCC,QAAQC,IAAI,CAAC;IACjB;IACA,OAAO;AACX;AAKW,SAASP,kBAAkBS,OAAO;IACzC,MAAM,EAAEC,QAAQ,EAAEC,aAAaT,iBAAiB,EAAEU,mBAAmBJ,uBAAuB,EAAEK,UAAUZ,cAAc,EAAE,GAAGQ;IAC3H,OAAO;QACHC;QACAC;QACAC;QACAC;IACJ;AACJ"}
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":["createTableColumn","defaultCompare","defaultRenderCell","process","env","NODE_ENV","console","warn","defaultRenderHeaderCell","options","columnId","renderCell","renderHeaderCell","compare"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BA2BgBA;;;eAAAA;;;AAzBhB,MAAMC,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;AAOO,SAASP,kBAAyBS,OAAwC;IAC/E,MAAM,EACJC,QAAQ,EACRC,aAAaT,iBAAiB,EAC9BU,mBAAmBJ,uBAAuB,EAC1CK,UAAUZ,cAAc,EACzB,GAAGQ;IAEJ,OAAO;QACLC;QACAC;QACAC;QACAC;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './types';\nexport * from './useTableFeatures';\nexport * from './useTableSort';\nexport * from './useTableSelection';\nexport * from './createColumn';\nexport * from './useTableColumnSizing';\nexport * from './useTableCompositeNavigation';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './types';\nexport * from './useTableFeatures';\nexport * from './useTableSort';\nexport * from './useTableSelection';\nexport * from './createColumn';\nexport * from './useTableColumnSizing';\nexport * from './useTableCompositeNavigation';\n"],"names":[],"rangeMappings":";;;;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["types.js"],"sourcesContent":["import * as React from 'react';\n"],"names":[],"mappings":";;;;;iEAAuB"}
1
+ {"version":3,"sources":["types.ts"],"sourcesContent":["import * as React from 'react';\nimport { SortDirection, TableProps } from '../components/Table/Table.types';\nimport { TableHeaderCellProps } from '../components/TableHeaderCell/TableHeaderCell.types';\nimport { SelectionMode } from '@fluentui/react-utilities';\n\nexport type TableRowId = string | number;\nexport type TableColumnId = string | number;\n\nexport interface SortState {\n sortColumn: TableColumnId | undefined;\n sortDirection: SortDirection;\n}\n\nexport interface OnSelectionChangeData {\n selectedItems: Set<TableRowId>;\n}\n\nexport interface CreateTableColumnOptions<TItem> extends Partial<TableColumnDefinition<TItem>> {\n columnId: TableColumnId;\n}\n\nexport interface TableColumnDefinition<TItem> {\n columnId: TableColumnId;\n compare: (a: TItem, b: TItem) => number;\n renderHeaderCell: (data?: unknown) => React.ReactNode;\n renderCell: (item: TItem) => React.ReactNode;\n}\n\nexport type RowEnhancer<TItem, TRowState extends TableRowData<TItem> = TableRowData<TItem>> = (\n row: TableRowData<TItem>,\n) => TRowState;\n\nexport interface TableSortState<TItem> {\n /**\n * Current sort direction\n */\n sortDirection: SortDirection;\n /**\n * Column id of the currently sorted column\n */\n sortColumn: TableColumnId | undefined;\n /**\n * Set the sort direction for the specified column\n */\n setColumnSort: (event: React.SyntheticEvent, columnId: TableColumnId, sortDirection: SortDirection) => void;\n /**\n * Toggles the sort direction for specified column\n */\n toggleColumnSort: (event: React.SyntheticEvent, columnId: TableColumnId) => void;\n /**\n * Returns the sort direction if a column is sorted,\n * returns undefined if the column is not sorted\n */\n getSortDirection: (columnId: TableColumnId) => SortDirection | undefined;\n\n /**\n * Sorts rows and returns a **shallow** copy of original items\n */\n sort: <TRowState extends TableRowData<TItem>>(rows: TRowState[]) => TRowState[];\n}\n\nexport interface TableSelectionState {\n /**\n * Clears all selected rows\n */\n clearRows: (e: React.SyntheticEvent) => void;\n /**\n * Selects single row\n */\n selectRow: (e: React.SyntheticEvent, rowId: TableRowId) => void;\n /**\n * De-selects single row\n */\n deselectRow: (e: React.SyntheticEvent, rowId: TableRowId) => void;\n /**\n * Toggle selection of all rows\n */\n toggleAllRows: (e: React.SyntheticEvent) => void;\n /**\n * Toggle selection of single row\n */\n toggleRow: (e: React.SyntheticEvent, rowId: TableRowId) => void;\n /**\n * Collection of row ids corresponding to selected rows\n */\n selectedRows: Set<TableRowId>;\n /**\n * Whether all rows are selected\n */\n allRowsSelected: boolean;\n /**\n * Whether some rows are selected\n */\n someRowsSelected: boolean;\n\n /**\n * Checks if a given rowId is selected\n */\n isRowSelected: (rowId: TableRowId) => boolean;\n\n selectionMode: SelectionMode;\n}\n\nexport interface TableRowData<TItem> {\n /**\n * User provided data\n */\n item: TItem;\n /**\n * The row id, defaults to index position in the collection\n */\n rowId: TableRowId;\n}\n\nexport interface TableFeaturesState<TItem> extends Pick<UseTableFeaturesOptions<TItem>, 'items' | 'getRowId'> {\n /**\n * The row data for rendering\n * @param rowEnhancer - Enhances the row with extra user data\n */\n getRows: <TRowState extends TableRowData<TItem> = TableRowData<TItem>>(\n rowEnhancer?: RowEnhancer<TItem, TRowState>,\n ) => TRowState[];\n\n /**\n * State and actions to manage row selection\n */\n selection: TableSelectionState;\n /**\n * State and actions to manage row sorting\n */\n sort: TableSortState<TItem>;\n /**\n * Table columns\n */\n columns: TableColumnDefinition<TItem>[];\n /**\n * State and actions to manage column resizing\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n columnSizing_unstable: TableColumnSizingState;\n /**\n * A React.Ref object to be set as a ref for the table.\n * Used with column resizing.\n */\n tableRef: React.Ref<HTMLDivElement>;\n}\n\nexport interface UseTableSortOptions {\n /**\n * Used to control sorting\n */\n sortState?: SortState;\n /**\n * Used in uncontrolled mode to set initial sort column and direction on mount\n */\n defaultSortState?: SortState;\n /**\n * Called when sort changes\n */\n onSortChange?(e: React.SyntheticEvent, state: SortState): void;\n}\n\nexport interface UseTableFeaturesOptions<TItem> {\n columns: TableColumnDefinition<TItem>[];\n items: TItem[];\n getRowId?: (item: TItem) => TableRowId;\n}\n\nexport type TableFeaturePlugin = <TItem>(tableState: TableFeaturesState<TItem>) => TableFeaturesState<TItem>;\n\nexport interface ColumnWidthState {\n columnId: TableColumnId;\n width: number;\n minWidth: number;\n idealWidth: number;\n padding: number;\n}\n\nexport type ColumnSizingTableProps = Partial<TableProps>;\nexport type ColumnSizingTableHeaderCellProps = Pick<TableHeaderCellProps, 'style' | 'aside'>;\nexport type ColumnSizingTableCellProps = Pick<TableHeaderCellProps, 'style'>;\n\nexport type EnableKeyboardModeOnChangeCallback = (columnId: TableColumnId, isKeyboardMode: boolean) => void;\n\nexport interface TableColumnSizingState {\n getOnMouseDown: (columnId: TableColumnId) => (e: React.MouseEvent | React.TouchEvent) => void;\n setColumnWidth: (columnId: TableColumnId, newSize: number) => void;\n getColumnWidths: () => ColumnWidthState[];\n getTableProps: (props?: Partial<TableProps>) => ColumnSizingTableProps;\n getTableHeaderCellProps: (columnId: TableColumnId) => ColumnSizingTableHeaderCellProps;\n getTableCellProps: (columnId: TableColumnId) => ColumnSizingTableCellProps;\n enableKeyboardMode: (\n columnId: TableColumnId,\n onChange?: EnableKeyboardModeOnChangeCallback,\n ) => (e: React.MouseEvent | React.TouchEvent) => void;\n}\n\nexport type ColumnResizeState = {\n getColumnWidth: (columnId: TableColumnId) => number;\n setColumnWidth: (\n e: KeyboardEvent | TouchEvent | MouseEvent | undefined,\n data: { columnId: TableColumnId; width: number },\n ) => void;\n getColumnById: (columnId: TableColumnId) => ColumnWidthState | undefined;\n getColumns: () => ColumnWidthState[];\n};\n\nexport type TableColumnSizingOptions = Record<\n TableColumnId,\n Partial<Pick<ColumnWidthState, 'minWidth' | 'idealWidth' | 'padding'>> & {\n defaultWidth?: number;\n autoFitColumns?: boolean;\n }\n>;\n\nexport type UseTableColumnSizingParams = {\n columnSizingOptions?: TableColumnSizingOptions;\n onColumnResize?: (\n e: KeyboardEvent | TouchEvent | MouseEvent | undefined,\n data: { columnId: TableColumnId; width: number },\n ) => void;\n containerWidthOffset?: number;\n autoFitColumns?: boolean;\n};\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useKeyboardResizing.js"],"sourcesContent":["import * as React from 'react';\nimport { ArrowLeft, ArrowRight, Enter, Escape, Shift, Space } from '@fluentui/keyboard-keys';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport { useFocusFinders, useTabsterAttributes } from '@fluentui/react-tabster';\nconst STEP = 20;\nconst PRECISION_MODIFIER = Shift;\nconst PRECISION_FACTOR = 1 / 4;\nexport function useKeyboardResizing(columnResizeState) {\n const [columnId, setColumnId] = React.useState();\n const onChangeRef = React.useRef();\n const { findPrevFocusable } = useFocusFinders();\n const columnResizeStateRef = React.useRef(columnResizeState);\n React.useEffect(()=>{\n columnResizeStateRef.current = columnResizeState;\n }, [\n columnResizeState\n ]);\n const [resizeHandleRefs] = React.useState(()=>new Map());\n const keyboardHandler = useEventCallback((event)=>{\n if (!columnId) {\n return;\n }\n const width = columnResizeStateRef.current.getColumnWidth(columnId);\n const precisionModifier = event.getModifierState(PRECISION_MODIFIER);\n const stopEvent = ()=>{\n event.preventDefault();\n event.stopPropagation();\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 case ArrowRight:\n stopEvent();\n columnResizeStateRef.current.setColumnWidth(event.nativeEvent, {\n columnId,\n width: width + (precisionModifier ? STEP * PRECISION_FACTOR : STEP)\n });\n return;\n case Space:\n case Enter:\n case Escape:\n var // Just blur here, the onBlur handler will take care of the rest (disableInteractiveMode).\n _resizeHandleRefs_get_current, _resizeHandleRefs_get;\n stopEvent();\n (_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();\n break;\n }\n });\n const enableInteractiveMode = React.useCallback((colId)=>{\n var _onChangeRef_current, _resizeHandleRefs_get;\n setColumnId(colId);\n (_onChangeRef_current = onChangeRef.current) === null || _onChangeRef_current === void 0 ? void 0 : _onChangeRef_current.call(onChangeRef, colId, true);\n const handle = (_resizeHandleRefs_get = resizeHandleRefs.get(colId)) === null || _resizeHandleRefs_get === void 0 ? void 0 : _resizeHandleRefs_get.current;\n if (handle) {\n handle.setAttribute('tabindex', '-1');\n handle.tabIndex = -1;\n handle.focus();\n }\n }, [\n resizeHandleRefs\n ]);\n const disableInteractiveMode = React.useCallback(()=>{\n var // Notify the onChange listener that we are disabling interactive mode.\n _onChangeRef_current, _resizeHandleRefs_get;\n if (!columnId) {\n return;\n }\n (_onChangeRef_current = onChangeRef.current) === null || _onChangeRef_current === void 0 ? void 0 : _onChangeRef_current.call(onChangeRef, columnId, false);\n // Find the previous focusable element (table header button) and focus it.\n const el = (_resizeHandleRefs_get = resizeHandleRefs.get(columnId)) === null || _resizeHandleRefs_get === void 0 ? void 0 : _resizeHandleRefs_get.current;\n if (el) {\n var _findPrevFocusable;\n (_findPrevFocusable = findPrevFocusable(el)) === null || _findPrevFocusable === void 0 ? void 0 : _findPrevFocusable.focus(); // Focus the previous focusable element (header button).\n el.removeAttribute('tabindex');\n }\n setColumnId(undefined);\n }, [\n columnId,\n findPrevFocusable,\n resizeHandleRefs\n ]);\n const toggleInteractiveMode = (colId, onChange)=>{\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 const getKeyboardResizingRef = React.useCallback((colId)=>{\n const ref = resizeHandleRefs.get(colId) || React.createRef();\n resizeHandleRefs.set(colId, ref);\n return ref;\n }, [\n resizeHandleRefs\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 return {\n toggleInteractiveMode,\n columnId,\n getKeyboardResizingProps: React.useCallback((colId, currentWidth)=>({\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 columnId,\n disableInteractiveMode,\n getKeyboardResizingRef,\n keyboardHandler,\n tabsterAttrs\n ])\n };\n}\n"],"names":["useKeyboardResizing","STEP","PRECISION_MODIFIER","Shift","PRECISION_FACTOR","columnResizeState","columnId","setColumnId","React","useState","onChangeRef","useRef","findPrevFocusable","useFocusFinders","columnResizeStateRef","useEffect","current","resizeHandleRefs","Map","keyboardHandler","useEventCallback","event","width","getColumnWidth","precisionModifier","getModifierState","stopEvent","preventDefault","stopPropagation","key","ArrowLeft","setColumnWidth","nativeEvent","ArrowRight","Space","Enter","Escape","_resizeHandleRefs_get_current","_resizeHandleRefs_get","get","blur","enableInteractiveMode","useCallback","colId","_onChangeRef_current","call","handle","setAttribute","tabIndex","focus","disableInteractiveMode","el","_findPrevFocusable","removeAttribute","undefined","toggleInteractiveMode","onChange","getKeyboardResizingRef","ref","createRef","set","tabsterAttrs","useTabsterAttributes","focusable","ignoreKeydown","getKeyboardResizingProps","currentWidth","onKeyDown","onBlur","role"],"mappings":";;;;+BAOgBA;;;eAAAA;;;;iEAPO;8BAC4C;gCAClC;8BACqB;AACtD,MAAMC,OAAO;AACb,MAAMC,qBAAqBC,mBAAK;AAChC,MAAMC,mBAAmB,IAAI;AACtB,SAASJ,oBAAoBK,iBAAiB;IACjD,MAAM,CAACC,UAAUC,YAAY,GAAGC,OAAMC,QAAQ;IAC9C,MAAMC,cAAcF,OAAMG,MAAM;IAChC,MAAM,EAAEC,iBAAiB,EAAE,GAAGC,IAAAA,6BAAe;IAC7C,MAAMC,uBAAuBN,OAAMG,MAAM,CAACN;IAC1CG,OAAMO,SAAS,CAAC;QACZD,qBAAqBE,OAAO,GAAGX;IACnC,GAAG;QACCA;KACH;IACD,MAAM,CAACY,iBAAiB,GAAGT,OAAMC,QAAQ,CAAC,IAAI,IAAIS;IAClD,MAAMC,kBAAkBC,IAAAA,gCAAgB,EAAC,CAACC;QACtC,IAAI,CAACf,UAAU;YACX;QACJ;QACA,MAAMgB,QAAQR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C,WAAW;YACPC,eAAe;gBACXlC,WAAW;gBACXG,YAAY;YAChB;QACJ;IACJ;IACA,OAAO;QACHsB;QACAjD;QACA2D,0BAA0BzD,OAAMkC,WAAW,CAAC,CAACC,OAAOuB,eAAgB,CAAA;gBAC5DC,WAAWhD;gBACXiD,QAAQlB;gBACRQ,KAAKD,uBAAuBd;gBAC5B0B,MAAM;gBACN,cAAc;gBACd,kBAAkB,CAAC,EAAEH,aAAa,OAAO,CAAC;gBAC1C,eAAevB,UAAUrC,WAAW,QAAQ;gBAC5C0C,UAAUL,UAAUrC,WAAW,IAAIgD;gBACnC,GAAGO,YAAY;YACnB,CAAA,GAAI;YACJvD;YACA4C;YACAO;YACAtC;YACA0C;SACH;IACL;AACJ"}
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: React.useCallback(\n (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 [columnId, disableInteractiveMode, getKeyboardResizingRef, keyboardHandler, tabsterAttrs],\n ),\n };\n}\n"],"names":["useKeyboardResizing","STEP","PRECISION_MODIFIER","Shift","PRECISION_FACTOR","columnResizeState","columnId","setColumnId","React","useState","onChangeRef","useRef","findPrevFocusable","useFocusFinders","columnResizeStateRef","useEffect","current","resizeHandleRefs","Map","keyboardHandler","useEventCallback","event","width","getColumnWidth","precisionModifier","getModifierState","stopEvent","preventDefault","stopPropagation","key","ArrowLeft","setColumnWidth","nativeEvent","ArrowRight","Space","Enter","Escape","get","blur","enableInteractiveMode","useCallback","colId","handle","setAttribute","tabIndex","focus","disableInteractiveMode","el","removeAttribute","undefined","toggleInteractiveMode","onChange","getKeyboardResizingRef","ref","createRef","set","tabsterAttrs","useTabsterAttributes","focusable","ignoreKeydown","getKeyboardResizingProps","currentWidth","onKeyDown","onBlur","role"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAUgBA;;;eAAAA;;;;iEAVO;8BAC4C;gCAClC;8BAEqB;AAEtD,MAAMC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AAGC,eAAe,CAAC;QACrB;QAEAzC,YAAY0C;IACd,GAAG;QAAC3C;QAAUM;QAAmBK;KAAiB;IAElD,MAAMiC,wBAAwB,CAACT,OAAsBU;QACnDzC,YAAYM,OAAO,GAAGmC;QACtB,IAAI,CAAC7C,UAAU;YACbiC,sBAAsBE;QACxB,OAAO,IAAIA,SAASnC,aAAamC,OAAO;YACtCF,sBAAsBE;YACtBlC,YAAYkC;QACd,OAAO;YACLK;QACF;IACF;IAEA,MAAMM,yBAAyB5C,OAAMgC,WAAW,CAC9C,CAACC;QACC,MAAMY,MAAMpC,iBAAiBoB,GAAG,CAACI,wBAAUjC,OAAM8C,SAAS;QAC1DrC,iBAAiBsC,GAAG,CAACd,OAAOY;QAC5B,OAAOA;IACT,GACA;QAACpC;KAAiB;IAGpB,wEAAwE;IACxE,yCAAyC;IACzC,MAAMuC,eAAeC,IAAAA,kCAAAA,EAAqB;QACxCC,WAAW;YACTC,eAAe;gBACb7B,WAAW;gBACXG,YAAY;YACd;QACF;IACF;IAEA,OAAO;QACLiB;QACA5C;QACAsD,0BAA0BpD,OAAMgC,WAAW,CACzC,CAACC,OAAsBoB,eAA0B,CAAA;gBAC/CC,WAAW3C;gBACX4C,QAAQjB;gBACRO,KAAKD,uBAAuBX;gBAC5BuB,MAAM;gBACN,cAAc;gBACd,kBAAkB,CAAC,EAAEH,aAAa,OAAO,CAAC;gBAC1C,eAAepB,UAAUnC,WAAW,QAAQ;gBAC5CsC,UAAUH,UAAUnC,WAAW,IAAI2C;gBACnC,GAAGO,YAAY;YACjB,CAAA,GACA;YAAClD;YAAUwC;YAAwBM;YAAwBjC;YAAiBqC;SAAa;IAE7F;AACF"}
@@ -9,11 +9,11 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- useMeasureElement: function() {
13
- return useMeasureElement;
14
- },
15
12
  createResizeObserverFromDocument: function() {
16
13
  return createResizeObserverFromDocument;
14
+ },
15
+ useMeasureElement: function() {
16
+ return useMeasureElement;
17
17
  }
18
18
  });
19
19
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
@@ -1 +1 @@
1
- {"version":3,"sources":["useMeasureElement.js"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\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 */ export function useMeasureElement() {\n const [width, setWidth] = React.useState(0);\n const container = React.useRef(undefined);\n // TODO: exclude types from this lint rule: https://github.com/microsoft/fluentui/issues/31286\n // eslint-disable-next-line no-restricted-globals\n const resizeObserverRef = React.useRef(null);\n const { targetDocument } = useFluent();\n // the handler for resize observer\n const handleResize = React.useCallback(()=>{\n var _container_current;\n const containerWidth = (_container_current = container.current) === null || _container_current === void 0 ? void 0 : _container_current.getBoundingClientRect().width;\n setWidth(containerWidth || 0);\n }, []);\n const measureElementRef = React.useCallback((el)=>{\n if (!targetDocument) {\n return;\n }\n // if the element is removed, stop observing it\n if (!el && resizeObserverRef.current && container.current) {\n resizeObserverRef.current.unobserve(container.current);\n }\n container.current = undefined;\n if (el === null || el === void 0 ? void 0 : el.parentElement) {\n var _resizeObserverRef_current;\n container.current = el.parentElement;\n handleResize();\n (_resizeObserverRef_current = resizeObserverRef.current) === null || _resizeObserverRef_current === void 0 ? void 0 : _resizeObserverRef_current.observe(container.current);\n }\n }, [\n targetDocument,\n handleResize\n ]);\n React.useEffect(()=>{\n resizeObserverRef.current = createResizeObserverFromDocument(targetDocument, handleResize);\n if (!container.current || !resizeObserverRef.current) {\n return;\n }\n resizeObserverRef.current.observe(container.current);\n return ()=>{\n var _resizeObserverRef_current;\n (_resizeObserverRef_current = resizeObserverRef.current) === null || _resizeObserverRef_current === void 0 ? void 0 : _resizeObserverRef_current.disconnect();\n };\n }, [\n handleResize,\n targetDocument\n ]);\n return {\n width,\n measureElementRef\n };\n}\n/**\n * FIXME - TS 3.8/3.9 don't have ResizeObserver types by default, move this to a shared utility once we bump the minbar\n * A utility method that creates a ResizeObserver from a target document\n * @param targetDocument - document to use to create the ResizeObserver\n * @param callback - https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver#callback\n * @returns a ResizeObserver instance or null if the global does not exist on the document\n */ export function createResizeObserverFromDocument(targetDocument, callback) {\n var _targetDocument_defaultView;\n if (!(targetDocument === null || targetDocument === void 0 ? void 0 : (_targetDocument_defaultView = targetDocument.defaultView) === null || _targetDocument_defaultView === void 0 ? void 0 : _targetDocument_defaultView.ResizeObserver)) {\n return null;\n }\n return new targetDocument.defaultView.ResizeObserver(callback);\n}\n"],"names":["useMeasureElement","createResizeObserverFromDocument","width","setWidth","React","useState","container","useRef","undefined","resizeObserverRef","targetDocument","useFluent","handleResize","useCallback","_container_current","containerWidth","current","getBoundingClientRect","measureElementRef","el","unobserve","parentElement","_resizeObserverRef_current","observe","useEffect","disconnect","callback","_targetDocument_defaultView","defaultView","ResizeObserver"],"mappings":";;;;;;;;;;;IAOoBA,iBAAiB;eAAjBA;;IAyDAC,gCAAgC;eAAhCA;;;;iEAhEG;qCACyB;AAMrC,SAASD;IAChB,MAAM,CAACE,OAAOC,SAAS,GAAGC,OAAMC,QAAQ,CAAC;IACzC,MAAMC,YAAYF,OAAMG,MAAM,CAACC;IAC/B,8FAA8F;IAC9F,iDAAiD;IACjD,MAAMC,oBAAoBL,OAAMG,MAAM,CAAC;IACvC,MAAM,EAAEG,cAAc,EAAE,GAAGC,IAAAA,uCAAS;IACpC,kCAAkC;IAClC,MAAMC,eAAeR,OAAMS,WAAW,CAAC;QACnC,IAAIC;QACJ,MAAMC,iBAAiB,AAACD,CAAAA,qBAAqBR,UAAUU,OAAO,AAAD,MAAO,QAAQF,uBAAuB,KAAK,IAAI,KAAK,IAAIA,mBAAmBG,qBAAqB,GAAGf,KAAK;QACrKC,SAASY,kBAAkB;IAC/B,GAAG,EAAE;IACL,MAAMG,oBAAoBd,OAAMS,WAAW,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AW,CAACC,cAAc,CAACH;AACzD"}
1
+ {"version":3,"sources":["useMeasureElement.ts"],"sourcesContent":["import * 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\n const container = React.useRef<HTMLElement | undefined>(undefined);\n // TODO: exclude types from this lint rule: https://github.com/microsoft/fluentui/issues/31286\n // eslint-disable-next-line no-restricted-globals\n const resizeObserverRef = React.useRef<ResizeObserver | null>(null);\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 const measureElementRef = React.useCallback(\n (el: TElement | null) => {\n if (!targetDocument) {\n return;\n }\n\n // if the element is removed, stop observing it\n if (!el && resizeObserverRef.current && container.current) {\n resizeObserverRef.current.unobserve(container.current);\n }\n\n container.current = undefined;\n\n if (el?.parentElement) {\n container.current = el.parentElement;\n handleResize();\n resizeObserverRef.current?.observe(container.current);\n }\n },\n [targetDocument, handleResize],\n );\n\n React.useEffect(() => {\n resizeObserverRef.current = createResizeObserverFromDocument(targetDocument, handleResize);\n\n if (!container.current || !resizeObserverRef.current) {\n return;\n }\n\n resizeObserverRef.current.observe(container.current);\n\n return () => {\n resizeObserverRef.current?.disconnect();\n };\n }, [handleResize, targetDocument]);\n\n return { width, measureElementRef };\n}\n\n/**\n * FIXME - TS 3.8/3.9 don't have ResizeObserver types by default, move this to a shared utility once we bump the minbar\n * A utility method that creates a ResizeObserver from a target document\n * @param targetDocument - document to use to create the ResizeObserver\n * @param callback - https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver#callback\n * @returns a ResizeObserver instance or null if the global does not exist on the document\n */\nexport function createResizeObserverFromDocument(\n targetDocument: Document | null | undefined,\n callback: ResizeObserverCallback,\n) {\n if (!targetDocument?.defaultView?.ResizeObserver) {\n return null;\n }\n\n return new targetDocument.defaultView.ResizeObserver(callback);\n}\n"],"names":["createResizeObserverFromDocument","useMeasureElement","width","setWidth","React","useState","container","useRef","undefined","resizeObserverRef","targetDocument","useFluent","handleResize","useCallback","containerWidth","current","getBoundingClientRect","measureElementRef","el","unobserve","parentElement","observe","useEffect","disconnect","callback","defaultView","ResizeObserver"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAuEgBA,gCAAAA;eAAAA;;IA9DAC,iBAAAA;eAAAA;;;;iEATO;qCACyB;AAQzC,SAASA;IACd,MAAM,CAACC,OAAOC,SAAS,GAAGC,OAAMC,QAAQ,CAAC;IAEzC,MAAMC,YAAYF,OAAMG,MAAM,CAA0BC;IACxD,8FAA8F;IAC9F,iDAAiD;IACjD,MAAMC,oBAAoBL,OAAMG,MAAM,CAAwB;IAE9D,MAAM,EAAEG,cAAc,EAAE,GAAGC,IAAAA,uCAAAA;IAE3B,kCAAkC;IAClC,MAAMC,eAAeR,OAAMS,WAAW,CAAC;YACdP;QAAvB,MAAMQ,iBAAAA,AAAiBR,CAAAA,qBAAAA,UAAUS,OAAO,AAAPA,MAAO,QAAjBT,uBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,mBAAmBU,qBAAqB,GAAGd,KAAK;QACvEC,SAASW,kBAAkB;IAC7B,GAAG,EAAE;IAEL,MAAMG,oBAAoBb,OAAMS,WAAW,CACzC,CAACK;QACC,IAAI,CAACR,gBAAgB;YACnB;QACF;QAEA,+CAA+C;QAC/C,IAAI,CAACQ,MAAMT,kBAAkBM,OAAO,IAAIT,UAAUS,OAAO,EAAE;YACzDN,kBAAkBM,OAAO,CAACI,SAAS,CAACb,UAAUS,OAAO;QACvD;QAEAT,UAAUS,OAAO,GAAGP;QAEpB,IAAIU,OAAAA,QAAAA,OAAAA,KAAAA,IAAAA,KAAAA,IAAAA,GAAIE,aAAa,EAAE;gBAGrBX;YAFAH,UAAUS,OAAO,GAAGG,GAAGE,aAAa;YACpCR;YACAH,CAAAA,6BAAAA,kBAAkBM,OAAO,AAAPA,MAAO,QAAzBN,+BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,2BAA2BY,OAAO,CAACf,UAAUS,OAAO;QACtD;IACF,GACA;QAACL;QAAgBE;KAAa;IAGhCR,OAAMkB,SAAS,CAAC;QACdb,kBAAkBM,OAAO,GAAGf,iCAAiCU,gBAAgBE;QAE7E,IAAI,CAACN,UAAUS,OAAO,IAAI,CAACN,kBAAkBM,OAAO,EAAE;YACpD;QACF;QAEAN,kBAAkBM,OAAO,CAACM,OAAO,CAACf,UAAUS,OAAO;QAEnD,OAAO;gBACLN;YAAAA,CAAAA,6BAAAA,kBAAkBM,OAAO,AAAPA,MAAO,QAAzBN,+BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,2BAA2Bc,UAAU;QACvC;IACF,GAAG;QAACX;QAAcF;KAAe;IAEjC,OAAO;QAAER;QAAOe;IAAkB;AACpC;AASO,SAASjB,iCACdU,cAA2C,EAC3Cc,QAAgC;QAE3Bd;IAAL,IAAI,CAACA,CAAAA,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,CAAAA,8BAAAA,eAAgBe,WAAW,AAAXA,MAAW,QAA3Bf,gCAAAA,KAAAA,IAAAA,KAAAA,IAAAA,4BAA6BgB,cAAc,AAAdA,GAAgB;QAChD,OAAO;IACT;IAEA,OAAO,IAAIhB,eAAee,WAAW,CAACC,cAAc,CAACF;AACvD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useTableColumnResizeMouseHandler.js"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { getEventClientCoords, isMouseEvent, isTouchEvent, useAnimationFrame } from '@fluentui/react-utilities';\nexport function useTableColumnResizeMouseHandler(columnResizeState) {\n const mouseX = React.useRef(0);\n const currentWidth = React.useRef(0);\n const colId = React.useRef(undefined);\n const [dragging, setDragging] = React.useState(false);\n const { targetDocument } = useFluent();\n const { getColumnWidth, setColumnWidth } = columnResizeState;\n const recalculatePosition = React.useCallback((e)=>{\n const { clientX } = getEventClientCoords(e);\n const dx = clientX - mouseX.current;\n // Update the local width for the column and set it\n currentWidth.current += dx;\n colId.current && setColumnWidth(e, {\n columnId: colId.current,\n width: currentWidth.current\n });\n mouseX.current = clientX;\n }, [\n setColumnWidth\n ]);\n const [requestRecalcFrame] = useAnimationFrame();\n const onDrag = React.useCallback((e)=>{\n // Using requestAnimationFrame here drastically improves resizing experience on slower CPUs\n requestRecalcFrame(()=>recalculatePosition(e));\n }, [\n requestRecalcFrame,\n recalculatePosition\n ]);\n const onDragEnd = React.useCallback((event)=>{\n if (isMouseEvent(event)) {\n targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.removeEventListener('mouseup', onDragEnd);\n targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.removeEventListener('mousemove', onDrag);\n }\n if (isTouchEvent(event)) {\n targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.removeEventListener('touchend', onDragEnd);\n targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.removeEventListener('touchmove', onDrag);\n }\n setDragging(false);\n }, [\n onDrag,\n targetDocument\n ]);\n const getOnMouseDown = React.useCallback((columnId)=>(event)=>{\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 = getColumnWidth(columnId);\n mouseX.current = getEventClientCoords(event).clientX;\n colId.current = columnId;\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 === null || targetDocument === void 0 ? void 0 : targetDocument.addEventListener('mouseup', onDragEnd);\n targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.addEventListener('mousemove', onDrag);\n setDragging(true);\n }\n if (isTouchEvent(event)) {\n targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.addEventListener('touchend', onDragEnd);\n targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.addEventListener('touchmove', onDrag);\n setDragging(true);\n }\n }, [\n getColumnWidth,\n onDrag,\n onDragEnd,\n targetDocument\n ]);\n return {\n getOnMouseDown,\n dragging\n };\n}\n"],"names":["useTableColumnResizeMouseHandler","columnResizeState","mouseX","React","useRef","currentWidth","colId","undefined","dragging","setDragging","useState","targetDocument","useFluent","getColumnWidth","setColumnWidth","recalculatePosition","useCallback","e","clientX","getEventClientCoords","dx","current","columnId","width","requestRecalcFrame","useAnimationFrame","onDrag","onDragEnd","event","isMouseEvent","removeEventListener","isTouchEvent","getOnMouseDown","target","currentTarget","button","addEventListener"],"mappings":";;;;+BAGgBA;;;eAAAA;;;;iEAHO;qCACyB;gCACoC;AAC7E,SAASA,iCAAiCC,iBAAiB;IAC9D,MAAMC,SAASC,OAAMC,MAAM,CAAC;IAC5B,MAAMC,eAAeF,OAAMC,MAAM,CAAC;IAClC,MAAME,QAAQH,OAAMC,MAAM,CAACG;IAC3B,MAAM,CAACC,UAAUC,YAAY,GAAGN,OAAMO,QAAQ,CAAC;IAC/C,MAAM,EAAEC,cAAc,EAAE,GAAGC,IAAAA,uCAAS;IACpC,MAAM,EAAEC,cAAc,EAAEC,cAAc,EAAE,GAAGb;IAC3C,MAAMc,sBAAsBZ,OAAMa,WAAW,CAAC,CAACC;QAC3C,MAAM,EAAEC,OAAO,EAAE,GAAGC,IAAAA,oCAAoB,EAACF;QACzC,MAAMG,KAAKF,UAAUhB,OAAOmB,OAAO;QACnC,mDAAmD;QACnDhB,aAAagB,OAAO,IAAID;QACxBd,MAAMe,OAAO,IAAIP,eAAeG,GAAG;YAC/BK,UAAUhB,MAAMe,OAAO;YACvBE,OAAOlB,aAAagB,OAAO;QAC/B;QACAnB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AAmB,QAAQA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeyB,gBAAgB,CAAC,aAAaV;gBAC7GjB,YAAY;YAChB;YACA,IAAIsB,IAAAA,4BAAY,EAACH,QAAQ;gBACrBjB,mBAAmB,QAAQA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeyB,gBAAgB,CAAC,YAAYT;gBAC5GhB,mBAAmB,QAAQA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeyB,gBAAgB,CAAC,aAAaV;gBAC7GjB,YAAY;YAChB;QACJ,GAAG;QACHI;QACAa;QACAC;QACAhB;KACH;IACD,OAAO;QACHqB;QACAxB;IACJ;AACJ"}
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 useAnimationFrame,\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 const [dragging, setDragging] = React.useState<boolean>(false);\n\n const { targetDocument } = useFluent();\n\n const { getColumnWidth, setColumnWidth } = columnResizeState;\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 && setColumnWidth(e, { columnId: colId.current, width: currentWidth.current });\n mouseX.current = clientX;\n },\n [setColumnWidth],\n );\n\n const [requestRecalcFrame] = useAnimationFrame();\n\n const onDrag = React.useCallback(\n (e: NativeTouchOrMouseEvent) => {\n // Using requestAnimationFrame here drastically improves resizing experience on slower CPUs\n requestRecalcFrame(() => recalculatePosition(e));\n },\n [requestRecalcFrame, 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 setDragging(false);\n },\n [onDrag, targetDocument],\n );\n\n const getOnMouseDown = React.useCallback(\n (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 = 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 setDragging(true);\n }\n\n if (isTouchEvent(event)) {\n targetDocument?.addEventListener('touchend', onDragEnd);\n targetDocument?.addEventListener('touchmove', onDrag);\n setDragging(true);\n }\n },\n [getColumnWidth, onDrag, onDragEnd, targetDocument],\n );\n\n return {\n getOnMouseDown,\n dragging,\n };\n}\n"],"names":["useTableColumnResizeMouseHandler","columnResizeState","mouseX","React","useRef","currentWidth","colId","undefined","dragging","setDragging","useState","targetDocument","useFluent","getColumnWidth","setColumnWidth","recalculatePosition","useCallback","e","clientX","getEventClientCoords","dx","current","columnId","width","requestRecalcFrame","useAnimationFrame","onDrag","onDragEnd","event","isMouseEvent","removeEventListener","isTouchEvent","getOnMouseDown","target","currentTarget","button","addEventListener"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYgBA;;;eAAAA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