@nebula.js/stardust 3.0.0-alpha1 → 3.0.0-alpha4
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 +30 -17
- 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 +30 -17
- 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/dist/stardust.dev.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/stardust v3.0.0-
|
|
2
|
+
* @nebula.js/stardust v3.0.0-alpha4
|
|
3
3
|
* Copyright (c) 2022 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -16197,7 +16197,7 @@
|
|
|
16197
16197
|
return cache[key];
|
|
16198
16198
|
}
|
|
16199
16199
|
|
|
16200
|
-
const NEBULA_VERSION_HASH = "
|
|
16200
|
+
const NEBULA_VERSION_HASH = "2842" ;
|
|
16201
16201
|
ClassNameGenerator.configure(componentName => {
|
|
16202
16202
|
|
|
16203
16203
|
return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
|
|
@@ -16770,7 +16770,7 @@
|
|
|
16770
16770
|
const appRef = React.createRef();
|
|
16771
16771
|
const element = document.createElement('div');
|
|
16772
16772
|
element.style.display = 'none';
|
|
16773
|
-
element.setAttribute('data-nebulajs-version', "3.0.0-
|
|
16773
|
+
element.setAttribute('data-nebulajs-version', "3.0.0-alpha4" );
|
|
16774
16774
|
element.setAttribute('data-app-id', app.id);
|
|
16775
16775
|
document.body.appendChild(element);
|
|
16776
16776
|
ReactDOM.render( /*#__PURE__*/React.createElement(NebulaApp, {
|
|
@@ -31645,7 +31645,8 @@
|
|
|
31645
31645
|
paddingRight: '8px'
|
|
31646
31646
|
},
|
|
31647
31647
|
["&.".concat(classes$a.barContainer)]: {
|
|
31648
|
-
|
|
31648
|
+
height: '100%',
|
|
31649
|
+
display: 'inline-block'
|
|
31649
31650
|
},
|
|
31650
31651
|
["& .".concat(classes$a.bar)]: {
|
|
31651
31652
|
border: "".concat(barBorderWidthPx, "px solid"),
|
|
@@ -31681,8 +31682,7 @@
|
|
|
31681
31682
|
let {
|
|
31682
31683
|
index,
|
|
31683
31684
|
style,
|
|
31684
|
-
data
|
|
31685
|
-
column = false
|
|
31685
|
+
data
|
|
31686
31686
|
} = _ref3;
|
|
31687
31687
|
const {
|
|
31688
31688
|
onClick,
|
|
@@ -31691,6 +31691,7 @@
|
|
|
31691
31691
|
onMouseEnter,
|
|
31692
31692
|
pages,
|
|
31693
31693
|
isLocked,
|
|
31694
|
+
column = false,
|
|
31694
31695
|
checkboxes = false,
|
|
31695
31696
|
dense = false,
|
|
31696
31697
|
frequencyMode = 'N',
|
|
@@ -32105,7 +32106,7 @@
|
|
|
32105
32106
|
if (typeof setCount === 'function' && layout) {
|
|
32106
32107
|
setCount(layout.qListObject.qSize.qcy);
|
|
32107
32108
|
}
|
|
32108
|
-
}, [layout]);
|
|
32109
|
+
}, [layout, layout && layout.qListObject.qSize.qcy]);
|
|
32109
32110
|
react.exports.useEffect(() => {
|
|
32110
32111
|
if (!instantPages || isLoadingData) {
|
|
32111
32112
|
return;
|
|
@@ -32801,14 +32802,20 @@
|
|
|
32801
32802
|
|
|
32802
32803
|
const onChange = e => {
|
|
32803
32804
|
setValue(e.target.value);
|
|
32804
|
-
|
|
32805
|
+
|
|
32806
|
+
if (e.target.value.length === 0) {
|
|
32807
|
+
model.abortListObjectSearch(TREE_PATH);
|
|
32808
|
+
} else {
|
|
32809
|
+
model.searchListObjectFor(TREE_PATH, e.target.value);
|
|
32810
|
+
}
|
|
32805
32811
|
};
|
|
32806
32812
|
|
|
32807
32813
|
const onKeyDown = e => {
|
|
32808
32814
|
switch (e.key) {
|
|
32809
32815
|
case 'Enter':
|
|
32810
|
-
|
|
32811
|
-
|
|
32816
|
+
// This is disabled to "solve" QB-10955 with the lowest risk
|
|
32817
|
+
// await model.acceptListObjectSearch(TREE_PATH, true);
|
|
32818
|
+
// setValue('');
|
|
32812
32819
|
break;
|
|
32813
32820
|
|
|
32814
32821
|
case 'Escape':
|
|
@@ -34467,7 +34474,7 @@
|
|
|
34467
34474
|
* user interact outside of passed element ref.
|
|
34468
34475
|
*/
|
|
34469
34476
|
|
|
34470
|
-
function useConfirmUnfocus(ref, selections) {
|
|
34477
|
+
function useConfirmUnfocus(ref, selections, shouldConfirmOnBlur) {
|
|
34471
34478
|
const [_isConfirmed, _setIsConfirmed] = react.exports.useState(false); // Wrap state in ref to use inside eventListener callback
|
|
34472
34479
|
|
|
34473
34480
|
const isConfirmedRef = react.exports.useRef(_isConfirmed);
|
|
@@ -34479,6 +34486,8 @@
|
|
|
34479
34486
|
};
|
|
34480
34487
|
|
|
34481
34488
|
react.exports.useEffect(() => {
|
|
34489
|
+
if (!shouldConfirmOnBlur) return undefined;
|
|
34490
|
+
|
|
34482
34491
|
const handleEvent = event => {
|
|
34483
34492
|
const interactInside = ref.current && ref.current.contains(event.target);
|
|
34484
34493
|
const isConfirmed = isConfirmedRef.current;
|
|
@@ -34497,7 +34506,7 @@
|
|
|
34497
34506
|
document.removeEventListener('mousedown', handleEvent);
|
|
34498
34507
|
document.removeEventListener('keydown', handleEvent);
|
|
34499
34508
|
};
|
|
34500
|
-
}, [ref, selections]);
|
|
34509
|
+
}, [ref, selections, shouldConfirmOnBlur]);
|
|
34501
34510
|
}
|
|
34502
34511
|
|
|
34503
34512
|
const PREFIX$4 = 'ListBoxInline';
|
|
@@ -34539,7 +34548,8 @@
|
|
|
34539
34548
|
showGray = true,
|
|
34540
34549
|
sortByState = 1,
|
|
34541
34550
|
scrollState = undefined,
|
|
34542
|
-
setCount = undefined
|
|
34551
|
+
setCount = undefined,
|
|
34552
|
+
shouldConfirmOnBlur = undefined
|
|
34543
34553
|
} = options;
|
|
34544
34554
|
let {
|
|
34545
34555
|
frequencyMode,
|
|
@@ -34694,7 +34704,7 @@
|
|
|
34694
34704
|
}
|
|
34695
34705
|
}, [selections]);
|
|
34696
34706
|
const listBoxRef = react.exports.useRef(null);
|
|
34697
|
-
useConfirmUnfocus(listBoxRef, selections);
|
|
34707
|
+
useConfirmUnfocus(listBoxRef, selections, shouldConfirmOnBlur);
|
|
34698
34708
|
react.exports.useEffect(() => {
|
|
34699
34709
|
if (!searchContainer || !searchContainer.current) {
|
|
34700
34710
|
return;
|
|
@@ -34720,7 +34730,9 @@
|
|
|
34720
34730
|
const counts = layout.qListObject.qDimensionInfo.qStateCounts;
|
|
34721
34731
|
const hasSelections = counts.qSelected + counts.qSelectedExcluded + counts.qLocked + counts.qLockedExcluded > 0;
|
|
34722
34732
|
const searchVisible = (search === true || search === 'toggle' && showSearch) && !selectDisabled();
|
|
34723
|
-
const
|
|
34733
|
+
const searchHeight = dense ? 27 : 40;
|
|
34734
|
+
const extraheight = dense ? 39 : 49;
|
|
34735
|
+
const minHeight = 49 + (searchVisible ? searchHeight : 0) + extraheight;
|
|
34724
34736
|
|
|
34725
34737
|
const onShowSearch = () => {
|
|
34726
34738
|
const newValue = !showSearch;
|
|
@@ -37213,7 +37225,7 @@
|
|
|
37213
37225
|
|
|
37214
37226
|
load(layout.visualization, withVersion);
|
|
37215
37227
|
return () => {};
|
|
37216
|
-
}, [types, state.sn, model, layout, appLayout, language]); // Long running query
|
|
37228
|
+
}, [types, state.sn, model, selections, layout, appLayout, language]); // Long running query
|
|
37217
37229
|
|
|
37218
37230
|
react.exports.useEffect(() => {
|
|
37219
37231
|
if (!validating) {
|
|
@@ -42000,6 +42012,7 @@
|
|
|
42000
42012
|
* @property {{setScrollPos:function(number):void, initScrollPos:number}} [options.scrollState=] Object including a setScrollPos function that sets current scroll position index. A initial scroll position index.
|
|
42001
42013
|
* @property {number=} [options.sortByState=1] Sort by state, detault 1 = sort descending, 0 = no sorting, -1 sort ascending.
|
|
42002
42014
|
* @property {function(number):void} [options.setCount=] A function that gets called with the length of the data in the Listbox.
|
|
42015
|
+
* @property {boolean} [options.shouldConfirmOnBlur=] A boolean that determines if the listbox should actively confirm selections on blur events.
|
|
42003
42016
|
*/
|
|
42004
42017
|
|
|
42005
42018
|
/**
|
|
@@ -42425,7 +42438,7 @@
|
|
|
42425
42438
|
var enigmaMocker_dev = {exports: {}};
|
|
42426
42439
|
|
|
42427
42440
|
/*
|
|
42428
|
-
* @nebula.js/enigma-mocker v3.0.0-
|
|
42441
|
+
* @nebula.js/enigma-mocker v3.0.0-alpha3
|
|
42429
42442
|
* Copyright (c) 2022 QlikTech International AB
|
|
42430
42443
|
* Released under the MIT license.
|
|
42431
42444
|
*/
|