@servicetitan/error-boundary 23.0.0 → 23.1.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/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
- package/src/index.tsx +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { Component, ComponentType } from 'react';
|
|
1
|
+
import { Component, ComponentType, PropsWithChildren } from 'react';
|
|
2
2
|
export interface FallbackProps {
|
|
3
3
|
onRefresh?: () => void;
|
|
4
4
|
}
|
|
5
|
-
|
|
5
|
+
declare type ErrorBoundaryProps = PropsWithChildren<{
|
|
6
6
|
moduleName: string;
|
|
7
7
|
fallback?: ComponentType<FallbackProps>;
|
|
8
|
-
}
|
|
8
|
+
}>;
|
|
9
9
|
export declare class ErrorBoundary extends Component<ErrorBoundaryProps> {
|
|
10
10
|
state: {
|
|
11
11
|
hasError: boolean;
|
|
12
12
|
};
|
|
13
13
|
private logService?;
|
|
14
14
|
componentDidCatch(error: Error): void;
|
|
15
|
-
render(): import("react").ReactNode;
|
|
15
|
+
render(): string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
16
16
|
}
|
|
17
17
|
export {};
|
|
18
18
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAMpE,MAAM,WAAW,aAAa;IAC1B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,aAAK,kBAAkB,GAAG,iBAAiB,CAAC;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;CAC3C,CAAC,CAAC;AAEH,qBAAa,aAAc,SAAQ,SAAS,CAAC,kBAAkB,CAAC;IAC5D,KAAK;;MAEH;IAEF,QAEgB,UAAU,CAAC,CAAM;IAEjC,iBAAiB,CAAC,KAAK,EAAE,KAAK;IAU9B,MAAM;CAcT"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,uCAAuC;AACvC,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,uCAAuC;AACvC,OAAO,EAAE,SAAS,EAAoC,MAAM,OAAO,CAAC;AAEpE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAWhD,MAAM,OAAO,aAAc,SAAQ,SAA6B;IAAhE;;QACI;;;;mBAAQ;gBACJ,QAAQ,EAAE,KAAK;aAClB;WAAC;IA8BN,CAAC;IAxBG,iBAAiB,CAAC,KAAY;;QAC1B,MAAA,IAAI,CAAC,UAAU,0CAAE,KAAK,CAAC;YACnB,KAAK;YACL,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE;SAC1C,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IACtC,CAAC;IAED,MAAM;QACF,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,eAAe,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAE5D,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAEhC,IAAI,QAAQ,EAAE;YACV,MAAM,aAAa,GAAG,GAAG,EAAE;gBACvB,IAAI,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;YACvC,CAAC,CAAC;YACF,OAAO,KAAC,QAAQ,IAAC,SAAS,EAAE,aAAa,GAAI,CAAC;SACjD;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC/B,CAAC;CACJ;AA1BG;IAFC,QAAQ,EAAE;IACV,gBAAgB,CAAC,GAAG,CAAC;8BACO,GAAG;iDAAC;AA4BrC,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,gDAA6B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicetitan/error-boundary",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"homepage": "https://docs.st.dev/docs/frontend/error-boundary",
|
|
6
6
|
"repository": {
|
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
"src"
|
|
17
17
|
],
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@servicetitan/log-service": "23.
|
|
20
|
-
"@servicetitan/react-ioc": "23.
|
|
21
|
-
"@types/react": "~
|
|
22
|
-
"react": "~
|
|
19
|
+
"@servicetitan/log-service": "23.1.0",
|
|
20
|
+
"@servicetitan/react-ioc": "23.1.0",
|
|
21
|
+
"@types/react": "~18.2.55",
|
|
22
|
+
"react": "~18.2.0"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@servicetitan/log-service": "23.
|
|
26
|
-
"@servicetitan/react-ioc": "23.
|
|
27
|
-
"react": "
|
|
25
|
+
"@servicetitan/log-service": "23.1.0",
|
|
26
|
+
"@servicetitan/react-ioc": "23.1.0",
|
|
27
|
+
"react": ">=17.0.2"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"cli": {
|
|
33
33
|
"webpack": false
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "7267270e54cdb3a2926f61feb4939d057e82adb3"
|
|
36
36
|
}
|
package/src/index.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable react/no-set-state */
|
|
2
|
-
import { Component, ComponentType } from 'react';
|
|
2
|
+
import { Component, ComponentType, PropsWithChildren } from 'react';
|
|
3
3
|
|
|
4
4
|
import { injectDependency, optional } from '@servicetitan/react-ioc';
|
|
5
5
|
|
|
@@ -9,10 +9,10 @@ export interface FallbackProps {
|
|
|
9
9
|
onRefresh?: () => void;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
type ErrorBoundaryProps = PropsWithChildren<{
|
|
13
13
|
moduleName: string;
|
|
14
14
|
fallback?: ComponentType<FallbackProps>;
|
|
15
|
-
}
|
|
15
|
+
}>;
|
|
16
16
|
|
|
17
17
|
export class ErrorBoundary extends Component<ErrorBoundaryProps> {
|
|
18
18
|
state = {
|