@react-aria/table 3.17.10 → 3.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. package/dist/import.mjs +2 -19
  2. package/dist/main.js +10 -27
  3. package/dist/main.js.map +1 -1
  4. package/dist/module.js +2 -19
  5. package/dist/module.js.map +1 -1
  6. package/dist/types/src/index.d.ts +4 -0
  7. package/package.json +15 -25
  8. package/src/index.ts +4 -21
  9. package/dist/TableKeyboardDelegate.main.js +0 -142
  10. package/dist/TableKeyboardDelegate.main.js.map +0 -1
  11. package/dist/TableKeyboardDelegate.mjs +0 -137
  12. package/dist/TableKeyboardDelegate.module.js +0 -137
  13. package/dist/TableKeyboardDelegate.module.js.map +0 -1
  14. package/dist/ar-AE.main.js +0 -14
  15. package/dist/ar-AE.main.js.map +0 -1
  16. package/dist/ar-AE.mjs +0 -16
  17. package/dist/ar-AE.module.js +0 -16
  18. package/dist/ar-AE.module.js.map +0 -1
  19. package/dist/bg-BG.main.js +0 -14
  20. package/dist/bg-BG.main.js.map +0 -1
  21. package/dist/bg-BG.mjs +0 -16
  22. package/dist/bg-BG.module.js +0 -16
  23. package/dist/bg-BG.module.js.map +0 -1
  24. package/dist/cs-CZ.main.js +0 -14
  25. package/dist/cs-CZ.main.js.map +0 -1
  26. package/dist/cs-CZ.mjs +0 -16
  27. package/dist/cs-CZ.module.js +0 -16
  28. package/dist/cs-CZ.module.js.map +0 -1
  29. package/dist/da-DK.main.js +0 -14
  30. package/dist/da-DK.main.js.map +0 -1
  31. package/dist/da-DK.mjs +0 -16
  32. package/dist/da-DK.module.js +0 -16
  33. package/dist/da-DK.module.js.map +0 -1
  34. package/dist/de-DE.main.js +0 -14
  35. package/dist/de-DE.main.js.map +0 -1
  36. package/dist/de-DE.mjs +0 -16
  37. package/dist/de-DE.module.js +0 -16
  38. package/dist/de-DE.module.js.map +0 -1
  39. package/dist/el-GR.main.js +0 -14
  40. package/dist/el-GR.main.js.map +0 -1
  41. package/dist/el-GR.mjs +0 -16
  42. package/dist/el-GR.module.js +0 -16
  43. package/dist/el-GR.module.js.map +0 -1
  44. package/dist/en-US.main.js +0 -14
  45. package/dist/en-US.main.js.map +0 -1
  46. package/dist/en-US.mjs +0 -16
  47. package/dist/en-US.module.js +0 -16
  48. package/dist/en-US.module.js.map +0 -1
  49. package/dist/es-ES.main.js +0 -14
  50. package/dist/es-ES.main.js.map +0 -1
  51. package/dist/es-ES.mjs +0 -16
  52. package/dist/es-ES.module.js +0 -16
  53. package/dist/es-ES.module.js.map +0 -1
  54. package/dist/et-EE.main.js +0 -14
  55. package/dist/et-EE.main.js.map +0 -1
  56. package/dist/et-EE.mjs +0 -16
  57. package/dist/et-EE.module.js +0 -16
  58. package/dist/et-EE.module.js.map +0 -1
  59. package/dist/fi-FI.main.js +0 -14
  60. package/dist/fi-FI.main.js.map +0 -1
  61. package/dist/fi-FI.mjs +0 -16
  62. package/dist/fi-FI.module.js +0 -16
  63. package/dist/fi-FI.module.js.map +0 -1
  64. package/dist/fr-FR.main.js +0 -14
  65. package/dist/fr-FR.main.js.map +0 -1
  66. package/dist/fr-FR.mjs +0 -16
  67. package/dist/fr-FR.module.js +0 -16
  68. package/dist/fr-FR.module.js.map +0 -1
  69. package/dist/he-IL.main.js +0 -14
  70. package/dist/he-IL.main.js.map +0 -1
  71. package/dist/he-IL.mjs +0 -16
  72. package/dist/he-IL.module.js +0 -16
  73. package/dist/he-IL.module.js.map +0 -1
  74. package/dist/hr-HR.main.js +0 -14
  75. package/dist/hr-HR.main.js.map +0 -1
  76. package/dist/hr-HR.mjs +0 -16
  77. package/dist/hr-HR.module.js +0 -16
  78. package/dist/hr-HR.module.js.map +0 -1
  79. package/dist/hu-HU.main.js +0 -14
  80. package/dist/hu-HU.main.js.map +0 -1
  81. package/dist/hu-HU.mjs +0 -16
  82. package/dist/hu-HU.module.js +0 -16
  83. package/dist/hu-HU.module.js.map +0 -1
  84. package/dist/intlStrings.main.js +0 -108
  85. package/dist/intlStrings.main.js.map +0 -1
  86. package/dist/intlStrings.mjs +0 -110
  87. package/dist/intlStrings.module.js +0 -110
  88. package/dist/intlStrings.module.js.map +0 -1
  89. package/dist/it-IT.main.js +0 -14
  90. package/dist/it-IT.main.js.map +0 -1
  91. package/dist/it-IT.mjs +0 -16
  92. package/dist/it-IT.module.js +0 -16
  93. package/dist/it-IT.module.js.map +0 -1
  94. package/dist/ja-JP.main.js +0 -14
  95. package/dist/ja-JP.main.js.map +0 -1
  96. package/dist/ja-JP.mjs +0 -16
  97. package/dist/ja-JP.module.js +0 -16
  98. package/dist/ja-JP.module.js.map +0 -1
  99. package/dist/ko-KR.main.js +0 -14
  100. package/dist/ko-KR.main.js.map +0 -1
  101. package/dist/ko-KR.mjs +0 -16
  102. package/dist/ko-KR.module.js +0 -16
  103. package/dist/ko-KR.module.js.map +0 -1
  104. package/dist/lt-LT.main.js +0 -14
  105. package/dist/lt-LT.main.js.map +0 -1
  106. package/dist/lt-LT.mjs +0 -16
  107. package/dist/lt-LT.module.js +0 -16
  108. package/dist/lt-LT.module.js.map +0 -1
  109. package/dist/lv-LV.main.js +0 -14
  110. package/dist/lv-LV.main.js.map +0 -1
  111. package/dist/lv-LV.mjs +0 -16
  112. package/dist/lv-LV.module.js +0 -16
  113. package/dist/lv-LV.module.js.map +0 -1
  114. package/dist/nb-NO.main.js +0 -14
  115. package/dist/nb-NO.main.js.map +0 -1
  116. package/dist/nb-NO.mjs +0 -16
  117. package/dist/nb-NO.module.js +0 -16
  118. package/dist/nb-NO.module.js.map +0 -1
  119. package/dist/nl-NL.main.js +0 -14
  120. package/dist/nl-NL.main.js.map +0 -1
  121. package/dist/nl-NL.mjs +0 -16
  122. package/dist/nl-NL.module.js +0 -16
  123. package/dist/nl-NL.module.js.map +0 -1
  124. package/dist/pl-PL.main.js +0 -14
  125. package/dist/pl-PL.main.js.map +0 -1
  126. package/dist/pl-PL.mjs +0 -16
  127. package/dist/pl-PL.module.js +0 -16
  128. package/dist/pl-PL.module.js.map +0 -1
  129. package/dist/pt-BR.main.js +0 -14
  130. package/dist/pt-BR.main.js.map +0 -1
  131. package/dist/pt-BR.mjs +0 -16
  132. package/dist/pt-BR.module.js +0 -16
  133. package/dist/pt-BR.module.js.map +0 -1
  134. package/dist/pt-PT.main.js +0 -14
  135. package/dist/pt-PT.main.js.map +0 -1
  136. package/dist/pt-PT.mjs +0 -16
  137. package/dist/pt-PT.module.js +0 -16
  138. package/dist/pt-PT.module.js.map +0 -1
  139. package/dist/ro-RO.main.js +0 -14
  140. package/dist/ro-RO.main.js.map +0 -1
  141. package/dist/ro-RO.mjs +0 -16
  142. package/dist/ro-RO.module.js +0 -16
  143. package/dist/ro-RO.module.js.map +0 -1
  144. package/dist/ru-RU.main.js +0 -14
  145. package/dist/ru-RU.main.js.map +0 -1
  146. package/dist/ru-RU.mjs +0 -16
  147. package/dist/ru-RU.module.js +0 -16
  148. package/dist/ru-RU.module.js.map +0 -1
  149. package/dist/sk-SK.main.js +0 -14
  150. package/dist/sk-SK.main.js.map +0 -1
  151. package/dist/sk-SK.mjs +0 -16
  152. package/dist/sk-SK.module.js +0 -16
  153. package/dist/sk-SK.module.js.map +0 -1
  154. package/dist/sl-SI.main.js +0 -14
  155. package/dist/sl-SI.main.js.map +0 -1
  156. package/dist/sl-SI.mjs +0 -16
  157. package/dist/sl-SI.module.js +0 -16
  158. package/dist/sl-SI.module.js.map +0 -1
  159. package/dist/sr-SP.main.js +0 -14
  160. package/dist/sr-SP.main.js.map +0 -1
  161. package/dist/sr-SP.mjs +0 -16
  162. package/dist/sr-SP.module.js +0 -16
  163. package/dist/sr-SP.module.js.map +0 -1
  164. package/dist/sv-SE.main.js +0 -14
  165. package/dist/sv-SE.main.js.map +0 -1
  166. package/dist/sv-SE.mjs +0 -16
  167. package/dist/sv-SE.module.js +0 -16
  168. package/dist/sv-SE.module.js.map +0 -1
  169. package/dist/tr-TR.main.js +0 -14
  170. package/dist/tr-TR.main.js.map +0 -1
  171. package/dist/tr-TR.mjs +0 -16
  172. package/dist/tr-TR.module.js +0 -16
  173. package/dist/tr-TR.module.js.map +0 -1
  174. package/dist/types.d.ts +0 -157
  175. package/dist/types.d.ts.map +0 -1
  176. package/dist/uk-UA.main.js +0 -14
  177. package/dist/uk-UA.main.js.map +0 -1
  178. package/dist/uk-UA.mjs +0 -16
  179. package/dist/uk-UA.module.js +0 -16
  180. package/dist/uk-UA.module.js.map +0 -1
  181. package/dist/useTable.main.js +0 -114
  182. package/dist/useTable.main.js.map +0 -1
  183. package/dist/useTable.mjs +0 -109
  184. package/dist/useTable.module.js +0 -109
  185. package/dist/useTable.module.js.map +0 -1
  186. package/dist/useTableCell.main.js +0 -37
  187. package/dist/useTableCell.main.js.map +0 -1
  188. package/dist/useTableCell.mjs +0 -32
  189. package/dist/useTableCell.module.js +0 -32
  190. package/dist/useTableCell.module.js.map +0 -1
  191. package/dist/useTableColumnHeader.main.js +0 -92
  192. package/dist/useTableColumnHeader.main.js.map +0 -1
  193. package/dist/useTableColumnHeader.mjs +0 -87
  194. package/dist/useTableColumnHeader.module.js +0 -87
  195. package/dist/useTableColumnHeader.module.js.map +0 -1
  196. package/dist/useTableColumnResize.main.js +0 -226
  197. package/dist/useTableColumnResize.main.js.map +0 -1
  198. package/dist/useTableColumnResize.mjs +0 -221
  199. package/dist/useTableColumnResize.module.js +0 -221
  200. package/dist/useTableColumnResize.module.js.map +0 -1
  201. package/dist/useTableHeaderRow.main.js +0 -32
  202. package/dist/useTableHeaderRow.main.js.map +0 -1
  203. package/dist/useTableHeaderRow.mjs +0 -27
  204. package/dist/useTableHeaderRow.module.js +0 -27
  205. package/dist/useTableHeaderRow.module.js.map +0 -1
  206. package/dist/useTableRow.main.js +0 -82
  207. package/dist/useTableRow.main.js.map +0 -1
  208. package/dist/useTableRow.mjs +0 -77
  209. package/dist/useTableRow.module.js +0 -77
  210. package/dist/useTableRow.module.js.map +0 -1
  211. package/dist/useTableSelectionCheckbox.main.js +0 -56
  212. package/dist/useTableSelectionCheckbox.main.js.map +0 -1
  213. package/dist/useTableSelectionCheckbox.mjs +0 -50
  214. package/dist/useTableSelectionCheckbox.module.js +0 -50
  215. package/dist/useTableSelectionCheckbox.module.js.map +0 -1
  216. package/dist/utils.main.js +0 -43
  217. package/dist/utils.main.js.map +0 -1
  218. package/dist/utils.mjs +0 -35
  219. package/dist/utils.module.js +0 -35
  220. package/dist/utils.module.js.map +0 -1
  221. package/dist/zh-CN.main.js +0 -14
  222. package/dist/zh-CN.main.js.map +0 -1
  223. package/dist/zh-CN.mjs +0 -16
  224. package/dist/zh-CN.module.js +0 -16
  225. package/dist/zh-CN.module.js.map +0 -1
  226. package/dist/zh-TW.main.js +0 -14
  227. package/dist/zh-TW.main.js.map +0 -1
  228. package/dist/zh-TW.mjs +0 -16
  229. package/dist/zh-TW.module.js +0 -16
  230. package/dist/zh-TW.module.js.map +0 -1
  231. package/src/TableKeyboardDelegate.ts +0 -214
  232. package/src/useTable.ts +0 -123
  233. package/src/useTableCell.ts +0 -59
  234. package/src/useTableColumnHeader.ts +0 -108
  235. package/src/useTableColumnResize.ts +0 -277
  236. package/src/useTableHeaderRow.ts +0 -42
  237. package/src/useTableRow.ts +0 -86
  238. package/src/useTableSelectionCheckbox.ts +0 -72
  239. package/src/utils.ts +0 -49
