@kubex/zinc 1.1.85 → 1.1.87
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/custom-elements.json +566 -546
- package/dist/vscode.html-custom-data.json +44 -44
- package/dist/web-types.json +93 -93
- package/dist/zn.d.ts +9 -1
- package/dist/zn.min.js +3 -2
- package/package.json +1 -1
- package/src/components/preview-frame/preview-frame.component.ts +25 -25
- package/src/components/preview-frame/preview-frame.test.ts +48 -0
- package/src/components/slash-menu/slash-menu.component.ts +23 -5
- package/src/components/slash-menu/slash-menu.scss +2 -2
|
@@ -13,6 +13,17 @@
|
|
|
13
13
|
}
|
|
14
14
|
]
|
|
15
15
|
},
|
|
16
|
+
{
|
|
17
|
+
"name": "zn-action-bar",
|
|
18
|
+
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
19
|
+
"attributes": [],
|
|
20
|
+
"references": [
|
|
21
|
+
{
|
|
22
|
+
"name": "Documentation",
|
|
23
|
+
"url": "https://zinc.style/components/action-bar"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
},
|
|
16
27
|
{
|
|
17
28
|
"name": "zn-alert",
|
|
18
29
|
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
@@ -53,17 +64,6 @@
|
|
|
53
64
|
}
|
|
54
65
|
]
|
|
55
66
|
},
|
|
56
|
-
{
|
|
57
|
-
"name": "zn-action-bar",
|
|
58
|
-
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
59
|
-
"attributes": [],
|
|
60
|
-
"references": [
|
|
61
|
-
{
|
|
62
|
-
"name": "Documentation",
|
|
63
|
-
"url": "https://zinc.style/components/action-bar"
|
|
64
|
-
}
|
|
65
|
-
]
|
|
66
|
-
},
|
|
67
67
|
{
|
|
68
68
|
"name": "zn-animated-button",
|
|
69
69
|
"description": "\n---\n\n\n### **Methods:**\n - **purchase(): _void_** - Programmatically trigger the purchase flow\n- **setSuccess(): _void_** - Set the button to success state manually\n- **setFailure(message): _void_** - Set the button to failure state manually with optional error message\n- **reset(): _void_** - Reset the button to idle state",
|
|
@@ -138,21 +138,6 @@
|
|
|
138
138
|
}
|
|
139
139
|
]
|
|
140
140
|
},
|
|
141
|
-
{
|
|
142
|
-
"name": "zn-bulk-actions",
|
|
143
|
-
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
144
|
-
"attributes": [
|
|
145
|
-
{ "name": "name", "values": [] },
|
|
146
|
-
{ "name": "value", "values": [{ "name": "PropertyKey" }] },
|
|
147
|
-
{ "name": "actions", "values": [{ "name": "BulkActionData" }] }
|
|
148
|
-
],
|
|
149
|
-
"references": [
|
|
150
|
-
{
|
|
151
|
-
"name": "Documentation",
|
|
152
|
-
"url": "https://zinc.style/components/bulk-actions"
|
|
153
|
-
}
|
|
154
|
-
]
|
|
155
|
-
},
|
|
156
141
|
{
|
|
157
142
|
"name": "zn-button",
|
|
158
143
|
"description": "Buttons represent actions that are available to the user.\n---\n\n\n### **Events:**\n - **zn-blur** - Emitted when the button loses focus.\n- **zn-focus** - Emitted when the button gains focus.\n- **zn-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **Slots:**\n - _default_ - The button's label.\n- **prefix** - A presentational prefix icon or similar element.\n- **suffix** - A presentational suffix icon or similar element.\n- **cancel** - Slot for custom cancel button/content when autoClick is active.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **prefix** - The container that wraps the prefix.\n- **label** - The button's label.\n- **suffix** - The container that wraps the suffix.\n- **caret** - The button's caret icon, an `<zn-icon>` element.\n- **spinner** - The spinner that shows when the button is in the loading state.",
|
|
@@ -286,6 +271,21 @@
|
|
|
286
271
|
}
|
|
287
272
|
]
|
|
288
273
|
},
|
|
274
|
+
{
|
|
275
|
+
"name": "zn-bulk-actions",
|
|
276
|
+
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
277
|
+
"attributes": [
|
|
278
|
+
{ "name": "name", "values": [] },
|
|
279
|
+
{ "name": "value", "values": [{ "name": "PropertyKey" }] },
|
|
280
|
+
{ "name": "actions", "values": [{ "name": "BulkActionData" }] }
|
|
281
|
+
],
|
|
282
|
+
"references": [
|
|
283
|
+
{
|
|
284
|
+
"name": "Documentation",
|
|
285
|
+
"url": "https://zinc.style/components/bulk-actions"
|
|
286
|
+
}
|
|
287
|
+
]
|
|
288
|
+
},
|
|
289
289
|
{
|
|
290
290
|
"name": "zn-button-group",
|
|
291
291
|
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n\n### **CSS Properties:**\n - **--grow** - Use flex-grow to fill available space. _(default: undefined)_\n- **--start** - Justify content at the start of the flex space. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
@@ -3033,7 +3033,7 @@
|
|
|
3033
3033
|
},
|
|
3034
3034
|
{
|
|
3035
3035
|
"name": "refresh-on",
|
|
3036
|
-
"description": "Selector for forms whose saves are left to the shell but should still\nrefresh the preview. These are never intercepted: the shell submits them\n(so its own response handling — alerts, refreshes — runs as normal) and the\npreview re-fetches its config once the shell reports the save complete.\nSet empty to disable.",
|
|
3036
|
+
"description": "Selector for forms whose saves are left to the shell but should still\nrefresh the preview. These are never intercepted: the shell submits them\n(so its own response handling — alerts, refreshes — runs as normal) and the\npreview re-fetches its config once the shell reports the save complete.\nMatched by delegation on the shell's bubbled `complete` event rather than\nby attaching to the forms themselves, so a save anywhere on the page\nrefreshes the preview — including forms in a different DOM root, e.g. a\npage-level form saved while the preview sits inside a tab panel's shadow\nroot (a page's Template select lives on one tab, its preview on another).\nSet empty to disable.",
|
|
3037
3037
|
"values": []
|
|
3038
3038
|
},
|
|
3039
3039
|
{
|
|
@@ -4069,6 +4069,23 @@
|
|
|
4069
4069
|
}
|
|
4070
4070
|
]
|
|
4071
4071
|
},
|
|
4072
|
+
{
|
|
4073
|
+
"name": "zn-tab",
|
|
4074
|
+
"description": "Defines a tab panel for use inside zn-page.\n---\n\n\n### **Slots:**\n - _default_ - The tab panel content.",
|
|
4075
|
+
"attributes": [
|
|
4076
|
+
{ "name": "caption", "values": [] },
|
|
4077
|
+
{ "name": "priority", "values": [] },
|
|
4078
|
+
{ "name": "uri", "values": [] },
|
|
4079
|
+
{
|
|
4080
|
+
"name": "selected",
|
|
4081
|
+
"description": "When present, zn-page opens this tab on load instead of the first tab.",
|
|
4082
|
+
"values": []
|
|
4083
|
+
}
|
|
4084
|
+
],
|
|
4085
|
+
"references": [
|
|
4086
|
+
{ "name": "Documentation", "url": "https://zinc.style/components/tab" }
|
|
4087
|
+
]
|
|
4088
|
+
},
|
|
4072
4089
|
{
|
|
4073
4090
|
"name": "zn-style",
|
|
4074
4091
|
"description": "\n---\n",
|
|
@@ -4100,23 +4117,6 @@
|
|
|
4100
4117
|
}
|
|
4101
4118
|
]
|
|
4102
4119
|
},
|
|
4103
|
-
{
|
|
4104
|
-
"name": "zn-tab",
|
|
4105
|
-
"description": "Defines a tab panel for use inside zn-page.\n---\n\n\n### **Slots:**\n - _default_ - The tab panel content.",
|
|
4106
|
-
"attributes": [
|
|
4107
|
-
{ "name": "caption", "values": [] },
|
|
4108
|
-
{ "name": "priority", "values": [] },
|
|
4109
|
-
{ "name": "uri", "values": [] },
|
|
4110
|
-
{
|
|
4111
|
-
"name": "selected",
|
|
4112
|
-
"description": "When present, zn-page opens this tab on load instead of the first tab.",
|
|
4113
|
-
"values": []
|
|
4114
|
-
}
|
|
4115
|
-
],
|
|
4116
|
-
"references": [
|
|
4117
|
-
{ "name": "Documentation", "url": "https://zinc.style/components/tab" }
|
|
4118
|
-
]
|
|
4119
|
-
},
|
|
4120
4120
|
{
|
|
4121
4121
|
"name": "zn-table",
|
|
4122
4122
|
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@kubex/zinc",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.87",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -15,6 +15,28 @@
|
|
|
15
15
|
"events": [],
|
|
16
16
|
"js": { "properties": [], "events": [] }
|
|
17
17
|
},
|
|
18
|
+
{
|
|
19
|
+
"name": "zn-action-bar",
|
|
20
|
+
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
21
|
+
"doc-url": "",
|
|
22
|
+
"attributes": [],
|
|
23
|
+
"slots": [
|
|
24
|
+
{ "name": "", "description": "The default slot." },
|
|
25
|
+
{ "name": "example", "description": "An example slot." }
|
|
26
|
+
],
|
|
27
|
+
"events": [
|
|
28
|
+
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
29
|
+
],
|
|
30
|
+
"js": {
|
|
31
|
+
"properties": [],
|
|
32
|
+
"events": [
|
|
33
|
+
{
|
|
34
|
+
"name": "zn-event-name",
|
|
35
|
+
"description": "Emitted as an example."
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
18
40
|
{
|
|
19
41
|
"name": "zn-alert",
|
|
20
42
|
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
@@ -83,28 +105,6 @@
|
|
|
83
105
|
]
|
|
84
106
|
}
|
|
85
107
|
},
|
|
86
|
-
{
|
|
87
|
-
"name": "zn-action-bar",
|
|
88
|
-
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
89
|
-
"doc-url": "",
|
|
90
|
-
"attributes": [],
|
|
91
|
-
"slots": [
|
|
92
|
-
{ "name": "", "description": "The default slot." },
|
|
93
|
-
{ "name": "example", "description": "An example slot." }
|
|
94
|
-
],
|
|
95
|
-
"events": [
|
|
96
|
-
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
97
|
-
],
|
|
98
|
-
"js": {
|
|
99
|
-
"properties": [],
|
|
100
|
-
"events": [
|
|
101
|
-
{
|
|
102
|
-
"name": "zn-event-name",
|
|
103
|
-
"description": "Emitted as an example."
|
|
104
|
-
}
|
|
105
|
-
]
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
108
|
{
|
|
109
109
|
"name": "zn-animated-button",
|
|
110
110
|
"description": "\n---\n\n\n### **Methods:**\n - **purchase(): _void_** - Programmatically trigger the purchase flow\n- **setSuccess(): _void_** - Set the button to success state manually\n- **setFailure(message): _void_** - Set the button to failure state manually with optional error message\n- **reset(): _void_** - Reset the button to idle state",
|
|
@@ -250,44 +250,6 @@
|
|
|
250
250
|
"events": []
|
|
251
251
|
}
|
|
252
252
|
},
|
|
253
|
-
{
|
|
254
|
-
"name": "zn-bulk-actions",
|
|
255
|
-
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
256
|
-
"doc-url": "",
|
|
257
|
-
"attributes": [
|
|
258
|
-
{ "name": "name", "value": { "type": "string" } },
|
|
259
|
-
{ "name": "value", "value": { "type": "PropertyKey" } },
|
|
260
|
-
{
|
|
261
|
-
"name": "actions",
|
|
262
|
-
"value": { "type": "BulkActionData", "default": "[]" }
|
|
263
|
-
}
|
|
264
|
-
],
|
|
265
|
-
"slots": [
|
|
266
|
-
{ "name": "", "description": "The default slot." },
|
|
267
|
-
{ "name": "example", "description": "An example slot." }
|
|
268
|
-
],
|
|
269
|
-
"events": [
|
|
270
|
-
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
271
|
-
],
|
|
272
|
-
"js": {
|
|
273
|
-
"properties": [
|
|
274
|
-
{ "name": "container", "type": "HTMLDivElement" },
|
|
275
|
-
{ "name": "addRule", "type": "ZnSelect" },
|
|
276
|
-
{ "name": "input", "type": "HTMLInputElement" },
|
|
277
|
-
{ "name": "name", "type": "string" },
|
|
278
|
-
{ "name": "value", "type": "PropertyKey" },
|
|
279
|
-
{ "name": "actions", "type": "BulkActionData" },
|
|
280
|
-
{ "name": "validationMessage", "type": "string" },
|
|
281
|
-
{ "name": "validity", "type": "ValidityState" }
|
|
282
|
-
],
|
|
283
|
-
"events": [
|
|
284
|
-
{
|
|
285
|
-
"name": "zn-event-name",
|
|
286
|
-
"description": "Emitted as an example."
|
|
287
|
-
}
|
|
288
|
-
]
|
|
289
|
-
}
|
|
290
|
-
},
|
|
291
253
|
{
|
|
292
254
|
"name": "zn-button",
|
|
293
255
|
"description": "Buttons represent actions that are available to the user.\n---\n\n\n### **Events:**\n - **zn-blur** - Emitted when the button loses focus.\n- **zn-focus** - Emitted when the button gains focus.\n- **zn-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **Slots:**\n - _default_ - The button's label.\n- **prefix** - A presentational prefix icon or similar element.\n- **suffix** - A presentational suffix icon or similar element.\n- **cancel** - Slot for custom cancel button/content when autoClick is active.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **prefix** - The container that wraps the prefix.\n- **label** - The button's label.\n- **suffix** - The container that wraps the suffix.\n- **caret** - The button's caret icon, an `<zn-icon>` element.\n- **spinner** - The spinner that shows when the button is in the loading state.",
|
|
@@ -554,6 +516,44 @@
|
|
|
554
516
|
]
|
|
555
517
|
}
|
|
556
518
|
},
|
|
519
|
+
{
|
|
520
|
+
"name": "zn-bulk-actions",
|
|
521
|
+
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
522
|
+
"doc-url": "",
|
|
523
|
+
"attributes": [
|
|
524
|
+
{ "name": "name", "value": { "type": "string" } },
|
|
525
|
+
{ "name": "value", "value": { "type": "PropertyKey" } },
|
|
526
|
+
{
|
|
527
|
+
"name": "actions",
|
|
528
|
+
"value": { "type": "BulkActionData", "default": "[]" }
|
|
529
|
+
}
|
|
530
|
+
],
|
|
531
|
+
"slots": [
|
|
532
|
+
{ "name": "", "description": "The default slot." },
|
|
533
|
+
{ "name": "example", "description": "An example slot." }
|
|
534
|
+
],
|
|
535
|
+
"events": [
|
|
536
|
+
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
537
|
+
],
|
|
538
|
+
"js": {
|
|
539
|
+
"properties": [
|
|
540
|
+
{ "name": "container", "type": "HTMLDivElement" },
|
|
541
|
+
{ "name": "addRule", "type": "ZnSelect" },
|
|
542
|
+
{ "name": "input", "type": "HTMLInputElement" },
|
|
543
|
+
{ "name": "name", "type": "string" },
|
|
544
|
+
{ "name": "value", "type": "PropertyKey" },
|
|
545
|
+
{ "name": "actions", "type": "BulkActionData" },
|
|
546
|
+
{ "name": "validationMessage", "type": "string" },
|
|
547
|
+
{ "name": "validity", "type": "ValidityState" }
|
|
548
|
+
],
|
|
549
|
+
"events": [
|
|
550
|
+
{
|
|
551
|
+
"name": "zn-event-name",
|
|
552
|
+
"description": "Emitted as an example."
|
|
553
|
+
}
|
|
554
|
+
]
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
557
|
{
|
|
558
558
|
"name": "zn-button-group",
|
|
559
559
|
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n\n### **CSS Properties:**\n - **--grow** - Use flex-grow to fill available space. _(default: undefined)_\n- **--start** - Justify content at the start of the flex space. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
@@ -7089,7 +7089,7 @@
|
|
|
7089
7089
|
},
|
|
7090
7090
|
{
|
|
7091
7091
|
"name": "refresh-on",
|
|
7092
|
-
"description": "Selector for forms whose saves are left to the shell but should still\nrefresh the preview. These are never intercepted: the shell submits them\n(so its own response handling — alerts, refreshes — runs as normal) and the\npreview re-fetches its config once the shell reports the save complete.\nSet empty to disable.",
|
|
7092
|
+
"description": "Selector for forms whose saves are left to the shell but should still\nrefresh the preview. These are never intercepted: the shell submits them\n(so its own response handling — alerts, refreshes — runs as normal) and the\npreview re-fetches its config once the shell reports the save complete.\nMatched by delegation on the shell's bubbled `complete` event rather than\nby attaching to the forms themselves, so a save anywhere on the page\nrefreshes the preview — including forms in a different DOM root, e.g. a\npage-level form saved while the preview sits inside a tab panel's shadow\nroot (a page's Template select lives on one tab, its preview on another).\nSet empty to disable.",
|
|
7093
7093
|
"value": { "type": "string", "default": "'form'" }
|
|
7094
7094
|
},
|
|
7095
7095
|
{
|
|
@@ -7158,7 +7158,7 @@
|
|
|
7158
7158
|
},
|
|
7159
7159
|
{
|
|
7160
7160
|
"name": "refreshOn",
|
|
7161
|
-
"description": "Selector for forms whose saves are left to the shell but should still\nrefresh the preview. These are never intercepted: the shell submits them\n(so its own response handling — alerts, refreshes — runs as normal) and the\npreview re-fetches its config once the shell reports the save complete.\nSet empty to disable.",
|
|
7161
|
+
"description": "Selector for forms whose saves are left to the shell but should still\nrefresh the preview. These are never intercepted: the shell submits them\n(so its own response handling — alerts, refreshes — runs as normal) and the\npreview re-fetches its config once the shell reports the save complete.\nMatched by delegation on the shell's bubbled `complete` event rather than\nby attaching to the forms themselves, so a save anywhere on the page\nrefreshes the preview — including forms in a different DOM root, e.g. a\npage-level form saved while the preview sits inside a tab panel's shadow\nroot (a page's Template select lives on one tab, its preview on another).\nSet empty to disable.",
|
|
7162
7162
|
"type": "string"
|
|
7163
7163
|
},
|
|
7164
7164
|
{
|
|
@@ -9584,6 +9584,36 @@
|
|
|
9584
9584
|
"events": []
|
|
9585
9585
|
}
|
|
9586
9586
|
},
|
|
9587
|
+
{
|
|
9588
|
+
"name": "zn-tab",
|
|
9589
|
+
"description": "Defines a tab panel for use inside zn-page.\n---\n\n\n### **Slots:**\n - _default_ - The tab panel content.",
|
|
9590
|
+
"doc-url": "",
|
|
9591
|
+
"attributes": [
|
|
9592
|
+
{ "name": "caption", "value": { "type": "string" } },
|
|
9593
|
+
{ "name": "priority", "value": { "type": "number" } },
|
|
9594
|
+
{ "name": "uri", "value": { "type": "string" } },
|
|
9595
|
+
{
|
|
9596
|
+
"name": "selected",
|
|
9597
|
+
"description": "When present, zn-page opens this tab on load instead of the first tab.",
|
|
9598
|
+
"value": { "type": "boolean", "default": "false" }
|
|
9599
|
+
}
|
|
9600
|
+
],
|
|
9601
|
+
"slots": [{ "name": "", "description": "The tab panel content." }],
|
|
9602
|
+
"events": [],
|
|
9603
|
+
"js": {
|
|
9604
|
+
"properties": [
|
|
9605
|
+
{ "name": "caption", "type": "string" },
|
|
9606
|
+
{ "name": "priority", "type": "number" },
|
|
9607
|
+
{ "name": "uri", "type": "string" },
|
|
9608
|
+
{
|
|
9609
|
+
"name": "selected",
|
|
9610
|
+
"description": "When present, zn-page opens this tab on load instead of the first tab.",
|
|
9611
|
+
"type": "boolean"
|
|
9612
|
+
}
|
|
9613
|
+
],
|
|
9614
|
+
"events": []
|
|
9615
|
+
}
|
|
9616
|
+
},
|
|
9587
9617
|
{
|
|
9588
9618
|
"name": "zn-style",
|
|
9589
9619
|
"description": "\n---\n",
|
|
@@ -9677,36 +9707,6 @@
|
|
|
9677
9707
|
"events": []
|
|
9678
9708
|
}
|
|
9679
9709
|
},
|
|
9680
|
-
{
|
|
9681
|
-
"name": "zn-tab",
|
|
9682
|
-
"description": "Defines a tab panel for use inside zn-page.\n---\n\n\n### **Slots:**\n - _default_ - The tab panel content.",
|
|
9683
|
-
"doc-url": "",
|
|
9684
|
-
"attributes": [
|
|
9685
|
-
{ "name": "caption", "value": { "type": "string" } },
|
|
9686
|
-
{ "name": "priority", "value": { "type": "number" } },
|
|
9687
|
-
{ "name": "uri", "value": { "type": "string" } },
|
|
9688
|
-
{
|
|
9689
|
-
"name": "selected",
|
|
9690
|
-
"description": "When present, zn-page opens this tab on load instead of the first tab.",
|
|
9691
|
-
"value": { "type": "boolean", "default": "false" }
|
|
9692
|
-
}
|
|
9693
|
-
],
|
|
9694
|
-
"slots": [{ "name": "", "description": "The tab panel content." }],
|
|
9695
|
-
"events": [],
|
|
9696
|
-
"js": {
|
|
9697
|
-
"properties": [
|
|
9698
|
-
{ "name": "caption", "type": "string" },
|
|
9699
|
-
{ "name": "priority", "type": "number" },
|
|
9700
|
-
{ "name": "uri", "type": "string" },
|
|
9701
|
-
{
|
|
9702
|
-
"name": "selected",
|
|
9703
|
-
"description": "When present, zn-page opens this tab on load instead of the first tab.",
|
|
9704
|
-
"type": "boolean"
|
|
9705
|
-
}
|
|
9706
|
-
],
|
|
9707
|
-
"events": []
|
|
9708
|
-
}
|
|
9709
|
-
},
|
|
9710
9710
|
{
|
|
9711
9711
|
"name": "zn-table",
|
|
9712
9712
|
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
package/dist/zn.d.ts
CHANGED
|
@@ -1989,6 +1989,8 @@ declare module "components/slash-menu/slash-menu.component" {
|
|
|
1989
1989
|
reposition(): void;
|
|
1990
1990
|
connectedCallback(): void;
|
|
1991
1991
|
disconnectedCallback(): void;
|
|
1992
|
+
private showPanelPopover;
|
|
1993
|
+
private hidePanelPopover;
|
|
1992
1994
|
private startPositioner;
|
|
1993
1995
|
private stopPositioner;
|
|
1994
1996
|
private position;
|
|
@@ -10980,6 +10982,11 @@ declare module "components/preview-frame/preview-frame.component" {
|
|
|
10980
10982
|
* refresh the preview. These are never intercepted: the shell submits them
|
|
10981
10983
|
* (so its own response handling — alerts, refreshes — runs as normal) and the
|
|
10982
10984
|
* preview re-fetches its config once the shell reports the save complete.
|
|
10985
|
+
* Matched by delegation on the shell's bubbled `complete` event rather than
|
|
10986
|
+
* by attaching to the forms themselves, so a save anywhere on the page
|
|
10987
|
+
* refreshes the preview — including forms in a different DOM root, e.g. a
|
|
10988
|
+
* page-level form saved while the preview sits inside a tab panel's shadow
|
|
10989
|
+
* root (a page's Template select lives on one tab, its preview on another).
|
|
10983
10990
|
* Set empty to disable.
|
|
10984
10991
|
*/
|
|
10985
10992
|
refreshOn: string;
|
|
@@ -11047,8 +11054,9 @@ declare module "components/preview-frame/preview-frame.component" {
|
|
|
11047
11054
|
private _theme;
|
|
11048
11055
|
private _contentObserver;
|
|
11049
11056
|
private readonly _watchedForms;
|
|
11050
|
-
private readonly _refreshForms;
|
|
11051
11057
|
private readonly _debounceTimers;
|
|
11058
|
+
private _shellSaveRoots;
|
|
11059
|
+
private _lastShellSave;
|
|
11052
11060
|
private readonly _formObserver;
|
|
11053
11061
|
connectedCallback(): void;
|
|
11054
11062
|
protected willUpdate(changed: PropertyValues<this>): void;
|
package/dist/zn.min.js
CHANGED
|
@@ -377,7 +377,7 @@ import{a as $n,b as F_,c as ur,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var L
|
|
|
377
377
|
<zn-button color="default" slot="footer" @click=${this.handleQBUpdate}>Show Results</zn-button>
|
|
378
378
|
</div>
|
|
379
379
|
</zn-slideout>
|
|
380
|
-
`}};dn.styles=T(nv),c([p()],dn.prototype,"filters",2),c([p()],dn.prototype,"name",2),c([p()],dn.prototype,"value",2);var Qh=dn;dn.define("zn-data-table-filter");var re=(i="value")=>(o,t)=>{let r=o.constructor,n=r.prototype.attributeChangedCallback;r.prototype.attributeChangedCallback=function(a,s,l){let d=r.getPropertyOptions(i),h=typeof d.attribute=="string"?d.attribute:i;if(a===h){let m=d.converter||ii,b=(typeof m=="function"?m:m?.fromAttribute??ii.fromAttribute)(l,d.type);this[i]!==b&&(this[t]=b)}n.call(this,a,s,l)}};var q3=new Map;function hd(i){return(Array.isArray(i)?i:i.split(",")).reduce((t,r)=>{let n=q3.get(r.trim());return n?[...t,...n]:t},[])}function I3(i){return typeof i=="object"&&i!==null&&typeof i.label=="string"}function hi(i){let o=i?.trim();if(!o)return[];if(o.startsWith("["))try{let t=JSON.parse(o);return Array.isArray(t)?t.filter(I3):[]}catch{return console.warn("slash-items could not be parsed as JSON",o),[]}return o.split(",").map(t=>t.trim()).filter(t=>t!=="").map(t=>{let r=t.indexOf("=");if(r===-1)return{label:t,value:t};let n=t.slice(0,r).trim(),a=t.slice(r+1).trim();return{label:n||a,value:a}}).filter(t=>t.label!=="")}function D3(i){return i.keywords?(Array.isArray(i.keywords)?i.keywords:i.keywords.split(",")).map(t=>t.trim().toLowerCase()).filter(t=>t!==""):[]}function N3(i,o){let t=i.label.toLowerCase();return t.startsWith(o)?0:t.split(/\s+/).some(r=>r.startsWith(o))?1:t.includes(o)?2:D3(i).some(r=>r.includes(o))?3:i.value?.toLowerCase().includes(o)?4:i.description?.toLowerCase().includes(o)?5:-1}function iv(i,o){let t=o.trim().toLowerCase();return i.map((r,n)=>({item:r,index:n,score:t?N3(r,t):0})).filter(r=>r.score!==-1).sort((r,n)=>r.score-n.score||(r.item.order??r.index)-(n.item.order??n.index)||r.index-n.index).map(r=>r.item)}var Tr=se(class extends Xe{constructor(i){if(super(i),i.type!==or.PROPERTY&&i.type!==or.ATTRIBUTE&&i.type!==or.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Kc(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[o]){if(o===ae||o===V)return o;let t=i.element,r=i.name;if(i.type===or.PROPERTY){if(o===t[r])return ae}else if(i.type===or.BOOLEAN_ATTRIBUTE){if(!!o===t.hasAttribute(r))return ae}else if(i.type===or.ATTRIBUTE&&t.getAttribute(r)===o+"")return ae;return Ba(i),o}});var Jh=new Set,Xa=new Map,Nn,Zh="ltr",tu="en",av=typeof MutationObserver<"u"&&typeof document<"u"&&typeof document.documentElement<"u";if(av){let i=new MutationObserver(sv);Zh=document.documentElement.dir||"ltr",tu=document.documentElement.lang||navigator.language,i.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]})}function vl(...i){i.map(o=>{let t=o.$code.toLowerCase();Xa.has(t)?Xa.set(t,Object.assign(Object.assign({},Xa.get(t)),o)):Xa.set(t,o),Nn||(Nn=o)}),sv()}function sv(){av&&(Zh=document.documentElement.dir||"ltr",tu=document.documentElement.lang||navigator.language),[...Jh.keys()].map(i=>{typeof i.requestUpdate=="function"&&i.requestUpdate()})}var ud=class{constructor(o){this.host=o,this.host.addController(this)}hostConnected(){Jh.add(this.host)}hostDisconnected(){Jh.delete(this.host)}dir(){return`${this.host.dir||Zh}`.toLowerCase()}lang(){let o=`${this.host.lang||tu}`.toLowerCase().replace(/_/g,"-");try{return new Intl.Locale(o),o}catch{return Nn?Nn.$code.toLowerCase():"en"}}getTranslationData(o){var t,r;let n;try{n=new Intl.Locale(o.replace(/_/g,"-"))}catch{return{locale:void 0,language:"",region:"",primary:void 0,secondary:void 0}}let a=n.language.toLowerCase(),s=(r=(t=n.region)===null||t===void 0?void 0:t.toLowerCase())!==null&&r!==void 0?r:"",l=Xa.get(`${a}-${s}`),d=Xa.get(a);return{locale:n,language:a,region:s,primary:l,secondary:d}}exists(o,t){var r;let{primary:n,secondary:a}=this.getTranslationData((r=t.lang)!==null&&r!==void 0?r:this.lang());return t=Object.assign({includeFallback:!1},t),!!(n&&n[o]||a&&a[o]||t.includeFallback&&Nn&&Nn[o])}term(o,...t){let{primary:r,secondary:n}=this.getTranslationData(this.lang()),a;if(r&&r[o])a=r[o];else if(n&&n[o])a=n[o];else if(Nn&&Nn[o])a=Nn[o];else return console.error(`No translation found for: ${String(o)}`),String(o);return typeof a=="function"?a(...t):a}date(o,t){return o=new Date(o),new Intl.DateTimeFormat(this.lang(),t).format(o)}number(o,t){return o=Number(o),isNaN(o)?"":new Intl.NumberFormat(this.lang(),t).format(o)}relativeTime(o,t,r){return new Intl.RelativeTimeFormat(this.lang(),r).format(o,t)}};var lv={$code:"en",$name:"English",$dir:"ltr",onChange:"onChange",showPassword:"Show password",hidePassword:"Hide password",clearEntry:"Clear entry",numOptionsSelected:i=>i===0?"No options selected":i===1?"1 option selected":`${i} options selected`,fileButtonText:"Choose a file",fileButtonTextMultiple:"Choose files",folderButtonText:"Choose a folder",fileDragDrop:"Drop files here to upload",folderDragDrop:"Drop folder here to upload",numFilesSelected:i=>i===0?"No files selected":i===1?"1 file selected":`${i} files selected`};vl(lv);var cv=lv;var tr=class extends ud{};vl(cv);var R3=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize"];function O3(i){let o=parseFloat(i.lineHeight);if(!Number.isNaN(o))return o;let t=parseFloat(i.fontSize);return Number.isNaN(t)?16:t*1.2}function eu(i,o){let t=i.ownerDocument,r=getComputedStyle(i),n=i.nodeName==="INPUT",a=t.createElement("div"),s=a.style,l=r;s.position="absolute",s.visibility="hidden",s.top="0",s.left="-9999px",s.whiteSpace=n?"pre":"pre-wrap",s.overflow="hidden",n||(s.wordWrap="break-word"),R3.forEach(f=>{let b=l[f];typeof b=="string"&&(s[f]=b)}),n&&(s.height="auto");let d=i.value.slice(0,o);a.textContent=n?d.replace(/\s/g,"\xA0"):d;let h=t.createElement("span");h.textContent=i.value.slice(o)||".",a.appendChild(h),t.body.appendChild(a);let m={top:h.offsetTop+(parseFloat(r.borderTopWidth)||0),left:h.offsetLeft+(parseFloat(r.borderLeftWidth)||0),height:O3(r)};return a.remove(),m}function ru(i,{top:o,left:t,height:r}){let n=i.getBoundingClientRect(),a=Math.max(n.top,n.bottom-r),s=Math.min(Math.max(n.top+o-i.scrollTop,n.top),a),l=Math.min(Math.max(n.left+t-i.scrollLeft,n.left),n.right);return new DOMRect(l,s,1,r)}function HH(i,o){return ru(i,eu(i,o))}var dv=E`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--slash-menu-width:320px;--slash-menu-max-height:260px;display:contents}:host(:not([open])) .slash-menu__panel{display:none}.slash-menu__panel{display:flex;flex-direction:column;position:fixed;top:0;left:0;width:var(--slash-menu-width);max-width:var(--auto-size-available-width,none);max-height:min(var(--slash-menu-max-height),var(--auto-size-available-height,100vh));overflow-y:auto;overscroll-behavior:none;z-index:var(--zn-z-index-dropdown);padding:var(--zn-spacing-2x-small,4px) 0;background:var(--zn-panel-background-color);border:solid var(--zn-panel-border-width,1px) var(--zn-panel-border-color);border-radius:var(--zn-border-radius,6px);box-shadow:var(--zn-shadow-medium);font-family:var(--zn-font-sans);font-size:var(--zn-font-size-medium);color:rgb(var(--zn-text))}.slash-menu__heading,.slash-menu__group-heading,.slash-menu__footer,.slash-menu__empty{padding:var(--zn-spacing-2x-small,4px) var(--zn-spacing-small,12px);font-size:var(--zn-font-size-x-small);color:var(--zn-color-neutral-500);-moz-user-select:none;user-select:none;-webkit-user-select:none}.slash-menu__group-heading{font-weight:var(--zn-font-weight-semibold);text-transform:uppercase;letter-spacing:0.04em}.slash-menu__footer{border-top:solid var(--zn-panel-border-width,1px) var(--zn-panel-border-color);margin-top:var(--zn-spacing-2x-small,4px)}.slash-menu__item{display:flex;align-items:center;gap:var(--zn-spacing-x-small,8px);width:100%;padding:var(--zn-spacing-x-small,8px) var(--zn-spacing-small,12px);border:none;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.slash-menu__item--active,.slash-menu__item:hover:not(.slash-menu__item--disabled){background:var(--zn-input-background-color-hover)}.slash-menu__item--disabled{opacity:0.5;cursor:not-allowed}.slash-menu__icon{display:flex;align-items:center;justify-content:center;flex:0 0 16px;color:var(--zn-color-neutral-500)}.slash-menu__text{display:flex;flex-direction:column;min-width:0;flex:1 1 auto}.slash-menu__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slash-menu__description{font-size:var(--zn-font-size-x-small);color:var(--zn-color-neutral-500);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slash-menu__token{flex:0 1 auto;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--zn-font-mono);font-size:var(--zn-font-size-x-small);color:var(--zn-color-neutral-600)}`;var md="zn-slash-item-select";function P3(i,o){return!!i&&i.length===o.length&&i.every((t,r)=>t.label===o[r].label&&t.value===o[r].value&&t.disabled===o[r].disabled)}var Re=class extends k{constructor(){super(...arguments);this.open=!1;this.items=[];this.query="";this.heading="Insert";this.emptyText="No matches";this.maxItems=25;this.anchor=null;this.placement="bottom-start";this.distance=4;this.activeIndex=0;this.handleItemMouseDown=t=>{t.preventDefault();let r=Number(t.currentTarget.dataset.index),n=this.visibleItems[r];n&&(this.activeIndex=r,this.selectItem(n))}}get visibleItems(){return this.maxItems>0?this.items.slice(0,this.maxItems):this.items}get activeItem(){return this.visibleItems[this.activeIndex]}show(){this.open=!0}hide(){this.open=!1}setActiveIndex(t){let r=this.visibleItems;if(!r.filter(l=>!l.disabled).length){this.activeIndex=-1;return}let a=(t+r.length)%r.length,s=t<this.activeIndex?-1:1;for(;r[a]?.disabled;)a=(a+s+r.length)%r.length;this.activeIndex=a,this.updateComplete.then(()=>this.scrollActiveIntoView())}moveActive(t){this.setActiveIndex(this.activeIndex+t)}selectActive(){let t=this.activeItem;t&&this.selectItem(t)}reposition(){this.position()}connectedCallback(){super.connectedCallback(),this.open&&this.updateComplete.then(()=>this.startPositioner())}disconnectedCallback(){super.disconnectedCallback(),this.stopPositioner()}startPositioner(){this.stopPositioner(),!(!this.anchor||!this.panel)&&(this.stopAutoUpdate=ad(this.anchor,this.panel,()=>{this.position()}))}stopPositioner(){this.stopAutoUpdate?.(),this.stopAutoUpdate=void 0}async position(){let{anchor:t,panel:r}=this;if(!this.open||!t||!r)return;let{x:n,y:a}=await dd(t,r,{placement:this.placement,strategy:"fixed",middleware:[sd(this.distance),cd({padding:8}),ld({padding:8}),hl({padding:8,apply:({availableHeight:s})=>{r.style.setProperty("--auto-size-available-height",`${Math.max(s,0)}px`)}})]});Object.assign(r.style,{left:`${n}px`,top:`${a}px`})}selectItem(t){t.disabled||this.dispatchEvent(new CustomEvent(md,{bubbles:!0,cancelable:!0,composed:!1,detail:{item:t,query:this.query}}))}scrollActiveIntoView(){let t=this.renderRoot.querySelector('[data-slash-item][aria-selected="true"]');if(!t)return;let r=this.visibleItems,n=this.panel;if(n&&r.slice(0,this.activeIndex).every(a=>a.disabled)){n.scrollTop=0;return}if(n&&r.slice(this.activeIndex+1).every(a=>a.disabled)){n.scrollTop=n.scrollHeight;return}t.scrollIntoView({block:"nearest"})}willUpdate(t){super.willUpdate(t),t.has("items")&&!P3(t.get("items"),this.items)&&(this.activeIndex=this.visibleItems.findIndex(r=>!r.disabled))}updated(t){super.updated(t),(t.has("items")||t.has("open")&&this.open)&&this.scrollActiveIntoView(),(t.has("open")||t.has("anchor"))&&(this.open?this.startPositioner():this.stopPositioner()),this.open&&this.position()}renderItem(t,r,n){let a=r===this.activeIndex,s=t.value&&t.value!==t.label&&!t.value.includes(`
|
|
380
|
+
`}};dn.styles=T(nv),c([p()],dn.prototype,"filters",2),c([p()],dn.prototype,"name",2),c([p()],dn.prototype,"value",2);var Qh=dn;dn.define("zn-data-table-filter");var re=(i="value")=>(o,t)=>{let r=o.constructor,n=r.prototype.attributeChangedCallback;r.prototype.attributeChangedCallback=function(a,s,l){let d=r.getPropertyOptions(i),h=typeof d.attribute=="string"?d.attribute:i;if(a===h){let m=d.converter||ii,b=(typeof m=="function"?m:m?.fromAttribute??ii.fromAttribute)(l,d.type);this[i]!==b&&(this[t]=b)}n.call(this,a,s,l)}};var q3=new Map;function hd(i){return(Array.isArray(i)?i:i.split(",")).reduce((t,r)=>{let n=q3.get(r.trim());return n?[...t,...n]:t},[])}function I3(i){return typeof i=="object"&&i!==null&&typeof i.label=="string"}function hi(i){let o=i?.trim();if(!o)return[];if(o.startsWith("["))try{let t=JSON.parse(o);return Array.isArray(t)?t.filter(I3):[]}catch{return console.warn("slash-items could not be parsed as JSON",o),[]}return o.split(",").map(t=>t.trim()).filter(t=>t!=="").map(t=>{let r=t.indexOf("=");if(r===-1)return{label:t,value:t};let n=t.slice(0,r).trim(),a=t.slice(r+1).trim();return{label:n||a,value:a}}).filter(t=>t.label!=="")}function D3(i){return i.keywords?(Array.isArray(i.keywords)?i.keywords:i.keywords.split(",")).map(t=>t.trim().toLowerCase()).filter(t=>t!==""):[]}function N3(i,o){let t=i.label.toLowerCase();return t.startsWith(o)?0:t.split(/\s+/).some(r=>r.startsWith(o))?1:t.includes(o)?2:D3(i).some(r=>r.includes(o))?3:i.value?.toLowerCase().includes(o)?4:i.description?.toLowerCase().includes(o)?5:-1}function iv(i,o){let t=o.trim().toLowerCase();return i.map((r,n)=>({item:r,index:n,score:t?N3(r,t):0})).filter(r=>r.score!==-1).sort((r,n)=>r.score-n.score||(r.item.order??r.index)-(n.item.order??n.index)||r.index-n.index).map(r=>r.item)}var Tr=se(class extends Xe{constructor(i){if(super(i),i.type!==or.PROPERTY&&i.type!==or.ATTRIBUTE&&i.type!==or.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Kc(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[o]){if(o===ae||o===V)return o;let t=i.element,r=i.name;if(i.type===or.PROPERTY){if(o===t[r])return ae}else if(i.type===or.BOOLEAN_ATTRIBUTE){if(!!o===t.hasAttribute(r))return ae}else if(i.type===or.ATTRIBUTE&&t.getAttribute(r)===o+"")return ae;return Ba(i),o}});var Jh=new Set,Xa=new Map,Nn,Zh="ltr",tu="en",av=typeof MutationObserver<"u"&&typeof document<"u"&&typeof document.documentElement<"u";if(av){let i=new MutationObserver(sv);Zh=document.documentElement.dir||"ltr",tu=document.documentElement.lang||navigator.language,i.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]})}function vl(...i){i.map(o=>{let t=o.$code.toLowerCase();Xa.has(t)?Xa.set(t,Object.assign(Object.assign({},Xa.get(t)),o)):Xa.set(t,o),Nn||(Nn=o)}),sv()}function sv(){av&&(Zh=document.documentElement.dir||"ltr",tu=document.documentElement.lang||navigator.language),[...Jh.keys()].map(i=>{typeof i.requestUpdate=="function"&&i.requestUpdate()})}var ud=class{constructor(o){this.host=o,this.host.addController(this)}hostConnected(){Jh.add(this.host)}hostDisconnected(){Jh.delete(this.host)}dir(){return`${this.host.dir||Zh}`.toLowerCase()}lang(){let o=`${this.host.lang||tu}`.toLowerCase().replace(/_/g,"-");try{return new Intl.Locale(o),o}catch{return Nn?Nn.$code.toLowerCase():"en"}}getTranslationData(o){var t,r;let n;try{n=new Intl.Locale(o.replace(/_/g,"-"))}catch{return{locale:void 0,language:"",region:"",primary:void 0,secondary:void 0}}let a=n.language.toLowerCase(),s=(r=(t=n.region)===null||t===void 0?void 0:t.toLowerCase())!==null&&r!==void 0?r:"",l=Xa.get(`${a}-${s}`),d=Xa.get(a);return{locale:n,language:a,region:s,primary:l,secondary:d}}exists(o,t){var r;let{primary:n,secondary:a}=this.getTranslationData((r=t.lang)!==null&&r!==void 0?r:this.lang());return t=Object.assign({includeFallback:!1},t),!!(n&&n[o]||a&&a[o]||t.includeFallback&&Nn&&Nn[o])}term(o,...t){let{primary:r,secondary:n}=this.getTranslationData(this.lang()),a;if(r&&r[o])a=r[o];else if(n&&n[o])a=n[o];else if(Nn&&Nn[o])a=Nn[o];else return console.error(`No translation found for: ${String(o)}`),String(o);return typeof a=="function"?a(...t):a}date(o,t){return o=new Date(o),new Intl.DateTimeFormat(this.lang(),t).format(o)}number(o,t){return o=Number(o),isNaN(o)?"":new Intl.NumberFormat(this.lang(),t).format(o)}relativeTime(o,t,r){return new Intl.RelativeTimeFormat(this.lang(),r).format(o,t)}};var lv={$code:"en",$name:"English",$dir:"ltr",onChange:"onChange",showPassword:"Show password",hidePassword:"Hide password",clearEntry:"Clear entry",numOptionsSelected:i=>i===0?"No options selected":i===1?"1 option selected":`${i} options selected`,fileButtonText:"Choose a file",fileButtonTextMultiple:"Choose files",folderButtonText:"Choose a folder",fileDragDrop:"Drop files here to upload",folderDragDrop:"Drop folder here to upload",numFilesSelected:i=>i===0?"No files selected":i===1?"1 file selected":`${i} files selected`};vl(lv);var cv=lv;var tr=class extends ud{};vl(cv);var R3=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize"];function O3(i){let o=parseFloat(i.lineHeight);if(!Number.isNaN(o))return o;let t=parseFloat(i.fontSize);return Number.isNaN(t)?16:t*1.2}function eu(i,o){let t=i.ownerDocument,r=getComputedStyle(i),n=i.nodeName==="INPUT",a=t.createElement("div"),s=a.style,l=r;s.position="absolute",s.visibility="hidden",s.top="0",s.left="-9999px",s.whiteSpace=n?"pre":"pre-wrap",s.overflow="hidden",n||(s.wordWrap="break-word"),R3.forEach(f=>{let b=l[f];typeof b=="string"&&(s[f]=b)}),n&&(s.height="auto");let d=i.value.slice(0,o);a.textContent=n?d.replace(/\s/g,"\xA0"):d;let h=t.createElement("span");h.textContent=i.value.slice(o)||".",a.appendChild(h),t.body.appendChild(a);let m={top:h.offsetTop+(parseFloat(r.borderTopWidth)||0),left:h.offsetLeft+(parseFloat(r.borderLeftWidth)||0),height:O3(r)};return a.remove(),m}function ru(i,{top:o,left:t,height:r}){let n=i.getBoundingClientRect(),a=Math.max(n.top,n.bottom-r),s=Math.min(Math.max(n.top+o-i.scrollTop,n.top),a),l=Math.min(Math.max(n.left+t-i.scrollLeft,n.left),n.right);return new DOMRect(l,s,1,r)}function HH(i,o){return ru(i,eu(i,o))}var dv=E`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--slash-menu-width:320px;--slash-menu-max-height:260px;display:contents}:host(:not([open])) .slash-menu__panel{display:none}.slash-menu__panel{display:flex;flex-direction:column;position:fixed;inset:0 auto auto 0;margin:0;width:var(--slash-menu-width);max-width:var(--auto-size-available-width,none);max-height:min(var(--slash-menu-max-height),var(--auto-size-available-height,100vh));overflow-y:auto;overscroll-behavior:none;z-index:var(--zn-z-index-dropdown);padding:var(--zn-spacing-2x-small,4px) 0;background:var(--zn-panel-background-color);border:solid var(--zn-panel-border-width,1px) var(--zn-panel-border-color);border-radius:var(--zn-border-radius,6px);box-shadow:var(--zn-shadow-medium);font-family:var(--zn-font-sans);font-size:var(--zn-font-size-medium);color:rgb(var(--zn-text))}.slash-menu__heading,.slash-menu__group-heading,.slash-menu__footer,.slash-menu__empty{padding:var(--zn-spacing-2x-small,4px) var(--zn-spacing-small,12px);font-size:var(--zn-font-size-x-small);color:var(--zn-color-neutral-500);-moz-user-select:none;user-select:none;-webkit-user-select:none}.slash-menu__group-heading{font-weight:var(--zn-font-weight-semibold);text-transform:uppercase;letter-spacing:0.04em}.slash-menu__footer{border-top:solid var(--zn-panel-border-width,1px) var(--zn-panel-border-color);margin-top:var(--zn-spacing-2x-small,4px)}.slash-menu__item{display:flex;align-items:center;gap:var(--zn-spacing-x-small,8px);width:100%;padding:var(--zn-spacing-x-small,8px) var(--zn-spacing-small,12px);border:none;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.slash-menu__item--active,.slash-menu__item:hover:not(.slash-menu__item--disabled){background:var(--zn-input-background-color-hover)}.slash-menu__item--disabled{opacity:0.5;cursor:not-allowed}.slash-menu__icon{display:flex;align-items:center;justify-content:center;flex:0 0 16px;color:var(--zn-color-neutral-500)}.slash-menu__text{display:flex;flex-direction:column;min-width:0;flex:1 1 auto}.slash-menu__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slash-menu__description{font-size:var(--zn-font-size-x-small);color:var(--zn-color-neutral-500);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slash-menu__token{flex:0 1 auto;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--zn-font-mono);font-size:var(--zn-font-size-x-small);color:var(--zn-color-neutral-600)}`;var md="zn-slash-item-select";function P3(i,o){return!!i&&i.length===o.length&&i.every((t,r)=>t.label===o[r].label&&t.value===o[r].value&&t.disabled===o[r].disabled)}var Re=class extends k{constructor(){super(...arguments);this.open=!1;this.items=[];this.query="";this.heading="Insert";this.emptyText="No matches";this.maxItems=25;this.anchor=null;this.placement="bottom-start";this.distance=4;this.activeIndex=0;this.handleItemMouseDown=t=>{t.preventDefault();let r=Number(t.currentTarget.dataset.index),n=this.visibleItems[r];n&&(this.activeIndex=r,this.selectItem(n))}}get visibleItems(){return this.maxItems>0?this.items.slice(0,this.maxItems):this.items}get activeItem(){return this.visibleItems[this.activeIndex]}show(){this.open=!0}hide(){this.open=!1}setActiveIndex(t){let r=this.visibleItems;if(!r.filter(l=>!l.disabled).length){this.activeIndex=-1;return}let a=(t+r.length)%r.length,s=t<this.activeIndex?-1:1;for(;r[a]?.disabled;)a=(a+s+r.length)%r.length;this.activeIndex=a,this.updateComplete.then(()=>this.scrollActiveIntoView())}moveActive(t){this.setActiveIndex(this.activeIndex+t)}selectActive(){let t=this.activeItem;t&&this.selectItem(t)}reposition(){this.position()}connectedCallback(){super.connectedCallback(),this.open&&this.updateComplete.then(()=>this.startPositioner())}disconnectedCallback(){super.disconnectedCallback(),this.stopPositioner(),this.hidePanelPopover()}showPanelPopover(){let t=this.panel;typeof t?.showPopover=="function"&&!t.matches(":popover-open")&&t.showPopover()}hidePanelPopover(){let t=this.panel;typeof t?.hidePopover=="function"&&t.matches(":popover-open")&&t.hidePopover()}startPositioner(){this.stopPositioner(),!(!this.anchor||!this.panel)&&(this.stopAutoUpdate=ad(this.anchor,this.panel,()=>{this.position()}))}stopPositioner(){this.stopAutoUpdate?.(),this.stopAutoUpdate=void 0}async position(){let{anchor:t,panel:r}=this;if(!this.open||!t||!r)return;this.showPanelPopover();let{x:n,y:a}=await dd(t,r,{placement:this.placement,strategy:"fixed",middleware:[sd(this.distance),cd({padding:8}),ld({padding:8}),hl({padding:8,apply:({availableHeight:s})=>{r.style.setProperty("--auto-size-available-height",`${Math.max(s,0)}px`)}})]});Object.assign(r.style,{left:`${n}px`,top:`${a}px`})}selectItem(t){t.disabled||this.dispatchEvent(new CustomEvent(md,{bubbles:!0,cancelable:!0,composed:!1,detail:{item:t,query:this.query}}))}scrollActiveIntoView(){let t=this.renderRoot.querySelector('[data-slash-item][aria-selected="true"]');if(!t)return;let r=this.visibleItems,n=this.panel;if(n&&r.slice(0,this.activeIndex).every(a=>a.disabled)){n.scrollTop=0;return}if(n&&r.slice(this.activeIndex+1).every(a=>a.disabled)){n.scrollTop=n.scrollHeight;return}t.scrollIntoView({block:"nearest"})}willUpdate(t){super.willUpdate(t),t.has("items")&&!P3(t.get("items"),this.items)&&(this.activeIndex=this.visibleItems.findIndex(r=>!r.disabled))}updated(t){super.updated(t),(t.has("open")||t.has("anchor"))&&(this.open?this.startPositioner():(this.stopPositioner(),this.hidePanelPopover())),this.open&&this.position(),(t.has("items")||t.has("open")&&this.open)&&this.scrollActiveIntoView()}renderItem(t,r,n){let a=r===this.activeIndex,s=t.value&&t.value!==t.label&&!t.value.includes(`
|
|
381
381
|
`)?t.value:"";return u`
|
|
382
382
|
<button
|
|
383
383
|
type="button"
|
|
@@ -407,6 +407,7 @@ import{a as $n,b as F_,c as ur,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var L
|
|
|
407
407
|
<div
|
|
408
408
|
part="panel"
|
|
409
409
|
class="slash-menu__panel"
|
|
410
|
+
popover="manual"
|
|
410
411
|
role="listbox"
|
|
411
412
|
aria-hidden=${this.open?"false":"true"}
|
|
412
413
|
aria-label=${this.query?`Matches for ${this.query}`:this.heading}>
|
|
@@ -5578,7 +5579,7 @@ ${n}`:""}</li></ol>`};return t(0)}parseTable(o,t){this.index++;let r=[],n=[];for
|
|
|
5578
5579
|
${this._renderInspector()}
|
|
5579
5580
|
<slot name="config" class="declarations" @slotchange="${this._registerSlottedTemplates}"></slot>
|
|
5580
5581
|
</div>
|
|
5581
|
-
`}};At.styles=T(I_),At.dependencies={"zn-collapsible":la,"zn-icon":ct,"zn-input":Se,"zn-page-palette-item":Jf,"zn-page-section-card":Zf},c([p()],At.prototype,"name",2),c([p({reflect:!0})],At.prototype,"form",2),c([p()],At.prototype,"config",2),c([p({reflect:!0})],At.prototype,"heading",2),c([p({reflect:!0})],At.prototype,"subheading",2),c([p({attribute:!1})],At.prototype,"sectionTypes",2),c([p({type:Boolean,reflect:!0,attribute:"palette-collapsed"})],At.prototype,"paletteCollapsed",2),c([p({type:Boolean,reflect:!0,attribute:"inspector-collapsed"})],At.prototype,"inspectorCollapsed",2),c([p({attribute:"auto-save",converter:{fromAttribute:t=>{if(t===null)return null;let r=parseFloat(t);return Number.isFinite(r)&&r>0?r:RM},toAttribute:t=>t===null?null:String(t)}})],At.prototype,"autoSave",2),c([O()],At.prototype,"_state",2),c([O()],At.prototype,"_selectedId",2),c([O()],At.prototype,"_search",2),c([O()],At.prototype,"_pickerIndex",2),c([O()],At.prototype,"_dragOverIndex",2),c([O()],At.prototype,"_slotDragOver",2),c([O()],At.prototype,"_slotPicker",2),c([O()],At.prototype,"_form",2),c([K("config")],At.prototype,"handleConfigChange",1),c([K("sectionTypes")],At.prototype,"handleSectionTypesChange",1),c([O()],At.prototype,"_lastSavedAt",2),c([O()],At.prototype,"_justSaved",2),c([O()],At.prototype,"_statusNow",2),c([O()],At.prototype,"_restorePrompt",2);var PM=At;At.define("zn-page-builder");var N_=E`:host{display:block}:host([fill]){flex:1 1 auto;min-height:0}.preview{position:relative;width:100%;overflow-x:hidden;overflow-y:auto;background:radial-gradient(circle,rgba(var(--zn-text),var(--zn-preview-frame-dot-opacity,0.08)) 1px,transparent 1px) 0 0/var(--zn-preview-frame-dot-spacing,20px) var(--zn-preview-frame-dot-spacing,20px),rgb(var(--zn-body))}:host([backdrop=panel]) .preview{background:rgb(var(--zn-panel))}.preview__stage{height:100%;max-width:100%;margin:0 auto;overflow:hidden}iframe{display:block;width:100%;border:0;pointer-events:none;background:rgb(var(--zn-body))}:host([interactive]) iframe{pointer-events:auto}.preview__error{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:1rem;text-align:center;background:rgba(0,0,0,0.65);color:#fff}`;var R_={desktop:"100%",tablet:"768px",mobile:"390px"},we=class extends k{constructor(){super(...arguments);this.src="";this.frameOrigin="";this.dataUri="";this.watch="form[data-auto-save]";this.refreshOn="form";this.debounce=400;this.zoom=1;this.minHeight=480;this.fill=!1;this.device="desktop";this.backdrop="dots";this.interactive=!1;this.error="";this._contentHeight=0;this._generation=0;this._watchedForms=new Set;this.
|
|
5582
|
+
`}};At.styles=T(I_),At.dependencies={"zn-collapsible":la,"zn-icon":ct,"zn-input":Se,"zn-page-palette-item":Jf,"zn-page-section-card":Zf},c([p()],At.prototype,"name",2),c([p({reflect:!0})],At.prototype,"form",2),c([p()],At.prototype,"config",2),c([p({reflect:!0})],At.prototype,"heading",2),c([p({reflect:!0})],At.prototype,"subheading",2),c([p({attribute:!1})],At.prototype,"sectionTypes",2),c([p({type:Boolean,reflect:!0,attribute:"palette-collapsed"})],At.prototype,"paletteCollapsed",2),c([p({type:Boolean,reflect:!0,attribute:"inspector-collapsed"})],At.prototype,"inspectorCollapsed",2),c([p({attribute:"auto-save",converter:{fromAttribute:t=>{if(t===null)return null;let r=parseFloat(t);return Number.isFinite(r)&&r>0?r:RM},toAttribute:t=>t===null?null:String(t)}})],At.prototype,"autoSave",2),c([O()],At.prototype,"_state",2),c([O()],At.prototype,"_selectedId",2),c([O()],At.prototype,"_search",2),c([O()],At.prototype,"_pickerIndex",2),c([O()],At.prototype,"_dragOverIndex",2),c([O()],At.prototype,"_slotDragOver",2),c([O()],At.prototype,"_slotPicker",2),c([O()],At.prototype,"_form",2),c([K("config")],At.prototype,"handleConfigChange",1),c([K("sectionTypes")],At.prototype,"handleSectionTypesChange",1),c([O()],At.prototype,"_lastSavedAt",2),c([O()],At.prototype,"_justSaved",2),c([O()],At.prototype,"_statusNow",2),c([O()],At.prototype,"_restorePrompt",2);var PM=At;At.define("zn-page-builder");var N_=E`:host{display:block}:host([fill]){flex:1 1 auto;min-height:0}.preview{position:relative;width:100%;overflow-x:hidden;overflow-y:auto;background:radial-gradient(circle,rgba(var(--zn-text),var(--zn-preview-frame-dot-opacity,0.08)) 1px,transparent 1px) 0 0/var(--zn-preview-frame-dot-spacing,20px) var(--zn-preview-frame-dot-spacing,20px),rgb(var(--zn-body))}:host([backdrop=panel]) .preview{background:rgb(var(--zn-panel))}.preview__stage{height:100%;max-width:100%;margin:0 auto;overflow:hidden}iframe{display:block;width:100%;border:0;pointer-events:none;background:rgb(var(--zn-body))}:host([interactive]) iframe{pointer-events:auto}.preview__error{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:1rem;text-align:center;background:rgba(0,0,0,0.65);color:#fff}`;var R_={desktop:"100%",tablet:"768px",mobile:"390px"},we=class extends k{constructor(){super(...arguments);this.src="";this.frameOrigin="";this.dataUri="";this.watch="form[data-auto-save]";this.refreshOn="form";this.debounce=400;this.zoom=1;this.minHeight=480;this.fill=!1;this.device="desktop";this.backdrop="dots";this.interactive=!1;this.error="";this._contentHeight=0;this._generation=0;this._watchedForms=new Set;this._debounceTimers=new Map;this._shellSaveRoots=[];this._formObserver=new Lt(this,{target:null,config:{subtree:!0,childList:!0},callback:()=>this._attachForms()});this._onMessage=t=>{if(t.origin!==this.frameOrigin||!this.frame||t.source!==this.frame.contentWindow)return;let r=t.data;switch(r?.type){case"hp-preview:ready":this._sendConfig().then(()=>this._postTheme());break;case"hp-preview:rendered":this.error="",this._applyContentHeight(r.height);break;case"hp-preview:height":this._applyContentHeight(r.height);break;case"hp-preview:error":this._fail(String(r.message??"Preview failed to render"));break}};this._onFrameLoad=()=>{this._contentObserver?.disconnect(),this._contentObserver=void 0;let t;try{t=this.frame?.contentDocument?.documentElement}catch{return}if(!t)return;let r=()=>{let n=t.getBoundingClientRect().height;n>(this.frame?.clientHeight??0)&&this._applyContentHeight(n)};r(),this._contentObserver=new ResizeObserver(r),this._contentObserver.observe(t)};this._onShellSave=t=>{if(t===this._lastShellSave||(this._lastShellSave=t,!this.refreshOn))return;let r=t.composedPath()[0];!(r instanceof HTMLFormElement)||!r.matches(this.refreshOn)||this._watchedForms.has(r)||this._sendConfig()};this._onChange=t=>{let r=t.currentTarget,n=this._debounceTimers.get(r);n&&window.clearTimeout(n),this._debounceTimers.set(r,window.setTimeout(()=>{this._debounceTimers.delete(r),r.isConnected&&r.requestSubmit()},this.debounce))};this._onSubmit=t=>{t.preventDefault(),t.stopImmediatePropagation(),this._save(t.currentTarget)}}connectedCallback(){super.connectedCallback(),window.addEventListener("message",this._onMessage),this._attachForms();let t=this.getRootNode();this._shellSaveRoots=t instanceof ShadowRoot?[document,t]:[document],this._shellSaveRoots.forEach(r=>r.addEventListener("complete",this._onShellSave)),t instanceof Document?this._formObserver.observe(t.body):t instanceof ShadowRoot&&this._formObserver.observe(t)}willUpdate(t){t.has("src")&&this._resetContentHeight()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("message",this._onMessage),this._contentObserver?.disconnect(),this._contentObserver=void 0,this._watchedForms.forEach(t=>this._detachForm(t)),this._watchedForms.clear(),this._shellSaveRoots.forEach(t=>t.removeEventListener("complete",this._onShellSave)),this._shellSaveRoots=[]}_applyContentHeight(t){let r=Math.round(Number(t));!Number.isFinite(r)||r<=0||(this._contentHeight=r)}_resetContentHeight(){this._contentHeight=0,this._contentObserver?.disconnect(),this._contentObserver=void 0}refresh(){return this._sendConfig()}setTheme(t){this._theme=t,this._postTheme()}_postTheme(){!this._theme||!this.frameOrigin||this.frame?.contentWindow?.postMessage({type:"hp-preview:theme",...this._theme},this.frameOrigin)}async _sendConfig(){if(!this.dataUri||!this.frameOrigin)return;let t=++this._generation;try{let r=await fetch(this.dataUri,{credentials:"same-origin",headers:{"x-kx-fetch-style":"download"}});if(!r.ok)throw new Error(await r.text()||r.statusText);let n=await r.json();if(t!==this._generation)return;this.frame?.contentWindow?.postMessage({type:"hp-preview:config",...n},this.frameOrigin)}catch(r){t===this._generation&&this._fail(r instanceof Error?r.message:String(r))}}_attachForms(){let t=this.getRootNode(),r=new Set;t.querySelectorAll(this.watch).forEach(n=>{n instanceof HTMLFormElement&&r.add(n)}),this._watchedForms.forEach(n=>{r.has(n)||(this._detachForm(n),this._watchedForms.delete(n))}),r.forEach(n=>{this._watchedForms.has(n)||(this._watchedForms.add(n),n.addEventListener("submit",this._onSubmit,{capture:!0}),n.addEventListener("zn-change",this._onChange),n.addEventListener("zn-input",this._onChange),n.addEventListener("change",this._onChange))})}_detachForm(t){t.removeEventListener("submit",this._onSubmit,{capture:!0}),t.removeEventListener("zn-change",this._onChange),t.removeEventListener("zn-input",this._onChange),t.removeEventListener("change",this._onChange);let r=this._debounceTimers.get(t);r&&window.clearTimeout(r),this._debounceTimers.delete(t)}async _save(t){try{let r=await fetch(t.getAttribute("action")||"",{method:"POST",credentials:"same-origin",headers:{"x-kx-fetch-style":"download"},body:new FormData(t)}),n=r.headers.get("x-kubex-alert-danger");if(n)throw new Error(n);if(!r.ok)throw new Error(await r.text()||r.statusText);await this._sendConfig()}catch(r){this._fail(r instanceof Error?r.message:String(r))}}_fail(t){this.error=t,this.emit("zn-error",{detail:{message:t}})}render(){let t=this.zoom>0&&this.zoom<=1?this.zoom:1,r=this.error||this.interactive?0:this._contentHeight,n=this.fill?{width:"100%",height:r?`max(${r}px, 100%)`:"100%"}:{width:`${100/t}%`,height:`${Math.max(r,this.minHeight/t)}px`,transform:`scale(${t})`,transformOrigin:"0 0"},a=this.fill?{height:"100%",minHeight:`${this.minHeight}px`}:{height:`${this.minHeight}px`},s={width:R_[this.device]??R_.desktop};return r&&(s.height=this.fill?`max(${r}px, 100%)`:`${Math.max(r*t,this.minHeight)}px`),u`
|
|
5582
5583
|
<div part="base" class="preview" style="${Sr(a)}">
|
|
5583
5584
|
<div part="stage" class="preview__stage" style="${Sr(s)}">
|
|
5584
5585
|
<iframe part="iframe"
|