@geotrekce/geotrek-rando-widget 0.2.5 → 0.2.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.
Files changed (110) hide show
  1. package/dist/cjs/geotrek-rando-widget.cjs.js +1 -1
  2. package/dist/cjs/geotrek-rando-widget.cjs.js.br +0 -0
  3. package/dist/cjs/geotrek-rando-widget.cjs.js.gz +0 -0
  4. package/dist/cjs/grw-app.cjs.entry.js +13 -3
  5. package/dist/cjs/grw-app.cjs.entry.js.br +0 -0
  6. package/dist/cjs/grw-app.cjs.entry.js.gz +0 -0
  7. package/dist/cjs/grw-app.cjs.entry.js.map +1 -1
  8. package/dist/cjs/grw-filter_7.cjs.entry.js +10 -11
  9. package/dist/cjs/grw-filter_7.cjs.entry.js.br +0 -0
  10. package/dist/cjs/grw-filter_7.cjs.entry.js.gz +0 -0
  11. package/dist/cjs/grw-filter_7.cjs.entry.js.map +1 -1
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/cjs/loader.cjs.js.br +0 -0
  14. package/dist/cjs/loader.cjs.js.gz +0 -0
  15. package/dist/collection/components/grw-app/grw-app.css +11 -2
  16. package/dist/collection/components/grw-app/grw-app.css.br +0 -0
  17. package/dist/collection/components/grw-app/grw-app.css.gz +0 -0
  18. package/dist/collection/components/grw-app/grw-app.js +48 -2
  19. package/dist/collection/components/grw-app/grw-app.js.br +0 -0
  20. package/dist/collection/components/grw-app/grw-app.js.gz +0 -0
  21. package/dist/collection/components/grw-app/grw-app.js.map +1 -1
  22. package/dist/collection/components/grw-map/grw-map.js +8 -9
  23. package/dist/collection/components/grw-map/grw-map.js.br +0 -0
  24. package/dist/collection/components/grw-map/grw-map.js.gz +0 -0
  25. package/dist/collection/components/grw-map/grw-map.js.map +1 -1
  26. package/dist/collection/components/grw-trek-detail/grw-trek-detail.css +3 -2
  27. package/dist/collection/components/grw-trek-detail/grw-trek-detail.css.br +0 -0
  28. package/dist/collection/components/grw-trek-detail/grw-trek-detail.css.gz +0 -0
  29. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +1 -1
  30. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.br +0 -0
  31. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.gz +0 -0
  32. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.map +1 -1
  33. package/dist/collection/stories/App.js +4 -0
  34. package/dist/collection/stories/App.js.br +0 -0
  35. package/dist/collection/stories/App.js.gz +0 -0
  36. package/dist/collection/stories/App.stories.js +2 -0
  37. package/dist/collection/stories/App.stories.js.br +0 -0
  38. package/dist/collection/stories/App.stories.js.gz +0 -0
  39. package/dist/esm/geotrek-rando-widget.js +1 -1
  40. package/dist/esm/geotrek-rando-widget.js.br +0 -0
  41. package/dist/esm/geotrek-rando-widget.js.gz +0 -0
  42. package/dist/esm/grw-app.entry.js +13 -3
  43. package/dist/esm/grw-app.entry.js.br +0 -0
  44. package/dist/esm/grw-app.entry.js.gz +0 -0
  45. package/dist/esm/grw-app.entry.js.map +1 -1
  46. package/dist/esm/grw-filter_7.entry.js +10 -11
  47. package/dist/esm/grw-filter_7.entry.js.br +0 -0
  48. package/dist/esm/grw-filter_7.entry.js.gz +0 -0
  49. package/dist/esm/grw-filter_7.entry.js.map +1 -1
  50. package/dist/esm/loader.js +1 -1
  51. package/dist/esm/loader.js.br +0 -0
  52. package/dist/esm/loader.js.gz +0 -0
  53. package/dist/esm-es5/geotrek-rando-widget.js +1 -1
  54. package/dist/esm-es5/geotrek-rando-widget.js.br +0 -0
  55. package/dist/esm-es5/geotrek-rando-widget.js.gz +0 -0
  56. package/dist/esm-es5/geotrek-rando-widget.js.map +1 -1
  57. package/dist/esm-es5/grw-app.entry.js +1 -1
  58. package/dist/esm-es5/grw-app.entry.js.br +0 -0
  59. package/dist/esm-es5/grw-app.entry.js.gz +0 -0
  60. package/dist/esm-es5/grw-app.entry.js.map +1 -1
  61. package/dist/esm-es5/grw-filter_7.entry.js +1 -1
  62. package/dist/esm-es5/grw-filter_7.entry.js.br +0 -0
  63. package/dist/esm-es5/grw-filter_7.entry.js.gz +0 -0
  64. package/dist/esm-es5/grw-filter_7.entry.js.map +1 -1
  65. package/dist/esm-es5/loader.js +1 -1
  66. package/dist/esm-es5/loader.js.br +0 -0
  67. package/dist/esm-es5/loader.js.gz +0 -0
  68. package/dist/esm-es5/loader.js.map +1 -1
  69. package/dist/geotrek-rando-widget/geotrek-rando-widget.css +1 -1
  70. package/dist/geotrek-rando-widget/geotrek-rando-widget.css.br +0 -0
  71. package/dist/geotrek-rando-widget/geotrek-rando-widget.css.gz +0 -0
  72. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
  73. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.br +0 -0
  74. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.gz +0 -0
  75. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.map +1 -1
  76. package/dist/geotrek-rando-widget/p-4bb30f7a.entry.js +2 -0
  77. package/dist/geotrek-rando-widget/p-4bb30f7a.entry.js.br +0 -0
  78. package/dist/geotrek-rando-widget/p-4bb30f7a.entry.js.gz +0 -0
  79. package/dist/geotrek-rando-widget/p-4bb30f7a.entry.js.map +1 -0
  80. package/dist/geotrek-rando-widget/{p-c74b5417.entry.js → p-76645b38.entry.js} +2 -2
  81. package/dist/geotrek-rando-widget/p-76645b38.entry.js.br +0 -0
  82. package/dist/geotrek-rando-widget/{p-c74b5417.entry.js.gz → p-76645b38.entry.js.gz} +0 -0
  83. package/dist/geotrek-rando-widget/{p-c74b5417.entry.js.map → p-76645b38.entry.js.map} +1 -1
  84. package/dist/geotrek-rando-widget/{p-aefb821d.system.entry.js → p-946bfe33.system.entry.js} +2 -2
  85. package/dist/geotrek-rando-widget/p-946bfe33.system.entry.js.br +0 -0
  86. package/dist/geotrek-rando-widget/{p-aefb821d.system.entry.js.gz → p-946bfe33.system.entry.js.gz} +0 -0
  87. package/dist/geotrek-rando-widget/{p-aefb821d.system.entry.js.map → p-946bfe33.system.entry.js.map} +1 -1
  88. package/dist/geotrek-rando-widget/p-b7bd61e5.system.entry.js +2 -0
  89. package/dist/geotrek-rando-widget/p-b7bd61e5.system.entry.js.br +0 -0
  90. package/dist/geotrek-rando-widget/p-b7bd61e5.system.entry.js.gz +0 -0
  91. package/dist/geotrek-rando-widget/p-b7bd61e5.system.entry.js.map +1 -0
  92. package/dist/geotrek-rando-widget/p-ccc3be5e.system.js +1 -1
  93. package/dist/geotrek-rando-widget/p-ccc3be5e.system.js.br +0 -0
  94. package/dist/geotrek-rando-widget/p-ccc3be5e.system.js.gz +0 -0
  95. package/dist/geotrek-rando-widget/p-ccc3be5e.system.js.map +1 -1
  96. package/dist/types/components/grw-app/grw-app.d.ts +3 -1
  97. package/dist/types/components/grw-map/grw-map.d.ts +2 -0
  98. package/dist/types/components.d.ts +4 -0
  99. package/package.json +1 -1
  100. package/readme.md +0 -2
  101. package/dist/geotrek-rando-widget/p-4a818914.system.entry.js +0 -2
  102. package/dist/geotrek-rando-widget/p-4a818914.system.entry.js.br +0 -0
  103. package/dist/geotrek-rando-widget/p-4a818914.system.entry.js.gz +0 -0
  104. package/dist/geotrek-rando-widget/p-4a818914.system.entry.js.map +0 -1
  105. package/dist/geotrek-rando-widget/p-586ce7f8.entry.js +0 -2
  106. package/dist/geotrek-rando-widget/p-586ce7f8.entry.js.br +0 -0
  107. package/dist/geotrek-rando-widget/p-586ce7f8.entry.js.gz +0 -0
  108. package/dist/geotrek-rando-widget/p-586ce7f8.entry.js.map +0 -1
  109. package/dist/geotrek-rando-widget/p-aefb821d.system.entry.js.br +0 -0
  110. package/dist/geotrek-rando-widget/p-c74b5417.entry.js.br +0 -0
