Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-stately/tree

Package Overview
Dependencies
Maintainers
2
Versions
809
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-stately/tree - npm Package Compare versions

Comparing version 3.8.5 to 3.8.6

LICENSE

16

dist/TreeCollection.main.js

@@ -29,7 +29,9 @@

let node = this.keyMap.get(key);
return node ? node.prevKey : null;
var _node_prevKey;
return node ? (_node_prevKey = node.prevKey) !== null && _node_prevKey !== void 0 ? _node_prevKey : null : null;
}
getKeyAfter(key) {
let node = this.keyMap.get(key);
return node ? node.nextKey : null;
var _node_nextKey;
return node ? (_node_nextKey = node.nextKey) !== null && _node_nextKey !== void 0 ? _node_nextKey : null : null;
}

@@ -43,3 +45,4 @@ getFirstKey() {

getItem(key) {
return this.keyMap.get(key);
var _this_keyMap_get;
return (_this_keyMap_get = this.keyMap.get(key)) !== null && _this_keyMap_get !== void 0 ? _this_keyMap_get : null;
}

@@ -54,2 +57,4 @@ at(idx) {

this.keyMap = new Map();
this.firstKey = null;
this.lastKey = null;
this.iterable = nodes;

@@ -62,3 +67,3 @@ expandedKeys = expandedKeys || new Set();

for (let node of nodes)visit(node);
let last;
let last = null;
let index = 0;

@@ -79,3 +84,4 @@ for (let [key, node] of this.keyMap){

}
this.lastKey = last === null || last === void 0 ? void 0 : last.key;
var _last_key;
this.lastKey = (_last_key = last === null || last === void 0 ? void 0 : last.key) !== null && _last_key !== void 0 ? _last_key : null;
}

@@ -82,0 +88,0 @@ }

@@ -23,7 +23,9 @@ /*

let node = this.keyMap.get(key);
return node ? node.prevKey : null;
var _node_prevKey;
return node ? (_node_prevKey = node.prevKey) !== null && _node_prevKey !== void 0 ? _node_prevKey : null : null;
}
getKeyAfter(key) {
let node = this.keyMap.get(key);
return node ? node.nextKey : null;
var _node_nextKey;
return node ? (_node_nextKey = node.nextKey) !== null && _node_nextKey !== void 0 ? _node_nextKey : null : null;
}

@@ -37,3 +39,4 @@ getFirstKey() {

getItem(key) {
return this.keyMap.get(key);
var _this_keyMap_get;
return (_this_keyMap_get = this.keyMap.get(key)) !== null && _this_keyMap_get !== void 0 ? _this_keyMap_get : null;
}

@@ -48,2 +51,4 @@ at(idx) {

this.keyMap = new Map();
this.firstKey = null;
this.lastKey = null;
this.iterable = nodes;

@@ -56,3 +61,3 @@ expandedKeys = expandedKeys || new Set();

for (let node of nodes)visit(node);
let last;
let last = null;
let index = 0;

@@ -73,3 +78,4 @@ for (let [key, node] of this.keyMap){

}
this.lastKey = last === null || last === void 0 ? void 0 : last.key;
var _last_key;
this.lastKey = (_last_key = last === null || last === void 0 ? void 0 : last.key) !== null && _last_key !== void 0 ? _last_key : null;
}

@@ -76,0 +82,0 @@ }

@@ -10,8 +10,8 @@ import { Collection, Key, Node, CollectionStateBase, DisabledBehavior, Expandable, MultipleSelection } from "@react-types/shared";

getKeys(): IterableIterator<Key>;
getKeyBefore(key: Key): Key;
getKeyAfter(key: Key): Key;
getFirstKey(): Key;
getLastKey(): Key;
getItem(key: Key): Node<T>;
at(idx: number): Node<T>;
getKeyBefore(key: Key): Key | null;
getKeyAfter(key: Key): Key | null;
getFirstKey(): Key | null;
getLastKey(): Key | null;
getItem(key: Key): Node<T> | null;
at(idx: number): Node<T> | null;
}

@@ -18,0 +18,0 @@ export interface TreeProps<T> extends CollectionStateBase<T>, Expandable, MultipleSelection {

{
"name": "@react-stately/tree",
"version": "3.8.5",
"version": "3.8.6",
"description": "Spectrum UI components in React",

@@ -25,14 +25,15 @@ "license": "Apache-2.0",

"dependencies": {
"@react-stately/collections": "^3.11.0",
"@react-stately/selection": "^3.17.0",
"@react-stately/utils": "^3.10.4",
"@react-types/shared": "^3.25.0",
"@react-stately/collections": "^3.12.0",
"@react-stately/selection": "^3.18.0",
"@react-stately/utils": "^3.10.5",
"@react-types/shared": "^3.26.0",
"@swc/helpers": "^0.5.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
},
"publishConfig": {
"access": "public"
}
}
},
"gitHead": "71f0ef23053f9e03ee7e97df736e8b083e006849"
}

@@ -18,4 +18,4 @@ /*

private iterable: Iterable<Node<T>>;
private firstKey: Key;
private lastKey: Key;
private firstKey: Key | null = null;
private lastKey: Key | null = null;

@@ -40,3 +40,3 @@ constructor(nodes: Iterable<Node<T>>, {expandedKeys}: {expandedKeys?: Set<Key>} = {}) {

let last: Node<T>;
let last: Node<T> | null = null;
let index = 0;

@@ -63,3 +63,3 @@ for (let [key, node] of this.keyMap) {

this.lastKey = last?.key;
this.lastKey = last?.key ?? null;
}

@@ -81,3 +81,3 @@

let node = this.keyMap.get(key);
return node ? node.prevKey : null;
return node ? node.prevKey ?? null : null;
}

@@ -87,3 +87,3 @@

let node = this.keyMap.get(key);
return node ? node.nextKey : null;
return node ? node.nextKey ?? null : null;
}

@@ -100,3 +100,3 @@

getItem(key: Key) {
return this.keyMap.get(key);
return this.keyMap.get(key) ?? null;
}

@@ -103,0 +103,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc