@geotrekce/geotrek-rando-widget 0.0.13 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/dist/cjs/{css-shim-6f592941.js → css-shim-06c204c1.js} +1 -1
  2. package/dist/cjs/{dom-d5e52c7e.js → dom-874a1e39.js} +1 -1
  3. package/dist/cjs/geotrek-rando-widget.cjs.js +4 -4
  4. package/dist/cjs/grw-app.cjs.entry.js +4 -3
  5. package/dist/cjs/grw-filter_6.cjs.entry.js +14447 -14156
  6. package/dist/cjs/grw-information-desk-detail_3.cjs.entry.js +2 -2
  7. package/dist/cjs/grw-trek-card.cjs.entry.js +15 -7
  8. package/dist/cjs/{index-66d58516.js → index-c3fb4999.js} +219 -66
  9. package/dist/cjs/loader.cjs.js +4 -4
  10. package/dist/cjs/{shadow-css-cf936b02.js → shadow-css-a33dc836.js} +1 -1
  11. package/dist/cjs/{store-d301af22.js → store-5183d8f8.js} +4 -2
  12. package/dist/collection/collection-manifest.json +2 -2
  13. package/dist/collection/components/grw-app/grw-app.js +432 -450
  14. package/dist/collection/components/grw-filter/grw-filter.js +65 -61
  15. package/dist/collection/components/grw-information-desk-detail/grw-information-desk-detail.js +35 -44
  16. package/dist/collection/components/grw-map/grw-map.css +5 -4
  17. package/dist/collection/components/grw-map/grw-map.js +251 -217
  18. package/dist/collection/components/grw-poi-detail/grw-poi-detail.js +33 -32
  19. package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.js +42 -47
  20. package/dist/collection/components/grw-trek-card/grw-trek-card.js +142 -129
  21. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +135 -208
  22. package/dist/collection/components/grw-treks-list/grw-treks-list.js +95 -65
  23. package/dist/collection/store/grw-trek-provider.js +61 -55
  24. package/dist/collection/store/grw-treks-provider.js +181 -177
  25. package/dist/collection/store/store.js +3 -2
  26. package/dist/components/grw-app.js +3 -2
  27. package/dist/components/grw-map2.js +14405 -14129
  28. package/dist/components/grw-trek-card2.js +17 -7
  29. package/dist/components/grw-trek-detail2.js +10 -3
  30. package/dist/components/grw-trek-provider2.js +6 -2
  31. package/dist/components/grw-treks-list2.js +7 -2
  32. package/dist/components/grw-treks-provider2.js +5 -3
  33. package/dist/components/store.js +3 -2
  34. package/dist/esm/{css-shim-2d0a698c.js → css-shim-bfa379cd.js} +1 -1
  35. package/dist/esm/{dom-9794f747.js → dom-104fb833.js} +1 -1
  36. package/dist/esm/geotrek-rando-widget.js +4 -4
  37. package/dist/esm/grw-app.entry.js +4 -3
  38. package/dist/esm/grw-filter_6.entry.js +14427 -14136
  39. package/dist/esm/grw-information-desk-detail_3.entry.js +2 -2
  40. package/dist/esm/grw-trek-card.entry.js +15 -7
  41. package/dist/esm/{index-899307bb.js → index-e834943f.js} +219 -66
  42. package/dist/esm/loader.js +4 -4
  43. package/dist/esm/{shadow-css-4cd4480f.js → shadow-css-4261c637.js} +1 -1
  44. package/dist/esm/{store-70461a28.js → store-c6ccb3db.js} +4 -3
  45. package/dist/esm-es5/{css-shim-2d0a698c.js → css-shim-bfa379cd.js} +0 -0
  46. package/dist/esm-es5/{dom-9794f747.js → dom-104fb833.js} +0 -0
  47. package/dist/esm-es5/geotrek-rando-widget.js +1 -1
  48. package/dist/esm-es5/grw-app.entry.js +1 -1
  49. package/dist/esm-es5/grw-filter_6.entry.js +4 -5
  50. package/dist/esm-es5/grw-information-desk-detail_3.entry.js +1 -1
  51. package/dist/esm-es5/grw-trek-card.entry.js +1 -1
  52. package/dist/esm-es5/{index-899307bb.js → index-e834943f.js} +1 -1
  53. package/dist/esm-es5/loader.js +1 -1
  54. package/dist/esm-es5/{shadow-css-4cd4480f.js → shadow-css-4261c637.js} +0 -0
  55. package/dist/esm-es5/{store-70461a28.js → store-c6ccb3db.js} +1 -1
  56. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
  57. package/dist/geotrek-rando-widget/geotrek-rando-widget.js +1 -1
  58. package/dist/geotrek-rando-widget/p-392538a1.system.entry.js +1 -0
  59. package/dist/geotrek-rando-widget/{p-d1582cff.js → p-4c61dcad.js} +0 -0
  60. package/dist/geotrek-rando-widget/p-4e0fcbe6.js +1 -0
  61. package/dist/geotrek-rando-widget/p-6469fc8a.system.js +1 -0
  62. package/dist/geotrek-rando-widget/{p-c8c96517.system.js → p-6523a23b.system.js} +0 -0
  63. package/dist/geotrek-rando-widget/{p-32d97a4f.system.js → p-70ecdd1b.system.js} +0 -0
  64. package/dist/geotrek-rando-widget/{p-0c5b047c.js → p-88046639.js} +0 -0
  65. package/dist/geotrek-rando-widget/p-88e55e13.entry.js +1 -0
  66. package/dist/geotrek-rando-widget/p-93d51eaa.entry.js +1 -0
  67. package/dist/geotrek-rando-widget/p-95932d69.system.entry.js +5 -0
  68. package/dist/geotrek-rando-widget/{p-4690907e.js → p-9c0d229f.js} +1 -1
  69. package/dist/geotrek-rando-widget/{p-b1530d9c.system.js → p-a8de6293.system.js} +0 -0
  70. package/dist/geotrek-rando-widget/p-d56c1888.system.entry.js +1 -0
  71. package/dist/geotrek-rando-widget/{p-533fc2bb.entry.js → p-dce99cef.entry.js} +1 -1
  72. package/dist/geotrek-rando-widget/{p-8f9914f4.system.js → p-e2d589f8.system.js} +1 -1
  73. package/dist/geotrek-rando-widget/{p-82ca029f.system.js → p-e3c13365.system.js} +1 -1
  74. package/dist/geotrek-rando-widget/{p-2bd0278f.system.entry.js → p-e9f13f25.system.entry.js} +1 -1
  75. package/dist/geotrek-rando-widget/{p-4eaf20b7.js → p-ef5d4167.js} +0 -0
  76. package/dist/geotrek-rando-widget/p-fce69064.entry.js +1 -0
  77. package/dist/types/components/grw-map/grw-map.d.ts +3 -1
  78. package/dist/types/components/grw-trek-card/grw-trek-card.d.ts +4 -1
  79. package/dist/types/components/grw-trek-detail/grw-trek-detail.d.ts +3 -1
  80. package/dist/types/components/grw-treks-list/grw-treks-list.d.ts +1 -0
  81. package/dist/types/components.d.ts +8 -0
  82. package/dist/types/store/store.d.ts +5 -3
  83. package/dist/types/types/types.d.ts +6 -0
  84. package/loader/package.json +1 -0
  85. package/package.json +12 -12
  86. package/readme.md +4 -6
  87. package/dist/geotrek-rando-widget/p-067c02c4.system.js +0 -1
  88. package/dist/geotrek-rando-widget/p-18038011.js +0 -1
  89. package/dist/geotrek-rando-widget/p-2712caa8.system.entry.js +0 -6
  90. package/dist/geotrek-rando-widget/p-3ed52659.entry.js +0 -1
  91. package/dist/geotrek-rando-widget/p-48d5dde7.entry.js +0 -1
  92. package/dist/geotrek-rando-widget/p-e1431f36.system.entry.js +0 -1
  93. package/dist/geotrek-rando-widget/p-e38f4ff4.system.entry.js +0 -1
  94. package/dist/geotrek-rando-widget/p-f5d98aae.entry.js +0 -1