package/dist/import.mjs CHANGED
@@ -1,11 +1,4 @@
1
- import {useTable as $6e31608fbba75bab$export$25bceaac3c7e4dc7} from "./useTable.mjs";
2
- import {useTableColumnHeader as $f329116d8ad0aba0$export$9514819a8c81e960} from "./useTableColumnHeader.mjs";
3
- import {useTableRow as $b2db214c022798eb$export$7f2f6ae19e707aa5} from "./useTableRow.mjs";
4
- import {useTableHeaderRow as $f917ee10f4c32dab$export$1b95a7d2d517b841} from "./useTableHeaderRow.mjs";
5
- import {useTableCell as $7713593715703b24$export$49571c903d73624c} from "./useTableCell.mjs";
6
- import {useTableSelectAllCheckbox as $2a795c53a101c542$export$1003db6a7e384b99, useTableSelectionCheckbox as $2a795c53a101c542$export$16ea7f650bd7c1bb} from "./useTableSelectionCheckbox.mjs";
7
- import {useTableColumnResize as $e91ef4e5004e3774$export$52994e973806c219} from "./useTableColumnResize.mjs";
8
- import {useGridRowGroup as $lJcFS$useGridRowGroup} from "@react-aria/grid";
1
+ import {useTable as $d68e7b819976bbbb$re_export$useTable, useTableColumnHeader as $d68e7b819976bbbb$re_export$useTableColumnHeader, useTableRow as $d68e7b819976bbbb$re_export$useTableRow, useTableHeaderRow as $d68e7b819976bbbb$re_export$useTableHeaderRow, useTableCell as $d68e7b819976bbbb$re_export$useTableCell, useTableSelectionCheckbox as $d68e7b819976bbbb$re_export$useTableSelectionCheckbox, useTableSelectAllCheckbox as $d68e7b819976bbbb$re_export$useTableSelectAllCheckbox, useTableColumnResize as $d68e7b819976bbbb$re_export$useTableColumnResize, useTableRowGroup as $d68e7b819976bbbb$re_export$useTableRowGroup} from "react-aria/useTable";
9
2
 
