@geotrekce/geotrek-rando-widget 0.0.4 → 0.0.5
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 +93 -0
- package/dist/cjs/{grw-app_11.cjs.entry.js → grw-filter_6.cjs.entry.js} +138 -440
- 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-972b8d2a.js +209 -0
- package/dist/collection/components/grw-app/grw-app.js +36 -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 +45 -2
- 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 -4
- 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 +128 -4
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +87 -6
- package/dist/collection/store/grw-trek-provider.js +11 -3
- package/dist/collection/store/grw-treks-provider.js +1 -1
- package/dist/collection/store/store.js +5 -1
- package/dist/components/grw-app.js +34 -6
- package/dist/components/grw-information-desk-detail2.js +2 -2
- package/dist/components/grw-map2.js +46 -3
- 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 +17 -4
- package/dist/components/grw-trek-provider2.js +11 -3
- package/dist/components/grw-treks-provider2.js +1 -1
- package/dist/components/store.js +5 -1
- package/dist/esm/geotrek-rando-widget.js +2 -2
- package/dist/esm/grw-app.entry.js +89 -0
- package/dist/esm/{grw-app_11.entry.js → grw-filter_6.entry.js} +72 -369
- 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-5a42b5d8.js +206 -0
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
- package/dist/geotrek-rando-widget/p-206a52d9.entry.js +1 -0
- package/dist/geotrek-rando-widget/p-2d9ae918.entry.js +1 -0
- package/dist/geotrek-rando-widget/{p-8c206aec.js → p-6dce5e6c.js} +1 -1
- package/dist/geotrek-rando-widget/p-8cfa03c0.entry.js +1 -0
- package/dist/geotrek-rando-widget/p-d3aa9819.entry.js +1 -0
- package/dist/geotrek-rando-widget/p-e63213a9.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 +1 -0
- 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/store.d.ts +11 -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
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
|
-
|
|
4
|
+
}
|
|
5
|
+
:host a {
|
|
6
|
+
color: var(--color-primary);
|
|
5
7
|
}
|
|
6
8
|
|
|
7
9
|
.poi-img {
|
|
@@ -12,17 +14,16 @@
|
|
|
12
14
|
border-radius: 8px;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
|
-
.poi-
|
|
17
|
+
.poi-sub-container {
|
|
16
18
|
display: flex;
|
|
17
19
|
flex-direction: column;
|
|
18
|
-
padding: 8px;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
.poi-name {
|
|
22
23
|
color: var(--color-primary);
|
|
23
24
|
font-size: 24px;
|
|
24
25
|
font-weight: bold;
|
|
25
|
-
padding:
|
|
26
|
+
padding: 12px 0px;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
.poi-description {
|
|
@@ -4,7 +4,7 @@ export class GrwPoiDetail {
|
|
|
4
4
|
return (h(Host, null,
|
|
5
5
|
this.poi.attachments && this.poi.attachments[0] && this.poi.attachments[0].thumbnail && (h("div", { class: "poi-img" },
|
|
6
6
|
h("img", { src: this.poi.attachments[0].thumbnail, loading: "lazy" }))),
|
|
7
|
-
h("div", { class: "poi-
|
|
7
|
+
h("div", { class: "poi-sub-container" },
|
|
8
8
|
h("div", { class: "poi-name" }, this.poi.name),
|
|
9
9
|
h("div", { class: "poi-description", innerHTML: this.poi.description }))));
|
|
10
10
|
}
|
|
@@ -1,16 +1,39 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
|
-
|
|
4
|
+
}
|
|
5
|
+
:host a {
|
|
6
|
+
color: var(--color-primary);
|
|
5
7
|
}
|
|
6
8
|
|
|
7
|
-
.sensitive-area-
|
|
9
|
+
.sensitive-area-title {
|
|
8
10
|
color: var(--color-primary);
|
|
9
11
|
font-size: 24px;
|
|
10
|
-
|
|
11
|
-
padding: 0px 0px 8px 0px;
|
|
12
|
+
padding: 12px 0px;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
.sensitive-area-description {
|
|
15
16
|
font-size: 16px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.sensitive-area-period-container .sensitive-area-period-title,
|
|
20
|
+
.sensitive-area-period-container .sensitive-area-practice-title,
|
|
21
|
+
.sensitive-area-period-container .sensitive-area-contact-title,
|
|
22
|
+
.sensitive-area-practice-container .sensitive-area-period-title,
|
|
23
|
+
.sensitive-area-practice-container .sensitive-area-practice-title,
|
|
24
|
+
.sensitive-area-practice-container .sensitive-area-contact-title,
|
|
25
|
+
.sensitive-area-contact-container .sensitive-area-period-title,
|
|
26
|
+
.sensitive-area-contact-container .sensitive-area-practice-title,
|
|
27
|
+
.sensitive-area-contact-container .sensitive-area-contact-title {
|
|
28
|
+
color: var(--color-primary);
|
|
29
|
+
font-size: 24px;
|
|
30
|
+
padding: 12px 0px;
|
|
31
|
+
}
|
|
32
|
+
.sensitive-area-period-container .sensitive-area-period-values,
|
|
33
|
+
.sensitive-area-period-container .sensitive-area-practice-values,
|
|
34
|
+
.sensitive-area-practice-container .sensitive-area-period-values,
|
|
35
|
+
.sensitive-area-practice-container .sensitive-area-practice-values,
|
|
36
|
+
.sensitive-area-contact-container .sensitive-area-period-values,
|
|
37
|
+
.sensitive-area-contact-container .sensitive-area-practice-values {
|
|
38
|
+
display: flex;
|
|
16
39
|
}
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
import { Component, Host, h, Prop } from '@stencil/core';
|
|
2
|
+
import state from 'store/store';
|
|
2
3
|
export class GrwSensitiveAreaDetail {
|
|
3
4
|
render() {
|
|
4
5
|
return (h(Host, null,
|
|
5
|
-
h("div", { class: "sensitive-area-
|
|
6
|
-
h("div", { class: "sensitive-area-description", innerHTML: this.sensitiveArea.description })
|
|
6
|
+
h("div", { class: "sensitive-area-title" }, this.sensitiveArea.name),
|
|
7
|
+
h("div", { class: "sensitive-area-description", innerHTML: this.sensitiveArea.description }),
|
|
8
|
+
this.sensitiveArea.practices && this.sensitiveArea.practices.length > 0 && (h("div", { class: "sensitive-area-practice-container" },
|
|
9
|
+
h("div", { class: "sensitive-area-practice-title" }, "Domaines d'activit\u00E9s concern\u00E9s :"),
|
|
10
|
+
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 ? ' - ' : ''}` })))))),
|
|
11
|
+
this.sensitiveArea.period && this.sensitiveArea.period.length > 0 && (h("div", { class: "sensitive-area-period-container" },
|
|
12
|
+
h("div", { class: "sensitive-area-period-title" }, "P\u00E9riodes de sensibilit\u00E9"),
|
|
13
|
+
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
|
+
})))),
|
|
18
|
+
h("div", { class: "sensitive-area-contact-container" },
|
|
19
|
+
h("div", { class: "sensitive-area-contact-title" }, "Contact"),
|
|
20
|
+
h("div", { innerHTML: this.sensitiveArea.contact, class: "sensitive-area-contact-value" }))));
|
|
7
21
|
}
|
|
8
22
|
static get is() { return "grw-sensitive-area-detail"; }
|
|
9
23
|
static get encapsulation() { return "shadow"; }
|
|
@@ -19,7 +33,7 @@ export class GrwSensitiveAreaDetail {
|
|
|
19
33
|
"mutable": false,
|
|
20
34
|
"complexType": {
|
|
21
35
|
"original": "SensitiveArea",
|
|
22
|
-
"resolved": "{ id: number; geometry: Geometry; name: string; description: string; }",
|
|
36
|
+
"resolved": "{ id: number; geometry: Geometry; name: string; description: string; contact: string; info_url: string; period: boolean[]; practices: number[]; }",
|
|
23
37
|
"references": {
|
|
24
38
|
"SensitiveArea": {
|
|
25
39
|
"location": "import",
|
|
@@ -73,7 +73,7 @@ export class GrwTrekCard {
|
|
|
73
73
|
"mutable": false,
|
|
74
74
|
"complexType": {
|
|
75
75
|
"original": "Trek",
|
|
76
|
-
"resolved": "{ id: number; name: string; attachments: Attachments; description?: string; description_teaser: string; difficulty: number; route: number; practice: number; themes: number[]; duration: number; length_2d: number; ascent: number; departure: string; geometry?: LineString; departure_geom?: Position; gpx?: string; kml?: string; pdf?: string; parking_location?: Position; }",
|
|
76
|
+
"resolved": "{ id: number; name: string; attachments: Attachments; description?: string; description_teaser: string; difficulty: number; route: number; practice: number; themes: number[]; duration: number; length_2d: number; ascent: number; departure: string; arrival?: string; altimetric_profile?: string; geometry?: LineString; departure_geom?: Position; gpx?: string; kml?: string; pdf?: string; parking_location?: Position; ambiance?: string; access?: string; public_transport?: string; advice?: string; advised_parking?: string; gear?: string; labels?: number[]; points_reference?: MultiPoint; source?: number[]; structure?: number; disabled_infrastructure?: string; accessibilities?: number[]; accessibility_level?: number; accessibility_slope?: string; accessibility_width?: string; accessibility_signage?: string; accessibility_covering?: string; accessibility_exposure?: string; accessibility_advice?: string; }",
|
|
77
77
|
"references": {
|
|
78
78
|
"Trek": {
|
|
79
79
|
"location": "import",
|
|
@@ -65,7 +65,10 @@
|
|
|
65
65
|
.trek-detail-container .downloads-container .download-title {
|
|
66
66
|
color: var(--color-primary);
|
|
67
67
|
font-size: 18px;
|
|
68
|
-
margin-bottom:
|
|
68
|
+
margin-bottom: 12px;
|
|
69
|
+
}
|
|
70
|
+
.trek-detail-container .downloads-container .links-container {
|
|
71
|
+
display: flex;
|
|
69
72
|
}
|
|
70
73
|
.trek-detail-container .downloads-container .links-container a {
|
|
71
74
|
background-color: var(--color-primary);
|
|
@@ -80,14 +83,135 @@
|
|
|
80
83
|
.trek-detail-container .downloads-container .links-container a:hover {
|
|
81
84
|
background-color: var(--color-primary-shade);
|
|
82
85
|
}
|
|
83
|
-
.trek-detail-container .
|
|
86
|
+
.trek-detail-container .themes-container {
|
|
87
|
+
display: flex;
|
|
88
|
+
justify-content: flex-start;
|
|
89
|
+
align-items: center;
|
|
90
|
+
flex-wrap: wrap;
|
|
91
|
+
padding: 0px 24px 24px 24px;
|
|
92
|
+
}
|
|
93
|
+
.trek-detail-container .themes-container .theme {
|
|
94
|
+
background-color: var(--color-primary-tint);
|
|
95
|
+
color: #ffffff;
|
|
96
|
+
border-radius: 8px;
|
|
97
|
+
padding: 8px;
|
|
98
|
+
margin: 0px 8px 8px 0px;
|
|
99
|
+
}
|
|
100
|
+
.trek-detail-container .ambiance,
|
|
101
|
+
.trek-detail-container .description-teaser,
|
|
102
|
+
.trek-detail-container .description-container,
|
|
103
|
+
.trek-detail-container .altimetric-profile-container,
|
|
104
|
+
.trek-detail-container .access-container,
|
|
105
|
+
.trek-detail-container .public-transport-container,
|
|
106
|
+
.trek-detail-container .advice-container,
|
|
107
|
+
.trek-detail-container .advised-parking-container,
|
|
108
|
+
.trek-detail-container .gear-container,
|
|
109
|
+
.trek-detail-container .pois-container,
|
|
110
|
+
.trek-detail-container .sensitive-areas-container,
|
|
111
|
+
.trek-detail-container .information-desks-container,
|
|
112
|
+
.trek-detail-container .source-container,
|
|
113
|
+
.trek-detail-container .accessibilities-container {
|
|
84
114
|
padding: 0px 24px 24px 24px;
|
|
85
115
|
}
|
|
116
|
+
.trek-detail-container .ambiance a,
|
|
117
|
+
.trek-detail-container .description-teaser a,
|
|
118
|
+
.trek-detail-container .description-container a,
|
|
119
|
+
.trek-detail-container .altimetric-profile-container a,
|
|
120
|
+
.trek-detail-container .access-container a,
|
|
121
|
+
.trek-detail-container .public-transport-container a,
|
|
122
|
+
.trek-detail-container .advice-container a,
|
|
123
|
+
.trek-detail-container .advised-parking-container a,
|
|
124
|
+
.trek-detail-container .gear-container a,
|
|
125
|
+
.trek-detail-container .pois-container a,
|
|
126
|
+
.trek-detail-container .sensitive-areas-container a,
|
|
127
|
+
.trek-detail-container .information-desks-container a,
|
|
128
|
+
.trek-detail-container .source-container a,
|
|
129
|
+
.trek-detail-container .accessibilities-container a {
|
|
130
|
+
color: var(--color-primary);
|
|
131
|
+
}
|
|
132
|
+
.trek-detail-container .description-title,
|
|
133
|
+
.trek-detail-container .altimetric-profile-title,
|
|
134
|
+
.trek-detail-container .access-title,
|
|
135
|
+
.trek-detail-container .public-transport-title,
|
|
136
|
+
.trek-detail-container .advice-title,
|
|
137
|
+
.trek-detail-container .advised-parking-title,
|
|
138
|
+
.trek-detail-container .gear-title,
|
|
86
139
|
.trek-detail-container .pois-title,
|
|
87
140
|
.trek-detail-container .sensitive-areas-title,
|
|
88
|
-
.trek-detail-container .information-desks-title
|
|
141
|
+
.trek-detail-container .information-desks-title,
|
|
142
|
+
.trek-detail-container .source-title,
|
|
143
|
+
.trek-detail-container .accessibilities-title {
|
|
89
144
|
color: var(--color-primary);
|
|
90
145
|
font-size: 36px;
|
|
91
146
|
font-weight: bold;
|
|
92
|
-
|
|
147
|
+
margin: 12px 0px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.label-container .label-sub-container {
|
|
151
|
+
display: flex;
|
|
152
|
+
align-items: center;
|
|
153
|
+
}
|
|
154
|
+
.label-container .label-sub-container img {
|
|
155
|
+
width: 26px;
|
|
156
|
+
margin-right: 16px;
|
|
157
|
+
}
|
|
158
|
+
.label-container .label-sub-container .label-name {
|
|
159
|
+
color: var(--color-primary);
|
|
160
|
+
font-size: 24px;
|
|
161
|
+
font-weight: bold;
|
|
162
|
+
padding: 12px 0px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.source-container .source-sub-container {
|
|
166
|
+
display: flex;
|
|
167
|
+
align-items: center;
|
|
168
|
+
}
|
|
169
|
+
.source-container .source-sub-container img {
|
|
170
|
+
width: 26px;
|
|
171
|
+
margin-right: 16px;
|
|
172
|
+
}
|
|
173
|
+
.source-container .source-sub-container .source-name {
|
|
174
|
+
color: var(--color-primary);
|
|
175
|
+
font-size: 24px;
|
|
176
|
+
font-weight: bold;
|
|
177
|
+
padding: 12px 0px;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.departure-container,
|
|
181
|
+
.arrival-container {
|
|
182
|
+
display: flex;
|
|
183
|
+
align-items: center;
|
|
184
|
+
padding: 0px 24px 24px 24px;
|
|
185
|
+
}
|
|
186
|
+
.departure-container .departure-title,
|
|
187
|
+
.departure-container .arrival-title,
|
|
188
|
+
.arrival-container .departure-title,
|
|
189
|
+
.arrival-container .arrival-title {
|
|
190
|
+
color: var(--color-primary);
|
|
191
|
+
font-weight: bold;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.accessibilities-container .accessibilities-content-container {
|
|
195
|
+
padding: 12px 0px 0px 0px;
|
|
196
|
+
display: flex;
|
|
197
|
+
}
|
|
198
|
+
.accessibilities-container .accessibilities-content-container .accessibility-content-container {
|
|
199
|
+
display: flex;
|
|
200
|
+
align-items: center;
|
|
201
|
+
margin: 0px 8px 8px 0px;
|
|
202
|
+
}
|
|
203
|
+
.accessibilities-container .accessibilities-content-container .accessibility-content-container img {
|
|
204
|
+
margin-right: 16px;
|
|
205
|
+
width: 26px;
|
|
206
|
+
}
|
|
207
|
+
.accessibilities-container .accessibility-level-title,
|
|
208
|
+
.accessibilities-container .accessibility-slope-title,
|
|
209
|
+
.accessibilities-container .accessibility-width-title,
|
|
210
|
+
.accessibilities-container .accessibility-signage-title,
|
|
211
|
+
.accessibilities-container .accessibility-covering-title,
|
|
212
|
+
.accessibilities-container .accessibility-exposure-title,
|
|
213
|
+
.accessibilities-container .accessibility-advice-title {
|
|
214
|
+
color: var(--color-primary);
|
|
215
|
+
font-size: 24px;
|
|
216
|
+
padding: 12px 0px;
|
|
93
217
|
}
|
|
@@ -16,6 +16,11 @@ export class GrwTrekDetail {
|
|
|
16
16
|
this.difficulty = state.difficulties.find(difficulty => difficulty.id === this.currentTrek.difficulty);
|
|
17
17
|
this.route = state.routes.find(route => route.id === this.currentTrek.route);
|
|
18
18
|
this.practice = state.practices.find(practice => practice.id === this.currentTrek.practice);
|
|
19
|
+
this.themes = state.themes.filter(theme => this.currentTrek.themes.includes(theme.id));
|
|
20
|
+
this.labels = state.labels.filter(label => this.currentTrek.labels.includes(label.id));
|
|
21
|
+
this.sources = state.sources.filter(source => this.currentTrek.source.includes(source.id));
|
|
22
|
+
this.accessibilities = state.accessibilities.filter(accessibility => this.currentTrek.accessibilities.includes(accessibility.id));
|
|
23
|
+
this.accessibilityLevel = state.accessibilitiesLevel.find(accessibilityLevel => this.currentTrek.accessibility_level === accessibilityLevel.id);
|
|
19
24
|
}
|
|
20
25
|
onChange('currentTrek', () => {
|
|
21
26
|
this.currentTrek = this.trek ? this.trek : state.currentTrek;
|
|
@@ -23,6 +28,9 @@ export class GrwTrekDetail {
|
|
|
23
28
|
this.difficulty = state.difficulties.find(difficulty => difficulty.id === this.currentTrek.difficulty);
|
|
24
29
|
this.route = state.routes.find(route => route.id === this.currentTrek.route);
|
|
25
30
|
this.practice = state.practices.find(practice => practice.id === this.currentTrek.practice);
|
|
31
|
+
this.themes = state.themes.filter(theme => this.currentTrek.themes.includes(theme.id));
|
|
32
|
+
this.labels = state.labels.filter(label => this.currentTrek.labels.includes(label.id));
|
|
33
|
+
this.sources = state.sources.filter(source => this.currentTrek.source.includes(source.id));
|
|
26
34
|
}
|
|
27
35
|
});
|
|
28
36
|
}
|
|
@@ -59,16 +67,84 @@ export class GrwTrekDetail {
|
|
|
59
67
|
h("a", { href: `${this.currentTrek.gpx}` }, "GPX"),
|
|
60
68
|
h("a", { href: `${this.currentTrek.kml}` }, "KML"),
|
|
61
69
|
h("a", { href: `${this.currentTrek.pdf}` }, "PDF"))),
|
|
62
|
-
h("div", { class: "
|
|
70
|
+
this.themes.length > 0 && (h("div", { class: "themes-container" }, this.themes.map(theme => (h("div", { class: "theme" }, theme.label))))),
|
|
71
|
+
this.currentTrek.description_teaser && h("div", { class: "description-teaser", innerHTML: this.currentTrek.description_teaser }),
|
|
72
|
+
this.currentTrek.ambiance && h("div", { class: "ambiance", innerHTML: this.currentTrek.ambiance }),
|
|
73
|
+
this.currentTrek.description && (h("div", { class: "description-container" },
|
|
74
|
+
h("div", { class: "description-title" }, "Description"),
|
|
75
|
+
h("div", { class: "description", innerHTML: this.currentTrek.description }))),
|
|
76
|
+
this.currentTrek.departure && (h("div", { class: "departure-container" },
|
|
77
|
+
h("div", { class: "departure-title" }, "D\u00E9part :\u00A0"),
|
|
78
|
+
h("div", { innerHTML: this.currentTrek.departure }))),
|
|
79
|
+
this.currentTrek.arrival && (h("div", { class: "arrival-container" },
|
|
80
|
+
h("div", { class: "arrival-title" }, "Arriv\u00E9e :\u00A0"),
|
|
81
|
+
h("div", { innerHTML: this.currentTrek.arrival }))),
|
|
82
|
+
this.currentTrek.altimetric_profile && (h("div", { class: "altimetric-profile-container" },
|
|
83
|
+
h("div", { class: "altimetric-profile-title" }, "Profil altim\u00E9trique"),
|
|
84
|
+
h("img", { src: this.currentTrek.altimetric_profile }))),
|
|
85
|
+
this.currentTrek.access && (h("div", { class: "access-container" },
|
|
86
|
+
h("div", { class: "access-title" }, "Acc\u00E8s routier"),
|
|
87
|
+
h("div", { class: "access", innerHTML: this.currentTrek.access }))),
|
|
88
|
+
this.currentTrek.public_transport && (h("div", { class: "public-transport-container" },
|
|
89
|
+
h("div", { class: "public-transport-title" }, "Transport"),
|
|
90
|
+
h("div", { class: "public-transport", innerHTML: this.currentTrek.public_transport }))),
|
|
91
|
+
(this.currentTrek.advice || this.labels.length > 0) && (h("div", { class: "advice-container" },
|
|
92
|
+
h("div", { class: "advice-title" }, "Recommandations"),
|
|
93
|
+
this.currentTrek.advice && h("div", { class: "advice", innerHTML: this.currentTrek.advice }),
|
|
94
|
+
this.labels.map(label => (h("div", { class: "label-container" },
|
|
95
|
+
h("div", { class: "label-sub-container" },
|
|
96
|
+
label.pictogram && h("img", { src: label.pictogram }),
|
|
97
|
+
h("div", { class: "label-name", innerHTML: label.name })),
|
|
98
|
+
h("div", { class: "label-advice", innerHTML: label.advice })))))),
|
|
99
|
+
this.currentTrek.advised_parking && (h("div", { class: "advised-parking-container" },
|
|
100
|
+
h("div", { class: "advised-parking-title" }, "Parking conseill\u00E9"),
|
|
101
|
+
h("div", { class: "advised_parking", innerHTML: this.currentTrek.advised_parking }))),
|
|
102
|
+
this.currentTrek.gear && (h("div", { class: "gear-container" },
|
|
103
|
+
h("div", { class: "gear-title" }, "\u00C9quipements"),
|
|
104
|
+
h("div", { class: "gear", innerHTML: this.currentTrek.gear }))),
|
|
63
105
|
state.currentSensitiveAreas && state.currentSensitiveAreas.length > 0 && (h("div", { class: "sensitive-areas-container" },
|
|
64
|
-
h("div", { class: "sensitive-areas-title" }, "Zones
|
|
106
|
+
h("div", { class: "sensitive-areas-title" }, "Zones de sensibilit\u00E9 environnementale"),
|
|
65
107
|
state.currentSensitiveAreas.map(sensitiveArea => (h("grw-sensitive-area-detail", { sensitiveArea: sensitiveArea }))))),
|
|
66
108
|
state.currentInformationDesks && state.currentInformationDesks.length > 0 && (h("div", { class: "information-desks-container" },
|
|
67
109
|
h("div", { class: "information-desks-title" }, "Lieux de renseignement"),
|
|
68
110
|
state.currentInformationDesks.map(informationDesk => (h("grw-information-desk-detail", { informationDesk: informationDesk }))))),
|
|
111
|
+
h("div", { class: "accessibilities-container" },
|
|
112
|
+
h("div", { class: "accessibilities-title" }, "Accessibilit\u00E9"),
|
|
113
|
+
this.currentTrek.disabled_infrastructure && h("div", { innerHTML: this.currentTrek.disabled_infrastructure }),
|
|
114
|
+
h("div", { class: "accessibilities-content-container" }, this.accessibilities.map(accessibility => (h("div", { class: "accessibility-content-container" },
|
|
115
|
+
h("img", { src: accessibility.pictogram }),
|
|
116
|
+
h("div", { innerHTML: accessibility.name }))))),
|
|
117
|
+
this.currentTrek.accessibility_level && (h("div", { class: "accessibility-level-container" },
|
|
118
|
+
h("div", { class: "accessibility-level-title" }, "Niveau d'accessibilit\u00E9"),
|
|
119
|
+
h("div", { innerHTML: this.accessibilityLevel.name }))),
|
|
120
|
+
this.currentTrek.accessibility_slope && (h("div", { class: "accessibility-slope-container" },
|
|
121
|
+
h("div", { class: "accessibility-slope-title" }, "Pente"),
|
|
122
|
+
h("div", { innerHTML: this.currentTrek.accessibility_slope }))),
|
|
123
|
+
this.currentTrek.accessibility_width && (h("div", { class: "accessibility-width-container" },
|
|
124
|
+
h("div", { class: "accessibility-width-title" }, "Largeur"),
|
|
125
|
+
h("div", { innerHTML: this.currentTrek.accessibility_width }))),
|
|
126
|
+
this.currentTrek.accessibility_signage && (h("div", { class: "accessibility-signage-container" },
|
|
127
|
+
h("div", { class: "accessibility-signage-title" }, "Pente"),
|
|
128
|
+
h("div", { innerHTML: this.currentTrek.accessibility_signage }))),
|
|
129
|
+
this.currentTrek.accessibility_covering && (h("div", { class: "accessibility-covering-container" },
|
|
130
|
+
h("div", { class: "accessibility-covering-title" }, "Rev\u00EAtement"),
|
|
131
|
+
h("div", { innerHTML: this.currentTrek.accessibility_covering }))),
|
|
132
|
+
this.currentTrek.accessibility_exposure && (h("div", { class: "accessibility-exposure-container" },
|
|
133
|
+
h("div", { class: "accessibility-exposure-title" }, "Exposition"),
|
|
134
|
+
h("div", { innerHTML: this.currentTrek.accessibility_exposure }))),
|
|
135
|
+
this.currentTrek.accessibility_advice && (h("div", { class: "accessibility-advice-container" },
|
|
136
|
+
h("div", { class: "accessibility-advice-title" }, "Conseils"),
|
|
137
|
+
h("div", { innerHTML: this.currentTrek.accessibility_advice })))),
|
|
69
138
|
state.currentPois && state.currentPois.length > 0 && (h("div", { class: "pois-container" },
|
|
70
139
|
h("div", { class: "pois-title" }, "Points d'int\u00E9r\u00EAts"),
|
|
71
|
-
state.currentPois.map(poi => (h("grw-poi-detail", { poi: poi })))))
|
|
140
|
+
state.currentPois.map(poi => (h("grw-poi-detail", { poi: poi }))))),
|
|
141
|
+
this.currentTrek.source && this.currentTrek.source.length > 0 && (h("div", { class: "source-container" },
|
|
142
|
+
h("div", { class: "source-title" }, "Sources"),
|
|
143
|
+
this.sources.map(source => (h("div", { class: "source-sub-container" },
|
|
144
|
+
source.pictogram && h("img", { src: source.pictogram }),
|
|
145
|
+
h("div", null,
|
|
146
|
+
h("div", { class: "source-name", innerHTML: source.name }),
|
|
147
|
+
h("a", { class: "source-advice", innerHTML: source.website })))))))))));
|
|
72
148
|
}
|
|
73
149
|
static get is() { return "grw-trek-detail"; }
|
|
74
150
|
static get encapsulation() { return "shadow"; }
|
|
@@ -84,7 +160,7 @@ export class GrwTrekDetail {
|
|
|
84
160
|
"mutable": false,
|
|
85
161
|
"complexType": {
|
|
86
162
|
"original": "Trek",
|
|
87
|
-
"resolved": "{ id: number; name: string; attachments: Attachments; description?: string; description_teaser: string; difficulty: number; route: number; practice: number; themes: number[]; duration: number; length_2d: number; ascent: number; departure: string; geometry?: LineString; departure_geom?: Position; gpx?: string; kml?: string; pdf?: string; parking_location?: Position; }",
|
|
163
|
+
"resolved": "{ id: number; name: string; attachments: Attachments; description?: string; description_teaser: string; difficulty: number; route: number; practice: number; themes: number[]; duration: number; length_2d: number; ascent: number; departure: string; arrival?: string; altimetric_profile?: string; geometry?: LineString; departure_geom?: Position; gpx?: string; kml?: string; pdf?: string; parking_location?: Position; ambiance?: string; access?: string; public_transport?: string; advice?: string; advised_parking?: string; gear?: string; labels?: number[]; points_reference?: MultiPoint; source?: number[]; structure?: number; disabled_infrastructure?: string; accessibilities?: number[]; accessibility_level?: number; accessibility_slope?: string; accessibility_width?: string; accessibility_signage?: string; accessibility_covering?: string; accessibility_exposure?: string; accessibility_advice?: string; }",
|
|
88
164
|
"references": {
|
|
89
165
|
"Trek": {
|
|
90
166
|
"location": "import",
|
|
@@ -155,9 +231,14 @@ export class GrwTrekDetail {
|
|
|
155
231
|
}
|
|
156
232
|
}; }
|
|
157
233
|
static get states() { return {
|
|
158
|
-
"currentTrek": {},
|
|
159
234
|
"difficulty": {},
|
|
160
235
|
"route": {},
|
|
161
|
-
"practice": {}
|
|
236
|
+
"practice": {},
|
|
237
|
+
"themes": {},
|
|
238
|
+
"labels": {},
|
|
239
|
+
"sources": {},
|
|
240
|
+
"accessibilities": {},
|
|
241
|
+
"accessibilityLevel": {},
|
|
242
|
+
"currentTrek": {}
|
|
162
243
|
}; }
|
|
163
244
|
}
|
|
@@ -13,13 +13,17 @@ export class GrwTrekProvider {
|
|
|
13
13
|
requests.push(!state.themes ? fetch(`${this.api}theme/?language=${this.language}&fields=id,label,pictogram`) : new Response('null'));
|
|
14
14
|
return Promise.all([
|
|
15
15
|
...requests,
|
|
16
|
-
fetch(`${this.api}sensitivearea/?language=${this.language}&trek=${this.trekId}&fields=id,geometry,name,description`).catch(() => new Response('null')),
|
|
16
|
+
fetch(`${this.api}sensitivearea/?language=${this.language}&published=true&trek=${this.trekId}&fields=id,geometry,name,description,contact,info_url,period,practices`).catch(() => new Response('null')),
|
|
17
|
+
fetch(`${this.api}label/?language=${this.language}&fields=id,name,advice,pictogram`),
|
|
18
|
+
fetch(`${this.api}source/?language=${this.language}&fields=id,name,website,pictogram`),
|
|
19
|
+
fetch(`${this.api}trek_accessibility/?language=${this.language}&fields=id,name,pictogram`),
|
|
20
|
+
fetch(`${this.api}trek_accessibility_level/?language=${this.language}&fields=id,name`),
|
|
17
21
|
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`),
|
|
18
22
|
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`),
|
|
19
|
-
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`),
|
|
23
|
+
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`),
|
|
20
24
|
])
|
|
21
25
|
.then(responses => Promise.all(responses.map(response => response.json())))
|
|
22
|
-
.then(([difficulties, routes, practices, themes, sensitiveAreas, pois, informationDesks, trek]) => {
|
|
26
|
+
.then(([difficulties, routes, practices, themes, sensitiveAreas, labels, sources, accessibilities, accessibilitiesLevel, pois, informationDesks, trek]) => {
|
|
23
27
|
if (difficulties) {
|
|
24
28
|
state.difficulties = difficulties.results;
|
|
25
29
|
}
|
|
@@ -35,6 +39,10 @@ export class GrwTrekProvider {
|
|
|
35
39
|
if (sensitiveAreas) {
|
|
36
40
|
state.currentSensitiveAreas = sensitiveAreas.results;
|
|
37
41
|
}
|
|
42
|
+
state.labels = labels.results;
|
|
43
|
+
state.sources = sources.results;
|
|
44
|
+
state.accessibilities = accessibilities.results;
|
|
45
|
+
state.accessibilitiesLevel = accessibilitiesLevel.results;
|
|
38
46
|
state.currentPois = pois.results;
|
|
39
47
|
state.currentInformationDesks = informationDesks.results;
|
|
40
48
|
state.currentTrek = trek;
|
|
@@ -6,7 +6,7 @@ export class GrwTreksProvider {
|
|
|
6
6
|
}
|
|
7
7
|
componentWillLoad() {
|
|
8
8
|
state.api = this.api;
|
|
9
|
-
let treksRequest = `${this.api}trek/?language=${this.language}`;
|
|
9
|
+
let treksRequest = `${this.api}trek/?language=${this.language}&published=true`;
|
|
10
10
|
this.inBbox && (treksRequest += `&in_bbox=${this.inBbox}`);
|
|
11
11
|
this.cities && (treksRequest += `&cities=${this.cities}`);
|
|
12
12
|
this.districts && (treksRequest += `&districts=${this.districts}`);
|
|
@@ -9,8 +9,12 @@ const { state, onChange } = createStore({
|
|
|
9
9
|
themes: [],
|
|
10
10
|
durations: [],
|
|
11
11
|
currentSensitiveAreas: null,
|
|
12
|
-
|
|
12
|
+
labels: null,
|
|
13
|
+
sources: null,
|
|
14
|
+
accessibilities: null,
|
|
15
|
+
accessibilitiesLevel: null,
|
|
13
16
|
currentTrek: null,
|
|
17
|
+
currentPois: null,
|
|
14
18
|
currentInformationDesks: null,
|
|
15
19
|
});
|
|
16
20
|
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,20 +52,44 @@ const GrwApp$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
48
52
|
}
|
|
49
53
|
componentDidLoad() {
|
|
50
54
|
this.handleView();
|
|
55
|
+
window.addEventListener('popstate', this.handlePopStateBind, false);
|
|
51
56
|
}
|
|
52
57
|
onTrekDetailsClose() {
|
|
58
|
+
this.forwardTrekId = this.currentTrekId;
|
|
53
59
|
this.currentTrekId = null;
|
|
54
60
|
this.showTrek = !this.showTrek;
|
|
55
61
|
}
|
|
56
62
|
handleView() {
|
|
57
63
|
this.isLargeView = this.element.getBoundingClientRect().width >= this.largeViewSize;
|
|
58
|
-
this.
|
|
64
|
+
this.showTreksMap = this.isLargeView;
|
|
65
|
+
this.showTrekMap = this.isLargeView;
|
|
59
66
|
}
|
|
60
67
|
handleFilters() {
|
|
61
68
|
this.showFilters = !this.showFilters;
|
|
62
69
|
}
|
|
70
|
+
handlePopState() {
|
|
71
|
+
if (this.showTrek) {
|
|
72
|
+
this.onTrekDetailsClose();
|
|
73
|
+
}
|
|
74
|
+
else if (this.forwardTrekId) {
|
|
75
|
+
this.currentTrekId = this.forwardTrekId;
|
|
76
|
+
this.forwardTrekId = null;
|
|
77
|
+
this.showTrek = !this.showTrek;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
handleShowMap() {
|
|
81
|
+
if (this.currentTrekId) {
|
|
82
|
+
this.showTrekMap = !this.showTrekMap;
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
this.showTreksMap = !this.showTreksMap;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
disconnectedCallback() {
|
|
89
|
+
window.removeEventListener('popstate', this.handlePopStateBind);
|
|
90
|
+
}
|
|
63
91
|
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: () =>
|
|
92
|
+
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: () => window.history.back(), 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
93
|
}
|
|
66
94
|
get element() { return this; }
|
|
67
95
|
static get watchers() { return {
|
|
@@ -79,7 +107,6 @@ const GrwApp$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
79
107
|
"portals": [1],
|
|
80
108
|
"routes": [1],
|
|
81
109
|
"practices": [1],
|
|
82
|
-
"appName": [1, "app-name"],
|
|
83
110
|
"urlLayer": [1, "url-layer"],
|
|
84
111
|
"center": [1],
|
|
85
112
|
"zoom": [8],
|
|
@@ -93,7 +120,8 @@ const GrwApp$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
93
120
|
"colorSensitiveArea": [1, "color-sensitive-area"],
|
|
94
121
|
"colorPoiIcon": [1, "color-poi-icon"],
|
|
95
122
|
"showTrek": [32],
|
|
96
|
-
"
|
|
123
|
+
"showTreksMap": [32],
|
|
124
|
+
"showTrekMap": [32],
|
|
97
125
|
"showFilters": [32],
|
|
98
126
|
"isLargeView": [32],
|
|
99
127
|
"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
|
}
|