piral-core 1.9.0-beta.8258 → 1.9.0-beta.8262
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.
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { findDOMNode } from 'react-dom';
|
|
3
2
|
import { RegisteredErrorInfo, RegisteredLoadingIndicator } from './components';
|
|
4
3
|
import { defer } from '../utils';
|
|
5
4
|
/**
|
|
@@ -26,9 +25,7 @@ export class ErrorBoundary extends React.Component {
|
|
|
26
25
|
const { piral, errorType } = this.props;
|
|
27
26
|
const pilet = piral.meta.name;
|
|
28
27
|
defer(() => {
|
|
29
|
-
const container = findDOMNode(this);
|
|
30
28
|
piral.emit('unhandled-error', {
|
|
31
|
-
container,
|
|
32
29
|
errorType,
|
|
33
30
|
error,
|
|
34
31
|
pilet,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../src/components/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../src/components/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAyBjC;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAiD;IAA1F;;QACE,UAAK,GAAG;YACN,KAAK,EAAE,SAAS;SACjB,CAAC;IAyCJ,CAAC;IAvCC,iBAAiB,CAAC,KAAY;QAC5B,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACxC,MAAM,KAAK,GAAG,KAAK,CAAC,IAA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.ts
CHANGED
|
@@ -60,10 +60,6 @@ export interface PiralStoreDataEvent<TValue = any> {
|
|
|
60
60
|
* Gets fired when an unhandled error in a component has been prevented.
|
|
61
61
|
*/
|
|
62
62
|
export interface PiralUnhandledErrorEvent {
|
|
63
|
-
/**
|
|
64
|
-
* The container showing the error / containing the component.
|
|
65
|
-
*/
|
|
66
|
-
container: any;
|
|
67
63
|
/**
|
|
68
64
|
* The type of the error, i.e., the type of component that crashed.
|
|
69
65
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "piral-core",
|
|
3
|
-
"version": "1.9.0-beta.
|
|
3
|
+
"version": "1.9.0-beta.8262",
|
|
4
4
|
"description": "The core library for creating a Piral instance.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"portal",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"piral-base": "1.9.0-beta.
|
|
67
|
-
"piral-debug-utils": "1.9.0-beta.
|
|
66
|
+
"piral-base": "1.9.0-beta.8262",
|
|
67
|
+
"piral-debug-utils": "1.9.0-beta.8262",
|
|
68
68
|
"zustand": "^3.0.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"react-router-dom",
|
|
85
85
|
"tslib"
|
|
86
86
|
],
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "3a689f6df242419c70e22b3e082db0c76e67a8ad"
|
|
88
88
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
import { RegisteredErrorInfo, RegisteredLoadingIndicator } from './components';
|
|
4
4
|
import { defer } from '../utils';
|
|
5
|
-
import { Errors, PiletApi } from '../types';
|
|
5
|
+
import type { Errors, PiletApi } from '../types';
|
|
6
6
|
|
|
7
7
|
export interface ErrorBoundaryProps {
|
|
8
8
|
/**
|
|
@@ -52,9 +52,7 @@ export class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoun
|
|
|
52
52
|
const pilet = piral.meta.name;
|
|
53
53
|
|
|
54
54
|
defer(() => {
|
|
55
|
-
const container = findDOMNode(this);
|
|
56
55
|
piral.emit('unhandled-error', {
|
|
57
|
-
container,
|
|
58
56
|
errorType,
|
|
59
57
|
error,
|
|
60
58
|
pilet,
|
package/src/types/utils.ts
CHANGED
|
@@ -64,10 +64,6 @@ export interface PiralStoreDataEvent<TValue = any> {
|
|
|
64
64
|
* Gets fired when an unhandled error in a component has been prevented.
|
|
65
65
|
*/
|
|
66
66
|
export interface PiralUnhandledErrorEvent {
|
|
67
|
-
/**
|
|
68
|
-
* The container showing the error / containing the component.
|
|
69
|
-
*/
|
|
70
|
-
container: any;
|
|
71
67
|
/**
|
|
72
68
|
* The type of the error, i.e., the type of component that crashed.
|
|
73
69
|
*/
|