@nebula.js/stardust 4.5.0-alpha.0 → 4.5.0
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/core/esm/dev.js +94 -81
- package/core/esm/dev.js.map +1 -1
- package/core/esm/index.js +3 -3
- package/core/esm/index.js.map +1 -1
- package/core/package.json +2 -2
- package/dist/stardust.dev.js +214 -175
- package/dist/stardust.dev.js.map +1 -1
- package/dist/stardust.js +9 -9
- package/dist/stardust.js.map +1 -1
- package/package.json +12 -12
package/core/esm/dev.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/stardust v4.5.0
|
|
2
|
+
* @nebula.js/stardust v4.5.0
|
|
3
3
|
* Copyright (c) 2023 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -708,26 +708,26 @@ var runtime = {exports: {}};
|
|
|
708
708
|
}
|
|
709
709
|
})(runtime);
|
|
710
710
|
|
|
711
|
-
function ownKeys(
|
|
712
|
-
var
|
|
711
|
+
function ownKeys(e, r) {
|
|
712
|
+
var t = Object.keys(e);
|
|
713
713
|
if (Object.getOwnPropertySymbols) {
|
|
714
|
-
var
|
|
715
|
-
|
|
716
|
-
return Object.getOwnPropertyDescriptor(
|
|
717
|
-
})),
|
|
718
|
-
}
|
|
719
|
-
return
|
|
720
|
-
}
|
|
721
|
-
function _objectSpread2(
|
|
722
|
-
for (var
|
|
723
|
-
var
|
|
724
|
-
|
|
725
|
-
_defineProperty(
|
|
726
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
727
|
-
Object.defineProperty(
|
|
714
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
715
|
+
r && (o = o.filter(function (r) {
|
|
716
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
717
|
+
})), t.push.apply(t, o);
|
|
718
|
+
}
|
|
719
|
+
return t;
|
|
720
|
+
}
|
|
721
|
+
function _objectSpread2(e) {
|
|
722
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
723
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
724
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
725
|
+
_defineProperty(e, r, t[r]);
|
|
726
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
727
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
728
728
|
});
|
|
729
729
|
}
|
|
730
|
-
return
|
|
730
|
+
return e;
|
|
731
731
|
}
|
|
732
732
|
function _defineProperty(obj, key, value) {
|
|
733
733
|
key = _toPropertyKey(key);
|
|
@@ -3950,7 +3950,11 @@ function deprecatedPropType(validator, reason) {
|
|
|
3950
3950
|
}
|
|
3951
3951
|
|
|
3952
3952
|
function isMuiElement(element, muiNames) {
|
|
3953
|
-
|
|
3953
|
+
var _muiName, _element$type;
|
|
3954
|
+
return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf( // For server components `muiName` is avaialble in element.type._payload.value.muiName
|
|
3955
|
+
// relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
|
|
3956
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
3957
|
+
(_muiName = element.type.muiName) != null ? _muiName : (_element$type = element.type) == null || (_element$type = _element$type._payload) == null || (_element$type = _element$type.value) == null ? void 0 : _element$type.muiName) !== -1;
|
|
3954
3958
|
}
|
|
3955
3959
|
|
|
3956
3960
|
function ownerDocument(node) {
|
|
@@ -3989,6 +3993,13 @@ function setRef(ref, value) {
|
|
|
3989
3993
|
}
|
|
3990
3994
|
}
|
|
3991
3995
|
|
|
3996
|
+
/**
|
|
3997
|
+
* A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.
|
|
3998
|
+
* This is useful for effects that are only needed for client-side rendering but not for SSR.
|
|
3999
|
+
*
|
|
4000
|
+
* Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
|
|
4001
|
+
* and confirm it doesn't apply to your use-case.
|
|
4002
|
+
*/
|
|
3992
4003
|
const useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
3993
4004
|
var useEnhancedEffect$1 = useEnhancedEffect;
|
|
3994
4005
|
|
|
@@ -4053,7 +4064,8 @@ function useControlled({
|
|
|
4053
4064
|
}
|
|
4054
4065
|
|
|
4055
4066
|
/**
|
|
4056
|
-
* https://github.com/facebook/react/issues/14099#issuecomment-440013892
|
|
4067
|
+
* Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892
|
|
4068
|
+
* See RFC in https://github.com/reactjs/rfcs/pull/220
|
|
4057
4069
|
*/
|
|
4058
4070
|
|
|
4059
4071
|
function useEventCallback(fn) {
|
|
@@ -5658,7 +5670,7 @@ function StyledEngineProvider(props) {
|
|
|
5658
5670
|
}
|
|
5659
5671
|
|
|
5660
5672
|
/**
|
|
5661
|
-
* @mui/styled-engine v5.14.
|
|
5673
|
+
* @mui/styled-engine v5.14.11
|
|
5662
5674
|
*
|
|
5663
5675
|
* @license MIT
|
|
5664
5676
|
* This source code is licensed under the MIT license found in the
|
|
@@ -6283,10 +6295,20 @@ const width = style$1({
|
|
|
6283
6295
|
const maxWidth = props => {
|
|
6284
6296
|
if (props.maxWidth !== undefined && props.maxWidth !== null) {
|
|
6285
6297
|
const styleFromPropValue = propValue => {
|
|
6286
|
-
var _props$theme;
|
|
6298
|
+
var _props$theme, _props$theme2;
|
|
6287
6299
|
const breakpoint = ((_props$theme = props.theme) == null || (_props$theme = _props$theme.breakpoints) == null || (_props$theme = _props$theme.values) == null ? void 0 : _props$theme[propValue]) || values[propValue];
|
|
6300
|
+
if (!breakpoint) {
|
|
6301
|
+
return {
|
|
6302
|
+
maxWidth: sizingTransform(propValue)
|
|
6303
|
+
};
|
|
6304
|
+
}
|
|
6305
|
+
if (((_props$theme2 = props.theme) == null || (_props$theme2 = _props$theme2.breakpoints) == null ? void 0 : _props$theme2.unit) !== 'px') {
|
|
6306
|
+
return {
|
|
6307
|
+
maxWidth: `${breakpoint}${props.theme.breakpoints.unit}`
|
|
6308
|
+
};
|
|
6309
|
+
}
|
|
6288
6310
|
return {
|
|
6289
|
-
maxWidth: breakpoint
|
|
6311
|
+
maxWidth: breakpoint
|
|
6290
6312
|
};
|
|
6291
6313
|
};
|
|
6292
6314
|
return handleBreakpoints(props, props.maxWidth, styleFromPropValue);
|
|
@@ -8451,7 +8473,7 @@ function create$3(definition) {
|
|
|
8451
8473
|
return cache[key];
|
|
8452
8474
|
}
|
|
8453
8475
|
|
|
8454
|
-
const NEBULA_VERSION_HASH = "
|
|
8476
|
+
const NEBULA_VERSION_HASH = "7c03" ;
|
|
8455
8477
|
ClassNameGenerator$1.configure(componentName => {
|
|
8456
8478
|
return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
|
|
8457
8479
|
});
|
|
@@ -8712,7 +8734,7 @@ function boot(_ref2) {
|
|
|
8712
8734
|
const appRef = React__default.createRef();
|
|
8713
8735
|
const element = document.createElement('div');
|
|
8714
8736
|
element.style.display = 'none';
|
|
8715
|
-
element.setAttribute('data-nebulajs-version', "4.5.0
|
|
8737
|
+
element.setAttribute('data-nebulajs-version', "4.5.0" );
|
|
8716
8738
|
element.setAttribute('data-app-id', app.id);
|
|
8717
8739
|
document.body.appendChild(element);
|
|
8718
8740
|
if (context) {
|
|
@@ -9916,6 +9938,9 @@ const frequencyTextNone = '-';
|
|
|
9916
9938
|
const barPadPx = 4;
|
|
9917
9939
|
const barBorderWidthPx = 1;
|
|
9918
9940
|
const barWithCheckboxLeftPadPx = 29;
|
|
9941
|
+
const GRID_ROW_HEIGHT = 32;
|
|
9942
|
+
const LIST_ROW_HEIGHT = 29;
|
|
9943
|
+
const DENSE_ROW_HEIGHT = 20; // same for both list and grid in dense mode
|
|
9919
9944
|
|
|
9920
9945
|
const joinClassNames = namesArray => namesArray.filter(c => !!c).join(' ').trim();
|
|
9921
9946
|
const getBarWidth = _ref => {
|
|
@@ -10757,13 +10782,13 @@ const KEYS = Object.freeze({
|
|
|
10757
10782
|
const getElementIndex = currentTarget => +currentTarget.getAttribute('data-n');
|
|
10758
10783
|
const focusSearch = container => {
|
|
10759
10784
|
const searchField = container === null || container === void 0 ? void 0 : container.querySelector('.search input');
|
|
10760
|
-
searchField === null || searchField === void 0
|
|
10785
|
+
searchField === null || searchField === void 0 || searchField.focus();
|
|
10761
10786
|
return searchField;
|
|
10762
10787
|
};
|
|
10763
10788
|
const focusRow = container => {
|
|
10764
10789
|
const row = container === null || container === void 0 ? void 0 : container.querySelector('.value.last-focused, .value.selector, .value');
|
|
10765
|
-
row === null || row === void 0
|
|
10766
|
-
row === null || row === void 0
|
|
10790
|
+
row === null || row === void 0 || row.setAttribute('tabIndex', 0);
|
|
10791
|
+
row === null || row === void 0 || row.focus();
|
|
10767
10792
|
return row;
|
|
10768
10793
|
};
|
|
10769
10794
|
|
|
@@ -10945,18 +10970,18 @@ function getRowsKeyboardNavigation(_ref) {
|
|
|
10945
10970
|
case KEYS.HOME:
|
|
10946
10971
|
focusListItems.setFirst(true);
|
|
10947
10972
|
if (ctrlKey) {
|
|
10948
|
-
setScrollPosition === null || setScrollPosition === void 0
|
|
10973
|
+
setScrollPosition === null || setScrollPosition === void 0 || setScrollPosition('overflowStart');
|
|
10949
10974
|
break;
|
|
10950
10975
|
}
|
|
10951
|
-
setScrollPosition === null || setScrollPosition === void 0
|
|
10976
|
+
setScrollPosition === null || setScrollPosition === void 0 || setScrollPosition('start');
|
|
10952
10977
|
break;
|
|
10953
10978
|
case KEYS.END:
|
|
10954
10979
|
focusListItems.setLast(true);
|
|
10955
10980
|
if (ctrlKey) {
|
|
10956
|
-
setScrollPosition === null || setScrollPosition === void 0
|
|
10981
|
+
setScrollPosition === null || setScrollPosition === void 0 || setScrollPosition('overflowEnd');
|
|
10957
10982
|
break;
|
|
10958
10983
|
}
|
|
10959
|
-
setScrollPosition === null || setScrollPosition === void 0
|
|
10984
|
+
setScrollPosition === null || setScrollPosition === void 0 || setScrollPosition('end');
|
|
10960
10985
|
break;
|
|
10961
10986
|
case KEYS.A:
|
|
10962
10987
|
if (ctrlKey || metaKey) {
|
|
@@ -13137,9 +13162,8 @@ function useListSizes(_ref) {
|
|
|
13137
13162
|
let rowCount;
|
|
13138
13163
|
const isGridMode = dataLayout === 'grid';
|
|
13139
13164
|
const itemPadding = 4;
|
|
13140
|
-
const
|
|
13141
|
-
|
|
13142
|
-
let itemHeight = dense ? denseItemHeight : normalItemHeight;
|
|
13165
|
+
const normalItemHeight = isGridMode ? GRID_ROW_HEIGHT : LIST_ROW_HEIGHT;
|
|
13166
|
+
let itemHeight = dense ? DENSE_ROW_HEIGHT : normalItemHeight;
|
|
13143
13167
|
if (isGridMode) {
|
|
13144
13168
|
// Emulate a margin between items using padding, since the list library
|
|
13145
13169
|
// needs an explicit row height and cannot handle margins.
|
|
@@ -13867,7 +13891,7 @@ function ListBox(_ref) {
|
|
|
13867
13891
|
const cardinal = layout === null || layout === void 0 ? void 0 : layout.qListObject.qDimensionInfo.qCardinal;
|
|
13868
13892
|
if (itemsLoader !== null && itemsLoader !== void 0 && itemsLoader.pages.length && !awaitingFrequencyMax || cardinal === 0) {
|
|
13869
13893
|
// All necessary data fetching done - signal rendering done!
|
|
13870
|
-
renderedCallback === null || renderedCallback === void 0
|
|
13894
|
+
renderedCallback === null || renderedCallback === void 0 || renderedCallback();
|
|
13871
13895
|
}
|
|
13872
13896
|
const isItemLoaded = useCallback(index => {
|
|
13873
13897
|
if (!(pages !== null && pages !== void 0 && pages.length) || !local.current.validPages) {
|
|
@@ -14620,7 +14644,7 @@ function ActionsToolbar(_ref3) {
|
|
|
14620
14644
|
actionsRefMock = null,
|
|
14621
14645
|
// for testing
|
|
14622
14646
|
direction = 'ltr',
|
|
14623
|
-
autoConfirm
|
|
14647
|
+
autoConfirm = false
|
|
14624
14648
|
} = _ref3;
|
|
14625
14649
|
const defaultSelectionActions = useDefaultSelectionActions(selections);
|
|
14626
14650
|
const {
|
|
@@ -14667,14 +14691,7 @@ function ActionsToolbar(_ref3) {
|
|
|
14667
14691
|
focusHandler.on('focus_toolbar_last', focusLast);
|
|
14668
14692
|
}, []);
|
|
14669
14693
|
if (autoConfirm) {
|
|
14670
|
-
|
|
14671
|
-
if (canConfirm) {
|
|
14672
|
-
const confirm = defaultSelectionActions.find(o => o.key === 'confirm') || {
|
|
14673
|
-
action: () => {}
|
|
14674
|
-
};
|
|
14675
|
-
confirm.action();
|
|
14676
|
-
}
|
|
14677
|
-
return null;
|
|
14694
|
+
return undefined;
|
|
14678
14695
|
}
|
|
14679
14696
|
let moreEnabled = more$1.enabled;
|
|
14680
14697
|
let moreActions = more$1.actions;
|
|
@@ -14751,13 +14768,15 @@ function ActionsToolbar(_ref3) {
|
|
|
14751
14768
|
transformOrigin: popoverTransformOrigin,
|
|
14752
14769
|
hideBackdrop: true,
|
|
14753
14770
|
style: popoverStyle,
|
|
14754
|
-
|
|
14755
|
-
|
|
14756
|
-
|
|
14757
|
-
|
|
14758
|
-
|
|
14759
|
-
|
|
14760
|
-
|
|
14771
|
+
slotProps: {
|
|
14772
|
+
paper: {
|
|
14773
|
+
id: 'njs-action-toolbar-popover',
|
|
14774
|
+
'data-testid': 'njs-action-toolbar-popover',
|
|
14775
|
+
className: ActionToolbarElement.className,
|
|
14776
|
+
style: {
|
|
14777
|
+
pointerEvents: 'auto',
|
|
14778
|
+
padding: theme.spacing(0.5, 0.25)
|
|
14779
|
+
}
|
|
14761
14780
|
}
|
|
14762
14781
|
}
|
|
14763
14782
|
}, Actions) : show && Actions;
|
|
@@ -14888,7 +14907,7 @@ function ListBoxSearch(_ref3) {
|
|
|
14888
14907
|
function focusRow(container) {
|
|
14889
14908
|
const row = (container === null || container === void 0 ? void 0 : container.querySelector('.last-focused')) || (container === null || container === void 0 ? void 0 : container.querySelector('[role="row"]:first-child'));
|
|
14890
14909
|
row.setAttribute('tabIndex', 0);
|
|
14891
|
-
row === null || row === void 0
|
|
14910
|
+
row === null || row === void 0 || row.focus();
|
|
14892
14911
|
}
|
|
14893
14912
|
const onKeyDown = async e => {
|
|
14894
14913
|
const {
|
|
@@ -14914,7 +14933,7 @@ function ListBoxSearch(_ref3) {
|
|
|
14914
14933
|
focusRow(container);
|
|
14915
14934
|
|
|
14916
14935
|
// Clean up.
|
|
14917
|
-
container === null || container === void 0
|
|
14936
|
+
container === null || container === void 0 || container.querySelectorAll('.last-focused').forEach(elm => {
|
|
14918
14937
|
elm.classList.remove('last-focused');
|
|
14919
14938
|
});
|
|
14920
14939
|
}
|
|
@@ -15223,12 +15242,12 @@ const getClickOutFuncs = _ref3 => {
|
|
|
15223
15242
|
activateClickOut() {
|
|
15224
15243
|
var _options$onSelectionA;
|
|
15225
15244
|
document.addEventListener('mousedown', handler);
|
|
15226
|
-
options === null || options === void 0 || (_options$onSelectionA = options.onSelectionActivated) === null || _options$onSelectionA === void 0
|
|
15245
|
+
options === null || options === void 0 || (_options$onSelectionA = options.onSelectionActivated) === null || _options$onSelectionA === void 0 || _options$onSelectionA.call(options);
|
|
15227
15246
|
},
|
|
15228
15247
|
deactivateClickOut() {
|
|
15229
15248
|
var _options$onSelectionD;
|
|
15230
15249
|
document.removeEventListener('mousedown', handler);
|
|
15231
|
-
options === null || options === void 0 || (_options$onSelectionD = options.onSelectionDeactivated) === null || _options$onSelectionD === void 0
|
|
15250
|
+
options === null || options === void 0 || (_options$onSelectionD = options.onSelectionDeactivated) === null || _options$onSelectionD === void 0 || _options$onSelectionD.call(options);
|
|
15232
15251
|
}
|
|
15233
15252
|
};
|
|
15234
15253
|
};
|
|
@@ -15353,7 +15372,7 @@ function selectionState() {
|
|
|
15353
15372
|
if (selected && !additive) {
|
|
15354
15373
|
state.itemStates[elementNumber] = false;
|
|
15355
15374
|
} else if (!selected) {
|
|
15356
|
-
selectedValues === null || selectedValues === void 0
|
|
15375
|
+
selectedValues === null || selectedValues === void 0 || selectedValues.push(elementNumber);
|
|
15357
15376
|
state.itemStates[elementNumber] = true;
|
|
15358
15377
|
}
|
|
15359
15378
|
},
|
|
@@ -15493,7 +15512,7 @@ function ListBoxPopover(_ref) {
|
|
|
15493
15512
|
});
|
|
15494
15513
|
const onCtrlF = () => {
|
|
15495
15514
|
const input = searchContainerRef.current.querySelector('input');
|
|
15496
|
-
input === null || input === void 0
|
|
15515
|
+
input === null || input === void 0 || input.focus();
|
|
15497
15516
|
};
|
|
15498
15517
|
const hasSelections$1 = hasSelections(layout);
|
|
15499
15518
|
return /*#__PURE__*/React__default.createElement(Popover, {
|
|
@@ -16746,12 +16765,12 @@ const drillDown = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
16746
16765
|
var DrillDownIcon = (props => SvgIcon$2(drillDown(props)));
|
|
16747
16766
|
|
|
16748
16767
|
function removeInnnerTabStops(container) {
|
|
16749
|
-
container === null || container === void 0
|
|
16768
|
+
container === null || container === void 0 || container.querySelectorAll('[tabIndex="0"]').forEach(elm => {
|
|
16750
16769
|
elm.setAttribute('tabIndex', -1);
|
|
16751
16770
|
});
|
|
16752
16771
|
}
|
|
16753
16772
|
function removeLastFocused(container) {
|
|
16754
|
-
container === null || container === void 0
|
|
16773
|
+
container === null || container === void 0 || container.querySelectorAll('.last-focused').forEach(elm => {
|
|
16755
16774
|
elm.classList.remove('last-focused');
|
|
16756
16775
|
});
|
|
16757
16776
|
}
|
|
@@ -16799,13 +16818,13 @@ function useTempKeyboard(_ref) {
|
|
|
16799
16818
|
const firstRowElement = c === null || c === void 0 ? void 0 : c.querySelector('.value.selector, .value');
|
|
16800
16819
|
const confirmButton = c === null || c === void 0 ? void 0 : c.querySelector('.actions-toolbar-default-actions .actions-toolbar-confirm');
|
|
16801
16820
|
const elementToFocus = searchField || lastSelectedRow || firstRowElement || confirmButton;
|
|
16802
|
-
elementToFocus === null || elementToFocus === void 0
|
|
16803
|
-
elementToFocus === null || elementToFocus === void 0
|
|
16821
|
+
elementToFocus === null || elementToFocus === void 0 || elementToFocus.setAttribute('tabIndex', 0);
|
|
16822
|
+
elementToFocus === null || elementToFocus === void 0 || elementToFocus.focus();
|
|
16804
16823
|
},
|
|
16805
16824
|
focusSelection() {
|
|
16806
16825
|
const confirmButton = document.querySelector('.actions-toolbar-default-actions .actions-toolbar-confirm');
|
|
16807
|
-
confirmButton === null || confirmButton === void 0
|
|
16808
|
-
confirmButton === null || confirmButton === void 0
|
|
16826
|
+
confirmButton === null || confirmButton === void 0 || confirmButton.setAttribute('tabIndex', 0);
|
|
16827
|
+
confirmButton === null || confirmButton === void 0 || confirmButton.focus();
|
|
16809
16828
|
}
|
|
16810
16829
|
};
|
|
16811
16830
|
return keyboard;
|
|
@@ -16847,7 +16866,7 @@ function getListboxContainerKeyboardNavigation(_ref) {
|
|
|
16847
16866
|
keyboard.blur();
|
|
16848
16867
|
const c = currentTarget.closest('.listbox-container');
|
|
16849
16868
|
c.setAttribute('tabIndex', -1);
|
|
16850
|
-
c === null || c === void 0
|
|
16869
|
+
c === null || c === void 0 || c.focus();
|
|
16851
16870
|
}
|
|
16852
16871
|
};
|
|
16853
16872
|
const handleKeyDown = event => {
|
|
@@ -17010,11 +17029,9 @@ function getListboxActionProps(_ref) {
|
|
|
17010
17029
|
isLocked,
|
|
17011
17030
|
listboxSelectionToolbarItems,
|
|
17012
17031
|
selections,
|
|
17013
|
-
keyboard
|
|
17014
|
-
autoConfirm
|
|
17032
|
+
keyboard
|
|
17015
17033
|
} = _ref;
|
|
17016
17034
|
return {
|
|
17017
|
-
autoConfirm,
|
|
17018
17035
|
show: showToolbar && !isDetached,
|
|
17019
17036
|
popover: {
|
|
17020
17037
|
show: showToolbar && isDetached,
|
|
@@ -17035,10 +17052,10 @@ function getListboxActionProps(_ref) {
|
|
|
17035
17052
|
show: showToolbar,
|
|
17036
17053
|
api: selections,
|
|
17037
17054
|
onConfirm: () => {
|
|
17038
|
-
keyboard === null || keyboard === void 0
|
|
17055
|
+
keyboard === null || keyboard === void 0 || keyboard.focus();
|
|
17039
17056
|
},
|
|
17040
17057
|
onCancel: () => {
|
|
17041
|
-
keyboard === null || keyboard === void 0
|
|
17058
|
+
keyboard === null || keyboard === void 0 || keyboard.focus();
|
|
17042
17059
|
}
|
|
17043
17060
|
}
|
|
17044
17061
|
};
|
|
@@ -17320,10 +17337,6 @@ function ListBoxInline(_ref4) {
|
|
|
17320
17337
|
const showSearchToggle = search === 'toggle' && showSearch;
|
|
17321
17338
|
const searchVisible = (search === true || showSearchToggle) && !selectDisabled() && searchEnabled !== false;
|
|
17322
17339
|
const dense = (_layoutOptions$dense = layoutOptions.dense) !== null && _layoutOptions$dense !== void 0 ? _layoutOptions$dense : false;
|
|
17323
|
-
const searchHeight = dense ? 27 : 40;
|
|
17324
|
-
const extraheight = dense ? 39 : 49;
|
|
17325
|
-
const searchAddHeight = searchVisible ? searchHeight : 0;
|
|
17326
|
-
const minHeight = showToolbarWithTitle ? 49 + searchAddHeight + extraheight : 0;
|
|
17327
17340
|
const headerHeight = 32;
|
|
17328
17341
|
const onShowSearch = () => {
|
|
17329
17342
|
const newValue = !showSearch;
|
|
@@ -17334,17 +17347,18 @@ function ListBoxInline(_ref4) {
|
|
|
17334
17347
|
onShowSearch();
|
|
17335
17348
|
} else {
|
|
17336
17349
|
const input = searchContainer.current.querySelector('input');
|
|
17337
|
-
input === null || input === void 0
|
|
17350
|
+
input === null || input === void 0 || input.focus();
|
|
17338
17351
|
}
|
|
17339
17352
|
};
|
|
17340
|
-
const getActionToolbarProps = isDetached => getListboxActionProps({
|
|
17353
|
+
const getActionToolbarProps = isDetached => _objectSpread2(_objectSpread2({}, getListboxActionProps({
|
|
17341
17354
|
isDetached: isPopover ? false : isDetached,
|
|
17342
17355
|
showToolbar,
|
|
17343
17356
|
containerRef,
|
|
17344
17357
|
isLocked,
|
|
17345
17358
|
listboxSelectionToolbarItems,
|
|
17346
17359
|
selections,
|
|
17347
|
-
keyboard
|
|
17360
|
+
keyboard
|
|
17361
|
+
})), {}, {
|
|
17348
17362
|
autoConfirm
|
|
17349
17363
|
});
|
|
17350
17364
|
const shouldAutoFocus = searchVisible && search === 'toggle';
|
|
@@ -17392,7 +17406,7 @@ function ListBoxInline(_ref4) {
|
|
|
17392
17406
|
}
|
|
17393
17407
|
}));
|
|
17394
17408
|
if (isInvalid) {
|
|
17395
|
-
renderedCallback === null || renderedCallback === void 0
|
|
17409
|
+
renderedCallback === null || renderedCallback === void 0 || renderedCallback();
|
|
17396
17410
|
}
|
|
17397
17411
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, showDetachedToolbarOnly && /*#__PURE__*/React__default.createElement(ActionsToolbar, _extends$5({
|
|
17398
17412
|
direction: direction
|
|
@@ -17405,7 +17419,6 @@ function ListBoxInline(_ref4) {
|
|
|
17405
17419
|
containerPadding: containerPadding,
|
|
17406
17420
|
style: {
|
|
17407
17421
|
height: '100%',
|
|
17408
|
-
minHeight: "".concat(minHeight, "px"),
|
|
17409
17422
|
flexFlow: 'column nowrap'
|
|
17410
17423
|
},
|
|
17411
17424
|
onKeyDown: handleKeyDown,
|
|
@@ -17460,7 +17473,7 @@ function ListBoxInline(_ref4) {
|
|
|
17460
17473
|
direction: "column",
|
|
17461
17474
|
style: {
|
|
17462
17475
|
height: '100%',
|
|
17463
|
-
minHeight:
|
|
17476
|
+
minHeight: DENSE_ROW_HEIGHT + SCROLL_BAR_WIDTH
|
|
17464
17477
|
},
|
|
17465
17478
|
role: "region",
|
|
17466
17479
|
"aria-label": translator.get('Listbox.ResultFilterLabel')
|
|
@@ -17675,7 +17688,7 @@ const listdef = {
|
|
|
17675
17688
|
*/
|
|
17676
17689
|
wildCardSearch: false,
|
|
17677
17690
|
/**
|
|
17678
|
-
* Automatically confirm selections without showing the selections toolbar.
|
|
17691
|
+
* Automatically confirm selections when clicking outside a listbox, without showing the selections toolbar.
|
|
17679
17692
|
* @type {boolean=}
|
|
17680
17693
|
* @default
|
|
17681
17694
|
*/
|