@@ -1,4 +1,4 @@
1
- import { Component, h, Host, Prop } from '@stencil/core';
1
+ import { h, Host } from '@stencil/core';
2
2
  import state from 'store/store';
3
3
  export class GrwTrekProvider {
4
4
  constructor() {
@@ -13,6 +13,7 @@ export class GrwTrekProvider {
13
13
  requests.push(!state.routes ? fetch(`${this.api}trek_route/?language=${this.language}&fields=id,route,pictogram`, { signal: this.signal }) : new Response('null'));
14
14
  requests.push(!state.practices ? fetch(`${this.api}trek_practice/?language=${this.language}&fields=id,name,pictogram`, { signal: this.signal }) : new Response('null'));
15
15
  requests.push(!state.themes ? fetch(`${this.api}theme/?language=${this.language}&fields=id,label,pictogram`, { signal: this.signal }) : new Response('null'));
16
+ requests.push(!state.cities ? fetch(`${this.api}city/?language=${this.language}&fields=id,name&published=true`, { signal: this.signal }) : new Response('null'));
16
17
  Promise.all([
17
18
  ...requests,
18
19
  fetch(`${this.api}sensitivearea/?language=${this.language}&published=true&trek=${this.trekId}&fields=id,geometry,name,description,contact,info_url,period,practices`, {
@@ -27,10 +28,10 @@ export class GrwTrekProvider {
27
28
  }),
28
29
  fetch(`${this.api}poi_type/?language=${this.language}&fields=id,pictogram`, { signal: this.signal }),
29
30
  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 }),
30
- 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 }),
31
+ 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,departure_city,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 }),
31
32
  ])
