@geotrekce/geotrek-rando-widget 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/cjs/grw-app.cjs.entry.js +26 -8
  2. package/dist/cjs/grw-filter_6.cjs.entry.js +40 -14
  3. package/dist/cjs/grw-information-desk-detail_3.cjs.entry.js +2 -2
  4. package/dist/cjs/grw-trek-card.cjs.entry.js +1 -1
  5. package/dist/cjs/{store-972b8d2a.js → store-fd04a216.js} +2 -0
  6. package/dist/collection/components/grw-app/grw-app.js +25 -7
  7. package/dist/collection/components/grw-map/grw-map.js +20 -8
  8. package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.css +1 -0
  9. package/dist/collection/components/grw-trek-detail/grw-trek-detail.css +6 -0
  10. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +10 -2
  11. package/dist/collection/components/grw-treks-list/grw-treks-list.js +8 -3
  12. package/dist/collection/store/grw-treks-provider.js +1 -0
  13. package/dist/collection/store/store.js +2 -0
  14. package/dist/components/grw-app.js +25 -7
  15. package/dist/components/grw-map2.js +20 -8
  16. package/dist/components/grw-sensitive-area-detail2.js +1 -1
  17. package/dist/components/grw-trek-detail2.js +10 -2
  18. package/dist/components/grw-treks-list2.js +8 -3
  19. package/dist/components/grw-treks-provider2.js +1 -0
  20. package/dist/components/store.js +2 -0
  21. package/dist/esm/grw-app.entry.js +26 -8
  22. package/dist/esm/grw-filter_6.entry.js +40 -14
  23. package/dist/esm/grw-information-desk-detail_3.entry.js +2 -2
  24. package/dist/esm/grw-trek-card.entry.js +1 -1
  25. package/dist/esm/{store-5a42b5d8.js → store-b2c76c0c.js} +2 -0
  26. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
  27. package/dist/geotrek-rando-widget/{p-2d9ae918.entry.js → p-1b2ba86d.entry.js} +1 -1
  28. package/dist/geotrek-rando-widget/p-5f17d340.entry.js +1 -0
  29. package/dist/geotrek-rando-widget/{p-206a52d9.entry.js → p-6716c635.entry.js} +1 -1
  30. package/dist/geotrek-rando-widget/{p-d3aa9819.entry.js → p-7715153d.entry.js} +1 -1
  31. package/dist/geotrek-rando-widget/p-e6710c64.js +1 -0
  32. package/dist/types/components/grw-app/grw-app.d.ts +1 -1
  33. package/dist/types/components/grw-map/grw-map.d.ts +2 -1
  34. package/dist/types/store/store.d.ts +5 -0
  35. package/package.json +1 -1
  36. package/dist/geotrek-rando-widget/p-8cfa03c0.entry.js +0 -1
  37. package/dist/geotrek-rando-widget/p-e63213a9.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-192d910f.js';
2
- import { s as state, o as onChange } from './store-5a42b5d8.js';
2
+ import { s as state, o as onChange } from './store-b2c76c0c.js';
3
3
  import { d as durationImage, f as formatDuration, l as lengthImage, a as formatLength, b as ascentImage, c as formatAscent } from './length-d82189db.js';
4
4
 
5
5
  const grwTrekCardCss = ".trek-card-container,.trek-card-large-view-container{font-family:\"Roboto\";border-radius:8px;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25);cursor:pointer}.trek-card-container .image,.trek-card-large-view-container .image{object-fit:cover}.trek-card-container .sub-container,.trek-card-large-view-container .sub-container{display:flex;flex-direction:column;justify-content:center;padding:12px}.trek-card-container .sub-container .name,.trek-card-large-view-container .sub-container .name{color:var(--color-primary);font-size:24px;font-weight:bold;margin-bottom:8px}.trek-card-container .sub-container .departure,.trek-card-large-view-container .sub-container .departure{color:rgba(0, 0, 0, 0.7);font-size:16px;margin:4px 0px}.trek-card-container .sub-container .themes-container,.trek-card-large-view-container .sub-container .themes-container{display:flex;justify-content:flex-start;align-items:center;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-primary-tint);color:#ffffff;border-radius:8px;padding:8px;margin:0px 8px 8px 0px}.trek-card-container .sub-container .icons-labels-container,.trek-card-large-view-container .sub-container .icons-labels-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.trek-card-container .sub-container .icons-labels-container .row,.trek-card-large-view-container .sub-container .icons-labels-container .row{display:flex;justify-content:space-between;align-items:center;width:100%}.trek-card-container .sub-container .icons-labels-container .row:not(:last-child),.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:flex;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 .svg-icon svg,.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 .svg-icon svg{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)}.trek-card-container{width:350px;height:auto}.trek-card-container .image{width:100%}.trek-card-large-view-container{height:auto;display:flex;flex-direction:row}.trek-card-large-view-container .image{width:250px}";
