@geotrekce/geotrek-rando-widget 0.2.0 → 0.2.1
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/grw-app.cjs.entry.js +1 -1
- package/dist/cjs/grw-app.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-app.cjs.entry.js.gz +0 -0
- package/dist/cjs/grw-app.cjs.entry.js.map +1 -1
- package/dist/cjs/grw-filter_7.cjs.entry.js +5 -5
- package/dist/cjs/grw-filter_7.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-filter_7.cjs.entry.js.gz +0 -0
- package/dist/cjs/grw-filter_7.cjs.entry.js.map +1 -1
- package/dist/cjs/grw-information-desk-detail_3.cjs.entry.js +3 -3
- package/dist/cjs/grw-information-desk-detail_3.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-information-desk-detail_3.cjs.entry.js.gz +0 -0
- package/dist/cjs/grw-information-desk-detail_3.cjs.entry.js.map +1 -1
- package/dist/cjs/grw-trek-card.cjs.entry.js +1 -1
- package/dist/cjs/grw-trek-card.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-trek-card.cjs.entry.js.gz +0 -0
- package/dist/cjs/grw-trek-card.cjs.entry.js.map +1 -1
- package/dist/collection/components/grw-app/grw-app.css +1 -0
- package/dist/collection/components/grw-app/grw-app.css.br +0 -0
- package/dist/collection/components/grw-app/grw-app.css.gz +0 -0
- package/dist/collection/components/grw-filter/grw-filter.css +1 -5
- package/dist/collection/components/grw-filter/grw-filter.css.br +0 -0
- package/dist/collection/components/grw-filter/grw-filter.css.gz +0 -0
- package/dist/collection/components/grw-information-desk-detail/grw-information-desk-detail.css +1 -5
- package/dist/collection/components/grw-information-desk-detail/grw-information-desk-detail.css.br +0 -0
- package/dist/collection/components/grw-information-desk-detail/grw-information-desk-detail.css.gz +0 -0
- package/dist/collection/components/grw-map/grw-map.css +1 -0
- package/dist/collection/components/grw-map/grw-map.css.br +0 -0
- package/dist/collection/components/grw-map/grw-map.css.gz +0 -0
- package/dist/collection/components/grw-poi-detail/grw-poi-detail.css +1 -0
- package/dist/collection/components/grw-poi-detail/grw-poi-detail.css.br +0 -0
- package/dist/collection/components/grw-poi-detail/grw-poi-detail.css.gz +0 -0
- package/dist/collection/components/grw-select-language/grw-select-language.css +1 -0
- package/dist/collection/components/grw-select-language/grw-select-language.css.br +0 -0
- package/dist/collection/components/grw-select-language/grw-select-language.css.gz +0 -0
- package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.css +1 -0
- package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.css.br +0 -0
- package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.css.gz +0 -0
- package/dist/collection/components/grw-trek-card/grw-trek-card.css +1 -5
- package/dist/collection/components/grw-trek-card/grw-trek-card.css.br +0 -0
- package/dist/collection/components/grw-trek-card/grw-trek-card.css.gz +0 -0
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.css +1 -0
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.css.br +0 -0
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.css.gz +0 -0
- package/dist/collection/components/grw-treks-list/grw-treks-list.css +1 -0
- package/dist/collection/components/grw-treks-list/grw-treks-list.css.br +0 -0
- package/dist/collection/components/grw-treks-list/grw-treks-list.css.gz +0 -0
- package/dist/esm/grw-app.entry.js +1 -1
- package/dist/esm/grw-app.entry.js.br +0 -0
- package/dist/esm/grw-app.entry.js.gz +0 -0
- package/dist/esm/grw-app.entry.js.map +1 -1
- package/dist/esm/grw-filter_7.entry.js +5 -5
- package/dist/esm/grw-filter_7.entry.js.br +0 -0
- package/dist/esm/grw-filter_7.entry.js.gz +0 -0
- package/dist/esm/grw-filter_7.entry.js.map +1 -1
- package/dist/esm/grw-information-desk-detail_3.entry.js +3 -3
- package/dist/esm/grw-information-desk-detail_3.entry.js.br +0 -0
- package/dist/esm/grw-information-desk-detail_3.entry.js.gz +0 -0
- package/dist/esm/grw-information-desk-detail_3.entry.js.map +1 -1
- package/dist/esm/grw-trek-card.entry.js +1 -1
- package/dist/esm/grw-trek-card.entry.js.br +0 -0
- package/dist/esm/grw-trek-card.entry.js.gz +0 -0
- package/dist/esm/grw-trek-card.entry.js.map +1 -1
- package/dist/esm-es5/grw-app.entry.js +1 -1
- package/dist/esm-es5/grw-app.entry.js.br +0 -0
- package/dist/esm-es5/grw-app.entry.js.gz +0 -0
- package/dist/esm-es5/grw-app.entry.js.map +1 -1
- package/dist/esm-es5/grw-filter_7.entry.js +2 -2
- package/dist/esm-es5/grw-filter_7.entry.js.br +0 -0
- package/dist/esm-es5/grw-filter_7.entry.js.gz +0 -0
- package/dist/esm-es5/grw-filter_7.entry.js.map +1 -1
- package/dist/esm-es5/grw-information-desk-detail_3.entry.js +1 -1
- package/dist/esm-es5/grw-information-desk-detail_3.entry.js.br +0 -0
- package/dist/esm-es5/grw-information-desk-detail_3.entry.js.gz +0 -0
- package/dist/esm-es5/grw-information-desk-detail_3.entry.js.map +1 -1
- package/dist/esm-es5/grw-trek-card.entry.js +1 -1
- package/dist/esm-es5/grw-trek-card.entry.js.br +0 -0
- package/dist/esm-es5/grw-trek-card.entry.js.gz +0 -0
- package/dist/esm-es5/grw-trek-card.entry.js.map +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.css +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.css.br +0 -0
- package/dist/geotrek-rando-widget/geotrek-rando-widget.css.gz +0 -0
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.br +0 -0
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-12132148.entry.js +2 -0
- package/dist/geotrek-rando-widget/p-12132148.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-12132148.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-12132148.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/{p-1a25ab22.entry.js → p-1945d1c1.entry.js} +3 -3
- package/dist/geotrek-rando-widget/p-1945d1c1.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-1945d1c1.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-1945d1c1.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/p-2092e60d.entry.js +2 -0
- package/dist/geotrek-rando-widget/p-2092e60d.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-2092e60d.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-2092e60d.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/p-360241fa.system.entry.js +2 -0
- package/dist/geotrek-rando-widget/p-360241fa.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-360241fa.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-360241fa.system.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/p-59c35d04.entry.js +2 -0
- package/dist/geotrek-rando-widget/p-59c35d04.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-59c35d04.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-59c35d04.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/p-8e38db57.system.js +1 -1
- package/dist/geotrek-rando-widget/p-8e38db57.system.js.br +0 -0
- package/dist/geotrek-rando-widget/p-8e38db57.system.js.gz +0 -0
- package/dist/geotrek-rando-widget/{p-c72585fe.system.entry.js → p-da631d19.system.entry.js} +3 -3
- package/dist/geotrek-rando-widget/p-da631d19.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-da631d19.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-da631d19.system.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/p-e2660a2c.system.entry.js +2 -0
- package/dist/geotrek-rando-widget/p-e2660a2c.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-e2660a2c.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-e2660a2c.system.entry.js.map +1 -0
- package/dist/geotrek-rando-widget/p-ebbb300d.system.entry.js +2 -0
- package/dist/geotrek-rando-widget/p-ebbb300d.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-ebbb300d.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-ebbb300d.system.entry.js.map +1 -0
- package/package.json +1 -1
- package/dist/geotrek-rando-widget/p-1a25ab22.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-1a25ab22.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-1a25ab22.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-1e1b3006.entry.js +0 -2
- package/dist/geotrek-rando-widget/p-1e1b3006.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-1e1b3006.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-1e1b3006.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-6d748d33.system.entry.js +0 -2
- package/dist/geotrek-rando-widget/p-6d748d33.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-6d748d33.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-6d748d33.system.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-c72585fe.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-c72585fe.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-c72585fe.system.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-d0b22f11.system.entry.js +0 -2
- package/dist/geotrek-rando-widget/p-d0b22f11.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-d0b22f11.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-d0b22f11.system.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-d5b0f2d5.system.entry.js +0 -2
- package/dist/geotrek-rando-widget/p-d5b0f2d5.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-d5b0f2d5.system.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-d5b0f2d5.system.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-dbf7dc54.entry.js +0 -2
- package/dist/geotrek-rando-widget/p-dbf7dc54.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-dbf7dc54.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-dbf7dc54.entry.js.map +0 -1
- package/dist/geotrek-rando-widget/p-f60bd917.entry.js +0 -2
- package/dist/geotrek-rando-widget/p-f60bd917.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-f60bd917.entry.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-f60bd917.entry.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["./p-d5094323.system.js","./p-dc91249a.system.js","./p-758bdb7e.system.js"],(function(e){"use strict";var r,t,i,o,n,a,s,c;return{setters:[function(e){r=e.r;t=e.h;i=e.H;o=e.g},function(e){n=e.t},function(e){a=e.o;s=e.s;c=e.r}],execute:function(){var l='@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0");:host{line-height:initial}.app-container{position:relative;width:100%;height:100%;font-family:"Roboto";color:var(--color-on-surface);overflow:hidden}.header-container,.large-view-header-container{background-color:var(--color-background);-webkit-box-shadow:var(--elevation-2);box-shadow:var(--elevation-2)}.header-container .header-top,.large-view-header-container .header-top{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:64px}.header-container .arrow-back-icon,.large-view-header-container .arrow-back-icon{cursor:pointer;-webkit-tap-highlight-color:transparent;color:var(--color-on-surface);border:none;background-color:var(--color-background);border-radius:50%;height:48px;width:48px;padding:12px}.header-container .arrow-back-icon:hover,.large-view-header-container .arrow-back-icon:hover{-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1)}.header-container .header-left-container,.large-view-header-container .header-left-container{margin-left:8px}.header-container .header-right-container,.large-view-header-container .header-right-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-right:8px}.header-container .header-right-container .margin-right-icon,.large-view-header-container .header-right-container .margin-right-icon{margin-right:8px}.header-container .attribution-container a,.large-view-header-container .attribution-container a{font-size:24px;font-weight:400;line-height:40px;color:var(--color-on-surface);text-decoration:none}.options-container{height:calc(100% - 64px);position:absolute;width:100%;z-index:1100;top:64px}.handle-filters-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:0px 16px;height:64px}.handle-filters-container .handle-filters-button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;-webkit-tap-highlight-color:transparent;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;background-color:var(--color-background);color:var(--color-on-surface);padding:12px 24px;border-radius:20px;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;gap:8px;white-space:nowrap;line-height:20px;letter-spacing:0.1000000015px;font-size:14px;font-weight:500;-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1);-webkit-transition:-webkit-box-shadow 0.2s ease-in-out 0s;transition:-webkit-box-shadow 0.2s ease-in-out 0s;transition:box-shadow 0.2s ease-in-out 0s;transition:box-shadow 0.2s ease-in-out 0s, -webkit-box-shadow 0.2s ease-in-out 0s}.handle-filters-container .handle-filters-button span{font-size:18px}.handle-filters-container .current-treks-within-bounds-length{margin-left:12px;color:var(--color-on-surface)}.filters-container{background-color:var(--color-background);position:absolute;width:100%;padding:16px 0px 32px 0px;z-index:1100}.back-filters-container{background-color:rgba(0, 0, 0, 0.5);width:100%;height:calc(100% - 64px);position:absolute;z-index:1099;top:64px}.divider{margin:16px;border-top:1px solid var(--color-outline)}.init-loader-container,.loader-container,.large-view-loader-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:100%;background-color:var(--color-background)}.init-loader-container .loader,.loader-container .loader,.large-view-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-container);border-bottom-color:var(--color-on-primary-container);border-radius:50%;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-animation:rotation 1s linear infinite;animation:rotation 1s linear infinite}@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.content-container{position:relative;display:-ms-flexbox;display:flex;height:calc(100% - 64px - 64px);background-color:var(--color-background)}.content-treks{height:calc(100% - 64px - 64px)}.content-trek{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%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.app-map-container,.large-view-app-map-container{width:100%;height:100%}.map-visibility-button-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;position:absolute;bottom:24px;z-index:4}.map-visibility-button-container .map-visibility-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;text-decoration:none;padding:16px;background-color:var(--color-primary-container);color:var(--color-on-primary-container);-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1);border-radius:12px;height:56px;font-size:16px;width:unset}.map-visibility-button-container .map-visibility-button:hover{-webkit-box-shadow:var(--elevation-4);box-shadow:var(--elevation-4)}.map-visibility-button-container .map-visibility-button span{margin-right:8px;color:var(--color-on-primary-container)}.init-loader-container,.loader-container{width:100%}.app-treks-list-container,.app-trek-detail-container{width:100%}.app-map-container{width:100%;position:absolute}.large-view-loader-container{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%}';var h=e("grw_app",function(){function e(e){r(this,e);this.largeViewSize=1024;this.handlePopStateBind=this.handlePopState.bind(this);this.showTrek=false;this.showTreksMap=false;this.showTrekMap=false;this.showFilters=false;this.isLargeView=false;this.currentTrekId=undefined;this.api=undefined;this.languages="fr";this.inBbox=undefined;this.cities=undefined;this.districts=undefined;this.structures=undefined;this.themes=undefined;this.portals=undefined;this.routes=undefined;this.practices=undefined;this.urlLayer=undefined;this.center=undefined;this.zoom=undefined;this.attribution=undefined;this.linkName="GEOTREK";this.linkTarget="https://geotrek.fr";this.weather=false;this.colorPrimaryApp="#6750a4";this.colorOnPrimary="#ffffff";this.colorSurface="#1c1b1f";this.colorOnSurface="#49454e";this.colorSurfaceVariant="#fef7ff";this.colorOnSurfaceVariant="#1c1b1f";this.colorPrimaryContainer="#eaddff";this.colorOnPrimaryContainer="#21005e";this.colorSecondaryContainer="#e8def8";this.colorOnSecondaryContainer="#1d192b";this.colorBackground="#fef7ff";this.colorSurfaceContainerHigh="#ece6f0";this.colorSurfaceContainerLow="#f7f2fa";this.fabBackgroundColor="#eaddff";this.fabColor="#21005d";this.colorTrekLine="#6b0030";this.colorDepartureIcon="#006b3b";this.colorArrivalIcon="#85003b";this.colorSensitiveArea="#4974a5";this.colorPoiIcon="#974c6e"}e.prototype.onTrekCardPress=function(e){this.currentTrekId=e.detail;this.showTrek=!this.showTrek;this.showTrekMap=false;var r=new URL(window.location.toString());r.searchParams.set("trek",this.currentTrekId.toString());window.history.pushState({},"",r)};e.prototype.onWindowResize=function(){this.handleView()};e.prototype.onCenterOnMap=function(){if(!this.isLargeView){this.showTrekMap=true}};e.prototype.watchPropHandler=function(){window.dispatchEvent(new window.Event("resize"))};e.prototype.componentWillLoad=function(){var e=new URL(window.location.toString());var r=e.searchParams.get("trek");if(r){window.history.replaceState({isInitialHistoryWithTrek:true},"",e);this.currentTrekId=Number(r);this.showTrek=!this.showTrek}};e.prototype.componentDidLoad=function(){var e=this;a("trekNetworkError",(function(){if(s.trekNetworkError){var r=new URL(window.location.toString());r.searchParams.delete("trek");window.history.replaceState({},"",r);e.onTrekDetailsClose()}}));window.addEventListener("popstate",this.handlePopStateBind,false);this.handleView()};e.prototype.onTrekDetailsClose=function(){s.currentTrek=null;this.currentTrekId=null;this.showTrek=!this.showTrek};e.prototype.handleView=function(){this.isLargeView=this.element.getBoundingClientRect().width>=this.largeViewSize;this.showTreksMap=this.isLargeView;this.showTrekMap=this.isLargeView};e.prototype.handleFilters=function(){this.showFilters=!this.showFilters};e.prototype.handleBackButton=function(){if(window.history.state&&window.history.state.isInitialHistoryWithTrek){this.onTrekDetailsClose();var e=new URL(window.location.toString());e.searchParams.delete("trek");window.history.pushState({},"",e)}else{window.history.back()}};e.prototype.handlePopState=function(){var e=new URL(window.location.toString());var r=Number(e.searchParams.get("trek"));if(r&&this.currentTrekId!==r){this.currentTrekId=r;this.showTrek=true}else if(!r){this.onTrekDetailsClose()}};e.prototype.handleShowMap=function(){if(this.currentTrekId){this.showTrekMap=!this.showTrekMap}else{this.showTreksMap=!this.showTreksMap}};e.prototype.disconnectedCallback=function(){c();window.removeEventListener("popstate",this.handlePopStateBind)};e.prototype.render=function(){var e=this;return t(i,{style:{"--color-primary-app":this.colorPrimaryApp,"--color-on-primary":this.colorOnPrimary,"--color-surface":this.colorSurface,"--color-on-surface":this.colorOnSurface,"--color-surface-variant":this.colorSurfaceVariant,"--color-on-surface-variant":this.colorOnSurfaceVariant,"--color-primary-container":this.colorPrimaryContainer,"--color-on-primary-container":this.colorOnPrimaryContainer,"--color-secondary-container":this.colorSecondaryContainer,"--color-on-secondary-container":this.colorOnSecondaryContainer,"--color-background":this.colorBackground,"--color-surface-container-high":this.colorSurfaceContainerHigh,"--color-surface-container-low":this.colorSurfaceContainerLow,"--fab-background-color":this.fabBackgroundColor,"--fab-color":this.fabColor}},!s.currentTreks&&!s.currentTrek&&t("div",{class:"init-loader-container"},t("span",{class:"loader"})),!this.showTrek&&!s.treks&&t("grw-treks-provider",{api:this.api,languages:this.languages,"in-bbox":this.inBbox,cities:this.cities,districts:this.districts,structures:this.structures,themes:this.themes,portals:this.portals,routes:this.routes,practices:this.practices}),this.showTrek&&this.currentTrekId&&!s.currentTrek&&t("grw-trek-provider",{api:this.api,languages:this.languages,"trek-id":this.currentTrekId}),(s.currentTreks||s.currentTrek)&&t("div",{class:"app-container"},t("div",{class:this.isLargeView?"large-view-header-container":"header-container"},t("div",{class:"header-top"},t("div",{class:"header-left-container"},this.showTrek?t("button",{onClick:function(){return e.handleBackButton()},class:"arrow-back-icon"},t("span",{class:"material-symbols-outlined"},"arrow_back")):t("div",{class:"attribution-container"},t("a",{target:"_blank",href:this.linkTarget},this.linkName))),t("div",{class:"header-right-container"},t("span",{class:"material-symbols-outlined margin-right-icon"},"translate"),s.languages.length>1&&t("grw-select-language",null))),!this.showTrek&&t("div",{class:"handle-filters-container"},s.treksWithinBounds&&t("div",{class:"current-treks-within-bounds-length"},"".concat(s.treksWithinBounds.length," ").concat(s.treksWithinBounds.length>1?n[s.language].treks:n[s.language].trek)),t("button",{onClick:function(){return e.handleFilters()},class:"handle-filters-button"},t("span",{class:"material-symbols-outlined margin-right-icon"},"filter_list"),n[s.language].filter))),t("div",{class:"content-container ".concat(this.showTrek?"content-trek":"content-treks")},t("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"}},t("grw-treks-list",{"reset-store-on-disconnected":"false","is-large-view":this.isLargeView,"color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-secondary-container":this.colorSecondaryContainer,"color-on-secondary-container":this.colorOnSecondaryContainer,"color-surface-container-low":this.colorSurfaceContainerLow})),this.showTrek&&!s.currentTrek&&t("div",{class:this.isLargeView?"large-view-loader-container":"loader-container"},t("span",{class:"loader"})),s.currentTrek&&t("div",{class:this.isLargeView?"large-view-app-trek-detail-container":"app-trek-detail-container"},t("grw-trek-detail",{"reset-store-on-disconnected":"false","color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-primary-container":this.colorPrimaryContainer,"color-on-primary-container":this.colorOnPrimaryContainer,"color-secondary-container":this.colorSecondaryContainer,"color-on-secondary-container":this.colorOnSecondaryContainer,"color-background":this.colorBackground,weather:this.weather,style:{zIndex:this.showTrekMap?"0":"1"},"is-large-view":this.isLargeView})),t("grw-map",{"reset-store-on-disconnected":"false",class:this.isLargeView?"large-view-app-map-container":"app-map-container",style:{visibility:this.showTreksMap&&!this.showTrek||this.showTrekMap&&this.showTrek||this.isLargeView?"visible":"hidden",zIndex:this.showTrekMap?"1":"0"},"url-layer":this.urlLayer,center:this.center,zoom:this.zoom,attribution:this.attribution,"color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-primary-container":this.colorPrimaryContainer,"color-on-primary-container":this.colorOnPrimaryContainer,"color-background":this.colorBackground,"color-trek-line":this.colorTrekLine,"color-departure-icon":this.colorDepartureIcon,"color-arrival-icon":this.colorArrivalIcon,"color-sensitive-area":this.colorSensitiveArea,"color-poi-icon":this.colorPoiIcon,"is-large-view":this.isLargeView})),(!this.showTrek||this.showTrek&&s.currentTrek)&&t("div",{class:"map-visibility-button-container"},t("button",{onClick:function(){return e.handleShowMap()},class:"map-visibility-button",style:{display:this.isLargeView?"none":"flex"}},t("span",{class:"material-symbols-outlined"},this.showTrek?this.showTrekMap?"summarize":"map":this.showTreksMap?"list":"map"),this.showTrek?this.showTrekMap?n[s.language].showDetails:n[s.language].showRoute:this.showTreksMap?n[s.language].showList:n[s.language].showMap))),!this.showTrek&&this.showFilters&&t("div",{class:"options-container"},t("div",{class:"filters-container"},t("grw-filter",{filterName:n[s.language].practice,filterType:"practices",filterNameProperty:"name"}),t("div",{class:"divider"}),t("grw-filter",{filterName:n[s.language].difficulty,filterType:"difficulties",filterNameProperty:"label"}),t("div",{class:"divider"}),t("grw-filter",{filterName:n[s.language].duration,filterType:"durations",filterNameProperty:"name"})),t("div",{onClick:function(){return e.handleFilters()},class:"back-filters-container"})))};Object.defineProperty(e.prototype,"element",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{isLargeView:["watchPropHandler"]}},enumerable:false,configurable:true});return e}());h.style=l}}}));
|
|
2
|
+
//# sourceMappingURL=p-e2660a2c.system.entry.js.map
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["grwAppCss","GrwApp","exports","this","largeViewSize","handlePopStateBind","handlePopState","bind","class_1","prototype","onTrekCardPress","event","currentTrekId","detail","showTrek","showTrekMap","url","URL","window","location","toString","searchParams","set","history","pushState","onWindowResize","handleView","onCenterOnMap","isLargeView","watchPropHandler","dispatchEvent","Event","componentWillLoad","trekParam","get","replaceState","isInitialHistoryWithTrek","Number","componentDidLoad","_this","onChange","state","trekNetworkError","urlRedirect","delete","onTrekDetailsClose","addEventListener","currentTrek","element","getBoundingClientRect","width","showTreksMap","handleFilters","showFilters","handleBackButton","back","handleShowMap","disconnectedCallback","reset","removeEventListener","render","h","Host","style","colorPrimaryApp","colorOnPrimary","colorSurface","colorOnSurface","colorSurfaceVariant","colorOnSurfaceVariant","colorPrimaryContainer","colorOnPrimaryContainer","colorSecondaryContainer","colorOnSecondaryContainer","colorBackground","colorSurfaceContainerHigh","colorSurfaceContainerLow","fabBackgroundColor","fabColor","currentTreks","class","treks","api","languages","inBbox","cities","districts","structures","themes","portals","routes","practices","onClick","target","href","linkTarget","linkName","length","treksWithinBounds","concat","translate","language","trek","filter","display","position","weather","zIndex","visibility","urlLayer","center","zoom","attribution","colorTrekLine","colorDepartureIcon","colorArrivalIcon","colorSensitiveArea","colorPoiIcon","showDetails","showRoute","showList","showMap","filterName","practice","filterType","filterNameProperty","difficulty","duration"],"sources":["src/components/grw-app/grw-app.scss?tag=grw-app","src/components/grw-app/grw-app.tsx"],"sourcesContent":["@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0');\n\n:host {\n line-height: initial;\n}\n\n.app-container {\n position: relative;\n width: 100%;\n height: 100%;\n font-family: 'Roboto';\n color: var(--color-on-surface);\n overflow: hidden;\n}\n\n.header-container,\n.large-view-header-container {\n background-color: var(--color-background);\n box-shadow: var(--elevation-2);\n .header-top {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n height: 64px;\n }\n .arrow-back-icon {\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n color: var(--color-on-surface);\n border: none;\n background-color: var(--color-background);\n border-radius: 50%;\n height: 48px;\n width: 48px;\n padding: 12px;\n &:hover {\n box-shadow: var(--elevation-1);\n }\n }\n .header-left-container {\n margin-left: 8px;\n }\n .header-right-container {\n display: flex;\n align-items: center;\n margin-right: 8px;\n .margin-right-icon {\n margin-right: 8px;\n }\n }\n .attribution-container {\n a {\n font-size: 24px;\n font-weight: 400;\n line-height: 40px;\n color: var(--color-on-surface);\n text-decoration: none;\n }\n }\n}\n\n.options-container {\n height: calc(100% - 64px);\n position: absolute;\n width: 100%;\n z-index: 1100;\n top: 64px;\n}\n\n.handle-filters-container {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 0px 16px;\n height: 64px;\n .handle-filters-button {\n user-select: none;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n border: none;\n background-color: var(--color-background);\n color: var(--color-on-surface);\n padding: 12px 24px;\n border-radius: 20px;\n box-sizing: border-box;\n position: relative;\n gap: 8px;\n white-space: nowrap;\n line-height: 20px;\n letter-spacing: 0.10000000149011612px;\n font-size: 14px;\n font-weight: 500;\n box-shadow: var(--elevation-1);\n transition: box-shadow 0.2s ease-in-out 0s;\n span {\n font-size: 18px;\n }\n }\n .current-treks-within-bounds-length {\n margin-left: 12px;\n color: var(--color-on-surface);\n }\n}\n\n.filters-container {\n background-color: var(--color-background);\n position: absolute;\n width: 100%;\n padding: 16px 0px 32px 0px;\n z-index: 1100;\n}\n\n.back-filters-container {\n background-color: rgba(0, 0, 0, 0.5);\n width: 100%;\n height: calc(100% - 64px);\n position: absolute;\n z-index: 1099;\n top: 64px;\n}\n\n.divider {\n margin: 16px;\n border-top: 1px solid var(--color-outline);\n}\n\n.init-loader-container,\n.loader-container,\n.large-view-loader-container {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n background-color: var(--color-background);\n .loader {\n width: 48px;\n height: 48px;\n border: 5px solid var(--color-primary-container);\n border-bottom-color: var(--color-on-primary-container);\n border-radius: 50%;\n display: inline-block;\n box-sizing: border-box;\n animation: rotation 1s linear infinite;\n }\n\n @keyframes rotation {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n}\n\n.content-container {\n position: relative;\n display: flex;\n height: calc(100% - 64px - 64px);\n background-color: var(--color-background);\n}\n\n.content-treks {\n height: calc(100% - 64px - 64px);\n}\n\n.content-trek {\n height: calc(100% - 64px);\n}\n\n.app-treks-list-container,\n.app-trek-detail-container,\n.large-view-app-treks-list-container,\n.large-view-app-trek-detail-container {\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n\n.app-map-container,\n.large-view-app-map-container {\n width: 100%;\n height: 100%;\n}\n\n.map-visibility-button-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n position: absolute;\n bottom: 24px;\n z-index: 4;\n .map-visibility-button {\n cursor: pointer;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n border: none;\n text-decoration: none;\n padding: 16px;\n background-color: var(--color-primary-container);\n color: var(--color-on-primary-container);\n box-shadow: var(--elevation-1);\n border-radius: 12px;\n height: 56px;\n font-size: 16px;\n width: unset;\n &:hover {\n box-shadow: var(--elevation-4);\n }\n span {\n margin-right: 8px;\n color: var(--color-on-primary-container);\n }\n }\n}\n\n.init-loader-container,\n.loader-container {\n width: 100%;\n}\n\n.app-treks-list-container,\n.app-trek-detail-container {\n width: 100%;\n}\n\n.app-map-container {\n width: 100%;\n position: absolute;\n}\n\n.large-view-loader-container {\n width: 50%;\n}\n\n.large-view-app-treks-list-container,\n.large-view-app-trek-detail-container {\n width: 50%;\n}\n\n.large-view-app-map-container {\n position: relative;\n width: 50%;\n}\n","import { Component, Host, h, Listen, State, Prop, Element, Watch } from '@stencil/core';\nimport { translate } from 'i18n/i18n';\nimport state, { onChange, reset } from 'store/store';\n\n@Component({\n tag: 'grw-app',\n styleUrls: ['grw-app.scss'],\n shadow: false,\n})\nexport class GrwApp {\n @Element() element: HTMLElement;\n @State() showTrek = false;\n @State() showTreksMap = false;\n @State() showTrekMap = false;\n @State() showFilters = false;\n @State() isLargeView = false;\n @State() currentTrekId: number;\n @Prop() api: string;\n @Prop() languages = 'fr';\n @Prop() inBbox: string;\n @Prop() cities: string;\n @Prop() districts: string;\n @Prop() structures: string;\n @Prop() themes: string;\n @Prop() portals: string;\n @Prop() routes: string;\n @Prop() practices: string;\n @Prop() urlLayer: string;\n @Prop() center: string;\n @Prop() zoom: number;\n @Prop() attribution: string;\n @Prop() linkName = 'GEOTREK';\n @Prop() linkTarget = 'https://geotrek.fr';\n @Prop() weather = false;\n\n @Prop() colorPrimaryApp = '#6750a4';\n @Prop() colorOnPrimary = '#ffffff';\n @Prop() colorSurface = '#1c1b1f';\n @Prop() colorOnSurface = '#49454e';\n @Prop() colorSurfaceVariant = '#fef7ff';\n @Prop() colorOnSurfaceVariant = '#1c1b1f';\n @Prop() colorPrimaryContainer = '#eaddff';\n @Prop() colorOnPrimaryContainer = '#21005e';\n @Prop() colorSecondaryContainer = '#e8def8';\n @Prop() colorOnSecondaryContainer = '#1d192b';\n @Prop() colorBackground = '#fef7ff';\n @Prop() colorSurfaceContainerHigh = '#ece6f0';\n @Prop() colorSurfaceContainerLow = '#f7f2fa';\n @Prop() fabBackgroundColor = '#eaddff';\n @Prop() fabColor = '#21005d';\n\n @Prop() colorTrekLine = '#6b0030';\n @Prop() colorDepartureIcon = '#006b3b';\n @Prop() colorArrivalIcon = '#85003b';\n @Prop() colorSensitiveArea = '#4974a5';\n @Prop() colorPoiIcon = '#974c6e';\n\n largeViewSize = 1024;\n handlePopStateBind: (event: any) => void = this.handlePopState.bind(this);\n\n @Listen('trekCardPress', { target: 'window' })\n onTrekCardPress(event: CustomEvent<number>) {\n this.currentTrekId = event.detail;\n this.showTrek = !this.showTrek;\n this.showTrekMap = false;\n const url = new URL(window.location.toString());\n url.searchParams.set('trek', this.currentTrekId.toString());\n window.history.pushState({}, '', url);\n }\n\n @Listen('resize', { target: 'window' })\n onWindowResize() {\n this.handleView();\n }\n\n @Listen('centerOnMap', { target: 'window' })\n onCenterOnMap() {\n if (!this.isLargeView) {\n this.showTrekMap = true;\n }\n }\n\n @Watch('isLargeView')\n watchPropHandler() {\n window.dispatchEvent(new window.Event('resize'));\n }\n\n componentWillLoad() {\n const url = new URL(window.location.toString());\n const trekParam = url.searchParams.get('trek');\n if (trekParam) {\n window.history.replaceState({ isInitialHistoryWithTrek: true }, '', url);\n this.currentTrekId = Number(trekParam);\n this.showTrek = !this.showTrek;\n }\n }\n\n componentDidLoad() {\n onChange('trekNetworkError', () => {\n if (state.trekNetworkError) {\n const urlRedirect = new URL(window.location.toString());\n urlRedirect.searchParams.delete('trek');\n window.history.replaceState({}, '', urlRedirect);\n this.onTrekDetailsClose();\n }\n });\n window.addEventListener('popstate', this.handlePopStateBind, false);\n this.handleView();\n }\n\n onTrekDetailsClose() {\n state.currentTrek = null;\n this.currentTrekId = null;\n this.showTrek = !this.showTrek;\n }\n\n handleView() {\n this.isLargeView = this.element.getBoundingClientRect().width >= this.largeViewSize;\n this.showTreksMap = this.isLargeView;\n this.showTrekMap = this.isLargeView;\n }\n\n handleFilters() {\n this.showFilters = !this.showFilters;\n }\n\n handleBackButton() {\n if (window.history.state && window.history.state.isInitialHistoryWithTrek) {\n this.onTrekDetailsClose();\n const url = new URL(window.location.toString());\n url.searchParams.delete('trek');\n window.history.pushState({}, '', url);\n } else {\n window.history.back();\n }\n }\n\n handlePopState() {\n const url = new URL(window.location.toString());\n const trekParam = Number(url.searchParams.get('trek'));\n if (trekParam && this.currentTrekId !== trekParam) {\n this.currentTrekId = trekParam;\n this.showTrek = true;\n } else if (!trekParam) {\n this.onTrekDetailsClose();\n }\n }\n\n handleShowMap() {\n if (this.currentTrekId) {\n this.showTrekMap = !this.showTrekMap;\n } else {\n this.showTreksMap = !this.showTreksMap;\n }\n }\n\n disconnectedCallback() {\n reset();\n window.removeEventListener('popstate', this.handlePopStateBind);\n }\n\n render() {\n return (\n <Host\n style={{\n '--color-primary-app': this.colorPrimaryApp,\n '--color-on-primary': this.colorOnPrimary,\n '--color-surface': this.colorSurface,\n '--color-on-surface': this.colorOnSurface,\n '--color-surface-variant': this.colorSurfaceVariant,\n '--color-on-surface-variant': this.colorOnSurfaceVariant,\n '--color-primary-container': this.colorPrimaryContainer,\n '--color-on-primary-container': this.colorOnPrimaryContainer,\n '--color-secondary-container': this.colorSecondaryContainer,\n '--color-on-secondary-container': this.colorOnSecondaryContainer,\n '--color-background': this.colorBackground,\n '--color-surface-container-high': this.colorSurfaceContainerHigh,\n '--color-surface-container-low': this.colorSurfaceContainerLow,\n '--fab-background-color': this.fabBackgroundColor,\n '--fab-color': this.fabColor,\n }}\n >\n {!state.currentTreks && !state.currentTrek && (\n <div class=\"init-loader-container\">\n <span class=\"loader\"></span>\n </div>\n )}\n {!this.showTrek && !state.treks && (\n <grw-treks-provider\n api={this.api}\n languages={this.languages}\n in-bbox={this.inBbox}\n cities={this.cities}\n districts={this.districts}\n structures={this.structures}\n themes={this.themes}\n portals={this.portals}\n routes={this.routes}\n practices={this.practices}\n ></grw-treks-provider>\n )}\n {this.showTrek && this.currentTrekId && !state.currentTrek && (\n <grw-trek-provider api={this.api} languages={this.languages} trek-id={this.currentTrekId}></grw-trek-provider>\n )}\n {(state.currentTreks || state.currentTrek) && (\n <div class=\"app-container\">\n <div class={this.isLargeView ? 'large-view-header-container' : 'header-container'}>\n <div class=\"header-top\">\n <div class=\"header-left-container\">\n {this.showTrek ? (\n <button onClick={() => this.handleBackButton()} class=\"arrow-back-icon\">\n <span class=\"material-symbols-outlined\">arrow_back</span>\n </button>\n ) : (\n <div class=\"attribution-container\">\n <a target=\"_blank\" href={this.linkTarget}>\n {this.linkName}\n </a>\n </div>\n )}\n </div>\n <div class=\"header-right-container\">\n <span class=\"material-symbols-outlined margin-right-icon\">translate</span>\n {state.languages.length > 1 && <grw-select-language></grw-select-language>}\n </div>\n </div>\n {!this.showTrek && (\n <div class=\"handle-filters-container\">\n {state.treksWithinBounds && (\n <div class=\"current-treks-within-bounds-length\">{`${state.treksWithinBounds.length} ${\n state.treksWithinBounds.length > 1 ? translate[state.language].treks : translate[state.language].trek\n }`}</div>\n )}\n <button onClick={() => this.handleFilters()} class=\"handle-filters-button\">\n <span class=\"material-symbols-outlined margin-right-icon\">filter_list</span>\n {translate[state.language].filter}\n </button>\n </div>\n )}\n </div>\n\n <div class={`content-container ${this.showTrek ? 'content-trek' : 'content-treks'}`}>\n <div\n class={this.isLargeView ? 'large-view-app-treks-list-container' : 'app-treks-list-container'}\n style={{ display: this.showTrek ? 'none' : 'flex', position: this.showTrek ? 'absolute' : 'relative' }}\n >\n <grw-treks-list\n reset-store-on-disconnected=\"false\"\n is-large-view={this.isLargeView}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-surface-container-low={this.colorSurfaceContainerLow}\n ></grw-treks-list>\n </div>\n {this.showTrek && !state.currentTrek && (\n <div class={this.isLargeView ? 'large-view-loader-container' : 'loader-container'}>\n <span class=\"loader\"></span>\n </div>\n )}\n {state.currentTrek && (\n <div class={this.isLargeView ? 'large-view-app-trek-detail-container' : 'app-trek-detail-container'}>\n <grw-trek-detail\n reset-store-on-disconnected=\"false\"\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-primary-container={this.colorPrimaryContainer}\n color-on-primary-container={this.colorOnPrimaryContainer}\n color-secondary-container={this.colorSecondaryContainer}\n color-on-secondary-container={this.colorOnSecondaryContainer}\n color-background={this.colorBackground}\n weather={this.weather}\n style={{ zIndex: this.showTrekMap ? '0' : '1' }}\n is-large-view={this.isLargeView}\n ></grw-trek-detail>\n </div>\n )}\n <grw-map\n reset-store-on-disconnected=\"false\"\n class={this.isLargeView ? 'large-view-app-map-container' : 'app-map-container'}\n style={{\n visibility: (this.showTreksMap && !this.showTrek) || (this.showTrekMap && this.showTrek) || this.isLargeView ? 'visible' : 'hidden',\n zIndex: this.showTrekMap ? '1' : '0',\n }}\n url-layer={this.urlLayer}\n center={this.center}\n zoom={this.zoom}\n attribution={this.attribution}\n color-primary-app={this.colorPrimaryApp}\n color-on-surface={this.colorOnSurface}\n color-primary-container={this.colorPrimaryContainer}\n color-on-primary-container={this.colorOnPrimaryContainer}\n color-background={this.colorBackground}\n color-trek-line={this.colorTrekLine}\n color-departure-icon={this.colorDepartureIcon}\n color-arrival-icon={this.colorArrivalIcon}\n color-sensitive-area={this.colorSensitiveArea}\n color-poi-icon={this.colorPoiIcon}\n is-large-view={this.isLargeView}\n ></grw-map>\n </div>\n {(!this.showTrek || (this.showTrek && state.currentTrek)) && (\n <div class=\"map-visibility-button-container\">\n <button onClick={() => this.handleShowMap()} class=\"map-visibility-button\" style={{ display: this.isLargeView ? 'none' : 'flex' }}>\n <span class=\"material-symbols-outlined\">{this.showTrek ? (this.showTrekMap ? 'summarize' : 'map') : this.showTreksMap ? 'list' : 'map'}</span>\n {this.showTrek\n ? this.showTrekMap\n ? translate[state.language].showDetails\n : translate[state.language].showRoute\n : this.showTreksMap\n ? translate[state.language].showList\n : translate[state.language].showMap}\n </button>\n </div>\n )}\n </div>\n )}\n {!this.showTrek && this.showFilters && (\n <div class=\"options-container\">\n <div class=\"filters-container\">\n <grw-filter filterName={translate[state.language].practice} filterType=\"practices\" filterNameProperty=\"name\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].difficulty} filterType=\"difficulties\" filterNameProperty=\"label\"></grw-filter>\n <div class=\"divider\"></div>\n <grw-filter filterName={translate[state.language].duration} filterType=\"durations\" filterNameProperty=\"name\"></grw-filter>\n </div>\n <div onClick={() => this.handleFilters()} class=\"back-filters-container\"></div>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"mappings":"sQAAA,IAAMA,EAAY,ypM,ICSLC,EAAMC,EAAA,qB,wBAgDjBC,KAAAC,cAAgB,KAChBD,KAAAE,mBAA2CF,KAAKG,eAAeC,KAAKJ,M,cA/ChD,M,kBACI,M,iBACD,M,iBACA,M,iBACA,M,+DAGH,K,sSAaD,U,gBACE,qB,aACH,M,qBAEQ,U,oBACD,U,kBACF,U,oBACE,U,yBACK,U,2BACE,U,2BACA,U,6BACE,U,6BACA,U,+BACE,U,qBACV,U,+BACU,U,8BACD,U,wBACN,U,cACV,U,mBAEK,U,wBACK,U,sBACF,U,wBACE,U,kBACN,S,CAMvBK,EAAAC,UAAAC,gBAAA,SAAgBC,GACdR,KAAKS,cAAgBD,EAAME,OAC3BV,KAAKW,UAAYX,KAAKW,SACtBX,KAAKY,YAAc,MACnB,IAAMC,EAAM,IAAIC,IAAIC,OAAOC,SAASC,YACpCJ,EAAIK,aAAaC,IAAI,OAAQnB,KAAKS,cAAcQ,YAChDF,OAAOK,QAAQC,UAAU,GAAI,GAAIR,E,EAInCR,EAAAC,UAAAgB,eAAA,WACEtB,KAAKuB,Y,EAIPlB,EAAAC,UAAAkB,cAAA,WACE,IAAKxB,KAAKyB,YAAa,CACrBzB,KAAKY,YAAc,I,GAKvBP,EAAAC,UAAAoB,iBAAA,WACEX,OAAOY,cAAc,IAAIZ,OAAOa,MAAM,U,EAGxCvB,EAAAC,UAAAuB,kBAAA,WACE,IA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AKkH,aAAY,gBAClBlH,KAAKyB,iBAGrBzB,KAAKW,UAAaX,KAAKW,UAAY2B,EAAMM,cAC1Cc,EAAA,OAAKmB,MAAM,mCACTnB,EAAA,UAAQ+B,QAAS,WAAM,OAAArD,EAAKiB,eAAL,EAAsBwB,MAAM,wBAAwBjB,MAAO,CAAEyC,QAASrG,KAAKyB,YAAc,OAAS,SACvHiC,EAAA,QAAMmB,MAAM,6BAA6B7E,KAAKW,SAAYX,KAAKY,YAAc,YAAc,MAASZ,KAAKgD,aAAe,OAAS,OAChIhD,KAAKW,SACFX,KAAKY,YACHqF,EAAU3D,EAAM4D,UAAUiB,YAC1BlB,EAAU3D,EAAM4D,UAAUkB,UAC5BpH,KAAKgD,aACLiD,EAAU3D,EAAM4D,UAAUmB,SAC1BpB,EAAU3D,EAAM4D,UAAUoB,YAMtCtH,KAAKW,UAAYX,KAAKkD,aACtBQ,EAAA,OAAKmB,MAAM,qBACTnB,EAAA,OAAKmB,MAAM,qBACTnB,EAAA,cAAY6D,WAAYtB,EAAU3D,EAAM4D,UAAUsB,SAAUC,WAAW,YAAYC,mBAAmB,SACtGhE,EAAA,OAAKmB,MAAM,YACXnB,EAAA,cAAY6D,WAAYtB,EAAU3D,EAAM4D,UAAUyB,WAAYF,WAAW,eAAeC,mBAAmB,UAC3GhE,EAAA,OAAKmB,MAAM,YACXnB,EAAA,cAAY6D,WAAYtB,EAAU3D,EAAM4D,UAAU0B,SAAUH,WAAW,YAAYC,mBAAmB,UAExGhE,EAAA,OAAK+B,QAAS,WAAM,OAAArD,EAAKa,eAAL,EAAsB4B,MAAM,4B,8PA9TzC,I"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["./p-d5094323.system.js","./p-758bdb7e.system.js","./p-7459199d.system.js"],(function(e){"use strict";var r,t,i,n,a,c,o,s,l,d;return{setters:[function(e){r=e.r;t=e.e;i=e.h;n=e.H},function(e){a=e.s;c=e.o;o=e.r},function(e){s=e.f;l=e.a;d=e.b}],execute:function(){var u='@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0");.trek-card-container,.trek-card-large-view-container{cursor:pointer;font-family:"Roboto";border-radius:12px;-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1);background-color:var(--color-surface-container-low)}.trek-card-container .image,.trek-card-large-view-container .image{-o-object-fit:cover;object-fit:cover;border-top-left-radius:12px;border-top-right-radius:12px}.trek-card-container .sub-container,.trek-card-large-view-container .sub-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;padding:8px 16px}.trek-card-container .sub-container .name,.trek-card-large-view-container .sub-container .name{color:var(--color-on-surface);font-size:22px;line-height:28px;font-weight:400;margin-bottom:8px}.trek-card-container .sub-container .departure,.trek-card-large-view-container .sub-container .departure{color:var(--color-on-surface);font-size:16px;line-height:24px;font-weight:500;margin-bottom:4px}.trek-card-container .sub-container .themes-container,.trek-card-large-view-container .sub-container .themes-container{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}.trek-card-container .sub-container .themes-container .theme,.trek-card-large-view-container .sub-container .themes-container .theme{background-color:var(--color-secondary-container);color:var(--color-on-secondary-container);border-radius:8px;padding:8px 16px;margin:0px 8px 8px 0px;-webkit-box-shadow:var(--elevation-0);box-shadow:var(--elevation-0);border:1px solid var(--color-outline);height:32px;gap:8px;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:start;vertical-align:middle;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;position:relative}.trek-card-container .sub-container .icons-labels-container,.trek-card-large-view-container .sub-container .icons-labels-container{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;color:var(--color-on-surface);font-size:14px;line-height:20px;font-weight:500}.trek-card-container .sub-container .icons-labels-container .row,.trek-card-large-view-container .sub-container .icons-labels-container .row{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.trek-card-container .sub-container .icons-labels-container .row:not(:last-child),.trek-card-large-view-container .sub-container .icons-labels-container .row:not(:last-child){margin-bottom:12px}.trek-card-container .sub-container .icons-labels-container .row .icon-label,.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:50%}.trek-card-container .sub-container .icons-labels-container .row .icon-label:nth-child(2),.trek-card-large-view-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 span,.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label img,.trek-card-large-view-container .sub-container .icons-labels-container .row .icon-label span{width:24px;height:auto;margin-right:8px}.trek-card-container .sub-container .icons-labels-container .row .practice img,.trek-card-large-view-container .sub-container .icons-labels-container .row .practice img{background-color:var(--color-primary-app)}.trek-card-container{width:350px}.trek-card-container .image{width:100%;max-height:200px}.trek-card-large-view-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.trek-card-large-view-container .image{width:250px}';var f=e("grw_trek_card",function(){function e(e){r(this,e);this.trekCardPress=t(this,"trekCardPress",7);this.currentTrek=undefined;this.difficulty=undefined;this.route=undefined;this.practice=undefined;this.themes=undefined;this.departureCity=undefined;this.trek=undefined;this.colorPrimaryApp="#6b0030";this.colorOnSurface="#49454e";this.colorSecondaryContainer="#e8def8";this.colorOnSecondaryContainer="#1d192b";this.colorSurfaceContainerLow="#f7f2fa";this.isLargeView=false;this.resetStoreOnDisconnected=true}e.prototype.connectedCallback=function(){var e=this;this.currentTrek=this.trek?this.trek:a.currentTrek;if(this.currentTrek){this.difficulty=a.difficulties.find((function(r){return r.id===e.currentTrek.difficulty}));this.route=a.routes.find((function(r){return r.id===e.currentTrek.route}));this.practice=a.practices.find((function(r){return r.id===e.currentTrek.practice}));this.themes=a.themes.filter((function(r){return e.currentTrek.themes.includes(r.id)}));this.departureCity=a.cities.find((function(r){return r.id===e.currentTrek.departure_city}))}c("currentTrek",(function(){e.currentTrek=e.trek?e.trek:a.currentTrek;if(e.currentTrek){e.difficulty=a.difficulties.find((function(r){return r.id===e.currentTrek.difficulty}));e.route=a.routes.find((function(r){return r.id===e.currentTrek.route}));e.practice=a.practices.find((function(r){return r.id===e.currentTrek.practice}));e.themes=a.themes.filter((function(r){return e.currentTrek.themes.includes(r.id)}));e.departureCity=a.cities.find((function(r){return r.id===e.currentTrek.departure_city}))}}))};e.prototype.disconnectedCallback=function(){if(this.resetStoreOnDisconnected){o()}};e.prototype.render=function(){var e=this;var r,t,a,c,o,u,f;return i(n,{style:{width:this.isLargeView?"100%":"auto","--color-primary-app":this.colorPrimaryApp,"--color-on-surface":this.colorOnSurface,"--color-secondary-container":this.colorSecondaryContainer,"--color-on-secondary-container":this.colorOnSecondaryContainer,"--color-surface-container-low":this.colorSurfaceContainerLow}},this.currentTrek&&i("div",{class:this.isLargeView?"trek-card-large-view-container":"trek-card-container",onClick:function(){return e.trekCardPress.emit(e.currentTrek.id)}},this.currentTrek.attachments.filter((function(e){return e.type==="image"})).length>0&&i("img",{class:"image",src:"".concat(this.currentTrek.attachments.filter((function(e){return e.type==="image"}))[0].thumbnail),loading:"lazy"}),i("div",{class:"sub-container"},this.departureCity&&i("div",{class:"departure"},this.departureCity.name),i("div",{class:"name"},(r=this.currentTrek)===null||r===void 0?void 0:r.name),i("div",{class:"themes-container"},this.themes.map((function(e){return i("div",{class:"theme"},e.label)}))),i("div",{class:"icons-labels-container"},i("div",{class:"row"},i("div",{class:"icon-label difficulty"},((t=this.difficulty)===null||t===void 0?void 0:t.pictogram)&&i("img",{src:this.difficulty.pictogram}),(a=this.difficulty)===null||a===void 0?void 0:a.label),i("div",{class:"icon-label duration"},i("span",{class:"material-symbols-outlined"},"timelapse"),s(this.currentTrek.duration))),i("div",{class:"row"},i("div",{class:"icon-label length"},i("span",{class:"material-symbols-outlined"},"open_in_full"),l(this.currentTrek.length_2d)),i("div",{class:"icon-label ascent"},i("span",{class:"material-symbols-outlined"},"moving"),d(this.currentTrek.ascent))),i("div",{class:"row"},i("div",{class:"icon-label route"},((c=this.route)===null||c===void 0?void 0:c.pictogram)&&i("img",{src:this.route.pictogram}),(o=this.route)===null||o===void 0?void 0:o.route),i("div",{class:"icon-label practice"},((u=this.practice)===null||u===void 0?void 0:u.pictogram)&&i("img",{src:this.practice.pictogram}),(f=this.practice)===null||f===void 0?void 0:f.name))))))};return e}());f.style=u}}}));
|
|
2
|
+
//# sourceMappingURL=p-ebbb300d.system.entry.js.map
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["grwTrekCardCss","GrwTrekCard","exports","class_1","prototype","connectedCallback","_this","this","currentTrek","trek","state","difficulty","difficulties","find","id","route","routes","practice","practices","themes","filter","theme","includes","departureCity","cities","city","departure_city","onChange","disconnectedCallback","resetStoreOnDisconnected","reset","render","h","Host","style","width","isLargeView","colorPrimaryApp","colorOnSurface","colorSecondaryContainer","colorOnSecondaryContainer","colorSurfaceContainerLow","class","onClick","trekCardPress","emit","attachments","attachment","type","length","src","concat","thumbnail","loading","name","_a","map","label","_b","pictogram","_c","formatDuration","duration","formatLength","length_2d","formatAscent","ascent","_d","_e","_f","_g"],"sources":["src/components/grw-trek-card/grw-trek-card.scss?tag=grw-trek-card&encapsulation=shadow","src/components/grw-trek-card/grw-trek-card.tsx"],"sourcesContent":["@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0');\n\n.trek-card-container,\n.trek-card-large-view-container {\n cursor: pointer;\n font-family: 'Roboto';\n border-radius: 12px;\n box-shadow: var(--elevation-1);\n background-color: var(--color-surface-container-low);\n .image {\n object-fit: cover;\n border-top-left-radius: 12px;\n border-top-right-radius: 12px;\n }\n .sub-container {\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: 8px 16px;\n .name {\n color: var(--color-on-surface);\n font-size: 22px;\n line-height: 28px;\n font-weight: 400;\n margin-bottom: 8px;\n }\n .departure {\n color: var(--color-on-surface);\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n margin-bottom: 4px;\n }\n .themes-container {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n flex-wrap: wrap;\n .theme {\n background-color: var(--color-secondary-container);\n color: var(--color-on-secondary-container);\n border-radius: 8px;\n padding: 8px 16px;\n margin: 0px 8px 8px 0px;\n box-shadow: var(--elevation-0);\n border: 1px solid var(--color-outline);\n height: 32px;\n gap: 8px;\n box-sizing: border-box;\n text-align: start;\n vertical-align: middle;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n position: relative;\n }\n }\n .icons-labels-container {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n flex-wrap: wrap;\n color: var(--color-on-surface);\n font-size: 14px;\n line-height: 20px;\n font-weight: 500;\n .row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n &:not(:last-child) {\n margin-bottom: 12px;\n }\n .icon-label {\n &:nth-child(2) {\n margin: 0px 4px;\n }\n display: flex;\n align-items: center;\n width: 50%;\n img,\n span {\n width: 24px;\n height: auto;\n margin-right: 8px;\n }\n }\n .practice {\n img {\n background-color: var(--color-primary-app);\n }\n }\n }\n }\n }\n}\n\n.trek-card-container {\n width: 350px;\n .image {\n width: 100%;\n max-height: 200px;\n }\n}\n\n.trek-card-large-view-container {\n display: flex;\n flex-direction: row;\n .image {\n width: 250px;\n }\n}\n","import { Component, Host, h, Prop, Event, EventEmitter, State } from '@stencil/core';\nimport state, { onChange, reset } from 'store/store';\nimport { City, Difficulty, Practice, Route, Themes, Trek } from 'types/types';\nimport { formatDuration, formatLength, formatAscent } from 'utils/utils';\n\n@Component({\n tag: 'grw-trek-card',\n styleUrl: 'grw-trek-card.scss',\n shadow: true,\n})\nexport class GrwTrekCard {\n @Event() trekCardPress: EventEmitter<number>;\n @State() currentTrek: Trek;\n @State() difficulty: Difficulty;\n @State() route: Route;\n @State() practice: Practice;\n @State() themes: Themes;\n @State() departureCity: City;\n @Prop() trek: Trek;\n @Prop() colorPrimaryApp = '#6b0030';\n @Prop() colorOnSurface = '#49454e';\n @Prop() colorSecondaryContainer = '#e8def8';\n @Prop() colorOnSecondaryContainer = '#1d192b';\n @Prop() colorSurfaceContainerLow = '#f7f2fa';\n @Prop() isLargeView = false;\n @Prop() resetStoreOnDisconnected = true;\n\n connectedCallback() {\n this.currentTrek = this.trek ? this.trek : state.currentTrek;\n if (this.currentTrek) {\n this.difficulty = state.difficulties.find(difficulty => difficulty.id === this.currentTrek.difficulty);\n this.route = state.routes.find(route => route.id === this.currentTrek.route);\n this.practice = state.practices.find(practice => practice.id === this.currentTrek.practice);\n this.themes = state.themes.filter(theme => this.currentTrek.themes.includes(theme.id));\n this.departureCity = state.cities.find(city => city.id === this.currentTrek.departure_city);\n }\n onChange('currentTrek', () => {\n this.currentTrek = this.trek ? this.trek : state.currentTrek;\n if (this.currentTrek) {\n this.difficulty = state.difficulties.find(difficulty => difficulty.id === this.currentTrek.difficulty);\n this.route = state.routes.find(route => route.id === this.currentTrek.route);\n this.practice = state.practices.find(practice => practice.id === this.currentTrek.practice);\n this.themes = state.themes.filter(theme => this.currentTrek.themes.includes(theme.id));\n this.departureCity = state.cities.find(city => city.id === this.currentTrek.departure_city);\n }\n });\n }\n\n disconnectedCallback() {\n if (this.resetStoreOnDisconnected) {\n reset();\n }\n }\n\n render() {\n return (\n <Host\n style={{\n 'width': this.isLargeView ? '100%' : 'auto',\n '--color-primary-app': this.colorPrimaryApp,\n '--color-on-surface': this.colorOnSurface,\n '--color-secondary-container': this.colorSecondaryContainer,\n '--color-on-secondary-container': this.colorOnSecondaryContainer,\n '--color-surface-container-low': this.colorSurfaceContainerLow,\n }}\n >\n {this.currentTrek && (\n <div class={this.isLargeView ? 'trek-card-large-view-container' : 'trek-card-container'} onClick={() => this.trekCardPress.emit(this.currentTrek.id)}>\n {this.currentTrek.attachments.filter(attachment => attachment.type === 'image').length > 0 && (\n <img class=\"image\" src={`${this.currentTrek.attachments.filter(attachment => attachment.type === 'image')[0].thumbnail}`} loading=\"lazy\" />\n )}\n <div class=\"sub-container\">\n {this.departureCity && <div class=\"departure\">{this.departureCity.name}</div>}\n <div class=\"name\">{this.currentTrek?.name}</div>\n <div class=\"themes-container\">\n {this.themes.map(theme => (\n <div class=\"theme\">{theme.label}</div>\n ))}\n </div>\n <div class=\"icons-labels-container\">\n <div class=\"row\">\n <div class=\"icon-label difficulty\">\n {this.difficulty?.pictogram && <img src={this.difficulty.pictogram} />}\n {this.difficulty?.label}\n </div>\n <div class=\"icon-label duration\">\n <span class=\"material-symbols-outlined\">timelapse</span>\n {formatDuration(this.currentTrek.duration)}\n </div>\n </div>\n <div class=\"row\">\n <div class=\"icon-label length\">\n <span class=\"material-symbols-outlined\">open_in_full</span>\n {formatLength(this.currentTrek.length_2d)}\n </div>\n <div class=\"icon-label ascent\">\n <span class=\"material-symbols-outlined\">moving</span>\n {formatAscent(this.currentTrek.ascent)}\n </div>\n </div>\n <div class=\"row\">\n <div class=\"icon-label route\">\n {this.route?.pictogram && <img src={this.route.pictogram} />}\n {this.route?.route}\n </div>\n <div class=\"icon-label practice\">\n {this.practice?.pictogram && <img src={this.practice.pictogram} />}\n {this.practice?.name}\n </div>\n </div>\n </div>\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"mappings":"sRAAA,IAAMA,EAAiB,mnI,ICUVC,EAAWC,EAAA,2B,mQASI,U,oBACD,U,6BACS,U,+BACE,U,8BACD,U,iBACb,M,8BACa,I,CAEnCC,EAAAC,UAAAC,kBAAA,eAAAC,EAAAC,KACEA,KAAKC,YAAcD,KAAKE,KAAOF,KAAKE,KAAOC,EAAM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