32
33
  .then(responses => Promise.all(responses.map(response => response.json())))
33
- .then(([difficulties, routes, practices, themes, sensitiveAreas, labels, sources, accessibilities, accessibilitiesLevel, pois, poiTypes, informationDesks, trek]) => {
34
+ .then(([difficulties, routes, practices, themes, cities, sensitiveAreas, labels, sources, accessibilities, accessibilitiesLevel, pois, poiTypes, informationDesks, trek]) => {
34
35
  state.trekNetworkError = false;
35
36
  if (difficulties) {
36
37
  state.difficulties = difficulties.results;
@@ -44,6 +45,9 @@ export class GrwTrekProvider {
44
45
  if (themes) {
45
46
  state.themes = themes.results;
46
47
  }
48
+ if (cities) {
49
+ state.cities = cities.results;
50
+ }
47
51
  if (sensitiveAreas) {
48
52
  state.currentSensitiveAreas = sensitiveAreas.results;
49
53
  }
@@ -72,58 +76,60 @@ export class GrwTrekProvider {
72
76
  }
73
77
  static get is() { return "grw-trek-provider"; }
74
78
  static get encapsulation() { return "shadow"; }
75
- static get properties() { return {
76
- "language": {
77
- "type": "string",
78
- "mutable": false,
79
- "complexType": {
80
- "original": "string",
81
- "resolved": "string",
82
- "references": {}
83
- },
84
- "required": false,
85
- "optional": false,
86
- "docs": {
87
- "tags": [],
88
- "text": ""
89
- },
90
- "attribute": "language",
91
- "reflect": false,
92
- "defaultValue": "'fr'"
93
- },
94
- "api": {
95
- "type": "string",
96
- "mutable": false,
97
- "complexType": {
98
- "original": "string",
99
- "resolved": "string",
100
- "references": {}
101
- },
102
- "required": false,
103
- "optional": false,
104
- "docs": {
105
- "tags": [],
106
- "text": ""
79
+ static get properties() {
80
+ return {
81
+ "language": {
82
+ "type": "string",
83
+ "mutable": false,
84
+ "complexType": {
85
+ "original": "string",
86
+ "resolved": "string",
87
+ "references": {}
88
+ },
89
+ "required": false,
90
+ "optional": false,
91
+ "docs": {
92
+ "tags": [],
93
+ "text": ""
94
+ },
95
+ "attribute": "language",
96
+ "reflect": false,
97
+ "defaultValue": "'fr'"
107
98
  },
108
- "attribute": "api",
109
- "reflect": false
110
- },
111
- "trekId": {
112
- "type": "string",
113
- "mutable": false,
114
- "complexType": {
115
- "original": "string",
116
- "resolved": "string",
117
- "references": {}
99
+ "api": {
100
+ "type": "string",
101
+ "mutable": false,
102
+ "complexType": {
103
+ "original": "string",
104
+ "resolved": "string",
105
+ "references": {}
106
+ },
107
+ "required": false,
108
+ "optional": false,
109
+ "docs": {
110
+ "tags": [],
111
+ "text": ""
112
+ },
113
+ "attribute": "api",
114
+ "reflect": false
118
115
  },
119
- "required": false,
120
- "optional": false,
121
- "docs": {
122
- "tags": [],
123
- "text": ""
124
- },
125
- "attribute": "trek-id",
126
- "reflect": false
127
- }
128
- }; }
116
+ "trekId": {
117
+ "type": "string",
118
+ "mutable": false,
119
+ "complexType": {
120
+ "original": "string",
121
+ "resolved": "string",
122
+ "references": {}
123
+ },
124
+ "required": false,
125
+ "optional": false,
126
+ "docs": {
127
+ "tags": [],
128
+ "text": ""
129
+ },
130
+ "attribute": "trek-id",
131
+ "reflect": false
132
+ }
133
+ };
134
+ }
129
135
  }
@@ -1,4 +1,4 @@
1
- import { Component, h, Host, Prop } from '@stencil/core';
1
+ import { h, Host } from '@stencil/core';
2
2
  import state from 'store/store';
3
3
  export class GrwTreksProvider {
4
4
  constructor() {
@@ -17,30 +17,32 @@ export class GrwTreksProvider {
17
17
  this.portals && (treksRequest += `&portals=${this.portals}`);
18
18
  this.routes && (treksRequest += `&routes=${this.routes}`);
19
19
  this.practices && (treksRequest += `&practices=${this.practices}`);
20
- treksRequest += `&fields=id,name,attachments,description_teaser,difficulty,duration,ascent,length_2d,practice,themes,route,departure,departure_geom&page_size=999`;
20
+ treksRequest += `&fields=id,name,attachments,description_teaser,difficulty,duration,ascent,length_2d,practice,themes,route,departure,departure_city,departure_geom&page_size=999`;
21
21
  Promise.all([
22
22
  fetch(`${this.api}trek_difficulty/?language=${this.language}&fields=id,label,pictogram`, { signal: this.signal }),
23
23
  fetch(`${this.api}trek_route/?language=${this.language}&fields=id,route,pictogram`, { signal: this.signal }),
24
24
  fetch(`${this.api}trek_practice/?language=${this.language}&fields=id,name,pictogram`, { signal: this.signal }),
25
25
  fetch(`${this.api}theme/?language=${this.language}&fields=id,label,pictogram`, { signal: this.signal }),
26
+ fetch(`${this.api}city/?language=${this.language}&fields=id,name&published=true`, { signal: this.signal }),
26
27
  fetch(treksRequest, { signal: this.signal }),
27
28
  ])
28
29
  .then(responses => Promise.all(responses.map(response => response.json())))
29
- .then(([difficulties, routes, practices, themes, treks]) => {
30
+ .then(([difficulties, routes, practices, themes, cities, treks]) => {
30
31
  state.treksNetworkError = false;
31
32
  state.difficulties = difficulties.results;
32
33
  state.routes = routes.results;
33
34
  state.practices = practices.results.map(practice => (Object.assign(Object.assign({}, practice), { selected: false })));
34
35
  state.themes = themes.results;
36
+ state.cities = cities.results;
35
37
  state.durations = [
36
38
  { id: 1, name: '0 - 1h', minValue: 0, maxValue: 1, selected: false },
37
39
  { id: 2, name: '1 - 2h', minValue: 1, maxValue: 2, selected: false },
38
40
  { id: 3, name: '2 - 5h', minValue: 2, maxValue: 5, selected: false },
39
41
  { id: 4, name: '5 - 10h', minValue: 5, maxValue: 10, selected: false },
40
42
  ];
41
- state.treks = treks.results;
42
43
  state.currentTreks = treks.results;
43
44
  state.treksWithinBounds = treks.results;
45
+ state.treks = treks.results;
44
46
  })
45
47
  .catch(() => (state.treksNetworkError = true));
46
48
  }
@@ -53,177 +55,179 @@ export class GrwTreksProvider {
53
55
  }
54
56
  static get is() { return "grw-treks-provider"; }
55
57
  static get encapsulation() { return "shadow"; }
56
- static get properties() { return {
57
- "language": {
58
- "type": "string",
59
- "mutable": false,
60
- "complexType": {
61
- "original": "string",
62
- "resolved": "string",
63
- "references": {}
64
- },
65
- "required": false,
66
- "optional": false,
67
- "docs": {
68
- "tags": [],
69
- "text": ""
70
- },
71
- "attribute": "language",
72
- "reflect": false,
73
- "defaultValue": "'fr'"
74
- },
75
- "api": {
76
- "type": "string",
77
- "mutable": false,
78
- "complexType": {
79
- "original": "string",
80
- "resolved": "string",
81
- "references": {}
82
- },
83
- "required": false,
84
- "optional": false,
85
- "docs": {
86
- "tags": [],
87
- "text": ""
88
- },
89
- "attribute": "api",
90
- "reflect": false
91
- },
92
- "inBbox": {
93
- "type": "string",
94
- "mutable": false,
95
- "complexType": {
96
- "original": "string",
97
- "resolved": "string",
98
- "references": {}
99
- },
100
- "required": false,
101
- "optional": false,
102
- "docs": {
103
- "tags": [],
104
- "text": ""
105
- },
106
- "attribute": "in-bbox",
107
- "reflect": false
108
- },
109
- "cities": {
110
- "type": "string",
111
- "mutable": false,
112
- "complexType": {
113
- "original": "string",
114
- "resolved": "string",
115
- "references": {}
116
- },
117
- "required": false,
118
- "optional": false,
119
- "docs": {
120
- "tags": [],
121
- "text": ""
122
- },
123
- "attribute": "cities",
124
- "reflect": false
125
- },
126
- "districts": {
127
- "type": "string",
128
- "mutable": false,
129
- "complexType": {
130
- "original": "string",
131
- "resolved": "string",
132
- "references": {}
133
- },
134
- "required": false,
135
- "optional": false,
136
- "docs": {
137
- "tags": [],
138
- "text": ""
139
- },
140
- "attribute": "districts",
141
- "reflect": false
142
- },
143
- "structures": {
144
- "type": "string",
145
- "mutable": false,
146
- "complexType": {
147
- "original": "string",
148
- "resolved": "string",
149
- "references": {}
150
- },
151
- "required": false,
152
- "optional": false,
153
- "docs": {
154
- "tags": [],
155
- "text": ""
156
- },
157
- "attribute": "structures",
158
- "reflect": false
159
- },
160
- "themes": {
161
- "type": "string",
162
- "mutable": false,
163
- "complexType": {
164
- "original": "string",
165
- "resolved": "string",
166
- "references": {}
167
- },
168
- "required": false,
169
- "optional": false,
170
- "docs": {
171
- "tags": [],
172
- "text": ""
173
- },
174
- "attribute": "themes",
175
- "reflect": false
176
- },
177
- "portals": {
178
- "type": "string",
179
- "mutable": false,
180
- "complexType": {
181
- "original": "string",
182
- "resolved": "string",
183
- "references": {}
184
- },
185
- "required": false,
186
- "optional": false,
187
- "docs": {
188
- "tags": [],
189
- "text": ""
190
- },
191
- "attribute": "portals",
192
- "reflect": false
193
- },
194
- "routes": {
195
- "type": "string",
196
- "mutable": false,
197
- "complexType": {
198
- "original": "string",
199
- "resolved": "string",
200
- "references": {}
201
- },
202
- "required": false,
203
- "optional": false,
204
- "docs": {
205
- "tags": [],
206
- "text": ""
207
- },
208
- "attribute": "routes",
209
- "reflect": false
210
- },
211
- "practices": {
212
- "type": "string",
213
- "mutable": false,
214
- "complexType": {
215
- "original": "string",
216
- "resolved": "string",
217
- "references": {}
218
- },
219
- "required": false,
220
- "optional": false,
221
- "docs": {
222
- "tags": [],
223
- "text": ""
224
- },
225
- "attribute": "practices",
226
- "reflect": false
227
- }
228
- }; }
58
+ static get properties() {
59
+ return {
60
+ "language": {
61
+ "type": "string",
62
+ "mutable": false,
63
+ "complexType": {
64
+ "original": "string",
65
+ "resolved": "string",
66
+ "references": {}
67
+ },
68
+ "required": false,
69
+ "optional": false,
70
+ "docs": {
71
+ "tags": [],
72
+ "text": ""
73
+ },
74
+ "attribute": "language",
75
+ "reflect": false,
76
+ "defaultValue": "'fr'"
77
+ },
78
+ "api": {
79
+ "type": "string",
80
+ "mutable": false,
81
+ "complexType": {
82
+ "original": "string",
83
+ "resolved": "string",
84
+ "references": {}
85
+ },
86
+ "required": false,
87
+ "optional": false,
88
+ "docs": {
89
+ "tags": [],
90
+ "text": ""
91
+ },
92
+ "attribute": "api",
93
+ "reflect": false
94
+ },
95
+ "inBbox": {
96
+ "type": "string",
97
+ "mutable": false,
98
+ "complexType": {
99
+ "original": "string",
100
+ "resolved": "string",
101
+ "references": {}
102
+ },
103
+ "required": false,
104
+ "optional": false,
105
+ "docs": {
106
+ "tags": [],
107
+ "text": ""
108
+ },
109
+ "attribute": "in-bbox",
110
+ "reflect": false
111
+ },
112
+ "cities": {
113
+ "type": "string",
114
+ "mutable": false,
115
+ "complexType": {
116
+ "original": "string",
117
+ "resolved": "string",
118
+ "references": {}
119
+ },
120
+ "required": false,
121
+ "optional": false,
122
+ "docs": {
123
+ "tags": [],
124
+ "text": ""
125
+ },
126
+ "attribute": "cities",
127
+ "reflect": false
128
+ },
129
+ "districts": {
130
+ "type": "string",
131
+ "mutable": false,
132
+ "complexType": {
133
+ "original": "string",
134
+ "resolved": "string",
135
+ "references": {}
136
+ },
137
+ "required": false,
138
+ "optional": false,
139
+ "docs": {
140
+ "tags": [],
141
+ "text": ""
142
+ },
143
+ "attribute": "districts",
144
+ "reflect": false
145
+ },
146
+ "structures": {
147
+ "type": "string",
148
+ "mutable": false,
149
+ "complexType": {
150
+ "original": "string",
151
+ "resolved": "string",
152
+ "references": {}
153
+ },
154
+ "required": false,
155
+ "optional": false,
156
+ "docs": {
157
+ "tags": [],
158
+ "text": ""
159
+ },
160
+ "attribute": "structures",
161
+ "reflect": false
162
+ },
163
+ "themes": {
164
+ "type": "string",
165
+ "mutable": false,
166
+ "complexType": {
167
+ "original": "string",
168
+ "resolved": "string",
169
+ "references": {}
170
+ },
171
+ "required": false,
172
+ "optional": false,
173
+ "docs": {
174
+ "tags": [],
175
+ "text": ""
176
+ },
177
+ "attribute": "themes",
178
+ "reflect": false
179
+ },
180
+ "portals": {
181
+ "type": "string",
182
+ "mutable": false,
183
+ "complexType": {
184
+ "original": "string",
185
+ "resolved": "string",
186
+ "references": {}
187
+ },
188
+ "required": false,
189
+ "optional": false,
190
+ "docs": {
191
+ "tags": [],
192
+ "text": ""
193
+ },
194
+ "attribute": "portals",
195
+ "reflect": false
196
+ },
197
+ "routes": {
198
+ "type": "string",
199
+ "mutable": false,
200
+ "complexType": {
201
+ "original": "string",
202
+ "resolved": "string",
203
+ "references": {}
204
+ },
205
+ "required": false,
206
+ "optional": false,
207
+ "docs": {
208
+ "tags": [],
209
+ "text": ""
210
+ },
211
+ "attribute": "routes",
212
+ "reflect": false
213
+ },
214
+ "practices": {
215
+ "type": "string",
216
+ "mutable": false,
217
+ "complexType": {
218
+ "original": "string",
219
+ "resolved": "string",
220
+ "references": {}
221
+ },
222
+ "required": false,
223
+ "optional": false,
224
+ "docs": {
225
+ "tags": [],
226
+ "text": ""
227
+ },
228
+ "attribute": "practices",
229
+ "reflect": false
230
+ }
231
+ };
232
+ }
229
233
  }
@@ -1,5 +1,5 @@
1
1
  import { createStore } from '@stencil/store';
2
- const { state, onChange } = createStore({
2
+ const { state, onChange, reset } = createStore({
3
3
  api: '',
4
4
  treks: null,
5
5
  currentTreks: null,
@@ -9,6 +9,7 @@ const { state, onChange } = createStore({
9
9
  routes: [],
10
10
  practices: [],
11
11
  themes: [],
12
+ cities: [],
12
13
  durations: [],
13
14
  currentSensitiveAreas: null,
14
15
  labels: null,
@@ -22,5 +23,5 @@ const { state, onChange } = createStore({
22
23
  treksNetworkError: false,
23
24
  trekNetworkError: false,
24
25
  });
25
- export { onChange };
26
+ export { onChange, reset };
26
27
  export default state;
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { o as onChange, s as state } from './store.js';
2
+ import { o as onChange, s as state, r as reset } from './store.js';
3
3
  import { d as defineCustomElement$b } from './grw-filter2.js';
4
4
  import { d as defineCustomElement$a } from './grw-information-desk-detail2.js';
5
5
  import { d as defineCustomElement$9 } from './grw-map2.js';
@@ -115,10 +115,11 @@ const GrwApp$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
115
115
  }
116
116
  }
117
117
  disconnectedCallback() {
118
+ reset();
118
119
  window.removeEventListener('popstate', this.handlePopStateBind);
119
120
  }
120
121
  render() {
121
- return (h(Host, { style: { '--color-primary': this.colorPrimary, '--color-primary-tint': this.colorPrimaryTint, '--color-primary-shade': this.colorPrimaryShade } }, !state.currentTreks && !state.currentTrek && (h("div", { class: "init-loader-container" }, h("span", { class: "loader" }))), !this.showTrek && !state.treks && (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: this.api, language: this.language, "trek-id": this.currentTrekId }), (state.currentTreks || state.currentTrek) && (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", { class: "handle-filters-container" }, h("div", { onClick: () => this.handleFilters(), class: "handle-filters-button" }, "FILTRER"), state.treksWithinBounds && (h("div", { class: "current-treks-within-bounds-length" }, `${state.treksWithinBounds.length} randonnée${state.treksWithinBounds.length > 1 ? 's' : ''}`)))), !this.showTrek && this.showFilters && (h("div", { class: "options-container" }, h("div", { class: "filters-container" }, 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.showTrek ? (this.showTrekMap ? 'Voir la fiche' : 'Voir la carte') : this.showTreksMap ? 'Voir la liste' : 'Voir la carte'))))));
122
+ return (h(Host, { style: { '--color-primary': this.colorPrimary, '--color-primary-tint': this.colorPrimaryTint, '--color-primary-shade': this.colorPrimaryShade } }, !state.currentTreks && !state.currentTrek && (h("div", { class: "init-loader-container" }, h("span", { class: "loader" }))), !this.showTrek && !state.treks && (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: this.api, language: this.language, "trek-id": this.currentTrekId }), (state.currentTreks || state.currentTrek) && (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", { class: "handle-filters-container" }, h("div", { onClick: () => this.handleFilters(), class: "handle-filters-button" }, "FILTRER"), state.treksWithinBounds && (h("div", { class: "current-treks-within-bounds-length" }, `${state.treksWithinBounds.length} randonnée${state.treksWithinBounds.length > 1 ? 's' : ''}`)))), !this.showTrek && this.showFilters && (h("div", { class: "options-container" }, h("div", { class: "filters-container" }, 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", { "reset-store-on-disconnected": "false", "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", { "reset-store-on-disconnected": "false", "color-primary": this.colorPrimary, "color-primary-shade": this.colorPrimaryShade, "color-primary-tint": this.colorPrimaryTint }))), h("grw-map", { "reset-store-on-disconnected": "false", 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.showTrek ? (this.showTrekMap ? 'Voir la fiche' : 'Voir la carte') : this.showTreksMap ? 'Voir la liste' : 'Voir la carte'))))));
122
123
  }
123
124
  get element() { return this; }
124
125
  static get watchers() { return {