@nebula.js/stardust 2.7.0 → 2.8.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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @nebula.js/stardust v2.7.0
2
+ * @nebula.js/stardust v2.8.0
3
3
  * Copyright (c) 2022 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -11064,7 +11064,7 @@
11064
11064
  return [appSelections, navState];
11065
11065
  }
11066
11066
 
11067
- const NEBULA_VERSION_HASH = "b1d7" ;
11067
+ const NEBULA_VERSION_HASH = "0577" ;
11068
11068
  let counter = 0;
11069
11069
  const NebulaApp = react.exports.forwardRef((_ref, ref) => {
11070
11070
  let {
@@ -11124,7 +11124,7 @@
11124
11124
  const appRef = React.createRef();
11125
11125
  const element = document.createElement('div');
11126
11126
  element.style.display = 'none';
11127
- element.setAttribute('data-nebulajs-version', "2.7.0" );
11127
+ element.setAttribute('data-nebulajs-version', "2.8.0" );
11128
11128
  element.setAttribute('data-app-id', app.id);
11129
11129
  document.body.appendChild(element);
11130
11130
  ReactDOM.render( /*#__PURE__*/React.createElement(NebulaApp, {
@@ -11223,7 +11223,7 @@
11223
11223
  }, function () {});
11224
11224
  }
11225
11225
 
11226
- var styles$r = function styles(theme) {
11226
+ var styles$t = function styles(theme) {
11227
11227
  return {
11228
11228
  /* Styles applied to the root element. */
11229
11229
  root: {
@@ -11307,7 +11307,7 @@
11307
11307
  }, other), children, titleAccess ? /*#__PURE__*/react.exports.createElement("title", null, titleAccess) : null);
11308
11308
  });
11309
11309
  SvgIcon$1.muiName = 'SvgIcon';
11310
- var SvgIcon$2 = withStyles(styles$r, {
11310
+ var SvgIcon$2 = withStyles(styles$t, {
11311
11311
  name: 'MuiSvgIcon'
11312
11312
  })(SvgIcon$1);
11313
11313
 
@@ -12373,7 +12373,7 @@
12373
12373
  };
12374
12374
  }
12375
12375
 
12376
- var styles$q = function styles(theme) {
12376
+ var styles$s = function styles(theme) {
12377
12377
  var elevations = {};
12378
12378
  theme.shadows.forEach(function (shadow, index) {
12379
12379
  elevations["elevation".concat(index)] = {
@@ -12417,7 +12417,7 @@
12417
12417
  ref: ref
12418
12418
  }, other));
12419
12419
  });
12420
- var Paper$1 = withStyles(styles$q, {
12420
+ var Paper$1 = withStyles(styles$s, {
12421
12421
  name: 'MuiPaper'
12422
12422
  })(Paper);
12423
12423
 
@@ -12493,7 +12493,7 @@
12493
12493
 
12494
12494
  var DURATION = 550;
12495
12495
  var DELAY_RIPPLE = 80;
12496
- var styles$p = function styles(theme) {
12496
+ var styles$r = function styles(theme) {
12497
12497
  return {
12498
12498
  /* Styles applied to the root element. */
12499
12499
  root: {
@@ -12773,12 +12773,12 @@
12773
12773
  exit: true
12774
12774
  }, ripples));
12775
12775
  });
12776
- var TouchRipple$1 = withStyles(styles$p, {
12776
+ var TouchRipple$1 = withStyles(styles$r, {
12777
12777
  flip: false,
12778
12778
  name: 'MuiTouchRipple'
12779
12779
  })( /*#__PURE__*/react.exports.memo(TouchRipple));
12780
12780
 
12781
- var styles$o = {
12781
+ var styles$q = {
12782
12782
  /* Styles applied to the root element. */
12783
12783
  root: {
12784
12784
  display: 'inline-flex',
@@ -13082,11 +13082,11 @@
13082
13082
  center: centerRipple
13083
13083
  }, TouchRippleProps)) : null);
13084
13084
  });
13085
- var ButtonBase$1 = withStyles(styles$o, {
13085
+ var ButtonBase$1 = withStyles(styles$q, {
13086
13086
  name: 'MuiButtonBase'
13087
13087
  })(ButtonBase);
13088
13088
 
13089
- var styles$n = function styles(theme) {
13089
+ var styles$p = function styles(theme) {
13090
13090
  return {
13091
13091
  /* Styles applied to the root element. */
13092
13092
  root: {
@@ -13211,13 +13211,13 @@
13211
13211
  className: classes.label
13212
13212
  }, children));
13213
13213
  });
13214
- var IconButton$1 = withStyles(styles$n, {
13214
+ var IconButton$1 = withStyles(styles$p, {
13215
13215
  name: 'MuiIconButton'
13216
13216
  })(IconButton);
13217
13217
 
13218
13218
  var RADIUS_STANDARD = 10;
13219
13219
  var RADIUS_DOT = 4;
13220
- var styles$m = function styles(theme) {
13220
+ var styles$o = function styles(theme) {
13221
13221
  return {
13222
13222
  /* Styles applied to the root element. */
13223
13223
  root: {
@@ -13509,7 +13509,7 @@
13509
13509
  className: clsx(classes.badge, classes["".concat(anchorOrigin.horizontal).concat(capitalize(anchorOrigin.vertical), "}")], classes["anchorOrigin".concat(capitalize(anchorOrigin.vertical)).concat(capitalize(anchorOrigin.horizontal)).concat(capitalize(overlap))], color !== 'default' && classes["color".concat(capitalize(color))], invisible && classes.invisible, variant === 'dot' && classes.dot)
13510
13510
  }, displayValue));
13511
13511
  });
13512
- var Badge$1 = withStyles(styles$m, {
13512
+ var Badge$1 = withStyles(styles$o, {
13513
13513
  name: 'MuiBadge'
13514
13514
  })(Badge);
13515
13515
 
@@ -13523,7 +13523,7 @@
13523
13523
  });
13524
13524
  var Box$1 = Box;
13525
13525
 
13526
- var styles$l = function styles(theme) {
13526
+ var styles$n = function styles(theme) {
13527
13527
  return {
13528
13528
  /* Styles applied to the root element. */
13529
13529
  root: {
@@ -13695,11 +13695,11 @@
13695
13695
  ref: ref
13696
13696
  }, other));
13697
13697
  });
13698
- var Typography$1 = withStyles(styles$l, {
13698
+ var Typography$1 = withStyles(styles$n, {
13699
13699
  name: 'MuiTypography'
13700
13700
  })(Typography);
13701
13701
 
13702
- var styles$k = function styles(theme) {
13702
+ var styles$m = function styles(theme) {
13703
13703
  return {
13704
13704
  /* Styles applied to the root element. */
13705
13705
  root: _extends$4({}, theme.typography.button, {
@@ -14024,7 +14024,7 @@
14024
14024
  className: classes.label
14025
14025
  }, startIcon, children, endIcon));
14026
14026
  });
14027
- var Button$1 = withStyles(styles$k, {
14027
+ var Button$1 = withStyles(styles$m, {
14028
14028
  name: 'MuiButton'
14029
14029
  })(Button);
14030
14030
 
@@ -14043,7 +14043,7 @@
14043
14043
  return react.exports.useContext(FormControlContext$1);
14044
14044
  }
14045
14045
 
14046
- var styles$j = {
14046
+ var styles$l = {
14047
14047
  root: {
14048
14048
  padding: 9
14049
14049
  },
@@ -14166,7 +14166,7 @@
14166
14166
  value: value
14167
14167
  }, inputProps)), checked ? checkedIcon : icon);
14168
14168
  }); // NB: If changed, please update Checkbox, Switch and Radio
14169
- var SwitchBase$1 = withStyles(styles$j, {
14169
+ var SwitchBase$1 = withStyles(styles$l, {
14170
14170
  name: 'PrivateSwitchBase'
14171
14171
  })(SwitchBase);
14172
14172
 
@@ -14194,7 +14194,7 @@
14194
14194
  d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"
14195
14195
  }));
14196
14196
 
14197
- var styles$i = function styles(theme) {
14197
+ var styles$k = function styles(theme) {
14198
14198
  return {
14199
14199
  /* Styles applied to the root element. */
14200
14200
  root: {
@@ -14245,17 +14245,17 @@
14245
14245
  }
14246
14246
  };
14247
14247
  };
14248
- var defaultCheckedIcon = /*#__PURE__*/react.exports.createElement(CheckBoxIcon, null);
14249
- var defaultIcon = /*#__PURE__*/react.exports.createElement(CheckBoxOutlineBlankIcon, null);
14248
+ var defaultCheckedIcon$1 = /*#__PURE__*/react.exports.createElement(CheckBoxIcon, null);
14249
+ var defaultIcon$1 = /*#__PURE__*/react.exports.createElement(CheckBoxOutlineBlankIcon, null);
14250
14250
  var defaultIndeterminateIcon = /*#__PURE__*/react.exports.createElement(IndeterminateCheckBoxIcon, null);
14251
14251
  var Checkbox = /*#__PURE__*/react.exports.forwardRef(function Checkbox(props, ref) {
14252
14252
  var _props$checkedIcon = props.checkedIcon,
14253
- checkedIcon = _props$checkedIcon === void 0 ? defaultCheckedIcon : _props$checkedIcon,
14253
+ checkedIcon = _props$checkedIcon === void 0 ? defaultCheckedIcon$1 : _props$checkedIcon,
14254
14254
  classes = props.classes,
14255
14255
  _props$color = props.color,
14256
14256
  color = _props$color === void 0 ? 'secondary' : _props$color,
14257
14257
  _props$icon = props.icon,
14258
- iconProp = _props$icon === void 0 ? defaultIcon : _props$icon,
14258
+ iconProp = _props$icon === void 0 ? defaultIcon$1 : _props$icon,
14259
14259
  _props$indeterminate = props.indeterminate,
14260
14260
  indeterminate = _props$indeterminate === void 0 ? false : _props$indeterminate,
14261
14261
  _props$indeterminateI = props.indeterminateIcon,
@@ -14287,12 +14287,12 @@
14287
14287
  ref: ref
14288
14288
  }, other));
14289
14289
  });