10
3
  /*
11
4
  * Copyright 2020 Adobe. All rights reserved.
@@ -20,15 +13,5 @@ import {useGridRowGroup as $lJcFS$useGridRowGroup} from "@react-aria/grid";
20
13
  */
21
14
 
22
15
 
23
-
24
-
25
-
26
-
27
-
28
- function $0047e6c294ea075f$export$6fb1613bd7b28198() {
29
- return (0, $lJcFS$useGridRowGroup)();
30
- }
31
-
32
-
33
- export {$0047e6c294ea075f$export$6fb1613bd7b28198 as useTableRowGroup, $6e31608fbba75bab$export$25bceaac3c7e4dc7 as useTable, $f329116d8ad0aba0$export$9514819a8c81e960 as useTableColumnHeader, $b2db214c022798eb$export$7f2f6ae19e707aa5 as useTableRow, $f917ee10f4c32dab$export$1b95a7d2d517b841 as useTableHeaderRow, $7713593715703b24$export$49571c903d73624c as useTableCell, $2a795c53a101c542$export$16ea7f650bd7c1bb as useTableSelectionCheckbox, $2a795c53a101c542$export$1003db6a7e384b99 as useTableSelectAllCheckbox, $e91ef4e5004e3774$export$52994e973806c219 as useTableColumnResize};
16
+ export {$d68e7b819976bbbb$re_export$useTable as useTable, $d68e7b819976bbbb$re_export$useTableColumnHeader as useTableColumnHeader, $d68e7b819976bbbb$re_export$useTableRow as useTableRow, $d68e7b819976bbbb$re_export$useTableHeaderRow as useTableHeaderRow, $d68e7b819976bbbb$re_export$useTableCell as useTableCell, $d68e7b819976bbbb$re_export$useTableSelectionCheckbox as useTableSelectionCheckbox, $d68e7b819976bbbb$re_export$useTableSelectAllCheckbox as useTableSelectAllCheckbox, $d68e7b819976bbbb$re_export$useTableColumnResize as useTableColumnResize, $d68e7b819976bbbb$re_export$useTableRowGroup as useTableRowGroup};
34
17
  //# sourceMappingURL=module.js.map
package/dist/main.js CHANGED
@@ -1,26 +1,19 @@
1
- var $25d14c0f8fad722e$exports = require("./useTable.main.js");
2
- var $7669c34a63ef0113$exports = require("./useTableColumnHeader.main.js");
3
- var $10b2115217af7c93$exports = require("./useTableRow.main.js");
4
- var $eb16c38321a72835$exports = require("./useTableHeaderRow.main.js");
5
- var $32387a1f2c61cda2$exports = require("./useTableCell.main.js");
6
- var $0b394e4562ac57c9$exports = require("./useTableSelectionCheckbox.main.js");
7
- var $16d645f9e2153641$exports = require("./useTableColumnResize.main.js");
8
- var $kJQf8$reactariagrid = require("@react-aria/grid");
1
+ var $PAonW$reactariauseTable = require("react-aria/useTable");
9
2
 
10
3
 
11
4
  function $parcel$export(e, n, v, s) {
12
5
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
13
6
  }
14
7
 
15
- $parcel$export(module.exports, "useTableRowGroup", () => $cd66afe5decb6adb$export$6fb1613bd7b28198);
16
- $parcel$export(module.exports, "useTable", () => $25d14c0f8fad722e$exports.useTable);
17
- $parcel$export(module.exports, "useTableColumnHeader", () => $7669c34a63ef0113$exports.useTableColumnHeader);
18
- $parcel$export(module.exports, "useTableRow", () => $10b2115217af7c93$exports.useTableRow);
19
- $parcel$export(module.exports, "useTableHeaderRow", () => $eb16c38321a72835$exports.useTableHeaderRow);
20
- $parcel$export(module.exports, "useTableCell", () => $32387a1f2c61cda2$exports.useTableCell);
21
- $parcel$export(module.exports, "useTableSelectionCheckbox", () => $0b394e4562ac57c9$exports.useTableSelectionCheckbox);
22
- $parcel$export(module.exports, "useTableSelectAllCheckbox", () => $0b394e4562ac57c9$exports.useTableSelectAllCheckbox);
23
- $parcel$export(module.exports, "useTableColumnResize", () => $16d645f9e2153641$exports.useTableColumnResize);
8
+ $parcel$export(module.exports, "useTable", function () { return $PAonW$reactariauseTable.useTable; });
9
+ $parcel$export(module.exports, "useTableColumnHeader", function () { return $PAonW$reactariauseTable.useTableColumnHeader; });
10
+ $parcel$export(module.exports, "useTableRow", function () { return $PAonW$reactariauseTable.useTableRow; });
11
+ $parcel$export(module.exports, "useTableHeaderRow", function () { return $PAonW$reactariauseTable.useTableHeaderRow; });
12
+ $parcel$export(module.exports, "useTableCell", function () { return $PAonW$reactariauseTable.useTableCell; });
13
+ $parcel$export(module.exports, "useTableSelectionCheckbox", function () { return $PAonW$reactariauseTable.useTableSelectionCheckbox; });
14
+ $parcel$export(module.exports, "useTableSelectAllCheckbox", function () { return $PAonW$reactariauseTable.useTableSelectAllCheckbox; });
15
+ $parcel$export(module.exports, "useTableColumnResize", function () { return $PAonW$reactariauseTable.useTableColumnResize; });
16
+ $parcel$export(module.exports, "useTableRowGroup", function () { return $PAonW$reactariauseTable.useTableRowGroup; });
24
17
  /*
25
18
  * Copyright 2020 Adobe. All rights reserved.
26
19
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -34,14 +27,4 @@ $parcel$export(module.exports, "useTableColumnResize", () => $16d645f9e2153641$e
34
27
  */
