@react-stately/selection
Advanced tools
Comparing version 3.0.0-nightly-4980928d3-240906 to 3.0.0-nightly-6193c40ee-240920
@@ -155,2 +155,4 @@ var $21c847070f1f9569$exports = require("./Selection.main.js"); | ||
getKeyRangeInternal(from, to) { | ||
var _this_layoutDelegate; | ||
if ((_this_layoutDelegate = this.layoutDelegate) === null || _this_layoutDelegate === void 0 ? void 0 : _this_layoutDelegate.getKeyRange) return this.layoutDelegate.getKeyRange(from, to); | ||
let keys = []; | ||
@@ -303,2 +305,3 @@ let key = from; | ||
this._isSelectAll = null; | ||
this.layoutDelegate = (options === null || options === void 0 ? void 0 : options.layoutDelegate) || null; | ||
} | ||
@@ -305,0 +308,0 @@ } |
@@ -149,2 +149,4 @@ import {Selection as $e40ea825a81a3709$export$52baac22726c72bf} from "./Selection.module.js"; | ||
getKeyRangeInternal(from, to) { | ||
var _this_layoutDelegate; | ||
if ((_this_layoutDelegate = this.layoutDelegate) === null || _this_layoutDelegate === void 0 ? void 0 : _this_layoutDelegate.getKeyRange) return this.layoutDelegate.getKeyRange(from, to); | ||
let keys = []; | ||
@@ -297,2 +299,3 @@ let key = from; | ||
this._isSelectAll = null; | ||
this.layoutDelegate = (options === null || options === void 0 ? void 0 : options.layoutDelegate) || null; | ||
} | ||
@@ -299,0 +302,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import { DisabledBehavior, FocusStrategy, Key, LongPressEvent, PressEvent, Selection, SelectionBehavior, SelectionMode, MultipleSelection, Collection, Node } from "@react-types/shared"; | ||
import { DisabledBehavior, FocusStrategy, Key, LongPressEvent, PressEvent, Selection, SelectionBehavior, SelectionMode, MultipleSelection, Collection, LayoutDelegate, Node } from "@react-types/shared"; | ||
export interface FocusState { | ||
@@ -109,2 +109,3 @@ /** Whether the collection is currently focused. */ | ||
allowsCellSelection?: boolean; | ||
layoutDelegate?: LayoutDelegate; | ||
} | ||
@@ -111,0 +112,0 @@ /** |
{ | ||
"name": "@react-stately/selection", | ||
"version": "3.0.0-nightly-4980928d3-240906", | ||
"version": "3.0.0-nightly-6193c40ee-240920", | ||
"description": "Spectrum UI components in React", | ||
@@ -25,5 +25,5 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-stately/collections": "^3.0.0-nightly-4980928d3-240906", | ||
"@react-stately/utils": "^3.0.0-nightly-4980928d3-240906", | ||
"@react-types/shared": "^3.0.0-nightly-4980928d3-240906", | ||
"@react-stately/collections": "^3.0.0-nightly-6193c40ee-240920", | ||
"@react-stately/utils": "^3.0.0-nightly-6193c40ee-240920", | ||
"@react-types/shared": "^3.0.0-nightly-6193c40ee-240920", | ||
"@swc/helpers": "^0.5.0" | ||
@@ -30,0 +30,0 @@ }, |
@@ -18,2 +18,3 @@ /* | ||
Key, | ||
LayoutDelegate, | ||
LongPressEvent, | ||
@@ -30,3 +31,4 @@ Node, | ||
interface SelectionManagerOptions { | ||
allowsCellSelection?: boolean | ||
allowsCellSelection?: boolean, | ||
layoutDelegate?: LayoutDelegate | ||
} | ||
@@ -42,2 +44,3 @@ | ||
private _isSelectAll: boolean; | ||
private layoutDelegate: LayoutDelegate | null; | ||
@@ -49,2 +52,3 @@ constructor(collection: Collection<Node<unknown>>, state: MultipleSelectionState, options?: SelectionManagerOptions) { | ||
this._isSelectAll = null; | ||
this.layoutDelegate = options?.layoutDelegate || null; | ||
} | ||
@@ -260,2 +264,6 @@ | ||
private getKeyRangeInternal(from: Key, to: Key) { | ||
if (this.layoutDelegate?.getKeyRange) { | ||
return this.layoutDelegate.getKeyRange(from, to); | ||
} | ||
let keys: Key[] = []; | ||
@@ -262,0 +270,0 @@ let key = from; |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
165388
2218