@nebula.js/stardust 4.0.2 → 4.1.0

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.2
2
+ * @nebula.js/stardust v4.1.0
3
3
  * Copyright (c) 2023 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -750,8 +750,8 @@ function _defineProperty(obj, key, value) {
750
750
  }
751
751
  return obj;
752
752
  }
753
- function _extends$5() {
754
- _extends$5 = Object.assign ? Object.assign.bind() : function (target) {
753
+ function _extends$1() {
754
+ _extends$1 = Object.assign ? Object.assign.bind() : function (target) {
755
755
  for (var i = 1; i < arguments.length; i++) {
756
756
  var source = arguments[i];
757
757
  for (var key in source) {
@@ -762,9 +762,9 @@ function _extends$5() {
762
762
  }
763
763
  return target;
764
764
  };
765
- return _extends$5.apply(this, arguments);
765
+ return _extends$1.apply(this, arguments);
766
766
  }
767
- function _objectWithoutPropertiesLoose$2(source, excluded) {
767
+ function _objectWithoutPropertiesLoose(source, excluded) {
768
768
  if (source == null) return {};
769
769
  var target = {};
770
770
  var sourceKeys = Object.keys(source);
@@ -778,7 +778,7 @@ function _objectWithoutPropertiesLoose$2(source, excluded) {
778
778
  }
779
779
  function _objectWithoutProperties(source, excluded) {
780
780
  if (source == null) return {};
781
- var target = _objectWithoutPropertiesLoose$2(source, excluded);
781
+ var target = _objectWithoutPropertiesLoose(source, excluded);
782
782
  var key, i;
783
783
  if (Object.getOwnPropertySymbols) {
784
784
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
@@ -3790,21 +3790,6 @@ var m$1 = ReactDOM;
3790
3790
  client.hydrateRoot = m$1.hydrateRoot;
3791
3791
  }
3792
3792
 
3793
- function _extends$4() {
3794
- _extends$4 = Object.assign ? Object.assign.bind() : function (target) {
3795
- for (var i = 1; i < arguments.length; i++) {
3796
- var source = arguments[i];
3797
- for (var key in source) {
3798
- if (Object.prototype.hasOwnProperty.call(source, key)) {
3799
- target[key] = source[key];
3800
- }
3801
- }
3802
- }
3803
- return target;
3804
- };
3805
- return _extends$4.apply(this, arguments);
3806
- }
3807
-
3808
3793
  function isPlainObject(item) {
3809
3794
  return item !== null && typeof item === 'object' && item.constructor === Object;
3810
3795
  }
@@ -3821,7 +3806,9 @@ function deepClone(source) {
3821
3806
  function deepmerge(target, source, options = {
3822
3807
  clone: true
3823
3808
  }) {
3824
- const output = options.clone ? _extends$4({}, target) : target;
3809
+ const output = options.clone ? {
3810
+ ...target
3811
+ } : target;
3825
3812
  if (isPlainObject(target) && isPlainObject(source)) {
3826
3813
  Object.keys(source).forEach(key => {
3827
3814
  // Avoid prototype pollution
@@ -3973,8 +3960,8 @@ function useGlobalId(idOverride) {
3973
3960
  return id;
3974
3961
  }
3975
3962
 
3976
- // eslint-disable-next-line no-useless-concat -- Workaround for https://github.com/webpack/webpack/issues/14814
3977
- const maybeReactUseId = React['useId' + ''];
3963
+ // downstream bundlers may remove unnecessary concatenation, but won't remove toString call -- Workaround for https://github.com/webpack/webpack/issues/14814
3964
+ const maybeReactUseId = React['useId'.toString()];
3978
3965
  /**
3979
3966
  *
3980
3967
  * @example <div id={useId()} />
@@ -4211,10 +4198,15 @@ function useIsFocusVisible() {
4211
4198
  * @returns {object} resolved props
4212
4199
  */
4213
4200
  function resolveProps(defaultProps, props) {
4214
- const output = _extends$4({}, props);
4201
+ const output = {
4202
+ ...props
4203
+ };
4215
4204
  Object.keys(defaultProps).forEach(propName => {
4216
4205
  if (propName.toString().match(/^(components|slots)$/)) {
4217
- output[propName] = _extends$4({}, defaultProps[propName], output[propName]);
4206
+ output[propName] = {
4207
+ ...defaultProps[propName],
4208
+ ...output[propName]
4209
+ };
4218
4210
  } else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {
4219
4211
  const defaultSlotProps = defaultProps[propName] || {};
4220
4212
  const slotProps = props[propName];
@@ -4226,7 +4218,9 @@ function resolveProps(defaultProps, props) {
4226
4218
  // Reduce the iteration if the default slot props is empty
4227
4219
  output[propName] = slotProps;
4228
4220
  } else {
4229
- output[propName] = _extends$4({}, slotProps);
4221
+ output[propName] = {
4222
+ ...slotProps
4223
+ };
4230
4224
  Object.keys(defaultSlotProps).forEach(slotPropName => {
4231
4225
  output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);
4232
4226
  });
@@ -4306,34 +4300,6 @@ function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui')
4306
4300
 
4307
4301
  var THEME_ID = '$$material';
4308
4302
 
4309
- function _extends$3() {
4310
- _extends$3 = Object.assign ? Object.assign.bind() : function (target) {
4311
- for (var i = 1; i < arguments.length; i++) {
4312
- var source = arguments[i];
4313
- for (var key in source) {
4314
- if (Object.prototype.hasOwnProperty.call(source, key)) {
4315
- target[key] = source[key];
4316
- }
4317
- }
4318
- }
4319
- return target;
4320
- };
4321
- return _extends$3.apply(this, arguments);
4322
- }
4323
-
4324
- function _objectWithoutPropertiesLoose$1(source, excluded) {
4325
- if (source == null) return {};
4326
- var target = {};
4327
- var sourceKeys = Object.keys(source);
4328
- var key, i;
4329
- for (i = 0; i < sourceKeys.length; i++) {
4330
- key = sourceKeys[i];
4331
- if (excluded.indexOf(key) >= 0) continue;
4332
- target[key] = source[key];
4333
- }
4334
- return target;
4335
- }
4336
-
4337
4303
  /*
4338
4304
 
4339
4305
  Based off glamor's StyleSheet, thanks Sunil ❤️
@@ -5639,35 +5605,8 @@ const internal_processStyles = (tag, processor) => {
5639
5605
  }
5640
5606
  };
5641
5607
 
5642
- function _extends$2() {
5643
- _extends$2 = Object.assign ? Object.assign.bind() : function (target) {
5644
- for (var i = 1; i < arguments.length; i++) {
5645
- var source = arguments[i];
5646
- for (var key in source) {
5647
- if (Object.prototype.hasOwnProperty.call(source, key)) {
5648
- target[key] = source[key];
5649
- }
5650
- }
5651
- }
5652
- return target;
5653
- };
5654
- return _extends$2.apply(this, arguments);
5655
- }
5656
-
5657
- function _objectWithoutPropertiesLoose(source, excluded) {
5658
- if (source == null) return {};
5659
- var target = {};
5660
- var sourceKeys = Object.keys(source);
5661
- var key, i;
5662
- for (i = 0; i < sourceKeys.length; i++) {
5663
- key = sourceKeys[i];
5664
- if (excluded.indexOf(key) >= 0) continue;
5665
- target[key] = source[key];
5666
- }
5667
- return target;
5668
- }
5669
-
5670
- const _excluded$f = ["values", "unit", "step"];
5608
+ // Sorted ASC by size. That's important.
5609
+ // It can't be configured as it's used statically for propTypes.
5671
5610
  const sortBreakpointsValues = values => {
5672
5611
  const breakpointsAsArray = Object.keys(values).map(key => ({
5673
5612
  key,
@@ -5676,33 +5615,34 @@ const sortBreakpointsValues = values => {
5676
5615
  // Sort in ascending order
5677
5616
  breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);
5678
5617
  return breakpointsAsArray.reduce((acc, obj) => {
5679
- return _extends$2({}, acc, {
5618
+ return {
5619
+ ...acc,
5680
5620
  [obj.key]: obj.val
5681
- });
5621
+ };
5682
5622
  }, {});
5683
5623
  };
5684
5624
 
5685
5625
  // Keep in mind that @media is inclusive by the CSS specification.
5686
5626
  function createBreakpoints(breakpoints) {
5687
5627
  const {
5688
- // The breakpoint **start** at this value.
5689
- // For instance with the first breakpoint xs: [xs, sm).
5690
- values = {
5691
- xs: 0,
5692
- // phone
5693
- sm: 600,
5694
- // tablet
5695
- md: 900,
5696
- // small laptop
5697
- lg: 1200,
5698
- // desktop
5699
- xl: 1536 // large screen
5700
- },
5628
+ // The breakpoint **start** at this value.
5629
+ // For instance with the first breakpoint xs: [xs, sm).
5630
+ values = {
5631
+ xs: 0,
5632
+ // phone
5633
+ sm: 600,
5634
+ // tablet
5635
+ md: 900,
5636
+ // small laptop
5637
+ lg: 1200,
5638
+ // desktop
5639
+ xl: 1536 // large screen
5640
+ },
5701
5641
 
5702
- unit = 'px',
5703
- step = 5
5704
- } = breakpoints,
5705
- other = _objectWithoutPropertiesLoose(breakpoints, _excluded$f);
5642
+ unit = 'px',
5643
+ step = 5,
5644
+ ...other
5645
+ } = breakpoints;
5706
5646
  const sortedValues = sortBreakpointsValues(values);
5707
5647
  const keys = Object.keys(sortedValues);
5708
5648
  function up(key) {
@@ -5734,7 +5674,7 @@ function createBreakpoints(breakpoints) {
5734
5674
  }
5735
5675
  return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');
5736
5676
  }
5737
- return _extends$2({
5677
+ return {
5738
5678
  keys,
5739
5679
  values: sortedValues,
5740
5680
  up,
@@ -5742,8 +5682,9 @@ function createBreakpoints(breakpoints) {
5742
5682
  between,
5743
5683
  only,
5744
5684
  not,
5745
- unit
5746
- }, other);
5685
+ unit,
5686
+ ...other
5687
+ };
5747
5688
  }
5748
5689
 
5749
5690
  const shape = {
@@ -6688,15 +6629,14 @@ const styleFunctionSx = unstable_createStyleFunctionSx();
6688
6629
  styleFunctionSx.filterProps = ['sx'];
6689
6630
  var styleFunctionSx$1 = styleFunctionSx;
6690
6631
 
6691
- const _excluded$e = ["breakpoints", "palette", "spacing", "shape"];
6692
6632
  function createTheme$1(options = {}, ...args) {
6693
6633
  const {
6694
- breakpoints: breakpointsInput = {},
6695
- palette: paletteInput = {},
6696
- spacing: spacingInput,
6697
- shape: shapeInput = {}
6698
- } = options,
6699
- other = _objectWithoutPropertiesLoose(options, _excluded$e);
6634
+ breakpoints: breakpointsInput = {},
6635
+ palette: paletteInput = {},
6636
+ spacing: spacingInput,
6637
+ shape: shapeInput = {},
6638
+ ...other
6639
+ } = options;
6700
6640
  const breakpoints = createBreakpoints(breakpointsInput);
6701
6641
  const spacing = createSpacing(spacingInput);
6702
6642
  let muiTheme = deepmerge({
@@ -6704,14 +6644,21 @@ function createTheme$1(options = {}, ...args) {
6704
6644
  direction: 'ltr',
6705
6645
  components: {},
6706
6646
  // Inject component definitions.
6707
- palette: _extends$2({
6708
- mode: 'light'
6709
- }, paletteInput),
6647
+ palette: {
6648
+ mode: 'light',
6649
+ ...paletteInput
6650
+ },
6710
6651
  spacing,
6711
- shape: _extends$2({}, shape$1, shapeInput)
6652
+ shape: {
6653
+ ...shape$1,
6654
+ ...shapeInput
6655
+ }
6712
6656
  }, other);
6713
6657
  muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);
6714
- muiTheme.unstable_sxConfig = _extends$2({}, defaultSxConfig$1, other == null ? void 0 : other.unstable_sxConfig);
6658
+ muiTheme.unstable_sxConfig = {
6659
+ ...defaultSxConfig$1,
6660
+ ...(other == null ? void 0 : other.unstable_sxConfig)
6661
+ };
6715
6662
  muiTheme.unstable_sx = function sx(props) {
6716
6663
  return styleFunctionSx$1({
6717
6664
  sx: props,
@@ -6734,7 +6681,8 @@ function useTheme$3(defaultTheme = systemDefaultTheme$1) {
6734
6681
  return useTheme$4(defaultTheme);
6735
6682
  }
6736
6683
 
6737
- const _excluded$d = ["variant"];
6684
+ function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
6685
+
6738
6686
  function isEmpty$2(string) {
6739
6687
  return string.length === 0;
6740
6688
  }
@@ -6746,9 +6694,9 @@ function isEmpty$2(string) {
6746
6694
  */
6747
6695
  function propsToClassKey(props) {
6748
6696
  const {
6749
- variant
6750
- } = props,
6751
- other = _objectWithoutPropertiesLoose(props, _excluded$d);
6697
+ variant,
6698
+ ...other
6699
+ } = props;
6752
6700
  let classKey = variant || '';
6753
6701
  Object.keys(other).sort().forEach(key => {
6754
6702
  if (key === 'color') {
@@ -6760,7 +6708,7 @@ function propsToClassKey(props) {
6760
6708
  return classKey;
6761
6709
  }
6762
6710
 
6763
- const _excluded$c = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"];
6711
+ /* eslint-disable no-underscore-dangle */
6764
6712
  function isEmpty$1(obj) {
6765
6713
  return Object.keys(obj).length === 0;
6766
6714
  }
@@ -6834,25 +6782,27 @@ function createStyled(input = {}) {
6834
6782
  slotShouldForwardProp = shouldForwardProp
6835
6783
  } = input;
6836
6784
  const systemSx = props => {
6837
- return styleFunctionSx$1(_extends$2({}, props, {
6838
- theme: resolveTheme(_extends$2({}, props, {
6785
+ return styleFunctionSx$1({
6786
+ ...props,
6787
+ theme: resolveTheme({
6788
+ ...props,
6839
6789
  defaultTheme,
6840
6790
  themeId
6841
- }))
6842
- }));
6791
+ })
6792
+ });
6843
6793
  };
6844
6794
  systemSx.__mui_systemSx = true;
6845
6795
  return (tag, inputOptions = {}) => {
6846
6796
  // Filter out the `sx` style function from the previous styled component to prevent unnecessary styles generated by the composite components.
6847
6797
  internal_processStyles(tag, styles => styles.filter(style => !(style != null && style.__mui_systemSx)));
6848
6798
  const {
6849
- name: componentName,
6850
- slot: componentSlot,
6851
- skipVariantsResolver: inputSkipVariantsResolver,
6852
- skipSx: inputSkipSx,
6853
- overridesResolver
6854
- } = inputOptions,
6855
- options = _objectWithoutPropertiesLoose(inputOptions, _excluded$c);
6799
+ name: componentName,
6800
+ slot: componentSlot,
6801
+ skipVariantsResolver: inputSkipVariantsResolver,
6802
+ skipSx: inputSkipSx,
6803
+ overridesResolver,
6804
+ ...options
6805
+ } = inputOptions;
6856
6806
 
6857
6807
  // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.
6858
6808
  const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver : componentSlot && componentSlot !== 'Root' || false;
@@ -6868,38 +6818,43 @@ function createStyled(input = {}) {
6868
6818
  // for string (html) tag, preserve the behavior in emotion & styled-components.
6869
6819
  shouldForwardPropOption = undefined;
6870
6820
  }
6871
- const defaultStyledResolver = styled$2(tag, _extends$2({
6821
+ const defaultStyledResolver = styled$2(tag, {
6872
6822
  shouldForwardProp: shouldForwardPropOption,
6873
- label
6874
- }, options));
6823
+ label,
6824
+ ...options
6825
+ });
6875
6826
  const muiStyledResolver = (styleArg, ...expressions) => {
6876
6827
  const expressionsWithDefaultTheme = expressions ? expressions.map(stylesArg => {
6877
6828
  // On the server Emotion doesn't use React.forwardRef for creating components, so the created
6878
6829
  // component stays as a function. This condition makes sure that we do not interpolate functions
6879
6830
  // which are basically components used as a selectors.
6880
6831
  return typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg ? props => {
6881
- return stylesArg(_extends$2({}, props, {
6882
- theme: resolveTheme(_extends$2({}, props, {
6832
+ return stylesArg({
6833
+ ...props,
6834
+ theme: resolveTheme({
6835
+ ...props,
6883
6836
  defaultTheme,
6884
6837
  themeId
6885
- }))
6886
- }));
6838
+ })
6839
+ });
6887
6840
  } : stylesArg;
6888
6841
  }) : [];
6889
6842
  let transformedStyleArg = styleArg;
6890
6843
  if (componentName && overridesResolver) {
6891
6844
  expressionsWithDefaultTheme.push(props => {
6892
- const theme = resolveTheme(_extends$2({}, props, {
6845
+ const theme = resolveTheme({
6846
+ ...props,
6893
6847
  defaultTheme,
6894
6848
  themeId
6895
- }));
6849
+ });
6896
6850
  const styleOverrides = getStyleOverrides(componentName, theme);
6897
6851
  if (styleOverrides) {
6898
6852
  const resolvedStyleOverrides = {};
6899
6853
  Object.entries(styleOverrides).forEach(([slotKey, slotStyle]) => {
6900
- resolvedStyleOverrides[slotKey] = typeof slotStyle === 'function' ? slotStyle(_extends$2({}, props, {
6854
+ resolvedStyleOverrides[slotKey] = typeof slotStyle === 'function' ? slotStyle({
6855
+ ...props,
6901
6856
  theme
6902
- })) : slotStyle;
6857
+ }) : slotStyle;
6903
6858
  });
6904
6859
  return overridesResolver(props, resolvedStyleOverrides);
6905
6860
  }
@@ -6908,10 +6863,11 @@ function createStyled(input = {}) {
6908
6863
  }
6909
6864
  if (componentName && !skipVariantsResolver) {
6910
6865
  expressionsWithDefaultTheme.push(props => {
6911
- const theme = resolveTheme(_extends$2({}, props, {
6866
+ const theme = resolveTheme({
6867
+ ...props,
6912
6868
  defaultTheme,
6913
6869
  themeId
6914
- }));
6870
+ });
6915
6871
  return variantsResolver(props, getVariantStyles(componentName, theme), theme, componentName);
6916
6872
  });
6917
6873
  }
@@ -6930,12 +6886,14 @@ function createStyled(input = {}) {
6930
6886
  // which are basically components used as a selectors.
6931
6887
  styleArg.__emotion_real !== styleArg) {
6932
6888
  // If the type is function, we need to define the default theme.
6933
- transformedStyleArg = props => styleArg(_extends$2({}, props, {
6934
- theme: resolveTheme(_extends$2({}, props, {
6889
+ transformedStyleArg = props => styleArg({
6890
+ ...props,
6891
+ theme: resolveTheme({
6892
+ ...props,
6935
6893
  defaultTheme,
6936
6894
  themeId
6937
- }))
6938
- }));
6895
+ })
6896
+ });
6939
6897
  }
6940
6898
  const Component = defaultStyledResolver(transformedStyleArg, ...expressionsWithDefaultTheme);
6941
6899
  if (tag.muiName) {
@@ -7186,21 +7144,6 @@ function lighten(color, coefficient) {
7186
7144
  return recomposeColor(color);
7187
7145
  }
7188
7146
 
7189
- function _extends$1() {
7190
- _extends$1 = Object.assign ? Object.assign.bind() : function (target) {
7191
- for (var i = 1; i < arguments.length; i++) {
7192
- var source = arguments[i];
7193
- for (var key in source) {
7194
- if (Object.prototype.hasOwnProperty.call(source, key)) {
7195
- target[key] = source[key];
7196
- }
7197
- }
7198
- }
7199
- return target;
7200
- };
7201
- return _extends$1.apply(this, arguments);
7202
- }
7203
-
7204
7147
  const ThemeContext = /*#__PURE__*/React.createContext(null);
7205
7148
  var ThemeContext$1 = ThemeContext;
7206
7149
 
@@ -7217,7 +7160,10 @@ function mergeOuterLocalTheme(outerTheme, localTheme) {
7217
7160
  const mergedTheme = localTheme(outerTheme);
7218
7161
  return mergedTheme;
7219
7162
  }
7220
- return _extends$1({}, outerTheme, localTheme);
7163
+ return {
7164
+ ...outerTheme,
7165
+ ...localTheme
7166
+ };
7221
7167
  }
7222
7168
 
7223
7169
  /**
@@ -7250,9 +7196,10 @@ function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {
7250
7196
  const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;
7251
7197
  if (typeof localTheme === 'function') {
7252
7198
  const mergedTheme = localTheme(resolvedTheme);
7253
- const result = themeId ? _extends$2({}, upperTheme, {
7199
+ const result = themeId ? {
7200
+ ...upperTheme,
7254
7201
  [themeId]: mergedTheme
7255
- }) : mergedTheme;
7202
+ } : mergedTheme;
7256
7203
  // must return a function for the private theme to NOT merge with the upper theme.
7257
7204
  // see the test case "use provided theme from a callback" in ThemeProvider.test.js
7258
7205
  if (isPrivate) {
@@ -7260,9 +7207,13 @@ function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {
7260
7207
  }
7261
7208
  return result;
7262
7209
  }
7263
- return themeId ? _extends$2({}, upperTheme, {
7210
+ return themeId ? {
7211
+ ...upperTheme,
7264
7212
  [themeId]: localTheme
7265
- }) : _extends$2({}, upperTheme, localTheme);
7213
+ } : {
7214
+ ...upperTheme,
7215
+ ...localTheme
7216
+ };
7266
7217
  }, [themeId, upperTheme, localTheme, isPrivate]);
7267
7218
  }
7268
7219
 
@@ -7292,21 +7243,20 @@ function ThemeProvider$1(props) {
7292
7243
  });
7293
7244
  }
7294
7245
 
7295
- const _excluded$b = ["defaultProps", "mixins", "overrides", "palette", "props", "styleOverrides"],
7296
- _excluded2$1 = ["type", "mode"];
7297
7246
  function adaptV4Theme(inputTheme) {
7298
7247
  const {
7299
- defaultProps = {},
7300
- mixins = {},
7301
- overrides = {},
7302
- palette = {},
7303
- props = {},
7304
- styleOverrides = {}
7305
- } = inputTheme,
7306
- other = _objectWithoutPropertiesLoose$1(inputTheme, _excluded$b);
7307
- const theme = _extends$3({}, other, {
7248
+ defaultProps = {},
7249
+ mixins = {},
7250
+ overrides = {},
7251
+ palette = {},
7252
+ props = {},
7253
+ styleOverrides = {},
7254
+ ...other
7255
+ } = inputTheme;
7256
+ const theme = {
7257
+ ...other,
7308
7258
  components: {}
7309
- });
7259
+ };
7310
7260
 
7311
7261
  // default props
7312
7262
  Object.keys(defaultProps).forEach(component => {
@@ -7338,38 +7288,41 @@ function adaptV4Theme(inputTheme) {
7338
7288
  // theme.mixins.gutters
7339
7289
  const breakpoints = createBreakpoints(inputTheme.breakpoints || {});
7340
7290
  const spacing = theme.spacing;
7341
- theme.mixins = _extends$3({
7291
+ theme.mixins = {
7342
7292
  gutters: (styles = {}) => {
7343
- return _extends$3({
7293
+ return {
7344
7294
  paddingLeft: spacing(2),
7345
- paddingRight: spacing(2)
7346
- }, styles, {
7347
- [breakpoints.up('sm')]: _extends$3({
7295
+ paddingRight: spacing(2),
7296
+ ...styles,
7297
+ [breakpoints.up('sm')]: {
7348
7298
  paddingLeft: spacing(3),
7349
- paddingRight: spacing(3)
7350
- }, styles[breakpoints.up('sm')])
7351
- });
7352
- }
7353
- }, mixins);
7299
+ paddingRight: spacing(3),
7300
+ ...styles[breakpoints.up('sm')]
7301
+ }
7302
+ };
7303
+ },
7304
+ ...mixins
7305
+ };
7354
7306
  const {
7355
- type: typeInput,
7356
- mode: modeInput
7357
- } = palette,
7358
- paletteRest = _objectWithoutPropertiesLoose$1(palette, _excluded2$1);
7307
+ type: typeInput,
7308
+ mode: modeInput,
7309
+ ...paletteRest
7310
+ } = palette;
7359
7311
  const finalMode = modeInput || typeInput || 'light';
7360
- theme.palette = _extends$3({
7312
+ theme.palette = {
7361
7313
  // theme.palette.text.hint
7362
7314
  text: {
7363
7315
  hint: finalMode === 'dark' ? 'rgba(255, 255, 255, 0.5)' : 'rgba(0, 0, 0, 0.38)'
7364
7316
  },
7365
7317
  mode: finalMode,
7366
- type: finalMode
7367
- }, paletteRest);
7318
+ type: finalMode,
7319
+ ...paletteRest
7320
+ };
7368
7321
  return theme;
7369
7322
  }
7370
7323
 
7371
7324
  function createMixins(breakpoints, mixins) {
7372
- return _extends$3({
7325
+ return {
7373
7326
  toolbar: {
7374
7327
  minHeight: 56,
7375
7328
  [breakpoints.up('xs')]: {
@@ -7380,8 +7333,9 @@ function createMixins(breakpoints, mixins) {
7380
7333
  [breakpoints.up('sm')]: {
7381
7334
  minHeight: 64
7382
7335
  }
7383
- }
7384
- }, mixins);
7336
+ },
7337
+ ...mixins
7338
+ };
7385
7339
  }
7386
7340
 
7387
7341
  const common = {
@@ -7516,7 +7470,6 @@ const green = {
7516
7470
  };
7517
7471
  var green$1 = green;
7518
7472
 
7519
- const _excluded$a = ["mode", "contrastThreshold", "tonalOffset"];
7520
7473
  const light$1 = {
7521
7474
  // The colors used to style the text.
7522
7475
  text: {
@@ -7681,11 +7634,11 @@ function getDefaultWarning(mode = 'light') {
7681
7634
  }
7682
7635
  function createPalette(palette) {
7683
7636
  const {
7684
- mode = 'light',
7685
- contrastThreshold = 3,
7686
- tonalOffset = 0.2
7687
- } = palette,
7688
- other = _objectWithoutPropertiesLoose$1(palette, _excluded$a);
7637
+ mode = 'light',
7638
+ contrastThreshold = 3,
7639
+ tonalOffset = 0.2,
7640
+ ...other
7641
+ } = palette;
7689
7642
  const primary = palette.primary || getDefaultPrimary(mode);
7690
7643
  const secondary = palette.secondary || getDefaultSecondary(mode);
7691
7644
  const error = palette.error || getDefaultError(mode);
@@ -7707,7 +7660,9 @@ function createPalette(palette) {
7707
7660
  lightShade = 300,
7708
7661
  darkShade = 700
7709
7662
  }) => {
7710
- color = _extends$3({}, color);
7663
+ color = {
7664
+ ...color
7665
+ };
7711
7666
  if (!color.main && color[mainShade]) {
7712
7667
  color.main = color[mainShade];
7713
7668
  }
@@ -7728,9 +7683,11 @@ function createPalette(palette) {
7728
7683
  dark: dark$1,
7729
7684
  light: light$1
7730
7685
  };
7731
- const paletteOutput = deepmerge(_extends$3({
7686
+ const paletteOutput = deepmerge({
7732
7687
  // A collection of common colors.
7733
- common: _extends$3({}, common$1),
7688
+ common: {
7689
+ ...common$1
7690
+ },
7734
7691
  // prevent mutable object.
7735
7692
  // The palette mode, can be light or dark.
7736
7693
  mode,
@@ -7779,12 +7736,13 @@ function createPalette(palette) {
7779
7736
  // Used by the functions below to shift a color's luminance by approximately
7780
7737
  // two indexes within its tonal palette.
7781
7738
  // E.g., shift from Red 500 to Red 300 or Red 700.
7782
- tonalOffset
7783
- }, modes[mode]), other);
7739
+ tonalOffset,
7740
+ // The light and dark mode object.
7741
+ ...modes[mode]
7742
+ }, other);
7784
7743
  return paletteOutput;
7785
7744
  }
7786
7745
 
7787
- const _excluded$9 = ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants", "pxToRem"];
7788
7746
  function round(value) {
7789
7747
  return Math.round(value * 1e5) / 1e5;
7790
7748
  }
@@ -7798,35 +7756,39 @@ const defaultFontFamily = '"Roboto", "Helvetica", "Arial", sans-serif';
7798
7756
  * @see @link{https://m2.material.io/design/typography/understanding-typography.html}
7799
7757
  */
7800
7758
  function createTypography(palette, typography) {
7801
- const _ref = typeof typography === 'function' ? typography(palette) : typography,
7802
- {
7803
- fontFamily = defaultFontFamily,
7804
- // The default font size of the Material Specification.
7805
- fontSize = 14,
7806
- // px
7807
- fontWeightLight = 300,
7808
- fontWeightRegular = 400,
7809
- fontWeightMedium = 500,
7810
- fontWeightBold = 700,
7811
- // Tell MUI what's the font-size on the html element.
7812
- // 16px is the default font-size used by browsers.
7813
- htmlFontSize = 16,
7814
- // Apply the CSS properties to all the variants.
7815
- allVariants,
7816
- pxToRem: pxToRem2
7817
- } = _ref,
7818
- other = _objectWithoutPropertiesLoose$1(_ref, _excluded$9);
7759
+ const {
7760
+ fontFamily = defaultFontFamily,
7761
+ // The default font size of the Material Specification.
7762
+ fontSize = 14,
7763
+ // px
7764
+ fontWeightLight = 300,
7765
+ fontWeightRegular = 400,
7766
+ fontWeightMedium = 500,
7767
+ fontWeightBold = 700,
7768
+ // Tell MUI what's the font-size on the html element.
7769
+ // 16px is the default font-size used by browsers.
7770
+ htmlFontSize = 16,
7771
+ // Apply the CSS properties to all the variants.
7772
+ allVariants,
7773
+ pxToRem: pxToRem2,
7774
+ ...other
7775
+ } = typeof typography === 'function' ? typography(palette) : typography;
7819
7776
  const coef = fontSize / 14;
7820
7777
  const pxToRem = pxToRem2 || (size => `${size / htmlFontSize * coef}rem`);
7821
- const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => _extends$3({
7778
+ const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => ({
7822
7779
  fontFamily,
7823
7780
  fontWeight,
7824
7781
  fontSize: pxToRem(size),
7825
7782
  // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/
7826
- lineHeight
7827
- }, fontFamily === defaultFontFamily ? {
7828
- letterSpacing: `${round(letterSpacing / size)}em`
7829
- } : {}, casing, allVariants);
7783
+ lineHeight,
7784
+ // The letter spacing was designed for the Roboto font-family. Using the same letter-spacing
7785
+ // across font-families can cause issues with the kerning.
7786
+ ...(fontFamily === defaultFontFamily ? {
7787
+ letterSpacing: `${round(letterSpacing / size)}em`
7788
+ } : {}),
7789
+ ...casing,
7790
+ ...allVariants
7791
+ });
7830
7792
  const variants = {
7831
7793
  h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),
7832
7794
  h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),
@@ -7849,7 +7811,7 @@ function createTypography(palette, typography) {
7849
7811
  letterSpacing: 'inherit'
7850
7812
  }
7851
7813
  };
7852
- return deepmerge(_extends$3({
7814
+ return deepmerge({
7853
7815
  htmlFontSize,
7854
7816
  pxToRem,
7855
7817
  fontFamily,
@@ -7857,8 +7819,9 @@ function createTypography(palette, typography) {
7857
7819
  fontWeightLight,
7858
7820
  fontWeightRegular,
7859
7821
  fontWeightMedium,
7860
- fontWeightBold
7861
- }, variants), other, {
7822
+ fontWeightBold,
7823
+ ...variants
7824
+ }, other, {
7862
7825
  clone: false // No need to clone deep
7863
7826
  });
7864
7827
  }
@@ -7874,7 +7837,6 @@ function createShadow(...px) {
7874
7837
  const shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];
7875
7838
  var shadows$1 = shadows;
7876
7839
 
7877
- const _excluded$8 = ["duration", "easing", "delay"];
7878
7840
  // Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves
7879
7841
  // to learn the context in which each easing should be used.
7880
7842
  const easing = {
@@ -7917,24 +7879,30 @@ function getAutoHeightDuration(height) {
7917
7879
  return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);
7918
7880
  }
7919
7881
  function createTransitions(inputTransitions) {
7920
- const mergedEasing = _extends$3({}, easing, inputTransitions.easing);
7921
- const mergedDuration = _extends$3({}, duration, inputTransitions.duration);
7882
+ const mergedEasing = {
7883
+ ...easing,
7884
+ ...inputTransitions.easing
7885
+ };
7886
+ const mergedDuration = {
7887
+ ...duration,
7888
+ ...inputTransitions.duration
7889
+ };
7922
7890
  const create = (props = ['all'], options = {}) => {
7923
7891
  const {
7924
- duration: durationOption = mergedDuration.standard,
7925
- easing: easingOption = mergedEasing.easeInOut,
7926
- delay = 0
7927
- } = options;
7928
- _objectWithoutPropertiesLoose$1(options, _excluded$8);
7892
+ duration: durationOption = mergedDuration.standard,
7893
+ easing: easingOption = mergedEasing.easeInOut,
7894
+ delay = 0,
7895
+ ...other
7896
+ } = options;
7929
7897
  return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');
7930
7898
  };
7931
- return _extends$3({
7899
+ return {
7932
7900
  getAutoHeightDuration,
7933
- create
7934
- }, inputTransitions, {
7901
+ create,
7902
+ ...inputTransitions,
7935
7903
  easing: mergedEasing,
7936
7904
  duration: mergedDuration
7937
- });
7905
+ };
7938
7906
  }
7939
7907
 
7940
7908
  // We need to centralize the zIndex definitions as they work
@@ -7951,15 +7919,17 @@ const zIndex = {
7951
7919
  };
7952
7920
  var zIndex$1 = zIndex;
7953
7921
 
7954
- const _excluded$7 = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"];
7955
7922
  function createTheme(options = {}, ...args) {
7956
7923
  const {
7957
- mixins: mixinsInput = {},
7958
- palette: paletteInput = {},
7959
- transitions: transitionsInput = {},
7960
- typography: typographyInput = {}
7961
- } = options,
7962
- other = _objectWithoutPropertiesLoose$1(options, _excluded$7);
7924
+ breakpoints: breakpointsInput,
7925
+ mixins: mixinsInput = {},
7926
+ spacing: spacingInput,
7927
+ palette: paletteInput = {},
7928
+ transitions: transitionsInput = {},
7929
+ typography: typographyInput = {},
7930
+ shape: shapeInput,
7931
+ ...other
7932
+ } = options;
7963
7933
  if (options.vars) {
7964
7934
  throw new Error(formatMuiErrorMessage(18));
7965
7935
  }
@@ -7972,11 +7942,16 @@ function createTheme(options = {}, ...args) {
7972
7942
  shadows: shadows$1.slice(),
7973
7943
  typography: createTypography(palette, typographyInput),
7974
7944
  transitions: createTransitions(transitionsInput),
7975
- zIndex: _extends$3({}, zIndex$1)
7945
+ zIndex: {
7946
+ ...zIndex$1
7947
+ }
7976
7948
  });
7977
7949
  muiTheme = deepmerge(muiTheme, other);
7978
7950
  muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);
7979
- muiTheme.unstable_sxConfig = _extends$3({}, defaultSxConfig$1, other == null ? void 0 : other.unstable_sxConfig);
7951
+ muiTheme.unstable_sxConfig = {
7952
+ ...defaultSxConfig$1,
7953
+ ...(other == null ? void 0 : other.unstable_sxConfig)
7954
+ };
7980
7955
  muiTheme.unstable_sx = function sx(props) {
7981
7956
  return styleFunctionSx$1({
7982
7957
  sx: props,
@@ -8014,21 +7989,18 @@ const styled = createStyled({
8014
7989
  });
8015
7990
  var styled$1 = styled;
8016
7991
 
8017
- const _excluded$6 = ["theme"];
8018
- function ThemeProvider(_ref) {
8019
- let {
8020
- theme: themeInput
8021
- } = _ref,
8022
- props = _objectWithoutPropertiesLoose$1(_ref, _excluded$6);
7992
+ function ThemeProvider({
7993
+ theme: themeInput,
7994
+ ...props
7995
+ }) {
8023
7996
  const scopedTheme = themeInput[THEME_ID];
8024
- return /*#__PURE__*/jsxRuntimeExports.jsx(ThemeProvider$1, _extends$3({}, props, {
7997
+ return /*#__PURE__*/jsxRuntimeExports.jsx(ThemeProvider$1, {
7998
+ ...props,
8025
7999
  themeId: scopedTheme ? THEME_ID : undefined,
8026
8000
  theme: scopedTheme || themeInput
8027
- }));
8001
+ });
8028
8002
  }
8029
8003
 
8030
- function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
8031
-
8032
8004
  function _extends() {
8033
8005
  _extends = Object.assign ? Object.assign.bind() : function (target) {
8034
8006
  for (var i = 1; i < arguments.length; i++) {
@@ -8389,7 +8361,7 @@ function create$3(definition) {
8389
8361
  return cache[key];
8390
8362
  }
8391
8363
 
8392
- const NEBULA_VERSION_HASH = "5bae" ;
8364
+ const NEBULA_VERSION_HASH = "8048" ;
8393
8365
  ClassNameGenerator$1.configure(componentName => {
8394
8366
  return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
8395
8367
  });
@@ -8636,7 +8608,7 @@ function boot(_ref2) {
8636
8608
  const appRef = React__default.createRef();
8637
8609
  const element = document.createElement('div');
8638
8610
  element.style.display = 'none';
8639
- element.setAttribute('data-nebulajs-version', "4.0.2" );
8611
+ element.setAttribute('data-nebulajs-version', "4.1.0" );
8640
8612
  element.setAttribute('data-app-id', app.id);
8641
8613
  document.body.appendChild(element);
8642
8614
  if (context) {
@@ -9041,7 +9013,7 @@ function SvgIcon$2(_ref) {
9041
9013
  return (
9042
9014
  /*#__PURE__*/
9043
9015
  // eslint-disable-next-line react/no-array-index-key
9044
- React__default.createElement(Type, _extends$5({
9016
+ React__default.createElement(Type, _extends$1({
9045
9017
  key: ix
9046
9018
  }, attrs))
9047
9019
  );
@@ -10425,7 +10397,8 @@ function Frequency(_ref) {
10425
10397
  alignItems: 'center'
10426
10398
  },
10427
10399
  className: rowColClasses.frequencyCount,
10428
- "aria-label": frequencyText
10400
+ "aria-label": frequencyText,
10401
+ title: frequencyText
10429
10402
  }, /*#__PURE__*/React__default.createElement(Typography, {
10430
10403
  noWrap: true,
10431
10404
  color: "inherit",
@@ -12737,7 +12710,7 @@ function getListBoxComponents(_ref) {
12737
12710
  local.current.listRef = ref;
12738
12711
  return /*#__PURE__*/React__default.createElement(StyledFixedSizeList
12739
12712
  // eslint-disable-next-line react/jsx-props-no-spreading
12740
- , _extends$5({}, commonComponentOptions, {
12713
+ , _extends$1({}, commonComponentOptions, {
12741
12714
  dataTestid: "fixed-size-list",
12742
12715
  scrollDisabled: constraints === null || constraints === void 0 ? void 0 : constraints.active,
12743
12716
  height: listHeight,
@@ -12814,7 +12787,7 @@ function getListBoxComponents(_ref) {
12814
12787
  };
12815
12788
  return /*#__PURE__*/React__default.createElement(StyledFixedSizeGrid
12816
12789
  // eslint-disable-next-line react/jsx-props-no-spreading
12817
- , _extends$5({}, commonComponentOptions, {
12790
+ , _extends$1({}, commonComponentOptions, {
12818
12791
  dataTestid: "fixed-size-grid",
12819
12792
  scrollDisabled: constraints === null || constraints === void 0 ? void 0 : constraints.active,
12820
12793
  height: gridHeight,
@@ -13229,7 +13202,6 @@ function getSvgIconUtilityClass(slot) {
13229
13202
  }
13230
13203
  generateUtilityClasses('MuiSvgIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']);
13231
13204
 
13232
- const _excluded$5 = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"];
13233
13205
  const useUtilityClasses = ownerState => {
13234
13206
  const {
13235
13207
  color,
@@ -13285,56 +13257,58 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
13285
13257
  name: 'MuiSvgIcon'
13286
13258
  });
13287
13259
  const {
13288
- children,
13289
- className,
13290
- color = 'inherit',
13291
- component = 'svg',
13292
- fontSize = 'medium',
13293
- htmlColor,
13294
- inheritViewBox = false,
13295
- titleAccess,
13296
- viewBox = '0 0 24 24'
13297
- } = props,
13298
- other = _objectWithoutPropertiesLoose$1(props, _excluded$5);
13299
- const ownerState = _extends$3({}, props, {
13260
+ children,
13261
+ className,
13262
+ color = 'inherit',
13263
+ component = 'svg',
13264
+ fontSize = 'medium',
13265
+ htmlColor,
13266
+ inheritViewBox = false,
13267
+ titleAccess,
13268
+ viewBox = '0 0 24 24',
13269
+ ...other
13270
+ } = props;
13271
+ const ownerState = {
13272
+ ...props,
13300
13273
  color,
13301
13274
  component,
13302
13275
  fontSize,
13303
13276
  instanceFontSize: inProps.fontSize,
13304
13277
  inheritViewBox,
13305
13278
  viewBox
13306
- });
13279
+ };
13307
13280
  const more = {};
13308
13281
  if (!inheritViewBox) {
13309
13282
  more.viewBox = viewBox;
13310
13283
  }
13311
13284
  const classes = useUtilityClasses(ownerState);
13312
- return /*#__PURE__*/jsxRuntimeExports.jsxs(SvgIconRoot, _extends$3({
13285
+ return /*#__PURE__*/jsxRuntimeExports.jsxs(SvgIconRoot, {
13313
13286
  as: component,
13314
13287
  className: clsx(classes.root, className),
13315
13288
  focusable: "false",
13316
13289
  color: htmlColor,
13317
13290
  "aria-hidden": titleAccess ? undefined : true,
13318
13291
  role: titleAccess ? 'img' : undefined,
13319
- ref: ref
13320
- }, more, other, {
13292
+ ref: ref,
13293
+ ...more,
13294
+ ...other,
13321
13295
  ownerState: ownerState,
13322
13296
  children: [children, titleAccess ? /*#__PURE__*/jsxRuntimeExports.jsx("title", {
13323
13297
  children: titleAccess
13324
13298
  }) : null]
13325
- }));
13299
+ });
13326
13300
  });
13327
13301
  SvgIcon.muiName = 'SvgIcon';
13328
13302
  var SvgIcon$1 = SvgIcon;
13329
13303
 
13330
13304
  function createSvgIcon(path, displayName) {
13331
13305
  function Component(props, ref) {
13332
- return /*#__PURE__*/jsxRuntimeExports.jsx(SvgIcon$1, _extends$3({
13306
+ return /*#__PURE__*/jsxRuntimeExports.jsx(SvgIcon$1, {
13333
13307
  "data-testid": `${displayName}Icon`,
13334
- ref: ref
13335
- }, props, {
13308
+ ref: ref,
13309
+ ...props,
13336
13310
  children: path
13337
- }));
13311
+ });
13338
13312
  }
13339
13313
  Component.muiName = SvgIcon$1.muiName;
13340
13314
  return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component));
@@ -14211,7 +14185,7 @@ const More$1 = React__default.forwardRef((_ref3, ref) => {
14211
14185
  const autoFocusIndex = actions.findIndex(action => !action.disabled);
14212
14186
  return showActions && /*#__PURE__*/React__default.createElement(StyledPopover$1
14213
14187
  // eslint-disable-next-line react/jsx-props-no-spreading
14214
- , _extends$5({}, popoverProps, {
14188
+ , _extends$1({}, popoverProps, {
14215
14189
  onClose: onCloseOrActionClick,
14216
14190
  ref: ref,
14217
14191
  open: show,
@@ -16400,10 +16374,10 @@ class $6e2bb92d9db3b0c8$export$9d94f4ee1d930ff extends (Component) {
16400
16374
  // This can result in invalid style values which can result in NaN values if we don't handle them.
16401
16375
  // See issue #150 for more context.
16402
16376
  const style = window.getComputedStyle(this._parentNode) || {};
16403
- const paddingLeft = parseInt((_style$paddingLeft = style.paddingLeft) !== null && _style$paddingLeft !== void 0 ? _style$paddingLeft : "0", 10);
16404
- const paddingRight = parseInt((_style$paddingRight = style.paddingRight) !== null && _style$paddingRight !== void 0 ? _style$paddingRight : "0", 10);
16405
- const paddingTop = parseInt((_style$paddingTop = style.paddingTop) !== null && _style$paddingTop !== void 0 ? _style$paddingTop : "0", 10);
16406
- const paddingBottom = parseInt((_style$paddingBottom = style.paddingBottom) !== null && _style$paddingBottom !== void 0 ? _style$paddingBottom : "0", 10);
16377
+ const paddingLeft = parseFloat((_style$paddingLeft = style.paddingLeft) !== null && _style$paddingLeft !== void 0 ? _style$paddingLeft : "0");
16378
+ const paddingRight = parseFloat((_style$paddingRight = style.paddingRight) !== null && _style$paddingRight !== void 0 ? _style$paddingRight : "0");
16379
+ const paddingTop = parseFloat((_style$paddingTop = style.paddingTop) !== null && _style$paddingTop !== void 0 ? _style$paddingTop : "0");
16380
+ const paddingBottom = parseFloat((_style$paddingBottom = style.paddingBottom) !== null && _style$paddingBottom !== void 0 ? _style$paddingBottom : "0");
16407
16381
  const rect = this._parentNode.getBoundingClientRect();
16408
16382
  const scaledHeight = rect.height - paddingTop - paddingBottom;
16409
16383
  const scaledWidth = rect.width - paddingLeft - paddingRight;
@@ -17157,7 +17131,10 @@ function ListBoxInline(_ref4) {
17157
17131
  fontSize: '12px'
17158
17132
  }
17159
17133
  }));
17160
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, showDetachedToolbarOnly && /*#__PURE__*/React__default.createElement(ActionsToolbar, _extends$5({
17134
+ if (isInvalid) {
17135
+ renderedCallback === null || renderedCallback === void 0 ? void 0 : renderedCallback();
17136
+ }
17137
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, showDetachedToolbarOnly && /*#__PURE__*/React__default.createElement(ActionsToolbar, _extends$1({
17161
17138
  direction: direction
17162
17139
  }, getActionToolbarProps(true))), /*#__PURE__*/React__default.createElement(StyledGrid$3, {
17163
17140
  className: "listbox-container",
@@ -17214,7 +17191,7 @@ function ListBoxInline(_ref4) {
17214
17191
  title: layout.title
17215
17192
  }, layout.title)), /*#__PURE__*/React__default.createElement(Grid, {
17216
17193
  item: true
17217
- }, /*#__PURE__*/React__default.createElement(ActionsToolbar, _extends$5({
17194
+ }, /*#__PURE__*/React__default.createElement(ActionsToolbar, _extends$1({
17218
17195
  direction: direction
17219
17196
  }, getActionToolbarProps(isToolbarDetached))))), /*#__PURE__*/React__default.createElement(Grid, {
17220
17197
  item: true,
@@ -19207,13 +19184,13 @@ function Progress(_ref2) {
19207
19184
  const s = SIZES[size];
19208
19185
  return /*#__PURE__*/React__default.createElement(Root, {
19209
19186
  className: classes$3.root
19210
- }, /*#__PURE__*/React__default.createElement(CircularProgress, _extends$5({
19187
+ }, /*#__PURE__*/React__default.createElement(CircularProgress, _extends$1({
19211
19188
  variant: "determinate",
19212
19189
  value: 100,
19213
19190
  className: classes$3.back,
19214
19191
  size: s,
19215
19192
  thickness: 3
19216
- }, props)), /*#__PURE__*/React__default.createElement(CircularProgress, _extends$5({
19193
+ }, props)), /*#__PURE__*/React__default.createElement(CircularProgress, _extends$1({
19217
19194
  variant: "indeterminate",
19218
19195
  disableShrink: true,
19219
19196
  className: classes$3.front,
@@ -19263,7 +19240,7 @@ function Cancel(_ref) {
19263
19240
  variant: "h6",
19264
19241
  align: "center",
19265
19242
  "data-tid": "update-active"
19266
- }, translator.get('Object.Update.Active')))), /*#__PURE__*/React__default.createElement(Grid, _extends$5({
19243
+ }, translator.get('Object.Update.Active')))), /*#__PURE__*/React__default.createElement(Grid, _extends$1({
19267
19244
  item: true
19268
19245
  }, props), /*#__PURE__*/React__default.createElement(Button, {
19269
19246
  variant: "contained",
@@ -19290,7 +19267,7 @@ function Retry(_ref2) {
19290
19267
  "data-tid": "update-cancelled"
19291
19268
  }, translator.get('Object.Update.Cancelled'))), /*#__PURE__*/React__default.createElement(Grid, {
19292
19269
  item: true
19293
- }, /*#__PURE__*/React__default.createElement(Button, _extends$5({
19270
+ }, /*#__PURE__*/React__default.createElement(Button, _extends$1({
19294
19271
  variant: "contained",
19295
19272
  onClick: retry
19296
19273
  }, props), translator.get('Retry'))));
@@ -20268,6 +20245,13 @@ const Cell = forwardRef((_ref6, ref) => {
20268
20245
  },
20269
20246
  setSnOptions,
20270
20247
  setSnPlugins,
20248
+ getImperativeHandle() {
20249
+ var _state$sn;
20250
+ if ((_state$sn = state.sn) !== null && _state$sn !== void 0 && _state$sn.component && typeof state.sn.component.getImperativeHandle === 'function') {
20251
+ return state.sn.component.getImperativeHandle();
20252
+ }
20253
+ return {};
20254
+ },
20271
20255
  async takeSnapshot() {
20272
20256
  const {
20273
20257
  width,
@@ -20369,7 +20353,7 @@ const Cell = forwardRef((_ref6, ref) => {
20369
20353
  height: '100%'
20370
20354
  },
20371
20355
  ref: contentRef
20372
- }, Content), /*#__PURE__*/React__default.createElement(Footer, {
20356
+ }, Content), cellNode && layout && state.sn && /*#__PURE__*/React__default.createElement(Footer, {
20373
20357
  layout: layout,
20374
20358
  titleStyles: titleStyles
20375
20359
  })), state.longRunningQuery && /*#__PURE__*/React__default.createElement(LongRunningQuery, {
@@ -20499,21 +20483,34 @@ function viz() {
20499
20483
  let cellRef = null;
20500
20484
  let mountedReference = null;
20501
20485
  let onMount = null;
20486
+ let onRender = null;
20502
20487
  const mounted = new Promise(resolve => {
20503
20488
  onMount = resolve;
20504
20489
  });
20490
+ const rendered = new Promise(resolve => {
20491
+ onRender = resolve;
20492
+ });
20493
+ const createOnInitialRender = override => () => {
20494
+ override && override();
20495
+ onRender();
20496
+ };
20505
20497
  let initialSnOptions = {};
20506
20498
  let initialSnPlugins = [];
20507
20499
  const emitter = new EventEmitter$1();
20508
20500
  const setSnOptions = async opts => {
20501
+ const override = opts.onInitialRender;
20509
20502
  if (mountedReference) {
20510
20503
  (async () => {
20511
20504
  await mounted;
20512
- cellRef.current.setSnOptions(_objectSpread2(_objectSpread2({}, initialSnOptions), opts));
20505
+ cellRef.current.setSnOptions(_objectSpread2(_objectSpread2(_objectSpread2({}, initialSnOptions), opts), {
20506
+ onInitialRender: createOnInitialRender(override)
20507
+ }));
20513
20508
  })();
20514
20509
  } else {
20515
20510
  // Handle setting options before mount
20516
- initialSnOptions = _objectSpread2(_objectSpread2({}, initialSnOptions), opts);
20511
+ initialSnOptions = _objectSpread2(_objectSpread2(_objectSpread2({}, initialSnOptions), opts), {
20512
+ onInitialRender: createOnInitialRender(override)
20513
+ });
20517
20514
  }
20518
20515
  };
20519
20516
  const setSnPlugins = async plugins => {
@@ -20613,6 +20610,14 @@ function viz() {
20613
20610
  removeListener(eventName, listener) {
20614
20611
  emitter.removeListener(eventName, listener);
20615
20612
  },
20613
+ /**
20614
+ * Gets the specific api that a Viz exposes.
20615
+ * @returns {Promise<object>} object that contains the internal Viz api.
20616
+ */
20617
+ async getImperativeHandle() {
20618
+ await rendered;
20619
+ return cellRef.current.getImperativeHandle();
20620
+ },
20616
20621
  // ===== unexposed experimental API - use at own risk ======
20617
20622
  __DO_NOT_USE__: {
20618
20623
  mount(element) {
@@ -22622,15 +22627,11 @@ function useOptions() {
22622
22627
  }
22623
22628
 
22624
22629
  /**
22625
- * TODO before making public - expose getImperativeHandle on Viz
22626
- * Exposes an API to the external environment.
22627
- *
22628
22630
  * This is an empty object by default, but enables you to provide a custom API of your visualization to
22629
22631
  * make it possible to control after it has been rendered.
22630
22632
  *
22631
22633
  * You can only use this hook once, calling it more than once is considered an error.
22632
22634
  * @entry
22633
- * @private
22634
22635
  * @template T
22635
22636
  * @param {function():T} factory
22636
22637
  * @param {Array<any>=} deps
@@ -25219,7 +25220,7 @@ function create(_ref) {
25219
25220
  },
25220
25221
  getSupportedVersion: (name, propertyVersion) => {
25221
25222
  if (!tc[name]) {
25222
- return null;
25223
+ return undefined;
25223
25224
  }
25224
25225
  return tc[name].getMatchingVersionFromProperties(propertyVersion);
25225
25226
  },