14290
- var Checkbox$1 = withStyles(styles$i, {
14290
+ var Checkbox$1 = withStyles(styles$k, {
14291
14291
  name: 'MuiCheckbox'
14292
14292
  })(Checkbox);
14293
14293
 
14294
14294
  var SIZE = 44;
14295
- var styles$h = function styles(theme) {
14295
+ var styles$j = function styles(theme) {
14296
14296
  return {
14297
14297
  /* Styles applied to the root element. */
14298
14298
  root: {
@@ -14452,7 +14452,7 @@
14452
14452
  strokeWidth: thickness
14453
14453
  })));
14454
14454
  });
14455
- var CircularProgress$1 = withStyles(styles$h, {
14455
+ var CircularProgress$1 = withStyles(styles$j, {
14456
14456
  name: 'MuiCircularProgress',
14457
14457
  flip: false
14458
14458
  })(CircularProgress);
@@ -14937,7 +14937,7 @@
14937
14937
  }));
14938
14938
  }
14939
14939
 
14940
- var styles$g = {
14940
+ var styles$i = {
14941
14941
  /* Styles applied to the root element. */
14942
14942
  root: {
14943
14943
  zIndex: -1,
@@ -14969,7 +14969,7 @@
14969
14969
  "aria-hidden": true,
14970
14970
  ref: ref
14971
14971
  }, other, {
14972
- style: _extends$4({}, styles$g.root, invisible ? styles$g.invisible : {}, other.style)
14972
+ style: _extends$4({}, styles$i.root, invisible ? styles$i.invisible : {}, other.style)
14973
14973
  })) : null;
