@redhat-cloud-services/frontend-components 4.0.3 → 4.0.4

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.
@@ -13,6 +13,9 @@ interface ErrorPageState {
13
13
  declare class ErrorBoundaryPage extends React.Component<React.PropsWithChildren<ErrorPageProps>, ErrorPageState> {
14
14
  constructor(props: Readonly<ErrorPageProps>);
15
15
  static getDerivedStateFromError(error: Error): ErrorPageState;
16
+ updateState: () => void;
17
+ componentDidUpdate(): void;
18
+ componentDidMount(): void;
16
19
  render(): string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | null | undefined;
17
20
  }
18
21
  export default ErrorBoundaryPage;
@@ -52,6 +52,14 @@ var ErrorBoundaryPage = (function (_super) {
52
52
  __extends(ErrorBoundaryPage, _super);
53
53
  function ErrorBoundaryPage(props) {
54
54
  var _this = _super.call(this, props) || this;
55
+ _this.updateState = function () {
56
+ if (_this.state.historyState !== history.state) {
57
+ _this.setState({
58
+ hasError: false,
59
+ historyState: history.state,
60
+ });
61
+ }
62
+ };
55
63
  _this.state = {
56
64
  hasError: false,
57
65
  historyState: history.state,
@@ -61,13 +69,13 @@ var ErrorBoundaryPage = (function (_super) {
61
69
  ErrorBoundaryPage.getDerivedStateFromError = function (error) {
62
70
  return { hasError: true, error: error, historyState: history.state };
63
71
  };
72
+ ErrorBoundaryPage.prototype.componentDidUpdate = function () {
73
+ this.updateState();
74
+ };
75
+ ErrorBoundaryPage.prototype.componentDidMount = function () {
76
+ this.updateState();
77
+ };
64
78
  ErrorBoundaryPage.prototype.render = function () {
65
- if (this.state.historyState !== history.state) {
66
- this.setState({
67
- hasError: false,
68
- historyState: history.state,
69
- });
70
- }
71
79
  if (this.state.hasError) {
72
80
  if (this.props.silent) {
73
81
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../src/ErrorBoundary/ErrorBoundary.tsx"],"names":[],"mappings":";;;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C,QAAQ,EAAE;YACvB,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;gBACrB,OAAO,IAAI,CAAC;aACb;YACD,OAAO,CACL,4CACE,uBAAC,oBAAU,cACT,uBAAC,4BAAe,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,GAAI,GACvC,EACb,uBAAC,iBAAO,cACN,uBAAC,oBAAU,IACT,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,EACjC,gBAAgB,EACd,6DACE,2CAAO,IAAI,CAAC,KAAK,CAAC,gBAAgB,GAAQ,EACzC,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,CACnB,uBAAC,8BAAiB,IAAC,UAAU,EAAC,cAAc,YAC1C,uBAAC,oBAAU,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAI,GACrB,CACrB,IACA,GAEL,GACM,IACN,CACP,CAAC;SACH;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,CAAC;IACH,wBAAC;AAAD,CAAC,AA7DD,CAAgC,KAAK,CAAC,SAAS,GA6D9C;AAED,kBAAe,iBAAiB,CAAC"}
@@ -24,6 +24,14 @@ var ErrorBoundaryPage = (function (_super) {
24
24
  __extends(ErrorBoundaryPage, _super);
25
25
  function ErrorBoundaryPage(props) {
26
26
  var _this = _super.call(this, props) || this;
27
+ _this.updateState = function () {
28
+ if (_this.state.historyState !== history.state) {
29
+ _this.setState({
30
+ hasError: false,
31
+ historyState: history.state,
32
+ });
33
+ }
34
+ };
27
35
  _this.state = {
28
36
  hasError: false,
29
37
  historyState: history.state,
@@ -33,13 +41,13 @@ var ErrorBoundaryPage = (function (_super) {
33
41
  ErrorBoundaryPage.getDerivedStateFromError = function (error) {
34
42
  return { hasError: true, error: error, historyState: history.state };
35
43
  };
44
+ ErrorBoundaryPage.prototype.componentDidUpdate = function () {
45
+ this.updateState();
46
+ };
47
+ ErrorBoundaryPage.prototype.componentDidMount = function () {
48
+ this.updateState();
49
+ };
36
50
  ErrorBoundaryPage.prototype.render = function () {
37
- if (this.state.historyState !== history.state) {
38
- this.setState({
39
- hasError: false,
40
- historyState: history.state,
41
- });
42
- }
43
51
  if (this.state.hasError) {
44
52
  if (this.props.silent) {
45
53
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../src/ErrorBoundary/ErrorBoundary.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,EAAE,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,UAAU,MAAM,eAAe,CAAC;;AAEvC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,OAAO,MAAM,YAAY,CAAC;AAgBjC;IAAgC,qCAAwE;IACtG,2BAAY,KAA+B;QAA3C,YACE,kBAAM,KAAK,CAAC,SAKb;QAJC,KAAI,CAAC,KAAK,GAAG;YACX,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,OAAO,CAAC,KAAK;SAC5B,CAAC;;IACJ,CAAC;IAEM,0CAAwB,GAA/B,UAAgC,KAAY;QAC1C,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,OAAA,EAAE,YAAY,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;IAChE,CAAC;IAED,kCAAM,GAAN;QACE,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,KAAK,OAAO,CAAC,KAAK,EAAE;YAC7C,IAAI,CAAC,QAAQ,CAAC;gBACZ,QAAQ,EAAE,KAAK;gBACf,YAAY,EAAE,OAAO,CAAC,KAAK;aAC5B,CAAC,CAAC;SACJ;QAED,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;YACvB,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;gBACrB,OAAO,IAAI,CAAC;aACb;YACD,OAAO,CACL,0BACE,KAAC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redhat-cloud-services/frontend-components",
3
- "version": "4.0.3",
3
+ "version": "4.0.4",
4
4
  "description": "Common components for RedHat Cloud Services project.",
5
5
  "main": "index.js",
6
6
  "module": "esm/index.js",