@trintel/zooy 1.3.0 → 1.5.1
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/README.md +65 -45
- package/dist/chunks/{register-D3pWAXhm.js → register-BFpnFeyz.js} +93 -98
- package/dist/chunks/{register-BSbnCMRn.js → register-Ckx0JaFw.js} +394 -365
- package/dist/chunks/register-IdhOodSA.js +1 -0
- package/dist/chunks/register-qMbg83pa.js +1 -0
- package/dist/chunks/{tree-utils-BYnipT-p.js → tree-utils-B_lCUFMV.js} +1 -1
- package/dist/chunks/{tree-utils-B2JEGXHR.js → tree-utils-CIi6B6uU.js} +1 -5
- package/dist/chunks/{zoo-CY2QpG41.js → zoo-C2JHuTvn.js} +17 -17
- package/dist/chunks/{zoo-DgdxBjlN.js → zoo-DsyOHBKi.js} +17 -17
- package/dist/zooy.cjs.js +2 -2
- package/dist/zooy.es.js +20 -8
- package/package.json +32 -28
- package/src/sass/_zoo.scss +1 -1
- package/src/sass/carbon.scss +3 -5
- package/src/sass/main.scss +0 -2
- package/src/sass/panels.scss +123 -41
- package/src/sass/reset.scss +81 -14
- package/src/sass/split.scss +2 -4
- package/dist/chunks/register-DoTvi8cF.js +0 -1
- package/dist/chunks/register-HYODt48Q.js +0 -1
package/README.md
CHANGED
|
@@ -34,6 +34,7 @@ ComponentLibraryRegistry (Static)
|
|
|
34
34
|
Base class extending `EventTarget` with lifecycle-aware listener management.
|
|
35
35
|
|
|
36
36
|
**Features:**
|
|
37
|
+
|
|
37
38
|
- Automatic listener cleanup on disposal
|
|
38
39
|
- Observer pattern for component relationships
|
|
39
40
|
- Interval tracking with automatic cleanup
|
|
@@ -43,16 +44,18 @@ Base class extending `EventTarget` with lifecycle-aware listener management.
|
|
|
43
44
|
Base class for UI components with DOM lifecycle management.
|
|
44
45
|
|
|
45
46
|
**Features:**
|
|
47
|
+
|
|
46
48
|
- Parent-child hierarchy
|
|
47
49
|
- Target-based rendering
|
|
48
50
|
- Model binding
|
|
49
51
|
- Placeholder support for async loading
|
|
50
52
|
|
|
51
53
|
**Lifecycle:**
|
|
54
|
+
|
|
52
55
|
```javascript
|
|
53
56
|
const component = new Component();
|
|
54
|
-
component.target = document.getElementById(
|
|
55
|
-
component.render();
|
|
57
|
+
component.target = document.getElementById("container");
|
|
58
|
+
component.render(); // Creates DOM → Enters document → Fires READY event
|
|
56
59
|
component.dispose(); // Exits document → Cleans up → Removes DOM
|
|
57
60
|
```
|
|
58
61
|
|
|
@@ -61,6 +64,7 @@ component.dispose(); // Exits document → Cleans up → Removes DOM
|
|
|
61
64
|
Component for dynamic, URI-based content.
|
|
62
65
|
|
|
63
66
|
**Features:**
|
|
67
|
+
|
|
64
68
|
- URI-based content fetching
|
|
65
69
|
- Query parameter management
|
|
66
70
|
- Server-side HTML rendering
|
|
@@ -70,9 +74,10 @@ Component for dynamic, URI-based content.
|
|
|
70
74
|
- Partial DOM updates
|
|
71
75
|
|
|
72
76
|
**Usage:**
|
|
77
|
+
|
|
73
78
|
```javascript
|
|
74
|
-
const panel = new Panel(
|
|
75
|
-
panel.addToQParams(
|
|
79
|
+
const panel = new Panel("/api/content");
|
|
80
|
+
panel.addToQParams("filter", "active");
|
|
76
81
|
panel.render();
|
|
77
82
|
```
|
|
78
83
|
|
|
@@ -81,16 +86,18 @@ panel.render();
|
|
|
81
86
|
Enhanced panel for form handling.
|
|
82
87
|
|
|
83
88
|
**Features:**
|
|
89
|
+
|
|
84
90
|
- HTML5 validation
|
|
85
91
|
- Field-level error display
|
|
86
92
|
- AJAX submission
|
|
87
93
|
- Server response processing
|
|
88
94
|
|
|
89
95
|
**Usage:**
|
|
96
|
+
|
|
90
97
|
```javascript
|
|
91
|
-
const form = new FormPanel(
|
|
98
|
+
const form = new FormPanel("/api/form");
|
|
92
99
|
form.onSubmitSuccess((panel, response) => {
|
|
93
|
-
console.log(
|
|
100
|
+
console.log("Submitted:", response);
|
|
94
101
|
});
|
|
95
102
|
form.render();
|
|
96
103
|
```
|
|
@@ -100,18 +107,20 @@ form.render();
|
|
|
100
107
|
Orchestrator for multiple panels.
|
|
101
108
|
|
|
102
109
|
**Features:**
|
|
110
|
+
|
|
103
111
|
- Panel lifecycle management
|
|
104
112
|
- Event routing between panels
|
|
105
113
|
- Split layout integration
|
|
106
114
|
- Browser history recording
|
|
107
115
|
|
|
108
116
|
**Usage:**
|
|
117
|
+
|
|
109
118
|
```javascript
|
|
110
119
|
class DashboardView extends View {
|
|
111
120
|
constructor() {
|
|
112
121
|
super();
|
|
113
|
-
this.addPanel(
|
|
114
|
-
this.mapPanEv(
|
|
122
|
+
this.addPanel("main", new Panel("/dashboard"));
|
|
123
|
+
this.mapPanEv("custom_action", this.handleAction);
|
|
115
124
|
}
|
|
116
125
|
|
|
117
126
|
handleAction(eventData, panel) {
|
|
@@ -125,15 +134,17 @@ class DashboardView extends View {
|
|
|
125
134
|
Top-level application controller.
|
|
126
135
|
|
|
127
136
|
**Features:**
|
|
137
|
+
|
|
128
138
|
- View lifecycle management
|
|
129
139
|
- Browser history integration
|
|
130
140
|
- Navigation routing
|
|
131
141
|
- User session management
|
|
132
142
|
|
|
133
143
|
**Usage:**
|
|
144
|
+
|
|
134
145
|
```javascript
|
|
135
146
|
const conductor = new Conductor();
|
|
136
|
-
conductor.registerViewConstructor(
|
|
147
|
+
conductor.registerViewConstructor("dashboard", (pk) => new DashboardView(pk));
|
|
137
148
|
conductor.switchView(new DashboardView());
|
|
138
149
|
```
|
|
139
150
|
|
|
@@ -142,6 +153,7 @@ conductor.switchView(new DashboardView());
|
|
|
142
153
|
Resizable layout component.
|
|
143
154
|
|
|
144
155
|
**Features:**
|
|
156
|
+
|
|
145
157
|
- Horizontal (EW) and vertical (NS) orientations
|
|
146
158
|
- Nested splitting
|
|
147
159
|
- Draggable dividers
|
|
@@ -149,11 +161,12 @@ Resizable layout component.
|
|
|
149
161
|
- Animated transitions
|
|
150
162
|
|
|
151
163
|
**Usage:**
|
|
164
|
+
|
|
152
165
|
```javascript
|
|
153
166
|
const split = new Split();
|
|
154
|
-
split.render(document.getElementById(
|
|
155
|
-
split.addSplit(undefined,
|
|
156
|
-
split.addSplit(split.getNest(
|
|
167
|
+
split.render(document.getElementById("app"));
|
|
168
|
+
split.addSplit(undefined, "EW", 200, 200); // [A | B | C]
|
|
169
|
+
split.addSplit(split.getNest("A"), "NS", 100, 100); // Split A vertically
|
|
157
170
|
```
|
|
158
171
|
|
|
159
172
|
### Dragger
|
|
@@ -161,6 +174,7 @@ split.addSplit(split.getNest('A'), 'NS', 100, 100); // Split A vertically
|
|
|
161
174
|
Component for draggable elements.
|
|
162
175
|
|
|
163
176
|
**Features:**
|
|
177
|
+
|
|
164
178
|
- Constrained movement (X, Y, or both)
|
|
165
179
|
- Touch and mouse support
|
|
166
180
|
- Drag events with delta tracking
|
|
@@ -172,11 +186,11 @@ Component for draggable elements.
|
|
|
172
186
|
Register component libraries at application startup:
|
|
173
187
|
|
|
174
188
|
```javascript
|
|
175
|
-
import { registerMdcLibrary, registerCarbonLibrary } from
|
|
189
|
+
import { registerMdcLibrary, registerCarbonLibrary } from "@trintel/zooy";
|
|
176
190
|
|
|
177
191
|
const init = async () => {
|
|
178
|
-
await registerMdcLibrary();
|
|
179
|
-
await registerCarbonLibrary();
|
|
192
|
+
await registerMdcLibrary(); // Material Design Components
|
|
193
|
+
await registerCarbonLibrary(); // IBM Carbon Design System
|
|
180
194
|
|
|
181
195
|
// Render application
|
|
182
196
|
const view = new MyView();
|
|
@@ -189,18 +203,21 @@ const init = async () => {
|
|
|
189
203
|
Central registry for UI libraries.
|
|
190
204
|
|
|
191
205
|
**Features:**
|
|
206
|
+
|
|
192
207
|
- Multiple library support
|
|
193
208
|
- Lazy loading via dynamic imports
|
|
194
209
|
- Import caching
|
|
195
210
|
- Library-specific lifecycle hooks
|
|
196
211
|
|
|
197
212
|
**Benefits:**
|
|
213
|
+
|
|
198
214
|
- No library lock-in
|
|
199
215
|
- Smaller initial bundles
|
|
200
216
|
- Gradual migration support
|
|
201
217
|
- Framework evolution flexibility
|
|
202
218
|
|
|
203
219
|
**Bundle Sizes:**
|
|
220
|
+
|
|
204
221
|
- Core framework: ~101KB (~27KB gzipped)
|
|
205
222
|
- MDC library: +463KB (~62KB gzipped, only if registered)
|
|
206
223
|
- Carbon library: +34KB (~7KB gzipped, only if registered)
|
|
@@ -227,9 +244,7 @@ Carbon Web Components load dynamically:
|
|
|
227
244
|
<cds-button>Click Me</cds-button>
|
|
228
245
|
|
|
229
246
|
<cds-accordion>
|
|
230
|
-
<cds-accordion-item title="Section 1">
|
|
231
|
-
Content
|
|
232
|
-
</cds-accordion-item>
|
|
247
|
+
<cds-accordion-item title="Section 1"> Content </cds-accordion-item>
|
|
233
248
|
</cds-accordion>
|
|
234
249
|
```
|
|
235
250
|
|
|
@@ -239,12 +254,13 @@ If importing `@carbon/styles` for theming, configure font paths:
|
|
|
239
254
|
|
|
240
255
|
```scss
|
|
241
256
|
// Your application's theme file
|
|
242
|
-
@use
|
|
243
|
-
$font-path:
|
|
257
|
+
@use "@carbon/styles" as * with (
|
|
258
|
+
$font-path: "../path/to/node_modules/@ibm/plex"
|
|
244
259
|
);
|
|
245
260
|
```
|
|
246
261
|
|
|
247
262
|
**Required dependencies:**
|
|
263
|
+
|
|
248
264
|
```json
|
|
249
265
|
{
|
|
250
266
|
"dependencies": {
|
|
@@ -261,11 +277,13 @@ If importing `@carbon/styles` for theming, configure font paths:
|
|
|
261
277
|
Native zooy components styled via CSS custom properties.
|
|
262
278
|
|
|
263
279
|
**Usage:**
|
|
280
|
+
|
|
264
281
|
```html
|
|
265
282
|
<zoo-tag token="52">Activated</zoo-tag>
|
|
266
283
|
```
|
|
267
284
|
|
|
268
285
|
**Styling:**
|
|
286
|
+
|
|
269
287
|
```scss
|
|
270
288
|
:root {
|
|
271
289
|
--zoo-tag-52-bg: #4fb50b;
|
|
@@ -279,11 +297,11 @@ Components communicate through standardized events:
|
|
|
279
297
|
|
|
280
298
|
```javascript
|
|
281
299
|
// Panel dispatches event
|
|
282
|
-
panel.dispatchPanelEvent(
|
|
300
|
+
panel.dispatchPanelEvent("custom_action", { data: "value" });
|
|
283
301
|
|
|
284
302
|
// View listens and handles
|
|
285
|
-
view.mapPanEv(
|
|
286
|
-
console.log(
|
|
303
|
+
view.mapPanEv("custom_action", (eventData, panel) => {
|
|
304
|
+
console.log("Panel action:", eventData.data);
|
|
287
305
|
});
|
|
288
306
|
```
|
|
289
307
|
|
|
@@ -304,9 +322,11 @@ Zooy enhances HTML with data attributes:
|
|
|
304
322
|
<div class="zoo_async_html" data-href="/api/widget"></div>
|
|
305
323
|
|
|
306
324
|
<!-- Toggle class -->
|
|
307
|
-
<button
|
|
308
|
-
|
|
309
|
-
|
|
325
|
+
<button
|
|
326
|
+
class="zoo__toggle_class_driver"
|
|
327
|
+
data-toggle_class_target_id="menu"
|
|
328
|
+
data-toggle_class="open"
|
|
329
|
+
>
|
|
310
330
|
Toggle Menu
|
|
311
331
|
</button>
|
|
312
332
|
```
|
|
@@ -354,29 +374,29 @@ zooy/
|
|
|
354
374
|
## Exports
|
|
355
375
|
|
|
356
376
|
```javascript
|
|
357
|
-
import zooy from
|
|
377
|
+
import zooy from "@trintel/zooy";
|
|
358
378
|
|
|
359
379
|
// Main exports
|
|
360
|
-
zooy.Evt
|
|
361
|
-
zooy.Component
|
|
362
|
-
zooy.Panel
|
|
363
|
-
zooy.FormPanel
|
|
364
|
-
zooy.View
|
|
365
|
-
zooy.Conductor
|
|
366
|
-
zooy.Split
|
|
367
|
-
zooy.Dragger
|
|
368
|
-
zooy.UserManager
|
|
369
|
-
zooy.DataBinder
|
|
370
|
-
zooy.ComponentLibraryRegistry
|
|
371
|
-
zooy.registerCarbonLibrary
|
|
372
|
-
zooy.registerMdcLibrary
|
|
373
|
-
zooy.domUtils
|
|
374
|
-
zooy.uriUtils
|
|
375
|
-
zooy.handlers
|
|
376
|
-
zooy.zoo
|
|
380
|
+
zooy.Evt;
|
|
381
|
+
zooy.Component;
|
|
382
|
+
zooy.Panel;
|
|
383
|
+
zooy.FormPanel;
|
|
384
|
+
zooy.View;
|
|
385
|
+
zooy.Conductor;
|
|
386
|
+
zooy.Split;
|
|
387
|
+
zooy.Dragger;
|
|
388
|
+
zooy.UserManager;
|
|
389
|
+
zooy.DataBinder;
|
|
390
|
+
zooy.ComponentLibraryRegistry;
|
|
391
|
+
zooy.registerCarbonLibrary;
|
|
392
|
+
zooy.registerMdcLibrary;
|
|
393
|
+
zooy.domUtils;
|
|
394
|
+
zooy.uriUtils;
|
|
395
|
+
zooy.handlers;
|
|
396
|
+
zooy.zoo;
|
|
377
397
|
|
|
378
398
|
// SASS exports
|
|
379
|
-
import
|
|
399
|
+
import "@trintel/zooy/sass"; // Main SASS entry point
|
|
380
400
|
```
|
|
381
401
|
|
|
382
402
|
## Development
|
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
import { t as M } from "./component-library-registry-DB5UeqC2.js";
|
|
2
|
-
import { r as E, s as l } from "./tree-utils-
|
|
2
|
+
import { r as E, s as l } from "./tree-utils-CIi6B6uU.js";
|
|
3
3
|
import { isDefAndNotNull as p, toLowerCase as C } from "badu";
|
|
4
4
|
import * as a from "material-components-web";
|
|
5
|
-
var
|
|
6
|
-
[...
|
|
7
|
-
},
|
|
8
|
-
[...
|
|
5
|
+
var b = function(r) {
|
|
6
|
+
[...r.querySelectorAll(".mdc-ripple-surface")].forEach(a.ripple.MDCRipple.attachTo);
|
|
7
|
+
}, y = function(r) {
|
|
8
|
+
[...r.querySelectorAll(".mdc-button")].forEach((o) => {
|
|
9
9
|
a.ripple.MDCRipple.attachTo(o), this.listen(o, "click", (n) => {
|
|
10
|
-
const
|
|
10
|
+
const t = n.currentTarget, e = l(t);
|
|
11
11
|
this.dispatchPanelEvent(e.zv, Object.assign({
|
|
12
12
|
orgEvt: n,
|
|
13
|
-
trigger:
|
|
14
|
-
href:
|
|
13
|
+
trigger: t,
|
|
14
|
+
href: t.href || e.href
|
|
15
15
|
}, e));
|
|
16
16
|
});
|
|
17
17
|
});
|
|
18
|
-
}, D = function(
|
|
19
|
-
[...
|
|
18
|
+
}, D = function(r) {
|
|
19
|
+
[...r.querySelectorAll(".mdc-fab")].forEach((o) => {
|
|
20
20
|
a.ripple.MDCRipple.attachTo(o), this.listen(o, "click", (n) => {
|
|
21
21
|
n.stopPropagation();
|
|
22
|
-
const
|
|
22
|
+
const t = n.currentTarget, e = l(t);
|
|
23
23
|
this.dispatchPanelEvent(e.zv, Object.assign({
|
|
24
24
|
orgEvt: n,
|
|
25
|
-
trigger:
|
|
26
|
-
href:
|
|
25
|
+
trigger: t,
|
|
26
|
+
href: t.href || e.href
|
|
27
27
|
}, e));
|
|
28
28
|
});
|
|
29
29
|
});
|
|
30
|
-
}, S = function(
|
|
31
|
-
[...
|
|
30
|
+
}, S = function(r) {
|
|
31
|
+
[...r.querySelectorAll(".mdc-icon-button:not(.mdc-icon-toggle)")].forEach((o) => {
|
|
32
32
|
const n = new a.ripple.MDCRipple(o);
|
|
33
|
-
o.zComponent = n, n.unbounded = !0, this.listen(o, "click", (
|
|
34
|
-
const e =
|
|
35
|
-
p(s) && (
|
|
36
|
-
orgEvt:
|
|
33
|
+
o.zComponent = n, n.unbounded = !0, this.listen(o, "click", (t) => {
|
|
34
|
+
const e = t.currentTarget, c = l(e), s = c.zv;
|
|
35
|
+
p(s) && (t.stopPropagation(), this.dispatchPanelEvent(c.zv, Object.assign({
|
|
36
|
+
orgEvt: t,
|
|
37
37
|
trigger: e,
|
|
38
38
|
href: e.href || c.href
|
|
39
39
|
}, c)));
|
|
40
40
|
});
|
|
41
41
|
});
|
|
42
|
-
}, w = function(
|
|
43
|
-
[...
|
|
44
|
-
const n = o.ariaPressed === "true",
|
|
45
|
-
|
|
42
|
+
}, w = function(r) {
|
|
43
|
+
[...r.querySelectorAll(".mdc-icon-toggle")].forEach((o) => {
|
|
44
|
+
const n = o.ariaPressed === "true", t = new a.iconButton.MDCIconButtonToggle(o);
|
|
45
|
+
t.on = n, o.zComponent = t, this.listen(o, "click", (e) => e.stopPropagation()), this.listen(o, "MDCIconButtonToggle:change", (e) => {
|
|
46
46
|
e.stopPropagation();
|
|
47
47
|
const c = e.currentTarget, s = e.detail.isOn, i = l(c);
|
|
48
48
|
this.dispatchPanelEvent(i.zv, Object.assign({
|
|
@@ -53,17 +53,17 @@ var y = function(t) {
|
|
|
53
53
|
}, i));
|
|
54
54
|
});
|
|
55
55
|
});
|
|
56
|
-
}, A = function(
|
|
56
|
+
}, A = function(r) {
|
|
57
57
|
const o = "mdc-checkbox__native-control";
|
|
58
|
-
[...
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
},
|
|
58
|
+
[...r.querySelectorAll(".mdc-data-table")].forEach((n) => {
|
|
59
|
+
const t = new a.dataTable.MDCDataTable(n);
|
|
60
|
+
t.selectedAllAcrossPages = !1, t.onSomeSelected = (c) => {
|
|
61
|
+
}, t.onNoneSelected = (c) => {
|
|
62
|
+
}, t.onAllSelected = (c) => {
|
|
63
|
+
}, t.toggleSelectAcrossPages = () => (t.selectedAllAcrossPages = !t.selectedAllAcrossPages, t.selectedAllAcrossPages), t.setSelectAcrossPages = (c) => (t.selectedAllAcrossPages = c, t.selectedAllAcrossPages), t.getSelectAcrossPages = () => t.selectedAllAcrossPages, n.zComponent = t, n.dataTable = t;
|
|
64
64
|
const e = (c) => {
|
|
65
|
-
const s =
|
|
66
|
-
c.type === "MDCDataTable:selectedAll" ?
|
|
65
|
+
const s = t.getSelectedRowIds().length;
|
|
66
|
+
c.type === "MDCDataTable:selectedAll" ? t.onAllSelected(s) : s === 0 ? t.onNoneSelected(s) : t.onSomeSelected(s);
|
|
67
67
|
};
|
|
68
68
|
[
|
|
69
69
|
"MDCDataTable:rowSelectionChanged",
|
|
@@ -85,49 +85,49 @@ var y = function(t) {
|
|
|
85
85
|
});
|
|
86
86
|
});
|
|
87
87
|
});
|
|
88
|
-
}, T = function(
|
|
89
|
-
[...
|
|
88
|
+
}, T = function(r) {
|
|
89
|
+
[...r.querySelectorAll(".mdc-tab-bar")].forEach((o) => {
|
|
90
90
|
const n = new a.tabBar.MDCTabBar(o);
|
|
91
|
-
o.zComponent = n, this.listen(o, "MDCTabBar:activated", (
|
|
92
|
-
const e = n.tabList[
|
|
91
|
+
o.zComponent = n, this.listen(o, "MDCTabBar:activated", (t) => {
|
|
92
|
+
const e = n.tabList[t.detail.index].root, c = l(e);
|
|
93
93
|
this.dispatchPanelEvent(c.zv, Object.assign({
|
|
94
|
-
orgEvt:
|
|
94
|
+
orgEvt: t,
|
|
95
95
|
trigger: e,
|
|
96
96
|
href: e.href || c.href
|
|
97
97
|
}, c));
|
|
98
98
|
});
|
|
99
99
|
});
|
|
100
|
-
}, P = function(
|
|
101
|
-
[...
|
|
102
|
-
const n = o.querySelector("input"),
|
|
100
|
+
}, P = function(r) {
|
|
101
|
+
[...r.querySelectorAll(".mdc-switch")].forEach((o) => {
|
|
102
|
+
const n = o.querySelector("input"), t = l(n);
|
|
103
103
|
this.listen(n, "change", (e) => {
|
|
104
|
-
e.stopPropagation(), this.dispatchPanelEvent(
|
|
104
|
+
e.stopPropagation(), this.dispatchPanelEvent(t.zv, Object.assign({
|
|
105
105
|
orgEvt: e,
|
|
106
106
|
trigger: n,
|
|
107
|
-
href: n.href ||
|
|
107
|
+
href: n.href || t.href,
|
|
108
108
|
isOn: n.checked
|
|
109
|
-
},
|
|
109
|
+
}, t));
|
|
110
110
|
});
|
|
111
111
|
});
|
|
112
|
-
}, x = function(
|
|
113
|
-
[...
|
|
112
|
+
}, x = function(r) {
|
|
113
|
+
[...r.querySelectorAll(".mdc-chip-set")].forEach((o) => {
|
|
114
114
|
const n = a.chips.MDCChipSet.attachTo(o);
|
|
115
|
-
o.zComponent = n, n.listen("MDCChip:interaction", (
|
|
116
|
-
const e = n.chips.find((i) => i.id ===
|
|
115
|
+
o.zComponent = n, n.listen("MDCChip:interaction", (t) => {
|
|
116
|
+
const e = n.chips.find((i) => i.id === t.detail.chipId), c = e.root, s = l(c);
|
|
117
117
|
this.dispatchPanelEvent(s.zv, Object.assign({
|
|
118
|
-
orgEvt:
|
|
118
|
+
orgEvt: t,
|
|
119
119
|
trigger: c,
|
|
120
120
|
href: c.href || s.href,
|
|
121
121
|
isOn: e.selected
|
|
122
122
|
}, s));
|
|
123
123
|
});
|
|
124
124
|
});
|
|
125
|
-
}, q = function(
|
|
126
|
-
[...
|
|
127
|
-
}, _ = function(
|
|
128
|
-
[...
|
|
129
|
-
const n = o.querySelector(".mdc-menu"),
|
|
130
|
-
if (n.zComponent = e, e.setAnchorCorner(a.menuSurface.Corner[
|
|
125
|
+
}, q = function(r) {
|
|
126
|
+
[...r.querySelectorAll(".mdc-menu-surface")].forEach(a.menuSurface.MDCMenuSurface.attachTo);
|
|
127
|
+
}, _ = function(r) {
|
|
128
|
+
[...r.querySelectorAll(".mdc-menu-surface--anchor:not(.mdc-select__menu)")].forEach((o) => {
|
|
129
|
+
const n = o.querySelector(".mdc-menu"), t = l(n).corner || "BOTTOM_START", e = new a.menu.MDCMenu(n);
|
|
130
|
+
if (n.zComponent = e, e.setAnchorCorner(a.menuSurface.Corner[t]), e.items.forEach(a.ripple.MDCRipple.attachTo), e.quickOpen = !1, e.listen("click", (c) => c.stopPropagation()), e.listen("MDCMenu:selected", (c) => {
|
|
131
131
|
c.stopPropagation();
|
|
132
132
|
const s = c.detail.item, i = l(s);
|
|
133
133
|
this.dispatchPanelEvent(i.zv, Object.assign({
|
|
@@ -153,36 +153,36 @@ var y = function(t) {
|
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
155
|
});
|
|
156
|
-
}, k = function(
|
|
157
|
-
[...
|
|
156
|
+
}, k = function(r) {
|
|
157
|
+
[...r.querySelectorAll(".mdc-deprecated-list:not(.mdc-menu__items)")].forEach((o) => {
|
|
158
158
|
const n = new a.list.MDCList(o);
|
|
159
|
-
o.zComponent = n, p(o.id) && this.listMap.set(o.id, n), n.listElements.forEach((
|
|
160
|
-
const e =
|
|
159
|
+
o.zComponent = n, p(o.id) && this.listMap.set(o.id, n), n.listElements.forEach((t) => a.ripple.MDCRipple.attachTo(t)), this.listen(o, "click", (t) => {
|
|
160
|
+
const e = t.target.closest("li"), c = l(e);
|
|
161
161
|
this.dispatchPanelEvent(c.zv, Object.assign({
|
|
162
|
-
orgEvt:
|
|
162
|
+
orgEvt: t,
|
|
163
163
|
trigger: e,
|
|
164
164
|
href: e.href || c.href
|
|
165
165
|
}, c));
|
|
166
166
|
});
|
|
167
167
|
});
|
|
168
|
-
}, O = function(
|
|
169
|
-
[...
|
|
168
|
+
}, O = function(r) {
|
|
169
|
+
[...r.querySelectorAll(".mdc-slider")].forEach((o) => {
|
|
170
170
|
const n = new a.slider.MDCSlider(o);
|
|
171
171
|
o.zComponent = n;
|
|
172
|
-
const
|
|
172
|
+
const t = l(o), e = o.parentElement.querySelector(`#${t.inputid}`);
|
|
173
173
|
this.listen(o, "MDCSlider:change", () => {
|
|
174
174
|
e.value = n.value;
|
|
175
175
|
});
|
|
176
176
|
});
|
|
177
|
-
}, z = function(
|
|
178
|
-
[...
|
|
177
|
+
}, z = function(r) {
|
|
178
|
+
[...r.querySelectorAll(".mdc-linear-progress")].forEach((o) => {
|
|
179
179
|
o.linProg = a.linearProgress.MDCLinearProgress.attachTo(o);
|
|
180
180
|
});
|
|
181
|
-
}, L = function(
|
|
182
|
-
[...
|
|
183
|
-
}, F = function(
|
|
184
|
-
[...
|
|
185
|
-
}, I = function(
|
|
181
|
+
}, L = function(r) {
|
|
182
|
+
[...r.querySelectorAll(".mdc-text-field")].forEach(a.textField.MDCTextField.attachTo);
|
|
183
|
+
}, F = function(r) {
|
|
184
|
+
[...r.querySelectorAll(".mdc-text-field-icon")].forEach(a.textField.MDCTextFieldIcon.attachTo);
|
|
185
|
+
}, I = function(r, o) {
|
|
186
186
|
const n = (e) => {
|
|
187
187
|
const c = document.createElement("li");
|
|
188
188
|
c.classList.add("mdc-deprecated-list-item"), c.dataset.value = e.value;
|
|
@@ -190,7 +190,7 @@ var y = function(t) {
|
|
|
190
190
|
s.classList.add("mdc-deprecated-list-item__ripple"), c.appendChild(s);
|
|
191
191
|
const i = document.createElement("span");
|
|
192
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
|
-
},
|
|
193
|
+
}, t = (e, c, s) => () => {
|
|
194
194
|
for (; e.firstChild; ) e.removeChild(e.lastChild);
|
|
195
195
|
[...c.options].forEach((i) => e.appendChild(n(i))), s.layoutOptions();
|
|
196
196
|
try {
|
|
@@ -205,49 +205,44 @@ var y = function(t) {
|
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
207
|
};
|
|
208
|
-
[...
|
|
208
|
+
[...r.querySelectorAll(".mdc-select")].forEach((e) => {
|
|
209
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 =
|
|
210
|
+
e.zComponent = i, s.buildMenu = t(c, s, i), s.buildMenu();
|
|
211
211
|
const d = i.menu;
|
|
212
212
|
o.hoist(d.menuSurface.root), d.setIsHoisted(!0), i.listen("MDCSelect:change", () => {
|
|
213
213
|
s.options[i.selectedIndex].selected = !0, s.dispatchEvent(new Event("custom:select:change"));
|
|
214
214
|
});
|
|
215
215
|
});
|
|
216
|
-
}, B = function(
|
|
217
|
-
[...
|
|
218
|
-
}, j = function(
|
|
219
|
-
[...
|
|
220
|
-
const n = new a.formField.MDCFormField(o),
|
|
221
|
-
|
|
216
|
+
}, B = function(r) {
|
|
217
|
+
[...r.querySelectorAll(".mdc-form-field:not(.for-radio):not(.for-checkbox)")].forEach(a.formField.MDCFormField.attachTo);
|
|
218
|
+
}, j = function(r) {
|
|
219
|
+
[...r.querySelectorAll(".mdc-form-field.for-radio")].forEach((o) => {
|
|
220
|
+
const n = new a.formField.MDCFormField(o), t = o.querySelector(".mdc-radio");
|
|
221
|
+
t.querySelector('input[type="radio"]').classList.add("mdc-radio__native-control"), n.input = new a.radio.MDCRadio(t);
|
|
222
222
|
});
|
|
223
|
-
}, R = function(
|
|
224
|
-
[...
|
|
225
|
-
const n = o.querySelector(".mdc-checkbox"),
|
|
226
|
-
e.input =
|
|
223
|
+
}, R = function(r) {
|
|
224
|
+
[...r.querySelectorAll(".mdc-form-field.for-checkbox")].forEach((o) => {
|
|
225
|
+
const n = o.querySelector(".mdc-checkbox"), t = new a.checkbox.MDCCheckbox(n), e = new a.formField.MDCFormField(o);
|
|
226
|
+
e.input = t;
|
|
227
227
|
});
|
|
228
228
|
}, u = null;
|
|
229
229
|
function N() {
|
|
230
|
-
return u || (p(window.mdc) && Object.prototype.hasOwnProperty.call(window.mdc, "autoInit") ? (u = Promise.resolve(), u) : (u = new Promise((
|
|
231
|
-
const n = window.__MDC_CDN_URL__ || "https://unpkg.com/material-components-web@14.0.0/dist/material-components-web.min.js",
|
|
232
|
-
|
|
233
|
-
p(window.mdc) && Object.prototype.hasOwnProperty.call(window.mdc, "autoInit") ?
|
|
234
|
-
},
|
|
230
|
+
return u || (p(window.mdc) && Object.prototype.hasOwnProperty.call(window.mdc, "autoInit") ? (u = Promise.resolve(), u) : (u = new Promise((r, o) => {
|
|
231
|
+
const n = window.__MDC_CDN_URL__ || "https://unpkg.com/material-components-web@14.0.0/dist/material-components-web.min.js", t = document.createElement("script");
|
|
232
|
+
t.src = n, t.async = !0, t.onload = () => {
|
|
233
|
+
p(window.mdc) && Object.prototype.hasOwnProperty.call(window.mdc, "autoInit") ? r() : o(/* @__PURE__ */ new Error("MDC library loaded but window.mdc is not available"));
|
|
234
|
+
}, t.onerror = () => {
|
|
235
235
|
o(/* @__PURE__ */ new Error(`Failed to load MDC library from ${n}`));
|
|
236
|
-
}, document.head.appendChild(
|
|
236
|
+
}, document.head.appendChild(t);
|
|
237
237
|
}), u));
|
|
238
238
|
}
|
|
239
239
|
async function V() {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
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));
|
|
240
|
+
await N(), M.register("mdc", {
|
|
241
|
+
render: function(r, o) {
|
|
242
|
+
p(window.mdc) && Object.prototype.hasOwnProperty.call(window.mdc, "autoInit") && (b.call(this, r), y.call(this, r), D.call(this, r), S.call(this, r), w.call(this, r), T.call(this, r), P.call(this, r), x.call(this, r), q.call(this, r), _.call(this, r), k.call(this, r), O.call(this, r), z.call(this, r), B.call(this, r), I.call(this, r, this), F.call(this, r), L.call(this, r), j.call(this, r), R.call(this, r), A.call(this, r));
|
|
248
243
|
},
|
|
249
|
-
dispose: function(
|
|
250
|
-
[...
|
|
244
|
+
dispose: function(r) {
|
|
245
|
+
[...r.querySelectorAll("[data-mdc-auto-init]")].forEach((o) => {
|
|
251
246
|
try {
|
|
252
247
|
o[o.getAttribute("data-mdc-auto-init")].destroy();
|
|
253
248
|
} catch {
|