14974
14974
  });
14975
14975
  var SimpleBackdrop$1 = SimpleBackdrop;
@@ -14986,7 +14986,7 @@
14986
14986
 
14987
14987
 
14988
14988
  var defaultManager = new ModalManager();
14989
- var styles$f = function styles(theme) {
14989
+ var styles$h = function styles(theme) {
14990
14990
  return {
14991
14991
  /* Styles applied to the root element. */
14992
14992
  root: {
@@ -15187,7 +15187,7 @@
15187
15187
  }
15188
15188
  };
15189
15189
 
15190
- var inlineStyle = styles$f(theme || {
15190
+ var inlineStyle = styles$h(theme || {
15191
15191
  zIndex: zIndex$1
15192
15192
  });
15193
15193
  var childProps = {};
@@ -15226,7 +15226,7 @@
15226
15226
  });
15227
15227
  var Modal$1 = Modal;
15228
15228
 
15229
- var styles$e = function styles(theme) {
15229
+ var styles$g = function styles(theme) {
15230
15230
  return {
15231
15231
  /* Styles applied to the root element. */
15232
15232
  root: {
@@ -15300,7 +15300,7 @@
15300
15300
  ref: ref
15301
15301
  }, other));
15302
15302
  });
15303
- var Divider$1 = withStyles(styles$e, {
15303
+ var Divider$1 = withStyles(styles$g, {
15304
15304
  name: 'MuiDivider'
15305
15305
  })(Divider);
15306
15306
 
@@ -15326,7 +15326,7 @@
15326
15326
  }
15327
15327
 
15328
15328
  var useEnhancedEffect$3 = typeof window !== 'undefined' ? react.exports.useLayoutEffect : react.exports.useEffect;
15329
- var styles$d = {
15329
+ var styles$f = {
15330
15330
  /* Styles applied to the shadow textarea element. */
15331
15331
  shadow: {
15332
15332
  // Visibility needed to hide the extra text area on iPads
@@ -15468,7 +15468,7 @@
15468
15468
  readOnly: true,
15469
15469
  ref: shadowRef,
15470
15470
  tabIndex: -1,
15471
- style: _extends$4({}, styles$d.shadow, style)
15471
+ style: _extends$4({}, styles$f.shadow, style)
15472
15472
  }));
15473
15473
  });
15474
15474
  var TextareaAutosize$1 = TextareaAutosize;
@@ -15494,7 +15494,7 @@
15494
15494
  return obj && (hasValue(obj.value) && obj.value !== '' || SSR && hasValue(obj.defaultValue) && obj.defaultValue !== '');
15495
15495
  } // Determine if an Input is adorned on start.
15496
15496
 
15497
- var styles$c = function styles(theme) {
15497
+ var styles$e = function styles(theme) {
15498
15498
  var light = theme.palette.type === 'light';
15499
15499
  var placeholder = {
15500
15500
  color: 'currentColor',
@@ -15926,11 +15926,11 @@
15926
15926
  startAdornment: startAdornment
15927
15927
  })) : null);
15928
15928
  });
15929
- var InputBase$1 = withStyles(styles$c, {
15929
+ var InputBase$1 = withStyles(styles$e, {
15930
15930
  name: 'MuiInputBase'
15931
15931
  })(InputBase);
15932
15932
 
15933
- var styles$b = function styles(theme) {
15933
+ var styles$d = function styles(theme) {
15934
15934
  return {
15935
15935
  /* Styles applied to the root element. */
15936
15936
  root: {
@@ -16026,7 +16026,7 @@
16026
16026
  className: clsx(classes.label, disabled && classes.disabled)
16027
16027
  }, label));
16028
16028
  });
16029
- var FormControlLabel$1 = withStyles(styles$b, {
16029
+ var FormControlLabel$1 = withStyles(styles$d, {
16030
16030
  name: 'MuiFormControlLabel'
16031
16031
  })(FormControlLabel);
16032
16032
 
@@ -16107,7 +16107,7 @@
16107
16107
  // justifyContent: 'flex-start',
16108
16108
 
16109
16109
 
16110
- var styles$a = function styles(theme) {
16110
+ var styles$c = function styles(theme) {
16111
16111
  return _extends$4({
16112
16112
  /* Styles applied to the root element. */
16113
16113
  root: {},
@@ -16274,7 +16274,7 @@
16274
16274
  ref: ref
16275
16275
  }, other));
16276
16276
  });
16277
- var StyledGrid = withStyles(styles$a, {
16277
+ var StyledGrid = withStyles(styles$c, {
16278
16278
  name: 'MuiGrid'
16279
16279
  })(Grid);
16280
16280
 
@@ -16284,7 +16284,7 @@
16284
16284
  return "scale(".concat(value, ", ").concat(Math.pow(value, 2), ")");
16285
16285
  }
16286
16286
 
16287
- var styles$9 = {
16287
+ var styles$b = {
16288
16288
  entering: {
16289
16289
  opacity: 1,
16290
16290
  transform: getScale(1)
@@ -16446,7 +16446,7 @@
16446
16446
  opacity: 0,
16447
16447
  transform: getScale(0.75),
16448
16448
  visibility: state === 'exited' && !inProp ? 'hidden' : undefined
16449
- }, styles$9[state], style, children.props.style),
16449
+ }, styles$b[state], style, children.props.style),
16450
16450
  ref: handleRef
16451
16451
  }, childProps));
16452
16452
  });
@@ -16454,7 +16454,7 @@
16454
16454
  Grow.muiSupportAuto = true;
16455
16455
  var Grow$1 = Grow;
16456
16456
 
