@trintel/zooy 1.0.1 → 1.0.2
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/dist/chunks/{button-C-oX8EmF.js → button--cIzwEQA.js} +1 -1
- package/dist/chunks/{button-B1jzfT-Z.js → button-i6QyRwAM.js} +4 -4
- package/dist/chunks/{button-skeleton-CK3BHdja.js → button-skeleton-Bk2Vw5Mq.js} +1 -1
- package/dist/chunks/{button-skeleton-DoCp6sBb.js → button-skeleton-D2TeTVpP.js} +4 -4
- package/dist/chunks/{checkbox-CgFjYxQ_.js → checkbox-Dyh34VfG.js} +5 -5
- package/dist/chunks/{checkbox-t3G-H1NN.js → checkbox-atdz21pu.js} +1 -1
- package/dist/chunks/{class-map-D6tjF27Y.js → class-map-CziJvhVR.js} +1 -1
- package/dist/chunks/{class-map-FWQBIzSx.js → class-map-hWNVHb09.js} +1 -1
- package/dist/chunks/{content-switcher-item-c4WBWz31.js → content-switcher-item-88PWpM2j.js} +1 -1
- package/dist/chunks/{content-switcher-item-CedjjtvP.js → content-switcher-item-CpNfKVu-.js} +4 -4
- package/dist/chunks/{dropdown-item-Dh5IEXDr.js → dropdown-item-CDbnp5_k.js} +6 -6
- package/dist/chunks/{dropdown-item-C0SHr4st.js → dropdown-item-CRyAm4Ku.js} +1 -1
- package/dist/chunks/{icon-loader-CJxyg-lp.js → icon-loader-C3acLKRm.js} +1 -1
- package/dist/chunks/{icon-loader-ChKeNR4s.js → icon-loader-CsKt-G8D.js} +1 -1
- package/dist/chunks/{icon-loader-utils-DK8DViXt.js → icon-loader-utils-DKbXKLDh.js} +1 -1
- package/dist/chunks/{icon-loader-utils-BwViqIXz.js → icon-loader-utils-DXGGCFfD.js} +1 -1
- package/dist/chunks/{if-defined-eJcDYClo.js → if-defined-D2rCHx2p.js} +1 -1
- package/dist/chunks/{if-defined-DYWhlnlE.js → if-defined-uehgcl8e.js} +1 -1
- package/dist/chunks/if-non-empty-BEpfFFDX.js +1 -0
- package/dist/chunks/{if-non-empty-COTeEFkK.js → if-non-empty-CcwduEjT.js} +1 -1
- package/dist/chunks/{index-Dc51G1mo.js → index--Q3NhIVC.js} +1 -1
- package/dist/chunks/{index-Z4ar01y-.js → index-B16kSrMy.js} +4 -4
- package/dist/chunks/{index-pS6-humH.js → index-B6vimuhF.js} +1 -1
- package/dist/chunks/{index-CR3DrmQi.js → index-B8fGrrzJ.js} +8 -8
- package/dist/chunks/{index-DBsASlZI.js → index-BEDYiyp9.js} +1 -1
- package/dist/chunks/{index-CBICHiFD.js → index-BEyCs2cc.js} +5 -5
- package/dist/chunks/{index-C3n83pM3.js → index-BIJ3miZu.js} +1 -1
- package/dist/chunks/{index-du3RQU31.js → index-BIvyXnIe.js} +1 -1
- package/dist/chunks/{index-C2oV5vU3.js → index-BMJjuXme.js} +1 -1
- package/dist/chunks/{index-Ctna95NT.js → index-BMNd2Qad.js} +4 -4
- package/dist/chunks/{index-_xRytR0j.js → index-BMNv7Afr.js} +1 -1
- package/dist/chunks/{index-qgl9W8eF.js → index-BMzAaQhy.js} +1 -1
- package/dist/chunks/{index-DUtoSCTU.js → index-BODxU-Mu.js} +9 -9
- package/dist/chunks/{index-hH_m653R.js → index-BPRteboN.js} +5 -5
- package/dist/chunks/{index-D9sRIKMQ.js → index-BTUYIkmg.js} +5 -5
- package/dist/chunks/{index-MgWriQfr.js → index-BUcMLg1n.js} +1 -1
- package/dist/chunks/{index-CJdEJ8pY.js → index-BVpkxHll.js} +1 -1
- package/dist/chunks/{index-CKYRBtLC.js → index-BWBjCDwY.js} +1 -1
- package/dist/chunks/{index-BMquNDkd.js → index-BYHXKkvf.js} +6 -6
- package/dist/chunks/{index-CQl4NaPS.js → index-BeKAg3cB.js} +1 -1
- package/dist/chunks/{index-CTsGb3mD.js → index-Bgo3KCFI.js} +7 -7
- package/dist/chunks/{index-Bls8zdHV.js → index-Bh3jqbKV.js} +5 -5
- package/dist/chunks/{index-CkxGsCJy.js → index-Bk2MEnMu.js} +7 -7
- package/dist/chunks/{index-CEy6bu7P.js → index-BlAm81hv.js} +1 -1
- package/dist/chunks/{index-BseD7Jzt.js → index-Bp5LwA_m.js} +1 -1
- package/dist/chunks/{index-BwRxBdeg.js → index-BqExj5O7.js} +1 -1
- package/dist/chunks/{index-BbJQIwkY.js → index-BrqEja9V.js} +8 -8
- package/dist/chunks/{index-CIZ3Gnmm.js → index-BtPiuBUm.js} +1 -1
- package/dist/chunks/{index-yzFU-E6F.js → index-Bu6R2tix.js} +1 -1
- package/dist/chunks/{index-i4heE-wx.js → index-Bug3BjgA.js} +3 -3
- package/dist/chunks/{index-Bff6B9vY.js → index-BwhAoVy-.js} +7 -7
- package/dist/chunks/{index-B8Ze9ISK.js → index-BxGUZ-qP.js} +1 -1
- package/dist/chunks/{index-BGGDxbLL.js → index-ByNfpHAO.js} +5 -5
- package/dist/chunks/{index-BeMnerDj.js → index-Byf_K1x1.js} +8 -8
- package/dist/chunks/{index-Dd9iSSXa.js → index-C-P030e_.js} +3 -3
- package/dist/chunks/{index-DbAeG1nY.js → index-C1Eehpcx.js} +1 -1
- package/dist/chunks/{index-Dk3tlz8Q.js → index-C4GpRDm7.js} +1 -1
- package/dist/chunks/{index-hn76Yo-L.js → index-C5b2680a.js} +1 -1
- package/dist/chunks/{index-CYIcfuAW.js → index-C5s9Z5Ou.js} +3 -3
- package/dist/chunks/{index-CqQZpHti.js → index-C9HJjC2j.js} +1 -1
- package/dist/chunks/{index-i9jyrFc9.js → index-CFG5exAl.js} +1 -1
- package/dist/chunks/{index-pc36PiDY.js → index-CHIQ4wsM.js} +1 -1
- package/dist/chunks/{index-7cXLLw89.js → index-CO_QGXLN.js} +5 -5
- package/dist/chunks/{index-BwFE4R87.js → index-CPLpCt6z.js} +3 -3
- package/dist/chunks/{index-Cv6qE9qP.js → index-CP_zaIyv.js} +1 -1
- package/dist/chunks/{index-Cp3P3KaW.js → index-CPzh43Kr.js} +1 -1
- package/dist/chunks/{index-CsjJntyD.js → index-CTEnXoVq.js} +1 -1
- package/dist/chunks/{index-DyO3Wdy_.js → index-CUI3NPWg.js} +1 -1
- package/dist/chunks/{index-C-pfDP7B.js → index-C_JOABLw.js} +1 -1
- package/dist/chunks/{index-ClE0uX_c.js → index-C_NhQPDA.js} +1 -1
- package/dist/chunks/{index-DYvD9xjl.js → index-CbiknV4d.js} +1 -1
- package/dist/chunks/{index-4WNeLsiw.js → index-CcK76f0I.js} +3 -3
- package/dist/chunks/{index-B5GB0rQW.js → index-Cd1j7Qp1.js} +5 -5
- package/dist/chunks/{index-DGw1TVFB.js → index-Chyr-DU2.js} +2 -2
- package/dist/chunks/{index-C572_UKV.js → index-CjVvmbL6.js} +1 -1
- package/dist/chunks/{index-BBap1uCI.js → index-CsKII5mz.js} +1 -1
- package/dist/chunks/{index-B4SxU_Hu.js → index-CwpgmKTP.js} +7 -7
- package/dist/chunks/{index-Bt7v-zqV.js → index-CxJCioQg.js} +1 -1
- package/dist/chunks/{index-uwN33H1P.js → index-CyF5Kef-.js} +5 -5
- package/dist/chunks/{index-Cnsy7Qk3.js → index-CyR413wv.js} +5 -5
- package/dist/chunks/{index-4XJJobHw.js → index-CyvZ9jxn.js} +5 -5
- package/dist/chunks/{index-C6bOvXSf.js → index-Czs-UAWh.js} +4 -4
- package/dist/chunks/{index-B0nToMRj.js → index-D-iqTNbL.js} +4 -4
- package/dist/chunks/{index-9fmHblh5.js → index-D9nVgUNo.js} +1 -1
- package/dist/chunks/{index-DNWjc2SJ.js → index-DDUqY4Rl.js} +2 -2
- package/dist/chunks/{index-OgL1A9Rm.js → index-DEdeVoZn.js} +1 -1
- package/dist/chunks/{index-Cu1u3Mjn.js → index-DEtGo4Q7.js} +4 -4
- package/dist/chunks/{index-BQnyeVHX.js → index-DGvLgX2O.js} +1 -1
- package/dist/chunks/{index-Bymsj9gH.js → index-DGvVa-5J.js} +1 -1
- package/dist/chunks/{index-Bi9WliCA.js → index-DIg4fP-p.js} +6 -6
- package/dist/chunks/{index-Dh4LYLg5.js → index-DNkLJEg1.js} +10 -10
- package/dist/chunks/{index-JWULDURW.js → index-DPCfOgTU.js} +1 -1
- package/dist/chunks/index-DPnGRDRl.js +1 -0
- package/dist/chunks/{index-CWlg_Hu2.js → index-DQ4Y-fiZ.js} +4 -4
- package/dist/chunks/{index-GDVDUQtg.js → index-DSMPUWJU.js} +7 -7
- package/dist/chunks/{index-DIsXKJDH.js → index-DSgb2u7b.js} +1 -1
- package/dist/chunks/{index-BBWp83R-.js → index-DTadLLRG.js} +1 -1
- package/dist/chunks/{index-BRnzFxjk.js → index-DTtMSAgV.js} +1 -1
- package/dist/chunks/{index-0AElqkkj.js → index-DX2JlRat.js} +1 -1
- package/dist/chunks/{index-GbWz6fuF.js → index-DZrmJ7Ll.js} +5 -5
- package/dist/chunks/{index-DZabSr3s.js → index-DdkIREYU.js} +3 -3
- package/dist/chunks/{index-lFqOe0IJ.js → index-DkphY0sd.js} +1 -1
- package/dist/chunks/{index-BAAA4wkE.js → index-Do9f8Pwe.js} +2 -2
- package/dist/chunks/{index-CIiIAqrQ.js → index-Dr4evLL7.js} +3 -3
- package/dist/chunks/{index-QzojJs5M.js → index-DwCXQC7X.js} +2 -2
- package/dist/chunks/{index-DrDKdYFJ.js → index-DwDG_y9_.js} +1 -1
- package/dist/chunks/{index-BvdNKhJw.js → index-F2zwTZm1.js} +1 -1
- package/dist/chunks/{index-CoAT1iC6.js → index-HbS1lUW6.js} +1 -1
- package/dist/chunks/{index-Bo2QmpPO.js → index-LtB-4-X9.js} +1 -1
- package/dist/chunks/{index-DWjrCygZ.js → index-QuyEX50y.js} +1 -1
- package/dist/chunks/{index-CzAwJhyQ.js → index-WpBhhuED.js} +3 -3
- package/dist/chunks/{index-Bb_1S0pr.js → index-d0CqW2Cm.js} +5 -5
- package/dist/chunks/{index-CV7TVQ4T.js → index-el9l-ZQy.js} +4 -4
- package/dist/chunks/{index-cuMoh7qn.js → index-gfbRBI-d.js} +1 -1
- package/dist/chunks/{index-Cwb1pbm9.js → index-hhX-bWEv.js} +5 -5
- package/dist/chunks/{index-CFqKkC5Z.js → index-jdx-M5Y-.js} +1 -1
- package/dist/chunks/{index-uxZPrL2m.js → index-nfJ9ioGW.js} +6 -6
- package/dist/chunks/{index-DfFx1Jz3.js → index-oS8XvY4G.js} +3 -3
- package/dist/chunks/{index-DSOPjl5x.js → index-t9TINCcm.js} +7 -7
- package/dist/chunks/{index-Bunat0DP.js → index-tQGRhvw0.js} +6 -6
- package/dist/chunks/{index-TJL02uup.js → index-tdmIA8Xp.js} +6 -6
- package/dist/chunks/{index-D8LE8G2j.js → index-w027CjA0.js} +1 -1
- package/dist/chunks/{index-DyyLrVDY.js → index-wgp15jn2.js} +4 -4
- package/dist/chunks/index-xipeWGGU.js +2 -0
- package/dist/chunks/{loading-icon-DdwpAk8-.js → loading-icon-CN-iehcR.js} +1 -1
- package/dist/chunks/{loading-icon-CPvmJvpZ.js → loading-icon-q__8yLZw.js} +1 -1
- package/dist/chunks/{main-Bx21zlkN.js → main-BPWCMI5R.js} +7 -7
- package/dist/chunks/{main-BGOPab-5.js → main-BywCEBtD.js} +214 -168
- package/dist/chunks/{property-DAFv3PCb.js → property-DCTz3KPt.js} +1 -1
- package/dist/chunks/{property-BkjBVRuu.js → property-DzfJpYmn.js} +1 -1
- package/dist/chunks/{register-DTXmg-gw.js → register-B4yRiHm6.js} +1 -1
- package/dist/chunks/{register-BCEOkbXG.js → register-C3XDWad0.js} +393 -358
- package/dist/chunks/{register-Bkr1UKav.js → register-CyNp_638.js} +1 -1
- package/dist/chunks/register-DpOrINOx.js +1 -0
- package/dist/chunks/{search-npG8ywjx.js → search-BCJx6Xft.js} +6 -6
- package/dist/chunks/{search-DDFN8-Mz.js → search-CzmoEHwa.js} +1 -1
- package/dist/chunks/{select-DkCpQORs.js → select-0jyl720Y.js} +7 -7
- package/dist/chunks/{select-CFy3MvH6.js → select-DC0T8Fw_.js} +1 -1
- package/dist/chunks/{state-BdgD82MZ.js → state-BiEAGUqO.js} +1 -1
- package/dist/chunks/{state-uF7CZaP5.js → state-DJQLwKiU.js} +1 -1
- package/dist/chunks/{text-input-DVdkm07X.js → text-input-BGuFqOdN.js} +5 -5
- package/dist/chunks/{text-input-BUdM-ojg.js → text-input-BPvBDzky.js} +1 -1
- package/dist/chunks/{tooltip-content-BXcBmMsV.js → tooltip-content-BOefn0hU.js} +1 -1
- package/dist/chunks/{tooltip-content-CWRE_NqH.js → tooltip-content-CWdOnBaw.js} +3 -3
- package/dist/chunks/{unsafe-html-CpAqmPyx.js → unsafe-html-Bi2pB4Lb.js} +1 -1
- package/dist/chunks/{unsafe-html-Bg0eM3hS.js → unsafe-html-xqClX-6M.js} +1 -1
- package/dist/zooy.cjs.js +1 -1
- package/dist/zooy.es.js +3 -3
- package/package.json +1 -1
- package/src/sass/carbon.scss +46 -13
- package/dist/chunks/if-non-empty-CxMysAQW.js +0 -1
- package/dist/chunks/index-B5DpS-cb.js +0 -2
- package/dist/chunks/index-Do1DszoZ.js +0 -1
- package/dist/chunks/register-D_CXtGy1.js +0 -1
|
@@ -419,10 +419,10 @@ const getInputChecked_ = function(O) {
|
|
|
419
419
|
return;
|
|
420
420
|
const F = new Map([...parseMap, ...D]);
|
|
421
421
|
[...O.querySelectorAll("[data-zdd],[data-zdd_class_update],[data-zdd_template_loop_index]")].forEach((q) => {
|
|
422
|
-
const W = getElDataMap(q),
|
|
423
|
-
let
|
|
424
|
-
if (isDefAndNotNull(
|
|
425
|
-
const [
|
|
422
|
+
const W = getElDataMap(q), X = W.zdd || "", G = W.zdd_parse_as, K = W.zdd_render_effect || "", Q = W.zdd_class_update, tt = W.zdd_template_loop_index, J = W.zdd_units || "";
|
|
423
|
+
let Y = pathOr(void 0, X.split("."))(w);
|
|
424
|
+
if (isDefAndNotNull(Y) && (Y = F.has(G) ? F.get(G)(Y, q, W) : Y), tt && isNumber(U) && (console.log("loopIndex: ", tt, " opt_loopIndex: ", U), tt === "zero_indexed" ? q.innerHTML = U : tt === "one_indexed" ? q.innerHTML = U + 1 : q.innerHTML = U), Q) {
|
|
425
|
+
const [Z, et, st] = Q.split(":"), rt = pathOr(void 0, Z.split("."))(w);
|
|
426
426
|
if (isDefAndNotNull(rt))
|
|
427
427
|
switch (et) {
|
|
428
428
|
case "swap": {
|
|
@@ -441,26 +441,26 @@ const getInputChecked_ = function(O) {
|
|
|
441
441
|
break;
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
|
-
if (G === "templated-array" && isArray(
|
|
445
|
-
if (
|
|
444
|
+
if (G === "templated-array" && isArray(Y))
|
|
445
|
+
if (Y.length === 0)
|
|
446
446
|
q.classList.add("display__none");
|
|
447
447
|
else {
|
|
448
|
-
q.classList.remove("display__none"),
|
|
449
|
-
const
|
|
450
|
-
|
|
451
|
-
const rt =
|
|
448
|
+
q.classList.remove("display__none"), Y = Y || [];
|
|
449
|
+
const Z = q.firstElementChild;
|
|
450
|
+
Z.classList.remove("display__none"), q.replaceChildren(...Y.map((et, st) => {
|
|
451
|
+
const rt = Z.cloneNode(!0), nt = parseDataProps(rt, et);
|
|
452
452
|
return mapDataToEls(nt, et, void 0, st), nt;
|
|
453
453
|
}));
|
|
454
454
|
}
|
|
455
|
-
else if (isDefAndNotNull(
|
|
456
|
-
if (
|
|
457
|
-
let
|
|
458
|
-
const et =
|
|
459
|
-
|
|
455
|
+
else if (isDefAndNotNull(Y))
|
|
456
|
+
if (K === "typewriter") {
|
|
457
|
+
let Z = 0;
|
|
458
|
+
const et = Y + J, st = 5, rt = () => {
|
|
459
|
+
Z < et.length && (q.innerHTML += et.charAt(Z), Z++, setTimeout(rt, st));
|
|
460
460
|
};
|
|
461
461
|
q.innerHTML = "", rt();
|
|
462
462
|
} else
|
|
463
|
-
q.innerHTML =
|
|
463
|
+
q.innerHTML = Y + J;
|
|
464
464
|
});
|
|
465
465
|
}, domUtils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
466
466
|
__proto__: null,
|
|
@@ -958,12 +958,12 @@ const EV = {
|
|
|
958
958
|
const q = normalizeEvent(F), W = (
|
|
959
959
|
/** @type {!HTMLElement} */
|
|
960
960
|
q.currentTarget
|
|
961
|
-
), [
|
|
962
|
-
let
|
|
963
|
-
["x", "ew"].includes(U) ?
|
|
961
|
+
), [X, G] = getPos(W), K = q.clientX - X, Q = q.clientY - G, tt = O(X, G, K, Q, W), J = D(X, G, K, Q, W), Y = w(X, G, K, Q, W);
|
|
962
|
+
let Z = freeMoveListener(Y, W, K, Q);
|
|
963
|
+
["x", "ew"].includes(U) ? Z = xMoveOnlyListener(Y, W, K) : ["y", "ns"].includes(U) && (Z = yMoveOnlyListener(Y, W, K, Q));
|
|
964
964
|
let et = !1;
|
|
965
965
|
const st = (nt) => {
|
|
966
|
-
et = !0,
|
|
966
|
+
et = !0, Z(nt);
|
|
967
967
|
}, rt = (nt) => {
|
|
968
968
|
document.removeEventListener(EV.MOUSEMOVE, st, !0), document.removeEventListener(EV.TOUCHMOVE, st, !0), document.removeEventListener(EV.MOUSEUP, rt, !0), document.removeEventListener(EV.TOUCHEND, rt, !0), et && J(nt);
|
|
969
969
|
};
|
|
@@ -980,18 +980,18 @@ const EV = {
|
|
|
980
980
|
F.preventDefault();
|
|
981
981
|
const q = normalizeEvent(F);
|
|
982
982
|
w.style.top = `${q.clientY - U}px`, O(q);
|
|
983
|
-
}, makeEmitter = (O, w) => (D, U, F, q, W) => (
|
|
983
|
+
}, makeEmitter = (O, w) => (D, U, F, q, W) => (X) => {
|
|
984
984
|
O.dispatchCompEvent(w, {
|
|
985
985
|
component: O,
|
|
986
|
-
browserEvent:
|
|
986
|
+
browserEvent: X,
|
|
987
987
|
left: D,
|
|
988
988
|
top: U,
|
|
989
|
-
clientX:
|
|
990
|
-
clientY:
|
|
989
|
+
clientX: X.clientX,
|
|
990
|
+
clientY: X.clientY,
|
|
991
991
|
xOrg: F,
|
|
992
992
|
yOrg: q,
|
|
993
|
-
deltaX:
|
|
994
|
-
deltaY:
|
|
993
|
+
deltaX: X.clientX - F - D,
|
|
994
|
+
deltaY: X.clientY - q - U,
|
|
995
995
|
target: W
|
|
996
996
|
});
|
|
997
997
|
};
|
|
@@ -1257,8 +1257,8 @@ class UserManager {
|
|
|
1257
1257
|
let W = {};
|
|
1258
1258
|
try {
|
|
1259
1259
|
W = await (await fetch(U, q)).json();
|
|
1260
|
-
} catch (
|
|
1261
|
-
return F(
|
|
1260
|
+
} catch (X) {
|
|
1261
|
+
return F(X);
|
|
1262
1262
|
}
|
|
1263
1263
|
return await stopSpin(), W;
|
|
1264
1264
|
}
|
|
@@ -1523,7 +1523,7 @@ class Panel extends Component {
|
|
|
1523
1523
|
parseContent(w) {
|
|
1524
1524
|
if (this.debugMe("Enable interactions. Panel:", w), typeof window.customElements < "u" && ComponentLibraryRegistry.has("carbon")) {
|
|
1525
1525
|
const J = ComponentLibraryRegistry.get("carbon");
|
|
1526
|
-
J.render.call(this, w, J.cache).catch((
|
|
1526
|
+
J.render.call(this, w, J.cache).catch((Y) => console.error("[Zooy] Carbon initialization failed:", Y));
|
|
1527
1527
|
}
|
|
1528
1528
|
if (ComponentLibraryRegistry.has("mdc")) {
|
|
1529
1529
|
const J = ComponentLibraryRegistry.get("mdc");
|
|
@@ -1534,40 +1534,40 @@ class Panel extends Component {
|
|
|
1534
1534
|
}), [...w.querySelectorAll(
|
|
1535
1535
|
".zoo__button:not(.external):not(.mdc-data-table__row)"
|
|
1536
1536
|
)].forEach((J) => {
|
|
1537
|
-
this.listen(J, EV.CLICK, (
|
|
1538
|
-
|
|
1539
|
-
const
|
|
1537
|
+
this.listen(J, EV.CLICK, (Y) => {
|
|
1538
|
+
Y.stopPropagation();
|
|
1539
|
+
const Z = Y.currentTarget, et = getElDataMap(Z);
|
|
1540
1540
|
this.dispatchPanelEvent(et.zv, Object.assign({
|
|
1541
|
-
orgEvt:
|
|
1542
|
-
trigger:
|
|
1543
|
-
href:
|
|
1541
|
+
orgEvt: Y,
|
|
1542
|
+
trigger: Z,
|
|
1543
|
+
href: Z.href || et.href
|
|
1544
1544
|
}, et));
|
|
1545
1545
|
});
|
|
1546
1546
|
}), [...w.querySelectorAll("[href]:not(.external)")].forEach((J) => {
|
|
1547
|
-
this.listen(J, EV.CLICK, (
|
|
1548
|
-
const
|
|
1549
|
-
|
|
1550
|
-
const et = getElDataMap(
|
|
1547
|
+
this.listen(J, EV.CLICK, (Y) => {
|
|
1548
|
+
const Z = Y.currentTarget;
|
|
1549
|
+
Y.preventDefault(), Y.stopPropagation();
|
|
1550
|
+
const et = getElDataMap(Z), st = et.zv || "href";
|
|
1551
1551
|
this.dispatchPanelEvent(st, Object.assign({
|
|
1552
|
-
orgEvt:
|
|
1553
|
-
trigger:
|
|
1554
|
-
href:
|
|
1552
|
+
orgEvt: Y,
|
|
1553
|
+
trigger: Y.target,
|
|
1554
|
+
href: Z.href || et.href
|
|
1555
1555
|
}, et));
|
|
1556
1556
|
});
|
|
1557
1557
|
}), [...w.querySelectorAll("form.intercept_submit")].forEach((J) => {
|
|
1558
|
-
J.noValidate = !0, this.listen(J, EV.SUBMIT, (
|
|
1559
|
-
|
|
1560
|
-
const
|
|
1561
|
-
this.dispatchPanelEvent(
|
|
1562
|
-
orgEvt:
|
|
1563
|
-
trigger:
|
|
1558
|
+
J.noValidate = !0, this.listen(J, EV.SUBMIT, (Y) => {
|
|
1559
|
+
Y.preventDefault(), Y.stopPropagation();
|
|
1560
|
+
const Z = getElDataMap(J), et = formToJSON(J.elements);
|
|
1561
|
+
this.dispatchPanelEvent(Z.zv, Object.assign({
|
|
1562
|
+
orgEvt: Y,
|
|
1563
|
+
trigger: Y.target,
|
|
1564
1564
|
formData: et,
|
|
1565
|
-
href:
|
|
1566
|
-
},
|
|
1565
|
+
href: Z.href
|
|
1566
|
+
}, Z));
|
|
1567
1567
|
});
|
|
1568
1568
|
}), [...w.querySelectorAll(".zoo__toggle_class_driver")].forEach(
|
|
1569
1569
|
(J) => {
|
|
1570
|
-
const
|
|
1570
|
+
const Y = getElDataMap(J), Z = Y.toggle_class_target_id, et = Y.toggle_class, st = w.querySelector(`#${Z}`);
|
|
1571
1571
|
st && et && J.addEventListener(EV.CLICK, (rt) => {
|
|
1572
1572
|
rt.stopPropagation(), st.classList.toggle(et);
|
|
1573
1573
|
});
|
|
@@ -1579,50 +1579,50 @@ class Panel extends Component {
|
|
|
1579
1579
|
J.preventDefault();
|
|
1580
1580
|
}, W = (J) => {
|
|
1581
1581
|
J.preventDefault(), J.target.classList.remove("drag_over");
|
|
1582
|
-
},
|
|
1582
|
+
}, X = (J) => {
|
|
1583
1583
|
J.preventDefault(), J.target.classList.remove("drag_over");
|
|
1584
1584
|
}, G = (J) => {
|
|
1585
1585
|
J.preventDefault(), J.target.classList.remove("drag_over");
|
|
1586
|
-
},
|
|
1586
|
+
}, K = (J) => {
|
|
1587
1587
|
J.dataTransfer.dropEffect = "move";
|
|
1588
|
-
const
|
|
1589
|
-
J.dataTransfer.setData("text/plain", JSON.stringify(
|
|
1588
|
+
const Y = getElDataMap(J.target);
|
|
1589
|
+
J.dataTransfer.setData("text/plain", JSON.stringify(Y)), J.target.classList.add("drag_in_progress");
|
|
1590
1590
|
}, Q = (J) => {
|
|
1591
1591
|
J.target.classList.remove("drag_in_progress");
|
|
1592
1592
|
}, tt = (J) => {
|
|
1593
1593
|
G(J), J.stopPropagation();
|
|
1594
|
-
const
|
|
1594
|
+
const Y = JSON.parse(J.dataTransfer.getData("text/plain")), Z = getElDataMap(J.target);
|
|
1595
1595
|
return this.dispatchPanelEvent("drop_on", {
|
|
1596
|
-
custom: { on:
|
|
1596
|
+
custom: { on: Z, from: Y }
|
|
1597
1597
|
}), !1;
|
|
1598
1598
|
};
|
|
1599
1599
|
D.forEach((J) => {
|
|
1600
|
-
this.listen(J, EV.DRAGOVER, q), this.listen(J, EV.DRAGENTER, F), this.listen(J, EV.DRAGEXIT,
|
|
1600
|
+
this.listen(J, EV.DRAGOVER, q), this.listen(J, EV.DRAGENTER, F), this.listen(J, EV.DRAGEXIT, X), this.listen(J, EV.DRAGLEAVE, W), this.listen(J, EV.DROP, tt);
|
|
1601
1601
|
}), U.forEach((J) => {
|
|
1602
|
-
this.listen(J, EV.DRAGSTART,
|
|
1602
|
+
this.listen(J, EV.DRAGSTART, K), this.listen(J, EV.DRAGEND, Q);
|
|
1603
1603
|
}), [...w.querySelectorAll(".zoo_async_json")].forEach((J) => {
|
|
1604
|
-
const
|
|
1605
|
-
this.user.fetchJson(
|
|
1606
|
-
const st =
|
|
1604
|
+
const Y = getElDataMap(J), Z = Y.href, et = this.onAsyncJsonReply.bind(this, J, Y);
|
|
1605
|
+
this.user.fetchJson(Z, this.abortController.signal).then(et);
|
|
1606
|
+
const st = Y.z_json_reusable;
|
|
1607
1607
|
st && (this.jsonCallFuncs = this.jsonCallFuncs || {}, this.jsonCallFuncs[st] = () => {
|
|
1608
|
-
this.user.fetchJson(
|
|
1608
|
+
this.user.fetchJson(Z, this.abortController.signal).then(et);
|
|
1609
1609
|
});
|
|
1610
|
-
const rt = toNumber(
|
|
1610
|
+
const rt = toNumber(Y.z_interval);
|
|
1611
1611
|
isNumber(rt) && this.doOnBeat(() => {
|
|
1612
|
-
this.user.fetchJson(
|
|
1612
|
+
this.user.fetchJson(Z, this.abortController.signal).then(et);
|
|
1613
1613
|
}, rt * 60 * 1e3);
|
|
1614
1614
|
}), [...w.querySelectorAll(".zoo_async_html")].forEach(
|
|
1615
1615
|
/**
|
|
1616
1616
|
* @param {Element} el
|
|
1617
1617
|
*/
|
|
1618
1618
|
(J) => {
|
|
1619
|
-
const
|
|
1620
|
-
this.user.fetchAndSplit(
|
|
1621
|
-
J.appendChild(st.html), this.parseContent(J), this.evalScripts(st.scripts), this.evalModules(st.modules), this.onAsyncHtmlReply(J,
|
|
1619
|
+
const Y = getElDataMap(J), Z = Y.href;
|
|
1620
|
+
this.user.fetchAndSplit(Z, this.abortController.signal).then((st) => {
|
|
1621
|
+
J.appendChild(st.html), this.parseContent(J), this.evalScripts(st.scripts), this.evalModules(st.modules), this.onAsyncHtmlReply(J, Y);
|
|
1622
1622
|
});
|
|
1623
|
-
const et = toNumber(
|
|
1623
|
+
const et = toNumber(Y.z_interval);
|
|
1624
1624
|
isNumber(et) && this.doOnBeat(() => {
|
|
1625
|
-
this.user.fetchAndSplit(
|
|
1625
|
+
this.user.fetchAndSplit(Z, this.abortController.signal).then((st) => {
|
|
1626
1626
|
J.replaceChildren(st.html), this.parseContent(J), this.evalScripts(st.scripts), this.evalModules(st.modules);
|
|
1627
1627
|
});
|
|
1628
1628
|
}, et * 60 * 1e3);
|
|
@@ -1697,7 +1697,7 @@ class FormPanel extends Panel {
|
|
|
1697
1697
|
* @param {boolean} intercept If false, we do not try and intercept the forms
|
|
1698
1698
|
*/
|
|
1699
1699
|
constructor(w, D = !0) {
|
|
1700
|
-
super(w), this.#s = D, this.
|
|
1700
|
+
super(w), this.#s = D, this.onSubmitSucFunc = (U, F) => null;
|
|
1701
1701
|
}
|
|
1702
1702
|
/**
|
|
1703
1703
|
* Gets the form element managed by this panel.
|
|
@@ -2022,8 +2022,8 @@ class Split extends Component {
|
|
|
2022
2022
|
* simply affected directly.
|
|
2023
2023
|
*/
|
|
2024
2024
|
resize(w, D, U = identity, F = !1) {
|
|
2025
|
-
const { sizeNow: q, nestEl: W, canResize:
|
|
2026
|
-
|
|
2025
|
+
const { sizeNow: q, nestEl: W, canResize: X } = this.nestMap_.get(w);
|
|
2026
|
+
X && (F || q === D ? (W.classList.remove("animated"), W.style.flexBasis = `${D}px`, this.nestMap_.get(w).sizeNow = D, U()) : (W.classList.add("animated"), this.nestCallbackMap_.set(w, () => {
|
|
2027
2027
|
W.classList.remove("animated"), this.nestMap_.get(w).sizeNow = D, U();
|
|
2028
2028
|
}), W.style.flexBasis = `${D}px`));
|
|
2029
2029
|
}
|
|
@@ -2039,19 +2039,19 @@ class Split extends Component {
|
|
|
2039
2039
|
const { nestEl: F, dragEl: q, canResize: W } = this.nestMap_.get(w);
|
|
2040
2040
|
if (!W)
|
|
2041
2041
|
return;
|
|
2042
|
-
const
|
|
2042
|
+
const X = () => {
|
|
2043
2043
|
q.classList.add("locked", "closed"), F.classList.add("closed"), D();
|
|
2044
2044
|
};
|
|
2045
|
-
this.resize(w, 0,
|
|
2045
|
+
this.resize(w, 0, X, U);
|
|
2046
2046
|
}
|
|
2047
2047
|
closeAndUnlock(w, D = identity, U = !1) {
|
|
2048
2048
|
const { nestEl: F, dragEl: q, canResize: W } = this.nestMap_.get(w);
|
|
2049
2049
|
if (!W)
|
|
2050
2050
|
return;
|
|
2051
|
-
const
|
|
2051
|
+
const X = () => {
|
|
2052
2052
|
F.classList.remove("closed"), q.classList.remove("closed", "locked"), q.classList.add("collapsed"), D();
|
|
2053
2053
|
};
|
|
2054
|
-
this.resize(w, 0,
|
|
2054
|
+
this.resize(w, 0, X, U);
|
|
2055
2055
|
}
|
|
2056
2056
|
/**
|
|
2057
2057
|
* Open a closed and locked nest. Simply a convenience method to combine
|
|
@@ -2067,13 +2067,13 @@ class Split extends Component {
|
|
|
2067
2067
|
const {
|
|
2068
2068
|
nestEl: q,
|
|
2069
2069
|
dragEl: W,
|
|
2070
|
-
defSize:
|
|
2070
|
+
defSize: X,
|
|
2071
2071
|
lastSize: G,
|
|
2072
|
-
canResize:
|
|
2072
|
+
canResize: K
|
|
2073
2073
|
} = this.nestMap_.get(w);
|
|
2074
|
-
if (!
|
|
2074
|
+
if (!K)
|
|
2075
2075
|
return;
|
|
2076
|
-
const Q = D || G ||
|
|
2076
|
+
const Q = D || G || X;
|
|
2077
2077
|
q.classList.remove("closed"), W.classList.remove("closed", "locked", "collapsed"), setTimeout(() => {
|
|
2078
2078
|
this.resize(w, Q, U, F);
|
|
2079
2079
|
}, 50);
|
|
@@ -2091,13 +2091,13 @@ class Split extends Component {
|
|
|
2091
2091
|
const {
|
|
2092
2092
|
nestEl: q,
|
|
2093
2093
|
dragEl: W,
|
|
2094
|
-
defSize:
|
|
2094
|
+
defSize: X,
|
|
2095
2095
|
lastSize: G,
|
|
2096
|
-
canResize:
|
|
2096
|
+
canResize: K
|
|
2097
2097
|
} = this.nestMap_.get(w);
|
|
2098
|
-
if (!
|
|
2098
|
+
if (!K)
|
|
2099
2099
|
return;
|
|
2100
|
-
const Q = D || G ||
|
|
2100
|
+
const Q = D || G || X;
|
|
2101
2101
|
q.classList.remove("closed"), W.classList.remove("closed", "collapsed"), setTimeout(() => {
|
|
2102
2102
|
this.resize(w, Q, U, F);
|
|
2103
2103
|
}, 50);
|
|
@@ -2116,10 +2116,10 @@ class Split extends Component {
|
|
|
2116
2116
|
if (!q)
|
|
2117
2117
|
return;
|
|
2118
2118
|
this.dispatchSplitEvent(UiEventType.SPLIT_WILL_CLOSE, { nestName: w, nestEl: W });
|
|
2119
|
-
const
|
|
2119
|
+
const X = () => {
|
|
2120
2120
|
F.classList.add("collapsed"), this.dispatchSplitEvent(UiEventType.SPLIT_DID_CLOSE, { nestName: w, nestEl: W }), D();
|
|
2121
2121
|
};
|
|
2122
|
-
this.resize(w, 0,
|
|
2122
|
+
this.resize(w, 0, X, U);
|
|
2123
2123
|
}
|
|
2124
2124
|
/**
|
|
2125
2125
|
* Open the nest ignoring its current locked state.
|
|
@@ -2130,14 +2130,14 @@ class Split extends Component {
|
|
|
2130
2130
|
* simply affected directly.
|
|
2131
2131
|
*/
|
|
2132
2132
|
open(w, D = identity, U = !1) {
|
|
2133
|
-
const { defSize: F, lastSize: q, dragEl: W, canResize:
|
|
2134
|
-
if (!
|
|
2133
|
+
const { defSize: F, lastSize: q, dragEl: W, canResize: X, nestEl: G } = this.nestMap_.get(w);
|
|
2134
|
+
if (!X)
|
|
2135
2135
|
return;
|
|
2136
2136
|
this.dispatchSplitEvent(UiEventType.SPLIT_WILL_OPEN, { nestName: w, nestEl: G }), W.classList.remove("collapsed", "closed");
|
|
2137
|
-
const
|
|
2137
|
+
const K = q || F, Q = () => {
|
|
2138
2138
|
this.dispatchSplitEvent(UiEventType.SPLIT_DID_OPEN, { nestName: w, nestEl: G }), D();
|
|
2139
2139
|
};
|
|
2140
|
-
this.resize(w,
|
|
2140
|
+
this.resize(w, K, Q, U);
|
|
2141
2141
|
}
|
|
2142
2142
|
/**
|
|
2143
2143
|
* Close the nest ignoring its current locked state.
|
|
@@ -2185,7 +2185,7 @@ class Split extends Component {
|
|
|
2185
2185
|
* @param {?Array<string>} classArrDragger Extra classes for the dragger element
|
|
2186
2186
|
* @param {?Array<string>} classArrGrabber Extra classes for the grabber element
|
|
2187
2187
|
*/
|
|
2188
|
-
addSplit(w = void 0, D = "EW", U = 100, F = 100, q = [], W = [],
|
|
2188
|
+
addSplit(w = void 0, D = "EW", U = 100, F = 100, q = [], W = [], X = [], G = [], K = []) {
|
|
2189
2189
|
const Q = w || this.getElement();
|
|
2190
2190
|
if (this.splitNests_.has(Q))
|
|
2191
2191
|
return ["Already used!", Q];
|
|
@@ -2198,12 +2198,12 @@ class Split extends Component {
|
|
|
2198
2198
|
else
|
|
2199
2199
|
return ["Element not managed by this component", w];
|
|
2200
2200
|
}
|
|
2201
|
-
const J = `${tt}A`,
|
|
2202
|
-
|
|
2201
|
+
const J = `${tt}A`, Y = makeOuterNest(U, ["zoo_nest__A", J, ...q]), Z = new Dragger(D);
|
|
2202
|
+
Z.domFunc = makeDraggerEl([`zoo_drag_${J}`, ...G], K), Z.render(Q), this.nestMap_.set(J, {
|
|
2203
2203
|
side: "A",
|
|
2204
|
-
nestEl:
|
|
2205
|
-
dragger:
|
|
2206
|
-
dragEl:
|
|
2204
|
+
nestEl: Y,
|
|
2205
|
+
dragger: Z,
|
|
2206
|
+
dragEl: Z.getElement(),
|
|
2207
2207
|
defSize: U,
|
|
2208
2208
|
sizeNow: -1,
|
|
2209
2209
|
canResize: !0
|
|
@@ -2211,8 +2211,8 @@ class Split extends Component {
|
|
|
2211
2211
|
const et = `${tt}B`, st = makeInnerNest(["zoo_nest__B", et, ...W]);
|
|
2212
2212
|
this.nestMap_.set(et, { nestEl: st, canResize: !1 });
|
|
2213
2213
|
const rt = `${tt}C`, nt = new Dragger(D);
|
|
2214
|
-
nt.domFunc = makeDraggerEl([`zoo_drag_${rt}`, ...G],
|
|
2215
|
-
const ot = makeOuterNest(F, ["zoo_nest__C", rt, ...
|
|
2214
|
+
nt.domFunc = makeDraggerEl([`zoo_drag_${rt}`, ...G], K), nt.render(Q);
|
|
2215
|
+
const ot = makeOuterNest(F, ["zoo_nest__C", rt, ...X]);
|
|
2216
2216
|
this.nestMap_.set(rt, {
|
|
2217
2217
|
side: "C",
|
|
2218
2218
|
nestEl: ot,
|
|
@@ -2221,7 +2221,7 @@ class Split extends Component {
|
|
|
2221
2221
|
defSize: F,
|
|
2222
2222
|
sizeNow: -1,
|
|
2223
2223
|
canResize: !0
|
|
2224
|
-
}), [
|
|
2224
|
+
}), [Y, Z.getElement(), st, nt.getElement(), ot].forEach((it) => Q.appendChild(it));
|
|
2225
2225
|
let ct = 0;
|
|
2226
2226
|
const ht = (it, at, lt, gt) => {
|
|
2227
2227
|
let ut;
|
|
@@ -2242,8 +2242,8 @@ class Split extends Component {
|
|
|
2242
2242
|
}
|
|
2243
2243
|
};
|
|
2244
2244
|
};
|
|
2245
|
-
this.listen(
|
|
2246
|
-
if (it.propertyName === "flex-basis" && it.target ===
|
|
2245
|
+
this.listen(Z, Component.compEventCode(), ht(D, Y, J, 1)), this.listen(nt, Component.compEventCode(), ht(D, ot, rt, -1)), this.listen(Z.getElement(), EV.DBLCLICK, () => this.toggle(J)), this.listen(nt.getElement(), EV.DBLCLICK, () => this.toggle(rt)), this.listen(Z.getElement().querySelector(".zoo_grabber"), EV.CLICK, () => this.toggle(J)), this.listen(nt.getElement().querySelector(".zoo_grabber"), EV.CLICK, () => this.toggle(rt)), this.listen(Y, EV.TRANSITIONEND, (it) => {
|
|
2246
|
+
if (it.propertyName === "flex-basis" && it.target === Y) {
|
|
2247
2247
|
const at = this.nestCallbackMap_.get(J);
|
|
2248
2248
|
this.nestCallbackMap_.delete(J), at && at(), this.dispatchSplitEvent(UiEventType.SPLIT_TRANSITION_END, this.nestMap_.get(J));
|
|
2249
2249
|
}
|
|
@@ -2881,23 +2881,23 @@ function _arity(O, w) {
|
|
|
2881
2881
|
return w.apply(this, arguments);
|
|
2882
2882
|
};
|
|
2883
2883
|
case 6:
|
|
2884
|
-
return function(D, U, F, q, W,
|
|
2884
|
+
return function(D, U, F, q, W, X) {
|
|
2885
2885
|
return w.apply(this, arguments);
|
|
2886
2886
|
};
|
|
2887
2887
|
case 7:
|
|
2888
|
-
return function(D, U, F, q, W,
|
|
2888
|
+
return function(D, U, F, q, W, X, G) {
|
|
2889
2889
|
return w.apply(this, arguments);
|
|
2890
2890
|
};
|
|
2891
2891
|
case 8:
|
|
2892
|
-
return function(D, U, F, q, W,
|
|
2892
|
+
return function(D, U, F, q, W, X, G, K) {
|
|
2893
2893
|
return w.apply(this, arguments);
|
|
2894
2894
|
};
|
|
2895
2895
|
case 9:
|
|
2896
|
-
return function(D, U, F, q, W,
|
|
2896
|
+
return function(D, U, F, q, W, X, G, K, Q) {
|
|
2897
2897
|
return w.apply(this, arguments);
|
|
2898
2898
|
};
|
|
2899
2899
|
case 10:
|
|
2900
|
-
return function(D, U, F, q, W,
|
|
2900
|
+
return function(D, U, F, q, W, X, G, K, Q, tt) {
|
|
2901
2901
|
return w.apply(this, arguments);
|
|
2902
2902
|
};
|
|
2903
2903
|
default:
|
|
@@ -2906,11 +2906,11 @@ function _arity(O, w) {
|
|
|
2906
2906
|
}
|
|
2907
2907
|
function _curryN(O, w, D) {
|
|
2908
2908
|
return function() {
|
|
2909
|
-
for (var U = [], F = 0, q = O, W = 0,
|
|
2909
|
+
for (var U = [], F = 0, q = O, W = 0, X = !1; W < w.length || F < arguments.length; ) {
|
|
2910
2910
|
var G;
|
|
2911
|
-
W < w.length && (!_isPlaceholder(w[W]) || F >= arguments.length) ? G = w[W] : (G = arguments[F], F += 1), U[W] = G, _isPlaceholder(G) ?
|
|
2911
|
+
W < w.length && (!_isPlaceholder(w[W]) || F >= arguments.length) ? G = w[W] : (G = arguments[F], F += 1), U[W] = G, _isPlaceholder(G) ? X = !0 : q -= 1, W += 1;
|
|
2912
2912
|
}
|
|
2913
|
-
return !
|
|
2913
|
+
return !X && q <= 0 ? D.apply(this, U) : _arity(Math.max(0, q), _curryN(O, U, D));
|
|
2914
2914
|
};
|
|
2915
2915
|
}
|
|
2916
2916
|
var curryN = /* @__PURE__ */ _curry2(function O(w, D) {
|
|
@@ -3176,6 +3176,35 @@ const DEFAULT_FORMATTERS = {
|
|
|
3176
3176
|
if (!O) return "";
|
|
3177
3177
|
const w = O instanceof Date ? O : new Date(O);
|
|
3178
3178
|
return isNaN(w.getTime()) ? (console.warn("[Binder] Invalid date value:", O), "") : dateToZooyStdTimeString(w);
|
|
3179
|
+
},
|
|
3180
|
+
/**
|
|
3181
|
+
* Template string interpolation formatter
|
|
3182
|
+
* Evaluates a template string with access to 'value' and 'data'
|
|
3183
|
+
* @example:
|
|
3184
|
+
* <!-- Simple value interpolation -->
|
|
3185
|
+
* <img zoo-bind-attr="src:mno_id|tpl"
|
|
3186
|
+
* zoo-bind-attr-tpl="/static/dist/img/networks/${value}.png">
|
|
3187
|
+
*
|
|
3188
|
+
* <!-- Access to nested data -->
|
|
3189
|
+
* <img zoo-bind-attr="src:mno_id|tpl"
|
|
3190
|
+
* zoo-bind-attr-tpl="/static/dist/img/${data.region}/networks/${value}.png">
|
|
3191
|
+
*
|
|
3192
|
+
* <!-- Conditional logic -->
|
|
3193
|
+
* <span zoo-bind-attr="class:status|tpl"
|
|
3194
|
+
* zoo-bind-attr-tpl="status-${value === 'active' ? 'good' : 'bad'}">
|
|
3195
|
+
*
|
|
3196
|
+
* <!-- Even expressions -->
|
|
3197
|
+
* <span zoo-bind="price|tpl"
|
|
3198
|
+
* zoo-bind-tpl="$${(value / 100).toFixed(2)}">
|
|
3199
|
+
*/
|
|
3200
|
+
tpl: (O, w, D) => {
|
|
3201
|
+
const U = D?.getAttribute("zoo-bind-attr-tpl");
|
|
3202
|
+
if (!U) return O;
|
|
3203
|
+
try {
|
|
3204
|
+
return new Function("value", "data", `return \`${U}\`;`)(O, w);
|
|
3205
|
+
} catch (F) {
|
|
3206
|
+
return console.warn("[Binder] Invalid template:", U, F), O;
|
|
3207
|
+
}
|
|
3179
3208
|
}
|
|
3180
3209
|
};
|
|
3181
3210
|
class Binder {
|
|
@@ -3200,7 +3229,7 @@ class Binder {
|
|
|
3200
3229
|
throw new Error("Binder requires a URL");
|
|
3201
3230
|
if (!U || !(U instanceof Element))
|
|
3202
3231
|
throw new Error("Binder requires a valid rootEl Element");
|
|
3203
|
-
this.#t = w, this.#e = new URL(D, window.location.origin), this.#s = U, this.#n = { ...DEFAULT_FORMATTERS, ...F.formatters }, F.urlParams
|
|
3232
|
+
this.#t = w, this.#e = new URL(D, window.location.origin), this.#s = U, this.#n = { ...DEFAULT_FORMATTERS, ...F.formatters }, F.urlParams ? this.#i(F.urlParams) : this.#o();
|
|
3204
3233
|
}
|
|
3205
3234
|
get url() {
|
|
3206
3235
|
return this.#e;
|
|
@@ -3219,7 +3248,7 @@ class Binder {
|
|
|
3219
3248
|
}
|
|
3220
3249
|
#i(w) {
|
|
3221
3250
|
return Object.entries(w).forEach(([D, U]) => {
|
|
3222
|
-
if (U
|
|
3251
|
+
if (!isDefAndNotNull(U) || U === "" || Array.isArray(U) && U.length < 1) {
|
|
3223
3252
|
this.#e.searchParams.delete(D);
|
|
3224
3253
|
return;
|
|
3225
3254
|
}
|
|
@@ -3228,7 +3257,19 @@ class Binder {
|
|
|
3228
3257
|
return;
|
|
3229
3258
|
}
|
|
3230
3259
|
this.#e.searchParams.set(D, U);
|
|
3231
|
-
}), this.#e;
|
|
3260
|
+
}), this.#o(), this.#e;
|
|
3261
|
+
}
|
|
3262
|
+
/**
|
|
3263
|
+
* Updates all elements with zoo-bind-binderurl attribute to have the current
|
|
3264
|
+
* URL path and query string as the attribute value. This allows elements to
|
|
3265
|
+
* dynamically reflect the binder's URL when it changes.
|
|
3266
|
+
* @private
|
|
3267
|
+
*/
|
|
3268
|
+
#o() {
|
|
3269
|
+
const w = this.#e.href.split(this.url.origin)[1].slice(1);
|
|
3270
|
+
this.#s.querySelectorAll("[zoo-bind-binderurl]").forEach((D) => {
|
|
3271
|
+
D.setAttribute("zoo-bind-binderurl", w);
|
|
3272
|
+
});
|
|
3232
3273
|
}
|
|
3233
3274
|
/**
|
|
3234
3275
|
* Fetches data from the configured URL with optional query parameters.
|
|
@@ -3281,7 +3322,7 @@ class Binder {
|
|
|
3281
3322
|
console.warn("[Binder] No data to render");
|
|
3282
3323
|
return;
|
|
3283
3324
|
}
|
|
3284
|
-
this.#o(this.#s, this.#r, 0), this.#
|
|
3325
|
+
this.#o(), this.#a(this.#s, this.#r, 0), this.#l();
|
|
3285
3326
|
}
|
|
3286
3327
|
/**
|
|
3287
3328
|
* Renders simple property bindings directly to existing elements.
|
|
@@ -3298,19 +3339,20 @@ class Binder {
|
|
|
3298
3339
|
* @param {boolean} [options.removeAttributes=false] - Remove binding attributes after processing (vs keeping for re-render)
|
|
3299
3340
|
* @private
|
|
3300
3341
|
*/
|
|
3301
|
-
#
|
|
3342
|
+
#a(w, D, U = 0, F = {}) {
|
|
3302
3343
|
const q = F.removeAttributes ?? !1;
|
|
3303
3344
|
w.querySelectorAll("[zoo-bind-attr]").forEach((W) => {
|
|
3304
3345
|
if (W.closest("[zoo-template]")) return;
|
|
3305
3346
|
W.getAttribute("zoo-bind-attr").split(",").forEach((G) => {
|
|
3306
|
-
const [
|
|
3307
|
-
|
|
3308
|
-
|
|
3347
|
+
const [K, Q] = G.split(":").map((Z) => Z.trim()), [tt, J] = Q.split("|").map((Z) => Z.trim());
|
|
3348
|
+
let Y = this.#c(D, tt, U);
|
|
3349
|
+
J && this.#n[J] && (Y = this.#n[J](Y, D, W)), isDefAndNotNull(Y) && W.setAttribute(K, Y);
|
|
3350
|
+
}), q && (W.removeAttribute("zoo-bind-attr"), W.removeAttribute("zoo-bind-attr-tpl"));
|
|
3309
3351
|
}), w.querySelectorAll("[zoo-bind]").forEach((W) => {
|
|
3310
3352
|
if (W.closest("[zoo-template]")) return;
|
|
3311
|
-
const
|
|
3312
|
-
let
|
|
3313
|
-
|
|
3353
|
+
const X = W.getAttribute("zoo-bind"), [G, K] = X.split("|").map((tt) => tt.trim());
|
|
3354
|
+
let Q = this.#c(D, G, U);
|
|
3355
|
+
K && this.#n[K] && (Q = this.#n[K](Q, D, W)), W.textContent = Q ?? "", q && (W.removeAttribute("zoo-bind"), W.removeAttribute("zoo-bind-tpl"));
|
|
3314
3356
|
});
|
|
3315
3357
|
}
|
|
3316
3358
|
/**
|
|
@@ -3318,7 +3360,7 @@ class Binder {
|
|
|
3318
3360
|
*
|
|
3319
3361
|
* @private
|
|
3320
3362
|
*/
|
|
3321
|
-
#
|
|
3363
|
+
#l() {
|
|
3322
3364
|
this.#s.querySelectorAll("[zoo-template]").forEach((D) => {
|
|
3323
3365
|
const U = D.getAttribute("zoo-template"), F = D.getAttribute("zoo-template-bind");
|
|
3324
3366
|
if (!U) {
|
|
@@ -3339,9 +3381,9 @@ class Binder {
|
|
|
3339
3381
|
console.error(`[DataBinder] Data slice is not an array. Path: ${F}`, W);
|
|
3340
3382
|
return;
|
|
3341
3383
|
}
|
|
3342
|
-
D.innerHTML = "", W.forEach((
|
|
3343
|
-
const
|
|
3344
|
-
D.appendChild(
|
|
3384
|
+
D.innerHTML = "", W.forEach((X, G) => {
|
|
3385
|
+
const K = this.#h(q, X, G);
|
|
3386
|
+
D.appendChild(K);
|
|
3345
3387
|
});
|
|
3346
3388
|
});
|
|
3347
3389
|
}
|
|
@@ -3355,9 +3397,9 @@ class Binder {
|
|
|
3355
3397
|
* @return {DocumentFragment} Rendered template clone
|
|
3356
3398
|
* @private
|
|
3357
3399
|
*/
|
|
3358
|
-
#
|
|
3400
|
+
#h(w, D, U) {
|
|
3359
3401
|
const F = w.content.cloneNode(!0);
|
|
3360
|
-
return this.#
|
|
3402
|
+
return this.#a(F, D, U, {
|
|
3361
3403
|
removeAttributes: !0
|
|
3362
3404
|
}), F;
|
|
3363
3405
|
}
|
|
@@ -3394,7 +3436,9 @@ const SEMANTIC_ATTRS = new Map(Object.entries({
|
|
|
3394
3436
|
target: "target",
|
|
3395
3437
|
"record-id": "recordId",
|
|
3396
3438
|
"zoo-sort-field": "sortField",
|
|
3397
|
-
"zoo-view": "view"
|
|
3439
|
+
"zoo-view": "view",
|
|
3440
|
+
"zoo-event": "event",
|
|
3441
|
+
"zoo-href": "href"
|
|
3398
3442
|
})), getSemanticAttributes = (O) => {
|
|
3399
3443
|
let w = {};
|
|
3400
3444
|
return Array.from(O.attributes).forEach((D) => {
|
|
@@ -3499,8 +3543,8 @@ let y$1 = class extends HTMLElement {
|
|
|
3499
3543
|
this[D] = W;
|
|
3500
3544
|
} };
|
|
3501
3545
|
return { get: F, set(W) {
|
|
3502
|
-
const
|
|
3503
|
-
q?.call(this, W), this.requestUpdate(w,
|
|
3546
|
+
const X = F?.call(this);
|
|
3547
|
+
q?.call(this, W), this.requestUpdate(w, X, U);
|
|
3504
3548
|
}, configurable: !0, enumerable: !0 };
|
|
3505
3549
|
}
|
|
3506
3550
|
static getPropertyOptions(w) {
|
|
@@ -3585,8 +3629,8 @@ let y$1 = class extends HTMLElement {
|
|
|
3585
3629
|
if (F !== void 0 && this._$Em !== F) {
|
|
3586
3630
|
const q = U.getPropertyOptions(F), W = typeof q.converter == "function" ? { fromAttribute: q.converter } : q.converter?.fromAttribute !== void 0 ? q.converter : u$1;
|
|
3587
3631
|
this._$Em = F;
|
|
3588
|
-
const
|
|
3589
|
-
this[F] =
|
|
3632
|
+
const X = W.fromAttribute(D, q.type);
|
|
3633
|
+
this[F] = X ?? this._$Ej?.get(F) ?? X, this._$Em = null;
|
|
3590
3634
|
}
|
|
3591
3635
|
}
|
|
3592
3636
|
requestUpdate(w, D, U) {
|
|
@@ -3622,8 +3666,8 @@ let y$1 = class extends HTMLElement {
|
|
|
3622
3666
|
}
|
|
3623
3667
|
const U = this.constructor.elementProperties;
|
|
3624
3668
|
if (U.size > 0) for (const [F, q] of U) {
|
|
3625
|
-
const { wrapped: W } = q,
|
|
3626
|
-
W !== !0 || this._$AL.has(F) ||
|
|
3669
|
+
const { wrapped: W } = q, X = this[F];
|
|
3670
|
+
W !== !0 || this._$AL.has(F) || X === void 0 || this.C(F, void 0, q, X);
|
|
3627
3671
|
}
|
|
3628
3672
|
}
|
|
3629
3673
|
let w = !1;
|
|
@@ -3676,12 +3720,12 @@ function P(O, w) {
|
|
|
3676
3720
|
const V = (O, w) => {
|
|
3677
3721
|
const D = O.length - 1, U = [];
|
|
3678
3722
|
let F, q = w === 2 ? "<svg>" : w === 3 ? "<math>" : "", W = f;
|
|
3679
|
-
for (let
|
|
3680
|
-
const G = O[
|
|
3681
|
-
let
|
|
3682
|
-
for (; J < G.length && (W.lastIndex = J, Q = W.exec(G), Q !== null); ) J = W.lastIndex, W === f ? Q[1] === "!--" ? W = v : Q[1] !== void 0 ? W = _ : Q[2] !== void 0 ? ($.test(Q[2]) && (F = RegExp("</" + Q[2], "g")), W = m) : Q[3] !== void 0 && (W = m) : W === m ? Q[0] === ">" ? (W = F ?? f, tt = -1) : Q[1] === void 0 ? tt = -2 : (tt = W.lastIndex - Q[2].length,
|
|
3683
|
-
const
|
|
3684
|
-
q += W === f ? G + n : tt >= 0 ? (U.push(
|
|
3723
|
+
for (let X = 0; X < D; X++) {
|
|
3724
|
+
const G = O[X];
|
|
3725
|
+
let K, Q, tt = -1, J = 0;
|
|
3726
|
+
for (; J < G.length && (W.lastIndex = J, Q = W.exec(G), Q !== null); ) J = W.lastIndex, W === f ? Q[1] === "!--" ? W = v : Q[1] !== void 0 ? W = _ : Q[2] !== void 0 ? ($.test(Q[2]) && (F = RegExp("</" + Q[2], "g")), W = m) : Q[3] !== void 0 && (W = m) : W === m ? Q[0] === ">" ? (W = F ?? f, tt = -1) : Q[1] === void 0 ? tt = -2 : (tt = W.lastIndex - Q[2].length, K = Q[1], W = Q[3] === void 0 ? m : Q[3] === '"' ? g : p) : W === g || W === p ? W = m : W === v || W === _ ? W = f : (W = m, F = void 0);
|
|
3727
|
+
const Y = W === m && O[X + 1].startsWith("/>") ? " " : "";
|
|
3728
|
+
q += W === f ? G + n : tt >= 0 ? (U.push(K), G.slice(0, tt) + e + G.slice(tt) + h + Y) : G + h + (tt === -2 ? X : Y);
|
|
3685
3729
|
}
|
|
3686
3730
|
return [P(O, q + (O[D] || "<?>") + (w === 2 ? "</svg>" : w === 3 ? "</math>" : "")), U];
|
|
3687
3731
|
};
|
|
@@ -3690,22 +3734,22 @@ class N {
|
|
|
3690
3734
|
let F;
|
|
3691
3735
|
this.parts = [];
|
|
3692
3736
|
let q = 0, W = 0;
|
|
3693
|
-
const
|
|
3694
|
-
if (this.el = N.createElement(
|
|
3737
|
+
const X = w.length - 1, G = this.parts, [K, Q] = V(w, D);
|
|
3738
|
+
if (this.el = N.createElement(K, U), C.currentNode = this.el.content, D === 2 || D === 3) {
|
|
3695
3739
|
const tt = this.el.content.firstChild;
|
|
3696
3740
|
tt.replaceWith(...tt.childNodes);
|
|
3697
3741
|
}
|
|
3698
|
-
for (; (F = C.nextNode()) !== null && G.length <
|
|
3742
|
+
for (; (F = C.nextNode()) !== null && G.length < X; ) {
|
|
3699
3743
|
if (F.nodeType === 1) {
|
|
3700
3744
|
if (F.hasAttributes()) for (const tt of F.getAttributeNames()) if (tt.endsWith(e)) {
|
|
3701
|
-
const J = Q[W++],
|
|
3702
|
-
G.push({ type: 1, index: q, name:
|
|
3745
|
+
const J = Q[W++], Y = F.getAttribute(tt).split(h), Z = /([.?@])?(.*)/.exec(J);
|
|
3746
|
+
G.push({ type: 1, index: q, name: Z[2], strings: Y, ctor: Z[1] === "." ? H : Z[1] === "?" ? I : Z[1] === "@" ? L : k }), F.removeAttribute(tt);
|
|
3703
3747
|
} else tt.startsWith(h) && (G.push({ type: 6, index: q }), F.removeAttribute(tt));
|
|
3704
3748
|
if ($.test(F.tagName)) {
|
|
3705
3749
|
const tt = F.textContent.split(h), J = tt.length - 1;
|
|
3706
3750
|
if (J > 0) {
|
|
3707
3751
|
F.textContent = i$1 ? i$1.emptyScript : "";
|
|
3708
|
-
for (let
|
|
3752
|
+
for (let Y = 0; Y < J; Y++) F.append(tt[Y], l()), C.nextNode(), G.push({ type: 2, index: ++q });
|
|
3709
3753
|
F.append(tt[J], l());
|
|
3710
3754
|
}
|
|
3711
3755
|
}
|
|
@@ -3741,11 +3785,11 @@ class M {
|
|
|
3741
3785
|
u(w) {
|
|
3742
3786
|
const { el: { content: D }, parts: U } = this._$AD, F = (w?.creationScope ?? r).importNode(D, !0);
|
|
3743
3787
|
C.currentNode = F;
|
|
3744
|
-
let q = C.nextNode(), W = 0,
|
|
3788
|
+
let q = C.nextNode(), W = 0, X = 0, G = U[0];
|
|
3745
3789
|
for (; G !== void 0; ) {
|
|
3746
3790
|
if (W === G.index) {
|
|
3747
|
-
let
|
|
3748
|
-
G.type === 2 ?
|
|
3791
|
+
let K;
|
|
3792
|
+
G.type === 2 ? K = new R(q, q.nextSibling, this, w) : G.type === 1 ? K = new G.ctor(q, G.name, G.strings, this, w) : G.type === 6 && (K = new z(q, this, w)), this._$AV.push(K), G = U[++X];
|
|
3749
3793
|
}
|
|
3750
3794
|
W !== G?.index && (q = C.nextNode(), W++);
|
|
3751
3795
|
}
|
|
@@ -3830,9 +3874,9 @@ class k {
|
|
|
3830
3874
|
let W = !1;
|
|
3831
3875
|
if (q === void 0) w = S(this, w, D, 0), W = !c(w) || w !== this._$AH && w !== T, W && (this._$AH = w);
|
|
3832
3876
|
else {
|
|
3833
|
-
const
|
|
3834
|
-
let G,
|
|
3835
|
-
for (w = q[0], G = 0; G < q.length - 1; G++)
|
|
3877
|
+
const X = w;
|
|
3878
|
+
let G, K;
|
|
3879
|
+
for (w = q[0], G = 0; G < q.length - 1; G++) K = S(this, X[U + G], D, G), K === T && (K = this._$AH[G]), W ||= !c(K) || K !== this._$AH[G], K === E ? w = E : w !== E && (w += (K ?? "") + q[G + 1]), this._$AH[G] = K;
|
|
3836
3880
|
}
|
|
3837
3881
|
W && !F && this.j(w);
|
|
3838
3882
|
}
|
|
@@ -3972,11 +4016,11 @@ const zoo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
|
|
|
3972
4016
|
getSemanticAttributes
|
|
3973
4017
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3974
4018
|
async function registerCarbonLibrary() {
|
|
3975
|
-
const { registerCarbonLibrary: O } = await import("./register-
|
|
4019
|
+
const { registerCarbonLibrary: O } = await import("./register-C3XDWad0.js");
|
|
3976
4020
|
return O();
|
|
3977
4021
|
}
|
|
3978
4022
|
async function registerMdcLibrary() {
|
|
3979
|
-
const { registerMdcLibrary: O } = await import("./register-
|
|
4023
|
+
const { registerMdcLibrary: O } = await import("./register-CyNp_638.js");
|
|
3980
4024
|
return O();
|
|
3981
4025
|
}
|
|
3982
4026
|
const zooy = {
|
|
@@ -4000,12 +4044,14 @@ const zooy = {
|
|
|
4000
4044
|
zoo
|
|
4001
4045
|
};
|
|
4002
4046
|
export {
|
|
4003
|
-
|
|
4047
|
+
uriUtils as A,
|
|
4004
4048
|
Binder as B,
|
|
4005
4049
|
ComponentLibraryRegistry as C,
|
|
4006
4050
|
Dragger as D,
|
|
4007
4051
|
E,
|
|
4008
4052
|
FormPanel as F,
|
|
4053
|
+
handlers as G,
|
|
4054
|
+
zoo as H,
|
|
4009
4055
|
Panel as P,
|
|
4010
4056
|
Split as S,
|
|
4011
4057
|
T,
|
|
@@ -4014,28 +4060,28 @@ export {
|
|
|
4014
4060
|
_curry2 as _,
|
|
4015
4061
|
i$3 as a,
|
|
4016
4062
|
b,
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4063
|
+
_curry3 as c,
|
|
4064
|
+
_path as d,
|
|
4065
|
+
isDefAndNotNull as e,
|
|
4020
4066
|
f$1 as f,
|
|
4021
4067
|
getSemanticAttributes as g,
|
|
4022
4068
|
hasPath as h,
|
|
4023
4069
|
i,
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4070
|
+
getEventAttribute as j,
|
|
4071
|
+
B as k,
|
|
4072
|
+
getElDataMap as l,
|
|
4073
|
+
treeUtils as m,
|
|
4074
|
+
registerMdcLibrary as n,
|
|
4029
4075
|
objToPaths as o,
|
|
4030
4076
|
path as p,
|
|
4031
|
-
|
|
4077
|
+
Evt as q,
|
|
4032
4078
|
registerCarbonLibrary as r,
|
|
4033
|
-
|
|
4079
|
+
Component as s,
|
|
4034
4080
|
toLowerCase as t,
|
|
4035
4081
|
u$1 as u,
|
|
4036
|
-
|
|
4037
|
-
|
|
4082
|
+
UiEventType as v,
|
|
4083
|
+
Conductor as w,
|
|
4038
4084
|
x,
|
|
4039
|
-
|
|
4085
|
+
domUtils as y,
|
|
4040
4086
|
zooy as z
|
|
4041
4087
|
};
|