@@ -30,7 +30,7 @@ const patchEsm = () => {
30
30
  const defineCustomElements = (win, options) => {
31
31
  if (typeof window === 'undefined') return Promise.resolve();
32
32
  return patchEsm().then(() => {
33
- return index.bootstrapLazy([["grw-trek-card.cjs",[[1,"grw-trek-card",{"trek":[16],"colorPrimaryApp":[1,"color-primary-app"],"colorOnSurface":[1,"color-on-surface"],"colorSecondaryContainer":[1,"color-secondary-container"],"colorOnSecondaryContainer":[1,"color-on-secondary-container"],"colorSurfaceContainerLow":[1,"color-surface-container-low"],"isLargeView":[4,"is-large-view"],"resetStoreOnDisconnected":[4,"reset-store-on-disconnected"],"currentTrek":[32],"difficulty":[32],"route":[32],"practice":[32],"themes":[32],"departureCity":[32]}]]],["grw-information-desk-detail_3.cjs",[[1,"grw-information-desk-detail",{"informationDesk":[16],"displayShortDescription":[32]}],[1,"grw-poi-detail",{"poi":[16],"displayShortDescription":[32],"displayFullscreen":[32]}],[1,"grw-sensitive-area-detail",{"sensitiveArea":[16]}]]],["grw-filter_7.cjs",[[0,"grw-trek-detail",{"trek":[16],"colorPrimaryApp":[1,"color-primary-app"],"colorOnSurface":[1,"color-on-surface"],"colorPrimaryContainer":[1,"color-primary-container"],"colorOnPrimaryContainer":[1,"color-on-primary-container"],"colorSecondaryContainer":[1,"color-secondary-container"],"colorOnSecondaryContainer":[1,"color-on-secondary-container"],"colorBackground":[1,"color-background"],"resetStoreOnDisconnected":[4,"reset-store-on-disconnected"],"weather":[4],"isLargeView":[4,"is-large-view"],"currentTrek":[32],"difficulty":[32],"route":[32],"practice":[32],"themes":[32],"labels":[32],"sources":[32],"accessibilities":[32],"accessibilityLevel":[32],"displayFullscreen":[32],"cities":[32],"options":[32]}],[1,"grw-treks-list",{"colorPrimaryApp":[1,"color-primary-app"],"colorOnSurface":[1,"color-on-surface"],"colorSecondaryContainer":[1,"color-secondary-container"],"colorOnSecondaryContainer":[1,"color-on-secondary-container"],"colorSurfaceContainerLow":[1,"color-surface-container-low"],"isLargeView":[4,"is-large-view"],"resetStoreOnDisconnected":[4,"reset-store-on-disconnected"],"treksToDisplay":[32]}],[1,"grw-filter",{"filterType":[1,"filter-type"],"filterName":[1,"filter-name"],"filterNameProperty":[1,"filter-name-property"]}],[0,"grw-map",{"urlLayer":[1,"url-layer"],"attribution":[1],"center":[1],"zoom":[2],"colorPrimaryApp":[1,"color-primary-app"],"colorOnSurface":[1,"color-on-surface"],"colorPrimaryContainer":[1,"color-primary-container"],"colorOnPrimaryContainer":[1,"color-on-primary-container"],"colorBackground":[1,"color-background"],"colorTrekLine":[1,"color-trek-line"],"colorDepartureIcon":[1,"color-departure-icon"],"colorArrivalIcon":[1,"color-arrival-icon"],"colorSensitiveArea":[1,"color-sensitive-area"],"colorPoiIcon":[1,"color-poi-icon"],"resetStoreOnDisconnected":[4,"reset-store-on-disconnected"],"isLargeView":[4,"is-large-view"],"mapIsReady":[32]},[[8,"centerOnMap","onCenterOnMap"],[8,"descriptionReferenceIsInViewport","descriptionReferenceIsInViewport"],[8,"parkingIsInViewport","parkingIsInViewport"],[8,"informationDeskIsInViewport","onInformationDesksIsInViewport"],[8,"sensitiveAreaIsInViewport","sensitiveAreaIsInViewport"],[8,"poiIsInViewport","poiIsInViewport"]]],[1,"grw-select-language"],[1,"grw-trek-provider",{"languages":[1],"api":[1],"trekId":[1,"trek-id"]}],[1,"grw-treks-provider",{"languages":[1],"api":[1],"inBbox":[1,"in-bbox"],"cities":[1],"districts":[1],"structures":[1],"themes":[1],"portals":[1],"routes":[1],"practices":[1]}]]],["grw-app.cjs",[[0,"grw-app",{"api":[1],"languages":[1],"inBbox":[1,"in-bbox"],"cities":[1],"districts":[1],"structures":[1],"themes":[1],"portals":[1],"routes":[1],"practices":[1],"urlLayer":[1,"url-layer"],"center":[1],"zoom":[2],"attribution":[1],"linkName":[1,"link-name"],"linkTarget":[1,"link-target"],"weather":[4],"colorPrimaryApp":[1,"color-primary-app"],"colorOnPrimary":[1,"color-on-primary"],"colorSurface":[1,"color-surface"],"colorOnSurface":[1,"color-on-surface"],"colorSurfaceVariant":[1,"color-surface-variant"],"colorOnSurfaceVariant":[1,"color-on-surface-variant"],"colorPrimaryContainer":[1,"color-primary-container"],"colorOnPrimaryContainer":[1,"color-on-primary-container"],"colorSecondaryContainer":[1,"color-secondary-container"],"colorOnSecondaryContainer":[1,"color-on-secondary-container"],"colorBackground":[1,"color-background"],"colorSurfaceContainerHigh":[1,"color-surface-container-high"],"colorSurfaceContainerLow":[1,"color-surface-container-low"],"fabBackgroundColor":[1,"fab-background-color"],"fabColor":[1,"fab-color"],"colorTrekLine":[1,"color-trek-line"],"colorDepartureIcon":[1,"color-departure-icon"],"colorArrivalIcon":[1,"color-arrival-icon"],"colorSensitiveArea":[1,"color-sensitive-area"],"colorPoiIcon":[1,"color-poi-icon"],"showTrek":[32],"showTreksMap":[32],"showTrekMap":[32],"showFilters":[32],"isLargeView":[32],"currentTrekId":[32]},[[8,"trekCardPress","onTrekCardPress"],[9,"resize","onWindowResize"],[8,"centerOnMap","onCenterOnMap"]]]]]], options);
33
+ return index.bootstrapLazy([["grw-trek-card.cjs",[[1,"grw-trek-card",{"trek":[16],"colorPrimaryApp":[1,"color-primary-app"],"colorOnSurface":[1,"color-on-surface"],"colorSecondaryContainer":[1,"color-secondary-container"],"colorOnSecondaryContainer":[1,"color-on-secondary-container"],"colorSurfaceContainerLow":[1,"color-surface-container-low"],"isLargeView":[4,"is-large-view"],"resetStoreOnDisconnected":[4,"reset-store-on-disconnected"],"currentTrek":[32],"difficulty":[32],"route":[32],"practice":[32],"themes":[32],"departureCity":[32]}]]],["grw-information-desk-detail_3.cjs",[[1,"grw-information-desk-detail",{"informationDesk":[16],"displayShortDescription":[32]}],[1,"grw-poi-detail",{"poi":[16],"displayShortDescription":[32],"displayFullscreen":[32]}],[1,"grw-sensitive-area-detail",{"sensitiveArea":[16]}]]],["grw-filter_7.cjs",[[0,"grw-trek-detail",{"trek":[16],"colorPrimaryApp":[1,"color-primary-app"],"colorOnSurface":[1,"color-on-surface"],"colorPrimaryContainer":[1,"color-primary-container"],"colorOnPrimaryContainer":[1,"color-on-primary-container"],"colorSecondaryContainer":[1,"color-secondary-container"],"colorOnSecondaryContainer":[1,"color-on-secondary-container"],"colorBackground":[1,"color-background"],"resetStoreOnDisconnected":[4,"reset-store-on-disconnected"],"weather":[4],"isLargeView":[4,"is-large-view"],"currentTrek":[32],"difficulty":[32],"route":[32],"practice":[32],"themes":[32],"labels":[32],"sources":[32],"accessibilities":[32],"accessibilityLevel":[32],"displayFullscreen":[32],"cities":[32],"options":[32]}],[1,"grw-treks-list",{"colorPrimaryApp":[1,"color-primary-app"],"colorOnSurface":[1,"color-on-surface"],"colorSecondaryContainer":[1,"color-secondary-container"],"colorOnSecondaryContainer":[1,"color-on-secondary-container"],"colorSurfaceContainerLow":[1,"color-surface-container-low"],"isLargeView":[4,"is-large-view"],"resetStoreOnDisconnected":[4,"reset-store-on-disconnected"],"treksToDisplay":[32]}],[1,"grw-filter",{"filterType":[1,"filter-type"],"filterName":[1,"filter-name"],"filterNameProperty":[1,"filter-name-property"]}],[0,"grw-map",{"urlLayer":[1,"url-layer"],"attribution":[1],"center":[1],"zoom":[2],"colorPrimaryApp":[1,"color-primary-app"],"colorOnSurface":[1,"color-on-surface"],"colorPrimaryContainer":[1,"color-primary-container"],"colorOnPrimaryContainer":[1,"color-on-primary-container"],"colorBackground":[1,"color-background"],"colorTrekLine":[1,"color-trek-line"],"colorDepartureIcon":[1,"color-departure-icon"],"colorArrivalIcon":[1,"color-arrival-icon"],"colorSensitiveArea":[1,"color-sensitive-area"],"colorPoiIcon":[1,"color-poi-icon"],"resetStoreOnDisconnected":[4,"reset-store-on-disconnected"],"isLargeView":[4,"is-large-view"],"mapIsReady":[32]},[[8,"centerOnMap","onCenterOnMap"],[8,"descriptionReferenceIsInViewport","descriptionReferenceIsInViewport"],[8,"parkingIsInViewport","parkingIsInViewport"],[8,"informationDeskIsInViewport","onInformationDesksIsInViewport"],[8,"sensitiveAreaIsInViewport","sensitiveAreaIsInViewport"],[8,"poiIsInViewport","poiIsInViewport"]]],[1,"grw-select-language"],[1,"grw-trek-provider",{"languages":[1],"api":[1],"trekId":[1,"trek-id"]}],[1,"grw-treks-provider",{"languages":[1],"api":[1],"inBbox":[1,"in-bbox"],"cities":[1],"districts":[1],"structures":[1],"themes":[1],"portals":[1],"routes":[1],"practices":[1]}]]],["grw-app.cjs",[[0,"grw-app",{"appWidth":[1,"app-width"],"appHeight":[1,"app-height"],"api":[1],"languages":[1],"inBbox":[1,"in-bbox"],"cities":[1],"districts":[1],"structures":[1],"themes":[1],"portals":[1],"routes":[1],"practices":[1],"urlLayer":[1,"url-layer"],"center":[1],"zoom":[2],"attribution":[1],"linkName":[1,"link-name"],"linkTarget":[1,"link-target"],"weather":[4],"colorPrimaryApp":[1,"color-primary-app"],"colorOnPrimary":[1,"color-on-primary"],"colorSurface":[1,"color-surface"],"colorOnSurface":[1,"color-on-surface"],"colorSurfaceVariant":[1,"color-surface-variant"],"colorOnSurfaceVariant":[1,"color-on-surface-variant"],"colorPrimaryContainer":[1,"color-primary-container"],"colorOnPrimaryContainer":[1,"color-on-primary-container"],"colorSecondaryContainer":[1,"color-secondary-container"],"colorOnSecondaryContainer":[1,"color-on-secondary-container"],"colorBackground":[1,"color-background"],"colorSurfaceContainerHigh":[1,"color-surface-container-high"],"colorSurfaceContainerLow":[1,"color-surface-container-low"],"fabBackgroundColor":[1,"fab-background-color"],"fabColor":[1,"fab-color"],"colorTrekLine":[1,"color-trek-line"],"colorDepartureIcon":[1,"color-departure-icon"],"colorArrivalIcon":[1,"color-arrival-icon"],"colorSensitiveArea":[1,"color-sensitive-area"],"colorPoiIcon":[1,"color-poi-icon"],"showTrek":[32],"showTreksMap":[32],"showTrekMap":[32],"showFilters":[32],"isLargeView":[32],"currentTrekId":[32]},[[8,"trekCardPress","onTrekCardPress"],[9,"resize","onWindowResize"],[8,"centerOnMap","onCenterOnMap"]]]]]], options);
34
34
  });
35
35
  };
36
36
 
Binary file
Binary file
@@ -3,9 +3,10 @@
3
3
  }
4
4
 
5
5
  grw-app {
6
+ display: block;
6
7
  position: relative;
7
- width: 100%;
8
- height: 100%;
8
+ width: var(--app-width);
9
+ height: var(--app-height);
9
10
  font-family: "Roboto";
10
11
  color: var(--color-on-surface);
11
12
  overflow: hidden;
@@ -248,6 +249,14 @@ grw-app {
248
249
  width: 100%;
249
250
  }
250
251
 
252
+ grw-treks-list {
253
+ max-height: calc(100vh - 64px - 64px);
254
+ }
255
+
256
+ .trek-detail-container {
257
+ max-height: calc(100vh - 64px - 48px);
258
+ }
259
+
251
260
  .app-map-container {
252
261
  width: 100%;
253
262
  position: absolute;
@@ -11,6 +11,8 @@ export class GrwApp {
11
11
  this.showFilters = false;
12
12
  this.isLargeView = false;
13
13
  this.currentTrekId = undefined;
14
+ this.appWidth = '100%';
15
+ this.appHeight = '100vh';
14
16
  this.api = undefined;
15
17
  this.languages = 'fr';
16
18
  this.inBbox = undefined;
@@ -95,7 +97,7 @@ export class GrwApp {
95
97
  this.showTrek = !this.showTrek;
96
98
  }
97
99
  handleView() {
98
- this.isLargeView = this.element.getBoundingClientRect().width >= this.largeViewSize;
100
+ this.isLargeView = this.appElement.getBoundingClientRect().width >= this.largeViewSize;
99
101
  this.showTreksMap = this.isLargeView;
100
102
  this.showTrekMap = this.isLargeView;
101
103
  }
@@ -132,6 +134,12 @@ export class GrwApp {
132
134
  this.showTreksMap = !this.showTreksMap;
133
135
  }
134
136
  }
137
+ // handleEraseFilters() {
138
+ // console.log('handleEraseFilters');
139
+ // }
140
+ // handleOkFilters() {
141
+ // console.log('handleOkFilters');
142
+ // }
135
143
  disconnectedCallback() {
136
144
  reset();
137
145
  window.removeEventListener('popstate', this.handlePopStateBind);
@@ -153,6 +161,8 @@ export class GrwApp {
153
161
  '--color-surface-container-low': this.colorSurfaceContainerLow,
154
162
  '--fab-background-color': this.fabBackgroundColor,
155
163
  '--fab-color': this.fabColor,
164
+ '--app-width': this.appWidth,
165
+ '--app-height': this.appHeight,
156
166
  } }, !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, languages: this.languages, "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 && !state.currentTrek && (h("grw-trek-provider", { api: this.api, languages: this.languages, "trek-id": this.currentTrekId })), (state.currentTreks || state.currentTrek) && (h("div", { class: "app-container" }, h("div", { class: this.isLargeView ? 'large-view-header-container' : 'header-container' }, h("div", { class: "header-top" }, h("div", { class: "header-left-container" }, this.showTrek ? (h("button", { onClick: () => this.handleBackButton(), class: "arrow-back-icon" }, h("span", { class: "material-symbols-outlined" }, "arrow_back"))) : (h("div", { class: "attribution-container" }, h("a", { target: "_blank", href: this.linkTarget }, this.linkName)))), h("div", { class: "header-right-container" }, state.languages.length > 1 && h("grw-select-language", null))), !this.showTrek && (h("div", { class: "handle-filters-container" }, state.treksWithinBounds && (h("div", { class: "current-treks-within-bounds-length" }, `${state.treksWithinBounds.length} ${state.treksWithinBounds.length > 1 ? translate[state.language].treks : translate[state.language].trek}`)), h("button", { onClick: () => this.handleFilters(), class: "handle-filters-button" }, h("span", { class: "material-symbols-outlined margin-right-icon" }, "filter_list"), translate[state.language].filter)))), h("div", { class: `content-container ${this.showTrek ? 'content-trek' : 'content-treks'}` }, 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-app": this.colorPrimaryApp, "color-on-surface": this.colorOnSurface, "color-secondary-container": this.colorSecondaryContainer, "color-on-secondary-container": this.colorOnSecondaryContainer, "color-surface-container-low": this.colorSurfaceContainerLow })), 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-app": this.colorPrimaryApp, "color-on-surface": this.colorOnSurface, "color-primary-container": this.colorPrimaryContainer, "color-on-primary-container": this.colorOnPrimaryContainer, "color-secondary-container": this.colorSecondaryContainer, "color-on-secondary-container": this.colorOnSecondaryContainer, "color-background": this.colorBackground, weather: this.weather, style: { zIndex: this.showTrekMap ? '0' : '1' }, "is-large-view": this.isLargeView }))), h("grw-map", { "reset-store-on-disconnected": "false", class: this.isLargeView ? 'large-view-app-map-container' : 'app-map-container', style: {
