@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.
Files changed (45) hide show
  1. package/dist-lib/alert-C_G5X6J8.js +311 -0
  2. package/dist-lib/button-BlZd3WPH.js +744 -0
  3. package/dist-lib/checkbox-DB4oPyyw.js +287 -0
  4. package/dist-lib/chunk.36O46B5H-km1dakSW.js +77 -0
  5. package/dist-lib/chunk.3RPBFEDE-Cxq6VVR6.js +138 -0
  6. package/dist-lib/chunk.3Y6SB6QS-DUJ8Ickw.js +18 -0
  7. package/dist-lib/chunk.5JY5FUCG-CYkzbQXS.js +1071 -0
  8. package/dist-lib/chunk.6CTB5ZDJ-DjZrBd6Y.js +99 -0
  9. package/dist-lib/chunk.AJ3ENQ5C-DXVGX5Dn.js +177 -0
  10. package/dist-lib/chunk.LD4M4QGE-CiCfhE8r.js +8 -0
  11. package/dist-lib/chunk.NYIIDP5N-B4UCI-rQ.js +34 -0
  12. package/dist-lib/chunk.RWUUFNUL-DFztA4uV.js +43 -0
  13. package/dist-lib/chunk.SI4ACBFK-CLb9VfMG.js +61 -0
  14. package/dist-lib/chunk.YHLNUJ7P-ByKy0MKm.js +251 -0
  15. package/dist-lib/{decorate-DnZTfaod.js → decorate-CKr8yG1g.js} +1 -1
  16. package/dist-lib/divider-BOFbR_Ny.js +41 -0
  17. package/dist-lib/icon-CBNpO1lq.js +9 -0
  18. package/dist-lib/icon-button-B5rXu3Gg.js +410 -0
  19. package/dist-lib/input-B212BH6L.js +575 -0
  20. package/dist-lib/option-BQN9Zz_8.js +1108 -0
  21. package/dist-lib/spinner-DdcBaa3z.js +6 -0
  22. package/dist-lib/{toast-BsoXOdeA.js → toast-Bq2PmEpm.js} +1 -1
  23. package/dist-lib/tooltip-CBGOiZwJ.js +197 -0
  24. package/dist-lib/{webmapx-3d-tool-CLppA7mK.js → webmapx-3d-tool-CKoLGMpk.js} +2 -2
  25. package/dist-lib/{webmapx-base-tool-DfRa7TlD.js → webmapx-base-tool-Bc9Wz0yA.js} +1 -1
  26. package/dist-lib/{webmapx-config-edit-tool-BztWspia.js → webmapx-config-edit-tool-7265_DNz.js} +7 -7
  27. package/dist-lib/{webmapx-coordinates-tool-DnTSkrRG.js → webmapx-coordinates-tool-nwlckVn6.js} +3 -3
  28. package/dist-lib/{webmapx-core-bundle-CH-5vYXU.js → webmapx-core-bundle-Q6mWOib1.js} +1579 -671
  29. package/dist-lib/webmapx-draw-tool-6QRr5Gip.js +4315 -0
  30. package/dist-lib/{webmapx-geolocation-tool-DIMh2kIr.js → webmapx-geolocation-tool-qxN5aaVB.js} +6 -7
  31. package/dist-lib/{webmapx-import-layer-tool-DMiC1TpU.js → webmapx-import-layer-tool-tJ374qHR.js} +2 -2
  32. package/dist-lib/{webmapx-info-tool-D-XbAU9J.js → webmapx-info-tool-C3txgv3v.js} +4 -4
  33. package/dist-lib/{webmapx-language-osmvector-BAw9TR-M.js → webmapx-language-osmvector-jQzTOPU1.js} +3 -4
  34. package/dist-lib/{webmapx-measure-tool-CXlg11s8.js → webmapx-measure-tool-Cxxrzgdf.js} +4 -4
  35. package/dist-lib/{webmapx-modal-tool-Cs7LRrgW.js → webmapx-modal-tool-DQVHNXqX.js} +2 -2
  36. package/dist-lib/{webmapx-plugin-tool-qe2yTrWB.js → webmapx-plugin-tool-BNZ61x6s.js} +1 -1
  37. package/dist-lib/{webmapx-print-tool-DrK9sLC7.js → webmapx-print-tool-BDOTbS6u.js} +7 -8
  38. package/dist-lib/{webmapx-search-tool-H7NisgWH.js → webmapx-search-tool-CHlsE2Wx.js} +2 -2
  39. package/dist-lib/webmapx-settings-B0AT9Vjn.js +482 -0
  40. package/dist-lib/{webmapx-truearea-tool-CSU9mE1D.js → webmapx-truearea-tool-dxSgcbOj.js} +2 -2
  41. package/dist-lib/{webmapx-view-mode-tool-D1QyQfq8.js → webmapx-view-mode-tool-DVSMakdh.js} +2 -2
  42. package/dist-lib/webmapx.js +312 -311
  43. package/package.json +1 -1
  44. package/dist-lib/webmapx-draw-tool-DxQgUF1Q.js +0 -2117
  45. package/dist-lib/webmapx-settings-EHSm-AGU.js +0 -167
