@react-spectrum/table 3.0.0-beta.0 → 3.0.0-nightly-641446f65-240905

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 (266) hide show
  1. package/dist/DragPreview.main.js +54 -0
  2. package/dist/DragPreview.main.js.map +1 -0
  3. package/dist/DragPreview.mjs +49 -0
  4. package/dist/DragPreview.module.js +49 -0
  5. package/dist/DragPreview.module.js.map +1 -0
  6. package/dist/InsertionIndicator.main.js +63 -0
  7. package/dist/InsertionIndicator.main.js.map +1 -0
  8. package/dist/InsertionIndicator.mjs +58 -0
  9. package/dist/InsertionIndicator.module.js +58 -0
  10. package/dist/InsertionIndicator.module.js.map +1 -0
  11. package/dist/Nubbin.main.js +62 -0
  12. package/dist/Nubbin.main.js.map +1 -0
  13. package/dist/Nubbin.mjs +53 -0
  14. package/dist/Nubbin.module.js +53 -0
  15. package/dist/Nubbin.module.js.map +1 -0
  16. package/dist/Resizer.main.js +150 -0
  17. package/dist/Resizer.main.js.map +1 -0
  18. package/dist/Resizer.mjs +144 -0
  19. package/dist/Resizer.module.js +144 -0
  20. package/dist/Resizer.module.js.map +1 -0
  21. package/dist/RootDropIndicator.main.js +57 -0
  22. package/dist/RootDropIndicator.main.js.map +1 -0
  23. package/dist/RootDropIndicator.mjs +48 -0
  24. package/dist/RootDropIndicator.module.js +48 -0
  25. package/dist/RootDropIndicator.module.js.map +1 -0
  26. package/dist/TableView.main.js +50 -0
  27. package/dist/TableView.main.js.map +1 -0
  28. package/dist/TableView.mjs +41 -0
  29. package/dist/TableView.module.js +41 -0
  30. package/dist/TableView.module.js.map +1 -0
  31. package/dist/TableViewBase.main.js +1238 -0
  32. package/dist/TableViewBase.main.js.map +1 -0
  33. package/dist/TableViewBase.mjs +1231 -0
  34. package/dist/TableViewBase.module.js +1231 -0
  35. package/dist/TableViewBase.module.js.map +1 -0
  36. package/dist/TableViewLayout.main.js +97 -0
  37. package/dist/TableViewLayout.main.js.map +1 -0
  38. package/dist/TableViewLayout.mjs +92 -0
  39. package/dist/TableViewLayout.module.js +92 -0
  40. package/dist/TableViewLayout.module.js.map +1 -0
  41. package/dist/TableViewWrapper.main.js +46 -0
  42. package/dist/TableViewWrapper.main.js.map +1 -0
  43. package/dist/TableViewWrapper.mjs +37 -0
  44. package/dist/TableViewWrapper.module.js +37 -0
  45. package/dist/TableViewWrapper.module.js.map +1 -0
  46. package/dist/TreeGridTableView.main.js +50 -0
  47. package/dist/TreeGridTableView.main.js.map +1 -0
  48. package/dist/TreeGridTableView.mjs +41 -0
  49. package/dist/TreeGridTableView.module.js +41 -0
  50. package/dist/TreeGridTableView.module.js.map +1 -0
  51. package/dist/ar-AE.main.js +14 -0
  52. package/dist/ar-AE.main.js.map +1 -0
  53. package/dist/ar-AE.mjs +16 -0
  54. package/dist/ar-AE.module.js +16 -0
  55. package/dist/ar-AE.module.js.map +1 -0
  56. package/dist/bg-BG.main.js +14 -0
  57. package/dist/bg-BG.main.js.map +1 -0
  58. package/dist/bg-BG.mjs +16 -0
  59. package/dist/bg-BG.module.js +16 -0
  60. package/dist/bg-BG.module.js.map +1 -0
  61. package/dist/cs-CZ.main.js +14 -0
  62. package/dist/cs-CZ.main.js.map +1 -0
  63. package/dist/cs-CZ.mjs +16 -0
  64. package/dist/cs-CZ.module.js +16 -0
  65. package/dist/cs-CZ.module.js.map +1 -0
  66. package/dist/da-DK.main.js +14 -0
  67. package/dist/da-DK.main.js.map +1 -0
  68. package/dist/da-DK.mjs +16 -0
  69. package/dist/da-DK.module.js +16 -0
  70. package/dist/da-DK.module.js.map +1 -0
  71. package/dist/de-DE.main.js +14 -0
  72. package/dist/de-DE.main.js.map +1 -0
  73. package/dist/de-DE.mjs +16 -0
  74. package/dist/de-DE.module.js +16 -0
  75. package/dist/de-DE.module.js.map +1 -0
  76. package/dist/el-GR.main.js +14 -0
  77. package/dist/el-GR.main.js.map +1 -0
  78. package/dist/el-GR.mjs +16 -0
  79. package/dist/el-GR.module.js +16 -0
  80. package/dist/el-GR.module.js.map +1 -0
  81. package/dist/en-US.main.js +14 -0
  82. package/dist/en-US.main.js.map +1 -0
  83. package/dist/en-US.mjs +16 -0
  84. package/dist/en-US.module.js +16 -0
  85. package/dist/en-US.module.js.map +1 -0
  86. package/dist/es-ES.main.js +14 -0
  87. package/dist/es-ES.main.js.map +1 -0
  88. package/dist/es-ES.mjs +16 -0
  89. package/dist/es-ES.module.js +16 -0
  90. package/dist/es-ES.module.js.map +1 -0
  91. package/dist/et-EE.main.js +14 -0
  92. package/dist/et-EE.main.js.map +1 -0
  93. package/dist/et-EE.mjs +16 -0
  94. package/dist/et-EE.module.js +16 -0
  95. package/dist/et-EE.module.js.map +1 -0
  96. package/dist/fi-FI.main.js +14 -0
  97. package/dist/fi-FI.main.js.map +1 -0
  98. package/dist/fi-FI.mjs +16 -0
  99. package/dist/fi-FI.module.js +16 -0
  100. package/dist/fi-FI.module.js.map +1 -0
  101. package/dist/fr-FR.main.js +14 -0
  102. package/dist/fr-FR.main.js.map +1 -0
  103. package/dist/fr-FR.mjs +16 -0
  104. package/dist/fr-FR.module.js +16 -0
  105. package/dist/fr-FR.module.js.map +1 -0
  106. package/dist/he-IL.main.js +14 -0
  107. package/dist/he-IL.main.js.map +1 -0
  108. package/dist/he-IL.mjs +16 -0
  109. package/dist/he-IL.module.js +16 -0
  110. package/dist/he-IL.module.js.map +1 -0
  111. package/dist/hr-HR.main.js +14 -0
  112. package/dist/hr-HR.main.js.map +1 -0
  113. package/dist/hr-HR.mjs +16 -0
  114. package/dist/hr-HR.module.js +16 -0
  115. package/dist/hr-HR.module.js.map +1 -0
  116. package/dist/hu-HU.main.js +14 -0
  117. package/dist/hu-HU.main.js.map +1 -0
  118. package/dist/hu-HU.mjs +16 -0
  119. package/dist/hu-HU.module.js +16 -0
  120. package/dist/hu-HU.module.js.map +1 -0
  121. package/dist/import.mjs +22 -0
  122. package/dist/intlStrings.main.js +108 -0
  123. package/dist/intlStrings.main.js.map +1 -0
  124. package/dist/intlStrings.mjs +110 -0
  125. package/dist/intlStrings.module.js +110 -0
  126. package/dist/intlStrings.module.js.map +1 -0
  127. package/dist/it-IT.main.js +14 -0
  128. package/dist/it-IT.main.js.map +1 -0
  129. package/dist/it-IT.mjs +16 -0
  130. package/dist/it-IT.module.js +16 -0
  131. package/dist/it-IT.module.js.map +1 -0
  132. package/dist/ja-JP.main.js +14 -0
  133. package/dist/ja-JP.main.js.map +1 -0
  134. package/dist/ja-JP.mjs +16 -0
  135. package/dist/ja-JP.module.js +16 -0
  136. package/dist/ja-JP.module.js.map +1 -0
  137. package/dist/ko-KR.main.js +14 -0
  138. package/dist/ko-KR.main.js.map +1 -0
  139. package/dist/ko-KR.mjs +16 -0
  140. package/dist/ko-KR.module.js +16 -0
  141. package/dist/ko-KR.module.js.map +1 -0
  142. package/dist/lt-LT.main.js +14 -0
  143. package/dist/lt-LT.main.js.map +1 -0
  144. package/dist/lt-LT.mjs +16 -0
  145. package/dist/lt-LT.module.js +16 -0
  146. package/dist/lt-LT.module.js.map +1 -0
  147. package/dist/lv-LV.main.js +14 -0
  148. package/dist/lv-LV.main.js.map +1 -0
  149. package/dist/lv-LV.mjs +16 -0
  150. package/dist/lv-LV.module.js +16 -0
  151. package/dist/lv-LV.module.js.map +1 -0
  152. package/dist/main.js +28 -936
  153. package/dist/main.js.map +1 -1
  154. package/dist/module.js +17 -844
  155. package/dist/module.js.map +1 -1
  156. package/dist/nb-NO.main.js +14 -0
  157. package/dist/nb-NO.main.js.map +1 -0
  158. package/dist/nb-NO.mjs +16 -0
  159. package/dist/nb-NO.module.js +16 -0
  160. package/dist/nb-NO.module.js.map +1 -0
  161. package/dist/nl-NL.main.js +14 -0
  162. package/dist/nl-NL.main.js.map +1 -0
  163. package/dist/nl-NL.mjs +16 -0
  164. package/dist/nl-NL.module.js +16 -0
  165. package/dist/nl-NL.module.js.map +1 -0
  166. package/dist/pl-PL.main.js +14 -0
  167. package/dist/pl-PL.main.js.map +1 -0
  168. package/dist/pl-PL.mjs +16 -0
  169. package/dist/pl-PL.module.js +16 -0
  170. package/dist/pl-PL.module.js.map +1 -0
  171. package/dist/pt-BR.main.js +14 -0
  172. package/dist/pt-BR.main.js.map +1 -0
  173. package/dist/pt-BR.mjs +16 -0
  174. package/dist/pt-BR.module.js +16 -0
  175. package/dist/pt-BR.module.js.map +1 -0
  176. package/dist/pt-PT.main.js +14 -0
  177. package/dist/pt-PT.main.js.map +1 -0
  178. package/dist/pt-PT.mjs +16 -0
  179. package/dist/pt-PT.module.js +16 -0
  180. package/dist/pt-PT.module.js.map +1 -0
  181. package/dist/ro-RO.main.js +14 -0
  182. package/dist/ro-RO.main.js.map +1 -0
  183. package/dist/ro-RO.mjs +16 -0
  184. package/dist/ro-RO.module.js +16 -0
  185. package/dist/ro-RO.module.js.map +1 -0
  186. package/dist/ru-RU.main.js +14 -0
  187. package/dist/ru-RU.main.js.map +1 -0
  188. package/dist/ru-RU.mjs +16 -0
  189. package/dist/ru-RU.module.js +16 -0
  190. package/dist/ru-RU.module.js.map +1 -0
  191. package/dist/sk-SK.main.js +14 -0
  192. package/dist/sk-SK.main.js.map +1 -0
  193. package/dist/sk-SK.mjs +16 -0
  194. package/dist/sk-SK.module.js +16 -0
  195. package/dist/sk-SK.module.js.map +1 -0
  196. package/dist/sl-SI.main.js +14 -0
  197. package/dist/sl-SI.main.js.map +1 -0
  198. package/dist/sl-SI.mjs +16 -0
  199. package/dist/sl-SI.module.js +16 -0
  200. package/dist/sl-SI.module.js.map +1 -0
  201. package/dist/sr-SP.main.js +14 -0
  202. package/dist/sr-SP.main.js.map +1 -0
  203. package/dist/sr-SP.mjs +16 -0
  204. package/dist/sr-SP.module.js +16 -0
  205. package/dist/sr-SP.module.js.map +1 -0
  206. package/dist/sv-SE.main.js +14 -0
  207. package/dist/sv-SE.main.js.map +1 -0
  208. package/dist/sv-SE.mjs +16 -0
  209. package/dist/sv-SE.module.js +16 -0
  210. package/dist/sv-SE.module.js.map +1 -0
  211. package/dist/table.b13eee90.css +220 -0
  212. package/dist/table.b13eee90.css.map +1 -0
  213. package/dist/table_css.main.js +74 -0
  214. package/dist/table_css.main.js.map +1 -0
  215. package/dist/table_css.mjs +76 -0
  216. package/dist/table_css.module.js +76 -0
  217. package/dist/table_css.module.js.map +1 -0
  218. package/dist/table_vars_css.main.js +197 -0
  219. package/dist/table_vars_css.main.js.map +1 -0
  220. package/dist/table_vars_css.mjs +199 -0
  221. package/dist/table_vars_css.module.js +199 -0
  222. package/dist/table_vars_css.module.js.map +1 -0
  223. package/dist/tr-TR.main.js +14 -0
  224. package/dist/tr-TR.main.js.map +1 -0
  225. package/dist/tr-TR.mjs +16 -0
  226. package/dist/tr-TR.module.js +16 -0
  227. package/dist/tr-TR.module.js.map +1 -0
  228. package/dist/types.d.ts +77 -4
  229. package/dist/types.d.ts.map +1 -1
  230. package/dist/uk-UA.main.js +14 -0
  231. package/dist/uk-UA.main.js.map +1 -0
  232. package/dist/uk-UA.mjs +16 -0
  233. package/dist/uk-UA.module.js +16 -0
  234. package/dist/uk-UA.module.js.map +1 -0
  235. package/dist/vars.ce47d5ba.css +992 -0
  236. package/dist/vars.ce47d5ba.css.map +1 -0
  237. package/dist/zh-CN.main.js +14 -0
  238. package/dist/zh-CN.main.js.map +1 -0
  239. package/dist/zh-CN.mjs +16 -0
  240. package/dist/zh-CN.module.js +16 -0
  241. package/dist/zh-CN.module.js.map +1 -0
  242. package/dist/zh-TW.main.js +14 -0
  243. package/dist/zh-TW.main.js.map +1 -0
  244. package/dist/zh-TW.mjs +16 -0
  245. package/dist/zh-TW.module.js +16 -0
  246. package/dist/zh-TW.module.js.map +1 -0
  247. package/package.json +40 -28
  248. package/src/DragPreview.tsx +77 -0
  249. package/src/InsertionIndicator.tsx +62 -0
  250. package/src/Nubbin.tsx +28 -0
  251. package/src/Resizer.tsx +139 -0
  252. package/src/RootDropIndicator.tsx +40 -0
  253. package/src/TableView.tsx +24 -682
  254. package/src/TableViewBase.tsx +1552 -0
  255. package/src/TableViewLayout.ts +95 -0
  256. package/src/TableViewWrapper.tsx +106 -0
  257. package/src/TreeGridTableView.tsx +47 -0
  258. package/src/cursors/Cur_MoveHorizontal_9_9.svg +10 -0
  259. package/src/cursors/Cur_MoveToLeft_9_9.svg +10 -0
  260. package/src/cursors/Cur_MoveToRight_9_9.svg +10 -0
  261. package/src/index.ts +5 -1
  262. package/src/table.css +193 -0
  263. package/LICENSE +0 -201
  264. package/dist/main.css +0 -2
  265. package/dist/main.css.map +0 -1
  266. package/src/.DS_Store +0 -0
