@nebula.js/stardust 3.0.0-alpha1 → 3.0.0-alpha2

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @nebula.js/stardust v3.0.0-alpha1
2
+ * @nebula.js/stardust v3.0.0-alpha2
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 = "4ced" ;
11427
+ const NEBULA_VERSION_HASH = "9c10" ;
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-alpha1" );
12000
+ element.setAttribute('data-nebulajs-version', "3.0.0-alpha2" );
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
- position: 'relative'
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',
@@ -16773,7 +16774,7 @@ AutoSizer.defaultProps = {
16773
16774
  * user interact outside of passed element ref.
16774
16775
  */
16775
16776
 
16776
- function useConfirmUnfocus(ref, selections) {
16777
+ function useConfirmUnfocus(ref, selections, shouldConfirmOnBlur) {
16777
16778
  const [_isConfirmed, _setIsConfirmed] = useState$1(false); // Wrap state in ref to use inside eventListener callback
16778
16779
 
16779
16780
  const isConfirmedRef = useRef(_isConfirmed);
@@ -16785,6 +16786,8 @@ function useConfirmUnfocus(ref, selections) {
16785
16786
  };
16786
16787
 
16787
16788
  useEffect$1(() => {
16789
+ if (!shouldConfirmOnBlur) return undefined;
16790
+
16788
16791
  const handleEvent = event => {
16789
16792
  const interactInside = ref.current && ref.current.contains(event.target);
16790
16793
  const isConfirmed = isConfirmedRef.current;
@@ -16803,7 +16806,7 @@ function useConfirmUnfocus(ref, selections) {
16803
16806
  document.removeEventListener('mousedown', handleEvent);
16804
16807
  document.removeEventListener('keydown', handleEvent);
16805
16808
  };
16806
- }, [ref, selections]);
16809
+ }, [ref, selections, shouldConfirmOnBlur]);
16807
16810
  }
16808
16811
 
16809
16812
  const PREFIX$4 = 'ListBoxInline';
@@ -16845,7 +16848,8 @@ function ListBoxInline(_ref) {
16845
16848
  showGray = true,
16846
16849
  sortByState = 1,
16847
16850
  scrollState = undefined,
16848
- setCount = undefined
16851
+ setCount = undefined,
16852
+ shouldConfirmOnBlur = undefined
16849
16853
  } = options;
16850
16854
  let {
16851
16855
  frequencyMode,
@@ -17000,7 +17004,7 @@ function ListBoxInline(_ref) {
17000
17004
  }
17001
17005
  }, [selections]);
17002
17006
  const listBoxRef = useRef(null);
17003
- useConfirmUnfocus(listBoxRef, selections);
17007
+ useConfirmUnfocus(listBoxRef, selections, shouldConfirmOnBlur);
17004
17008
  useEffect$1(() => {
17005
17009
  if (!searchContainer || !searchContainer.current) {
17006
17010
  return;
@@ -17026,7 +17030,9 @@ function ListBoxInline(_ref) {
17026
17030
  const counts = layout.qListObject.qDimensionInfo.qStateCounts;
17027
17031
  const hasSelections = counts.qSelected + counts.qSelectedExcluded + counts.qLocked + counts.qLockedExcluded > 0;
17028
17032
  const searchVisible = (search === true || search === 'toggle' && showSearch) && !selectDisabled();
17029
- const minHeight = 49 + (searchVisible ? 40 : 0) + 49;
17033
+ const searchHeight = dense ? 27 : 40;
17034
+ const extraheight = dense ? 39 : 49;
17035
+ const minHeight = 49 + (searchVisible ? searchHeight : 0) + extraheight;
17030
17036
 
17031
17037
  const onShowSearch = () => {
17032
17038
  const newValue = !showSearch;
@@ -19519,7 +19525,7 @@ const Cell = forwardRef((_ref6, ref) => {
19519
19525
 
19520
19526
  load(layout.visualization, withVersion);
19521
19527
  return () => {};
19522
- }, [types, state.sn, model, layout, appLayout, language]); // Long running query
19528
+ }, [types, state.sn, model, selections, layout, appLayout, language]); // Long running query
19523
19529
 
19524
19530
  useEffect$1(() => {
19525
19531
  if (!validating) {
@@ -24306,6 +24312,7 @@ const mergeConfigs = (base, c) => ({
24306
24312
  * @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
24313
  * @property {number=} [options.sortByState=1] Sort by state, detault 1 = sort descending, 0 = no sorting, -1 sort ascending.
24308
24314
  * @property {function(number):void} [options.setCount=] A function that gets called with the length of the data in the Listbox.
24315
+ * @property {boolean} [options.shouldConfirmOnBlur=] A boolean that determines if the listbox should actively confirm selections on blur events.
24309
24316
  */
24310
24317
 
24311
24318
  /**
@@ -24731,7 +24738,7 @@ var enigmaMocker = {exports: {}};
24731
24738
  var enigmaMocker_dev = {exports: {}};
24732
24739
 
24733
24740
  /*
24734
- * @nebula.js/enigma-mocker v3.0.0-alpha0
24741
+ * @nebula.js/enigma-mocker v3.0.0-alpha1
24735
24742
  * Copyright (c) 2022 QlikTech International AB
24736
24743
  * Released under the MIT license.
24737
24744
  */