@react-stately/grid 3.1.2 → 3.1.3-nightly.3113
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/main.js +14 -14
- package/dist/module.js +13 -13
- package/package.json +4 -4
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $
|
|
1
|
+
var $82f7L$react = require("react");
|
|
2
|
+
var $82f7L$reactstatelyselection = require("@react-stately/selection");
|
|
3
3
|
|
|
4
4
|
function $parcel$exportWildcard(dest, source) {
|
|
5
5
|
Object.keys(source).forEach(function(key) {
|
|
@@ -20,15 +20,15 @@ function $parcel$exportWildcard(dest, source) {
|
|
|
20
20
|
function $parcel$export(e, n, v, s) {
|
|
21
21
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
22
22
|
}
|
|
23
|
-
var $
|
|
23
|
+
var $38009b28e45912ea$exports = {};
|
|
24
24
|
|
|
25
|
-
$parcel$export($
|
|
25
|
+
$parcel$export($38009b28e45912ea$exports, "useGridState", () => $38009b28e45912ea$export$4007ac09ff9c68ed);
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
function $
|
|
28
|
+
function $38009b28e45912ea$export$4007ac09ff9c68ed(props) {
|
|
29
29
|
let { collection: collection , focusMode: focusMode } = props;
|
|
30
|
-
let selectionState = $
|
|
31
|
-
let disabledKeys = $
|
|
30
|
+
let selectionState = $82f7L$reactstatelyselection.useMultipleSelectionState(props);
|
|
31
|
+
let disabledKeys = $82f7L$react.useMemo(()=>props.disabledKeys ? new Set(props.disabledKeys) : new Set()
|
|
32
32
|
, [
|
|
33
33
|
props.disabledKeys
|
|
34
34
|
]);
|
|
@@ -49,7 +49,7 @@ function $ceb53d68c480548a$export$4007ac09ff9c68ed(props) {
|
|
|
49
49
|
setFocusedKey(key, child);
|
|
50
50
|
};
|
|
51
51
|
// Reset focused key if that item is deleted from the collection.
|
|
52
|
-
$
|
|
52
|
+
$82f7L$react.useEffect(()=>{
|
|
53
53
|
if (selectionState.focusedKey != null && !collection.getItem(selectionState.focusedKey)) selectionState.setFocusedKey(null);
|
|
54
54
|
}, [
|
|
55
55
|
collection,
|
|
@@ -58,16 +58,16 @@ function $ceb53d68c480548a$export$4007ac09ff9c68ed(props) {
|
|
|
58
58
|
return {
|
|
59
59
|
collection: collection,
|
|
60
60
|
disabledKeys: disabledKeys,
|
|
61
|
-
selectionManager: new $
|
|
61
|
+
selectionManager: new $82f7L$reactstatelyselection.SelectionManager(collection, selectionState)
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
var $
|
|
66
|
+
var $8bb6a9101b052a66$exports = {};
|
|
67
67
|
|
|
68
|
-
$parcel$export($
|
|
68
|
+
$parcel$export($8bb6a9101b052a66$exports, "GridCollection", () => $8bb6a9101b052a66$export$de3fdf6493c353d);
|
|
69
69
|
var tmp = Symbol.iterator;
|
|
70
|
-
class $
|
|
70
|
+
class $8bb6a9101b052a66$export$de3fdf6493c353d {
|
|
71
71
|
*[tmp]() {
|
|
72
72
|
yield* [
|
|
73
73
|
...this.rows
|
|
@@ -175,8 +175,8 @@ class $5adae569217127ac$export$de3fdf6493c353d {
|
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
|
|
178
|
-
$parcel$exportWildcard(module.exports, $
|
|
179
|
-
$parcel$exportWildcard(module.exports, $
|
|
178
|
+
$parcel$exportWildcard(module.exports, $38009b28e45912ea$exports);
|
|
179
|
+
$parcel$exportWildcard(module.exports, $8bb6a9101b052a66$exports);
|
|
180
180
|
|
|
181
181
|
|
|
182
182
|
//# sourceMappingURL=main.js.map
|
package/dist/module.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {useMemo as $
|
|
2
|
-
import {useMultipleSelectionState as $
|
|
1
|
+
import {useMemo as $cAn5f$useMemo, useEffect as $cAn5f$useEffect} from "react";
|
|
2
|
+
import {useMultipleSelectionState as $cAn5f$useMultipleSelectionState, SelectionManager as $cAn5f$SelectionManager} from "@react-stately/selection";
|
|
3
3
|
|
|
4
4
|
function $parcel$export(e, n, v, s) {
|
|
5
5
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
6
6
|
}
|
|
7
|
-
var $
|
|
7
|
+
var $62967d126f3aa823$exports = {};
|
|
8
8
|
|
|
9
|
-
$parcel$export($
|
|
9
|
+
$parcel$export($62967d126f3aa823$exports, "useGridState", () => $62967d126f3aa823$export$4007ac09ff9c68ed);
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
function $
|
|
12
|
+
function $62967d126f3aa823$export$4007ac09ff9c68ed(props) {
|
|
13
13
|
let { collection: collection , focusMode: focusMode } = props;
|
|
14
|
-
let selectionState = $
|
|
15
|
-
let disabledKeys = $
|
|
14
|
+
let selectionState = $cAn5f$useMultipleSelectionState(props);
|
|
15
|
+
let disabledKeys = $cAn5f$useMemo(()=>props.disabledKeys ? new Set(props.disabledKeys) : new Set()
|
|
16
16
|
, [
|
|
17
17
|
props.disabledKeys
|
|
18
18
|
]);
|
|
@@ -33,7 +33,7 @@ function $e6fbdaf61ee618ce$export$4007ac09ff9c68ed(props) {
|
|
|
33
33
|
setFocusedKey(key, child);
|
|
34
34
|
};
|
|
35
35
|
// Reset focused key if that item is deleted from the collection.
|
|
36
|
-
$
|
|
36
|
+
$cAn5f$useEffect(()=>{
|
|
37
37
|
if (selectionState.focusedKey != null && !collection.getItem(selectionState.focusedKey)) selectionState.setFocusedKey(null);
|
|
38
38
|
}, [
|
|
39
39
|
collection,
|
|
@@ -42,16 +42,16 @@ function $e6fbdaf61ee618ce$export$4007ac09ff9c68ed(props) {
|
|
|
42
42
|
return {
|
|
43
43
|
collection: collection,
|
|
44
44
|
disabledKeys: disabledKeys,
|
|
45
|
-
selectionManager: new $
|
|
45
|
+
selectionManager: new $cAn5f$SelectionManager(collection, selectionState)
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
var $
|
|
50
|
+
var $16805b1b18093c5f$exports = {};
|
|
51
51
|
|
|
52
|
-
$parcel$export($
|
|
52
|
+
$parcel$export($16805b1b18093c5f$exports, "GridCollection", () => $16805b1b18093c5f$export$de3fdf6493c353d);
|
|
53
53
|
var tmp = Symbol.iterator;
|
|
54
|
-
class $
|
|
54
|
+
class $16805b1b18093c5f$export$de3fdf6493c353d {
|
|
55
55
|
*[tmp]() {
|
|
56
56
|
yield* [
|
|
57
57
|
...this.rows
|
|
@@ -161,5 +161,5 @@ class $f4613af0bafc7619$export$de3fdf6493c353d {
|
|
|
161
161
|
|
|
162
162
|
|
|
163
163
|
|
|
164
|
-
export {$
|
|
164
|
+
export {$62967d126f3aa823$export$4007ac09ff9c68ed as useGridState, $16805b1b18093c5f$export$de3fdf6493c353d as GridCollection};
|
|
165
165
|
//# sourceMappingURL=module.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-stately/grid",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.3-nightly.3113+404d41859",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@babel/runtime": "^7.6.2",
|
|
21
|
-
"@react-stately/selection": "
|
|
22
|
-
"@react-types/grid": "
|
|
23
|
-
"@react-types/shared": "
|
|
21
|
+
"@react-stately/selection": "3.0.0-nightly.1417+404d41859",
|
|
22
|
+
"@react-types/grid": "3.0.3-nightly.3113+404d41859",
|
|
23
|
+
"@react-types/shared": "3.0.0-nightly.1417+404d41859"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"react": "^16.8.0 || ^17.0.0-rc.1"
|