16457
- var styles$8 = function styles(theme) {
16457
+ var styles$a = function styles(theme) {
16458
16458
  return {
16459
16459
  /* Styles applied to the root element. */
16460
16460
  root: {
@@ -16527,11 +16527,11 @@
16527
16527
  }, other));
16528
16528
  });
16529
16529
  Icon.muiName = 'Icon';
16530
- var Icon$1 = withStyles(styles$8, {
16530
+ var Icon$1 = withStyles(styles$a, {
16531
16531
  name: 'MuiIcon'
16532
16532
  })(Icon);
16533
16533
 
16534
- var styles$7 = {
16534
+ var styles$9 = {
16535
16535
  /* Styles applied to the root element. */
16536
16536
  root: {
16537
16537
  display: 'flex',
@@ -16602,7 +16602,7 @@
16602
16602
  color: "textSecondary"
16603
16603
  }, children) : children));
16604
16604
  });
16605
- var InputAdornment$1 = withStyles(styles$7, {
16605
+ var InputAdornment$1 = withStyles(styles$9, {
16606
16606
  name: 'MuiInputAdornment'
16607
16607
  })(InputAdornment);
16608
16608
 
@@ -16614,7 +16614,7 @@
16614
16614
 
16615
16615
  var ListContext$1 = ListContext;
16616
16616
 
16617
- var styles$6 = {
16617
+ var styles$8 = {
16618
16618
  /* Styles applied to the root element. */
16619
16619
  root: {
16620
16620
  listStyle: 'none',
@@ -16662,11 +16662,11 @@
16662
16662
  ref: ref
16663
16663
  }, other), subheader, children));
16664
16664
  });
16665
- var List$1 = withStyles(styles$6, {
16665
+ var List$1 = withStyles(styles$8, {
16666
16666
  name: 'MuiList'
16667
16667
  })(List);
16668
16668
 
16669
- var styles$5 = function styles(theme) {
16669
+ var styles$7 = function styles(theme) {
16670
16670
  return {
16671
16671
  /* Styles applied to the (normally root) `component` element. May be wrapped by a `container`. */
16672
16672
  root: {
@@ -16847,11 +16847,11 @@
16847
16847
  ref: handleRef
16848
16848
  }, componentProps), children));
16849
16849
  });
16850
- var ListItem$1 = withStyles(styles$5, {
16850
+ var ListItem$1 = withStyles(styles$7, {
16851
16851
  name: 'MuiListItem'
16852
16852
  })(ListItem);
16853
16853
 
16854
- var styles$4 = function styles(theme) {
16854
+ var styles$6 = function styles(theme) {
16855
16855
  return {
16856
16856
  /* Styles applied to the root element. */
16857
16857
  root: {
@@ -16882,7 +16882,7 @@
16882
16882
  ref: ref
16883
16883
  }, other));
16884
16884
  });
16885
- var ListItemIcon$1 = withStyles(styles$4, {
16885
+ var ListItemIcon$1 = withStyles(styles$6, {
16886
16886
  name: 'MuiListItemIcon'
16887
16887
  })(ListItemIcon);
16888
16888
 
@@ -16936,7 +16936,7 @@
16936
16936
  return typeof anchorEl === 'function' ? anchorEl() : anchorEl;
16937
16937
  }
16938
16938
 
16939
- var styles$3 = {
16939
+ var styles$5 = {
16940
16940
  /* Styles applied to the root element. */
16941
16941
  root: {},
16942
16942
 
@@ -17196,7 +17196,7 @@
17196
17196
  className: clsx(classes.paper, PaperProps.className)
17197
17197
  }), children)));
17198
17198
  });
17199
- var Popover$1 = withStyles(styles$3, {
17199
+ var Popover$1 = withStyles(styles$5, {
17200
17200
  name: 'MuiPopover'
17201
17201
  })(Popover);
17202
17202
 
@@ -17443,7 +17443,7 @@
17443
17443
  });
17444
17444
  var MenuList$1 = MenuList;
17445
17445
 
17446
- var styles$2 = function styles(theme) {
17446
+ var styles$4 = function styles(theme) {
17447
17447
  return {
17448
17448
  /* Styles applied to the root element. */
17449
17449
  root: _extends$4({}, theme.typography.body1, _defineProperty$1({
@@ -17505,11 +17505,11 @@
17505
17505
  ref: ref
17506
17506
  }, other));
17507
17507
  });
17508
- var MenuItem$1 = withStyles(styles$2, {
17508
+ var MenuItem$1 = withStyles(styles$4, {
17509
17509
  name: 'MuiMenuItem'
17510
17510
  })(MenuItem);
17511
17511
 
17512
- var styles$1 = function styles(theme) {
17512
+ var styles$3 = function styles(theme) {
17513
17513
  return {
17514
17514
  /* Styles applied to the root element. */
17515
17515
  root: {
@@ -17624,11 +17624,11 @@
17624
17624
  }
17625
17625
  })));
17626
17626
  });
17627
- var NotchedOutline$1 = withStyles(styles$1, {
17627
+ var NotchedOutline$1 = withStyles(styles$3, {
17628
17628
  name: 'PrivateNotchedOutline'
17629
17629
  })(NotchedOutline);
17630
17630
 
17631
- var styles = function styles(theme) {
17631
+ var styles$2 = function styles(theme) {
17632
17632
  var borderColor = theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';
17633
17633
  return {
17634
17634
  /* Styles applied to the root element. */
@@ -17769,10 +17769,186 @@
17769
17769
  }, other));
17770
17770
  });
17771
17771
  OutlinedInput.muiName = 'Input';