35
28
 
36
29
 
37
-
38
-
39
-
40
-
41
-
42
- function $cd66afe5decb6adb$export$6fb1613bd7b28198() {
43
- return (0, $kJQf8$reactariagrid.useGridRowGroup)();
44
- }
45
-
46
-
47
30
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAaM,SAAS;IACd,OAAO,CAAA,GAAA,oCAAc;AACvB","sources":["packages/@react-aria/table/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {useTable} from './useTable';\nexport {useTableColumnHeader} from './useTableColumnHeader';\nexport {useTableRow} from './useTableRow';\nexport {useTableHeaderRow} from './useTableHeaderRow';\nexport {useTableCell} from './useTableCell';\nexport {useTableSelectionCheckbox, useTableSelectAllCheckbox} from './useTableSelectionCheckbox';\nexport {useTableColumnResize} from './useTableColumnResize';\n\n// Workaround for a Parcel bug where re-exports don't work in the CommonJS output format...\n// export {useGridRowGroup as useTableRowGroup} from '@react-aria/grid';\nimport {GridRowGroupAria, useGridRowGroup} from '@react-aria/grid';\nexport function useTableRowGroup(): GridRowGroupAria {\n return useGridRowGroup();\n}\n\nexport type {AriaTableProps} from './useTable';\nexport type {GridAria, GridRowAria, GridRowProps} from '@react-aria/grid';\nexport type {AriaTableColumnHeaderProps, TableColumnHeaderAria} from './useTableColumnHeader';\nexport type {AriaTableCellProps, TableCellAria} from './useTableCell';\nexport type {TableHeaderRowAria} from './useTableHeaderRow';\nexport type {AriaTableSelectionCheckboxProps, TableSelectionCheckboxAria, TableSelectAllCheckboxAria} from './useTableSelectionCheckbox';\nexport type {AriaTableColumnResizeProps, TableColumnResizeAria} from './useTableColumnResize';\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/table/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {useTable, useTableColumnHeader, useTableRow, useTableHeaderRow, useTableCell, useTableSelectionCheckbox, useTableSelectAllCheckbox, useTableColumnResize, useTableRowGroup} from 'react-aria/useTable';\n\nexport type {AriaTableProps, AriaTableColumnHeaderProps, TableColumnHeaderAria, AriaTableCellProps, TableCellAria, TableHeaderRowAria, AriaTableSelectionCheckboxProps, TableSelectionCheckboxAria, TableSelectAllCheckboxAria, AriaTableColumnResizeProps, TableColumnResizeAria} from 'react-aria/useTable';\nexport type {GridAria} from 'react-aria/private/grid/useGrid';\nexport type {GridRowAria, GridRowProps} from 'react-aria/private/grid/useGridRow';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,11 +1,4 @@
1
- import {useTable as $6e31608fbba75bab$export$25bceaac3c7e4dc7} from "./useTable.module.js";
2
- import {useTableColumnHeader as $f329116d8ad0aba0$export$9514819a8c81e960} from "./useTableColumnHeader.module.js";
3
- import {useTableRow as $b2db214c022798eb$export$7f2f6ae19e707aa5} from "./useTableRow.module.js";
4
- import {useTableHeaderRow as $f917ee10f4c32dab$export$1b95a7d2d517b841} from "./useTableHeaderRow.module.js";
5
- import {useTableCell as $7713593715703b24$export$49571c903d73624c} from "./useTableCell.module.js";
6
- import {useTableSelectAllCheckbox as $2a795c53a101c542$export$1003db6a7e384b99, useTableSelectionCheckbox as $2a795c53a101c542$export$16ea7f650bd7c1bb} from "./useTableSelectionCheckbox.module.js";
7
- import {useTableColumnResize as $e91ef4e5004e3774$export$52994e973806c219} from "./useTableColumnResize.module.js";
8
- import {useGridRowGroup as $lJcFS$useGridRowGroup} from "@react-aria/grid";
1
+ import {useTable as $d68e7b819976bbbb$re_export$useTable, useTableColumnHeader as $d68e7b819976bbbb$re_export$useTableColumnHeader, useTableRow as $d68e7b819976bbbb$re_export$useTableRow, useTableHeaderRow as $d68e7b819976bbbb$re_export$useTableHeaderRow, useTableCell as $d68e7b819976bbbb$re_export$useTableCell, useTableSelectionCheckbox as $d68e7b819976bbbb$re_export$useTableSelectionCheckbox, useTableSelectAllCheckbox as $d68e7b819976bbbb$re_export$useTableSelectAllCheckbox, useTableColumnResize as $d68e7b819976bbbb$re_export$useTableColumnResize, useTableRowGroup as $d68e7b819976bbbb$re_export$useTableRowGroup} from "react-aria/useTable";
9
2
 
10
3
  /*
11
4
  * Copyright 2020 Adobe. All rights reserved.
@@ -20,15 +13,5 @@ import {useGridRowGroup as $lJcFS$useGridRowGroup} from "@react-aria/grid";
20
13
  */
21
14
 
22
15
 
