@melodicdev/components 1.0.12 → 1.0.13
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.
|
@@ -18622,24 +18622,17 @@ var DialogService = class DialogService$1 {
|
|
|
18622
18622
|
return dialogElements.dialogRef;
|
|
18623
18623
|
}
|
|
18624
18624
|
findDialogElement(dialogID) {
|
|
18625
|
-
const allDialogs = document.querySelectorAll("ml-dialog");
|
|
18626
|
-
for (const dialog of allDialogs) if (dialog.hasAttribute(`#${dialogID}`)) return dialog;
|
|
18627
18625
|
return this.deepFindDialog(document.body, dialogID);
|
|
18628
18626
|
}
|
|
18629
18627
|
deepFindDialog(root, dialogID) {
|
|
18630
18628
|
const shadowRoot = root.shadowRoot;
|
|
18631
18629
|
if (shadowRoot) {
|
|
18632
|
-
const
|
|
18633
|
-
if (
|
|
18634
|
-
for (const child of shadowRoot.querySelectorAll("*")) {
|
|
18630
|
+
for (const el of shadowRoot.querySelectorAll("ml-dialog")) if (el.hasAttribute(`#${dialogID}`)) return el;
|
|
18631
|
+
for (const child of shadowRoot.querySelectorAll("*")) if (child.shadowRoot) {
|
|
18635
18632
|
const result = this.deepFindDialog(child, dialogID);
|
|
18636
18633
|
if (result) return result;
|
|
18637
18634
|
}
|
|
18638
18635
|
}
|
|
18639
|
-
for (const child of root.querySelectorAll("*")) if (child.shadowRoot) {
|
|
18640
|
-
const result = this.deepFindDialog(child, dialogID);
|
|
18641
|
-
if (result) return result;
|
|
18642
|
-
}
|
|
18643
18636
|
return null;
|
|
18644
18637
|
}
|
|
18645
18638
|
close(dialogID, result) {
|