@nebula.js/stardust 4.0.0-alpha.3 → 4.0.0-alpha.4

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 v4.0.0-alpha.3
2
+ * @nebula.js/stardust v4.0.0-alpha.4
3
3
  * Copyright (c) 2023 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -1493,6 +1493,26 @@ var Selection_SelectPossible = {
1493
1493
  "zh-TW": "選取可能值"
1494
1494
  }
1495
1495
  };
1496
+ var SelectionToolbar_ClickToUnlock = {
1497
+ id: "SelectionToolbar.ClickToUnlock",
1498
+ locale: {
1499
+ "de-DE": "Klicken zum Freigeben",
1500
+ "en-US": "Click to unlock",
1501
+ "es-ES": "Haga clic para desbloquearla",
1502
+ "fr-FR": "Cliquez pour déverrouiller",
1503
+ "it-IT": "Fare clic per sbloccare",
1504
+ "ja-JP": "クリックしてロック解除",
1505
+ "ko-KR": "잠금을 해제하려면 클릭하십시오.",
1506
+ "nl-NL": "Klik om te ontgrendelen",
1507
+ "pl-PL": "Aby odblokować, kliknij",
1508
+ "pt-BR": "Clique para destravar",
1509
+ "ru-RU": "Щелкните, чтобы разблокировать",
1510
+ "sv-SE": "Klicka för att låsa upp",
1511
+ "tr-TR": "Kilidi kaldırmak için tıklayın",
1512
+ "zh-CN": "单击以解锁",
1513
+ "zh-TW": "按一下以解除鎖定"
1514
+ }
1515
+ };
1496
1516
  var Visualization_Incomplete = {
1497
1517
  id: "Visualization.Incomplete",
1498
1518
  locale: {
@@ -1664,6 +1684,7 @@ var all = {
1664
1684
  Selection_SelectAlternative: Selection_SelectAlternative,
1665
1685
  Selection_SelectExcluded: Selection_SelectExcluded,
1666
1686
  Selection_SelectPossible: Selection_SelectPossible,
1687
+ SelectionToolbar_ClickToUnlock: SelectionToolbar_ClickToUnlock,
1667
1688
  Visualization_Incomplete: Visualization_Incomplete,
1668
1689
  Visualization_Incomplete_Dimensions: Visualization_Incomplete_Dimensions,
1669
1690
  Visualization_Incomplete_Measures: Visualization_Incomplete_Measures,
@@ -8043,7 +8064,7 @@ function create$3(definition) {
8043
8064
  return cache[key];
8044
8065
  }
8045
8066
 
8046
- const NEBULA_VERSION_HASH = "ee80" ;
8067
+ const NEBULA_VERSION_HASH = "0bc0" ;
8047
8068
  ClassNameGenerator$1.configure(componentName => {
8048
8069
  return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
8049
8070
  });
@@ -8251,7 +8272,7 @@ function boot(_ref2) {
8251
8272
  const appRef = React__default.createRef();
8252
8273
  const element = document.createElement('div');
8253
8274
  element.style.display = 'none';
8254
- element.setAttribute('data-nebulajs-version', "4.0.0-alpha.3" );
8275
+ element.setAttribute('data-nebulajs-version', "4.0.0-alpha.4" );
8255
8276
  element.setAttribute('data-app-id', app.id);
8256
8277
  document.body.appendChild(element);
8257
8278
  const root = client.createRoot(element);
@@ -12959,7 +12980,10 @@ const escapeField = field => {
12959
12980
  if (!field) {
12960
12981
  return field;
12961
12982
  }
12962
- return "".concat(field.replace(/\]/g, ']]'));
12983
+ if (/^[A-Za-z][A-Za-z0-9_]*$/.test(field)) {
12984
+ return field;
12985
+ }
12986
+ return "[".concat(field.replace(/\]/g, ']]'), "]");
12963
12987
  };
12964
12988
  const needToFetchFrequencyMax = layout => (layout === null || layout === void 0 ? void 0 : layout.frequencyMax) === 'fetch';
12965
12989
  const getFrequencyMaxExpression = field => {
@@ -13729,15 +13753,12 @@ const ActionsGroup = React__default.forwardRef((_ref2, ref) => {
13729
13753
  const popoverStyle = {
13730
13754
  pointerEvents: 'none'
13731
13755
  };
13732
- const popoverAnchorOrigin = {
13733
- vertical: 'top',
13734
- horizontal: 'right'
13735
- };
13736
13756
  const popoverTransformOrigin = {
13737
13757
  vertical: 'bottom',
13738
13758
  horizontal: 'right'
13739
13759
  };
13740
13760
  function ActionsToolbar(_ref3) {
13761
+ var _popover$anchorEl$cli, _popover$anchorEl;
13741
13762
  let {
13742
13763
  show = true,
13743
13764
  actions = [],
@@ -13776,6 +13797,10 @@ function ActionsToolbar(_ref3) {
13776
13797
  const dividerStyle = useMemo$1(() => ({
13777
13798
  margin: theme.spacing(0.5, 0)
13778
13799
  }));
13800
+ const popoverAnchorOrigin = {
13801
+ vertical: 15,
13802
+ horizontal: ((_popover$anchorEl$cli = (_popover$anchorEl = popover.anchorEl) === null || _popover$anchorEl === void 0 ? void 0 : _popover$anchorEl.clientWidth) !== null && _popover$anchorEl$cli !== void 0 ? _popover$anchorEl$cli : 0) - 7
13803
+ };
13779
13804
  const getEnabledButton = last => {
13780
13805
  const actionsElement = actionsRef.current || actionsRefMock;
13781
13806
  if (!actionsElement) return null;
@@ -15990,19 +16015,20 @@ const classes$4 = {
15990
16015
  listboxWrapper: "".concat(PREFIX$4, "-listboxWrapper")
15991
16016
  };
15992
16017
  const StyledGrid$3 = styled$1(Grid, {
15993
- shouldForwardProp: p => !['containerPadding'].includes(p)
16018
+ shouldForwardProp: p => !['containerPadding', 'hasIcon'].includes(p)
15994
16019
  })(_ref => {
15995
16020
  var _theme$listBox$backgr, _theme$listBox;
15996
16021
  let {
15997
16022
  theme,
15998
- containerPadding
16023
+ containerPadding,
16024
+ hasIcon
15999
16025
  } = _ref;
16000
16026
  return {
16001
16027
  backgroundColor: (_theme$listBox$backgr = (_theme$listBox = theme.listBox) === null || _theme$listBox === void 0 ? void 0 : _theme$listBox.backgroundColor) !== null && _theme$listBox$backgr !== void 0 ? _theme$listBox$backgr : theme.palette.background.default,
16002
16028
  ["& .".concat(classes$4.listBoxHeader)]: {
16003
16029
  alignSelf: 'center',
16004
16030
  display: 'flex',
16005
- width: "calc(100% - ".concat(BUTTON_ICON_WIDTH, "px)")
16031
+ width: "calc(100% - ".concat(hasIcon ? BUTTON_ICON_WIDTH : 0, "px)")
16006
16032
  },
16007
16033
  ["& .".concat(classes$4.screenReaderOnly)]: {
16008
16034
  position: 'absolute',
@@ -16133,9 +16159,6 @@ function ListBoxInline(_ref3) {
16133
16159
  useEffect$1(() => {
16134
16160
  const show = () => {
16135
16161
  setShowToolbar(true);
16136
- if (search === 'toggle' && toolbar === false) {
16137
- setShowSearch(true);
16138
- }
16139
16162
  };
16140
16163
  const hide = () => {
16141
16164
  setShowToolbar(false);
@@ -16243,7 +16266,8 @@ function ListBoxInline(_ref3) {
16243
16266
  onKeyDown: handleKeyDown,
16244
16267
  onMouseEnter: handleOnMouseEnter,
16245
16268
  onMouseLeave: handleOnMouseLeave,
16246
- ref: containerRef
16269
+ ref: containerRef,
16270
+ hasIcon: showIcons
16247
16271
  }, toolbar && /*#__PURE__*/React__default.createElement(Grid, {
16248
16272
  item: true,
16249
16273
  container: true,