@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/core/esm/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
|
*/
|
|
@@ -11424,7 +11424,7 @@ function create$3(definition) {
|
|
|
11424
11424
|
return cache[key];
|
|
11425
11425
|
}
|
|
11426
11426
|
|
|
11427
|
-
const NEBULA_VERSION_HASH = "
|
|
11427
|
+
const NEBULA_VERSION_HASH = "2842" ;
|
|
11428
11428
|
ClassNameGenerator.configure(componentName => {
|
|
11429
11429
|
|
|
11430
11430
|
return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
|
|
@@ -11997,7 +11997,7 @@ function boot(_ref2) {
|
|
|
11997
11997
|
const appRef = React__default.createRef();
|
|
11998
11998
|
const element = document.createElement('div');
|
|
11999
11999
|
element.style.display = 'none';
|
|
12000
|
-
element.setAttribute('data-nebulajs-version', "3.0.0-
|
|
12000
|
+
element.setAttribute('data-nebulajs-version', "3.0.0-alpha4" );
|
|
12001
12001
|
element.setAttribute('data-app-id', app.id);
|
|
12002
12002
|
document.body.appendChild(element);
|
|
12003
12003
|
ReactDOM.render( /*#__PURE__*/React__default.createElement(NebulaApp, {
|
|
@@ -13951,7 +13951,8 @@ const Root$1 = styled('div')(_ref2 => {
|
|
|
13951
13951
|
paddingRight: '8px'
|
|
13952
13952
|
},
|
|
13953
13953
|
["&.".concat(classes$a.barContainer)]: {
|
|
13954
|
-
|
|
13954
|
+
height: '100%',
|
|
13955
|
+
display: 'inline-block'
|
|
13955
13956
|
},
|
|
13956
13957
|
["& .".concat(classes$a.bar)]: {
|
|
13957
13958
|
border: "".concat(barBorderWidthPx, "px solid"),
|
|
@@ -13987,8 +13988,7 @@ function RowColumn(_ref3) {
|
|
|
13987
13988
|
let {
|
|
13988
13989
|
index,
|
|
13989
13990
|
style,
|
|
13990
|
-
data
|
|
13991
|
-
column = false
|
|
13991
|
+
data
|
|
13992
13992
|
} = _ref3;
|
|
13993
13993
|
const {
|
|
13994
13994
|
onClick,
|
|
@@ -13997,6 +13997,7 @@ function RowColumn(_ref3) {
|
|
|
13997
13997
|
onMouseEnter,
|
|
13998
13998
|
pages,
|
|
13999
13999
|
isLocked,
|
|
14000
|
+
column = false,
|
|
14000
14001
|
checkboxes = false,
|
|
14001
14002
|
dense = false,
|
|
14002
14003
|
frequencyMode = 'N',
|
|
@@ -14411,7 +14412,7 @@ function ListBox(_ref2) {
|
|
|
14411
14412
|
if (typeof setCount === 'function' && layout) {
|
|
14412
14413
|
setCount(layout.qListObject.qSize.qcy);
|
|
14413
14414
|
}
|
|
14414
|
-
}, [layout]);
|
|
14415
|
+
}, [layout, layout && layout.qListObject.qSize.qcy]);
|
|
14415
14416
|
useEffect$1(() => {
|
|
14416
14417
|
if (!instantPages || isLoadingData) {
|
|
14417
14418
|
return;
|
|
@@ -15107,14 +15108,20 @@ function ListBoxSearch(_ref) {
|
|
|
15107
15108
|
|
|
15108
15109
|
const onChange = e => {
|
|
15109
15110
|
setValue(e.target.value);
|
|
15110
|
-
|
|
15111
|
+
|
|
15112
|
+
if (e.target.value.length === 0) {
|
|
15113
|
+
model.abortListObjectSearch(TREE_PATH);
|
|
15114
|
+
} else {
|
|
15115
|
+
model.searchListObjectFor(TREE_PATH, e.target.value);
|
|
15116
|
+
}
|
|
15111
15117
|
};
|
|
15112
15118
|
|
|
15113
15119
|
const onKeyDown = e => {
|
|
15114
15120
|
switch (e.key) {
|
|
15115
15121
|
case 'Enter':
|
|
15116
|
-
|
|
15117
|
-
|
|
15122
|
+
// This is disabled to "solve" QB-10955 with the lowest risk
|
|
15123
|
+
// await model.acceptListObjectSearch(TREE_PATH, true);
|
|
15124
|
+
// setValue('');
|
|
15118
15125
|
break;
|
|
15119
15126
|
|
|
15120
15127
|
case 'Escape':
|
|
@@ -16773,7 +16780,7 @@ AutoSizer.defaultProps = {
|
|
|
16773
16780
|
* user interact outside of passed element ref.
|
|
16774
16781
|
*/
|
|
16775
16782
|
|
|
16776
|
-
function useConfirmUnfocus(ref, selections) {
|
|
16783
|
+
function useConfirmUnfocus(ref, selections, shouldConfirmOnBlur) {
|
|
16777
16784
|
const [_isConfirmed, _setIsConfirmed] = useState$1(false); // Wrap state in ref to use inside eventListener callback
|
|
16778
16785
|
|
|
16779
16786
|
const isConfirmedRef = useRef(_isConfirmed);
|
|
@@ -16785,6 +16792,8 @@ function useConfirmUnfocus(ref, selections) {
|
|
|
16785
16792
|
};
|
|
16786
16793
|
|
|
16787
16794
|
useEffect$1(() => {
|
|
16795
|
+
if (!shouldConfirmOnBlur) return undefined;
|
|
16796
|
+
|
|
16788
16797
|
const handleEvent = event => {
|
|
16789
16798
|
const interactInside = ref.current && ref.current.contains(event.target);
|
|
16790
16799
|
const isConfirmed = isConfirmedRef.current;
|
|
@@ -16803,7 +16812,7 @@ function useConfirmUnfocus(ref, selections) {
|
|
|
16803
16812
|
document.removeEventListener('mousedown', handleEvent);
|
|
16804
16813
|
document.removeEventListener('keydown', handleEvent);
|
|
16805
16814
|
};
|
|
16806
|
-
}, [ref, selections]);
|
|
16815
|
+
}, [ref, selections, shouldConfirmOnBlur]);
|
|
16807
16816
|
}
|
|
16808
16817
|
|
|
16809
16818
|
const PREFIX$4 = 'ListBoxInline';
|
|
@@ -16845,7 +16854,8 @@ function ListBoxInline(_ref) {
|
|
|
16845
16854
|
showGray = true,
|
|
16846
16855
|
sortByState = 1,
|
|
16847
16856
|
scrollState = undefined,
|
|
16848
|
-
setCount = undefined
|
|
16857
|
+
setCount = undefined,
|
|
16858
|
+
shouldConfirmOnBlur = undefined
|
|
16849
16859
|
} = options;
|
|
16850
16860
|
let {
|
|
16851
16861
|
frequencyMode,
|
|
@@ -17000,7 +17010,7 @@ function ListBoxInline(_ref) {
|
|
|
17000
17010
|
}
|
|
17001
17011
|
}, [selections]);
|
|
17002
17012
|
const listBoxRef = useRef(null);
|
|
17003
|
-
useConfirmUnfocus(listBoxRef, selections);
|
|
17013
|
+
useConfirmUnfocus(listBoxRef, selections, shouldConfirmOnBlur);
|
|
17004
17014
|
useEffect$1(() => {
|
|
17005
17015
|
if (!searchContainer || !searchContainer.current) {
|
|
17006
17016
|
return;
|
|
@@ -17026,7 +17036,9 @@ function ListBoxInline(_ref) {
|
|
|
17026
17036
|
const counts = layout.qListObject.qDimensionInfo.qStateCounts;
|
|
17027
17037
|
const hasSelections = counts.qSelected + counts.qSelectedExcluded + counts.qLocked + counts.qLockedExcluded > 0;
|
|
17028
17038
|
const searchVisible = (search === true || search === 'toggle' && showSearch) && !selectDisabled();
|
|
17029
|
-
const
|
|
17039
|
+
const searchHeight = dense ? 27 : 40;
|
|
17040
|
+
const extraheight = dense ? 39 : 49;
|
|
17041
|
+
const minHeight = 49 + (searchVisible ? searchHeight : 0) + extraheight;
|
|
17030
17042
|
|
|
17031
17043
|
const onShowSearch = () => {
|
|
17032
17044
|
const newValue = !showSearch;
|
|
@@ -19519,7 +19531,7 @@ const Cell = forwardRef((_ref6, ref) => {
|
|
|
19519
19531
|
|
|
19520
19532
|
load(layout.visualization, withVersion);
|
|
19521
19533
|
return () => {};
|
|
19522
|
-
}, [types, state.sn, model, layout, appLayout, language]); // Long running query
|
|
19534
|
+
}, [types, state.sn, model, selections, layout, appLayout, language]); // Long running query
|
|
19523
19535
|
|
|
19524
19536
|
useEffect$1(() => {
|
|
19525
19537
|
if (!validating) {
|
|
@@ -24306,6 +24318,7 @@ const mergeConfigs = (base, c) => ({
|
|
|
24306
24318
|
* @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.
|
|
24307
24319
|
* @property {number=} [options.sortByState=1] Sort by state, detault 1 = sort descending, 0 = no sorting, -1 sort ascending.
|
|
24308
24320
|
* @property {function(number):void} [options.setCount=] A function that gets called with the length of the data in the Listbox.
|
|
24321
|
+
* @property {boolean} [options.shouldConfirmOnBlur=] A boolean that determines if the listbox should actively confirm selections on blur events.
|
|
24309
24322
|
*/
|
|
24310
24323
|
|
|
24311
24324
|
/**
|
|
@@ -24731,7 +24744,7 @@ var enigmaMocker = {exports: {}};
|
|
|
24731
24744
|
var enigmaMocker_dev = {exports: {}};
|
|
24732
24745
|
|
|
24733
24746
|
/*
|
|
24734
|
-
* @nebula.js/enigma-mocker v3.0.0-
|
|
24747
|
+
* @nebula.js/enigma-mocker v3.0.0-alpha3
|
|
24735
24748
|
* Copyright (c) 2022 QlikTech International AB
|
|
24736
24749
|
* Released under the MIT license.
|
|
24737
24750
|
*/
|