@edugis-org/webmapx 0.1.9 → 0.1.11
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-C964bdEG.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,311 @@
|
|
|
1
|
+
import { a as e, i as t, n, r } from "./chunk.YHLNUJ7P-ByKy0MKm.js";
|
|
2
|
+
import { t as i } from "./chunk.LD4M4QGE-CiCfhE8r.js";
|
|
3
|
+
import { a, c as o, i as s, o as c, s as l, t as u } from "./chunk.AJ3ENQ5C-DXVGX5Dn.js";
|
|
4
|
+
import { t as d } from "./chunk.NYIIDP5N-B4UCI-rQ.js";
|
|
5
|
+
import { t as f } from "./chunk.6CTB5ZDJ-DjZrBd6Y.js";
|
|
6
|
+
import { css as p, html as m } from "lit";
|
|
7
|
+
import { property as h, query as g, state as _ } from "lit/decorators.js";
|
|
8
|
+
import { classMap as v } from "lit/directives/class-map.js";
|
|
9
|
+
//#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.HPCLRZ2S.js
|
|
10
|
+
var y = p`
|
|
11
|
+
:host {
|
|
12
|
+
display: contents;
|
|
13
|
+
|
|
14
|
+
/* For better DX, we'll reset the margin here so the base part can inherit it */
|
|
15
|
+
margin: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.alert {
|
|
19
|
+
position: relative;
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: stretch;
|
|
22
|
+
background-color: var(--sl-panel-background-color);
|
|
23
|
+
border: solid var(--sl-panel-border-width) var(--sl-panel-border-color);
|
|
24
|
+
border-top-width: calc(var(--sl-panel-border-width) * 3);
|
|
25
|
+
border-radius: var(--sl-border-radius-medium);
|
|
26
|
+
font-family: var(--sl-font-sans);
|
|
27
|
+
font-size: var(--sl-font-size-small);
|
|
28
|
+
font-weight: var(--sl-font-weight-normal);
|
|
29
|
+
line-height: 1.6;
|
|
30
|
+
color: var(--sl-color-neutral-700);
|
|
31
|
+
margin: inherit;
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.alert:not(.alert--has-icon) .alert__icon,
|
|
36
|
+
.alert:not(.alert--closable) .alert__close-button {
|
|
37
|
+
display: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.alert__icon {
|
|
41
|
+
flex: 0 0 auto;
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
font-size: var(--sl-font-size-large);
|
|
45
|
+
padding-inline-start: var(--sl-spacing-large);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.alert--has-countdown {
|
|
49
|
+
border-bottom: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.alert--primary {
|
|
53
|
+
border-top-color: var(--sl-color-primary-600);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.alert--primary .alert__icon {
|
|
57
|
+
color: var(--sl-color-primary-600);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.alert--success {
|
|
61
|
+
border-top-color: var(--sl-color-success-600);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.alert--success .alert__icon {
|
|
65
|
+
color: var(--sl-color-success-600);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.alert--neutral {
|
|
69
|
+
border-top-color: var(--sl-color-neutral-600);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.alert--neutral .alert__icon {
|
|
73
|
+
color: var(--sl-color-neutral-600);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.alert--warning {
|
|
77
|
+
border-top-color: var(--sl-color-warning-600);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.alert--warning .alert__icon {
|
|
81
|
+
color: var(--sl-color-warning-600);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.alert--danger {
|
|
85
|
+
border-top-color: var(--sl-color-danger-600);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.alert--danger .alert__icon {
|
|
89
|
+
color: var(--sl-color-danger-600);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.alert__message {
|
|
93
|
+
flex: 1 1 auto;
|
|
94
|
+
display: block;
|
|
95
|
+
padding: var(--sl-spacing-large);
|
|
96
|
+
overflow: hidden;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.alert__close-button {
|
|
100
|
+
flex: 0 0 auto;
|
|
101
|
+
display: flex;
|
|
102
|
+
align-items: center;
|
|
103
|
+
font-size: var(--sl-font-size-medium);
|
|
104
|
+
margin-inline-end: var(--sl-spacing-medium);
|
|
105
|
+
align-self: center;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.alert__countdown {
|
|
109
|
+
position: absolute;
|
|
110
|
+
bottom: 0;
|
|
111
|
+
left: 0;
|
|
112
|
+
width: 100%;
|
|
113
|
+
height: calc(var(--sl-panel-border-width) * 3);
|
|
114
|
+
background-color: var(--sl-panel-border-color);
|
|
115
|
+
display: flex;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.alert__countdown--ltr {
|
|
119
|
+
justify-content: flex-end;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.alert__countdown .alert__countdown-elapsed {
|
|
123
|
+
height: 100%;
|
|
124
|
+
width: 0;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.alert--primary .alert__countdown-elapsed {
|
|
128
|
+
background-color: var(--sl-color-primary-600);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.alert--success .alert__countdown-elapsed {
|
|
132
|
+
background-color: var(--sl-color-success-600);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.alert--neutral .alert__countdown-elapsed {
|
|
136
|
+
background-color: var(--sl-color-neutral-600);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.alert--warning .alert__countdown-elapsed {
|
|
140
|
+
background-color: var(--sl-color-warning-600);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.alert--danger .alert__countdown-elapsed {
|
|
144
|
+
background-color: var(--sl-color-danger-600);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.alert__timer {
|
|
148
|
+
display: none;
|
|
149
|
+
}
|
|
150
|
+
`, b = class e extends n {
|
|
151
|
+
constructor() {
|
|
152
|
+
super(...arguments), this.hasSlotController = new d(this, "icon", "suffix"), this.localize = new f(this), this.open = !1, this.closable = !1, this.variant = "primary", this.duration = Infinity, this.remainingTime = this.duration;
|
|
153
|
+
}
|
|
154
|
+
static get toastStack() {
|
|
155
|
+
return this.currentToastStack ||= Object.assign(document.createElement("div"), { className: "sl-toast-stack" }), this.currentToastStack;
|
|
156
|
+
}
|
|
157
|
+
firstUpdated() {
|
|
158
|
+
this.base.hidden = !this.open;
|
|
159
|
+
}
|
|
160
|
+
restartAutoHide() {
|
|
161
|
+
this.handleCountdownChange(), clearTimeout(this.autoHideTimeout), clearInterval(this.remainingTimeInterval), this.open && this.duration < Infinity && (this.autoHideTimeout = window.setTimeout(() => this.hide(), this.duration), this.remainingTime = this.duration, this.remainingTimeInterval = window.setInterval(() => {
|
|
162
|
+
this.remainingTime -= 100;
|
|
163
|
+
}, 100));
|
|
164
|
+
}
|
|
165
|
+
pauseAutoHide() {
|
|
166
|
+
var e;
|
|
167
|
+
(e = this.countdownAnimation) == null || e.pause(), clearTimeout(this.autoHideTimeout), clearInterval(this.remainingTimeInterval);
|
|
168
|
+
}
|
|
169
|
+
resumeAutoHide() {
|
|
170
|
+
var e;
|
|
171
|
+
this.duration < Infinity && (this.autoHideTimeout = window.setTimeout(() => this.hide(), this.remainingTime), this.remainingTimeInterval = window.setInterval(() => {
|
|
172
|
+
this.remainingTime -= 100;
|
|
173
|
+
}, 100), (e = this.countdownAnimation) == null || e.play());
|
|
174
|
+
}
|
|
175
|
+
handleCountdownChange() {
|
|
176
|
+
if (this.open && this.duration < Infinity && this.countdown) {
|
|
177
|
+
let { countdownElement: e } = this;
|
|
178
|
+
this.countdownAnimation = e.animate([{ width: "100%" }, { width: "0" }], {
|
|
179
|
+
duration: this.duration,
|
|
180
|
+
easing: "linear"
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
handleCloseClick() {
|
|
185
|
+
this.hide();
|
|
186
|
+
}
|
|
187
|
+
async handleOpenChange() {
|
|
188
|
+
if (this.open) {
|
|
189
|
+
this.emit("sl-show"), this.duration < Infinity && this.restartAutoHide(), await s(this.base), this.base.hidden = !1;
|
|
190
|
+
let { keyframes: e, options: t } = c(this, "alert.show", { dir: this.localize.dir() });
|
|
191
|
+
await u(this.base, e, t), this.emit("sl-after-show");
|
|
192
|
+
} else {
|
|
193
|
+
i(this), this.emit("sl-hide"), clearTimeout(this.autoHideTimeout), clearInterval(this.remainingTimeInterval), await s(this.base);
|
|
194
|
+
let { keyframes: e, options: t } = c(this, "alert.hide", { dir: this.localize.dir() });
|
|
195
|
+
await u(this.base, e, t), this.base.hidden = !0, this.emit("sl-after-hide");
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
handleDurationChange() {
|
|
199
|
+
this.restartAutoHide();
|
|
200
|
+
}
|
|
201
|
+
async show() {
|
|
202
|
+
if (!this.open) return this.open = !0, a(this, "sl-after-show");
|
|
203
|
+
}
|
|
204
|
+
async hide() {
|
|
205
|
+
if (this.open) return this.open = !1, a(this, "sl-after-hide");
|
|
206
|
+
}
|
|
207
|
+
async toast() {
|
|
208
|
+
return new Promise((t) => {
|
|
209
|
+
this.handleCountdownChange(), e.toastStack.parentElement === null && document.body.append(e.toastStack), e.toastStack.appendChild(this), requestAnimationFrame(() => {
|
|
210
|
+
this.clientWidth, this.show();
|
|
211
|
+
}), this.addEventListener("sl-after-hide", () => {
|
|
212
|
+
e.toastStack.removeChild(this), t(), e.toastStack.querySelector("sl-alert") === null && e.toastStack.remove();
|
|
213
|
+
}, { once: !0 });
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
render() {
|
|
217
|
+
return m`
|
|
218
|
+
<div
|
|
219
|
+
part="base"
|
|
220
|
+
class=${v({
|
|
221
|
+
alert: !0,
|
|
222
|
+
"alert--open": this.open,
|
|
223
|
+
"alert--closable": this.closable,
|
|
224
|
+
"alert--has-countdown": !!this.countdown,
|
|
225
|
+
"alert--has-icon": this.hasSlotController.test("icon"),
|
|
226
|
+
"alert--primary": this.variant === "primary",
|
|
227
|
+
"alert--success": this.variant === "success",
|
|
228
|
+
"alert--neutral": this.variant === "neutral",
|
|
229
|
+
"alert--warning": this.variant === "warning",
|
|
230
|
+
"alert--danger": this.variant === "danger"
|
|
231
|
+
})}
|
|
232
|
+
role="alert"
|
|
233
|
+
aria-hidden=${this.open ? "false" : "true"}
|
|
234
|
+
@mouseenter=${this.pauseAutoHide}
|
|
235
|
+
@mouseleave=${this.resumeAutoHide}
|
|
236
|
+
>
|
|
237
|
+
<div part="icon" class="alert__icon">
|
|
238
|
+
<slot name="icon"></slot>
|
|
239
|
+
</div>
|
|
240
|
+
|
|
241
|
+
<div part="message" class="alert__message" aria-live="polite">
|
|
242
|
+
<slot></slot>
|
|
243
|
+
</div>
|
|
244
|
+
|
|
245
|
+
${this.closable ? m`
|
|
246
|
+
<sl-icon-button
|
|
247
|
+
part="close-button"
|
|
248
|
+
exportparts="base:close-button__base"
|
|
249
|
+
class="alert__close-button"
|
|
250
|
+
name="x-lg"
|
|
251
|
+
library="system"
|
|
252
|
+
label=${this.localize.term("close")}
|
|
253
|
+
@click=${this.handleCloseClick}
|
|
254
|
+
></sl-icon-button>
|
|
255
|
+
` : ""}
|
|
256
|
+
|
|
257
|
+
<div role="timer" class="alert__timer">${this.remainingTime}</div>
|
|
258
|
+
|
|
259
|
+
${this.countdown ? m`
|
|
260
|
+
<div
|
|
261
|
+
class=${v({
|
|
262
|
+
alert__countdown: !0,
|
|
263
|
+
"alert__countdown--ltr": this.countdown === "ltr"
|
|
264
|
+
})}
|
|
265
|
+
>
|
|
266
|
+
<div class="alert__countdown-elapsed"></div>
|
|
267
|
+
</div>
|
|
268
|
+
` : ""}
|
|
269
|
+
</div>
|
|
270
|
+
`;
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
b.styles = [r, y], b.dependencies = { "sl-icon-button": o }, e([g("[part~=\"base\"]")], b.prototype, "base", 2), e([g(".alert__countdown-elapsed")], b.prototype, "countdownElement", 2), e([h({
|
|
274
|
+
type: Boolean,
|
|
275
|
+
reflect: !0
|
|
276
|
+
})], b.prototype, "open", 2), e([h({
|
|
277
|
+
type: Boolean,
|
|
278
|
+
reflect: !0
|
|
279
|
+
})], b.prototype, "closable", 2), e([h({ reflect: !0 })], b.prototype, "variant", 2), e([h({ type: Number })], b.prototype, "duration", 2), e([h({
|
|
280
|
+
type: String,
|
|
281
|
+
reflect: !0
|
|
282
|
+
})], b.prototype, "countdown", 2), e([_()], b.prototype, "remainingTime", 2), e([t("open", { waitUntilFirstUpdate: !0 })], b.prototype, "handleOpenChange", 1), e([t("duration")], b.prototype, "handleDurationChange", 1);
|
|
283
|
+
var x = b;
|
|
284
|
+
//#endregion
|
|
285
|
+
//#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.R45OWEVP.js
|
|
286
|
+
l("alert.show", {
|
|
287
|
+
keyframes: [{
|
|
288
|
+
opacity: 0,
|
|
289
|
+
scale: .8
|
|
290
|
+
}, {
|
|
291
|
+
opacity: 1,
|
|
292
|
+
scale: 1
|
|
293
|
+
}],
|
|
294
|
+
options: {
|
|
295
|
+
duration: 250,
|
|
296
|
+
easing: "ease"
|
|
297
|
+
}
|
|
298
|
+
}), l("alert.hide", {
|
|
299
|
+
keyframes: [{
|
|
300
|
+
opacity: 1,
|
|
301
|
+
scale: 1
|
|
302
|
+
}, {
|
|
303
|
+
opacity: 0,
|
|
304
|
+
scale: .8
|
|
305
|
+
}],
|
|
306
|
+
options: {
|
|
307
|
+
duration: 250,
|
|
308
|
+
easing: "ease"
|
|
309
|
+
}
|
|
310
|
+
}), x.define("sl-alert");
|
|
311
|
+
//#endregion
|