@nebula.js/stardust 3.2.0 → 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/dist/stardust.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
|
*/
|
|
@@ -14388,7 +14388,7 @@
|
|
|
14388
14388
|
return cache[key];
|
|
14389
14389
|
}
|
|
14390
14390
|
|
|
14391
|
-
const NEBULA_VERSION_HASH = "
|
|
14391
|
+
const NEBULA_VERSION_HASH = "07c0" ;
|
|
14392
14392
|
ClassNameGenerator$1.configure(componentName => {
|
|
14393
14393
|
return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
|
|
14394
14394
|
});
|
|
@@ -14907,7 +14907,7 @@
|
|
|
14907
14907
|
const appRef = React.createRef();
|
|
14908
14908
|
const element = document.createElement('div');
|
|
14909
14909
|
element.style.display = 'none';
|
|
14910
|
-
element.setAttribute('data-nebulajs-version', "3.2.
|
|
14910
|
+
element.setAttribute('data-nebulajs-version', "3.2.2" );
|
|
14911
14911
|
element.setAttribute('data-app-id', app.id);
|
|
14912
14912
|
document.body.appendChild(element);
|
|
14913
14913
|
ReactDOM.render( /*#__PURE__*/React.createElement(NebulaApp, {
|
|
@@ -24440,6 +24440,9 @@
|
|
|
24440
24440
|
}
|
|
24441
24441
|
|
|
24442
24442
|
const PREFIX$8 = 'More';
|
|
24443
|
+
const ActionsToolbarMoreElement = {
|
|
24444
|
+
className: 'njs-action-toolbar-more'
|
|
24445
|
+
};
|
|
24443
24446
|
const classes$8 = {
|
|
24444
24447
|
icon: "".concat(PREFIX$8, "-icon")
|
|
24445
24448
|
};
|
|
@@ -24495,12 +24498,12 @@
|
|
|
24495
24498
|
ref: ref,
|
|
24496
24499
|
open: show,
|
|
24497
24500
|
anchorEl: alignTo.current,
|
|
24498
|
-
getContentAnchorEl: null,
|
|
24499
|
-
hideBackdrop: true,
|
|
24500
|
-
style: {
|
|
24501
|
-
pointerEvents: 'none'
|
|
24502
|
-
},
|
|
24503
24501
|
transitionDuration: 0,
|
|
24502
|
+
slotProps: {
|
|
24503
|
+
root: {
|
|
24504
|
+
className: ActionsToolbarMoreElement.className
|
|
24505
|
+
}
|
|
24506
|
+
},
|
|
24504
24507
|
anchorOrigin: {
|
|
24505
24508
|
vertical: 'bottom',
|
|
24506
24509
|
horizontal: 'left'
|
|
@@ -24640,8 +24643,6 @@
|
|
|
24640
24643
|
keyboardNavigation
|
|
24641
24644
|
} = reactExports.useContext(InstanceContext);
|
|
24642
24645
|
const [showMoreItems, setShowMoreItems] = reactExports.useState(false);
|
|
24643
|
-
const [moreEnabled, setMoreEnabled] = reactExports.useState(more$1.enabled);
|
|
24644
|
-
const [moreActions, setMoreActions] = reactExports.useState(more$1.actions);
|
|
24645
24646
|
const moreRef = reactExports.useRef();
|
|
24646
24647
|
const actionsRef = reactExports.useRef();
|
|
24647
24648
|
const theme = useTheme$1();
|
|
@@ -24655,9 +24656,6 @@
|
|
|
24655
24656
|
return buttons[last ? buttons.length - 1 : 0];
|
|
24656
24657
|
};
|
|
24657
24658
|
reactExports.useEffect(() => () => setShowMoreItems(false), [popover.show]);
|
|
24658
|
-
reactExports.useEffect(() => {
|
|
24659
|
-
setMoreEnabled(more$1.enabled);
|
|
24660
|
-
}, [more$1.enabled]);
|
|
24661
24659
|
reactExports.useEffect(() => {
|
|
24662
24660
|
if (!focusHandler) return;
|
|
24663
24661
|
const focusFirst = () => {
|
|
@@ -24671,7 +24669,14 @@
|
|
|
24671
24669
|
focusHandler.on('focus_toolbar_first', focusFirst);
|
|
24672
24670
|
focusHandler.on('focus_toolbar_last', focusLast);
|
|
24673
24671
|
}, []);
|
|
24674
|
-
|
|
24672
|
+
let moreEnabled = more$1.enabled;
|
|
24673
|
+
let moreActions = more$1.actions;
|
|
24674
|
+
const newActions = actions.filter(a => !a.hidden);
|
|
24675
|
+
if (newActions.length > maxItems) {
|
|
24676
|
+
const newMoreActions = newActions.splice(-(newActions.length - maxItems) - 1);
|
|
24677
|
+
moreEnabled = true;
|
|
24678
|
+
moreActions = [...newMoreActions, ...more$1.actions];
|
|
24679
|
+
}
|
|
24675
24680
|
if (!selections.show && newActions.length === 0) return null;
|
|
24676
24681
|
const handleCloseShowMoreItems = () => {
|
|
24677
24682
|
setShowMoreItems(false);
|
|
@@ -24686,11 +24691,6 @@
|
|
|
24686
24691
|
enabled: () => moreEnabled,
|
|
24687
24692
|
action: () => setShowMoreItems(!showMoreItems)
|
|
24688
24693
|
};
|
|
24689
|
-
if (newActions.length > maxItems) {
|
|
24690
|
-
const newMoreActions = newActions.splice(-(newActions.length - maxItems) - 1);
|
|
24691
|
-
setMoreEnabled(true);
|
|
24692
|
-
setMoreActions([...newMoreActions, ...more$1.actions]);
|
|
24693
|
-
}
|
|
24694
24694
|
const tabCallback =
|
|
24695
24695
|
// if keyboardNavigation is true, create a callback to handle tabbing from the first/last button in the toolbar that resets focus on the content
|
|
24696
24696
|
keyboardNavigation && focusHandler && focusHandler.refocusContent ? evt => {
|
|
@@ -25126,12 +25126,12 @@
|
|
|
25126
25126
|
activateClickOut() {
|
|
25127
25127
|
var _options$onSelectionA;
|
|
25128
25128
|
document.addEventListener('mousedown', handler);
|
|
25129
|
-
(_options$onSelectionA = options.onSelectionActivated) === null || _options$onSelectionA === void 0 ? void 0 : _options$onSelectionA.call(options);
|
|
25129
|
+
options === null || options === void 0 ? void 0 : (_options$onSelectionA = options.onSelectionActivated) === null || _options$onSelectionA === void 0 ? void 0 : _options$onSelectionA.call(options);
|
|
25130
25130
|
},
|
|
25131
25131
|
deactivateClickOut() {
|
|
25132
25132
|
var _options$onSelectionD;
|
|
25133
25133
|
document.removeEventListener('mousedown', handler);
|
|
25134
|
-
(_options$onSelectionD = options.onSelectionDeactivated) === null || _options$onSelectionD === void 0 ? void 0 : _options$onSelectionD.call(options);
|
|
25134
|
+
options === null || options === void 0 ? void 0 : (_options$onSelectionD = options.onSelectionDeactivated) === null || _options$onSelectionD === void 0 ? void 0 : _options$onSelectionD.call(options);
|
|
25135
25135
|
}
|
|
25136
25136
|
};
|
|
25137
25137
|
};
|
|
@@ -25206,6 +25206,7 @@
|
|
|
25206
25206
|
fieldName,
|
|
25207
25207
|
stateName = '$'
|
|
25208
25208
|
} = _ref;
|
|
25209
|
+
const isMasterDim = Boolean(fieldName === null || fieldName === void 0 ? void 0 : fieldName.qLibraryId);
|
|
25209
25210
|
const open = show && Boolean(alignTo.current);
|
|
25210
25211
|
const [listCount, setListCount] = reactExports.useState(0);
|
|
25211
25212
|
const theme = useTheme$1();
|
|
@@ -25229,8 +25230,9 @@
|
|
|
25229
25230
|
qSortByNumeric: 1,
|
|
25230
25231
|
qSortByLoadOrder: 1
|
|
25231
25232
|
}],
|
|
25232
|
-
qFieldDefs: [fieldName]
|
|
25233
|
-
}
|
|
25233
|
+
qFieldDefs: isMasterDim ? undefined : [fieldName]
|
|
25234
|
+
},
|
|
25235
|
+
qLibraryId: isMasterDim ? fieldName.qLibraryId : undefined
|
|
25234
25236
|
}
|
|
25235
25237
|
}, app, fieldName, stateName);
|
|
25236
25238
|
const lock = reactExports.useCallback(() => {
|
|
@@ -27116,7 +27118,7 @@
|
|
|
27116
27118
|
options
|
|
27117
27119
|
});
|
|
27118
27120
|
const elementRef = reactExports.useRef(element);
|
|
27119
|
-
const selections = hasExternalSelectionsApi ? options.selectionsApi : useObjectSelections(app, model, elementRef, options)[0];
|
|
27121
|
+
const selections = hasExternalSelectionsApi ? options.selectionsApi : useObjectSelections(app, model, [elementRef, '.njs-action-toolbar-more'], options)[0];
|
|
27120
27122
|
if (!selections || !model) {
|
|
27121
27123
|
return null;
|
|
27122
27124
|
}
|