@nebula.js/stardust 5.0.0 → 5.0.2

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 v5.0.0
2
+ * @nebula.js/stardust v5.0.2
3
3
  * Copyright (c) 2024 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -7,7 +7,7 @@
7
7
  import * as React from 'react';
8
8
  import React__default, { useState as useState$1, useEffect as useEffect$1, forwardRef, useMemo as useMemo$1, useImperativeHandle as useImperativeHandle$1, useContext, useReducer, useCallback, useLayoutEffect as useLayoutEffect$1, PureComponent, useRef, createElement, Component } from 'react';
9
9
  import ReactDOM from 'react-dom';
10
- import { CacheProvider, Global, ThemeContext as ThemeContext$2, css, keyframes } from '@emotion/react';
10
+ import { CacheProvider, Global, ThemeContext as ThemeContext$1, css, keyframes } from '@emotion/react';
11
11
  import { Checkbox, Radio, Typography, FormControlLabel, Box, Grid, Tooltip, Paper, IconButton, styled as styled$3, Popover, MenuList, MenuItem, ListItemIcon, Divider, OutlinedInput, InputAdornment, Badge, List, ListItem, Button, ButtonBase, CircularProgress, Icon } from '@mui/material';
12
12
  import styled$2 from '@emotion/styled';
13
13
 
@@ -742,7 +742,7 @@ function _toPrimitive(t, r) {
742
742
  }
743
743
  function _toPropertyKey(t) {
744
744
  var i = _toPrimitive(t, "string");
745
- return "symbol" == typeof i ? i : String(i);
745
+ return "symbol" == typeof i ? i : i + "";
746
746
  }