@@ -188,6 +188,8 @@ const { state, onChange } = createStore({
188
188
  api: '',
189
189
  treks: [],
190
190
  currentTreks: [],
191
+ treksWithinBounds: [],
192
+ currentMapTreksBounds: null,
191
193
  difficulties: [],
192
194
  routes: [],
193
195
  practices: [],
@@ -1 +1 @@
1
- import{p as r,b as e}from"./p-6dce5e6c.js";(()=>{const e=import.meta.url,o={};return""!==e&&(o.resourcesUrl=new URL(".",e).href),r(o)})().then((r=>e([["p-2d9ae918",[[1,"grw-trek-card",{trek:[16],colorPrimary:[1,"color-primary"],colorPrimaryTint:[1,"color-primary-tint"],isLargeView:[4,"is-large-view"],currentTrek:[32],difficulty:[32],route:[32],practice:[32],themes:[32]}]]],["p-d3aa9819",[[1,"grw-information-desk-detail",{informationDesk:[16]}],[1,"grw-poi-detail",{poi:[16]}],[1,"grw-sensitive-area-detail",{sensitiveArea:[16]}]]],["p-206a52d9",[[1,"grw-trek-detail",{trek:[16],colorPrimary:[1,"color-primary"],colorPrimaryShade:[1,"color-primary-shade"],colorPrimaryTint:[1,"color-primary-tint"],difficulty:[32],route:[32],practice:[32],themes:[32],labels:[32],sources:[32],accessibilities:[32],accessibilityLevel:[32],currentTrek:[32]}],[1,"grw-treks-list",{colorPrimary:[1,"color-primary"],colorPrimaryTint:[1,"color-primary-tint"],isLargeView:[4,"is-large-view"],treksToDisplay:[32]}],[1,"grw-filter",{filterType:[1,"filter-type"],filterName:[1,"filter-name"],filterNameProperty:[1,"filter-name-property"]}],[0,"grw-map",{urlLayer:[1,"url-layer"],attribution:[1],center:[1],zoom:[2],colorPrimary:[1,"color-primary"],colorPrimaryTint:[1,"color-primary-tint"],colorTrekLine:[1,"color-trek-line"],colorDepartureIcon:[1,"color-departure-icon"],colorArrivalIcon:[1,"color-arrival-icon"],colorSensitiveArea:[1,"color-sensitive-area"],colorPoiIcon:[1,"color-poi-icon"],mapIsReady:[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]}]]],["p-8cfa03c0",[[1,"grw-app",{api:[1],language:[1],inBbox:[1,"in-bbox"],cities:[1],districts:[1],structures:[1],themes:[1],portals:[1],routes:[1],practices:[1],urlLayer:[1,"url-layer"],center:[1],zoom:[8],attribution:[1],colorPrimary:[1,"color-primary"],colorPrimaryShade:[1,"color-primary-shade"],colorPrimaryTint:[1,"color-primary-tint"],colorTrekLine:[1,"color-trek-line"],colorDepartureIcon:[1,"color-departure-icon"],colorArrivalIcon:[1,"color-arrival-icon"],colorSensitiveArea:[1,"color-sensitive-area"],colorPoiIcon:[1,"color-poi-icon"],showTrek:[32],showTreksMap:[32],showTrekMap:[32],showFilters:[32],isLargeView:[32],currentTrekId:[32]},[[0,"trekCardPress","onTrekCardPress"],[9,"resize","onWindowResize"]]]]]],r)));
1
+ import{p as r,b as o}from"./p-6dce5e6c.js";(()=>{const o=import.meta.url,e={};return""!==o&&(e.resourcesUrl=new URL(".",o).href),r(e)})().then((r=>o([["p-1b2ba86d",[[1,"grw-trek-card",{trek:[16],colorPrimary:[1,"color-primary"],colorPrimaryTint:[1,"color-primary-tint"],isLargeView:[4,"is-large-view"],currentTrek:[32],difficulty:[32],route:[32],practice:[32],themes:[32]}]]],["p-7715153d",[[1,"grw-information-desk-detail",{informationDesk:[16]}],[1,"grw-poi-detail",{poi:[16]}],[1,"grw-sensitive-area-detail",{sensitiveArea:[16]}]]],["p-6716c635",[[1,"grw-trek-detail",{trek:[16],colorPrimary:[1,"color-primary"],colorPrimaryShade:[1,"color-primary-shade"],colorPrimaryTint:[1,"color-primary-tint"],difficulty:[32],route:[32],practice:[32],themes:[32],labels:[32],sources:[32],accessibilities:[32],accessibilityLevel:[32],currentTrek:[32]}],[1,"grw-treks-list",{colorPrimary:[1,"color-primary"],colorPrimaryTint:[1,"color-primary-tint"],isLargeView:[4,"is-large-view"],treksToDisplay:[32]}],[1,"grw-filter",{filterType:[1,"filter-type"],filterName:[1,"filter-name"],filterNameProperty:[1,"filter-name-property"]}],[0,"grw-map",{urlLayer:[1,"url-layer"],attribution:[1],center:[1],zoom:[2],colorPrimary:[1,"color-primary"],colorPrimaryTint:[1,"color-primary-tint"],colorTrekLine:[1,"color-trek-line"],colorDepartureIcon:[1,"color-departure-icon"],colorArrivalIcon:[1,"color-arrival-icon"],colorSensitiveArea:[1,"color-sensitive-area"],colorPoiIcon:[1,"color-poi-icon"],mapIsReady:[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]}]]],["p-5f17d340",[[1,"grw-app",{api:[1],language:[1],inBbox:[1,"in-bbox"],cities:[1],districts:[1],structures:[1],themes:[1],portals:[1],routes:[1],practices:[1],urlLayer:[1,"url-layer"],center:[1],zoom:[8],attribution:[1],colorPrimary:[1,"color-primary"],colorPrimaryShade:[1,"color-primary-shade"],colorPrimaryTint:[1,"color-primary-tint"],colorTrekLine:[1,"color-trek-line"],colorDepartureIcon:[1,"color-departure-icon"],colorArrivalIcon:[1,"color-arrival-icon"],colorSensitiveArea:[1,"color-sensitive-area"],colorPoiIcon:[1,"color-poi-icon"],showTrek:[32],showTreksMap:[32],showTrekMap:[32],showFilters:[32],isLargeView:[32],currentTrekId:[32]},[[0,"trekCardPress","onTrekCardPress"],[9,"resize","onWindowResize"]]]]]],r)));
@@ -1 +1 @@
1
- import{r as i,c as r,h as e,H as n}from"./p-6dce5e6c.js";import{s as t,o as a}from"./p-e63213a9.js";import{d as c,f as o,l as s,a as l,b as d,c as h}from"./p-f3f7d6be.js";const b=class{constructor(e){i(this,e),this.trekCardPress=r(this,"trekCardPress",7),this.colorPrimary="#6b0030",this.colorPrimaryTint="#974c6e",this.isLargeView=!1}componentWillLoad(){this.currentTrek=this.trek?this.trek:t.currentTrek,this.currentTrek&&(this.difficulty=t.difficulties.find((i=>i.id===this.currentTrek.difficulty)),this.route=t.routes.find((i=>i.id===this.currentTrek.route)),this.practice=t.practices.find((i=>i.id===this.currentTrek.practice)),this.themes=t.themes.filter((i=>this.currentTrek.themes.includes(i.id)))),a("currentTrek",(()=>{this.currentTrek=this.trek?this.trek:t.currentTrek,this.currentTrek&&(this.difficulty=t.difficulties.find((i=>i.id===this.currentTrek.difficulty)),this.route=t.routes.find((i=>i.id===this.currentTrek.route)),this.practice=t.practices.find((i=>i.id===this.currentTrek.practice)),this.themes=t.themes.filter((i=>this.currentTrek.themes.includes(i.id))))}))}render(){var i,r,t,a,b,v,g,u;return e(n,{onClick:()=>this.trekCardPress.emit(this.currentTrek.id),style:{width:this.isLargeView?"100%":"auto","--color-primary":this.colorPrimary,"--color-primary-tint":this.colorPrimaryTint}},this.currentTrek&&e("div",{class:this.isLargeView?"trek-card-large-view-container":"trek-card-container"},this.currentTrek.attachments&&this.currentTrek.attachments[0]&&this.currentTrek.attachments[0].thumbnail&&e("img",{class:"image",src:`${this.currentTrek.attachments[0].thumbnail}`,loading:"lazy"}),e("div",{class:"sub-container"},e("div",{class:"departure"},null===(i=this.currentTrek)||void 0===i?void 0:i.departure),e("div",{class:"name"},null===(r=this.currentTrek)||void 0===r?void 0:r.name),e("div",{class:"themes-container"},this.themes.map((i=>e("div",{class:"theme"},i.label)))),e("div",{class:"icons-labels-container"},e("div",{class:"row"},e("div",{class:"icon-label difficulty"},(null===(t=this.difficulty)||void 0===t?void 0:t.pictogram)&&e("img",{src:this.difficulty.pictogram}),null===(a=this.difficulty)||void 0===a?void 0:a.label),e("div",{class:"icon-label duration"},e("div",{class:"svg-icon",innerHTML:c}),o(this.currentTrek.duration))),e("div",{class:"row"},e("div",{class:"icon-label length"},e("div",{class:"svg-icon",innerHTML:s}),l(this.currentTrek.length_2d)),e("div",{class:"icon-label ascent"},e("div",{class:"svg-icon",innerHTML:d}),h(this.currentTrek.ascent))),e("div",{class:"row"},e("div",{class:"icon-label route"},(null===(b=this.route)||void 0===b?void 0:b.pictogram)&&e("img",{src:this.route.pictogram}),null===(v=this.route)||void 0===v?void 0:v.route),e("div",{class:"icon-label practice"},(null===(g=this.practice)||void 0===g?void 0:g.pictogram)&&e("img",{src:this.practice.pictogram}),null===(u=this.practice)||void 0===u?void 0:u.name))))))}};b.style='.trek-card-container,.trek-card-large-view-container{font-family:"Roboto";border-radius:8px;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25);cursor:pointer}.trek-card-container .image,.trek-card-large-view-container .image{object-fit:cover}.trek-card-container .sub-container,.trek-card-large-view-container .sub-container{display:flex;flex-direction:column;justify-content:center;padding:12px}.trek-card-container .sub-container .name,.trek-card-large-view-container .sub-container .name{color:var(--color-primary);font-size:24px;font-weight:bold;margin-bottom:8px}.trek-card-container .sub-container .departure,.trek-card-large-view-container .sub-container .departure{color:rgba(0, 0, 0, 0.7);font-size:16px;margin:4px 0px}.trek-card-container .sub-container .themes-container,.trek-card-large-view-container .sub-container .themes-container{display:flex;justify-content:flex-start;align-items:center;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-primary-tint);color:#ffffff;border-radius:8px;padding:8px;margin:0px 8px 8px 0px}.trek-card-container .sub-container .icons-labels-container,.trek-card-large-view-container .sub-container .icons-labels-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.trek-card-container .sub-container .icons-labels-container .row,.trek-card-large-view-container .sub-container .icons-labels-container .row{display:flex;justify-content:space-between;align-items:center;width:100%}.trek-card-container .sub-container .icons-labels-container .row:not(:last-child),.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:flex;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 .svg-icon svg,.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 .svg-icon svg{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)}.trek-card-container{width:350px;height:auto}.trek-card-container .image{width:100%}.trek-card-large-view-container{height:auto;display:flex;flex-direction:row}.trek-card-large-view-container .image{width:250px}';export{b as grw_trek_card}
1
+ import{r as i,c as r,h as e,H as n}from"./p-6dce5e6c.js";import{s as t,o as a}from"./p-e6710c64.js";import{d as c,f as o,l as s,a as l,b as d,c as h}from"./p-f3f7d6be.js";const b=class{constructor(e){i(this,e),this.trekCardPress=r(this,"trekCardPress",7),this.colorPrimary="#6b0030",this.colorPrimaryTint="#974c6e",this.isLargeView=!1}componentWillLoad(){this.currentTrek=this.trek?this.trek:t.currentTrek,this.currentTrek&&(this.difficulty=t.difficulties.find((i=>i.id===this.currentTrek.difficulty)),this.route=t.routes.find((i=>i.id===this.currentTrek.route)),this.practice=t.practices.find((i=>i.id===this.currentTrek.practice)),this.themes=t.themes.filter((i=>this.currentTrek.themes.includes(i.id)))),a("currentTrek",(()=>{this.currentTrek=this.trek?this.trek:t.currentTrek,this.currentTrek&&(this.difficulty=t.difficulties.find((i=>i.id===this.currentTrek.difficulty)),this.route=t.routes.find((i=>i.id===this.currentTrek.route)),this.practice=t.practices.find((i=>i.id===this.currentTrek.practice)),this.themes=t.themes.filter((i=>this.currentTrek.themes.includes(i.id))))}))}render(){var i,r,t,a,b,v,g,u;return e(n,{onClick:()=>this.trekCardPress.emit(this.currentTrek.id),style:{width:this.isLargeView?"100%":"auto","--color-primary":this.colorPrimary,"--color-primary-tint":this.colorPrimaryTint}},this.currentTrek&&e("div",{class:this.isLargeView?"trek-card-large-view-container":"trek-card-container"},this.currentTrek.attachments&&this.currentTrek.attachments[0]&&this.currentTrek.attachments[0].thumbnail&&e("img",{class:"image",src:`${this.currentTrek.attachments[0].thumbnail}`,loading:"lazy"}),e("div",{class:"sub-container"},e("div",{class:"departure"},null===(i=this.currentTrek)||void 0===i?void 0:i.departure),e("div",{class:"name"},null===(r=this.currentTrek)||void 0===r?void 0:r.name),e("div",{class:"themes-container"},this.themes.map((i=>e("div",{class:"theme"},i.label)))),e("div",{class:"icons-labels-container"},e("div",{class:"row"},e("div",{class:"icon-label difficulty"},(null===(t=this.difficulty)||void 0===t?void 0:t.pictogram)&&e("img",{src:this.difficulty.pictogram}),null===(a=this.difficulty)||void 0===a?void 0:a.label),e("div",{class:"icon-label duration"},e("div",{class:"svg-icon",innerHTML:c}),o(this.currentTrek.duration))),e("div",{class:"row"},e("div",{class:"icon-label length"},e("div",{class:"svg-icon",innerHTML:s}),l(this.currentTrek.length_2d)),e("div",{class:"icon-label ascent"},e("div",{class:"svg-icon",innerHTML:d}),h(this.currentTrek.ascent))),e("div",{class:"row"},e("div",{class:"icon-label route"},(null===(b=this.route)||void 0===b?void 0:b.pictogram)&&e("img",{src:this.route.pictogram}),null===(v=this.route)||void 0===v?void 0:v.route),e("div",{class:"icon-label practice"},(null===(g=this.practice)||void 0===g?void 0:g.pictogram)&&e("img",{src:this.practice.pictogram}),null===(u=this.practice)||void 0===u?void 0:u.name))))))}};b.style='.trek-card-container,.trek-card-large-view-container{font-family:"Roboto";border-radius:8px;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25);cursor:pointer}.trek-card-container .image,.trek-card-large-view-container .image{object-fit:cover}.trek-card-container .sub-container,.trek-card-large-view-container .sub-container{display:flex;flex-direction:column;justify-content:center;padding:12px}.trek-card-container .sub-container .name,.trek-card-large-view-container .sub-container .name{color:var(--color-primary);font-size:24px;font-weight:bold;margin-bottom:8px}.trek-card-container .sub-container .departure,.trek-card-large-view-container .sub-container .departure{color:rgba(0, 0, 0, 0.7);font-size:16px;margin:4px 0px}.trek-card-container .sub-container .themes-container,.trek-card-large-view-container .sub-container .themes-container{display:flex;justify-content:flex-start;align-items:center;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-primary-tint);color:#ffffff;border-radius:8px;padding:8px;margin:0px 8px 8px 0px}.trek-card-container .sub-container .icons-labels-container,.trek-card-large-view-container .sub-container .icons-labels-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.trek-card-container .sub-container .icons-labels-container .row,.trek-card-large-view-container .sub-container .icons-labels-container .row{display:flex;justify-content:space-between;align-items:center;width:100%}.trek-card-container .sub-container .icons-labels-container .row:not(:last-child),.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:flex;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 .svg-icon svg,.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 .svg-icon svg{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)}.trek-card-container{width:350px;height:auto}.trek-card-container .image{width:100%}.trek-card-large-view-container{height:auto;display:flex;flex-direction:row}.trek-card-large-view-container .image{width:250px}';export{b as grw_trek_card}
@@ -0,0 +1 @@
1
+ import{r as i,h as t,H as e,g as r}from"./p-6dce5e6c.js";import{s as o}from"./p-e6710c64.js";const a=class{constructor(t){i(this,t),this.showTrek=!1,this.showTreksMap=!1,this.showTrekMap=!1,this.showFilters=!1,this.isLargeView=!1,this.language="fr",this.colorPrimary="#6b0030",this.colorPrimaryShade="#4a0021",this.colorPrimaryTint="#974c6e",this.colorTrekLine="#6b0030",this.colorDepartureIcon="#006b3b",this.colorArrivalIcon="#85003b",this.colorSensitiveArea="#4974a5",this.colorPoiIcon="#974c6e",this.handlePopStateBind=this.handlePopState.bind(this),this.largeViewSize=1024}onTrekCardPress(i){this.currentTrekId=i.detail,this.showTrek=!this.showTrek;const t=new URL(window.location.toString());t.searchParams.set("trek",this.currentTrekId.toString()),window.history.pushState({},"",t)}onWindowResize(){this.handleView()}watchPropHandler(){window.dispatchEvent(new window.Event("resize"))}componentDidLoad(){this.handleView(),window.addEventListener("popstate",this.handlePopStateBind,!1);const i=new URL(window.location.toString()),t=i.searchParams.get("trek");t&&(window.history.replaceState({isInitialHistoryWithTrek:!0},"",i),this.currentTrekId=Number(t),this.showTrek=!this.showTrek)}onTrekDetailsClose(){this.currentTrekId=null,this.showTrek=!this.showTrek}handleView(){this.isLargeView=this.element.getBoundingClientRect().width>=this.largeViewSize,this.showTreksMap=this.isLargeView,this.showTrekMap=this.isLargeView}handleFilters(){this.showFilters=!this.showFilters}handleBackButton(){if(window.history.state.isInitialHistoryWithTrek){this.onTrekDetailsClose();const i=new URL(window.location.toString());i.searchParams.delete("trek"),window.history.pushState({},"",i)}else window.history.back()}handlePopState(){const i=new URL(window.location.toString()).searchParams.get("trek");i?(this.currentTrekId=Number(i),this.showTrek=!this.showTrek):this.onTrekDetailsClose()}handleShowMap(){this.currentTrekId?this.showTrekMap=!this.showTrekMap:this.showTreksMap=!this.showTreksMap}disconnectedCallback(){window.removeEventListener("popstate",this.handlePopStateBind)}render(){return t(e,{style:{"--color-primary":this.colorPrimary,"--color-primary-tint":this.colorPrimaryTint,"--color-primary-shade":this.colorPrimaryShade}},t("grw-treks-provider",{api:this.api,language:this.language,"in-bbox":this.inBbox,cities:this.cities,districts:this.districts,structures:this.structures,themes:this.themes,portals:this.portals,routes:this.routes,practices:this.practices}),this.showTrek&&this.currentTrekId&&t("grw-trek-provider",{api:o.api,language:this.language,"trek-id":this.currentTrekId}),t("div",{class:"app-container"},t("div",{class:this.isLargeView?"large-view-header-container":"header-container"},this.showTrek?t("div",{onClick:()=>this.handleBackButton(),class:"arrow-back-icon",innerHTML:'<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>'}):t("div",{onClick:()=>this.handleFilters(),class:"handle-filters-button"},"FILTRER"),!this.showTrek&&this.showFilters&&t("div",{class:"options-container"},t("div",{class:"filters-container"},t("div",{class:"current-treks-length"},`${o.currentTreks.length} résultat${o.currentTreks.length>1?"s":""}`),t("div",{onClick:()=>this.handleFilters(),class:"close-filters-button"},"X"),t("div",null,t("grw-filter",{filterName:"Pratique",filterType:"practices",filterNameProperty:"name"})),t("div",{class:"filter-margin-top"},t("grw-filter",{filterName:"Difficulté",filterType:"difficulties",filterNameProperty:"label"})),t("div",{class:"filter-margin-top"},t("grw-filter",{filterName:"Durée",filterType:"durations",filterNameProperty:"name"}))),t("div",{onClick:()=>this.handleFilters(),class:"back-filters-container"})),t("div",{class:"attribution-container"},t("a",{target:"_blank",href:"https://geotrek.fr"},"GEOTREK"))),t("div",{class:"content-container"},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",{"is-large-view":this.isLargeView,"color-primary":this.colorPrimary,"color-primary-tint":this.colorPrimaryTint})),this.showTrek&&!o.currentTrek&&t("div",{class:this.isLargeView?"large-view-loader-container":"loader-container"},t("span",{class:"loader"})),o.currentTrek&&t("div",{class:this.isLargeView?"large-view-app-trek-detail-container":"app-trek-detail-container"},t("grw-trek-detail",{"color-primary":this.colorPrimary,"color-primary-shade":this.colorPrimaryShade,"color-primary-tint":this.colorPrimaryTint})),t("grw-map",{class:this.isLargeView?"large-view-app-map-container":"app-map-container",style:{visibility:this.showTreksMap&&!this.showTrek||this.showTrekMap&&this.showTrek?"visible":"hidden"},"url-layer":this.urlLayer,center:this.center,zoom:this.zoom,attribution:this.attribution,"color-primary":this.colorPrimary,"color-primary-tint":this.colorPrimaryTint,"color-trek-line":this.colorTrekLine,"color-departure-icon":this.colorDepartureIcon,"color-arrival-icon":this.colorArrivalIcon,"color-sensitive-area":this.colorSensitiveArea,"color-poi-icon":this.colorPoiIcon})),t("div",{class:"map-visibility-button",style:{display:this.isLargeView?"none":"flex"}},t("div",{onClick:()=>this.handleShowMap()},this.showTreksMap||this.showTrekMap?this.showTrek?"Voir la fiche":"Voir la liste":"Voir la carte"))))}get element(){return r(this)}static get watchers(){return{isLargeView:["watchPropHandler"]}}};a.style='.app-container{position:relative;height:100%;max-height:100vh;font-family:"Roboto"}.header-container,.large-view-header-container{display:flex;align-items:center;background-color:var(--color-primary);height:64px}.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}.header-container .handle-filters-button,.large-view-header-container .handle-filters-button{user-select:none;cursor:pointer;color:var(--color-primary);background-color:#ffffff;margin-left:36px;border-radius:8px;padding:8px}.header-container .attribution-container,.large-view-header-container .attribution-container{position:absolute;right:24px}.header-container .attribution-container a,.large-view-header-container .attribution-container a{color:#ffffff;text-decoration:none}.options-container{height:calc(100% - 64px);position:absolute;width:100%;z-index:1100;top:64px}.filters-container{position:absolute;width:100%;background-color:#ffffff;padding:36px 0px;z-index:1100}.filters-container .close-filters-button{cursor:pointer;font-weight:bold;position:absolute;top:12px;right:12px;padding:12px;border-radius:12px;color:var(--color-primary);border:1px var(--color-primary) solid}.filters-container .close-filters-button:hover{background-color:var(--color-primary);color:#ffffff}.filters-container .filter-margin-top{margin-top:24px}.filters-container .current-treks-length{margin:0px 0px 32px 8px;color:var(--color-primary);font-size:24px;font-weight:bold}.back-filters-container{background-color:rgba(0, 0, 0, 0.5);width:100%;height:calc(100% - 64px);position:absolute;z-index:1099;top:64px}.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%}';export{a as grw_app}