@react-aria/grid 3.14.7 → 3.15.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.
- package/dist/import.mjs +9 -9
- package/dist/main.js +16 -16
- package/dist/main.js.map +1 -1
- package/dist/module.js +9 -9
- package/dist/module.js.map +1 -1
- package/dist/types/src/index.d.ts +16 -0
- package/package.json +15 -23
- package/src/index.ts +16 -16
- package/dist/GridKeyboardDelegate.main.js +0 -318
- package/dist/GridKeyboardDelegate.main.js.map +0 -1
- package/dist/GridKeyboardDelegate.mjs +0 -313
- package/dist/GridKeyboardDelegate.module.js +0 -313
- package/dist/GridKeyboardDelegate.module.js.map +0 -1
- package/dist/ar-AE.main.js +0 -15
- package/dist/ar-AE.main.js.map +0 -1
- package/dist/ar-AE.mjs +0 -17
- package/dist/ar-AE.module.js +0 -17
- package/dist/ar-AE.module.js.map +0 -1
- package/dist/bg-BG.main.js +0 -15
- package/dist/bg-BG.main.js.map +0 -1
- package/dist/bg-BG.mjs +0 -17
- package/dist/bg-BG.module.js +0 -17
- package/dist/bg-BG.module.js.map +0 -1
- package/dist/cs-CZ.main.js +0 -15
- package/dist/cs-CZ.main.js.map +0 -1
- package/dist/cs-CZ.mjs +0 -17
- package/dist/cs-CZ.module.js +0 -17
- package/dist/cs-CZ.module.js.map +0 -1
- package/dist/da-DK.main.js +0 -15
- package/dist/da-DK.main.js.map +0 -1
- package/dist/da-DK.mjs +0 -17
- package/dist/da-DK.module.js +0 -17
- package/dist/da-DK.module.js.map +0 -1
- package/dist/de-DE.main.js +0 -15
- package/dist/de-DE.main.js.map +0 -1
- package/dist/de-DE.mjs +0 -17
- package/dist/de-DE.module.js +0 -17
- package/dist/de-DE.module.js.map +0 -1
- package/dist/el-GR.main.js +0 -15
- package/dist/el-GR.main.js.map +0 -1
- package/dist/el-GR.mjs +0 -17
- package/dist/el-GR.module.js +0 -17
- package/dist/el-GR.module.js.map +0 -1
- package/dist/en-US.main.js +0 -15
- package/dist/en-US.main.js.map +0 -1
- package/dist/en-US.mjs +0 -17
- package/dist/en-US.module.js +0 -17
- package/dist/en-US.module.js.map +0 -1
- package/dist/es-ES.main.js +0 -15
- package/dist/es-ES.main.js.map +0 -1
- package/dist/es-ES.mjs +0 -17
- package/dist/es-ES.module.js +0 -17
- package/dist/es-ES.module.js.map +0 -1
- package/dist/et-EE.main.js +0 -15
- package/dist/et-EE.main.js.map +0 -1
- package/dist/et-EE.mjs +0 -17
- package/dist/et-EE.module.js +0 -17
- package/dist/et-EE.module.js.map +0 -1
- package/dist/fi-FI.main.js +0 -15
- package/dist/fi-FI.main.js.map +0 -1
- package/dist/fi-FI.mjs +0 -17
- package/dist/fi-FI.module.js +0 -17
- package/dist/fi-FI.module.js.map +0 -1
- package/dist/fr-FR.main.js +0 -15
- package/dist/fr-FR.main.js.map +0 -1
- package/dist/fr-FR.mjs +0 -17
- package/dist/fr-FR.module.js +0 -17
- package/dist/fr-FR.module.js.map +0 -1
- package/dist/he-IL.main.js +0 -15
- package/dist/he-IL.main.js.map +0 -1
- package/dist/he-IL.mjs +0 -17
- package/dist/he-IL.module.js +0 -17
- package/dist/he-IL.module.js.map +0 -1
- package/dist/hr-HR.main.js +0 -15
- package/dist/hr-HR.main.js.map +0 -1
- package/dist/hr-HR.mjs +0 -17
- package/dist/hr-HR.module.js +0 -17
- package/dist/hr-HR.module.js.map +0 -1
- package/dist/hu-HU.main.js +0 -15
- package/dist/hu-HU.main.js.map +0 -1
- package/dist/hu-HU.mjs +0 -17
- package/dist/hu-HU.module.js +0 -17
- package/dist/hu-HU.module.js.map +0 -1
- package/dist/intlStrings.main.js +0 -108
- package/dist/intlStrings.main.js.map +0 -1
- package/dist/intlStrings.mjs +0 -110
- package/dist/intlStrings.module.js +0 -110
- package/dist/intlStrings.module.js.map +0 -1
- package/dist/it-IT.main.js +0 -15
- package/dist/it-IT.main.js.map +0 -1
- package/dist/it-IT.mjs +0 -17
- package/dist/it-IT.module.js +0 -17
- package/dist/it-IT.module.js.map +0 -1
- package/dist/ja-JP.main.js +0 -15
- package/dist/ja-JP.main.js.map +0 -1
- package/dist/ja-JP.mjs +0 -17
- package/dist/ja-JP.module.js +0 -17
- package/dist/ja-JP.module.js.map +0 -1
- package/dist/ko-KR.main.js +0 -15
- package/dist/ko-KR.main.js.map +0 -1
- package/dist/ko-KR.mjs +0 -17
- package/dist/ko-KR.module.js +0 -17
- package/dist/ko-KR.module.js.map +0 -1
- package/dist/lt-LT.main.js +0 -15
- package/dist/lt-LT.main.js.map +0 -1
- package/dist/lt-LT.mjs +0 -17
- package/dist/lt-LT.module.js +0 -17
- package/dist/lt-LT.module.js.map +0 -1
- package/dist/lv-LV.main.js +0 -15
- package/dist/lv-LV.main.js.map +0 -1
- package/dist/lv-LV.mjs +0 -17
- package/dist/lv-LV.module.js +0 -17
- package/dist/lv-LV.module.js.map +0 -1
- package/dist/nb-NO.main.js +0 -15
- package/dist/nb-NO.main.js.map +0 -1
- package/dist/nb-NO.mjs +0 -17
- package/dist/nb-NO.module.js +0 -17
- package/dist/nb-NO.module.js.map +0 -1
- package/dist/nl-NL.main.js +0 -15
- package/dist/nl-NL.main.js.map +0 -1
- package/dist/nl-NL.mjs +0 -17
- package/dist/nl-NL.module.js +0 -17
- package/dist/nl-NL.module.js.map +0 -1
- package/dist/pl-PL.main.js +0 -15
- package/dist/pl-PL.main.js.map +0 -1
- package/dist/pl-PL.mjs +0 -17
- package/dist/pl-PL.module.js +0 -17
- package/dist/pl-PL.module.js.map +0 -1
- package/dist/pt-BR.main.js +0 -15
- package/dist/pt-BR.main.js.map +0 -1
- package/dist/pt-BR.mjs +0 -17
- package/dist/pt-BR.module.js +0 -17
- package/dist/pt-BR.module.js.map +0 -1
- package/dist/pt-PT.main.js +0 -15
- package/dist/pt-PT.main.js.map +0 -1
- package/dist/pt-PT.mjs +0 -17
- package/dist/pt-PT.module.js +0 -17
- package/dist/pt-PT.module.js.map +0 -1
- package/dist/ro-RO.main.js +0 -15
- package/dist/ro-RO.main.js.map +0 -1
- package/dist/ro-RO.mjs +0 -17
- package/dist/ro-RO.module.js +0 -17
- package/dist/ro-RO.module.js.map +0 -1
- package/dist/ru-RU.main.js +0 -15
- package/dist/ru-RU.main.js.map +0 -1
- package/dist/ru-RU.mjs +0 -17
- package/dist/ru-RU.module.js +0 -17
- package/dist/ru-RU.module.js.map +0 -1
- package/dist/sk-SK.main.js +0 -15
- package/dist/sk-SK.main.js.map +0 -1
- package/dist/sk-SK.mjs +0 -17
- package/dist/sk-SK.module.js +0 -17
- package/dist/sk-SK.module.js.map +0 -1
- package/dist/sl-SI.main.js +0 -15
- package/dist/sl-SI.main.js.map +0 -1
- package/dist/sl-SI.mjs +0 -17
- package/dist/sl-SI.module.js +0 -17
- package/dist/sl-SI.module.js.map +0 -1
- package/dist/sr-SP.main.js +0 -15
- package/dist/sr-SP.main.js.map +0 -1
- package/dist/sr-SP.mjs +0 -17
- package/dist/sr-SP.module.js +0 -17
- package/dist/sr-SP.module.js.map +0 -1
- package/dist/sv-SE.main.js +0 -15
- package/dist/sv-SE.main.js.map +0 -1
- package/dist/sv-SE.mjs +0 -17
- package/dist/sv-SE.module.js +0 -17
- package/dist/sv-SE.module.js.map +0 -1
- package/dist/tr-TR.main.js +0 -15
- package/dist/tr-TR.main.js.map +0 -1
- package/dist/tr-TR.mjs +0 -17
- package/dist/tr-TR.module.js +0 -17
- package/dist/tr-TR.module.js.map +0 -1
- package/dist/types.d.ts +0 -213
- package/dist/types.d.ts.map +0 -1
- package/dist/uk-UA.main.js +0 -15
- package/dist/uk-UA.main.js.map +0 -1
- package/dist/uk-UA.mjs +0 -17
- package/dist/uk-UA.module.js +0 -17
- package/dist/uk-UA.module.js.map +0 -1
- package/dist/useGrid.main.js +0 -135
- package/dist/useGrid.main.js.map +0 -1
- package/dist/useGrid.mjs +0 -130
- package/dist/useGrid.module.js +0 -130
- package/dist/useGrid.module.js.map +0 -1
- package/dist/useGridCell.main.js +0 -230
- package/dist/useGridCell.main.js.map +0 -1
- package/dist/useGridCell.mjs +0 -225
- package/dist/useGridCell.module.js +0 -225
- package/dist/useGridCell.module.js.map +0 -1
- package/dist/useGridRow.main.js +0 -56
- package/dist/useGridRow.main.js.map +0 -1
- package/dist/useGridRow.mjs +0 -51
- package/dist/useGridRow.module.js +0 -51
- package/dist/useGridRow.module.js.map +0 -1
- package/dist/useGridRowGroup.main.js +0 -26
- package/dist/useGridRowGroup.main.js.map +0 -1
- package/dist/useGridRowGroup.mjs +0 -21
- package/dist/useGridRowGroup.module.js +0 -21
- package/dist/useGridRowGroup.module.js.map +0 -1
- package/dist/useGridSelectionAnnouncement.main.js +0 -118
- package/dist/useGridSelectionAnnouncement.main.js.map +0 -1
- package/dist/useGridSelectionAnnouncement.mjs +0 -113
- package/dist/useGridSelectionAnnouncement.module.js +0 -113
- package/dist/useGridSelectionAnnouncement.module.js.map +0 -1
- package/dist/useGridSelectionCheckbox.main.js +0 -39
- package/dist/useGridSelectionCheckbox.main.js.map +0 -1
- package/dist/useGridSelectionCheckbox.mjs +0 -34
- package/dist/useGridSelectionCheckbox.module.js +0 -34
- package/dist/useGridSelectionCheckbox.module.js.map +0 -1
- package/dist/useHighlightSelectionDescription.main.js +0 -55
- package/dist/useHighlightSelectionDescription.main.js.map +0 -1
- package/dist/useHighlightSelectionDescription.mjs +0 -50
- package/dist/useHighlightSelectionDescription.module.js +0 -50
- package/dist/useHighlightSelectionDescription.module.js.map +0 -1
- package/dist/utils.main.js +0 -20
- package/dist/utils.main.js.map +0 -1
- package/dist/utils.mjs +0 -15
- package/dist/utils.module.js +0 -15
- package/dist/utils.module.js.map +0 -1
- package/dist/zh-CN.main.js +0 -15
- package/dist/zh-CN.main.js.map +0 -1
- package/dist/zh-CN.mjs +0 -17
- package/dist/zh-CN.module.js +0 -17
- package/dist/zh-CN.module.js.map +0 -1
- package/dist/zh-TW.main.js +0 -15
- package/dist/zh-TW.main.js.map +0 -1
- package/dist/zh-TW.mjs +0 -17
- package/dist/zh-TW.module.js +0 -17
- package/dist/zh-TW.module.js.map +0 -1
- package/src/GridKeyboardDelegate.ts +0 -484
- package/src/useGrid.ts +0 -186
- package/src/useGridCell.ts +0 -299
- package/src/useGridRow.ts +0 -84
- package/src/useGridRowGroup.ts +0 -29
- package/src/useGridSelectionAnnouncement.ts +0 -140
- package/src/useGridSelectionCheckbox.ts +0 -48
- package/src/useHighlightSelectionDescription.ts +0 -52
- package/src/utils.ts +0 -29
package/dist/import.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {GridKeyboardDelegate as $
|
|
2
|
-
import {useGrid as $
|
|
3
|
-
import {useGridRowGroup as $
|
|
4
|
-
import {useGridRow as $
|
|
5
|
-
import {useGridCell as $
|
|
6
|
-
import {useGridSelectionCheckbox as $
|
|
7
|
-
import {useHighlightSelectionDescription as $
|
|
8
|
-
import {useGridSelectionAnnouncement as $
|
|
1
|
+
import {GridKeyboardDelegate as $737e6046a902a4a4$re_export$GridKeyboardDelegate} from "react-aria/private/grid/GridKeyboardDelegate";
|
|
2
|
+
import {useGrid as $737e6046a902a4a4$re_export$useGrid} from "react-aria/private/grid/useGrid";
|
|
3
|
+
import {useGridRowGroup as $737e6046a902a4a4$re_export$useGridRowGroup} from "react-aria/private/grid/useGridRowGroup";
|
|
4
|
+
import {useGridRow as $737e6046a902a4a4$re_export$useGridRow} from "react-aria/private/grid/useGridRow";
|
|
5
|
+
import {useGridCell as $737e6046a902a4a4$re_export$useGridCell} from "react-aria/private/grid/useGridCell";
|
|
6
|
+
import {useGridSelectionCheckbox as $737e6046a902a4a4$re_export$useGridSelectionCheckbox} from "react-aria/private/grid/useGridSelectionCheckbox";
|
|
7
|
+
import {useHighlightSelectionDescription as $737e6046a902a4a4$re_export$useHighlightSelectionDescription} from "react-aria/private/grid/useHighlightSelectionDescription";
|
|
8
|
+
import {useGridSelectionAnnouncement as $737e6046a902a4a4$re_export$useGridSelectionAnnouncement} from "react-aria/private/grid/useGridSelectionAnnouncement";
|
|
9
9
|
|
|
10
10
|
/*
|
|
11
11
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -27,5 +27,5 @@ import {useGridSelectionAnnouncement as $92599c3fd427b763$export$137e594ef3218a1
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
export {$
|
|
30
|
+
export {$737e6046a902a4a4$re_export$GridKeyboardDelegate as GridKeyboardDelegate, $737e6046a902a4a4$re_export$useGrid as useGrid, $737e6046a902a4a4$re_export$useGridRowGroup as useGridRowGroup, $737e6046a902a4a4$re_export$useGridRow as useGridRow, $737e6046a902a4a4$re_export$useGridCell as useGridCell, $737e6046a902a4a4$re_export$useGridSelectionCheckbox as useGridSelectionCheckbox, $737e6046a902a4a4$re_export$useHighlightSelectionDescription as useHighlightSelectionDescription, $737e6046a902a4a4$re_export$useGridSelectionAnnouncement as useGridSelectionAnnouncement};
|
|
31
31
|
//# sourceMappingURL=module.js.map
|
package/dist/main.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $
|
|
3
|
-
var $
|
|
4
|
-
var $
|
|
5
|
-
var $
|
|
6
|
-
var $
|
|
7
|
-
var $
|
|
8
|
-
var $
|
|
1
|
+
var $5DPg5$reactariaprivategridGridKeyboardDelegate = require("react-aria/private/grid/GridKeyboardDelegate");
|
|
2
|
+
var $5DPg5$reactariaprivategriduseGrid = require("react-aria/private/grid/useGrid");
|
|
3
|
+
var $5DPg5$reactariaprivategriduseGridRowGroup = require("react-aria/private/grid/useGridRowGroup");
|
|
4
|
+
var $5DPg5$reactariaprivategriduseGridRow = require("react-aria/private/grid/useGridRow");
|
|
5
|
+
var $5DPg5$reactariaprivategriduseGridCell = require("react-aria/private/grid/useGridCell");
|
|
6
|
+
var $5DPg5$reactariaprivategriduseGridSelectionCheckbox = require("react-aria/private/grid/useGridSelectionCheckbox");
|
|
7
|
+
var $5DPg5$reactariaprivategriduseHighlightSelectionDescription = require("react-aria/private/grid/useHighlightSelectionDescription");
|
|
8
|
+
var $5DPg5$reactariaprivategriduseGridSelectionAnnouncement = require("react-aria/private/grid/useGridSelectionAnnouncement");
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
function $parcel$export(e, n, v, s) {
|
|
12
12
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
$parcel$export(module.exports, "GridKeyboardDelegate", ()
|
|
16
|
-
$parcel$export(module.exports, "useGrid", ()
|
|
17
|
-
$parcel$export(module.exports, "useGridRowGroup", ()
|
|
18
|
-
$parcel$export(module.exports, "useGridRow", ()
|
|
19
|
-
$parcel$export(module.exports, "useGridCell", ()
|
|
20
|
-
$parcel$export(module.exports, "useGridSelectionCheckbox", ()
|
|
21
|
-
$parcel$export(module.exports, "useHighlightSelectionDescription", ()
|
|
22
|
-
$parcel$export(module.exports, "useGridSelectionAnnouncement", ()
|
|
15
|
+
$parcel$export(module.exports, "GridKeyboardDelegate", function () { return $5DPg5$reactariaprivategridGridKeyboardDelegate.GridKeyboardDelegate; });
|
|
16
|
+
$parcel$export(module.exports, "useGrid", function () { return $5DPg5$reactariaprivategriduseGrid.useGrid; });
|
|
17
|
+
$parcel$export(module.exports, "useGridRowGroup", function () { return $5DPg5$reactariaprivategriduseGridRowGroup.useGridRowGroup; });
|
|
18
|
+
$parcel$export(module.exports, "useGridRow", function () { return $5DPg5$reactariaprivategriduseGridRow.useGridRow; });
|
|
19
|
+
$parcel$export(module.exports, "useGridCell", function () { return $5DPg5$reactariaprivategriduseGridCell.useGridCell; });
|
|
20
|
+
$parcel$export(module.exports, "useGridSelectionCheckbox", function () { return $5DPg5$reactariaprivategriduseGridSelectionCheckbox.useGridSelectionCheckbox; });
|
|
21
|
+
$parcel$export(module.exports, "useHighlightSelectionDescription", function () { return $5DPg5$reactariaprivategriduseHighlightSelectionDescription.useHighlightSelectionDescription; });
|
|
22
|
+
$parcel$export(module.exports, "useGridSelectionAnnouncement", function () { return $5DPg5$reactariaprivategriduseGridSelectionAnnouncement.useGridSelectionAnnouncement; });
|
|
23
23
|
/*
|
|
24
24
|
* Copyright 2020 Adobe. All rights reserved.
|
|
25
25
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/grid/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 {GridKeyboardDelegate} from '
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/grid/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 {GridKeyboardDelegate} from 'react-aria/private/grid/GridKeyboardDelegate';\n\nexport {useGrid} from 'react-aria/private/grid/useGrid';\nexport {useGridRowGroup} from 'react-aria/private/grid/useGridRowGroup';\nexport {useGridRow} from 'react-aria/private/grid/useGridRow';\nexport {useGridCell} from 'react-aria/private/grid/useGridCell';\nexport {useGridSelectionCheckbox} from 'react-aria/private/grid/useGridSelectionCheckbox';\nexport {useHighlightSelectionDescription} from 'react-aria/private/grid/useHighlightSelectionDescription';\nexport {useGridSelectionAnnouncement} from 'react-aria/private/grid/useGridSelectionAnnouncement';\nexport type {GridProps, GridAria} from 'react-aria/private/grid/useGrid';\nexport type {GridCellAria, GridCellProps} from 'react-aria/private/grid/useGridCell';\nexport type {GridRowGroupAria} from 'react-aria/private/grid/useGridRowGroup';\nexport type {GridRowProps, GridRowAria} from 'react-aria/private/grid/useGridRow';\nexport type {GridKeyboardDelegateOptions} from 'react-aria/private/grid/GridKeyboardDelegate';\nexport type {AriaGridSelectionCheckboxProps, GridSelectionCheckboxAria} from 'react-aria/private/grid/useGridSelectionCheckbox';\nexport type {HighlightSelectionDescriptionProps} from 'react-aria/private/grid/useHighlightSelectionDescription';\nexport type {GridSelectionAnnouncementProps} from 'react-aria/private/grid/useGridSelectionAnnouncement';\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {GridKeyboardDelegate as $
|
|
2
|
-
import {useGrid as $
|
|
3
|
-
import {useGridRowGroup as $
|
|
4
|
-
import {useGridRow as $
|
|
5
|
-
import {useGridCell as $
|
|
6
|
-
import {useGridSelectionCheckbox as $
|
|
7
|
-
import {useHighlightSelectionDescription as $
|
|
8
|
-
import {useGridSelectionAnnouncement as $
|
|
1
|
+
import {GridKeyboardDelegate as $737e6046a902a4a4$re_export$GridKeyboardDelegate} from "react-aria/private/grid/GridKeyboardDelegate";
|
|
2
|
+
import {useGrid as $737e6046a902a4a4$re_export$useGrid} from "react-aria/private/grid/useGrid";
|
|
3
|
+
import {useGridRowGroup as $737e6046a902a4a4$re_export$useGridRowGroup} from "react-aria/private/grid/useGridRowGroup";
|
|
4
|
+
import {useGridRow as $737e6046a902a4a4$re_export$useGridRow} from "react-aria/private/grid/useGridRow";
|
|
5
|
+
import {useGridCell as $737e6046a902a4a4$re_export$useGridCell} from "react-aria/private/grid/useGridCell";
|
|
6
|
+
import {useGridSelectionCheckbox as $737e6046a902a4a4$re_export$useGridSelectionCheckbox} from "react-aria/private/grid/useGridSelectionCheckbox";
|
|
7
|
+
import {useHighlightSelectionDescription as $737e6046a902a4a4$re_export$useHighlightSelectionDescription} from "react-aria/private/grid/useHighlightSelectionDescription";
|
|
8
|
+
import {useGridSelectionAnnouncement as $737e6046a902a4a4$re_export$useGridSelectionAnnouncement} from "react-aria/private/grid/useGridSelectionAnnouncement";
|
|
9
9
|
|
|
10
10
|
/*
|
|
11
11
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -27,5 +27,5 @@ import {useGridSelectionAnnouncement as $92599c3fd427b763$export$137e594ef3218a1
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
export {$
|
|
30
|
+
export {$737e6046a902a4a4$re_export$GridKeyboardDelegate as GridKeyboardDelegate, $737e6046a902a4a4$re_export$useGrid as useGrid, $737e6046a902a4a4$re_export$useGridRowGroup as useGridRowGroup, $737e6046a902a4a4$re_export$useGridRow as useGridRow, $737e6046a902a4a4$re_export$useGridCell as useGridCell, $737e6046a902a4a4$re_export$useGridSelectionCheckbox as useGridSelectionCheckbox, $737e6046a902a4a4$re_export$useHighlightSelectionDescription as useHighlightSelectionDescription, $737e6046a902a4a4$re_export$useGridSelectionAnnouncement as useGridSelectionAnnouncement};
|
|
31
31
|
//# sourceMappingURL=module.js.map
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/grid/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 {GridKeyboardDelegate} from '
|
|
1
|
+
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/grid/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 {GridKeyboardDelegate} from 'react-aria/private/grid/GridKeyboardDelegate';\n\nexport {useGrid} from 'react-aria/private/grid/useGrid';\nexport {useGridRowGroup} from 'react-aria/private/grid/useGridRowGroup';\nexport {useGridRow} from 'react-aria/private/grid/useGridRow';\nexport {useGridCell} from 'react-aria/private/grid/useGridCell';\nexport {useGridSelectionCheckbox} from 'react-aria/private/grid/useGridSelectionCheckbox';\nexport {useHighlightSelectionDescription} from 'react-aria/private/grid/useHighlightSelectionDescription';\nexport {useGridSelectionAnnouncement} from 'react-aria/private/grid/useGridSelectionAnnouncement';\nexport type {GridProps, GridAria} from 'react-aria/private/grid/useGrid';\nexport type {GridCellAria, GridCellProps} from 'react-aria/private/grid/useGridCell';\nexport type {GridRowGroupAria} from 'react-aria/private/grid/useGridRowGroup';\nexport type {GridRowProps, GridRowAria} from 'react-aria/private/grid/useGridRow';\nexport type {GridKeyboardDelegateOptions} from 'react-aria/private/grid/GridKeyboardDelegate';\nexport type {AriaGridSelectionCheckboxProps, GridSelectionCheckboxAria} from 'react-aria/private/grid/useGridSelectionCheckbox';\nexport type {HighlightSelectionDescriptionProps} from 'react-aria/private/grid/useHighlightSelectionDescription';\nexport type {GridSelectionAnnouncementProps} from 'react-aria/private/grid/useGridSelectionAnnouncement';\n"],"names":[],"version":3,"file":"module.js.map"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { GridKeyboardDelegate } from 'react-aria/private/grid/GridKeyboardDelegate';
|
|
2
|
+
export { useGrid } from 'react-aria/private/grid/useGrid';
|
|
3
|
+
export { useGridRowGroup } from 'react-aria/private/grid/useGridRowGroup';
|
|
4
|
+
export { useGridRow } from 'react-aria/private/grid/useGridRow';
|
|
5
|
+
export { useGridCell } from 'react-aria/private/grid/useGridCell';
|
|
6
|
+
export { useGridSelectionCheckbox } from 'react-aria/private/grid/useGridSelectionCheckbox';
|
|
7
|
+
export { useHighlightSelectionDescription } from 'react-aria/private/grid/useHighlightSelectionDescription';
|
|
8
|
+
export { useGridSelectionAnnouncement } from 'react-aria/private/grid/useGridSelectionAnnouncement';
|
|
9
|
+
export type { GridProps, GridAria } from 'react-aria/private/grid/useGrid';
|
|
10
|
+
export type { GridCellAria, GridCellProps } from 'react-aria/private/grid/useGridCell';
|
|
11
|
+
export type { GridRowGroupAria } from 'react-aria/private/grid/useGridRowGroup';
|
|
12
|
+
export type { GridRowProps, GridRowAria } from 'react-aria/private/grid/useGridRow';
|
|
13
|
+
export type { GridKeyboardDelegateOptions } from 'react-aria/private/grid/GridKeyboardDelegate';
|
|
14
|
+
export type { AriaGridSelectionCheckboxProps, GridSelectionCheckboxAria } from 'react-aria/private/grid/useGridSelectionCheckbox';
|
|
15
|
+
export type { HighlightSelectionDescriptionProps } from 'react-aria/private/grid/useHighlightSelectionDescription';
|
|
16
|
+
export type { GridSelectionAnnouncementProps } from 'react-aria/private/grid/useGridSelectionAnnouncement';
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-aria/grid",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.15.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
|
-
"
|
|
10
|
-
|
|
11
|
-
"./dist/types.d.ts",
|
|
12
|
-
"./
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
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,19 +26,8 @@
|
|
|
26
26
|
"url": "https://github.com/adobe/react-spectrum"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@
|
|
30
|
-
"
|
|
31
|
-
"@react-aria/interactions": "^3.27.0",
|
|
32
|
-
"@react-aria/live-announcer": "^3.4.4",
|
|
33
|
-
"@react-aria/selection": "^3.27.1",
|
|
34
|
-
"@react-aria/utils": "^3.33.0",
|
|
35
|
-
"@react-stately/collections": "^3.12.9",
|
|
36
|
-
"@react-stately/grid": "^3.11.8",
|
|
37
|
-
"@react-stately/selection": "^3.20.8",
|
|
38
|
-
"@react-types/checkbox": "^3.10.3",
|
|
39
|
-
"@react-types/grid": "^3.3.7",
|
|
40
|
-
"@react-types/shared": "^3.33.0",
|
|
41
|
-
"@swc/helpers": "^0.5.0"
|
|
29
|
+
"@swc/helpers": "^0.5.0",
|
|
30
|
+
"react-aria": "3.48.0"
|
|
42
31
|
},
|
|
43
32
|
"peerDependencies": {
|
|
44
33
|
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
|
|
@@ -47,5 +36,8 @@
|
|
|
47
36
|
"publishConfig": {
|
|
48
37
|
"access": "public"
|
|
49
38
|
},
|
|
50
|
-
"
|
|
39
|
+
"targets": {
|
|
40
|
+
"types": false
|
|
41
|
+
},
|
|
42
|
+
"gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
|
|
51
43
|
}
|
package/src/index.ts
CHANGED
|
@@ -10,20 +10,20 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
export {GridKeyboardDelegate} from '
|
|
14
|
-
export {useGrid} from './useGrid';
|
|
15
|
-
export {useGridRowGroup} from './useGridRowGroup';
|
|
16
|
-
export {useGridRow} from './useGridRow';
|
|
17
|
-
export {useGridCell} from './useGridCell';
|
|
18
|
-
export {useGridSelectionCheckbox} from './useGridSelectionCheckbox';
|
|
19
|
-
export {useHighlightSelectionDescription} from './useHighlightSelectionDescription';
|
|
20
|
-
export {useGridSelectionAnnouncement} from './useGridSelectionAnnouncement';
|
|
13
|
+
export {GridKeyboardDelegate} from 'react-aria/private/grid/GridKeyboardDelegate';
|
|
21
14
|
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
29
|
-
export type {
|
|
15
|
+
export {useGrid} from 'react-aria/private/grid/useGrid';
|
|
16
|
+
export {useGridRowGroup} from 'react-aria/private/grid/useGridRowGroup';
|
|
17
|
+
export {useGridRow} from 'react-aria/private/grid/useGridRow';
|
|
18
|
+
export {useGridCell} from 'react-aria/private/grid/useGridCell';
|
|
19
|
+
export {useGridSelectionCheckbox} from 'react-aria/private/grid/useGridSelectionCheckbox';
|
|
20
|
+
export {useHighlightSelectionDescription} from 'react-aria/private/grid/useHighlightSelectionDescription';
|
|
21
|
+
export {useGridSelectionAnnouncement} from 'react-aria/private/grid/useGridSelectionAnnouncement';
|
|
22
|
+
export type {GridProps, GridAria} from 'react-aria/private/grid/useGrid';
|
|
23
|
+
export type {GridCellAria, GridCellProps} from 'react-aria/private/grid/useGridCell';
|
|
24
|
+
export type {GridRowGroupAria} from 'react-aria/private/grid/useGridRowGroup';
|
|
25
|
+
export type {GridRowProps, GridRowAria} from 'react-aria/private/grid/useGridRow';
|
|
26
|
+
export type {GridKeyboardDelegateOptions} from 'react-aria/private/grid/GridKeyboardDelegate';
|
|
27
|
+
export type {AriaGridSelectionCheckboxProps, GridSelectionCheckboxAria} from 'react-aria/private/grid/useGridSelectionCheckbox';
|
|
28
|
+
export type {HighlightSelectionDescriptionProps} from 'react-aria/private/grid/useHighlightSelectionDescription';
|
|
29
|
+
export type {GridSelectionAnnouncementProps} from 'react-aria/private/grid/useGridSelectionAnnouncement';
|
|
@@ -1,318 +0,0 @@
|
|
|
1
|
-
var $iKGCm$reactariaselection = require("@react-aria/selection");
|
|
2
|
-
var $iKGCm$reactstatelycollections = require("@react-stately/collections");
|
|
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, "GridKeyboardDelegate", () => $3187c0e19200cb16$export$de9feff04fda126e);
|
|
10
|
-
/*
|
|
11
|
-
* Copyright 2020 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 $3187c0e19200cb16$export$de9feff04fda126e {
|
|
23
|
-
isCell(node) {
|
|
24
|
-
return node.type === 'cell';
|
|
25
|
-
}
|
|
26
|
-
isRow(node) {
|
|
27
|
-
return node.type === 'row' || node.type === 'item';
|
|
28
|
-
}
|
|
29
|
-
isDisabled(item) {
|
|
30
|
-
var _item_props;
|
|
31
|
-
return this.disabledBehavior === 'all' && (((_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.isDisabled) || this.disabledKeys.has(item.key));
|
|
32
|
-
}
|
|
33
|
-
findPreviousKey(fromKey, pred) {
|
|
34
|
-
let key = fromKey != null ? this.collection.getKeyBefore(fromKey) : this.collection.getLastKey();
|
|
35
|
-
while(key != null){
|
|
36
|
-
let item = this.collection.getItem(key);
|
|
37
|
-
if (!item) return null;
|
|
38
|
-
if (!this.isDisabled(item) && (!pred || pred(item))) return key;
|
|
39
|
-
key = this.collection.getKeyBefore(key);
|
|
40
|
-
}
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
findNextKey(fromKey, pred) {
|
|
44
|
-
let key = fromKey != null ? this.collection.getKeyAfter(fromKey) : this.collection.getFirstKey();
|
|
45
|
-
while(key != null){
|
|
46
|
-
let item = this.collection.getItem(key);
|
|
47
|
-
if (!item) return null;
|
|
48
|
-
if (!this.isDisabled(item) && (!pred || pred(item))) return key;
|
|
49
|
-
key = this.collection.getKeyAfter(key);
|
|
50
|
-
if (key == null) return null;
|
|
51
|
-
}
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
getKeyForItemInRowByIndex(key, index = 0) {
|
|
55
|
-
if (index < 0) return null;
|
|
56
|
-
let item = this.collection.getItem(key);
|
|
57
|
-
if (!item) return null;
|
|
58
|
-
let i = 0;
|
|
59
|
-
for (let child of (0, $iKGCm$reactstatelycollections.getChildNodes)(item, this.collection)){
|
|
60
|
-
var _child_key;
|
|
61
|
-
if (child.colSpan && child.colSpan + i > index) return (_child_key = child.key) !== null && _child_key !== void 0 ? _child_key : null;
|
|
62
|
-
if (child.colSpan) i = i + child.colSpan - 1;
|
|
63
|
-
var _child_key1;
|
|
64
|
-
if (i === index) return (_child_key1 = child.key) !== null && _child_key1 !== void 0 ? _child_key1 : null;
|
|
65
|
-
i++;
|
|
66
|
-
}
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
getKeyBelow(fromKey) {
|
|
70
|
-
let key = fromKey;
|
|
71
|
-
let startItem = this.collection.getItem(key);
|
|
72
|
-
if (!startItem) return null;
|
|
73
|
-
var _startItem_parentKey;
|
|
74
|
-
// If focus was on a cell, start searching from the parent row
|
|
75
|
-
if (this.isCell(startItem)) key = (_startItem_parentKey = startItem.parentKey) !== null && _startItem_parentKey !== void 0 ? _startItem_parentKey : null;
|
|
76
|
-
if (key == null) return null;
|
|
77
|
-
// Find the next item
|
|
78
|
-
key = this.findNextKey(key, (item)=>item.type === 'item');
|
|
79
|
-
if (key != null) {
|
|
80
|
-
// If focus was on a cell, focus the cell with the same index in the next row.
|
|
81
|
-
if (this.isCell(startItem)) {
|
|
82
|
-
let startIndex = startItem.colIndex ? startItem.colIndex : startItem.index;
|
|
83
|
-
return this.getKeyForItemInRowByIndex(key, startIndex);
|
|
84
|
-
}
|
|
85
|
-
// Otherwise, focus the next row
|
|
86
|
-
if (this.focusMode === 'row') return key;
|
|
87
|
-
}
|
|
88
|
-
return null;
|
|
89
|
-
}
|
|
90
|
-
getKeyAbove(fromKey) {
|
|
91
|
-
let key = fromKey;
|
|
92
|
-
let startItem = this.collection.getItem(key);
|
|
93
|
-
if (!startItem) return null;
|
|
94
|
-
var _startItem_parentKey;
|
|
95
|
-
// If focus is on a cell, start searching from the parent row
|
|
96
|
-
if (this.isCell(startItem)) key = (_startItem_parentKey = startItem.parentKey) !== null && _startItem_parentKey !== void 0 ? _startItem_parentKey : null;
|
|
97
|
-
if (key == null) return null;
|
|
98
|
-
// Find the previous item
|
|
99
|
-
key = this.findPreviousKey(key, (item)=>item.type === 'item');
|
|
100
|
-
if (key != null) {
|
|
101
|
-
// If focus was on a cell, focus the cell with the same index in the previous row.
|
|
102
|
-
if (this.isCell(startItem)) {
|
|
103
|
-
let startIndex = startItem.colIndex ? startItem.colIndex : startItem.index;
|
|
104
|
-
return this.getKeyForItemInRowByIndex(key, startIndex);
|
|
105
|
-
}
|
|
106
|
-
// Otherwise, focus the previous row
|
|
107
|
-
if (this.focusMode === 'row') return key;
|
|
108
|
-
}
|
|
109
|
-
return null;
|
|
110
|
-
}
|
|
111
|
-
getKeyRightOf(key) {
|
|
112
|
-
let item = this.collection.getItem(key);
|
|
113
|
-
if (!item) return null;
|
|
114
|
-
// If focus is on a row, focus the first child cell.
|
|
115
|
-
if (this.isRow(item)) {
|
|
116
|
-
var _getLastItem, _getFirstItem;
|
|
117
|
-
let children = (0, $iKGCm$reactstatelycollections.getChildNodes)(item, this.collection);
|
|
118
|
-
var _ref;
|
|
119
|
-
return (_ref = this.direction === 'rtl' ? (_getLastItem = (0, $iKGCm$reactstatelycollections.getLastItem)(children)) === null || _getLastItem === void 0 ? void 0 : _getLastItem.key : (_getFirstItem = (0, $iKGCm$reactstatelycollections.getFirstItem)(children)) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key) !== null && _ref !== void 0 ? _ref : null;
|
|
120
|
-
}
|
|
121
|
-
// If focus is on a cell, focus the next cell if any,
|
|
122
|
-
// otherwise focus the parent row.
|
|
123
|
-
if (this.isCell(item) && item.parentKey != null) {
|
|
124
|
-
let parent = this.collection.getItem(item.parentKey);
|
|
125
|
-
if (!parent) return null;
|
|
126
|
-
let children = (0, $iKGCm$reactstatelycollections.getChildNodes)(parent, this.collection);
|
|
127
|
-
var _ref1;
|
|
128
|
-
let next = (_ref1 = this.direction === 'rtl' ? (0, $iKGCm$reactstatelycollections.getNthItem)(children, item.index - 1) : (0, $iKGCm$reactstatelycollections.getNthItem)(children, item.index + 1)) !== null && _ref1 !== void 0 ? _ref1 : null;
|
|
129
|
-
var _next_key;
|
|
130
|
-
if (next) return (_next_key = next.key) !== null && _next_key !== void 0 ? _next_key : null;
|
|
131
|
-
var _item_parentKey;
|
|
132
|
-
// focus row only if focusMode is set to row
|
|
133
|
-
if (this.focusMode === 'row') return (_item_parentKey = item.parentKey) !== null && _item_parentKey !== void 0 ? _item_parentKey : null;
|
|
134
|
-
var _ref2;
|
|
135
|
-
return (_ref2 = this.direction === 'rtl' ? this.getFirstKey(key) : this.getLastKey(key)) !== null && _ref2 !== void 0 ? _ref2 : null;
|
|
136
|
-
}
|
|
137
|
-
return null;
|
|
138
|
-
}
|
|
139
|
-
getKeyLeftOf(key) {
|
|
140
|
-
let item = this.collection.getItem(key);
|
|
141
|
-
if (!item) return null;
|
|
142
|
-
// If focus is on a row, focus the last child cell.
|
|
143
|
-
if (this.isRow(item)) {
|
|
144
|
-
var _getFirstItem, _getLastItem;
|
|
145
|
-
let children = (0, $iKGCm$reactstatelycollections.getChildNodes)(item, this.collection);
|
|
146
|
-
var _ref;
|
|
147
|
-
return (_ref = this.direction === 'rtl' ? (_getFirstItem = (0, $iKGCm$reactstatelycollections.getFirstItem)(children)) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key : (_getLastItem = (0, $iKGCm$reactstatelycollections.getLastItem)(children)) === null || _getLastItem === void 0 ? void 0 : _getLastItem.key) !== null && _ref !== void 0 ? _ref : null;
|
|
148
|
-
}
|
|
149
|
-
// If focus is on a cell, focus the previous cell if any,
|
|
150
|
-
// otherwise focus the parent row.
|
|
151
|
-
if (this.isCell(item) && item.parentKey != null) {
|
|
152
|
-
let parent = this.collection.getItem(item.parentKey);
|
|
153
|
-
if (!parent) return null;
|
|
154
|
-
let children = (0, $iKGCm$reactstatelycollections.getChildNodes)(parent, this.collection);
|
|
155
|
-
var _ref1;
|
|
156
|
-
let prev = (_ref1 = this.direction === 'rtl' ? (0, $iKGCm$reactstatelycollections.getNthItem)(children, item.index + 1) : (0, $iKGCm$reactstatelycollections.getNthItem)(children, item.index - 1)) !== null && _ref1 !== void 0 ? _ref1 : null;
|
|
157
|
-
var _prev_key;
|
|
158
|
-
if (prev) return (_prev_key = prev.key) !== null && _prev_key !== void 0 ? _prev_key : null;
|
|
159
|
-
var _item_parentKey;
|
|
160
|
-
// focus row only if focusMode is set to row
|
|
161
|
-
if (this.focusMode === 'row') return (_item_parentKey = item.parentKey) !== null && _item_parentKey !== void 0 ? _item_parentKey : null;
|
|
162
|
-
var _ref2;
|
|
163
|
-
return (_ref2 = this.direction === 'rtl' ? this.getLastKey(key) : this.getFirstKey(key)) !== null && _ref2 !== void 0 ? _ref2 : null;
|
|
164
|
-
}
|
|
165
|
-
return null;
|
|
166
|
-
}
|
|
167
|
-
getFirstKey(fromKey, global) {
|
|
168
|
-
let key = fromKey !== null && fromKey !== void 0 ? fromKey : null;
|
|
169
|
-
let item;
|
|
170
|
-
if (key != null) {
|
|
171
|
-
item = this.collection.getItem(key);
|
|
172
|
-
if (!item) return null;
|
|
173
|
-
// If global flag is not set, and a cell is currently focused,
|
|
174
|
-
// move focus to the first cell in the parent row.
|
|
175
|
-
if (this.isCell(item) && !global && item.parentKey != null) {
|
|
176
|
-
var _getFirstItem;
|
|
177
|
-
let parent = this.collection.getItem(item.parentKey);
|
|
178
|
-
if (!parent) return null;
|
|
179
|
-
var _getFirstItem_key;
|
|
180
|
-
return (_getFirstItem_key = (_getFirstItem = (0, $iKGCm$reactstatelycollections.getFirstItem)((0, $iKGCm$reactstatelycollections.getChildNodes)(parent, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key) !== null && _getFirstItem_key !== void 0 ? _getFirstItem_key : null;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
// Find the first row
|
|
184
|
-
key = this.findNextKey(undefined, (item)=>item.type === 'item');
|
|
185
|
-
// If global flag is set (or if focus mode is cell), focus the first cell in the first row.
|
|
186
|
-
if (key != null && (item && this.isCell(item) && global || this.focusMode === 'cell')) {
|
|
187
|
-
var _getFirstItem1;
|
|
188
|
-
let item = this.collection.getItem(key);
|
|
189
|
-
if (!item) return null;
|
|
190
|
-
var _getFirstItem_key1;
|
|
191
|
-
key = (_getFirstItem_key1 = (_getFirstItem1 = (0, $iKGCm$reactstatelycollections.getFirstItem)((0, $iKGCm$reactstatelycollections.getChildNodes)(item, this.collection))) === null || _getFirstItem1 === void 0 ? void 0 : _getFirstItem1.key) !== null && _getFirstItem_key1 !== void 0 ? _getFirstItem_key1 : null;
|
|
192
|
-
}
|
|
193
|
-
// Otherwise, focus the row itself.
|
|
194
|
-
return key;
|
|
195
|
-
}
|
|
196
|
-
getLastKey(fromKey, global) {
|
|
197
|
-
let key = fromKey !== null && fromKey !== void 0 ? fromKey : null;
|
|
198
|
-
let item;
|
|
199
|
-
if (key != null) {
|
|
200
|
-
item = this.collection.getItem(key);
|
|
201
|
-
if (!item) return null;
|
|
202
|
-
// If global flag is not set, and a cell is currently focused,
|
|
203
|
-
// move focus to the last cell in the parent row.
|
|
204
|
-
if (this.isCell(item) && !global && item.parentKey != null) {
|
|
205
|
-
var _getLastItem;
|
|
206
|
-
let parent = this.collection.getItem(item.parentKey);
|
|
207
|
-
if (!parent) return null;
|
|
208
|
-
let children = (0, $iKGCm$reactstatelycollections.getChildNodes)(parent, this.collection);
|
|
209
|
-
var _getLastItem_key;
|
|
210
|
-
return (_getLastItem_key = (_getLastItem = (0, $iKGCm$reactstatelycollections.getLastItem)(children)) === null || _getLastItem === void 0 ? void 0 : _getLastItem.key) !== null && _getLastItem_key !== void 0 ? _getLastItem_key : null;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
// Find the last row
|
|
214
|
-
key = this.findPreviousKey(undefined, (item)=>item.type === 'item');
|
|
215
|
-
// If global flag is set (or if focus mode is cell), focus the last cell in the last row.
|
|
216
|
-
if (key != null && (item && this.isCell(item) && global || this.focusMode === 'cell')) {
|
|
217
|
-
var _getLastItem1;
|
|
218
|
-
let item = this.collection.getItem(key);
|
|
219
|
-
if (!item) return null;
|
|
220
|
-
let children = (0, $iKGCm$reactstatelycollections.getChildNodes)(item, this.collection);
|
|
221
|
-
var _getLastItem_key1;
|
|
222
|
-
key = (_getLastItem_key1 = (_getLastItem1 = (0, $iKGCm$reactstatelycollections.getLastItem)(children)) === null || _getLastItem1 === void 0 ? void 0 : _getLastItem1.key) !== null && _getLastItem_key1 !== void 0 ? _getLastItem_key1 : null;
|
|
223
|
-
}
|
|
224
|
-
// Otherwise, focus the row itself.
|
|
225
|
-
return key;
|
|
226
|
-
}
|
|
227
|
-
getKeyPageAbove(fromKey) {
|
|
228
|
-
let key = fromKey;
|
|
229
|
-
let itemRect = this.layoutDelegate.getItemRect(key);
|
|
230
|
-
if (!itemRect) return null;
|
|
231
|
-
let pageY = Math.max(0, itemRect.y + itemRect.height - this.layoutDelegate.getVisibleRect().height);
|
|
232
|
-
while(itemRect && itemRect.y > pageY && key != null){
|
|
233
|
-
var _this_getKeyAbove;
|
|
234
|
-
key = (_this_getKeyAbove = this.getKeyAbove(key)) !== null && _this_getKeyAbove !== void 0 ? _this_getKeyAbove : null;
|
|
235
|
-
if (key == null) break;
|
|
236
|
-
itemRect = this.layoutDelegate.getItemRect(key);
|
|
237
|
-
}
|
|
238
|
-
return key;
|
|
239
|
-
}
|
|
240
|
-
getKeyPageBelow(fromKey) {
|
|
241
|
-
let key = fromKey;
|
|
242
|
-
let itemRect = this.layoutDelegate.getItemRect(key);
|
|
243
|
-
if (!itemRect) return null;
|
|
244
|
-
let pageHeight = this.layoutDelegate.getVisibleRect().height;
|
|
245
|
-
let pageY = Math.min(this.layoutDelegate.getContentSize().height, itemRect.y + pageHeight);
|
|
246
|
-
while(itemRect && itemRect.y + itemRect.height < pageY){
|
|
247
|
-
let nextKey = this.getKeyBelow(key);
|
|
248
|
-
// If nextKey is undefined, we've reached the last row already
|
|
249
|
-
if (nextKey == null) break;
|
|
250
|
-
itemRect = this.layoutDelegate.getItemRect(nextKey);
|
|
251
|
-
key = nextKey;
|
|
252
|
-
}
|
|
253
|
-
return key;
|
|
254
|
-
}
|
|
255
|
-
getKeyForSearch(search, fromKey) {
|
|
256
|
-
let key = fromKey !== null && fromKey !== void 0 ? fromKey : null;
|
|
257
|
-
if (!this.collator) return null;
|
|
258
|
-
let collection = this.collection;
|
|
259
|
-
key = fromKey !== null && fromKey !== void 0 ? fromKey : this.getFirstKey();
|
|
260
|
-
if (key == null) return null;
|
|
261
|
-
// If the starting key is a cell, search from its parent row.
|
|
262
|
-
let startItem = collection.getItem(key);
|
|
263
|
-
if (!startItem) return null;
|
|
264
|
-
var _startItem_parentKey;
|
|
265
|
-
if (startItem.type === 'cell') key = (_startItem_parentKey = startItem.parentKey) !== null && _startItem_parentKey !== void 0 ? _startItem_parentKey : null;
|
|
266
|
-
let hasWrapped = false;
|
|
267
|
-
while(key != null){
|
|
268
|
-
let item = collection.getItem(key);
|
|
269
|
-
if (!item) return null;
|
|
270
|
-
// check row text value for match
|
|
271
|
-
if (item.textValue) {
|
|
272
|
-
let substring = item.textValue.slice(0, search.length);
|
|
273
|
-
if (this.collator.compare(substring, search) === 0) {
|
|
274
|
-
var _getFirstItem;
|
|
275
|
-
var _getFirstItem_key;
|
|
276
|
-
if (this.isRow(item) && this.focusMode === 'cell') return (_getFirstItem_key = (_getFirstItem = (0, $iKGCm$reactstatelycollections.getFirstItem)((0, $iKGCm$reactstatelycollections.getChildNodes)(item, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key) !== null && _getFirstItem_key !== void 0 ? _getFirstItem_key : null;
|
|
277
|
-
return item.key;
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
key = this.findNextKey(key, (item)=>item.type === 'item');
|
|
281
|
-
// Wrap around when reaching the end of the collection
|
|
282
|
-
if (key == null && !hasWrapped) {
|
|
283
|
-
key = this.getFirstKey();
|
|
284
|
-
hasWrapped = true;
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
return null;
|
|
288
|
-
}
|
|
289
|
-
constructor(options){
|
|
290
|
-
this.collection = options.collection;
|
|
291
|
-
this.disabledKeys = options.disabledKeys;
|
|
292
|
-
this.disabledBehavior = options.disabledBehavior || 'all';
|
|
293
|
-
this.direction = options.direction;
|
|
294
|
-
this.collator = options.collator;
|
|
295
|
-
if (!options.layout && !options.ref) throw new Error('Either a layout or a ref must be specified.');
|
|
296
|
-
this.layoutDelegate = options.layoutDelegate || (options.layout ? new $3187c0e19200cb16$var$DeprecatedLayoutDelegate(options.layout) : new (0, $iKGCm$reactariaselection.DOMLayoutDelegate)(options.ref));
|
|
297
|
-
var _options_focusMode;
|
|
298
|
-
this.focusMode = (_options_focusMode = options.focusMode) !== null && _options_focusMode !== void 0 ? _options_focusMode : 'row';
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
class $3187c0e19200cb16$var$DeprecatedLayoutDelegate {
|
|
302
|
-
getContentSize() {
|
|
303
|
-
return this.layout.getContentSize();
|
|
304
|
-
}
|
|
305
|
-
getItemRect(key) {
|
|
306
|
-
var _this_layout_getLayoutInfo;
|
|
307
|
-
return ((_this_layout_getLayoutInfo = this.layout.getLayoutInfo(key)) === null || _this_layout_getLayoutInfo === void 0 ? void 0 : _this_layout_getLayoutInfo.rect) || null;
|
|
308
|
-
}
|
|
309
|
-
getVisibleRect() {
|
|
310
|
-
return this.layout.virtualizer.visibleRect;
|
|
311
|
-
}
|
|
312
|
-
constructor(layout){
|
|
313
|
-
this.layout = layout;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
//# sourceMappingURL=GridKeyboardDelegate.main.js.map
|