@react-stately/grid 3.1.1-nightly.3085 → 3.1.1-nightly.3086
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 +5 -5
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $
|
|
1
|
+
var $9dDAS$react = require("react");
|
|
2
|
+
var $9dDAS$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 $f006fc0f1baf15bf$exports = {};
|
|
24
24
|
|
|
25
|
-
$parcel$export($
|
|
25
|
+
$parcel$export($f006fc0f1baf15bf$exports, "useGridState", () => $f006fc0f1baf15bf$export$4007ac09ff9c68ed);
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
function $
|
|
28
|
+
function $f006fc0f1baf15bf$export$4007ac09ff9c68ed(props) {
|
|
29
29
|
let { collection: collection , focusMode: focusMode } = props;
|
|
30
|
-
let selectionState = $
|
|
31
|
-
let disabledKeys = $
|
|
30
|
+
let selectionState = $9dDAS$reactstatelyselection.useMultipleSelectionState(props);
|
|
31
|
+
let disabledKeys = $9dDAS$react.useMemo(()=>props.disabledKeys ? new Set(props.disabledKeys) : new Set()
|
|
32
32
|
, [
|
|
33
33
|
props.disabledKeys
|
|
34
34
|
]);
|
|
@@ -48,7 +48,7 @@ function $805edb38a3079ec2$export$4007ac09ff9c68ed(props) {
|
|
|
48
48
|
setFocusedKey(key, child);
|
|
49
49
|
};
|
|
50
50
|
// Reset focused key if that item is deleted from the collection.
|
|
51
|
-
$
|
|
51
|
+
$9dDAS$react.useEffect(()=>{
|
|
52
52
|
if (selectionState.focusedKey != null && !collection.getItem(selectionState.focusedKey)) selectionState.setFocusedKey(null);
|
|
53
53
|
}, [
|
|
54
54
|
collection,
|
|
@@ -57,15 +57,15 @@ function $805edb38a3079ec2$export$4007ac09ff9c68ed(props) {
|
|
|
57
57
|
return {
|
|
58
58
|
collection: collection,
|
|
59
59
|
disabledKeys: disabledKeys,
|
|
60
|
-
selectionManager: new $
|
|
60
|
+
selectionManager: new $9dDAS$reactstatelyselection.SelectionManager(collection, selectionState)
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
|
|
65
|
-
var $
|
|
65
|
+
var $cc5af59c8f5add0a$exports = {};
|
|
66
66
|
|
|
67
|
-
$parcel$export($
|
|
68
|
-
class $
|
|
67
|
+
$parcel$export($cc5af59c8f5add0a$exports, "GridCollection", () => $cc5af59c8f5add0a$export$de3fdf6493c353d);
|
|
68
|
+
class $cc5af59c8f5add0a$export$de3fdf6493c353d {
|
|
69
69
|
constructor(opts){
|
|
70
70
|
this.keyMap = new Map();
|
|
71
71
|
this.keyMap = new Map();
|
|
@@ -171,8 +171,8 @@ class $ca89265eb29da87b$export$de3fdf6493c353d {
|
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
|
|
174
|
-
$parcel$exportWildcard(module.exports, $
|
|
175
|
-
$parcel$exportWildcard(module.exports, $
|
|
174
|
+
$parcel$exportWildcard(module.exports, $f006fc0f1baf15bf$exports);
|
|
175
|
+
$parcel$exportWildcard(module.exports, $cc5af59c8f5add0a$exports);
|
|
176
176
|
|
|
177
177
|
|
|
178
178
|
//# 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 $abCyH$useMemo, useEffect as $abCyH$useEffect} from "react";
|
|
2
|
+
import {useMultipleSelectionState as $abCyH$useMultipleSelectionState, SelectionManager as $abCyH$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 $05a366206de7039b$exports = {};
|
|
8
8
|
|
|
9
|
-
$parcel$export($
|
|
9
|
+
$parcel$export($05a366206de7039b$exports, "useGridState", () => $05a366206de7039b$export$4007ac09ff9c68ed);
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
function $
|
|
12
|
+
function $05a366206de7039b$export$4007ac09ff9c68ed(props) {
|
|
13
13
|
let { collection: collection , focusMode: focusMode } = props;
|
|
14
|
-
let selectionState = $
|
|
15
|
-
let disabledKeys = $
|
|
14
|
+
let selectionState = $abCyH$useMultipleSelectionState(props);
|
|
15
|
+
let disabledKeys = $abCyH$useMemo(()=>props.disabledKeys ? new Set(props.disabledKeys) : new Set()
|
|
16
16
|
, [
|
|
17
17
|
props.disabledKeys
|
|
18
18
|
]);
|
|
@@ -32,7 +32,7 @@ function $c40bc2996decec31$export$4007ac09ff9c68ed(props) {
|
|
|
32
32
|
setFocusedKey(key, child);
|
|
33
33
|
};
|
|
34
34
|
// Reset focused key if that item is deleted from the collection.
|
|
35
|
-
$
|
|
35
|
+
$abCyH$useEffect(()=>{
|
|
36
36
|
if (selectionState.focusedKey != null && !collection.getItem(selectionState.focusedKey)) selectionState.setFocusedKey(null);
|
|
37
37
|
}, [
|
|
38
38
|
collection,
|
|
@@ -41,15 +41,15 @@ function $c40bc2996decec31$export$4007ac09ff9c68ed(props) {
|
|
|
41
41
|
return {
|
|
42
42
|
collection: collection,
|
|
43
43
|
disabledKeys: disabledKeys,
|
|
44
|
-
selectionManager: new $
|
|
44
|
+
selectionManager: new $abCyH$SelectionManager(collection, selectionState)
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
var $
|
|
49
|
+
var $23af2f3582920ab1$exports = {};
|
|
50
50
|
|
|
51
|
-
$parcel$export($
|
|
52
|
-
class $
|
|
51
|
+
$parcel$export($23af2f3582920ab1$exports, "GridCollection", () => $23af2f3582920ab1$export$de3fdf6493c353d);
|
|
52
|
+
class $23af2f3582920ab1$export$de3fdf6493c353d {
|
|
53
53
|
constructor(opts){
|
|
54
54
|
this.keyMap = new Map();
|
|
55
55
|
this.keyMap = new Map();
|
|
@@ -157,5 +157,5 @@ class $8c07656437c834f0$export$de3fdf6493c353d {
|
|
|
157
157
|
|
|
158
158
|
|
|
159
159
|
|
|
160
|
-
export {$
|
|
160
|
+
export {$05a366206de7039b$export$4007ac09ff9c68ed as useGridState, $23af2f3582920ab1$export$de3fdf6493c353d as GridCollection};
|
|
161
161
|
//# sourceMappingURL=module.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-stately/grid",
|
|
3
|
-
"version": "3.1.1-nightly.
|
|
3
|
+
"version": "3.1.1-nightly.3086+b2abc5d94",
|
|
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": "3.0.0-nightly.
|
|
22
|
-
"@react-types/grid": "3.0.1-nightly.
|
|
23
|
-
"@react-types/shared": "3.0.0-nightly.
|
|
21
|
+
"@react-stately/selection": "3.0.0-nightly.1395+b2abc5d94",
|
|
22
|
+
"@react-types/grid": "3.0.1-nightly.3086+b2abc5d94",
|
|
23
|
+
"@react-types/shared": "3.0.0-nightly.1395+b2abc5d94"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"react": "^16.8.0 || ^17.0.0-rc.1"
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "b2abc5d94162a7bd614fffcdf11e3d3754dc7d9f"
|
|
32
32
|
}
|