@uxland/primary-shell 7.47.5 → 7.48.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/{component-C6IdTseU.js → component-DvhXFXbi.js} +13 -12
- package/dist/component-DvhXFXbi.js.map +1 -0
- package/dist/{index-C2OnQp-I.js → index-Pwqfd9a_.js} +61 -52
- package/dist/index-Pwqfd9a_.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +43 -52
- package/dist/index.umd.cjs.map +1 -1
- package/dist/{plugin-C6qd-VVE.js → plugin-GzwtrpSe.js} +517 -537
- package/dist/{plugin-C6qd-VVE.js.map → plugin-GzwtrpSe.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/import-data-manager/component/styles.css +6 -11
- package/src/api/import-data-manager/component/template.ts +1 -0
- 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/component-C6IdTseU.js.map +0 -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() {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
display: grid;
|
|
30
30
|
flex: 1;
|
|
31
31
|
min-height: 0;
|
|
32
|
-
grid-template-columns:
|
|
32
|
+
grid-template-columns: 50% 50%;
|
|
33
33
|
gap: 16px;
|
|
34
34
|
padding: 16px;
|
|
35
35
|
}
|
|
@@ -54,31 +54,26 @@
|
|
|
54
54
|
overflow-y: auto;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
/* Left column: vertical stack of
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
/* Left column: vertical stack of accordion widgets. Each one keeps its natural
|
|
58
|
+
height and bounds its own inner scroll, so the column scrolls as a whole —
|
|
59
|
+
same as the right column. */
|
|
60
60
|
.content > primaria-region[name="import-data-activity-history-region"] > div {
|
|
61
61
|
display: flex;
|
|
62
62
|
flex-direction: column;
|
|
63
63
|
gap: 16px;
|
|
64
|
-
overflow:
|
|
64
|
+
overflow-y: auto;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
.content > primaria-region[name="import-data-activity-history-region"] > div > * {
|
|
68
68
|
flex-shrink: 0;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
.content > primaria-region[name="import-data-activity-history-region"] > div > *:last-child {
|
|
72
|
-
flex: 1;
|
|
73
|
-
min-height: 0;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
71
|
.footer {
|
|
77
72
|
display: flex;
|
|
78
73
|
flex-direction: row;
|
|
79
74
|
align-items: center;
|
|
80
75
|
background: white;
|
|
81
|
-
justify-content:
|
|
76
|
+
justify-content: center;
|
|
82
77
|
gap: 12px;
|
|
83
78
|
height: 56px;
|
|
84
79
|
border-top: 1px solid var(--color-neutral-100);
|
|
@@ -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"));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component-C6IdTseU.js","sources":["../src/api/import-data-manager/component/template.ts","../src/api/import-data-manager/component/component.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { translate } from \"../../../locales\";\nimport { shellApi } from \"../../api\";\nimport { ImportDataManagerModal } from \"./component\";\n\nexport const template = (props: ImportDataManagerModal) => {\n return html`\n <div class=\"container\">\n <div class=\"content\">\n <primaria-region name=\"${shellApi.regionManager.regions.shell.importDataActivityHistory}\"></primaria-region>\n <primaria-region name=\"${shellApi.regionManager.regions.shell.importData}\"></primaria-region>\n </div>\n <div class=\"footer\">\n <dss-button\n label=\"${translate(\"importDataManager.actions.cancel\")}\"\n @click=\"${() => {\n props.cancel();\n }}\"\n size=\"md\"\n variant=\"secondary\"\n ></dss-button>\n <dss-button\n label=\"${translate(\"importDataManager.actions.import\")}\"\n @click=\"${() => {\n props._accept();\n }}\"\n size=\"md\"\n variant=\"primary\"\n ></dss-button>\n </div>\n </div>\n `;\n};\n","import { LitElement, css, html, unsafeCSS } from \"lit\";\nimport { customElement } from \"lit/decorators.js\";\nimport { ConfirmationContentProps } from \"../../interaction-service\";\nimport styles from \"./styles.css?inline\";\nimport { template } from \"./template\";\n\n@customElement(\"import-data-manager-modal\")\nexport class ImportDataManagerModal extends LitElement implements ConfirmationContentProps<undefined, undefined> {\n data: undefined;\n setResult: (result: undefined) => void;\n setIsValid: (isValid: boolean) => void;\n confirm: () => void;\n // Injectat pel servei d'interacció igual que la resta; faltava des que es va afegir a la\n // interfície.\n confirmResult: (result: undefined) => void;\n cancel: () => void;\n\n render() {\n return html`${template(this)}`;\n }\n\n static styles = css`\n ${unsafeCSS(styles)}\n `;\n\n _accept = () => {\n this.confirm();\n };\n}\n"],"names":["template","props","html","shellApi","translate","ImportDataManagerModal","LitElement","css","unsafeCSS","styles","__decorateClass","customElement"],"mappings":";kiCAKaA,IAAW,CAACC,MAChBC;AAAAA;AAAAA;AAAAA,iCAGwBC,EAAS,cAAc,QAAQ,MAAM,yBAAyB;AAAA,iCAC9DA,EAAS,cAAc,QAAQ,MAAM,UAAU;AAAA;AAAA;AAAA;AAAA,mBAI7DC,EAAU,kCAAkC,CAAC;AAAA,oBAC5C,MAAM;AACd,EAAAH,EAAM,OAAA;AACR,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,mBAKQG,EAAU,kCAAkC,CAAC;AAAA,oBAC5C,MAAM;AACd,EAAAH,EAAM,QAAA;AACR,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;AClBJ,IAAMI,IAAN,cAAqCC,EAAqE;AAAA,EAA1G,cAAA;AAAA,UAAA,GAAA,SAAA,GAkBL,KAAA,UAAU,MAAM;AACd,WAAK,QAAA;AAAA,IACP;AAAA,EAAA;AAAA,EAVA,SAAS;AACP,WAAOJ,IAAOF,EAAS,IAAI,CAAC;AAAA,EAC9B;AASF;AArBaK,EAcJ,SAASE;AAAAA,MACZC,EAAUC,CAAM,CAAC;AAAA;AAfVJ,IAANK,EAAA;AAAA,EADNC,EAAc,2BAA2B;AAAA,GAC7BN,CAAA;"}
|