@melodicdev/components 1.0.8 → 1.0.10
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 +6 -4
- package/lib/components/overlays/dialog/dialog.component.d.ts +4 -3
- package/lib/components/overlays/dialog/dialog.component.d.ts.map +1 -1
- package/lib/components/overlays/dialog/dialog.component.js +10 -2
- package/package.json +1 -1
|
@@ -18635,17 +18635,23 @@ var _ref;
|
|
|
18635
18635
|
var DialogComponent = class DialogComponent$1 {
|
|
18636
18636
|
constructor() {
|
|
18637
18637
|
this._dialogID = newID();
|
|
18638
|
+
this._registered = false;
|
|
18638
18639
|
}
|
|
18639
|
-
|
|
18640
|
-
|
|
18640
|
+
registerDialog() {
|
|
18641
|
+
if (this._registered) return;
|
|
18642
|
+
const dialogEl = this.elementRef.shadowRoot?.querySelector("dialog");
|
|
18643
|
+
if (!dialogEl) return;
|
|
18644
|
+
this._dialogEl = dialogEl;
|
|
18641
18645
|
this._dialogID = this.createDialogID();
|
|
18642
18646
|
this._dialogEl.id = this._dialogID;
|
|
18643
18647
|
this._dialogRef = this._dialogService.addDialog(this._dialogID, this._dialogEl);
|
|
18648
|
+
this._registered = true;
|
|
18644
18649
|
}
|
|
18645
18650
|
onDestroy() {
|
|
18646
18651
|
this._dialogService.removeDialog(this._dialogID);
|
|
18647
18652
|
}
|
|
18648
18653
|
open() {
|
|
18654
|
+
this.registerDialog();
|
|
18649
18655
|
this._dialogRef.open();
|
|
18650
18656
|
}
|
|
18651
18657
|
close(result) {
|