Socket
Book a DemoInstallSign in
Socket

@react-stately/selection

Package Overview
Dependencies
Maintainers
2
Versions
1101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-stately/selection - npm Package Compare versions

Comparing version

to
3.0.0-nightly-987f174ba-241015

4

dist/Selection.main.js

@@ -21,4 +21,4 @@

if (keys instanceof $21c847070f1f9569$export$52baac22726c72bf) {
this.anchorKey = anchorKey || keys.anchorKey;
this.currentKey = currentKey || keys.currentKey;
this.anchorKey = anchorKey !== null && anchorKey !== void 0 ? anchorKey : keys.anchorKey;
this.currentKey = currentKey !== null && currentKey !== void 0 ? currentKey : keys.currentKey;
} else {

@@ -25,0 +25,0 @@ this.anchorKey = anchorKey;

@@ -15,4 +15,4 @@ /*

if (keys instanceof $e40ea825a81a3709$export$52baac22726c72bf) {
this.anchorKey = anchorKey || keys.anchorKey;
this.currentKey = currentKey || keys.currentKey;
this.anchorKey = anchorKey !== null && anchorKey !== void 0 ? anchorKey : keys.anchorKey;
this.currentKey = currentKey !== null && currentKey !== void 0 ? currentKey : keys.currentKey;
} else {

@@ -19,0 +19,0 @@ this.anchorKey = anchorKey;

@@ -138,5 +138,7 @@ var $21c847070f1f9569$exports = require("./Selection.main.js");

let selectedKeys = this.state.selectedKeys;
let anchorKey = selectedKeys.anchorKey || toKey;
var _selectedKeys_anchorKey;
let anchorKey = (_selectedKeys_anchorKey = selectedKeys.anchorKey) !== null && _selectedKeys_anchorKey !== void 0 ? _selectedKeys_anchorKey : toKey;
selection = new (0, $21c847070f1f9569$exports.Selection)(selectedKeys, anchorKey, toKey);
for (let key of this.getKeyRange(anchorKey, selectedKeys.currentKey || toKey))selection.delete(key);
var _selectedKeys_currentKey;
for (let key of this.getKeyRange(anchorKey, (_selectedKeys_currentKey = selectedKeys.currentKey) !== null && _selectedKeys_currentKey !== void 0 ? _selectedKeys_currentKey : toKey))selection.delete(key);
for (let key of this.getKeyRange(toKey, anchorKey))if (this.canSelectItem(key)) selection.add(key);

@@ -160,3 +162,3 @@ }

let key = from;
while(key){
while(key != null){
let item = this.collection.getItem(key);

@@ -163,0 +165,0 @@ if (item && item.type === 'item' || item.type === 'cell' && this.allowsCellSelection) keys.push(key);

@@ -132,5 +132,7 @@ import {Selection as $e40ea825a81a3709$export$52baac22726c72bf} from "./Selection.module.js";

let selectedKeys = this.state.selectedKeys;
let anchorKey = selectedKeys.anchorKey || toKey;
var _selectedKeys_anchorKey;
let anchorKey = (_selectedKeys_anchorKey = selectedKeys.anchorKey) !== null && _selectedKeys_anchorKey !== void 0 ? _selectedKeys_anchorKey : toKey;
selection = new (0, $e40ea825a81a3709$export$52baac22726c72bf)(selectedKeys, anchorKey, toKey);
for (let key of this.getKeyRange(anchorKey, selectedKeys.currentKey || toKey))selection.delete(key);
var _selectedKeys_currentKey;
for (let key of this.getKeyRange(anchorKey, (_selectedKeys_currentKey = selectedKeys.currentKey) !== null && _selectedKeys_currentKey !== void 0 ? _selectedKeys_currentKey : toKey))selection.delete(key);
for (let key of this.getKeyRange(toKey, anchorKey))if (this.canSelectItem(key)) selection.add(key);

@@ -154,3 +156,3 @@ }

let key = from;
while(key){
while(key != null){
let item = this.collection.getItem(key);

@@ -157,0 +159,0 @@ if (item && item.type === 'item' || item.type === 'cell' && this.allowsCellSelection) keys.push(key);

{
"name": "@react-stately/selection",
"version": "3.0.0-nightly-9421c1409-240923",
"version": "3.0.0-nightly-987f174ba-241015",
"description": "Spectrum UI components in React",

@@ -25,5 +25,5 @@ "license": "Apache-2.0",

"dependencies": {
"@react-stately/collections": "^3.0.0-nightly-9421c1409-240923",
"@react-stately/utils": "^3.0.0-nightly-9421c1409-240923",
"@react-types/shared": "^3.0.0-nightly-9421c1409-240923",
"@react-stately/collections": "^3.0.0-nightly-987f174ba-241015",
"@react-stately/utils": "^3.0.0-nightly-987f174ba-241015",
"@react-types/shared": "^3.0.0-nightly-987f174ba-241015",
"@swc/helpers": "^0.5.0"

@@ -37,3 +37,3 @@ },

},
"stableVersion": "3.16.2"
"stableVersion": "3.17.0"
}

@@ -26,4 +26,4 @@ /*

if (keys instanceof Selection) {
this.anchorKey = anchorKey || keys.anchorKey;
this.currentKey = currentKey || keys.currentKey;
this.anchorKey = anchorKey ?? keys.anchorKey;
this.currentKey = currentKey ?? keys.currentKey;
} else {

@@ -30,0 +30,0 @@ this.anchorKey = anchorKey;

@@ -229,5 +229,5 @@ /*

let selectedKeys = this.state.selectedKeys as Selection;
let anchorKey = selectedKeys.anchorKey || toKey;
let anchorKey = selectedKeys.anchorKey ?? toKey;
selection = new Selection(selectedKeys, anchorKey, toKey);
for (let key of this.getKeyRange(anchorKey, selectedKeys.currentKey || toKey)) {
for (let key of this.getKeyRange(anchorKey, selectedKeys.currentKey ?? toKey)) {
selection.delete(key);

@@ -267,3 +267,3 @@ }

let key = from;
while (key) {
while (key != null) {
let item = this.collection.getItem(key);

@@ -270,0 +270,0 @@ if (item && item.type === 'item' || (item.type === 'cell' && this.allowsCellSelection)) {

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

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.