747
747
  function _defineProperty(obj, key, value) {
748
748
  key = _toPropertyKey(key);
@@ -775,12 +775,11 @@ function _extends$6() {
775
775
  function _objectWithoutPropertiesLoose$2(source, excluded) {
776
776
  if (source == null) return {};
777
777
  var target = {};
778
- var sourceKeys = Object.keys(source);
779
- var key, i;
780
- for (i = 0; i < sourceKeys.length; i++) {
781
- key = sourceKeys[i];
782
- if (excluded.indexOf(key) >= 0) continue;
783
- target[key] = source[key];
778
+ for (var key in source) {
779
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
780
+ if (excluded.indexOf(key) >= 0) continue;
781
+ target[key] = source[key];
782
+ }
784
783
  }
785
784
  return target;
786
785
  }
@@ -4138,7 +4137,7 @@ function hash (value, length) {
4138
4137
  * @param {string} value
4139
4138
  * @return {string}
4140
4139
  */
4141
- function trim$1 (value) {
4140
+ function trim (value) {
4142
4141
  return value.trim()
4143
4142
  }
4144
4143
 
@@ -4355,7 +4354,7 @@ function dealloc (value) {
4355
4354
  * @return {string}
4356
4355
  */
4357
4356
  function delimit (type) {
4358
- return trim$1(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))
4357
+ return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))
4359
4358
  }
4360
4359
 
4361
4360
  /**
@@ -4604,7 +4603,7 @@ function ruleset (value, root, parent, index, offset, rules, points, type, props
4604
4603
 
4605
4604
  for (var i = 0, j = 0, k = 0; i < index; ++i)
4606
4605
  for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)
4607
- if (z = trim$1(j > 0 ? rule[x] + ' ' + y : replace(y, /&\f/g, rule[x])))
4606
+ if (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\f/g, rule[x])))
4608
4607
  props[k++] = z;
4609
4608
 
4610
4609
  return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length)
@@ -5262,7 +5261,7 @@ function GlobalStyles(props) {
5262
5261
  }
5263
5262
 
5264
5263
  /**
5265
- * @mui/styled-engine v5.15.11
5264
+ * @mui/styled-engine v5.15.14
5266
5265
  *
5267
5266
  * @license MIT
5268
5267
  * This source code is licensed under the MIT license found in the
@@ -5286,7 +5285,7 @@ var styledEngine = /*#__PURE__*/Object.freeze({
5286
5285
  __proto__: null,
5287
5286
  GlobalStyles: GlobalStyles,
5288
5287
  StyledEngineProvider: StyledEngineProvider,
5289
- ThemeContext: ThemeContext$2,
5288
+ ThemeContext: ThemeContext$1,
5290
5289
  css: css,
5291
5290
  default: styled$1,
5292
5291
  internal_processStyles: internal_processStyles,
@@ -5464,7 +5463,6 @@ function createBreakpoints(breakpoints) {
5464
5463
  const shape = {
5465
5464
  borderRadius: 4
5466
5465
  };
5467
- var shape$1 = shape;
5468
5466
 
5469
5467
  function merge(acc, item) {
5470
5468
  if (!item) {
@@ -6283,7 +6281,6 @@ const defaultSxConfig = {
6283
6281
  themeKey: 'typography'
6284
6282
  }
6285
6283
  };
6286
- var defaultSxConfig$1 = defaultSxConfig;
6287
6284
 
6288
6285
  function objectsHaveSameKeys(...objects) {
6289
6286
  const allKeys = objects.reduce((keys, object) => keys.concat(Object.keys(object)), []);
@@ -6351,7 +6348,7 @@ function unstable_createStyleFunctionSx() {
6351
6348
  if (!sx) {
6352
6349
  return null; // Emotion & styled-components will neglect null
6353
6350
  }
6354
- const config = (_theme$unstable_sxCon = theme.unstable_sxConfig) != null ? _theme$unstable_sxCon : defaultSxConfig$1;
6351
+ const config = (_theme$unstable_sxCon = theme.unstable_sxConfig) != null ? _theme$unstable_sxCon : defaultSxConfig;
6355
6352
 
6356
6353
  /*
6357
6354
  * Receive `sxInput` as object or callback
@@ -6502,11 +6499,11 @@ function createTheme$2(options = {}, ...args) {
6502
6499
  mode: 'light'
6503
6500
  }, paletteInput),
6504
6501
  spacing,
6505
- shape: _extends$4({}, shape$1, shapeInput)
6502
+ shape: _extends$4({}, shape, shapeInput)
6506
6503
  }, other);
6507
6504
  muiTheme.applyStyles = applyStyles;
6508
6505
  muiTheme = args.reduce((acc, argument) => deepmerge$1(acc, argument), muiTheme);
6509
- muiTheme.unstable_sxConfig = _extends$4({}, defaultSxConfig$1, other == null ? void 0 : other.unstable_sxConfig);
6506
+ muiTheme.unstable_sxConfig = _extends$4({}, defaultSxConfig, other == null ? void 0 : other.unstable_sxConfig);
6510
6507
  muiTheme.unstable_sx = function sx(props) {
6511
6508
  return styleFunctionSx$1({
6512
6509
  sx: props,
@@ -6527,7 +6524,7 @@ function isObjectEmpty(obj) {
6527
6524
  return Object.keys(obj).length === 0;
6528
6525
  }
6529
6526
  function useTheme$4(defaultTheme = null) {
6530
- const contextTheme = React.useContext(ThemeContext$2);
6527
+ const contextTheme = React.useContext(ThemeContext$1);
6531
6528
  return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;
6532
6529
  }
6533
6530
 
@@ -6543,7 +6540,7 @@ const splitProps = props => {
6543
6540
  systemProps: {},
6544
6541
  otherProps: {}
6545
6542
  };
6546
- const config = (_props$theme$unstable = props == null || (_props$theme = props.theme) == null ? void 0 : _props$theme.unstable_sxConfig) != null ? _props$theme$unstable : defaultSxConfig$1;
6543
+ const config = (_props$theme$unstable = props == null || (_props$theme = props.theme) == null ? void 0 : _props$theme.unstable_sxConfig) != null ? _props$theme$unstable : defaultSxConfig;
6547
6544
  Object.keys(props).forEach(prop => {
6548
6545
  if (config[prop]) {
6549
6546
  result.systemProps[prop] = props[prop];
@@ -6586,7 +6583,7 @@ var styleFunctionSx = /*#__PURE__*/Object.freeze({
6586
6583
  default: styleFunctionSx$1,
6587
6584
  extendSxProp: extendSxProp,
6588
6585
  unstable_createStyleFunctionSx: unstable_createStyleFunctionSx,
6589
- unstable_defaultSxConfig: defaultSxConfig$1
6586
+ unstable_defaultSxConfig: defaultSxConfig
6590
6587
  });
6591
6588
 
6592
6589
  const defaultGenerator = componentName => componentName;
@@ -6784,7 +6781,6 @@ function useThemeProps$1({
6784
6781
  * and confirm it doesn't apply to your use-case.
6785
6782
  */
6786
6783
  const useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
6787
- var useEnhancedEffect$1 = useEnhancedEffect;
6788
6784
 
6789
6785
  function clamp$1(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {
6790
6786
  return Math.max(min, Math.min(val, max));
@@ -6963,7 +6959,7 @@ function useControlled({
6963
6959
 
6964
6960
  function useEventCallback(fn) {
6965
6961
  const ref = React.useRef(fn);
6966
- useEnhancedEffect$1(() => {
6962
+ useEnhancedEffect(() => {
6967
6963
  ref.current = fn;
6968
6964
  });
6969
6965
  return React.useRef((...args) =>
@@ -7193,10 +7189,9 @@ function composeClasses(slots, getUtilityClass, classes = undefined) {
7193
7189
  }
7194
7190
 
7195
7191
  const ThemeContext = /*#__PURE__*/React.createContext(null);
7196
- var ThemeContext$1 = ThemeContext;
7197
7192
 
7198
7193
  function useTheme$2() {
7199
- const theme = React.useContext(ThemeContext$1);
7194
+ const theme = React.useContext(ThemeContext);
7200
7195
  return theme;
7201
7196
  }
7202
7197
 
@@ -7229,7 +7224,7 @@ function ThemeProvider$2(props) {
7229
7224
  }
7230
7225
  return output;
7231
7226
  }, [localTheme, outerTheme]);
7232
- return /*#__PURE__*/jsxRuntimeExports.jsx(ThemeContext$1.Provider, {
7227
+ return /*#__PURE__*/jsxRuntimeExports.jsx(ThemeContext.Provider, {
7233
7228
  value: theme,
7234
7229
  children: children
7235
7230
  });
@@ -7289,7 +7284,7 @@ function ThemeProvider$1(props) {
7289
7284
  const rtlValue = engineTheme.direction === 'rtl';
7290
7285
  return /*#__PURE__*/jsxRuntimeExports.jsx(ThemeProvider$2, {
7291
7286
  theme: privateTheme,
7292
- children: /*#__PURE__*/jsxRuntimeExports.jsx(ThemeContext$2.Provider, {
7287
+ children: /*#__PURE__*/jsxRuntimeExports.jsx(ThemeContext$1.Provider, {
7293
7288
  value: engineTheme,
7294
7289
  children: /*#__PURE__*/jsxRuntimeExports.jsx(RtlProvider, {
7295
7290
  value: rtlValue,
@@ -7746,7 +7741,7 @@ function emphasize(color, coefficient = 0.15) {
7746
7741
  }
7747
7742
  function private_safeEmphasize(color, coefficient, warning) {
7748
7743
  try {
7749
- return private_safeEmphasize(color, coefficient);
7744
+ return emphasize(color, coefficient);
7750
7745
  } catch (error) {
7751
7746
  if (warning && "production" !== 'production') {
7752
7747
  console.warn(warning);
@@ -7778,7 +7773,6 @@ const common = {
7778
7773
  black: '#000',
7779
7774
  white: '#fff'
7780
7775
  };
7781
- var common$1 = common;
7782
7776
 
7783
7777
  const grey = {
7784
7778
  50: '#fafafa',
@@ -7796,7 +7790,6 @@ const grey = {
7796
7790
  A400: '#bdbdbd',
7797
7791
  A700: '#616161'
7798
7792
  };
7799
- var grey$1 = grey;
7800
7793
 
7801
7794
  const purple = {
7802
7795
  50: '#f3e5f5',
@@ -7814,7 +7807,6 @@ const purple = {
7814
7807
  A400: '#d500f9',
7815
7808
  A700: '#aa00ff'
7816
7809
  };
7817
- var purple$1 = purple;
7818
7810
 
7819
7811
  const red = {
7820
7812
  50: '#ffebee',
@@ -7832,7 +7824,6 @@ const red = {
7832
7824
  A400: '#ff1744',
7833
7825
  A700: '#d50000'
7834
7826
  };
7835
- var red$1 = red;
7836
7827
 
7837
7828
  const orange = {
7838
7829
  50: '#fff3e0',
@@ -7850,7 +7841,6 @@ const orange = {
7850
7841
  A400: '#ff9100',
7851
7842
  A700: '#ff6d00'
7852
7843
  };
7853
- var orange$1 = orange;
7854
7844
 
7855
7845
  const blue = {
7856
7846
  50: '#e3f2fd',
@@ -7868,7 +7858,6 @@ const blue = {
7868
7858
  A400: '#2979ff',
7869
7859
  A700: '#2962ff'
7870
7860
  };
7871
- var blue$1 = blue;
7872
7861
 
7873
7862
  const lightBlue = {
7874
7863
  50: '#e1f5fe',
@@ -7886,7 +7875,6 @@ const lightBlue = {
7886
7875
  A400: '#00b0ff',
7887
7876
  A700: '#0091ea'
7888
7877
  };
7889
- var lightBlue$1 = lightBlue;
7890
7878
 
7891
7879
  const green = {
7892
7880
  50: '#e8f5e9',
@@ -7904,7 +7892,6 @@ const green = {
7904
7892
  A400: '#00e676',
7905
7893
  A700: '#00c853'
7906
7894
  };
7907
- var green$1 = green;
7908
7895
 
7909
7896
  const _excluded$c = ["mode", "contrastThreshold", "tonalOffset"];
7910
7897
  const light$1 = {
@@ -7922,8 +7909,8 @@ const light$1 = {
7922
7909
  // The background colors used to style the surfaces.
7923
7910
  // Consistency between these values is important.
7924
7911
  background: {
7925
- paper: common$1.white,
7926
- default: common$1.white
7912
+ paper: common.white,
7913
+ default: common.white
7927
7914
  },
7928
7915
  // The colors used to style the action elements.
7929
7916
  action: {
@@ -7947,7 +7934,7 @@ const light$1 = {
7947
7934
  };
7948
7935
  const dark$1 = {
7949
7936
  text: {
7950
- primary: common$1.white,
7937
+ primary: common.white,
7951
7938
  secondary: 'rgba(255, 255, 255, 0.7)',
7952
7939
  disabled: 'rgba(255, 255, 255, 0.5)',
7953
7940
  icon: 'rgba(255, 255, 255, 0.5)'
@@ -7958,7 +7945,7 @@ const dark$1 = {
7958
7945
  default: '#121212'
7959
7946
  },
7960
7947
  action: {
7961
- active: common$1.white,
7948
+ active: common.white,
7962
7949
  hover: 'rgba(255, 255, 255, 0.08)',
7963
7950
  hoverOpacity: 0.08,
7964
7951
  selected: 'rgba(255, 255, 255, 0.16)',
@@ -7987,86 +7974,86 @@ function addLightOrDark(intent, direction, shade, tonalOffset) {
7987
7974
  function getDefaultPrimary(mode = 'light') {
7988
7975
  if (mode === 'dark') {
7989
7976
  return {
7990
- main: blue$1[200],
7991
- light: blue$1[50],
7992
- dark: blue$1[400]
7977
+ main: blue[200],
7978
+ light: blue[50],
7979
+ dark: blue[400]
7993
7980
  };
7994
7981
  }
7995
7982
  return {
7996
- main: blue$1[700],
7997
- light: blue$1[400],
7998
- dark: blue$1[800]
7983
+ main: blue[700],
7984
+ light: blue[400],
7985
+ dark: blue[800]
7999
7986
  };
8000
7987
  }
8001
7988
  function getDefaultSecondary(mode = 'light') {
8002
7989
  if (mode === 'dark') {
8003
7990
  return {
8004
- main: purple$1[200],
8005
- light: purple$1[50],
8006
- dark: purple$1[400]
7991
+ main: purple[200],
7992
+ light: purple[50],
7993
+ dark: purple[400]
8007
7994
  };
8008
7995
  }
8009
7996
  return {
8010
- main: purple$1[500],
8011
- light: purple$1[300],
8012
- dark: purple$1[700]
7997
+ main: purple[500],
7998
+ light: purple[300],
7999
+ dark: purple[700]
8013
8000
  };
8014
8001
  }
8015
8002
  function getDefaultError(mode = 'light') {
8016
8003
  if (mode === 'dark') {
8017
8004
  return {
8018
- main: red$1[500],
8019
- light: red$1[300],
8020
- dark: red$1[700]
8005
+ main: red[500],
8006
+ light: red[300],
8007
+ dark: red[700]
8021
8008
  };
8022
8009
  }
8023
8010
  return {
8024
- main: red$1[700],
8025
- light: red$1[400],
8026
- dark: red$1[800]
8011
+ main: red[700],
8012
+ light: red[400],
8013
+ dark: red[800]
8027
8014
  };
8028
8015
  }
8029
8016
  function getDefaultInfo(mode = 'light') {
8030
8017
  if (mode === 'dark') {
8031
8018
  return {
8032
- main: lightBlue$1[400],
8033
- light: lightBlue$1[300],
8034
- dark: lightBlue$1[700]
8019
+ main: lightBlue[400],
8020
+ light: lightBlue[300],
8021
+ dark: lightBlue[700]
8035
8022
  };
8036
8023
  }
8037
8024
  return {
8038
- main: lightBlue$1[700],
8039
- light: lightBlue$1[500],
8040
- dark: lightBlue$1[900]
8025
+ main: lightBlue[700],
8026
+ light: lightBlue[500],
8027
+ dark: lightBlue[900]
8041
8028
  };
8042
8029
  }
8043
8030
  function getDefaultSuccess(mode = 'light') {
8044
8031
  if (mode === 'dark') {
8045
8032
  return {
8046
- main: green$1[400],
8047
- light: green$1[300],
8048
- dark: green$1[700]
8033
+ main: green[400],
8034
+ light: green[300],
8035
+ dark: green[700]
8049
8036
  };
8050
8037
  }
8051
8038
  return {
8052
- main: green$1[800],
8053
- light: green$1[500],
8054
- dark: green$1[900]
8039
+ main: green[800],
8040
+ light: green[500],
8041
+ dark: green[900]
8055
8042
  };
8056
8043
  }
8057
8044
  function getDefaultWarning(mode = 'light') {
8058
8045
  if (mode === 'dark') {
8059
8046
  return {
8060
- main: orange$1[400],
8061
- light: orange$1[300],
8062
- dark: orange$1[700]
8047
+ main: orange[400],
8048
+ light: orange[300],
8049
+ dark: orange[700]
8063
8050
  };
8064
8051
  }
8065
8052
  return {
8066
8053
  main: '#ed6c02',
8067
8054
  // closest to orange[800] that pass 3:1.
8068
- light: orange$1[500],
8069
- dark: orange$1[900]
8055
+ light: orange[500],
8056
+ dark: orange[900]
8070
8057
  };
8071
8058
  }
8072
8059
  function createPalette(palette) {
@@ -8120,7 +8107,7 @@ function createPalette(palette) {
8120
8107
  };
8121
8108
  const paletteOutput = deepmerge$1(_extends$5({
8122
8109
  // A collection of common colors.
8123
- common: _extends$5({}, common$1),
8110
+ common: _extends$5({}, common),
8124
8111
  // prevent mutable object.
8125
8112
  // The palette mode, can be light or dark.
8126
8113
  mode,
@@ -8158,7 +8145,7 @@ function createPalette(palette) {
8158
8145
  name: 'success'
8159
8146
  }),
8160
8147
  // The grey colors.
8161
- grey: grey$1,
8148
+ grey,
8162
8149
  // Used by `getContrastText()` to maximize the contrast between
8163
8150
  // the background and the text.
8164
8151
  contrastThreshold,
@@ -8339,7 +8326,6 @@ const zIndex = {
8339
8326
  snackbar: 1400,
8340
8327
  tooltip: 1500
8341
8328
  };
8342
- var zIndex$1 = zIndex;
8343
8329
 
8344
8330
  const _excluded$9 = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"];
8345
8331
  function createTheme(options = {}, ...args) {
@@ -8362,11 +8348,11 @@ function createTheme(options = {}, ...args) {
8362
8348
  shadows: shadows.slice(),
8363
8349
  typography: createTypography(palette, typographyInput),
8364
8350
  transitions: createTransitions(transitionsInput),
8365
- zIndex: _extends$5({}, zIndex$1)
8351
+ zIndex: _extends$5({}, zIndex)
8366
8352
  });
8367
8353
  muiTheme = deepmerge$1(muiTheme, other);
8368
8354
  muiTheme = args.reduce((acc, argument) => deepmerge$1(acc, argument), muiTheme);
8369
- muiTheme.unstable_sxConfig = _extends$5({}, defaultSxConfig$1, other == null ? void 0 : other.unstable_sxConfig);
8355
+ muiTheme.unstable_sxConfig = _extends$5({}, defaultSxConfig, other == null ? void 0 : other.unstable_sxConfig);
8370
8356
  muiTheme.unstable_sx = function sx(props) {
8371
8357
  return styleFunctionSx$1({
8372
8358
  sx: props,
@@ -8377,10 +8363,9 @@ function createTheme(options = {}, ...args) {
8377
8363
  }
8378
8364
 
8379
8365
  const defaultTheme = createTheme();
8380
- var defaultTheme$1 = defaultTheme;
8381
8366
 
8382
8367
  function useTheme$1() {
8383
- const theme = useTheme$3(defaultTheme$1);
8368
+ const theme = useTheme$3(defaultTheme);
8384
8369
  return theme[THEME_ID] || theme;
8385
8370
  }
8386
8371
 
@@ -8391,7 +8376,7 @@ function useThemeProps({
8391
8376
  return useThemeProps$1({
8392
8377
  props,
8393
8378
  name,
8394
- defaultTheme: defaultTheme$1,
8379
+ defaultTheme,
8395
8380
  themeId: THEME_ID
8396
8381
  });
8397
8382
  }
@@ -8467,7 +8452,7 @@ Object.defineProperty(createStyled$1, "__esModule", {
8467
8452
  value: true
8468
8453
  });
8469
8454
  var _default = createStyled$1.default = createStyled;
8470
- var shouldForwardProp_1 = createStyled$1.shouldForwardProp = shouldForwardProp;
8455
+ createStyled$1.shouldForwardProp = shouldForwardProp;
8471
8456
  createStyled$1.systemDefaultTheme = void 0;
8472
8457
  var _extends2 = _interopRequireDefault$1(require_extends());
8473
8458
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault$1(requireObjectWithoutPropertiesLoose());
@@ -8482,7 +8467,7 @@ const _excluded$8 = ["ownerState"],
8482
8467
  _excluded3 = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"];
8483
8468
  /* eslint-disable no-underscore-dangle */
8484
8469
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
8485
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
8470
+ function _interopRequireWildcard(e, r) { if (e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
8486
8471
  function isEmpty$1(obj) {
8487
8472
  return Object.keys(obj).length === 0;
8488
8473
  }
@@ -8695,10 +8680,16 @@ function createStyled(input = {}) {
8695
8680
  };
8696
8681
  }
8697
8682
 
8698
- const rootShouldForwardProp = prop => shouldForwardProp_1(prop) && prop !== 'classes';
8683
+ // copied from @mui/system/createStyled
8684
+ function slotShouldForwardProp(prop) {
8685
+ return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';
8686
+ }
8687
+
8688
+ const rootShouldForwardProp = prop => slotShouldForwardProp(prop) && prop !== 'classes';
8689
+
8699
8690
  const styled = _default({
8700
8691
  themeId: THEME_ID,
8701
- defaultTheme: defaultTheme$1,
8692
+ defaultTheme,
8702
8693
  rootShouldForwardProp
8703
8694
  });
8704
8695
 
@@ -8755,7 +8746,6 @@ function _assertThisInitialized(self) {
8755
8746
  }
8756
8747
 
8757
8748
  const buttonClasses = generateUtilityClasses('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'textSuccess', 'textError', 'textInfo', 'textWarning', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'outlinedSuccess', 'outlinedError', 'outlinedInfo', 'outlinedWarning', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'containedSuccess', 'containedError', 'containedInfo', 'containedWarning', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorError', 'colorInfo', 'colorWarning', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'icon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge']);
8758
- var buttonClasses$1 = buttonClasses;
8759
8749
 
8760
8750
  var base = {
8761
8751
  typography: {
@@ -9025,7 +9015,7 @@ const overrides = theme => ({
9025
9015
  MuiButton: {
9026
9016
  outlined: {
9027
9017
  padding: '3px 11px',
9028
- ["&.".concat(buttonClasses$1.focusVisible)]: {
9018
+ ["&.".concat(buttonClasses.focusVisible)]: {
9029
9019
  borderColor: theme.palette.custom.focusBorder,
9030
9020
  boxShadow: "0 0 0 2px ".concat(theme.palette.custom.focusOutline)
9031
9021
  }
@@ -9036,7 +9026,7 @@ const overrides = theme => ({
9036
9026
  border: "1px solid ".concat(theme.palette.btn.border),
9037
9027
  backgroundColor: theme.palette.btn.normal,
9038
9028
  boxShadow: 'none',
9039
- ["&.".concat(buttonClasses$1.focusVisible)]: {
9029
+ ["&.".concat(buttonClasses.focusVisible)]: {
9040
9030
  borderColor: theme.palette.custom.focusBorder,
9041
9031
  boxShadow: "0 0 0 2px ".concat(theme.palette.custom.focusOutline)
9042
9032
  },
@@ -9044,7 +9034,7 @@ const overrides = theme => ({
9044
9034
  backgroundColor: theme.palette.btn.hover,
9045
9035
  borderColor: theme.palette.btn.borderHover,
9046
9036
  boxShadow: 'none',
9047
- ["&.".concat(buttonClasses$1.disabled)]: {
9037
+ ["&.".concat(buttonClasses.disabled)]: {
9048
9038
  backgroundColor: theme.palette.btn.disabled
9049
9039
  }
9050
9040
  },
@@ -9052,7 +9042,7 @@ const overrides = theme => ({
9052
9042
  boxShadow: 'none',
9053
9043
  backgroundColor: theme.palette.btn.active
9054
9044
  },
9055
- ["&.".concat(buttonClasses$1.disabled)]: {
9045
+ ["&.".concat(buttonClasses.disabled)]: {
9056
9046
  backgroundColor: theme.palette.btn.disabled
9057
9047
  }
9058
9048
  }
@@ -9094,7 +9084,7 @@ function create$3(definition) {
9094
9084
  return cache[key];
9095
9085
  }
9096
9086
 
9097
- const NEBULA_VERSION_HASH = "e6be" ;
9087
+ const NEBULA_VERSION_HASH = "656a" ;
9098
9088
  ClassNameGenerator.configure(componentName => {
9099
9089
  return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
9100
9090
  });
@@ -9326,7 +9316,7 @@ function boot(_ref2) {
9326
9316
  const appRef = React__default.createRef();
9327
9317
  const element = document.createElement('div');
9328
9318
  element.style.display = 'none';
9329
- element.setAttribute('data-nebulajs-version', "5.0.0" );
9319
+ element.setAttribute('data-nebulajs-version', "5.0.2" );
9330
9320
  element.setAttribute('data-app-id', app.id);
9331
9321
  document.body.appendChild(element);
9332
9322
  if (context) {
@@ -11515,6 +11505,9 @@ function getRowsKeyboardNavigation(_ref) {
11515
11505
  break;
11516
11506
  case KEYS.ENTER:
11517
11507
  confirm();
11508
+ if (typeof isModal === 'undefined') {
11509
+ return;
11510
+ }
11518
11511
  break;
11519
11512
  case KEYS.ESCAPE:
11520
11513
  if (isModal()) {
@@ -14072,7 +14065,7 @@ const SvgIconRoot = styled('svg', {
14072
14065
  height: '1em',
14073
14066
  display: 'inline-block',
14074
14067
  // the <svg> will define the property that has `currentColor`
14075
- // e.g. heroicons uses fill="none" and stroke="currentColor"
14068
+ // for example heroicons uses fill="none" and stroke="currentColor"
14076
14069
  fill: ownerState.hasSvgAsChild ? undefined : 'currentColor',
14077
14070
  flexShrink: 0,
14078
14071
  transition: (_theme$transitions = theme.transitions) == null || (_theme$transitions$cr = _theme$transitions.create) == null ? void 0 : _theme$transitions$cr.call(_theme$transitions, 'fill', {
@@ -14175,7 +14168,7 @@ var utils$1 = /*#__PURE__*/Object.freeze({
14175
14168
  requirePropFactory: requirePropFactory,
14176
14169
  setRef: setRef,
14177
14170
  unstable_ClassNameGenerator: unstable_ClassNameGenerator,
14178
- unstable_useEnhancedEffect: useEnhancedEffect$1,
14171
+ unstable_useEnhancedEffect: useEnhancedEffect,
14179
14172
  unstable_useId: useId,
14180
14173
  unsupportedProp: unsupportedProp,
14181
14174
  useControlled: useControlled,
@@ -15606,9 +15599,6 @@ function ListBoxSearch(_ref2) {
15606
15599
  setValue(WILDCARD);
15607
15600
  setWildcardOn(true);
15608
15601
  }
15609
- if (!selectionState.selectDisabled() && !selections.isModal()) {
15610
- selections.begin(['/qListObjectDef']);
15611
- }
15612
15602
  };
15613
15603
  const hasHits = () => {
15614
15604
  const listCount = getStoreValue("listCount");
@@ -18349,7 +18339,8 @@ function ListBoxPopover(_ref) {
18349
18339
  minWidth: '250px'
18350
18340
  }
18351
18341
  }
18352
- }
18342
+ },
18343
+ onKeyDown: e => e.key === 'Enter' ? popoverClose() : undefined
18353
18344
  }, /*#__PURE__*/React__default.createElement(Grid, {
18354
18345
  container: true,
18355
18346
  direction: "column",
@@ -19736,8 +19727,13 @@ function getListboxContainerKeyboardNavigation(_ref) {
19736
19727
  break;
19737
19728
  }
19738
19729
  };
19730
+ const focusOnHoverDisabled = () => {
19731
+ const selectNotAllowed = (constraints === null || constraints === void 0 ? void 0 : constraints.select) || (constraints === null || constraints === void 0 ? void 0 : constraints.active);
19732
+ const appInModal = isModal();
19733
+ return selectNotAllowed || appInModal;
19734
+ };
19739
19735
  const globalKeyDown = event => {
19740
- if (!hovering.current) {
19736
+ if (!hovering.current || focusOnHoverDisabled()) {
19741
19737
  return;
19742
19738
  }
19743
19739
  const {
@@ -19781,15 +19777,8 @@ function getListboxContainerKeyboardNavigation(_ref) {
19781
19777
  }
19782
19778
  event.preventDefault();
19783
19779
  };
19784
- const focusOnHoverDisabled = () => {
19785
- const selectNotAllowed = (constraints === null || constraints === void 0 ? void 0 : constraints.select) || (constraints === null || constraints === void 0 ? void 0 : constraints.active);
19786
- const appInModal = isModal();
19787
- return selectNotAllowed || appInModal;
19788
- };
19789
19780
  const handleOnMouseEnter = () => {
19790
- if (!focusOnHoverDisabled()) {
19791
- hovering.current = true;
19792
- }
19781
+ hovering.current = true;
19793
19782
  };
19794
19783
  const handleOnMouseLeave = () => {
19795
19784
  if (hovering.current) {
@@ -20045,7 +20034,14 @@ const dimensionTypes = {
20045
20034
  drillDown: 'H',
20046
20035
  cyclic: 'C'
20047
20036
  };
20048
- const createDimensionIconData = (dimInfo, app) => {
20037
+ const createDimensionIconData = _ref => {
20038
+ let {
20039
+ dimInfo,
20040
+ app,
20041
+ selections,
20042
+ isPopover,
20043
+ active
20044
+ } = _ref;
20049
20045
  switch (dimInfo.qGrouping) {
20050
20046
  case dimensionTypes.drillDown:
20051
20047
  return {
@@ -20054,20 +20050,26 @@ const createDimensionIconData = (dimInfo, app) => {
20054
20050
  onClick: undefined
20055
20051
  };
20056
20052
  case dimensionTypes.cyclic:
20057
- return {
20058
- icon: app ? ReloadIcon : CyclicIcon,
20059
- tooltip: 'Listbox.Cyclic',
20060
- onClick: app ? () => {
20061
- app.getDimension(dimInfo.qLibraryId).then(dimensionModel => {
20062
- if (!dimensionModel.stepCycle) {
20063
- // eslint-disable-next-line no-console
20064
- console.log("engine api spec version doesn't have support for function stepCycle");
20065
- return;
20053
+ {
20054
+ const clickable = app && active;
20055
+ return {
20056
+ icon: clickable ? ReloadIcon : CyclicIcon,
20057
+ tooltip: 'Listbox.Cyclic',
20058
+ onClick: clickable ? () => {
20059
+ if (!isPopover) {
20060
+ selections.confirm();
20066
20061
  }
20067
- dimensionModel.stepCycle(1);
20068
- }).catch(() => null);
20069
- } : undefined
20070
- };
20062
+ app.getDimension(dimInfo.qLibraryId).then(dimensionModel => {
20063
+ if (!dimensionModel.stepCycle) {
20064
+ // eslint-disable-next-line no-console
20065
+ console.log("engine api spec version doesn't have support for function stepCycle");
20066
+ return;
20067
+ }
20068
+ dimensionModel.stepCycle(1);
20069
+ }).catch(() => null);
20070
+ } : undefined
20071
+ };
20072
+ }
20071
20073
  default:
20072
20074
  return undefined;
20073
20075
  }
@@ -20087,7 +20089,8 @@ function DimensionIcon(_ref) {
20087
20089
  let {
20088
20090
  iconData,
20089
20091
  translator,
20090
- iconStyle
20092
+ iconStyle,
20093
+ disabled
20091
20094
  } = _ref;
20092
20095
  if (!iconData) return undefined;
20093
20096
  const {
@@ -20104,7 +20107,8 @@ function DimensionIcon(_ref) {
20104
20107
  tabIndex: -1,
20105
20108
  title: title,
20106
20109
  size: "large",
20107
- disableRipple: true
20110
+ disableRipple: true,
20111
+ disabled: disabled
20108
20112
  }, /*#__PURE__*/React__default.createElement(Icon, {
20109
20113
  style: iconStyle
20110
20114
  })) : /*#__PURE__*/React__default.createElement(Icon, {
@@ -20172,7 +20176,8 @@ function ListBoxHeader(_ref2) {
20172
20176
  selections,
20173
20177
  keyboard,
20174
20178
  autoConfirm,
20175
- app
20179
+ app,
20180
+ isInSelection
20176
20181
  } = _ref2;
20177
20182
  const [isToolbarDetached, setIsToolbarDetached] = useState$1(showDetachedToolbarOnly);
20178
20183
  const [isLocked, setLocked] = useState$1(layout === null || layout === void 0 || (_layout$qListObject = layout.qListObject) === null || _layout$qListObject === void 0 || (_layout$qListObject = _layout$qListObject.qDimensionInfo) === null || _layout$qListObject === void 0 ? void 0 : _layout$qListObject.qLocked);
@@ -20182,7 +20187,13 @@ function ListBoxHeader(_ref2) {
20182
20187
  setLocked(layout === null || layout === void 0 || (_layout$qListObject2 = layout.qListObject) === null || _layout$qListObject2 === void 0 || (_layout$qListObject2 = _layout$qListObject2.qDimensionInfo) === null || _layout$qListObject2 === void 0 ? void 0 : _layout$qListObject2.qLocked);
20183
20188
  }, [layout === null || layout === void 0 || (_layout$qListObject3 = layout.qListObject) === null || _layout$qListObject3 === void 0 || (_layout$qListObject3 = _layout$qListObject3.qDimensionInfo) === null || _layout$qListObject3 === void 0 ? void 0 : _layout$qListObject3.qLocked]);
20184
20189
  const titleRef = useRef(null);
20185
- const iconData = iconUtils.createDimensionIconData(layout === null || layout === void 0 || (_layout$qListObject4 = layout.qListObject) === null || _layout$qListObject4 === void 0 ? void 0 : _layout$qListObject4.qDimensionInfo, app);
20190
+ const iconData = iconUtils.createDimensionIconData({
20191
+ dimInfo: layout === null || layout === void 0 || (_layout$qListObject4 = layout.qListObject) === null || _layout$qListObject4 === void 0 ? void 0 : _layout$qListObject4.qDimensionInfo,
20192
+ app,
20193
+ selections,
20194
+ isPopover,
20195
+ active: !(constraints !== null && constraints !== void 0 && constraints.active)
20196
+ });
20186
20197
  const showUnlock = showLock && isLocked;
20187
20198
  const showLockIcon = !showLock && isLocked; // shows instead of the cover button when field/dim is locked.
20188
20199
  const showLeftIcon = showSearchIcon || showLockIcon || iconData; // the left-most icon outside of the actions/selections toolbar.
@@ -20293,6 +20304,7 @@ function ListBoxHeader(_ref2) {
20293
20304
  }, lockedIconComp || showSearchIcon && searchIconComp, /*#__PURE__*/React__default.createElement(DimensionIcon, {
20294
20305
  iconData: iconData,
20295
20306
  iconStyle: iconStyle,
20307
+ disabled: isInSelection && isPopover,
20296
20308
  translator: translator
20297
20309
  })), /*#__PURE__*/React__default.createElement(Grid, {
20298
20310
  item: true,
@@ -20453,6 +20465,7 @@ function ListBoxInline(_ref3) {
20453
20465
  }), [app, appSelections]);
20454
20466
  const isInvalid = layout === null || layout === void 0 ? void 0 : layout.qListObject.qDimensionInfo.qError;
20455
20467
  const errorText = isInvalid && constraints.active ? 'Visualization.Invalid.Dimension' : 'Visualization.Incomplete';
20468
+ const [isInSelection, setIsInSelection] = useState$1(false);
20456
20469
  const {
20457
20470
  handleKeyDown,
20458
20471
  handleOnMouseEnter,
@@ -20481,9 +20494,11 @@ function ListBoxInline(_ref3) {
20481
20494
  }
20482
20495
  const show = () => {
20483
20496
  setShowToolbar(true);
20497
+ setIsInSelection(true);
20484
20498
  };
20485
20499
  const hide = () => {
20486
20500
  setShowToolbar(false);
20501
+ setIsInSelection(false);
20487
20502
  if (search === 'toggle') {
20488
20503
  setShowSearch(false);
20489
20504
  }
@@ -20491,7 +20506,6 @@ function ListBoxInline(_ref3) {
20491
20506
  if (isPopover) {
20492
20507
  // When isPopover, toolbar == false will be ignored.
20493
20508
  if (!selections.isActive()) {
20494
- selections.begin('/qListObjectDef');
20495
20509
  selections.on('activated', show);
20496
20510
  selections.on('deactivated', hide);
20497
20511
  }
@@ -20586,7 +20600,8 @@ function ListBoxInline(_ref3) {
20586
20600
  model: model,
20587
20601
  selectionState: selectionState$1,
20588
20602
  selections: selections,
20589
- keyboard: keyboard
20603
+ keyboard: keyboard,
20604
+ isInSelection: isInSelection
20590
20605
  });
20591
20606
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, showDetachedToolbarOnly && listBoxHeader, /*#__PURE__*/React__default.createElement(StyledGrid$3, {
20592
20607
  className: "listbox-container",
@@ -27048,780 +27063,39 @@ function flagsFn () {
27048
27063
  };
27049
27064
  }
27050
27065
 
27051
- var iterator;
27052
- var hasRequiredIterator;
27053
-
27054
- function requireIterator () {
27055
- if (hasRequiredIterator) return iterator;
27056
- hasRequiredIterator = 1;
27057
- iterator = function (Yallist) {
27058
- Yallist.prototype[Symbol.iterator] = function* () {
27059
- for (let walker = this.head; walker; walker = walker.next) {
27060
- yield walker.value;
27061
- }
27062
- };
27063
- };
27064
- return iterator;
27065
- }
27066
-
27067
- var yallist = Yallist$1;
27068
-
27069
- Yallist$1.Node = Node;
27070
- Yallist$1.create = Yallist$1;
27071
-
27072
- function Yallist$1 (list) {
27073
- var self = this;
27074
- if (!(self instanceof Yallist$1)) {
27075
- self = new Yallist$1();
27076
- }
27077
-
27078
- self.tail = null;
27079
- self.head = null;
27080
- self.length = 0;
27081
-
27082
- if (list && typeof list.forEach === 'function') {
27083
- list.forEach(function (item) {
27084
- self.push(item);
27085
- });
27086
- } else if (arguments.length > 0) {
27087
- for (var i = 0, l = arguments.length; i < l; i++) {
27088
- self.push(arguments[i]);
27089
- }
27090
- }
27091
-
27092
- return self
27093
- }
27094
-
27095
- Yallist$1.prototype.removeNode = function (node) {
27096
- if (node.list !== this) {
27097
- throw new Error('removing node which does not belong to this list')
27098
- }
27099
-
27100
- var next = node.next;
27101
- var prev = node.prev;
27102
-
27103
- if (next) {
27104
- next.prev = prev;
27105
- }
27106
-
27107
- if (prev) {
27108
- prev.next = next;
27109
- }
27110
-
27111
- if (node === this.head) {
27112
- this.head = next;
27113
- }
27114
- if (node === this.tail) {
27115
- this.tail = prev;
27116
- }
27117
-
27118
- node.list.length--;
27119
- node.next = null;
27120
- node.prev = null;
27121
- node.list = null;
27122
-
27123
- return next
27124
- };
27125
-
27126
- Yallist$1.prototype.unshiftNode = function (node) {
27127
- if (node === this.head) {
27128
- return
27129
- }
27130
-
27131
- if (node.list) {
27132
- node.list.removeNode(node);
27133
- }
27134
-
27135
- var head = this.head;
27136
- node.list = this;
27137
- node.next = head;
27138
- if (head) {
27139
- head.prev = node;
27140
- }
27141
-
27142
- this.head = node;
27143
- if (!this.tail) {
27144
- this.tail = node;
27145
- }
27146
- this.length++;
27147
- };
27148
-
27149
- Yallist$1.prototype.pushNode = function (node) {
27150
- if (node === this.tail) {
27151
- return
27152
- }
27153
-
27154
- if (node.list) {
27155
- node.list.removeNode(node);
27156
- }
27157
-
27158
- var tail = this.tail;
27159
- node.list = this;
27160
- node.prev = tail;
27161
- if (tail) {
27162
- tail.next = node;
27163
- }
27164
-
27165
- this.tail = node;
27166
- if (!this.head) {
27167
- this.head = node;
27168
- }
27169
- this.length++;
27170
- };
27171
-
27172
- Yallist$1.prototype.push = function () {
27173
- for (var i = 0, l = arguments.length; i < l; i++) {
27174
- push(this, arguments[i]);
27175
- }
27176
- return this.length
27177
- };
27178
-
27179
- Yallist$1.prototype.unshift = function () {
27180
- for (var i = 0, l = arguments.length; i < l; i++) {
27181
- unshift(this, arguments[i]);
27182
- }
27183
- return this.length
27184
- };
27185
-
27186
- Yallist$1.prototype.pop = function () {
27187
- if (!this.tail) {
27188
- return undefined
27189
- }
27190
-
27191
- var res = this.tail.value;
27192
- this.tail = this.tail.prev;
27193
- if (this.tail) {
27194
- this.tail.next = null;
27195
- } else {
27196
- this.head = null;
27197
- }
27198
- this.length--;
27199
- return res
27200
- };
27201
-
27202
- Yallist$1.prototype.shift = function () {
27203
- if (!this.head) {
27204
- return undefined
27205
- }
27206
-
27207
- var res = this.head.value;
27208
- this.head = this.head.next;
27209
- if (this.head) {
27210
- this.head.prev = null;
27211
- } else {
27212
- this.tail = null;
27213
- }
27214
- this.length--;
27215
- return res
27216
- };
27217
-
27218
- Yallist$1.prototype.forEach = function (fn, thisp) {
27219
- thisp = thisp || this;
27220
- for (var walker = this.head, i = 0; walker !== null; i++) {
27221
- fn.call(thisp, walker.value, i, this);
27222
- walker = walker.next;
27223
- }
27224
- };
27225
-
27226
- Yallist$1.prototype.forEachReverse = function (fn, thisp) {
27227
- thisp = thisp || this;
27228
- for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
27229
- fn.call(thisp, walker.value, i, this);
27230
- walker = walker.prev;
27231
- }
27232
- };
27233
-
27234
- Yallist$1.prototype.get = function (n) {
27235
- for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
27236
- // abort out of the list early if we hit a cycle
27237
- walker = walker.next;
27238
- }
27239
- if (i === n && walker !== null) {
27240
- return walker.value
27241
- }
27242
- };
27243
-
27244
- Yallist$1.prototype.getReverse = function (n) {
27245
- for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
27246
- // abort out of the list early if we hit a cycle
27247
- walker = walker.prev;
27248
- }
27249
- if (i === n && walker !== null) {
27250
- return walker.value
27251
- }
27252
- };
27253
-
27254
- Yallist$1.prototype.map = function (fn, thisp) {
27255
- thisp = thisp || this;
27256
- var res = new Yallist$1();
27257
- for (var walker = this.head; walker !== null;) {
27258
- res.push(fn.call(thisp, walker.value, this));
27259
- walker = walker.next;
27260
- }
27261
- return res
27262
- };
27263
-
27264
- Yallist$1.prototype.mapReverse = function (fn, thisp) {
27265
- thisp = thisp || this;
27266
- var res = new Yallist$1();
27267
- for (var walker = this.tail; walker !== null;) {
27268
- res.push(fn.call(thisp, walker.value, this));
27269
- walker = walker.prev;
27270
- }
27271
- return res
27272
- };
27273
-
27274
- Yallist$1.prototype.reduce = function (fn, initial) {
27275
- var acc;
27276
- var walker = this.head;
27277
- if (arguments.length > 1) {
27278
- acc = initial;
27279
- } else if (this.head) {
27280
- walker = this.head.next;
27281
- acc = this.head.value;
27282
- } else {
27283
- throw new TypeError('Reduce of empty list with no initial value')
27284
- }
27285
-
27286
- for (var i = 0; walker !== null; i++) {
27287
- acc = fn(acc, walker.value, i);
27288
- walker = walker.next;
27289
- }
27290
-
27291
- return acc
27292
- };
27293
-
27294
- Yallist$1.prototype.reduceReverse = function (fn, initial) {
27295
- var acc;
27296
- var walker = this.tail;
27297
- if (arguments.length > 1) {
27298
- acc = initial;
27299
- } else if (this.tail) {
27300
- walker = this.tail.prev;
27301
- acc = this.tail.value;
27302
- } else {
27303
- throw new TypeError('Reduce of empty list with no initial value')
27304
- }
27305
-
27306
- for (var i = this.length - 1; walker !== null; i--) {
27307
- acc = fn(acc, walker.value, i);
27308
- walker = walker.prev;
27309
- }
27310
-
27311
- return acc
27312
- };
27313
-
27314
- Yallist$1.prototype.toArray = function () {
27315
- var arr = new Array(this.length);
27316
- for (var i = 0, walker = this.head; walker !== null; i++) {
27317
- arr[i] = walker.value;
27318
- walker = walker.next;
27319
- }
27320
- return arr
27321
- };
27322
-
27323
- Yallist$1.prototype.toArrayReverse = function () {
27324
- var arr = new Array(this.length);
27325
- for (var i = 0, walker = this.tail; walker !== null; i++) {
27326
- arr[i] = walker.value;
27327
- walker = walker.prev;
27328
- }
27329
- return arr
27330
- };
27331
-
27332
- Yallist$1.prototype.slice = function (from, to) {
27333
- to = to || this.length;
27334
- if (to < 0) {
27335
- to += this.length;
27336
- }
27337
- from = from || 0;
27338
- if (from < 0) {
27339
- from += this.length;
27340
- }
27341
- var ret = new Yallist$1();
27342
- if (to < from || to < 0) {
27343
- return ret
27344
- }
27345
- if (from < 0) {
27346
- from = 0;
27347
- }
27348
- if (to > this.length) {
27349
- to = this.length;
27350
- }
27351
- for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
27352
- walker = walker.next;
27353
- }
27354
- for (; walker !== null && i < to; i++, walker = walker.next) {
27355
- ret.push(walker.value);
27356
- }
27357
- return ret
27358
- };
27359
-
27360
- Yallist$1.prototype.sliceReverse = function (from, to) {
27361
- to = to || this.length;
27362
- if (to < 0) {
27363
- to += this.length;
27364
- }
27365
- from = from || 0;
27366
- if (from < 0) {
27367
- from += this.length;
27368
- }
27369
- var ret = new Yallist$1();
27370
- if (to < from || to < 0) {
27371
- return ret
27372
- }
27373
- if (from < 0) {
27374
- from = 0;
27375
- }
27376
- if (to > this.length) {
27377
- to = this.length;
27378
- }
27379
- for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
27380
- walker = walker.prev;
27381
- }
27382
- for (; walker !== null && i > from; i--, walker = walker.prev) {
27383
- ret.push(walker.value);
27384
- }
27385
- return ret
27386
- };
27387
-
27388
- Yallist$1.prototype.splice = function (start, deleteCount, ...nodes) {
27389
- if (start > this.length) {
27390
- start = this.length - 1;
27391
- }
27392
- if (start < 0) {
27393
- start = this.length + start;
27394
- }
27395
-
27396
- for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
27397
- walker = walker.next;
27398
- }
27399
-
27400
- var ret = [];
27401
- for (var i = 0; walker && i < deleteCount; i++) {
27402
- ret.push(walker.value);
27403
- walker = this.removeNode(walker);
27404
- }
27405
- if (walker === null) {
27406
- walker = this.tail;
27407
- }
27408
-
27409
- if (walker !== this.head && walker !== this.tail) {
27410
- walker = walker.prev;
27411
- }
27412
-
27413
- for (var i = 0; i < nodes.length; i++) {
27414
- walker = insert(this, walker, nodes[i]);
27415
- }
27416
- return ret;
27417
- };
27418
-
27419
- Yallist$1.prototype.reverse = function () {
27420
- var head = this.head;
27421
- var tail = this.tail;
27422
- for (var walker = head; walker !== null; walker = walker.prev) {
27423
- var p = walker.prev;
27424
- walker.prev = walker.next;
27425
- walker.next = p;
27426
- }
27427
- this.head = tail;
27428
- this.tail = head;
27429
- return this
27430
- };
27431
-
27432
- function insert (self, node, value) {
27433
- var inserted = node === self.head ?
27434
- new Node(value, null, node, self) :
27435
- new Node(value, node, node.next, self);
27436
-
27437
- if (inserted.next === null) {
27438
- self.tail = inserted;
27439
- }
27440
- if (inserted.prev === null) {
27441
- self.head = inserted;
27442
- }
27443
-
27444
- self.length++;
27445
-
27446
- return inserted
27447
- }
27448
-
27449
- function push (self, item) {
27450
- self.tail = new Node(item, self.tail, null, self);
27451
- if (!self.head) {
27452
- self.head = self.tail;
27453
- }
27454
- self.length++;
27455
- }
27456
-
27457
- function unshift (self, item) {
27458
- self.head = new Node(item, null, self.head, self);
27459
- if (!self.tail) {
27460
- self.tail = self.head;
27461
- }
27462
- self.length++;
27463
- }
27464
-
27465
- function Node (value, prev, next, list) {
27466
- if (!(this instanceof Node)) {
27467
- return new Node(value, prev, next, list)
27468
- }
27469
-
27470
- this.list = list;
27471
- this.value = value;
27472
-
27473
- if (prev) {
27474
- prev.next = this;
27475
- this.prev = prev;
27476
- } else {
27477
- this.prev = null;
27478
- }
27479
-
27480
- if (next) {
27481
- next.prev = this;
27482
- this.next = next;
27483
- } else {
27484
- this.next = null;
27485
- }
27486
- }
27487
-
27488
- try {
27489
- // add if support for Symbol.iterator is present
27490
- requireIterator()(Yallist$1);
27491
- } catch (er) {}
27492
-
27493
- // A linked list to keep track of recently-used-ness
27494
- const Yallist = yallist;
27495
-
27496
- const MAX = Symbol('max');
27497
- const LENGTH = Symbol('length');
27498
- const LENGTH_CALCULATOR = Symbol('lengthCalculator');
27499
- const ALLOW_STALE = Symbol('allowStale');
27500
- const MAX_AGE = Symbol('maxAge');
27501
- const DISPOSE = Symbol('dispose');
27502
- const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet');
27503
- const LRU_LIST = Symbol('lruList');
27504
- const CACHE = Symbol('cache');
27505
- const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet');
27506
-
27507
- const naiveLength = () => 1;
27508
-
27509
- // lruList is a yallist where the head is the youngest
27510
- // item, and the tail is the oldest. the list contains the Hit
27511
- // objects as the entries.
27512
- // Each Hit object has a reference to its Yallist.Node. This
27513
- // never changes.
27514
- //
27515
- // cache is a Map (or PseudoMap) that matches the keys to
27516
- // the Yallist.Node object.
27517
27066
  class LRUCache {
27518
- constructor (options) {
27519
- if (typeof options === 'number')
27520
- options = { max: options };
27521
-
27522
- if (!options)
27523
- options = {};
27524
-
27525
- if (options.max && (typeof options.max !== 'number' || options.max < 0))
27526
- throw new TypeError('max must be a non-negative number')
27527
- // Kind of weird to have a default max of Infinity, but oh well.
27528
- this[MAX] = options.max || Infinity;
27529
-
27530
- const lc = options.length || naiveLength;
27531
- this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc;
27532
- this[ALLOW_STALE] = options.stale || false;
27533
- if (options.maxAge && typeof options.maxAge !== 'number')
27534
- throw new TypeError('maxAge must be a number')
27535
- this[MAX_AGE] = options.maxAge || 0;
27536
- this[DISPOSE] = options.dispose;
27537
- this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
27538
- this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
27539
- this.reset();
27540
- }
27541
-
27542
- // resize the cache when the max changes.
27543
- set max (mL) {
27544
- if (typeof mL !== 'number' || mL < 0)
27545
- throw new TypeError('max must be a non-negative number')
27546
-
27547
- this[MAX] = mL || Infinity;
27548
- trim(this);
27549
- }
27550
- get max () {
27551
- return this[MAX]
27552
- }
27553
-
27554
- set allowStale (allowStale) {
27555
- this[ALLOW_STALE] = !!allowStale;
27556
- }
27557
- get allowStale () {
27558
- return this[ALLOW_STALE]
27559
- }
27560
-
27561
- set maxAge (mA) {
27562
- if (typeof mA !== 'number')
27563
- throw new TypeError('maxAge must be a non-negative number')
27564
-
27565
- this[MAX_AGE] = mA;
27566
- trim(this);
27567
- }
27568
- get maxAge () {
27569
- return this[MAX_AGE]
27570
- }
27571
-
27572
- // resize the cache when the lengthCalculator changes.
27573
- set lengthCalculator (lC) {
27574
- if (typeof lC !== 'function')
27575
- lC = naiveLength;
27576
-
27577
- if (lC !== this[LENGTH_CALCULATOR]) {
27578
- this[LENGTH_CALCULATOR] = lC;
27579
- this[LENGTH] = 0;
27580
- this[LRU_LIST].forEach(hit => {
27581
- hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key);
27582
- this[LENGTH] += hit.length;
27583
- });
27584
- }
27585
- trim(this);
27586
- }
27587
- get lengthCalculator () { return this[LENGTH_CALCULATOR] }
27588
-
27589
- get length () { return this[LENGTH] }
27590
- get itemCount () { return this[LRU_LIST].length }
27591
-
27592
- rforEach (fn, thisp) {
27593
- thisp = thisp || this;
27594
- for (let walker = this[LRU_LIST].tail; walker !== null;) {
27595
- const prev = walker.prev;
27596
- forEachStep(this, fn, walker, thisp);
27597
- walker = prev;
27598
- }
27599
- }
27600
-
27601
- forEach (fn, thisp) {
27602
- thisp = thisp || this;
27603
- for (let walker = this[LRU_LIST].head; walker !== null;) {
27604
- const next = walker.next;
27605
- forEachStep(this, fn, walker, thisp);
27606
- walker = next;
27607
- }
27608
- }
27609
-
27610
- keys () {
27611
- return this[LRU_LIST].toArray().map(k => k.key)
27612
- }
27613
-
27614
- values () {
27615
- return this[LRU_LIST].toArray().map(k => k.value)
27616
- }
27617
-
27618
- reset () {
27619
- if (this[DISPOSE] &&
27620
- this[LRU_LIST] &&
27621
- this[LRU_LIST].length) {
27622
- this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value));
27623
- }
27624
-
27625
- this[CACHE] = new Map(); // hash of items by key
27626
- this[LRU_LIST] = new Yallist(); // list of items in order of use recency
27627
- this[LENGTH] = 0; // length of items in the list
27628
- }
27629
-
27630
- dump () {
27631
- return this[LRU_LIST].map(hit =>
27632
- isStale(this, hit) ? false : {
27633
- k: hit.key,
27634
- v: hit.value,
27635
- e: hit.now + (hit.maxAge || 0)
27636
- }).toArray().filter(h => h)
27637
- }
27638
-
27639
- dumpLru () {
27640
- return this[LRU_LIST]
27641
- }
27642
-
27643
- set (key, value, maxAge) {
27644
- maxAge = maxAge || this[MAX_AGE];
27645
-
27646
- if (maxAge && typeof maxAge !== 'number')
27647
- throw new TypeError('maxAge must be a number')
27648
-
27649
- const now = maxAge ? Date.now() : 0;
27650
- const len = this[LENGTH_CALCULATOR](value, key);
27651
-
27652
- if (this[CACHE].has(key)) {
27653
- if (len > this[MAX]) {
27654
- del(this, this[CACHE].get(key));
27655
- return false
27656
- }
27657
-
27658
- const node = this[CACHE].get(key);
27659
- const item = node.value;
27660
-
27661
- // dispose of the old one before overwriting
27662
- // split out into 2 ifs for better coverage tracking
27663
- if (this[DISPOSE]) {
27664
- if (!this[NO_DISPOSE_ON_SET])
27665
- this[DISPOSE](key, item.value);
27666
- }
27667
-
27668
- item.now = now;
27669
- item.maxAge = maxAge;
27670
- item.value = value;
27671
- this[LENGTH] += len - item.length;
27672
- item.length = len;
27673
- this.get(key);
27674
- trim(this);
27675
- return true
27676
- }
27677
-
27678
- const hit = new Entry(key, value, len, now, maxAge);
27679
-
27680
- // oversized objects fall out of cache automatically.
27681
- if (hit.length > this[MAX]) {
27682
- if (this[DISPOSE])
27683
- this[DISPOSE](key, value);
27684
-
27685
- return false
27686
- }
27687
-
27688
- this[LENGTH] += hit.length;
27689
- this[LRU_LIST].unshift(hit);
27690
- this[CACHE].set(key, this[LRU_LIST].head);
27691
- trim(this);
27692
- return true
27693
- }
27694
-
27695
- has (key) {
27696
- if (!this[CACHE].has(key)) return false
27697
- const hit = this[CACHE].get(key).value;
27698
- return !isStale(this, hit)
27699
- }
27700
-
27701
- get (key) {
27702
- return get(this, key, true)
27703
- }
27704
-
27705
- peek (key) {
27706
- return get(this, key, false)
27707
- }
27708
-
27709
- pop () {
27710
- const node = this[LRU_LIST].tail;
27711
- if (!node)
27712
- return null
27713
-
27714
- del(this, node);
27715
- return node.value
27716
- }
27717
-
27718
- del (key) {
27719
- del(this, this[CACHE].get(key));
27067
+ constructor() {
27068
+ this.max = 1000;
27069
+ this.map = new Map();
27720
27070
  }
27721
-
27722
- load (arr) {
27723
- // reset the cache
27724
- this.reset();
27725
-
27726
- const now = Date.now();
27727
- // A previous serialized cache has the most recent items first
27728
- for (let l = arr.length - 1; l >= 0; l--) {
27729
- const hit = arr[l];
27730
- const expiresAt = hit.e || 0;
27731
- if (expiresAt === 0)
27732
- // the item was created without expiration in a non aged cache
27733
- this.set(hit.k, hit.v);
27734
- else {
27735
- const maxAge = expiresAt - now;
27736
- // dont add already expired items
27737
- if (maxAge > 0) {
27738
- this.set(hit.k, hit.v, maxAge);
27739
- }
27740
- }
27071
+ get(key) {
27072
+ const value = this.map.get(key);
27073
+ if (value === undefined) {
27074
+ return undefined;
27075
+ } else {
27076
+ // Remove the key from the map and add it to the end
27077
+ this.map.delete(key);
27078
+ this.map.set(key, value);
27079
+ return value;
27741
27080
  }
27742
27081
  }
27743
-
27744
- prune () {
27745
- this[CACHE].forEach((value, key) => get(this, key, false));
27082
+ delete(key) {
27083
+ return this.map.delete(key);
27746
27084
  }
27747
- }
27748
-
27749
- const get = (self, key, doUse) => {
27750
- const node = self[CACHE].get(key);
27751
- if (node) {
27752
- const hit = node.value;
27753
- if (isStale(self, hit)) {
27754
- del(self, node);
27755
- if (!self[ALLOW_STALE])
27756
- return undefined
27757
- } else {
27758
- if (doUse) {
27759
- if (self[UPDATE_AGE_ON_GET])
27760
- node.value.now = Date.now();
27761
- self[LRU_LIST].unshiftNode(node);
27085
+ set(key, value) {
27086
+ const deleted = this.delete(key);
27087
+ if (!deleted && value !== undefined) {
27088
+ // If cache is full, delete the least recently used item
27089
+ if (this.map.size >= this.max) {
27090
+ const firstKey = this.map.keys().next().value;
27091
+ this.delete(firstKey);
27762
27092
  }
27093
+ this.map.set(key, value);
27763
27094
  }
27764
- return hit.value
27765
- }
27766
- };
27767
-
27768
- const isStale = (self, hit) => {
27769
- if (!hit || (!hit.maxAge && !self[MAX_AGE]))
27770
- return false
27771
-
27772
- const diff = Date.now() - hit.now;
27773
- return hit.maxAge ? diff > hit.maxAge
27774
- : self[MAX_AGE] && (diff > self[MAX_AGE])
27775
- };
27776
-
27777
- const trim = self => {
27778
- if (self[LENGTH] > self[MAX]) {
27779
- for (let walker = self[LRU_LIST].tail;
27780
- self[LENGTH] > self[MAX] && walker !== null;) {
27781
- // We know that we're about to delete this one, and also
27782
- // what the next least recently used key will be, so just
27783
- // go ahead and set it now.
27784
- const prev = walker.prev;
27785
- del(self, walker);
27786
- walker = prev;
27787
- }
27788
- }
27789
- };
27790
-
27791
- const del = (self, node) => {
27792
- if (node) {
27793
- const hit = node.value;
27794
- if (self[DISPOSE])
27795
- self[DISPOSE](hit.key, hit.value);
27796
-
27797
- self[LENGTH] -= hit.length;
27798
- self[CACHE].delete(hit.key);
27799
- self[LRU_LIST].removeNode(node);
27800
- }
27801
- };
27802
-
27803
- class Entry {
27804
- constructor (key, value, length, now, maxAge) {
27805
- this.key = key;
27806
- this.value = value;
27807
- this.length = length;
27808
- this.now = now;
27809
- this.maxAge = maxAge || 0;
27095
+ return this;
27810
27096
  }
27811
27097
  }
27812
-
27813
- const forEachStep = (self, fn, node, thisp) => {
27814
- let hit = node.value;
27815
- if (isStale(self, hit)) {
27816
- del(self, node);
27817
- if (!self[ALLOW_STALE])
27818
- hit = undefined;
27819
- }
27820
- if (hit)
27821
- fn.call(thisp, hit.value, hit.key, self);
27822
- };
27823
-
27824
- var lruCache = LRUCache;
27098
+ var lrucache = LRUCache;
27825
27099
 
27826
27100
  // parse out just the options we care about
27827
27101
  const looseOption = Object.freeze({
@@ -28190,7 +27464,7 @@ let SemVer$1 = class SemVer {
28190
27464
  do {
28191
27465
  const a = this.build[i];
28192
27466
  const b = other.build[i];
28193
- debug('prerelease compare', i, a, b);
27467
+ debug('build compare', i, a, b);
28194
27468
  if (a === undefined && b === undefined) {
28195
27469
  return 0;
28196
27470
  } else if (b === undefined) {
@@ -28692,10 +27966,8 @@ function requireRange() {
28692
27966
  }
28693
27967
  }
28694
27968
  range = Range;
28695
- const LRU = lruCache;
28696
- const cache = new LRU({
28697
- max: 1000
28698
- });
27969
+ const LRU = lrucache;
27970
+ const cache = new LRU();
28699
27971
  const parseOptions = parseOptions_1;
28700
27972
  const Comparator = requireComparator();
28701
27973
  const debug = debug_1;
@@ -28923,7 +28195,8 @@ function requireRange() {
28923
28195
  // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
28924
28196
  // 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do
28925
28197
  // 1.2 - 3.4 => >=1.2.0 <3.5.0-0
28926
- const hyphenReplace = incPr => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => {
28198
+ // TODO build?
28199
+ const hyphenReplace = incPr => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
28927
28200
  if (isX(fM)) {
28928
28201
  from = '';
28929
28202
  } else if (isX(fm)) {