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