@react-aria/selection 3.7.3 → 3.8.2
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 +75 -67
- package/dist/main.js.map +1 -1
- package/dist/module.js +71 -63
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/useSelectableItem.ts +27 -7
package/dist/main.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $
|
|
3
|
-
var $
|
|
4
|
-
var $
|
|
5
|
-
var $
|
|
1
|
+
var $glPPV$react = require("react");
|
|
2
|
+
var $glPPV$reactariafocus = require("@react-aria/focus");
|
|
3
|
+
var $glPPV$reactariautils = require("@react-aria/utils");
|
|
4
|
+
var $glPPV$reactariai18n = require("@react-aria/i18n");
|
|
5
|
+
var $glPPV$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 $b6837c2f80a3c32f$exports = {};
|
|
27
27
|
|
|
28
|
-
$parcel$export($
|
|
28
|
+
$parcel$export($b6837c2f80a3c32f$exports, "useSelectableCollection", () => $b6837c2f80a3c32f$export$d6daf82dcd84e87c);
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
function $
|
|
34
|
+
function $ee0bdf4faa47f2a8$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 $glPPV$reactariautils.isAppleDevice() ? e.altKey : e.ctrlKey;
|
|
38
38
|
}
|
|
39
|
-
function $
|
|
40
|
-
if ($
|
|
39
|
+
function $ee0bdf4faa47f2a8$export$16792effe837dba3(e) {
|
|
40
|
+
if ($glPPV$reactariautils.isMac()) return e.metaKey;
|
|
41
41
|
return e.ctrlKey;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
var $
|
|
46
|
+
var $a1189052f36475e8$exports = {};
|
|
47
47
|
|
|
48
|
-
$parcel$export($
|
|
48
|
+
$parcel$export($a1189052f36475e8$exports, "useTypeSelect", () => $a1189052f36475e8$export$e32c88dfddc6e1d8);
|
|
49
49
|
|
|
50
|
-
function $
|
|
50
|
+
function $a1189052f36475e8$export$e32c88dfddc6e1d8(options) {
|
|
51
51
|
let { keyboardDelegate: keyboardDelegate , selectionManager: selectionManager , onTypeSelect: onTypeSelect } = options;
|
|
52
|
-
let state = $
|
|
52
|
+
let state = $glPPV$react.useRef({
|
|
53
53
|
search: '',
|
|
54
54
|
timeout: null
|
|
55
55
|
}).current;
|
|
56
56
|
let onKeyDown = (e)=>{
|
|
57
|
-
let character = $
|
|
57
|
+
let character = $a1189052f36475e8$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 $a8171b79152768c9$export$e32c88dfddc6e1d8(options) {
|
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
-
function $
|
|
90
|
+
function $a1189052f36475e8$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 $a8171b79152768c9$var$getStringForKey(key) {
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
|
|
100
|
-
function $
|
|
100
|
+
function $b6837c2f80a3c32f$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 } = $glPPV$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,7 +111,7 @@ function $63f28da12772fd84$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 && !$ee0bdf4faa47f2a8$export$d3e3bd3e26688c04(e)) manager.replaceSelection(key);
|
|
115
115
|
}
|
|
116
116
|
};
|
|
117
117
|
switch(e.key){
|
|
@@ -150,18 +150,18 @@ function $63f28da12772fd84$export$d6daf82dcd84e87c(options) {
|
|
|
150
150
|
case 'Home':
|
|
151
151
|
if (delegate.getFirstKey) {
|
|
152
152
|
e.preventDefault();
|
|
153
|
-
let firstKey = delegate.getFirstKey(manager.focusedKey, $
|
|
153
|
+
let firstKey = delegate.getFirstKey(manager.focusedKey, $ee0bdf4faa47f2a8$export$16792effe837dba3(e));
|
|
154
154
|
manager.setFocusedKey(firstKey);
|
|
155
|
-
if ($
|
|
155
|
+
if ($ee0bdf4faa47f2a8$export$16792effe837dba3(e) && e.shiftKey && manager.selectionMode === 'multiple') manager.extendSelection(firstKey);
|
|
156
156
|
else if (selectOnFocus) manager.replaceSelection(firstKey);
|
|
157
157
|
}
|
|
158
158
|
break;
|
|
159
159
|
case 'End':
|
|
160
160
|
if (delegate.getLastKey) {
|
|
161
161
|
e.preventDefault();
|
|
162
|
-
let lastKey = delegate.getLastKey(manager.focusedKey, $
|
|
162
|
+
let lastKey = delegate.getLastKey(manager.focusedKey, $ee0bdf4faa47f2a8$export$16792effe837dba3(e));
|
|
163
163
|
manager.setFocusedKey(lastKey);
|
|
164
|
-
if ($
|
|
164
|
+
if ($ee0bdf4faa47f2a8$export$16792effe837dba3(e) && e.shiftKey && manager.selectionMode === 'multiple') manager.extendSelection(lastKey);
|
|
165
165
|
else if (selectOnFocus) manager.replaceSelection(lastKey);
|
|
166
166
|
}
|
|
167
167
|
break;
|
|
@@ -180,7 +180,7 @@ function $63f28da12772fd84$export$d6daf82dcd84e87c(options) {
|
|
|
180
180
|
}
|
|
181
181
|
break;
|
|
182
182
|
case 'a':
|
|
183
|
-
if ($
|
|
183
|
+
if ($ee0bdf4faa47f2a8$export$16792effe837dba3(e) && manager.selectionMode === 'multiple' && disallowSelectAll !== true) {
|
|
184
184
|
e.preventDefault();
|
|
185
185
|
manager.selectAll();
|
|
186
186
|
}
|
|
@@ -199,7 +199,7 @@ function $63f28da12772fd84$export$d6daf82dcd84e87c(options) {
|
|
|
199
199
|
// rather than the currently focused one.
|
|
200
200
|
if (e.shiftKey) ref.current.focus();
|
|
201
201
|
else {
|
|
202
|
-
let walker = $
|
|
202
|
+
let walker = $glPPV$reactariafocus.getFocusableTreeWalker(ref.current, {
|
|
203
203
|
tabbable: true
|
|
204
204
|
});
|
|
205
205
|
let next;
|
|
@@ -208,18 +208,18 @@ function $63f28da12772fd84$export$d6daf82dcd84e87c(options) {
|
|
|
208
208
|
last = walker.lastChild();
|
|
209
209
|
if (last) next = last;
|
|
210
210
|
}while (last)
|
|
211
|
-
if (next && !next.contains(document.activeElement)) $
|
|
211
|
+
if (next && !next.contains(document.activeElement)) $glPPV$reactariautils.focusWithoutScrolling(next);
|
|
212
212
|
}
|
|
213
213
|
break;
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
};
|
|
217
217
|
// Store the scroll position so we can restore it later.
|
|
218
|
-
let scrollPos = $
|
|
218
|
+
let scrollPos = $glPPV$react.useRef({
|
|
219
219
|
top: 0,
|
|
220
220
|
left: 0
|
|
221
221
|
});
|
|
222
|
-
$
|
|
222
|
+
$glPPV$reactariautils.useEvent(scrollRef, 'scroll', isVirtualized ? null : ()=>{
|
|
223
223
|
scrollPos.current = {
|
|
224
224
|
top: scrollRef.current.scrollTop,
|
|
225
225
|
left: scrollRef.current.scrollLeft
|
|
@@ -256,8 +256,8 @@ function $63f28da12772fd84$export$d6daf82dcd84e87c(options) {
|
|
|
256
256
|
let element = scrollRef.current.querySelector(`[data-key="${manager.focusedKey}"]`);
|
|
257
257
|
if (element) {
|
|
258
258
|
// This prevents a flash of focus on the first/last element in the collection
|
|
259
|
-
$
|
|
260
|
-
$
|
|
259
|
+
$glPPV$reactariautils.focusWithoutScrolling(element);
|
|
260
|
+
$glPPV$reactariautils.scrollIntoView(scrollRef.current, element);
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
};
|
|
@@ -265,8 +265,8 @@ function $63f28da12772fd84$export$d6daf82dcd84e87c(options) {
|
|
|
265
265
|
// Don't set blurred and then focused again if moving focus within the collection.
|
|
266
266
|
if (!e.currentTarget.contains(e.relatedTarget)) manager.setFocused(false);
|
|
267
267
|
};
|
|
268
|
-
const autoFocusRef = $
|
|
269
|
-
$
|
|
268
|
+
const autoFocusRef = $glPPV$react.useRef(autoFocus);
|
|
269
|
+
$glPPV$react.useEffect(()=>{
|
|
270
270
|
if (autoFocusRef.current) {
|
|
271
271
|
let focusedKey = null;
|
|
272
272
|
// Check focus strategy to determine which item to focus
|
|
@@ -278,17 +278,17 @@ function $63f28da12772fd84$export$d6daf82dcd84e87c(options) {
|
|
|
278
278
|
manager.setFocused(true);
|
|
279
279
|
manager.setFocusedKey(focusedKey);
|
|
280
280
|
// If no default focus key is selected, focus the collection itself.
|
|
281
|
-
if (focusedKey == null && !shouldUseVirtualFocus) $
|
|
281
|
+
if (focusedKey == null && !shouldUseVirtualFocus) $glPPV$reactariafocus.focusSafely(ref.current);
|
|
282
282
|
}
|
|
283
283
|
autoFocusRef.current = false;
|
|
284
284
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
285
285
|
}, []);
|
|
286
286
|
// If not virtualized, scroll the focused element into view when the focusedKey changes.
|
|
287
287
|
// When virtualized, Virtualizer handles this internally.
|
|
288
|
-
$
|
|
288
|
+
$glPPV$react.useEffect(()=>{
|
|
289
289
|
if (!isVirtualized && manager.focusedKey && (scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current)) {
|
|
290
290
|
let element = scrollRef.current.querySelector(`[data-key="${manager.focusedKey}"]`);
|
|
291
|
-
if (element) $
|
|
291
|
+
if (element) $glPPV$reactariautils.scrollIntoView(scrollRef.current, element);
|
|
292
292
|
}
|
|
293
293
|
}, [
|
|
294
294
|
isVirtualized,
|
|
@@ -305,11 +305,11 @@ function $63f28da12772fd84$export$d6daf82dcd84e87c(options) {
|
|
|
305
305
|
e.preventDefault();
|
|
306
306
|
}
|
|
307
307
|
};
|
|
308
|
-
let { typeSelectProps: typeSelectProps } = $
|
|
308
|
+
let { typeSelectProps: typeSelectProps } = $a1189052f36475e8$export$e32c88dfddc6e1d8({
|
|
309
309
|
keyboardDelegate: delegate,
|
|
310
310
|
selectionManager: manager
|
|
311
311
|
});
|
|
312
|
-
if (!disallowTypeAhead) handlers = $
|
|
312
|
+
if (!disallowTypeAhead) handlers = $glPPV$reactariautils.mergeProps(typeSelectProps, handlers);
|
|
313
313
|
// If nothing is focused within the collection, make the collection itself tabbable.
|
|
314
314
|
// This will be marshalled to either the first or last item depending on where focus came from.
|
|
315
315
|
// If using virtual focus, don't set a tabIndex at all so that VoiceOver on iOS 14 doesn't try
|
|
@@ -325,35 +325,35 @@ function $63f28da12772fd84$export$d6daf82dcd84e87c(options) {
|
|
|
325
325
|
}
|
|
326
326
|
|
|
327
327
|
|
|
328
|
-
var $
|
|
328
|
+
var $433b1145b0781e10$exports = {};
|
|
329
329
|
|
|
330
|
-
$parcel$export($
|
|
330
|
+
$parcel$export($433b1145b0781e10$exports, "useSelectableItem", () => $433b1145b0781e10$export$ecf600387e221c37);
|
|
331
331
|
|
|
332
332
|
|
|
333
333
|
|
|
334
334
|
|
|
335
335
|
|
|
336
|
-
function $
|
|
337
|
-
let { selectionManager: manager , key: key , ref: ref , shouldSelectOnPressUp: shouldSelectOnPressUp , isVirtualized: isVirtualized , shouldUseVirtualFocus: shouldUseVirtualFocus , focus: focus , isDisabled: isDisabled , onAction: onAction } = options;
|
|
336
|
+
function $433b1145b0781e10$export$ecf600387e221c37(options) {
|
|
337
|
+
let { selectionManager: manager , key: key , ref: ref , shouldSelectOnPressUp: shouldSelectOnPressUp , isVirtualized: isVirtualized , shouldUseVirtualFocus: shouldUseVirtualFocus , focus: focus , isDisabled: isDisabled , onAction: onAction , allowsDifferentPressOrigin: allowsDifferentPressOrigin } = options;
|
|
338
338
|
let onSelect = (e)=>{
|
|
339
|
-
if (e.pointerType === 'keyboard' && $
|
|
339
|
+
if (e.pointerType === 'keyboard' && $ee0bdf4faa47f2a8$export$d3e3bd3e26688c04(e)) manager.toggleSelection(key);
|
|
340
340
|
else {
|
|
341
341
|
if (manager.selectionMode === 'none') return;
|
|
342
342
|
if (manager.selectionMode === 'single') {
|
|
343
343
|
if (manager.isSelected(key) && !manager.disallowEmptySelection) manager.toggleSelection(key);
|
|
344
344
|
else manager.replaceSelection(key);
|
|
345
345
|
} else if (e && e.shiftKey) manager.extendSelection(key);
|
|
346
|
-
else if (manager.selectionBehavior === 'toggle' || e && ($
|
|
346
|
+
else if (manager.selectionBehavior === 'toggle' || e && ($ee0bdf4faa47f2a8$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
|
|
347
347
|
manager.toggleSelection(key);
|
|
348
348
|
else manager.replaceSelection(key);
|
|
349
349
|
}
|
|
350
350
|
};
|
|
351
351
|
// Focus the associated DOM node when this item becomes the focusedKey
|
|
352
352
|
let isFocused = key === manager.focusedKey;
|
|
353
|
-
$
|
|
353
|
+
$glPPV$react.useEffect(()=>{
|
|
354
354
|
if (isFocused && manager.isFocused && !shouldUseVirtualFocus && document.activeElement !== ref.current) {
|
|
355
355
|
if (focus) focus();
|
|
356
|
-
else $
|
|
356
|
+
else $glPPV$reactariafocus.focusSafely(ref.current);
|
|
357
357
|
}
|
|
358
358
|
}, [
|
|
359
359
|
ref,
|
|
@@ -374,7 +374,7 @@ function $bfd2b5c64cb54dc6$export$ecf600387e221c37(options) {
|
|
|
374
374
|
if (e.target === ref.current) manager.setFocusedKey(key);
|
|
375
375
|
}
|
|
376
376
|
};
|
|
377
|
-
let modality = $
|
|
377
|
+
let modality = $glPPV$react.useRef(null);
|
|
378
378
|
let hasPrimaryAction = onAction && manager.selectionMode === 'none';
|
|
379
379
|
let hasSecondaryAction = onAction && manager.selectionMode !== 'none' && manager.selectionBehavior === 'replace';
|
|
380
380
|
let allowsSelection = !isDisabled && manager.canSelectItem(key);
|
|
@@ -392,11 +392,19 @@ function $bfd2b5c64cb54dc6$export$ecf600387e221c37(options) {
|
|
|
392
392
|
modality.current = e.pointerType;
|
|
393
393
|
if (e.pointerType === 'keyboard') onSelect(e);
|
|
394
394
|
};
|
|
395
|
-
|
|
395
|
+
// If allowsDifferentPressOrigin, make selection happen on pressUp (e.g. open menu on press down, selection on menu item happens on press up.)
|
|
396
|
+
// Otherwise, have selection happen onPress (prevents listview row selection when clicking on interactable elements in the row)
|
|
397
|
+
if (!allowsDifferentPressOrigin) itemPressProps.onPress = (e)=>{
|
|
396
398
|
if (e.pointerType !== 'keyboard') onSelect(e);
|
|
399
|
+
if (hasPrimaryAction) onAction();
|
|
397
400
|
};
|
|
398
|
-
|
|
399
|
-
|
|
401
|
+
else {
|
|
402
|
+
itemPressProps.onPressUp = (e)=>{
|
|
403
|
+
if (e.pointerType !== 'keyboard') onSelect(e);
|
|
404
|
+
};
|
|
405
|
+
itemPressProps.onPress = hasPrimaryAction ? ()=>onAction()
|
|
406
|
+
: null;
|
|
407
|
+
}
|
|
400
408
|
} else {
|
|
401
409
|
// On touch, it feels strange to select on touch down, so we special case this.
|
|
402
410
|
itemPressProps.onPressStart = (e)=>{
|
|
@@ -414,7 +422,7 @@ function $bfd2b5c64cb54dc6$export$ecf600387e221c37(options) {
|
|
|
414
422
|
}
|
|
415
423
|
if (!isVirtualized) itemProps['data-key'] = key;
|
|
416
424
|
itemPressProps.preventFocusOnPress = shouldUseVirtualFocus;
|
|
417
|
-
let { pressProps: pressProps , isPressed: isPressed } = $
|
|
425
|
+
let { pressProps: pressProps , isPressed: isPressed } = $glPPV$reactariainteractions.usePress(itemPressProps);
|
|
418
426
|
// Double clicking with a mouse with selectionBehavior = 'replace' performs an action.
|
|
419
427
|
let onDoubleClick = hasSecondaryAction ? (e)=>{
|
|
420
428
|
if (modality.current === 'mouse') {
|
|
@@ -427,7 +435,7 @@ function $bfd2b5c64cb54dc6$export$ecf600387e221c37(options) {
|
|
|
427
435
|
// to 'toggle'. This changes the single tap behavior from performing an action (i.e. navigating) to
|
|
428
436
|
// selecting, and may toggle the appearance of a UI affordance like checkboxes on each item.
|
|
429
437
|
// TODO: what about when drag and drop is also enabled??
|
|
430
|
-
let { longPressProps: longPressProps } = $
|
|
438
|
+
let { longPressProps: longPressProps } = $glPPV$reactariainteractions.useLongPress({
|
|
431
439
|
isDisabled: !hasSecondaryAction,
|
|
432
440
|
onLongPress (e) {
|
|
433
441
|
if (e.pointerType === 'touch') {
|
|
@@ -441,7 +449,7 @@ function $bfd2b5c64cb54dc6$export$ecf600387e221c37(options) {
|
|
|
441
449
|
if (e.key === 'Enter') onAction();
|
|
442
450
|
} : undefined;
|
|
443
451
|
return {
|
|
444
|
-
itemProps: $
|
|
452
|
+
itemProps: $glPPV$reactariautils.mergeProps(itemProps, allowsSelection || hasPrimaryAction ? pressProps : {
|
|
445
453
|
}, hasSecondaryAction ? longPressProps : {
|
|
446
454
|
}, {
|
|
447
455
|
onKeyUp: onKeyUp,
|
|
@@ -452,14 +460,14 @@ function $bfd2b5c64cb54dc6$export$ecf600387e221c37(options) {
|
|
|
452
460
|
}
|
|
453
461
|
|
|
454
462
|
|
|
455
|
-
var $
|
|
463
|
+
var $bd230acee196f50c$exports = {};
|
|
456
464
|
|
|
457
|
-
$parcel$export($
|
|
465
|
+
$parcel$export($bd230acee196f50c$exports, "useSelectableList", () => $bd230acee196f50c$export$b95089534ab7c1fd);
|
|
458
466
|
|
|
459
|
-
var $
|
|
467
|
+
var $836f880b12dcae5c$exports = {};
|
|
460
468
|
|
|
461
|
-
$parcel$export($
|
|
462
|
-
class $
|
|
469
|
+
$parcel$export($836f880b12dcae5c$exports, "ListKeyboardDelegate", () => $836f880b12dcae5c$export$a05409b8bb224a5a);
|
|
470
|
+
class $836f880b12dcae5c$export$a05409b8bb224a5a {
|
|
463
471
|
getKeyBelow(key) {
|
|
464
472
|
key = this.collection.getKeyAfter(key);
|
|
465
473
|
while(key != null){
|
|
@@ -540,15 +548,15 @@ class $773bd45d87d961b3$export$a05409b8bb224a5a {
|
|
|
540
548
|
|
|
541
549
|
|
|
542
550
|
|
|
543
|
-
function $
|
|
551
|
+
function $bd230acee196f50c$export$b95089534ab7c1fd(props) {
|
|
544
552
|
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;
|
|
545
553
|
// By default, a KeyboardDelegate is provided which uses the DOM to query layout information (e.g. for page up/page down).
|
|
546
554
|
// When virtualized, the layout object will be passed in as a prop and override this.
|
|
547
|
-
let collator = $
|
|
555
|
+
let collator = $glPPV$reactariai18n.useCollator({
|
|
548
556
|
usage: 'search',
|
|
549
557
|
sensitivity: 'base'
|
|
550
558
|
});
|
|
551
|
-
let delegate = $
|
|
559
|
+
let delegate = $glPPV$react.useMemo(()=>keyboardDelegate || new $836f880b12dcae5c$export$a05409b8bb224a5a(collection, disabledKeys, ref, collator)
|
|
552
560
|
, [
|
|
553
561
|
keyboardDelegate,
|
|
554
562
|
collection,
|
|
@@ -556,7 +564,7 @@ function $3c0aa40595867118$export$b95089534ab7c1fd(props) {
|
|
|
556
564
|
ref,
|
|
557
565
|
collator
|
|
558
566
|
]);
|
|
559
|
-
let { collectionProps: collectionProps } = $
|
|
567
|
+
let { collectionProps: collectionProps } = $b6837c2f80a3c32f$export$d6daf82dcd84e87c({
|
|
560
568
|
ref: ref,
|
|
561
569
|
selectionManager: selectionManager,
|
|
562
570
|
keyboardDelegate: delegate,
|
|
@@ -578,11 +586,11 @@ function $3c0aa40595867118$export$b95089534ab7c1fd(props) {
|
|
|
578
586
|
|
|
579
587
|
|
|
580
588
|
|
|
581
|
-
$parcel$exportWildcard(module.exports, $
|
|
582
|
-
$parcel$exportWildcard(module.exports, $
|
|
583
|
-
$parcel$exportWildcard(module.exports, $
|
|
584
|
-
$parcel$exportWildcard(module.exports, $
|
|
585
|
-
$parcel$exportWildcard(module.exports, $
|
|
589
|
+
$parcel$exportWildcard(module.exports, $b6837c2f80a3c32f$exports);
|
|
590
|
+
$parcel$exportWildcard(module.exports, $433b1145b0781e10$exports);
|
|
591
|
+
$parcel$exportWildcard(module.exports, $bd230acee196f50c$exports);
|
|
592
|
+
$parcel$exportWildcard(module.exports, $836f880b12dcae5c$exports);
|
|
593
|
+
$parcel$exportWildcard(module.exports, $a1189052f36475e8$exports);
|
|
586
594
|
|
|
587
595
|
|
|
588
596
|
//# sourceMappingURL=main.js.map
|