157
167
  visibility: (this.showTreksMap && !this.showTrek) || (this.showTrekMap && this.showTrek) || this.isLargeView ? 'visible' : 'hidden',
158
168
  zIndex: this.showTrekMap ? '1' : '0',
@@ -177,6 +187,42 @@ export class GrwApp {
177
187
  }
178
188
  static get properties() {
179
189
  return {
190
+ "appWidth": {
191
+ "type": "string",
192
+ "mutable": false,
193
+ "complexType": {
194
+ "original": "string",
195
+ "resolved": "string",
196
+ "references": {}
197
+ },
198
+ "required": false,
199
+ "optional": false,
200
+ "docs": {
201
+ "tags": [],
202
+ "text": ""
203
+ },
204
+ "attribute": "app-width",
205
+ "reflect": false,
206
+ "defaultValue": "'100%'"
207
+ },
208
+ "appHeight": {
209
+ "type": "string",
210
+ "mutable": false,
211
+ "complexType": {
212
+ "original": "string",
213
+ "resolved": "string",
214
+ "references": {}
215
+ },
216
+ "required": false,
217
+ "optional": false,
218
+ "docs": {
219
+ "tags": [],
220
+ "text": ""
221
+ },
222
+ "attribute": "app-height",
223
+ "reflect": false,
224
+ "defaultValue": "'100vh'"
225
+ },
180
226
  "api": {
181
227
  "type": "string",
182
228
  "mutable": false,
@@ -842,7 +888,7 @@ export class GrwApp {
842
888
  "currentTrekId": {}
843
889
  };
844
890
  }
845
- static get elementRef() { return "element"; }
891
+ static get elementRef() { return "appElement"; }
846
892
  static get watchers() {
847
893
  return [{
848
894
  "propName": "isLargeView",
@@ -1 +1 @@
1
- {"version":3,"file":"grw-app.js","sourceRoot":"","sources":["../../../src/components/grw-app/grw-app.tsx"],"names":[],"mappings":"A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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Listen, State, Prop, Element, Watch } from '@stencil/core';\nimport { translate } from 'i18n/i18n';\nimport state, { onChange, reset } from 'store/store';\n\n@Component({\n tag: 'grw-app',\n styleUrls: ['grw-app.scss'],\n shadow: false,\n})\nexport class GrwApp {\n @Element() element: HTMLElement;\n @State() showTrek = false;\n @State() showTreksMap = false;\n @State() showTrekMap = false;\n @State() showFilters = false;\n @State() isLargeView = false;\n @State() currentTrekId: number;\n @Prop() api: string;\n @Prop() languages = 'fr';\n @Prop() inBbox: string;\n @Prop() cities: string;\n @Prop() districts: string;\n @Prop() structures: string;\n @Prop() themes: string;\n @Prop() portals: string;\n @Prop() routes: string;\n @Prop() practices: string;\n @Prop() urlLayer: string;\n @Prop() center: string;\n @Prop() zoom: number;\n @Prop() attribution: string;\n @Prop() linkName = 'GEOTREK';\n @Prop() linkTarget = 'https://geotrek.fr';\n @Prop() weather = false;\n\n @Prop() colorPrimaryApp = '#6750a4';\n @Prop() colorOnPrimary = '#ffffff';\n @Prop() colorSurface = '#1c1b1f';\n @Prop() colorOnSurface = '#49454e';\n @Prop() colorSurfaceVariant = '#fef7ff';\n @Prop() colorOnSurfaceVariant = '#1c1b1f';\n @Prop() colorPrimaryContainer = '#eaddff';\n @Prop() colorOnPrimaryContainer = '#21005e';\n @Prop() colorSecondaryContainer = '#e8def8';\n @Prop() colorOnSecondaryContainer = '#1d192b';\n @Prop() colorBackground = '#fef7ff';\n @Prop() colorSurfaceContainerHigh = '#ece6f0';\n @Prop() colorSurfaceContainerLow = '#f7f2fa';\n @Prop() fabBackgroundColor = '#eaddff';\n @Prop() fabColor = '#21005d';\n\n @Prop() colorTrekLine = '#6b0030';\n @Prop() colorDepartureIcon = '#006b3b';\n @Prop() colorArrivalIcon = '#85003b';\n @Prop() colorSensitiveArea = '#4974a5';\n @Prop() colorPoiIcon = '#974c6e';\n\n largeViewSize = 1024;\n handlePopStateBind: (event: any) => void = this.handlePopState.bind(this);\n\n @Listen('trekCardPress', { target: 'window' })\n onTrekCardPress(event: CustomEvent<number>) {\n this.currentTrekId = event.detail;\n this.showTrek = !this.showTrek;\n this.showTrekMap = false;\n const url = new URL(window.location.toString());\n url.searchParams.set('trek', this.currentTrekId.toString());\n window.history.pushState({}, '', url);\n }\n\n @Listen('resize', { target: 'window' })\n onWindowResize() {\n this.handleView();\n }\n\n @Listen('centerOnMap', { target: 'window' })\n onCenterOnMap() {\n if (!this.isLargeView) {\n this.showTrekMap = true;\n }\n }\n\n @Watch('isLargeView')\n watchPropHandler() {\n window.dispatchEvent(new window.Event('resize'));\n }\n\n componentWillLoad() {\n const url = new URL(window.location.toString());\n const trekParam = url.searchParams.get('trek');\n if (trekParam) {\n window.history.replaceState({ isInitialHistoryWithTrek: true }, '', url);\n this.currentTrekId = Number(trekParam);\n this.showTrek = !this.showTrek;\n }\n }\n\n componentDidLoad() {\n onChange('trekNetworkError', () => {\n if (state.trekNetworkError) {\n const urlRedirect = new URL(window.location.toString());\n urlRedirect.searchParams.delete('trek');\n window.history.replaceState({}, '', urlRedirect);\n this.onTrekDetailsClose();\n }\n });\n window.addEventListener('popstate', this.handlePopStateBind, false);\n this.handleView();\n }\n\n onTrekDetailsClose() {\n state.currentTrek = null;\n this.currentTrekId = null;\n this.showTrek = !this.showTrek;\n }\n\n handleView() {\n this.isLargeView = this.element.getBoundingClientRect().width >= this.largeViewSize;\n this.showTreksMap = this.isLargeView;\n this.showTrekMap = this.isLargeView;\n }\n\n handleFilters() {\n this.showFilters = !this.showFilters;\n }\n\n handleBackButton() {\n if (window.history.state && window.history.state.isInitialHistoryWithTrek) {\n this.onTrekDetailsClose();\n const url = new URL(window.location.toString());\n url.searchParams.delete('trek');\n window.history.pushState({}, '', url);\n } else {\n window.history.back();\n }\n }\n\n handlePopState() {\n const url = new URL(window.location.toString());\n const trekParam = Number(url.searchParams.get('trek'));\n if (trekParam && this.currentTrekId !== trekParam) {\n this.currentTrekId = trekParam;\n this.showTrek = true;\n } else if (!trekParam) {\n this.onTrekDetailsClose();\n }\n }\n\n handleShowMap() {\n if (this.currentTrekId) {\n this.showTrekMap = !this.showTrekMap;\n } else {\n this.showTreksMap = !this.showTreksMap;\n }\n }\n\n disconnectedCallback() {\n reset();\n window.removeEventListener('popstate', this.handlePopStateBind);\n }\n\n render() {\n return (\n <Host\n style={{\n '--color-primary-app': this.colorPrimaryApp,\n '--color-on-primary': this.colorOnPrimary,\n '--color-surface': this.colorSurface,\n '--color-on-surface': this.colorOnSurface,\n '--color-surface-variant': this.colorSurfaceVariant,\n '--color-on-surface-variant': this.colorOnSurfaceVariant,\n '--color-primary-container': this.colorPrimaryContainer,\n '--color-on-primary-container': this.colorOnPrimaryContainer,\n '--color-secondary-container': this.colorSecondaryContainer,\n '--color-on-secondary-container': this.colorOnSecondaryContainer,\n '--color-background': this.colorBackground,\n '--color-surface-container-high': this.colorSurfaceContainerHigh,\n '--color-surface-container-low': this.colorSurfaceContainerLow,\n '--fab-background-color': this.fabBackgroundColor,\n '--fab-color': this.fabColor,\n }}\n >\n {!state.currentTreks && !state.currentTrek && (\n <div class=\"init-loader-container\">\n <span class=\"loader\"></span>\n </div>\n )}\n {!this.showTrek && !state.treks && (\n <grw-treks-provider\n api={this.api}\n languages={this.languages}\n in-bbox={this.inBbox}\n cities={this.cities}\n districts={this.districts}\n structures={this.structures}\n themes={this.themes}\n portals={this.portals}\n routes={this.routes}\n practices={this.practices}\n ></grw-treks-provider>\n )}\n {this.showTrek && this.currentTrekId && !state.currentTrek && (\n <grw-trek-provider api={this.api} languages={this.languages} trek-id={this.currentTrekId}></grw-trek-provider>\n )}\n {(state.currentTreks || state.currentTrek) && (\n <div class=\"app-container\">\n <div class={this.isLargeView ? 'large-view-header-container' : 'header-container'}>\n <div class=\"header-top\">\n <div class=\"header-left-container\">\n {this.showTrek ? (\n <button onClick={() => this.handleBackButton()} class=\"arrow-back-icon\">\n <span class=\"material-symbols-outlined\">arrow_back</span>\n </button>\n ) : (\n <div class=\"attribution-container\">\n <a target=\"_blank\" href={this.linkTarget}>\n {this.linkName}\n </a>\n </div>\n )}\n </div>\n <div class=\"header-right-container\">{state.languages.length > 1 && <grw-select-language></grw-select-language>}</div>\n </div>\n {!this.showTrek && (\n <div class=\"handle-filters-container\">\n {state.treksWithinBounds && (\n <div class=\"current-treks-within-bounds-length\">{`${state.treksWithinBounds.length} ${\n state.treksWithinBounds.length > 1 ? translate[state.language].treks : translate[state.language].trek\n }`}</div>\n )}\n <button onClick={() => this.handleFilters()} class=\"handle-filters-button\">\n <span class=\"material-symbols-outlined margin-right-icon\">filter_list</span>\n {translate[state.language].filter}\n </button>\n </div>\n )}\n </div>\n\n <div class={`content-container ${this.showTrek ? 'content-trek' : 'content-treks'}`}>\n <div\n class={this.isLargeView ? 'large-view-app-treks-list-container' : 'app-treks-list-container'}\n style={{ display: this.showTrek ? 'none' : 'flex', position: this.showTrek ? 'absolute' : 'relative' }}\n >\n <grw-treks-list\n reset-store-on-disconnected=\"false\"\n is-large-view={this.isLargeView}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-surface-container-low={this.colorSurfaceContainerLow}\n ></grw-treks-list>\n </div>\n {this.showTrek && !state.currentTrek && (\n <div class={this.isLargeView ? 'large-view-loader-container' : 'loader-container'}>\n <span class=\"loader\"></span>\n </div>\n )}\n {state.currentTrek && (\n <div class={this.isLargeView ? 'large-view-app-trek-detail-container' : 'app-trek-detail-container'}>\n <grw-trek-detail\n reset-store-on-disconnected=\"false\"\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-primary-container={this.colorPrimaryContainer}\n color-on-primary-container={this.colorOnPrimaryContainer}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-background={this.colorBackground}\n weather={this.weather}\n style={{ zIndex: this.showTrekMap ? '0' : '1' }}\n is-large-view={this.isLargeView}\n ></grw-trek-detail>\n </div>\n )}\n <grw-map\n reset-store-on-disconnected=\"false\"\n class={this.isLargeView ? 'large-view-app-map-container' : 'app-map-container'}\n style={{\n visibility: (this.showTreksMap && !this.showTrek) || (this.showTrekMap && this.showTrek) || this.isLargeView ? 'visible' : 'hidden',\n zIndex: this.showTrekMap ? '1' : '0',\n }}\n url-layer={this.urlLayer}\n center={this.center}\n zoom={this.zoom}\n attribution={this.attribution}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-primary-container={this.colorPrimaryContainer}\n color-on-primary-container={this.colorOnPrimaryContainer}\n color-background={this.colorBackground}\n color-trek-line={this.colorTrekLine}\n color-departure-icon={this.colorDepartureIcon}\n color-arrival-icon={this.colorArrivalIcon}\n color-sensitive-area={this.colorSensitiveArea}\n color-poi-icon={this.colorPoiIcon}\n is-large-view={this.isLargeView}\n ></grw-map>\n </div>\n {(!this.showTrek || (this.showTrek && state.currentTrek)) && (\n <div class=\"map-visibility-button-container\">\n <button onClick={() => this.handleShowMap()} class=\"map-visibility-button\" style={{ display: this.isLargeView ? 'none' : 'flex' }}>\n <span class=\"material-symbols-outlined\">{this.showTrek ? (this.showTrekMap ? 'summarize' : 'map') : this.showTreksMap ? 'list' : 'map'}</span>\n {this.showTrek\n ? this.showTrekMap\n ? translate[state.language].showDetails\n : translate[state.language].showRoute\n : this.showTreksMap\n ? translate[state.language].showList\n : translate[state.language].showMap}\n </button>\n </div>\n )}\n </div>\n )}\n {!this.showTrek && this.showFilters && (\n <div class=\"options-container\">\n <div class=\"filters-container\">\n <grw-filter filterName={translate[state.language].practice} filterType=\"practices\" filterNameProperty=\"name\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].difficulty} filterType=\"difficulties\" filterNameProperty=\"label\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].duration} filterType=\"durations\" filterNameProperty=\"name\"></grw-filter>\n </div>\n <div onClick={() => this.handleFilters()} class=\"back-filters-container\"></div>\n </div>\n )}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"grw-app.js","sourceRoot":"","sources":["../../../src/components/grw-app/grw-app.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACxF,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAOrD,MAAM,OAAO,MAAM;;IAkDjB,kBAAa,GAAG,IAAI,CAAC;IACrB,uBAAkB,GAAyB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;oBAjDtD,KAAK;wBACD,KAAK;uBACN,KAAK;uBAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Listen, State, Prop, Element, Watch } from '@stencil/core';\nimport { translate } from 'i18n/i18n';\nimport state, { onChange, reset } from 'store/store';\n\n@Component({\n tag: 'grw-app',\n styleUrls: ['grw-app.scss'],\n shadow: false,\n})\nexport class GrwApp {\n @Element() appElement: HTMLElement;\n @State() showTrek = false;\n @State() showTreksMap = false;\n @State() showTrekMap = false;\n @State() showFilters = false;\n @State() isLargeView = false;\n @State() currentTrekId: number;\n @Prop() appWidth: string = '100%';\n @Prop() appHeight: string = '100vh';\n @Prop() api: string;\n @Prop() languages = 'fr';\n @Prop() inBbox: string;\n @Prop() cities: string;\n @Prop() districts: string;\n @Prop() structures: string;\n @Prop() themes: string;\n @Prop() portals: string;\n @Prop() routes: string;\n @Prop() practices: string;\n @Prop() urlLayer: string;\n @Prop() center: string;\n @Prop() zoom: number;\n @Prop() attribution: string;\n @Prop() linkName = 'GEOTREK';\n @Prop() linkTarget = 'https://geotrek.fr';\n @Prop() weather = false;\n\n @Prop() colorPrimaryApp = '#6750a4';\n @Prop() colorOnPrimary = '#ffffff';\n @Prop() colorSurface = '#1c1b1f';\n @Prop() colorOnSurface = '#49454e';\n @Prop() colorSurfaceVariant = '#fef7ff';\n @Prop() colorOnSurfaceVariant = '#1c1b1f';\n @Prop() colorPrimaryContainer = '#eaddff';\n @Prop() colorOnPrimaryContainer = '#21005e';\n @Prop() colorSecondaryContainer = '#e8def8';\n @Prop() colorOnSecondaryContainer = '#1d192b';\n @Prop() colorBackground = '#fef7ff';\n @Prop() colorSurfaceContainerHigh = '#ece6f0';\n @Prop() colorSurfaceContainerLow = '#f7f2fa';\n @Prop() fabBackgroundColor = '#eaddff';\n @Prop() fabColor = '#21005d';\n\n @Prop() colorTrekLine = '#6b0030';\n @Prop() colorDepartureIcon = '#006b3b';\n @Prop() colorArrivalIcon = '#85003b';\n @Prop() colorSensitiveArea = '#4974a5';\n @Prop() colorPoiIcon = '#974c6e';\n\n largeViewSize = 1024;\n handlePopStateBind: (event: any) => void = this.handlePopState.bind(this);\n\n @Listen('trekCardPress', { target: 'window' })\n onTrekCardPress(event: CustomEvent<number>) {\n this.currentTrekId = event.detail;\n this.showTrek = !this.showTrek;\n this.showTrekMap = false;\n const url = new URL(window.location.toString());\n url.searchParams.set('trek', this.currentTrekId.toString());\n window.history.pushState({}, '', url);\n }\n\n @Listen('resize', { target: 'window' })\n onWindowResize() {\n this.handleView();\n }\n\n @Listen('centerOnMap', { target: 'window' })\n onCenterOnMap() {\n if (!this.isLargeView) {\n this.showTrekMap = true;\n }\n }\n\n @Watch('isLargeView')\n watchPropHandler() {\n window.dispatchEvent(new window.Event('resize'));\n }\n\n componentWillLoad() {\n const url = new URL(window.location.toString());\n const trekParam = url.searchParams.get('trek');\n if (trekParam) {\n window.history.replaceState({ isInitialHistoryWithTrek: true }, '', url);\n this.currentTrekId = Number(trekParam);\n this.showTrek = !this.showTrek;\n }\n }\n\n componentDidLoad() {\n onChange('trekNetworkError', () => {\n if (state.trekNetworkError) {\n const urlRedirect = new URL(window.location.toString());\n urlRedirect.searchParams.delete('trek');\n window.history.replaceState({}, '', urlRedirect);\n this.onTrekDetailsClose();\n }\n });\n window.addEventListener('popstate', this.handlePopStateBind, false);\n this.handleView();\n }\n\n onTrekDetailsClose() {\n state.currentTrek = null;\n this.currentTrekId = null;\n this.showTrek = !this.showTrek;\n }\n\n handleView() {\n this.isLargeView = this.appElement.getBoundingClientRect().width >= this.largeViewSize;\n this.showTreksMap = this.isLargeView;\n this.showTrekMap = this.isLargeView;\n }\n\n handleFilters() {\n this.showFilters = !this.showFilters;\n }\n\n handleBackButton() {\n if (window.history.state && window.history.state.isInitialHistoryWithTrek) {\n this.onTrekDetailsClose();\n const url = new URL(window.location.toString());\n url.searchParams.delete('trek');\n window.history.pushState({}, '', url);\n } else {\n window.history.back();\n }\n }\n\n handlePopState() {\n const url = new URL(window.location.toString());\n const trekParam = Number(url.searchParams.get('trek'));\n if (trekParam && this.currentTrekId !== trekParam) {\n this.currentTrekId = trekParam;\n this.showTrek = true;\n } else if (!trekParam) {\n this.onTrekDetailsClose();\n }\n }\n\n handleShowMap() {\n if (this.currentTrekId) {\n this.showTrekMap = !this.showTrekMap;\n } else {\n this.showTreksMap = !this.showTreksMap;\n }\n }\n\n // handleEraseFilters() {\n // console.log('handleEraseFilters');\n // }\n\n // handleOkFilters() {\n // console.log('handleOkFilters');\n // }\n\n disconnectedCallback() {\n reset();\n window.removeEventListener('popstate', this.handlePopStateBind);\n }\n\n render() {\n return (\n <Host\n style={{\n '--color-primary-app': this.colorPrimaryApp,\n '--color-on-primary': this.colorOnPrimary,\n '--color-surface': this.colorSurface,\n '--color-on-surface': this.colorOnSurface,\n '--color-surface-variant': this.colorSurfaceVariant,\n '--color-on-surface-variant': this.colorOnSurfaceVariant,\n '--color-primary-container': this.colorPrimaryContainer,\n '--color-on-primary-container': this.colorOnPrimaryContainer,\n '--color-secondary-container': this.colorSecondaryContainer,\n '--color-on-secondary-container': this.colorOnSecondaryContainer,\n '--color-background': this.colorBackground,\n '--color-surface-container-high': this.colorSurfaceContainerHigh,\n '--color-surface-container-low': this.colorSurfaceContainerLow,\n '--fab-background-color': this.fabBackgroundColor,\n '--fab-color': this.fabColor,\n '--app-width': this.appWidth,\n '--app-height': this.appHeight,\n }}\n >\n {!state.currentTreks && !state.currentTrek && (\n <div class=\"init-loader-container\">\n <span class=\"loader\"></span>\n </div>\n )}\n {!this.showTrek && !state.treks && (\n <grw-treks-provider\n api={this.api}\n languages={this.languages}\n in-bbox={this.inBbox}\n cities={this.cities}\n districts={this.districts}\n structures={this.structures}\n themes={this.themes}\n portals={this.portals}\n routes={this.routes}\n practices={this.practices}\n ></grw-treks-provider>\n )}\n {this.showTrek && this.currentTrekId && !state.currentTrek && (\n <grw-trek-provider api={this.api} languages={this.languages} trek-id={this.currentTrekId}></grw-trek-provider>\n )}\n {(state.currentTreks || state.currentTrek) && (\n <div class=\"app-container\">\n <div class={this.isLargeView ? 'large-view-header-container' : 'header-container'}>\n <div class=\"header-top\">\n <div class=\"header-left-container\">\n {this.showTrek ? (\n <button onClick={() => this.handleBackButton()} class=\"arrow-back-icon\">\n <span class=\"material-symbols-outlined\">arrow_back</span>\n </button>\n ) : (\n <div class=\"attribution-container\">\n <a target=\"_blank\" href={this.linkTarget}>\n {this.linkName}\n </a>\n </div>\n )}\n </div>\n <div class=\"header-right-container\">{state.languages.length > 1 && <grw-select-language></grw-select-language>}</div>\n </div>\n {!this.showTrek && (\n <div class=\"handle-filters-container\">\n {state.treksWithinBounds && (\n <div class=\"current-treks-within-bounds-length\">{`${state.treksWithinBounds.length} ${\n state.treksWithinBounds.length > 1 ? translate[state.language].treks : translate[state.language].trek\n }`}</div>\n )}\n <button onClick={() => this.handleFilters()} class=\"handle-filters-button\">\n <span class=\"material-symbols-outlined margin-right-icon\">filter_list</span>\n {translate[state.language].filter}\n </button>\n </div>\n )}\n </div>\n\n <div class={`content-container ${this.showTrek ? 'content-trek' : 'content-treks'}`}>\n <div\n class={this.isLargeView ? 'large-view-app-treks-list-container' : 'app-treks-list-container'}\n style={{ display: this.showTrek ? 'none' : 'flex', position: this.showTrek ? 'absolute' : 'relative' }}\n >\n <grw-treks-list\n reset-store-on-disconnected=\"false\"\n is-large-view={this.isLargeView}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-surface-container-low={this.colorSurfaceContainerLow}\n ></grw-treks-list>\n </div>\n {this.showTrek && !state.currentTrek && (\n <div class={this.isLargeView ? 'large-view-loader-container' : 'loader-container'}>\n <span class=\"loader\"></span>\n </div>\n )}\n {state.currentTrek && (\n <div class={this.isLargeView ? 'large-view-app-trek-detail-container' : 'app-trek-detail-container'}>\n <grw-trek-detail\n reset-store-on-disconnected=\"false\"\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-primary-container={this.colorPrimaryContainer}\n color-on-primary-container={this.colorOnPrimaryContainer}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-background={this.colorBackground}\n weather={this.weather}\n style={{ zIndex: this.showTrekMap ? '0' : '1' }}\n is-large-view={this.isLargeView}\n ></grw-trek-detail>\n </div>\n )}\n <grw-map\n reset-store-on-disconnected=\"false\"\n class={this.isLargeView ? 'large-view-app-map-container' : 'app-map-container'}\n style={{\n visibility: (this.showTreksMap && !this.showTrek) || (this.showTrekMap && this.showTrek) || this.isLargeView ? 'visible' : 'hidden',\n zIndex: this.showTrekMap ? '1' : '0',\n }}\n url-layer={this.urlLayer}\n center={this.center}\n zoom={this.zoom}\n attribution={this.attribution}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-primary-container={this.colorPrimaryContainer}\n color-on-primary-container={this.colorOnPrimaryContainer}\n color-background={this.colorBackground}\n color-trek-line={this.colorTrekLine}\n color-departure-icon={this.colorDepartureIcon}\n color-arrival-icon={this.colorArrivalIcon}\n color-sensitive-area={this.colorSensitiveArea}\n color-poi-icon={this.colorPoiIcon}\n is-large-view={this.isLargeView}\n ></grw-map>\n </div>\n {(!this.showTrek || (this.showTrek && state.currentTrek)) && (\n <div class=\"map-visibility-button-container\">\n <button onClick={() => this.handleShowMap()} class=\"map-visibility-button\" style={{ display: this.isLargeView ? 'none' : 'flex' }}>\n <span class=\"material-symbols-outlined\">{this.showTrek ? (this.showTrekMap ? 'summarize' : 'map') : this.showTreksMap ? 'list' : 'map'}</span>\n {this.showTrek\n ? this.showTrekMap\n ? translate[state.language].showDetails\n : translate[state.language].showRoute\n : this.showTreksMap\n ? translate[state.language].showList\n : translate[state.language].showMap}\n </button>\n </div>\n )}\n </div>\n )}\n {!this.showTrek && this.showFilters && (\n <div class=\"options-container\">\n {/* <div class=\"filters-buttons-container\">\n <button class=\"filter-button\" onClick={() => this.handleEraseFilters()}>\n Effacer\n </button>\n <button class=\"filter-button\" onClick={() => this.handleOkFilters()}>\n Ok\n </button>\n </div> */}\n <div class=\"filters-container\">\n <grw-filter filterName={translate[state.language].practice} filterType=\"practices\" filterNameProperty=\"name\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].difficulty} filterType=\"difficulties\" filterNameProperty=\"label\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].duration} filterType=\"durations\" filterNameProperty=\"name\"></grw-filter>\n </div>\n <div onClick={() => this.handleFilters()} class=\"back-filters-container\"></div>\n </div>\n )}\n </Host>\n );\n }\n}\n"]}
@@ -123,14 +123,13 @@ export class GrwMap {
123
123
  });
124
124
  }
125
125
  }
126
- let bounds;
127
126
  if (!this.treksLayer) {
128
127
  if (trekscurrentDepartureCoordinates.length > 0 && !state.currentMapTreksBounds) {
129
- bounds = L.latLngBounds(trekscurrentDepartureCoordinates.map(coordinate => [coordinate[1], coordinate[0]]));
128
+ this.bounds = L.latLngBounds(trekscurrentDepartureCoordinates.map(coordinate => [coordinate[1], coordinate[0]]));
130
129
  }
131
130
  else {
132
131
  if (state.currentMapTreksBounds) {
133
- bounds = state.currentMapTreksBounds;
132
+ this.bounds = state.currentMapTreksBounds;
134
133
  }
135
134
  }
136
135
  this.treksLayer = L.geoJSON(treksFeatureCollection, {
@@ -164,7 +163,7 @@ export class GrwMap {
164
163
  }
165
164
  else {
166
165
  if (trekscurrentDepartureCoordinates.length > 0) {
167
- bounds = L.latLngBounds(trekscurrentDepartureCoordinates.map(coordinate => [coordinate[1], coordinate[0]]));
166
+ this.bounds = L.latLngBounds(trekscurrentDepartureCoordinates.map(coordinate => [coordinate[1], coordinate[0]]));
168
167
  }
169
168
  else {
170
169
  this.map.fire('moveend');
@@ -172,7 +171,7 @@ export class GrwMap {
172
171
  this.treksLayer.clearLayers();
173
172
  this.treksLayer.addData(treksFeatureCollection);
174
173
  }
175
- bounds && this.map.fitBounds(bounds);
174
+ this.bounds && this.map.fitBounds(this.bounds);
176
175
  !this.mapIsReady && (this.mapIsReady = !this.mapIsReady);
177
176
  this.map.on('moveend', this.handleTreksWithinBoundsBind);
178
177
  }
@@ -379,7 +378,7 @@ export class GrwMap {
379
378
  }
380
379
  const elevationOptions = {
381
380
  srcFolder: 'https://unpkg.com/@raruto/leaflet-elevation/src/',
382
- elevationDiv: `#${this.elevationRef.id}`,
381
+ elevationDiv: `#elevation`,
383
382
  theme: 'custom-theme',
384
383
  detached: true,
385
384
  height: 250,
@@ -431,8 +430,8 @@ export class GrwMap {
431
430
  }
432
431
  this.layersControl = L.control.layers(null, overlays, { collapsed: true }).addTo(this.map);
433
432
  this.handleLayersControlEvent();
434
- const bounds = L.latLngBounds(state.currentTrek.geometry.coordinates.map(coordinate => [coordinate[1], coordinate[0]]));
435
- bounds && this.map.fitBounds(bounds);
433
+ this.bounds = L.latLngBounds(state.currentTrek.geometry.coordinates.map(coordinate => [coordinate[1], coordinate[0]]));
434
+ this.bounds && this.map.fitBounds(this.bounds);
436
435
  !this.mapIsReady && (this.mapIsReady = !this.mapIsReady);
437
436
  }
438
437
  handleLayersControlEvent() {
@@ -501,7 +500,7 @@ export class GrwMap {
501
500
  '--color-trek-line': this.colorTrekLine,
502
501
  '--layers-image-src': `url(${layersImageSrc})`,
503
502
  '--map-bottom-space-height': this.isLargeView ? '0px' : '70px',
504
- } }, h("div", { id: "map", class: state.currentTrek ? 'trek-map' : 'treks-map', ref: el => (this.mapRef = el) }), h("div", { id: "elevation", ref: el => (this.elevationRef = el) }), h("div", { class: "map-bottom-space" }), !this.mapIsReady && (h("div", { class: "map-loader-container" }, h("span", { class: "loader" })))));
503
+ } }, h("div", { id: "map", style: {}, class: state.currentTrek ? 'trek-map' : 'treks-map', ref: el => (this.mapRef = el) }), state.currentTrek && (h("div", null, h("div", { id: "elevation", ref: el => (this.elevationRef = el) }), h("div", { class: "map-bottom-space" }))), !this.mapIsReady && (h("div", { class: "map-loader-container" }, h("span", { class: "loader" })))));
505
504
  }
