@geotrekce/geotrek-rando-widget 0.0.7 → 0.0.8

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 (59) hide show
  1. package/dist/cjs/geotrek-rando-widget.cjs.js +2 -2
  2. package/dist/cjs/grw-app.cjs.entry.js +14 -5
  3. package/dist/cjs/grw-filter_6.cjs.entry.js +70 -44
  4. package/dist/cjs/grw-information-desk-detail_3.cjs.entry.js +2 -2
  5. package/dist/cjs/grw-trek-card.cjs.entry.js +3 -3
  6. package/dist/cjs/{index-c2c4531d.js → index-4c76daa3.js} +8 -3
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/{store-fd04a216.js → store-b4c3c507.js} +6 -4
  9. package/dist/collection/components/grw-app/grw-app.css +17 -11
  10. package/dist/collection/components/grw-app/grw-app.js +21 -9
  11. package/dist/collection/components/grw-filter/grw-filter.js +11 -12
  12. package/dist/collection/components/grw-map/grw-map.js +22 -15
  13. package/dist/collection/components/grw-trek-card/grw-trek-card.js +1 -1
  14. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +4 -2
  15. package/dist/collection/components/grw-treks-list/grw-treks-list.css +0 -12
  16. package/dist/collection/components/grw-treks-list/grw-treks-list.js +16 -9
  17. package/dist/collection/store/grw-trek-provider.js +8 -2
  18. package/dist/collection/store/grw-treks-provider.js +6 -3
  19. package/dist/collection/store/store.js +5 -3
  20. package/dist/components/grw-app.js +14 -5
  21. package/dist/components/grw-filter2.js +11 -12
  22. package/dist/components/grw-map2.js +22 -15
  23. package/dist/components/grw-trek-card2.js +1 -1
  24. package/dist/components/grw-trek-detail2.js +4 -2
  25. package/dist/components/grw-trek-provider2.js +8 -2
  26. package/dist/components/grw-treks-list2.js +18 -9
  27. package/dist/components/grw-treks-provider2.js +6 -3
  28. package/dist/components/store.js +5 -3
  29. package/dist/esm/geotrek-rando-widget.js +2 -2
  30. package/dist/esm/grw-app.entry.js +14 -5
  31. package/dist/esm/grw-filter_6.entry.js +70 -44
  32. package/dist/esm/grw-information-desk-detail_3.entry.js +2 -2
  33. package/dist/esm/grw-trek-card.entry.js +3 -3
  34. package/dist/esm/{index-192d910f.js → index-ee473772.js} +8 -3
  35. package/dist/esm/loader.js +2 -2
  36. package/dist/esm/{store-b2c76c0c.js → store-a5f523fd.js} +6 -4
  37. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
  38. package/dist/geotrek-rando-widget/{p-7715153d.entry.js → p-0510e16b.entry.js} +1 -1
  39. package/dist/geotrek-rando-widget/p-22562f4d.js +1 -0
  40. package/dist/geotrek-rando-widget/{p-1b2ba86d.entry.js → p-500436f1.entry.js} +1 -1
  41. package/dist/geotrek-rando-widget/p-94f0db4d.entry.js +1 -0
  42. package/dist/geotrek-rando-widget/p-9a25f817.entry.js +1 -0
  43. package/dist/geotrek-rando-widget/p-b62909db.js +2 -0
  44. package/dist/types/components/grw-app/grw-app.d.ts +2 -2
  45. package/dist/types/components/grw-filter/grw-filter.d.ts +1 -1
  46. package/dist/types/components/grw-map/grw-map.d.ts +1 -1
  47. package/dist/types/components/grw-trek-card/grw-trek-card.d.ts +1 -1
  48. package/dist/types/components/grw-trek-detail/grw-trek-detail.d.ts +1 -1
  49. package/dist/types/components/grw-treks-list/grw-treks-list.d.ts +3 -2
  50. package/dist/types/components.d.ts +2 -2
  51. package/dist/types/store/grw-trek-provider.d.ts +2 -1
  52. package/dist/types/store/grw-treks-provider.d.ts +1 -1
  53. package/dist/types/store/store.d.ts +4 -0
  54. package/package.json +1 -1
  55. package/readme.md +4 -0
  56. package/dist/geotrek-rando-widget/p-4361afd2.entry.js +0 -1
  57. package/dist/geotrek-rando-widget/p-5f17d340.entry.js +0 -1
  58. package/dist/geotrek-rando-widget/p-6dce5e6c.js +0 -2
  59. package/dist/geotrek-rando-widget/p-e6710c64.js +0 -1