23
-
24
-
25
-
26
-
27
-
28
- function $0047e6c294ea075f$export$6fb1613bd7b28198() {
29
- return (0, $lJcFS$useGridRowGroup)();
30
- }
31
-
32
-
33
- export {$0047e6c294ea075f$export$6fb1613bd7b28198 as useTableRowGroup, $6e31608fbba75bab$export$25bceaac3c7e4dc7 as useTable, $f329116d8ad0aba0$export$9514819a8c81e960 as useTableColumnHeader, $b2db214c022798eb$export$7f2f6ae19e707aa5 as useTableRow, $f917ee10f4c32dab$export$1b95a7d2d517b841 as useTableHeaderRow, $7713593715703b24$export$49571c903d73624c as useTableCell, $2a795c53a101c542$export$16ea7f650bd7c1bb as useTableSelectionCheckbox, $2a795c53a101c542$export$1003db6a7e384b99 as useTableSelectAllCheckbox, $e91ef4e5004e3774$export$52994e973806c219 as useTableColumnResize};
16
+ export {$d68e7b819976bbbb$re_export$useTable as useTable, $d68e7b819976bbbb$re_export$useTableColumnHeader as useTableColumnHeader, $d68e7b819976bbbb$re_export$useTableRow as useTableRow, $d68e7b819976bbbb$re_export$useTableHeaderRow as useTableHeaderRow, $d68e7b819976bbbb$re_export$useTableCell as useTableCell, $d68e7b819976bbbb$re_export$useTableSelectionCheckbox as useTableSelectionCheckbox, $d68e7b819976bbbb$re_export$useTableSelectAllCheckbox as useTableSelectAllCheckbox, $d68e7b819976bbbb$re_export$useTableColumnResize as useTableColumnResize, $d68e7b819976bbbb$re_export$useTableRowGroup as useTableRowGroup};
34
17
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAaM,SAAS;IACd,OAAO,CAAA,GAAA,sBAAc;AACvB","sources":["packages/@react-aria/table/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {useTable} from './useTable';\nexport {useTableColumnHeader} from './useTableColumnHeader';\nexport {useTableRow} from './useTableRow';\nexport {useTableHeaderRow} from './useTableHeaderRow';\nexport {useTableCell} from './useTableCell';\nexport {useTableSelectionCheckbox, useTableSelectAllCheckbox} from './useTableSelectionCheckbox';\nexport {useTableColumnResize} from './useTableColumnResize';\n\n// Workaround for a Parcel bug where re-exports don't work in the CommonJS output format...\n// export {useGridRowGroup as useTableRowGroup} from '@react-aria/grid';\nimport {GridRowGroupAria, useGridRowGroup} from '@react-aria/grid';\nexport function useTableRowGroup(): GridRowGroupAria {\n return useGridRowGroup();\n}\n\nexport type {AriaTableProps} from './useTable';\nexport type {GridAria, GridRowAria, GridRowProps} from '@react-aria/grid';\nexport type {AriaTableColumnHeaderProps, TableColumnHeaderAria} from './useTableColumnHeader';\nexport type {AriaTableCellProps, TableCellAria} from './useTableCell';\nexport type {TableHeaderRowAria} from './useTableHeaderRow';\nexport type {AriaTableSelectionCheckboxProps, TableSelectionCheckboxAria, TableSelectAllCheckboxAria} from './useTableSelectionCheckbox';\nexport type {AriaTableColumnResizeProps, TableColumnResizeAria} from './useTableColumnResize';\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/table/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {useTable, useTableColumnHeader, useTableRow, useTableHeaderRow, useTableCell, useTableSelectionCheckbox, useTableSelectAllCheckbox, useTableColumnResize, useTableRowGroup} from 'react-aria/useTable';\n\nexport type {AriaTableProps, AriaTableColumnHeaderProps, TableColumnHeaderAria, AriaTableCellProps, TableCellAria, TableHeaderRowAria, AriaTableSelectionCheckboxProps, TableSelectionCheckboxAria, TableSelectAllCheckboxAria, AriaTableColumnResizeProps, TableColumnResizeAria} from 'react-aria/useTable';\nexport type {GridAria} from 'react-aria/private/grid/useGrid';\nexport type {GridRowAria, GridRowProps} from 'react-aria/private/grid/useGridRow';\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -0,0 +1,4 @@
1
+ export { useTable, useTableColumnHeader, useTableRow, useTableHeaderRow, useTableCell, useTableSelectionCheckbox, useTableSelectAllCheckbox, useTableColumnResize, useTableRowGroup } from 'react-aria/useTable';
2
+ export type { AriaTableProps, AriaTableColumnHeaderProps, TableColumnHeaderAria, AriaTableCellProps, TableCellAria, TableHeaderRowAria, AriaTableSelectionCheckboxProps, TableSelectionCheckboxAria, TableSelectAllCheckboxAria, AriaTableColumnResizeProps, TableColumnResizeAria } from 'react-aria/useTable';
3
+ export type { GridAria } from 'react-aria/private/grid/useGrid';
4
+ export type { GridRowAria, GridRowProps } from 'react-aria/private/grid/useGridRow';
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@react-aria/table",
3
- "version": "3.17.10",
3
+ "version": "3.18.0",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
7
7
  "module": "dist/module.js",
8
8
  "exports": {
9
- "source": "./src/index.ts",
10
- "types": [
11
- "./dist/types.d.ts",
12
- "./src/index.ts"
13
- ],
14
- "import": "./dist/import.mjs",
15
- "require": "./dist/main.js"
9
+ ".": {
10
+ "source": "./src/index.ts",
11
+ "types": "./dist/types/src/index.d.ts",
12
+ "import": "./dist/import.mjs",
13
+ "require": "./dist/main.js"
14
+ },
15
+ "./package.json": "./package.json"
16
16
  },
17
- "types": "dist/types.d.ts",
17
+ "types": "dist/types/src/index.d.ts",
18
18
  "source": "src/index.ts",
19
19
  "files": [
20
20
  "dist",
@@ -26,21 +26,8 @@
26
26
  "url": "https://github.com/adobe/react-spectrum"
27
27
  },
28
28
  "dependencies": {
29
- "@react-aria/focus": "^3.21.4",
30
- "@react-aria/grid": "^3.14.7",
31
- "@react-aria/i18n": "^3.12.15",
32
- "@react-aria/interactions": "^3.27.0",
33
- "@react-aria/live-announcer": "^3.4.4",
34
- "@react-aria/utils": "^3.33.0",
35
- "@react-aria/visually-hidden": "^3.8.30",
36
- "@react-stately/collections": "^3.12.9",
37
- "@react-stately/flags": "^3.1.2",
38
- "@react-stately/table": "^3.15.3",
39
- "@react-types/checkbox": "^3.10.3",
40
- "@react-types/grid": "^3.3.7",
41
- "@react-types/shared": "^3.33.0",
42
- "@react-types/table": "^3.13.5",
43
- "@swc/helpers": "^0.5.0"
29
+ "@swc/helpers": "^0.5.0",
30
+ "react-aria": "3.48.0"
44
31
  },
45
32
  "peerDependencies": {
46
33
  "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
@@ -49,5 +36,8 @@
49
36
  "publishConfig": {
50
37
  "access": "public"
51
38
  },
52
- "gitHead": "66e51757606b43a89ed02c574ca24517323a2ab9"
39
+ "targets": {
40
+ "types": false
41
+ },
42
+ "gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
53
43
  }
package/src/index.ts CHANGED
@@ -10,25 +10,8 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- export {useTable} from './useTable';
14
- export {useTableColumnHeader} from './useTableColumnHeader';
15
- export {useTableRow} from './useTableRow';
16
- export {useTableHeaderRow} from './useTableHeaderRow';
17
- export {useTableCell} from './useTableCell';
18
- export {useTableSelectionCheckbox, useTableSelectAllCheckbox} from './useTableSelectionCheckbox';
19
- export {useTableColumnResize} from './useTableColumnResize';
13
+ export {useTable, useTableColumnHeader, useTableRow, useTableHeaderRow, useTableCell, useTableSelectionCheckbox, useTableSelectAllCheckbox, useTableColumnResize, useTableRowGroup} from 'react-aria/useTable';
20
14
 
