@uxland/primary-shell 7.21.1 → 7.22.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.
@@ -2,4 +2,5 @@ import { ConfirmationOptions, ConfirmationResult, ConfirmComponentUI, PrimariaIn
2
2
  export declare class ParimariaInteractionServiceImpl extends PrimariaInteractionService {
3
3
  confirm<TData = undefined, TResult = undefined>(data: TData | undefined, componentUI: ConfirmComponentUI<TData, TResult>, options?: ConfirmationOptions | undefined): Promise<ConfirmationResult<TResult | undefined>>;
4
4
  confirmMessage(message: string, options?: ConfirmationOptions | undefined): Promise<ConfirmationResult>;
5
+ dispose(): void;
5
6
  }
@@ -34,4 +34,5 @@ export interface ConfirmComponentUI<TData = undefined, TResult = undefined> {
34
34
  export declare abstract class PrimariaInteractionService {
35
35
  abstract confirm<TData = undefined, TResult = undefined>(data: TData | undefined, componentUI: ConfirmComponentUI<TData, TResult>, options?: ConfirmationOptions | undefined): Promise<ConfirmationResult<TResult | undefined>>;
36
36
  abstract confirmMessage(message: string, options?: ConfirmationOptions | undefined): Promise<ConfirmationResult>;
37
+ abstract dispose(): void;
37
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxland/primary-shell",
3
- "version": "7.21.1",
3
+ "version": "7.22.0",
4
4
  "description": "Primaria Shell",
5
5
  "author": "UXLand <dev@uxland.es>",
6
6
  "homepage": "https://github.com/uxland/harmonix/tree/app#readme",
@@ -207,4 +207,12 @@ export class ParimariaInteractionServiceImpl extends PrimariaInteractionService
207
207
  ): Promise<ConfirmationResult> {
208
208
  return this.confirm(message, {component: ConfirmationMessage}, options);
209
209
  }
210
+
211
+ dispose(): void {
212
+ // Limpiar todos los modales abiertos
213
+ const modals = document.querySelectorAll('.modal');
214
+ for (const modal of modals) {
215
+ modal.remove();
216
+ }
217
+ }
210
218
  }
@@ -48,4 +48,5 @@ export abstract class PrimariaInteractionService {
48
48
  message: string,
49
49
  options?: ConfirmationOptions | undefined,
50
50
  ): Promise<ConfirmationResult>;
51
+ abstract dispose(): void;
51
52
  }
package/src/disposer.ts CHANGED
@@ -3,6 +3,7 @@ import { disposeFeatures } from "./features/bootstrapper";
3
3
  import { ExitShellPayload } from "./features/exit/request";
4
4
  export const disposeShell = () => {
5
5
  disposeFeatures(shellApi);
6
+ shellApi.interactionService.dispose();
6
7
  };
7
8
 
8
9
  export const raiseCloseEvent = () => {