@geotrekce/geotrek-rando-widget 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/geotrek-rando-widget.cjs.js +1 -1
- package/dist/cjs/{grw-app_7.cjs.entry.js → grw-app_10.cjs.entry.js} +275 -47
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/grw-app/grw-app.css +1 -0
- package/dist/collection/components/grw-app/grw-app.js +82 -6
- package/dist/collection/components/grw-information-desk-detail/grw-information-desk-detail.css +30 -0
- package/dist/collection/components/grw-information-desk-detail/grw-information-desk-detail.js +53 -0
- package/dist/collection/components/grw-map/grw-map.css +81 -0
- package/dist/collection/components/grw-map/grw-map.js +255 -31
- package/dist/collection/components/grw-poi-detail/grw-poi-detail.css +30 -0
- package/dist/collection/components/grw-poi-detail/grw-poi-detail.js +41 -0
- package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.css +16 -0
- package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.js +38 -0
- package/dist/collection/components/grw-trek-card/grw-trek-card.css +3 -0
- package/dist/collection/components/grw-trek-card/grw-trek-card.js +4 -4
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.css +35 -0
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +40 -6
- package/dist/collection/components/grw-treks-list/grw-treks-list.css +1 -0
- package/dist/collection/components/grw-treks-list/grw-treks-list.js +2 -2
- package/dist/collection/store/grw-trek-provider.js +11 -5
- package/dist/collection/store/grw-treks-provider.js +3 -3
- package/dist/collection/store/store.js +3 -0
- package/dist/collection/stories/App.js +14 -6
- package/dist/collection/stories/App.stories.js +10 -6
- package/dist/collection/stories/TrekCard.js +2 -1
- package/dist/collection/stories/TrekCard.stories.js +4 -3
- package/dist/collection/stories/TrekDetail.js +3 -1
- package/dist/collection/stories/TrekDetail.stories.js +5 -3
- package/dist/collection/stories/TrekMap.js +6 -4
- package/dist/collection/stories/TrekMap.stories.js +7 -5
- package/dist/collection/stories/TreksList.js +2 -1
- package/dist/collection/stories/TreksList.stories.js +4 -3
- package/dist/collection/stories/TreksMap.stories.js +3 -3
- package/dist/collection/utils/utils.js +2 -2
- package/dist/components/grw-app.js +31 -5
- package/dist/components/grw-information-desk-detail.d.ts +11 -0
- package/dist/components/grw-information-desk-detail.js +6 -0
- package/dist/components/grw-information-desk-detail2.js +34 -0
- package/dist/components/grw-map2.js +203 -28
- package/dist/components/grw-poi-detail.d.ts +11 -0
- package/dist/components/grw-poi-detail.js +6 -0
- package/dist/components/grw-poi-detail2.js +32 -0
- package/dist/components/grw-sensitive-area-detail.d.ts +11 -0
- package/dist/components/grw-sensitive-area-detail.js +6 -0
- package/dist/components/grw-sensitive-area-detail2.js +32 -0
- package/dist/components/grw-trek-card2.js +3 -3
- package/dist/components/grw-trek-detail2.js +25 -5
- package/dist/components/grw-trek-provider2.js +11 -5
- package/dist/components/grw-treks-list2.js +2 -2
- package/dist/components/grw-treks-provider2.js +3 -3
- package/dist/components/length.js +2 -2
- package/dist/components/store.js +3 -0
- package/dist/esm/geotrek-rando-widget.js +1 -1
- package/dist/esm/{grw-app_7.entry.js → grw-app_10.entry.js} +273 -48
- package/dist/esm/loader.js +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.css +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
- package/dist/geotrek-rando-widget/p-73bc92fe.entry.js +1 -0
- package/dist/types/components/grw-app/grw-app.d.ts +4 -0
- package/dist/types/components/grw-information-desk-detail/grw-information-desk-detail.d.ts +5 -0
- package/dist/types/components/grw-map/grw-map.d.ts +13 -4
- package/dist/types/components/grw-poi-detail/grw-poi-detail.d.ts +5 -0
- package/dist/types/components/grw-sensitive-area-detail/grw-sensitive-area-detail.d.ts +5 -0
- package/dist/types/components/grw-trek-detail/grw-trek-detail.d.ts +1 -0
- package/dist/types/components.d.ts +65 -1
- package/dist/types/store/store.d.ts +7 -1
- package/dist/types/types/types.d.ts +46 -3
- package/package.json +5 -7
- package/readme.md +20 -1
- package/dist/geotrek-rando-widget/p-b7c66d2d.entry.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { s as state, o as onChange } from './store.js';
|
|
3
3
|
|
|
4
4
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -14142,26 +14142,30 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
|
|
|
14142
14142
|
|
|
14143
14143
|
const departureArrivalImage = `<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><path d="M80,464V68.14a8,8,0,0,1,4-6.9C91.81,56.66,112.92,48,160,48c64,0,145,48,192,48a199.53,199.53,0,0,0,77.23-15.77A2,2,0,0,1,432,82.08V301.44a4,4,0,0,1-2.39,3.65C421.37,308.7,392.33,320,352,320c-48,0-128-32-192-32s-80,16-80,16" style=";fill:#ffffff;stroke:currentColor;stroke-linecap:round;stroke-miterlimit:10;stroke-width:32px"/></svg>`;
|
|
14144
14144
|
|
|
14145
|
-
const grwMapCss = ".leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none !important;max-height:none !important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none !important;max-height:none !important;width:auto;padding:0}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51, 181, 229, 0.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity 0.2s linear;-moz-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform 0.25s cubic-bezier(0,0,0.25,1);-moz-transition:-moz-transform 0.25s cubic-bezier(0,0,0.25,1);transition:transform 0.25s cubic-bezier(0,0,0.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078A8}.leaflet-zoom-box{border:2px dotted #38f;background:rgba(255,255,255,0.5)}.leaflet-container{font-family:\"Helvetica Neue\", Arial, Helvetica, sans-serif;font-size:12px;font-size:0.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px rgba(0,0,0,0.65);border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:black}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:bold 18px 'Lucida Console', Monaco, monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px rgba(0,0,0,0.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(images/layers.png);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(images/layers-2x.png);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(images/marker-icon.png)}.leaflet-container .leaflet-control-attribution{background:#fff;background:rgba(255, 255, 255, 0.8);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-control-attribution svg{display:inline !important}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;overflow:hidden;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;background:rgba(255, 255, 255, 0.5)}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,0.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:17px 0;margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:white;color:#333;box-shadow:0 3px 14px rgba(0,0,0,0.4)}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma, Verdana, sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto;border-bottom:1px solid #ddd;border-top:1px solid #ddd}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px rgba(0,0,0,0.4)}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:\"\"}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;color-adjust:exact}}grw-map{display:block;height:100%;max-height:100vh}.departure-icon svg,.arrival-icon svg{width:48px;height:48px}.departure-icon svg path,.arrival-icon svg path{fill:currentColor;stroke:currentColor}.departure-icon{color:var(--color-departure-icon)}.arrival-icon{color:var(--color-arrival-icon)}.trek-marker{background-color:var(--color-primary);border-radius:50%;display:flex;justify-content:center;align-items:center}.trek-marker img{width:36px !important}.map-loader-container{position:absolute;z-index:500;width:100%;height:100%;background:rgba(255, 255, 255, 0.5);display:flex;justify-content:center;align-items:center}.map-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-tint);border-bottom-color:var(--color-primary);border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
|
|
14145
|
+
const grwMapCss = ".leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none !important;max-height:none !important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none !important;max-height:none !important;width:auto;padding:0}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51, 181, 229, 0.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity 0.2s linear;-moz-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform 0.25s cubic-bezier(0,0,0.25,1);-moz-transition:-moz-transform 0.25s cubic-bezier(0,0,0.25,1);transition:transform 0.25s cubic-bezier(0,0,0.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078A8}.leaflet-zoom-box{border:2px dotted #38f;background:rgba(255,255,255,0.5)}.leaflet-container{font-family:\"Helvetica Neue\", Arial, Helvetica, sans-serif;font-size:12px;font-size:0.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px rgba(0,0,0,0.65);border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:black}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:bold 18px 'Lucida Console', Monaco, monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px rgba(0,0,0,0.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(images/layers.png);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(images/layers-2x.png);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(images/marker-icon.png)}.leaflet-container .leaflet-control-attribution{background:#fff;background:rgba(255, 255, 255, 0.8);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-control-attribution svg{display:inline !important}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;overflow:hidden;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;background:rgba(255, 255, 255, 0.5)}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,0.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:17px 0;margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:white;color:#333;box-shadow:0 3px 14px rgba(0,0,0,0.4)}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma, Verdana, sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto;border-bottom:1px solid #ddd;border-top:1px solid #ddd}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px rgba(0,0,0,0.4)}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:\"\"}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;color-adjust:exact}}grw-map{font-family:\"Roboto\";display:block;height:100%;max-height:100vh}.departure-icon svg,.arrival-icon svg{width:48px;height:48px}.departure-icon svg path,.arrival-icon svg path{fill:currentColor;stroke:currentColor}.departure-icon{color:var(--color-departure-icon)}.arrival-icon{color:var(--color-arrival-icon)}.trek-marker{background-color:var(--color-primary);border-radius:50%;display:flex;justify-content:center;align-items:center}.trek-marker img{width:36px !important}.map-loader-container{position:absolute;z-index:500;width:100%;height:100%;background:rgba(255, 255, 255, 0.5);display:flex;justify-content:center;align-items:center}.map-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-tint);border-bottom-color:var(--color-primary);border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.leaflet-popup-content{width:144px;margin:0}.trek-departure-popup{position:relative;display:flex;flex-direction:column;width:100px;height:auto;padding:24px}.trek-departure-popup img{border-radius:8px;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25)}.trek-departure-popup .trek-name{color:var(--color-primary);font-weight:bold;font-size:12px}.trek-departure-popup .trek-name-margin-top{margin-top:12px}.poi-tooltip .poi-name,.poi-tooltip .information-desks-name,.information-desks-tooltip .poi-name,.information-desks-tooltip .information-desks-name{color:var(--color-primary);font-weight:bold;font-size:12px}.sensitiveAreasCheckboxContainer{display:flex;justify-content:center;align-items:center;background-color:#ffffff;padding:8px;border-radius:8px;user-select:none}.sensitiveAreasCheckboxContainer input,.sensitiveAreasCheckboxContainer label{cursor:pointer}.sensitiveAreasCheckboxContainer input{margin:0}.sensitiveAreasCheckboxContainer label{padding-left:8px}.poi-icon,.information-desks-icon{background-color:var(--color-poi-icon);border-radius:50%;display:flex;justify-content:center;align-items:center}.poi-icon img,.information-desks-icon img{width:36px !important}.parking-icon{background-color:#0000ff;border-radius:50%;display:flex;justify-content:center;align-items:center;width:48px;height:48px;font-size:24px;color:#ffffff}";
|
|
14146
14146
|
|
|
14147
14147
|
const GrwMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
14148
14148
|
constructor() {
|
|
14149
14149
|
super();
|
|
14150
14150
|
this.__registerHost();
|
|
14151
|
+
this.trekCardPress = createEvent(this, "trekCardPress", 7);
|
|
14151
14152
|
this.mapIsReady = false;
|
|
14152
14153
|
this.center = '1, 1';
|
|
14153
14154
|
this.zoom = 10;
|
|
14155
|
+
this.colorPrimary = '#6b0030';
|
|
14156
|
+
this.colorPrimaryTint = '#974c6e';
|
|
14154
14157
|
this.colorTrekLine = '#6b0030';
|
|
14155
14158
|
this.colorDepartureIcon = '#006b3b';
|
|
14156
14159
|
this.colorArrivalIcon = '#85003b';
|
|
14157
|
-
this.
|
|
14158
|
-
this.
|
|
14160
|
+
this.colorSensitiveArea = ' #4974a5';
|
|
14161
|
+
this.colorPoiIcon = '#974c6e';
|
|
14159
14162
|
}
|
|
14160
14163
|
componentDidLoad() {
|
|
14161
14164
|
this.map = leafletSrc.map(this.element, {
|
|
14162
14165
|
center: this.center.split(',').map(Number),
|
|
14163
14166
|
zoom: this.zoom,
|
|
14164
14167
|
});
|
|
14168
|
+
leafletSrc.control.scale().addTo(this.map);
|
|
14165
14169
|
leafletSrc.tileLayer(this.urlLayer, {
|
|
14166
14170
|
maxZoom: 19,
|
|
14167
14171
|
attribution: this.attribution,
|
|
@@ -14193,33 +14197,56 @@ const GrwMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
14193
14197
|
}
|
|
14194
14198
|
addTreks() {
|
|
14195
14199
|
var _a;
|
|
14196
|
-
const
|
|
14200
|
+
const trekscurrentDepartureCoordinates = [];
|
|
14197
14201
|
const treksFeatureCollection = {
|
|
14198
14202
|
type: 'FeatureCollection',
|
|
14199
14203
|
features: [],
|
|
14200
14204
|
};
|
|
14201
14205
|
for (const trek of state.treks) {
|
|
14202
|
-
|
|
14206
|
+
trekscurrentDepartureCoordinates.push(trek.departure_geom);
|
|
14203
14207
|
treksFeatureCollection.features.push({
|
|
14204
14208
|
type: 'Feature',
|
|
14205
|
-
properties: { practice: (_a = state.practices.find(practice => practice.id === trek.practice)) === null || _a === void 0 ? void 0 : _a.pictogram },
|
|
14206
14209
|
geometry: { type: 'Point', coordinates: trek.departure_geom },
|
|
14210
|
+
properties: {
|
|
14211
|
+
id: trek.id,
|
|
14212
|
+
name: trek.name,
|
|
14213
|
+
practice: (_a = state.practices.find(practice => practice.id === trek.practice)) === null || _a === void 0 ? void 0 : _a.pictogram,
|
|
14214
|
+
imgSrc: trek.attachments && trek.attachments.length > 0 && trek.attachments[0].url,
|
|
14215
|
+
},
|
|
14207
14216
|
});
|
|
14208
14217
|
}
|
|
14209
|
-
if (
|
|
14210
|
-
const bounds = leafletSrc.latLngBounds(
|
|
14218
|
+
if (trekscurrentDepartureCoordinates.length > 0) {
|
|
14219
|
+
const bounds = leafletSrc.latLngBounds(trekscurrentDepartureCoordinates.map(coordinate => [coordinate[1], coordinate[0]]));
|
|
14211
14220
|
this.currentBounds = bounds;
|
|
14212
14221
|
this.map.fitBounds(this.currentBounds);
|
|
14213
14222
|
}
|
|
14214
14223
|
this.treksLayer = leafletSrc.geoJSON(treksFeatureCollection, {
|
|
14215
14224
|
pointToLayer: (geoJsonPoint, latlng) => leafletSrc.marker(latlng, {
|
|
14216
14225
|
icon: leafletSrc.divIcon({
|
|
14226
|
+
html: geoJsonPoint.properties.practice && `<img src=${geoJsonPoint.properties.practice} />`,
|
|
14217
14227
|
className: 'trek-marker',
|
|
14218
14228
|
iconSize: 48,
|
|
14219
|
-
html: geoJsonPoint.properties.practice ? `<img src=${geoJsonPoint.properties.practice} />` : '',
|
|
14220
14229
|
}),
|
|
14221
14230
|
autoPanOnFocus: false,
|
|
14222
14231
|
}),
|
|
14232
|
+
onEachFeature: (geoJsonPoint, layer) => {
|
|
14233
|
+
layer.once('click', () => {
|
|
14234
|
+
const trekDeparturePopup = leafletSrc.DomUtil.create('div');
|
|
14235
|
+
trekDeparturePopup.className = 'trek-departure-popup';
|
|
14236
|
+
trekDeparturePopup.onclick = () => this.trekCardPress.emit(geoJsonPoint.properties.id);
|
|
14237
|
+
const trekName = leafletSrc.DomUtil.create('div');
|
|
14238
|
+
trekName.innerHTML = geoJsonPoint.properties.name;
|
|
14239
|
+
trekName.className = 'trek-name';
|
|
14240
|
+
if (geoJsonPoint.properties.imgSrc) {
|
|
14241
|
+
trekName.className += ' trek-name-margin-top';
|
|
14242
|
+
const trekImg = leafletSrc.DomUtil.create('img');
|
|
14243
|
+
trekImg.src = geoJsonPoint.properties.imgSrc;
|
|
14244
|
+
trekDeparturePopup.appendChild(trekImg);
|
|
14245
|
+
}
|
|
14246
|
+
trekDeparturePopup.appendChild(trekName);
|
|
14247
|
+
layer.bindPopup(trekDeparturePopup, { interactive: true, autoPan: false, closeButton: false }).openPopup();
|
|
14248
|
+
});
|
|
14249
|
+
},
|
|
14223
14250
|
}).addTo(this.map);
|
|
14224
14251
|
!this.mapIsReady && (this.mapIsReady = !this.mapIsReady);
|
|
14225
14252
|
}
|
|
@@ -14230,39 +14257,40 @@ const GrwMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
14230
14257
|
}
|
|
14231
14258
|
}
|
|
14232
14259
|
addTrek() {
|
|
14233
|
-
const
|
|
14260
|
+
const currentTrekFeature = {
|
|
14234
14261
|
type: 'Feature',
|
|
14235
14262
|
geometry: state.currentTrek.geometry,
|
|
14236
14263
|
properties: {},
|
|
14237
14264
|
};
|
|
14238
|
-
this.
|
|
14265
|
+
this.currentTrekLayer = leafletSrc.geoJSON(currentTrekFeature, {
|
|
14239
14266
|
style: () => ({
|
|
14240
14267
|
color: this.colorTrekLine,
|
|
14241
14268
|
}),
|
|
14269
|
+
interactive: false,
|
|
14242
14270
|
}).addTo(this.map);
|
|
14243
14271
|
const bounds = leafletSrc.latLngBounds(state.currentTrek.geometry.coordinates.map(coordinate => [coordinate[1], coordinate[0]]));
|
|
14244
14272
|
this.currentBounds = bounds;
|
|
14245
14273
|
this.map.fitBounds(this.currentBounds);
|
|
14246
|
-
const
|
|
14247
|
-
const
|
|
14248
|
-
const
|
|
14274
|
+
const currentDepartureCoordinates = [state.currentTrek.geometry.coordinates.at(0)[0], state.currentTrek.geometry.coordinates.at(0)[1]];
|
|
14275
|
+
const currentArrivalCoordinates = [state.currentTrek.geometry.coordinates.at(-1)[0], state.currentTrek.geometry.coordinates.at(-1)[1]];
|
|
14276
|
+
const currentDepartureArrivalFeatureCollection = {
|
|
14249
14277
|
type: 'FeatureCollection',
|
|
14250
14278
|
features: [
|
|
14251
14279
|
{
|
|
14252
14280
|
type: 'Feature',
|
|
14253
14281
|
properties: { type: 'departure' },
|
|
14254
|
-
geometry: { type: 'Point', coordinates:
|
|
14282
|
+
geometry: { type: 'Point', coordinates: currentDepartureCoordinates },
|
|
14255
14283
|
},
|
|
14256
14284
|
],
|
|
14257
14285
|
};
|
|
14258
|
-
if (
|
|
14259
|
-
|
|
14286
|
+
if (currentDepartureCoordinates[0] !== currentArrivalCoordinates[0] || currentDepartureCoordinates[1] !== currentArrivalCoordinates[1]) {
|
|
14287
|
+
currentDepartureArrivalFeatureCollection.features.push({
|
|
14260
14288
|
type: 'Feature',
|
|
14261
14289
|
properties: { type: 'arrival' },
|
|
14262
|
-
geometry: { type: 'Point', coordinates:
|
|
14290
|
+
geometry: { type: 'Point', coordinates: currentArrivalCoordinates },
|
|
14263
14291
|
});
|
|
14264
14292
|
}
|
|
14265
|
-
this.
|
|
14293
|
+
this.currentDepartureArrivalLayer = leafletSrc.geoJSON(currentDepartureArrivalFeatureCollection, {
|
|
14266
14294
|
pointToLayer: (geoJsonPoint, latlng) => leafletSrc.marker(latlng, {
|
|
14267
14295
|
icon: leafletSrc.divIcon({
|
|
14268
14296
|
html: departureArrivalImage,
|
|
@@ -14271,18 +14299,162 @@ const GrwMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
14271
14299
|
iconAnchor: [0, 48],
|
|
14272
14300
|
}),
|
|
14273
14301
|
autoPanOnFocus: false,
|
|
14302
|
+
interactive: false,
|
|
14274
14303
|
}),
|
|
14275
14304
|
}).addTo(this.map);
|
|
14305
|
+
if (state.currentTrek.parking_location) {
|
|
14306
|
+
const currentParking = {
|
|
14307
|
+
type: 'Feature',
|
|
14308
|
+
properties: {},
|
|
14309
|
+
geometry: { type: 'Point', coordinates: state.currentTrek.parking_location },
|
|
14310
|
+
};
|
|
14311
|
+
this.currentParkingLayer = leafletSrc.geoJSON(currentParking, {
|
|
14312
|
+
pointToLayer: (_geoJsonPoint, latlng) => leafletSrc.marker(latlng, {
|
|
14313
|
+
icon: leafletSrc.divIcon({
|
|
14314
|
+
html: '<div>P</div>',
|
|
14315
|
+
className: 'parking-icon',
|
|
14316
|
+
iconSize: 48,
|
|
14317
|
+
iconAnchor: [0, 48],
|
|
14318
|
+
}),
|
|
14319
|
+
autoPanOnFocus: false,
|
|
14320
|
+
interactive: false,
|
|
14321
|
+
}),
|
|
14322
|
+
}).addTo(this.map);
|
|
14323
|
+
}
|
|
14324
|
+
if (state.currentSensitiveAreas && state.currentSensitiveAreas.length > 0) {
|
|
14325
|
+
const currentSensitiveAreasFeatureCollection = {
|
|
14326
|
+
type: 'FeatureCollection',
|
|
14327
|
+
features: [],
|
|
14328
|
+
};
|
|
14329
|
+
for (const sensitiveArea of state.currentSensitiveAreas) {
|
|
14330
|
+
currentSensitiveAreasFeatureCollection.features.push({
|
|
14331
|
+
type: 'Feature',
|
|
14332
|
+
properties: {},
|
|
14333
|
+
geometry: sensitiveArea.geometry,
|
|
14334
|
+
});
|
|
14335
|
+
}
|
|
14336
|
+
this.currentSensitiveAreasLayer = leafletSrc.geoJSON(currentSensitiveAreasFeatureCollection, { style: () => ({ color: this.colorSensitiveArea }) }).addTo(this.map);
|
|
14337
|
+
leafletSrc.Control.SensitiveAreasCheckboxContainer = leafletSrc.Control.extend({
|
|
14338
|
+
onAdd: () => {
|
|
14339
|
+
const sensitiveAreasCheckboxContainer = leafletSrc.DomUtil.create('div');
|
|
14340
|
+
sensitiveAreasCheckboxContainer.className = 'sensitiveAreasCheckboxContainer';
|
|
14341
|
+
const sensitiveAreasCheckbox = leafletSrc.DomUtil.create('input');
|
|
14342
|
+
sensitiveAreasCheckbox.setAttribute('id', 'sensitiveAreasCheckbox');
|
|
14343
|
+
sensitiveAreasCheckbox.setAttribute('type', 'checkbox');
|
|
14344
|
+
sensitiveAreasCheckbox.setAttribute('checked', 'true');
|
|
14345
|
+
sensitiveAreasCheckbox.onclick = value => value.composedPath()[0].checked ? this.map.addLayer(this.currentSensitiveAreasLayer) : this.map.removeLayer(this.currentSensitiveAreasLayer);
|
|
14346
|
+
const sensitiveAreasLabel = leafletSrc.DomUtil.create('label');
|
|
14347
|
+
sensitiveAreasLabel.setAttribute('for', 'sensitiveAreasCheckbox');
|
|
14348
|
+
sensitiveAreasLabel.innerHTML =
|
|
14349
|
+
currentSensitiveAreasFeatureCollection.features.length > 1 || currentSensitiveAreasFeatureCollection.features[0].geometry.type === 'MultiPolygon'
|
|
14350
|
+
? 'Afficher les zones sensibles'
|
|
14351
|
+
: 'Afficher la zone sensible';
|
|
14352
|
+
sensitiveAreasCheckboxContainer.appendChild(sensitiveAreasCheckbox);
|
|
14353
|
+
sensitiveAreasCheckboxContainer.appendChild(sensitiveAreasLabel);
|
|
14354
|
+
return sensitiveAreasCheckboxContainer;
|
|
14355
|
+
},
|
|
14356
|
+
});
|
|
14357
|
+
leafletSrc.control.sensitiveAreasCheckboxContainer = () => {
|
|
14358
|
+
return new leafletSrc.Control.SensitiveAreasCheckboxContainer();
|
|
14359
|
+
};
|
|
14360
|
+
this.sensitiveAreasControl = leafletSrc.control.sensitiveAreasCheckboxContainer({ position: 'topright' }).addTo(this.map);
|
|
14361
|
+
}
|
|
14362
|
+
if (state.currentPois && state.currentPois.length > 0) {
|
|
14363
|
+
const currentPoisFeatureCollection = {
|
|
14364
|
+
type: 'FeatureCollection',
|
|
14365
|
+
features: [],
|
|
14366
|
+
};
|
|
14367
|
+
for (const currentPoi of state.currentPois) {
|
|
14368
|
+
currentPoisFeatureCollection.features.push({
|
|
14369
|
+
type: 'Feature',
|
|
14370
|
+
properties: { name: currentPoi.name, type_pictogram: currentPoi.type_pictogram },
|
|
14371
|
+
geometry: currentPoi.geometry,
|
|
14372
|
+
});
|
|
14373
|
+
}
|
|
14374
|
+
this.currentPoisLayer = leafletSrc.geoJSON(currentPoisFeatureCollection, {
|
|
14375
|
+
pointToLayer: (geoJsonPoint, latlng) => leafletSrc.marker(latlng, {
|
|
14376
|
+
icon: leafletSrc.divIcon({
|
|
14377
|
+
html: geoJsonPoint.properties.type_pictogram && `<img src=${geoJsonPoint.properties.type_pictogram} />`,
|
|
14378
|
+
className: 'poi-icon',
|
|
14379
|
+
iconSize: 48,
|
|
14380
|
+
}),
|
|
14381
|
+
autoPanOnFocus: false,
|
|
14382
|
+
}),
|
|
14383
|
+
onEachFeature: (geoJsonPoint, layer) => {
|
|
14384
|
+
layer.once('mouseover', () => {
|
|
14385
|
+
const poiTooltip = leafletSrc.DomUtil.create('div');
|
|
14386
|
+
poiTooltip.className = 'poi-tooltip';
|
|
14387
|
+
const poiName = leafletSrc.DomUtil.create('div');
|
|
14388
|
+
poiName.innerHTML = geoJsonPoint.properties.name;
|
|
14389
|
+
poiName.className = 'poi-name';
|
|
14390
|
+
poiTooltip.appendChild(poiName);
|
|
14391
|
+
layer.bindTooltip(poiTooltip).openTooltip();
|
|
14392
|
+
});
|
|
14393
|
+
},
|
|
14394
|
+
}).addTo(this.map);
|
|
14395
|
+
}
|
|
14396
|
+
if (state.currentInformationDesks && state.currentInformationDesks.length > 0) {
|
|
14397
|
+
const currentInformationDesksFeatureCollection = {
|
|
14398
|
+
type: 'FeatureCollection',
|
|
14399
|
+
features: [],
|
|
14400
|
+
};
|
|
14401
|
+
for (const currentInformationDesk of state.currentInformationDesks) {
|
|
14402
|
+
currentInformationDesksFeatureCollection.features.push({
|
|
14403
|
+
type: 'Feature',
|
|
14404
|
+
properties: { name: currentInformationDesk.name, type_pictogram: currentInformationDesk.type.pictogram },
|
|
14405
|
+
geometry: { type: 'Point', coordinates: [Number(currentInformationDesk.longitude), Number(currentInformationDesk.latitude)] },
|
|
14406
|
+
});
|
|
14407
|
+
}
|
|
14408
|
+
this.currentInformationDesksLayer = leafletSrc.geoJSON(currentInformationDesksFeatureCollection, {
|
|
14409
|
+
pointToLayer: (geoJsonPoint, latlng) => leafletSrc.marker(latlng, {
|
|
14410
|
+
icon: leafletSrc.divIcon({
|
|
14411
|
+
html: geoJsonPoint.properties.type_pictogram && `<img src=${geoJsonPoint.properties.type_pictogram} />`,
|
|
14412
|
+
className: 'information-desks-icon',
|
|
14413
|
+
iconSize: 48,
|
|
14414
|
+
}),
|
|
14415
|
+
autoPanOnFocus: false,
|
|
14416
|
+
}),
|
|
14417
|
+
onEachFeature: (geoJsonPoint, layer) => {
|
|
14418
|
+
layer.once('mouseover', () => {
|
|
14419
|
+
const informationDesksTooltip = leafletSrc.DomUtil.create('div');
|
|
14420
|
+
informationDesksTooltip.className = 'information-desks-tooltip';
|
|
14421
|
+
const informationDesksName = leafletSrc.DomUtil.create('div');
|
|
14422
|
+
informationDesksName.innerHTML = geoJsonPoint.properties.name;
|
|
14423
|
+
informationDesksName.className = 'information-desks-name';
|
|
14424
|
+
informationDesksTooltip.appendChild(informationDesksName);
|
|
14425
|
+
layer.bindTooltip(informationDesksTooltip).openTooltip();
|
|
14426
|
+
});
|
|
14427
|
+
},
|
|
14428
|
+
}).addTo(this.map);
|
|
14429
|
+
}
|
|
14276
14430
|
!this.mapIsReady && (this.mapIsReady = !this.mapIsReady);
|
|
14277
14431
|
}
|
|
14278
14432
|
removeTrek() {
|
|
14279
|
-
if (this.
|
|
14280
|
-
this.map.removeLayer(this.
|
|
14281
|
-
this.
|
|
14433
|
+
if (this.currentTrekLayer) {
|
|
14434
|
+
this.map.removeLayer(this.currentTrekLayer);
|
|
14435
|
+
this.currentTrekLayer = null;
|
|
14436
|
+
}
|
|
14437
|
+
if (this.currentDepartureArrivalLayer) {
|
|
14438
|
+
this.map.removeLayer(this.currentDepartureArrivalLayer);
|
|
14439
|
+
this.currentDepartureArrivalLayer = null;
|
|
14282
14440
|
}
|
|
14283
|
-
if (this.
|
|
14284
|
-
this.map.removeLayer(this.
|
|
14285
|
-
this.
|
|
14441
|
+
if (this.currentParkingLayer) {
|
|
14442
|
+
this.map.removeLayer(this.currentParkingLayer);
|
|
14443
|
+
this.currentParkingLayer = null;
|
|
14444
|
+
}
|
|
14445
|
+
if (this.currentSensitiveAreasLayer) {
|
|
14446
|
+
this.map.removeLayer(this.currentSensitiveAreasLayer);
|
|
14447
|
+
this.currentSensitiveAreasLayer = null;
|
|
14448
|
+
this.map.removeControl(this.sensitiveAreasControl);
|
|
14449
|
+
this.sensitiveAreasControl = null;
|
|
14450
|
+
}
|
|
14451
|
+
if (this.currentPoisLayer) {
|
|
14452
|
+
this.map.removeLayer(this.currentPoisLayer);
|
|
14453
|
+
this.currentPoisLayer = null;
|
|
14454
|
+
}
|
|
14455
|
+
if (this.currentInformationDesksLayer) {
|
|
14456
|
+
this.map.removeLayer(this.currentInformationDesksLayer);
|
|
14457
|
+
this.currentInformationDesksLayer = null;
|
|
14286
14458
|
}
|
|
14287
14459
|
}
|
|
14288
14460
|
render() {
|
|
@@ -14291,6 +14463,7 @@ const GrwMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
14291
14463
|
'--color-primary-tint': this.colorPrimaryTint,
|
|
14292
14464
|
'--color-departure-icon': this.colorDepartureIcon,
|
|
14293
14465
|
'--color-arrival-icon': this.colorArrivalIcon,
|
|
14466
|
+
'--color-poi-icon': this.colorPoiIcon,
|
|
14294
14467
|
} }, !this.mapIsReady && (h("div", { class: "map-loader-container" }, h("span", { class: "loader" })))));
|
|
14295
14468
|
}
|
|
14296
14469
|
get element() { return this; }
|
|
@@ -14300,11 +14473,13 @@ const GrwMap = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
14300
14473
|
"attribution": [1],
|
|
14301
14474
|
"center": [1],
|
|
14302
14475
|
"zoom": [2],
|
|
14476
|
+
"colorPrimary": [1, "color-primary"],
|
|
14477
|
+
"colorPrimaryTint": [1, "color-primary-tint"],
|
|
14303
14478
|
"colorTrekLine": [1, "color-trek-line"],
|
|
14304
14479
|
"colorDepartureIcon": [1, "color-departure-icon"],
|
|
14305
14480
|
"colorArrivalIcon": [1, "color-arrival-icon"],
|
|
14306
|
-
"
|
|
14307
|
-
"
|
|
14481
|
+
"colorSensitiveArea": [1, "color-sensitive-area"],
|
|
14482
|
+
"colorPoiIcon": [1, "color-poi-icon"],
|
|
14308
14483
|
"mapIsReady": [32]
|
|
14309
14484
|
}]);
|
|
14310
14485
|
function defineCustomElement() {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface GrwPoiDetail extends Components.GrwPoiDetail, HTMLElement {}
|
|
4
|
+
export const GrwPoiDetail: {
|
|
5
|
+
prototype: GrwPoiDetail;
|
|
6
|
+
new (): GrwPoiDetail;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const grwPoiDetailCss = ":host{display:flex;flex-direction:column;padding:0px 8px 8px 8px}.poi-img{width:180px}.poi-img img{width:180px;border-radius:8px}.poi-right-container{display:flex;flex-direction:column;padding:8px}.poi-name{color:var(--color-primary);font-size:24px;font-weight:bold;padding:0px 0px 8px 0px}.poi-description{font-size:16px}";
|
|
4
|
+
|
|
5
|
+
const GrwPoiDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return (h(Host, null, this.poi.attachments && this.poi.attachments[0] && this.poi.attachments[0].thumbnail && (h("div", { class: "poi-img" }, h("img", { src: this.poi.attachments[0].thumbnail, loading: "lazy" }))), h("div", { class: "poi-right-container" }, h("div", { class: "poi-name" }, this.poi.name), h("div", { class: "poi-description", innerHTML: this.poi.description }))));
|
|
13
|
+
}
|
|
14
|
+
static get style() { return grwPoiDetailCss; }
|
|
15
|
+
}, [1, "grw-poi-detail", {
|
|
16
|
+
"poi": [16]
|
|
17
|
+
}]);
|
|
18
|
+
function defineCustomElement() {
|
|
19
|
+
if (typeof customElements === "undefined") {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const components = ["grw-poi-detail"];
|
|
23
|
+
components.forEach(tagName => { switch (tagName) {
|
|
24
|
+
case "grw-poi-detail":
|
|
25
|
+
if (!customElements.get(tagName)) {
|
|
26
|
+
customElements.define(tagName, GrwPoiDetail);
|
|
27
|
+
}
|
|
28
|
+
break;
|
|
29
|
+
} });
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { GrwPoiDetail as G, defineCustomElement as d };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface GrwSensitiveAreaDetail extends Components.GrwSensitiveAreaDetail, HTMLElement {}
|
|
4
|
+
export const GrwSensitiveAreaDetail: {
|
|
5
|
+
prototype: GrwSensitiveAreaDetail;
|
|
6
|
+
new (): GrwSensitiveAreaDetail;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { G as GrwSensitiveAreaDetail$1, d as defineCustomElement$1 } from './grw-sensitive-area-detail2.js';
|
|
2
|
+
|
|
3
|
+
const GrwSensitiveAreaDetail = GrwSensitiveAreaDetail$1;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { GrwSensitiveAreaDetail, defineCustomElement };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const grwSensitiveAreaDetailCss = ":host{display:flex;flex-direction:column;padding:0px 8px 8px 8px}.sensitive-area-name{color:var(--color-primary);font-size:24px;font-weight:bold;padding:0px 0px 8px 0px}.sensitive-area-description{font-size:16px}";
|
|
4
|
+
|
|
5
|
+
const GrwSensitiveAreaDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return (h(Host, null, h("div", { class: "sensitive-area-name" }, this.sensitiveArea.name), h("div", { class: "sensitive-area-description", innerHTML: this.sensitiveArea.description })));
|
|
13
|
+
}
|
|
14
|
+
static get style() { return grwSensitiveAreaDetailCss; }
|
|
15
|
+
}, [1, "grw-sensitive-area-detail", {
|
|
16
|
+
"sensitiveArea": [16]
|
|
17
|
+
}]);
|
|
18
|
+
function defineCustomElement() {
|
|
19
|
+
if (typeof customElements === "undefined") {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const components = ["grw-sensitive-area-detail"];
|
|
23
|
+
components.forEach(tagName => { switch (tagName) {
|
|
24
|
+
case "grw-sensitive-area-detail":
|
|
25
|
+
if (!customElements.get(tagName)) {
|
|
26
|
+
customElements.define(tagName, GrwSensitiveAreaDetail);
|
|
27
|
+
}
|
|
28
|
+
break;
|
|
29
|
+
} });
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { GrwSensitiveAreaDetail as G, defineCustomElement as d };
|
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
|
|
|
2
2
|
import { s as state, o as onChange } from './store.js';
|
|
3
3
|
import { d as durationImage, f as formatDuration, l as lengthImage, a as formatLength, b as ascentImage, c as formatAscent } from './length.js';
|
|
4
4
|
|
|
5
|
-
const grwTrekCardCss = ".trek-card-container{width:350px;height:auto;border-radius:8px;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25);cursor:pointer}.trek-card-container .image{width:100%;height:auto}.trek-card-container .sub-container{padding:12px}.trek-card-container .sub-container .name{color:var(--color-primary);font-size:24px;font-weight:bold;margin-bottom:12px}.trek-card-container .sub-container .description{max-height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:12px}.trek-card-container .sub-container .description p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.trek-card-container .sub-container .icons-labels-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.trek-card-container .sub-container .icons-labels-container .row{display:flex;justify-content:space-between;align-items:center;width:100%}.trek-card-container .sub-container .icons-labels-container .row:not(:last-child){margin-bottom:12px}.trek-card-container .sub-container .icons-labels-container .row .icon-label{display:flex;justify-content:center;align-items:center;width:33.3333333333%}.trek-card-container .sub-container .icons-labels-container .row .icon-label:nth-child(2){margin:0px 4px}.trek-card-container .sub-container .icons-labels-container .row .icon-label img,.trek-card-container .sub-container .icons-labels-container .row .icon-label .svg-icon svg{width:24px;height:auto;margin-right:24px}.trek-card-container .sub-container .icons-labels-container .row .practice img{background-color:var(--color-primary)}";
|
|
5
|
+
const grwTrekCardCss = ".trek-card-container{font-family:\"Roboto\";width:350px;height:auto;border-radius:8px;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25);cursor:pointer}.trek-card-container .image{border-radius:8px 8px 0px 0px;width:100%;height:auto;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25)}.trek-card-container .sub-container{padding:12px}.trek-card-container .sub-container .name{color:var(--color-primary);font-size:24px;font-weight:bold;margin-bottom:12px}.trek-card-container .sub-container .description{max-height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:12px}.trek-card-container .sub-container .description p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.trek-card-container .sub-container .icons-labels-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.trek-card-container .sub-container .icons-labels-container .row{display:flex;justify-content:space-between;align-items:center;width:100%}.trek-card-container .sub-container .icons-labels-container .row:not(:last-child){margin-bottom:12px}.trek-card-container .sub-container .icons-labels-container .row .icon-label{display:flex;justify-content:center;align-items:center;width:33.3333333333%}.trek-card-container .sub-container .icons-labels-container .row .icon-label:nth-child(2){margin:0px 4px}.trek-card-container .sub-container .icons-labels-container .row .icon-label img,.trek-card-container .sub-container .icons-labels-container .row .icon-label .svg-icon svg{width:24px;height:auto;margin-right:24px}.trek-card-container .sub-container .icons-labels-container .row .practice img{background-color:var(--color-primary)}";
|
|
6
6
|
|
|
7
7
|
const GrwTrekCard = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
8
8
|
constructor() {
|
|
@@ -11,7 +11,7 @@ const GrwTrekCard = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
11
11
|
this.__attachShadow();
|
|
12
12
|
this.trekCardPress = createEvent(this, "trekCardPress", 7);
|
|
13
13
|
this.colorPrimary = '#6b0030';
|
|
14
|
-
this.colorPrimaryTint = '#
|
|
14
|
+
this.colorPrimaryTint = '#974c6e';
|
|
15
15
|
}
|
|
16
16
|
componentWillLoad() {
|
|
17
17
|
this.currentTrek = this.trek ? this.trek : state.currentTrek;
|
|
@@ -31,7 +31,7 @@ const GrwTrekCard = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
33
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
34
|
-
return (h(Host, { onClick: () => this.trekCardPress.emit(this.currentTrek.id), style: { '--color-primary': this.colorPrimary, '--color-primary-tint': this.colorPrimaryTint } }, this.currentTrek && (h("div", { class: "trek-card-container" }, this.currentTrek.attachments && this.currentTrek.attachments[0] && this.currentTrek.attachments[0].
|
|
34
|
+
return (h(Host, { onClick: () => this.trekCardPress.emit(this.currentTrek.id), style: { '--color-primary': this.colorPrimary, '--color-primary-tint': this.colorPrimaryTint } }, this.currentTrek && (h("div", { class: "trek-card-container" }, this.currentTrek.attachments && this.currentTrek.attachments[0] && this.currentTrek.attachments[0].thumbnail && (h("img", { class: "image", src: `${this.currentTrek.attachments[0].thumbnail}`, loading: "lazy" })), h("div", { class: "sub-container" }, h("div", { class: "name" }, (_a = this.currentTrek) === null || _a === void 0 ? void 0 : _a.name), h("div", { class: "description", innerHTML: (_b = this.currentTrek) === null || _b === void 0 ? void 0 : _b.description_teaser }), h("div", { class: "icons-labels-container" }, h("div", { class: "row" }, h("div", { class: "icon-label difficulty" }, ((_c = this.difficulty) === null || _c === void 0 ? void 0 : _c.pictogram) && h("img", { src: this.difficulty.pictogram }), (_d = this.difficulty) === null || _d === void 0 ? void 0 :
|
|
35
35
|
_d.label), h("div", { class: "icon-label duration" }, h("div", { class: "svg-icon", innerHTML: durationImage }), formatDuration(this.currentTrek.duration)), h("div", { class: "icon-label route" }, ((_e = this.route) === null || _e === void 0 ? void 0 : _e.pictogram) && h("img", { src: this.route.pictogram }), (_f = this.route) === null || _f === void 0 ? void 0 :
|
|
36
36
|
_f.route)), h("div", { class: "row" }, h("div", { class: "icon-label length" }, h("div", { class: "svg-icon", innerHTML: lengthImage }), formatLength(this.currentTrek.length_2d)), h("div", { class: "icon-label ascent" }, h("div", { class: "svg-icon", innerHTML: ascentImage }), formatAscent(this.currentTrek.ascent)), h("div", { class: "icon-label practice" }, ((_g = this.practice) === null || _g === void 0 ? void 0 : _g.pictogram) && h("img", { src: this.practice.pictogram }), (_h = this.practice) === null || _h === void 0 ? void 0 :
|
|
37
37
|
_h.name))))))));
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { s as state, o as onChange } from './store.js';
|
|
3
3
|
import { d as durationImage, f as formatDuration, l as lengthImage, a as formatLength, b as ascentImage, c as formatAscent } from './length.js';
|
|
4
|
+
import { d as defineCustomElement$3 } from './grw-information-desk-detail2.js';
|
|
5
|
+
import { d as defineCustomElement$2 } from './grw-poi-detail2.js';
|
|
6
|
+
import { d as defineCustomElement$1 } from './grw-sensitive-area-detail2.js';
|
|
4
7
|
|
|
5
|
-
const grwTrekDetailCss = ".trek-detail-container{display:flex;flex-direction:column;height:100%;overflow-y:auto}.trek-detail-container .name{color:var(--color-primary);font-size:48px;font-weight:bold;padding:24px}.trek-detail-container .image{align-self:center;width:100%;max-width:700px;height:auto;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25)}.trek-detail-container .sub-container{padding:24px}.trek-detail-container .sub-container .icons-labels-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.trek-detail-container .sub-container .icons-labels-container .row{display:flex;justify-content:space-between;align-items:center;width:100%}.trek-detail-container .sub-container .icons-labels-container .row:not(:last-child){margin-bottom:24px}.trek-detail-container .sub-container .icons-labels-container .row .icon-label{display:flex;justify-content:center;align-items:center;width:33.3333333333%}.trek-detail-container .sub-container .icons-labels-container .row .icon-label:nth-child(2){margin:0px 8px}.trek-detail-container .sub-container .icons-labels-container .row .icon-label img,.trek-detail-container .sub-container .icons-labels-container .row .icon-label .svg-icon svg{width:24px;height:auto;margin-right:24px}.trek-detail-container .sub-container .icons-labels-container .row .practice img{background-color:var(--color-primary)}.trek-detail-container .description{padding:0px 24px 24px 24px}";
|
|
8
|
+
const grwTrekDetailCss = ".trek-detail-container{font-family:\"Roboto\";display:flex;flex-direction:column;height:100%;overflow-y:auto}.trek-detail-container .name{color:var(--color-primary);font-size:48px;font-weight:bold;padding:24px}.trek-detail-container .image{border-radius:8px;align-self:center;width:100%;max-width:700px;height:auto;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25)}.trek-detail-container .sub-container{padding:24px}.trek-detail-container .sub-container .icons-labels-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.trek-detail-container .sub-container .icons-labels-container .row{display:flex;justify-content:space-between;align-items:center;width:100%}.trek-detail-container .sub-container .icons-labels-container .row:not(:last-child){margin-bottom:24px}.trek-detail-container .sub-container .icons-labels-container .row .icon-label{display:flex;justify-content:center;align-items:center;width:33.3333333333%}.trek-detail-container .sub-container .icons-labels-container .row .icon-label:nth-child(2){margin:0px 8px}.trek-detail-container .sub-container .icons-labels-container .row .icon-label img,.trek-detail-container .sub-container .icons-labels-container .row .icon-label .svg-icon svg{width:24px;height:auto;margin-right:24px}.trek-detail-container .sub-container .icons-labels-container .row .practice img{background-color:var(--color-primary)}.trek-detail-container .downloads-container{padding:0px 24px 24px 24px;display:flex;flex-direction:column;justify-content:center;align-items:center}.trek-detail-container .downloads-container .download-title{color:var(--color-primary);font-size:18px;margin-bottom:18px}.trek-detail-container .downloads-container .links-container a{background-color:var(--color-primary);padding:8px;color:#ffffff;text-decoration:none;border-radius:8px}.trek-detail-container .downloads-container .links-container a:nth-child(2){margin:0px 12px}.trek-detail-container .downloads-container .links-container a:hover{background-color:var(--color-primary-shade)}.trek-detail-container .description{padding:0px 24px 24px 24px}.trek-detail-container .pois-title,.trek-detail-container .sensitive-areas-title,.trek-detail-container .information-desks-title{color:var(--color-primary);font-size:36px;font-weight:bold;padding:16px}";
|
|
6
9
|
|
|
7
10
|
const GrwTrekDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
8
11
|
constructor() {
|
|
@@ -10,7 +13,8 @@ const GrwTrekDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
10
13
|
this.__registerHost();
|
|
11
14
|
this.__attachShadow();
|
|
12
15
|
this.colorPrimary = '#6b0030';
|
|
13
|
-
this.
|
|
16
|
+
this.colorPrimaryShade = '#4a0021';
|
|
17
|
+
this.colorPrimaryTint = '#974c6e';
|
|
14
18
|
}
|
|
15
19
|
componentWillLoad() {
|
|
16
20
|
this.currentTrek = this.trek ? this.trek : state.currentTrek;
|
|
@@ -30,15 +34,16 @@ const GrwTrekDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
30
34
|
}
|
|
31
35
|
render() {
|
|
32
36
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
33
|
-
return (h(Host, { style: { '--color-primary': this.colorPrimary, '--color-primary-tint': this.colorPrimaryTint } }, this.currentTrek && (h("div", { class: "trek-detail-container" }, h("div", { class: "name" }, this.currentTrek.name), this.currentTrek.attachments && this.currentTrek.attachments[0] && h("img", { class: "image", src: this.currentTrek.attachments[0].
|
|
37
|
+
return (h(Host, { style: { '--color-primary': this.colorPrimary, '--color-primary-shade': this.colorPrimaryShade, '--color-primary-tint': this.colorPrimaryTint } }, this.currentTrek && (h("div", { class: "trek-detail-container" }, h("div", { class: "name" }, this.currentTrek.name), this.currentTrek.attachments && this.currentTrek.attachments[0] && this.currentTrek.attachments[0].thumbnail && (h("img", { class: "image", src: this.currentTrek.attachments[0].thumbnail, loading: "lazy" })), h("div", { class: "sub-container" }, h("div", { class: "icons-labels-container" }, h("div", { class: "row" }, h("div", { class: "icon-label difficulty" }, ((_a = this.difficulty) === null || _a === void 0 ? void 0 : _a.pictogram) && h("img", { src: this.difficulty.pictogram }), (_b = this.difficulty) === null || _b === void 0 ? void 0 :
|
|
34
38
|
_b.label), h("div", { class: "icon-label duration" }, h("div", { class: "svg-icon", innerHTML: durationImage }), formatDuration((_c = this.currentTrek) === null || _c === void 0 ? void 0 : _c.duration)), h("div", { class: "icon-label route" }, ((_d = this.route) === null || _d === void 0 ? void 0 : _d.pictogram) && h("img", { src: this.route.pictogram }), (_e = this.route) === null || _e === void 0 ? void 0 :
|
|
35
39
|
_e.route)), h("div", { class: "row" }, h("div", { class: "icon-label length" }, h("div", { class: "svg-icon", innerHTML: lengthImage }), formatLength(this.currentTrek.length_2d)), h("div", { class: "icon-label ascent" }, h("div", { class: "svg-icon", innerHTML: ascentImage }), formatAscent(this.currentTrek.ascent)), h("div", { class: "icon-label practice" }, ((_f = this.practice) === null || _f === void 0 ? void 0 : _f.pictogram) && h("img", { src: this.practice.pictogram }), (_g = this.practice) === null || _g === void 0 ? void 0 :
|
|
36
|
-
_g.name)))), h("div", { class: "description", innerHTML: this.currentTrek.description ? this.currentTrek.description : this.currentTrek.description_teaser })))));
|
|
40
|
+
_g.name)))), h("div", { class: "downloads-container" }, h("div", { class: "download-title" }, "T\u00E9l\u00E9chargements"), h("div", { class: "links-container" }, h("a", { href: `${this.currentTrek.gpx}` }, "GPX"), h("a", { href: `${this.currentTrek.kml}` }, "KML"), h("a", { href: `${this.currentTrek.pdf}` }, "PDF"))), h("div", { class: "description", innerHTML: this.currentTrek.description ? this.currentTrek.description : this.currentTrek.description_teaser }), state.currentSensitiveAreas && state.currentSensitiveAreas.length > 0 && (h("div", { class: "sensitive-areas-container" }, h("div", { class: "sensitive-areas-title" }, "Zones sensibles"), state.currentSensitiveAreas.map(sensitiveArea => (h("grw-sensitive-area-detail", { sensitiveArea: sensitiveArea }))))), state.currentInformationDesks && state.currentInformationDesks.length > 0 && (h("div", { class: "information-desks-container" }, h("div", { class: "information-desks-title" }, "Lieux de renseignement"), state.currentInformationDesks.map(informationDesk => (h("grw-information-desk-detail", { informationDesk: informationDesk }))))), state.currentPois && state.currentPois.length > 0 && (h("div", { class: "pois-container" }, h("div", { class: "pois-title" }, "Points d'int\u00E9r\u00EAts"), state.currentPois.map(poi => (h("grw-poi-detail", { poi: poi })))))))));
|
|
37
41
|
}
|
|
38
42
|
static get style() { return grwTrekDetailCss; }
|
|
39
43
|
}, [1, "grw-trek-detail", {
|
|
40
44
|
"trek": [16],
|
|
41
45
|
"colorPrimary": [1, "color-primary"],
|
|
46
|
+
"colorPrimaryShade": [1, "color-primary-shade"],
|
|
42
47
|
"colorPrimaryTint": [1, "color-primary-tint"],
|
|
43
48
|
"currentTrek": [32],
|
|
44
49
|
"difficulty": [32],
|
|
@@ -49,13 +54,28 @@ function defineCustomElement() {
|
|
|
49
54
|
if (typeof customElements === "undefined") {
|
|
50
55
|
return;
|
|
51
56
|
}
|
|
52
|
-
const components = ["grw-trek-detail"];
|
|
57
|
+
const components = ["grw-trek-detail", "grw-information-desk-detail", "grw-poi-detail", "grw-sensitive-area-detail"];
|
|
53
58
|
components.forEach(tagName => { switch (tagName) {
|
|
54
59
|
case "grw-trek-detail":
|
|
55
60
|
if (!customElements.get(tagName)) {
|
|
56
61
|
customElements.define(tagName, GrwTrekDetail);
|
|
57
62
|
}
|
|
58
63
|
break;
|
|
64
|
+
case "grw-information-desk-detail":
|
|
65
|
+
if (!customElements.get(tagName)) {
|
|
66
|
+
defineCustomElement$3();
|
|
67
|
+
}
|
|
68
|
+
break;
|
|
69
|
+
case "grw-poi-detail":
|
|
70
|
+
if (!customElements.get(tagName)) {
|
|
71
|
+
defineCustomElement$2();
|
|
72
|
+
}
|
|
73
|
+
break;
|
|
74
|
+
case "grw-sensitive-area-detail":
|
|
75
|
+
if (!customElements.get(tagName)) {
|
|
76
|
+
defineCustomElement$1();
|
|
77
|
+
}
|
|
78
|
+
break;
|
|
59
79
|
} });
|
|
60
80
|
}
|
|
61
81
|
|