@janiscommerce/ui-web 1.9.0-beta.1 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -1
- package/dist/index.esm.js +8 -13
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +8 -13
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,7 +7,7 @@ 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
|
|
10
|
+
## [1.9.0] - 2026-04-14
|
|
11
11
|
|
|
12
12
|
### Added
|
|
13
13
|
|
|
@@ -16,6 +16,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
16
16
|
### Changed
|
|
17
17
|
|
|
18
18
|
- ErrorBoundary component to consolidate it and use it from outside
|
|
19
|
+
- errorContent prop renamed to errorComponent
|
|
20
|
+
|
|
21
|
+
### Removed
|
|
22
|
+
|
|
23
|
+
- default value using prop types in DefaultError component
|
|
19
24
|
|
|
20
25
|
## [1.8.0] - 2026-02-03
|
|
21
26
|
|
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
|
-
|
|
9529
|
-
|
|
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$
|
|
9563
|
-
|
|
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
|
-
}) :
|
|
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.
|
|
9582
|
+
}(React__default.PureComponent);
|
|
9588
9583
|
|
|
9589
9584
|
/**
|
|
9590
9585
|
* Depending of the given value returns a height measure
|