17772
- var OutlinedInput$1 = withStyles(styles, {
17772
+ var OutlinedInput$1 = withStyles(styles$2, {
17773
17773
  name: 'MuiOutlinedInput'
17774
17774
  })(OutlinedInput);
17775
17775
 
17776
+ /**
17777
+ * @ignore - internal component.
17778
+ */
17779
+
17780
+ var RadioButtonUncheckedIcon = createSvgIcon( /*#__PURE__*/react.exports.createElement("path", {
17781
+ d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
17782
+ }));
17783
+
17784
+ /**
17785
+ * @ignore - internal component.
17786
+ */
17787
+
17788
+ var RadioButtonCheckedIcon = createSvgIcon( /*#__PURE__*/react.exports.createElement("path", {
17789
+ d: "M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"
17790
+ }));
17791
+
17792
+ var styles$1 = function styles(theme) {
17793
+ return {
17794
+ root: {
17795
+ position: 'relative',
17796
+ display: 'flex',
17797
+ '&$checked $layer': {
17798
+ transform: 'scale(1)',
17799
+ transition: theme.transitions.create('transform', {
17800
+ easing: theme.transitions.easing.easeOut,
17801
+ duration: theme.transitions.duration.shortest
17802
+ })
17803
+ }
17804
+ },
17805
+ layer: {
17806
+ left: 0,
17807
+ position: 'absolute',
17808
+ transform: 'scale(0)',
17809
+ transition: theme.transitions.create('transform', {
17810
+ easing: theme.transitions.easing.easeIn,
17811
+ duration: theme.transitions.duration.shortest
17812
+ })
17813
+ },
17814
+ checked: {}
17815
+ };
17816
+ };
17817
+ /**
17818
+ * @ignore - internal component.
17819
+ */
17820
+
17821
+ function RadioButtonIcon(props) {
17822
+ var checked = props.checked,
17823
+ classes = props.classes,
17824
+ fontSize = props.fontSize;
17825
+ return /*#__PURE__*/react.exports.createElement("div", {
17826
+ className: clsx(classes.root, checked && classes.checked)
17827
+ }, /*#__PURE__*/react.exports.createElement(RadioButtonUncheckedIcon, {
17828
+ fontSize: fontSize
17829
+ }), /*#__PURE__*/react.exports.createElement(RadioButtonCheckedIcon, {
17830
+ fontSize: fontSize,
17831
+ className: classes.layer
17832
+ }));
17833
+ }
17834
+ var RadioButtonIcon$1 = withStyles(styles$1, {
17835
+ name: 'PrivateRadioButtonIcon'
17836
+ })(RadioButtonIcon);
17837
+
17838
+ /**
17839
+ * @ignore - internal component.
17840
+ */
17841
+
17842
+ var RadioGroupContext = react.exports.createContext();
17843
+
17844
+ var RadioGroupContext$1 = RadioGroupContext;
17845
+
17846
+ function useRadioGroup() {
17847
+ return react.exports.useContext(RadioGroupContext$1);
17848
+ }
17849
+
17850
+ var styles = function styles(theme) {
17851
+ return {
17852
+ /* Styles applied to the root element. */
17853
+ root: {
17854
+ color: theme.palette.text.secondary
17855
+ },
17856
+
17857
+ /* Pseudo-class applied to the root element if `checked={true}`. */
17858
+ checked: {},
17859
+
17860
+ /* Pseudo-class applied to the root element if `disabled={true}`. */
17861
+ disabled: {},
17862
+
17863
+ /* Styles applied to the root element if `color="primary"`. */
17864
+ colorPrimary: {
17865
+ '&$checked': {
17866
+ color: theme.palette.primary.main,
17867
+ '&:hover': {
17868
+ backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),
17869
+ // Reset on touch devices, it doesn't add specificity
17870
+ '@media (hover: none)': {
17871
+ backgroundColor: 'transparent'
17872
+ }
17873
+ }
17874
+ },
17875
+ '&$disabled': {
17876
+ color: theme.palette.action.disabled
17877
+ }
17878
+ },
17879
+
17880
+ /* Styles applied to the root element if `color="secondary"`. */
17881
+ colorSecondary: {
17882
+ '&$checked': {
17883
+ color: theme.palette.secondary.main,
17884
+ '&:hover': {
17885
+ backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),
17886
+ // Reset on touch devices, it doesn't add specificity
17887
+ '@media (hover: none)': {
17888
+ backgroundColor: 'transparent'
17889
+ }
17890
+ }
17891
+ },
17892
+ '&$disabled': {
17893
+ color: theme.palette.action.disabled
17894
+ }
17895
+ }
17896
+ };
17897
+ };
17898
+ var defaultCheckedIcon = /*#__PURE__*/react.exports.createElement(RadioButtonIcon$1, {
17899
+ checked: true
17900
+ });
17901
+ var defaultIcon = /*#__PURE__*/react.exports.createElement(RadioButtonIcon$1, null);
17902
+ var Radio = /*#__PURE__*/react.exports.forwardRef(function Radio(props, ref) {
17903
+ var checkedProp = props.checked,
17904
+ classes = props.classes,
17905
+ _props$color = props.color,
17906
+ color = _props$color === void 0 ? 'secondary' : _props$color,
17907
+ nameProp = props.name,
17908
+ onChangeProp = props.onChange,
17909
+ _props$size = props.size,
17910
+ size = _props$size === void 0 ? 'medium' : _props$size,
17911
+ other = _objectWithoutProperties(props, ["checked", "classes", "color", "name", "onChange", "size"]);
17912
+
17913
+ var radioGroup = useRadioGroup();
17914
+ var checked = checkedProp;
17915
+ var onChange = createChainedFunction(onChangeProp, radioGroup && radioGroup.onChange);
17916
+ var name = nameProp;
17917
+
17918
+ if (radioGroup) {
17919
+ if (typeof checked === 'undefined') {
17920
+ checked = radioGroup.value === props.value;
17921
+ }
17922
+
17923
+ if (typeof name === 'undefined') {
17924
+ name = radioGroup.name;
17925
+ }
17926
+ }
17927
+
17928
+ return /*#__PURE__*/react.exports.createElement(SwitchBase$1, _extends$4({
17929
+ color: color,
17930
+ type: "radio",
17931
+ icon: /*#__PURE__*/react.exports.cloneElement(defaultIcon, {
17932
+ fontSize: size === 'small' ? 'small' : 'medium'
17933
+ }),
17934
+ checkedIcon: /*#__PURE__*/react.exports.cloneElement(defaultCheckedIcon, {
17935
+ fontSize: size === 'small' ? 'small' : 'medium'
17936
+ }),
17937
+ classes: {
17938
+ root: clsx(classes.root, classes["color".concat(capitalize(color))]),
17939
+ checked: classes.checked,
17940
+ disabled: classes.disabled
17941
+ },
17942
+ name: name,
17943
+ checked: checked,
17944
+ onChange: onChange,
17945
+ ref: ref
17946
+ }, other));
17947
+ });
17948
+ var Radio$1 = withStyles(styles, {
17949
+ name: 'MuiRadio'
17950
+ })(Radio);
17951
+
17776
17952
  function useRect$1() {
17777
17953
  const [node, setNode] = react.exports.useState();
17778
17954
  const [rect, setRect] = react.exports.useState();
@@ -18883,13 +19059,22 @@
18883
19059
  return flatten(elementNbrs);
18884
19060
  }