21
- // Workaround for a Parcel bug where re-exports don't work in the CommonJS output format...
22
- // export {useGridRowGroup as useTableRowGroup} from '@react-aria/grid';
23
- import {GridRowGroupAria, useGridRowGroup} from '@react-aria/grid';
24
- export function useTableRowGroup(): GridRowGroupAria {
25
- return useGridRowGroup();
26
- }
27
-
28
- export type {AriaTableProps} from './useTable';
29
- export type {GridAria, GridRowAria, GridRowProps} from '@react-aria/grid';
30
- export type {AriaTableColumnHeaderProps, TableColumnHeaderAria} from './useTableColumnHeader';
31
- export type {AriaTableCellProps, TableCellAria} from './useTableCell';
32
- export type {TableHeaderRowAria} from './useTableHeaderRow';
33
- export type {AriaTableSelectionCheckboxProps, TableSelectionCheckboxAria, TableSelectAllCheckboxAria} from './useTableSelectionCheckbox';
34
- export type {AriaTableColumnResizeProps, TableColumnResizeAria} from './useTableColumnResize';
15
+ export type {AriaTableProps, AriaTableColumnHeaderProps, TableColumnHeaderAria, AriaTableCellProps, TableCellAria, TableHeaderRowAria, AriaTableSelectionCheckboxProps, TableSelectionCheckboxAria, TableSelectAllCheckboxAria, AriaTableColumnResizeProps, TableColumnResizeAria} from 'react-aria/useTable';
16
+ export type {GridAria} from 'react-aria/private/grid/useGrid';
17
+ export type {GridRowAria, GridRowProps} from 'react-aria/private/grid/useGridRow';
@@ -1,142 +0,0 @@
1
- var $heEpC$reactstatelycollections = require("@react-stately/collections");
2
- var $heEpC$reactariagrid = require("@react-aria/grid");
3
-
4
-
5
- function $parcel$export(e, n, v, s) {
6
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
7
- }
8
-
9
- $parcel$export(module.exports, "TableKeyboardDelegate", () => $a911ff492b884835$export$da43f8f5cb04028d);
10
- /*
11
- * Copyright 2022 Adobe. All rights reserved.
12
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
13
- * you may not use this file except in compliance with the License. You may obtain a copy
14
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
15
- *
16
- * Unless required by applicable law or agreed to in writing, software distributed under
17
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
18
- * OF ANY KIND, either express or implied. See the License for the specific language
19
- * governing permissions and limitations under the License.
20
- */
21
-
22
- class $a911ff492b884835$export$da43f8f5cb04028d extends (0, $heEpC$reactariagrid.GridKeyboardDelegate) {
23
- isCell(node) {
24
- return node.type === 'cell' || node.type === 'rowheader' || node.type === 'column';
25
- }
26
- getKeyBelow(key) {
27
- let startItem = this.collection.getItem(key);
28
- if (!startItem) return null;
29
- // If focus was on a column, then focus the first child column if any,
30
- // or find the corresponding cell in the first row.
31
- if (startItem.type === 'column') {
32
- let child = (0, $heEpC$reactstatelycollections.getFirstItem)((0, $heEpC$reactstatelycollections.getChildNodes)(startItem, this.collection));
33
- if (child) return child.key;
34
- let firstKey = this.getFirstKey();
35
- if (firstKey == null) return null;
36
- let firstItem = this.collection.getItem(firstKey);
37
- if (!firstItem) return null;
38
- return super.getKeyForItemInRowByIndex(firstKey, startItem.index);
39
- }
40
- return super.getKeyBelow(key);
41
- }
42
- getKeyAbove(key) {
43
- let startItem = this.collection.getItem(key);
44
- if (!startItem) return null;
45
- // If focus was on a column, focus the parent column if any
46
- if (startItem.type === 'column') {
47
- let parent = startItem.parentKey != null ? this.collection.getItem(startItem.parentKey) : null;
48
- if (parent && parent.type === 'column') return parent.key;
49
- return null;
50
- }
51
- // only return above row key if not header row
52
- let superKey = super.getKeyAbove(key);
53
- let superItem = superKey != null ? this.collection.getItem(superKey) : null;
54
- if (superItem && superItem.type !== 'headerrow') return superKey;
55
- // If no item was found, and focus was on a cell, then focus the
56
- // corresponding column header.
57
- if (this.isCell(startItem)) return this.collection.columns[startItem.index].key;
58
- // If focus was on a row, then focus the first column header.
59
- return this.collection.columns[0].key;
60
- }
61
- findNextColumnKey(column) {
62
- // Search following columns
63
- let key = this.findNextKey(column.key, (item)=>item.type === 'column');
64
- if (key != null) return key;
65
- // Wrap around to the first column
66
- let row = this.collection.headerRows[column.level];
67
- for (let item of (0, $heEpC$reactstatelycollections.getChildNodes)(row, this.collection)){
68
- if (item.type === 'column') return item.key;
69
- }
70
- return null;
71
- }
72
- findPreviousColumnKey(column) {
73
- // Search previous columns
74
- let key = this.findPreviousKey(column.key, (item)=>item.type === 'column');
75
- if (key != null) return key;
76
- // Wrap around to the last column
77
- let row = this.collection.headerRows[column.level];
78
- let childNodes = [
79
- ...(0, $heEpC$reactstatelycollections.getChildNodes)(row, this.collection)
80
- ];
81
- for(let i = childNodes.length - 1; i >= 0; i--){
82
- let item = childNodes[i];
83
- if (item.type === 'column') return item.key;
84
- }
85
- return null;
86
- }
87
- getKeyRightOf(key) {
88
- let item = this.collection.getItem(key);
89
- if (!item) return null;
90
- // If focus was on a column, then focus the next column
91
- if (item.type === 'column') return this.direction === 'rtl' ? this.findPreviousColumnKey(item) : this.findNextColumnKey(item);
92
- return super.getKeyRightOf(key);
93
- }
94
- getKeyLeftOf(key) {
95
- let item = this.collection.getItem(key);
96
- if (!item) return null;
97
- // If focus was on a column, then focus the previous column
98
- if (item.type === 'column') return this.direction === 'rtl' ? this.findNextColumnKey(item) : this.findPreviousColumnKey(item);
99
- return super.getKeyLeftOf(key);
100
- }
101
- getKeyForSearch(search, fromKey) {
102
- if (!this.collator) return null;
103
- let collection = this.collection;
104
- let key = fromKey !== null && fromKey !== void 0 ? fromKey : this.getFirstKey();
105
- if (key == null) return null;
106
- // If the starting key is a cell, search from its parent row.
107
- let startItem = collection.getItem(key);
108
- var _startItem_parentKey;
109
- if ((startItem === null || startItem === void 0 ? void 0 : startItem.type) === 'cell') key = (_startItem_parentKey = startItem.parentKey) !== null && _startItem_parentKey !== void 0 ? _startItem_parentKey : null;
110
- let hasWrapped = false;
111
- while(key != null){
112
- let item = collection.getItem(key);
113
- if (!item) return null;
114
- if (item.textValue) {
115
- let substring = item.textValue.slice(0, search.length);
116
- if (this.collator.compare(substring, search) === 0) return item.key;
117
- }
118
- // Check each of the row header cells in this row for a match
119
- for (let cell of (0, $heEpC$reactstatelycollections.getChildNodes)(item, this.collection)){
120
- let column = collection.columns[cell.index];
121
- if (collection.rowHeaderColumnKeys.has(column.key) && cell.textValue) {
122
- let substring = cell.textValue.slice(0, search.length);
123
- if (this.collator.compare(substring, search) === 0) {
124
- // If we started on a cell, end on the matching cell. Otherwise, end on the row.
125
- let fromItem = fromKey != null ? collection.getItem(fromKey) : startItem;
126
- return (fromItem === null || fromItem === void 0 ? void 0 : fromItem.type) === 'cell' ? cell.key : item.key;
127
- }
128
- }
129
- }
130
- key = this.getKeyBelow(key);
131
- // Wrap around when reaching the end of the collection
132
- if (key == null && !hasWrapped) {
133
- key = this.getFirstKey();
134
- hasWrapped = true;
135
- }
136
- }
137
- return null;
138
- }
139
- }
140
-
141
-
142
- //# sourceMappingURL=TableKeyboardDelegate.main.js.map
@@ -1 +0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YAC7D,KAAK,IAAI,QAAQ,CAAA,GAAA,4CAAY,EAAE,MAAM,IAAI,CAAC,UAAU,EAAG;gBACrD,IAAI,SAAS,WAAW,OAAO,CAAC,KAAK,KAAK,CAAC;gBAC3C,IAAI,WAAW,mBAAmB,CAAC,GAAG,CAAC,OAAO,GAAG,KAAK,KAAK,SAAS,EAAE;oBACpE,IAAI,YAAY,KAAK,SAAS,CAAC,KAAK,CAAC,GAAG,OAAO,MAAM;oBACrD,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,YAAY,GAAG;wBAClD,gFAAgF;wBAChF,IAAI,WAAW,WAAW,OAAO,WAAW,OAAO,CAAC,WAAW;wBAC/D,OAAO,CAAA,qBAAA,+BAAA,SAAU,IAAI,MAAK,SACtB,KAAK,GAAG,GACR,KAAK,GAAG;oBACd;gBACF;YACF;YAEA,MAAM,IAAI,CAAC,WAAW,CAAC;YAEvB,sDAAsD;YACtD,IAAI,OAAO,QAAQ,CAAC,YAAY;gBAC9B,MAAM,IAAI,CAAC,WAAW;gBACtB,aAAa;YACf;QACF;QAEA,OAAO;IACT;AACF","sources":["packages/@react-aria/table/src/TableKeyboardDelegate.ts"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getChildNodes, getFirstItem} from '@react-stately/collections';\nimport {GridKeyboardDelegate} from '@react-aria/grid';\nimport {Key, Node} from '@react-types/shared';\nimport {TableCollection} from '@react-types/table';\n\nexport class TableKeyboardDelegate<T> extends GridKeyboardDelegate<T, TableCollection<T>> {\n\n protected isCell(node: Node<T>): boolean {\n return node.type === 'cell' || node.type === 'rowheader' || node.type === 'column';\n }\n\n getKeyBelow(key: Key): Key | null {\n let startItem = this.collection.getItem(key);\n if (!startItem) {\n return null;\n }\n\n // If focus was on a column, then focus the first child column if any,\n // or find the corresponding cell in the first row.\n if (startItem.type === 'column') {\n let child = getFirstItem(getChildNodes(startItem, this.collection));\n if (child) {\n return child.key;\n }\n\n let firstKey = this.getFirstKey();\n if (firstKey == null) {\n return null;\n }\n\n let firstItem = this.collection.getItem(firstKey);\n if (!firstItem) {\n return null;\n }\n\n return super.getKeyForItemInRowByIndex(firstKey, startItem.index);\n }\n\n return super.getKeyBelow(key);\n }\n\n getKeyAbove(key: Key): Key | null {\n let startItem = this.collection.getItem(key);\n if (!startItem) {\n return null;\n }\n\n // If focus was on a column, focus the parent column if any\n if (startItem.type === 'column') {\n let parent = startItem.parentKey != null ? this.collection.getItem(startItem.parentKey) : null;\n if (parent && parent.type === 'column') {\n return parent.key;\n }\n\n return null;\n }\n\n // only return above row key if not header row\n let superKey = super.getKeyAbove(key);\n let superItem = superKey != null ? this.collection.getItem(superKey) : null;\n if (superItem && superItem.type !== 'headerrow') {\n return superKey;\n }\n\n // If no item was found, and focus was on a cell, then focus the\n // corresponding column header.\n if (this.isCell(startItem)) {\n return this.collection.columns[startItem.index].key;\n }\n\n // If focus was on a row, then focus the first column header.\n return this.collection.columns[0].key;\n }\n\n private findNextColumnKey(column: Node<T>): Key | null {\n // Search following columns\n let key = this.findNextKey(column.key, item => item.type === 'column');\n if (key != null) {\n return key;\n }\n\n // Wrap around to the first column\n let row = this.collection.headerRows[column.level];\n for (let item of getChildNodes(row, this.collection)) {\n if (item.type === 'column') {\n return item.key;\n }\n }\n\n return null;\n }\n\n private findPreviousColumnKey(column: Node<T>): Key | null {\n // Search previous columns\n let key = this.findPreviousKey(column.key, item => item.type === 'column');\n if (key != null) {\n return key;\n }\n\n // Wrap around to the last column\n let row = this.collection.headerRows[column.level];\n let childNodes = [...getChildNodes(row, this.collection)];\n for (let i = childNodes.length - 1; i >= 0; i--) {\n let item = childNodes[i];\n if (item.type === 'column') {\n return item.key;\n }\n }\n\n return null;\n }\n\n getKeyRightOf(key: Key): Key | null {\n let item = this.collection.getItem(key);\n if (!item) {\n return null;\n }\n\n // If focus was on a column, then focus the next column\n if (item.type === 'column') {\n return this.direction === 'rtl'\n ? this.findPreviousColumnKey(item)\n : this.findNextColumnKey(item);\n }\n\n return super.getKeyRightOf(key);\n }\n\n getKeyLeftOf(key: Key): Key | null {\n let item = this.collection.getItem(key);\n if (!item) {\n return null;\n }\n\n // If focus was on a column, then focus the previous column\n if (item.type === 'column') {\n return this.direction === 'rtl'\n ? this.findNextColumnKey(item)\n : this.findPreviousColumnKey(item);\n }\n\n return super.getKeyLeftOf(key);\n }\n\n getKeyForSearch(search: string, fromKey?: Key): Key | null {\n if (!this.collator) {\n return null;\n }\n\n let collection = this.collection;\n let key = fromKey ?? this.getFirstKey();\n if (key == null) {\n return null;\n }\n\n // If the starting key is a cell, search from its parent row.\n let startItem = collection.getItem(key);\n if (startItem?.type === 'cell') {\n key = startItem.parentKey ?? null;\n }\n\n let hasWrapped = false;\n while (key != null) {\n let item = collection.getItem(key);\n if (!item) {\n return null;\n }\n\n if (item.textValue) {\n let substring = item.textValue.slice(0, search.length);\n if (this.collator.compare(substring, search) === 0) {\n return item.key;\n }\n }\n\n // Check each of the row header cells in this row for a match\n for (let cell of getChildNodes(item, this.collection)) {\n let column = collection.columns[cell.index];\n if (collection.rowHeaderColumnKeys.has(column.key) && cell.textValue) {\n let substring = cell.textValue.slice(0, search.length);\n if (this.collator.compare(substring, search) === 0) {\n // If we started on a cell, end on the matching cell. Otherwise, end on the row.\n let fromItem = fromKey != null ? collection.getItem(fromKey) : startItem;\n return fromItem?.type === 'cell'\n ? cell.key\n : item.key;\n }\n }\n }\n\n key = this.getKeyBelow(key);\n\n // Wrap around when reaching the end of the collection\n if (key == null && !hasWrapped) {\n key = this.getFirstKey();\n hasWrapped = true;\n }\n }\n\n return null;\n }\n}\n"],"names":[],"version":3,"file":"TableKeyboardDelegate.main.js.map"}
@@ -1,137 +0,0 @@
1
- import {getFirstItem as $eIXPM$getFirstItem, getChildNodes as $eIXPM$getChildNodes} from "@react-stately/collections";
2
- import {GridKeyboardDelegate as $eIXPM$GridKeyboardDelegate} from "@react-aria/grid";
3
-
4
- /*
5
- * Copyright 2022 Adobe. All rights reserved.
6
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License. You may obtain a copy
8
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software distributed under
11
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
12
- * OF ANY KIND, either express or implied. See the License for the specific language
13
- * governing permissions and limitations under the License.
14
- */
15
-
16
- class $0ba3c81c7f1caedd$export$da43f8f5cb04028d extends (0, $eIXPM$GridKeyboardDelegate) {
17
- isCell(node) {
18
- return node.type === 'cell' || node.type === 'rowheader' || node.type === 'column';
19
- }
20
- getKeyBelow(key) {
21
- let startItem = this.collection.getItem(key);
22
- if (!startItem) return null;
23
- // If focus was on a column, then focus the first child column if any,
24
- // or find the corresponding cell in the first row.
25
- if (startItem.type === 'column') {
26
- let child = (0, $eIXPM$getFirstItem)((0, $eIXPM$getChildNodes)(startItem, this.collection));
27
- if (child) return child.key;
28
- let firstKey = this.getFirstKey();
29
- if (firstKey == null) return null;
30
- let firstItem = this.collection.getItem(firstKey);
31
- if (!firstItem) return null;
32
- return super.getKeyForItemInRowByIndex(firstKey, startItem.index);
33
- }
34
- return super.getKeyBelow(key);
35
- }
36
- getKeyAbove(key) {
37
- let startItem = this.collection.getItem(key);
38
- if (!startItem) return null;
39
- // If focus was on a column, focus the parent column if any
40
- if (startItem.type === 'column') {
41
- let parent = startItem.parentKey != null ? this.collection.getItem(startItem.parentKey) : null;
42
- if (parent && parent.type === 'column') return parent.key;
43
- return null;
44
- }
45
- // only return above row key if not header row
46
- let superKey = super.getKeyAbove(key);
47
- let superItem = superKey != null ? this.collection.getItem(superKey) : null;
48
- if (superItem && superItem.type !== 'headerrow') return superKey;
49
- // If no item was found, and focus was on a cell, then focus the
50
- // corresponding column header.
51
- if (this.isCell(startItem)) return this.collection.columns[startItem.index].key;
52
- // If focus was on a row, then focus the first column header.
53
- return this.collection.columns[0].key;
54
- }
55
- findNextColumnKey(column) {
56
- // Search following columns
57
- let key = this.findNextKey(column.key, (item)=>item.type === 'column');
58
- if (key != null) return key;
59
- // Wrap around to the first column
60
- let row = this.collection.headerRows[column.level];
61
- for (let item of (0, $eIXPM$getChildNodes)(row, this.collection)){
62
- if (item.type === 'column') return item.key;
63
- }
64
- return null;
65
- }
66
- findPreviousColumnKey(column) {
67
- // Search previous columns
68
- let key = this.findPreviousKey(column.key, (item)=>item.type === 'column');
69
- if (key != null) return key;
70
- // Wrap around to the last column
71
- let row = this.collection.headerRows[column.level];
72
- let childNodes = [
73
- ...(0, $eIXPM$getChildNodes)(row, this.collection)
74
- ];
75
- for(let i = childNodes.length - 1; i >= 0; i--){
76
- let item = childNodes[i];
77
- if (item.type === 'column') return item.key;
78
- }
79
- return null;
80
- }
81
- getKeyRightOf(key) {
82
- let item = this.collection.getItem(key);
83
- if (!item) return null;
84
- // If focus was on a column, then focus the next column
85
- if (item.type === 'column') return this.direction === 'rtl' ? this.findPreviousColumnKey(item) : this.findNextColumnKey(item);
86
- return super.getKeyRightOf(key);
87
- }
88
- getKeyLeftOf(key) {
89
- let item = this.collection.getItem(key);
90
- if (!item) return null;
91
- // If focus was on a column, then focus the previous column
92
- if (item.type === 'column') return this.direction === 'rtl' ? this.findNextColumnKey(item) : this.findPreviousColumnKey(item);
93
- return super.getKeyLeftOf(key);
94
- }
95
- getKeyForSearch(search, fromKey) {
96
- if (!this.collator) return null;
97
- let collection = this.collection;
98
- let key = fromKey !== null && fromKey !== void 0 ? fromKey : this.getFirstKey();
99
- if (key == null) return null;
100
- // If the starting key is a cell, search from its parent row.
101
- let startItem = collection.getItem(key);
102
- var _startItem_parentKey;
103
- if ((startItem === null || startItem === void 0 ? void 0 : startItem.type) === 'cell') key = (_startItem_parentKey = startItem.parentKey) !== null && _startItem_parentKey !== void 0 ? _startItem_parentKey : null;
104
- let hasWrapped = false;
105
- while(key != null){
106
- let item = collection.getItem(key);
107
- if (!item) return null;
108
- if (item.textValue) {
109
- let substring = item.textValue.slice(0, search.length);
110
- if (this.collator.compare(substring, search) === 0) return item.key;
111
- }
112
- // Check each of the row header cells in this row for a match
113
- for (let cell of (0, $eIXPM$getChildNodes)(item, this.collection)){
114
- let column = collection.columns[cell.index];
115
- if (collection.rowHeaderColumnKeys.has(column.key) && cell.textValue) {
116
- let substring = cell.textValue.slice(0, search.length);
117
- if (this.collator.compare(substring, search) === 0) {
118
- // If we started on a cell, end on the matching cell. Otherwise, end on the row.
119
- let fromItem = fromKey != null ? collection.getItem(fromKey) : startItem;
120
- return (fromItem === null || fromItem === void 0 ? void 0 : fromItem.type) === 'cell' ? cell.key : item.key;
121
- }
122
- }
123
- }
124
- key = this.getKeyBelow(key);
125
- // Wrap around when reaching the end of the collection
126
- if (key == null && !hasWrapped) {
127
- key = this.getFirstKey();
128
- hasWrapped = true;
129
- }
130
- }
131
- return null;
132
- }
133
- }
134
-
135
-
136
- export {$0ba3c81c7f1caedd$export$da43f8f5cb04028d as TableKeyboardDelegate};
137
- //# sourceMappingURL=TableKeyboardDelegate.module.js.map