grommet 2.33.1 → 2.33.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.
Files changed (89) hide show
  1. package/components/Anchor/Anchor.js +2 -2
  2. package/components/Anchor/StyledAnchor.js +6 -6
  3. package/components/Box/Box.js +1 -1
  4. package/components/Button/Button.js +8 -8
  5. package/components/Button/StyledButtonKind.js +5 -5
  6. package/components/Calendar/Calendar.js +3 -3
  7. package/components/CheckBox/StyledCheckBox.js +8 -8
  8. package/components/Data/DataForm.js +15 -10
  9. package/components/Data/stories/Infinite.js +2 -2
  10. package/components/Data/stories/SpaceX.js +1 -1
  11. package/components/Data/stories/StarWars.js +1 -1
  12. package/components/DataChart/DataChart.js +4 -4
  13. package/components/DataChart/Detail.js +1 -1
  14. package/components/DataFilter/DataFilter.js +3 -3
  15. package/components/DataTable/Header.js +1 -1
  16. package/components/DataTable/buildState.js +8 -8
  17. package/components/DateInput/DateInput.js +1 -1
  18. package/components/DateInput/utils.js +2 -2
  19. package/components/Drop/DropContainer.js +2 -2
  20. package/components/FileInput/utils/formatBytes.js +2 -2
  21. package/components/FormField/FormField.js +1 -1
  22. package/components/Header/Header.js +4 -4
  23. package/components/Layer/Layer.js +4 -2
  24. package/components/List/List.js +5 -5
  25. package/components/MaskedInput/MaskedInput.js +2 -1
  26. package/components/Menu/Menu.js +7 -3
  27. package/components/NameValueList/NameValueList.js +2 -2
  28. package/components/NameValuePair/NameValuePair.js +2 -2
  29. package/components/Notification/Notification.js +3 -3
  30. package/components/RangeInput/StyledRangeInput.js +4 -4
  31. package/components/Select/EmptySearchOption.js +3 -3
  32. package/components/Select/StyledSelect.js +4 -4
  33. package/components/SelectMultiple/SelectMultiple.js +4 -4
  34. package/components/SelectMultiple/SelectMultipleContainer.js +1 -1
  35. package/components/Skeleton/Skeleton.js +1 -1
  36. package/components/Skeleton/StyledSkeleton.js +2 -2
  37. package/components/Tag/Tag.js +5 -5
  38. package/components/TextArea/StyledTextArea.js +1 -1
  39. package/components/ThumbsRating/ThumbsRating.js +6 -6
  40. package/components/Video/Video.js +2 -2
  41. package/contexts/AnalyticsContext/AnalyticsContext.js +2 -2
  42. package/es6/components/Anchor/Anchor.js +2 -2
  43. package/es6/components/Anchor/StyledAnchor.js +6 -6
  44. package/es6/components/Box/Box.js +1 -1
  45. package/es6/components/Button/Button.js +8 -8
  46. package/es6/components/Button/StyledButtonKind.js +5 -5
  47. package/es6/components/Calendar/Calendar.js +3 -3
  48. package/es6/components/CheckBox/StyledCheckBox.js +8 -8
  49. package/es6/components/Data/DataForm.js +15 -10
  50. package/es6/components/Data/stories/Infinite.js +2 -2
  51. package/es6/components/Data/stories/SpaceX.js +1 -1
  52. package/es6/components/Data/stories/StarWars.js +1 -1
  53. package/es6/components/DataChart/DataChart.js +4 -4
  54. package/es6/components/DataChart/Detail.js +1 -1
  55. package/es6/components/DataFilter/DataFilter.js +3 -3
  56. package/es6/components/DataTable/Header.js +1 -1
  57. package/es6/components/DataTable/buildState.js +8 -8
  58. package/es6/components/DateInput/DateInput.js +1 -1
  59. package/es6/components/DateInput/utils.js +2 -2
  60. package/es6/components/Drop/DropContainer.js +2 -2
  61. package/es6/components/FileInput/utils/formatBytes.js +2 -2
  62. package/es6/components/FormField/FormField.js +1 -1
  63. package/es6/components/Header/Header.js +4 -4
  64. package/es6/components/Layer/Layer.js +4 -2
  65. package/es6/components/List/List.js +5 -5
  66. package/es6/components/MaskedInput/MaskedInput.js +2 -1
  67. package/es6/components/Menu/Menu.js +7 -3
  68. package/es6/components/NameValueList/NameValueList.js +2 -2
  69. package/es6/components/NameValuePair/NameValuePair.js +2 -2
  70. package/es6/components/Notification/Notification.js +3 -3
  71. package/es6/components/RangeInput/StyledRangeInput.js +4 -4
  72. package/es6/components/Select/EmptySearchOption.js +3 -3
  73. package/es6/components/Select/StyledSelect.js +4 -4
  74. package/es6/components/SelectMultiple/SelectMultiple.js +4 -4
  75. package/es6/components/SelectMultiple/SelectMultipleContainer.js +1 -1
  76. package/es6/components/Skeleton/Skeleton.js +1 -1
  77. package/es6/components/Skeleton/StyledSkeleton.js +2 -2
  78. package/es6/components/Tag/Tag.js +5 -5
  79. package/es6/components/TextArea/StyledTextArea.js +1 -1
  80. package/es6/components/ThumbsRating/ThumbsRating.js +6 -6
  81. package/es6/components/Video/Video.js +2 -2
  82. package/es6/contexts/AnalyticsContext/AnalyticsContext.js +2 -2
  83. package/es6/utils/background.js +4 -4
  84. package/es6/utils/styles.js +2 -2
  85. package/grommet.min.js +1 -1
  86. package/grommet.min.js.map +1 -1
  87. package/package.json +22 -22
  88. package/utils/background.js +4 -4
  89. package/utils/styles.js +2 -2
@@ -56,7 +56,7 @@ var NotificationAnchor = (0, _styledComponents["default"])(_Anchor.Anchor).withC
56
56
  componentId: "sc-1yq09yz-0"
57
57
  })(["white-space:nowrap;"]);
58
58
  var Notification = function Notification(_ref) {
59
- var _theme$notification, _theme$notification2, _theme$notification2$, _theme$notification2$2, _theme$notification3, _theme$notification3$, _theme$notification4, _theme$notification4$, _theme$notification4$2, _theme$notification5, _theme$notification5$;
59
+ var _theme$notification, _theme$notification2, _theme$notification3, _theme$notification4, _theme$notification5;
60
60
  var actionsProp = _ref.actions,
61
61
  messageProp = _ref.message,
62
62
  onClose = _ref.onClose,
@@ -102,7 +102,7 @@ var Notification = function Notification(_ref) {
102
102
  var direction;
103
103
  if (kind && theme.notification[kind].direction) direction = theme.notification[kind].direction;else direction = theme.notification.direction;
104
104
  var background;
105
- if (kind && (_theme$notification2 = theme.notification) != null && (_theme$notification2$ = _theme$notification2[status]) != null && (_theme$notification2$2 = _theme$notification2$[kind]) != null && _theme$notification2$2.background) background = theme.notification[status][kind].background;else if ((_theme$notification3 = theme.notification) != null && (_theme$notification3$ = _theme$notification3[status]) != null && _theme$notification3$.background) background = theme.notification[status].background;else background = ((_theme$notification4 = theme.notification) == null ? void 0 : (_theme$notification4$ = _theme$notification4[kind]) == null ? void 0 : (_theme$notification4$2 = _theme$notification4$.container) == null ? void 0 : _theme$notification4$2.background) || theme.notification.container.background;
105
+ if (kind && (_theme$notification2 = theme.notification) != null && (_theme$notification2 = _theme$notification2[status]) != null && (_theme$notification2 = _theme$notification2[kind]) != null && _theme$notification2.background) background = theme.notification[status][kind].background;else if ((_theme$notification3 = theme.notification) != null && (_theme$notification3 = _theme$notification3[status]) != null && _theme$notification3.background) background = theme.notification[status].background;else background = ((_theme$notification4 = theme.notification) == null || (_theme$notification4 = _theme$notification4[kind]) == null || (_theme$notification4 = _theme$notification4.container) == null ? void 0 : _theme$notification4.background) || theme.notification.container.background;
106
106
  var TextWrapper = direction === 'row' ? _Text.Text : _react.Fragment;
107
107
 
108
108
  // notification is built with two child boxes that contain:
@@ -139,7 +139,7 @@ var Notification = function Notification(_ref) {
139
139
  right: 'xsmall'
140
140
  }
141
141
  }, message), actions) : message;
