@uxland/primary-shell 7.47.5 → 7.47.6
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/{component-C6IdTseU.js → component-CQxI1o5p.js} +2 -2
- package/dist/{component-C6IdTseU.js.map → component-CQxI1o5p.js.map} +1 -1
- package/dist/{index-C2OnQp-I.js → index-DSO8ViDu.js} +61 -52
- package/dist/index-DSO8ViDu.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +8 -8
- package/dist/index.umd.cjs.map +1 -1
- package/dist/{plugin-C6qd-VVE.js → plugin-DohFiwSH.js} +2 -2
- package/dist/{plugin-C6qd-VVE.js.map → plugin-DohFiwSH.js.map} +1 -1
- package/dist/primary/shell/src/api/region-manager/region-manager.d.ts +1 -1
- package/dist/primary/shell/src/disposer.d.ts +1 -1
- package/dist/primary/shell/src/features/bootstrapper.d.ts +1 -1
- package/package.json +1 -1
- package/src/UI/components/primaria-shell/primaria-shell.ts +3 -1
- package/src/api/region-manager/region-manager.ts +3 -3
- package/src/disposer.ts +2 -2
- package/src/features/bootstrapper.ts +2 -2
- package/src/features/exit/handler.ts +1 -1
- package/dist/index-C2OnQp-I.js.map +0 -1
|
@@ -16,7 +16,7 @@ export interface PrimariaRegionManager extends HarmonixRegionManager {
|
|
|
16
16
|
activatePluginView(regionName: string, pluginId: string, viewId: string): Promise<void>;
|
|
17
17
|
getCurrentMainViewActive(): string | undefined;
|
|
18
18
|
_removeAllViews(): Promise<void>;
|
|
19
|
-
_destroy(): void
|
|
19
|
+
_destroy(): Promise<void>;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Creates a proxy for the region manager with the given plugin info and region manager instance.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ExitShellPayload } from './features/exit/request';
|
|
2
|
-
export declare const disposeShell: () => void
|
|
2
|
+
export declare const disposeShell: () => Promise<void>;
|
|
3
3
|
export declare const raiseCloseEvent: () => void;
|
|
4
4
|
export declare const raiseCustomCloseEvent: (event: ExitShellPayload) => void;
|
package/package.json
CHANGED
|
@@ -94,7 +94,9 @@ export class PrimariaShell extends PrimariaRegionHost(LitElement) {
|
|
|
94
94
|
_handleError(error: { message: string }) {
|
|
95
95
|
this.viewSelected = shellViews.error;
|
|
96
96
|
this.error = error;
|
|
97
|
-
|
|
97
|
+
// Sense esperar a proposit: aixo es un callback sincron de Lit i aqui ja pintem la vista
|
|
98
|
+
// d'error, que no depen que el teardown hagi acabat. El `void` ho marca com a deliberat.
|
|
99
|
+
void disposeShell();
|
|
98
100
|
}
|
|
99
101
|
|
|
100
102
|
_unsubscribeEvents() {
|
|
@@ -19,7 +19,7 @@ export interface PrimariaRegionManager extends HarmonixRegionManager {
|
|
|
19
19
|
activatePluginView(regionName: string, pluginId: string, viewId: string): Promise<void>;
|
|
20
20
|
getCurrentMainViewActive(): string | undefined;
|
|
21
21
|
_removeAllViews(): Promise<void>;
|
|
22
|
-
_destroy(): void
|
|
22
|
+
_destroy(): Promise<void>;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
/** Totes les regions que coneix el shell, per poder-les recórrer al tancar. */
|
|
@@ -215,8 +215,8 @@ class RegionManagerProxy implements PrimariaRegionManager {
|
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
_destroy() {
|
|
219
|
-
this.regionManager.destroy();
|
|
218
|
+
async _destroy() {
|
|
219
|
+
await this.regionManager.destroy();
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
|
package/src/disposer.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { activityMonitor, sessionRefreshTimer, shellApi } from "./api/api";
|
|
2
2
|
import { disposeFeatures } from "./features/bootstrapper";
|
|
3
3
|
import { ExitShellPayload } from "./features/exit/request";
|
|
4
|
-
export const disposeShell = () => {
|
|
5
|
-
disposeFeatures(shellApi);
|
|
4
|
+
export const disposeShell = async () => {
|
|
5
|
+
await disposeFeatures(shellApi);
|
|
6
6
|
shellApi.interactionService.dispose();
|
|
7
7
|
sessionRefreshTimer.stop();
|
|
8
8
|
activityMonitor.stop();
|
|
@@ -12,10 +12,10 @@ export const useFeatures = (api: PrimariaApi) => {
|
|
|
12
12
|
api.broker.send(new GetUserInfo());
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
export const disposeFeatures = (api: PrimariaApi) => {
|
|
15
|
+
export const disposeFeatures = async (api: PrimariaApi) => {
|
|
16
16
|
disposeGetUserInfo();
|
|
17
17
|
disposeExitShell();
|
|
18
18
|
container.unbindAll();
|
|
19
|
-
api.regionManager._destroy();
|
|
19
|
+
await api.regionManager._destroy();
|
|
20
20
|
api.broker._clear();
|
|
21
21
|
};
|
|
@@ -30,7 +30,7 @@ export class ExitShellHandler {
|
|
|
30
30
|
this.unmountViewsAndDisposePlugins(), // S'intenta executar un dispose normal
|
|
31
31
|
this.timeout(10000), // Si passen 5s, es segueix amb l'execució
|
|
32
32
|
]);
|
|
33
|
-
disposeShell();
|
|
33
|
+
await disposeShell();
|
|
34
34
|
this.emitClose(evt);
|
|
35
35
|
} catch (error) {
|
|
36
36
|
this.api.notificationService.error(translate("errors.exit"));
|