@janiscommerce/ui-web 1.9.0-beta.1 → 1.9.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -9544,21 +9544,16 @@
9544
9544
  };
9545
9545
 
9546
9546
  var DefaultError = function DefaultError(_ref) {
9547
- var message = _ref.message;
9547
+ var _ref$message = _ref.message,
9548
+ message = _ref$message === void 0 ? 'Something went wrong' : _ref$message;
9548
9549
  return /*#__PURE__*/React__default["default"].createElement(styled$6.Wrapper, null, /*#__PURE__*/React__default["default"].createElement(styled$6.Icon, {
9549
9550
  name: "exclamation_circle",
9550
9551
  color: "statusRed"
9551
9552
  }), /*#__PURE__*/React__default["default"].createElement(styled$6.Message, null, message));
9552
9553
  };
9553
9554
 
9554
- DefaultError.defaultProps = {
9555
- message: 'Something went wrong'
9556
- };
9557
-
9558
- /** Class boundary: React has no hook equivalent to componentDidCatch / getDerivedStateFromError; a functional wrapper may be evaluated later (JMV-4037). */
9559
-
9560
- var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
9561
- _inherits$2(ErrorBoundary, _React$Component);
9555
+ var ErrorBoundary = /*#__PURE__*/function (_React$PureComponent) {
9556
+ _inherits$2(ErrorBoundary, _React$PureComponent);
9562
9557
 
9563
9558
  var _super = _createSuper(ErrorBoundary);
9564
9559
 
@@ -9585,8 +9580,8 @@
9585
9580
  value: function render() {
9586
9581
  var _this$props = this.props,
9587
9582
  children = _this$props.children,
9588
- _this$props$errorCont = _this$props.errorContent,
9589
- errorContent = _this$props$errorCont === void 0 ? /*#__PURE__*/React__default["default"].createElement(DefaultError, null) : _this$props$errorCont,
9583
+ _this$props$errorComp = _this$props.errorComponent,
9584
+ errorComponent = _this$props$errorComp === void 0 ? /*#__PURE__*/React__default["default"].createElement(DefaultError, null) : _this$props$errorComp,
9590
9585
  message = _this$props.message;
9591
9586
  if (!children) return null;
9592
9587
 
@@ -9594,7 +9589,7 @@
9594
9589
  // You can render any custom fallback UI
9595
9590
  return message ? /*#__PURE__*/React__default["default"].createElement(DefaultError, {
9596
9591
  message: message
9597
- }) : errorContent;
9592
+ }) : errorComponent;
9598
9593
  }
9599
9594
 
9600
9595
  return children;
@@ -9610,7 +9605,7 @@
9610
9605
  }]);
9611
9606
 
9612
9607
  return ErrorBoundary;
9613
- }(React__default["default"].Component);
9608
+ }(React__default["default"].PureComponent);
9614
9609
 
9615
9610
  /**
9616
9611
  * Depending of the given value returns a height measure