@nebula.js/stardust 3.0.0-alpha0 → 3.0.0-alpha3

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-alpha0
2
+ * @nebula.js/stardust v3.0.0-alpha3
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 = "30d9" ;
11427
+ const NEBULA_VERSION_HASH = "2bc2" ;
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-alpha0" );
12000
+ element.setAttribute('data-nebulajs-version', "3.0.0-alpha3" );
12001
12001
  element.setAttribute('data-app-id', app.id);
12002
12002
  document.body.appendChild(element);
12003
12003
  ReactDOM.render( /*#__PURE__*/React__default.createElement(NebulaApp, {
@@ -13628,8 +13628,7 @@ function ListBoxRadioButton(_ref) {
13628
13628
  disableRipple: true,
13629
13629
  size: dense ? 'small' : 'medium',
13630
13630
  sx: dense && {
13631
- padding: '0px',
13632
- paddingLeft: '6px'
13631
+ padding: '0px 0px 0px 12px'
13633
13632
  }
13634
13633
  });
13635
13634
  }
@@ -13952,7 +13951,8 @@ const Root$1 = styled('div')(_ref2 => {
13952
13951
  paddingRight: '8px'
13953
13952
  },
13954
13953
  ["&.".concat(classes$a.barContainer)]: {
13955
- position: 'relative'
13954
+ height: '100%',
13955
+ display: 'inline-block'
13956
13956
  },
13957
13957
  ["& .".concat(classes$a.bar)]: {
13958
13958
  border: "".concat(barBorderWidthPx, "px solid"),
@@ -13978,7 +13978,8 @@ const Root$1 = styled('div')(_ref2 => {
13978
13978
  borderColor: '#BFE5D0'
13979
13979
  },
13980
13980
  ["& .".concat(classes$a.excludedTextWithCheckbox)]: {
13981
- color: '#828282'
13981
+ color: '#828282',
13982
+ fontStyle: 'italic'
13982
13983
  }
13983
13984
  };
13984
13985
  });
@@ -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',
@@ -15113,8 +15114,9 @@ function ListBoxSearch(_ref) {
15113
15114
  const onKeyDown = e => {
15114
15115
  switch (e.key) {
15115
15116
  case 'Enter':
15116
- model.acceptListObjectSearch(TREE_PATH, true);
15117
- setValue('');
15117
+ // This is disabled to "solve" QB-10955 with the lowest risk
15118
+ // await model.acceptListObjectSearch(TREE_PATH, true);
15119
+ // setValue('');
15118
15120
  break;
15119
15121
 
15120
15122
  case 'Escape':
@@ -15716,15 +15718,14 @@ var DownArrow = (props => SvgIcon(downArrow(props)));
15716
15718
 
15717
15719
  const PREFIX$6 = 'MultiState';
15718
15720
  const classes$6 = {
15719
- item: "".concat(PREFIX$6, "-item"),
15720
- badge: "".concat(PREFIX$6, "-badge")
15721
+ item: "".concat(PREFIX$6, "-item")
15721
15722
  };
15722
- const StyledListBoxPopover = styled(ListBoxPopover)(_ref => {
15723
+ const StyledGrid$5 = styled(Grid)(_ref => {
15723
15724
  let {
15724
15725
  theme
15725
15726
  } = _ref;
15726
15727
  return {
15727
- ["& .".concat(classes$6.item)]: {
15728
+ ["&.".concat(classes$6.item)]: {
15728
15729
  backgroundColor: theme.palette.background.paper,
15729
15730
  position: 'relative',
15730
15731
  cursor: 'pointer',
@@ -15734,9 +15735,6 @@ const StyledListBoxPopover = styled(ListBoxPopover)(_ref => {
15734
15735
  },
15735
15736
  height: '100%',
15736
15737
  alignItems: 'center'
15737
- },
15738
- ["& .".concat(classes$6.badge)]: {
15739
- padding: theme.spacing(0, 1)
15740
15738
  }
15741
15739
  };
15742
15740
  });
@@ -15795,7 +15793,9 @@ function MultiState(_ref2) {
15795
15793
  xs: true,
15796
15794
  zeroMinWidth: true
15797
15795
  }, /*#__PURE__*/React__default.createElement(Badge, {
15798
- className: classes$6.badge,
15796
+ style: {
15797
+ padding: '0px 8px'
15798
+ },
15799
15799
  color: "secondary",
15800
15800
  badgeContent: field.states.length
15801
15801
  }, /*#__PURE__*/React__default.createElement(Typography, {
@@ -15865,12 +15865,12 @@ function MultiState(_ref2) {
15865
15865
  }
15866
15866
  }
15867
15867
  }, Fields);
15868
- const Component = moreAlignTo ? PopoverFields : /*#__PURE__*/React__default.createElement(Grid, {
15868
+ const Component = moreAlignTo ? PopoverFields : /*#__PURE__*/React__default.createElement(StyledGrid$5, {
15869
15869
  container: true,
15870
15870
  gap: 0,
15871
15871
  className: classes$6.item,
15872
15872
  onClick: handleShowFields
15873
- }, Header, showFields && PopoverFields, showStateIx > -1 && /*#__PURE__*/React__default.createElement(StyledListBoxPopover, {
15873
+ }, Header, showFields && PopoverFields, showStateIx > -1 && /*#__PURE__*/React__default.createElement(ListBoxPopover, {
15874
15874
  alignTo: alignTo,
15875
15875
  show: showStateIx > -1,
15876
15876
  close: handleCloseShowState,
@@ -15878,7 +15878,7 @@ function MultiState(_ref2) {
15878
15878
  fieldName: field.selections[showStateIx].qField,
15879
15879
  stateName: field.states[showStateIx]
15880
15880
  }));
15881
- return moreAlignTo && showStateIx > -1 ? /*#__PURE__*/React__default.createElement(StyledListBoxPopover, {
15881
+ return moreAlignTo && showStateIx > -1 ? /*#__PURE__*/React__default.createElement(ListBoxPopover, {
15882
15882
  alignTo: alignTo,
15883
15883
  show: showStateIx > -1,
15884
15884
  close: handleCloseShowState,
@@ -16775,7 +16775,7 @@ AutoSizer.defaultProps = {
16775
16775
  * user interact outside of passed element ref.
16776
16776
  */
16777
16777
 
16778
- function useConfirmUnfocus(ref, selections) {
16778
+ function useConfirmUnfocus(ref, selections, shouldConfirmOnBlur) {
16779
16779
  const [_isConfirmed, _setIsConfirmed] = useState$1(false); // Wrap state in ref to use inside eventListener callback
16780
16780
 
16781
16781
  const isConfirmedRef = useRef(_isConfirmed);
@@ -16787,6 +16787,8 @@ function useConfirmUnfocus(ref, selections) {
16787
16787
  };
16788
16788
 
16789
16789
  useEffect$1(() => {
16790
+ if (!shouldConfirmOnBlur) return undefined;
16791
+
16790
16792
  const handleEvent = event => {
16791
16793
  const interactInside = ref.current && ref.current.contains(event.target);
16792
16794
  const isConfirmed = isConfirmedRef.current;
@@ -16805,7 +16807,7 @@ function useConfirmUnfocus(ref, selections) {
16805
16807
  document.removeEventListener('mousedown', handleEvent);
16806
16808
  document.removeEventListener('keydown', handleEvent);
16807
16809
  };
16808
- }, [ref, selections]);
16810
+ }, [ref, selections, shouldConfirmOnBlur]);
16809
16811
  }
16810
16812
 
16811
16813
  const PREFIX$4 = 'ListBoxInline';
@@ -16847,7 +16849,8 @@ function ListBoxInline(_ref) {
16847
16849
  showGray = true,
16848
16850
  sortByState = 1,
16849
16851
  scrollState = undefined,
16850
- setCount = undefined
16852
+ setCount = undefined,
16853
+ shouldConfirmOnBlur = undefined
16851
16854
  } = options;
16852
16855
  let {
16853
16856
  frequencyMode,
@@ -17002,7 +17005,7 @@ function ListBoxInline(_ref) {
17002
17005
  }
17003
17006
  }, [selections]);
17004
17007
  const listBoxRef = useRef(null);
17005
- useConfirmUnfocus(listBoxRef, selections);
17008
+ useConfirmUnfocus(listBoxRef, selections, shouldConfirmOnBlur);
17006
17009
  useEffect$1(() => {
17007
17010
  if (!searchContainer || !searchContainer.current) {
17008
17011
  return;
@@ -17028,7 +17031,9 @@ function ListBoxInline(_ref) {
17028
17031
  const counts = layout.qListObject.qDimensionInfo.qStateCounts;
17029
17032
  const hasSelections = counts.qSelected + counts.qSelectedExcluded + counts.qLocked + counts.qLockedExcluded > 0;
17030
17033
  const searchVisible = (search === true || search === 'toggle' && showSearch) && !selectDisabled();
17031
- const minHeight = 49 + (searchVisible ? 40 : 0) + 49;
17034
+ const searchHeight = dense ? 27 : 40;
17035
+ const extraheight = dense ? 39 : 49;
17036
+ const minHeight = 49 + (searchVisible ? searchHeight : 0) + extraheight;
17032
17037
 
17033
17038
  const onShowSearch = () => {
17034
17039
  const newValue = !showSearch;
@@ -19521,7 +19526,7 @@ const Cell = forwardRef((_ref6, ref) => {
19521
19526
 
19522
19527
  load(layout.visualization, withVersion);
19523
19528
  return () => {};
19524
- }, [types, state.sn, model, layout, appLayout, language]); // Long running query
19529
+ }, [types, state.sn, model, selections, layout, appLayout, language]); // Long running query
19525
19530
 
19526
19531
  useEffect$1(() => {
19527
19532
  if (!validating) {
@@ -24308,6 +24313,7 @@ const mergeConfigs = (base, c) => ({
24308
24313
  * @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.
24309
24314
  * @property {number=} [options.sortByState=1] Sort by state, detault 1 = sort descending, 0 = no sorting, -1 sort ascending.
24310
24315
  * @property {function(number):void} [options.setCount=] A function that gets called with the length of the data in the Listbox.
24316
+ * @property {boolean} [options.shouldConfirmOnBlur=] A boolean that determines if the listbox should actively confirm selections on blur events.
24311
24317
  */
24312
24318
 
24313
24319
  /**
@@ -24733,7 +24739,7 @@ var enigmaMocker = {exports: {}};
24733
24739
  var enigmaMocker_dev = {exports: {}};
24734
24740
 
24735
24741
  /*
24736
- * @nebula.js/enigma-mocker v2.11.0
24742
+ * @nebula.js/enigma-mocker v3.0.0-alpha2
24737
24743
  * Copyright (c) 2022 QlikTech International AB
24738
24744
  * Released under the MIT license.
24739
24745
  */