142
- var iconDimension = ((_theme$notification5 = theme.notification) == null ? void 0 : (_theme$notification5$ = _theme$notification5.message) == null ? void 0 : _theme$notification5$.size) || 'medium';
142
+ var iconDimension = ((_theme$notification5 = theme.notification) == null || (_theme$notification5 = _theme$notification5.message) == null ? void 0 : _theme$notification5.size) || 'medium';
143
143
  var content = /*#__PURE__*/_react["default"].createElement(_Box.Box, _extends({}, theme.notification.container, global ? _extends({}, theme.notification.global.container) : {}, toast ? _extends({}, theme.notification.toast.container) : {}, {
144
144
  background: background
145
145
  // let internal box control pad
@@ -86,8 +86,8 @@ var rangeTrackStyle = (0, _styledComponents.css)(["box-sizing:border-box;width:1
86
86
  }, function (props) {
87
87
  return props.theme.rangeInput && props.theme.rangeInput.track && props.theme.rangeInput.track.extend;
88
88
  }, function (props) {
89
- var _props$theme, _props$theme$rangeInp4;
90
- return props.disabled && ((_props$theme = props.theme) == null ? void 0 : (_props$theme$rangeInp4 = _props$theme.rangeInput) == null ? void 0 : _props$theme$rangeInp4.disabled) && disabledRangeInputStyle(props, 'track');
89
+ var _props$theme;
90
+ return props.disabled && ((_props$theme = props.theme) == null || (_props$theme = _props$theme.rangeInput) == null ? void 0 : _props$theme.disabled) && disabledRangeInputStyle(props, 'track');
91
91
  });
92
92
  var rangeThumbStyle = (0, _styledComponents.css)(["box-sizing:border-box;position:relative;border-radius:", ";height:", ";width:", ";overflow:visible;background:", ";-webkit-appearance:none;cursor:pointer;", " ", ";"], function (props) {
93
93
  return props.theme.global.spacing;
@@ -100,8 +100,8 @@ var rangeThumbStyle = (0, _styledComponents.css)(["box-sizing:border-box;positio
100
100
  }, function (props) {
101
101
  return props.theme.rangeInput && props.theme.rangeInput.thumb && props.theme.rangeInput.thumb.extend;
102
102
  }, function (props) {
103
- var _props$theme2, _props$theme2$rangeIn;
104
- return props.disabled && ((_props$theme2 = props.theme) == null ? void 0 : (_props$theme2$rangeIn = _props$theme2.rangeInput) == null ? void 0 : _props$theme2$rangeIn.disabled) && disabledRangeInputStyle(props, 'thumb');
103
+ var _props$theme2;
104
+ return props.disabled && ((_props$theme2 = props.theme) == null || (_props$theme2 = _props$theme2.rangeInput) == null ? void 0 : _props$theme2.disabled) && disabledRangeInputStyle(props, 'thumb');
105
105
  });
106
106
  var firefoxMicrosoftThumbStyle = (0, _styledComponents.css)(["", " margin-top:0px;height:", ";width:", ";", " ", ""], rangeThumbStyle, function (props) {
107
107
  return props.theme.global.spacing;
@@ -8,13 +8,13 @@ var _Text = require("../Text");
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9
9
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
10
10
  var EmptySearchOption = function EmptySearchOption(_ref) {
11
- var _theme$select, _theme$select$emptySe, _theme$select2, _theme$select2$emptyS, _theme$select3, _theme$select3$option;
11
+ var _theme$select, _theme$select2, _theme$select3;
12
12
  var emptySearchMessage = _ref.emptySearchMessage,
13
13
  selectOptionsStyle = _ref.selectOptionsStyle,
14
14
  theme = _ref.theme;
15
- return /*#__PURE__*/_react["default"].createElement(_Box.Box, (theme == null ? void 0 : (_theme$select = theme.select) == null ? void 0 : (_theme$select$emptySe = _theme$select.emptySearchMessage) == null ? void 0 : _theme$select$emptySe.container) || selectOptionsStyle, /*#__PURE__*/_react["default"].createElement(_Text.Text, _extends({
15
+ return /*#__PURE__*/_react["default"].createElement(_Box.Box, (theme == null || (_theme$select = theme.select) == null || (_theme$select = _theme$select.emptySearchMessage) == null ? void 0 : _theme$select.container) || selectOptionsStyle, /*#__PURE__*/_react["default"].createElement(_Text.Text, _extends({
16
16
  "aria-live": "polite",
17
17
  role: "alert"
18
- }, (theme == null ? void 0 : (_theme$select2 = theme.select) == null ? void 0 : (_theme$select2$emptyS = _theme$select2.emptySearchMessage) == null ? void 0 : _theme$select2$emptyS.text) || ((_theme$select3 = theme.select) == null ? void 0 : (_theme$select3$option = _theme$select3.options) == null ? void 0 : _theme$select3$option.text)), emptySearchMessage));
18
+ }, (theme == null || (_theme$select2 = theme.select) == null || (_theme$select2 = _theme$select2.emptySearchMessage) == null ? void 0 : _theme$select2.text) || ((_theme$select3 = theme.select) == null || (_theme$select3 = _theme$select3.options) == null ? void 0 : _theme$select3.text)), emptySearchMessage));
19
19
  };
20
20
  exports.EmptySearchOption = EmptySearchOption;
@@ -55,10 +55,10 @@ var StyledSelectDropButton = (0, _styledComponents["default"])(_DropButton.DropB
55
55
  })(["", ";", ";", ";"], function (props) {
56
56
  return !props.plainSelect && _utils.controlBorderStyle;
57
57
  }, function (props) {
58
- var _props$theme$select, _props$theme$select$c;
59
- return (_props$theme$select = props.theme.select) == null ? void 0 : (_props$theme$select$c = _props$theme$select.control) == null ? void 0 : _props$theme$select$c.extend;
58
+ var _props$theme$select;
59
+ return (_props$theme$select = props.theme.select) == null || (_props$theme$select = _props$theme$select.control) == null ? void 0 : _props$theme$select.extend;
60
60
  }, function (props) {
61
- var _props$theme$select2, _props$theme$select2$;
62
- return props.open && ((_props$theme$select2 = props.theme.select) == null ? void 0 : (_props$theme$select2$ = _props$theme$select2.control) == null ? void 0 : _props$theme$select2$.open);
61
+ var _props$theme$select2;
62
+ return props.open && ((_props$theme$select2 = props.theme.select) == null || (_props$theme$select2 = _props$theme$select2.control) == null ? void 0 : _props$theme$select2.open);
63
63
  });
64
64
  exports.StyledSelectDropButton = StyledSelectDropButton;
@@ -28,11 +28,11 @@ var StyledSelectBox = (0, _styledComponents["default"])(_Box.Box).withConfig({
28
28
  })(["", ";", ";", ";"], function (props) {
29
29
  return !props.plainSelect && _utils.controlBorderStyle;
30
30
  }, function (props) {
31
- var _props$theme$select, _props$theme$select$c;
32
- return (_props$theme$select = props.theme.select) == null ? void 0 : (_props$theme$select$c = _props$theme$select.control) == null ? void 0 : _props$theme$select$c.extend;
31
+ var _props$theme$select;
32
+ return (_props$theme$select = props.theme.select) == null || (_props$theme$select = _props$theme$select.control) == null ? void 0 : _props$theme$select.extend;
33
33
  }, function (props) {
34
- var _props$theme$select$c2;
35
- return props.open && ((_props$theme$select$c2 = props.theme.select.control) == null ? void 0 : _props$theme$select$c2.open);
34
+ var _props$theme$select$c;
35
+ return props.open && ((_props$theme$select$c = props.theme.select.control) == null ? void 0 : _props$theme$select$c.open);
36
36
  });
37
37
  _StyledSelect.StyledSelectDropButton.defaultProps = {};
38
38
  Object.setPrototypeOf(_StyledSelect.StyledSelectDropButton.defaultProps, _defaultProps.defaultProps);
@@ -326,7 +326,7 @@ var SelectMultipleContainer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref
326
326
  onMouseMove: function onMouseMove() {
327
327
  return setKeyboardNavigation(false);
328
328
  },
329
- "aria-activedescendant": optionsRef == null ? void 0 : (_optionsRef$current = optionsRef.current) == null ? void 0 : _optionsRef$current.children[activeIndex]
329
+ "aria-activedescendant": optionsRef == null || (_optionsRef$current = optionsRef.current) == null ? void 0 : _optionsRef$current.children[activeIndex]
330
330
  }, /*#__PURE__*/_react["default"].createElement(_InfiniteScroll.InfiniteScroll, {
331
331
  items: options,
332
332
  step: theme.select.step,
@@ -23,7 +23,7 @@ var Skeleton = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
23
23
  var theme = (0, _react.useContext)(_styledComponents.ThemeContext) || _defaultProps.defaultProps.theme;
24
24
  var skeleton = (0, _SkeletonContext.useSkeleton)();
25
25
  var depth = (skeleton == null ? void 0 : skeleton.depth) || 0;
26
- var colors = colorsProp || (theme == null ? void 0 : (_theme$skeleton = theme.skeleton) == null ? void 0 : _theme$skeleton.colors);
26
+ var colors = colorsProp || (theme == null || (_theme$skeleton = theme.skeleton) == null ? void 0 : _theme$skeleton.colors);
27
27
  var themeColors = colors[theme.dark ? 'dark' : 'light'];
28
28
  var background = themeColors[(depth + 1) % themeColors.length];
29
29
  return /*#__PURE__*/_react["default"].createElement(_StyledSkeleton.StyledSkeleton, _extends({
@@ -14,8 +14,8 @@ var StyledSkeleton = _styledComponents["default"].div.withConfig({
14
14
  })(["display:flex;box-sizing:border-box;", " ", " ", " ", " ", " ", ""], _utils.genericStyles, function (props) {
15
15
  return props.background && (0, _utils.backgroundStyle)(props.background, props.theme);
16
16
  }, function (props) {
17
- var _props$theme$text, _props$theme$text$med;
18
- return (0, _utils.heightStyle)(props.heightProp || ((_props$theme$text = props.theme.text) == null ? void 0 : (_props$theme$text$med = _props$theme$text.medium) == null ? void 0 : _props$theme$text$med.height), props.theme);
17
+ var _props$theme$text;
18
+ return (0, _utils.heightStyle)(props.heightProp || ((_props$theme$text = props.theme.text) == null || (_props$theme$text = _props$theme$text.medium) == null ? void 0 : _props$theme$text.height), props.theme);
19
19
  }, function (props) {
20
20
  return (0, _utils.widthStyle)(props.widthProp || '100%', props.theme);
21
21
  }, function (props) {
@@ -16,7 +16,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
16
16
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
17
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
18
18
  var Tag = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
19
- var _theme$tag$size, _theme$tag$size$size, _theme$tag$size2, _theme$tag$size2$size, _theme$tag$size3, _theme$tag$size3$size, _theme$tag$size4, _theme$tag$size4$size;
19
+ var _theme$tag$size, _theme$tag$size2, _theme$tag$size3, _theme$tag$size4;
20
20
  var name = _ref.name,
21
21
  value = _ref.value,
22
22
  size = _ref.size,
@@ -29,13 +29,13 @@ var Tag = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
29
29
  align: 'center',
30
30
  background: theme.tag.background,
31
31
  border: theme.tag.border,
32
- round: ((_theme$tag$size = theme.tag.size) == null ? void 0 : (_theme$tag$size$size = _theme$tag$size[size]) == null ? void 0 : _theme$tag$size$size.round) || theme.tag.round
32
+ round: ((_theme$tag$size = theme.tag.size) == null || (_theme$tag$size = _theme$tag$size[size]) == null ? void 0 : _theme$tag$size.round) || theme.tag.round
33
33
  }, rest);
34
34
  var contents = /*#__PURE__*/_react["default"].createElement(_Box.Box, {
35
35
  width: {
36
36
  min: 'min-content'
37
37
  },
38
- pad: ((_theme$tag$size2 = theme.tag.size) == null ? void 0 : (_theme$tag$size2$size = _theme$tag$size2[size]) == null ? void 0 : _theme$tag$size2$size.pad) || theme.tag.pad
38
+ pad: ((_theme$tag$size2 = theme.tag.size) == null || (_theme$tag$size2 = _theme$tag$size2[size]) == null ? void 0 : _theme$tag$size2.pad) || theme.tag.pad
39
39
  }, /*#__PURE__*/_react["default"].createElement(_Text.Text, {
40
40
  size: size
41
41
  }, name && /*#__PURE__*/_react["default"].createElement(_Text.Text, _extends({}, theme.tag.name, {
@@ -59,8 +59,8 @@ var Tag = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
59
59
  plain: true,
60
60
  hoverIndicator: true,
61
61
  focusIndicator: true,
62
- icon: /*#__PURE__*/_react["default"].createElement(_FormClose.FormClose, (_theme$tag$size3 = theme.tag.size) == null ? void 0 : (_theme$tag$size3$size = _theme$tag$size3[size]) == null ? void 0 : _theme$tag$size3$size.icon),
63
- round: ((_theme$tag$size4 = theme.tag.size) == null ? void 0 : (_theme$tag$size4$size = _theme$tag$size4[size]) == null ? void 0 : _theme$tag$size4$size.round) || theme.tag.round
62
+ icon: /*#__PURE__*/_react["default"].createElement(_FormClose.FormClose, (_theme$tag$size3 = theme.tag.size) == null || (_theme$tag$size3 = _theme$tag$size3[size]) == null ? void 0 : _theme$tag$size3.icon),
63
+ round: ((_theme$tag$size4 = theme.tag.size) == null || (_theme$tag$size4 = _theme$tag$size4[size]) == null ? void 0 : _theme$tag$size4.round) || theme.tag.round
64
64
  }, theme.tag.remove))) : /*#__PURE__*/_react["default"].createElement(_StyledTag.StyledTagButton, _extends({
65
65
  flex: false,
66
66
  plain: true,
@@ -23,7 +23,7 @@ var resizeStyle = function resizeStyle(resize) {
23
23
  var StyledTextArea = _styledComponents["default"].textarea.withConfig({
24
24
  displayName: "StyledTextArea",
25
25
  componentId: "sc-17i3mwp-0"
26
- })(["", " ", " ", " ", " ", " ", ";"], _utils.inputStyle, function (props) {
26
+ })(["", " ", " ", " ", " ", " ", ";max-width:100%;"], _utils.inputStyle, function (props) {
27
27
  return props.resize !== undefined && resizeStyle(props.resize);
28
28
  }, function (props) {
29
29
  return props.fillArg && 'height: 100%;';
@@ -20,20 +20,20 @@ var ThumbsRating = function ThumbsRating(_ref) {
20
20
  direction: "row",
21
21
  options: ['like', 'dislike']
22
22
  }, rest), function (option, _ref2) {
23
- var _theme$thumbsRating3, _theme$thumbsRating3$, _theme$thumbsRating4, _theme$thumbsRating4$;
23
+ var _theme$thumbsRating3, _theme$thumbsRating4;
24
24
  var checked = _ref2.checked;
25
25
  if (option === 'like') {
26
- var _theme$thumbsRating, _theme$thumbsRating$l, _theme$thumbsRating2, _theme$thumbsRating2$;
26
+ var _theme$thumbsRating, _theme$thumbsRating2;
27
27
  return checked ? /*#__PURE__*/_react["default"].createElement(_LikeFill.LikeFill, {
28
- color: (_theme$thumbsRating = theme.thumbsRating) == null ? void 0 : (_theme$thumbsRating$l = _theme$thumbsRating.like) == null ? void 0 : _theme$thumbsRating$l.color
28
+ color: (_theme$thumbsRating = theme.thumbsRating) == null || (_theme$thumbsRating = _theme$thumbsRating.like) == null ? void 0 : _theme$thumbsRating.color
29
29
  }) : /*#__PURE__*/_react["default"].createElement(_Like.Like, {
30
- color: (_theme$thumbsRating2 = theme.thumbsRating) == null ? void 0 : (_theme$thumbsRating2$ = _theme$thumbsRating2.like) == null ? void 0 : _theme$thumbsRating2$.color
30
+ color: (_theme$thumbsRating2 = theme.thumbsRating) == null || (_theme$thumbsRating2 = _theme$thumbsRating2.like) == null ? void 0 : _theme$thumbsRating2.color
31
31
  });
32
32
  }
33
33
  return checked ? /*#__PURE__*/_react["default"].createElement(_DislikeFill.DislikeFill, {
34
- color: (_theme$thumbsRating3 = theme.thumbsRating) == null ? void 0 : (_theme$thumbsRating3$ = _theme$thumbsRating3.dislike) == null ? void 0 : _theme$thumbsRating3$.color
34
+ color: (_theme$thumbsRating3 = theme.thumbsRating) == null || (_theme$thumbsRating3 = _theme$thumbsRating3.dislike) == null ? void 0 : _theme$thumbsRating3.color
35
35
  }) : /*#__PURE__*/_react["default"].createElement(_Dislike.Dislike, {
36
- color: (_theme$thumbsRating4 = theme.thumbsRating) == null ? void 0 : (_theme$thumbsRating4$ = _theme$thumbsRating4.dislike) == null ? void 0 : _theme$thumbsRating4$.color
36
+ color: (_theme$thumbsRating4 = theme.thumbsRating) == null || (_theme$thumbsRating4 = _theme$thumbsRating4.dislike) == null ? void 0 : _theme$thumbsRating4.color
37
37
  });
38
38
  });
39
39
  };
@@ -185,9 +185,9 @@ var Video = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
185
185
  var nextActiveTrack;
186
186
  for (var j = 0; j < track.cues.length; j += 1) {
187
187
  var _track$cues$j, _track$cues$j2;
188
- if (currentVideoTime > (track == null ? void 0 : (_track$cues$j = track.cues[j]) == null ? void 0 : _track$cues$j.startTime) && currentVideoTime < (track == null ? void 0 : (_track$cues$j2 = track.cues[j]) == null ? void 0 : _track$cues$j2.endTime)) {
188
+ if (currentVideoTime > (track == null || (_track$cues$j = track.cues[j]) == null ? void 0 : _track$cues$j.startTime) && currentVideoTime < (track == null || (_track$cues$j2 = track.cues[j]) == null ? void 0 : _track$cues$j2.endTime)) {
189
189
  var _track$cues$j3;
190
- nextActiveTrack = track == null ? void 0 : (_track$cues$j3 = track.cues[j]) == null ? void 0 : _track$cues$j3.text;
190
+ nextActiveTrack = track == null || (_track$cues$j3 = track.cues[j]) == null ? void 0 : _track$cues$j3.text;
191
191
  }
192
192
  }
193
193
  return nextActiveTrack;
@@ -22,8 +22,8 @@ var AnalyticsProvider = function AnalyticsProvider(_ref) {
22
22
  var observer;
23
23
  if (onAnalytics) {
24
24
  observer = new window.MutationObserver(function () {
25
- var _window, _window$location;
26
- var url = (_window = window) == null ? void 0 : (_window$location = _window.location) == null ? void 0 : _window$location.href;
25
+ var _window;
26
+ var url = (_window = window) == null || (_window = _window.location) == null ? void 0 : _window.href;
27
27
  var previousUrl = lastUrlRef.current;
28
28
  if (url !== previousUrl) {
29
29
  lastUrlRef.current = url;
@@ -50,9 +50,9 @@ var Anchor = /*#__PURE__*/forwardRef(function (_ref, ref) {
50
50
  }, [children, icon, label]);
51
51
  var coloredIcon = icon;
52
52
  if (icon && !icon.props.color) {
53
- var _theme$anchor, _theme$anchor$size, _theme$anchor$size2;
53
+ var _theme$anchor;
54
54
  coloredIcon = /*#__PURE__*/cloneElement(icon, {
55
- color: normalizeColor(color || ((_theme$anchor = theme.anchor) == null ? void 0 : (_theme$anchor$size = _theme$anchor.size) == null ? void 0 : (_theme$anchor$size2 = _theme$anchor$size[sizeProp || size]) == null ? void 0 : _theme$anchor$size2.color) || theme.anchor.color, theme)
55
+ color: normalizeColor(color || ((_theme$anchor = theme.anchor) == null || (_theme$anchor = _theme$anchor.size) == null || (_theme$anchor = _theme$anchor[sizeProp || size]) == null ? void 0 : _theme$anchor.color) || theme.anchor.color, theme)
56
56
  });
57
57
  }
58
58
  var anchorIcon = useSizedIcon(coloredIcon, sizeProp || size, theme);
@@ -22,14 +22,14 @@ var StyledAnchor = styled.a.withConfig({
22
22
  })(["box-sizing:border-box;", " color:", ";", " text-decoration:", ";cursor:pointer;", " ", " ", " ", " ", " ", ""], function (props) {
23
23
  return sizeStyle(props);
24
24
  }, function (props) {
25
- var _props$theme$anchor, _props$theme$anchor$s, _props$theme$anchor$s2;
26
- return normalizeColor(props.colorProp || ((_props$theme$anchor = props.theme.anchor) == null ? void 0 : (_props$theme$anchor$s = _props$theme$anchor.size) == null ? void 0 : (_props$theme$anchor$s2 = _props$theme$anchor$s[props.size]) == null ? void 0 : _props$theme$anchor$s2.color) || props.theme.anchor.color, props.theme);
25
+ var _props$theme$anchor;
26
+ return normalizeColor(props.colorProp || ((_props$theme$anchor = props.theme.anchor) == null || (_props$theme$anchor = _props$theme$anchor.size) == null || (_props$theme$anchor = _props$theme$anchor[props.size]) == null ? void 0 : _props$theme$anchor.color) || props.theme.anchor.color, props.theme);
27
27
  }, function (props) {
28
- var _props$theme$anchor2, _props$theme$anchor2$, _props$theme$anchor2$2, _props$theme$anchor3, _props$theme$anchor3$, _props$theme$anchor3$2;
29
- return props.weight ? "font-weight: " + props.weight + ";" : (((_props$theme$anchor2 = props.theme.anchor) == null ? void 0 : (_props$theme$anchor2$ = _props$theme$anchor2.size) == null ? void 0 : (_props$theme$anchor2$2 = _props$theme$anchor2$[props.size]) == null ? void 0 : _props$theme$anchor2$2.fontWeight) || props.theme.anchor.fontWeight) && "font-weight: " + (((_props$theme$anchor3 = props.theme.anchor) == null ? void 0 : (_props$theme$anchor3$ = _props$theme$anchor3.size) == null ? void 0 : (_props$theme$anchor3$2 = _props$theme$anchor3$[props.size]) == null ? void 0 : _props$theme$anchor3$2.fontWeight) || props.theme.anchor.fontWeight) + ";";
28
+ var _props$theme$anchor2, _props$theme$anchor3;
29
+ return props.weight ? "font-weight: " + props.weight + ";" : (((_props$theme$anchor2 = props.theme.anchor) == null || (_props$theme$anchor2 = _props$theme$anchor2.size) == null || (_props$theme$anchor2 = _props$theme$anchor2[props.size]) == null ? void 0 : _props$theme$anchor2.fontWeight) || props.theme.anchor.fontWeight) && "font-weight: " + (((_props$theme$anchor3 = props.theme.anchor) == null || (_props$theme$anchor3 = _props$theme$anchor3.size) == null || (_props$theme$anchor3 = _props$theme$anchor3[props.size]) == null ? void 0 : _props$theme$anchor3.fontWeight) || props.theme.anchor.fontWeight) + ";";
30
30
  }, function (props) {
31
- var _props$theme$anchor4, _props$theme$anchor4$, _props$theme$anchor4$2;
32
- return props.hasIcon ? 'none' : ((_props$theme$anchor4 = props.theme.anchor) == null ? void 0 : (_props$theme$anchor4$ = _props$theme$anchor4.size) == null ? void 0 : (_props$theme$anchor4$2 = _props$theme$anchor4$[props.size]) == null ? void 0 : _props$theme$anchor4$2.textDecoration) || props.theme.anchor.textDecoration;
31
+ var _props$theme$anchor4;
32
+ return props.hasIcon ? 'none' : ((_props$theme$anchor4 = props.theme.anchor) == null || (_props$theme$anchor4 = _props$theme$anchor4.size) == null || (_props$theme$anchor4 = _props$theme$anchor4[props.size]) == null ? void 0 : _props$theme$anchor4.textDecoration) || props.theme.anchor.textDecoration;
33
33
  }, genericStyles, function (props) {
34
34
  return !props.disabled && props.theme.anchor.hover && css(["&:hover{", " ", " ", "}"], props.theme.anchor.hover.textDecoration && "text-decoration: " + props.theme.anchor.hover.textDecoration + ";", props.theme.anchor.hover.fontWeight && "font-weight: " + props.theme.anchor.hover.fontWeight + ";", props.theme.anchor.hover.extend);
35
35
  }, function (props) {
@@ -51,7 +51,7 @@ var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
51
51
  if (skeletonProp != null && (_skeletonProp$message = skeletonProp.message) != null && _skeletonProp$message.start) announce(skeletonProp.message.start);else if (typeof (skeletonProp == null ? void 0 : skeletonProp.message) === 'string') announce(skeletonProp.message);
52
52
  return function () {
53
53
  var _skeletonProp$message2;
54
- return (skeletonProp == null ? void 0 : (_skeletonProp$message2 = skeletonProp.message) == null ? void 0 : _skeletonProp$message2.end) && announce(skeletonProp.message.end);
54
+ return (skeletonProp == null || (_skeletonProp$message2 = skeletonProp.message) == null ? void 0 : _skeletonProp$message2.end) && announce(skeletonProp.message.end);
55
55
  };
56
56
  }, [announce, skeletonProp]);
57
57
  var focusable = useMemo(function () {
@@ -64,7 +64,7 @@ var getIconColor = function getIconColor(paths, theme, colorProp, kind) {
64
64
  while (obj && parts.length) obj = obj[parts.shift()];
65
65
  }
66
66
  if (obj) {
67
- var _obj, _obj$icon, _obj$icon$props;
67
+ var _obj;
68
68
  // use passed in color for background if the theme has a background color
69
69
  var background = colorProp && obj.background && obj.background.color ? colorProp : obj.background;
70
70
 
@@ -72,14 +72,14 @@ var getIconColor = function getIconColor(paths, theme, colorProp, kind) {
72
72
  // to indicate that the theme doesn't want any text color
73
73
  var objColor = obj.color || (Object.prototype.hasOwnProperty.call(obj, 'color') && obj.color === undefined ? false : undefined);
74
74
  var color = void 0;
75
- if ((_obj = obj) != null && (_obj$icon = _obj.icon) != null && (_obj$icon$props = _obj$icon.props) != null && _obj$icon$props.color) color = obj.icon.props.color;
75
+ if ((_obj = obj) != null && (_obj = _obj.icon) != null && (_obj = _obj.props) != null && _obj.color) color = obj.icon.props.color;
76
76
  // if no icon defined for this state, see if there is an icon
77
77
  // with color defined at one higher level
78
78
  else if (paths[index + 1]) {
79
- var _obj2, _obj2$icon, _obj2$icon$props;
79
+ var _obj2;
80
80
  var _parts = paths[index + 1].split('.');
81
81
  while (baseObj && _parts.length) obj = baseObj[_parts.shift()];
82
- if ((_obj2 = obj) != null && (_obj2$icon = _obj2.icon) != null && (_obj2$icon$props = _obj2$icon.props) != null && _obj2$icon$props.color) color = obj.icon.props.color;
82
+ if ((_obj2 = obj) != null && (_obj2 = _obj2.icon) != null && (_obj2 = _obj2.props) != null && _obj2.color) color = obj.icon.props.color;
83
83
  }
84
84
  // use passed in color for text if the theme doesn't have
85
85
  // background or border color
@@ -139,7 +139,7 @@ var getPropertyColor = function getPropertyColor(property, paths, theme, kind, p
139
139
  return result;
140
140
  };
141
141
  var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
142
- var _theme$button$kind, _theme$button2, _theme$button2$badge;
142
+ var _theme$button$kind, _theme$button2;
143
143
  var active = _ref.active,
144
144
  _ref$align = _ref.align,
145
145
  align = _ref$align === void 0 ? 'center' : _ref$align,
@@ -327,9 +327,9 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
327
327
  var second = reverse ? buttonIcon : label;
328
328
  var contents;
329
329
  if (first && second) {
330
- var _theme$button, _theme$button$kind2;
330
+ var _theme$button;
331
331
  contents = /*#__PURE__*/React.createElement(Box, {
332
- direction: ((_theme$button = theme.button) == null ? void 0 : (_theme$button$kind2 = _theme$button[kind]) == null ? void 0 : _theme$button$kind2.direction) || 'row',
332
+ direction: ((_theme$button = theme.button) == null || (_theme$button = _theme$button[kind]) == null ? void 0 : _theme$button.direction) || 'row',
333
333
  align: "center",
334
334
  justify: justify || (align === 'center' ? 'center' : 'between'),
335
335
  gap: gap || theme.button.gap,
@@ -351,7 +351,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
351
351
  // (!kind && icon && !label) is necessary because for old button logic,
352
352
  // if button has icon but not label, it will be considered "plain",
353
353
  // so no border or background will be applied
354
- var innerBadge = ((_theme$button2 = theme.button) == null ? void 0 : (_theme$button2$badge = _theme$button2.badge) == null ? void 0 : _theme$button2$badge.align) !== 'container' && (!background && !border || !kind && icon && !label);
354
+ var innerBadge = ((_theme$button2 = theme.button) == null || (_theme$button2 = _theme$button2.badge) == null ? void 0 : _theme$button2.align) !== 'container' && (!background && !border || !kind && icon && !label);
355
355
  if (badgeProp && innerBadge) {
356
356
  contents = /*#__PURE__*/React.createElement(Badge, {
357
357
  content: badgeProp
@@ -16,19 +16,19 @@ var fontStyle = function fontStyle(props) {
16
16
  return css(["font-size:", ";line-height:", ";"], data.size, props.hasIcon && !props.hasLabel ? 0 : data.height);
17
17
  };
18
18
  var padFromTheme = function padFromTheme(size, theme, themeObj, kind, iconOnly) {
19
- var _themeObj$size, _themeObj$size$size, _themeObj$size$size$i, _themeObj$size3, _themeObj$size3$size, _themeObj$size3$size$;
19
+ var _themeObj$size, _themeObj$size3;
20
20
  if (size === void 0) {
21
21
  size = 'medium';
22
22
  }
23
- if (size && iconOnly && themeObj != null && (_themeObj$size = themeObj.size) != null && (_themeObj$size$size = _themeObj$size[size]) != null && (_themeObj$size$size$i = _themeObj$size$size.iconOnly) != null && _themeObj$size$size$i.pad) {
24
- var _themeObj$size2, _themeObj$size2$size, _themeObj$size2$size$;
25
- var pad = themeObj == null ? void 0 : (_themeObj$size2 = themeObj.size) == null ? void 0 : (_themeObj$size2$size = _themeObj$size2[size]) == null ? void 0 : (_themeObj$size2$size$ = _themeObj$size2$size.iconOnly) == null ? void 0 : _themeObj$size2$size$.pad;
23
+ if (size && iconOnly && themeObj != null && (_themeObj$size = themeObj.size) != null && (_themeObj$size = _themeObj$size[size]) != null && (_themeObj$size = _themeObj$size.iconOnly) != null && _themeObj$size.pad) {
24
+ var _themeObj$size2;
25
+ var pad = themeObj == null || (_themeObj$size2 = themeObj.size) == null || (_themeObj$size2 = _themeObj$size2[size]) == null || (_themeObj$size2 = _themeObj$size2.iconOnly) == null ? void 0 : _themeObj$size2.pad;
26
26
  return {
27
27
  vertical: typeof pad === 'string' ? pad : pad.vertical,
28
28
  horizontal: typeof pad === 'string' ? pad : pad.horizontal
29
29
  };
30
30
  }
31
- if (size && themeObj != null && (_themeObj$size3 = themeObj.size) != null && (_themeObj$size3$size = _themeObj$size3[size]) != null && (_themeObj$size3$size$ = _themeObj$size3$size[kind]) != null && _themeObj$size3$size$.pad) {
31
+ if (size && themeObj != null && (_themeObj$size3 = themeObj.size) != null && (_themeObj$size3 = _themeObj$size3[size]) != null && (_themeObj$size3 = _themeObj$size3[kind]) != null && _themeObj$size3.pad) {
32
32
  return themeObj.size[size][kind].pad;
33
33
  }
34
34
  if (size && themeObj.size && themeObj.size[size] && themeObj.size[size].pad) {
@@ -426,14 +426,14 @@ var Calendar = /*#__PURE__*/forwardRef(function (_ref3, ref) {
426
426
  }));
427
427
  };
428
428
  var handleRange = useCallback(function (selectedDate) {
429
- var _priorRange$, _priorRange$$, _priorRange$2, _priorRange$2$;
429
+ var _priorRange$, _priorRange$2;
430
430
  var result;
431
431
  var priorRange = normalizeRange(value, activeDate);
432
432
  // deselect when date clicked was the start/end of the range
433
- if (selectedDate.getTime() === (priorRange == null ? void 0 : (_priorRange$ = priorRange[0]) == null ? void 0 : (_priorRange$$ = _priorRange$[0]) == null ? void 0 : _priorRange$$.getTime())) {
433
+ if (selectedDate.getTime() === (priorRange == null || (_priorRange$ = priorRange[0]) == null || (_priorRange$ = _priorRange$[0]) == null ? void 0 : _priorRange$.getTime())) {
434
434
  result = [[undefined, priorRange[0][1]]];
435
435
  setActiveDate('start');
436
- } else if (selectedDate.getTime() === (priorRange == null ? void 0 : (_priorRange$2 = priorRange[0]) == null ? void 0 : (_priorRange$2$ = _priorRange$2[1]) == null ? void 0 : _priorRange$2$.getTime())) {
436
+ } else if (selectedDate.getTime() === (priorRange == null || (_priorRange$2 = priorRange[0]) == null || (_priorRange$2 = _priorRange$2[1]) == null ? void 0 : _priorRange$2.getTime())) {
437
437
  result = [[priorRange[0][0], undefined]];
438
438
  setActiveDate('end');
439
439
  }
@@ -10,14 +10,14 @@ var fillStyle = function fillStyle() {
10
10
  };
11
11
  var disabledStyle = "\n opacity: 0.5;\n cursor: default;\n";
12
12
  var hoverStyle = css([":hover input:not([disabled]) + div,:hover input:not([disabled]) + span{border-color:", ";", "}:hover{background-color:", ";}"], function (props) {
13
- var _props$theme$checkBox, _props$theme$checkBox2;
14
- return normalizeColor((_props$theme$checkBox = props.theme.checkBox.hover) == null ? void 0 : (_props$theme$checkBox2 = _props$theme$checkBox.border) == null ? void 0 : _props$theme$checkBox2.color, props.theme);
13
+ var _props$theme$checkBox;
14
+ return normalizeColor((_props$theme$checkBox = props.theme.checkBox.hover) == null || (_props$theme$checkBox = _props$theme$checkBox.border) == null ? void 0 : _props$theme$checkBox.color, props.theme);
15
15
  }, function (props) {
16
- var _props$theme$checkBox3;
17
- return (_props$theme$checkBox3 = props.theme.checkBox.hover) == null ? void 0 : _props$theme$checkBox3.extend;
16
+ var _props$theme$checkBox2;
17
+ return (_props$theme$checkBox2 = props.theme.checkBox.hover) == null ? void 0 : _props$theme$checkBox2.extend;
18
18
  }, function (props) {
19
- var _props$theme$checkBox4, _props$theme$checkBox5;
20
- return normalizeColor(!props.disabled && ((_props$theme$checkBox4 = props.theme.checkBox.hover) == null ? void 0 : (_props$theme$checkBox5 = _props$theme$checkBox4.background) == null ? void 0 : _props$theme$checkBox5.color), props.theme);
19
+ var _props$theme$checkBox3;
20
+ return normalizeColor(!props.disabled && ((_props$theme$checkBox3 = props.theme.checkBox.hover) == null || (_props$theme$checkBox3 = _props$theme$checkBox3.background) == null ? void 0 : _props$theme$checkBox3.color), props.theme);
21
21
  });
22
22
  var StyledCheckBoxIcon = styled.svg.withConfig({
23
23
  displayName: "StyledCheckBox__StyledCheckBoxIcon",
@@ -49,8 +49,8 @@ var StyledCheckBoxContainer = styled.label.withConfig({
49
49
  }, function (props) {
50
50
  return !props.disabled && 'cursor: pointer;';
51
51
  }, hoverStyle, function (props) {
52
- var _props$theme$checkBox6, _props$theme$checkBox7, _props$theme$checkBox8, _props$theme$checkBox9;
53
- return props.focus && !props.focusIndicator && "\n input:not([disabled]) + div,\n input:not([disabled]) + span {\n border-color: " + normalizeColor((_props$theme$checkBox6 = props.theme.checkBox.hover) == null ? void 0 : (_props$theme$checkBox7 = _props$theme$checkBox6.border) == null ? void 0 : _props$theme$checkBox7.color, props.theme) + ";\n }\n\n background-color: " + normalizeColor(!props.disabled && ((_props$theme$checkBox8 = props.theme.checkBox.hover) == null ? void 0 : (_props$theme$checkBox9 = _props$theme$checkBox8.background) == null ? void 0 : _props$theme$checkBox9.color), props.theme) + ";";
52
+ var _props$theme$checkBox4, _props$theme$checkBox5;
53
+ return props.focus && !props.focusIndicator && "\n input:not([disabled]) + div,\n input:not([disabled]) + span {\n border-color: " + normalizeColor((_props$theme$checkBox4 = props.theme.checkBox.hover) == null || (_props$theme$checkBox4 = _props$theme$checkBox4.border) == null ? void 0 : _props$theme$checkBox4.color, props.theme) + ";\n }\n\n background-color: " + normalizeColor(!props.disabled && ((_props$theme$checkBox5 = props.theme.checkBox.hover) == null || (_props$theme$checkBox5 = _props$theme$checkBox5.background) == null ? void 0 : _props$theme$checkBox5.color), props.theme) + ";";
54
54
  }, function (props) {
55
55
  return props.theme.checkBox.extend;
56
56
  });
@@ -48,18 +48,23 @@ var viewFormKeyMap = {
48
48
  view: formViewNameKey
49
49
  };
50
50
 
51
- // flatten nested objects. For example: { a: { b: v } } -> { 'a.b': v }
51
+ // flatten nested objects.
52
+ // For example: { a: { b: v, c: z } } -> { 'a.b': v, 'a.c': z }
52
53
  var flatten = function flatten(formValue, options) {
53
54
  var result = JSON.parse(JSON.stringify(formValue));
54
- Object.keys(result).forEach(function (k) {
55
- var name = k;
56
- // flatten one level at a time, ignore _range situations
57
- while (typeof result[name] === 'object' && !Array.isArray(result[name]) && (options != null && options.full || !result[name][formRangeKey])) {
58
- var subPath = Object.keys(result[name])[0];
59
- var path = name + "." + subPath;
60
- result[path] = result[name][subPath];
61
- delete result[name];
62
- name = path;
55
+ Object.keys(result).forEach(function (i) {
56
+ // We check the type of the i using
57
+ // typeof() function and recursively
58
+ // call the function again
59
+ // ignore _range situations
60
+ if (typeof result[i] === 'object' && !Array.isArray(result[i]) && (options != null && options.full || !result[i][formRangeKey])) {
61
+ var temp = flatten(result[i]);
62
+ Object.keys(temp).forEach(function (j) {
63
+ // Store temp in result
64
+ // ignore empty arrays
65
+ if (!Array.isArray(temp[j]) || Array.isArray(temp[j]) && temp[j].length) result[i + "." + j] = temp[j];
66
+ });
67
+ delete result[i];
63
68
  }
64
69
  });
65
70
  return result;
@@ -37,7 +37,7 @@ var fetchLaunches = /*#__PURE__*/function () {
37
37
  while (1) switch (_context.prev = _context.next) {
38
38
  case 0:
39
39
  query = buildQuery(view);
40
- sort = (_sort = {}, _sort[(view == null ? void 0 : (_view$sort = view.sort) == null ? void 0 : _view$sort.property) || 'name'] = (view == null ? void 0 : (_view$sort2 = view.sort) == null ? void 0 : _view$sort2.direction) || 'asc', _sort);
40
+ sort = (_sort = {}, _sort[(view == null || (_view$sort = view.sort) == null ? void 0 : _view$sort.property) || 'name'] = (view == null || (_view$sort2 = view.sort) == null ? void 0 : _view$sort2.direction) || 'asc', _sort);
41
41
  body = {
42
42
  options: {
43
43
  populate: [{
@@ -188,7 +188,7 @@ export var Table = function Table() {
188
188
  });
189
189
  }, [search, limit, sort, view.properties]);
190
190
  var numberItems = (data == null ? void 0 : data.totalDocs) || 0;
191
- var rocketOptions = (rockets == null ? void 0 : (_rockets$docs = rockets.docs) == null ? void 0 : _rockets$docs.map(function (_ref4) {
191
+ var rocketOptions = (rockets == null || (_rockets$docs = rockets.docs) == null ? void 0 : _rockets$docs.map(function (_ref4) {
192
192
  var name = _ref4.name,
193
193
  id = _ref4.id;
194
194
  return {
@@ -36,7 +36,7 @@ var fetchLaunches = /*#__PURE__*/function () {
36
36
  while (1) switch (_context.prev = _context.next) {
37
37
  case 0:
38
38
  query = buildQuery(view);
39
- sort = (_sort = {}, _sort[(view == null ? void 0 : (_view$sort = view.sort) == null ? void 0 : _view$sort.property) || 'name'] = (view == null ? void 0 : (_view$sort2 = view.sort) == null ? void 0 : _view$sort2.direction) || 'asc', _sort);
39
+ sort = (_sort = {}, _sort[(view == null || (_view$sort = view.sort) == null ? void 0 : _view$sort.property) || 'name'] = (view == null || (_view$sort2 = view.sort) == null ? void 0 : _view$sort2.direction) || 'asc', _sort);
40
40
  body = {
41
41
  options: {
42
42
  populate: [{
@@ -59,7 +59,7 @@ export var StarWars = function StarWars() {
59
59
  useEffect(function () {
60
60
  var _abortRef$current;
61
61
  // This API is a bit slow, abort any uncompleted requests.
62
- abortRef == null ? void 0 : (_abortRef$current = abortRef.current) == null ? void 0 : _abortRef$current.abort();
62
+ abortRef == null || (_abortRef$current = abortRef.current) == null ? void 0 : _abortRef$current.abort();
63
63
  abortRef.current = new AbortController();
64
64
  fetchData(view, abortRef.current.signal).then(function (_ref2) {
65
65
  var count = _ref2.count,
@@ -299,9 +299,9 @@ var DataChart = /*#__PURE__*/forwardRef(function (_ref, ref) {
299
299
  var chartBounds = chartValues.map(function (_, index) {
300
300
  var type = charts[index].type;
301
301
  if (stackedChartType[type]) {
302
- var _chartValues$index, _chartValues$index$;
302
+ var _chartValues$index;
303
303
  // merge values for bars, areas, and lines cases
304
- var mergedValues = ((_chartValues$index = chartValues[index]) == null ? void 0 : (_chartValues$index$ = _chartValues$index[0]) == null ? void 0 : _chartValues$index$.slice(0)) || [];
304
+ var mergedValues = ((_chartValues$index = chartValues[index]) == null || (_chartValues$index = _chartValues$index[0]) == null ? void 0 : _chartValues$index.slice(0)) || [];
305
305
  chartValues[index].slice(1) // skip first index as that is the x value
306
306
  .filter(function (values) {
307
307
  return values;
@@ -549,7 +549,7 @@ var DataChart = /*#__PURE__*/forwardRef(function (_ref, ref) {
549
549
 
550
550
  var xAxisElement = axis && axis.x && (chartProps.length || boundsProp != null && boundsProp.x) ? /*#__PURE__*/React.createElement(XAxis, {
551
551
  axis: axis,
552
- values: (boundsProp == null ? void 0 : (_boundsProp$x = boundsProp.x) == null ? void 0 : _boundsProp$x.slice(0)) || (Array.isArray(chartProps[0]) ? chartProps[0][0] : chartProps[0]).axis.x,
552
+ values: (boundsProp == null || (_boundsProp$x = boundsProp.x) == null ? void 0 : _boundsProp$x.slice(0)) || (Array.isArray(chartProps[0]) ? chartProps[0][0] : chartProps[0]).axis.x,
553
553
  pad: !horizontal && offsetPad ? _extends({}, pad, {
554
554
  end: offsetPad
555
555
  }) : pad,
@@ -563,7 +563,7 @@ var DataChart = /*#__PURE__*/forwardRef(function (_ref, ref) {
563
563
  }) : null;
564
564
  var yAxisElement = axis && axis.y && (chartProps.length || boundsProp != null && boundsProp.y) ? /*#__PURE__*/React.createElement(YAxis, {
565
565
  axis: axis,
566
- values: (boundsProp == null ? void 0 : (_boundsProp$y = boundsProp.y) == null ? void 0 : _boundsProp$y.slice(0).reverse()) || (Array.isArray(chartProps[0]) ? chartProps[0][0] : chartProps[0]).axis.y,
566
+ values: (boundsProp == null || (_boundsProp$y = boundsProp.y) == null ? void 0 : _boundsProp$y.slice(0).reverse()) || (Array.isArray(chartProps[0]) ? chartProps[0][0] : chartProps[0]).axis.y,
567
567
  pad: horizontal && offsetPad ? _extends({}, pad, {
568
568
  bottom: offsetPad
569
569
  }) : pad,
@@ -148,7 +148,7 @@ var Detail = function Detail(_ref) {
148
148
  }, series.filter(function (_ref2) {
149
149
  var _data$detailIndex;
150
150
  var property = _ref2.property;
151
- return (!activeProperty || activeProperty === property) && (data == null ? void 0 : (_data$detailIndex = data[detailIndex]) == null ? void 0 : _data$detailIndex[property]) !== undefined || axis && axis.x && axis.x.property === property;
151
+ return (!activeProperty || activeProperty === property) && (data == null || (_data$detailIndex = data[detailIndex]) == null ? void 0 : _data$detailIndex[property]) !== undefined || axis && axis.x && axis.x.property === property;
152
152
  }).map(function (serie) {
153
153
  var propertyStyle = seriesStyles[serie.property];
154
154
  var axisValue = horizontalProp ? data[detailIndex][serie.property] : detailIndex;
@@ -65,8 +65,8 @@ export var DataFilter = function DataFilter(_ref) {
65
65
  var _properties$property, _properties$property2;
66
66
  if (children) return [undefined, undefined]; // caller driving
67
67
 
68
- var optionsIn = optionsProp || (properties == null ? void 0 : (_properties$property = properties[property]) == null ? void 0 : _properties$property.options);
69
- var rangeIn = rangeProp || (properties == null ? void 0 : (_properties$property2 = properties[property]) == null ? void 0 : _properties$property2.range);
68
+ var optionsIn = optionsProp || (properties == null || (_properties$property = properties[property]) == null ? void 0 : _properties$property.options);
69
+ var rangeIn = rangeProp || (properties == null || (_properties$property2 = properties[property]) == null ? void 0 : _properties$property2.range);
70
70
  if (optionsIn) return [optionsIn, undefined];
71
71
  if (rangeIn) return [undefined, [rangeIn.min, rangeIn.max]];
72
72
 
@@ -153,7 +153,7 @@ export var DataFilter = function DataFilter(_ref) {
153
153
  }, content);else content = /*#__PURE__*/React.createElement(FormField, _extends({
154
154
  htmlFor: id,
155
155
  name: property,
156
- label: (properties == null ? void 0 : (_properties$property3 = properties[property]) == null ? void 0 : _properties$property3.label) || property
156
+ label: (properties == null || (_properties$property3 = properties[property]) == null ? void 0 : _properties$property3.label) || property
157
157
  }, rest), content);
158
158
  return content;
159
159
  };
@@ -175,7 +175,7 @@ var Header = /*#__PURE__*/forwardRef(function (_ref2, ref) {
175
175
  return !disabled.includes(v) || selected.includes(v);
176
176
  }) : primaryValues;
177
177
  nextGroupSelected[''] = 'all';
178
- groupBy == null ? void 0 : (_groupBy$expandable = groupBy.expandable) == null ? void 0 : _groupBy$expandable.forEach(function (key) {
178
+ groupBy == null || (_groupBy$expandable = groupBy.expandable) == null ? void 0 : _groupBy$expandable.forEach(function (key) {
179
179
  nextGroupSelected[key] = 'all';
180
180
  });
181
181
  }