@@ -0,0 +1,1231 @@
1
+ import {InsertionIndicator as $7ee9a922ee4e8032$export$2c0bab5914a9d088} from "./InsertionIndicator.module.js";
2
+ import $7lS7h$intlStringsmodulejs from "./intlStrings.module.js";
3
+ import {Nubbin as $cb7d341e8868d81d$export$d9658cdf8c86807} from "./Nubbin.module.js";
4
+ import {Resizer as $fc695d2eafc2b351$export$48a76196cafe3b93, ResizeStateContext as $fc695d2eafc2b351$export$b517d84d4ad20b24} from "./Resizer.module.js";
5
+ import {RootDropIndicator as $4e6fc36ba71ba405$export$d30a7814cfd4033e} from "./RootDropIndicator.module.js";
6
+ import {DragPreview as $daa6ead3d9d3506a$export$905ab40ac2179daa} from "./DragPreview.module.js";
7
+ import "./vars.ce47d5ba.css";
8
+ import $7lS7h$table_vars_cssmodulejs from "./table_vars_css.module.js";
9
+ import "./table.b13eee90.css";
10
+ import $7lS7h$table_cssmodulejs from "./table_css.module.js";
11
+ import {TableViewLayout as $5fb43af69b290859$export$725d101278f5a47b} from "./TableViewLayout.module.js";
12
+ import $7lS7h$spectrumiconsuiArrowDownSmall from "@spectrum-icons/ui/ArrowDownSmall";
13
+ import {Checkbox as $7lS7h$Checkbox} from "@react-spectrum/checkbox";
14
+ import $7lS7h$spectrumiconsuiChevronDownMedium from "@spectrum-icons/ui/ChevronDownMedium";
15
+ import $7lS7h$spectrumiconsuiChevronLeftMedium from "@spectrum-icons/ui/ChevronLeftMedium";
16
+ import $7lS7h$spectrumiconsuiChevronRightMedium from "@spectrum-icons/ui/ChevronRightMedium";
17
+ import {useStyleProps as $7lS7h$useStyleProps, useDOMRef as $7lS7h$useDOMRef, classNames as $7lS7h$classNames, useFocusableRef as $7lS7h$useFocusableRef, useUnwrapDOMRef as $7lS7h$useUnwrapDOMRef} from "@react-spectrum/utils";
18
+ import {useFocusRing as $7lS7h$useFocusRing, FocusScope as $7lS7h$FocusScope, FocusRing as $7lS7h$FocusRing} from "@react-aria/focus";
19
+ import {getInteractionModality as $7lS7h$getInteractionModality, usePress as $7lS7h$usePress, useHover as $7lS7h$useHover, isFocusVisible as $7lS7h$isFocusVisible} from "@react-aria/interactions";
20
+ import {mergeProps as $7lS7h$mergeProps, useLoadMore as $7lS7h$useLoadMore, scrollIntoView as $7lS7h$scrollIntoView, scrollIntoViewport as $7lS7h$scrollIntoViewport, isAndroid as $7lS7h$isAndroid} from "@react-aria/utils";
21
+ import {MenuTrigger as $7lS7h$MenuTrigger, Menu as $7lS7h$Menu, Item as $7lS7h$Item} from "@react-spectrum/menu";
22
+ import {useVirtualizerState as $7lS7h$useVirtualizerState} from "@react-stately/virtualizer";
23
+ import {setScrollLeft as $7lS7h$setScrollLeft, ScrollView as $7lS7h$ScrollView, layoutInfoToStyle as $7lS7h$layoutInfoToStyle, VirtualizerItem as $7lS7h$VirtualizerItem} from "@react-aria/virtualizer";
24
+ import $7lS7h$spectrumiconsuiListGripper from "@spectrum-icons/ui/ListGripper";
25
+ import {ListKeyboardDelegate as $7lS7h$ListKeyboardDelegate} from "@react-aria/selection";
26
+ import {ProgressCircle as $7lS7h$ProgressCircle} from "@react-spectrum/progress";
27
+ import $7lS7h$react, {useContext as $7lS7h$useContext, useRef as $7lS7h$useRef, useEffect as $7lS7h$useEffect, useState as $7lS7h$useState, useMemo as $7lS7h$useMemo, useCallback as $7lS7h$useCallback} from "react";
28
+ import {useTableColumnResizeState as $7lS7h$useTableColumnResizeState} from "@react-stately/table";
29
+ import {TooltipTrigger as $7lS7h$TooltipTrigger, Tooltip as $7lS7h$Tooltip} from "@react-spectrum/tooltip";
30
+ import {useButton as $7lS7h$useButton} from "@react-aria/button";
31
+ import {useLocale as $7lS7h$useLocale, useLocalizedStringFormatter as $7lS7h$useLocalizedStringFormatter} from "@react-aria/i18n";
32
+ import {useProviderProps as $7lS7h$useProviderProps, useProvider as $7lS7h$useProvider} from "@react-spectrum/provider";
33
+ import {useTable as $7lS7h$useTable, useTableRowGroup as $7lS7h$useTableRowGroup, useTableColumnHeader as $7lS7h$useTableColumnHeader, useTableSelectAllCheckbox as $7lS7h$useTableSelectAllCheckbox, useTableRow as $7lS7h$useTableRow, useTableHeaderRow as $7lS7h$useTableHeaderRow, useTableCell as $7lS7h$useTableCell, useTableSelectionCheckbox as $7lS7h$useTableSelectionCheckbox} from "@react-aria/table";
34
+ import {VisuallyHidden as $7lS7h$VisuallyHidden, useVisuallyHidden as $7lS7h$useVisuallyHidden} from "@react-aria/visually-hidden";
35
+
36
+
37
+ function $parcel$interopDefault(a) {
38
+ return a && a.__esModule ? a.default : a;
39
+ }
40
+ /*
41
+ * Copyright 2023 Adobe. All rights reserved.
42
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
43
+ * you may not use this file except in compliance with the License. You may obtain a copy
44
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
45
+ *
46
+ * Unless required by applicable law or agreed to in writing, software distributed under
47
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
48
+ * OF ANY KIND, either express or implied. See the License for the specific language
49
+ * governing permissions and limitations under the License.
50
+ */
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+ const $bd013581c0a4b065$var$DEFAULT_HEADER_HEIGHT = {
83
+ medium: 34,
84
+ large: 40
85
+ };
86
+ const $bd013581c0a4b065$var$DEFAULT_HIDE_HEADER_CELL_WIDTH = {
87
+ medium: 38,
88
+ large: 46
89
+ };
90
+ const $bd013581c0a4b065$var$ROW_HEIGHTS = {
91
+ compact: {
92
+ medium: 32,
93
+ large: 40
94
+ },
95
+ regular: {
96
+ medium: 40,
97
+ large: 50
98
+ },
99
+ spacious: {
100
+ medium: 48,
101
+ large: 60
102
+ }
103
+ };
104
+ const $bd013581c0a4b065$var$SELECTION_CELL_DEFAULT_WIDTH = {
105
+ medium: 38,
106
+ large: 48
107
+ };
108
+ const $bd013581c0a4b065$var$DRAG_BUTTON_CELL_DEFAULT_WIDTH = {
109
+ medium: 16,
110
+ large: 20
111
+ };
112
+ const $bd013581c0a4b065$var$LEVEL_OFFSET_WIDTH = {
113
+ medium: 16,
114
+ large: 20
115
+ };
116
+ const $bd013581c0a4b065$export$93e4b0b2cc49b648 = /*#__PURE__*/ (0, $7lS7h$react).createContext(null);
117
+ function $bd013581c0a4b065$export$3cb274deb6c2d854() {
118
+ return (0, $7lS7h$useContext)($bd013581c0a4b065$export$93e4b0b2cc49b648);
119
+ }
120
+ const $bd013581c0a4b065$export$d288a7dd40372bc = /*#__PURE__*/ (0, $7lS7h$react).createContext(null);
121
+ function $bd013581c0a4b065$export$3f8f74b6bfd2c5df() {
122
+ return (0, $7lS7h$useContext)($bd013581c0a4b065$export$d288a7dd40372bc);
123
+ }
124
+ function $bd013581c0a4b065$var$TableViewBase(props, ref) {
125
+ var _dropState_target;
126
+ props = (0, $7lS7h$useProviderProps)(props);
127
+ let { isQuiet: isQuiet, onAction: onAction, onResizeStart: propsOnResizeStart, onResizeEnd: propsOnResizeEnd, dragAndDropHooks: dragAndDropHooks, state: state } = props;
128
+ let isTableDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDraggableCollectionState);
129
+ let isTableDroppable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDroppableCollectionState);
130
+ let dragHooksProvided = (0, $7lS7h$useRef)(isTableDraggable);
131
+ let dropHooksProvided = (0, $7lS7h$useRef)(isTableDroppable);
132
+ (0, $7lS7h$useEffect)(()=>{
133
+ if (dragHooksProvided.current !== isTableDraggable) console.warn('Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.');
134
+ if (dropHooksProvided.current !== isTableDroppable) console.warn('Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.');
135
+ if ('expandedKeys' in state && (isTableDraggable || isTableDroppable)) console.warn('Drag and drop is not yet fully supported with expandable rows and may produce unexpected results.');
136
+ }, [
137
+ isTableDraggable,
138
+ isTableDroppable,
139
+ state
140
+ ]);
141
+ let { styleProps: styleProps } = (0, $7lS7h$useStyleProps)(props);
142
+ let { scale: scale } = (0, $7lS7h$useProvider)();
143
+ // Starts when the user selects resize from the menu, ends when resizing ends
144
+ // used to control the visibility of the resizer Nubbin
145
+ let [isInResizeMode, setIsInResizeMode] = (0, $7lS7h$useState)(false);
146
+ // Starts when the resizer is actually moved
147
+ // entering resizing/exiting resizing doesn't trigger a render
148
+ // with table layout, so we need to track it here
149
+ let [, setIsResizing] = (0, $7lS7h$useState)(false);
150
+ let domRef = (0, $7lS7h$useDOMRef)(ref);
151
+ let headerRef = (0, $7lS7h$useRef)(undefined);
152
+ let bodyRef = (0, $7lS7h$useRef)(undefined);
153
+ let density = props.density || 'regular';
154
+ let layout = (0, $7lS7h$useMemo)(()=>new (0, $5fb43af69b290859$export$725d101278f5a47b)({
155
+ // If props.rowHeight is auto, then use estimated heights based on scale, otherwise use fixed heights.
156
+ rowHeight: props.overflowMode === 'wrap' ? null : $bd013581c0a4b065$var$ROW_HEIGHTS[density][scale],
157
+ estimatedRowHeight: props.overflowMode === 'wrap' ? $bd013581c0a4b065$var$ROW_HEIGHTS[density][scale] : null,
158
+ headingHeight: props.overflowMode === 'wrap' ? null : $bd013581c0a4b065$var$DEFAULT_HEADER_HEIGHT[scale],
159
+ estimatedHeadingHeight: props.overflowMode === 'wrap' ? $bd013581c0a4b065$var$DEFAULT_HEADER_HEIGHT[scale] : null
160
+ }), // don't recompute when state.collection changes, only used for initial value
161
+ // eslint-disable-next-line react-hooks/exhaustive-deps
162
+ [
163
+ props.overflowMode,
164
+ scale,
165
+ density
166
+ ]);
167
+ let dragState;
168
+ let preview = (0, $7lS7h$useRef)(null);
169
+ if (isTableDraggable) {
170
+ dragState = dragAndDropHooks.useDraggableCollectionState({
171
+ collection: state.collection,
172
+ selectionManager: state.selectionManager,
173
+ preview: preview
174
+ });
175
+ dragAndDropHooks.useDraggableCollection({}, dragState, domRef);
176
+ }
177
+ let DragPreview = dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.DragPreview;
178
+ let dropState;
179
+ let droppableCollection;
180
+ let isRootDropTarget;
181
+ if (isTableDroppable) {
182
+ dropState = dragAndDropHooks.useDroppableCollectionState({
183
+ collection: state.collection,
184
+ selectionManager: state.selectionManager
185
+ });
186
+ droppableCollection = dragAndDropHooks.useDroppableCollection({
187
+ keyboardDelegate: new (0, $7lS7h$ListKeyboardDelegate)({
188
+ collection: state.collection,
189
+ disabledKeys: state.selectionManager.disabledKeys,
190
+ ref: domRef,
191
+ layoutDelegate: layout
192
+ }),
193
+ dropTargetDelegate: layout
194
+ }, dropState, domRef);
195
+ isRootDropTarget = dropState.isDropTarget({
196
+ type: 'root'
197
+ });
198
+ }
199
+ let { gridProps: gridProps } = (0, $7lS7h$useTable)({
200
+ ...props,
201
+ isVirtualized: true,
202
+ layoutDelegate: layout,
203
+ onRowAction: onAction,
204
+ scrollRef: bodyRef
205
+ }, state, domRef);
206
+ let [headerMenuOpen, setHeaderMenuOpen] = (0, $7lS7h$useState)(false);
207
+ let [headerRowHovered, setHeaderRowHovered] = (0, $7lS7h$useState)(false);
208
+ // This overrides collection view's renderWrapper to support DOM hierarchy.
209
+ let renderWrapper = (0, $7lS7h$useCallback)((parent, reusableView, children, renderChildren)=>{
210
+ if (reusableView.viewType === 'rowgroup') return /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$var$TableRowGroup, {
211
+ key: reusableView.key,
212
+ layoutInfo: reusableView.layoutInfo,
213
+ parent: parent === null || parent === void 0 ? void 0 : parent.layoutInfo,
214
+ // Override the default role="rowgroup" with role="presentation",
215
+ // in favor or adding role="rowgroup" to the ScrollView with
216
+ // ref={bodyRef} in the TableVirtualizer below.
217
+ role: "presentation"
218
+ }, renderChildren(children));
219
+ if (reusableView.viewType === 'header') return /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$var$TableHeader, {
220
+ key: reusableView.key,
221
+ layoutInfo: reusableView.layoutInfo,
222
+ parent: parent === null || parent === void 0 ? void 0 : parent.layoutInfo
223
+ }, renderChildren(children));
224
+ if (reusableView.viewType === 'row') return /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$var$TableRow, {
225
+ key: reusableView.key,
226
+ item: reusableView.content,
227
+ layoutInfo: reusableView.layoutInfo,
228
+ parent: parent === null || parent === void 0 ? void 0 : parent.layoutInfo
229
+ }, renderChildren(children));
230
+ if (reusableView.viewType === 'headerrow') return /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$var$TableHeaderRow, {
231
+ onHoverChange: setHeaderRowHovered,
232
+ key: reusableView.key,
233
+ layoutInfo: reusableView.layoutInfo,
234
+ parent: parent === null || parent === void 0 ? void 0 : parent.layoutInfo,
235
+ item: reusableView.content
236
+ }, renderChildren(children));
237
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$var$TableCellWrapper, {
238
+ key: reusableView.key,
239
+ layoutInfo: reusableView.layoutInfo,
240
+ virtualizer: reusableView.virtualizer,
241
+ parent: parent
242
+ }, reusableView.rendered);
243
+ }, []);
244
+ let renderView = (0, $7lS7h$useCallback)((type, item)=>{
245
+ switch(type){
246
+ case 'header':
247
+ case 'rowgroup':
248
+ case 'section':
249
+ case 'row':
250
+ case 'headerrow':
251
+ return null;
252
+ case 'cell':
253
+ if (item.props.isSelectionCell) return /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$var$TableCheckboxCell, {
254
+ cell: item
255
+ });
256
+ if (item.props.isDragButtonCell) return /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$var$TableDragCell, {
257
+ cell: item
258
+ });
259
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$var$TableCell, {
260
+ cell: item
261
+ });
262
+ case 'placeholder':
263
+ // TODO: move to react-aria?
264
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
265
+ role: "gridcell",
266
+ "aria-colindex": item.index + 1,
267
+ "aria-colspan": item.colspan > 1 ? item.colspan : null
268
+ });
269
+ case 'column':
270
+ if (item.props.isSelectionCell) return /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$var$TableSelectAllCell, {
271
+ column: item
272
+ });
273
+ if (item.props.isDragButtonCell) return /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$var$TableDragHeaderCell, {
274
+ column: item
275
+ });
276
+ // TODO: consider this case, what if we have hidden headers and a empty table
277
+ if (item.props.hideHeader) return /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$TooltipTrigger), {
278
+ placement: "top",
279
+ trigger: "focus"
280
+ }, /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$var$TableColumnHeader, {
281
+ column: item
282
+ }), /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$Tooltip), {
283
+ placement: "top"
284
+ }, item.rendered));
285
+ if (item.props.allowsResizing && !item.hasChildNodes) return /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$var$ResizableTableColumnHeader, {
286
+ column: item
287
+ });
288
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$var$TableColumnHeader, {
289
+ column: item
290
+ });
291
+ case 'loader':
292
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$var$LoadingState, null);
293
+ case 'empty':
294
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$var$EmptyState, null);
295
+ }
296
+ }, []);
297
+ let [isVerticalScrollbarVisible, setVerticalScollbarVisible] = (0, $7lS7h$useState)(false);
298
+ let [isHorizontalScrollbarVisible, setHorizontalScollbarVisible] = (0, $7lS7h$useState)(false);
299
+ let viewport = (0, $7lS7h$useRef)({
300
+ x: 0,
301
+ y: 0,
302
+ width: 0,
303
+ height: 0
304
+ });
305
+ let onVisibleRectChange = (0, $7lS7h$useCallback)((e)=>{
306
+ if (viewport.current.width === e.width && viewport.current.height === e.height) return;
307
+ viewport.current = e;
308
+ if (bodyRef.current) {
309
+ setVerticalScollbarVisible(bodyRef.current.clientWidth + 2 < bodyRef.current.offsetWidth);
310
+ setHorizontalScollbarVisible(bodyRef.current.clientHeight + 2 < bodyRef.current.offsetHeight);
311
+ }
312
+ }, []);
313
+ let { isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $7lS7h$useFocusRing)();
314
+ let isEmpty = state.collection.size === 0;
315
+ let onFocusedResizer = ()=>{
316
+ bodyRef.current.scrollLeft = headerRef.current.scrollLeft;
317
+ };
318
+ let onResizeStart = (0, $7lS7h$useCallback)((widths)=>{
319
+ setIsResizing(true);
320
+ propsOnResizeStart === null || propsOnResizeStart === void 0 ? void 0 : propsOnResizeStart(widths);
321
+ }, [
322
+ setIsResizing,
323
+ propsOnResizeStart
324
+ ]);
325
+ let onResizeEnd = (0, $7lS7h$useCallback)((widths)=>{
326
+ setIsInResizeMode(false);
327
+ setIsResizing(false);
328
+ propsOnResizeEnd === null || propsOnResizeEnd === void 0 ? void 0 : propsOnResizeEnd(widths);
329
+ }, [
330
+ propsOnResizeEnd,
331
+ setIsInResizeMode,
332
+ setIsResizing
333
+ ]);
334
+ let focusedKey = state.selectionManager.focusedKey;
335
+ let dropTargetKey = null;
336
+ if ((dropState === null || dropState === void 0 ? void 0 : (_dropState_target = dropState.target) === null || _dropState_target === void 0 ? void 0 : _dropState_target.type) === 'item') {
337
+ dropTargetKey = dropState.target.key;
338
+ if (dropState.target.dropPosition === 'before' && dropTargetKey !== state.collection.getFirstKey()) // Normalize to the "after" drop position since we only render those in the DOM.
339
+ // The exception to this is for the first row in the table, where we also render the "before" position.
340
+ dropTargetKey = state.collection.getKeyBefore(dropTargetKey);
341
+ }
342
+ let persistedKeys = (0, $7lS7h$useMemo)(()=>{
343
+ return new Set([
344
+ focusedKey,
345
+ dropTargetKey
346
+ ].filter((k)=>k !== null));
347
+ }, [
348
+ focusedKey,
349
+ dropTargetKey
350
+ ]);
351
+ let mergedProps = (0, $7lS7h$mergeProps)(isTableDroppable && (droppableCollection === null || droppableCollection === void 0 ? void 0 : droppableCollection.collectionProps), gridProps, focusProps, (dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.isVirtualDragging()) && {
352
+ tabIndex: null
353
+ });
354
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$export$93e4b0b2cc49b648.Provider, {
355
+ value: {
356
+ state: state,
357
+ dragState: dragState,
358
+ dropState: dropState,
359
+ dragAndDropHooks: dragAndDropHooks,
360
+ isTableDraggable: isTableDraggable,
361
+ isTableDroppable: isTableDroppable,
362
+ layout: layout,
363
+ onResizeStart: onResizeStart,
364
+ onResize: props.onResize,
365
+ onResizeEnd: onResizeEnd,
366
+ headerRowHovered: headerRowHovered,
367
+ isInResizeMode: isInResizeMode,
368
+ setIsInResizeMode: setIsInResizeMode,
369
+ isEmpty: isEmpty,
370
+ onFocusedResizer: onFocusedResizer,
371
+ headerMenuOpen: headerMenuOpen,
372
+ setHeaderMenuOpen: setHeaderMenuOpen,
373
+ renderEmptyState: props.renderEmptyState
374
+ }
375
+ }, /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$var$TableVirtualizer, {
376
+ ...mergedProps,
377
+ ...styleProps,
378
+ className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table', `spectrum-Table--${density}`, {
379
+ 'spectrum-Table--quiet': isQuiet,
380
+ 'spectrum-Table--wrap': props.overflowMode === 'wrap',
381
+ 'spectrum-Table--loadingMore': state.collection.body.props.loadingState === 'loadingMore',
382
+ 'spectrum-Table--isVerticalScrollbarVisible': isVerticalScrollbarVisible,
383
+ 'spectrum-Table--isHorizontalScrollbarVisible': isHorizontalScrollbarVisible
384
+ }, (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_cssmodulejs))), 'react-spectrum-Table'), styleProps.className),
385
+ tableState: state,
386
+ layout: layout,
387
+ collection: state.collection,
388
+ persistedKeys: persistedKeys,
389
+ renderView: renderView,
390
+ renderWrapper: renderWrapper,
391
+ onVisibleRectChange: onVisibleRectChange,
392
+ domRef: domRef,
393
+ headerRef: headerRef,
394
+ bodyRef: bodyRef,
395
+ isFocusVisible: isFocusVisible,
396
+ isVirtualDragging: dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.isVirtualDragging(),
397
+ isRootDropTarget: isRootDropTarget
398
+ }), DragPreview && isTableDraggable && /*#__PURE__*/ (0, $7lS7h$react).createElement(DragPreview, {
399
+ ref: preview
400
+ }, ()=>{
401
+ if (dragAndDropHooks.renderPreview) return dragAndDropHooks.renderPreview(dragState.draggingKeys, dragState.draggedKey);
402
+ let itemCount = dragState.draggingKeys.size;
403
+ let maxWidth = bodyRef.current.getBoundingClientRect().width;
404
+ let height = $bd013581c0a4b065$var$ROW_HEIGHTS[density][scale];
405
+ let itemText = state.collection.getTextValue(dragState.draggedKey);
406
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $daa6ead3d9d3506a$export$905ab40ac2179daa), {
407
+ itemText: itemText,
408
+ itemCount: itemCount,
409
+ height: height,
410
+ maxWidth: maxWidth
411
+ });
412
+ }));
413
+ }
414
+ // This is a custom Virtualizer that also has a header that syncs its scroll position with the body.
415
+ function $bd013581c0a4b065$var$TableVirtualizer(props) {
416
+ var _layout_getLayoutInfo;
417
+ let { tableState: tableState, layout: layout, collection: collection, persistedKeys: persistedKeys, renderView: renderView, renderWrapper: renderWrapper, domRef: domRef, bodyRef: bodyRef, headerRef: headerRef, onVisibleRectChange: onVisibleRectChangeProp, isFocusVisible: isFocusVisible, isVirtualDragging: isVirtualDragging, isRootDropTarget: isRootDropTarget, ...otherProps } = props;
418
+ let { direction: direction } = (0, $7lS7h$useLocale)();
419
+ let loadingState = collection.body.props.loadingState;
420
+ let isLoading = loadingState === 'loading' || loadingState === 'loadingMore';
421
+ let onLoadMore = collection.body.props.onLoadMore;
422
+ let [tableWidth, setTableWidth] = (0, $7lS7h$useState)(0);
423
+ let { scale: scale } = (0, $7lS7h$useProvider)();
424
+ const getDefaultWidth = (0, $7lS7h$useCallback)(({ props: { hideHeader: hideHeader, isSelectionCell: isSelectionCell, showDivider: showDivider, isDragButtonCell: isDragButtonCell } })=>{
425
+ if (hideHeader) {
426
+ let width = $bd013581c0a4b065$var$DEFAULT_HIDE_HEADER_CELL_WIDTH[scale];
427
+ return showDivider ? width + 1 : width;
428
+ } else if (isSelectionCell) return $bd013581c0a4b065$var$SELECTION_CELL_DEFAULT_WIDTH[scale];
429
+ else if (isDragButtonCell) return $bd013581c0a4b065$var$DRAG_BUTTON_CELL_DEFAULT_WIDTH[scale];
430
+ }, [
431
+ scale
432
+ ]);
433
+ const getDefaultMinWidth = (0, $7lS7h$useCallback)(({ props: { hideHeader: hideHeader, isSelectionCell: isSelectionCell, showDivider: showDivider, isDragButtonCell: isDragButtonCell } })=>{
434
+ if (hideHeader) {
435
+ let width = $bd013581c0a4b065$var$DEFAULT_HIDE_HEADER_CELL_WIDTH[scale];
436
+ return showDivider ? width + 1 : width;
437
+ } else if (isSelectionCell) return $bd013581c0a4b065$var$SELECTION_CELL_DEFAULT_WIDTH[scale];
438
+ else if (isDragButtonCell) return $bd013581c0a4b065$var$DRAG_BUTTON_CELL_DEFAULT_WIDTH[scale];
439
+ return 75;
440
+ }, [
441
+ scale
442
+ ]);
443
+ let columnResizeState = (0, $7lS7h$useTableColumnResizeState)({
444
+ tableWidth: tableWidth,
445
+ getDefaultWidth: getDefaultWidth,
446
+ getDefaultMinWidth: getDefaultMinWidth
447
+ }, tableState);
448
+ let state = (0, $7lS7h$useVirtualizerState)({
449
+ layout: layout,
450
+ collection: collection,
451
+ renderView: renderView,
452
+ onVisibleRectChange (rect) {
453
+ bodyRef.current.scrollTop = rect.y;
454
+ (0, $7lS7h$setScrollLeft)(bodyRef.current, direction, rect.x);
455
+ },
456
+ persistedKeys: persistedKeys,
457
+ layoutOptions: (0, $7lS7h$useMemo)(()=>({
458
+ columnWidths: columnResizeState.columnWidths
459
+ }), [
460
+ columnResizeState.columnWidths
461
+ ])
462
+ });
463
+ (0, $7lS7h$useLoadMore)({
464
+ isLoading: isLoading,
465
+ onLoadMore: onLoadMore,
466
+ scrollOffset: 1
467
+ }, bodyRef);
468
+ let onVisibleRectChange = (0, $7lS7h$useCallback)((rect)=>{
469
+ state.setVisibleRect(rect);
470
+ }, [
471
+ state
472
+ ]);
473
+ let onVisibleRectChangeMemo = (0, $7lS7h$useCallback)((rect)=>{
474
+ setTableWidth(rect.width);
475
+ onVisibleRectChange(rect);
476
+ onVisibleRectChangeProp(rect);
477
+ }, [
478
+ onVisibleRectChange,
479
+ onVisibleRectChangeProp
480
+ ]);
481
+ // this effect runs whenever the contentSize changes, it doesn't matter what the content size is
482
+ // only that it changes in a resize, and when that happens, we want to sync the body to the
483
+ // header scroll position
484
+ (0, $7lS7h$useEffect)(()=>{
485
+ if ((0, $7lS7h$getInteractionModality)() === 'keyboard' && headerRef.current.contains(document.activeElement)) {
486
+ (0, $7lS7h$scrollIntoView)(headerRef.current, document.activeElement);
487
+ (0, $7lS7h$scrollIntoViewport)(document.activeElement, {
488
+ containingElement: domRef.current
489
+ });
490
+ bodyRef.current.scrollLeft = headerRef.current.scrollLeft;
491
+ }
492
+ }, [
493
+ state.contentSize,
494
+ headerRef,
495
+ bodyRef,
496
+ domRef
497
+ ]);
498
+ let headerHeight = ((_layout_getLayoutInfo = layout.getLayoutInfo('header')) === null || _layout_getLayoutInfo === void 0 ? void 0 : _layout_getLayoutInfo.rect.height) || 0;
499
+ // Sync the scroll position from the table body to the header container.
500
+ let onScroll = (0, $7lS7h$useCallback)(()=>{
501
+ headerRef.current.scrollLeft = bodyRef.current.scrollLeft;
502
+ }, [
503
+ bodyRef,
504
+ headerRef
505
+ ]);
506
+ let resizerPosition = columnResizeState.resizingColumn != null ? layout.getLayoutInfo(columnResizeState.resizingColumn).rect.maxX - 2 : 0;
507
+ let resizerAtEdge = resizerPosition > Math.max(state.virtualizer.contentSize.width, state.virtualizer.visibleRect.width) - 3;
508
+ // this should be fine, every movement of the resizer causes a rerender
509
+ // scrolling can cause it to lag for a moment, but it's always updated
510
+ let resizerInVisibleRegion = resizerPosition < state.virtualizer.visibleRect.maxX;
511
+ let shouldHardCornerResizeCorner = resizerAtEdge && resizerInVisibleRegion;
512
+ // minimize re-render caused on Resizers by memoing this
513
+ let resizingColumnWidth = columnResizeState.resizingColumn != null ? columnResizeState.getColumnWidth(columnResizeState.resizingColumn) : 0;
514
+ let resizingColumn = (0, $7lS7h$useMemo)(()=>({
515
+ width: resizingColumnWidth,
516
+ key: columnResizeState.resizingColumn
517
+ }), [
518
+ resizingColumnWidth,
519
+ columnResizeState.resizingColumn
520
+ ]);
521
+ let mergedProps = (0, $7lS7h$mergeProps)(otherProps, isVirtualDragging && {
522
+ tabIndex: null
523
+ });
524
+ let firstColumn = collection.columns[0];
525
+ let scrollPadding = 0;
526
+ if (firstColumn.props.isSelectionCell || firstColumn.props.isDragButtonCell) scrollPadding = columnResizeState.getColumnWidth(firstColumn.key);
527
+ let visibleViews = $bd013581c0a4b065$var$renderChildren(null, state.visibleViews, renderWrapper);
528
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$export$d288a7dd40372bc.Provider, {
529
+ value: resizingColumn
530
+ }, /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$FocusScope), null, /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
531
+ ...mergedProps,
532
+ ref: domRef
533
+ }, /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
534
+ role: "presentation",
535
+ className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-headWrapper'),
536
+ style: {
537
+ height: headerHeight,
538
+ overflow: 'hidden',
539
+ position: 'relative',
540
+ willChange: state.isScrolling ? 'scroll-position' : undefined,
541
+ scrollPaddingInlineStart: scrollPadding
542
+ },
543
+ ref: headerRef
544
+ }, /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $fc695d2eafc2b351$export$b517d84d4ad20b24).Provider, {
545
+ value: columnResizeState
546
+ }, visibleViews[0])), /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$ScrollView), {
547
+ className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-body', {
548
+ 'focus-ring': isFocusVisible,
549
+ 'spectrum-Table-body--resizerAtTableEdge': shouldHardCornerResizeCorner
550
+ }, (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_cssmodulejs))), 'react-spectrum-Table-body', {
551
+ 'react-spectrum-Table-body--dropTarget': !!isRootDropTarget
552
+ })),
553
+ // Firefox and Chrome make generic elements using CSS overflow 'scroll' or 'auto' tabbable,
554
+ // including them within the accessibility tree, which breaks the table structure in Firefox.
555
+ // Using tabIndex={-1} prevents the ScrollView from being tabbable, and using role="rowgroup"
556
+ // here and role="presentation" on the table body content fixes the table structure.
557
+ role: "rowgroup",
558
+ tabIndex: isVirtualDragging ? null : -1,
559
+ style: {
560
+ flex: 1,
561
+ scrollPaddingInlineStart: scrollPadding
562
+ },
563
+ innerStyle: {
564
+ overflow: 'visible'
565
+ },
566
+ ref: bodyRef,
567
+ contentSize: state.contentSize,
568
+ onVisibleRectChange: onVisibleRectChangeMemo,
569
+ onScrollStart: state.startScrolling,
570
+ onScrollEnd: state.endScrolling,
571
+ onScroll: onScroll
572
+ }, visibleViews[1], /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
573
+ className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-bodyResizeIndicator'),
574
+ style: {
575
+ [direction === 'ltr' ? 'left' : 'right']: `${resizerPosition}px`,
576
+ height: `${Math.max(state.virtualizer.contentSize.height, state.virtualizer.visibleRect.height)}px`,
577
+ display: columnResizeState.resizingColumn ? 'block' : 'none'
578
+ }
579
+ })))));
580
+ }
581
+ function $bd013581c0a4b065$var$renderChildren(parent, views, renderWrapper) {
582
+ return views.map((view)=>{
583
+ return renderWrapper(parent, view, view.children ? Array.from(view.children) : [], (childViews)=>$bd013581c0a4b065$var$renderChildren(view, childViews, renderWrapper));
584
+ });
585
+ }
586
+ function $bd013581c0a4b065$var$useStyle(layoutInfo, parent) {
587
+ let { direction: direction } = (0, $7lS7h$useLocale)();
588
+ let style = (0, $7lS7h$layoutInfoToStyle)(layoutInfo, direction, parent);
589
+ if (style.overflow === 'hidden') style.overflow = 'visible'; // needed to support position: sticky
590
+ return style;
591
+ }
592
+ function $bd013581c0a4b065$var$TableHeader({ children: children, layoutInfo: layoutInfo, parent: parent, ...otherProps }) {
593
+ let { rowGroupProps: rowGroupProps } = (0, $7lS7h$useTableRowGroup)();
594
+ let style = $bd013581c0a4b065$var$useStyle(layoutInfo, parent);
595
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
596
+ ...rowGroupProps,
597
+ ...otherProps,
598
+ className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-head'),
599
+ style: style
600
+ }, children);
601
+ }
602
+ function $bd013581c0a4b065$var$TableColumnHeader(props) {
603
+ var _state_sortDescriptor, _state_sortDescriptor1, _state_sortDescriptor2, _state_sortDescriptor3;
604
+ let { column: column } = props;
605
+ let ref = (0, $7lS7h$useRef)(null);
606
+ let { state: state, isEmpty: isEmpty } = $bd013581c0a4b065$export$3cb274deb6c2d854();
607
+ let { pressProps: pressProps, isPressed: isPressed } = (0, $7lS7h$usePress)({
608
+ isDisabled: isEmpty
609
+ });
610
+ let columnProps = column.props;
611
+ (0, $7lS7h$useEffect)(()=>{
612
+ if (column.hasChildNodes && columnProps.allowsResizing) console.warn(`Column key: ${column.key}. Columns with child columns don't allow resizing.`);
613
+ }, [
614
+ column.hasChildNodes,
615
+ column.key,
616
+ columnProps.allowsResizing
617
+ ]);
618
+ let { columnHeaderProps: columnHeaderProps } = (0, $7lS7h$useTableColumnHeader)({
619
+ node: column,
620
+ isVirtualized: true
621
+ }, state, ref);
622
+ let { hoverProps: hoverProps, isHovered: isHovered } = (0, $7lS7h$useHover)({
623
+ ...props,
624
+ isDisabled: isEmpty
625
+ });
626
+ const allProps = [
627
+ columnHeaderProps,
628
+ hoverProps,
629
+ pressProps
630
+ ];
631
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$FocusRing), {
632
+ focusRingClass: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'focus-ring')
633
+ }, /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
634
+ ...(0, $7lS7h$mergeProps)(...allProps),
635
+ ref: ref,
636
+ className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-headCell', {
637
+ 'is-active': isPressed,
638
+ 'is-sortable': columnProps.allowsSorting,
639
+ 'is-sorted-desc': ((_state_sortDescriptor = state.sortDescriptor) === null || _state_sortDescriptor === void 0 ? void 0 : _state_sortDescriptor.column) === column.key && ((_state_sortDescriptor1 = state.sortDescriptor) === null || _state_sortDescriptor1 === void 0 ? void 0 : _state_sortDescriptor1.direction) === 'descending',
640
+ 'is-sorted-asc': ((_state_sortDescriptor2 = state.sortDescriptor) === null || _state_sortDescriptor2 === void 0 ? void 0 : _state_sortDescriptor2.column) === column.key && ((_state_sortDescriptor3 = state.sortDescriptor) === null || _state_sortDescriptor3 === void 0 ? void 0 : _state_sortDescriptor3.direction) === 'ascending',
641
+ 'is-hovered': isHovered,
642
+ 'spectrum-Table-cell--hideHeader': columnProps.hideHeader
643
+ }, (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_cssmodulejs))), 'react-spectrum-Table-cell', {
644
+ 'react-spectrum-Table-cell--alignCenter': columnProps.align === 'center' || column.colspan > 1,
645
+ 'react-spectrum-Table-cell--alignEnd': columnProps.align === 'end'
646
+ }))
647
+ }, columnProps.allowsSorting && /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$spectrumiconsuiArrowDownSmall), {
648
+ UNSAFE_className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-sortedIcon')
649
+ }), columnProps.hideHeader ? /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$VisuallyHidden), null, column.rendered) : /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
650
+ className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-headCellContents')
651
+ }, column.rendered)));
652
+ }
653
+ let $bd013581c0a4b065$var$_TableColumnHeaderButton = (props, ref)=>{
654
+ let { focusProps: focusProps, alignment: alignment, ...otherProps } = props;
655
+ let { isEmpty: isEmpty } = $bd013581c0a4b065$export$3cb274deb6c2d854();
656
+ let domRef = (0, $7lS7h$useFocusableRef)(ref);
657
+ let { buttonProps: buttonProps } = (0, $7lS7h$useButton)({
658
+ ...otherProps,
659
+ elementType: 'div',
660
+ isDisabled: isEmpty
661
+ }, domRef);
662
+ let { hoverProps: hoverProps, isHovered: isHovered } = (0, $7lS7h$useHover)({
663
+ ...otherProps,
664
+ isDisabled: isEmpty
665
+ });
666
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
667
+ className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-headCellContents', {
668
+ 'is-hovered': isHovered
669
+ }),
670
+ ...hoverProps
671
+ }, /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
672
+ className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-headCellButton', {
673
+ 'spectrum-Table-headCellButton--alignStart': alignment === 'start',
674
+ 'spectrum-Table-headCellButton--alignCenter': alignment === 'center',
675
+ 'spectrum-Table-headCellButton--alignEnd': alignment === 'end'
676
+ }),
677
+ ...(0, $7lS7h$mergeProps)(buttonProps, focusProps),
678
+ ref: domRef
679
+ }, props.children));
680
+ };
681
+ let $bd013581c0a4b065$var$TableColumnHeaderButton = /*#__PURE__*/ (0, $7lS7h$react).forwardRef($bd013581c0a4b065$var$_TableColumnHeaderButton);
682
+ function $bd013581c0a4b065$var$ResizableTableColumnHeader(props) {
683
+ var _column_props, _state_sortDescriptor, _state_sortDescriptor1, _state_sortDescriptor2, _state_sortDescriptor3;
684
+ let { column: column } = props;
685
+ let ref = (0, $7lS7h$useRef)(null);
686
+ let triggerRef = (0, $7lS7h$useRef)(null);
687
+ let resizingRef = (0, $7lS7h$useRef)(null);
688
+ let { state: state, onResizeStart: onResizeStart, onResize: onResize, onResizeEnd: onResizeEnd, headerRowHovered: headerRowHovered, setIsInResizeMode: setIsInResizeMode, isEmpty: isEmpty, isInResizeMode: isInResizeMode, headerMenuOpen: headerMenuOpen, setHeaderMenuOpen: setHeaderMenuOpen } = $bd013581c0a4b065$export$3cb274deb6c2d854();
689
+ let columnResizeState = (0, $7lS7h$useContext)((0, $fc695d2eafc2b351$export$b517d84d4ad20b24));
690
+ let stringFormatter = (0, $7lS7h$useLocalizedStringFormatter)((0, ($parcel$interopDefault($7lS7h$intlStringsmodulejs))), '@react-spectrum/table');
691
+ let { pressProps: pressProps, isPressed: isPressed } = (0, $7lS7h$usePress)({
692
+ isDisabled: isEmpty
693
+ });
694
+ let { columnHeaderProps: columnHeaderProps } = (0, $7lS7h$useTableColumnHeader)({
695
+ node: column,
696
+ isVirtualized: true
697
+ }, state, ref);
698
+ let { hoverProps: hoverProps, isHovered: isHovered } = (0, $7lS7h$useHover)({
699
+ ...props,
700
+ isDisabled: isEmpty || headerMenuOpen
701
+ });
702
+ const allProps = [
703
+ columnHeaderProps,
704
+ pressProps,
705
+ hoverProps
706
+ ];
707
+ let columnProps = column.props;
708
+ let { isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $7lS7h$useFocusRing)();
709
+ const onMenuSelect = (key)=>{
710
+ switch(key){
711
+ case 'sort-asc':
712
+ state.sort(column.key, 'ascending');
713
+ break;
714
+ case 'sort-desc':
715
+ state.sort(column.key, 'descending');
716
+ break;
717
+ case 'resize':
718
+ columnResizeState.startResize(column.key);
719
+ setIsInResizeMode(true);
720
+ state.setKeyboardNavigationDisabled(true);
721
+ break;
722
+ }
723
+ };
724
+ let allowsSorting = (_column_props = column.props) === null || _column_props === void 0 ? void 0 : _column_props.allowsSorting;
725
+ let items = (0, $7lS7h$useMemo)(()=>{
726
+ let options = [
727
+ allowsSorting ? {
728
+ label: stringFormatter.format('sortAscending'),
729
+ id: 'sort-asc'
730
+ } : undefined,
731
+ allowsSorting ? {
732
+ label: stringFormatter.format('sortDescending'),
733
+ id: 'sort-desc'
734
+ } : undefined,
735
+ {
736
+ label: stringFormatter.format('resizeColumn'),
737
+ id: 'resize'
738
+ }
739
+ ];
740
+ return options;
741
+ // eslint-disable-next-line react-hooks/exhaustive-deps
742
+ }, [
743
+ allowsSorting
744
+ ]);
745
+ let resizingColumn = columnResizeState.resizingColumn;
746
+ let showResizer = !isEmpty && (headerRowHovered && (0, $7lS7h$getInteractionModality)() !== 'keyboard' || resizingColumn != null);
747
+ let alignment = 'start';
748
+ let menuAlign = 'start';
749
+ if (columnProps.align === 'center' || column.colspan > 1) alignment = 'center';
750
+ else if (columnProps.align === 'end') {
751
+ alignment = 'end';
752
+ menuAlign = 'end';
753
+ }
754
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$FocusRing), {
755
+ focusRingClass: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'focus-ring')
756
+ }, /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
757
+ ...(0, $7lS7h$mergeProps)(...allProps),
758
+ ref: ref,
759
+ className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-headCell', {
760
+ 'is-active': isPressed,
761
+ 'is-resizable': columnProps.allowsResizing,
762
+ 'is-sortable': columnProps.allowsSorting,
763
+ 'is-sorted-desc': ((_state_sortDescriptor = state.sortDescriptor) === null || _state_sortDescriptor === void 0 ? void 0 : _state_sortDescriptor.column) === column.key && ((_state_sortDescriptor1 = state.sortDescriptor) === null || _state_sortDescriptor1 === void 0 ? void 0 : _state_sortDescriptor1.direction) === 'descending',
764
+ 'is-sorted-asc': ((_state_sortDescriptor2 = state.sortDescriptor) === null || _state_sortDescriptor2 === void 0 ? void 0 : _state_sortDescriptor2.column) === column.key && ((_state_sortDescriptor3 = state.sortDescriptor) === null || _state_sortDescriptor3 === void 0 ? void 0 : _state_sortDescriptor3.direction) === 'ascending',
765
+ 'is-hovered': isHovered,
766
+ 'focus-ring': isFocusVisible,
767
+ 'spectrum-Table-cell--hideHeader': columnProps.hideHeader
768
+ }, (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_cssmodulejs))), 'react-spectrum-Table-cell', {
769
+ 'react-spectrum-Table-cell--alignCenter': alignment === 'center',
770
+ 'react-spectrum-Table-cell--alignEnd': alignment === 'end'
771
+ }))
772
+ }, /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$MenuTrigger), {
773
+ onOpenChange: setHeaderMenuOpen,
774
+ align: menuAlign
775
+ }, /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$var$TableColumnHeaderButton, {
776
+ alignment: alignment,
777
+ ref: triggerRef,
778
+ focusProps: focusProps
779
+ }, columnProps.allowsSorting && /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$spectrumiconsuiArrowDownSmall), {
780
+ UNSAFE_className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-sortedIcon')
781
+ }), columnProps.hideHeader ? /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$VisuallyHidden), null, column.rendered) : /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
782
+ className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-headerCellText')
783
+ }, column.rendered), columnProps.allowsResizing && /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$spectrumiconsuiChevronDownMedium), {
784
+ UNSAFE_className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-menuChevron')
785
+ })), /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$Menu), {
786
+ onAction: onMenuSelect,
787
+ minWidth: "size-2000",
788
+ items: items
789
+ }, (item)=>/*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$Item), null, item.label))), /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $fc695d2eafc2b351$export$48a76196cafe3b93), {
790
+ ref: resizingRef,
791
+ column: column,
792
+ showResizer: showResizer,
793
+ onResizeStart: onResizeStart,
794
+ onResize: onResize,
795
+ onResizeEnd: onResizeEnd,
796
+ triggerRef: (0, $7lS7h$useUnwrapDOMRef)(triggerRef)
797
+ }), /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
798
+ "aria-hidden": true,
799
+ className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-colResizeIndicator', {
800
+ 'spectrum-Table-colResizeIndicator--visible': resizingColumn != null,
801
+ 'spectrum-Table-colResizeIndicator--resizing': resizingColumn === column.key
802
+ })
803
+ }, /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
804
+ className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-colResizeNubbin', {
805
+ 'spectrum-Table-colResizeNubbin--visible': isInResizeMode && resizingColumn === column.key
806
+ })
807
+ }, /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $cb7d341e8868d81d$export$d9658cdf8c86807), null)))));
808
+ }
809
+ function $bd013581c0a4b065$var$TableSelectAllCell({ column: column }) {
810
+ let ref = (0, $7lS7h$useRef)(undefined);
811
+ let { state: state } = $bd013581c0a4b065$export$3cb274deb6c2d854();
812
+ let isSingleSelectionMode = state.selectionManager.selectionMode === 'single';
813
+ let { columnHeaderProps: columnHeaderProps } = (0, $7lS7h$useTableColumnHeader)({
814
+ node: column,
815
+ isVirtualized: true
816
+ }, state, ref);
817
+ let { checkboxProps: checkboxProps } = (0, $7lS7h$useTableSelectAllCheckbox)(state);
818
+ let { hoverProps: hoverProps, isHovered: isHovered } = (0, $7lS7h$useHover)({});
819
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$FocusRing), {
820
+ focusRingClass: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'focus-ring')
821
+ }, /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
822
+ ...(0, $7lS7h$mergeProps)(columnHeaderProps, hoverProps),
823
+ ref: ref,
824
+ className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-headCell', 'spectrum-Table-checkboxCell', {
825
+ 'is-hovered': isHovered
826
+ })
827
+ }, /*
828
+ In single selection mode, the checkbox will be hidden.
829
+ So to avoid leaving a column header with no accessible content,
830
+ we use a VisuallyHidden component to include the aria-label from the checkbox,
831
+ which for single selection will be "Select."
832
+ */ isSingleSelectionMode && /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$VisuallyHidden), null, checkboxProps['aria-label']), /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$Checkbox), {
833
+ ...checkboxProps,
834
+ isEmphasized: true,
835
+ UNSAFE_style: isSingleSelectionMode ? {
836
+ visibility: 'hidden'
837
+ } : undefined,
838
+ UNSAFE_className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-checkbox')
839
+ })));
840
+ }
841
+ function $bd013581c0a4b065$var$TableDragHeaderCell({ column: column }) {
842
+ let ref = (0, $7lS7h$useRef)(undefined);
843
+ let { state: state } = $bd013581c0a4b065$export$3cb274deb6c2d854();
844
+ let { columnHeaderProps: columnHeaderProps } = (0, $7lS7h$useTableColumnHeader)({
845
+ node: column,
846
+ isVirtualized: true
847
+ }, state, ref);
848
+ let stringFormatter = (0, $7lS7h$useLocalizedStringFormatter)((0, ($parcel$interopDefault($7lS7h$intlStringsmodulejs))), '@react-spectrum/table');
849
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$FocusRing), {
850
+ focusRingClass: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'focus-ring')
851
+ }, /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
852
+ ...columnHeaderProps,
853
+ ref: ref,
854
+ className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-headCell', (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_cssmodulejs))), 'react-spectrum-Table-headCell', 'react-spectrum-Table-dragButtonHeadCell'))
855
+ }, /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$VisuallyHidden), null, stringFormatter.format('drag'))));
856
+ }
857
+ function $bd013581c0a4b065$var$TableRowGroup({ children: children, layoutInfo: layoutInfo, parent: parent, ...otherProps }) {
858
+ let { rowGroupProps: rowGroupProps } = (0, $7lS7h$useTableRowGroup)();
859
+ let { isTableDroppable: isTableDroppable } = (0, $7lS7h$useContext)($bd013581c0a4b065$export$93e4b0b2cc49b648);
860
+ let style = $bd013581c0a4b065$var$useStyle(layoutInfo, parent);
861
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
862
+ ...rowGroupProps,
863
+ style: style,
864
+ ...otherProps
865
+ }, isTableDroppable && /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $4e6fc36ba71ba405$export$d30a7814cfd4033e), {
866
+ key: "root"
867
+ }), children);
868
+ }
869
+ function $bd013581c0a4b065$var$DragButton() {
870
+ let { dragButtonProps: dragButtonProps, dragButtonRef: dragButtonRef, isFocusVisibleWithin: isFocusVisibleWithin } = $bd013581c0a4b065$export$cd7c5802f9e21187();
871
+ let { visuallyHiddenProps: visuallyHiddenProps } = (0, $7lS7h$useVisuallyHidden)();
872
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$FocusRing), {
873
+ focusRingClass: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_cssmodulejs))), 'focus-ring')
874
+ }, /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
875
+ ...dragButtonProps,
876
+ className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_cssmodulejs))), 'react-spectrum-Table-dragButton'),
877
+ style: !isFocusVisibleWithin ? {
878
+ ...visuallyHiddenProps.style
879
+ } : {},
880
+ ref: dragButtonRef,
881
+ draggable: "true"
882
+ }, /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$spectrumiconsuiListGripper), {
883
+ UNSAFE_className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_cssmodulejs))))
884
+ })));
885
+ }
886
+ const $bd013581c0a4b065$var$TableRowContext = /*#__PURE__*/ (0, $7lS7h$react).createContext(null);
887
+ function $bd013581c0a4b065$export$cd7c5802f9e21187() {
888
+ return (0, $7lS7h$useContext)($bd013581c0a4b065$var$TableRowContext);
889
+ }
890
+ function $bd013581c0a4b065$var$TableRow({ item: item, children: children, layoutInfo: layoutInfo, parent: parent, ...otherProps }) {
891
+ var _state_collection_rows_find, _layout_getContentSize, _layout_virtualizer;
892
+ let ref = (0, $7lS7h$useRef)(undefined);
893
+ let { state: state, layout: layout, dragAndDropHooks: dragAndDropHooks, isTableDraggable: isTableDraggable, isTableDroppable: isTableDroppable, dragState: dragState, dropState: dropState } = $bd013581c0a4b065$export$3cb274deb6c2d854();
894
+ let isSelected = state.selectionManager.isSelected(item.key);
895
+ let { rowProps: rowProps, hasAction: hasAction, allowsSelection: allowsSelection } = (0, $7lS7h$useTableRow)({
896
+ node: item,
897
+ isVirtualized: true,
898
+ shouldSelectOnPressUp: isTableDraggable
899
+ }, state, ref);
900
+ let isDisabled = state.selectionManager.isDisabled(item.key);
901
+ let isInteractive = !isDisabled && (hasAction || allowsSelection || isTableDraggable);
902
+ let isDroppable = isTableDroppable && !isDisabled;
903
+ let { pressProps: pressProps, isPressed: isPressed } = (0, $7lS7h$usePress)({
904
+ isDisabled: !isInteractive
905
+ });
906
+ // The row should show the focus background style when any cell inside it is focused.
907
+ // If the row itself is focused, then it should have a blue focus indicator on the left.
908
+ let { isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps } = (0, $7lS7h$useFocusRing)({
909
+ within: true
910
+ });
911
+ let { isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $7lS7h$useFocusRing)();
912
+ let { hoverProps: hoverProps, isHovered: isHovered } = (0, $7lS7h$useHover)({
913
+ isDisabled: !isInteractive
914
+ });
915
+ let isFirstRow = ((_state_collection_rows_find = state.collection.rows.find((row)=>row.level === 1)) === null || _state_collection_rows_find === void 0 ? void 0 : _state_collection_rows_find.key) === item.key;
916
+ let isLastRow = item.nextKey == null;
917
+ // Figure out if the TableView content is equal or greater in height to the container. If so, we'll need to round the bottom
918
+ // border corners of the last row when selected.
919
+ let isFlushWithContainerBottom = false;
920
+ if (isLastRow) {
921
+ if (((_layout_getContentSize = layout.getContentSize()) === null || _layout_getContentSize === void 0 ? void 0 : _layout_getContentSize.height) >= ((_layout_virtualizer = layout.virtualizer) === null || _layout_virtualizer === void 0 ? void 0 : _layout_virtualizer.visibleRect.height)) isFlushWithContainerBottom = true;
922
+ }
923
+ let draggableItem;
924
+ if (isTableDraggable) {
925
+ // eslint-disable-next-line react-hooks/rules-of-hooks
926
+ draggableItem = dragAndDropHooks.useDraggableItem({
927
+ key: item.key,
928
+ hasDragButton: true
929
+ }, dragState);
930
+ if (isDisabled) draggableItem = null;
931
+ }
932
+ let droppableItem;
933
+ let isDropTarget;
934
+ let dropIndicator;
935
+ let dropIndicatorRef = (0, $7lS7h$useRef)(undefined);
936
+ if (isTableDroppable) {
937
+ let target = {
938
+ type: 'item',
939
+ key: item.key,
940
+ dropPosition: 'on'
941
+ };
942
+ isDropTarget = dropState.isDropTarget(target);
943
+ // eslint-disable-next-line react-hooks/rules-of-hooks
944
+ dropIndicator = dragAndDropHooks.useDropIndicator({
945
+ target: target
946
+ }, dropState, dropIndicatorRef);
947
+ }
948
+ let dragButtonRef = (0, $7lS7h$react).useRef(undefined);
949
+ let { buttonProps: dragButtonProps } = (0, $7lS7h$useButton)({
950
+ ...draggableItem === null || draggableItem === void 0 ? void 0 : draggableItem.dragButtonProps,
951
+ elementType: 'div'
952
+ }, dragButtonRef);
953
+ let style = $bd013581c0a4b065$var$useStyle(layoutInfo, parent);
954
+ let props = (0, $7lS7h$mergeProps)(rowProps, otherProps, {
955
+ style: style
956
+ }, focusWithinProps, focusProps, hoverProps, pressProps, draggableItem === null || draggableItem === void 0 ? void 0 : draggableItem.dragProps, // Remove tab index from list row if performing a screenreader drag. This prevents TalkBack from focusing the row,
957
+ // allowing for single swipe navigation between row drop indicator
958
+ (dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.isVirtualDragging()) && {
959
+ tabIndex: null
960
+ });
961
+ let dropProps = isDroppable ? droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.dropProps : {
962
+ 'aria-hidden': droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.dropProps['aria-hidden']
963
+ };
964
+ let { visuallyHiddenProps: visuallyHiddenProps } = (0, $7lS7h$useVisuallyHidden)();
965
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$var$TableRowContext.Provider, {
966
+ value: {
967
+ dragButtonProps: dragButtonProps,
968
+ dragButtonRef: dragButtonRef,
969
+ isFocusVisibleWithin: isFocusVisibleWithin
970
+ }
971
+ }, isTableDroppable && isFirstRow && /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7ee9a922ee4e8032$export$2c0bab5914a9d088), {
972
+ rowProps: props,
973
+ key: `${item.key}-before`,
974
+ target: {
975
+ key: item.key,
976
+ type: 'item',
977
+ dropPosition: 'before'
978
+ }
979
+ }), isTableDroppable && !(dropIndicator === null || dropIndicator === void 0 ? void 0 : dropIndicator.isHidden) && /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
980
+ role: "row",
981
+ ...visuallyHiddenProps
982
+ }, /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
983
+ role: "gridcell"
984
+ }, /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
985
+ role: "button",
986
+ ...dropIndicator === null || dropIndicator === void 0 ? void 0 : dropIndicator.dropIndicatorProps,
987
+ ref: dropIndicatorRef
988
+ }))), /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
989
+ ...(0, $7lS7h$mergeProps)(props, dropProps),
990
+ ref: ref,
991
+ className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-row', {
992
+ 'is-active': isPressed,
993
+ 'is-selected': isSelected,
994
+ 'spectrum-Table-row--highlightSelection': state.selectionManager.selectionBehavior === 'replace',
995
+ 'is-next-selected': state.selectionManager.isSelected(item.nextKey),
996
+ 'is-focused': isFocusVisibleWithin,
997
+ 'focus-ring': isFocusVisible,
998
+ 'is-hovered': isHovered,
999
+ 'is-disabled': isDisabled,
1000
+ 'spectrum-Table-row--firstRow': isFirstRow,
1001
+ 'spectrum-Table-row--lastRow': isLastRow,
1002
+ 'spectrum-Table-row--isFlushBottom': isFlushWithContainerBottom
1003
+ }, (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_cssmodulejs))), 'react-spectrum-Table-row', {
1004
+ 'react-spectrum-Table-row--dropTarget': isDropTarget
1005
+ }))
1006
+ }, children), isTableDroppable && /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7ee9a922ee4e8032$export$2c0bab5914a9d088), {
1007
+ rowProps: props,
1008
+ key: `${item.key}-after`,
1009
+ target: {
1010
+ key: item.key,
1011
+ type: 'item',
1012
+ dropPosition: 'after'
1013
+ }
1014
+ }));
1015
+ }
1016
+ function $bd013581c0a4b065$var$TableHeaderRow({ item: item, children: children, layoutInfo: layoutInfo, parent: parent, ...props }) {
1017
+ let { state: state, headerMenuOpen: headerMenuOpen } = $bd013581c0a4b065$export$3cb274deb6c2d854();
1018
+ let ref = (0, $7lS7h$useRef)(undefined);
1019
+ let { rowProps: rowProps } = (0, $7lS7h$useTableHeaderRow)({
1020
+ node: item,
1021
+ isVirtualized: true
1022
+ }, state, ref);
1023
+ let { hoverProps: hoverProps } = (0, $7lS7h$useHover)({
1024
+ ...props,
1025
+ isDisabled: headerMenuOpen
1026
+ });
1027
+ let style = $bd013581c0a4b065$var$useStyle(layoutInfo, parent);
1028
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
1029
+ ...(0, $7lS7h$mergeProps)(rowProps, hoverProps),
1030
+ ref: ref,
1031
+ style: style
1032
+ }, children);
1033
+ }
1034
+ function $bd013581c0a4b065$var$TableDragCell({ cell: cell }) {
1035
+ let ref = (0, $7lS7h$useRef)(undefined);
1036
+ let { state: state, isTableDraggable: isTableDraggable } = $bd013581c0a4b065$export$3cb274deb6c2d854();
1037
+ let isDisabled = state.selectionManager.isDisabled(cell.parentKey);
1038
+ let { gridCellProps: gridCellProps } = (0, $7lS7h$useTableCell)({
1039
+ node: cell,
1040
+ isVirtualized: true
1041
+ }, state, ref);
1042
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$FocusRing), {
1043
+ focusRingClass: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'focus-ring')
1044
+ }, /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
1045
+ ...gridCellProps,
1046
+ ref: ref,
1047
+ className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-cell', {
1048
+ 'is-disabled': isDisabled
1049
+ }, (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_cssmodulejs))), 'react-spectrum-Table-cell', 'react-spectrum-Table-dragButtonCell'))
1050
+ }, isTableDraggable && !isDisabled && /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$var$DragButton, null)));
1051
+ }
1052
+ function $bd013581c0a4b065$var$TableCheckboxCell({ cell: cell }) {
1053
+ let ref = (0, $7lS7h$useRef)(undefined);
1054
+ let { state: state } = $bd013581c0a4b065$export$3cb274deb6c2d854();
1055
+ // The TableCheckbox should always render its disabled status if the row is disabled, regardless of disabledBehavior,
1056
+ // but the cell itself should not render its disabled styles if disabledBehavior="selection" because the row might have actions on it.
1057
+ let isSelectionDisabled = state.disabledKeys.has(cell.parentKey);
1058
+ let isDisabled = state.selectionManager.isDisabled(cell.parentKey);
1059
+ let { gridCellProps: gridCellProps } = (0, $7lS7h$useTableCell)({
1060
+ node: cell,
1061
+ isVirtualized: true
1062
+ }, state, ref);
1063
+ let { checkboxProps: checkboxProps } = (0, $7lS7h$useTableSelectionCheckbox)({
1064
+ key: cell.parentKey
1065
+ }, state);
1066
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$FocusRing), {
1067
+ focusRingClass: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'focus-ring')
1068
+ }, /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
1069
+ ...gridCellProps,
1070
+ ref: ref,
1071
+ className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-cell', 'spectrum-Table-checkboxCell', {
1072
+ 'is-disabled': isDisabled
1073
+ }, (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_cssmodulejs))), 'react-spectrum-Table-cell'))
1074
+ }, state.selectionManager.selectionMode !== 'none' && /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$Checkbox), {
1075
+ ...checkboxProps,
1076
+ isEmphasized: true,
1077
+ isDisabled: isSelectionDisabled,
1078
+ UNSAFE_className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-checkbox')
1079
+ })));
1080
+ }
1081
+ function $bd013581c0a4b065$var$TableCell({ cell: cell }) {
1082
+ let { scale: scale } = (0, $7lS7h$useProvider)();
1083
+ let { state: state } = $bd013581c0a4b065$export$3cb274deb6c2d854();
1084
+ let isExpandableTable = 'expandedKeys' in state;
1085
+ let ref = (0, $7lS7h$useRef)(undefined);
1086
+ let columnProps = cell.column.props;
1087
+ let isDisabled = state.selectionManager.isDisabled(cell.parentKey);
1088
+ let { gridCellProps: gridCellProps } = (0, $7lS7h$useTableCell)({
1089
+ node: cell,
1090
+ isVirtualized: true
1091
+ }, state, ref);
1092
+ let { id: id, ...otherGridCellProps } = gridCellProps;
1093
+ let isFirstRowHeaderCell = state.collection.rowHeaderColumnKeys.keys().next().value === cell.column.key;
1094
+ let isRowExpandable = false;
1095
+ let showExpandCollapseButton = false;
1096
+ let levelOffset = 0;
1097
+ if ('expandedKeys' in state) {
1098
+ var _state_keyMap_get_props_UNSTABLE_childItems, _state_keyMap_get, _state_keyMap_get_props_children, _state_keyMap_get_props, _state_keyMap_get1;
1099
+ isRowExpandable = ((_state_keyMap_get = state.keyMap.get(cell.parentKey)) === null || _state_keyMap_get === void 0 ? void 0 : (_state_keyMap_get_props_UNSTABLE_childItems = _state_keyMap_get.props.UNSTABLE_childItems) === null || _state_keyMap_get_props_UNSTABLE_childItems === void 0 ? void 0 : _state_keyMap_get_props_UNSTABLE_childItems.length) > 0 || ((_state_keyMap_get1 = state.keyMap.get(cell.parentKey)) === null || _state_keyMap_get1 === void 0 ? void 0 : (_state_keyMap_get_props = _state_keyMap_get1.props) === null || _state_keyMap_get_props === void 0 ? void 0 : (_state_keyMap_get_props_children = _state_keyMap_get_props.children) === null || _state_keyMap_get_props_children === void 0 ? void 0 : _state_keyMap_get_props_children.length) > state.userColumnCount;
1100
+ showExpandCollapseButton = isFirstRowHeaderCell && isRowExpandable;
1101
+ // Offset based on level, and add additional offset if there is no expand/collapse button on a row
1102
+ levelOffset = (cell.level - 2) * $bd013581c0a4b065$var$LEVEL_OFFSET_WIDTH[scale] + (!showExpandCollapseButton ? $bd013581c0a4b065$var$LEVEL_OFFSET_WIDTH[scale] * 2 : 0);
1103
+ }
1104
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$FocusRing), {
1105
+ focusRingClass: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'focus-ring')
1106
+ }, /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
1107
+ ...otherGridCellProps,
1108
+ "aria-labelledby": id,
1109
+ ref: ref,
1110
+ style: isExpandableTable && isFirstRowHeaderCell ? {
1111
+ paddingInlineStart: levelOffset
1112
+ } : {},
1113
+ className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-cell', {
1114
+ 'spectrum-Table-cell--divider': columnProps.showDivider && cell.column.nextKey !== null,
1115
+ 'spectrum-Table-cell--hideHeader': columnProps.hideHeader,
1116
+ 'spectrum-Table-cell--hasExpandCollapseButton': showExpandCollapseButton,
1117
+ 'is-disabled': isDisabled
1118
+ }, (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_cssmodulejs))), 'react-spectrum-Table-cell', {
1119
+ 'react-spectrum-Table-cell--alignStart': columnProps.align === 'start',
1120
+ 'react-spectrum-Table-cell--alignCenter': columnProps.align === 'center',
1121
+ 'react-spectrum-Table-cell--alignEnd': columnProps.align === 'end'
1122
+ }))
1123
+ }, showExpandCollapseButton && /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$var$ExpandableRowChevron, {
1124
+ cell: cell
1125
+ }), /*#__PURE__*/ (0, $7lS7h$react).createElement("span", {
1126
+ id: id,
1127
+ className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-cellContents')
1128
+ }, cell.rendered)));
1129
+ }
1130
+ function $bd013581c0a4b065$var$TableCellWrapper({ layoutInfo: layoutInfo, virtualizer: virtualizer, parent: parent, children: children }) {
1131
+ let { isTableDroppable: isTableDroppable, dropState: dropState } = (0, $7lS7h$useContext)($bd013581c0a4b065$export$93e4b0b2cc49b648);
1132
+ let isDropTarget;
1133
+ let isRootDroptarget;
1134
+ if (isTableDroppable) {
1135
+ if (parent.content) isDropTarget = dropState.isDropTarget({
1136
+ type: 'item',
1137
+ dropPosition: 'on',
1138
+ key: parent.content.key
1139
+ });
1140
+ isRootDroptarget = dropState.isDropTarget({
1141
+ type: 'root'
1142
+ });
1143
+ }
1144
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$VirtualizerItem), {
1145
+ layoutInfo: layoutInfo,
1146
+ virtualizer: virtualizer,
1147
+ parent: parent === null || parent === void 0 ? void 0 : parent.layoutInfo,
1148
+ className: (0, $7lS7h$useMemo)(()=>(0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-cellWrapper', (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_cssmodulejs))), {
1149
+ 'react-spectrum-Table-cellWrapper': !layoutInfo.estimatedSize,
1150
+ 'react-spectrum-Table-cellWrapper--dropTarget': isDropTarget || isRootDroptarget
1151
+ })), [
1152
+ layoutInfo.estimatedSize,
1153
+ isDropTarget,
1154
+ isRootDroptarget
1155
+ ])
1156
+ }, children);
1157
+ }
1158
+ function $bd013581c0a4b065$var$ExpandableRowChevron({ cell: cell }) {
1159
+ // TODO: move some/all of the chevron button setup into a separate hook?
1160
+ let { direction: direction } = (0, $7lS7h$useLocale)();
1161
+ let { state: state } = $bd013581c0a4b065$export$3cb274deb6c2d854();
1162
+ let expandButtonRef = (0, $7lS7h$useRef)(undefined);
1163
+ let stringFormatter = (0, $7lS7h$useLocalizedStringFormatter)((0, ($parcel$interopDefault($7lS7h$intlStringsmodulejs))), '@react-spectrum/table');
1164
+ let isExpanded;
1165
+ if ('expandedKeys' in state) isExpanded = state.expandedKeys === 'all' || state.expandedKeys.has(cell.parentKey);
1166
+ // Will need to keep the chevron as a button for iOS VO at all times since VO doesn't focus the cell. Also keep as button if cellAction is defined by the user in the future
1167
+ let { buttonProps: buttonProps } = (0, $7lS7h$useButton)({
1168
+ // Desktop and mobile both toggle expansion of a native expandable row on mouse/touch up
1169
+ onPress: ()=>{
1170
+ state.toggleKey(cell.parentKey);
1171
+ if (!(0, $7lS7h$isFocusVisible)()) {
1172
+ state.selectionManager.setFocused(true);
1173
+ state.selectionManager.setFocusedKey(cell.parentKey);
1174
+ }
1175
+ },
1176
+ elementType: 'span',
1177
+ 'aria-label': isExpanded ? stringFormatter.format('collapse') : stringFormatter.format('expand')
1178
+ }, expandButtonRef);
1179
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement("span", {
1180
+ ...buttonProps,
1181
+ ref: expandButtonRef,
1182
+ // Override tabindex so that grid keyboard nav skips over it. Needs -1 so android talkback can actually "focus" it
1183
+ tabIndex: (0, $7lS7h$isAndroid)() ? -1 : undefined,
1184
+ className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_vars_cssmodulejs))), 'spectrum-Table-expandButton', {
1185
+ 'is-open': isExpanded
1186
+ })
1187
+ }, direction === 'ltr' ? /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$spectrumiconsuiChevronRightMedium), null) : /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$spectrumiconsuiChevronLeftMedium), null));
1188
+ }
1189
+ function $bd013581c0a4b065$var$LoadingState() {
1190
+ let { state: state } = (0, $7lS7h$useContext)($bd013581c0a4b065$export$93e4b0b2cc49b648);
1191
+ let stringFormatter = (0, $7lS7h$useLocalizedStringFormatter)((0, ($parcel$interopDefault($7lS7h$intlStringsmodulejs))), '@react-spectrum/table');
1192
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$var$CenteredWrapper, null, /*#__PURE__*/ (0, $7lS7h$react).createElement((0, $7lS7h$ProgressCircle), {
1193
+ isIndeterminate: true,
1194
+ "aria-label": state.collection.size > 0 ? stringFormatter.format('loadingMore') : stringFormatter.format('loading')
1195
+ }));
1196
+ }
1197
+ function $bd013581c0a4b065$var$EmptyState() {
1198
+ let { renderEmptyState: renderEmptyState } = (0, $7lS7h$useContext)($bd013581c0a4b065$export$93e4b0b2cc49b648);
1199
+ let emptyState = renderEmptyState ? renderEmptyState() : null;
1200
+ if (emptyState == null) return null;
1201
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement($bd013581c0a4b065$var$CenteredWrapper, null, emptyState);
1202
+ }
1203
+ function $bd013581c0a4b065$var$CenteredWrapper({ children: children }) {
1204
+ let { state: state } = $bd013581c0a4b065$export$3cb274deb6c2d854();
1205
+ let rowProps;
1206
+ if ('expandedKeys' in state) {
1207
+ let topLevelRowCount = [
1208
+ ...state.keyMap.get(state.collection.body.key).childNodes
1209
+ ].length;
1210
+ rowProps = {
1211
+ 'aria-level': 1,
1212
+ 'aria-posinset': topLevelRowCount + 1,
1213
+ 'aria-setsize': topLevelRowCount + 1
1214
+ };
1215
+ } else rowProps = {
1216
+ 'aria-rowindex': state.collection.headerRows.length + state.collection.size + 1
1217
+ };
1218
+ return /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
1219
+ role: "row",
1220
+ ...rowProps,
1221
+ className: (0, $7lS7h$classNames)((0, ($parcel$interopDefault($7lS7h$table_cssmodulejs))), 'react-spectrum-Table-centeredWrapper')
1222
+ }, /*#__PURE__*/ (0, $7lS7h$react).createElement("div", {
1223
+ role: "rowheader",
1224
+ "aria-colspan": state.collection.columns.length
1225
+ }, children));
1226
+ }
1227
+ const $bd013581c0a4b065$export$517e02184d273d69 = /*#__PURE__*/ (0, $7lS7h$react).forwardRef($bd013581c0a4b065$var$TableViewBase);
1228
+
1229
+
1230
+ export {$bd013581c0a4b065$export$93e4b0b2cc49b648 as TableContext, $bd013581c0a4b065$export$3cb274deb6c2d854 as useTableContext, $bd013581c0a4b065$export$d288a7dd40372bc as VirtualizerContext, $bd013581c0a4b065$export$3f8f74b6bfd2c5df as useVirtualizerContext, $bd013581c0a4b065$export$cd7c5802f9e21187 as useTableRowContext, $bd013581c0a4b065$export$517e02184d273d69 as TableViewBase};
1231
+ //# sourceMappingURL=TableViewBase.module.js.map