@geotrekce/geotrek-rando-widget 0.0.4 → 0.0.7
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/cjs/geotrek-rando-widget.cjs.js +1 -1
- package/dist/cjs/grw-app.cjs.entry.js +111 -0
- package/dist/cjs/{grw-app_11.cjs.entry.js → grw-filter_6.cjs.entry.js} +197 -455
- package/dist/cjs/grw-information-desk-detail_3.cjs.entry.js +52 -0
- package/dist/cjs/grw-trek-card.cjs.entry.js +47 -0
- package/dist/cjs/length-d315d156.js +34 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/store-fd04a216.js +211 -0
- package/dist/collection/components/grw-app/grw-app.js +54 -25
- package/dist/collection/components/grw-information-desk-detail/grw-information-desk-detail.css +5 -4
- package/dist/collection/components/grw-information-desk-detail/grw-information-desk-detail.js +1 -1
- package/dist/collection/components/grw-map/grw-map.css +19 -1
- package/dist/collection/components/grw-map/grw-map.js +65 -10
- package/dist/collection/components/grw-poi-detail/grw-poi-detail.css +5 -4
- package/dist/collection/components/grw-poi-detail/grw-poi-detail.js +1 -1
- package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.css +27 -3
- package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.js +17 -3
- package/dist/collection/components/grw-trek-card/grw-trek-card.js +1 -1
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.css +134 -4
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +101 -6
- package/dist/collection/components/grw-treks-list/grw-treks-list.js +8 -3
- package/dist/collection/store/grw-trek-provider.js +24 -9
- package/dist/collection/store/grw-treks-provider.js +12 -6
- package/dist/collection/store/store.js +7 -1
- package/dist/components/grw-app.js +52 -6
- package/dist/components/grw-information-desk-detail2.js +2 -2
- package/dist/components/grw-map2.js +66 -11
- package/dist/components/grw-poi-detail2.js +2 -2
- package/dist/components/grw-sensitive-area-detail2.js +7 -2
- package/dist/components/grw-trek-detail2.js +31 -4
- package/dist/components/grw-trek-provider2.js +24 -9
- package/dist/components/grw-treks-list2.js +8 -3
- package/dist/components/grw-treks-provider2.js +12 -6
- package/dist/components/store.js +7 -1
- package/dist/esm/geotrek-rando-widget.js +2 -2
- package/dist/esm/grw-app.entry.js +107 -0
- package/dist/esm/{grw-app_11.entry.js → grw-filter_6.entry.js} +138 -391
- package/dist/esm/grw-information-desk-detail_3.entry.js +46 -0
- package/dist/esm/grw-trek-card.entry.js +43 -0
- package/dist/esm/{index-fe16e7b6.js → index-192d910f.js} +1 -1
- package/dist/esm/length-d82189db.js +27 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/store-b2c76c0c.js +208 -0
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
- package/dist/geotrek-rando-widget/p-1b2ba86d.entry.js +1 -0
- package/dist/geotrek-rando-widget/p-4361afd2.entry.js +1 -0
- package/dist/geotrek-rando-widget/p-5f17d340.entry.js +1 -0
- package/dist/geotrek-rando-widget/{p-8c206aec.js → p-6dce5e6c.js} +1 -1
- package/dist/geotrek-rando-widget/p-7715153d.entry.js +1 -0
- package/dist/geotrek-rando-widget/p-e6710c64.js +1 -0
- package/dist/geotrek-rando-widget/p-f3f7d6be.js +1 -0
- package/dist/types/components/grw-app/grw-app.d.ts +7 -2
- package/dist/types/components/grw-map/grw-map.d.ts +3 -1
- package/dist/types/components/grw-trek-detail/grw-trek-detail.d.ts +9 -4
- package/dist/types/components.d.ts +0 -2
- package/dist/types/store/grw-trek-provider.d.ts +2 -0
- package/dist/types/store/grw-treks-provider.d.ts +3 -0
- package/dist/types/store/store.d.ts +16 -3
- package/dist/types/types/types.d.ts +51 -1
- package/package.json +5 -4
- package/dist/geotrek-rando-widget/p-ed8706fb.entry.js +0 -1
|
@@ -3,23 +3,31 @@ import state from 'store/store';
|
|
|
3
3
|
export class GrwTrekProvider {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.language = 'fr';
|
|
6
|
+
this.controller = new AbortController();
|
|
7
|
+
this.signal = this.controller.signal;
|
|
6
8
|
}
|
|
7
9
|
componentWillLoad() {
|
|
8
10
|
state.api = this.api;
|
|
9
11
|
const requests = [];
|
|
10
|
-
requests.push(!state.difficulties ? fetch(`${this.api}trek_difficulty/?language=${this.language}&fields=id,label,pictogram
|
|
11
|
-
requests.push(!state.routes ? fetch(`${this.api}trek_route/?language=${this.language}&fields=id,route,pictogram
|
|
12
|
-
requests.push(!state.practices ? fetch(`${this.api}trek_practice/?language=${this.language}&fields=id,name,pictogram
|
|
13
|
-
requests.push(!state.themes ? fetch(`${this.api}theme/?language=${this.language}&fields=id,label,pictogram
|
|
12
|
+
requests.push(!state.difficulties ? fetch(`${this.api}trek_difficulty/?language=${this.language}&fields=id,label,pictogram`, { signal: this.signal }) : new Response('null'));
|
|
13
|
+
requests.push(!state.routes ? fetch(`${this.api}trek_route/?language=${this.language}&fields=id,route,pictogram`, { signal: this.signal }) : new Response('null'));
|
|
14
|
+
requests.push(!state.practices ? fetch(`${this.api}trek_practice/?language=${this.language}&fields=id,name,pictogram`, { signal: this.signal }) : new Response('null'));
|
|
15
|
+
requests.push(!state.themes ? fetch(`${this.api}theme/?language=${this.language}&fields=id,label,pictogram`, { signal: this.signal }) : new Response('null'));
|
|
14
16
|
return Promise.all([
|
|
15
17
|
...requests,
|
|
16
|
-
fetch(`${this.api}sensitivearea/?language=${this.language}&trek=${this.trekId}&fields=id,geometry,name,description
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
fetch(`${this.api}
|
|
18
|
+
fetch(`${this.api}sensitivearea/?language=${this.language}&published=true&trek=${this.trekId}&fields=id,geometry,name,description,contact,info_url,period,practices`, {
|
|
19
|
+
signal: this.signal,
|
|
20
|
+
}).catch(() => new Response('null')),
|
|
21
|
+
fetch(`${this.api}label/?language=${this.language}&fields=id,name,advice,pictogram`, { signal: this.signal }),
|
|
22
|
+
fetch(`${this.api}source/?language=${this.language}&fields=id,name,website,pictogram`, { signal: this.signal }),
|
|
23
|
+
fetch(`${this.api}trek_accessibility/?language=${this.language}&fields=id,name,pictogram`, { signal: this.signal }),
|
|
24
|
+
fetch(`${this.api}trek_accessibility_level/?language=${this.language}&fields=id,name`, { signal: this.signal }).catch(() => new Response('null')),
|
|
25
|
+
fetch(`${this.api}poi/?language=${this.language}&trek=${this.trekId}&published=true&fields=id,name,description,attachments,type,type_label,type_pictogram,url,published,geometry&page_size=999`, { signal: this.signal }),
|
|
26
|
+
fetch(`${this.api}informationdesk/?language=${this.language}&near_trek=${this.trekId}&fields=id,name,description,type,phone,email,website,municipality,postal_code,street,photo_url,latitude,longitude&page_size=999`, { signal: this.signal }),
|
|
27
|
+
fetch(`${this.api}trek/${this.trekId}/?language=${this.language}&published=true&fields=id,name,attachments,description,description_teaser,difficulty,duration,ascent,length_2d,practice,themes,route,geometry,gpx,kml,pdf,parking_location,departure,arrival,altimetric_profile,ambiance,access,public_transport,advice,advised_parking,gear,labels,source,points_reference,disabled_infrastructure,accessibility_level,accessibility_slope,accessibility_width,accessibility_signage,accessibility_covering,accessibility_exposure,accessibility_advice,accessibilities`, { signal: this.signal }),
|
|
20
28
|
])
|
|
21
29
|
.then(responses => Promise.all(responses.map(response => response.json())))
|
|
22
|
-
.then(([difficulties, routes, practices, themes, sensitiveAreas, pois, informationDesks, trek]) => {
|
|
30
|
+
.then(([difficulties, routes, practices, themes, sensitiveAreas, labels, sources, accessibilities, accessibilitiesLevel, pois, informationDesks, trek]) => {
|
|
23
31
|
if (difficulties) {
|
|
24
32
|
state.difficulties = difficulties.results;
|
|
25
33
|
}
|
|
@@ -35,12 +43,19 @@ export class GrwTrekProvider {
|
|
|
35
43
|
if (sensitiveAreas) {
|
|
36
44
|
state.currentSensitiveAreas = sensitiveAreas.results;
|
|
37
45
|
}
|
|
46
|
+
state.labels = labels.results;
|
|
47
|
+
state.sources = sources.results;
|
|
48
|
+
state.accessibilities = accessibilities.results;
|
|
49
|
+
if (accessibilitiesLevel) {
|
|
50
|
+
state.accessibilitiesLevel = accessibilitiesLevel.results;
|
|
51
|
+
}
|
|
38
52
|
state.currentPois = pois.results;
|
|
39
53
|
state.currentInformationDesks = informationDesks.results;
|
|
40
54
|
state.currentTrek = trek;
|
|
41
55
|
});
|
|
42
56
|
}
|
|
43
57
|
disconnectedCallback() {
|
|
58
|
+
this.controller.abort();
|
|
44
59
|
state.currentTrek = null;
|
|
45
60
|
}
|
|
46
61
|
render() {
|
|
@@ -3,10 +3,12 @@ import state from 'store/store';
|
|
|
3
3
|
export class GrwTreksProvider {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.language = 'fr';
|
|
6
|
+
this.controller = new AbortController();
|
|
7
|
+
this.signal = this.controller.signal;
|
|
6
8
|
}
|
|
7
9
|
componentWillLoad() {
|
|
8
10
|
state.api = this.api;
|
|
9
|
-
let treksRequest = `${this.api}trek/?language=${this.language}`;
|
|
11
|
+
let treksRequest = `${this.api}trek/?language=${this.language}&published=true`;
|
|
10
12
|
this.inBbox && (treksRequest += `&in_bbox=${this.inBbox}`);
|
|
11
13
|
this.cities && (treksRequest += `&cities=${this.cities}`);
|
|
12
14
|
this.districts && (treksRequest += `&districts=${this.districts}`);
|
|
@@ -17,11 +19,11 @@ export class GrwTreksProvider {
|
|
|
17
19
|
this.practices && (treksRequest += `&practices=${this.practices}`);
|
|
18
20
|
treksRequest += `&fields=id,name,attachments,description_teaser,difficulty,duration,ascent,length_2d,practice,themes,route,departure,departure_geom&page_size=999`;
|
|
19
21
|
return Promise.all([
|
|
20
|
-
fetch(`${this.api}trek_difficulty/?language=${this.language}&fields=id,label,pictogram
|
|
21
|
-
fetch(`${this.api}trek_route/?language=${this.language}&fields=id,route,pictogram
|
|
22
|
-
fetch(`${this.api}trek_practice/?language=${this.language}&fields=id,name,pictogram
|
|
23
|
-
fetch(`${this.api}theme/?language=${this.language}&fields=id,label,pictogram
|
|
24
|
-
fetch(treksRequest),
|
|
22
|
+
fetch(`${this.api}trek_difficulty/?language=${this.language}&fields=id,label,pictogram`, { signal: this.signal }),
|
|
23
|
+
fetch(`${this.api}trek_route/?language=${this.language}&fields=id,route,pictogram`, { signal: this.signal }),
|
|
24
|
+
fetch(`${this.api}trek_practice/?language=${this.language}&fields=id,name,pictogram`, { signal: this.signal }),
|
|
25
|
+
fetch(`${this.api}theme/?language=${this.language}&fields=id,label,pictogram`, { signal: this.signal }),
|
|
26
|
+
fetch(treksRequest, { signal: this.signal }),
|
|
25
27
|
])
|
|
26
28
|
.then(responses => Promise.all(responses.map(response => response.json())))
|
|
27
29
|
.then(([difficulties, routes, practices, themes, treks]) => {
|
|
@@ -37,8 +39,12 @@ export class GrwTreksProvider {
|
|
|
37
39
|
];
|
|
38
40
|
state.treks = treks.results;
|
|
39
41
|
state.currentTreks = treks.results;
|
|
42
|
+
state.treksWithinBounds = treks.results;
|
|
40
43
|
});
|
|
41
44
|
}
|
|
45
|
+
disconnectedCallback() {
|
|
46
|
+
this.controller.abort();
|
|
47
|
+
}
|
|
42
48
|
render() {
|
|
43
49
|
return h(Host, null);
|
|
44
50
|
}
|
|
@@ -3,14 +3,20 @@ const { state, onChange } = createStore({
|
|
|
3
3
|
api: '',
|
|
4
4
|
treks: [],
|
|
5
5
|
currentTreks: [],
|
|
6
|
+
treksWithinBounds: [],
|
|
7
|
+
currentMapTreksBounds: null,
|
|
6
8
|
difficulties: [],
|
|
7
9
|
routes: [],
|
|
8
10
|
practices: [],
|
|
9
11
|
themes: [],
|
|
10
12
|
durations: [],
|
|
11
13
|
currentSensitiveAreas: null,
|
|
12
|
-
|
|
14
|
+
labels: null,
|
|
15
|
+
sources: null,
|
|
16
|
+
accessibilities: null,
|
|
17
|
+
accessibilitiesLevel: null,
|
|
13
18
|
currentTrek: null,
|
|
19
|
+
currentPois: null,
|
|
14
20
|
currentInformationDesks: null,
|
|
15
21
|
});
|
|
16
22
|
export { onChange };
|
|
@@ -21,11 +21,11 @@ const GrwApp$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
21
21
|
this.__registerHost();
|
|
22
22
|
this.__attachShadow();
|
|
23
23
|
this.showTrek = false;
|
|
24
|
-
this.
|
|
24
|
+
this.showTreksMap = false;
|
|
25
|
+
this.showTrekMap = false;
|
|
25
26
|
this.showFilters = false;
|
|
26
27
|
this.isLargeView = false;
|
|
27
28
|
this.language = 'fr';
|
|
28
|
-
this.appName = 'Geotrek Rando Widget';
|
|
29
29
|
this.colorPrimary = '#6b0030';
|
|
30
30
|
this.colorPrimaryShade = '#4a0021';
|
|
31
31
|
this.colorPrimaryTint = '#974c6e';
|
|
@@ -34,11 +34,15 @@ const GrwApp$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
34
34
|
this.colorArrivalIcon = '#85003b';
|
|
35
35
|
this.colorSensitiveArea = '#4974a5';
|
|
36
36
|
this.colorPoiIcon = '#974c6e';
|
|
37
|
+
this.handlePopStateBind = this.handlePopState.bind(this);
|
|
37
38
|
this.largeViewSize = 1024;
|
|
38
39
|
}
|
|
39
40
|
onTrekCardPress(event) {
|
|
40
41
|
this.currentTrekId = event.detail;
|
|
41
42
|
this.showTrek = !this.showTrek;
|
|
43
|
+
const url = new URL(window.location.toString());
|
|
44
|
+
url.searchParams.set('trek', this.currentTrekId.toString());
|
|
45
|
+
window.history.pushState({}, '', url);
|
|
42
46
|
}
|
|
43
47
|
onWindowResize() {
|
|
44
48
|
this.handleView();
|
|
@@ -48,6 +52,14 @@ const GrwApp$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
48
52
|
}
|
|
49
53
|
componentDidLoad() {
|
|
50
54
|
this.handleView();
|
|
55
|
+
window.addEventListener('popstate', this.handlePopStateBind, false);
|
|
56
|
+
const url = new URL(window.location.toString());
|
|
57
|
+
const trekParam = url.searchParams.get('trek');
|
|
58
|
+
if (trekParam) {
|
|
59
|
+
window.history.replaceState({ isInitialHistoryWithTrek: true }, '', url);
|
|
60
|
+
this.currentTrekId = Number(trekParam);
|
|
61
|
+
this.showTrek = !this.showTrek;
|
|
62
|
+
}
|
|
51
63
|
}
|
|
52
64
|
onTrekDetailsClose() {
|
|
53
65
|
this.currentTrekId = null;
|
|
@@ -55,13 +67,47 @@ const GrwApp$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
55
67
|
}
|
|
56
68
|
handleView() {
|
|
57
69
|
this.isLargeView = this.element.getBoundingClientRect().width >= this.largeViewSize;
|
|
58
|
-
this.
|
|
70
|
+
this.showTreksMap = this.isLargeView;
|
|
71
|
+
this.showTrekMap = this.isLargeView;
|
|
59
72
|
}
|
|
60
73
|
handleFilters() {
|
|
61
74
|
this.showFilters = !this.showFilters;
|
|
62
75
|
}
|
|
76
|
+
handleBackButton() {
|
|
77
|
+
if (window.history.state.isInitialHistoryWithTrek) {
|
|
78
|
+
this.onTrekDetailsClose();
|
|
79
|
+
const url = new URL(window.location.toString());
|
|
80
|
+
url.searchParams.delete('trek');
|
|
81
|
+
window.history.pushState({}, '', url);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
window.history.back();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
handlePopState() {
|
|
88
|
+
const url = new URL(window.location.toString());
|
|
89
|
+
const trekParam = url.searchParams.get('trek');
|
|
90
|
+
if (trekParam) {
|
|
91
|
+
this.currentTrekId = Number(trekParam);
|
|
92
|
+
this.showTrek = !this.showTrek;
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
this.onTrekDetailsClose();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
handleShowMap() {
|
|
99
|
+
if (this.currentTrekId) {
|
|
100
|
+
this.showTrekMap = !this.showTrekMap;
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
this.showTreksMap = !this.showTreksMap;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
disconnectedCallback() {
|
|
107
|
+
window.removeEventListener('popstate', this.handlePopStateBind);
|
|
108
|
+
}
|
|
63
109
|
render() {
|
|
64
|
-
return (h(Host, { style: { '--color-primary': this.colorPrimary, '--color-primary-tint': this.colorPrimaryTint, '--color-primary-shade': this.colorPrimaryShade } }, h("grw-treks-provider", { api: this.api, language: this.language, "in-bbox": this.inBbox, cities: this.cities, districts: this.districts, structures: this.structures, themes: this.themes, portals: this.portals, routes: this.routes, practices: this.practices }), this.showTrek && this.currentTrekId && h("grw-trek-provider", { api: state.api, language: this.language, "trek-id": this.currentTrekId }), h("div", { class: "app-container" }, h("div", { class: this.isLargeView ? 'large-view-header-container' : 'header-container' }, this.showTrek ? (h("div", { onClick: () => this.
|
|
110
|
+
return (h(Host, { style: { '--color-primary': this.colorPrimary, '--color-primary-tint': this.colorPrimaryTint, '--color-primary-shade': this.colorPrimaryShade } }, h("grw-treks-provider", { api: this.api, language: this.language, "in-bbox": this.inBbox, cities: this.cities, districts: this.districts, structures: this.structures, themes: this.themes, portals: this.portals, routes: this.routes, practices: this.practices }), this.showTrek && this.currentTrekId && h("grw-trek-provider", { api: state.api, language: this.language, "trek-id": this.currentTrekId }), h("div", { class: "app-container" }, h("div", { class: this.isLargeView ? 'large-view-header-container' : 'header-container' }, this.showTrek ? (h("div", { onClick: () => this.handleBackButton(), class: "arrow-back-icon", innerHTML: arrowBackImage })) : (h("div", { onClick: () => this.handleFilters(), class: "handle-filters-button" }, "FILTRER")), !this.showTrek && this.showFilters && (h("div", { class: "options-container" }, h("div", { class: "filters-container" }, h("div", { class: "current-treks-length" }, `${state.currentTreks.length} résultat${state.currentTreks.length > 1 ? 's' : ''}`), h("div", { onClick: () => this.handleFilters(), class: "close-filters-button" }, "X"), h("div", null, h("grw-filter", { filterName: "Pratique", filterType: "practices", filterNameProperty: "name" })), h("div", { class: "filter-margin-top" }, h("grw-filter", { filterName: "Difficult\u00E9", filterType: "difficulties", filterNameProperty: "label" })), h("div", { class: "filter-margin-top" }, h("grw-filter", { filterName: "Dur\u00E9e", filterType: "durations", filterNameProperty: "name" }))), h("div", { onClick: () => this.handleFilters(), class: "back-filters-container" }))), h("div", { class: "attribution-container" }, h("a", { target: "_blank", href: "https://geotrek.fr" }, "GEOTREK"))), h("div", { class: "content-container" }, h("div", { class: this.isLargeView ? 'large-view-app-treks-list-container' : 'app-treks-list-container', style: { display: this.showTrek ? 'none' : 'flex', position: this.showTrek ? 'absolute' : 'relative' } }, h("grw-treks-list", { "is-large-view": this.isLargeView, "color-primary": this.colorPrimary, "color-primary-tint": this.colorPrimaryTint })), this.showTrek && !state.currentTrek && (h("div", { class: this.isLargeView ? 'large-view-loader-container' : 'loader-container' }, h("span", { class: "loader" }))), state.currentTrek && (h("div", { class: this.isLargeView ? 'large-view-app-trek-detail-container' : 'app-trek-detail-container' }, h("grw-trek-detail", { "color-primary": this.colorPrimary, "color-primary-shade": this.colorPrimaryShade, "color-primary-tint": this.colorPrimaryTint }))), h("grw-map", { class: this.isLargeView ? 'large-view-app-map-container' : 'app-map-container', style: { visibility: (this.showTreksMap && !this.showTrek) || (this.showTrekMap && this.showTrek) ? 'visible' : 'hidden' }, "url-layer": this.urlLayer, center: this.center, zoom: this.zoom, attribution: this.attribution, "color-primary": this.colorPrimary, "color-primary-tint": this.colorPrimaryTint, "color-trek-line": this.colorTrekLine, "color-departure-icon": this.colorDepartureIcon, "color-arrival-icon": this.colorArrivalIcon, "color-sensitive-area": this.colorSensitiveArea, "color-poi-icon": this.colorPoiIcon })), h("div", { class: "map-visibility-button", style: { display: this.isLargeView ? 'none' : 'flex' } }, h("div", { onClick: () => this.handleShowMap() }, this.showTreksMap || this.showTrekMap ? (this.showTrek ? 'Voir la fiche' : 'Voir la liste') : 'Voir la carte')))));
|
|
65
111
|
}
|
|
66
112
|
get element() { return this; }
|
|
67
113
|
static get watchers() { return {
|
|
@@ -79,7 +125,6 @@ const GrwApp$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
79
125
|
"portals": [1],
|
|
80
126
|
"routes": [1],
|
|
81
127
|
"practices": [1],
|
|
82
|
-
"appName": [1, "app-name"],
|
|
83
128
|
"urlLayer": [1, "url-layer"],
|
|
84
129
|
"center": [1],
|
|
85
130
|
"zoom": [8],
|
|
@@ -93,7 +138,8 @@ const GrwApp$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
93
138
|
"colorSensitiveArea": [1, "color-sensitive-area"],
|
|
94
139
|
"colorPoiIcon": [1, "color-poi-icon"],
|
|
95
140
|
"showTrek": [32],
|
|
96
|
-
"
|
|
141
|
+
"showTreksMap": [32],
|
|
142
|
+
"showTrekMap": [32],
|
|
97
143
|
"showFilters": [32],
|
|
98
144
|
"isLargeView": [32],
|
|
99
145
|
"currentTrekId": [32]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const grwInformationDeskDetailCss = ":host{display:flex;flex-direction:column
|
|
3
|
+
const grwInformationDeskDetailCss = ":host{display:flex;flex-direction:column}:host a{color:var(--color-primary)}.information-desk-img{width:180px}.information-desk-img img{width:180px;border-radius:8px}.information-desk-sub-container{display:flex;flex-direction:column}.information-desk-name{color:var(--color-primary);font-size:24px;font-weight:bold;padding:12px 0px}.information-desk-description{font-size:16px}";
|
|
4
4
|
|
|
5
5
|
const GrwInformationDeskDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
6
|
constructor() {
|
|
@@ -9,7 +9,7 @@ const GrwInformationDeskDetail = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
9
9
|
this.__attachShadow();
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (h(Host, null, this.informationDesk.photo_url && (h("div", { class: "information-desk-img" }, h("img", { src: this.informationDesk.photo_url, loading: "lazy" }))), h("div", { class: "information-desk-
|
|
12
|
+
return (h(Host, null, this.informationDesk.photo_url && (h("div", { class: "information-desk-img" }, h("img", { src: this.informationDesk.photo_url, loading: "lazy" }))), h("div", { class: "information-desk-sub-container" }, this.informationDesk.name && h("div", { class: "information-desk-name" }, this.informationDesk.name), this.informationDesk.description && h("div", { class: "information-desk-description", innerHTML: this.informationDesk.description }), this.informationDesk.postal_code ||
|
|
13
13
|
this.informationDesk.municipality ||
|
|
14
14
|
(this.informationDesk.street && (h("div", null, this.informationDesk.postal_code, ` ${this.informationDesk.municipality}`, ` ${this.informationDesk.street}`))), this.informationDesk.phone && (h("div", null, h("a", { href: `tel:${this.informationDesk.phone}` }, this.informationDesk.phone))), this.informationDesk.email && (h("div", null, h("a", { href: `mailto:${this.informationDesk.email}` }, this.informationDesk.email))), this.informationDesk.website && (h("div", null, h("a", { href: `${this.informationDesk.website}` }, this.informationDesk.website))))));
|
|
15
15
|
}
|
|
@@ -14142,7 +14142,7 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
|
|
|
14142
14142
|
|
|
14143
14143
|
const departureArrivalImage = `<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><path d="M80,464V68.14a8,8,0,0,1,4-6.9C91.81,56.66,112.92,48,160,48c64,0,145,48,192,48a199.53,199.53,0,0,0,77.23-15.77A2,2,0,0,1,432,82.08V301.44a4,4,0,0,1-2.39,3.65C421.37,308.7,392.33,320,352,320c-48,0-128-32-192-32s-80,16-80,16" style=";fill:#ffffff;stroke:currentColor;stroke-linecap:round;stroke-miterlimit:10;stroke-width:32px"/></svg>`;
|
|
14144
14144
|
|
|
14145
|
-
const grwMapCss = ".leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none !important;max-height:none !important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none !important;max-height:none !important;width:auto;padding:0}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51, 181, 229, 0.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity 0.2s linear;-moz-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform 0.25s cubic-bezier(0,0,0.25,1);-moz-transition:-moz-transform 0.25s cubic-bezier(0,0,0.25,1);transition:transform 0.25s cubic-bezier(0,0,0.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078A8}.leaflet-zoom-box{border:2px dotted #38f;background:rgba(255,255,255,0.5)}.leaflet-container{font-family:\"Helvetica Neue\", Arial, Helvetica, sans-serif;font-size:12px;font-size:0.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px rgba(0,0,0,0.65);border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:black}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:bold 18px 'Lucida Console', Monaco, monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px rgba(0,0,0,0.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(images/layers.png);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(images/layers-2x.png);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(images/marker-icon.png)}.leaflet-container .leaflet-control-attribution{background:#fff;background:rgba(255, 255, 255, 0.8);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-control-attribution svg{display:inline !important}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;overflow:hidden;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;background:rgba(255, 255, 255, 0.5)}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,0.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:17px 0;margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:white;color:#333;box-shadow:0 3px 14px rgba(0,0,0,0.4)}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma, Verdana, sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto;border-bottom:1px solid #ddd;border-top:1px solid #ddd}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px rgba(0,0,0,0.4)}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:\"\"}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;color-adjust:exact}}grw-map{font-family:\"Roboto\";display:block;height:100%;max-height:100vh}.departure-icon svg,.arrival-icon svg{width:48px;height:48px}.departure-icon svg path,.arrival-icon svg path{fill:currentColor;stroke:currentColor}.departure-icon{color:var(--color-departure-icon)}.arrival-icon{color:var(--color-arrival-icon)}.trek-marker{background-color:var(--color-primary);border-radius:50%;display:flex;justify-content:center;align-items:center}.trek-marker img{width:36px !important}.map-loader-container{position:absolute;z-index:500;width:100%;height:100%;background:rgba(255, 255, 255, 0.5);display:flex;justify-content:center;align-items:center}.map-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-tint);border-bottom-color:var(--color-primary);border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.leaflet-popup-content{width:144px;margin:0}.trek-departure-popup{position:relative;display:flex;flex-direction:column;width:100px;height:auto;padding:24px}.trek-departure-popup img{border-radius:8px;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25)}.trek-departure-popup .trek-name{color:var(--color-primary);font-weight:bold;font-size:12px}.trek-departure-popup .trek-name-margin-top{margin-top:12px}.poi-tooltip .poi-name,.poi-tooltip .information-desks-name,.information-desks-tooltip .poi-name,.information-desks-tooltip .information-desks-name{color:var(--color-primary);font-weight:bold;font-size:12px}.sensitiveAreasCheckboxContainer{display:flex;justify-content:center;align-items:center;background-color:#ffffff;padding:8px;border-radius:8px;user-select:none}.sensitiveAreasCheckboxContainer input,.sensitiveAreasCheckboxContainer label{cursor:pointer}.sensitiveAreasCheckboxContainer input{margin:0}.sensitiveAreasCheckboxContainer label{padding-left:8px}.poi-icon,.information-desks-icon{background-color:var(--color-poi-icon);border-radius:50%;display:flex;justify-content:center;align-items:center}.poi-icon img,.information-desks-icon img{width:36px !important}.parking-icon{background-color:#0000ff;border-radius:50%;display:flex;justify-content:center;align-items:center;width:48px;height:48px;font-size:24px;color:#ffffff}";
|
|
14145
|
+
const grwMapCss = ".leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none !important;max-height:none !important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none !important;max-height:none !important;width:auto;padding:0}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51, 181, 229, 0.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity 0.2s linear;-moz-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform 0.25s cubic-bezier(0,0,0.25,1);-moz-transition:-moz-transform 0.25s cubic-bezier(0,0,0.25,1);transition:transform 0.25s cubic-bezier(0,0,0.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078A8}.leaflet-zoom-box{border:2px dotted #38f;background:rgba(255,255,255,0.5)}.leaflet-container{font-family:\"Helvetica Neue\", Arial, Helvetica, sans-serif;font-size:12px;font-size:0.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px rgba(0,0,0,0.65);border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:black}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:bold 18px 'Lucida Console', Monaco, monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px rgba(0,0,0,0.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(images/layers.png);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(images/layers-2x.png);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(images/marker-icon.png)}.leaflet-container .leaflet-control-attribution{background:#fff;background:rgba(255, 255, 255, 0.8);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-control-attribution svg{display:inline !important}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;overflow:hidden;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;background:rgba(255, 255, 255, 0.5)}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,0.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:17px 0;margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:white;color:#333;box-shadow:0 3px 14px rgba(0,0,0,0.4)}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma, Verdana, sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto;border-bottom:1px solid #ddd;border-top:1px solid #ddd}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px rgba(0,0,0,0.4)}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:\"\"}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;color-adjust:exact}}grw-map{font-family:\"Roboto\";display:block;height:100%;max-height:100vh}.departure-icon svg,.arrival-icon svg{width:48px;height:48px}.departure-icon svg path,.arrival-icon svg path{fill:currentColor;stroke:currentColor}.departure-icon{color:var(--color-departure-icon)}.arrival-icon{color:var(--color-arrival-icon)}.trek-marker{background-color:var(--color-primary);border-radius:50%;display:flex;justify-content:center;align-items:center}.trek-marker img{width:36px !important}.map-loader-container{position:absolute;z-index:500;width:100%;height:100%;background:rgba(255, 255, 255, 0.5);display:flex;justify-content:center;align-items:center}.map-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-tint);border-bottom-color:var(--color-primary);border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.leaflet-popup-content{width:144px;margin:0}.trek-departure-popup{position:relative;display:flex;flex-direction:column;width:100px;height:auto;padding:24px}.trek-departure-popup img{border-radius:8px;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25)}.trek-departure-popup .trek-name{color:var(--color-primary);font-weight:bold;font-size:12px}.trek-departure-popup .trek-name-margin-top{margin-top:12px}.poi-tooltip .poi-name,.poi-tooltip .information-desks-name,.poi-tooltip .sensitive-area-name,.information-desks-tooltip .poi-name,.information-desks-tooltip .information-desks-name,.information-desks-tooltip .sensitive-area-name,.sensitive-area-tooltip .poi-name,.sensitive-area-tooltip .information-desks-name,.sensitive-area-tooltip .sensitive-area-name{color:var(--color-primary);font-weight:bold;font-size:12px}.sensitiveAreasCheckboxContainer{display:flex;justify-content:center;align-items:center;background-color:#ffffff;padding:8px;border-radius:8px;user-select:none}.sensitiveAreasCheckboxContainer input,.sensitiveAreasCheckboxContainer label{cursor:pointer}.sensitiveAreasCheckboxContainer input{margin:0}.sensitiveAreasCheckboxContainer label{padding-left:8px}.poi-icon,.information-desks-icon{background-color:var(--color-poi-icon);border-radius:50%;display:flex;justify-content:center;align-items:center}.poi-icon img,.information-desks-icon img{width:36px !important}.parking-icon{background-color:#0000ff;border-radius:50%;display:flex;justify-content:center;align-items:center;width:48px;height:48px;font-size:24px;color:#ffffff}.point-reference-icon{background-color:#ff0000;border:1px solid #ffffff;border-radius:50%;display:flex;justify-content:center;align-items:center;width:24px;height:24px;font-size:18px;color:#ffffff}";
|
|
14146
14146
|
|
|
14147
14147
|
const GrwMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
14148
14148
|
constructor() {
|
|
@@ -14159,6 +14159,7 @@ const GrwMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
14159
14159
|
this.colorArrivalIcon = '#85003b';
|
|
14160
14160
|
this.colorSensitiveArea = ' #4974a5';
|
|
14161
14161
|
this.colorPoiIcon = '#974c6e';
|
|
14162
|
+
this.handleTreksWithinBoundsBind = this.handleTreksWithinBounds.bind(this);
|
|
14162
14163
|
}
|
|
14163
14164
|
componentDidLoad() {
|
|
14164
14165
|
this.map = leafletSrc.map(this.element, {
|
|
@@ -14215,16 +14216,18 @@ const GrwMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
14215
14216
|
},
|
|
14216
14217
|
});
|
|
14217
14218
|
}
|
|
14218
|
-
if (trekscurrentDepartureCoordinates.length > 0) {
|
|
14219
|
-
const bounds = leafletSrc.latLngBounds(trekscurrentDepartureCoordinates.map(coordinate => [coordinate[1], coordinate[0]]));
|
|
14220
|
-
this.currentBounds = bounds;
|
|
14221
|
-
this.map.fitBounds(this.currentBounds);
|
|
14222
|
-
}
|
|
14223
14219
|
if (!this.treksLayer) {
|
|
14220
|
+
if (trekscurrentDepartureCoordinates.length > 0 && !state.currentMapTreksBounds) {
|
|
14221
|
+
const bounds = leafletSrc.latLngBounds(trekscurrentDepartureCoordinates.map(coordinate => [coordinate[1], coordinate[0]]));
|
|
14222
|
+
this.map.fitBounds(bounds);
|
|
14223
|
+
}
|
|
14224
|
+
else {
|
|
14225
|
+
this.map.fitBounds(state.currentMapTreksBounds);
|
|
14226
|
+
}
|
|
14224
14227
|
this.treksLayer = leafletSrc.geoJSON(treksFeatureCollection, {
|
|
14225
14228
|
pointToLayer: (geoJsonPoint, latlng) => leafletSrc.marker(latlng, {
|
|
14226
14229
|
icon: leafletSrc.divIcon({
|
|
14227
|
-
html: geoJsonPoint.properties.practice
|
|
14230
|
+
html: geoJsonPoint.properties.practice ? `<img src=${geoJsonPoint.properties.practice} />` : `<img />`,
|
|
14228
14231
|
className: 'trek-marker',
|
|
14229
14232
|
iconSize: 48,
|
|
14230
14233
|
}),
|
|
@@ -14251,17 +14254,27 @@ const GrwMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
14251
14254
|
}).addTo(this.map);
|
|
14252
14255
|
}
|
|
14253
14256
|
else {
|
|
14257
|
+
if (trekscurrentDepartureCoordinates.length > 0) {
|
|
14258
|
+
const bounds = leafletSrc.latLngBounds(trekscurrentDepartureCoordinates.map(coordinate => [coordinate[1], coordinate[0]]));
|
|
14259
|
+
this.map.fitBounds(bounds);
|
|
14260
|
+
}
|
|
14254
14261
|
this.treksLayer.clearLayers();
|
|
14255
14262
|
this.treksLayer.addData(treksFeatureCollection);
|
|
14256
14263
|
}
|
|
14257
14264
|
!this.mapIsReady && (this.mapIsReady = !this.mapIsReady);
|
|
14265
|
+
this.map.on('moveend', this.handleTreksWithinBoundsBind);
|
|
14258
14266
|
}
|
|
14259
14267
|
removeTreks() {
|
|
14260
14268
|
if (this.treksLayer) {
|
|
14269
|
+
state.currentMapTreksBounds = this.map.getBounds();
|
|
14261
14270
|
this.map.removeLayer(this.treksLayer);
|
|
14262
14271
|
this.treksLayer = null;
|
|
14272
|
+
this.map.off('moveend', this.handleTreksWithinBoundsBind);
|
|
14263
14273
|
}
|
|
14264
14274
|
}
|
|
14275
|
+
handleTreksWithinBounds() {
|
|
14276
|
+
state.treksWithinBounds = state.currentTreks.filter(trek => this.map.getBounds().contains(leafletSrc.latLng(trek.departure_geom[1], trek.departure_geom[0])));
|
|
14277
|
+
}
|
|
14265
14278
|
addTrek() {
|
|
14266
14279
|
const currentTrekFeature = {
|
|
14267
14280
|
type: 'Feature',
|
|
@@ -14275,8 +14288,7 @@ const GrwMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
14275
14288
|
interactive: false,
|
|
14276
14289
|
}).addTo(this.map);
|
|
14277
14290
|
const bounds = leafletSrc.latLngBounds(state.currentTrek.geometry.coordinates.map(coordinate => [coordinate[1], coordinate[0]]));
|
|
14278
|
-
this.
|
|
14279
|
-
this.map.fitBounds(this.currentBounds);
|
|
14291
|
+
this.map.fitBounds(bounds);
|
|
14280
14292
|
const currentDepartureCoordinates = [state.currentTrek.geometry.coordinates.at(0)[0], state.currentTrek.geometry.coordinates.at(0)[1]];
|
|
14281
14293
|
const currentArrivalCoordinates = [state.currentTrek.geometry.coordinates.at(-1)[0], state.currentTrek.geometry.coordinates.at(-1)[1]];
|
|
14282
14294
|
const currentDepartureArrivalFeatureCollection = {
|
|
@@ -14335,11 +14347,24 @@ const GrwMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
14335
14347
|
for (const sensitiveArea of state.currentSensitiveAreas) {
|
|
14336
14348
|
currentSensitiveAreasFeatureCollection.features.push({
|
|
14337
14349
|
type: 'Feature',
|
|
14338
|
-
properties: {},
|
|
14350
|
+
properties: { name: sensitiveArea.name },
|
|
14339
14351
|
geometry: sensitiveArea.geometry,
|
|
14340
14352
|
});
|
|
14341
14353
|
}
|
|
14342
|
-
this.currentSensitiveAreasLayer = leafletSrc.geoJSON(currentSensitiveAreasFeatureCollection, {
|
|
14354
|
+
this.currentSensitiveAreasLayer = leafletSrc.geoJSON(currentSensitiveAreasFeatureCollection, {
|
|
14355
|
+
onEachFeature: (geoJsonPoint, layer) => {
|
|
14356
|
+
layer.once('mouseover', () => {
|
|
14357
|
+
const sensitiveAreaTooltip = leafletSrc.DomUtil.create('div');
|
|
14358
|
+
sensitiveAreaTooltip.className = 'sensitive-area-tooltip';
|
|
14359
|
+
const sensitiveAreaName = leafletSrc.DomUtil.create('div');
|
|
14360
|
+
sensitiveAreaName.innerHTML = geoJsonPoint.properties.name;
|
|
14361
|
+
sensitiveAreaName.className = 'sensitive-area-name';
|
|
14362
|
+
sensitiveAreaTooltip.appendChild(sensitiveAreaName);
|
|
14363
|
+
layer.bindTooltip(sensitiveAreaTooltip).openTooltip();
|
|
14364
|
+
});
|
|
14365
|
+
},
|
|
14366
|
+
style: () => ({ color: this.colorSensitiveArea }),
|
|
14367
|
+
}).addTo(this.map);
|
|
14343
14368
|
leafletSrc.Control.SensitiveAreasCheckboxContainer = leafletSrc.Control.extend({
|
|
14344
14369
|
onAdd: () => {
|
|
14345
14370
|
const sensitiveAreasCheckboxContainer = leafletSrc.DomUtil.create('div');
|
|
@@ -14433,6 +14458,32 @@ const GrwMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
14433
14458
|
},
|
|
14434
14459
|
}).addTo(this.map);
|
|
14435
14460
|
}
|
|
14461
|
+
if (state.currentTrek.points_reference) {
|
|
14462
|
+
const currentPointsReferenceFeatureCollection = {
|
|
14463
|
+
type: 'FeatureCollection',
|
|
14464
|
+
features: [],
|
|
14465
|
+
};
|
|
14466
|
+
currentPointsReferenceFeatureCollection.features.push({
|
|
14467
|
+
type: 'Feature',
|
|
14468
|
+
properties: {},
|
|
14469
|
+
geometry: state.currentTrek.points_reference,
|
|
14470
|
+
});
|
|
14471
|
+
let index = 0;
|
|
14472
|
+
this.currentPointsReferenceLayer = leafletSrc.geoJSON(currentPointsReferenceFeatureCollection, {
|
|
14473
|
+
pointToLayer: (_geoJsonPoint, latlng) => {
|
|
14474
|
+
index += 1;
|
|
14475
|
+
return leafletSrc.marker(latlng, {
|
|
14476
|
+
icon: leafletSrc.divIcon({
|
|
14477
|
+
html: index,
|
|
14478
|
+
className: 'point-reference-icon',
|
|
14479
|
+
iconSize: 24,
|
|
14480
|
+
}),
|
|
14481
|
+
autoPanOnFocus: false,
|
|
14482
|
+
interactive: false,
|
|
14483
|
+
});
|
|
14484
|
+
},
|
|
14485
|
+
}).addTo(this.map);
|
|
14486
|
+
}
|
|
14436
14487
|
!this.mapIsReady && (this.mapIsReady = !this.mapIsReady);
|
|
14437
14488
|
}
|
|
14438
14489
|
removeTrek() {
|
|
@@ -14462,6 +14513,10 @@ const GrwMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
14462
14513
|
this.map.removeLayer(this.currentInformationDesksLayer);
|
|
14463
14514
|
this.currentInformationDesksLayer = null;
|
|
14464
14515
|
}
|
|
14516
|
+
if (this.currentPointsReferenceLayer) {
|
|
14517
|
+
this.map.removeLayer(this.currentPointsReferenceLayer);
|
|
14518
|
+
this.currentPointsReferenceLayer = null;
|
|
14519
|
+
}
|
|
14465
14520
|
}
|
|
14466
14521
|
render() {
|
|
14467
14522
|
return (h(Host, { style: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const grwPoiDetailCss = ":host{display:flex;flex-direction:column
|
|
3
|
+
const grwPoiDetailCss = ":host{display:flex;flex-direction:column}:host a{color:var(--color-primary)}.poi-img{width:180px}.poi-img img{width:180px;border-radius:8px}.poi-sub-container{display:flex;flex-direction:column}.poi-name{color:var(--color-primary);font-size:24px;font-weight:bold;padding:12px 0px}.poi-description{font-size:16px}";
|
|
4
4
|
|
|
5
5
|
const GrwPoiDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
6
|
constructor() {
|
|
@@ -9,7 +9,7 @@ const GrwPoiDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
9
9
|
this.__attachShadow();
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (h(Host, null, this.poi.attachments && this.poi.attachments[0] && this.poi.attachments[0].thumbnail && (h("div", { class: "poi-img" }, h("img", { src: this.poi.attachments[0].thumbnail, loading: "lazy" }))), h("div", { class: "poi-
|
|
12
|
+
return (h(Host, null, this.poi.attachments && this.poi.attachments[0] && this.poi.attachments[0].thumbnail && (h("div", { class: "poi-img" }, h("img", { src: this.poi.attachments[0].thumbnail, loading: "lazy" }))), h("div", { class: "poi-sub-container" }, h("div", { class: "poi-name" }, this.poi.name), h("div", { class: "poi-description", innerHTML: this.poi.description }))));
|
|
13
13
|
}
|
|
14
14
|
static get style() { return grwPoiDetailCss; }
|
|
15
15
|
}, [1, "grw-poi-detail", {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { s as state } from './store.js';
|
|
2
3
|
|
|
3
|
-
const grwSensitiveAreaDetailCss = ":host{display:flex;flex-direction:column
|
|
4
|
+
const grwSensitiveAreaDetailCss = ":host{display:flex;flex-direction:column}:host a{color:var(--color-primary)}.sensitive-area-title{color:var(--color-primary);font-size:24px;padding:12px 0px;font-weight:bold}.sensitive-area-description{font-size:16px}.sensitive-area-period-container .sensitive-area-period-title,.sensitive-area-period-container .sensitive-area-practice-title,.sensitive-area-period-container .sensitive-area-contact-title,.sensitive-area-practice-container .sensitive-area-period-title,.sensitive-area-practice-container .sensitive-area-practice-title,.sensitive-area-practice-container .sensitive-area-contact-title,.sensitive-area-contact-container .sensitive-area-period-title,.sensitive-area-contact-container .sensitive-area-practice-title,.sensitive-area-contact-container .sensitive-area-contact-title{color:var(--color-primary);font-size:24px;padding:12px 0px}.sensitive-area-period-container .sensitive-area-period-values,.sensitive-area-period-container .sensitive-area-practice-values,.sensitive-area-practice-container .sensitive-area-period-values,.sensitive-area-practice-container .sensitive-area-practice-values,.sensitive-area-contact-container .sensitive-area-period-values,.sensitive-area-contact-container .sensitive-area-practice-values{display:flex}";
|
|
4
5
|
|
|
5
6
|
const GrwSensitiveAreaDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
7
|
constructor() {
|
|
@@ -9,7 +10,11 @@ const GrwSensitiveAreaDetail = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
|
9
10
|
this.__attachShadow();
|
|
10
11
|
}
|
|
11
12
|
render() {
|
|
12
|
-
return (h(Host, null, h("div", { class: "sensitive-area-
|
|
13
|
+
return (h(Host, null, h("div", { class: "sensitive-area-title" }, this.sensitiveArea.name), h("div", { class: "sensitive-area-description", innerHTML: this.sensitiveArea.description }), this.sensitiveArea.practices && this.sensitiveArea.practices.length > 0 && (h("div", { class: "sensitive-area-practice-container" }, h("div", { class: "sensitive-area-practice-title" }, "Domaines d'activit\u00E9s concern\u00E9s :"), h("div", { class: "sensitive-area-practice-values" }, this.sensitiveArea.practices.map((practice, index) => (h("div", { innerHTML: `${state.practices.find(statePractice => statePractice.id === practice).name.toUpperCase()}${index + 1 !== this.sensitiveArea.practices.length ? ' - ' : ''}` })))))), this.sensitiveArea.period && this.sensitiveArea.period.length > 0 && (h("div", { class: "sensitive-area-period-container" }, h("div", { class: "sensitive-area-period-title" }, "P\u00E9riodes de sensibilit\u00E9"), h("div", { class: "sensitive-area-period-values" }, this.sensitiveArea.period.map((month, index) => {
|
|
14
|
+
if (month) {
|
|
15
|
+
return (h("div", { innerHTML: `${new Date(0, index + 1, 0).toLocaleDateString('fr', { month: 'long' }).toUpperCase()}${this.sensitiveArea.period.slice(index + 1).find(month => month) ? ' - ' : ''}` }));
|
|
16
|
+
}
|
|
17
|
+
})))), h("div", { class: "sensitive-area-contact-container" }, h("div", { class: "sensitive-area-contact-title" }, "Contact"), h("div", { innerHTML: this.sensitiveArea.contact, class: "sensitive-area-contact-value" }))));
|
|
13
18
|
}
|
|
14
19
|
static get style() { return grwSensitiveAreaDetailCss; }
|
|
15
20
|
}, [1, "grw-sensitive-area-detail", {
|