@janiscommerce/ui-web 1.8.0 → 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 +20 -0
- package/dist/index.esm.js +14 -16
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +14 -16
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,26 @@ 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
|
+
|
|
20
|
+
## [1.9.0-beta.1] - 2026-04-08
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- ErrorBoundary component story
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- ErrorBoundary component to consolidate it and use it from outside
|
|
29
|
+
|
|
10
30
|
## [1.8.0] - 2026-02-03
|
|
11
31
|
|
|
12
32
|
### Added:
|
package/dist/index.esm.js
CHANGED
|
@@ -9510,26 +9510,24 @@ var styled$6 = {
|
|
|
9510
9510
|
Icon: styled$j(Icon).withConfig({
|
|
9511
9511
|
displayName: "styles__Icon",
|
|
9512
9512
|
componentId: "sc-3jodl7-1"
|
|
9513
|
-
})(["margin-right:6px;flex-shrink:0;"])
|
|
9513
|
+
})(["margin-right:6px;flex-shrink:0;"]),
|
|
9514
|
+
Message: styled$j.span.withConfig({
|
|
9515
|
+
displayName: "styles__Message",
|
|
9516
|
+
componentId: "sc-3jodl7-2"
|
|
9517
|
+
})(["color:", ";font-size:", ";font-family:", ";"], palette.statusRed, typography.size.baseSmall, typography.fontFamily)
|
|
9514
9518
|
};
|
|
9515
9519
|
|
|
9516
9520
|
var DefaultError = function DefaultError(_ref) {
|
|
9517
|
-
var message = _ref.message
|
|
9521
|
+
var _ref$message = _ref.message,
|
|
9522
|
+
message = _ref$message === void 0 ? 'Something went wrong' : _ref$message;
|
|
9518
9523
|
return /*#__PURE__*/React__default.createElement(styled$6.Wrapper, null, /*#__PURE__*/React__default.createElement(styled$6.Icon, {
|
|
9519
9524
|
name: "exclamation_circle",
|
|
9520
9525
|
color: "statusRed"
|
|
9521
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
9522
|
-
color: "statusRed",
|
|
9523
|
-
fontSize: "baseSmall"
|
|
9524
|
-
}, message));
|
|
9526
|
+
}), /*#__PURE__*/React__default.createElement(styled$6.Message, null, message));
|
|
9525
9527
|
};
|
|
9526
9528
|
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
};
|
|
9530
|
-
|
|
9531
|
-
var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
9532
|
-
_inherits$2(ErrorBoundary, _React$Component);
|
|
9529
|
+
var ErrorBoundary = /*#__PURE__*/function (_React$PureComponent) {
|
|
9530
|
+
_inherits$2(ErrorBoundary, _React$PureComponent);
|
|
9533
9531
|
|
|
9534
9532
|
var _super = _createSuper(ErrorBoundary);
|
|
9535
9533
|
|
|
@@ -9556,8 +9554,8 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
9556
9554
|
value: function render() {
|
|
9557
9555
|
var _this$props = this.props,
|
|
9558
9556
|
children = _this$props.children,
|
|
9559
|
-
_this$props$
|
|
9560
|
-
|
|
9557
|
+
_this$props$errorComp = _this$props.errorComponent,
|
|
9558
|
+
errorComponent = _this$props$errorComp === void 0 ? /*#__PURE__*/React__default.createElement(DefaultError, null) : _this$props$errorComp,
|
|
9561
9559
|
message = _this$props.message;
|
|
9562
9560
|
if (!children) return null;
|
|
9563
9561
|
|
|
@@ -9565,7 +9563,7 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
9565
9563
|
// You can render any custom fallback UI
|
|
9566
9564
|
return message ? /*#__PURE__*/React__default.createElement(DefaultError, {
|
|
9567
9565
|
message: message
|
|
9568
|
-
}) :
|
|
9566
|
+
}) : errorComponent;
|
|
9569
9567
|
}
|
|
9570
9568
|
|
|
9571
9569
|
return children;
|
|
@@ -9581,7 +9579,7 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
9581
9579
|
}]);
|
|
9582
9580
|
|
|
9583
9581
|
return ErrorBoundary;
|
|
9584
|
-
}(React__default.
|
|
9582
|
+
}(React__default.PureComponent);
|
|
9585
9583
|
|
|
9586
9584
|
/**
|
|
9587
9585
|
* Depending of the given value returns a height measure
|