zs3-ui-components 1.2.2 → 1.2.3
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.
Potentially problematic release.
This version of zs3-ui-components might be problematic. Click here for more details.
- package/README.md +26 -3
- package/dist/components/zs3-BaseComponent.d.ts +18 -12
- package/dist/index.js +155 -173
- package/package.json +1 -1
- package/dist/components/zs3-BaseComponent.senseRouter.d.ts +0 -318
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ class T {
|
|
|
14
14
|
* @returns {string} Library version.
|
|
15
15
|
*/
|
|
16
16
|
static version() {
|
|
17
|
-
return "1.2.
|
|
17
|
+
return "1.2.3";
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* Creates a ZS3 instance from an HTMLElement.
|
|
@@ -427,7 +427,7 @@ class T {
|
|
|
427
427
|
return this.list[0]?.cloneNode(t) ?? null;
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
|
-
const
|
|
430
|
+
const V = (e, t) => e != null && e.length > 0 ? new T(e, t) : null, Ce = () => ({
|
|
431
431
|
userAgent: navigator.userAgent,
|
|
432
432
|
language: navigator.language,
|
|
433
433
|
platform: navigator.platform,
|
|
@@ -453,16 +453,16 @@ class Et {
|
|
|
453
453
|
constructor() {
|
|
454
454
|
this.start = (t, s, i = document) => {
|
|
455
455
|
const r = `${t}:${s}`, o = this.debugging.get(r) ?? [];
|
|
456
|
-
o.some((c) => c.root === i) || (
|
|
456
|
+
o.some((c) => c.root === i) || (V(t, i)?.addEvent(s, this.doDebug), o.push({ selector: t, eventType: s, root: i }), this.debugging.set(r, o));
|
|
457
457
|
}, this.stop = (t, s, i = document) => {
|
|
458
458
|
const r = `${t}:${s}`, o = this.debugging.get(r);
|
|
459
459
|
if (!o) return;
|
|
460
460
|
const a = o.findIndex((c) => c.root === i);
|
|
461
|
-
a !== -1 && (
|
|
461
|
+
a !== -1 && (V(t, i)?.removeEvent(s, this.doDebug), o.splice(a, 1), o.length === 0 && this.debugging.delete(r));
|
|
462
462
|
}, this.stopAll = () => {
|
|
463
463
|
this.debugging.forEach((t) => {
|
|
464
464
|
t.forEach(({ selector: s, eventType: i, root: r }) => {
|
|
465
|
-
|
|
465
|
+
V(s, r)?.removeEvent(i, this.doDebug);
|
|
466
466
|
});
|
|
467
467
|
}), this.debugging.clear();
|
|
468
468
|
}, this.doDebug = (t) => {
|
|
@@ -645,12 +645,12 @@ class Ae {
|
|
|
645
645
|
};
|
|
646
646
|
}
|
|
647
647
|
}
|
|
648
|
-
const Mt = new xt(),
|
|
649
|
-
typeof window < "u" && (window.$ =
|
|
648
|
+
const Mt = new xt(), $t = new Et(), lt = new _t(), X = new Tt();
|
|
649
|
+
typeof window < "u" && (window.$ = V, window.log = lt, window.debug = $t, window.storage = X, window.params = Mt);
|
|
650
650
|
window.addEventListener("load", () => {
|
|
651
651
|
lt.success("ZS3 v" + T.version() + " loaded");
|
|
652
652
|
});
|
|
653
|
-
class
|
|
653
|
+
class Lt extends CustomEvent {
|
|
654
654
|
constructor(t) {
|
|
655
655
|
super("zs3-theme-change", {
|
|
656
656
|
bubbles: !0,
|
|
@@ -660,12 +660,12 @@ class Ct extends CustomEvent {
|
|
|
660
660
|
});
|
|
661
661
|
}
|
|
662
662
|
}
|
|
663
|
-
class
|
|
663
|
+
class Y {
|
|
664
664
|
constructor() {
|
|
665
665
|
this.currentTheme = "light", this.STORAGE_KEY = "zs3-theme", this.loadSavedTheme(), this.setupSystemThemeListener();
|
|
666
666
|
}
|
|
667
667
|
static getInstance() {
|
|
668
|
-
return
|
|
668
|
+
return Y.instance || (Y.instance = new Y()), Y.instance;
|
|
669
669
|
}
|
|
670
670
|
/**
|
|
671
671
|
* Carrega el tema guardat o usa el del sistema
|
|
@@ -697,7 +697,7 @@ class K {
|
|
|
697
697
|
this.applySystemTheme();
|
|
698
698
|
return;
|
|
699
699
|
}
|
|
700
|
-
document.body.setAttribute("data-theme", t), window.dispatchEvent(new
|
|
700
|
+
document.body.setAttribute("data-theme", t), window.dispatchEvent(new Lt(t));
|
|
701
701
|
}
|
|
702
702
|
/**
|
|
703
703
|
* Estableix un nou tema
|
|
@@ -740,9 +740,9 @@ class K {
|
|
|
740
740
|
];
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
|
-
const G =
|
|
743
|
+
const G = Y.getInstance();
|
|
744
744
|
typeof window < "u" && (window.themeManager = G);
|
|
745
|
-
function
|
|
745
|
+
function ke(e) {
|
|
746
746
|
return class extends e {
|
|
747
747
|
connectedCallback() {
|
|
748
748
|
super.connectedCallback && super.connectedCallback(), this._themeChangeHandler = this.onThemeChange.bind(this), window.addEventListener("zs3-theme-change", this._themeChangeHandler);
|
|
@@ -756,7 +756,7 @@ function Se(e) {
|
|
|
756
756
|
}
|
|
757
757
|
};
|
|
758
758
|
}
|
|
759
|
-
function
|
|
759
|
+
function Se(e) {
|
|
760
760
|
return getComputedStyle(document.documentElement).getPropertyValue(`--${e}`).trim();
|
|
761
761
|
}
|
|
762
762
|
function Pe(e, t) {
|
|
@@ -769,7 +769,7 @@ function bt(e) {
|
|
|
769
769
|
typeof window < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", () => {
|
|
770
770
|
bt();
|
|
771
771
|
}) : bt());
|
|
772
|
-
class
|
|
772
|
+
class Ct {
|
|
773
773
|
constructor() {
|
|
774
774
|
this.handlers = /* @__PURE__ */ new Map();
|
|
775
775
|
}
|
|
@@ -860,7 +860,7 @@ class $t {
|
|
|
860
860
|
this.handlers.clear();
|
|
861
861
|
}
|
|
862
862
|
}
|
|
863
|
-
const De = new
|
|
863
|
+
const De = new Ct();
|
|
864
864
|
class At {
|
|
865
865
|
constructor() {
|
|
866
866
|
this.registry = /* @__PURE__ */ new Map();
|
|
@@ -1357,7 +1357,7 @@ const ot = {
|
|
|
1357
1357
|
"zs3.recover.submit": "发送"
|
|
1358
1358
|
}
|
|
1359
1359
|
}, at = "ca", nt = "en", gt = /* @__PURE__ */ new Map();
|
|
1360
|
-
function
|
|
1360
|
+
function kt() {
|
|
1361
1361
|
return new Map(gt);
|
|
1362
1362
|
}
|
|
1363
1363
|
function x(e) {
|
|
@@ -1365,7 +1365,7 @@ function x(e) {
|
|
|
1365
1365
|
return customElements.get(e) || (customElements.define(e, t), gt.set(e, t)), t;
|
|
1366
1366
|
};
|
|
1367
1367
|
}
|
|
1368
|
-
class
|
|
1368
|
+
class St {
|
|
1369
1369
|
constructor() {
|
|
1370
1370
|
this.locale = at, this.fallbackLocale = nt, this.translations = {}, this.STORAGE_KEY = "zs3-locale", this.frameworkDefaultsLoaded = !1, this.init = (t) => {
|
|
1371
1371
|
t?.locale && (this.locale = t.locale), t?.fallbackLocale && (this.fallbackLocale = t.fallbackLocale), t?.translations && this.loadMultiple(t.translations);
|
|
@@ -1410,7 +1410,7 @@ class kt {
|
|
|
1410
1410
|
}, this.updateRoot = (t) => {
|
|
1411
1411
|
this.updateElementsInRoot(t);
|
|
1412
1412
|
}, this.updateElements = () => {
|
|
1413
|
-
this.updateElementsInRoot(document),
|
|
1413
|
+
this.updateElementsInRoot(document), kt().forEach((t, s) => {
|
|
1414
1414
|
document.querySelectorAll(s).forEach((i) => {
|
|
1415
1415
|
const r = i.shadowRoot;
|
|
1416
1416
|
r && this.updateElementsInRoot(r);
|
|
@@ -1469,9 +1469,9 @@ class kt {
|
|
|
1469
1469
|
"forceUpdate" in t && typeof t.forceUpdate == "function" && t.forceUpdate();
|
|
1470
1470
|
}
|
|
1471
1471
|
}
|
|
1472
|
-
const y = new
|
|
1472
|
+
const y = new St();
|
|
1473
1473
|
typeof window < "u" && (window.i18n = y);
|
|
1474
|
-
class
|
|
1474
|
+
class K extends Error {
|
|
1475
1475
|
constructor(t, s, i, r, o) {
|
|
1476
1476
|
super(t), this.status = s, this.statusText = i, this.body = r, this.config = o, this.name = "HttpError";
|
|
1477
1477
|
}
|
|
@@ -1563,7 +1563,7 @@ class Oe {
|
|
|
1563
1563
|
try {
|
|
1564
1564
|
return await this.executeFetch(t);
|
|
1565
1565
|
} catch (r) {
|
|
1566
|
-
if (r instanceof
|
|
1566
|
+
if (r instanceof K)
|
|
1567
1567
|
for (const a of this.errorInterceptors)
|
|
1568
1568
|
try {
|
|
1569
1569
|
return await a(r);
|
|
@@ -1585,7 +1585,7 @@ class Oe {
|
|
|
1585
1585
|
const o = await fetch(t.url, r);
|
|
1586
1586
|
if (!o.ok) {
|
|
1587
1587
|
const l = await this.parseBody(o);
|
|
1588
|
-
throw new
|
|
1588
|
+
throw new K(`HTTP ${o.status}: ${o.statusText}`, o.status, o.statusText, l, t);
|
|
1589
1589
|
}
|
|
1590
1590
|
let c = {
|
|
1591
1591
|
data: await this.parseBody(o),
|
|
@@ -1598,7 +1598,7 @@ class Oe {
|
|
|
1598
1598
|
c = await l(c);
|
|
1599
1599
|
return c;
|
|
1600
1600
|
} catch (o) {
|
|
1601
|
-
throw o instanceof
|
|
1601
|
+
throw o instanceof K ? o : o instanceof DOMException && o.name === "AbortError" ? new K(`Request timeout after ${t.timeout}ms`, 408, "Request Timeout", null, t) : new K(`Network error: ${o.message}`, 0, "Network Error", null, t);
|
|
1602
1602
|
} finally {
|
|
1603
1603
|
clearTimeout(i);
|
|
1604
1604
|
}
|
|
@@ -1618,7 +1618,7 @@ class Oe {
|
|
|
1618
1618
|
}
|
|
1619
1619
|
}
|
|
1620
1620
|
isRetryable(t) {
|
|
1621
|
-
return t instanceof
|
|
1621
|
+
return t instanceof K ? t.isServerError || t.isTimeout || t.status === 429 : !0;
|
|
1622
1622
|
}
|
|
1623
1623
|
delay(t) {
|
|
1624
1624
|
return new Promise((s) => setTimeout(s, t));
|
|
@@ -1639,7 +1639,7 @@ const Pt = (e, t = {}) => {
|
|
|
1639
1639
|
verticalPosition: l
|
|
1640
1640
|
} = t, m = e.parentElement, b = m === document.body || m === document.documentElement;
|
|
1641
1641
|
return b || Dt(e), e.classList.add(`float-${i}`), e.style.position = b ? "fixed" : "absolute", e.style.zIndex = "1000", e.style.transition = "none", requestAnimationFrame(() => {
|
|
1642
|
-
const g = e.getBoundingClientRect(), p = 1 - r,
|
|
1642
|
+
const g = e.getBoundingClientRect(), p = 1 - r, C = i === "top" || i === "bottom" || i === "left" || i === "right" ? i : "top";
|
|
1643
1643
|
switch (i) {
|
|
1644
1644
|
case "top":
|
|
1645
1645
|
e.style.top = `${-g.height * p + o}px`, e.style.bottom = "", e.style.left = c || "50%", e.style.right = "", e.style.transform = c ? "" : "translateX(-50%)";
|
|
@@ -1655,7 +1655,7 @@ const Pt = (e, t = {}) => {
|
|
|
1655
1655
|
break;
|
|
1656
1656
|
}
|
|
1657
1657
|
requestAnimationFrame(() => {
|
|
1658
|
-
e.style.transition = `${
|
|
1658
|
+
e.style.transition = `${C} ${a}s ease`;
|
|
1659
1659
|
}), Ht(
|
|
1660
1660
|
e,
|
|
1661
1661
|
i,
|
|
@@ -1752,31 +1752,31 @@ const Pt = (e, t = {}) => {
|
|
|
1752
1752
|
if (!r)
|
|
1753
1753
|
return console.warn("move: container must have a parent element"), null;
|
|
1754
1754
|
window.getComputedStyle(r).position === "static" && (r.style.position = "relative"), t.style.position = "absolute";
|
|
1755
|
-
let a = !1, c = 0, l = 0, m = 0, b = 0, g = 0, p = 0,
|
|
1756
|
-
const tt = (
|
|
1757
|
-
if (
|
|
1758
|
-
a = !0, c =
|
|
1755
|
+
let a = !1, c = 0, l = 0, m = 0, b = 0, g = 0, p = 0, C = /* @__PURE__ */ new Set();
|
|
1756
|
+
const tt = (k) => {
|
|
1757
|
+
if (k.button !== 0) return;
|
|
1758
|
+
a = !0, c = k.clientX, l = k.clientY;
|
|
1759
1759
|
const et = window.getComputedStyle(t);
|
|
1760
|
-
m = parseFloat(et.left) || 0, b = parseFloat(et.top) || 0, g = m, p = b,
|
|
1760
|
+
m = parseFloat(et.left) || 0, b = parseFloat(et.top) || 0, g = m, p = b, C.clear(), t.classList.add("zs3-dragging"), s.style.cursor = "grabbing", k.preventDefault(), J(t, "zs3-move-start", {
|
|
1761
1761
|
direction: i,
|
|
1762
1762
|
element: t,
|
|
1763
1763
|
startX: m,
|
|
1764
1764
|
startY: b
|
|
1765
|
-
}), document.addEventListener("mousemove", D), document.addEventListener("mouseup",
|
|
1766
|
-
}, D = (
|
|
1765
|
+
}), document.addEventListener("mousemove", D), document.addEventListener("mouseup", N), document.addEventListener("keydown", U);
|
|
1766
|
+
}, D = (k) => {
|
|
1767
1767
|
if (!a) return;
|
|
1768
|
-
const et =
|
|
1768
|
+
const et = k.clientX - c, wt = k.clientY - l, ht = r.getBoundingClientRect(), ut = t.getBoundingClientRect();
|
|
1769
1769
|
let B = m + et, F = b + wt;
|
|
1770
|
-
const pt = ht.width - ut.width, mt = ht.height - ut.height,
|
|
1771
|
-
B <= 0 && (B = 0,
|
|
1772
|
-
|
|
1770
|
+
const pt = ht.width - ut.width, mt = ht.height - ut.height, q = /* @__PURE__ */ new Set();
|
|
1771
|
+
B <= 0 && (B = 0, q.add("left")), B >= pt && (B = pt, q.add("right")), F <= 0 && (F = 0, q.add("top")), F >= mt && (F = mt, q.add("bottom")), q.forEach((ft) => {
|
|
1772
|
+
C.has(ft) || J(t, "zs3-move-boundary", {
|
|
1773
1773
|
direction: i,
|
|
1774
1774
|
element: t,
|
|
1775
1775
|
x: B,
|
|
1776
1776
|
y: F,
|
|
1777
1777
|
boundary: ft
|
|
1778
1778
|
});
|
|
1779
|
-
}),
|
|
1779
|
+
}), C = q, (i === "x" || i === "xy") && (t.style.left = `${B}px`, g = B), (i === "y" || i === "xy") && (t.style.top = `${F}px`, p = F), J(t, "zs3-move", {
|
|
1780
1780
|
direction: i,
|
|
1781
1781
|
element: t,
|
|
1782
1782
|
x: g,
|
|
@@ -1784,20 +1784,20 @@ const Pt = (e, t = {}) => {
|
|
|
1784
1784
|
deltaX: g - m,
|
|
1785
1785
|
deltaY: p - b
|
|
1786
1786
|
});
|
|
1787
|
-
},
|
|
1787
|
+
}, N = () => {
|
|
1788
1788
|
a && (a = !1, t.classList.remove("zs3-dragging"), s.style.cursor = "grab", J(t, "zs3-move-end", {
|
|
1789
1789
|
direction: i,
|
|
1790
1790
|
element: t,
|
|
1791
1791
|
endX: g,
|
|
1792
1792
|
endY: p
|
|
1793
|
-
}), document.removeEventListener("mousemove", D), document.removeEventListener("mouseup",
|
|
1794
|
-
},
|
|
1795
|
-
|
|
1793
|
+
}), document.removeEventListener("mousemove", D), document.removeEventListener("mouseup", N), document.removeEventListener("keydown", U));
|
|
1794
|
+
}, U = (k) => {
|
|
1795
|
+
k.key === "Escape" && a && (a = !1, t.classList.remove("zs3-dragging"), s.style.cursor = "grab", (i === "x" || i === "xy") && (t.style.left = `${m}px`), (i === "y" || i === "xy") && (t.style.top = `${b}px`), J(t, "zs3-move-cancel", {
|
|
1796
1796
|
direction: i,
|
|
1797
1797
|
element: t
|
|
1798
|
-
}), document.removeEventListener("mousemove", D), document.removeEventListener("mouseup",
|
|
1798
|
+
}), document.removeEventListener("mousemove", D), document.removeEventListener("mouseup", N), document.removeEventListener("keydown", U));
|
|
1799
1799
|
}, A = s;
|
|
1800
|
-
return A._moveMouseDownHandler && s.removeEventListener("mousedown", A._moveMouseDownHandler), A._moveMouseDownHandler = tt, A._moveMouseMoveHandler = D, A._moveMouseUpHandler =
|
|
1800
|
+
return A._moveMouseDownHandler && s.removeEventListener("mousedown", A._moveMouseDownHandler), A._moveMouseDownHandler = tt, A._moveMouseMoveHandler = D, A._moveMouseUpHandler = N, A._moveKeyDownHandler = U, A._moveEnabled = !0, A._moveDirection = i, A._moveComponent = t, s.addEventListener("mousedown", tt), s.style.cursor = "grab", t;
|
|
1801
1801
|
}, Bt = (e) => {
|
|
1802
1802
|
const t = e;
|
|
1803
1803
|
t._moveMouseDownHandler && (e.removeEventListener("mousedown", t._moveMouseDownHandler), t._moveMouseDownHandler = void 0), t._moveMouseMoveHandler = void 0, t._moveMouseUpHandler = void 0, t._moveKeyDownHandler = void 0, t._moveEnabled = !1, t._moveDirection = void 0, t._moveComponent = void 0, e.style.cursor = "";
|
|
@@ -1812,7 +1812,7 @@ const Pt = (e, t = {}) => {
|
|
|
1812
1812
|
}), o = s?.getAttribute(t);
|
|
1813
1813
|
o !== null && new Function("event", o)(r), s?.dispatchEvent(r);
|
|
1814
1814
|
};
|
|
1815
|
-
class
|
|
1815
|
+
class S extends HTMLElement {
|
|
1816
1816
|
/**
|
|
1817
1817
|
* Initializes the base component
|
|
1818
1818
|
* @param options - Configuration options for the component
|
|
@@ -1831,7 +1831,7 @@ class k extends HTMLElement {
|
|
|
1831
1831
|
slotAssignment: this._options.slotAssignment,
|
|
1832
1832
|
clonable: this._options.clonable,
|
|
1833
1833
|
serializable: this._options.serializable
|
|
1834
|
-
})), this.initialize(), this.emitLifecycleEvent("zs3-built", { phase: "complete" }), this.$ = (s) =>
|
|
1834
|
+
})), this.initialize(), this.emitLifecycleEvent("zs3-built", { phase: "complete" }), this.$ = (s) => V(s, this.shadowRoot ?? this._container ?? void 0), this.$$ = (s) => V(s, this.shadowRoot ?? this._container ?? void 0).$$;
|
|
1835
1835
|
}
|
|
1836
1836
|
/**
|
|
1837
1837
|
* Initialize component (called in constructor)
|
|
@@ -1845,22 +1845,6 @@ class k extends HTMLElement {
|
|
|
1845
1845
|
get root() {
|
|
1846
1846
|
return this._shadowRoot ?? this;
|
|
1847
1847
|
}
|
|
1848
|
-
/**
|
|
1849
|
-
* Query selector within the component's root
|
|
1850
|
-
* @param selector - CSS selector to query
|
|
1851
|
-
* @returns Found element or null
|
|
1852
|
-
*/
|
|
1853
|
-
qs(t) {
|
|
1854
|
-
return this.root.querySelector(t);
|
|
1855
|
-
}
|
|
1856
|
-
/**
|
|
1857
|
-
* Query all matching elements within the component's root
|
|
1858
|
-
* @param selector - CSS selector to query
|
|
1859
|
-
* @returns NodeList of found elements
|
|
1860
|
-
*/
|
|
1861
|
-
qsAll(t) {
|
|
1862
|
-
return this.root.querySelectorAll(t);
|
|
1863
|
-
}
|
|
1864
1848
|
/**
|
|
1865
1849
|
* Register an attribute change handler
|
|
1866
1850
|
* @param attributeName - Name of the attribute to observe
|
|
@@ -1909,7 +1893,7 @@ class k extends HTMLElement {
|
|
|
1909
1893
|
"log",
|
|
1910
1894
|
"window",
|
|
1911
1895
|
b
|
|
1912
|
-
).call(this, l, s,
|
|
1896
|
+
).call(this, l, s, V, lt, window), m;
|
|
1913
1897
|
}
|
|
1914
1898
|
/**
|
|
1915
1899
|
* Emit lifecycle event (internal use)
|
|
@@ -1982,10 +1966,10 @@ class k extends HTMLElement {
|
|
|
1982
1966
|
*/
|
|
1983
1967
|
applyMoveEffect() {
|
|
1984
1968
|
if (!this._mounted || !this._moveContainerSelector) return;
|
|
1985
|
-
const t = this.getAttribute("move"), s = this._moveContainerSelector === ":host" ? this : this
|
|
1969
|
+
const t = this.getAttribute("move"), s = this._moveContainerSelector === ":host" ? this : this.$(this._moveContainerSelector).$;
|
|
1986
1970
|
if (!s) return;
|
|
1987
1971
|
let i;
|
|
1988
|
-
this._moveDragSelector ? i = this._moveDragSelector === ":host" ? this : this
|
|
1972
|
+
this._moveDragSelector ? i = this._moveDragSelector === ":host" ? this : this.$(this._moveDragSelector).$ : i = s, i && (t && ["x", "y", "xy"].includes(t) ? Ot({ container: s, dragHandle: i, direction: t }) : Bt(i));
|
|
1989
1973
|
}
|
|
1990
1974
|
/**
|
|
1991
1975
|
* Request an animation frame update
|
|
@@ -2236,9 +2220,9 @@ function Vt(e, t) {
|
|
|
2236
2220
|
case "string":
|
|
2237
2221
|
return It(e, t.default);
|
|
2238
2222
|
case "boolean":
|
|
2239
|
-
return
|
|
2223
|
+
return jt(e, t.default ?? !1);
|
|
2240
2224
|
case "number":
|
|
2241
|
-
return
|
|
2225
|
+
return Nt(e, t.default ?? 0);
|
|
2242
2226
|
}
|
|
2243
2227
|
}
|
|
2244
2228
|
function It(e, t) {
|
|
@@ -2262,7 +2246,7 @@ function It(e, t) {
|
|
|
2262
2246
|
configurable: !0
|
|
2263
2247
|
};
|
|
2264
2248
|
}
|
|
2265
|
-
function
|
|
2249
|
+
function jt(e, t) {
|
|
2266
2250
|
return {
|
|
2267
2251
|
get() {
|
|
2268
2252
|
return this.getBooleanAttribute(e, t);
|
|
@@ -2274,7 +2258,7 @@ function qt(e, t) {
|
|
|
2274
2258
|
configurable: !0
|
|
2275
2259
|
};
|
|
2276
2260
|
}
|
|
2277
|
-
function
|
|
2261
|
+
function Nt(e, t) {
|
|
2278
2262
|
return {
|
|
2279
2263
|
get() {
|
|
2280
2264
|
return this.getNumberAttribute(e, t);
|
|
@@ -2286,10 +2270,10 @@ function jt(e, t) {
|
|
|
2286
2270
|
configurable: !0
|
|
2287
2271
|
};
|
|
2288
2272
|
}
|
|
2289
|
-
var
|
|
2290
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
2273
|
+
var Ut = Object.defineProperty, qt = Object.getOwnPropertyDescriptor, I = (e, t, s, i) => {
|
|
2274
|
+
for (var r = i > 1 ? void 0 : i ? qt(t, s) : t, o = e.length - 1, a; o >= 0; o--)
|
|
2291
2275
|
(a = e[o]) && (r = (i ? a(t, s, r) : a(r)) || r);
|
|
2292
|
-
return i && r &&
|
|
2276
|
+
return i && r && Ut(t, s, r), r;
|
|
2293
2277
|
};
|
|
2294
2278
|
const Kt = [
|
|
2295
2279
|
"name",
|
|
@@ -2301,7 +2285,7 @@ const Kt = [
|
|
|
2301
2285
|
"clickable",
|
|
2302
2286
|
"i18n-aria-label"
|
|
2303
2287
|
];
|
|
2304
|
-
let z = class extends
|
|
2288
|
+
let z = class extends S {
|
|
2305
2289
|
/**
|
|
2306
2290
|
* Initializes the icon component
|
|
2307
2291
|
*/
|
|
@@ -2337,7 +2321,7 @@ let z = class extends k {
|
|
|
2337
2321
|
* Setup event listeners with automatic cleanup
|
|
2338
2322
|
*/
|
|
2339
2323
|
setupEventListeners() {
|
|
2340
|
-
const e = this
|
|
2324
|
+
const e = this.$(".icon-container").$;
|
|
2341
2325
|
e && this.clickable && this.addManagedEventListener(e, "click", (t) => {
|
|
2342
2326
|
this.emit("zs3-icon-click", {
|
|
2343
2327
|
icon: this,
|
|
@@ -2568,25 +2552,25 @@ z._iconPaths = {
|
|
|
2568
2552
|
check: '<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12l5 5l10 -10" />',
|
|
2569
2553
|
x: '<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12" /><path d="M6 6l12 12" />'
|
|
2570
2554
|
};
|
|
2571
|
-
|
|
2555
|
+
I([
|
|
2572
2556
|
n("name", { type: "string" })
|
|
2573
2557
|
], z.prototype, "name", 2);
|
|
2574
|
-
|
|
2558
|
+
I([
|
|
2575
2559
|
n("color", { type: "string" })
|
|
2576
2560
|
], z.prototype, "color", 2);
|
|
2577
|
-
|
|
2561
|
+
I([
|
|
2578
2562
|
n("rotate", { type: "number", default: 0 })
|
|
2579
2563
|
], z.prototype, "rotate", 2);
|
|
2580
|
-
|
|
2564
|
+
I([
|
|
2581
2565
|
n("flip", { type: "string" })
|
|
2582
2566
|
], z.prototype, "flip", 2);
|
|
2583
|
-
|
|
2567
|
+
I([
|
|
2584
2568
|
n("clickable", { type: "boolean" })
|
|
2585
2569
|
], z.prototype, "clickable", 2);
|
|
2586
|
-
|
|
2570
|
+
I([
|
|
2587
2571
|
n("i18n-aria-label", { type: "string" })
|
|
2588
2572
|
], z.prototype, "i18nAriaLabel", 2);
|
|
2589
|
-
z =
|
|
2573
|
+
z = I([
|
|
2590
2574
|
x("zs3-icon"),
|
|
2591
2575
|
E(Kt)
|
|
2592
2576
|
], z);
|
|
@@ -2614,7 +2598,7 @@ const Jt = [
|
|
|
2614
2598
|
"zs3-float-hide-start",
|
|
2615
2599
|
"zs3-float-hide-end"
|
|
2616
2600
|
];
|
|
2617
|
-
let f = class extends
|
|
2601
|
+
let f = class extends S {
|
|
2618
2602
|
/**
|
|
2619
2603
|
* Initializes the button component
|
|
2620
2604
|
*/
|
|
@@ -2664,14 +2648,14 @@ let f = class extends k {
|
|
|
2664
2648
|
* Setup event listeners with automatic cleanup
|
|
2665
2649
|
*/
|
|
2666
2650
|
setupEventListeners() {
|
|
2667
|
-
const e = this
|
|
2651
|
+
const e = this.$("button").$;
|
|
2668
2652
|
e && (this._buttonElement = e, this.addManagedEventListener(e, "click", (s) => {
|
|
2669
2653
|
s.stopPropagation(), s.preventDefault(), this.emit("zs3-click", {
|
|
2670
2654
|
button: this,
|
|
2671
2655
|
originalEvent: s
|
|
2672
2656
|
});
|
|
2673
2657
|
}));
|
|
2674
|
-
const t = this
|
|
2658
|
+
const t = this.$(".icon-container").$;
|
|
2675
2659
|
t && this.addManagedEventListener(t, "click", (s) => {
|
|
2676
2660
|
this.emit("zs3-icon-click", {
|
|
2677
2661
|
button: this,
|
|
@@ -2695,7 +2679,7 @@ let f = class extends k {
|
|
|
2695
2679
|
* Update button content (text and icon)
|
|
2696
2680
|
*/
|
|
2697
2681
|
updateButtonContent() {
|
|
2698
|
-
const e = this
|
|
2682
|
+
const e = this.$("button").$;
|
|
2699
2683
|
if (!e) return;
|
|
2700
2684
|
const t = this.textContent?.trim() || this._textContent, s = this.getIconHTML(), i = this.position;
|
|
2701
2685
|
e.setAttribute("aria-label", this.getAttribute("aria-label") || t || "Button");
|
|
@@ -2707,7 +2691,7 @@ let f = class extends k {
|
|
|
2707
2691
|
* Update button CSS classes
|
|
2708
2692
|
*/
|
|
2709
2693
|
updateButtonClasses() {
|
|
2710
|
-
const e = this
|
|
2694
|
+
const e = this.$("button").$;
|
|
2711
2695
|
e && (e.className = "", this.variant && e.classList.add(`btn-${this.variant}`), this.size && e.classList.add(`btn-${this.size}`), this.rounded && e.classList.add("rounded"), this.loading && e.classList.add("loading"), this.disabled && e.classList.add("disabled"));
|
|
2712
2696
|
}
|
|
2713
2697
|
/**
|
|
@@ -3023,7 +3007,7 @@ const Qt = [
|
|
|
3023
3007
|
"i18n-accept-text",
|
|
3024
3008
|
"i18n-cancel-text"
|
|
3025
3009
|
];
|
|
3026
|
-
let u = class extends
|
|
3010
|
+
let u = class extends S {
|
|
3027
3011
|
/**
|
|
3028
3012
|
* Constructor
|
|
3029
3013
|
*/
|
|
@@ -3236,9 +3220,7 @@ let u = class extends k {
|
|
|
3236
3220
|
setupFormElements() {
|
|
3237
3221
|
this._buttons.forEach((e) => e.remove()), this._buttons = [];
|
|
3238
3222
|
for (const e of this._fields) {
|
|
3239
|
-
const t = this.
|
|
3240
|
-
`[data-field="${e.name}"]`
|
|
3241
|
-
);
|
|
3223
|
+
const t = this.$(`[data-field="${e.name}"]`).$;
|
|
3242
3224
|
t && (this.addManagedEventListener(t, "input", (s) => {
|
|
3243
3225
|
const i = s.target;
|
|
3244
3226
|
let r;
|
|
@@ -3269,7 +3251,7 @@ let u = class extends k {
|
|
|
3269
3251
|
* Setup accept and cancel buttons
|
|
3270
3252
|
*/
|
|
3271
3253
|
setupButtons() {
|
|
3272
|
-
const e = this
|
|
3254
|
+
const e = this.$(".form-buttons").$;
|
|
3273
3255
|
if (!e) return;
|
|
3274
3256
|
const t = new f();
|
|
3275
3257
|
if (t.textContent = this.i18nAcceptText ? this.t(this.i18nAcceptText) : this.acceptText || this.t("zs3.form.accept"), t.variant = this.acceptVariant, t.setAttribute("data-action", "accept"), this.addManagedEventListener(t, "zs3-click", () => {
|
|
@@ -3285,7 +3267,7 @@ let u = class extends k {
|
|
|
3285
3267
|
* Update field UI (show/hide error)
|
|
3286
3268
|
*/
|
|
3287
3269
|
updateFieldUI(e) {
|
|
3288
|
-
const t = this
|
|
3270
|
+
const t = this.$(`[data-field-container="${e}"]`).$, s = this.$(`[data-error="${e}"]`).$, i = this.$(`[data-field="${e}"]`).$;
|
|
3289
3271
|
if (!t || !i) return;
|
|
3290
3272
|
const r = this._errors[e], o = this._touched.has(e);
|
|
3291
3273
|
r && o ? (t.classList.add("has-error"), i.classList.add("invalid"), s && (s.textContent = r, s.style.display = "block")) : (t.classList.remove("has-error"), i.classList.remove("invalid"), s && (s.textContent = "", s.style.display = "none"));
|
|
@@ -3344,9 +3326,9 @@ let u = class extends k {
|
|
|
3344
3326
|
`;
|
|
3345
3327
|
break;
|
|
3346
3328
|
case "select": {
|
|
3347
|
-
const
|
|
3348
|
-
const
|
|
3349
|
-
return `<option value="${D.value}" ${
|
|
3329
|
+
const C = (e.options || []).map((D) => {
|
|
3330
|
+
const N = this.getTranslatedOptionLabel(D), U = i === D.value ? "selected" : "";
|
|
3331
|
+
return `<option value="${D.value}" ${U}>${N}</option>`;
|
|
3350
3332
|
}).join(""), tt = e.i18nPlaceholder ? `<option value="" disabled ${i ? "" : "selected"} data-i18n="${e.i18nPlaceholder}"></option>` : s ? `<option value="" disabled ${i ? "" : "selected"}>${s}</option>` : "";
|
|
3351
3333
|
p = `
|
|
3352
3334
|
<select
|
|
@@ -3355,13 +3337,13 @@ let u = class extends k {
|
|
|
3355
3337
|
${l}
|
|
3356
3338
|
>
|
|
3357
3339
|
${tt}
|
|
3358
|
-
${
|
|
3340
|
+
${C}
|
|
3359
3341
|
</select>
|
|
3360
3342
|
`;
|
|
3361
3343
|
break;
|
|
3362
3344
|
}
|
|
3363
3345
|
case "checkbox": {
|
|
3364
|
-
const
|
|
3346
|
+
const C = e.i18nLabel ? `<span class="checkbox-text" data-i18n="${e.i18nLabel}"></span>` : `<span class="checkbox-text">${t}</span>`;
|
|
3365
3347
|
p = `
|
|
3366
3348
|
<label class="checkbox-label">
|
|
3367
3349
|
<input
|
|
@@ -3370,7 +3352,7 @@ let u = class extends k {
|
|
|
3370
3352
|
${i ? "checked" : ""}
|
|
3371
3353
|
${l}
|
|
3372
3354
|
/>
|
|
3373
|
-
${
|
|
3355
|
+
${C}
|
|
3374
3356
|
</label>
|
|
3375
3357
|
`;
|
|
3376
3358
|
break;
|
|
@@ -3747,7 +3729,7 @@ let H = class extends u {
|
|
|
3747
3729
|
* Add register button
|
|
3748
3730
|
*/
|
|
3749
3731
|
addRegisterButton() {
|
|
3750
|
-
const e = this
|
|
3732
|
+
const e = this.$(".form-buttons").$;
|
|
3751
3733
|
if (!e) return;
|
|
3752
3734
|
const t = new f(), s = this.i18nRegisterText || "zs3.login.register";
|
|
3753
3735
|
t.textContent = this.t(s), t.variant = "secondary", t.setAttribute("data-action", "register"), this.addManagedEventListener(t, "zs3-click", () => {
|
|
@@ -3952,7 +3934,7 @@ Z = dt([
|
|
|
3952
3934
|
E(ne, { inherit: !0 })
|
|
3953
3935
|
], Z);
|
|
3954
3936
|
typeof window < "u" && (window.$RecoverPasswordForm = Z);
|
|
3955
|
-
var le = Object.defineProperty, ce = Object.getOwnPropertyDescriptor,
|
|
3937
|
+
var le = Object.defineProperty, ce = Object.getOwnPropertyDescriptor, j = (e, t, s, i) => {
|
|
3956
3938
|
for (var r = i > 1 ? void 0 : i ? ce(t, s) : t, o = e.length - 1, a; o >= 0; o--)
|
|
3957
3939
|
(a = e[o]) && (r = (i ? a(t, s, r) : a(r)) || r);
|
|
3958
3940
|
return i && r && le(t, s, r), r;
|
|
@@ -3965,7 +3947,7 @@ const de = [
|
|
|
3965
3947
|
"centered",
|
|
3966
3948
|
"scrollable"
|
|
3967
3949
|
];
|
|
3968
|
-
let M = class extends
|
|
3950
|
+
let M = class extends S {
|
|
3969
3951
|
/**
|
|
3970
3952
|
* Initializes the modal component
|
|
3971
3953
|
*/
|
|
@@ -3997,11 +3979,11 @@ let M = class extends k {
|
|
|
3997
3979
|
* Setup event listeners
|
|
3998
3980
|
*/
|
|
3999
3981
|
setupEventListeners() {
|
|
4000
|
-
const e = this
|
|
3982
|
+
const e = this.$(".modal-backdrop").$;
|
|
4001
3983
|
e && this.closeOnBackdrop && this.addManagedEventListener(e, "click", (s) => {
|
|
4002
3984
|
s.target === e && (this.emit("zs3-modal-backdrop-click", { modal: this }), this.hide());
|
|
4003
3985
|
});
|
|
4004
|
-
const t = this
|
|
3986
|
+
const t = this.$(".modal-container").$;
|
|
4005
3987
|
t && this.addManagedEventListener(t, "click", (s) => {
|
|
4006
3988
|
s.stopPropagation();
|
|
4007
3989
|
});
|
|
@@ -4068,7 +4050,7 @@ let M = class extends k {
|
|
|
4068
4050
|
</div>
|
|
4069
4051
|
</div>
|
|
4070
4052
|
`);
|
|
4071
|
-
const e = this
|
|
4053
|
+
const e = this.$(".modal-backdrop").$, t = this.$(".modal-container").$;
|
|
4072
4054
|
e && t && (t.classList.add(`size-${this.size}`), this.centered && e.classList.add("centered"), this.scrollable && t.classList.add("scrollable"), this._isVisible && (e.classList.add("visible"), t.classList.add("visible"))), this._mounted && this.setupEventListeners(), this.emitLifecycleEvent("zs3-rendered", { phase: "complete" });
|
|
4073
4055
|
}
|
|
4074
4056
|
/**
|
|
@@ -4234,7 +4216,7 @@ let M = class extends k {
|
|
|
4234
4216
|
hide() {
|
|
4235
4217
|
if (!this._isVisible) return;
|
|
4236
4218
|
this._isVisible = !1;
|
|
4237
|
-
const e = this
|
|
4219
|
+
const e = this.$(".modal-backdrop").$, t = this.$(".modal-container").$;
|
|
4238
4220
|
e && t && (e.classList.remove("visible"), t.classList.remove("visible")), setTimeout(() => {
|
|
4239
4221
|
this._isVisible || (this.style.display = "none", this.unlockBodyScroll(), this.removeEscapeListener(), this.restoreFocus());
|
|
4240
4222
|
}, 300), this.emit("zs3-modal-hide", {
|
|
@@ -4260,25 +4242,25 @@ let M = class extends k {
|
|
|
4260
4242
|
e.size !== void 0 && (this.size = e.size), e.backdrop !== void 0 && (this.backdrop = e.backdrop), e.closeOnBackdrop !== void 0 && (this.closeOnBackdrop = e.closeOnBackdrop), e.closeOnEscape !== void 0 && (this.closeOnEscape = e.closeOnEscape), e.centered !== void 0 && (this.centered = e.centered), e.scrollable !== void 0 && (this.scrollable = e.scrollable), this.render();
|
|
4261
4243
|
}
|
|
4262
4244
|
};
|
|
4263
|
-
|
|
4245
|
+
j([
|
|
4264
4246
|
n("size", { type: "string", default: "medium" })
|
|
4265
4247
|
], M.prototype, "size", 2);
|
|
4266
|
-
|
|
4248
|
+
j([
|
|
4267
4249
|
n("backdrop", { type: "boolean", default: !0 })
|
|
4268
4250
|
], M.prototype, "backdrop", 2);
|
|
4269
|
-
|
|
4251
|
+
j([
|
|
4270
4252
|
n("close-on-backdrop", { type: "boolean", default: !0 })
|
|
4271
4253
|
], M.prototype, "closeOnBackdrop", 2);
|
|
4272
|
-
|
|
4254
|
+
j([
|
|
4273
4255
|
n("close-on-escape", { type: "boolean", default: !0 })
|
|
4274
4256
|
], M.prototype, "closeOnEscape", 2);
|
|
4275
|
-
|
|
4257
|
+
j([
|
|
4276
4258
|
n("centered", { type: "boolean", default: !0 })
|
|
4277
4259
|
], M.prototype, "centered", 2);
|
|
4278
|
-
|
|
4260
|
+
j([
|
|
4279
4261
|
n("scrollable", { type: "boolean" })
|
|
4280
4262
|
], M.prototype, "scrollable", 2);
|
|
4281
|
-
M =
|
|
4263
|
+
M = j([
|
|
4282
4264
|
x("zs3-modal"),
|
|
4283
4265
|
E(de)
|
|
4284
4266
|
], M);
|
|
@@ -4328,7 +4310,7 @@ let d = class extends M {
|
|
|
4328
4310
|
this._buttons.forEach((t) => {
|
|
4329
4311
|
t.remove();
|
|
4330
4312
|
}), this._buttons = [];
|
|
4331
|
-
const e = this
|
|
4313
|
+
const e = this.$(".dialog-buttons").$;
|
|
4332
4314
|
if (e) {
|
|
4333
4315
|
if (this.showAccept) {
|
|
4334
4316
|
const t = new f(), s = this.getAttribute("i18n-accept-text");
|
|
@@ -4403,7 +4385,7 @@ let d = class extends M {
|
|
|
4403
4385
|
</div>
|
|
4404
4386
|
</div>
|
|
4405
4387
|
`);
|
|
4406
|
-
const o = this
|
|
4388
|
+
const o = this.$(".modal-backdrop").$, a = this.$(".modal-container").$;
|
|
4407
4389
|
o && a && (a.classList.add(`size-${this.size}`), this.centered && o.classList.add("centered"), this.scrollable && a.classList.add("scrollable"), this._isVisible && (o.classList.add("visible"), a.classList.add("visible"))), this._mounted && (this.setupEventListeners(), this.setupDialogButtons()), this.emitLifecycleEvent("zs3-rendered", { phase: "complete" });
|
|
4408
4390
|
}
|
|
4409
4391
|
/**
|
|
@@ -4689,7 +4671,7 @@ const be = [
|
|
|
4689
4671
|
"i18n-message",
|
|
4690
4672
|
"i18n-close-label"
|
|
4691
4673
|
];
|
|
4692
|
-
let h = class extends
|
|
4674
|
+
let h = class extends S {
|
|
4693
4675
|
/**
|
|
4694
4676
|
* Initializes the notification component
|
|
4695
4677
|
*/
|
|
@@ -4728,9 +4710,9 @@ let h = class extends k {
|
|
|
4728
4710
|
* Setup event listeners
|
|
4729
4711
|
*/
|
|
4730
4712
|
setupEventListeners() {
|
|
4731
|
-
const e = this
|
|
4713
|
+
const e = this.$(".close-btn").$;
|
|
4732
4714
|
e && this.dismissible && this.addManagedEventListener(e, "click", this.handleDismiss.bind(this));
|
|
4733
|
-
const t = this
|
|
4715
|
+
const t = this.$(".notification").$;
|
|
4734
4716
|
t && this.addManagedEventListener(t, "click", (s) => {
|
|
4735
4717
|
s.target.classList.contains("close-btn") || this.emit("zs3-notification-click", {
|
|
4736
4718
|
notification: this,
|
|
@@ -4767,7 +4749,7 @@ let h = class extends k {
|
|
|
4767
4749
|
animateProgress() {
|
|
4768
4750
|
const e = () => {
|
|
4769
4751
|
if (!this._isVisible) return;
|
|
4770
|
-
const t = Date.now() - this._startTime, s = Math.min(t / this.duration * 100, 100), i = this
|
|
4752
|
+
const t = Date.now() - this._startTime, s = Math.min(t / this.duration * 100, 100), i = this.$(".progress-bar").$;
|
|
4771
4753
|
i && (i.style.width = `${s}%`), s < 100 && (this._progressAnimationFrame = requestAnimationFrame(e));
|
|
4772
4754
|
};
|
|
4773
4755
|
e();
|
|
@@ -4800,7 +4782,7 @@ let h = class extends k {
|
|
|
4800
4782
|
${i}
|
|
4801
4783
|
</div>
|
|
4802
4784
|
`);
|
|
4803
|
-
const l = this
|
|
4785
|
+
const l = this.$(".notification").$;
|
|
4804
4786
|
l && (l.className = `notification position-${this.position}`, this.type && l.classList.add(`type-${this.type}`)), this._mounted && this.setupEventListeners(), this.emitLifecycleEvent("zs3-rendered", { phase: "complete" });
|
|
4805
4787
|
}
|
|
4806
4788
|
/**
|
|
@@ -5044,7 +5026,7 @@ let h = class extends k {
|
|
|
5044
5026
|
*/
|
|
5045
5027
|
show() {
|
|
5046
5028
|
this._isVisible || (this._isVisible = !0, this.className = `position-${this.position}`, requestAnimationFrame(() => {
|
|
5047
|
-
const e = this
|
|
5029
|
+
const e = this.$(".notification").$;
|
|
5048
5030
|
e && e.classList.add("visible");
|
|
5049
5031
|
}), this.resetAutoHideTimer(), this.emit("zs3-notification-show", {
|
|
5050
5032
|
notification: this,
|
|
@@ -5058,7 +5040,7 @@ let h = class extends k {
|
|
|
5058
5040
|
hide() {
|
|
5059
5041
|
if (!this._isVisible) return;
|
|
5060
5042
|
this._isVisible = !1, this.clearTimers();
|
|
5061
|
-
const e = this
|
|
5043
|
+
const e = this.$(".notification").$;
|
|
5062
5044
|
e && e.classList.remove("visible"), this.emit("zs3-notification-hide", {
|
|
5063
5045
|
notification: this,
|
|
5064
5046
|
type: this.type,
|
|
@@ -5167,7 +5149,7 @@ var ge = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, zt = (e, t
|
|
|
5167
5149
|
return i && r && ge(t, s, r), r;
|
|
5168
5150
|
};
|
|
5169
5151
|
const ze = ["zs3-position"];
|
|
5170
|
-
let it = class extends
|
|
5152
|
+
let it = class extends S {
|
|
5171
5153
|
constructor() {
|
|
5172
5154
|
super({
|
|
5173
5155
|
useShadowDOM: !0,
|
|
@@ -5178,7 +5160,7 @@ let it = class extends k {
|
|
|
5178
5160
|
this.setupEventListeners();
|
|
5179
5161
|
}
|
|
5180
5162
|
setupEventListeners() {
|
|
5181
|
-
const e = this
|
|
5163
|
+
const e = this.$("select").$;
|
|
5182
5164
|
e && this.addManagedEventListener(e, "change", () => {
|
|
5183
5165
|
y.setLocale(e.value);
|
|
5184
5166
|
});
|
|
@@ -5187,7 +5169,7 @@ let it = class extends k {
|
|
|
5187
5169
|
this.updateSelectedValue();
|
|
5188
5170
|
}
|
|
5189
5171
|
updateSelectedValue() {
|
|
5190
|
-
const e = this
|
|
5172
|
+
const e = this.$("select").$;
|
|
5191
5173
|
e && (e.value = y.getLocale());
|
|
5192
5174
|
}
|
|
5193
5175
|
render() {
|
|
@@ -5256,7 +5238,7 @@ const xe = ["zs3-position"], Ee = [
|
|
|
5256
5238
|
{ value: "high-contrast", label: "High Contrast" },
|
|
5257
5239
|
{ value: "system", label: "System" }
|
|
5258
5240
|
];
|
|
5259
|
-
let rt = class extends
|
|
5241
|
+
let rt = class extends S {
|
|
5260
5242
|
constructor() {
|
|
5261
5243
|
super({
|
|
5262
5244
|
useShadowDOM: !0,
|
|
@@ -5267,7 +5249,7 @@ let rt = class extends k {
|
|
|
5267
5249
|
this.setupEventListeners();
|
|
5268
5250
|
}
|
|
5269
5251
|
setupEventListeners() {
|
|
5270
|
-
const e = this
|
|
5252
|
+
const e = this.$("select").$;
|
|
5271
5253
|
e && this.addManagedEventListener(e, "change", () => {
|
|
5272
5254
|
G.setTheme(e.value);
|
|
5273
5255
|
});
|
|
@@ -5276,7 +5258,7 @@ let rt = class extends k {
|
|
|
5276
5258
|
this.updateSelectedValue();
|
|
5277
5259
|
}
|
|
5278
5260
|
updateSelectedValue() {
|
|
5279
|
-
const e = this
|
|
5261
|
+
const e = this.$("select").$;
|
|
5280
5262
|
e && (e.value = G.getTheme());
|
|
5281
5263
|
}
|
|
5282
5264
|
render() {
|
|
@@ -5357,7 +5339,7 @@ const Me = [
|
|
|
5357
5339
|
"zs3-move-cancel",
|
|
5358
5340
|
"zs3-move-boundary"
|
|
5359
5341
|
];
|
|
5360
|
-
let
|
|
5342
|
+
let $ = class extends S {
|
|
5361
5343
|
/**
|
|
5362
5344
|
* Initializes the toolbar component
|
|
5363
5345
|
*/
|
|
@@ -5436,7 +5418,7 @@ let L = class extends k {
|
|
|
5436
5418
|
<slot></slot>
|
|
5437
5419
|
</div>
|
|
5438
5420
|
`);
|
|
5439
|
-
const i = this
|
|
5421
|
+
const i = this.$(".toolbar").$;
|
|
5440
5422
|
i && (i.className = "toolbar", i.classList.add(this.direction), this.variant && i.classList.add(`variant-${this.variant}`), this.rounded && i.classList.add("rounded"), this.align && i.classList.add(`align-${this.align}`), this.float && i.classList.add(`float-${this.float}`)), this.emitLifecycleEvent("zs3-rendered", { phase: "complete" });
|
|
5441
5423
|
}
|
|
5442
5424
|
/**
|
|
@@ -5675,39 +5657,39 @@ let L = class extends k {
|
|
|
5675
5657
|
};
|
|
5676
5658
|
R([
|
|
5677
5659
|
n("direction", { type: "string", default: "row" })
|
|
5678
|
-
],
|
|
5660
|
+
], $.prototype, "direction", 2);
|
|
5679
5661
|
R([
|
|
5680
5662
|
n("float", { type: "string" })
|
|
5681
|
-
],
|
|
5663
|
+
], $.prototype, "float", 2);
|
|
5682
5664
|
R([
|
|
5683
5665
|
n("align", { type: "string" })
|
|
5684
|
-
],
|
|
5666
|
+
], $.prototype, "align", 2);
|
|
5685
5667
|
R([
|
|
5686
5668
|
n("gap", { type: "string" })
|
|
5687
|
-
],
|
|
5669
|
+
], $.prototype, "gap", 2);
|
|
5688
5670
|
R([
|
|
5689
5671
|
n("variant", { type: "string" })
|
|
5690
|
-
],
|
|
5672
|
+
], $.prototype, "variant", 2);
|
|
5691
5673
|
R([
|
|
5692
5674
|
n("rounded", { type: "boolean" })
|
|
5693
|
-
],
|
|
5675
|
+
], $.prototype, "rounded", 2);
|
|
5694
5676
|
R([
|
|
5695
5677
|
n("i18n-aria-label", { type: "string" })
|
|
5696
|
-
],
|
|
5697
|
-
|
|
5678
|
+
], $.prototype, "i18nAriaLabel", 2);
|
|
5679
|
+
$ = R([
|
|
5698
5680
|
x("zs3-toolbar"),
|
|
5699
5681
|
E(Me),
|
|
5700
5682
|
vt(".toolbar"),
|
|
5701
5683
|
Ft(":host")
|
|
5702
|
-
],
|
|
5703
|
-
customElements.get("zs3-toolbar") || customElements.define("zs3-toolbar",
|
|
5704
|
-
typeof window < "u" && (window.$Toolbar =
|
|
5705
|
-
var
|
|
5706
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
5684
|
+
], $);
|
|
5685
|
+
customElements.get("zs3-toolbar") || customElements.define("zs3-toolbar", $);
|
|
5686
|
+
typeof window < "u" && (window.$Toolbar = $);
|
|
5687
|
+
var $e = Object.defineProperty, Le = Object.getOwnPropertyDescriptor, O = (e, t, s, i) => {
|
|
5688
|
+
for (var r = i > 1 ? void 0 : i ? Le(t, s) : t, o = e.length - 1, a; o >= 0; o--)
|
|
5707
5689
|
(a = e[o]) && (r = (i ? a(t, s, r) : a(r)) || r);
|
|
5708
|
-
return i && r &&
|
|
5690
|
+
return i && r && $e(t, s, r), r;
|
|
5709
5691
|
};
|
|
5710
|
-
let
|
|
5692
|
+
let L = class extends S {
|
|
5711
5693
|
/**
|
|
5712
5694
|
* Initializes the window component
|
|
5713
5695
|
*/
|
|
@@ -5733,15 +5715,15 @@ let C = class extends k {
|
|
|
5733
5715
|
* Setup event listeners
|
|
5734
5716
|
*/
|
|
5735
5717
|
setupEventListeners() {
|
|
5736
|
-
const e = this
|
|
5718
|
+
const e = this.$(".btn-close").$;
|
|
5737
5719
|
e && this.addManagedEventListener(e, "click", (i) => {
|
|
5738
5720
|
i.stopPropagation(), this.emit("zs3-window-close", { window: this });
|
|
5739
5721
|
});
|
|
5740
|
-
const t = this
|
|
5722
|
+
const t = this.$(".btn-minimize").$;
|
|
5741
5723
|
t && this.addManagedEventListener(t, "click", (i) => {
|
|
5742
5724
|
i.stopPropagation(), this.emit("zs3-window-minimize", { window: this });
|
|
5743
5725
|
});
|
|
5744
|
-
const s = this
|
|
5726
|
+
const s = this.$(".btn-maximize").$;
|
|
5745
5727
|
s && this.addManagedEventListener(s, "click", (i) => {
|
|
5746
5728
|
i.stopPropagation(), this.emit("zs3-window-maximize", { window: this });
|
|
5747
5729
|
});
|
|
@@ -5881,26 +5863,26 @@ let C = class extends k {
|
|
|
5881
5863
|
};
|
|
5882
5864
|
O([
|
|
5883
5865
|
n("title", { type: "string" })
|
|
5884
|
-
],
|
|
5866
|
+
], L.prototype, "windowTitle", 2);
|
|
5885
5867
|
O([
|
|
5886
5868
|
n("width", { type: "string" })
|
|
5887
|
-
],
|
|
5869
|
+
], L.prototype, "width", 2);
|
|
5888
5870
|
O([
|
|
5889
5871
|
n("height", { type: "string" })
|
|
5890
|
-
],
|
|
5872
|
+
], L.prototype, "height", 2);
|
|
5891
5873
|
O([
|
|
5892
5874
|
n("closable", { type: "boolean" })
|
|
5893
|
-
],
|
|
5875
|
+
], L.prototype, "closable", 2);
|
|
5894
5876
|
O([
|
|
5895
5877
|
n("minimizable", { type: "boolean" })
|
|
5896
|
-
],
|
|
5878
|
+
], L.prototype, "minimizable", 2);
|
|
5897
5879
|
O([
|
|
5898
5880
|
n("maximizable", { type: "boolean" })
|
|
5899
|
-
],
|
|
5881
|
+
], L.prototype, "maximizable", 2);
|
|
5900
5882
|
O([
|
|
5901
5883
|
n("i18n-title", { type: "string" })
|
|
5902
|
-
],
|
|
5903
|
-
|
|
5884
|
+
], L.prototype, "i18nTitle", 2);
|
|
5885
|
+
L = O([
|
|
5904
5886
|
x("zs3-window"),
|
|
5905
5887
|
E([
|
|
5906
5888
|
"title",
|
|
@@ -5918,16 +5900,16 @@ C = O([
|
|
|
5918
5900
|
"zs3-move-cancel",
|
|
5919
5901
|
"zs3-move-boundary"
|
|
5920
5902
|
])
|
|
5921
|
-
],
|
|
5922
|
-
customElements.get("zs3-window") || customElements.define("zs3-window",
|
|
5923
|
-
typeof window < "u" && (window.$Window =
|
|
5903
|
+
], L);
|
|
5904
|
+
customElements.get("zs3-window") || customElements.define("zs3-window", L);
|
|
5905
|
+
typeof window < "u" && (window.$Window = L);
|
|
5924
5906
|
export {
|
|
5925
|
-
|
|
5926
|
-
|
|
5907
|
+
V as $,
|
|
5908
|
+
S as $BaseComponent,
|
|
5927
5909
|
f as $Button,
|
|
5928
5910
|
Et as $Debug,
|
|
5929
5911
|
u as $Form,
|
|
5930
|
-
|
|
5912
|
+
St as $I18n,
|
|
5931
5913
|
z as $Icon,
|
|
5932
5914
|
_t as $Log,
|
|
5933
5915
|
H as $LoginForm,
|
|
@@ -5941,33 +5923,33 @@ export {
|
|
|
5941
5923
|
rt as $SelectTheme,
|
|
5942
5924
|
Tt as $Storage,
|
|
5943
5925
|
Ae as $Store,
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5926
|
+
$ as $Toolbar,
|
|
5927
|
+
L as $Window,
|
|
5928
|
+
Ce as $env,
|
|
5947
5929
|
x as Component,
|
|
5948
5930
|
nt as DEFAULT_FALLBACK_LOCALE,
|
|
5949
5931
|
at as DEFAULT_LOCALE,
|
|
5950
5932
|
At as DIContainer,
|
|
5951
|
-
|
|
5933
|
+
Ct as EventBus,
|
|
5952
5934
|
vt as Float,
|
|
5953
5935
|
Oe as HttpClient,
|
|
5954
|
-
|
|
5936
|
+
K as HttpError,
|
|
5955
5937
|
Ft as Move,
|
|
5956
5938
|
E as ObservedAttributes,
|
|
5957
5939
|
Re as Router,
|
|
5958
|
-
|
|
5959
|
-
|
|
5940
|
+
Lt as ThemeChangeEvent,
|
|
5941
|
+
Y as ThemeManager,
|
|
5960
5942
|
T as ZS3,
|
|
5961
|
-
|
|
5943
|
+
$t as debug,
|
|
5962
5944
|
ot as defaultTranslations,
|
|
5963
5945
|
He as diContainer,
|
|
5964
5946
|
Bt as disableMove,
|
|
5965
5947
|
De as eventBus,
|
|
5966
5948
|
Pt as float,
|
|
5967
5949
|
Ve as generateEvent,
|
|
5968
|
-
|
|
5950
|
+
Se as getCSSVariable,
|
|
5969
5951
|
Fe as getMoveDirection,
|
|
5970
|
-
|
|
5952
|
+
kt as getRegisteredComponents,
|
|
5971
5953
|
y as i18n,
|
|
5972
5954
|
bt as initThemeSystem,
|
|
5973
5955
|
Be as isMoveEnabled,
|
|
@@ -5977,5 +5959,5 @@ export {
|
|
|
5977
5959
|
Pe as setCSSVariable,
|
|
5978
5960
|
X as storage,
|
|
5979
5961
|
G as themeManager,
|
|
5980
|
-
|
|
5962
|
+
ke as withThemeSupport
|
|
5981
5963
|
};
|