@@ -0,0 +1,410 @@
1
+ import { a as e, c as t, i as n, n as r, r as i } from "./chunk.YHLNUJ7P-ByKy0MKm.js";
2
+ import { t as a } from "./chunk.LD4M4QGE-CiCfhE8r.js";
3
+ import { a as o, c as s, i as c, o as l, s as u, t as d } from "./chunk.AJ3ENQ5C-DXVGX5Dn.js";
4
+ import { t as f } from "./chunk.NYIIDP5N-B4UCI-rQ.js";
5
+ import { t as p } from "./chunk.6CTB5ZDJ-DjZrBd6Y.js";
6
+ import { r as m, t as h } from "./chunk.RWUUFNUL-DFztA4uV.js";
7
+ import { css as g, html as _ } from "lit";
8
+ import { property as v, query as y } from "lit/decorators.js";
9
+ import { classMap as b } from "lit/directives/class-map.js";
10
+ import { ifDefined as x } from "lit/directives/if-defined.js";
11
+ //#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.VESXC477.js
12
+ function* S(e = document.activeElement) {
13
+ e != null && (yield e, "shadowRoot" in e && e.shadowRoot && e.shadowRoot.mode !== "closed" && (yield* t(S(e.shadowRoot.activeElement))));
14
+ }
15
+ function C() {
16
+ return [...S()].pop();
17
+ }
18
+ var w = /* @__PURE__ */ new WeakMap();
19
+ function T(e) {
20
+ let t = w.get(e);
21
+ return t || (t = window.getComputedStyle(e, null), w.set(e, t)), t;
22
+ }
23
+ function E(e) {
24
+ if (typeof e.checkVisibility == "function") return e.checkVisibility({
25
+ checkOpacity: !1,
26
+ checkVisibilityCSS: !0
27
+ });
28
+ let t = T(e);
29
+ return t.visibility !== "hidden" && t.display !== "none";
30
+ }
31
+ function D(e) {
32
+ let { overflowY: t, overflowX: n } = T(e);
33
+ return t === "scroll" || n === "scroll" ? !0 : t !== "auto" || n !== "auto" ? !1 : e.scrollHeight > e.clientHeight && t === "auto" || e.scrollWidth > e.clientWidth && n === "auto";
34
+ }
35
+ function O(e) {
36
+ let t = e.tagName.toLowerCase(), n = Number(e.getAttribute("tabindex"));
37
+ if (e.hasAttribute("tabindex") && (isNaN(n) || n <= -1) || e.hasAttribute("disabled") || e.closest("[inert]")) return !1;
38
+ if (t === "input" && e.getAttribute("type") === "radio") {
39
+ let t = e.getRootNode(), n = `input[type='radio'][name="${e.getAttribute("name")}"]`, r = t.querySelector(`${n}:checked`);
40
+ return r ? r === e : t.querySelector(n) === e;
41
+ }
42
+ return E(e) ? (t === "audio" || t === "video") && e.hasAttribute("controls") || e.hasAttribute("tabindex") || e.hasAttribute("contenteditable") && e.getAttribute("contenteditable") !== "false" || [
43
+ "button",
44
+ "input",
45
+ "select",
46
+ "textarea",
47
+ "a",
48
+ "audio",
49
+ "video",
50
+ "summary",
51
+ "iframe"
52
+ ].includes(t) ? !0 : D(e) : !1;
53
+ }
54
+ function k(e) {
55
+ let t = j(e);
56
+ return {
57
+ start: t[0] ?? null,
58
+ end: t[t.length - 1] ?? null
59
+ };
60
+ }
61
+ function A(e, t) {
62
+ return e.getRootNode({ composed: !0 })?.host !== t;
63
+ }
64
+ function j(e) {
65
+ let t = /* @__PURE__ */ new WeakMap(), n = [];
66
+ function r(i) {
67
+ if (i instanceof Element) {
68
+ if (i.hasAttribute("inert") || i.closest("[inert]") || t.has(i)) return;
69
+ t.set(i, !0), !n.includes(i) && O(i) && n.push(i), i instanceof HTMLSlotElement && A(i, e) && i.assignedElements({ flatten: !0 }).forEach((e) => {
70
+ r(e);
71
+ }), i.shadowRoot !== null && i.shadowRoot.mode === "open" && r(i.shadowRoot);
72
+ }
73
+ for (let e of i.children) r(e);
74
+ }
75
+ return r(e), n.sort((e, t) => {
76
+ let n = Number(e.getAttribute("tabindex")) || 0;
77
+ return (Number(t.getAttribute("tabindex")) || 0) - n;
78
+ });
79
+ }
80
+ //#endregion
81
+ //#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.EMN3H5QW.js
82
+ var M = [], N = class {
83
+ constructor(e) {
84
+ this.tabDirection = "forward", this.handleFocusIn = () => {
85
+ this.isActive() && this.checkFocus();
86
+ }, this.handleKeyDown = (e) => {
87
+ var t;
88
+ if (e.key !== "Tab" || this.isExternalActivated || !this.isActive()) return;
89
+ let n = C();
90
+ if (this.previousFocus = n, this.previousFocus && this.possiblyHasTabbableChildren(this.previousFocus)) return;
91
+ e.shiftKey ? this.tabDirection = "backward" : this.tabDirection = "forward";
92
+ let r = j(this.element), i = r.findIndex((e) => e === n);
93
+ this.previousFocus = this.currentFocus;
94
+ let a = this.tabDirection === "forward" ? 1 : -1;
95
+ for (;;) {
96
+ i + a >= r.length ? i = 0 : i + a < 0 ? i = r.length - 1 : i += a, this.previousFocus = this.currentFocus;
97
+ let n = r[i];
98
+ if (this.tabDirection === "backward" && this.previousFocus && this.possiblyHasTabbableChildren(this.previousFocus) || n && this.possiblyHasTabbableChildren(n)) return;
99
+ e.preventDefault(), this.currentFocus = n, (t = this.currentFocus) == null || t.focus({ preventScroll: !1 });
100
+ let o = [...S()];
101
+ if (o.includes(this.currentFocus) || !o.includes(this.previousFocus)) break;
102
+ }
103
+ setTimeout(() => this.checkFocus());
104
+ }, this.handleKeyUp = () => {
105
+ this.tabDirection = "forward";
106
+ }, this.element = e, this.elementsWithTabbableControls = ["iframe"];
107
+ }
108
+ activate() {
109
+ M.push(this.element), document.addEventListener("focusin", this.handleFocusIn), document.addEventListener("keydown", this.handleKeyDown), document.addEventListener("keyup", this.handleKeyUp);
110
+ }
111
+ deactivate() {
112
+ M = M.filter((e) => e !== this.element), this.currentFocus = null, document.removeEventListener("focusin", this.handleFocusIn), document.removeEventListener("keydown", this.handleKeyDown), document.removeEventListener("keyup", this.handleKeyUp);
113
+ }
114
+ isActive() {
115
+ return M[M.length - 1] === this.element;
116
+ }
117
+ activateExternal() {
118
+ this.isExternalActivated = !0;
119
+ }
120
+ deactivateExternal() {
121
+ this.isExternalActivated = !1;
122
+ }
123
+ checkFocus() {
124
+ if (this.isActive() && !this.isExternalActivated) {
125
+ let e = j(this.element);
126
+ if (!this.element.matches(":focus-within")) {
127
+ let t = e[0], n = e[e.length - 1], r = this.tabDirection === "forward" ? t : n;
128
+ typeof r?.focus == "function" && (this.currentFocus = r, r.focus({ preventScroll: !1 }));
129
+ }
130
+ }
131
+ }
132
+ possiblyHasTabbableChildren(e) {
133
+ return this.elementsWithTabbableControls.includes(e.tagName.toLowerCase()) || e.hasAttribute("controls");
134
+ }
135
+ }, P = g`
136
+ :host {
137
+ --width: 31rem;
138
+ --header-spacing: var(--sl-spacing-large);
139
+ --body-spacing: var(--sl-spacing-large);
140
+ --footer-spacing: var(--sl-spacing-large);
141
+
142
+ display: contents;
143
+ }
144
+
145
+ .dialog {
146
+ display: flex;
147
+ align-items: center;
148
+ justify-content: center;
149
+ position: fixed;
150
+ top: 0;
151
+ right: 0;
152
+ bottom: 0;
153
+ left: 0;
154
+ z-index: var(--sl-z-index-dialog);
155
+ }
156
+
157
+ .dialog__panel {
158
+ display: flex;
159
+ flex-direction: column;
160
+ z-index: 2;
161
+ width: var(--width);
162
+ max-width: calc(100% - var(--sl-spacing-2x-large));
163
+ max-height: calc(100% - var(--sl-spacing-2x-large));
164
+ background-color: var(--sl-panel-background-color);
165
+ border-radius: var(--sl-border-radius-medium);
166
+ box-shadow: var(--sl-shadow-x-large);
167
+ }
168
+
169
+ .dialog__panel:focus {
170
+ outline: none;
171
+ }
172
+
173
+ /* Ensure there's enough vertical padding for phones that don't update vh when chrome appears (e.g. iPhone) */
174
+ @media screen and (max-width: 420px) {
175
+ .dialog__panel {
176
+ max-height: 80vh;
177
+ }
178
+ }
179
+
180
+ .dialog--open .dialog__panel {
181
+ display: flex;
182
+ opacity: 1;
183
+ }
184
+
185
+ .dialog__header {
186
+ flex: 0 0 auto;
187
+ display: flex;
188
+ }
189
+
190
+ .dialog__title {
191
+ flex: 1 1 auto;
192
+ font: inherit;
193
+ font-size: var(--sl-font-size-large);
194
+ line-height: var(--sl-line-height-dense);
195
+ padding: var(--header-spacing);
196
+ margin: 0;
197
+ }
198
+
199
+ .dialog__header-actions {
200
+ flex-shrink: 0;
201
+ display: flex;
202
+ flex-wrap: wrap;
203
+ justify-content: end;
204
+ gap: var(--sl-spacing-2x-small);
205
+ padding: 0 var(--header-spacing);
206
+ }
207
+
208
+ .dialog__header-actions sl-icon-button,
209
+ .dialog__header-actions ::slotted(sl-icon-button) {
210
+ flex: 0 0 auto;
211
+ display: flex;
212
+ align-items: center;
213
+ font-size: var(--sl-font-size-medium);
214
+ }
215
+
216
+ .dialog__body {
217
+ flex: 1 1 auto;
218
+ display: block;
219
+ padding: var(--body-spacing);
220
+ overflow: auto;
221
+ -webkit-overflow-scrolling: touch;
222
+ }
223
+
224
+ .dialog__footer {
225
+ flex: 0 0 auto;
226
+ text-align: right;
227
+ padding: var(--footer-spacing);
228
+ }
229
+
230
+ .dialog__footer ::slotted(sl-button:not(:first-of-type)) {
231
+ margin-inline-start: var(--sl-spacing-x-small);
232
+ }
233
+
234
+ .dialog:not(.dialog--has-footer) .dialog__footer {
235
+ display: none;
236
+ }
237
+
238
+ .dialog__overlay {
239
+ position: fixed;
240
+ top: 0;
241
+ right: 0;
242
+ bottom: 0;
243
+ left: 0;
244
+ background-color: var(--sl-overlay-background-color);
245
+ }
246
+
247
+ @media (forced-colors: active) {
248
+ .dialog__panel {
249
+ border: solid 1px var(--sl-color-neutral-0);
250
+ }
251
+ }
252
+ `, F = class extends r {
253
+ constructor() {
254
+ super(...arguments), this.hasSlotController = new f(this, "footer"), this.localize = new p(this), this.modal = new N(this), this.open = !1, this.label = "", this.noHeader = !1, this.handleDocumentKeyDown = (e) => {
255
+ e.key === "Escape" && this.modal.isActive() && this.open && (e.stopPropagation(), this.requestClose("keyboard"));
256
+ };
257
+ }
258
+ firstUpdated() {
259
+ this.dialog.hidden = !this.open, this.open && (this.addOpenListeners(), this.modal.activate(), h(this));
260
+ }
261
+ disconnectedCallback() {
262
+ super.disconnectedCallback(), this.modal.deactivate(), m(this), this.removeOpenListeners();
263
+ }
264
+ requestClose(e) {
265
+ if (this.emit("sl-request-close", {
266
+ cancelable: !0,
267
+ detail: { source: e }
268
+ }).defaultPrevented) {
269
+ let e = l(this, "dialog.denyClose", { dir: this.localize.dir() });
270
+ d(this.panel, e.keyframes, e.options);
271
+ return;
272
+ }
273
+ this.hide();
274
+ }
275
+ addOpenListeners() {
276
+ var e;
277
+ "CloseWatcher" in window ? ((e = this.closeWatcher) == null || e.destroy(), this.closeWatcher = new CloseWatcher(), this.closeWatcher.onclose = () => this.requestClose("keyboard")) : document.addEventListener("keydown", this.handleDocumentKeyDown);
278
+ }
279
+ removeOpenListeners() {
280
+ var e;
281
+ (e = this.closeWatcher) == null || e.destroy(), document.removeEventListener("keydown", this.handleDocumentKeyDown);
282
+ }
283
+ async handleOpenChange() {
284
+ if (this.open) {
285
+ this.emit("sl-show"), this.addOpenListeners(), this.originalTrigger = document.activeElement, this.modal.activate(), h(this);
286
+ let e = this.querySelector("[autofocus]");
287
+ e && e.removeAttribute("autofocus"), await Promise.all([c(this.dialog), c(this.overlay)]), this.dialog.hidden = !1, requestAnimationFrame(() => {
288
+ this.emit("sl-initial-focus", { cancelable: !0 }).defaultPrevented || (e ? e.focus({ preventScroll: !0 }) : this.panel.focus({ preventScroll: !0 })), e && e.setAttribute("autofocus", "");
289
+ });
290
+ let t = l(this, "dialog.show", { dir: this.localize.dir() }), n = l(this, "dialog.overlay.show", { dir: this.localize.dir() });
291
+ await Promise.all([d(this.panel, t.keyframes, t.options), d(this.overlay, n.keyframes, n.options)]), this.emit("sl-after-show");
292
+ } else {
293
+ a(this), this.emit("sl-hide"), this.removeOpenListeners(), this.modal.deactivate(), await Promise.all([c(this.dialog), c(this.overlay)]);
294
+ let e = l(this, "dialog.hide", { dir: this.localize.dir() }), t = l(this, "dialog.overlay.hide", { dir: this.localize.dir() });
295
+ await Promise.all([d(this.overlay, t.keyframes, t.options).then(() => {
296
+ this.overlay.hidden = !0;
297
+ }), d(this.panel, e.keyframes, e.options).then(() => {
298
+ this.panel.hidden = !0;
299
+ })]), this.dialog.hidden = !0, this.overlay.hidden = !1, this.panel.hidden = !1, m(this);
300
+ let n = this.originalTrigger;
301
+ typeof n?.focus == "function" && setTimeout(() => n.focus()), this.emit("sl-after-hide");
302
+ }
303
+ }
304
+ async show() {
305
+ if (!this.open) return this.open = !0, o(this, "sl-after-show");
306
+ }
307
+ async hide() {
308
+ if (this.open) return this.open = !1, o(this, "sl-after-hide");
309
+ }
310
+ render() {
311
+ return _`
312
+ <div
313
+ part="base"
314
+ class=${b({
315
+ dialog: !0,
316
+ "dialog--open": this.open,
317
+ "dialog--has-footer": this.hasSlotController.test("footer")
318
+ })}
319
+ >
320
+ <div part="overlay" class="dialog__overlay" @click=${() => this.requestClose("overlay")} tabindex="-1"></div>
321
+
322
+ <div
323
+ part="panel"
324
+ class="dialog__panel"
325
+ role="dialog"
326
+ aria-modal="true"
327
+ aria-hidden=${this.open ? "false" : "true"}
328
+ aria-label=${x(this.noHeader ? this.label : void 0)}
329
+ aria-labelledby=${x(this.noHeader ? void 0 : "title")}
330
+ tabindex="-1"
331
+ >
332
+ ${this.noHeader ? "" : _`
333
+ <header part="header" class="dialog__header">
334
+ <h2 part="title" class="dialog__title" id="title">
335
+ <slot name="label"> ${this.label.length > 0 ? this.label : ""} </slot>
336
+ </h2>
337
+ <div part="header-actions" class="dialog__header-actions">
338
+ <slot name="header-actions"></slot>
339
+ <sl-icon-button
340
+ part="close-button"
341
+ exportparts="base:close-button__base"
342
+ class="dialog__close"
343
+ name="x-lg"
344
+ label=${this.localize.term("close")}
345
+ library="system"
346
+ @click="${() => this.requestClose("close-button")}"
347
+ ></sl-icon-button>
348
+ </div>
349
+ </header>
350
+ `}
351
+ ${""}
352
+ <div part="body" class="dialog__body" tabindex="-1"><slot></slot></div>
353
+
354
+ <footer part="footer" class="dialog__footer">
355
+ <slot name="footer"></slot>
356
+ </footer>
357
+ </div>
358
+ </div>
359
+ `;
360
+ }
361
+ };
362
+ //#endregion
363
+ //#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.EZCUSG7Q.js
364
+ F.styles = [i, P], F.dependencies = { "sl-icon-button": s }, e([y(".dialog")], F.prototype, "dialog", 2), e([y(".dialog__panel")], F.prototype, "panel", 2), e([y(".dialog__overlay")], F.prototype, "overlay", 2), e([v({
365
+ type: Boolean,
366
+ reflect: !0
367
+ })], F.prototype, "open", 2), e([v({ reflect: !0 })], F.prototype, "label", 2), e([v({
368
+ attribute: "no-header",
369
+ type: Boolean,
370
+ reflect: !0
371
+ })], F.prototype, "noHeader", 2), e([n("open", { waitUntilFirstUpdate: !0 })], F.prototype, "handleOpenChange", 1), u("dialog.show", {
372
+ keyframes: [{
373
+ opacity: 0,
374
+ scale: .8
375
+ }, {
376
+ opacity: 1,
377
+ scale: 1
378
+ }],
379
+ options: {
380
+ duration: 250,
381
+ easing: "ease"
382
+ }
383
+ }), u("dialog.hide", {
384
+ keyframes: [{
385
+ opacity: 1,
386
+ scale: 1
387
+ }, {
388
+ opacity: 0,
389
+ scale: .8
390
+ }],
391
+ options: {
392
+ duration: 250,
393
+ easing: "ease"
394
+ }
395
+ }), u("dialog.denyClose", {
396
+ keyframes: [
397
+ { scale: 1 },
398
+ { scale: 1.02 },
399
+ { scale: 1 }
400
+ ],
401
+ options: { duration: 250 }
402
+ }), u("dialog.overlay.show", {
403
+ keyframes: [{ opacity: 0 }, { opacity: 1 }],
404
+ options: { duration: 250 }
405
+ }), u("dialog.overlay.hide", {
406
+ keyframes: [{ opacity: 1 }, { opacity: 0 }],
407
+ options: { duration: 250 }
408
+ }), F.define("sl-dialog"), s.define("sl-icon-button");
409
+ //#endregion
410
+ export { k as n, C as t };