@trintel/zooy 1.0.20 → 1.1.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/component-library-registry-BBQV6Kpv.js +1 -0
- package/dist/chunks/component-library-registry-DB5UeqC2.js +58 -0
- package/dist/chunks/register-D3pWAXhm.js +266 -0
- package/dist/chunks/register-HYODt48Q.js +1 -0
- package/dist/chunks/register-aF5kN8wT.js +1379 -0
- package/dist/chunks/register-uV9z3usH.js +1 -0
- package/dist/chunks/{tree-utils-D7kpr-Wj.js → tree-utils-B2JEGXHR.js} +2 -1
- package/dist/chunks/tree-utils-BYnipT-p.js +1 -0
- package/dist/chunks/zoo-CY2QpG41.js +52 -0
- package/dist/chunks/zoo-DgdxBjlN.js +390 -0
- package/dist/zooy.cjs.js +4 -4
- package/dist/zooy.es.js +226 -237
- package/package.json +1 -1
- package/dist/chunks/16-B2HVhDIW.js +0 -1
- package/dist/chunks/16-B9Ad4Fob.js +0 -19
- package/dist/chunks/16-BXsOcjPx.js +0 -19
- package/dist/chunks/16-BZCBqUx6.js +0 -1
- package/dist/chunks/16-BmOXGjZf.js +0 -1
- package/dist/chunks/16-BsQdCz_w.js +0 -27
- package/dist/chunks/16-C-Rp3Nso.js +0 -1
- package/dist/chunks/16-C36sVk5F.js +0 -26
- package/dist/chunks/16-CZycT1I8.js +0 -1
- package/dist/chunks/16-Ce_hDgPW.js +0 -1
- package/dist/chunks/16-CinLDpNC.js +0 -19
- package/dist/chunks/16-Cj0hOjaI.js +0 -1
- package/dist/chunks/16-Cx-PCMJJ.js +0 -26
- package/dist/chunks/16-D8XFc44J.js +0 -110
- package/dist/chunks/16-DVx7Niko.js +0 -33
- package/dist/chunks/16-DZJZDJYY.js +0 -1
- package/dist/chunks/16-DoCnqtvj.js +0 -35
- package/dist/chunks/16-DyCV3lkl.js +0 -19
- package/dist/chunks/16-SwMpxJpB.js +0 -19
- package/dist/chunks/16-jVjxC8Bu.js +0 -1
- package/dist/chunks/16-ma2Q_204.js +0 -1
- package/dist/chunks/16-qZ3FOIw0.js +0 -1
- package/dist/chunks/20-BwzzGcZC.js +0 -80
- package/dist/chunks/20-CqNSki3g.js +0 -1
- package/dist/chunks/accordion-0mybViUv.js +0 -236
- package/dist/chunks/accordion-CvcaulG8.js +0 -45
- package/dist/chunks/badge-indicator-BUdDkz6Z.js +0 -18
- package/dist/chunks/badge-indicator-DuYbJV5o.js +0 -1
- package/dist/chunks/breadcrumb-CYKgjbdB.js +0 -19
- package/dist/chunks/breadcrumb-DB0PkiBX.js +0 -140
- package/dist/chunks/button-1g5b3tWS.js +0 -268
- package/dist/chunks/button-BKj8189A.js +0 -4
- package/dist/chunks/button-DAOoyQ8b.js +0 -67
- package/dist/chunks/button-DfRkC-OR.js +0 -72
- package/dist/chunks/button-skeleton-C0mW3D7v.js +0 -44
- package/dist/chunks/button-skeleton-KFGdwtUH.js +0 -21
- package/dist/chunks/carbon-element-BsPGNbmz.js +0 -1
- package/dist/chunks/carbon-element-Z5iEnFdr.js +0 -24
- package/dist/chunks/checkbox-CBD8Qmjx.js +0 -37
- package/dist/chunks/checkbox-CewERWBu.js +0 -40
- package/dist/chunks/checkbox-CxxD4wgP.js +0 -176
- package/dist/chunks/checkbox-DKS7fw29.js +0 -168
- package/dist/chunks/class-map-BwUbMyhc.js +0 -1
- package/dist/chunks/class-map-qeLb1IA_.js +0 -27
- package/dist/chunks/code-snippet-BJhK27fG.js +0 -205
- package/dist/chunks/code-snippet-BUQFh_v7.js +0 -53
- package/dist/chunks/collection-helpers-DPVzwwb8.js +0 -7
- package/dist/chunks/collection-helpers-g7DrZSRQ.js +0 -1
- package/dist/chunks/combo-box-BCOUQHyG.js +0 -39
- package/dist/chunks/combo-box-Bms5blM6.js +0 -325
- package/dist/chunks/combo-button-BSBAvBIW.js +0 -15
- package/dist/chunks/combo-button-Bc3hx7VJ.js +0 -92
- package/dist/chunks/component-library-registry-CJ1Yb_8E.js +0 -98
- package/dist/chunks/component-library-registry-Co7WzTfw.js +0 -1
- package/dist/chunks/content-switcher-BuLZ3Aae.js +0 -1
- package/dist/chunks/content-switcher-DIODRHwc.js +0 -2
- package/dist/chunks/content-switcher-item-0YPDXW1z.js +0 -27
- package/dist/chunks/content-switcher-item-DkRD8k8n.js +0 -272
- package/dist/chunks/copy-button-XD4reiTK.js +0 -121
- package/dist/chunks/copy-button-eI9B8iKc.js +0 -17
- package/dist/chunks/data-table-BImLEoIA.js +0 -1243
- package/dist/chunks/data-table-YLNCQhJx.js +0 -158
- package/dist/chunks/date-picker-CWIAwkKj.js +0 -66
- package/dist/chunks/date-picker-CXjiOkZH.js +0 -2167
- package/dist/chunks/decorate-Cnz2C5jL.js +0 -62
- package/dist/chunks/decorate-DT052P_1.js +0 -72
- package/dist/chunks/decorators-CHZSYVOk.js +0 -1
- package/dist/chunks/decorators-CK8kfuyw.js +0 -87
- package/dist/chunks/deep-shadow-contains-BlQ_KSu4.js +0 -15
- package/dist/chunks/deep-shadow-contains-OTuAt1VE.js +0 -1
- package/dist/chunks/directive-CtTB8jL3.js +0 -31
- package/dist/chunks/directive-DWoJrOxt.js +0 -1
- package/dist/chunks/dropdown-Cg9JduA5.js +0 -4
- package/dist/chunks/dropdown-item-CYwutWei.js +0 -677
- package/dist/chunks/dropdown-item-H53zayYk.js +0 -73
- package/dist/chunks/dropdown-jdFaaXEa.js +0 -32
- package/dist/chunks/file-uploader-6FOP_GAh.js +0 -79
- package/dist/chunks/file-uploader-BTk1MqcJ.js +0 -342
- package/dist/chunks/floating-controller-BphaSUPY.js +0 -1012
- package/dist/chunks/floating-controller-C4ivnNvp.js +0 -1
- package/dist/chunks/focus-C1mbe9-i.js +0 -1
- package/dist/chunks/focus-Dpis0wA_.js +0 -13
- package/dist/chunks/form-BEmId1-D.js +0 -20
- package/dist/chunks/form-BmSVyKnm.js +0 -1
- package/dist/chunks/form-DUzcwJO9.js +0 -23
- package/dist/chunks/form-crnrWPVH.js +0 -3
- package/dist/chunks/form-group-Dax3eYD4.js +0 -43
- package/dist/chunks/form-group-dIvuqjw2.js +0 -12
- package/dist/chunks/heading-BbB6mvMG.js +0 -47
- package/dist/chunks/heading-UN9MO1TN.js +0 -5
- package/dist/chunks/host-listener-BBI7oAFw.js +0 -37
- package/dist/chunks/host-listener-BzjpIsFF.js +0 -1
- package/dist/chunks/host-listener-CtA1D-wt.js +0 -1
- package/dist/chunks/host-listener-DJEakRMM.js +0 -17
- package/dist/chunks/icon-B_S1_kDJ.js +0 -1
- package/dist/chunks/icon-CINf5Icb.js +0 -28
- package/dist/chunks/icon-button-BtE0-oCE.js +0 -1
- package/dist/chunks/icon-button-CACU21y5.js +0 -16
- package/dist/chunks/icon-button-D2STrB4d.js +0 -6
- package/dist/chunks/icon-button-D569kvcZ.js +0 -84
- package/dist/chunks/icon-indicator-BkILzP5o.js +0 -1
- package/dist/chunks/icon-indicator-D_IHkSon.js +0 -445
- package/dist/chunks/icon-loader-B9uu2SkP.js +0 -7
- package/dist/chunks/icon-loader-CZ8MQjNl.js +0 -1
- package/dist/chunks/icon-loader-utils-BKulYpY6.js +0 -110
- package/dist/chunks/icon-loader-utils-C-vWa1iy.js +0 -1
- package/dist/chunks/if-defined-C4rY5CqG.js +0 -1
- package/dist/chunks/if-defined-DvPh-nZx.js +0 -5
- package/dist/chunks/if-non-empty-CqihXhSU.js +0 -1
- package/dist/chunks/if-non-empty-DIcT03Pc.js +0 -5
- package/dist/chunks/inline-loading-BIB-coVZ.js +0 -83
- package/dist/chunks/inline-loading-C4MpPNzv.js +0 -12
- package/dist/chunks/link-Bz8knkhr.js +0 -1
- package/dist/chunks/link-CyrOt3Yx.js +0 -24
- package/dist/chunks/link-DlDoN1r0.js +0 -1
- package/dist/chunks/link-MrslkhR7.js +0 -106
- package/dist/chunks/lit-BNk7ncU9.js +0 -3
- package/dist/chunks/lit-uyM4-HrV.js +0 -552
- package/dist/chunks/loading-CUUY8ITP.js +0 -68
- package/dist/chunks/loading-CX_B-YYv.js +0 -1
- package/dist/chunks/loading-SDDHeWof.js +0 -1
- package/dist/chunks/loading-icon-BsInpAjb.js +0 -16
- package/dist/chunks/loading-icon-iCI-C5ZG.js +0 -24
- package/dist/chunks/loading-xKooWNUJ.js +0 -2
- package/dist/chunks/menu-D2kFhclQ.js +0 -56
- package/dist/chunks/menu-DG7s9yXJ.js +0 -682
- package/dist/chunks/modal-C2EEHjQh.js +0 -27
- package/dist/chunks/modal-DEGWE2iT.js +0 -414
- package/dist/chunks/multi-select-BXST526m.js +0 -63
- package/dist/chunks/multi-select-CgDCOBWa.js +0 -384
- package/dist/chunks/notification-BEvb6zBP.js +0 -89
- package/dist/chunks/notification-DLOgEfr6.js +0 -426
- package/dist/chunks/number-input-CRIgLD3k.js +0 -284
- package/dist/chunks/number-input-CiXkIGVz.js +0 -76
- package/dist/chunks/on-D2_IwJad.js +0 -8
- package/dist/chunks/on-_BJL2XbM.js +0 -1
- package/dist/chunks/overflow-menu-BSMy7pUY.js +0 -34
- package/dist/chunks/overflow-menu-CGghH3Mz.js +0 -387
- package/dist/chunks/pagination-4SuGaSx6.js +0 -77
- package/dist/chunks/pagination-D7VFRyN2.js +0 -293
- package/dist/chunks/password-input-Cx2ItLqG.js +0 -68
- package/dist/chunks/password-input-NoZg_DjL.js +0 -210
- package/dist/chunks/popover--wvkgqdv.js +0 -1
- package/dist/chunks/popover-Ca4f4ZCE.js +0 -6
- package/dist/chunks/popover-content-BOaLSQt3.js +0 -15
- package/dist/chunks/popover-content-Bi-ydBhZ.js +0 -277
- package/dist/chunks/progress-bar-BTHREDPK.js +0 -101
- package/dist/chunks/progress-bar-p0YwLsuh.js +0 -22
- package/dist/chunks/progress-indicator-BP8k-xTC.js +0 -252
- package/dist/chunks/progress-indicator-cr687P29.js +0 -35
- package/dist/chunks/radio-button-CNOPBUK8.js +0 -396
- package/dist/chunks/radio-button-CU2ngHxo.js +0 -44
- package/dist/chunks/radio-group-manager-iPCcbWB8.js +0 -60
- package/dist/chunks/radio-group-manager-zfU1GLIW.js +0 -1
- package/dist/chunks/register-BXKEXKsC.js +0 -15
- package/dist/chunks/register-Bx7SlevL.js +0 -8198
- package/dist/chunks/register-CnJjkv07.js +0 -1
- package/dist/chunks/register-DqgfpeXv.js +0 -1399
- package/dist/chunks/search-BYWQ80wI.js +0 -4
- package/dist/chunks/search-BgSG9LA9.js +0 -22
- package/dist/chunks/search-CET7sHGW.js +0 -173
- package/dist/chunks/search-CUuRRsTX.js +0 -31
- package/dist/chunks/select-BifhTIxt.js +0 -37
- package/dist/chunks/select-Dh4AFZ2v.js +0 -4
- package/dist/chunks/select-item-BvwJ4Wc-.js +0 -77
- package/dist/chunks/select-item-DLWdT1CE.js +0 -272
- package/dist/chunks/shared-enums-BdDASwq-.js +0 -1
- package/dist/chunks/shared-enums-Cd0vBQFM.js +0 -6
- package/dist/chunks/skeleton-placeholder-Czj5sAeI.js +0 -28
- package/dist/chunks/skeleton-placeholder-aS-woCl8.js +0 -1
- package/dist/chunks/skeleton-text-BIHdj7Jx.js +0 -1
- package/dist/chunks/skeleton-text-CZ2bSuDE.js +0 -6
- package/dist/chunks/skeleton-text-DJrow5mh.js +0 -1
- package/dist/chunks/skeleton-text-INjLvc2Y.js +0 -71
- package/dist/chunks/slider-CoHP_UJ2.js +0 -878
- package/dist/chunks/slider-DhIZP9Ms.js +0 -246
- package/dist/chunks/stack-C66k74Zo.js +0 -1
- package/dist/chunks/stack-vrK3hQYJ.js +0 -85
- package/dist/chunks/structured-list-BWjXHFbX.js +0 -19
- package/dist/chunks/structured-list-lqhD2RqL.js +0 -234
- package/dist/chunks/tabs-DixpRz83.js +0 -58
- package/dist/chunks/tabs-DkIGB3cC.js +0 -316
- package/dist/chunks/tag-DpezbQqm.js +0 -93
- package/dist/chunks/tag-rQOD2v2s.js +0 -412
- package/dist/chunks/text-input-BYjtsh0H.js +0 -26
- package/dist/chunks/text-input-C2jRG8Lb.js +0 -72
- package/dist/chunks/text-input-DvygxhCJ.js +0 -4
- package/dist/chunks/text-input-DzSNpORC.js +0 -309
- package/dist/chunks/textarea-BZ34-RaT.js +0 -190
- package/dist/chunks/textarea-Be3YTme6.js +0 -57
- package/dist/chunks/tile-CQ9nINGM.js +0 -524
- package/dist/chunks/tile-DNWy90OU.js +0 -74
- package/dist/chunks/time-picker-CJ_ONMZi.js +0 -267
- package/dist/chunks/time-picker-DK_Lu3AK.js +0 -52
- package/dist/chunks/toggle-BBdusHAx.js +0 -36
- package/dist/chunks/toggle-Bfx6cOUM.js +0 -156
- package/dist/chunks/toggle-tip-CkH7fFX4.js +0 -46
- package/dist/chunks/toggle-tip-DF_GKfoM.js +0 -169
- package/dist/chunks/tooltip-COwRDvmc.js +0 -85
- package/dist/chunks/tooltip-DbGsUOZ8.js +0 -23
- package/dist/chunks/tooltip-content-BDcgoT6r.js +0 -1
- package/dist/chunks/tooltip-content-CkxKIMDr.js +0 -116
- package/dist/chunks/tree-utils-AeNlEhIR.js +0 -1
- package/dist/chunks/tree-view-BmoD8n0Y.js +0 -292
- package/dist/chunks/tree-view-Drfa7DNm.js +0 -82
- package/dist/chunks/unsafe-html-BP-z2WTp.js +0 -26
- package/dist/chunks/unsafe-html-Dego4Lbw.js +0 -1
- package/dist/chunks/validity-CMW3OiFU.js +0 -31
- package/dist/chunks/validity-zT-XWh2t.js +0 -1
- package/dist/chunks/zoo-Bb5HHyrn.js +0 -721
- package/dist/chunks/zoo-C_CBOaHL.js +0 -52
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var u=Object.create,i=Object.defineProperty,g=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,b=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,f=(e,t)=>{let r={};for(var a in e)i(r,a,{get:e[a],enumerable:!0});return t||i(r,Symbol.toStringTag,{value:"Module"}),r},_=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=p(t),o=0,c=s.length,n;o<c;o++)n=s[o],!h.call(e,n)&&n!==r&&i(e,n,{get:(l=>t[l]).bind(null,n),enumerable:!(a=g(t,n))||a.enumerable});return e},y=(e,t,r)=>(r=e!=null?u(b(e)):{},_(t||!e||!e.__esModule?i(r,"default",{value:e,enumerable:!0}):r,e)),d=class{static#e=new Map;static register(e,t){if(!t.render)throw new Error(`Component library '${e}' must provide a render function`);this.#e.set(e,{...t,dispose:t.dispose||null,cache:t.cache||new Map,config:t.config||{}}),console.debug(`[ComponentLibraryRegistry] Registered: ${e}`)}static get(e){if(!this.#e.has(e)){const t=Array.from(this.#e.keys()).join(", ");throw new Error(`Component library '${e}' is not registered. Available: ${t||"none"}`)}return this.#e.get(e)}static has(e){return this.#e.has(e)}static getRegisteredLibraries(){return Array.from(this.#e.keys())}static getCacheStats(){const e={};for(const[t,r]of this.#e.entries())e[t]={cacheSize:r.cache.size,config:r.config};return e}static clearAllCaches(){for(const[e,t]of this.#e.entries())t.cache.clear(),console.debug(`[ComponentLibraryRegistry] Cleared cache for: ${e}`)}static clearCache(e){this.get(e).cache.clear(),console.debug(`[ComponentLibraryRegistry] Cleared cache for: ${e}`)}static unregister(e){return this.#e.delete(e)}static unregisterAll(){this.#e.clear()}};Object.defineProperty(exports,"ComponentLibraryRegistry",{enumerable:!0,get:function(){return d}});Object.defineProperty(exports,"__exportAll",{enumerable:!0,get:function(){return f}});Object.defineProperty(exports,"__toESM",{enumerable:!0,get:function(){return y}});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
var i = Object.defineProperty, a = (e, t) => {
|
|
2
|
+
let r = {};
|
|
3
|
+
for (var s in e)
|
|
4
|
+
i(r, s, {
|
|
5
|
+
get: e[s],
|
|
6
|
+
enumerable: !0
|
|
7
|
+
});
|
|
8
|
+
return t || i(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
9
|
+
}, o = class {
|
|
10
|
+
static #e = /* @__PURE__ */ new Map();
|
|
11
|
+
static register(e, t) {
|
|
12
|
+
if (!t.render) throw new Error(`Component library '${e}' must provide a render function`);
|
|
13
|
+
this.#e.set(e, {
|
|
14
|
+
...t,
|
|
15
|
+
dispose: t.dispose || null,
|
|
16
|
+
cache: t.cache || /* @__PURE__ */ new Map(),
|
|
17
|
+
config: t.config || {}
|
|
18
|
+
}), console.debug(`[ComponentLibraryRegistry] Registered: ${e}`);
|
|
19
|
+
}
|
|
20
|
+
static get(e) {
|
|
21
|
+
if (!this.#e.has(e)) {
|
|
22
|
+
const t = Array.from(this.#e.keys()).join(", ");
|
|
23
|
+
throw new Error(`Component library '${e}' is not registered. Available: ${t || "none"}`);
|
|
24
|
+
}
|
|
25
|
+
return this.#e.get(e);
|
|
26
|
+
}
|
|
27
|
+
static has(e) {
|
|
28
|
+
return this.#e.has(e);
|
|
29
|
+
}
|
|
30
|
+
static getRegisteredLibraries() {
|
|
31
|
+
return Array.from(this.#e.keys());
|
|
32
|
+
}
|
|
33
|
+
static getCacheStats() {
|
|
34
|
+
const e = {};
|
|
35
|
+
for (const [t, r] of this.#e.entries()) e[t] = {
|
|
36
|
+
cacheSize: r.cache.size,
|
|
37
|
+
config: r.config
|
|
38
|
+
};
|
|
39
|
+
return e;
|
|
40
|
+
}
|
|
41
|
+
static clearAllCaches() {
|
|
42
|
+
for (const [e, t] of this.#e.entries())
|
|
43
|
+
t.cache.clear(), console.debug(`[ComponentLibraryRegistry] Cleared cache for: ${e}`);
|
|
44
|
+
}
|
|
45
|
+
static clearCache(e) {
|
|
46
|
+
this.get(e).cache.clear(), console.debug(`[ComponentLibraryRegistry] Cleared cache for: ${e}`);
|
|
47
|
+
}
|
|
48
|
+
static unregister(e) {
|
|
49
|
+
return this.#e.delete(e);
|
|
50
|
+
}
|
|
51
|
+
static unregisterAll() {
|
|
52
|
+
this.#e.clear();
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
a as n,
|
|
57
|
+
o as t
|
|
58
|
+
};
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { t as M } from "./component-library-registry-DB5UeqC2.js";
|
|
2
|
+
import { r as E, s as l } from "./tree-utils-B2JEGXHR.js";
|
|
3
|
+
import { isDefAndNotNull as p, toLowerCase as C } from "badu";
|
|
4
|
+
import * as a from "material-components-web";
|
|
5
|
+
var y = function(t) {
|
|
6
|
+
[...t.querySelectorAll(".mdc-ripple-surface")].forEach(a.ripple.MDCRipple.attachTo);
|
|
7
|
+
}, b = function(t) {
|
|
8
|
+
[...t.querySelectorAll(".mdc-button")].forEach((o) => {
|
|
9
|
+
a.ripple.MDCRipple.attachTo(o), this.listen(o, "click", (n) => {
|
|
10
|
+
const r = n.currentTarget, e = l(r);
|
|
11
|
+
this.dispatchPanelEvent(e.zv, Object.assign({
|
|
12
|
+
orgEvt: n,
|
|
13
|
+
trigger: r,
|
|
14
|
+
href: r.href || e.href
|
|
15
|
+
}, e));
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
}, D = function(t) {
|
|
19
|
+
[...t.querySelectorAll(".mdc-fab")].forEach((o) => {
|
|
20
|
+
a.ripple.MDCRipple.attachTo(o), this.listen(o, "click", (n) => {
|
|
21
|
+
n.stopPropagation();
|
|
22
|
+
const r = n.currentTarget, e = l(r);
|
|
23
|
+
this.dispatchPanelEvent(e.zv, Object.assign({
|
|
24
|
+
orgEvt: n,
|
|
25
|
+
trigger: r,
|
|
26
|
+
href: r.href || e.href
|
|
27
|
+
}, e));
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
}, S = function(t) {
|
|
31
|
+
[...t.querySelectorAll(".mdc-icon-button:not(.mdc-icon-toggle)")].forEach((o) => {
|
|
32
|
+
const n = new a.ripple.MDCRipple(o);
|
|
33
|
+
o.zComponent = n, n.unbounded = !0, this.listen(o, "click", (r) => {
|
|
34
|
+
const e = r.currentTarget, c = l(e), s = c.zv;
|
|
35
|
+
p(s) && (r.stopPropagation(), this.dispatchPanelEvent(c.zv, Object.assign({
|
|
36
|
+
orgEvt: r,
|
|
37
|
+
trigger: e,
|
|
38
|
+
href: e.href || c.href
|
|
39
|
+
}, c)));
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
}, w = function(t) {
|
|
43
|
+
[...t.querySelectorAll(".mdc-icon-toggle")].forEach((o) => {
|
|
44
|
+
const n = o.ariaPressed === "true", r = new a.iconButton.MDCIconButtonToggle(o);
|
|
45
|
+
r.on = n, o.zComponent = r, this.listen(o, "click", (e) => e.stopPropagation()), this.listen(o, "MDCIconButtonToggle:change", (e) => {
|
|
46
|
+
e.stopPropagation();
|
|
47
|
+
const c = e.currentTarget, s = e.detail.isOn, i = l(c);
|
|
48
|
+
this.dispatchPanelEvent(i.zv, Object.assign({
|
|
49
|
+
orgEvt: e,
|
|
50
|
+
trigger: c,
|
|
51
|
+
href: c.href || i.href,
|
|
52
|
+
isOn: s
|
|
53
|
+
}, i));
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
}, A = function(t) {
|
|
57
|
+
const o = "mdc-checkbox__native-control";
|
|
58
|
+
[...t.querySelectorAll(".mdc-data-table")].forEach((n) => {
|
|
59
|
+
const r = new a.dataTable.MDCDataTable(n);
|
|
60
|
+
r.selectedAllAcrossPages = !1, r.onSomeSelected = (c) => {
|
|
61
|
+
}, r.onNoneSelected = (c) => {
|
|
62
|
+
}, r.onAllSelected = (c) => {
|
|
63
|
+
}, r.toggleSelectAcrossPages = () => (r.selectedAllAcrossPages = !r.selectedAllAcrossPages, r.selectedAllAcrossPages), r.setSelectAcrossPages = (c) => (r.selectedAllAcrossPages = c, r.selectedAllAcrossPages), r.getSelectAcrossPages = () => r.selectedAllAcrossPages, n.zComponent = r, n.dataTable = r;
|
|
64
|
+
const e = (c) => {
|
|
65
|
+
const s = r.getSelectedRowIds().length;
|
|
66
|
+
c.type === "MDCDataTable:selectedAll" ? r.onAllSelected(s) : s === 0 ? r.onNoneSelected(s) : r.onSomeSelected(s);
|
|
67
|
+
};
|
|
68
|
+
[
|
|
69
|
+
"MDCDataTable:rowSelectionChanged",
|
|
70
|
+
"MDCDataTable:selectedAll",
|
|
71
|
+
"MDCDataTable:unselectedAll"
|
|
72
|
+
].forEach((c) => {
|
|
73
|
+
this.listen(n, c, e);
|
|
74
|
+
}), [...n.querySelectorAll(".mdc-data-table__row")].forEach((c) => {
|
|
75
|
+
this.listen(c, "click", (s) => {
|
|
76
|
+
if (!s.target.classList.contains(o)) {
|
|
77
|
+
s.stopPropagation();
|
|
78
|
+
const i = s.currentTarget, d = l(i);
|
|
79
|
+
this.dispatchPanelEvent(d.zv, Object.assign({
|
|
80
|
+
orgEvt: s,
|
|
81
|
+
trigger: i,
|
|
82
|
+
href: i.href || d.href
|
|
83
|
+
}, d));
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
}, T = function(t) {
|
|
89
|
+
[...t.querySelectorAll(".mdc-tab-bar")].forEach((o) => {
|
|
90
|
+
const n = new a.tabBar.MDCTabBar(o);
|
|
91
|
+
o.zComponent = n, this.listen(o, "MDCTabBar:activated", (r) => {
|
|
92
|
+
const e = n.tabList[r.detail.index].root, c = l(e);
|
|
93
|
+
this.dispatchPanelEvent(c.zv, Object.assign({
|
|
94
|
+
orgEvt: r,
|
|
95
|
+
trigger: e,
|
|
96
|
+
href: e.href || c.href
|
|
97
|
+
}, c));
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
}, P = function(t) {
|
|
101
|
+
[...t.querySelectorAll(".mdc-switch")].forEach((o) => {
|
|
102
|
+
const n = o.querySelector("input"), r = l(n);
|
|
103
|
+
this.listen(n, "change", (e) => {
|
|
104
|
+
e.stopPropagation(), this.dispatchPanelEvent(r.zv, Object.assign({
|
|
105
|
+
orgEvt: e,
|
|
106
|
+
trigger: n,
|
|
107
|
+
href: n.href || r.href,
|
|
108
|
+
isOn: n.checked
|
|
109
|
+
}, r));
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
}, x = function(t) {
|
|
113
|
+
[...t.querySelectorAll(".mdc-chip-set")].forEach((o) => {
|
|
114
|
+
const n = a.chips.MDCChipSet.attachTo(o);
|
|
115
|
+
o.zComponent = n, n.listen("MDCChip:interaction", (r) => {
|
|
116
|
+
const e = n.chips.find((i) => i.id === r.detail.chipId), c = e.root, s = l(c);
|
|
117
|
+
this.dispatchPanelEvent(s.zv, Object.assign({
|
|
118
|
+
orgEvt: r,
|
|
119
|
+
trigger: c,
|
|
120
|
+
href: c.href || s.href,
|
|
121
|
+
isOn: e.selected
|
|
122
|
+
}, s));
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
}, q = function(t) {
|
|
126
|
+
[...t.querySelectorAll(".mdc-menu-surface")].forEach(a.menuSurface.MDCMenuSurface.attachTo);
|
|
127
|
+
}, _ = function(t) {
|
|
128
|
+
[...t.querySelectorAll(".mdc-menu-surface--anchor:not(.mdc-select__menu)")].forEach((o) => {
|
|
129
|
+
const n = o.querySelector(".mdc-menu"), r = l(n).corner || "BOTTOM_START", e = new a.menu.MDCMenu(n);
|
|
130
|
+
if (n.zComponent = e, e.setAnchorCorner(a.menuSurface.Corner[r]), e.items.forEach(a.ripple.MDCRipple.attachTo), e.quickOpen = !1, e.listen("click", (c) => c.stopPropagation()), e.listen("MDCMenu:selected", (c) => {
|
|
131
|
+
c.stopPropagation();
|
|
132
|
+
const s = c.detail.item, i = l(s);
|
|
133
|
+
this.dispatchPanelEvent(i.zv, Object.assign({
|
|
134
|
+
orgEvt: c,
|
|
135
|
+
trigger: s,
|
|
136
|
+
href: s.href || i.href
|
|
137
|
+
}, i));
|
|
138
|
+
}), o.addEventListener("click", () => e.open = !e.open), n.classList.contains("z2-filter-on-keydown")) {
|
|
139
|
+
const c = () => {
|
|
140
|
+
i = "", e.items.forEach((h) => h.classList.remove("hidden-list-itme"));
|
|
141
|
+
}, s = [...e.items].map((h) => C(h.querySelector(".mdc-deprecated-list-item__text").textContent));
|
|
142
|
+
let i = "";
|
|
143
|
+
const d = "abcdefghijklmnopqrstuvwxyz0123456789 -_", m = (h) => {
|
|
144
|
+
const f = C(h.key);
|
|
145
|
+
h.defaultPrevented || (d.includes(f) ? i = `${i}${f}` : f === "escape" ? c() : f === "backspace" && (i = i.slice(0, -1)), i !== "" && s.forEach((v, g) => {
|
|
146
|
+
v.includes(i) ? e.items[g].classList.remove("hidden-list-itme") : e.items[g].classList.add("hidden-list-itme");
|
|
147
|
+
}));
|
|
148
|
+
};
|
|
149
|
+
e.listen("MDCMenuSurface:closed", () => {
|
|
150
|
+
c(), document.removeEventListener("keydown", m, !0);
|
|
151
|
+
}), e.listen("MDCMenuSurface:opened", () => {
|
|
152
|
+
c(), document.addEventListener("keydown", m, !0);
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
}, k = function(t) {
|
|
157
|
+
[...t.querySelectorAll(".mdc-deprecated-list:not(.mdc-menu__items)")].forEach((o) => {
|
|
158
|
+
const n = new a.list.MDCList(o);
|
|
159
|
+
o.zComponent = n, p(o.id) && this.listMap.set(o.id, n), n.listElements.forEach((r) => a.ripple.MDCRipple.attachTo(r)), this.listen(o, "click", (r) => {
|
|
160
|
+
const e = r.target.closest("li"), c = l(e);
|
|
161
|
+
this.dispatchPanelEvent(c.zv, Object.assign({
|
|
162
|
+
orgEvt: r,
|
|
163
|
+
trigger: e,
|
|
164
|
+
href: e.href || c.href
|
|
165
|
+
}, c));
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
}, O = function(t) {
|
|
169
|
+
[...t.querySelectorAll(".mdc-slider")].forEach((o) => {
|
|
170
|
+
const n = new a.slider.MDCSlider(o);
|
|
171
|
+
o.zComponent = n;
|
|
172
|
+
const r = l(o), e = o.parentElement.querySelector(`#${r.inputid}`);
|
|
173
|
+
this.listen(o, "MDCSlider:change", () => {
|
|
174
|
+
e.value = n.value;
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
}, z = function(t) {
|
|
178
|
+
[...t.querySelectorAll(".mdc-linear-progress")].forEach((o) => {
|
|
179
|
+
o.linProg = a.linearProgress.MDCLinearProgress.attachTo(o);
|
|
180
|
+
});
|
|
181
|
+
}, L = function(t) {
|
|
182
|
+
[...t.querySelectorAll(".mdc-text-field")].forEach(a.textField.MDCTextField.attachTo);
|
|
183
|
+
}, F = function(t) {
|
|
184
|
+
[...t.querySelectorAll(".mdc-text-field-icon")].forEach(a.textField.MDCTextFieldIcon.attachTo);
|
|
185
|
+
}, I = function(t, o) {
|
|
186
|
+
const n = (e) => {
|
|
187
|
+
const c = document.createElement("li");
|
|
188
|
+
c.classList.add("mdc-deprecated-list-item"), c.dataset.value = e.value;
|
|
189
|
+
const s = document.createElement("span");
|
|
190
|
+
s.classList.add("mdc-deprecated-list-item__ripple"), c.appendChild(s);
|
|
191
|
+
const i = document.createElement("span");
|
|
192
|
+
return i.classList.add("mdc-deprecated-list-item__text"), i.textContent = e.textContent, c.appendChild(i), e.selected && c.classList.add("mdc-deprecated-list-item--selected"), c;
|
|
193
|
+
}, r = (e, c, s) => () => {
|
|
194
|
+
for (; e.firstChild; ) e.removeChild(e.lastChild);
|
|
195
|
+
[...c.options].forEach((i) => e.appendChild(n(i))), s.layoutOptions();
|
|
196
|
+
try {
|
|
197
|
+
s.selectedIndex = c.options.selectedIndex;
|
|
198
|
+
} catch (i) {
|
|
199
|
+
console.error("MDC Select index sync error:", {
|
|
200
|
+
targetIndex: c.options.selectedIndex,
|
|
201
|
+
htmSelectField: c,
|
|
202
|
+
mdcSelect: s,
|
|
203
|
+
currentIndex: s.selectedIndex,
|
|
204
|
+
error: i
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
[...t.querySelectorAll(".mdc-select")].forEach((e) => {
|
|
209
|
+
const c = e.querySelector("ul.mdc-deprecated-list"), s = e.querySelector("select"), i = new a.select.MDCSelect(e);
|
|
210
|
+
e.zComponent = i, s.buildMenu = r(c, s, i), s.buildMenu();
|
|
211
|
+
const d = i.menu;
|
|
212
|
+
o.hoist(d.menuSurface.root), d.setIsHoisted(!0), i.listen("MDCSelect:change", () => {
|
|
213
|
+
s.options[i.selectedIndex].selected = !0, s.dispatchEvent(new Event("custom:select:change"));
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
}, B = function(t) {
|
|
217
|
+
[...t.querySelectorAll(".mdc-form-field:not(.for-radio):not(.for-checkbox)")].forEach(a.formField.MDCFormField.attachTo);
|
|
218
|
+
}, j = function(t) {
|
|
219
|
+
[...t.querySelectorAll(".mdc-form-field.for-radio")].forEach((o) => {
|
|
220
|
+
const n = new a.formField.MDCFormField(o), r = o.querySelector(".mdc-radio");
|
|
221
|
+
r.querySelector('input[type="radio"]').classList.add("mdc-radio__native-control"), n.input = new a.radio.MDCRadio(r);
|
|
222
|
+
});
|
|
223
|
+
}, R = function(t) {
|
|
224
|
+
[...t.querySelectorAll(".mdc-form-field.for-checkbox")].forEach((o) => {
|
|
225
|
+
const n = o.querySelector(".mdc-checkbox"), r = new a.checkbox.MDCCheckbox(n), e = new a.formField.MDCFormField(o);
|
|
226
|
+
e.input = r;
|
|
227
|
+
});
|
|
228
|
+
}, u = null;
|
|
229
|
+
function N() {
|
|
230
|
+
return u || (p(window.mdc) && Object.prototype.hasOwnProperty.call(window.mdc, "autoInit") ? (u = Promise.resolve(), u) : (u = new Promise((t, o) => {
|
|
231
|
+
const n = window.__MDC_CDN_URL__ || "https://unpkg.com/material-components-web@14.0.0/dist/material-components-web.min.js", r = document.createElement("script");
|
|
232
|
+
r.src = n, r.async = !0, r.onload = () => {
|
|
233
|
+
p(window.mdc) && Object.prototype.hasOwnProperty.call(window.mdc, "autoInit") ? t() : o(/* @__PURE__ */ new Error("MDC library loaded but window.mdc is not available"));
|
|
234
|
+
}, r.onerror = () => {
|
|
235
|
+
o(/* @__PURE__ */ new Error(`Failed to load MDC library from ${n}`));
|
|
236
|
+
}, document.head.appendChild(r);
|
|
237
|
+
}), u));
|
|
238
|
+
}
|
|
239
|
+
async function V() {
|
|
240
|
+
try {
|
|
241
|
+
await N();
|
|
242
|
+
} catch (t) {
|
|
243
|
+
throw t;
|
|
244
|
+
}
|
|
245
|
+
M.register("mdc", {
|
|
246
|
+
render: function(t, o) {
|
|
247
|
+
p(window.mdc) && Object.prototype.hasOwnProperty.call(window.mdc, "autoInit") && (y.call(this, t), b.call(this, t), D.call(this, t), S.call(this, t), w.call(this, t), T.call(this, t), P.call(this, t), x.call(this, t), q.call(this, t), _.call(this, t), k.call(this, t), O.call(this, t), z.call(this, t), B.call(this, t), I.call(this, t, this), F.call(this, t), L.call(this, t), j.call(this, t), R.call(this, t), A.call(this, t));
|
|
248
|
+
},
|
|
249
|
+
dispose: function(t) {
|
|
250
|
+
[...t.querySelectorAll("[data-mdc-auto-init]")].forEach((o) => {
|
|
251
|
+
try {
|
|
252
|
+
o[o.getAttribute("data-mdc-auto-init")].destroy();
|
|
253
|
+
} catch {
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
},
|
|
257
|
+
config: {
|
|
258
|
+
version: "1.0",
|
|
259
|
+
description: "Google Material Design Components (legacy, being phased out)"
|
|
260
|
+
},
|
|
261
|
+
utils: E
|
|
262
|
+
}), console.debug("[Zooy] MDC library registered");
|
|
263
|
+
}
|
|
264
|
+
export {
|
|
265
|
+
V as registerMdcLibrary
|
|
266
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const M=require("./component-library-registry-BBQV6Kpv.js"),l=require("./tree-utils-BYnipT-p.js");let u=require("badu"),i=require("material-components-web");i=M.__toESM(i);var D=function(t){[...t.querySelectorAll(".mdc-ripple-surface")].forEach(i.ripple.MDCRipple.attachTo)},E=function(t){[...t.querySelectorAll(".mdc-button")].forEach(o=>{i.ripple.MDCRipple.attachTo(o),this.listen(o,"click",n=>{const r=n.currentTarget,e=l.getElDataMap(r);this.dispatchPanelEvent(e.zv,Object.assign({orgEvt:n,trigger:r,href:r.href||e.href},e))})})},v=function(t){[...t.querySelectorAll(".mdc-fab")].forEach(o=>{i.ripple.MDCRipple.attachTo(o),this.listen(o,"click",n=>{n.stopPropagation();const r=n.currentTarget,e=l.getElDataMap(r);this.dispatchPanelEvent(e.zv,Object.assign({orgEvt:n,trigger:r,href:r.href||e.href},e))})})},b=function(t){[...t.querySelectorAll(".mdc-icon-button:not(.mdc-icon-toggle)")].forEach(o=>{const n=new i.ripple.MDCRipple(o);o.zComponent=n,n.unbounded=!0,this.listen(o,"click",r=>{const e=r.currentTarget,c=l.getElDataMap(e),a=c.zv;(0,u.isDefAndNotNull)(a)&&(r.stopPropagation(),this.dispatchPanelEvent(c.zv,Object.assign({orgEvt:r,trigger:e,href:e.href||c.href},c)))})})},y=function(t){[...t.querySelectorAll(".mdc-icon-toggle")].forEach(o=>{const n=o.ariaPressed==="true",r=new i.iconButton.MDCIconButtonToggle(o);r.on=n,o.zComponent=r,this.listen(o,"click",e=>e.stopPropagation()),this.listen(o,"MDCIconButtonToggle:change",e=>{e.stopPropagation();const c=e.currentTarget,a=e.detail.isOn,s=l.getElDataMap(c);this.dispatchPanelEvent(s.zv,Object.assign({orgEvt:e,trigger:c,href:c.href||s.href,isOn:a},s))})})},S=function(t){const o="mdc-checkbox__native-control";[...t.querySelectorAll(".mdc-data-table")].forEach(n=>{const r=new i.dataTable.MDCDataTable(n);r.selectedAllAcrossPages=!1,r.onSomeSelected=c=>{},r.onNoneSelected=c=>{},r.onAllSelected=c=>{},r.toggleSelectAcrossPages=()=>(r.selectedAllAcrossPages=!r.selectedAllAcrossPages,r.selectedAllAcrossPages),r.setSelectAcrossPages=c=>(r.selectedAllAcrossPages=c,r.selectedAllAcrossPages),r.getSelectAcrossPages=()=>r.selectedAllAcrossPages,n.zComponent=r,n.dataTable=r;const e=c=>{const a=r.getSelectedRowIds().length;c.type==="MDCDataTable:selectedAll"?r.onAllSelected(a):a===0?r.onNoneSelected(a):r.onSomeSelected(a)};["MDCDataTable:rowSelectionChanged","MDCDataTable:selectedAll","MDCDataTable:unselectedAll"].forEach(c=>{this.listen(n,c,e)}),[...n.querySelectorAll(".mdc-data-table__row")].forEach(c=>{this.listen(c,"click",a=>{if(!a.target.classList.contains(o)){a.stopPropagation();const s=a.currentTarget,d=l.getElDataMap(s);this.dispatchPanelEvent(d.zv,Object.assign({orgEvt:a,trigger:s,href:s.href||d.href},d))}})})})},w=function(t){[...t.querySelectorAll(".mdc-tab-bar")].forEach(o=>{const n=new i.tabBar.MDCTabBar(o);o.zComponent=n,this.listen(o,"MDCTabBar:activated",r=>{const e=n.tabList[r.detail.index].root,c=l.getElDataMap(e);this.dispatchPanelEvent(c.zv,Object.assign({orgEvt:r,trigger:e,href:e.href||c.href},c))})})},A=function(t){[...t.querySelectorAll(".mdc-switch")].forEach(o=>{const n=o.querySelector("input"),r=l.getElDataMap(n);this.listen(n,"change",e=>{e.stopPropagation(),this.dispatchPanelEvent(r.zv,Object.assign({orgEvt:e,trigger:n,href:n.href||r.href,isOn:n.checked},r))})})},T=function(t){[...t.querySelectorAll(".mdc-chip-set")].forEach(o=>{const n=i.chips.MDCChipSet.attachTo(o);o.zComponent=n,n.listen("MDCChip:interaction",r=>{const e=n.chips.find(s=>s.id===r.detail.chipId),c=e.root,a=l.getElDataMap(c);this.dispatchPanelEvent(a.zv,Object.assign({orgEvt:r,trigger:c,href:c.href||a.href,isOn:e.selected},a))})})},P=function(t){[...t.querySelectorAll(".mdc-menu-surface")].forEach(i.menuSurface.MDCMenuSurface.attachTo)},q=function(t){[...t.querySelectorAll(".mdc-menu-surface--anchor:not(.mdc-select__menu)")].forEach(o=>{const n=o.querySelector(".mdc-menu"),r=l.getElDataMap(n).corner||"BOTTOM_START",e=new i.menu.MDCMenu(n);if(n.zComponent=e,e.setAnchorCorner(i.menuSurface.Corner[r]),e.items.forEach(i.ripple.MDCRipple.attachTo),e.quickOpen=!1,e.listen("click",c=>c.stopPropagation()),e.listen("MDCMenu:selected",c=>{c.stopPropagation();const a=c.detail.item,s=l.getElDataMap(a);this.dispatchPanelEvent(s.zv,Object.assign({orgEvt:c,trigger:a,href:a.href||s.href},s))}),o.addEventListener("click",()=>e.open=!e.open),n.classList.contains("z2-filter-on-keydown")){const c=()=>{s="",e.items.forEach(h=>h.classList.remove("hidden-list-itme"))},a=[...e.items].map(h=>(0,u.toLowerCase)(h.querySelector(".mdc-deprecated-list-item__text").textContent));let s="";const d="abcdefghijklmnopqrstuvwxyz0123456789 -_",g=h=>{const f=(0,u.toLowerCase)(h.key);h.defaultPrevented||(d.includes(f)?s=`${s}${f}`:f==="escape"?c():f==="backspace"&&(s=s.slice(0,-1)),s!==""&&a.forEach((C,m)=>{C.includes(s)?e.items[m].classList.remove("hidden-list-itme"):e.items[m].classList.add("hidden-list-itme")}))};e.listen("MDCMenuSurface:closed",()=>{c(),document.removeEventListener("keydown",g,!0)}),e.listen("MDCMenuSurface:opened",()=>{c(),document.addEventListener("keydown",g,!0)})}})},_=function(t){[...t.querySelectorAll(".mdc-deprecated-list:not(.mdc-menu__items)")].forEach(o=>{const n=new i.list.MDCList(o);o.zComponent=n,(0,u.isDefAndNotNull)(o.id)&&this.listMap.set(o.id,n),n.listElements.forEach(r=>i.ripple.MDCRipple.attachTo(r)),this.listen(o,"click",r=>{const e=r.target.closest("li"),c=l.getElDataMap(e);this.dispatchPanelEvent(c.zv,Object.assign({orgEvt:r,trigger:e,href:e.href||c.href},c))})})},x=function(t){[...t.querySelectorAll(".mdc-slider")].forEach(o=>{const n=new i.slider.MDCSlider(o);o.zComponent=n;const r=l.getElDataMap(o),e=o.parentElement.querySelector(`#${r.inputid}`);this.listen(o,"MDCSlider:change",()=>{e.value=n.value})})},k=function(t){[...t.querySelectorAll(".mdc-linear-progress")].forEach(o=>{o.linProg=i.linearProgress.MDCLinearProgress.attachTo(o)})},L=function(t){[...t.querySelectorAll(".mdc-text-field")].forEach(i.textField.MDCTextField.attachTo)},O=function(t){[...t.querySelectorAll(".mdc-text-field-icon")].forEach(i.textField.MDCTextFieldIcon.attachTo)},z=function(t,o){const n=e=>{const c=document.createElement("li");c.classList.add("mdc-deprecated-list-item"),c.dataset.value=e.value;const a=document.createElement("span");a.classList.add("mdc-deprecated-list-item__ripple"),c.appendChild(a);const s=document.createElement("span");return s.classList.add("mdc-deprecated-list-item__text"),s.textContent=e.textContent,c.appendChild(s),e.selected&&c.classList.add("mdc-deprecated-list-item--selected"),c},r=(e,c,a)=>()=>{for(;e.firstChild;)e.removeChild(e.lastChild);[...c.options].forEach(s=>e.appendChild(n(s))),a.layoutOptions();try{a.selectedIndex=c.options.selectedIndex}catch(s){console.error("MDC Select index sync error:",{targetIndex:c.options.selectedIndex,htmSelectField:c,mdcSelect:a,currentIndex:a.selectedIndex,error:s})}};[...t.querySelectorAll(".mdc-select")].forEach(e=>{const c=e.querySelector("ul.mdc-deprecated-list"),a=e.querySelector("select"),s=new i.select.MDCSelect(e);e.zComponent=s,a.buildMenu=r(c,a,s),a.buildMenu();const d=s.menu;o.hoist(d.menuSurface.root),d.setIsHoisted(!0),s.listen("MDCSelect:change",()=>{a.options[s.selectedIndex].selected=!0,a.dispatchEvent(new Event("custom:select:change"))})})},F=function(t){[...t.querySelectorAll(".mdc-form-field:not(.for-radio):not(.for-checkbox)")].forEach(i.formField.MDCFormField.attachTo)},I=function(t){[...t.querySelectorAll(".mdc-form-field.for-radio")].forEach(o=>{const n=new i.formField.MDCFormField(o),r=o.querySelector(".mdc-radio");r.querySelector('input[type="radio"]').classList.add("mdc-radio__native-control"),n.input=new i.radio.MDCRadio(r)})},B=function(t){[...t.querySelectorAll(".mdc-form-field.for-checkbox")].forEach(o=>{const n=o.querySelector(".mdc-checkbox"),r=new i.checkbox.MDCCheckbox(n),e=new i.formField.MDCFormField(o);e.input=r})},p=null;function j(){return p||((0,u.isDefAndNotNull)(window.mdc)&&Object.prototype.hasOwnProperty.call(window.mdc,"autoInit")?(p=Promise.resolve(),p):(p=new Promise((t,o)=>{const n=window.__MDC_CDN_URL__||"https://unpkg.com/material-components-web@14.0.0/dist/material-components-web.min.js",r=document.createElement("script");r.src=n,r.async=!0,r.onload=()=>{(0,u.isDefAndNotNull)(window.mdc)&&Object.prototype.hasOwnProperty.call(window.mdc,"autoInit")?t():o(new Error("MDC library loaded but window.mdc is not available"))},r.onerror=()=>{o(new Error(`Failed to load MDC library from ${n}`))},document.head.appendChild(r)}),p))}async function R(){try{await j()}catch(t){throw t}M.ComponentLibraryRegistry.register("mdc",{render:function(t,o){(0,u.isDefAndNotNull)(window.mdc)&&Object.prototype.hasOwnProperty.call(window.mdc,"autoInit")&&(D.call(this,t),E.call(this,t),v.call(this,t),b.call(this,t),y.call(this,t),w.call(this,t),A.call(this,t),T.call(this,t),P.call(this,t),q.call(this,t),_.call(this,t),x.call(this,t),k.call(this,t),F.call(this,t),z.call(this,t,this),O.call(this,t),L.call(this,t),I.call(this,t),B.call(this,t),S.call(this,t))},dispose:function(t){[...t.querySelectorAll("[data-mdc-auto-init]")].forEach(o=>{try{o[o.getAttribute("data-mdc-auto-init")].destroy()}catch{}})},config:{version:"1.0",description:"Google Material Design Components (legacy, being phased out)"},utils:l.tree_utils_exports}),console.debug("[Zooy] MDC library registered")}exports.registerMdcLibrary=R;
|