@melodicdev/components 2.0.0 → 2.0.1
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/assets/melodic-components.js +8 -2
- package/assets/melodic-components.js.map +1 -1
- package/assets/melodic-components.min.js +15 -2
- package/lib/components/overlays/dialog/dialog.component.d.ts.map +1 -1
- package/lib/components/overlays/dialog/dialog.component.js +6 -1
- package/lib/components/overlays/dialog/dialog.service.d.ts +9 -1
- package/lib/components/overlays/dialog/dialog.service.d.ts.map +1 -1
- package/lib/components/overlays/dialog/dialog.service.js +16 -1
- package/package.json +1 -1
|
@@ -22993,6 +22993,7 @@ var DialogService = class DialogService$1 {
|
|
|
22993
22993
|
const dialogRef = new DialogRef(dialogID, dialogEl);
|
|
22994
22994
|
this._dialogs.set(dialogID, {
|
|
22995
22995
|
dialogRef,
|
|
22996
|
+
dialogEl,
|
|
22996
22997
|
dialogComponent: void 0
|
|
22997
22998
|
});
|
|
22998
22999
|
dialogEl.addEventListener("close", () => {
|
|
@@ -23001,7 +23002,11 @@ var DialogService = class DialogService$1 {
|
|
|
23001
23002
|
});
|
|
23002
23003
|
return dialogRef;
|
|
23003
23004
|
}
|
|
23004
|
-
removeDialog(dialogID) {
|
|
23005
|
+
removeDialog(dialogID, dialogEl) {
|
|
23006
|
+
if (dialogEl) {
|
|
23007
|
+
const elements = this._dialogs.get(dialogID);
|
|
23008
|
+
if (!elements || elements.dialogEl !== dialogEl) return;
|
|
23009
|
+
}
|
|
23005
23010
|
this._dialogs.delete(dialogID);
|
|
23006
23011
|
}
|
|
23007
23012
|
open(dialogComponentOrID, config) {
|
|
@@ -23057,7 +23062,8 @@ var DialogComponent = class DialogComponent$1 {
|
|
|
23057
23062
|
this._registered = true;
|
|
23058
23063
|
}
|
|
23059
23064
|
onDestroy() {
|
|
23060
|
-
|
|
23065
|
+
if (!this._registered) return;
|
|
23066
|
+
this._dialogService.removeDialog(this._dialogID, this._dialogEl);
|
|
23061
23067
|
}
|
|
23062
23068
|
open() {
|
|
23063
23069
|
this.registerDialog();
|