@@ -1,2 +0,0 @@
1
- let e,t,n=null,l=!1;const s="undefined"!=typeof window?window:{},o=s.document||{head:{}},i={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},c=e=>Promise.resolve(e),r=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),a=(e,t,n)=>{n&&n.map((([n,l,s])=>{const o=f(e,n),c=u(t,s),r=d(n);i.ael(o,l,c,r),(t.o=t.o||[]).push((()=>i.rel(o,l,c,r)))}))},u=(e,t)=>n=>{try{256&e.t?e.i[t](n):(e.u=e.u||[]).push([t,n])}catch(e){X(e)}},f=(e,t)=>8&t?s:e,d=e=>0!=(2&e),y=new WeakMap,$=e=>"sc-"+e.$,h={},m=e=>"object"==(e=typeof e)||"function"===e,p=(e,t,...n)=>{let l=null,s=null,o=!1,i=!1;const c=[],r=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?r(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!m(l))&&(l+=""),o&&i?c[c.length-1].h+=l:c.push(o?b(null,l):l),i=o)};if(r(n),t){t.key&&(s=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const a=b(e,null);return a.m=t,c.length>0&&(a.p=c),a.g=s,a},b=(e,t)=>({t:0,S:e,h:t,k:null,p:null,m:null,g:null}),w={},g=(e,t,n,l,o,c)=>{if(n!==l){let r=Q(e,t),a=t.toLowerCase();if("class"===t){const t=e.classList,s=k(n),o=k(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if(r||"o"!==t[0]||"n"!==t[1]){const s=m(l);if((r||s&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{const s=null==l?"":l;"list"===t?r=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&c||o)&&!s&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):Q(s,a)?a.slice(2):a[2]+t.slice(3),n&&i.rel(e,t,n,!1),l&&i.ael(e,t,l,!1)}},S=/\s/,k=e=>e?e.split(S):[],j=(e,t,n,l)=>{const s=11===t.k.nodeType&&t.k.host?t.k.host:t.k,o=e&&e.m||h,i=t.m||h;for(l in o)l in i||g(s,l,o[l],void 0,n,t.t);for(l in i)g(s,l,o[l],i[l],n,t.t)},v=(t,n,l)=>{const s=n.p[l];let i,c,r=0;if(null!==s.h)i=s.k=o.createTextNode(s.h);else if(i=s.k=o.createElement(s.S),j(null,s,!1),null!=e&&i["s-si"]!==e&&i.classList.add(i["s-si"]=e),s.p)for(r=0;r<s.p.length;++r)c=v(t,s,r),c&&i.appendChild(c);return i},M=(e,n,l,s,o,i)=>{let c,r=e;for(r.shadowRoot&&r.tagName===t&&(r=r.shadowRoot);o<=i;++o)s[o]&&(c=v(null,l,o),c&&(s[o].k=c,r.insertBefore(c,n)))},C=(e,t,n,l)=>{for(;t<=n;++t)(l=e[t])&&l.k.remove()},O=(e,t)=>e.S===t.S&&e.g===t.g,L=(e,t)=>{const n=t.k=e.k,l=e.p,s=t.p,o=t.h;null===o?(j(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o,i=0,c=0,r=0,a=0,u=t.length-1,f=t[0],d=t[u],y=l.length-1,$=l[0],h=l[y];for(;i<=u&&c<=y;)if(null==f)f=t[++i];else if(null==d)d=t[--u];else if(null==$)$=l[++c];else if(null==h)h=l[--y];else if(O(f,$))L(f,$),f=t[++i],$=l[++c];else if(O(d,h))L(d,h),d=t[--u],h=l[--y];else if(O(f,h))L(f,h),e.insertBefore(f.k,d.k.nextSibling),f=t[++i],h=l[--y];else if(O(d,$))L(d,$),e.insertBefore(d.k,f.k),d=t[--u],$=l[++c];else{for(r=-1,a=i;a<=u;++a)if(t[a]&&null!==t[a].g&&t[a].g===$.g){r=a;break}r>=0?(o=t[r],o.S!==$.S?s=v(t&&t[c],n,r):(L(o,$),t[r]=void 0,s=o.k),$=l[++c]):(s=v(t&&t[c],n,c),$=l[++c]),s&&f.k.parentNode.insertBefore(s,f.k)}i>u?M(e,null==l[y+1]?null:l[y+1].k,n,l,c,y):c>y&&C(t,i,u)})(n,l,t,s):null!==s?(null!==e.h&&(n.textContent=""),M(n,null,t,s,0,s.length-1)):null!==l&&C(l,0,l.length-1)):e.h!==o&&(n.data=o)},P=e=>I(e).j,x=(e,t,n)=>{const l=P(e);return{emit:e=>E(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},E=(e,t,n)=>{const l=i.ce(t,n);return e.dispatchEvent(l),l},N=(e,t)=>{t&&!e.v&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.v=t)))},T=(e,t)=>{if(e.t|=16,!(4&e.t))return N(e,e.M),ce((()=>W(e,t)));e.t|=512},W=(e,t)=>{const n=e.i;let l;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>D(n,e,t))),e.u=null),l=D(n,"componentWillLoad")),V(l,(()=>A(e,n,t)))},A=async(e,t,n)=>{const l=e.j,s=l["s-rc"];n&&(e=>{const t=e.C,n=e.j,l=t.t,s=((e,t)=>{let n=$(t);const l=ee.get(n);if(e=11===e.nodeType?e:o,l)if("string"==typeof l){let t,s=y.get(e=e.head||e);s||y.set(e,s=new Set),s.has(n)||(t=o.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);F(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>R(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},F=(l,s)=>{try{n=s,s=s.render(),l.t&=-17,l.t|=2,((n,l)=>{const s=n.j,o=n.O||b(null,null),i=(e=>e&&e.S===w)(l)?l:p(null,null,l);t=s.tagName,i.S=null,i.t|=4,n.O=i,i.k=o.k=s.shadowRoot||s,e=s["s-sc"],L(o,i)})(l,s)}catch(e){X(e,l.j)}return n=null,null},H=()=>n,R=e=>{const t=e.j,n=e.i,l=e.M;64&e.t||(e.t|=64,_(t),D(n,"componentDidLoad"),e.L(t),l||q()),e.v&&(e.v(),e.v=void 0),512&e.t&&ie((()=>T(e,!1))),e.t&=-517},U=e=>{{const t=I(e),n=t.j.isConnected;return n&&2==(18&t.t)&&T(t,!1),n}},q=()=>{_(o.documentElement),ie((()=>E(s,"appload",{detail:{namespace:"geotrek-rando-widget"}})))},D=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){X(e)}},V=(e,t)=>e&&e.then?e.then(t):t(),_=e=>e.classList.add("hydrated"),z=(e,t,n)=>{if(t.P){e.watchers&&(t.N=e.watchers);const l=Object.entries(t.P),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>I(this).T.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=I(e),o=s.j,i=s.T.get(t),c=s.t,r=s.i;if(n=((e,t)=>null==e||m(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.P[t][0]),(!(8&c)||void 0===i)&&n!==i&&(!Number.isNaN(i)||!Number.isNaN(n))&&(s.T.set(t,n),r)){if(l.N&&128&c){const e=l.N[t];e&&e.map((e=>{try{r[e](n,i,t)}catch(e){X(e,o)}}))}2==(18&c)&&T(s,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const t=new Map;s.attributeChangedCallback=function(e,n,l){i.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(s.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))}}return e},B=(e,t={})=>{const n=[],l=t.exclude||[],c=s.customElements,u=o.head,f=u.querySelector("meta[charset]"),d=o.createElement("style"),y=[];let h,m=!0;Object.assign(i,t),i.l=new URL(t.resourcesUrl||"./",o.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],$:t[1],P:t[2],W:t[3]};s.P=t[2],s.W=t[3],s.N={};const o=s.$,u=class extends HTMLElement{constructor(e){super(e),K(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){h&&(clearTimeout(h),h=null),m?y.push(this):i.jmp((()=>(e=>{if(0==(1&i.t)){const t=I(e),n=t.C,l=()=>{};if(1&t.t)a(e,t,n.W);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){N(t,t.M=n);break}}n.P&&Object.entries(n.P).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=Z(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(n.N=s.watchers,z(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){X(e)}t.t&=-9,t.t|=128,e()}if(s.style){let e=s.style;const t=$(n);if(!ee.has(t)){const l=()=>{};((e,t,n)=>{let l=ee.get(e);r&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,ee.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.M,i=()=>T(t,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){i.jmp((()=>(()=>{if(0==(1&i.t)){const e=I(this),t=e.i;e.o&&(e.o.map((e=>e())),e.o=void 0),D(t,"disconnectedCallback")}})()))}componentOnReady(){return I(this).A}};s.F=e[0],l.includes(o)||c.get(o)||(n.push(o),c.define(o,z(u,s,1)))}))})),d.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",d.setAttribute("data-styles",""),u.insertBefore(d,f?f.nextSibling:u.firstChild),m=!1,y.length?y.map((e=>e.connectedCallback())):i.jmp((()=>h=setTimeout(q,30)))},G=new WeakMap,I=e=>G.get(e),J=(e,t)=>G.set(t.i=e,t),K=(e,t)=>{const n={t:0,j:e,C:t,T:new Map};return n.A=new Promise((e=>n.L=e)),e["s-p"]=[],e["s-rc"]=[],a(e,n,t.W),G.set(e,n)},Q=(e,t)=>t in e,X=(e,t)=>(0,console.error)(e,t),Y=new Map,Z=e=>{const t=e.$.replace(/-/g,"_"),n=e.F,l=Y.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(Y.set(n,e),e[t])),X)
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},ee=new Map,te=[],ne=[],le=(e,t)=>n=>{e.push(n),l||(l=!0,t&&4&i.t?ie(oe):i.raf(oe))},se=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){X(e)}e.length=0},oe=()=>{se(te),se(ne),(l=te.length>0)&&i.raf(oe)},ie=e=>c().then(e),ce=le(ne,!0);export{w as H,H as a,B as b,x as c,U as f,P as g,p as h,c as p,J as r}
@@ -1 +0,0 @@
1
- import{a as e,f as t}from"./p-6dce5e6c.js";const s=e=>!("isConnected"in e)||e.isConnected,n=(()=>{let e;return(...t)=>{e&&clearTimeout(e),e=setTimeout((()=>{e=0,(e=>{for(let t of e.keys())e.set(t,e.get(t).filter(s))})(...t)}),2e3)}})(),{state:r,onChange:o}=(()=>{const s=((e,t=((e,t)=>e!==t))=>{let s=new Map(Object.entries(null!=e?e:{}));const n={dispose:[],get:[],set:[],reset:[]},r=()=>{s=new Map(Object.entries(null!=e?e:{})),n.reset.forEach((e=>e()))},o=e=>(n.get.forEach((t=>t(e))),s.get(e)),u=(e,r)=>{const o=s.get(e);t(r,o,e)&&(s.set(e,r),n.set.forEach((t=>t(e,r,o))))},c="undefined"==typeof Proxy?{}:new Proxy(e,{get:(e,t)=>o(t),ownKeys:()=>Array.from(s.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(e,t)=>s.has(t),set:(e,t,s)=>(u(t,s),!0)}),i=(e,t)=>(n[e].push(t),()=>{((e,t)=>{const s=e.indexOf(t);s>=0&&(e[s]=e[e.length-1],e.length--)})(n[e],t)});return{state:c,get:o,set:u,on:i,onChange:(t,s)=>{const n=i("set",((e,n)=>{e===t&&s(n)})),r=i("reset",(()=>s(e[t])));return()=>{n(),r()}},use:(...e)=>{const t=e.reduce(((e,t)=>(t.set&&e.push(i("set",t.set)),t.get&&e.push(i("get",t.get)),t.reset&&e.push(i("reset",t.reset)),t.dispose&&e.push(i("dispose",t.dispose)),e)),[]);return()=>t.forEach((e=>e()))},dispose:()=>{n.dispose.forEach((e=>e())),r()},reset:r,forceUpdate:e=>{const t=s.get(e);n.set.forEach((s=>s(e,t,t)))}}})({api:"",treks:[],currentTreks:[],treksWithinBounds:[],currentMapTreksBounds:null,difficulties:[],routes:[],practices:[],themes:[],durations:[],currentSensitiveAreas:null,labels:null,sources:null,accessibilities:null,accessibilitiesLevel:null,currentTrek:null,currentPois:null,currentInformationDesks:null},void 0);return s.use((()=>{if("function"!=typeof e)return{};const s=new Map;return{dispose:()=>s.clear(),get:t=>{const n=e();n&&((e,t,s)=>{const n=e.get(t);n?n.includes(s)||n.push(s):e.set(t,[s])})(s,t,n)},set:e=>{const r=s.get(e);r&&s.set(e,r.filter(t)),n(s)},reset:()=>{s.forEach((e=>e.forEach(t))),n(s)}}})()),s})();export{o,r as s}