@geotrekce/geotrek-rando-widget 0.0.1 → 0.0.2
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 +2 -2
- package/dist/cjs/grw-app_7.cjs.entry.js +137 -55
- package/dist/cjs/{index-31255e29.js → index-c6f73e30.js} +36 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/assets/departure-arrival.svg +1 -1
- package/dist/collection/components/grw-app/grw-app.css +60 -37
- package/dist/collection/components/grw-app/grw-app.js +277 -15
- package/dist/collection/components/grw-map/grw-map.css +36 -0
- package/dist/collection/components/grw-map/grw-map.js +157 -18
- package/dist/collection/components/grw-trek-card/grw-trek-card.js +87 -32
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.css +1 -1
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +87 -32
- package/dist/collection/components/grw-treks-list/grw-treks-list.css +3 -12
- package/dist/collection/components/grw-treks-list/grw-treks-list.js +46 -4
- package/dist/collection/store/grw-trek-provider.js +28 -6
- package/dist/collection/store/grw-treks-provider.js +155 -9
- package/dist/collection/stories/App.js +31 -1
- package/dist/collection/stories/App.stories.js +21 -1
- package/dist/collection/stories/TrekCard.js +8 -3
- package/dist/collection/stories/TrekCard.stories.js +2 -0
- package/dist/collection/stories/TrekDetail.js +8 -3
- package/dist/collection/stories/TrekDetail.stories.js +2 -0
- package/dist/collection/stories/TrekMap.js +10 -3
- package/dist/collection/stories/TrekMap.stories.js +13 -1
- package/dist/collection/stories/TreksList.js +16 -3
- package/dist/collection/stories/TreksList.stories.js +10 -0
- package/dist/collection/stories/TreksMap.js +12 -3
- package/dist/collection/stories/TreksMap.stories.js +15 -1
- package/dist/components/grw-app.js +39 -6
- package/dist/components/grw-map2.js +56 -20
- package/dist/components/grw-trek-card2.js +25 -7
- package/dist/components/grw-trek-detail2.js +26 -8
- package/dist/components/grw-trek-provider2.js +10 -7
- package/dist/components/grw-treks-list2.js +10 -4
- package/dist/components/grw-treks-provider2.js +26 -11
- package/dist/esm/geotrek-rando-widget.js +2 -2
- package/dist/esm/grw-app_7.entry.js +137 -55
- package/dist/esm/{index-b36f38f5.js → index-7aa9e822.js} +36 -0
- package/dist/esm/loader.js +2 -2
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
- package/dist/geotrek-rando-widget/p-332ba9ab.js +2 -0
- package/dist/geotrek-rando-widget/p-b7c66d2d.entry.js +1 -0
- package/dist/types/components/grw-app/grw-app.d.ts +21 -2
- package/dist/types/components/grw-map/grw-map.d.ts +8 -0
- package/dist/types/components/grw-trek-card/grw-trek-card.d.ts +3 -1
- package/dist/types/components/grw-trek-detail/grw-trek-detail.d.ts +2 -0
- package/dist/types/components/grw-treks-list/grw-treks-list.d.ts +2 -0
- package/dist/types/components.d.ts +70 -0
- package/dist/types/store/grw-trek-provider.d.ts +1 -0
- package/dist/types/store/grw-treks-provider.d.ts +8 -0
- package/package.json +1 -1
- package/dist/geotrek-rando-widget/p-f721481d.js +0 -2
- package/dist/geotrek-rando-widget/p-fe788eaa.entry.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-c6f73e30.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Browser v2.16.1 | MIT Licensed | https://stenciljs.com
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["grw-app_7.cjs",[[1,"grw-app",{"api":[1],"portals":[1],"appName":[1,"app-name"],"colorPrimary":[1,"color-primary"],"colorPrimaryTint":[1,"color-primary-tint"],"showTrek":[32],"showMap":[32],"currentTrekId":[32]},[[0,"trekCardPress","onTrekCardPress"],[9,"resize","onWindowResize"]]],[1,"grw-treks-list",{"treksToDisplay":[32]}],[0,"grw-map",{"colorTrekLine":[1,"color-trek-line"],"colorDepartureIcon":[1,"color-departure-icon"],"colorArrivalIcon":[1,"color-arrival-icon"]}],[1,"grw-trek-detail",{"trek":[16]}],[
|
|
18
|
+
return index.bootstrapLazy([["grw-app_7.cjs",[[1,"grw-app",{"api":[1],"inBbox":[1,"in-bbox"],"cities":[1],"districts":[1],"structures":[1],"themes":[1],"portals":[1],"routes":[1],"practices":[1],"appName":[1,"app-name"],"urlLayer":[1,"url-layer"],"center":[1],"zoom":[8],"attribution":[1],"colorPrimary":[1,"color-primary"],"colorPrimaryTint":[1,"color-primary-tint"],"colorTrekLine":[1,"color-trek-line"],"colorDepartureIcon":[1,"color-departure-icon"],"colorArrivalIcon":[1,"color-arrival-icon"],"showTrek":[32],"showMap":[32],"isLargeView":[32],"currentTrekId":[32]},[[0,"trekCardPress","onTrekCardPress"],[9,"resize","onWindowResize"]]],[1,"grw-treks-list",{"colorPrimary":[1,"color-primary"],"colorPrimaryTint":[1,"color-primary-tint"],"treksToDisplay":[32]}],[0,"grw-map",{"urlLayer":[1,"url-layer"],"attribution":[1],"center":[1],"zoom":[2],"colorTrekLine":[1,"color-trek-line"],"colorDepartureIcon":[1,"color-departure-icon"],"colorArrivalIcon":[1,"color-arrival-icon"],"colorPrimary":[1,"color-primary"],"colorPrimaryTint":[1,"color-primary-tint"],"mapIsReady":[32]}],[1,"grw-trek-detail",{"trek":[16],"colorPrimary":[1,"color-primary"],"colorPrimaryTint":[1,"color-primary-tint"],"currentTrek":[32],"difficulty":[32],"route":[32],"practice":[32]}],[1,"grw-trek-provider",{"language":[1],"api":[1],"trekId":[1,"trek-id"]}],[1,"grw-treks-provider",{"language":[1],"api":[1],"inBbox":[1,"in-bbox"],"cities":[1],"districts":[1],"structures":[1],"themes":[1],"portals":[1],"routes":[1],"practices":[1]}],[1,"grw-trek-card",{"trek":[16],"colorPrimary":[1,"color-primary"],"colorPrimaryTint":[1,"color-primary-tint"],"currentTrek":[32],"difficulty":[32],"route":[32],"practice":[32]}]]]], options);
|
|
19
19
|
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-c6f73e30.js');
|
|
6
6
|
|
|
7
7
|
const appendToMap = (map, propName, value) => {
|
|
8
8
|
const items = map.get(propName);
|
|
@@ -199,32 +199,50 @@ const { state, onChange } = createStore({
|
|
|
199
199
|
|
|
200
200
|
const arrowBackImage = `<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><polyline points="244 400 100 256 244 112" style="fill:none;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-width:48px"/><line x1="120" y1="256" x2="412" y2="256" style="fill:none;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-width:48px"/></svg>`;
|
|
201
201
|
|
|
202
|
-
const grwAppCss = ".header-container{display:flex;align-items:center;background-color:var(--color-primary);height:64px}.header-container .title{color:#ffffff;
|
|
202
|
+
const grwAppCss = ".app-container{position:relative;height:100%;max-height:100vh}.header-container,.large-view-header-container{display:flex;align-items:center;background-color:var(--color-primary);height:64px}.header-container .title,.large-view-header-container .title{color:#ffffff;margin-left:24px}.header-container .arrow-back-icon,.large-view-header-container .arrow-back-icon{width:48px;height:auto;margin-left:24px}.header-container .arrow-back-icon svg,.large-view-header-container .arrow-back-icon svg{cursor:pointer;width:48px;height:auto}.loader-container,.large-view-loader-container{display:flex;justify-content:center;align-items:center;height:100%}.loader-container .loader,.large-view-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)}}.content-container{position:relative;display:flex;height:calc(100% - 64px)}.app-treks-list-container,.app-trek-detail-container,.large-view-app-treks-list-container,.large-view-app-trek-detail-container{height:100%}.app-map-container,.large-view-app-map-container{width:100%;height:100%}.map-visibility-button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:absolute;bottom:24px;width:100%;z-index:400;user-select:none}.map-visibility-button div{background-color:var(--color-primary);color:#ffffff;padding:12px;border-radius:24px;width:120px;text-align:center}.header-container .title{font-size:24px}.loader-container{position:absolute;width:100%}.app-treks-list-container,.app-trek-detail-container{width:100%}.app-map-container{position:relative;width:100%;position:absolute}.large-view-header-container .title{font-size:32px}.large-view-loader-container{position:relative;width:50%}.large-view-app-treks-list-container,.large-view-app-trek-detail-container{width:50%}.large-view-app-map-container{position:relative;width:50%}";
|
|
203
203
|
|
|
204
204
|
const GrwApp = class {
|
|
205
205
|
constructor(hostRef) {
|
|
206
206
|
index.registerInstance(this, hostRef);
|
|
207
|
+
this.showTrek = false;
|
|
208
|
+
this.showMap = false;
|
|
209
|
+
this.isLargeView = false;
|
|
207
210
|
this.appName = 'Geotrek Rando Widget';
|
|
208
211
|
this.colorPrimary = '#6b0030';
|
|
209
212
|
this.colorPrimaryTint = '#d2b2c0';
|
|
213
|
+
this.colorTrekLine = '#6b0030';
|
|
214
|
+
this.colorDepartureIcon = '#006b3b';
|
|
215
|
+
this.colorArrivalIcon = '#85003b';
|
|
216
|
+
this.largeViewSize = 664;
|
|
210
217
|
}
|
|
211
218
|
onTrekCardPress(event) {
|
|
212
219
|
this.currentTrekId = event.detail;
|
|
213
220
|
this.showTrek = !this.showTrek;
|
|
214
221
|
}
|
|
215
|
-
onWindowResize(
|
|
216
|
-
this.
|
|
222
|
+
onWindowResize() {
|
|
223
|
+
this.handleView();
|
|
224
|
+
}
|
|
225
|
+
watchPropHandler() {
|
|
226
|
+
window.dispatchEvent(new window.Event('resize'));
|
|
227
|
+
}
|
|
228
|
+
componentDidLoad() {
|
|
229
|
+
this.handleView();
|
|
217
230
|
}
|
|
218
231
|
onTrekDetailsClose() {
|
|
219
232
|
this.currentTrekId = null;
|
|
220
233
|
this.showTrek = !this.showTrek;
|
|
221
234
|
}
|
|
222
|
-
|
|
223
|
-
this.
|
|
235
|
+
handleView() {
|
|
236
|
+
this.isLargeView = this.element.getBoundingClientRect().width >= this.largeViewSize;
|
|
237
|
+
this.showMap = this.isLargeView;
|
|
224
238
|
}
|
|
225
239
|
render() {
|
|
226
|
-
return (index.h(index.Host, { style: { '--color-primary': this.colorPrimary, '--color-primary-tint': this.colorPrimaryTint } }, index.h("grw-treks-provider", { api: this.api, portals: this.portals }, index.h("div", { class: "
|
|
240
|
+
return (index.h(index.Host, { style: { '--color-primary': this.colorPrimary, '--color-primary-tint': this.colorPrimaryTint } }, index.h("grw-treks-provider", { api: this.api, "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 && index.h("grw-trek-provider", { api: state.api, "trek-id": this.currentTrekId }), index.h("div", { class: "app-container" }, index.h("div", { class: this.isLargeView ? 'large-view-header-container' : 'header-container' }, this.showTrek ? index.h("div", { onClick: () => this.onTrekDetailsClose(), class: "arrow-back-icon", innerHTML: arrowBackImage }) : index.h("div", { class: "title" }, this.appName)), index.h("div", { class: "content-container" }, index.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' } }, index.h("grw-treks-list", { "color-primary": this.colorPrimary, "color-primary-tint": this.colorPrimaryTint })), this.showTrek && !state.currentTrek && (index.h("div", { class: this.isLargeView ? 'large-view-loader-container' : 'loader-container' }, index.h("span", { class: "loader" }))), state.currentTrek && (index.h("div", { class: this.isLargeView ? 'large-view-app-trek-detail-container' : 'app-trek-detail-container' }, index.h("grw-trek-detail", { "color-primary": this.colorPrimary, "color-primary-tint": this.colorPrimaryTint }))), index.h("grw-map", { class: this.isLargeView ? 'large-view-app-map-container' : 'app-map-container', style: { visibility: this.showMap ? 'visible' : 'hidden' }, "url-layer": this.urlLayer, center: this.center, zoom: this.zoom, attribution: this.attribution, "color-trek-line": this.colorTrekLine, "color-departure-icon": this.colorDepartureIcon, "color-arrival-icon": this.colorArrivalIcon })), index.h("div", { class: "map-visibility-button", style: { display: this.isLargeView ? 'none' : 'flex' } }, index.h("div", { onClick: () => (this.showMap = !this.showMap) }, this.showMap ? (this.showTrek ? 'Voir la fiche' : 'Voir la liste') : 'Voir la carte')))));
|
|
227
241
|
}
|
|
242
|
+
get element() { return index.getElement(this); }
|
|
243
|
+
static get watchers() { return {
|
|
244
|
+
"isLargeView": ["watchPropHandler"]
|
|
245
|
+
}; }
|
|
228
246
|
};
|
|
229
247
|
GrwApp.style = grwAppCss;
|
|
230
248
|
|
|
@@ -14367,32 +14385,45 @@ var leafletSrc = createCommonjsModule(function (module, exports) {
|
|
|
14367
14385
|
//# sourceMappingURL=leaflet-src.js.map
|
|
14368
14386
|
});
|
|
14369
14387
|
|
|
14370
|
-
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
|
|
14388
|
+
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>`;
|
|
14371
14389
|
|
|
14372
|
-
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%}.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%}";
|
|
14390
|
+
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)}}";
|
|
14373
14391
|
|
|
14374
14392
|
const GrwMap = class {
|
|
14375
14393
|
constructor(hostRef) {
|
|
14376
14394
|
index.registerInstance(this, hostRef);
|
|
14395
|
+
this.mapIsReady = false;
|
|
14396
|
+
this.center = '1, 1';
|
|
14397
|
+
this.zoom = 10;
|
|
14377
14398
|
this.colorTrekLine = '#6b0030';
|
|
14378
14399
|
this.colorDepartureIcon = '#006b3b';
|
|
14379
14400
|
this.colorArrivalIcon = '#85003b';
|
|
14401
|
+
this.colorPrimary = '#6b0030';
|
|
14402
|
+
this.colorPrimaryTint = '#d2b2c0';
|
|
14380
14403
|
}
|
|
14381
14404
|
componentDidLoad() {
|
|
14382
14405
|
this.map = leafletSrc.map(this.element, {
|
|
14383
|
-
center:
|
|
14384
|
-
zoom:
|
|
14406
|
+
center: this.center.split(',').map(Number),
|
|
14407
|
+
zoom: this.zoom,
|
|
14385
14408
|
});
|
|
14386
|
-
leafletSrc.tileLayer(
|
|
14409
|
+
leafletSrc.tileLayer(this.urlLayer, {
|
|
14387
14410
|
maxZoom: 19,
|
|
14388
|
-
attribution:
|
|
14411
|
+
attribution: this.attribution,
|
|
14389
14412
|
}).addTo(this.map);
|
|
14390
14413
|
if (state.currentTrek) {
|
|
14391
14414
|
this.addTrek();
|
|
14392
14415
|
}
|
|
14393
|
-
else {
|
|
14416
|
+
else if (state.currentTrek) {
|
|
14394
14417
|
this.addTreks();
|
|
14395
14418
|
}
|
|
14419
|
+
onChange('treks', () => {
|
|
14420
|
+
if (state.currentTrek) {
|
|
14421
|
+
this.addTrek();
|
|
14422
|
+
}
|
|
14423
|
+
else if (state.treks) {
|
|
14424
|
+
this.addTreks();
|
|
14425
|
+
}
|
|
14426
|
+
});
|
|
14396
14427
|
onChange('currentTrek', () => {
|
|
14397
14428
|
if (state.currentTrek) {
|
|
14398
14429
|
this.removeTreks();
|
|
@@ -14405,6 +14436,7 @@ const GrwMap = class {
|
|
|
14405
14436
|
});
|
|
14406
14437
|
}
|
|
14407
14438
|
addTreks() {
|
|
14439
|
+
var _a;
|
|
14408
14440
|
const treksDepartureCoordinates = [];
|
|
14409
14441
|
const treksFeatureCollection = {
|
|
14410
14442
|
type: 'FeatureCollection',
|
|
@@ -14414,28 +14446,32 @@ const GrwMap = class {
|
|
|
14414
14446
|
treksDepartureCoordinates.push(trek.departure_geom);
|
|
14415
14447
|
treksFeatureCollection.features.push({
|
|
14416
14448
|
type: 'Feature',
|
|
14417
|
-
properties: {},
|
|
14449
|
+
properties: { practice: (_a = state.practices.find(practice => practice.id === trek.practice)) === null || _a === void 0 ? void 0 : _a.pictogram },
|
|
14418
14450
|
geometry: { type: 'Point', coordinates: trek.departure_geom },
|
|
14419
14451
|
});
|
|
14420
14452
|
}
|
|
14421
14453
|
if (treksDepartureCoordinates.length > 0) {
|
|
14422
14454
|
const bounds = leafletSrc.latLngBounds(treksDepartureCoordinates.map(coordinate => [coordinate[1], coordinate[0]]));
|
|
14423
|
-
this.
|
|
14455
|
+
this.currentBounds = bounds;
|
|
14456
|
+
this.map.fitBounds(this.currentBounds);
|
|
14424
14457
|
}
|
|
14425
14458
|
this.treksLayer = leafletSrc.geoJSON(treksFeatureCollection, {
|
|
14426
|
-
pointToLayer: (
|
|
14459
|
+
pointToLayer: (geoJsonPoint, latlng) => leafletSrc.marker(latlng, {
|
|
14427
14460
|
icon: leafletSrc.divIcon({
|
|
14428
14461
|
className: 'trek-marker',
|
|
14429
14462
|
iconSize: 48,
|
|
14430
|
-
|
|
14463
|
+
html: geoJsonPoint.properties.practice ? `<img src=${geoJsonPoint.properties.practice} />` : '',
|
|
14431
14464
|
}),
|
|
14432
14465
|
autoPanOnFocus: false,
|
|
14433
14466
|
}),
|
|
14434
14467
|
}).addTo(this.map);
|
|
14468
|
+
!this.mapIsReady && (this.mapIsReady = !this.mapIsReady);
|
|
14435
14469
|
}
|
|
14436
14470
|
removeTreks() {
|
|
14437
|
-
|
|
14438
|
-
|
|
14471
|
+
if (this.treksLayer) {
|
|
14472
|
+
this.map.removeLayer(this.treksLayer);
|
|
14473
|
+
this.treksLayer = null;
|
|
14474
|
+
}
|
|
14439
14475
|
}
|
|
14440
14476
|
addTrek() {
|
|
14441
14477
|
const trekFeature = {
|
|
@@ -14449,7 +14485,8 @@ const GrwMap = class {
|
|
|
14449
14485
|
}),
|
|
14450
14486
|
}).addTo(this.map);
|
|
14451
14487
|
const bounds = leafletSrc.latLngBounds(state.currentTrek.geometry.coordinates.map(coordinate => [coordinate[1], coordinate[0]]));
|
|
14452
|
-
this.
|
|
14488
|
+
this.currentBounds = bounds;
|
|
14489
|
+
this.map.fitBounds(this.currentBounds);
|
|
14453
14490
|
const departureCoordinates = [state.currentTrek.geometry.coordinates.at(0)[0], state.currentTrek.geometry.coordinates.at(0)[1]];
|
|
14454
14491
|
const arrivalCoordinates = [state.currentTrek.geometry.coordinates.at(-1)[0], state.currentTrek.geometry.coordinates.at(-1)[1]];
|
|
14455
14492
|
const departureArrivalFeatureCollection = {
|
|
@@ -14480,15 +14517,25 @@ const GrwMap = class {
|
|
|
14480
14517
|
autoPanOnFocus: false,
|
|
14481
14518
|
}),
|
|
14482
14519
|
}).addTo(this.map);
|
|
14520
|
+
!this.mapIsReady && (this.mapIsReady = !this.mapIsReady);
|
|
14483
14521
|
}
|
|
14484
14522
|
removeTrek() {
|
|
14485
|
-
|
|
14486
|
-
|
|
14487
|
-
|
|
14488
|
-
|
|
14523
|
+
if (this.trekLayer) {
|
|
14524
|
+
this.map.removeLayer(this.trekLayer);
|
|
14525
|
+
this.trekLayer = null;
|
|
14526
|
+
}
|
|
14527
|
+
if (this.departureArrivalLayer) {
|
|
14528
|
+
this.map.removeLayer(this.departureArrivalLayer);
|
|
14529
|
+
this.departureArrivalLayer = null;
|
|
14530
|
+
}
|
|
14489
14531
|
}
|
|
14490
14532
|
render() {
|
|
14491
|
-
return index.h(index.Host, { style: {
|
|
14533
|
+
return (index.h(index.Host, { style: {
|
|
14534
|
+
'--color-primary': this.colorPrimary,
|
|
14535
|
+
'--color-primary-tint': this.colorPrimaryTint,
|
|
14536
|
+
'--color-departure-icon': this.colorDepartureIcon,
|
|
14537
|
+
'--color-arrival-icon': this.colorArrivalIcon,
|
|
14538
|
+
} }, !this.mapIsReady && (index.h("div", { class: "map-loader-container" }, index.h("span", { class: "loader" })))));
|
|
14492
14539
|
}
|
|
14493
14540
|
get element() { return index.getElement(this); }
|
|
14494
14541
|
};
|
|
@@ -14526,41 +14573,65 @@ const GrwTrekCard = class {
|
|
|
14526
14573
|
constructor(hostRef) {
|
|
14527
14574
|
index.registerInstance(this, hostRef);
|
|
14528
14575
|
this.trekCardPress = index.createEvent(this, "trekCardPress", 7);
|
|
14576
|
+
this.colorPrimary = '#6b0030';
|
|
14577
|
+
this.colorPrimaryTint = '#d2b2c0';
|
|
14529
14578
|
}
|
|
14530
14579
|
componentWillLoad() {
|
|
14531
14580
|
this.currentTrek = this.trek ? this.trek : state.currentTrek;
|
|
14532
|
-
|
|
14533
|
-
|
|
14534
|
-
|
|
14581
|
+
if (this.currentTrek) {
|
|
14582
|
+
this.difficulty = state.difficulties.find(difficulty => difficulty.id === this.currentTrek.difficulty);
|
|
14583
|
+
this.route = state.routes.find(route => route.id === this.currentTrek.route);
|
|
14584
|
+
this.practice = state.practices.find(practice => practice.id === this.currentTrek.practice);
|
|
14585
|
+
}
|
|
14586
|
+
onChange('currentTrek', () => {
|
|
14587
|
+
this.currentTrek = this.trek ? this.trek : state.currentTrek;
|
|
14588
|
+
if (this.currentTrek) {
|
|
14589
|
+
this.difficulty = state.difficulties.find(difficulty => difficulty.id === this.currentTrek.difficulty);
|
|
14590
|
+
this.route = state.routes.find(route => route.id === this.currentTrek.route);
|
|
14591
|
+
this.practice = state.practices.find(practice => practice.id === this.currentTrek.practice);
|
|
14592
|
+
}
|
|
14593
|
+
});
|
|
14535
14594
|
}
|
|
14536
14595
|
render() {
|
|
14537
14596
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
14538
|
-
return (index.h(index.Host, { onClick: () => this.trekCardPress.emit(this.currentTrek.id) }, index.h("div", { class: "trek-card-container" }, this.currentTrek.attachments[0] && index.h("img", { class: "image", src: this.currentTrek.attachments[0].url
|
|
14597
|
+
return (index.h(index.Host, { onClick: () => this.trekCardPress.emit(this.currentTrek.id), style: { '--color-primary': this.colorPrimary, '--color-primary-tint': this.colorPrimaryTint } }, this.currentTrek && (index.h("div", { class: "trek-card-container" }, this.currentTrek.attachments && this.currentTrek.attachments[0] && this.currentTrek.attachments[0].url && (index.h("img", { class: "image", src: `${this.currentTrek.attachments[0].url}.400x0_q85.${this.currentTrek.attachments[0].url.slice(-3).toLowerCase()}`, loading: "lazy" })), index.h("div", { class: "sub-container" }, index.h("div", { class: "name" }, (_a = this.currentTrek) === null || _a === void 0 ? void 0 : _a.name), index.h("div", { class: "description", innerHTML: (_b = this.currentTrek) === null || _b === void 0 ? void 0 : _b.description_teaser }), index.h("div", { class: "icons-labels-container" }, index.h("div", { class: "row" }, index.h("div", { class: "icon-label difficulty" }, ((_c = this.difficulty) === null || _c === void 0 ? void 0 : _c.pictogram) && index.h("img", { src: this.difficulty.pictogram }), (_d = this.difficulty) === null || _d === void 0 ? void 0 :
|
|
14539
14598
|
_d.label), index.h("div", { class: "icon-label duration" }, index.h("div", { class: "svg-icon", innerHTML: durationImage }), formatDuration(this.currentTrek.duration)), index.h("div", { class: "icon-label route" }, ((_e = this.route) === null || _e === void 0 ? void 0 : _e.pictogram) && index.h("img", { src: this.route.pictogram }), (_f = this.route) === null || _f === void 0 ? void 0 :
|
|
14540
14599
|
_f.route)), index.h("div", { class: "row" }, index.h("div", { class: "icon-label length" }, index.h("div", { class: "svg-icon", innerHTML: lengthImage }), formatLength(this.currentTrek.length_2d)), index.h("div", { class: "icon-label ascent" }, index.h("div", { class: "svg-icon", innerHTML: ascentImage }), formatAscent(this.currentTrek.ascent)), index.h("div", { class: "icon-label practice" }, ((_g = this.practice) === null || _g === void 0 ? void 0 : _g.pictogram) && index.h("img", { src: this.practice.pictogram }), (_h = this.practice) === null || _h === void 0 ? void 0 :
|
|
14541
|
-
_h.name)))))));
|
|
14600
|
+
_h.name))))))));
|
|
14542
14601
|
}
|
|
14543
14602
|
};
|
|
14544
14603
|
GrwTrekCard.style = grwTrekCardCss;
|
|
14545
14604
|
|
|
14546
|
-
const grwTrekDetailCss = ".trek-detail-container{display:flex;flex-direction:column;
|
|
14605
|
+
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}";
|
|
14547
14606
|
|
|
14548
14607
|
const GrwTrekDetail = class {
|
|
14549
14608
|
constructor(hostRef) {
|
|
14550
14609
|
index.registerInstance(this, hostRef);
|
|
14610
|
+
this.colorPrimary = '#6b0030';
|
|
14611
|
+
this.colorPrimaryTint = '#d2b2c0';
|
|
14551
14612
|
}
|
|
14552
14613
|
componentWillLoad() {
|
|
14553
14614
|
this.currentTrek = this.trek ? this.trek : state.currentTrek;
|
|
14554
|
-
|
|
14555
|
-
|
|
14556
|
-
|
|
14615
|
+
if (this.currentTrek) {
|
|
14616
|
+
this.difficulty = state.difficulties.find(difficulty => difficulty.id === this.currentTrek.difficulty);
|
|
14617
|
+
this.route = state.routes.find(route => route.id === this.currentTrek.route);
|
|
14618
|
+
this.practice = state.practices.find(practice => practice.id === this.currentTrek.practice);
|
|
14619
|
+
}
|
|
14620
|
+
onChange('currentTrek', () => {
|
|
14621
|
+
this.currentTrek = this.trek ? this.trek : state.currentTrek;
|
|
14622
|
+
if (this.currentTrek) {
|
|
14623
|
+
this.difficulty = state.difficulties.find(difficulty => difficulty.id === this.currentTrek.difficulty);
|
|
14624
|
+
this.route = state.routes.find(route => route.id === this.currentTrek.route);
|
|
14625
|
+
this.practice = state.practices.find(practice => practice.id === this.currentTrek.practice);
|
|
14626
|
+
}
|
|
14627
|
+
});
|
|
14557
14628
|
}
|
|
14558
14629
|
render() {
|
|
14559
14630
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
14560
|
-
return (index.h(index.Host,
|
|
14631
|
+
return (index.h(index.Host, { style: { '--color-primary': this.colorPrimary, '--color-primary-tint': this.colorPrimaryTint } }, this.currentTrek && (index.h("div", { class: "trek-detail-container" }, index.h("div", { class: "name" }, this.currentTrek.name), this.currentTrek.attachments && this.currentTrek.attachments[0] && index.h("img", { class: "image", src: this.currentTrek.attachments[0].url, loading: "lazy" }), index.h("div", { class: "sub-container" }, index.h("div", { class: "icons-labels-container" }, index.h("div", { class: "row" }, index.h("div", { class: "icon-label difficulty" }, ((_a = this.difficulty) === null || _a === void 0 ? void 0 : _a.pictogram) && index.h("img", { src: this.difficulty.pictogram }), (_b = this.difficulty) === null || _b === void 0 ? void 0 :
|
|
14561
14632
|
_b.label), index.h("div", { class: "icon-label duration" }, index.h("div", { class: "svg-icon", innerHTML: durationImage }), formatDuration((_c = this.currentTrek) === null || _c === void 0 ? void 0 : _c.duration)), index.h("div", { class: "icon-label route" }, ((_d = this.route) === null || _d === void 0 ? void 0 : _d.pictogram) && index.h("img", { src: this.route.pictogram }), (_e = this.route) === null || _e === void 0 ? void 0 :
|
|
14562
14633
|
_e.route)), index.h("div", { class: "row" }, index.h("div", { class: "icon-label length" }, index.h("div", { class: "svg-icon", innerHTML: lengthImage }), formatLength(this.currentTrek.length_2d)), index.h("div", { class: "icon-label ascent" }, index.h("div", { class: "svg-icon", innerHTML: ascentImage }), formatAscent(this.currentTrek.ascent)), index.h("div", { class: "icon-label practice" }, ((_f = this.practice) === null || _f === void 0 ? void 0 : _f.pictogram) && index.h("img", { src: this.practice.pictogram }), (_g = this.practice) === null || _g === void 0 ? void 0 :
|
|
14563
|
-
_g.name)))), index.h("div", { class: "description", innerHTML: this.currentTrek.description ? this.currentTrek.description : this.currentTrek.description_teaser }))));
|
|
14634
|
+
_g.name)))), index.h("div", { class: "description", innerHTML: this.currentTrek.description ? this.currentTrek.description : this.currentTrek.description_teaser })))));
|
|
14564
14635
|
}
|
|
14565
14636
|
};
|
|
14566
14637
|
GrwTrekDetail.style = grwTrekDetailCss;
|
|
@@ -14568,21 +14639,22 @@ GrwTrekDetail.style = grwTrekDetailCss;
|
|
|
14568
14639
|
const GrwTrekProvider = class {
|
|
14569
14640
|
constructor(hostRef) {
|
|
14570
14641
|
index.registerInstance(this, hostRef);
|
|
14642
|
+
this.language = 'fr';
|
|
14571
14643
|
}
|
|
14572
14644
|
componentWillLoad() {
|
|
14573
14645
|
state.api = this.api;
|
|
14574
14646
|
return Promise.all([
|
|
14575
|
-
fetch(`${this.api}
|
|
14576
|
-
fetch(`${this.api}
|
|
14577
|
-
fetch(`${this.api}
|
|
14578
|
-
fetch(`${this.api}
|
|
14647
|
+
fetch(`${this.api}trek_difficulty/?language=${this.language}`),
|
|
14648
|
+
fetch(`${this.api}trek_route/?language=${this.language}`),
|
|
14649
|
+
fetch(`${this.api}trek_practice/?language=${this.language}`),
|
|
14650
|
+
fetch(`${this.api}trek/${this.trekId}/?language=${this.language}&fields=id,name,attachments,description,description_teaser,difficulty,duration,ascent,length_2d,practice,route,geometry`),
|
|
14579
14651
|
])
|
|
14580
14652
|
.then(responses => Promise.all(responses.map(response => response.json())))
|
|
14581
|
-
.then(([
|
|
14582
|
-
state.currentTrek = trek;
|
|
14653
|
+
.then(([difficulties, routes, practices, trek]) => {
|
|
14583
14654
|
state.difficulties = difficulties.results;
|
|
14584
14655
|
state.routes = routes.results;
|
|
14585
14656
|
state.practices = practices.results;
|
|
14657
|
+
state.currentTrek = trek;
|
|
14586
14658
|
});
|
|
14587
14659
|
}
|
|
14588
14660
|
disconnectedCallback() {
|
|
@@ -14593,18 +14665,22 @@ const GrwTrekProvider = class {
|
|
|
14593
14665
|
}
|
|
14594
14666
|
};
|
|
14595
14667
|
|
|
14596
|
-
const grwTreksListCss = ":host{display:flex;flex-wrap:wrap;justify-content:
|
|
14668
|
+
const grwTreksListCss = ":host{display:flex;flex-wrap:wrap;justify-content:space-around;height:100%;max-height:100vh;overflow-y:auto}grw-trek-card{margin:6px}";
|
|
14597
14669
|
|
|
14598
14670
|
const GrwTreksList = class {
|
|
14599
14671
|
constructor(hostRef) {
|
|
14600
14672
|
index.registerInstance(this, hostRef);
|
|
14601
14673
|
this.treksToDisplay = [];
|
|
14674
|
+
this.colorPrimary = '#6b0030';
|
|
14675
|
+
this.colorPrimaryTint = '#d2b2c0';
|
|
14602
14676
|
this.handleInfiniteScrollBind = this.handleInfiniteScroll.bind(this);
|
|
14603
14677
|
this.step = 10;
|
|
14604
14678
|
}
|
|
14605
14679
|
componentWillLoad() {
|
|
14606
|
-
this.treksToDisplay = state.treks.slice(0, this.step);
|
|
14607
14680
|
this.element.addEventListener('scroll', this.handleInfiniteScrollBind);
|
|
14681
|
+
onChange('treks', () => {
|
|
14682
|
+
this.treksToDisplay = state.treks.slice(0, this.step);
|
|
14683
|
+
});
|
|
14608
14684
|
}
|
|
14609
14685
|
handleInfiniteScroll(event) {
|
|
14610
14686
|
if (event.composedPath()[0].scrollTop + event.composedPath()[0].scrollHeight / 2 >= event.composedPath()[0].scrollHeight) {
|
|
@@ -14617,7 +14693,7 @@ const GrwTreksList = class {
|
|
|
14617
14693
|
}
|
|
14618
14694
|
}
|
|
14619
14695
|
render() {
|
|
14620
|
-
return (index.h(index.Host, {
|
|
14696
|
+
return (index.h(index.Host, { style: { '--color-primary': this.colorPrimary, '--color-primary-tint': this.colorPrimaryTint } }, this.treksToDisplay.map(trek => (index.h("grw-trek-card", { trek: trek, "color-primary": this.colorPrimary, "color-primary-tint": this.colorPrimaryTint })))));
|
|
14621
14697
|
}
|
|
14622
14698
|
get element() { return index.getElement(this); }
|
|
14623
14699
|
};
|
|
@@ -14626,26 +14702,32 @@ GrwTreksList.style = grwTreksListCss;
|
|
|
14626
14702
|
const GrwTreksProvider = class {
|
|
14627
14703
|
constructor(hostRef) {
|
|
14628
14704
|
index.registerInstance(this, hostRef);
|
|
14705
|
+
this.language = 'fr';
|
|
14629
14706
|
}
|
|
14630
14707
|
componentWillLoad() {
|
|
14631
14708
|
state.api = this.api;
|
|
14632
|
-
let treksRequest = `${this.api}trek/?language
|
|
14633
|
-
|
|
14634
|
-
|
|
14635
|
-
}
|
|
14709
|
+
let treksRequest = `${this.api}trek/?language=${this.language}`;
|
|
14710
|
+
this.inBbox && (treksRequest += `&in_bbox=${this.inBbox}`);
|
|
14711
|
+
this.cities && (treksRequest += `&cities=${this.cities}`);
|
|
14712
|
+
this.districts && (treksRequest += `&districts=${this.districts}`);
|
|
14713
|
+
this.structures && (treksRequest += `&structures=${this.structures}`);
|
|
14714
|
+
this.themes && (treksRequest += `&themes=${this.themes}`);
|
|
14715
|
+
this.portals && (treksRequest += `&portals=${this.portals}`);
|
|
14716
|
+
this.routes && (treksRequest += `&routes=${this.routes}`);
|
|
14717
|
+
this.practices && (treksRequest += `&practices=${this.practices}`);
|
|
14636
14718
|
treksRequest += `&fields=id,name,attachments,description_teaser,difficulty,duration,ascent,length_2d,practice,route,departure_geom&page_size=999`;
|
|
14637
14719
|
return Promise.all([
|
|
14720
|
+
fetch(`${this.api}trek_difficulty/?language=${this.language}`),
|
|
14721
|
+
fetch(`${this.api}trek_route/?language=${this.language}`),
|
|
14722
|
+
fetch(`${this.api}trek_practice/?language=${this.language}`),
|
|
14638
14723
|
fetch(treksRequest),
|
|
14639
|
-
fetch(`${this.api}trek_difficulty/?language=fr`),
|
|
14640
|
-
fetch(`${this.api}trek_route/?language=fr`),
|
|
14641
|
-
fetch(`${this.api}trek_practice/?language=fr`),
|
|
14642
14724
|
])
|
|
14643
14725
|
.then(responses => Promise.all(responses.map(response => response.json())))
|
|
14644
|
-
.then(([
|
|
14645
|
-
state.treks = treks.results;
|
|
14726
|
+
.then(([difficulties, routes, practices, treks]) => {
|
|
14646
14727
|
state.difficulties = difficulties.results;
|
|
14647
14728
|
state.routes = routes.results;
|
|
14648
14729
|
state.practices = practices.results;
|
|
14730
|
+
state.treks = treks.results;
|
|
14649
14731
|
});
|
|
14650
14732
|
}
|
|
14651
14733
|
render() {
|
|
@@ -815,6 +815,10 @@ const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
|
815
815
|
const parsePropertyValue = (propValue, propType) => {
|
|
816
816
|
// ensure this value is of the correct prop type
|
|
817
817
|
if (propValue != null && !isComplexType(propValue)) {
|
|
818
|
+
if (propType & 2 /* Number */) {
|
|
819
|
+
// force it to be a number
|
|
820
|
+
return parseFloat(propValue);
|
|
821
|
+
}
|
|
818
822
|
if (propType & 1 /* String */) {
|
|
819
823
|
// could have been passed as a number or boolean
|
|
820
824
|
// but we still want it as a string
|
|
@@ -831,6 +835,7 @@ const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propNam
|
|
|
831
835
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
832
836
|
// check our new property value against our internal value
|
|
833
837
|
const hostRef = getHostRef(ref);
|
|
838
|
+
const elm = hostRef.$hostElement$ ;
|
|
834
839
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
835
840
|
const flags = hostRef.$flags$;
|
|
836
841
|
const instance = hostRef.$lazyInstance$ ;
|
|
@@ -843,6 +848,22 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
843
848
|
// set our new value!
|
|
844
849
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
845
850
|
if (instance) {
|
|
851
|
+
// get an array of method names of watch functions to call
|
|
852
|
+
if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
|
|
853
|
+
const watchMethods = cmpMeta.$watchers$[propName];
|
|
854
|
+
if (watchMethods) {
|
|
855
|
+
// this instance is watching for when this property changed
|
|
856
|
+
watchMethods.map((watchMethodName) => {
|
|
857
|
+
try {
|
|
858
|
+
// fire off each of the watch methods that are watching this property
|
|
859
|
+
instance[watchMethodName](newVal, oldVal, propName);
|
|
860
|
+
}
|
|
861
|
+
catch (e) {
|
|
862
|
+
consoleError(e, elm);
|
|
863
|
+
}
|
|
864
|
+
});
|
|
865
|
+
}
|
|
866
|
+
}
|
|
846
867
|
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
847
868
|
// looks like this value actually changed, so we've got work to do!
|
|
848
869
|
// but only if we've already rendered, otherwise just chill out
|
|
@@ -855,6 +876,9 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
855
876
|
};
|
|
856
877
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
857
878
|
if (cmpMeta.$members$) {
|
|
879
|
+
if (Cstr.watchers) {
|
|
880
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
881
|
+
}
|
|
858
882
|
// It's better to have a const than two Object.entries()
|
|
859
883
|
const members = Object.entries(cmpMeta.$members$);
|
|
860
884
|
const prototype = Cstr.prototype;
|
|
@@ -959,6 +983,12 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
959
983
|
endLoad();
|
|
960
984
|
}
|
|
961
985
|
if (!Cstr.isProxied) {
|
|
986
|
+
// we've never proxied this Constructor before
|
|
987
|
+
// let's add the getters/setters to its prototype before
|
|
988
|
+
// the first time we create an instance of the implementation
|
|
989
|
+
{
|
|
990
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
991
|
+
}
|
|
962
992
|
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
963
993
|
Cstr.isProxied = true;
|
|
964
994
|
}
|
|
@@ -982,6 +1012,9 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
982
1012
|
{
|
|
983
1013
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
984
1014
|
}
|
|
1015
|
+
{
|
|
1016
|
+
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1017
|
+
}
|
|
985
1018
|
endNewInstance();
|
|
986
1019
|
}
|
|
987
1020
|
if (Cstr.style) {
|
|
@@ -1100,6 +1133,9 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1100
1133
|
{
|
|
1101
1134
|
cmpMeta.$listeners$ = compactMeta[3];
|
|
1102
1135
|
}
|
|
1136
|
+
{
|
|
1137
|
+
cmpMeta.$watchers$ = {};
|
|
1138
|
+
}
|
|
1103
1139
|
const tagName = cmpMeta.$tagName$;
|
|
1104
1140
|
const HostElement = class extends HTMLElement {
|
|
1105
1141
|
// StencilLazyHost
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-c6f73e30.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Patch Esm v2.16.1 | MIT Licensed | https://stenciljs.com
|
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["grw-app_7.cjs",[[1,"grw-app",{"api":[1],"portals":[1],"appName":[1,"app-name"],"colorPrimary":[1,"color-primary"],"colorPrimaryTint":[1,"color-primary-tint"],"showTrek":[32],"showMap":[32],"currentTrekId":[32]},[[0,"trekCardPress","onTrekCardPress"],[9,"resize","onWindowResize"]]],[1,"grw-treks-list",{"treksToDisplay":[32]}],[0,"grw-map",{"colorTrekLine":[1,"color-trek-line"],"colorDepartureIcon":[1,"color-departure-icon"],"colorArrivalIcon":[1,"color-arrival-icon"]}],[1,"grw-trek-detail",{"trek":[16]}],[
|
|
17
|
+
return index.bootstrapLazy([["grw-app_7.cjs",[[1,"grw-app",{"api":[1],"inBbox":[1,"in-bbox"],"cities":[1],"districts":[1],"structures":[1],"themes":[1],"portals":[1],"routes":[1],"practices":[1],"appName":[1,"app-name"],"urlLayer":[1,"url-layer"],"center":[1],"zoom":[8],"attribution":[1],"colorPrimary":[1,"color-primary"],"colorPrimaryTint":[1,"color-primary-tint"],"colorTrekLine":[1,"color-trek-line"],"colorDepartureIcon":[1,"color-departure-icon"],"colorArrivalIcon":[1,"color-arrival-icon"],"showTrek":[32],"showMap":[32],"isLargeView":[32],"currentTrekId":[32]},[[0,"trekCardPress","onTrekCardPress"],[9,"resize","onWindowResize"]]],[1,"grw-treks-list",{"colorPrimary":[1,"color-primary"],"colorPrimaryTint":[1,"color-primary-tint"],"treksToDisplay":[32]}],[0,"grw-map",{"urlLayer":[1,"url-layer"],"attribution":[1],"center":[1],"zoom":[2],"colorTrekLine":[1,"color-trek-line"],"colorDepartureIcon":[1,"color-departure-icon"],"colorArrivalIcon":[1,"color-arrival-icon"],"colorPrimary":[1,"color-primary"],"colorPrimaryTint":[1,"color-primary-tint"],"mapIsReady":[32]}],[1,"grw-trek-detail",{"trek":[16],"colorPrimary":[1,"color-primary"],"colorPrimaryTint":[1,"color-primary-tint"],"currentTrek":[32],"difficulty":[32],"route":[32],"practice":[32]}],[1,"grw-trek-provider",{"language":[1],"api":[1],"trekId":[1,"trek-id"]}],[1,"grw-treks-provider",{"language":[1],"api":[1],"inBbox":[1,"in-bbox"],"cities":[1],"districts":[1],"structures":[1],"themes":[1],"portals":[1],"routes":[1],"practices":[1]}],[1,"grw-trek-card",{"trek":[16],"colorPrimary":[1,"color-primary"],"colorPrimaryTint":[1,"color-primary-tint"],"currentTrek":[32],"difficulty":[32],"route":[32],"practice":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<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
|
|
1
|
+
<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>
|