@nebula.js/stardust 3.2.1 → 3.2.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/core/esm/dev.js +26 -24
- package/core/esm/dev.js.map +1 -1
- package/core/esm/index.js +2 -2
- package/core/esm/index.js.map +1 -1
- package/dist/stardust.dev.js +26 -24
- package/dist/stardust.dev.js.map +1 -1
- package/dist/stardust.js +3 -3
- package/dist/stardust.js.map +1 -1
- package/package.json +9 -9
- package/types/index.d.ts +10 -10
package/core/esm/dev.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/stardust v3.2.
|
|
2
|
+
* @nebula.js/stardust v3.2.2
|
|
3
3
|
* Copyright (c) 2023 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -7968,7 +7968,7 @@ function create$3(definition) {
|
|
|
7968
7968
|
return cache[key];
|
|
7969
7969
|
}
|
|
7970
7970
|
|
|
7971
|
-
const NEBULA_VERSION_HASH = "
|
|
7971
|
+
const NEBULA_VERSION_HASH = "07c0" ;
|
|
7972
7972
|
ClassNameGenerator$1.configure(componentName => {
|
|
7973
7973
|
return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
|
|
7974
7974
|
});
|
|
@@ -8487,7 +8487,7 @@ function boot(_ref2) {
|
|
|
8487
8487
|
const appRef = React__default.createRef();
|
|
8488
8488
|
const element = document.createElement('div');
|
|
8489
8489
|
element.style.display = 'none';
|
|
8490
|
-
element.setAttribute('data-nebulajs-version', "3.2.
|
|
8490
|
+
element.setAttribute('data-nebulajs-version', "3.2.2" );
|
|
8491
8491
|
element.setAttribute('data-app-id', app.id);
|
|
8492
8492
|
document.body.appendChild(element);
|
|
8493
8493
|
ReactDOM.render( /*#__PURE__*/React__default.createElement(NebulaApp, {
|
|
@@ -12891,6 +12891,9 @@ function useDefaultSelectionActions(_ref) {
|
|
|
12891
12891
|
}
|
|
12892
12892
|
|
|
12893
12893
|
const PREFIX$8 = 'More';
|
|
12894
|
+
const ActionsToolbarMoreElement = {
|
|
12895
|
+
className: 'njs-action-toolbar-more'
|
|
12896
|
+
};
|
|
12894
12897
|
const classes$8 = {
|
|
12895
12898
|
icon: "".concat(PREFIX$8, "-icon")
|
|
12896
12899
|
};
|
|
@@ -12946,12 +12949,12 @@ const More$1 = React__default.forwardRef((_ref3, ref) => {
|
|
|
12946
12949
|
ref: ref,
|
|
12947
12950
|
open: show,
|
|
12948
12951
|
anchorEl: alignTo.current,
|
|
12949
|
-
getContentAnchorEl: null,
|
|
12950
|
-
hideBackdrop: true,
|
|
12951
|
-
style: {
|
|
12952
|
-
pointerEvents: 'none'
|
|
12953
|
-
},
|
|
12954
12952
|
transitionDuration: 0,
|
|
12953
|
+
slotProps: {
|
|
12954
|
+
root: {
|
|
12955
|
+
className: ActionsToolbarMoreElement.className
|
|
12956
|
+
}
|
|
12957
|
+
},
|
|
12955
12958
|
anchorOrigin: {
|
|
12956
12959
|
vertical: 'bottom',
|
|
12957
12960
|
horizontal: 'left'
|
|
@@ -13091,8 +13094,6 @@ function ActionsToolbar(_ref3) {
|
|
|
13091
13094
|
keyboardNavigation
|
|
13092
13095
|
} = useContext(InstanceContext);
|
|
13093
13096
|
const [showMoreItems, setShowMoreItems] = useState$1(false);
|
|
13094
|
-
const [moreEnabled, setMoreEnabled] = useState$1(more$1.enabled);
|
|
13095
|
-
const [moreActions, setMoreActions] = useState$1(more$1.actions);
|
|
13096
13097
|
const moreRef = useRef();
|
|
13097
13098
|
const actionsRef = useRef();
|
|
13098
13099
|
const theme = useTheme$1();
|
|
@@ -13106,9 +13107,6 @@ function ActionsToolbar(_ref3) {
|
|
|
13106
13107
|
return buttons[last ? buttons.length - 1 : 0];
|
|
13107
13108
|
};
|
|
13108
13109
|
useEffect$1(() => () => setShowMoreItems(false), [popover.show]);
|
|
13109
|
-
useEffect$1(() => {
|
|
13110
|
-
setMoreEnabled(more$1.enabled);
|
|
13111
|
-
}, [more$1.enabled]);
|
|
13112
13110
|
useEffect$1(() => {
|
|
13113
13111
|
if (!focusHandler) return;
|
|
13114
13112
|
const focusFirst = () => {
|
|
@@ -13122,7 +13120,14 @@ function ActionsToolbar(_ref3) {
|
|
|
13122
13120
|
focusHandler.on('focus_toolbar_first', focusFirst);
|
|
13123
13121
|
focusHandler.on('focus_toolbar_last', focusLast);
|
|
13124
13122
|
}, []);
|
|
13125
|
-
|
|
13123
|
+
let moreEnabled = more$1.enabled;
|
|
13124
|
+
let moreActions = more$1.actions;
|
|
13125
|
+
const newActions = actions.filter(a => !a.hidden);
|
|
13126
|
+
if (newActions.length > maxItems) {
|
|
13127
|
+
const newMoreActions = newActions.splice(-(newActions.length - maxItems) - 1);
|
|
13128
|
+
moreEnabled = true;
|
|
13129
|
+
moreActions = [...newMoreActions, ...more$1.actions];
|
|
13130
|
+
}
|
|
13126
13131
|
if (!selections.show && newActions.length === 0) return null;
|
|
13127
13132
|
const handleCloseShowMoreItems = () => {
|
|
13128
13133
|
setShowMoreItems(false);
|
|
@@ -13137,11 +13142,6 @@ function ActionsToolbar(_ref3) {
|
|
|
13137
13142
|
enabled: () => moreEnabled,
|
|
13138
13143
|
action: () => setShowMoreItems(!showMoreItems)
|
|
13139
13144
|
};
|
|
13140
|
-
if (newActions.length > maxItems) {
|
|
13141
|
-
const newMoreActions = newActions.splice(-(newActions.length - maxItems) - 1);
|
|
13142
|
-
setMoreEnabled(true);
|
|
13143
|
-
setMoreActions([...newMoreActions, ...more$1.actions]);
|
|
13144
|
-
}
|
|
13145
13145
|
const tabCallback =
|
|
13146
13146
|
// if keyboardNavigation is true, create a callback to handle tabbing from the first/last button in the toolbar that resets focus on the content
|
|
13147
13147
|
keyboardNavigation && focusHandler && focusHandler.refocusContent ? evt => {
|
|
@@ -13577,12 +13577,12 @@ const getClickOutFuncs = _ref3 => {
|
|
|
13577
13577
|
activateClickOut() {
|
|
13578
13578
|
var _options$onSelectionA;
|
|
13579
13579
|
document.addEventListener('mousedown', handler);
|
|
13580
|
-
(_options$onSelectionA = options.onSelectionActivated) === null || _options$onSelectionA === void 0 ? void 0 : _options$onSelectionA.call(options);
|
|
13580
|
+
options === null || options === void 0 ? void 0 : (_options$onSelectionA = options.onSelectionActivated) === null || _options$onSelectionA === void 0 ? void 0 : _options$onSelectionA.call(options);
|
|
13581
13581
|
},
|
|
13582
13582
|
deactivateClickOut() {
|
|
13583
13583
|
var _options$onSelectionD;
|
|
13584
13584
|
document.removeEventListener('mousedown', handler);
|
|
13585
|
-
(_options$onSelectionD = options.onSelectionDeactivated) === null || _options$onSelectionD === void 0 ? void 0 : _options$onSelectionD.call(options);
|
|
13585
|
+
options === null || options === void 0 ? void 0 : (_options$onSelectionD = options.onSelectionDeactivated) === null || _options$onSelectionD === void 0 ? void 0 : _options$onSelectionD.call(options);
|
|
13586
13586
|
}
|
|
13587
13587
|
};
|
|
13588
13588
|
};
|
|
@@ -13657,6 +13657,7 @@ function ListBoxPopover(_ref) {
|
|
|
13657
13657
|
fieldName,
|
|
13658
13658
|
stateName = '$'
|
|
13659
13659
|
} = _ref;
|
|
13660
|
+
const isMasterDim = Boolean(fieldName === null || fieldName === void 0 ? void 0 : fieldName.qLibraryId);
|
|
13660
13661
|
const open = show && Boolean(alignTo.current);
|
|
13661
13662
|
const [listCount, setListCount] = useState$1(0);
|
|
13662
13663
|
const theme = useTheme$1();
|
|
@@ -13680,8 +13681,9 @@ function ListBoxPopover(_ref) {
|
|
|
13680
13681
|
qSortByNumeric: 1,
|
|
13681
13682
|
qSortByLoadOrder: 1
|
|
13682
13683
|
}],
|
|
13683
|
-
qFieldDefs: [fieldName]
|
|
13684
|
-
}
|
|
13684
|
+
qFieldDefs: isMasterDim ? undefined : [fieldName]
|
|
13685
|
+
},
|
|
13686
|
+
qLibraryId: isMasterDim ? fieldName.qLibraryId : undefined
|
|
13685
13687
|
}
|
|
13686
13688
|
}, app, fieldName, stateName);
|
|
13687
13689
|
const lock = useCallback(() => {
|
|
@@ -15567,7 +15569,7 @@ function ListBoxWrapper(_ref) {
|
|
|
15567
15569
|
options
|
|
15568
15570
|
});
|
|
15569
15571
|
const elementRef = useRef(element);
|
|
15570
|
-
const selections = hasExternalSelectionsApi ? options.selectionsApi : useObjectSelections(app, model, elementRef, options)[0];
|
|
15572
|
+
const selections = hasExternalSelectionsApi ? options.selectionsApi : useObjectSelections(app, model, [elementRef, '.njs-action-toolbar-more'], options)[0];
|
|
15571
15573
|
if (!selections || !model) {
|
|
15572
15574
|
return null;
|
|
15573
15575
|
}
|