@npm9912/v-map 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +192 -96
- package/dist/cjs/{cesium-provider-BiFFyAl9.js → cesium-provider-CTtu9eTD.js} +6 -5
- package/dist/cjs/{deck-provider-Ctq3Q8a1.js → deck-provider-fNa818HH.js} +9 -9
- package/dist/cjs/events-BMG7RKne.js +11 -0
- package/dist/cjs/{geotiff-source-RaNzzWkC.js → geotiff-source-B9ARUE9z.js} +1 -1
- package/dist/cjs/{index-ISOEpMC3.js → index-9APmzoa2.js} +6 -6
- package/dist/cjs/{index-CbVT-Con.js → index-BJg0ncfC.js} +4 -4
- package/dist/cjs/{index-CJvvX4yx.js → index-C1ubapwF.js} +4 -4
- package/dist/cjs/{index-B8LHqjyg.js → index-ChrKyU6i.js} +4 -4
- package/dist/cjs/{index-JSwBbvGA.js → index-DmGHwivM.js} +1 -0
- package/dist/cjs/{layer-extension-B_olS0rc.js → layer-extension-D3a-1DFI.js} +1 -1
- package/dist/cjs/{leaflet-provider-DOqfs7g5.js → leaflet-provider-7Nw-AdV_.js} +6 -5
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{messages-D7h4m8Tx.js → messages-CFCxeG8p.js} +0 -9
- package/dist/cjs/{openlayers-provider-Dfeg6L4n.js → openlayers-provider-DMxYtFkS.js} +5 -4
- package/dist/cjs/{polygon-layer-B9PrN7vr.js → polygon-layer-Dx1ZWZP0.js} +1 -1
- package/dist/cjs/{scenegraph-layer-DwNoxQdi.js → scenegraph-layer-ctLehP0q.js} +1 -1
- package/dist/cjs/v-map-builder.cjs.entry.js +4 -3
- package/dist/cjs/v-map-error.cjs.entry.js +121 -0
- package/dist/cjs/v-map-layer-geojson_12.cjs.entry.js +11 -10
- package/dist/cjs/{v-map-layer-helper-iAzxAg9I.js → v-map-layer-helper-DnWpjZ_Q.js} +7 -6
- package/dist/cjs/v-map-layer-terrain-geotiff.cjs.entry.js +5 -4
- package/dist/cjs/v-map-layercontrol.cjs.entry.js +1 -1
- package/dist/cjs/v-map.cjs.js +2 -2
- package/dist/cjs/{v-map.v-map-layer-osm.v-map-layergroup-BsXp3BoL.js → v-map.v-map-layer-osm.v-map-layergroup-BJ3_NqAj.js} +16 -15
- package/dist/cjs/v-map_3.cjs.entry.js +5 -4
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/v-map/v-map.css +3 -0
- package/dist/collection/components/v-map-error/v-map-error.css +136 -0
- package/dist/collection/components/v-map-error/v-map-error.js +277 -0
- package/dist/collection/components/v-map-layer-geojson/v-map-layer-geojson.js +1 -1
- package/dist/collection/components/v-map-layer-terrain/v-map-layer-terrain.js +1 -1
- package/dist/collection/components/v-map-layer-terrain-geotiff/v-map-layer-terrain-geotiff.js +1 -1
- package/dist/collection/components/v-map-layer-tile3d/v-map-layer-tile3d.js +1 -1
- package/dist/collection/components/v-map-layer-wcs/v-map-layer-wcs.js +1 -1
- package/dist/collection/components/v-map-layer-wfs/v-map-layer-wfs.js +1 -1
- package/dist/collection/components/v-map-layergroup/v-map-layergroup.js +1 -1
- package/dist/collection/components/v-map-style/v-map-style.js +1 -1
- package/dist/components/cesium-provider.js +1 -1
- package/dist/components/deck-provider.js +1 -1
- package/dist/components/events.js +1 -1
- package/dist/components/geotiff-source.js +1 -1
- package/dist/components/leaflet-provider.js +1 -1
- package/dist/components/logger.js +1 -0
- package/dist/components/openlayers-provider.js +1 -1
- package/dist/components/v-map-builder.js +2 -2
- package/dist/components/v-map-error.d.ts +11 -0
- package/dist/components/v-map-error.js +1 -0
- package/dist/components/v-map-layer-geojson2.js +1 -1
- package/dist/components/v-map-layer-geotiff2.js +1 -1
- package/dist/components/v-map-layer-google2.js +1 -1
- package/dist/components/v-map-layer-helper.js +1 -1
- package/dist/components/v-map-layer-osm2.js +1 -1
- package/dist/components/v-map-layer-scatterplot2.js +1 -1
- package/dist/components/v-map-layer-terrain-geotiff.js +1 -1
- package/dist/components/v-map-layer-terrain2.js +1 -1
- package/dist/components/v-map-layer-tile3d2.js +1 -1
- package/dist/components/v-map-layer-wcs2.js +1 -1
- package/dist/components/v-map-layer-wfs2.js +1 -1
- package/dist/components/v-map-layer-wkt2.js +1 -1
- package/dist/components/v-map-layer-wms2.js +1 -1
- package/dist/components/v-map-layer-xyz2.js +1 -1
- package/dist/components/v-map-layergroup2.js +1 -1
- package/dist/components/v-map-style2.js +2 -2
- package/dist/components/v-map2.js +1 -1
- package/dist/esm/{cesium-provider-BJfAup3w.js → cesium-provider-Bh__cBGf.js} +6 -5
- package/dist/esm/{deck-provider-C7U9VDEq.js → deck-provider-DxIpS4lY.js} +9 -9
- package/dist/esm/events-CrV_misM.js +9 -0
- package/dist/esm/{geotiff-source-esnDnC-u.js → geotiff-source-BRjO-Dvr.js} +1 -1
- package/dist/esm/{index-BIEmlzCf.js → index-Bh2gBu9u.js} +5 -5
- package/dist/esm/{index-jzneDarq.js → index-BoNyIrdq.js} +1 -1
- package/dist/esm/{index-jN06TXUp.js → index-C3mnOs0I.js} +4 -4
- package/dist/esm/{index-B1zwA4IC.js → index-C63kfbil.js} +6 -6
- package/dist/esm/{index-DbSdn93t.js → index-DxbztwCv.js} +7 -7
- package/dist/esm/{layer-extension-CZXK5goK.js → layer-extension-C5Y2UES3.js} +1 -1
- package/dist/esm/{leaflet-provider-Q41TB6ku.js → leaflet-provider-k6JSYiYX.js} +6 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{messages-CMKJzsgL.js → messages-QJHuuz0g.js} +1 -9
- package/dist/esm/{openlayers-provider-CMsDsQTQ.js → openlayers-provider-DIquf3Tx.js} +5 -4
- package/dist/esm/{polygon-layer-ByhxGhWC.js → polygon-layer-ZIT5mJy5.js} +1 -1
- package/dist/esm/{scenegraph-layer-09K_B6DT.js → scenegraph-layer-CNIRd2uu.js} +1 -1
- package/dist/esm/v-map-builder.entry.js +3 -2
- package/dist/esm/v-map-error.entry.js +119 -0
- package/dist/esm/v-map-layer-geojson_12.entry.js +10 -9
- package/dist/esm/{v-map-layer-helper-Dys44Cgo.js → v-map-layer-helper-CuHYsU9f.js} +2 -1
- package/dist/esm/v-map-layer-terrain-geotiff.entry.js +5 -4
- package/dist/esm/v-map-layercontrol.entry.js +1 -1
- package/dist/esm/v-map.js +3 -3
- package/dist/esm/{v-map.v-map-layer-osm.v-map-layergroup-B4pFHuSf.js → v-map.v-map-layer-osm.v-map-layergroup-Zwdvm9PG.js} +10 -9
- package/dist/esm/v-map_3.entry.js +5 -4
- package/dist/types/components/v-map-error/v-map-error.d.ts +79 -0
- package/dist/types/components.d.ts +128 -0
- package/dist/v-map/p-05ee633f.entry.js +1 -0
- package/dist/v-map/p-08ad1392.entry.js +1 -0
- package/dist/v-map/p-2-mR3oVa.js +1 -0
- package/dist/v-map/{p-c21c93fe.entry.js → p-3a57b64a.entry.js} +1 -1
- package/dist/v-map/p-58dda864.entry.js +1 -0
- package/dist/v-map/p-915314c0.entry.js +10 -0
- package/dist/v-map/{p-MyTSFnEk.js → p-9Rt23jlQ.js} +1 -1
- package/dist/v-map/p-BSsFEMZP.js +1 -0
- package/dist/v-map/{p-jzneDarq.js → p-BoNyIrdq.js} +2 -2
- package/dist/v-map/p-BpE6L1g0.js +1 -0
- package/dist/v-map/{p-DvHXtWUg.js → p-C0M0-Kvt.js} +1 -1
- package/dist/v-map/p-CbiLpFhO.js +1 -0
- package/dist/v-map/p-Ci70E1EM.js +1 -0
- package/dist/v-map/p-CrV_misM.js +1 -0
- package/dist/v-map/{p-DrOQ9V4h.js → p-DAf4itFZ.js} +1 -1
- package/dist/v-map/p-DVBtCUtQ.js +1 -0
- package/dist/v-map/{p-CZqY0yW4.js → p-DuJ_mTaq.js} +1 -1
- package/dist/v-map/p-G6iftXUC.js +1 -0
- package/dist/v-map/{p-CMKJzsgL.js → p-QJHuuz0g.js} +1 -1
- package/dist/v-map/{p-aa410e64.entry.js → p-e21ea0ce.entry.js} +2 -2
- package/dist/v-map/{p-DmICdG34.js → p-rCyRSFJb.js} +2 -2
- package/dist/v-map/{p-CafTHT9i.js → p-vhbi5XXi.js} +1 -1
- package/dist/v-map/{p-Dckgonw8.js → p-yXLNXXx-.js} +1 -1
- package/dist/v-map/v-map.esm.js +1 -1
- package/package.json +29 -5
- package/dist/v-map/p--vVleK-M.js +0 -1
- package/dist/v-map/p-09d10db0.entry.js +0 -1
- package/dist/v-map/p-5eba6058.entry.js +0 -10
- package/dist/v-map/p-6b102336.entry.js +0 -1
- package/dist/v-map/p-BdijL4Av.js +0 -1
- package/dist/v-map/p-BeFu0ap4.js +0 -1
- package/dist/v-map/p-BxFJezdK.js +0 -1
- package/dist/v-map/p-DCTHyf58.js +0 -1
- package/dist/v-map/p-WaMDUuAz.js +0 -1
- package/dist/v-map/p-uiIP-taz.js +0 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var vMap_vMapLayerOsm_vMapLayergroup_entry = require('./v-map.v-map-layer-osm.v-map-layergroup-
|
|
4
|
-
require('./index-
|
|
5
|
-
require('./messages-
|
|
6
|
-
require('./
|
|
3
|
+
var vMap_vMapLayerOsm_vMapLayergroup_entry = require('./v-map.v-map-layer-osm.v-map-layergroup-BJ3_NqAj.js');
|
|
4
|
+
require('./index-DmGHwivM.js');
|
|
5
|
+
require('./messages-CFCxeG8p.js');
|
|
6
|
+
require('./events-BMG7RKne.js');
|
|
7
|
+
require('./v-map-layer-helper-DnWpjZ_Q.js');
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"components/v-map-layer-scatterplot/v-map-layer-scatterplot.js",
|
|
4
4
|
"components/v-map/v-map.js",
|
|
5
5
|
"components/v-map-builder/v-map-builder.js",
|
|
6
|
+
"components/v-map-error/v-map-error.js",
|
|
6
7
|
"components/v-map-layer-geojson/v-map-layer-geojson.js",
|
|
7
8
|
"components/v-map-layer-geotiff/v-map-layer-geotiff.js",
|
|
8
9
|
"components/v-map-layer-google/v-map-layer-google.js",
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
/* The host element overlays its parent v-map container.
|
|
3
|
+
v-map.css sets position: relative on its host so this lines up.
|
|
4
|
+
pointer-events: none lets map interactions pass through; the toasts
|
|
5
|
+
themselves re-enable pointer-events so they can still be clicked. */
|
|
6
|
+
position: absolute;
|
|
7
|
+
inset: 0;
|
|
8
|
+
pointer-events: none;
|
|
9
|
+
z-index: 10000;
|
|
10
|
+
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica,
|
|
11
|
+
Arial, sans-serif;
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
line-height: 1.4;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.stack {
|
|
17
|
+
position: absolute;
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
gap: 8px;
|
|
21
|
+
max-width: min(420px, calc(100% - 32px));
|
|
22
|
+
padding: 16px;
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:host([position='top-right']) .stack {
|
|
27
|
+
top: 0;
|
|
28
|
+
right: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:host([position='top-left']) .stack {
|
|
32
|
+
top: 0;
|
|
33
|
+
left: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host([position='top']) .stack {
|
|
37
|
+
top: 0;
|
|
38
|
+
left: 50%;
|
|
39
|
+
transform: translateX(-50%);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:host([position='bottom-right']) .stack {
|
|
43
|
+
bottom: 0;
|
|
44
|
+
right: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:host([position='bottom-left']) .stack {
|
|
48
|
+
bottom: 0;
|
|
49
|
+
left: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:host([position='bottom']) .stack {
|
|
53
|
+
bottom: 0;
|
|
54
|
+
left: 50%;
|
|
55
|
+
transform: translateX(-50%);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.toast {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
gap: 10px;
|
|
62
|
+
padding: 12px 14px;
|
|
63
|
+
background: rgba(28, 28, 32, 0.95);
|
|
64
|
+
color: #fff;
|
|
65
|
+
border-radius: 8px;
|
|
66
|
+
border-left: 4px solid #ff5252;
|
|
67
|
+
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
|
|
68
|
+
pointer-events: auto;
|
|
69
|
+
animation: v-map-error-slide-in 200ms ease-out;
|
|
70
|
+
-webkit-backdrop-filter: blur(8px);
|
|
71
|
+
backdrop-filter: blur(8px);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.badge {
|
|
75
|
+
flex: none;
|
|
76
|
+
display: inline-block;
|
|
77
|
+
padding: 2px 8px;
|
|
78
|
+
border-radius: 999px;
|
|
79
|
+
background: rgba(255, 82, 82, 0.2);
|
|
80
|
+
color: #ff8a8a;
|
|
81
|
+
font-size: 11px;
|
|
82
|
+
font-weight: 600;
|
|
83
|
+
text-transform: uppercase;
|
|
84
|
+
letter-spacing: 0.5px;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.message {
|
|
88
|
+
flex: 1 1 auto;
|
|
89
|
+
word-break: break-word;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.close {
|
|
93
|
+
flex: none;
|
|
94
|
+
align-self: flex-start;
|
|
95
|
+
width: 22px;
|
|
96
|
+
height: 22px;
|
|
97
|
+
padding: 0;
|
|
98
|
+
margin: -2px -4px 0 0;
|
|
99
|
+
border: none;
|
|
100
|
+
border-radius: 4px;
|
|
101
|
+
background: transparent;
|
|
102
|
+
color: rgba(255, 255, 255, 0.6);
|
|
103
|
+
font-size: 20px;
|
|
104
|
+
line-height: 1;
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
display: inline-flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
justify-content: center;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.close:hover {
|
|
112
|
+
background: rgba(255, 255, 255, 0.12);
|
|
113
|
+
color: #fff;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.close:focus-visible {
|
|
117
|
+
outline: 2px solid #fff;
|
|
118
|
+
outline-offset: 2px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@keyframes v-map-error-slide-in {
|
|
122
|
+
from {
|
|
123
|
+
opacity: 0;
|
|
124
|
+
transform: translateY(-8px);
|
|
125
|
+
}
|
|
126
|
+
to {
|
|
127
|
+
opacity: 1;
|
|
128
|
+
transform: translateY(0);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@media (prefers-reduced-motion: reduce) {
|
|
133
|
+
.toast {
|
|
134
|
+
animation: none;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { Host, h, } from "@stencil/core";
|
|
2
|
+
import { VMapEvents } from "../../utils/events";
|
|
3
|
+
const MSG_COMPONENT = 'v-map-error';
|
|
4
|
+
/**
|
|
5
|
+
* `<v-map-error>` lauscht auf das `vmap-error` Event seiner Eltern-`<v-map>`
|
|
6
|
+
* (oder einer per `for`-Attribut adressierten Karte) und rendert die Fehler
|
|
7
|
+
* als kleine, opinionated gestylte Toast-Stapel innerhalb des Karten-Containers.
|
|
8
|
+
*
|
|
9
|
+
* Damit können einfache HTML-Beispiele Fehler sichtbar machen, ohne eine
|
|
10
|
+
* Zeile JavaScript zu schreiben.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```html
|
|
14
|
+
* <v-map flavour="ol">
|
|
15
|
+
* <v-map-error position="top-right" auto-dismiss="5000"></v-map-error>
|
|
16
|
+
* <v-map-layergroup group-title="Basiskarten" basemapid="OSM-BASE">
|
|
17
|
+
* <v-map-layer-osm id="OSM-BASE" label="OSM"></v-map-layer-osm>
|
|
18
|
+
* </v-map-layergroup>
|
|
19
|
+
* </v-map>
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @part container - Wrapper um den gesamten Toast-Stapel
|
|
23
|
+
* @part toast - Einzelner Fehler-Toast (anpassbar via `::part(toast)`)
|
|
24
|
+
* @part badge - Typ-Badge innerhalb des Toasts (z. B. "network", "validation")
|
|
25
|
+
* @part message - Fehler-Nachricht innerhalb des Toasts
|
|
26
|
+
* @part close - Schliessen-Button innerhalb des Toasts
|
|
27
|
+
*/
|
|
28
|
+
export class VMapError {
|
|
29
|
+
host;
|
|
30
|
+
/**
|
|
31
|
+
* ID der `<v-map>`-Karte, deren Fehler angezeigt werden sollen.
|
|
32
|
+
* Wenn nicht angegeben, hängt sich die Komponente an das nächste
|
|
33
|
+
* `<v-map>`-Vorfahrenelement im DOM-Baum.
|
|
34
|
+
*/
|
|
35
|
+
for;
|
|
36
|
+
/**
|
|
37
|
+
* Position des Toast-Stapels innerhalb des `<v-map>`-Containers.
|
|
38
|
+
* @default 'top-right'
|
|
39
|
+
*/
|
|
40
|
+
position = 'top-right';
|
|
41
|
+
/**
|
|
42
|
+
* Auto-Dismiss-Zeit in Millisekunden. `0` deaktiviert das automatische
|
|
43
|
+
* Ausblenden — Toasts bleiben dann sichtbar, bis sie manuell geschlossen
|
|
44
|
+
* oder durch einen neueren Fehler aus dem Stapel gedrängt werden.
|
|
45
|
+
* @default 5000
|
|
46
|
+
*/
|
|
47
|
+
autoDismiss = 5000;
|
|
48
|
+
/**
|
|
49
|
+
* Maximale Anzahl gleichzeitig sichtbarer Toasts. Ältere werden bei
|
|
50
|
+
* Überschreitung am oberen Ende des Stapels entfernt.
|
|
51
|
+
* @default 3
|
|
52
|
+
*/
|
|
53
|
+
max = 3;
|
|
54
|
+
/**
|
|
55
|
+
* Zusätzliches Logging in die Browser-Console.
|
|
56
|
+
* - `'none'` (Default): nur Toast-Anzeige, kein Console-Output
|
|
57
|
+
* - `'console'`: jeder Fehler wird zusätzlich mit `console.error` geloggt
|
|
58
|
+
* @default 'none'
|
|
59
|
+
*/
|
|
60
|
+
log = 'none';
|
|
61
|
+
toasts = [];
|
|
62
|
+
mapElement = null;
|
|
63
|
+
boundHandler = (e) => this.onError(e);
|
|
64
|
+
retryTimer;
|
|
65
|
+
nextId = 0;
|
|
66
|
+
// ---- Lifecycle ----------------------------------------------------------
|
|
67
|
+
connectedCallback() {
|
|
68
|
+
this.attach();
|
|
69
|
+
}
|
|
70
|
+
disconnectedCallback() {
|
|
71
|
+
this.detach();
|
|
72
|
+
for (const t of this.toasts) {
|
|
73
|
+
if (t.timeoutId !== undefined)
|
|
74
|
+
clearTimeout(t.timeoutId);
|
|
75
|
+
}
|
|
76
|
+
this.toasts = [];
|
|
77
|
+
if (this.retryTimer !== undefined) {
|
|
78
|
+
clearTimeout(this.retryTimer);
|
|
79
|
+
this.retryTimer = undefined;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
// ---- DOM-Discovery ------------------------------------------------------
|
|
83
|
+
attach(retry = 0) {
|
|
84
|
+
const target = this.for
|
|
85
|
+
? document.getElementById(this.for)
|
|
86
|
+
: this.host.closest('v-map');
|
|
87
|
+
if (target instanceof HTMLElement) {
|
|
88
|
+
this.mapElement = target;
|
|
89
|
+
this.mapElement.addEventListener(VMapEvents.Error, this.boundHandler);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
// Karte noch nicht im DOM - kurz warten und erneut versuchen
|
|
93
|
+
if (retry < 50) {
|
|
94
|
+
this.retryTimer = window.setTimeout(() => this.attach(retry + 1), 100);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
detach() {
|
|
98
|
+
if (this.mapElement) {
|
|
99
|
+
this.mapElement.removeEventListener(VMapEvents.Error, this.boundHandler);
|
|
100
|
+
this.mapElement = null;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
// ---- Error Handling -----------------------------------------------------
|
|
104
|
+
onError(e) {
|
|
105
|
+
const detail = e.detail;
|
|
106
|
+
if (!detail)
|
|
107
|
+
return;
|
|
108
|
+
if (this.log === 'console') {
|
|
109
|
+
console.error(`[${MSG_COMPONENT}]`, detail.type, detail.message, detail);
|
|
110
|
+
}
|
|
111
|
+
const id = this.nextId++;
|
|
112
|
+
const toast = { id, detail };
|
|
113
|
+
if (this.autoDismiss > 0) {
|
|
114
|
+
toast.timeoutId = window.setTimeout(() => this.dismiss(id), this.autoDismiss);
|
|
115
|
+
}
|
|
116
|
+
const next = [...this.toasts, toast];
|
|
117
|
+
while (next.length > this.max) {
|
|
118
|
+
const removed = next.shift();
|
|
119
|
+
if (removed?.timeoutId !== undefined)
|
|
120
|
+
clearTimeout(removed.timeoutId);
|
|
121
|
+
}
|
|
122
|
+
this.toasts = next;
|
|
123
|
+
}
|
|
124
|
+
dismiss(id) {
|
|
125
|
+
const target = this.toasts.find(t => t.id === id);
|
|
126
|
+
if (target?.timeoutId !== undefined)
|
|
127
|
+
clearTimeout(target.timeoutId);
|
|
128
|
+
this.toasts = this.toasts.filter(t => t.id !== id);
|
|
129
|
+
}
|
|
130
|
+
// ---- Render -------------------------------------------------------------
|
|
131
|
+
render() {
|
|
132
|
+
return (h(Host, { key: 'edec9031306084f0b55ac6ef5b21e69995ca912c' }, h("div", { key: '665451bfd7a0957b947715654707705904e11d6b', class: "stack", part: "container" }, this.toasts.map(t => (h("div", { key: t.id, class: "toast", part: "toast", role: "alert", "aria-live": "assertive" }, h("span", { class: "badge", part: "badge" }, t.detail.type), h("span", { class: "message", part: "message" }, t.detail.message), h("button", { type: "button", class: "close", part: "close", "aria-label": "Schliessen", onClick: () => this.dismiss(t.id) }, '\u00d7')))))));
|
|
133
|
+
}
|
|
134
|
+
static get is() { return "v-map-error"; }
|
|
135
|
+
static get encapsulation() { return "shadow"; }
|
|
136
|
+
static get originalStyleUrls() {
|
|
137
|
+
return {
|
|
138
|
+
"$": ["v-map-error.css"]
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
static get styleUrls() {
|
|
142
|
+
return {
|
|
143
|
+
"$": ["v-map-error.css"]
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
static get properties() {
|
|
147
|
+
return {
|
|
148
|
+
"for": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"mutable": false,
|
|
151
|
+
"complexType": {
|
|
152
|
+
"original": "string",
|
|
153
|
+
"resolved": "string",
|
|
154
|
+
"references": {}
|
|
155
|
+
},
|
|
156
|
+
"required": false,
|
|
157
|
+
"optional": true,
|
|
158
|
+
"docs": {
|
|
159
|
+
"tags": [],
|
|
160
|
+
"text": "ID der `<v-map>`-Karte, deren Fehler angezeigt werden sollen.\nWenn nicht angegeben, h\u00E4ngt sich die Komponente an das n\u00E4chste\n`<v-map>`-Vorfahrenelement im DOM-Baum."
|
|
161
|
+
},
|
|
162
|
+
"getter": false,
|
|
163
|
+
"setter": false,
|
|
164
|
+
"reflect": false,
|
|
165
|
+
"attribute": "for"
|
|
166
|
+
},
|
|
167
|
+
"position": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"mutable": false,
|
|
170
|
+
"complexType": {
|
|
171
|
+
"original": "ToastPosition",
|
|
172
|
+
"resolved": "\"bottom\" | \"bottom-left\" | \"bottom-right\" | \"top\" | \"top-left\" | \"top-right\"",
|
|
173
|
+
"references": {
|
|
174
|
+
"ToastPosition": {
|
|
175
|
+
"location": "global",
|
|
176
|
+
"id": "global::ToastPosition"
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"required": false,
|
|
181
|
+
"optional": false,
|
|
182
|
+
"docs": {
|
|
183
|
+
"tags": [{
|
|
184
|
+
"name": "default",
|
|
185
|
+
"text": "'top-right'"
|
|
186
|
+
}],
|
|
187
|
+
"text": "Position des Toast-Stapels innerhalb des `<v-map>`-Containers."
|
|
188
|
+
},
|
|
189
|
+
"getter": false,
|
|
190
|
+
"setter": false,
|
|
191
|
+
"reflect": true,
|
|
192
|
+
"attribute": "position",
|
|
193
|
+
"defaultValue": "'top-right'"
|
|
194
|
+
},
|
|
195
|
+
"autoDismiss": {
|
|
196
|
+
"type": "number",
|
|
197
|
+
"mutable": false,
|
|
198
|
+
"complexType": {
|
|
199
|
+
"original": "number",
|
|
200
|
+
"resolved": "number",
|
|
201
|
+
"references": {}
|
|
202
|
+
},
|
|
203
|
+
"required": false,
|
|
204
|
+
"optional": false,
|
|
205
|
+
"docs": {
|
|
206
|
+
"tags": [{
|
|
207
|
+
"name": "default",
|
|
208
|
+
"text": "5000"
|
|
209
|
+
}],
|
|
210
|
+
"text": "Auto-Dismiss-Zeit in Millisekunden. `0` deaktiviert das automatische\nAusblenden \u2014 Toasts bleiben dann sichtbar, bis sie manuell geschlossen\noder durch einen neueren Fehler aus dem Stapel gedr\u00E4ngt werden."
|
|
211
|
+
},
|
|
212
|
+
"getter": false,
|
|
213
|
+
"setter": false,
|
|
214
|
+
"reflect": false,
|
|
215
|
+
"attribute": "auto-dismiss",
|
|
216
|
+
"defaultValue": "5000"
|
|
217
|
+
},
|
|
218
|
+
"max": {
|
|
219
|
+
"type": "number",
|
|
220
|
+
"mutable": false,
|
|
221
|
+
"complexType": {
|
|
222
|
+
"original": "number",
|
|
223
|
+
"resolved": "number",
|
|
224
|
+
"references": {}
|
|
225
|
+
},
|
|
226
|
+
"required": false,
|
|
227
|
+
"optional": false,
|
|
228
|
+
"docs": {
|
|
229
|
+
"tags": [{
|
|
230
|
+
"name": "default",
|
|
231
|
+
"text": "3"
|
|
232
|
+
}],
|
|
233
|
+
"text": "Maximale Anzahl gleichzeitig sichtbarer Toasts. \u00C4ltere werden bei\n\u00DCberschreitung am oberen Ende des Stapels entfernt."
|
|
234
|
+
},
|
|
235
|
+
"getter": false,
|
|
236
|
+
"setter": false,
|
|
237
|
+
"reflect": false,
|
|
238
|
+
"attribute": "max",
|
|
239
|
+
"defaultValue": "3"
|
|
240
|
+
},
|
|
241
|
+
"log": {
|
|
242
|
+
"type": "string",
|
|
243
|
+
"mutable": false,
|
|
244
|
+
"complexType": {
|
|
245
|
+
"original": "LogMode",
|
|
246
|
+
"resolved": "\"console\" | \"none\"",
|
|
247
|
+
"references": {
|
|
248
|
+
"LogMode": {
|
|
249
|
+
"location": "global",
|
|
250
|
+
"id": "global::LogMode"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"required": false,
|
|
255
|
+
"optional": false,
|
|
256
|
+
"docs": {
|
|
257
|
+
"tags": [{
|
|
258
|
+
"name": "default",
|
|
259
|
+
"text": "'none'"
|
|
260
|
+
}],
|
|
261
|
+
"text": "Zus\u00E4tzliches Logging in die Browser-Console.\n- `'none'` (Default): nur Toast-Anzeige, kein Console-Output\n- `'console'`: jeder Fehler wird zus\u00E4tzlich mit `console.error` geloggt"
|
|
262
|
+
},
|
|
263
|
+
"getter": false,
|
|
264
|
+
"setter": false,
|
|
265
|
+
"reflect": false,
|
|
266
|
+
"attribute": "log",
|
|
267
|
+
"defaultValue": "'none'"
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
static get states() {
|
|
272
|
+
return {
|
|
273
|
+
"toasts": {}
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
static get elementRef() { return "host"; }
|
|
277
|
+
}
|
|
@@ -363,7 +363,7 @@ export class VMapLayerGeoJSON {
|
|
|
363
363
|
return config;
|
|
364
364
|
}
|
|
365
365
|
render() {
|
|
366
|
-
return h("slot", { key: '
|
|
366
|
+
return h("slot", { key: '92aa382d5258a981896ef7316cc269b095304d13', name: "geojson", onSlotchange: this.onSlotChange });
|
|
367
367
|
}
|
|
368
368
|
static get is() { return "v-map-layer-geojson"; }
|
|
369
369
|
static get encapsulation() { return "shadow"; }
|
|
@@ -209,7 +209,7 @@ export class VMapLayerTerrain {
|
|
|
209
209
|
return config;
|
|
210
210
|
}
|
|
211
211
|
render() {
|
|
212
|
-
return h("slot", { key: '
|
|
212
|
+
return h("slot", { key: 'fa57254fc8c1a200ca5e2788bcc9f2beaa388a49' });
|
|
213
213
|
}
|
|
214
214
|
static get is() { return "v-map-layer-terrain"; }
|
|
215
215
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/v-map-layer-terrain-geotiff/v-map-layer-terrain-geotiff.js
CHANGED
|
@@ -187,7 +187,7 @@ export class VMapLayerTerrainGeotiff {
|
|
|
187
187
|
log(MSG_COMPONENT + MSG.COMPONENT_WILL_RENDER);
|
|
188
188
|
}
|
|
189
189
|
render() {
|
|
190
|
-
return h("slot", { key: '
|
|
190
|
+
return h("slot", { key: '9d6029408f7126a557ae123b418b7aed610b798c' });
|
|
191
191
|
}
|
|
192
192
|
static get is() { return "v-map-layer-terrain-geotiff"; }
|
|
193
193
|
static get encapsulation() { return "shadow"; }
|
|
@@ -201,7 +201,7 @@ export class VMapLayerTile3d {
|
|
|
201
201
|
return config;
|
|
202
202
|
}
|
|
203
203
|
render() {
|
|
204
|
-
return h("slot", { key: '
|
|
204
|
+
return h("slot", { key: '808774d80fbe0948330b8e7f94c08d331bc49a99' });
|
|
205
205
|
}
|
|
206
206
|
static get is() { return "v-map-layer-tile3d"; }
|
|
207
207
|
static get encapsulation() { return "shadow"; }
|
|
@@ -129,7 +129,7 @@ export class VMapLayerWcs {
|
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
131
|
render() {
|
|
132
|
-
return h("slot", { key: '
|
|
132
|
+
return h("slot", { key: '02f2834e39c6e4d041f401d982a97af14d1c3e4d' });
|
|
133
133
|
}
|
|
134
134
|
static get is() { return "v-map-layer-wcs"; }
|
|
135
135
|
static get encapsulation() { return "shadow"; }
|
|
@@ -182,7 +182,7 @@ export class VMapLayerWfs {
|
|
|
182
182
|
return config;
|
|
183
183
|
}
|
|
184
184
|
render() {
|
|
185
|
-
return h("slot", { key: '
|
|
185
|
+
return h("slot", { key: 'fb3fcca9a332f5b0bacce83b61152869b9afd820' });
|
|
186
186
|
}
|
|
187
187
|
static get is() { return "v-map-layer-wfs"; }
|
|
188
188
|
static get encapsulation() { return "shadow"; }
|
|
@@ -94,7 +94,7 @@ export class VMapLayerGroup {
|
|
|
94
94
|
return this.groupId;
|
|
95
95
|
}
|
|
96
96
|
render() {
|
|
97
|
-
return h("slot", { key: '
|
|
97
|
+
return h("slot", { key: 'cffd8e9ece1377275f6d23503004eeffafa4cfcd' });
|
|
98
98
|
}
|
|
99
99
|
static get is() { return "v-map-layergroup"; }
|
|
100
100
|
static get encapsulation() { return "shadow"; }
|
|
@@ -248,7 +248,7 @@ export class VMapStyle {
|
|
|
248
248
|
return this.error;
|
|
249
249
|
}
|
|
250
250
|
render() {
|
|
251
|
-
return (h("div", { key: '
|
|
251
|
+
return (h("div", { key: '8e1c5cdf6914778d39e8dd74a35d92cd65f7f32c', class: "style-container" }, this.isLoading && h("div", { key: '3c82160e21fa5f8a4ece8399b0e5cc42204104f2', class: "loading" }, "Loading style..."), this.error && (h("div", { key: '2017dd34fb9c95595c72611204ad8b7fcb411098', class: "error" }, "Style Error: ", this.error.message)), this.parsedStyle && (h("div", { key: 'a1d2893f784deca67748dd1a757dd0b2aae39974', class: "success" }, "Style loaded (", this.format.toUpperCase(), ")", this.getLayerTargets().length > 0 && (h("div", { key: '4e798d938ed53bbac980b9e98b05960c907b0447', class: "targets" }, "Targets: ", this.getLayerTargets().join(', '))))), h("slot", { key: 'e32cf2619d0347bcf0ded90cc13ddd5a168cc483' })));
|
|
252
252
|
}
|
|
253
253
|
static get is() { return "v-map-style"; }
|
|
254
254
|
static get encapsulation() { return "shadow"; }
|