18885
19061
  function applySelectionsOnPages(pages, elmNumbers) {
19062
+ let clearAllButElmNumbers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
19063
+
18886
19064
  const getNewSelectionState = qState => elmNumbers.length <= 1 && isStateSelected(qState) ? 'A' : 'S';
18887
19065
 
18888
19066
  const matrices = pages.map(page => {
18889
19067
  const qMatrix = page.qMatrix.map(p => {
18890
19068
  const [p0] = p;
18891
19069
  const selectionMatchesElement = elmNumbers.includes(p0.qElemNumber);
18892
- const qState = selectionMatchesElement ? getNewSelectionState(p0.qState) : p0.qState;
19070
+ let qState;
19071
+
19072
+ if (clearAllButElmNumbers) {
19073
+ qState = selectionMatchesElement ? 'S' : 'A';
19074
+ } else {
19075
+ qState = selectionMatchesElement ? getNewSelectionState(p0.qState) : p0.qState;
19076
+ }
19077
+
18893
19078
  return [_objectSpread2(_objectSpread2({}, p0), {}, {
18894
19079
  qState
18895
19080
  }), p.slice(1)];
@@ -18992,7 +19177,8 @@
18992
19177
  rangeSelect = true,
18993
19178
  checkboxes = false,
18994
19179
  selectDisabled,
18995
- doc = document
19180
+ doc = document,
19181
+ isSingleSelect = false
18996
19182
  } = _ref;
18997
19183
  const [instantPages, setInstantPages] = react.exports.useState(pages);
18998
19184
  const [mouseDown, setMouseDown] = react.exports.useState(false);
@@ -19000,10 +19186,7 @@
19000
19186
  const [selected, setSelected] = react.exports.useState([]);
19001
19187
  const [isRangeSelection, setIsRangeSelection] = react.exports.useState(false);
19002
19188
  const [preSelected, setPreSelected] = react.exports.useState([]);
19003
- const elemNumbersOrdered = getElemNumbersFromPages(pages);
19004
-
19005
- const getIsSingleSelect = () => !!(layout && layout.qListObject.qDimensionInfo.qIsOneAndOnlyOne); // Select values for real, by calling the backend.
19006
-
19189
+ const elemNumbersOrdered = getElemNumbersFromPages(pages); // Select values for real, by calling the backend.
19007
19190
 
19008
19191
  const select = async function () {
19009
19192
  let elemNumbers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
@@ -19014,7 +19197,6 @@
19014
19197
  }
19015
19198
 
19016
19199
  setSelectingValues(true);
19017
- const isSingleSelect = getIsSingleSelect();
19018
19200
  const filtered = additive ? elemNumbers.filter(n => !selected.includes(n)) : elemNumbers;
19019
19201
  await selectValues({
19020
19202
  selections,
@@ -19043,6 +19225,8 @@
19043
19225
  const selectManually = function () {
19044
19226
  let elementIds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
19045
19227
  let additive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
19228
+ setIsRangeSelection(false); // range is not supported for manual select
19229
+
19046
19230
  setMouseDown(true);
19047
19231
  preSelect(elementIds, additive || isRangeSelection);
19048
19232
  const p = select(elementIds, additive || isRangeSelection);
@@ -19071,7 +19255,7 @@
19071
19255
  const onMouseUp = react.exports.useCallback(event => {
19072
19256
  const elemNumber = +event.currentTarget.getAttribute('data-n');
19073
19257
 
19074
- if (getIsSingleSelect() || !rangeSelect || !mouseDown || selectingValues || preSelected.length === 1 && preSelected[0] === elemNumber // prevent toggling again on mouseup
19258
+ if (isSingleSelect || !rangeSelect || !mouseDown || selectingValues || preSelected.length === 1 && preSelected[0] === elemNumber // prevent toggling again on mouseup
19075
19259
  ) {
19076
19260
  return;
19077
19261
  }
@@ -19082,9 +19266,10 @@
19082
19266
  // Ensure we end interactions when mouseup happens outside the Listbox.
19083
19267
  setMouseDown(false);
19084
19268
  setSelectingValues(false);
19269
+ setIsRangeSelection(false);
19085
19270
  }, []);
19086
19271
  const onMouseEnter = react.exports.useCallback(event => {
19087
- if (getIsSingleSelect() || !mouseDown || selectingValues || selectDisabled()) {
19272
+ if (isSingleSelect || !mouseDown || selectingValues || selectDisabled()) {
19088
19273
  return;
19089
19274
  }
19090
19275
 
@@ -19124,7 +19309,7 @@
19124
19309
  } // Render pre-selections before they have been selected in Engine.
19125
19310
 
19126
19311
 
19127
- const newPages = applySelectionsOnPages(pages, preSelected);
19312
+ const newPages = applySelectionsOnPages(pages, preSelected, isSingleSelect);
19128
19313
  setInstantPages(newPages);
19129
19314
  }, [preSelected]);
19130
19315
  const interactionEvents = {};
@@ -19167,7 +19352,7 @@
19167
19352
 
19168
19353
  const CheckboxChecked = "url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath" + " fill-rule='evenodd' clip-rule='evenodd' d='M12 5c-.28 0-.53.11-.71.29L7 9.59l-2.29-2.3a1.003 " + "1.003 0 00-1.42 1.42l3 3c.18.18.43.29.71.29s.53-.11.71-.29l5-5A1.003 1.003 0 0012 5z' fill='%23fff'/%3E%3C/svg%3E\")";
19169
19354
 
19170
- const useStyles$c = makeStyles$1(theme => ({
19355
+ const useStyles$d = makeStyles$1(theme => ({
19171
19356
  cbIcon: {
19172
19357
  borderRadius: 3,
19173
19358
  width: 16,
@@ -19204,7 +19389,7 @@
19204
19389
  label,
19205
19390
  dense
19206
19391
  } = _ref;
19207
- const styles = useStyles$c();
19392
+ const styles = useStyles$d();
19208
19393
  return /*#__PURE__*/React.createElement(Checkbox$1, {
19209
19394
  edge: "start",
19210
19395
  checked: checked,
@@ -19291,6 +19476,41 @@
19291
19476
  return labels;
19292
19477
  }
19293
19478
 
19479
+ const useStyles$c = makeStyles$1(() => ({
19480
+ denseRadioButton: {
19481
+ height: '100%',
19482
+ boxSizing: 'border-box',
19483
+ '& svg': {
19484
+ width: '0.7em',
19485
+ height: '0.7em'
19486
+ }
19487
+ },
19488
+ radioButton: {
19489
+ right: '5px'
19490
+ }
19491
+ }));
19492
+ function ListBoxRadioButton(_ref) {
19493
+ let {
19494
+ checked,
19495
+ label,
19496
+ dense
19497
+ } = _ref;
19498
+ const styles = useStyles$c();
19499
+ return /*#__PURE__*/React.createElement(Radio$1, {
19500
+ checked: checked,
19501
+ value: label,
19502
+ name: label,
19503
+ inputProps: {
19504
+ 'aria-labelledby': label
19505
+ },
19506
+ className: dense ? styles.denseRadioButton : styles.radioButton,
19507
+ style: {
19508
+ backgroundColor: 'transparent'
19509
+ },
19510
+ disableRipple: true
19511
+ });
19512
+ }
19513
+
19294
19514
  const KEYS = Object.freeze({
19295
19515
  ENTER: 13,
19296
19516
  ESCAPE: 27,
@@ -19521,6 +19741,7 @@
19521
19741
  checkboxLabel: {
19522
19742
  margin: 0,
19523
19743
  width: '100%',
19744
+ height: '100%',
19524
19745
  // For checkboxes the first child is the checkbox container, second is the label container.
19525
19746
  '& > span:nth-child(2)': _objectSpread2(_objectSpread2({}, ellipsis), {}, {
19526
19747
  display: 'flex',
@@ -19583,6 +19804,7 @@
19583
19804
  color: '#828282'
19584
19805
  }
19585
19806
  }));
19807
+
19586
19808
  function RowColumn(_ref) {
19587
19809
  let {
19588
19810
  index,
@@ -19600,6 +19822,7 @@
19600
19822
  checkboxes = false,
19601
19823
  dense = false,
19602
19824
  frequencyMode = 'N',
19825
+ isSingleSelect,
19603
19826
  actions,
19604
19827
  frequencyMax = '',
19605
19828
  histogram = false,
@@ -19690,6 +19913,11 @@
19690
19913
  checked: isSelected,
19691
19914
  dense: dense
19692
19915
  });
19916
+ const rb = /*#__PURE__*/React.createElement(ListBoxRadioButton, {
19917
+ label: lbl,
19918
+ checked: isSelected,
19919
+ dense: dense
19920
+ });
19693
19921
  const labelTag = typeof lbl === 'string' ? getValueField({
19694
19922
  lbl,
19695
19923
  color,
@@ -19697,7 +19925,7 @@
19697
19925
  }) : lbl;
19698
19926
  return /*#__PURE__*/React.createElement(FormControlLabel$1, {
19699
19927
  color: color,
19700
- control: cb,
19928
+ control: isSingleSelect ? rb : cb,
19701
19929
  className: classes.checkboxLabel,
19702
19930
  label: labelTag,
19703
19931
  key: qElemNumber
@@ -19858,6 +20086,7 @@
19858
20086
  selectDisabled = () => false
19859
20087
  } = _ref2;
19860
20088
  const [layout] = useLayout$1(model);
20089
+ const isSingleSelect = !!(layout && layout.qListObject.qDimensionInfo.qIsOneAndOnlyOne);
19861
20090
  const [pages, setPages] = react.exports.useState(null);
19862
20091
  const [isLoadingData, setIsLoadingData] = react.exports.useState(false);
19863
20092
  const {
@@ -19871,7 +20100,8 @@
19871
20100
  rangeSelect,
19872
20101
  checkboxes,
19873
20102
  selectDisabled,
19874
- doc: document
20103
+ doc: document,
20104
+ isSingleSelect
19875
20105
  });
19876
20106
  const loaderRef = react.exports.useRef(null);
19877
20107
  const local = react.exports.useRef({
@@ -20005,6 +20235,7 @@
20005
20235
  checkboxes,
20006
20236
  dense,
20007
20237
  frequencyMode,
20238
+ isSingleSelect,
20008
20239
  actions: {
20009
20240
  select,
20010
20241
  confirm: () => selections && selections.confirm.call(selections),
@@ -20613,7 +20844,6 @@
20613
20844
  let {
20614
20845
  model,
20615
20846
  keyboard,
20616
- autoFocus = true,
20617
20847
  dense = false
20618
20848
  } = _ref;
20619
20849
  const {
@@ -20647,7 +20877,6 @@
20647
20877
  size: dense ? 'small' : 'normal'
20648
20878
  })),
20649
20879
  className: ['search', classes.root, dense && classes.dense].filter(Boolean).join(' '),
20650
- autoFocus: autoFocus,
20651
20880
  margin: "dense",
20652
20881
  fullWidth: true,
20653
20882
  placeholder: translator.get('Listbox.Search'),
@@ -20655,7 +20884,7 @@
20655
20884
  onChange: onChange,
20656
20885
  onKeyDown: onKeyDown,
20657
20886
  inputProps: {
20658
- tabIndex: !keyboard.enabled || keyboard.active ? 0 : -1
20887
+ tabIndex: keyboard && (!keyboard.enabled || keyboard.active) ? 0 : -1
20659
20888
  }
20660
20889
  });
20661
20890
  }
@@ -22299,7 +22528,19 @@
22299
22528
  break;
22300
22529
  }
22301
22530
 
22302
- const getListdefFrequencyMode = () => histogram && frequencyMode === 'N' ? 'V' : frequencyMode;
22531
+ const getListdefFrequencyMode = () => histogram && frequencyMode === 'N' ? 'V' : frequencyMode; // Hook that will trigger update when used in useEffects.
22532
+ // Modified from: https://medium.com/@teh_builder/ref-objects-inside-useeffect-hooks-eb7c15198780
22533
+
22534
+
22535
+ const useRefWithCallback = () => {
22536
+ const [ref, setInternalRef] = react.exports.useState({});
22537
+ const setRef = react.exports.useCallback(node => {
22538
+ setInternalRef({
22539
+ current: node
22540
+ });
22541
+ }, [setInternalRef]);
22542
+ return [ref, setRef];
22543
+ };
22303
22544
 
22304
22545
  const listdef = _objectSpread2({
22305
22546
  qInfo: {
@@ -22370,10 +22611,10 @@
22370
22611
  keyboardNavigation
22371
22612
  } = react.exports.useContext(InstanceContext);
22372
22613
  const moreAlignTo = react.exports.useRef();
22614
+ const [searchContainer, searchContainerRef] = useRefWithCallback();
22373
22615
  const [layout] = useLayout$1(model);
22374
22616
  const [showToolbar, setShowToolbar] = react.exports.useState(false);
22375
22617
  const [showSearch, setShowSearch] = react.exports.useState(false);
22376
- const [autoFocusSearch, setAutoFocusSearch] = react.exports.useState(focusSearch);
22377
22618
  const [keyboardActive, setKeyboardActive] = react.exports.useState(false);
22378
22619
  const handleKeyDown = getListboxInlineKeyboardNavigation({
22379
22620
  setKeyboardActive
@@ -22401,6 +22642,17 @@
22401
22642
  setShowToolbar(selections.isActive());
22402
22643
  }
22403
22644
  }, [selections]);
22645
+ react.exports.useEffect(() => {
22646
+ if (!searchContainer || !searchContainer.current) {
22647
+ return;
22648
+ } // Focus search field on toggle-show or when focusSearch is true.
22649
+
22650
+
22651
+ if (search && focusSearch || search === 'toggle' && showSearch) {
22652
+ const input = searchContainer.current.querySelector('input');
22653
+ input && input.focus();
22654
+ }
22655
+ }, [searchContainer && searchContainer.current, showSearch, search, focusSearch]);
22404
22656
 
22405
22657
  if (!model || !layout || !translator) {
22406
22658
  return null;
@@ -22420,7 +22672,6 @@
22420
22672
  const onShowSearch = () => {
22421
22673
  const newValue = !showSearch;
22422
22674
  setShowSearch(newValue);
22423
- setAutoFocusSearch(newValue);
22424
22675
  };
22425
22676
 
22426
22677
  const getSearchOrUnlock = () => search === 'toggle' && !hasSelections ? /*#__PURE__*/React.createElement(IconButton$1, {
@@ -22488,10 +22739,10 @@
22488
22739
  onCancel: () => {}
22489
22740
  }
22490
22741
  }))), searchVisible && /*#__PURE__*/React.createElement(Grid$1, {
22491
- item: true
22742
+ item: true,
22743
+ ref: searchContainerRef
22492
22744
  }, /*#__PURE__*/React.createElement(ListBoxSearch, {
22493
22745
  model: model,
22494
- autoFocus: autoFocusSearch,
22495
22746
  dense: dense,
22496
22747
  keyboard: keyboard
22497
22748
  })), /*#__PURE__*/React.createElement(Grid$1, {
@@ -22919,7 +23170,7 @@
22919
23170
  dataContainer = dataContainer[step];
22920
23171
  }
22921
23172
 
22922
- if (typeof value !== 'undefined') {
23173
+ if (typeof value !== 'undefined' && propertyName !== '__proto__' && propertyName !== 'constructor') {
22923
23174
  dataContainer[propertyName] = value;
22924
23175
  } else {
22925
23176
  delete dataContainer[propertyName];
@@ -29919,7 +30170,7 @@
29919
30170
  */
29920
30171
 
29921
30172
  /**
29922
- * @typedef { false | true | 'toggle' } SearchMode
30173
+ * @typedef { boolean | 'toggle' } SearchMode
29923
30174
  */
29924
30175
 
29925
30176
  /**