@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/CHANGELOG.md CHANGED
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.9.0-beta.2] - 2026-04-08
11
+
12
+ ### Changed
13
+
14
+ - errorContent prop renamed to errorComponent
15
+
16
+ ## Removed
17
+
18
+ - default value using prop types in DefaultError component
19
+
10
20
  ## [1.9.0-beta.1] - 2026-04-08
11
21
 
12
22
  ### Added
package/dist/index.esm.js CHANGED
@@ -9518,21 +9518,16 @@ var styled$6 = {
9518
9518
  };
9519
9519
 
9520
9520
  var DefaultError = function DefaultError(_ref) {
9521
- var message = _ref.message;
9521
+ var _ref$message = _ref.message,
9522
+ message = _ref$message === void 0 ? 'Something went wrong' : _ref$message;
9522
9523
  return /*#__PURE__*/React__default.createElement(styled$6.Wrapper, null, /*#__PURE__*/React__default.createElement(styled$6.Icon, {
9523
9524
  name: "exclamation_circle",
9524
9525
  color: "statusRed"
9525
9526
  }), /*#__PURE__*/React__default.createElement(styled$6.Message, null, message));
9526
9527
  };
9527
9528
 
9528
- DefaultError.defaultProps = {
9529
- message: 'Something went wrong'
9530
- };
9531
-
9532
- /** Class boundary: React has no hook equivalent to componentDidCatch / getDerivedStateFromError; a functional wrapper may be evaluated later (JMV-4037). */
9533
-
9534
- var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
9535
- _inherits$2(ErrorBoundary, _React$Component);
9529
+ var ErrorBoundary = /*#__PURE__*/function (_React$PureComponent) {
9530
+ _inherits$2(ErrorBoundary, _React$PureComponent);
9536
9531
 
9537
9532
  var _super = _createSuper(ErrorBoundary);
9538
9533
 
@@ -9559,8 +9554,8 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
9559
9554
  value: function render() {
9560
9555
  var _this$props = this.props,
9561
9556
  children = _this$props.children,
9562
- _this$props$errorCont = _this$props.errorContent,
9563
- errorContent = _this$props$errorCont === void 0 ? /*#__PURE__*/React__default.createElement(DefaultError, null) : _this$props$errorCont,
9557
+ _this$props$errorComp = _this$props.errorComponent,
9558
+ errorComponent = _this$props$errorComp === void 0 ? /*#__PURE__*/React__default.createElement(DefaultError, null) : _this$props$errorComp,
9564
9559
  message = _this$props.message;
9565
9560
  if (!children) return null;
9566
9561
 
@@ -9568,7 +9563,7 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
9568
9563
  // You can render any custom fallback UI
9569
9564
  return message ? /*#__PURE__*/React__default.createElement(DefaultError, {
9570
9565
  message: message
9571
- }) : errorContent;
9566
+ }) : errorComponent;
9572
9567
  }
9573
9568
 
9574
9569
  return children;
@@ -9584,7 +9579,7 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
9584
9579
  }]);
9585
9580
 
9586
9581
  return ErrorBoundary;
9587
- }(React__default.Component);
9582
+ }(React__default.PureComponent);
9588
9583
 
9589
9584
  /**
9590
9585
  * Depending of the given value returns a height measure