dce-reactkit 3.6.13 → 3.6.14
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/cjs/index.js +10 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/AppWrapper.d.ts +1 -1
- package/dist/esm/index.js +10 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/AppWrapper.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/AppWrapper.tsx +10 -1
|
@@ -52,7 +52,7 @@ export declare const confirm: (title: string, text: string, opts?: {
|
|
|
52
52
|
*/
|
|
53
53
|
export declare const showFatalError: (error: any, errorTitle?: string) => Promise<void>;
|
|
54
54
|
/**
|
|
55
|
-
* Add a handler for when a fatal error occurs
|
|
55
|
+
* Add a handler for when a fatal error occurs (or when a session expiry occurs)
|
|
56
56
|
* @author Gabe Abrams
|
|
57
57
|
*/
|
|
58
58
|
export declare const addFatalErrorHandler: (handler: () => void) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ declare const confirm: (title: string, text: string, opts?: {
|
|
|
71
71
|
*/
|
|
72
72
|
declare const showFatalError: (error: any, errorTitle?: string) => Promise<void>;
|
|
73
73
|
/**
|
|
74
|
-
* Add a handler for when a fatal error occurs
|
|
74
|
+
* Add a handler for when a fatal error occurs (or when a session expiry occurs)
|
|
75
75
|
* @author Gabe Abrams
|
|
76
76
|
*/
|
|
77
77
|
declare const addFatalErrorHandler: (handler: () => void) => void;
|
package/package.json
CHANGED
|
@@ -314,7 +314,7 @@ export const showFatalError = async (
|
|
|
314
314
|
};
|
|
315
315
|
|
|
316
316
|
/**
|
|
317
|
-
* Add a handler for when a fatal error occurs
|
|
317
|
+
* Add a handler for when a fatal error occurs (or when a session expiry occurs)
|
|
318
318
|
* @author Gabe Abrams
|
|
319
319
|
*/
|
|
320
320
|
export const addFatalErrorHandler = (handler: () => void) => {
|
|
@@ -333,6 +333,15 @@ let setSessionHasExpired: (isExpired: boolean) => void;
|
|
|
333
333
|
* @author Gabe Abrams
|
|
334
334
|
*/
|
|
335
335
|
export const showSessionExpiredMessage = async () => {
|
|
336
|
+
// Call all fatal error listeners
|
|
337
|
+
try {
|
|
338
|
+
fatalErrorHandlers.forEach((handler) => {
|
|
339
|
+
handler();
|
|
340
|
+
});
|
|
341
|
+
} catch (err) {
|
|
342
|
+
// Ignore listener errors
|
|
343
|
+
}
|
|
344
|
+
|
|
336
345
|
// Wait for helper to exist
|
|
337
346
|
await waitForHelper(() => {
|
|
338
347
|
return !!setSessionHasExpired;
|