@edugis-org/webmapx 0.1.9 → 0.1.10
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-lib/alert-C_G5X6J8.js +311 -0
- package/dist-lib/button-BlZd3WPH.js +744 -0
- package/dist-lib/checkbox-DB4oPyyw.js +287 -0
- package/dist-lib/chunk.36O46B5H-km1dakSW.js +77 -0
- package/dist-lib/chunk.3RPBFEDE-Cxq6VVR6.js +138 -0
- package/dist-lib/chunk.3Y6SB6QS-DUJ8Ickw.js +18 -0
- package/dist-lib/chunk.5JY5FUCG-CYkzbQXS.js +1071 -0
- package/dist-lib/chunk.6CTB5ZDJ-DjZrBd6Y.js +99 -0
- package/dist-lib/chunk.AJ3ENQ5C-DXVGX5Dn.js +177 -0
- package/dist-lib/chunk.LD4M4QGE-CiCfhE8r.js +8 -0
- package/dist-lib/chunk.NYIIDP5N-B4UCI-rQ.js +34 -0
- package/dist-lib/chunk.RWUUFNUL-DFztA4uV.js +43 -0
- package/dist-lib/chunk.SI4ACBFK-CLb9VfMG.js +61 -0
- package/dist-lib/chunk.YHLNUJ7P-ByKy0MKm.js +251 -0
- package/dist-lib/{decorate-DnZTfaod.js → decorate-CKr8yG1g.js} +1 -1
- package/dist-lib/divider-BOFbR_Ny.js +41 -0
- package/dist-lib/icon-CBNpO1lq.js +9 -0
- package/dist-lib/icon-button-B5rXu3Gg.js +410 -0
- package/dist-lib/input-B212BH6L.js +575 -0
- package/dist-lib/option-BQN9Zz_8.js +1108 -0
- package/dist-lib/spinner-DdcBaa3z.js +6 -0
- package/dist-lib/{toast-BsoXOdeA.js → toast-Bq2PmEpm.js} +1 -1
- package/dist-lib/tooltip-CBGOiZwJ.js +197 -0
- package/dist-lib/{webmapx-3d-tool-CLppA7mK.js → webmapx-3d-tool-CKoLGMpk.js} +2 -2
- package/dist-lib/{webmapx-base-tool-DfRa7TlD.js → webmapx-base-tool-Bc9Wz0yA.js} +1 -1
- package/dist-lib/{webmapx-config-edit-tool-BztWspia.js → webmapx-config-edit-tool-7265_DNz.js} +7 -7
- package/dist-lib/{webmapx-coordinates-tool-DnTSkrRG.js → webmapx-coordinates-tool-nwlckVn6.js} +3 -3
- package/dist-lib/{webmapx-core-bundle-CH-5vYXU.js → webmapx-core-bundle-Q6mWOib1.js} +1579 -671
- package/dist-lib/webmapx-draw-tool-6QRr5Gip.js +4315 -0
- package/dist-lib/{webmapx-geolocation-tool-DIMh2kIr.js → webmapx-geolocation-tool-qxN5aaVB.js} +6 -7
- package/dist-lib/{webmapx-import-layer-tool-DMiC1TpU.js → webmapx-import-layer-tool-tJ374qHR.js} +2 -2
- package/dist-lib/{webmapx-info-tool-D-XbAU9J.js → webmapx-info-tool-C3txgv3v.js} +4 -4
- package/dist-lib/{webmapx-language-osmvector-BAw9TR-M.js → webmapx-language-osmvector-jQzTOPU1.js} +3 -4
- package/dist-lib/{webmapx-measure-tool-CXlg11s8.js → webmapx-measure-tool-Cxxrzgdf.js} +4 -4
- package/dist-lib/{webmapx-modal-tool-Cs7LRrgW.js → webmapx-modal-tool-DQVHNXqX.js} +2 -2
- package/dist-lib/{webmapx-plugin-tool-qe2yTrWB.js → webmapx-plugin-tool-BNZ61x6s.js} +1 -1
- package/dist-lib/{webmapx-print-tool-DrK9sLC7.js → webmapx-print-tool-BDOTbS6u.js} +7 -8
- package/dist-lib/{webmapx-search-tool-H7NisgWH.js → webmapx-search-tool-CHlsE2Wx.js} +2 -2
- package/dist-lib/webmapx-settings-B0AT9Vjn.js +482 -0
- package/dist-lib/{webmapx-truearea-tool-CSU9mE1D.js → webmapx-truearea-tool-dxSgcbOj.js} +2 -2
- package/dist-lib/{webmapx-view-mode-tool-D1QyQfq8.js → webmapx-view-mode-tool-DVSMakdh.js} +2 -2
- package/dist-lib/webmapx.js +312 -311
- package/package.json +1 -1
- package/dist-lib/webmapx-draw-tool-DxQgUF1Q.js +0 -2117
- package/dist-lib/webmapx-settings-EHSm-AGU.js +0 -167
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import { a as e, i as t, n, r, t as i } from "./chunk.YHLNUJ7P-ByKy0MKm.js";
|
|
2
|
+
import { t as a } from "./chunk.NYIIDP5N-B4UCI-rQ.js";
|
|
3
|
+
import { t as o } from "./chunk.3RPBFEDE-Cxq6VVR6.js";
|
|
4
|
+
import { n as s } from "./input-B212BH6L.js";
|
|
5
|
+
import { t as c } from "./chunk.SI4ACBFK-CLb9VfMG.js";
|
|
6
|
+
import { css as l, html as u } from "lit";
|
|
7
|
+
import { property as d, query as f, state as p } from "lit/decorators.js";
|
|
8
|
+
import { classMap as m } from "lit/directives/class-map.js";
|
|
9
|
+
import { ifDefined as h } from "lit/directives/if-defined.js";
|
|
10
|
+
import { live as g } from "lit/directives/live.js";
|
|
11
|
+
//#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.R3NF57O3.js
|
|
12
|
+
var _ = l`
|
|
13
|
+
:host {
|
|
14
|
+
display: inline-block;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.checkbox {
|
|
18
|
+
position: relative;
|
|
19
|
+
display: inline-flex;
|
|
20
|
+
align-items: flex-start;
|
|
21
|
+
font-family: var(--sl-input-font-family);
|
|
22
|
+
font-weight: var(--sl-input-font-weight);
|
|
23
|
+
color: var(--sl-input-label-color);
|
|
24
|
+
vertical-align: middle;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.checkbox--small {
|
|
29
|
+
--toggle-size: var(--sl-toggle-size-small);
|
|
30
|
+
font-size: var(--sl-input-font-size-small);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.checkbox--medium {
|
|
34
|
+
--toggle-size: var(--sl-toggle-size-medium);
|
|
35
|
+
font-size: var(--sl-input-font-size-medium);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.checkbox--large {
|
|
39
|
+
--toggle-size: var(--sl-toggle-size-large);
|
|
40
|
+
font-size: var(--sl-input-font-size-large);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.checkbox__control {
|
|
44
|
+
flex: 0 0 auto;
|
|
45
|
+
position: relative;
|
|
46
|
+
display: inline-flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
width: var(--toggle-size);
|
|
50
|
+
height: var(--toggle-size);
|
|
51
|
+
border: solid var(--sl-input-border-width) var(--sl-input-border-color);
|
|
52
|
+
border-radius: 2px;
|
|
53
|
+
background-color: var(--sl-input-background-color);
|
|
54
|
+
color: var(--sl-color-neutral-0);
|
|
55
|
+
transition:
|
|
56
|
+
var(--sl-transition-fast) border-color,
|
|
57
|
+
var(--sl-transition-fast) background-color,
|
|
58
|
+
var(--sl-transition-fast) color,
|
|
59
|
+
var(--sl-transition-fast) box-shadow;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.checkbox__input {
|
|
63
|
+
position: absolute;
|
|
64
|
+
opacity: 0;
|
|
65
|
+
padding: 0;
|
|
66
|
+
margin: 0;
|
|
67
|
+
pointer-events: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.checkbox__checked-icon,
|
|
71
|
+
.checkbox__indeterminate-icon {
|
|
72
|
+
display: inline-flex;
|
|
73
|
+
width: var(--toggle-size);
|
|
74
|
+
height: var(--toggle-size);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Hover */
|
|
78
|
+
.checkbox:not(.checkbox--checked):not(.checkbox--disabled) .checkbox__control:hover {
|
|
79
|
+
border-color: var(--sl-input-border-color-hover);
|
|
80
|
+
background-color: var(--sl-input-background-color-hover);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Focus */
|
|
84
|
+
.checkbox:not(.checkbox--checked):not(.checkbox--disabled) .checkbox__input:focus-visible ~ .checkbox__control {
|
|
85
|
+
outline: var(--sl-focus-ring);
|
|
86
|
+
outline-offset: var(--sl-focus-ring-offset);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Checked/indeterminate */
|
|
90
|
+
.checkbox--checked .checkbox__control,
|
|
91
|
+
.checkbox--indeterminate .checkbox__control {
|
|
92
|
+
border-color: var(--sl-color-primary-600);
|
|
93
|
+
background-color: var(--sl-color-primary-600);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Checked/indeterminate + hover */
|
|
97
|
+
.checkbox.checkbox--checked:not(.checkbox--disabled) .checkbox__control:hover,
|
|
98
|
+
.checkbox.checkbox--indeterminate:not(.checkbox--disabled) .checkbox__control:hover {
|
|
99
|
+
border-color: var(--sl-color-primary-500);
|
|
100
|
+
background-color: var(--sl-color-primary-500);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Checked/indeterminate + focus */
|
|
104
|
+
.checkbox.checkbox--checked:not(.checkbox--disabled) .checkbox__input:focus-visible ~ .checkbox__control,
|
|
105
|
+
.checkbox.checkbox--indeterminate:not(.checkbox--disabled) .checkbox__input:focus-visible ~ .checkbox__control {
|
|
106
|
+
outline: var(--sl-focus-ring);
|
|
107
|
+
outline-offset: var(--sl-focus-ring-offset);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* Disabled */
|
|
111
|
+
.checkbox--disabled {
|
|
112
|
+
opacity: 0.5;
|
|
113
|
+
cursor: not-allowed;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.checkbox__label {
|
|
117
|
+
display: inline-block;
|
|
118
|
+
color: var(--sl-input-label-color);
|
|
119
|
+
line-height: var(--toggle-size);
|
|
120
|
+
margin-inline-start: 0.5em;
|
|
121
|
+
user-select: none;
|
|
122
|
+
-webkit-user-select: none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
:host([required]) .checkbox__label::after {
|
|
126
|
+
content: var(--sl-input-required-content);
|
|
127
|
+
color: var(--sl-input-required-content-color);
|
|
128
|
+
margin-inline-start: var(--sl-input-required-content-offset);
|
|
129
|
+
}
|
|
130
|
+
`, v = class extends n {
|
|
131
|
+
constructor() {
|
|
132
|
+
super(...arguments), this.formControlController = new o(this, {
|
|
133
|
+
value: (e) => e.checked ? e.value || "on" : void 0,
|
|
134
|
+
defaultValue: (e) => e.defaultChecked,
|
|
135
|
+
setValue: (e, t) => e.checked = t
|
|
136
|
+
}), this.hasSlotController = new a(this, "help-text"), this.hasFocus = !1, this.title = "", this.name = "", this.size = "medium", this.disabled = !1, this.checked = !1, this.indeterminate = !1, this.defaultChecked = !1, this.form = "", this.required = !1, this.helpText = "";
|
|
137
|
+
}
|
|
138
|
+
get validity() {
|
|
139
|
+
return this.input.validity;
|
|
140
|
+
}
|
|
141
|
+
get validationMessage() {
|
|
142
|
+
return this.input.validationMessage;
|
|
143
|
+
}
|
|
144
|
+
firstUpdated() {
|
|
145
|
+
this.formControlController.updateValidity();
|
|
146
|
+
}
|
|
147
|
+
handleClick() {
|
|
148
|
+
this.checked = !this.checked, this.indeterminate = !1, this.emit("sl-change");
|
|
149
|
+
}
|
|
150
|
+
handleBlur() {
|
|
151
|
+
this.hasFocus = !1, this.emit("sl-blur");
|
|
152
|
+
}
|
|
153
|
+
handleInput() {
|
|
154
|
+
this.emit("sl-input");
|
|
155
|
+
}
|
|
156
|
+
handleInvalid(e) {
|
|
157
|
+
this.formControlController.setValidity(!1), this.formControlController.emitInvalidEvent(e);
|
|
158
|
+
}
|
|
159
|
+
handleFocus() {
|
|
160
|
+
this.hasFocus = !0, this.emit("sl-focus");
|
|
161
|
+
}
|
|
162
|
+
handleDisabledChange() {
|
|
163
|
+
this.formControlController.setValidity(this.disabled);
|
|
164
|
+
}
|
|
165
|
+
handleStateChange() {
|
|
166
|
+
this.input.checked = this.checked, this.input.indeterminate = this.indeterminate, this.formControlController.updateValidity();
|
|
167
|
+
}
|
|
168
|
+
click() {
|
|
169
|
+
this.input.click();
|
|
170
|
+
}
|
|
171
|
+
focus(e) {
|
|
172
|
+
this.input.focus(e);
|
|
173
|
+
}
|
|
174
|
+
blur() {
|
|
175
|
+
this.input.blur();
|
|
176
|
+
}
|
|
177
|
+
checkValidity() {
|
|
178
|
+
return this.input.checkValidity();
|
|
179
|
+
}
|
|
180
|
+
getForm() {
|
|
181
|
+
return this.formControlController.getForm();
|
|
182
|
+
}
|
|
183
|
+
reportValidity() {
|
|
184
|
+
return this.input.reportValidity();
|
|
185
|
+
}
|
|
186
|
+
setCustomValidity(e) {
|
|
187
|
+
this.input.setCustomValidity(e), this.formControlController.updateValidity();
|
|
188
|
+
}
|
|
189
|
+
render() {
|
|
190
|
+
let e = this.hasSlotController.test("help-text"), t = this.helpText ? !0 : !!e;
|
|
191
|
+
return u`
|
|
192
|
+
<div
|
|
193
|
+
class=${m({
|
|
194
|
+
"form-control": !0,
|
|
195
|
+
"form-control--small": this.size === "small",
|
|
196
|
+
"form-control--medium": this.size === "medium",
|
|
197
|
+
"form-control--large": this.size === "large",
|
|
198
|
+
"form-control--has-help-text": t
|
|
199
|
+
})}
|
|
200
|
+
>
|
|
201
|
+
<label
|
|
202
|
+
part="base"
|
|
203
|
+
class=${m({
|
|
204
|
+
checkbox: !0,
|
|
205
|
+
"checkbox--checked": this.checked,
|
|
206
|
+
"checkbox--disabled": this.disabled,
|
|
207
|
+
"checkbox--focused": this.hasFocus,
|
|
208
|
+
"checkbox--indeterminate": this.indeterminate,
|
|
209
|
+
"checkbox--small": this.size === "small",
|
|
210
|
+
"checkbox--medium": this.size === "medium",
|
|
211
|
+
"checkbox--large": this.size === "large"
|
|
212
|
+
})}
|
|
213
|
+
>
|
|
214
|
+
<input
|
|
215
|
+
class="checkbox__input"
|
|
216
|
+
type="checkbox"
|
|
217
|
+
title=${this.title}
|
|
218
|
+
name=${this.name}
|
|
219
|
+
value=${h(this.value)}
|
|
220
|
+
.indeterminate=${g(this.indeterminate)}
|
|
221
|
+
.checked=${g(this.checked)}
|
|
222
|
+
.disabled=${this.disabled}
|
|
223
|
+
.required=${this.required}
|
|
224
|
+
aria-checked=${this.checked ? "true" : "false"}
|
|
225
|
+
aria-describedby="help-text"
|
|
226
|
+
@click=${this.handleClick}
|
|
227
|
+
@input=${this.handleInput}
|
|
228
|
+
@invalid=${this.handleInvalid}
|
|
229
|
+
@blur=${this.handleBlur}
|
|
230
|
+
@focus=${this.handleFocus}
|
|
231
|
+
/>
|
|
232
|
+
|
|
233
|
+
<span
|
|
234
|
+
part="control${this.checked ? " control--checked" : ""}${this.indeterminate ? " control--indeterminate" : ""}"
|
|
235
|
+
class="checkbox__control"
|
|
236
|
+
>
|
|
237
|
+
${this.checked ? u`
|
|
238
|
+
<sl-icon part="checked-icon" class="checkbox__checked-icon" library="system" name="check"></sl-icon>
|
|
239
|
+
` : ""}
|
|
240
|
+
${!this.checked && this.indeterminate ? u`
|
|
241
|
+
<sl-icon
|
|
242
|
+
part="indeterminate-icon"
|
|
243
|
+
class="checkbox__indeterminate-icon"
|
|
244
|
+
library="system"
|
|
245
|
+
name="indeterminate"
|
|
246
|
+
></sl-icon>
|
|
247
|
+
` : ""}
|
|
248
|
+
</span>
|
|
249
|
+
|
|
250
|
+
<div part="label" class="checkbox__label">
|
|
251
|
+
<slot></slot>
|
|
252
|
+
</div>
|
|
253
|
+
</label>
|
|
254
|
+
|
|
255
|
+
<div
|
|
256
|
+
aria-hidden=${t ? "false" : "true"}
|
|
257
|
+
class="form-control__help-text"
|
|
258
|
+
id="help-text"
|
|
259
|
+
part="form-control-help-text"
|
|
260
|
+
>
|
|
261
|
+
<slot name="help-text">${this.helpText}</slot>
|
|
262
|
+
</div>
|
|
263
|
+
</div>
|
|
264
|
+
`;
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
//#endregion
|
|
268
|
+
//#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.D5YQDJ7X.js
|
|
269
|
+
v.styles = [
|
|
270
|
+
r,
|
|
271
|
+
c,
|
|
272
|
+
_
|
|
273
|
+
], v.dependencies = { "sl-icon": i }, e([f("input[type=\"checkbox\"]")], v.prototype, "input", 2), e([p()], v.prototype, "hasFocus", 2), e([d()], v.prototype, "title", 2), e([d()], v.prototype, "name", 2), e([d()], v.prototype, "value", 2), e([d({ reflect: !0 })], v.prototype, "size", 2), e([d({
|
|
274
|
+
type: Boolean,
|
|
275
|
+
reflect: !0
|
|
276
|
+
})], v.prototype, "disabled", 2), e([d({
|
|
277
|
+
type: Boolean,
|
|
278
|
+
reflect: !0
|
|
279
|
+
})], v.prototype, "checked", 2), e([d({
|
|
280
|
+
type: Boolean,
|
|
281
|
+
reflect: !0
|
|
282
|
+
})], v.prototype, "indeterminate", 2), e([s("checked")], v.prototype, "defaultChecked", 2), e([d({ reflect: !0 })], v.prototype, "form", 2), e([d({
|
|
283
|
+
type: Boolean,
|
|
284
|
+
reflect: !0
|
|
285
|
+
})], v.prototype, "required", 2), e([d({ attribute: "help-text" })], v.prototype, "helpText", 2), e([t("disabled", { waitUntilFirstUpdate: !0 })], v.prototype, "handleDisabledChange", 1), e([t(["checked", "indeterminate"], { waitUntilFirstUpdate: !0 })], v.prototype, "handleStateChange", 1), v.define("sl-checkbox");
|
|
286
|
+
//#endregion
|
|
287
|
+
export { v as t };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { n as e, r as t } from "./chunk.YHLNUJ7P-ByKy0MKm.js";
|
|
2
|
+
import { t as n } from "./chunk.6CTB5ZDJ-DjZrBd6Y.js";
|
|
3
|
+
import { css as r, html as i } from "lit";
|
|
4
|
+
//#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.7DUCI5S4.js
|
|
5
|
+
var a = r`
|
|
6
|
+
:host {
|
|
7
|
+
--track-width: 2px;
|
|
8
|
+
--track-color: rgb(128 128 128 / 25%);
|
|
9
|
+
--indicator-color: var(--sl-color-primary-600);
|
|
10
|
+
--speed: 2s;
|
|
11
|
+
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
width: 1em;
|
|
14
|
+
height: 1em;
|
|
15
|
+
flex: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.spinner {
|
|
19
|
+
flex: 1 1 auto;
|
|
20
|
+
height: 100%;
|
|
21
|
+
width: 100%;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.spinner__track,
|
|
25
|
+
.spinner__indicator {
|
|
26
|
+
fill: none;
|
|
27
|
+
stroke-width: var(--track-width);
|
|
28
|
+
r: calc(0.5em - var(--track-width) / 2);
|
|
29
|
+
cx: 0.5em;
|
|
30
|
+
cy: 0.5em;
|
|
31
|
+
transform-origin: 50% 50%;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.spinner__track {
|
|
35
|
+
stroke: var(--track-color);
|
|
36
|
+
transform-origin: 0% 0%;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.spinner__indicator {
|
|
40
|
+
stroke: var(--indicator-color);
|
|
41
|
+
stroke-linecap: round;
|
|
42
|
+
stroke-dasharray: 150% 75%;
|
|
43
|
+
animation: spin var(--speed) linear infinite;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@keyframes spin {
|
|
47
|
+
0% {
|
|
48
|
+
transform: rotate(0deg);
|
|
49
|
+
stroke-dasharray: 0.05em, 3em;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
50% {
|
|
53
|
+
transform: rotate(450deg);
|
|
54
|
+
stroke-dasharray: 1.375em, 1.375em;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
100% {
|
|
58
|
+
transform: rotate(1080deg);
|
|
59
|
+
stroke-dasharray: 0.05em, 3em;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
`, o = class extends e {
|
|
63
|
+
constructor() {
|
|
64
|
+
super(...arguments), this.localize = new n(this);
|
|
65
|
+
}
|
|
66
|
+
render() {
|
|
67
|
+
return i`
|
|
68
|
+
<svg part="base" class="spinner" role="progressbar" aria-label=${this.localize.term("loading")}>
|
|
69
|
+
<circle class="spinner__track"></circle>
|
|
70
|
+
<circle class="spinner__indicator"></circle>
|
|
71
|
+
</svg>
|
|
72
|
+
`;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
o.styles = [t, a];
|
|
76
|
+
//#endregion
|
|
77
|
+
export { o as t };
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { o as e, s as t } from "./chunk.YHLNUJ7P-ByKy0MKm.js";
|
|
2
|
+
//#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3RPBFEDE.js
|
|
3
|
+
var n = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap(), a = /* @__PURE__ */ new WeakSet(), o = /* @__PURE__ */ new WeakMap(), s = class {
|
|
4
|
+
constructor(e, r) {
|
|
5
|
+
this.handleFormData = (e) => {
|
|
6
|
+
let t = this.options.disabled(this.host), n = this.options.name(this.host), r = this.options.value(this.host), i = this.host.tagName.toLowerCase() === "sl-button";
|
|
7
|
+
this.host.isConnected && !t && !i && typeof n == "string" && n.length > 0 && r !== void 0 && (Array.isArray(r) ? r.forEach((t) => {
|
|
8
|
+
e.formData.append(n, t.toString());
|
|
9
|
+
}) : e.formData.append(n, r.toString()));
|
|
10
|
+
}, this.handleFormSubmit = (e) => {
|
|
11
|
+
var t;
|
|
12
|
+
let r = this.options.disabled(this.host), i = this.options.reportValidity;
|
|
13
|
+
this.form && !this.form.noValidate && ((t = n.get(this.form)) == null || t.forEach((e) => {
|
|
14
|
+
this.setUserInteracted(e, !0);
|
|
15
|
+
})), this.form && !this.form.noValidate && !r && !i(this.host) && (e.preventDefault(), e.stopImmediatePropagation());
|
|
16
|
+
}, this.handleFormReset = () => {
|
|
17
|
+
this.options.setValue(this.host, this.options.defaultValue(this.host)), this.setUserInteracted(this.host, !1), o.set(this.host, []);
|
|
18
|
+
}, this.handleInteraction = (e) => {
|
|
19
|
+
let t = o.get(this.host);
|
|
20
|
+
t.includes(e.type) || t.push(e.type), t.length === this.options.assumeInteractionOn.length && this.setUserInteracted(this.host, !0);
|
|
21
|
+
}, this.checkFormValidity = () => {
|
|
22
|
+
if (this.form && !this.form.noValidate) {
|
|
23
|
+
let e = this.form.querySelectorAll("*");
|
|
24
|
+
for (let t of e) if (typeof t.checkValidity == "function" && !t.checkValidity()) return !1;
|
|
25
|
+
}
|
|
26
|
+
return !0;
|
|
27
|
+
}, this.reportFormValidity = () => {
|
|
28
|
+
if (this.form && !this.form.noValidate) {
|
|
29
|
+
let e = this.form.querySelectorAll("*");
|
|
30
|
+
for (let t of e) if (typeof t.reportValidity == "function" && !t.reportValidity()) return !1;
|
|
31
|
+
}
|
|
32
|
+
return !0;
|
|
33
|
+
}, (this.host = e).addController(this), this.options = t({
|
|
34
|
+
form: (e) => {
|
|
35
|
+
let t = e.form;
|
|
36
|
+
if (t) {
|
|
37
|
+
let n = e.getRootNode().querySelector(`#${t}`);
|
|
38
|
+
if (n) return n;
|
|
39
|
+
}
|
|
40
|
+
return e.closest("form");
|
|
41
|
+
},
|
|
42
|
+
name: (e) => e.name,
|
|
43
|
+
value: (e) => e.value,
|
|
44
|
+
defaultValue: (e) => e.defaultValue,
|
|
45
|
+
disabled: (e) => e.disabled ?? !1,
|
|
46
|
+
reportValidity: (e) => typeof e.reportValidity == "function" ? e.reportValidity() : !0,
|
|
47
|
+
checkValidity: (e) => typeof e.checkValidity == "function" ? e.checkValidity() : !0,
|
|
48
|
+
setValue: (e, t) => e.value = t,
|
|
49
|
+
assumeInteractionOn: ["sl-input"]
|
|
50
|
+
}, r);
|
|
51
|
+
}
|
|
52
|
+
hostConnected() {
|
|
53
|
+
let e = this.options.form(this.host);
|
|
54
|
+
e && this.attachForm(e), o.set(this.host, []), this.options.assumeInteractionOn.forEach((e) => {
|
|
55
|
+
this.host.addEventListener(e, this.handleInteraction);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
hostDisconnected() {
|
|
59
|
+
this.detachForm(), o.delete(this.host), this.options.assumeInteractionOn.forEach((e) => {
|
|
60
|
+
this.host.removeEventListener(e, this.handleInteraction);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
hostUpdated() {
|
|
64
|
+
let e = this.options.form(this.host);
|
|
65
|
+
e || this.detachForm(), e && this.form !== e && (this.detachForm(), this.attachForm(e)), this.host.hasUpdated && this.setValidity(this.host.validity.valid);
|
|
66
|
+
}
|
|
67
|
+
attachForm(e) {
|
|
68
|
+
e ? (this.form = e, n.has(this.form) ? n.get(this.form).add(this.host) : n.set(this.form, /* @__PURE__ */ new Set([this.host])), this.form.addEventListener("formdata", this.handleFormData), this.form.addEventListener("submit", this.handleFormSubmit), this.form.addEventListener("reset", this.handleFormReset), r.has(this.form) || (r.set(this.form, this.form.reportValidity), this.form.reportValidity = () => this.reportFormValidity()), i.has(this.form) || (i.set(this.form, this.form.checkValidity), this.form.checkValidity = () => this.checkFormValidity())) : this.form = void 0;
|
|
69
|
+
}
|
|
70
|
+
detachForm() {
|
|
71
|
+
if (!this.form) return;
|
|
72
|
+
let e = n.get(this.form);
|
|
73
|
+
e && (e.delete(this.host), e.size <= 0 && (this.form.removeEventListener("formdata", this.handleFormData), this.form.removeEventListener("submit", this.handleFormSubmit), this.form.removeEventListener("reset", this.handleFormReset), r.has(this.form) && (this.form.reportValidity = r.get(this.form), r.delete(this.form)), i.has(this.form) && (this.form.checkValidity = i.get(this.form), i.delete(this.form)), this.form = void 0));
|
|
74
|
+
}
|
|
75
|
+
setUserInteracted(e, t) {
|
|
76
|
+
t ? a.add(e) : a.delete(e), e.requestUpdate();
|
|
77
|
+
}
|
|
78
|
+
doAction(e, t) {
|
|
79
|
+
if (this.form) {
|
|
80
|
+
let n = document.createElement("button");
|
|
81
|
+
n.type = e, n.style.position = "absolute", n.style.width = "0", n.style.height = "0", n.style.clipPath = "inset(50%)", n.style.overflow = "hidden", n.style.whiteSpace = "nowrap", t && (n.name = t.name, n.value = t.value, [
|
|
82
|
+
"formaction",
|
|
83
|
+
"formenctype",
|
|
84
|
+
"formmethod",
|
|
85
|
+
"formnovalidate",
|
|
86
|
+
"formtarget"
|
|
87
|
+
].forEach((e) => {
|
|
88
|
+
t.hasAttribute(e) && n.setAttribute(e, t.getAttribute(e));
|
|
89
|
+
})), this.form.append(n), n.click(), n.remove();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
getForm() {
|
|
93
|
+
return this.form ?? null;
|
|
94
|
+
}
|
|
95
|
+
reset(e) {
|
|
96
|
+
this.doAction("reset", e);
|
|
97
|
+
}
|
|
98
|
+
submit(e) {
|
|
99
|
+
this.doAction("submit", e);
|
|
100
|
+
}
|
|
101
|
+
setValidity(e) {
|
|
102
|
+
let t = this.host, n = !!a.has(t), r = !!t.required;
|
|
103
|
+
t.toggleAttribute("data-required", r), t.toggleAttribute("data-optional", !r), t.toggleAttribute("data-invalid", !e), t.toggleAttribute("data-valid", e), t.toggleAttribute("data-user-invalid", !e && n), t.toggleAttribute("data-user-valid", e && n);
|
|
104
|
+
}
|
|
105
|
+
updateValidity() {
|
|
106
|
+
let e = this.host;
|
|
107
|
+
this.setValidity(e.validity.valid);
|
|
108
|
+
}
|
|
109
|
+
emitInvalidEvent(e) {
|
|
110
|
+
let t = new CustomEvent("sl-invalid", {
|
|
111
|
+
bubbles: !1,
|
|
112
|
+
composed: !1,
|
|
113
|
+
cancelable: !0,
|
|
114
|
+
detail: {}
|
|
115
|
+
});
|
|
116
|
+
e || t.preventDefault(), this.host.dispatchEvent(t) || e?.preventDefault();
|
|
117
|
+
}
|
|
118
|
+
}, c = Object.freeze({
|
|
119
|
+
badInput: !1,
|
|
120
|
+
customError: !1,
|
|
121
|
+
patternMismatch: !1,
|
|
122
|
+
rangeOverflow: !1,
|
|
123
|
+
rangeUnderflow: !1,
|
|
124
|
+
stepMismatch: !1,
|
|
125
|
+
tooLong: !1,
|
|
126
|
+
tooShort: !1,
|
|
127
|
+
typeMismatch: !1,
|
|
128
|
+
valid: !0,
|
|
129
|
+
valueMissing: !1
|
|
130
|
+
}), l = Object.freeze(e(t({}, c), {
|
|
131
|
+
valid: !1,
|
|
132
|
+
valueMissing: !0
|
|
133
|
+
})), u = Object.freeze(e(t({}, c), {
|
|
134
|
+
valid: !1,
|
|
135
|
+
customError: !0
|
|
136
|
+
}));
|
|
137
|
+
//#endregion
|
|
138
|
+
export { l as i, u as n, c as r, s as t };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.3Y6SB6QS.js
|
|
2
|
+
var e = "";
|
|
3
|
+
function t(t) {
|
|
4
|
+
e = t;
|
|
5
|
+
}
|
|
6
|
+
function n(n = "") {
|
|
7
|
+
if (!e) {
|
|
8
|
+
let e = [...document.getElementsByTagName("script")], n = e.find((e) => e.hasAttribute("data-shoelace"));
|
|
9
|
+
if (n) t(n.getAttribute("data-shoelace"));
|
|
10
|
+
else {
|
|
11
|
+
let n = e.find((e) => /shoelace(\.min)?\.js($|\?)/.test(e.src) || /shoelace-autoloader(\.min)?\.js($|\?)/.test(e.src)), r = "";
|
|
12
|
+
n && (r = n.getAttribute("src")), t(r.split("/").slice(0, -1).join("/"));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return e.replace(/\/$/, "") + (n ? `/${n.replace(/^\//, "")}` : "");
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { t as n, n as t };
|