@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.
|
@@ -16774,24 +16774,17 @@ var Bi = class {
|
|
|
16774
16774
|
return a.dialogRef.open(), a.dialogRef;
|
|
16775
16775
|
}
|
|
16776
16776
|
findDialogElement(t) {
|
|
16777
|
-
const r = document.querySelectorAll("ml-dialog");
|
|
16778
|
-
for (const l of r) if (l.hasAttribute(`#${t}`)) return l;
|
|
16779
16777
|
return this.deepFindDialog(document.body, t);
|
|
16780
16778
|
}
|
|
16781
16779
|
deepFindDialog(t, r) {
|
|
16782
16780
|
const l = t.shadowRoot;
|
|
16783
16781
|
if (l) {
|
|
16784
|
-
const a
|
|
16785
|
-
|
|
16786
|
-
|
|
16787
|
-
|
|
16788
|
-
if (s) return s;
|
|
16782
|
+
for (const a of l.querySelectorAll("ml-dialog")) if (a.hasAttribute(`#${r}`)) return a;
|
|
16783
|
+
for (const a of l.querySelectorAll("*")) if (a.shadowRoot) {
|
|
16784
|
+
const o = this.deepFindDialog(a, r);
|
|
16785
|
+
if (o) return o;
|
|
16789
16786
|
}
|
|
16790
16787
|
}
|
|
16791
|
-
for (const a of t.querySelectorAll("*")) if (a.shadowRoot) {
|
|
16792
|
-
const o = this.deepFindDialog(a, r);
|
|
16793
|
-
if (o) return o;
|
|
16794
|
-
}
|
|
16795
16788
|
return null;
|
|
16796
16789
|
}
|
|
16797
16790
|
close(t, r) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.service.d.ts","sourceRoot":"","sources":["../../../../src/components/overlays/dialog/dialog.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAI/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAW/D,qBACa,aAAa;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,IAAI,CAAC,OAAO,GAAG,OAAO,EAAE,KAAK,GAAG,OAAO,EAAE,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC;IA4CvF,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,cAAc;IAqBtB,KAAK,CAAC,CAAC,GAAG,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,IAAI;IAOxD,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,aAAa;CAGrB"}
|
|
@@ -57,33 +57,22 @@ let DialogService = class DialogService {
|
|
|
57
57
|
return dialogElements.dialogRef;
|
|
58
58
|
}
|
|
59
59
|
findDialogElement(dialogID) {
|
|
60
|
-
// Search through all shadow roots for the ml-dialog with the matching # attribute
|
|
61
|
-
const allDialogs = document.querySelectorAll('ml-dialog');
|
|
62
|
-
for (const dialog of allDialogs) {
|
|
63
|
-
if (dialog.hasAttribute(`#${dialogID}`)) {
|
|
64
|
-
return dialog;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
// Deep search through shadow roots
|
|
68
60
|
return this.deepFindDialog(document.body, dialogID);
|
|
69
61
|
}
|
|
70
62
|
deepFindDialog(root, dialogID) {
|
|
71
63
|
const shadowRoot = root.shadowRoot;
|
|
72
64
|
if (shadowRoot) {
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const result = this.deepFindDialog(child, dialogID);
|
|
78
|
-
if (result)
|
|
79
|
-
return result;
|
|
65
|
+
for (const el of shadowRoot.querySelectorAll('ml-dialog')) {
|
|
66
|
+
if (el.hasAttribute(`#${dialogID}`)) {
|
|
67
|
+
return el;
|
|
68
|
+
}
|
|
80
69
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
70
|
+
for (const child of shadowRoot.querySelectorAll('*')) {
|
|
71
|
+
if (child.shadowRoot) {
|
|
72
|
+
const result = this.deepFindDialog(child, dialogID);
|
|
73
|
+
if (result)
|
|
74
|
+
return result;
|
|
75
|
+
}
|
|
87
76
|
}
|
|
88
77
|
}
|
|
89
78
|
return null;
|