@react-aria/selection 3.7.2 → 3.7.3
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 +79 -76
- package/dist/main.js.map +1 -1
- package/dist/module.js +75 -72
- package/dist/module.js.map +1 -1
- package/package.json +9 -9
package/dist/main.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $
|
|
3
|
-
var $
|
|
4
|
-
var $
|
|
5
|
-
var $
|
|
1
|
+
var $3GohX$react = require("react");
|
|
2
|
+
var $3GohX$reactariafocus = require("@react-aria/focus");
|
|
3
|
+
var $3GohX$reactariautils = require("@react-aria/utils");
|
|
4
|
+
var $3GohX$reactariai18n = require("@react-aria/i18n");
|
|
5
|
+
var $3GohX$reactariainteractions = require("@react-aria/interactions");
|
|
6
6
|
|
|
7
7
|
function $parcel$exportWildcard(dest, source) {
|
|
8
8
|
Object.keys(source).forEach(function(key) {
|
|
@@ -23,38 +23,38 @@ function $parcel$exportWildcard(dest, source) {
|
|
|
23
23
|
function $parcel$export(e, n, v, s) {
|
|
24
24
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
25
25
|
}
|
|
26
|
-
var $
|
|
26
|
+
var $63f28da12772fd84$exports = {};
|
|
27
27
|
|
|
28
|
-
$parcel$export($
|
|
28
|
+
$parcel$export($63f28da12772fd84$exports, "useSelectableCollection", () => $63f28da12772fd84$export$d6daf82dcd84e87c);
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
function $
|
|
34
|
+
function $40e30a50815aad5e$export$d3e3bd3e26688c04(e) {
|
|
35
35
|
// Ctrl + Arrow Up/Arrow Down has a system wide meaning on macOS, so use Alt instead.
|
|
36
36
|
// On Windows and Ubuntu, Alt + Space has a system wide meaning.
|
|
37
|
-
return $
|
|
37
|
+
return $3GohX$reactariautils.isAppleDevice() ? e.altKey : e.ctrlKey;
|
|
38
38
|
}
|
|
39
|
-
function $
|
|
40
|
-
if ($
|
|
39
|
+
function $40e30a50815aad5e$export$16792effe837dba3(e) {
|
|
40
|
+
if ($3GohX$reactariautils.isMac()) return e.metaKey;
|
|
41
41
|
return e.ctrlKey;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
var $
|
|
46
|
+
var $a8171b79152768c9$exports = {};
|
|
47
47
|
|
|
48
|
-
$parcel$export($
|
|
48
|
+
$parcel$export($a8171b79152768c9$exports, "useTypeSelect", () => $a8171b79152768c9$export$e32c88dfddc6e1d8);
|
|
49
49
|
|
|
50
|
-
function $
|
|
50
|
+
function $a8171b79152768c9$export$e32c88dfddc6e1d8(options) {
|
|
51
51
|
let { keyboardDelegate: keyboardDelegate , selectionManager: selectionManager , onTypeSelect: onTypeSelect } = options;
|
|
52
|
-
let state = $
|
|
52
|
+
let state = $3GohX$react.useRef({
|
|
53
53
|
search: '',
|
|
54
54
|
timeout: null
|
|
55
55
|
}).current;
|
|
56
56
|
let onKeyDown = (e)=>{
|
|
57
|
-
let character = $
|
|
57
|
+
let character = $a8171b79152768c9$var$getStringForKey(e.key);
|
|
58
58
|
if (!character || e.ctrlKey || e.metaKey) return;
|
|
59
59
|
// Do not propagate the Spacebar event if it's meant to be part of the search.
|
|
60
60
|
// When we time out, the search term becomes empty, hence the check on length.
|
|
@@ -87,7 +87,7 @@ function $f7ddb42583332a58$export$e32c88dfddc6e1d8(options) {
|
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
-
function $
|
|
90
|
+
function $a8171b79152768c9$var$getStringForKey(key) {
|
|
91
91
|
// If the key is of length 1, it is an ASCII value.
|
|
92
92
|
// Otherwise, if there are no ASCII characters in the key name,
|
|
93
93
|
// it is a Unicode character.
|
|
@@ -97,10 +97,10 @@ function $f7ddb42583332a58$var$getStringForKey(key) {
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
|
|
100
|
-
function $
|
|
100
|
+
function $63f28da12772fd84$export$d6daf82dcd84e87c(options) {
|
|
101
101
|
let { selectionManager: manager , keyboardDelegate: delegate , ref: ref , autoFocus: autoFocus = false , shouldFocusWrap: shouldFocusWrap = false , disallowEmptySelection: disallowEmptySelection = false , disallowSelectAll: disallowSelectAll = false , selectOnFocus: selectOnFocus = manager.selectionBehavior === 'replace' , disallowTypeAhead: disallowTypeAhead = false , shouldUseVirtualFocus: shouldUseVirtualFocus , allowsTabNavigation: allowsTabNavigation = false , isVirtualized: isVirtualized , scrollRef: // If no scrollRef is provided, assume the collection ref is the scrollable region
|
|
102
102
|
scrollRef = ref } = options;
|
|
103
|
-
let { direction: direction } = $
|
|
103
|
+
let { direction: direction } = $3GohX$reactariai18n.useLocale();
|
|
104
104
|
let onKeyDown = (e)=>{
|
|
105
105
|
// Prevent option + tab from doing anything since it doesn't move focus to the cells, only buttons/checkboxes
|
|
106
106
|
if (e.altKey && e.key === 'Tab') e.preventDefault();
|
|
@@ -111,23 +111,25 @@ function $e872cdf6539aaf0b$export$d6daf82dcd84e87c(options) {
|
|
|
111
111
|
if (key != null) {
|
|
112
112
|
manager.setFocusedKey(key, childFocus);
|
|
113
113
|
if (e.shiftKey && manager.selectionMode === 'multiple') manager.extendSelection(key);
|
|
114
|
-
else if (selectOnFocus && !$
|
|
114
|
+
else if (selectOnFocus && !$40e30a50815aad5e$export$d3e3bd3e26688c04(e)) manager.replaceSelection(key);
|
|
115
115
|
}
|
|
116
116
|
};
|
|
117
117
|
switch(e.key){
|
|
118
118
|
case 'ArrowDown':
|
|
119
119
|
if (delegate.getKeyBelow) {
|
|
120
|
+
var ref4, ref1;
|
|
120
121
|
e.preventDefault();
|
|
121
|
-
let nextKey = manager.focusedKey != null ? delegate.getKeyBelow(manager.focusedKey) : delegate.getFirstKey
|
|
122
|
-
if (nextKey == null && shouldFocusWrap) nextKey = delegate.getFirstKey
|
|
122
|
+
let nextKey = manager.focusedKey != null ? delegate.getKeyBelow(manager.focusedKey) : (ref4 = delegate.getFirstKey) === null || ref4 === void 0 ? void 0 : ref4.call(delegate);
|
|
123
|
+
if (nextKey == null && shouldFocusWrap) nextKey = (ref1 = delegate.getFirstKey) === null || ref1 === void 0 ? void 0 : ref1.call(delegate, manager.focusedKey);
|
|
123
124
|
navigateToKey(nextKey);
|
|
124
125
|
}
|
|
125
126
|
break;
|
|
126
127
|
case 'ArrowUp':
|
|
127
128
|
if (delegate.getKeyAbove) {
|
|
129
|
+
var ref2, ref3;
|
|
128
130
|
e.preventDefault();
|
|
129
|
-
let nextKey = manager.focusedKey != null ? delegate.getKeyAbove(manager.focusedKey) : delegate.getLastKey
|
|
130
|
-
if (nextKey == null && shouldFocusWrap) nextKey = delegate.getLastKey
|
|
131
|
+
let nextKey = manager.focusedKey != null ? delegate.getKeyAbove(manager.focusedKey) : (ref2 = delegate.getLastKey) === null || ref2 === void 0 ? void 0 : ref2.call(delegate);
|
|
132
|
+
if (nextKey == null && shouldFocusWrap) nextKey = (ref3 = delegate.getLastKey) === null || ref3 === void 0 ? void 0 : ref3.call(delegate, manager.focusedKey);
|
|
131
133
|
navigateToKey(nextKey);
|
|
132
134
|
}
|
|
133
135
|
break;
|
|
@@ -148,18 +150,18 @@ function $e872cdf6539aaf0b$export$d6daf82dcd84e87c(options) {
|
|
|
148
150
|
case 'Home':
|
|
149
151
|
if (delegate.getFirstKey) {
|
|
150
152
|
e.preventDefault();
|
|
151
|
-
let firstKey = delegate.getFirstKey(manager.focusedKey, $
|
|
153
|
+
let firstKey = delegate.getFirstKey(manager.focusedKey, $40e30a50815aad5e$export$16792effe837dba3(e));
|
|
152
154
|
manager.setFocusedKey(firstKey);
|
|
153
|
-
if ($
|
|
155
|
+
if ($40e30a50815aad5e$export$16792effe837dba3(e) && e.shiftKey && manager.selectionMode === 'multiple') manager.extendSelection(firstKey);
|
|
154
156
|
else if (selectOnFocus) manager.replaceSelection(firstKey);
|
|
155
157
|
}
|
|
156
158
|
break;
|
|
157
159
|
case 'End':
|
|
158
160
|
if (delegate.getLastKey) {
|
|
159
161
|
e.preventDefault();
|
|
160
|
-
let lastKey = delegate.getLastKey(manager.focusedKey, $
|
|
162
|
+
let lastKey = delegate.getLastKey(manager.focusedKey, $40e30a50815aad5e$export$16792effe837dba3(e));
|
|
161
163
|
manager.setFocusedKey(lastKey);
|
|
162
|
-
if ($
|
|
164
|
+
if ($40e30a50815aad5e$export$16792effe837dba3(e) && e.shiftKey && manager.selectionMode === 'multiple') manager.extendSelection(lastKey);
|
|
163
165
|
else if (selectOnFocus) manager.replaceSelection(lastKey);
|
|
164
166
|
}
|
|
165
167
|
break;
|
|
@@ -178,7 +180,7 @@ function $e872cdf6539aaf0b$export$d6daf82dcd84e87c(options) {
|
|
|
178
180
|
}
|
|
179
181
|
break;
|
|
180
182
|
case 'a':
|
|
181
|
-
if ($
|
|
183
|
+
if ($40e30a50815aad5e$export$16792effe837dba3(e) && manager.selectionMode === 'multiple' && disallowSelectAll !== true) {
|
|
182
184
|
e.preventDefault();
|
|
183
185
|
manager.selectAll();
|
|
184
186
|
}
|
|
@@ -197,7 +199,7 @@ function $e872cdf6539aaf0b$export$d6daf82dcd84e87c(options) {
|
|
|
197
199
|
// rather than the currently focused one.
|
|
198
200
|
if (e.shiftKey) ref.current.focus();
|
|
199
201
|
else {
|
|
200
|
-
let walker = $
|
|
202
|
+
let walker = $3GohX$reactariafocus.getFocusableTreeWalker(ref.current, {
|
|
201
203
|
tabbable: true
|
|
202
204
|
});
|
|
203
205
|
let next;
|
|
@@ -206,18 +208,18 @@ function $e872cdf6539aaf0b$export$d6daf82dcd84e87c(options) {
|
|
|
206
208
|
last = walker.lastChild();
|
|
207
209
|
if (last) next = last;
|
|
208
210
|
}while (last)
|
|
209
|
-
if (next && !next.contains(document.activeElement)) $
|
|
211
|
+
if (next && !next.contains(document.activeElement)) $3GohX$reactariautils.focusWithoutScrolling(next);
|
|
210
212
|
}
|
|
211
213
|
break;
|
|
212
214
|
}
|
|
213
215
|
}
|
|
214
216
|
};
|
|
215
217
|
// Store the scroll position so we can restore it later.
|
|
216
|
-
let scrollPos = $
|
|
218
|
+
let scrollPos = $3GohX$react.useRef({
|
|
217
219
|
top: 0,
|
|
218
220
|
left: 0
|
|
219
221
|
});
|
|
220
|
-
$
|
|
222
|
+
$3GohX$reactariautils.useEvent(scrollRef, 'scroll', isVirtualized ? null : ()=>{
|
|
221
223
|
scrollPos.current = {
|
|
222
224
|
top: scrollRef.current.scrollTop,
|
|
223
225
|
left: scrollRef.current.scrollLeft
|
|
@@ -243,8 +245,9 @@ function $e872cdf6539aaf0b$export$d6daf82dcd84e87c(options) {
|
|
|
243
245
|
// Attempt to detect whether the user is tabbing forward or backward into the collection
|
|
244
246
|
// and either focus the first or last item accordingly.
|
|
245
247
|
let relatedTarget = e.relatedTarget;
|
|
246
|
-
|
|
247
|
-
|
|
248
|
+
var _lastSelectedKey, _firstSelectedKey;
|
|
249
|
+
if (relatedTarget && e.currentTarget.compareDocumentPosition(relatedTarget) & Node.DOCUMENT_POSITION_FOLLOWING) navigateToFirstKey((_lastSelectedKey = manager.lastSelectedKey) !== null && _lastSelectedKey !== void 0 ? _lastSelectedKey : delegate.getLastKey());
|
|
250
|
+
else navigateToFirstKey((_firstSelectedKey = manager.firstSelectedKey) !== null && _firstSelectedKey !== void 0 ? _firstSelectedKey : delegate.getFirstKey());
|
|
248
251
|
} else if (!isVirtualized) {
|
|
249
252
|
// Restore the scroll position to what it was before.
|
|
250
253
|
scrollRef.current.scrollTop = scrollPos.current.top;
|
|
@@ -253,8 +256,8 @@ function $e872cdf6539aaf0b$export$d6daf82dcd84e87c(options) {
|
|
|
253
256
|
let element = scrollRef.current.querySelector(`[data-key="${manager.focusedKey}"]`);
|
|
254
257
|
if (element) {
|
|
255
258
|
// This prevents a flash of focus on the first/last element in the collection
|
|
256
|
-
$
|
|
257
|
-
$
|
|
259
|
+
$3GohX$reactariautils.focusWithoutScrolling(element);
|
|
260
|
+
$3GohX$reactariautils.scrollIntoView(scrollRef.current, element);
|
|
258
261
|
}
|
|
259
262
|
}
|
|
260
263
|
};
|
|
@@ -262,8 +265,8 @@ function $e872cdf6539aaf0b$export$d6daf82dcd84e87c(options) {
|
|
|
262
265
|
// Don't set blurred and then focused again if moving focus within the collection.
|
|
263
266
|
if (!e.currentTarget.contains(e.relatedTarget)) manager.setFocused(false);
|
|
264
267
|
};
|
|
265
|
-
const autoFocusRef = $
|
|
266
|
-
$
|
|
268
|
+
const autoFocusRef = $3GohX$react.useRef(autoFocus);
|
|
269
|
+
$3GohX$react.useEffect(()=>{
|
|
267
270
|
if (autoFocusRef.current) {
|
|
268
271
|
let focusedKey = null;
|
|
269
272
|
// Check focus strategy to determine which item to focus
|
|
@@ -275,17 +278,17 @@ function $e872cdf6539aaf0b$export$d6daf82dcd84e87c(options) {
|
|
|
275
278
|
manager.setFocused(true);
|
|
276
279
|
manager.setFocusedKey(focusedKey);
|
|
277
280
|
// If no default focus key is selected, focus the collection itself.
|
|
278
|
-
if (focusedKey == null && !shouldUseVirtualFocus) $
|
|
281
|
+
if (focusedKey == null && !shouldUseVirtualFocus) $3GohX$reactariafocus.focusSafely(ref.current);
|
|
279
282
|
}
|
|
280
283
|
autoFocusRef.current = false;
|
|
281
284
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
282
285
|
}, []);
|
|
283
286
|
// If not virtualized, scroll the focused element into view when the focusedKey changes.
|
|
284
287
|
// When virtualized, Virtualizer handles this internally.
|
|
285
|
-
$
|
|
286
|
-
if (!isVirtualized && manager.focusedKey && scrollRef
|
|
288
|
+
$3GohX$react.useEffect(()=>{
|
|
289
|
+
if (!isVirtualized && manager.focusedKey && (scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current)) {
|
|
287
290
|
let element = scrollRef.current.querySelector(`[data-key="${manager.focusedKey}"]`);
|
|
288
|
-
if (element) $
|
|
291
|
+
if (element) $3GohX$reactariautils.scrollIntoView(scrollRef.current, element);
|
|
289
292
|
}
|
|
290
293
|
}, [
|
|
291
294
|
isVirtualized,
|
|
@@ -302,11 +305,11 @@ function $e872cdf6539aaf0b$export$d6daf82dcd84e87c(options) {
|
|
|
302
305
|
e.preventDefault();
|
|
303
306
|
}
|
|
304
307
|
};
|
|
305
|
-
let { typeSelectProps: typeSelectProps } = $
|
|
308
|
+
let { typeSelectProps: typeSelectProps } = $a8171b79152768c9$export$e32c88dfddc6e1d8({
|
|
306
309
|
keyboardDelegate: delegate,
|
|
307
310
|
selectionManager: manager
|
|
308
311
|
});
|
|
309
|
-
if (!disallowTypeAhead) handlers = $
|
|
312
|
+
if (!disallowTypeAhead) handlers = $3GohX$reactariautils.mergeProps(typeSelectProps, handlers);
|
|
310
313
|
// If nothing is focused within the collection, make the collection itself tabbable.
|
|
311
314
|
// This will be marshalled to either the first or last item depending on where focus came from.
|
|
312
315
|
// If using virtual focus, don't set a tabIndex at all so that VoiceOver on iOS 14 doesn't try
|
|
@@ -322,35 +325,35 @@ function $e872cdf6539aaf0b$export$d6daf82dcd84e87c(options) {
|
|
|
322
325
|
}
|
|
323
326
|
|
|
324
327
|
|
|
325
|
-
var $
|
|
328
|
+
var $bfd2b5c64cb54dc6$exports = {};
|
|
326
329
|
|
|
327
|
-
$parcel$export($
|
|
330
|
+
$parcel$export($bfd2b5c64cb54dc6$exports, "useSelectableItem", () => $bfd2b5c64cb54dc6$export$ecf600387e221c37);
|
|
328
331
|
|
|
329
332
|
|
|
330
333
|
|
|
331
334
|
|
|
332
335
|
|
|
333
|
-
function $
|
|
336
|
+
function $bfd2b5c64cb54dc6$export$ecf600387e221c37(options) {
|
|
334
337
|
let { selectionManager: manager , key: key , ref: ref , shouldSelectOnPressUp: shouldSelectOnPressUp , isVirtualized: isVirtualized , shouldUseVirtualFocus: shouldUseVirtualFocus , focus: focus , isDisabled: isDisabled , onAction: onAction } = options;
|
|
335
338
|
let onSelect = (e)=>{
|
|
336
|
-
if (e.pointerType === 'keyboard' && $
|
|
339
|
+
if (e.pointerType === 'keyboard' && $40e30a50815aad5e$export$d3e3bd3e26688c04(e)) manager.toggleSelection(key);
|
|
337
340
|
else {
|
|
338
341
|
if (manager.selectionMode === 'none') return;
|
|
339
342
|
if (manager.selectionMode === 'single') {
|
|
340
343
|
if (manager.isSelected(key) && !manager.disallowEmptySelection) manager.toggleSelection(key);
|
|
341
344
|
else manager.replaceSelection(key);
|
|
342
345
|
} else if (e && e.shiftKey) manager.extendSelection(key);
|
|
343
|
-
else if (manager.selectionBehavior === 'toggle' || e && ($
|
|
346
|
+
else if (manager.selectionBehavior === 'toggle' || e && ($40e30a50815aad5e$export$16792effe837dba3(e) || e.pointerType === 'touch' || e.pointerType === 'virtual')) // if touch or virtual (VO) then we just want to toggle, otherwise it's impossible to multi select because they don't have modifier keys
|
|
344
347
|
manager.toggleSelection(key);
|
|
345
348
|
else manager.replaceSelection(key);
|
|
346
349
|
}
|
|
347
350
|
};
|
|
348
351
|
// Focus the associated DOM node when this item becomes the focusedKey
|
|
349
352
|
let isFocused = key === manager.focusedKey;
|
|
350
|
-
$
|
|
353
|
+
$3GohX$react.useEffect(()=>{
|
|
351
354
|
if (isFocused && manager.isFocused && !shouldUseVirtualFocus && document.activeElement !== ref.current) {
|
|
352
355
|
if (focus) focus();
|
|
353
|
-
else $
|
|
356
|
+
else $3GohX$reactariafocus.focusSafely(ref.current);
|
|
354
357
|
}
|
|
355
358
|
}, [
|
|
356
359
|
ref,
|
|
@@ -371,7 +374,7 @@ function $d4f3f6d764be397c$export$ecf600387e221c37(options) {
|
|
|
371
374
|
if (e.target === ref.current) manager.setFocusedKey(key);
|
|
372
375
|
}
|
|
373
376
|
};
|
|
374
|
-
let modality = $
|
|
377
|
+
let modality = $3GohX$react.useRef(null);
|
|
375
378
|
let hasPrimaryAction = onAction && manager.selectionMode === 'none';
|
|
376
379
|
let hasSecondaryAction = onAction && manager.selectionMode !== 'none' && manager.selectionBehavior === 'replace';
|
|
377
380
|
let allowsSelection = !isDisabled && manager.canSelectItem(key);
|
|
@@ -411,7 +414,7 @@ function $d4f3f6d764be397c$export$ecf600387e221c37(options) {
|
|
|
411
414
|
}
|
|
412
415
|
if (!isVirtualized) itemProps['data-key'] = key;
|
|
413
416
|
itemPressProps.preventFocusOnPress = shouldUseVirtualFocus;
|
|
414
|
-
let { pressProps: pressProps , isPressed: isPressed } = $
|
|
417
|
+
let { pressProps: pressProps , isPressed: isPressed } = $3GohX$reactariainteractions.usePress(itemPressProps);
|
|
415
418
|
// Double clicking with a mouse with selectionBehavior = 'replace' performs an action.
|
|
416
419
|
let onDoubleClick = hasSecondaryAction ? (e)=>{
|
|
417
420
|
if (modality.current === 'mouse') {
|
|
@@ -424,7 +427,7 @@ function $d4f3f6d764be397c$export$ecf600387e221c37(options) {
|
|
|
424
427
|
// to 'toggle'. This changes the single tap behavior from performing an action (i.e. navigating) to
|
|
425
428
|
// selecting, and may toggle the appearance of a UI affordance like checkboxes on each item.
|
|
426
429
|
// TODO: what about when drag and drop is also enabled??
|
|
427
|
-
let { longPressProps: longPressProps } = $
|
|
430
|
+
let { longPressProps: longPressProps } = $3GohX$reactariainteractions.useLongPress({
|
|
428
431
|
isDisabled: !hasSecondaryAction,
|
|
429
432
|
onLongPress (e) {
|
|
430
433
|
if (e.pointerType === 'touch') {
|
|
@@ -438,7 +441,7 @@ function $d4f3f6d764be397c$export$ecf600387e221c37(options) {
|
|
|
438
441
|
if (e.key === 'Enter') onAction();
|
|
439
442
|
} : undefined;
|
|
440
443
|
return {
|
|
441
|
-
itemProps: $
|
|
444
|
+
itemProps: $3GohX$reactariautils.mergeProps(itemProps, allowsSelection || hasPrimaryAction ? pressProps : {
|
|
442
445
|
}, hasSecondaryAction ? longPressProps : {
|
|
443
446
|
}, {
|
|
444
447
|
onKeyUp: onKeyUp,
|
|
@@ -449,20 +452,14 @@ function $d4f3f6d764be397c$export$ecf600387e221c37(options) {
|
|
|
449
452
|
}
|
|
450
453
|
|
|
451
454
|
|
|
452
|
-
var $
|
|
455
|
+
var $3c0aa40595867118$exports = {};
|
|
453
456
|
|
|
454
|
-
$parcel$export($
|
|
457
|
+
$parcel$export($3c0aa40595867118$exports, "useSelectableList", () => $3c0aa40595867118$export$b95089534ab7c1fd);
|
|
455
458
|
|
|
456
|
-
var $
|
|
459
|
+
var $773bd45d87d961b3$exports = {};
|
|
457
460
|
|
|
458
|
-
$parcel$export($
|
|
459
|
-
class $
|
|
460
|
-
constructor(collection, disabledKeys, ref, collator){
|
|
461
|
-
this.collection = collection;
|
|
462
|
-
this.disabledKeys = disabledKeys;
|
|
463
|
-
this.ref = ref;
|
|
464
|
-
this.collator = collator;
|
|
465
|
-
}
|
|
461
|
+
$parcel$export($773bd45d87d961b3$exports, "ListKeyboardDelegate", () => $773bd45d87d961b3$export$a05409b8bb224a5a);
|
|
462
|
+
class $773bd45d87d961b3$export$a05409b8bb224a5a {
|
|
466
463
|
getKeyBelow(key) {
|
|
467
464
|
key = this.collection.getKeyAfter(key);
|
|
468
465
|
while(key != null){
|
|
@@ -532,20 +529,26 @@ class $4c5a6431f43e7e74$export$a05409b8bb224a5a {
|
|
|
532
529
|
}
|
|
533
530
|
return null;
|
|
534
531
|
}
|
|
532
|
+
constructor(collection, disabledKeys, ref, collator){
|
|
533
|
+
this.collection = collection;
|
|
534
|
+
this.disabledKeys = disabledKeys;
|
|
535
|
+
this.ref = ref;
|
|
536
|
+
this.collator = collator;
|
|
537
|
+
}
|
|
535
538
|
}
|
|
536
539
|
|
|
537
540
|
|
|
538
541
|
|
|
539
542
|
|
|
540
|
-
function $
|
|
543
|
+
function $3c0aa40595867118$export$b95089534ab7c1fd(props) {
|
|
541
544
|
let { selectionManager: selectionManager , collection: collection , disabledKeys: disabledKeys , ref: ref , keyboardDelegate: keyboardDelegate , autoFocus: autoFocus , shouldFocusWrap: shouldFocusWrap , isVirtualized: isVirtualized , disallowEmptySelection: disallowEmptySelection , selectOnFocus: selectOnFocus = false , disallowTypeAhead: disallowTypeAhead , shouldUseVirtualFocus: shouldUseVirtualFocus , allowsTabNavigation: allowsTabNavigation } = props;
|
|
542
545
|
// By default, a KeyboardDelegate is provided which uses the DOM to query layout information (e.g. for page up/page down).
|
|
543
546
|
// When virtualized, the layout object will be passed in as a prop and override this.
|
|
544
|
-
let collator = $
|
|
547
|
+
let collator = $3GohX$reactariai18n.useCollator({
|
|
545
548
|
usage: 'search',
|
|
546
549
|
sensitivity: 'base'
|
|
547
550
|
});
|
|
548
|
-
let delegate = $
|
|
551
|
+
let delegate = $3GohX$react.useMemo(()=>keyboardDelegate || new $773bd45d87d961b3$export$a05409b8bb224a5a(collection, disabledKeys, ref, collator)
|
|
549
552
|
, [
|
|
550
553
|
keyboardDelegate,
|
|
551
554
|
collection,
|
|
@@ -553,7 +556,7 @@ function $1908cf9b6ab7b508$export$b95089534ab7c1fd(props) {
|
|
|
553
556
|
ref,
|
|
554
557
|
collator
|
|
555
558
|
]);
|
|
556
|
-
let { collectionProps: collectionProps } = $
|
|
559
|
+
let { collectionProps: collectionProps } = $63f28da12772fd84$export$d6daf82dcd84e87c({
|
|
557
560
|
ref: ref,
|
|
558
561
|
selectionManager: selectionManager,
|
|
559
562
|
keyboardDelegate: delegate,
|
|
@@ -575,11 +578,11 @@ function $1908cf9b6ab7b508$export$b95089534ab7c1fd(props) {
|
|
|
575
578
|
|
|
576
579
|
|
|
577
580
|
|
|
578
|
-
$parcel$exportWildcard(module.exports, $
|
|
579
|
-
$parcel$exportWildcard(module.exports, $
|
|
580
|
-
$parcel$exportWildcard(module.exports, $
|
|
581
|
-
$parcel$exportWildcard(module.exports, $
|
|
582
|
-
$parcel$exportWildcard(module.exports, $
|
|
581
|
+
$parcel$exportWildcard(module.exports, $63f28da12772fd84$exports);
|
|
582
|
+
$parcel$exportWildcard(module.exports, $bfd2b5c64cb54dc6$exports);
|
|
583
|
+
$parcel$exportWildcard(module.exports, $3c0aa40595867118$exports);
|
|
584
|
+
$parcel$exportWildcard(module.exports, $773bd45d87d961b3$exports);
|
|
585
|
+
$parcel$exportWildcard(module.exports, $a8171b79152768c9$exports);
|
|
583
586
|
|
|
584
587
|
|
|
585
588
|
//# sourceMappingURL=main.js.map
|