506
505
  static get is() { return "grw-map"; }
507
506
  static get originalStyleUrls() {
@@ -1 +1 @@
1
- {"version":3,"file":"grw-map.js","sourceRoot":"","sources":["../../../src/components/grw-map/grw-map.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAgB,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAElH,OAAO,CAAC,MAAM,SAAS,CAAC;AACxB,OAAO,uBAAuB,CAAC;AAC/B,OAAO,yDAAyD,CAAC;AACjE,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAMtC,MAAM,OAAO,MAAM;;IAmCjB,oBAAe,GAEX,EAAE,CAAC;IAEP,gCAA2B,GAAyB,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;sBAnCtE,KAAK;;;kBAGV,MAAM;gBACR,EAAE;2BAES,SAAS;0BACV,SAAS;iCACF,SAAS;mCACP,SAAS;2BACjB,SAAS;yBAEX,SAAS;8BACJ,SAAS;4BACX,SAAS;8BACP,UAAU;wBAChB,SAA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AE,IAAI,CAAC,aAAa;QACvC,oBAAoB,EAAE,OAAO,cAAc,GAAG;QAC9C,2BAA2B,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM;OAC/D;MAED,WAAK,EAAE,EAAC,KAAK,EAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC,GAAQ;MACxG,WAAK,EAAE,EAAC,WAAW,EAAC,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,GAAQ;MAC/D,WAAK,KAAK,EAAC,kBAAkB,GAAO;MACnC,CAAC,IAAI,CAAC,UAAU,IAAI,CACnB,WAAK,KAAK,EAAC,sBAAsB;QAC/B,YAAM,KAAK,EAAC,QAAQ,GAAQ,CACxB,CACP,CACI,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Event, EventEmitter, getAssetPath, Build, Listen } from '@stencil/core';\nimport { Feature, FeatureCollection } from 'geojson';\nimport L from 'leaflet';\nimport 'leaflet.locatecontrol';\nimport '@raruto/leaflet-elevation/dist/leaflet-elevation.min.js';\nimport state, { onChange, reset } from 'store/store';\nimport { translate } from 'i18n/i18n';\n\n@Component({\n tag: 'grw-map',\n styleUrl: 'grw-map.scss',\n})\nexport class GrwMap {\n mapRef: HTMLElement;\n elevationRef: HTMLElement;\n @Event() trekCardPress: EventEmitter<number>;\n @State() mapIsReady = false;\n @Prop() urlLayer: string;\n @Prop() attribution: string;\n @Prop() center = '1, 1';\n @Prop() zoom = 10;\n\n @Prop() colorPrimaryApp = '#6b0030';\n @Prop() colorOnSurface = '#49454e';\n @Prop() colorPrimaryContainer = '#eaddff';\n @Prop() colorOnPrimaryContainer = '#21005e';\n @Prop() colorBackground = '#fef7ff';\n\n @Prop() colorTrekLine = '#6b0030';\n @Prop() colorDepartureIcon = '#006b3b';\n @Prop() colorArrivalIcon = '#85003b';\n @Prop() colorSensitiveArea = '\t#4974a5';\n @Prop() colorPoiIcon = '#974c6e';\n\n @Prop() resetStoreOnDisconnected = true;\n @Prop() isLargeView = false;\n map: L.Map;\n treksLayer: L.GeoJSON<any>;\n currentTrekLayer: L.GeoJSON<any>;\n currentDepartureArrivalLayer: L.GeoJSON<any>;\n currentPointsReferenceLayer: L.GeoJSON<any>;\n currentParkingLayer: L.GeoJSON<any>;\n currentSensitiveAreasLayer: L.GeoJSON<any>;\n currentPoisLayer: L.GeoJSON<any>;\n currentInformationDesksLayer: L.GeoJSON<any>;\n elevationControl: L.Control.Layers;\n layersControl: L.Control.Layers;\n userLayersState: {\n [key: number]: boolean;\n } = {};\n\n handleTreksWithinBoundsBind: (event: any) => void = this.handleTreksWithinBounds.bind(this);\n\n @Listen('centerOnMap', { target: 'window' })\n onCenterOnMap(event: CustomEvent<{ latitude: number; longitude: number }>) {\n this.map.setView(new L.LatLng(event.detail.latitude, event.detail.longitude), 17, { animate: false });\n }\n\n @Listen('descriptionReferenceIsInViewport', { target: 'window' })\n descriptionReferenceIsInViewport(event: CustomEvent<boolean>) {\n if (this.currentPointsReferenceLayer) {\n this.handleLayerVisibility(event.detail, this.currentPointsReferenceLayer);\n }\n }\n\n @Listen('parkingIsInViewport', { target: 'window' })\n parkingIsInViewport(event: CustomEvent<boolean>) {\n if (this.currentParkingLayer) {\n this.handleLayerVisibility(event.detail, this.currentParkingLayer);\n }\n }\n\n @Listen('informationDeskIsInViewport', { target: 'window' })\n onInformationDesksIsInViewport(event: CustomEvent<boolean>) {\n if (this.currentInformationDesksLayer) {\n this.handleLayerVisibility(event.detail, this.currentInformationDesksLayer);\n }\n }\n\n @Listen('sensitiveAreaIsInViewport', { target: 'window' })\n sensitiveAreaIsInViewport(event: CustomEvent<boolean>) {\n if (this.currentSensitiveAreasLayer) {\n this.handleLayerVisibility(event.detail, this.currentSensitiveAreasLayer);\n }\n }\n\n @Listen('poiIsInViewport', { target: 'window' })\n poiIsInViewport(event: CustomEvent<boolean>) {\n if (this.currentPoisLayer) {\n this.handleLayerVisibility(event.detail, this.currentPoisLayer);\n }\n }\n\n componentDidLoad() {\n this.map = L.map(this.mapRef, {\n center: this.center.split(',').map(Number) as L.LatLngExpression,\n zoom: this.zoom,\n });\n\n L.control.scale({ metric: true, imperial: false }).addTo(this.map);\n (L.control as any).locate({ showPopup: false }).addTo(this.map);\n\n L.tileLayer(this.urlLayer, {\n maxZoom: 19,\n attribution: this.attribution,\n }).addTo(this.map);\n\n if (state.currentTrek) {\n this.addTrek();\n } else if (state.currentTreks) {\n this.addTreks();\n }\n\n onChange('currentTreks', () => {\n if (state.currentTrek) {\n this.removeTreks();\n this.addTrek();\n } else if (state.currentTreks) {\n this.removeTrek();\n this.addTreks();\n }\n });\n\n onChange('currentTrek', () => {\n if (state.currentTrek) {\n this.removeTreks();\n this.addTrek();\n } else {\n this.removeTrek();\n this.addTreks();\n }\n });\n }\n\n handleLayerVisibility(visible: boolean, layer: L.GeoJSON) {\n if (visible && !this.map.hasLayer(layer)) {\n layer.addTo(this.map);\n } else if (this.map.hasLayer(layer) && !this.userLayersState[(layer as any)._leaflet_id]) {\n this.map.removeLayer(layer);\n }\n this.handleLayersControlEvent();\n }\n\n addTreks() {\n const trekscurrentDepartureCoordinates = [];\n const treksFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n if (state.currentTreks) {\n for (const trek of state.currentTreks) {\n trekscurrentDepartureCoordinates.push(trek.departure_geom);\n treksFeatureCollection.features.push({\n type: 'Feature',\n geometry: { type: 'Point', coordinates: trek.departure_geom },\n properties: {\n id: trek.id,\n name: trek.name,\n practice: state.practices.find(practice => practice.id === trek.practice)?.pictogram,\n imgSrc: trek.attachments && trek.attachments.length > 0 && trek.attachments[0].thumbnail,\n },\n });\n }\n }\n let bounds;\n if (!this.treksLayer) {\n if (trekscurrentDepartureCoordinates.length > 0 && !state.currentMapTreksBounds) {\n bounds = L.latLngBounds(trekscurrentDepartureCoordinates.map(coordinate => [coordinate[1], coordinate[0]]));\n } else {\n if (state.currentMapTreksBounds) {\n bounds = state.currentMapTreksBounds;\n }\n }\n this.treksLayer = L.geoJSON(treksFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n icon: L.divIcon({\n html: geoJsonPoint.properties.practice ? `<img src=${geoJsonPoint.properties.practice} />` : `<img />`,\n className: 'trek-marker',\n iconSize: 48,\n } as any),\n autoPanOnFocus: false,\n } as any),\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('click', () => {\n const trekDeparturePopup = L.DomUtil.create('div');\n trekDeparturePopup.className = 'trek-departure-popup';\n trekDeparturePopup.onclick = () => this.trekCardPress.emit(geoJsonPoint.properties.id);\n const trekName = L.DomUtil.create('div');\n trekName.innerHTML = geoJsonPoint.properties.name;\n trekName.className = 'trek-name';\n if (geoJsonPoint.properties.imgSrc) {\n trekName.className += ' trek-name-margin-top';\n const trekImg = L.DomUtil.create('img');\n trekImg.src = geoJsonPoint.properties.imgSrc;\n trekDeparturePopup.appendChild(trekImg);\n }\n trekDeparturePopup.appendChild(trekName);\n layer.bindPopup(trekDeparturePopup, { interactive: true, autoPan: false, closeButton: false } as any).openPopup();\n });\n },\n }).addTo(this.map);\n } else {\n if (trekscurrentDepartureCoordinates.length > 0) {\n bounds = L.latLngBounds(trekscurrentDepartureCoordinates.map(coordinate => [coordinate[1], coordinate[0]]));\n } else {\n this.map.fire('moveend');\n }\n this.treksLayer.clearLayers();\n this.treksLayer.addData(treksFeatureCollection);\n }\n\n bounds && this.map.fitBounds(bounds);\n\n !this.mapIsReady && (this.mapIsReady = !this.mapIsReady);\n\n this.map.on('moveend', this.handleTreksWithinBoundsBind);\n }\n\n removeTreks() {\n if (this.treksLayer) {\n state.currentMapTreksBounds = this.map.getBounds();\n this.map.removeLayer(this.treksLayer);\n this.treksLayer = null;\n this.map.off('moveend', this.handleTreksWithinBoundsBind);\n }\n }\n\n handleTreksWithinBounds() {\n if (\n (state.currentTreks && !state.currentMapTreksBounds) ||\n (state.currentTreks && state.currentMapTreksBounds && state.currentMapTreksBounds.toBBoxString() !== this.map.getBounds().toBBoxString())\n ) {\n state.treksWithinBounds = state.currentTreks.filter(trek => this.map.getBounds().contains(L.latLng(trek.departure_geom[1], trek.departure_geom[0])));\n }\n }\n\n addTrek() {\n const departureArrivalImageSrc = getAssetPath(`${Build.isDev ? '/' : ''}assets/departure-arrival.svg`);\n const currentTrekFeature: Feature = {\n type: 'Feature',\n geometry: state.currentTrek.geometry,\n properties: {},\n };\n\n this.currentTrekLayer = L.geoJSON(currentTrekFeature, {\n style: () => ({\n color: 'transparent',\n }),\n interactive: false,\n }).addTo(this.map);\n\n const currentDepartureCoordinates = [state.currentTrek.geometry.coordinates.at(0)[0], state.currentTrek.geometry.coordinates.at(0)[1]];\n const currentArrivalCoordinates = [state.currentTrek.geometry.coordinates.at(-1)[0], state.currentTrek.geometry.coordinates.at(-1)[1]];\n const currentDepartureArrivalFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [\n {\n type: 'Feature',\n properties: { type: 'departure' },\n geometry: { type: 'Point', coordinates: currentDepartureCoordinates },\n },\n ],\n };\n\n if (currentDepartureCoordinates[0] !== currentArrivalCoordinates[0] || currentDepartureCoordinates[1] !== currentArrivalCoordinates[1]) {\n currentDepartureArrivalFeatureCollection.features.push({\n type: 'Feature',\n properties: { type: 'arrival' },\n geometry: { type: 'Point', coordinates: currentArrivalCoordinates },\n });\n }\n\n this.currentDepartureArrivalLayer = L.geoJSON(currentDepartureArrivalFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n icon: L.divIcon({\n html: `<img src=${departureArrivalImageSrc}>`,\n className: geoJsonPoint.properties.type === 'departure' ? 'departure-icon' : 'arrival-icon',\n iconSize: 48,\n iconAnchor: [0, 48],\n } as any),\n autoPanOnFocus: false,\n interactive: false,\n } as any),\n }).addTo(this.map);\n\n if (state.currentTrek.parking_location) {\n const currentParking: Feature = {\n type: 'Feature',\n properties: {},\n geometry: { type: 'Point', coordinates: state.currentTrek.parking_location },\n };\n this.currentParkingLayer = L.geoJSON(currentParking, {\n pointToLayer: (_geoJsonPoint, latlng) =>\n L.marker(latlng, {\n icon: L.divIcon({\n html: '<div>P</div>',\n className: 'parking-icon',\n iconSize: 48,\n iconAnchor: [0, 48],\n } as any),\n autoPanOnFocus: false,\n interactive: false,\n } as any),\n });\n }\n\n if (state.currentSensitiveAreas && state.currentSensitiveAreas.length > 0) {\n const currentSensitiveAreasFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n for (const sensitiveArea of state.currentSensitiveAreas) {\n currentSensitiveAreasFeatureCollection.features.push({\n type: 'Feature',\n properties: { name: sensitiveArea.name },\n geometry: sensitiveArea.geometry,\n });\n }\n\n this.currentSensitiveAreasLayer = L.geoJSON(currentSensitiveAreasFeatureCollection, {\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('mouseover', () => {\n const sensitiveAreaTooltip = L.DomUtil.create('div');\n sensitiveAreaTooltip.className = 'sensitive-area-tooltip';\n const sensitiveAreaName = L.DomUtil.create('div');\n sensitiveAreaName.innerHTML = geoJsonPoint.properties.name;\n sensitiveAreaName.className = 'sensitive-area-name';\n sensitiveAreaTooltip.appendChild(sensitiveAreaName);\n layer.bindTooltip(sensitiveAreaTooltip).openTooltip();\n });\n },\n style: () => ({ color: this.colorSensitiveArea }),\n });\n }\n\n if (state.currentPois && state.currentPois.length > 0) {\n const currentPoisFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n for (const currentPoi of state.currentPois) {\n currentPoisFeatureCollection.features.push({\n type: 'Feature',\n properties: { name: currentPoi.name, type_pictogram: state.poiTypes.find(poiType => poiType.id === currentPoi.type)?.pictogram },\n geometry: currentPoi.geometry,\n });\n }\n\n this.currentPoisLayer = L.geoJSON(currentPoisFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n icon: L.divIcon({\n html: geoJsonPoint.properties.type_pictogram ? `<img src=${geoJsonPoint.properties.type_pictogram} />` : `<img />`,\n className: 'poi-icon',\n iconSize: 48,\n } as any),\n autoPanOnFocus: false,\n } as any),\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('mouseover', () => {\n const poiTooltip = L.DomUtil.create('div');\n poiTooltip.className = 'poi-tooltip';\n const poiName = L.DomUtil.create('div');\n poiName.innerHTML = geoJsonPoint.properties.name;\n poiName.className = 'poi-name';\n poiTooltip.appendChild(poiName);\n layer.bindTooltip(poiTooltip).openTooltip();\n });\n },\n });\n }\n\n if (state.currentInformationDesks && state.currentInformationDesks.length > 0) {\n const currentInformationDesksFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n for (const currentInformationDesk of state.currentInformationDesks.filter(currentInformationDesks =>\n state.currentTrek.information_desks.includes(currentInformationDesks.id),\n )) {\n if (currentInformationDesk.latitude && currentInformationDesk.longitude) {\n currentInformationDesksFeatureCollection.features.push({\n type: 'Feature',\n properties: { name: currentInformationDesk.name, type_pictogram: currentInformationDesk.type.pictogram },\n geometry: { type: 'Point', coordinates: [Number(currentInformationDesk.longitude), Number(currentInformationDesk.latitude)] },\n });\n }\n }\n\n this.currentInformationDesksLayer = L.geoJSON(currentInformationDesksFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n icon: L.divIcon({\n html: geoJsonPoint.properties.type_pictogram ? `<img src=${geoJsonPoint.properties.type_pictogram} />` : `<img />`,\n className: 'information-desks-icon',\n iconSize: 48,\n } as any),\n autoPanOnFocus: false,\n } as any),\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('mouseover', () => {\n const informationDesksTooltip = L.DomUtil.create('div');\n informationDesksTooltip.className = 'information-desks-tooltip';\n const informationDesksName = L.DomUtil.create('div');\n informationDesksName.innerHTML = geoJsonPoint.properties.name;\n informationDesksName.className = 'information-desks-name';\n informationDesksTooltip.appendChild(informationDesksName);\n layer.bindTooltip(informationDesksTooltip).openTooltip();\n });\n },\n });\n }\n\n if (state.currentTrek.points_reference) {\n const currentPointsReferenceFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n currentPointsReferenceFeatureCollection.features.push({\n type: 'Feature',\n properties: {},\n geometry: state.currentTrek.points_reference,\n });\n\n let index = 0;\n this.currentPointsReferenceLayer = L.geoJSON(currentPointsReferenceFeatureCollection, {\n pointToLayer: (_geoJsonPoint, latlng) => {\n index += 1;\n return L.marker(latlng, {\n icon: L.divIcon({\n html: index,\n className: 'point-reference-icon',\n iconSize: 24,\n } as any),\n autoPanOnFocus: false,\n interactive: false,\n } as any);\n },\n });\n }\n const elevationOptions = {\n srcFolder: 'https://unpkg.com/@raruto/leaflet-elevation/src/',\n elevationDiv: `#${this.elevationRef.id}`,\n theme: 'custom-theme',\n detached: true,\n height: 250,\n wptIcons: false,\n wptLabels: false,\n collapsed: false,\n autohide: false,\n distanceMarkers: false,\n hotline: false,\n closeBtn: false,\n summary: false,\n time: false,\n timestamps: false,\n legend: false,\n downloadLink: false,\n autofitBounds: false,\n ruler: false,\n edgeScale: false,\n waypoints: false,\n almostOver: false,\n speed: false,\n slope: false,\n acceleration: false,\n reverseCoords: false,\n imperial: false,\n };\n this.elevationControl = (L.control as any).elevation({ ...elevationOptions }).addTo(this.map);\n const elevation = JSON.stringify({\n name: `${state.currentTrek.name}`,\n type: 'FeatureCollection',\n features: [{ type: 'Feature', geometry: { type: 'LineString', coordinates: state.currentTrek.geometry.coordinates }, properties: null }],\n });\n (this.elevationControl as any).load(elevation);\n\n const overlays = {};\n if (this.currentPointsReferenceLayer) {\n overlays[translate[state.language].layers.pointsReference] = this.currentPointsReferenceLayer;\n }\n if (this.currentParkingLayer) {\n overlays[translate[state.language].layers.parking] = this.currentParkingLayer;\n }\n if (this.currentSensitiveAreasLayer) {\n overlays[translate[state.language].layers.sensitiveArea] = this.currentSensitiveAreasLayer;\n }\n if (this.currentInformationDesksLayer) {\n overlays[translate[state.language].layers.informationPlaces] = this.currentInformationDesksLayer;\n }\n if (this.currentPoisLayer) {\n overlays[translate[state.language].layers.pois] = this.currentPoisLayer;\n }\n this.layersControl = L.control.layers(null, overlays, { collapsed: true }).addTo(this.map);\n this.handleLayersControlEvent();\n\n const bounds = L.latLngBounds(state.currentTrek.geometry.coordinates.map(coordinate => [coordinate[1], coordinate[0]]));\n bounds && this.map.fitBounds(bounds);\n\n !this.mapIsReady && (this.mapIsReady = !this.mapIsReady);\n }\n\n handleLayersControlEvent() {\n const userLayersState: HTMLInputElement[] = (this.layersControl as any)._layerControlInputs;\n userLayersState.forEach((userLayerState: any) => {\n userLayerState.onchange = event => {\n this.userLayersState[userLayerState.layerId] = (event.target as any).checked;\n };\n });\n }\n\n removeTrek() {\n if (this.layersControl) {\n this.map.removeControl(this.layersControl);\n this.layersControl = null;\n }\n\n if (this.elevationControl) {\n (this.elevationControl as any).clear();\n this.map.removeControl(this.elevationControl);\n this.elevationControl = null;\n }\n\n if (this.currentTrekLayer) {\n this.map.removeLayer(this.currentTrekLayer);\n this.currentTrekLayer = null;\n }\n\n if (this.currentDepartureArrivalLayer) {\n this.map.removeLayer(this.currentDepartureArrivalLayer);\n this.currentDepartureArrivalLayer = null;\n }\n\n if (this.currentParkingLayer) {\n this.map.removeLayer(this.currentParkingLayer);\n this.currentParkingLayer = null;\n }\n\n if (this.currentSensitiveAreasLayer) {\n this.map.removeLayer(this.currentSensitiveAreasLayer);\n this.currentSensitiveAreasLayer = null;\n }\n\n if (this.currentPoisLayer) {\n this.map.removeLayer(this.currentPoisLayer);\n this.currentPoisLayer = null;\n }\n\n if (this.currentInformationDesksLayer) {\n this.map.removeLayer(this.currentInformationDesksLayer);\n this.currentInformationDesksLayer = null;\n }\n\n if (this.currentPointsReferenceLayer) {\n this.map.removeLayer(this.currentPointsReferenceLayer);\n this.currentPointsReferenceLayer = null;\n }\n }\n\n disconnectedCallback() {\n if (this.resetStoreOnDisconnected) {\n reset();\n }\n }\n\n render() {\n const layersImageSrc = getAssetPath(`${Build.isDev ? '/' : ''}assets/layers.svg`);\n return (\n <Host\n style={{\n '--color-primary-app': this.colorPrimaryApp,\n '--color-on-surface': this.colorOnSurface,\n '--color-primary-container': this.colorPrimaryContainer,\n '--color-on-primary-container': this.colorOnPrimaryContainer,\n '--color-background': this.colorBackground,\n '--color-departure-icon': this.colorDepartureIcon,\n '--color-arrival-icon': this.colorArrivalIcon,\n '--color-poi-icon': this.colorPoiIcon,\n '--color-trek-line': this.colorTrekLine,\n '--layers-image-src': `url(${layersImageSrc})`,\n '--map-bottom-space-height': this.isLargeView ? '0px' : '70px',\n }}\n >\n <div id=\"map\" class={state.currentTrek ? 'trek-map' : 'treks-map'} ref={el => (this.mapRef = el)}></div>\n <div id=\"elevation\" ref={el => (this.elevationRef = el)}></div>\n <div class=\"map-bottom-space\"></div>\n {!this.mapIsReady && (\n <div class=\"map-loader-container\">\n <span class=\"loader\"></span>\n </div>\n )}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"grw-map.js","sourceRoot":"","sources":["../../../src/components/grw-map/grw-map.tsx"],"names":[],"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,GAAQ;QAC/D,WAAK,KAAK,EAAC,kBAAkB,GAAO,CAChC,CACP;MAEA,CAAC,IAAI,CAAC,UAAU,IAAI,CACnB,WAAK,KAAK,EAAC,sBAAsB;QAC/B,YAAM,KAAK,EAAC,QAAQ,GAAQ,CACxB,CACP,CACI,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Event, EventEmitter, getAssetPath, Build, Listen } from '@stencil/core';\nimport { Feature, FeatureCollection } from 'geojson';\nimport L from 'leaflet';\nimport 'leaflet.locatecontrol';\nimport '@raruto/leaflet-elevation/dist/leaflet-elevation.min.js';\nimport state, { onChange, reset } from 'store/store';\nimport { translate } from 'i18n/i18n';\n\n@Component({\n tag: 'grw-map',\n styleUrl: 'grw-map.scss',\n})\nexport class GrwMap {\n mapRef: HTMLElement;\n elevationRef: HTMLElement;\n @Event() trekCardPress: EventEmitter<number>;\n @State() mapIsReady = false;\n @Prop() urlLayer: string;\n @Prop() attribution: string;\n @Prop() center = '1, 1';\n @Prop() zoom = 10;\n\n @Prop() colorPrimaryApp = '#6b0030';\n @Prop() colorOnSurface = '#49454e';\n @Prop() colorPrimaryContainer = '#eaddff';\n @Prop() colorOnPrimaryContainer = '#21005e';\n @Prop() colorBackground = '#fef7ff';\n\n @Prop() colorTrekLine = '#6b0030';\n @Prop() colorDepartureIcon = '#006b3b';\n @Prop() colorArrivalIcon = '#85003b';\n @Prop() colorSensitiveArea = '\t#4974a5';\n @Prop() colorPoiIcon = '#974c6e';\n\n @Prop() resetStoreOnDisconnected = true;\n @Prop() isLargeView = false;\n map: L.Map;\n resizeObserver: ResizeObserver;\n bounds;\n treksLayer: L.GeoJSON<any>;\n currentTrekLayer: L.GeoJSON<any>;\n currentDepartureArrivalLayer: L.GeoJSON<any>;\n currentPointsReferenceLayer: L.GeoJSON<any>;\n currentParkingLayer: L.GeoJSON<any>;\n currentSensitiveAreasLayer: L.GeoJSON<any>;\n currentPoisLayer: L.GeoJSON<any>;\n currentInformationDesksLayer: L.GeoJSON<any>;\n elevationControl: L.Control.Layers;\n layersControl: L.Control.Layers;\n userLayersState: {\n [key: number]: boolean;\n } = {};\n\n handleTreksWithinBoundsBind: (event: any) => void = this.handleTreksWithinBounds.bind(this);\n\n @Listen('centerOnMap', { target: 'window' })\n onCenterOnMap(event: CustomEvent<{ latitude: number; longitude: number }>) {\n this.map.setView(new L.LatLng(event.detail.latitude, event.detail.longitude), 17, { animate: false });\n }\n\n @Listen('descriptionReferenceIsInViewport', { target: 'window' })\n descriptionReferenceIsInViewport(event: CustomEvent<boolean>) {\n if (this.currentPointsReferenceLayer) {\n this.handleLayerVisibility(event.detail, this.currentPointsReferenceLayer);\n }\n }\n\n @Listen('parkingIsInViewport', { target: 'window' })\n parkingIsInViewport(event: CustomEvent<boolean>) {\n if (this.currentParkingLayer) {\n this.handleLayerVisibility(event.detail, this.currentParkingLayer);\n }\n }\n\n @Listen('informationDeskIsInViewport', { target: 'window' })\n onInformationDesksIsInViewport(event: CustomEvent<boolean>) {\n if (this.currentInformationDesksLayer) {\n this.handleLayerVisibility(event.detail, this.currentInformationDesksLayer);\n }\n }\n\n @Listen('sensitiveAreaIsInViewport', { target: 'window' })\n sensitiveAreaIsInViewport(event: CustomEvent<boolean>) {\n if (this.currentSensitiveAreasLayer) {\n this.handleLayerVisibility(event.detail, this.currentSensitiveAreasLayer);\n }\n }\n\n @Listen('poiIsInViewport', { target: 'window' })\n poiIsInViewport(event: CustomEvent<boolean>) {\n if (this.currentPoisLayer) {\n this.handleLayerVisibility(event.detail, this.currentPoisLayer);\n }\n }\n\n componentDidLoad() {\n this.map = L.map(this.mapRef, {\n center: this.center.split(',').map(Number) as L.LatLngExpression,\n zoom: this.zoom,\n });\n\n L.control.scale({ metric: true, imperial: false }).addTo(this.map);\n (L.control as any).locate({ showPopup: false }).addTo(this.map);\n\n L.tileLayer(this.urlLayer, {\n maxZoom: 19,\n attribution: this.attribution,\n }).addTo(this.map);\n\n if (state.currentTrek) {\n this.addTrek();\n } else if (state.currentTreks) {\n this.addTreks();\n }\n\n onChange('currentTreks', () => {\n if (state.currentTrek) {\n this.removeTreks();\n this.addTrek();\n } else if (state.currentTreks) {\n this.removeTrek();\n this.addTreks();\n }\n });\n\n onChange('currentTrek', () => {\n if (state.currentTrek) {\n this.removeTreks();\n this.addTrek();\n } else {\n this.removeTrek();\n this.addTreks();\n }\n });\n }\n\n handleLayerVisibility(visible: boolean, layer: L.GeoJSON) {\n if (visible && !this.map.hasLayer(layer)) {\n layer.addTo(this.map);\n } else if (this.map.hasLayer(layer) && !this.userLayersState[(layer as any)._leaflet_id]) {\n this.map.removeLayer(layer);\n }\n this.handleLayersControlEvent();\n }\n\n addTreks() {\n const trekscurrentDepartureCoordinates = [];\n const treksFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n if (state.currentTreks) {\n for (const trek of state.currentTreks) {\n trekscurrentDepartureCoordinates.push(trek.departure_geom);\n treksFeatureCollection.features.push({\n type: 'Feature',\n geometry: { type: 'Point', coordinates: trek.departure_geom },\n properties: {\n id: trek.id,\n name: trek.name,\n practice: state.practices.find(practice => practice.id === trek.practice)?.pictogram,\n imgSrc: trek.attachments && trek.attachments.length > 0 && trek.attachments[0].thumbnail,\n },\n });\n }\n }\n\n if (!this.treksLayer) {\n if (trekscurrentDepartureCoordinates.length > 0 && !state.currentMapTreksBounds) {\n this.bounds = L.latLngBounds(trekscurrentDepartureCoordinates.map(coordinate => [coordinate[1], coordinate[0]]));\n } else {\n if (state.currentMapTreksBounds) {\n this.bounds = state.currentMapTreksBounds;\n }\n }\n this.treksLayer = L.geoJSON(treksFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n icon: L.divIcon({\n html: geoJsonPoint.properties.practice ? `<img src=${geoJsonPoint.properties.practice} />` : `<img />`,\n className: 'trek-marker',\n iconSize: 48,\n } as any),\n autoPanOnFocus: false,\n } as any),\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('click', () => {\n const trekDeparturePopup = L.DomUtil.create('div');\n trekDeparturePopup.className = 'trek-departure-popup';\n trekDeparturePopup.onclick = () => this.trekCardPress.emit(geoJsonPoint.properties.id);\n const trekName = L.DomUtil.create('div');\n trekName.innerHTML = geoJsonPoint.properties.name;\n trekName.className = 'trek-name';\n if (geoJsonPoint.properties.imgSrc) {\n trekName.className += ' trek-name-margin-top';\n const trekImg = L.DomUtil.create('img');\n trekImg.src = geoJsonPoint.properties.imgSrc;\n trekDeparturePopup.appendChild(trekImg);\n }\n trekDeparturePopup.appendChild(trekName);\n layer.bindPopup(trekDeparturePopup, { interactive: true, autoPan: false, closeButton: false } as any).openPopup();\n });\n },\n }).addTo(this.map);\n } else {\n if (trekscurrentDepartureCoordinates.length > 0) {\n this.bounds = L.latLngBounds(trekscurrentDepartureCoordinates.map(coordinate => [coordinate[1], coordinate[0]]));\n } else {\n this.map.fire('moveend');\n }\n this.treksLayer.clearLayers();\n this.treksLayer.addData(treksFeatureCollection);\n }\n\n this.bounds && this.map.fitBounds(this.bounds);\n\n !this.mapIsReady && (this.mapIsReady = !this.mapIsReady);\n\n this.map.on('moveend', this.handleTreksWithinBoundsBind);\n }\n\n removeTreks() {\n if (this.treksLayer) {\n state.currentMapTreksBounds = this.map.getBounds();\n this.map.removeLayer(this.treksLayer);\n this.treksLayer = null;\n this.map.off('moveend', this.handleTreksWithinBoundsBind);\n }\n }\n\n handleTreksWithinBounds() {\n if (\n (state.currentTreks && !state.currentMapTreksBounds) ||\n (state.currentTreks && state.currentMapTreksBounds && state.currentMapTreksBounds.toBBoxString() !== this.map.getBounds().toBBoxString())\n ) {\n state.treksWithinBounds = state.currentTreks.filter(trek => this.map.getBounds().contains(L.latLng(trek.departure_geom[1], trek.departure_geom[0])));\n }\n }\n\n addTrek() {\n const departureArrivalImageSrc = getAssetPath(`${Build.isDev ? '/' : ''}assets/departure-arrival.svg`);\n const currentTrekFeature: Feature = {\n type: 'Feature',\n geometry: state.currentTrek.geometry,\n properties: {},\n };\n\n this.currentTrekLayer = L.geoJSON(currentTrekFeature, {\n style: () => ({\n color: 'transparent',\n }),\n interactive: false,\n }).addTo(this.map);\n\n const currentDepartureCoordinates = [state.currentTrek.geometry.coordinates.at(0)[0], state.currentTrek.geometry.coordinates.at(0)[1]];\n const currentArrivalCoordinates = [state.currentTrek.geometry.coordinates.at(-1)[0], state.currentTrek.geometry.coordinates.at(-1)[1]];\n const currentDepartureArrivalFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [\n {\n type: 'Feature',\n properties: { type: 'departure' },\n geometry: { type: 'Point', coordinates: currentDepartureCoordinates },\n },\n ],\n };\n\n if (currentDepartureCoordinates[0] !== currentArrivalCoordinates[0] || currentDepartureCoordinates[1] !== currentArrivalCoordinates[1]) {\n currentDepartureArrivalFeatureCollection.features.push({\n type: 'Feature',\n properties: { type: 'arrival' },\n geometry: { type: 'Point', coordinates: currentArrivalCoordinates },\n });\n }\n\n this.currentDepartureArrivalLayer = L.geoJSON(currentDepartureArrivalFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n icon: L.divIcon({\n html: `<img src=${departureArrivalImageSrc}>`,\n className: geoJsonPoint.properties.type === 'departure' ? 'departure-icon' : 'arrival-icon',\n iconSize: 48,\n iconAnchor: [0, 48],\n } as any),\n autoPanOnFocus: false,\n interactive: false,\n } as any),\n }).addTo(this.map);\n\n if (state.currentTrek.parking_location) {\n const currentParking: Feature = {\n type: 'Feature',\n properties: {},\n geometry: { type: 'Point', coordinates: state.currentTrek.parking_location },\n };\n this.currentParkingLayer = L.geoJSON(currentParking, {\n pointToLayer: (_geoJsonPoint, latlng) =>\n L.marker(latlng, {\n icon: L.divIcon({\n html: '<div>P</div>',\n className: 'parking-icon',\n iconSize: 48,\n iconAnchor: [0, 48],\n } as any),\n autoPanOnFocus: false,\n interactive: false,\n } as any),\n });\n }\n\n if (state.currentSensitiveAreas && state.currentSensitiveAreas.length > 0) {\n const currentSensitiveAreasFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n for (const sensitiveArea of state.currentSensitiveAreas) {\n currentSensitiveAreasFeatureCollection.features.push({\n type: 'Feature',\n properties: { name: sensitiveArea.name },\n geometry: sensitiveArea.geometry,\n });\n }\n\n this.currentSensitiveAreasLayer = L.geoJSON(currentSensitiveAreasFeatureCollection, {\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('mouseover', () => {\n const sensitiveAreaTooltip = L.DomUtil.create('div');\n sensitiveAreaTooltip.className = 'sensitive-area-tooltip';\n const sensitiveAreaName = L.DomUtil.create('div');\n sensitiveAreaName.innerHTML = geoJsonPoint.properties.name;\n sensitiveAreaName.className = 'sensitive-area-name';\n sensitiveAreaTooltip.appendChild(sensitiveAreaName);\n layer.bindTooltip(sensitiveAreaTooltip).openTooltip();\n });\n },\n style: () => ({ color: this.colorSensitiveArea }),\n });\n }\n\n if (state.currentPois && state.currentPois.length > 0) {\n const currentPoisFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n for (const currentPoi of state.currentPois) {\n currentPoisFeatureCollection.features.push({\n type: 'Feature',\n properties: { name: currentPoi.name, type_pictogram: state.poiTypes.find(poiType => poiType.id === currentPoi.type)?.pictogram },\n geometry: currentPoi.geometry,\n });\n }\n\n this.currentPoisLayer = L.geoJSON(currentPoisFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n icon: L.divIcon({\n html: geoJsonPoint.properties.type_pictogram ? `<img src=${geoJsonPoint.properties.type_pictogram} />` : `<img />`,\n className: 'poi-icon',\n iconSize: 48,\n } as any),\n autoPanOnFocus: false,\n } as any),\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('mouseover', () => {\n const poiTooltip = L.DomUtil.create('div');\n poiTooltip.className = 'poi-tooltip';\n const poiName = L.DomUtil.create('div');\n poiName.innerHTML = geoJsonPoint.properties.name;\n poiName.className = 'poi-name';\n poiTooltip.appendChild(poiName);\n layer.bindTooltip(poiTooltip).openTooltip();\n });\n },\n });\n }\n\n if (state.currentInformationDesks && state.currentInformationDesks.length > 0) {\n const currentInformationDesksFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n for (const currentInformationDesk of state.currentInformationDesks.filter(currentInformationDesks =>\n state.currentTrek.information_desks.includes(currentInformationDesks.id),\n )) {\n if (currentInformationDesk.latitude && currentInformationDesk.longitude) {\n currentInformationDesksFeatureCollection.features.push({\n type: 'Feature',\n properties: { name: currentInformationDesk.name, type_pictogram: currentInformationDesk.type.pictogram },\n geometry: { type: 'Point', coordinates: [Number(currentInformationDesk.longitude), Number(currentInformationDesk.latitude)] },\n });\n }\n }\n\n this.currentInformationDesksLayer = L.geoJSON(currentInformationDesksFeatureCollection, {\n pointToLayer: (geoJsonPoint, latlng) =>\n L.marker(latlng, {\n icon: L.divIcon({\n html: geoJsonPoint.properties.type_pictogram ? `<img src=${geoJsonPoint.properties.type_pictogram} />` : `<img />`,\n className: 'information-desks-icon',\n iconSize: 48,\n } as any),\n autoPanOnFocus: false,\n } as any),\n onEachFeature: (geoJsonPoint, layer) => {\n layer.once('mouseover', () => {\n const informationDesksTooltip = L.DomUtil.create('div');\n informationDesksTooltip.className = 'information-desks-tooltip';\n const informationDesksName = L.DomUtil.create('div');\n informationDesksName.innerHTML = geoJsonPoint.properties.name;\n informationDesksName.className = 'information-desks-name';\n informationDesksTooltip.appendChild(informationDesksName);\n layer.bindTooltip(informationDesksTooltip).openTooltip();\n });\n },\n });\n }\n\n if (state.currentTrek.points_reference) {\n const currentPointsReferenceFeatureCollection: FeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n currentPointsReferenceFeatureCollection.features.push({\n type: 'Feature',\n properties: {},\n geometry: state.currentTrek.points_reference,\n });\n\n let index = 0;\n this.currentPointsReferenceLayer = L.geoJSON(currentPointsReferenceFeatureCollection, {\n pointToLayer: (_geoJsonPoint, latlng) => {\n index += 1;\n return L.marker(latlng, {\n icon: L.divIcon({\n html: index,\n className: 'point-reference-icon',\n iconSize: 24,\n } as any),\n autoPanOnFocus: false,\n interactive: false,\n } as any);\n },\n });\n }\n const elevationOptions = {\n srcFolder: 'https://unpkg.com/@raruto/leaflet-elevation/src/',\n elevationDiv: `#elevation`,\n theme: 'custom-theme',\n detached: true,\n height: 250,\n wptIcons: false,\n wptLabels: false,\n collapsed: false,\n autohide: false,\n distanceMarkers: false,\n hotline: false,\n closeBtn: false,\n summary: false,\n time: false,\n timestamps: false,\n legend: false,\n downloadLink: false,\n autofitBounds: false,\n ruler: false,\n edgeScale: false,\n waypoints: false,\n almostOver: false,\n speed: false,\n slope: false,\n acceleration: false,\n reverseCoords: false,\n imperial: false,\n };\n this.elevationControl = (L.control as any).elevation({ ...elevationOptions }).addTo(this.map);\n const elevation = JSON.stringify({\n name: `${state.currentTrek.name}`,\n type: 'FeatureCollection',\n features: [{ type: 'Feature', geometry: { type: 'LineString', coordinates: state.currentTrek.geometry.coordinates }, properties: null }],\n });\n (this.elevationControl as any).load(elevation);\n\n const overlays = {};\n if (this.currentPointsReferenceLayer) {\n overlays[translate[state.language].layers.pointsReference] = this.currentPointsReferenceLayer;\n }\n if (this.currentParkingLayer) {\n overlays[translate[state.language].layers.parking] = this.currentParkingLayer;\n }\n if (this.currentSensitiveAreasLayer) {\n overlays[translate[state.language].layers.sensitiveArea] = this.currentSensitiveAreasLayer;\n }\n if (this.currentInformationDesksLayer) {\n overlays[translate[state.language].layers.informationPlaces] = this.currentInformationDesksLayer;\n }\n if (this.currentPoisLayer) {\n overlays[translate[state.language].layers.pois] = this.currentPoisLayer;\n }\n this.layersControl = L.control.layers(null, overlays, { collapsed: true }).addTo(this.map);\n this.handleLayersControlEvent();\n\n this.bounds = L.latLngBounds(state.currentTrek.geometry.coordinates.map(coordinate => [coordinate[1], coordinate[0]]));\n this.bounds && this.map.fitBounds(this.bounds);\n\n !this.mapIsReady && (this.mapIsReady = !this.mapIsReady);\n }\n\n handleLayersControlEvent() {\n const userLayersState: HTMLInputElement[] = (this.layersControl as any)._layerControlInputs;\n userLayersState.forEach((userLayerState: any) => {\n userLayerState.onchange = event => {\n this.userLayersState[userLayerState.layerId] = (event.target as any).checked;\n };\n });\n }\n\n removeTrek() {\n if (this.layersControl) {\n this.map.removeControl(this.layersControl);\n this.layersControl = null;\n }\n\n if (this.elevationControl) {\n (this.elevationControl as any).clear();\n this.map.removeControl(this.elevationControl);\n this.elevationControl = null;\n }\n\n if (this.currentTrekLayer) {\n this.map.removeLayer(this.currentTrekLayer);\n this.currentTrekLayer = null;\n }\n\n if (this.currentDepartureArrivalLayer) {\n this.map.removeLayer(this.currentDepartureArrivalLayer);\n this.currentDepartureArrivalLayer = null;\n }\n\n if (this.currentParkingLayer) {\n this.map.removeLayer(this.currentParkingLayer);\n this.currentParkingLayer = null;\n }\n\n if (this.currentSensitiveAreasLayer) {\n this.map.removeLayer(this.currentSensitiveAreasLayer);\n this.currentSensitiveAreasLayer = null;\n }\n\n if (this.currentPoisLayer) {\n this.map.removeLayer(this.currentPoisLayer);\n this.currentPoisLayer = null;\n }\n\n if (this.currentInformationDesksLayer) {\n this.map.removeLayer(this.currentInformationDesksLayer);\n this.currentInformationDesksLayer = null;\n }\n\n if (this.currentPointsReferenceLayer) {\n this.map.removeLayer(this.currentPointsReferenceLayer);\n this.currentPointsReferenceLayer = null;\n }\n }\n\n disconnectedCallback() {\n if (this.resetStoreOnDisconnected) {\n reset();\n }\n }\n\n render() {\n const layersImageSrc = getAssetPath(`${Build.isDev ? '/' : ''}assets/layers.svg`);\n return (\n <Host\n style={{\n '--color-primary-app': this.colorPrimaryApp,\n '--color-on-surface': this.colorOnSurface,\n '--color-primary-container': this.colorPrimaryContainer,\n '--color-on-primary-container': this.colorOnPrimaryContainer,\n '--color-background': this.colorBackground,\n '--color-departure-icon': this.colorDepartureIcon,\n '--color-arrival-icon': this.colorArrivalIcon,\n '--color-poi-icon': this.colorPoiIcon,\n '--color-trek-line': this.colorTrekLine,\n '--layers-image-src': `url(${layersImageSrc})`,\n '--map-bottom-space-height': this.isLargeView ? '0px' : '70px',\n }}\n >\n <div id=\"map\" style={{}} class={state.currentTrek ? 'trek-map' : 'treks-map'} ref={el => (this.mapRef = el)}></div>\n {state.currentTrek && (\n <div>\n <div id=\"elevation\" ref={el => (this.elevationRef = el)}></div>\n <div class=\"map-bottom-space\"></div>\n </div>\n )}\n\n {!this.mapIsReady && (\n <div class=\"map-loader-container\">\n <span class=\"loader\"></span>\n </div>\n )}\n </Host>\n );\n }\n}\n"]}
@@ -684,12 +684,13 @@ grw-trek-detail {
684
684
  font-size: 16px;
685
685
  line-height: 24px;
686
686
  font-weight: 500;
687
- margin-bottom: 8px;
688
687
  }
689
688
  .trek-detail-container .downloads-container .links-container {
690
689
  display: flex;
690
+ flex-wrap: wrap;
691
691
  }
692
692
  .trek-detail-container .downloads-container .links-container a {
693
+ margin-top: 8px;
693
694
  background-color: var(--color-primary-container);
694
695
  color: var(--color-on-primary-container);
695
696
  border-radius: 8px;
@@ -708,7 +709,7 @@ grw-trek-detail {
708
709
  text-decoration: none;
709
710
  }
710
711
  .trek-detail-container .downloads-container .links-container a:nth-child(2) {
711
- margin: 0px 12px;
712
+ margin: 8px 12px 0px 12px;
712
713
  }
713
714
  .trek-detail-container .downloads-container .links-container a:hover {
714
715
  box-shadow: var(--elevation-2);