@melodicdev/components 1.0.9 → 1.0.11
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 +31 -6
- package/assets/melodic-components.js.map +1 -1
- package/assets/melodic-components.min.js +82 -62
- package/lib/components/overlays/dialog/dialog.component.d.ts +2 -4
- package/lib/components/overlays/dialog/dialog.component.d.ts.map +1 -1
- package/lib/components/overlays/dialog/dialog.component.js +1 -6
- package/lib/components/overlays/dialog/dialog.service.d.ts +2 -0
- package/lib/components/overlays/dialog/dialog.service.d.ts.map +1 -1
- package/lib/components/overlays/dialog/dialog.service.js +45 -0
- package/package.json +1 -1
|
@@ -211,18 +211,18 @@ var Xr = async () => {
|
|
|
211
211
|
if (e.length !== 0)
|
|
212
212
|
for (const t of e) {
|
|
213
213
|
if (t instanceof HTMLStyleElement) {
|
|
214
|
-
|
|
214
|
+
Fe(t.textContent ?? "");
|
|
215
215
|
continue;
|
|
216
216
|
}
|
|
217
217
|
t instanceof HTMLLinkElement && (t.sheet || await new Promise((r) => {
|
|
218
218
|
t.addEventListener("load", () => r(), { once: !0 });
|
|
219
|
-
}),
|
|
219
|
+
}), Fe(Array.from(t.sheet?.cssRules ?? []).map((r) => r.cssText).join(`
|
|
220
220
|
`)));
|
|
221
221
|
}
|
|
222
222
|
}, Ve = (e) => {
|
|
223
223
|
const t = e.adoptedStyleSheets ?? [], r = Te.filter((l) => !t.includes(l));
|
|
224
224
|
r.length > 0 && (e.adoptedStyleSheets = [...t, ...r]);
|
|
225
|
-
},
|
|
225
|
+
}, Fe = (e) => {
|
|
226
226
|
const t = e.trim();
|
|
227
227
|
if (t.length > 0) {
|
|
228
228
|
const r = new CSSStyleSheet();
|
|
@@ -379,7 +379,7 @@ var ze = class $r extends Error {
|
|
|
379
379
|
constructor(t, r, l) {
|
|
380
380
|
super(t), this.config = r, this.code = l, this.name = "HttpBaseError", Object.setPrototypeOf(this, $r.prototype);
|
|
381
381
|
}
|
|
382
|
-
},
|
|
382
|
+
}, je = class Cr extends ze {
|
|
383
383
|
constructor(t, r, l) {
|
|
384
384
|
super(t, l, `HTTP_${r.status}`), this.response = r, this.name = "HttpError", Object.setPrototypeOf(this, Cr.prototype);
|
|
385
385
|
}
|
|
@@ -535,10 +535,10 @@ var ze = class $r extends Error {
|
|
|
535
535
|
headers: r.headers,
|
|
536
536
|
config: e
|
|
537
537
|
};
|
|
538
|
-
if (!r.ok) throw new
|
|
538
|
+
if (!r.ok) throw new je(`HTTP Error: ${r.status} ${r.statusText}`, l, e);
|
|
539
539
|
return l;
|
|
540
540
|
}).catch((r) => {
|
|
541
|
-
throw r instanceof
|
|
541
|
+
throw r instanceof je ? r : r instanceof Error && r.name === "AbortError" ? new ll("Request aborted", e) : new rl((r instanceof Error ? r.message : "Network error") || "Network error", e);
|
|
542
542
|
});
|
|
543
543
|
return e.deduplicate === !0 && this._requestManager.addPendingRequest(e, t), await t;
|
|
544
544
|
}
|
|
@@ -853,7 +853,7 @@ var ye = class {
|
|
|
853
853
|
}
|
|
854
854
|
};
|
|
855
855
|
ye = g([Z()], ye);
|
|
856
|
-
function
|
|
856
|
+
function F(e, t) {
|
|
857
857
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, t);
|
|
858
858
|
}
|
|
859
859
|
var Ae = (e, t, r, l) => new PopStateEvent("History", { state: {
|
|
@@ -1100,7 +1100,7 @@ var V = class {
|
|
|
1100
1100
|
};
|
|
1101
1101
|
}
|
|
1102
1102
|
};
|
|
1103
|
-
V = g([Z(),
|
|
1103
|
+
V = g([Z(), F("design:paramtypes", [])], V);
|
|
1104
1104
|
var W = /* @__PURE__ */ new Map(), Tr = (e) => {
|
|
1105
1105
|
if (W.has(e)) return W.get(e);
|
|
1106
1106
|
const t = e.toLowerCase();
|
|
@@ -1789,7 +1789,7 @@ var We, Ge = "melodic:outlet-register", xe = class {
|
|
|
1789
1789
|
t?.component ? await this.renderComponent(t.component) : this._depth === 0 && this._router.navigate("/404", { replace: !0 });
|
|
1790
1790
|
}
|
|
1791
1791
|
};
|
|
1792
|
-
g([H(V),
|
|
1792
|
+
g([H(V), F("design:type", typeof (We = typeof V < "u" && V) == "function" ? We : Object)], xe.prototype, "_router", void 0);
|
|
1793
1793
|
xe = g([_({
|
|
1794
1794
|
selector: "router-outlet",
|
|
1795
1795
|
template: () => i`<slot></slot>`
|
|
@@ -1851,7 +1851,7 @@ var Ue, we = class {
|
|
|
1851
1851
|
this.exactMatch ? o = l === a : o = l === a || l.startsWith(a + "/"), o ? (this.elementRef.classList.add(this.activeClass), this._anchorElement?.setAttribute("aria-current", "page")) : (this.elementRef.classList.remove(this.activeClass), this._anchorElement?.removeAttribute("aria-current"));
|
|
1852
1852
|
}
|
|
1853
1853
|
};
|
|
1854
|
-
g([H(V),
|
|
1854
|
+
g([H(V), F("design:type", typeof (Ue = typeof V < "u" && V) == "function" ? Ue : Object)], we.prototype, "_router", void 0);
|
|
1855
1855
|
we = g([_({
|
|
1856
1856
|
selector: "router-link",
|
|
1857
1857
|
template: () => i`<a part="link"><slot></slot></a>`,
|
|
@@ -2035,7 +2035,7 @@ var pl = class {
|
|
|
2035
2035
|
});
|
|
2036
2036
|
});
|
|
2037
2037
|
}
|
|
2038
|
-
},
|
|
2038
|
+
}, j = class {
|
|
2039
2039
|
constructor() {
|
|
2040
2040
|
this._debug && console.info("RX State Debugging: Enabled");
|
|
2041
2041
|
}
|
|
@@ -2113,14 +2113,14 @@ var pl = class {
|
|
|
2113
2113
|
return Object.keys(this._state).reduce((t, r) => (t[r] = this._state[r](), t), {});
|
|
2114
2114
|
}
|
|
2115
2115
|
};
|
|
2116
|
-
g([H(ke),
|
|
2117
|
-
g([H($e),
|
|
2118
|
-
g([H(Ce),
|
|
2119
|
-
g([H(Ir),
|
|
2120
|
-
|
|
2116
|
+
g([H(ke), F("design:type", Object)], j.prototype, "_state", void 0);
|
|
2117
|
+
g([H($e), F("design:type", Object)], j.prototype, "_reducerMap", void 0);
|
|
2118
|
+
g([H(Ce), F("design:type", Object)], j.prototype, "_effectMap", void 0);
|
|
2119
|
+
g([H(Ir), F("design:type", Boolean)], j.prototype, "_debug", void 0);
|
|
2120
|
+
j = g([Z(), F("design:paramtypes", [])], j);
|
|
2121
2121
|
function Vs(e, t, r, l = !1) {
|
|
2122
2122
|
return (a) => {
|
|
2123
|
-
a.bindValue(ke, e), a.bindValue($e, t), a.bindValue(Ce, r), a.bindValue(Ir, l), a.bind(
|
|
2123
|
+
a.bindValue(ke, e), a.bindValue($e, t), a.bindValue(Ce, r), a.bindValue(Ir, l), a.bind(j, j, { dependencies: [
|
|
2124
2124
|
ke,
|
|
2125
2125
|
$e,
|
|
2126
2126
|
Ce
|
|
@@ -2371,7 +2371,7 @@ function xl(e) {
|
|
|
2371
2371
|
a[s] = o, o = t[o];
|
|
2372
2372
|
return a;
|
|
2373
2373
|
}
|
|
2374
|
-
function
|
|
2374
|
+
function Fs(e, t, r) {
|
|
2375
2375
|
return U((l, a) => {
|
|
2376
2376
|
if (!a) {
|
|
2377
2377
|
const o = l.parentNode;
|
|
@@ -2508,7 +2508,7 @@ function G(e) {
|
|
|
2508
2508
|
return a;
|
|
2509
2509
|
});
|
|
2510
2510
|
}
|
|
2511
|
-
function
|
|
2511
|
+
function js(e) {
|
|
2512
2512
|
return U((t, r) => {
|
|
2513
2513
|
if (!r) {
|
|
2514
2514
|
const l = t.parentNode;
|
|
@@ -3255,7 +3255,7 @@ const Dl = {
|
|
|
3255
3255
|
lg: 1024,
|
|
3256
3256
|
xl: 1280,
|
|
3257
3257
|
"2xl": 1536
|
|
3258
|
-
},
|
|
3258
|
+
}, Fl = {
|
|
3259
3259
|
...Dl,
|
|
3260
3260
|
...Il,
|
|
3261
3261
|
...Ml,
|
|
@@ -3265,7 +3265,7 @@ const Dl = {
|
|
|
3265
3265
|
...Ll,
|
|
3266
3266
|
...Vl
|
|
3267
3267
|
};
|
|
3268
|
-
function
|
|
3268
|
+
function jl(e) {
|
|
3269
3269
|
return Object.entries(e).map(([t, r]) => `${t}: ${r};`).join(`
|
|
3270
3270
|
`);
|
|
3271
3271
|
}
|
|
@@ -3372,7 +3372,7 @@ const ql = {
|
|
|
3372
3372
|
color-scheme: dark;
|
|
3373
3373
|
}
|
|
3374
3374
|
}`, Js = `:root {
|
|
3375
|
-
${Fl
|
|
3375
|
+
${jl(Fl)}
|
|
3376
3376
|
|
|
3377
3377
|
/* Default to light color scheme */
|
|
3378
3378
|
color-scheme: light;
|
|
@@ -3956,7 +3956,7 @@ function pn(e, t) {
|
|
|
3956
3956
|
document.removeEventListener("click", r, !0);
|
|
3957
3957
|
};
|
|
3958
3958
|
}
|
|
3959
|
-
var
|
|
3959
|
+
var Fr = class {
|
|
3960
3960
|
constructor() {
|
|
3961
3961
|
this._viewport = null, this._resizeObserver = null, this._options = null, this._handleScroll = () => {
|
|
3962
3962
|
this._compute(this._viewport.clientHeight);
|
|
@@ -7709,7 +7709,7 @@ function Va(e) {
|
|
|
7709
7709
|
</div>
|
|
7710
7710
|
`;
|
|
7711
7711
|
}
|
|
7712
|
-
const
|
|
7712
|
+
const Fa = () => y`
|
|
7713
7713
|
:host {
|
|
7714
7714
|
display: block;
|
|
7715
7715
|
}
|
|
@@ -7861,7 +7861,7 @@ const ja = () => y`
|
|
|
7861
7861
|
color: var(--ml-color-danger);
|
|
7862
7862
|
}
|
|
7863
7863
|
`;
|
|
7864
|
-
var
|
|
7864
|
+
var ja = [
|
|
7865
7865
|
"Jan",
|
|
7866
7866
|
"Feb",
|
|
7867
7867
|
"Mar",
|
|
@@ -7880,7 +7880,7 @@ function qa(e) {
|
|
|
7880
7880
|
const t = e.split("-");
|
|
7881
7881
|
if (t.length !== 3) return e;
|
|
7882
7882
|
const r = parseInt(t[1], 10) - 1, l = parseInt(t[2], 10), a = parseInt(t[0], 10);
|
|
7883
|
-
return `${
|
|
7883
|
+
return `${ja[r]} ${l}, ${a}`;
|
|
7884
7884
|
}
|
|
7885
7885
|
var xt = class {
|
|
7886
7886
|
constructor() {
|
|
@@ -7952,7 +7952,7 @@ var xt = class {
|
|
|
7952
7952
|
xt = g([_({
|
|
7953
7953
|
selector: "ml-date-picker",
|
|
7954
7954
|
template: Va,
|
|
7955
|
-
styles:
|
|
7955
|
+
styles: Fa,
|
|
7956
7956
|
attributes: [
|
|
7957
7957
|
"value",
|
|
7958
7958
|
"placeholder",
|
|
@@ -10707,7 +10707,7 @@ const Eo = () => y`
|
|
|
10707
10707
|
`;
|
|
10708
10708
|
var Vt = class {
|
|
10709
10709
|
constructor() {
|
|
10710
|
-
this.hasFooter = !1, this.hasHeaderActions = !1, this.selectable = !1, this.striped = !1, this.hoverable = !0, this.stickyHeader = !1, this.size = "md", this.tableTitle = "", this.description = "", this.virtual = !1, this.columns = [], this.rows = [], this.sortKey = "", this.sortDirection = "asc", this.selectedIndices = [], this.startIndex = 0, this.endIndex = 50, this._scroller = new
|
|
10710
|
+
this.hasFooter = !1, this.hasHeaderActions = !1, this.selectable = !1, this.striped = !1, this.hoverable = !0, this.stickyHeader = !1, this.size = "md", this.tableTitle = "", this.description = "", this.virtual = !1, this.columns = [], this.rows = [], this.sortKey = "", this.sortDirection = "asc", this.selectedIndices = [], this.startIndex = 0, this.endIndex = 50, this._scroller = new Fr(), this._viewport = null, this.isRowSelected = (t) => this.selectedIndices.includes(t), this.handleSort = (t) => {
|
|
10711
10711
|
t.sortable && (this.sortKey === t.key ? this.sortDirection = this.sortDirection === "asc" ? "desc" : "asc" : (this.sortKey = t.key, this.sortDirection = "asc"), this.selectedIndices = [], this._scroller.invalidate(), this.elementRef.dispatchEvent(new CustomEvent("ml:sort", {
|
|
10712
10712
|
bubbles: !0,
|
|
10713
10713
|
composed: !0,
|
|
@@ -11522,9 +11522,9 @@ const zo = () => y`
|
|
|
11522
11522
|
cursor: not-allowed;
|
|
11523
11523
|
}
|
|
11524
11524
|
`;
|
|
11525
|
-
var
|
|
11525
|
+
var Ft = class {
|
|
11526
11526
|
constructor() {
|
|
11527
|
-
this.selectable = !1, this.striped = !1, this.hoverable = !0, this.size = "md", this.gridTitle = "", this.description = "", this.serverSide = !1, this.pageSize = 50, this.virtual = !0, this.showFilterRow = !1, this.columns = [], this.rows = [], this.sortKey = "", this.sortDirection = "asc", this.filters = {}, this.selectedIndices = [], this.currentPage = 1, this.startIndex = 0, this.endIndex = 50, this.colWidths = {}, this.colOrder = [], this.resizingKey = null, this.draggingKey = null, this.dragOverKey = null, this._scroller = new
|
|
11527
|
+
this.selectable = !1, this.striped = !1, this.hoverable = !0, this.size = "md", this.gridTitle = "", this.description = "", this.serverSide = !1, this.pageSize = 50, this.virtual = !0, this.showFilterRow = !1, this.columns = [], this.rows = [], this.sortKey = "", this.sortDirection = "asc", this.filters = {}, this.selectedIndices = [], this.currentPage = 1, this.startIndex = 0, this.endIndex = 50, this.colWidths = {}, this.colOrder = [], this.resizingKey = null, this.draggingKey = null, this.dragOverKey = null, this._scroller = new Fr(), this._viewport = null, this._resizeStartX = 0, this._resizeStartWidth = 0, this.isRowSelected = (t) => this.selectedIndices.includes(t), this.handleSort = (t) => {
|
|
11528
11528
|
t.sortable && (this.sortKey === t.key ? this.sortDirection = this.sortDirection === "asc" ? "desc" : "asc" : (this.sortKey = t.key, this.sortDirection = "asc"), this.currentPage = 1, this._scroller.invalidate(), this.elementRef.dispatchEvent(new CustomEvent("ml:sort", {
|
|
11529
11529
|
bubbles: !0,
|
|
11530
11530
|
composed: !0,
|
|
@@ -11729,7 +11729,7 @@ var jt = class {
|
|
|
11729
11729
|
}));
|
|
11730
11730
|
}
|
|
11731
11731
|
};
|
|
11732
|
-
|
|
11732
|
+
Ft = g([_({
|
|
11733
11733
|
selector: "ml-data-grid",
|
|
11734
11734
|
template: To,
|
|
11735
11735
|
styles: zo,
|
|
@@ -11745,7 +11745,7 @@ jt = g([_({
|
|
|
11745
11745
|
"virtual",
|
|
11746
11746
|
"show-filter-row"
|
|
11747
11747
|
]
|
|
11748
|
-
})],
|
|
11748
|
+
})], Ft);
|
|
11749
11749
|
var Ao = [
|
|
11750
11750
|
"January",
|
|
11751
11751
|
"February",
|
|
@@ -11772,7 +11772,7 @@ var Ao = [
|
|
|
11772
11772
|
"Oct",
|
|
11773
11773
|
"Nov",
|
|
11774
11774
|
"Dec"
|
|
11775
|
-
],
|
|
11775
|
+
], jr = [
|
|
11776
11776
|
"Sunday",
|
|
11777
11777
|
"Monday",
|
|
11778
11778
|
"Tuesday",
|
|
@@ -11792,7 +11792,7 @@ var Ao = [
|
|
|
11792
11792
|
function N(e, t, r) {
|
|
11793
11793
|
return `${e}-${String(t + 1).padStart(2, "0")}-${String(r).padStart(2, "0")}`;
|
|
11794
11794
|
}
|
|
11795
|
-
function
|
|
11795
|
+
function jt(e) {
|
|
11796
11796
|
const [t, r, l] = e.split("T")[0].split("-").map(Number);
|
|
11797
11797
|
return new Date(t, r - 1, l);
|
|
11798
11798
|
}
|
|
@@ -11881,7 +11881,7 @@ function Kt(e = 0) {
|
|
|
11881
11881
|
const l = (e + r) % 7;
|
|
11882
11882
|
return {
|
|
11883
11883
|
short: Pe[l],
|
|
11884
|
-
full:
|
|
11884
|
+
full: jr[l]
|
|
11885
11885
|
};
|
|
11886
11886
|
});
|
|
11887
11887
|
}
|
|
@@ -11892,7 +11892,7 @@ function Oo(e) {
|
|
|
11892
11892
|
return Ee[e.getMonth()];
|
|
11893
11893
|
}
|
|
11894
11894
|
function No(e) {
|
|
11895
|
-
return
|
|
11895
|
+
return jr[e.getDay()];
|
|
11896
11896
|
}
|
|
11897
11897
|
function M(e) {
|
|
11898
11898
|
const t = new Date(e);
|
|
@@ -11968,7 +11968,7 @@ function Vo(e, t, r) {
|
|
|
11968
11968
|
};
|
|
11969
11969
|
});
|
|
11970
11970
|
}
|
|
11971
|
-
function
|
|
11971
|
+
function Fo(e, t) {
|
|
11972
11972
|
const r = N(e.getFullYear(), e.getMonth(), e.getDate()), l = ue(t, r).filter((a) => !a.allDay);
|
|
11973
11973
|
return {
|
|
11974
11974
|
date: r,
|
|
@@ -11978,7 +11978,7 @@ function jo(e, t) {
|
|
|
11978
11978
|
events: Hr(l)
|
|
11979
11979
|
};
|
|
11980
11980
|
}
|
|
11981
|
-
function
|
|
11981
|
+
function jo(e, t, r) {
|
|
11982
11982
|
const l = /* @__PURE__ */ new Set(), a = new Date(e, t + 1, 0).getDate();
|
|
11983
11983
|
for (let o = 1; o <= a; o++) {
|
|
11984
11984
|
const s = N(e, t, o);
|
|
@@ -13203,7 +13203,7 @@ var Gt = class {
|
|
|
13203
13203
|
}, this.miniCalNextMonth = () => {
|
|
13204
13204
|
this._miniCalMonth === 11 ? (this._miniCalMonth = 0, this._miniCalYear++) : this._miniCalMonth++;
|
|
13205
13205
|
}, this.handleMiniCalSelect = (t) => {
|
|
13206
|
-
this.setDate(
|
|
13206
|
+
this.setDate(jt(t));
|
|
13207
13207
|
};
|
|
13208
13208
|
}
|
|
13209
13209
|
/** Check if header-left slot has consumer content */
|
|
@@ -13215,7 +13215,7 @@ var Gt = class {
|
|
|
13215
13215
|
return this.elementRef?.querySelector('[slot="header-actions"]') !== null;
|
|
13216
13216
|
}
|
|
13217
13217
|
get _currentDate() {
|
|
13218
|
-
return this.date ?
|
|
13218
|
+
return this.date ? jt(this.date) : /* @__PURE__ */ new Date();
|
|
13219
13219
|
}
|
|
13220
13220
|
onCreate() {
|
|
13221
13221
|
if (!this.date) {
|
|
@@ -13281,7 +13281,7 @@ var Gt = class {
|
|
|
13281
13281
|
return Lo();
|
|
13282
13282
|
}
|
|
13283
13283
|
get dayColumn() {
|
|
13284
|
-
return
|
|
13284
|
+
return Fo(this._currentDate, this.events);
|
|
13285
13285
|
}
|
|
13286
13286
|
get dayEvents() {
|
|
13287
13287
|
return ue(this.events, this.currentIsoDate);
|
|
@@ -13303,7 +13303,7 @@ var Gt = class {
|
|
|
13303
13303
|
return Ht(this._miniCalYear, this._miniCalMonth, this.weekStartsOn);
|
|
13304
13304
|
}
|
|
13305
13305
|
get miniCalendarDots() {
|
|
13306
|
-
return
|
|
13306
|
+
return jo(this._miniCalYear, this._miniCalMonth, this.events);
|
|
13307
13307
|
}
|
|
13308
13308
|
setDate(t) {
|
|
13309
13309
|
this.date = N(t.getFullYear(), t.getMonth(), t.getDate()), this._miniCalYear = t.getFullYear(), this._miniCalMonth = t.getMonth(), this.elementRef.dispatchEvent(new CustomEvent("ml:date-change", {
|
|
@@ -16490,7 +16490,7 @@ function Vi(e) {
|
|
|
16490
16490
|
</div>
|
|
16491
16491
|
`;
|
|
16492
16492
|
}
|
|
16493
|
-
const
|
|
16493
|
+
const Fi = () => y`
|
|
16494
16494
|
:host {
|
|
16495
16495
|
display: block;
|
|
16496
16496
|
}
|
|
@@ -16511,10 +16511,10 @@ var sr = class {
|
|
|
16511
16511
|
sr = g([_({
|
|
16512
16512
|
selector: "ml-step-panel",
|
|
16513
16513
|
template: Vi,
|
|
16514
|
-
styles:
|
|
16514
|
+
styles: Fi,
|
|
16515
16515
|
attributes: ["value"]
|
|
16516
16516
|
})], sr);
|
|
16517
|
-
const
|
|
16517
|
+
const ji = () => i`<dialog class="ml-dialog">
|
|
16518
16518
|
<div class="ml-dialog-header">
|
|
16519
16519
|
<slot name="dialog-header"></slot>
|
|
16520
16520
|
</div>
|
|
@@ -16766,8 +16766,34 @@ var Bi = class {
|
|
|
16766
16766
|
const o = this.mountDialog(t);
|
|
16767
16767
|
l = ((o.shadowRoot?.querySelector("ml-dialog")).shadowRoot?.querySelector("dialog")).id, a = this._dialogs.get(l), a.dialogComponent = o, r && a.dialogRef.applyConfig(r), o.component.onDialogRefSet?.(a.dialogRef);
|
|
16768
16768
|
}
|
|
16769
|
+
if (!a) {
|
|
16770
|
+
const o = this.findDialogElement(l);
|
|
16771
|
+
if (o && (o.open(), a = this._dialogs.get(l)), !a) throw new Error(`Dialog "${l}" not found. Ensure an <ml-dialog #${l}> exists in the DOM.`);
|
|
16772
|
+
return a.dialogRef;
|
|
16773
|
+
}
|
|
16769
16774
|
return a.dialogRef.open(), a.dialogRef;
|
|
16770
16775
|
}
|
|
16776
|
+
findDialogElement(t) {
|
|
16777
|
+
const r = document.querySelectorAll("ml-dialog");
|
|
16778
|
+
for (const l of r) if (l.hasAttribute(`#${t}`)) return l;
|
|
16779
|
+
return this.deepFindDialog(document.body, t);
|
|
16780
|
+
}
|
|
16781
|
+
deepFindDialog(t, r) {
|
|
16782
|
+
const l = t.shadowRoot;
|
|
16783
|
+
if (l) {
|
|
16784
|
+
const a = l.querySelector(`ml-dialog[\\#${r}]`);
|
|
16785
|
+
if (a) return a;
|
|
16786
|
+
for (const o of l.querySelectorAll("*")) {
|
|
16787
|
+
const s = this.deepFindDialog(o, r);
|
|
16788
|
+
if (s) return s;
|
|
16789
|
+
}
|
|
16790
|
+
}
|
|
16791
|
+
for (const a of t.querySelectorAll("*")) if (a.shadowRoot) {
|
|
16792
|
+
const o = this.deepFindDialog(a, r);
|
|
16793
|
+
if (o) return o;
|
|
16794
|
+
}
|
|
16795
|
+
return null;
|
|
16796
|
+
}
|
|
16771
16797
|
close(t, r) {
|
|
16772
16798
|
this._dialogs.has(t) && this._dialogs.get(t).dialogRef.close(r);
|
|
16773
16799
|
}
|
|
@@ -16787,12 +16813,6 @@ var nr, Re = class {
|
|
|
16787
16813
|
constructor() {
|
|
16788
16814
|
this._dialogID = Zl(), this._registered = !1;
|
|
16789
16815
|
}
|
|
16790
|
-
onCreate() {
|
|
16791
|
-
this.registerDialog();
|
|
16792
|
-
}
|
|
16793
|
-
onRender() {
|
|
16794
|
-
this.registerDialog();
|
|
16795
|
-
}
|
|
16796
16816
|
registerDialog() {
|
|
16797
16817
|
if (this._registered) return;
|
|
16798
16818
|
const t = this.elementRef.shadowRoot?.querySelector("dialog");
|
|
@@ -16802,7 +16822,7 @@ var nr, Re = class {
|
|
|
16802
16822
|
this._dialogService.removeDialog(this._dialogID);
|
|
16803
16823
|
}
|
|
16804
16824
|
open() {
|
|
16805
|
-
this._dialogRef.open();
|
|
16825
|
+
this.registerDialog(), this._dialogRef.open();
|
|
16806
16826
|
}
|
|
16807
16827
|
close(t) {
|
|
16808
16828
|
this._dialogRef.close(t);
|
|
@@ -16811,10 +16831,10 @@ var nr, Re = class {
|
|
|
16811
16831
|
return this.elementRef.getAttributeNames().find((t) => t.startsWith("#"))?.slice(1) ?? this._dialogID;
|
|
16812
16832
|
}
|
|
16813
16833
|
};
|
|
16814
|
-
g([H(Q),
|
|
16834
|
+
g([H(Q), F("design:type", typeof (nr = typeof Q < "u" && Q) == "function" ? nr : Object)], Re.prototype, "_dialogService", void 0);
|
|
16815
16835
|
Re = g([_({
|
|
16816
16836
|
selector: "ml-dialog",
|
|
16817
|
-
template:
|
|
16837
|
+
template: ji,
|
|
16818
16838
|
styles: qi,
|
|
16819
16839
|
attributes: []
|
|
16820
16840
|
})], Re);
|
|
@@ -19244,7 +19264,7 @@ export {
|
|
|
19244
19264
|
br as HeroSectionComponent,
|
|
19245
19265
|
ze as HttpBaseError,
|
|
19246
19266
|
qe as HttpClient,
|
|
19247
|
-
|
|
19267
|
+
je as HttpError,
|
|
19248
19268
|
Ut as IconComponent,
|
|
19249
19269
|
gs as Inject,
|
|
19250
19270
|
Z as Injectable,
|
|
@@ -19282,7 +19302,7 @@ export {
|
|
|
19282
19302
|
rr as SidebarGroupComponent,
|
|
19283
19303
|
lr as SidebarItemComponent,
|
|
19284
19304
|
Dr as SignalEffect,
|
|
19285
|
-
|
|
19305
|
+
j as SignalStoreService,
|
|
19286
19306
|
yr as SignupPageComponent,
|
|
19287
19307
|
bt as SliderComponent,
|
|
19288
19308
|
at as SpinnerComponent,
|
|
@@ -19303,12 +19323,12 @@ export {
|
|
|
19303
19323
|
vt as ToggleComponent,
|
|
19304
19324
|
pr as TooltipComponent,
|
|
19305
19325
|
Ks as Validators,
|
|
19306
|
-
|
|
19326
|
+
Fr as VirtualScroller,
|
|
19307
19327
|
$o as activityFeedItemStyles,
|
|
19308
19328
|
ko as activityFeedItemTemplate,
|
|
19309
19329
|
wo as activityFeedStyles,
|
|
19310
19330
|
xo as activityFeedTemplate,
|
|
19311
|
-
|
|
19331
|
+
Fl as allTokens,
|
|
19312
19332
|
dn as announce,
|
|
19313
19333
|
os as appShellStyles,
|
|
19314
19334
|
as as appShellTemplate,
|
|
@@ -19424,7 +19444,7 @@ export {
|
|
|
19424
19444
|
he as registerAttributeDirective,
|
|
19425
19445
|
Ne as render,
|
|
19426
19446
|
$ as repeat,
|
|
19427
|
-
|
|
19447
|
+
Fs as repeatRaw,
|
|
19428
19448
|
mn as resetStyles,
|
|
19429
19449
|
hl as routerLinkDirective,
|
|
19430
19450
|
za as selectStyles,
|
|
@@ -19444,7 +19464,7 @@ export {
|
|
|
19444
19464
|
Da as sliderStyles,
|
|
19445
19465
|
Aa as sliderTemplate,
|
|
19446
19466
|
Ml as spacingTokens,
|
|
19447
|
-
|
|
19467
|
+
Fi as stepPanelStyles,
|
|
19448
19468
|
Vi as stepPanelTemplate,
|
|
19449
19469
|
Li as stepStyles,
|
|
19450
19470
|
Ai as stepTemplate,
|
|
@@ -19464,12 +19484,12 @@ export {
|
|
|
19464
19484
|
Wa as toastStyles,
|
|
19465
19485
|
Ka as toastTemplate,
|
|
19466
19486
|
en as toggleTheme,
|
|
19467
|
-
|
|
19487
|
+
jl as tokensToCss,
|
|
19468
19488
|
ta as tooltipDirective,
|
|
19469
19489
|
Ll as transitionTokens,
|
|
19470
19490
|
Pl as typographyTokens,
|
|
19471
19491
|
Rs as unregisterAttributeDirective,
|
|
19472
|
-
|
|
19492
|
+
js as unsafeHTML,
|
|
19473
19493
|
un as visuallyHiddenStyles,
|
|
19474
19494
|
d as when
|
|
19475
19495
|
};
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare class DialogComponent implements IElementRef,
|
|
1
|
+
import type { OnDestroy, IElementRef } from '@melodicdev/core';
|
|
2
|
+
export declare class DialogComponent implements IElementRef, OnDestroy {
|
|
3
3
|
elementRef: HTMLElement;
|
|
4
4
|
private readonly _dialogService;
|
|
5
5
|
private _dialogID;
|
|
6
6
|
private _dialogEl;
|
|
7
7
|
private _dialogRef;
|
|
8
8
|
private _registered;
|
|
9
|
-
onCreate(): void;
|
|
10
|
-
onRender(): void;
|
|
11
9
|
private registerDialog;
|
|
12
10
|
onDestroy(): void;
|
|
13
11
|
open(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.component.d.ts","sourceRoot":"","sources":["../../../../src/components/overlays/dialog/dialog.component.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"dialog.component.d.ts","sourceRoot":"","sources":["../../../../src/components/overlays/dialog/dialog.component.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAK/D,qBAMa,eAAgB,YAAW,WAAW,EAAE,SAAS;IACtD,UAAU,EAAG,WAAW,CAAC;IAGhC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;IAEhD,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,WAAW,CAAS;IAE5B,OAAO,CAAC,cAAc;IAatB,SAAS,IAAI,IAAI;IAIjB,IAAI,IAAI,IAAI;IAKZ,KAAK,CAAC,CAAC,GAAG,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,IAAI;IAIpC,OAAO,CAAC,cAAc;CAQtB"}
|
|
@@ -17,12 +17,6 @@ let DialogComponent = class DialogComponent {
|
|
|
17
17
|
this._dialogID = newID();
|
|
18
18
|
this._registered = false;
|
|
19
19
|
}
|
|
20
|
-
onCreate() {
|
|
21
|
-
this.registerDialog();
|
|
22
|
-
}
|
|
23
|
-
onRender() {
|
|
24
|
-
this.registerDialog();
|
|
25
|
-
}
|
|
26
20
|
registerDialog() {
|
|
27
21
|
if (this._registered)
|
|
28
22
|
return;
|
|
@@ -39,6 +33,7 @@ let DialogComponent = class DialogComponent {
|
|
|
39
33
|
this._dialogService.removeDialog(this._dialogID);
|
|
40
34
|
}
|
|
41
35
|
open() {
|
|
36
|
+
this.registerDialog();
|
|
42
37
|
this._dialogRef.open();
|
|
43
38
|
}
|
|
44
39
|
close(result) {
|
|
@@ -7,6 +7,8 @@ export declare class DialogService {
|
|
|
7
7
|
removeDialog(dialogID: UniqueID): void;
|
|
8
8
|
open<TResult = unknown, TData = unknown>(dialogComponent: new (...args: any[]) => any, config?: IDialogConfig<TData>): DialogRef<TResult, TData>;
|
|
9
9
|
open<TResult = unknown, TData = unknown>(dialogID: UniqueID): DialogRef<TResult, TData>;
|
|
10
|
+
private findDialogElement;
|
|
11
|
+
private deepFindDialog;
|
|
10
12
|
close<T = unknown>(dialogID: UniqueID, result?: T): void;
|
|
11
13
|
private cleanUpDialog;
|
|
12
14
|
private mountDialog;
|
|
@@ -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;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAwC;IAEjE,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,GAAG,SAAS;IAerE,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAItC,IAAI,CAAC,OAAO,GAAG,OAAO,EAAE,KAAK,GAAG,OAAO,EAAE,eAAe,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,MAAM,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC;IAChJ,IAAI,CAAC,OAAO,GAAG,OAAO,EAAE,KAAK,GAAG,OAAO,EAAE,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC;
|
|
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;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAwC;IAEjE,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,GAAG,SAAS;IAerE,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAItC,IAAI,CAAC,OAAO,GAAG,OAAO,EAAE,KAAK,GAAG,OAAO,EAAE,eAAe,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,MAAM,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC;IAChJ,IAAI,CAAC,OAAO,GAAG,OAAO,EAAE,KAAK,GAAG,OAAO,EAAE,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC;IA4CvF,OAAO,CAAC,iBAAiB;IAczB,OAAO,CAAC,cAAc;IAuBtB,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"}
|
|
@@ -40,9 +40,54 @@ let DialogService = class DialogService {
|
|
|
40
40
|
}
|
|
41
41
|
dialogComponent.component.onDialogRefSet?.(dialogElements.dialogRef);
|
|
42
42
|
}
|
|
43
|
+
// Lazy resolution: if the dialog wasn't registered during lifecycle hooks
|
|
44
|
+
// (e.g. nested router-outlet), find it in the DOM and trigger registration.
|
|
45
|
+
if (!dialogElements) {
|
|
46
|
+
const mlDialog = this.findDialogElement(dialogID);
|
|
47
|
+
if (mlDialog) {
|
|
48
|
+
mlDialog.open();
|
|
49
|
+
dialogElements = this._dialogs.get(dialogID);
|
|
50
|
+
}
|
|
51
|
+
if (!dialogElements) {
|
|
52
|
+
throw new Error(`Dialog "${dialogID}" not found. Ensure an <ml-dialog #${dialogID}> exists in the DOM.`);
|
|
53
|
+
}
|
|
54
|
+
return dialogElements.dialogRef;
|
|
55
|
+
}
|
|
43
56
|
dialogElements.dialogRef.open();
|
|
44
57
|
return dialogElements.dialogRef;
|
|
45
58
|
}
|
|
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
|
+
return this.deepFindDialog(document.body, dialogID);
|
|
69
|
+
}
|
|
70
|
+
deepFindDialog(root, dialogID) {
|
|
71
|
+
const shadowRoot = root.shadowRoot;
|
|
72
|
+
if (shadowRoot) {
|
|
73
|
+
const match = shadowRoot.querySelector(`ml-dialog[\\#${dialogID}]`);
|
|
74
|
+
if (match)
|
|
75
|
+
return match;
|
|
76
|
+
for (const child of shadowRoot.querySelectorAll('*')) {
|
|
77
|
+
const result = this.deepFindDialog(child, dialogID);
|
|
78
|
+
if (result)
|
|
79
|
+
return result;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
for (const child of root.querySelectorAll('*')) {
|
|
83
|
+
if (child.shadowRoot) {
|
|
84
|
+
const result = this.deepFindDialog(child, dialogID);
|
|
85
|
+
if (result)
|
|
86
|
+
return result;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
46
91
|
close(dialogID, result) {
|
|
47
92
|
if (this._dialogs.has(dialogID)) {
|
|
48
93
|
const dialogElements = this._dialogs.get(dialogID);
|