@geops/rvf-mobility-web-component 0.1.49 → 0.1.51
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.51](https://github.com/geops/rvf-mobility-web-component/compare/v0.1.50...v0.1.51) (2025-09-25)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* set toolbar true by default as it was before ([29f0ae4](https://github.com/geops/rvf-mobility-web-component/commit/29f0ae4b07b7d3cd1d26432276268df72bba01e4))
|
|
11
|
+
|
|
12
|
+
### [0.1.50](https://github.com/geops/rvf-mobility-web-component/compare/v0.1.49...v0.1.50) (2025-09-24)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* import manually the variables ([0f91e50](https://github.com/geops/rvf-mobility-web-component/commit/0f91e508610684c310658bf66f5dcefba3f537b5))
|
|
18
|
+
|
|
5
19
|
### [0.1.49](https://github.com/geops/rvf-mobility-web-component/compare/v0.1.48...v0.1.49) (2025-09-24)
|
|
6
20
|
|
|
7
21
|
|
package/index.js
CHANGED
|
@@ -1121,7 +1121,7 @@ sharing`,nextbike_df:"Frelo",yoio_freiburg:"Yoio",zeus_freiburg:"ZEUS"},JF="bicy
|
|
|
1121
1121
|
title: "Liniennetzpl\xE4ne", // Text displayed on the layer tree and in the header of the details view.
|
|
1122
1122
|
}
|
|
1123
1123
|
</pre>}`},layertree:{defaultValue:"true",description:"Show/hide the layers tree button in the toolbar.",type:"boolean"},mainlink:{description:"A link displayed on bottom left of the map."},mainlinktitle:{description:"A title for the mainlink, used as tooltip."},mapsurl:{defaultValue:"https://maps.geops.io",description:null},maxextent:{defaultValue:pu.join(","),description:"The maximum extent of the map in EPSG:3857 coordinates.<br/>Ex: 831634,5933959,940649,6173660 ."},maxzoom:{defaultValue:"20",description:"The maximal zoom level of the map."},minzoom:{description:"The minimal zoom level of the map."},mots:{description:null},notification:{defaultValue:"false",description:`Add the notification layer to the map. This layer will display informations about disruptions on the network. Data comes from
|
|
1124
|
-
our ${nP} .`,type:"boolean"},notificationat:{description:null},notificationtenant:{defaultValue:"rvf",description:null},notificationurl:{defaultValue:"https://moco.geops.io/api/v2/",description:`The ${nP} url to use.`},permalink:{defaultValue:"false",description:"Update some url parameters x,y,z,layers to the current window location. These parameters are used to store the current state of the map. They will be used on page load to configure the web-component.",type:"boolean"},print:{defaultValue:"true",description:"Show/hide the print button in the toolbar.",type:"boolean"},queryablelayers:{defaultValue:ZF,description:"A comma separated list of layers's name. The data of these layers will be queryable by click on the map (see selectedfeature event). If empty, all layers will not be queryable."},realtime:{defaultValue:"true",description:`Add the realtime layer to the map. Data comes from the ${v$} .`,type:"boolean"},realtimebboxparameters:{defaultValue:"line_tags=RVF",description:null},realtimetenant:{description:null},realtimeurl:{defaultValue:"wss://api.geops.io/tracker-ws/v1/ws",description:null},runs:{defaultValue:"false",description:"Shows the number of trips on a line in the sidebar, use only for debugging.",type:"boolean"},search:{defaultValue:"false",description:"Toggle the search stops input.",type:"boolean"},share:{defaultValue:"true",description:"Show/hide the share button in the toolbar.",type:"boolean"},stopsurl:{defaultValue:"https://api.geops.io/stops/v1/",description:null},tenant:{description:null},toolbar:{defaultValue:"false",description:"Show/hide the toolbar on the left.",type:"boolean"},zoom:{description:"The zoom level of the map."}},js=y$;function x$(r){let{apikey:t,baseLayer:e,map:n,notificationat:a,notificationtenant:i,notificationurl:c,previewNotifications:A}=it(),d=W5(()=>{if(!e)return null;let g=new fy({apiKey:t,apiParameters:{contentMedium:!0},date:a?new Date(a):void 0,maplibreLayer:e,name:zy,situations:A,tenant:i,url:c,...r||{},loadAll:!A});return A&&!g.getVisible()&&g.setVisible(!0),g},[t,e,a,i,c,A,r]);return s5(()=>{if(!(!n||!d))return n.addLayer(d),()=>{n.removeLayer(d)}},[n,d]),null}var Dy=m5(x$);function _$(r){let[t,e]=G5(),[n,a]=G5(),{children:i}=r;return s5(()=>()=>{n&&(n.style.height="",n.style.maxHeight="")},[n]),K("div",{ref:c=>{c&&(e(c),a(c.parentElement))},...r,onPointerDown:c=>{t.setPointerCapture(c.pointerId);let A=n.parentElement.getBoundingClientRect(),d=t.getBoundingClientRect(),g=A.top+(c.clientY-d.top);function m(T){n.style.height=`calc(100% - ${T.clientY-g}px)`,n.style.maxHeight="100%"}function x(T){T.target.releasePointerCapture(c.pointerId),document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",x)}document.addEventListener("pointerup",x),document.addEventListener("pointermove",m),document.addEventListener("pointercancel",T=>{document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",x),T.stopPropagation(),T.preventDefault()})},children:i})}var ky=_$;function w$({children:r,className:t,ScrollableHandlerProps:e={}}){let n=!!r;return Array.isArray(r)&&(n=r?.length&&(r||[]).find(a=>!!a)),n?K("div",{className:(ke("pointer-events-auto relative z-50 flex flex-col overflow-hidden bg-white transition-[min-height,max-height] @lg:transition-[width]"),t),children:n&&K($t,{children:[K(ky,{className:"absolute inset-0 flex h-[65px] touch-none justify-center @lg/main:hidden",style:{width:"100%"},...e,children:K("div",{className:"m-2 mr-[-60px] bg-gray-300",style:{borderRadius:2,height:4,width:32}})}),r]})}):null}var Zd=w$;var b$=async(r,t,e=0)=>{if(!r)return Promise.reject(new Error("No vehicle provided"));let{geometry:n,properties:{coordinate:a}}=r,i=t.getView(),c=e||i.getZoom(),A=c>0?i.getResolutionForZoom(c):void 0,d=a;if(!d&&n){let{coord:m}=Pc(Date.now(),r,!0);d=m}return d?(i.cancelAnimations(),new Promise(m=>{i.animate({center:d,duration:1e3,easing:ed,resolution:A},x=>{m(x)})})):Promise.reject(new Error("No center found"))},Zy=b$;var M$=(r,t=!1)=>{let e=Math.round(r/1e3/60);return e>5?"#dc2626":e>=3?"#ea580c":t?"#16a34a":"transparent"},gu=M$;var B$=(r,t,e)=>t?e?"#dc2626":"#a0a0a0":r===null?"transparent":gu(r,e),aP=B$;var S$=r=>`bold ${r}px arial`,oP=S$;var E$=r=>{let t=r;t<0&&(t=0);let e=Math.floor(t/36e5),n=Math.round(t%36e5/6e4),a="";return e>0&&(a+=`${e}h`),n>0&&(a+=`${n}m`),a||"0"},mu=E$;var T$=(r,t=!1)=>{if(t)return String.fromCodePoint(215);let e=mu(r);return e==="0"?"":`+${e}`},sP=T$;var I$=(r,t)=>`bold ${r}px arial`,Od=I$;var F$=(r="")=>r?.properties?.line?.name||r?.line?.name||r?.name||r||"",Ud=F$;var P$=16,R$=!1;function z$(r){let{apikey:t,baseLayer:e,isFollowing:n,isTracking:a,map:i,mots:c,realtimebboxparameters:A,realtimeurl:d,setIsFollowing:g,setIsTracking:m,setRealtimeLayer:x,setStation:T,setStopSequence:b,stationId:O,stopSequence:U,tenant:H,trainId:Q}=it(),q=W5(()=>!t||!d?null:new by({apiKey:t,bboxParameters:A?.split(" ").reduce((c1,g1)=>{if(!g1)return c1;let[_1,w1]=g1.split("=");return c1[_1]=w1,c1},{}),getMotsByZoom:c?()=>c.split(","):void 0,isQueryable:!0,name:Lu,tenant:H,url:d,zIndex:1,...r,styleOptions:{getDelayColor:aP,getDelayFont:oP,getDelayText:sP,getText:Ud,getTextFont:Od,...r?.styleOptions||{}}}),[t,d,A,c,H,r]);return s5(()=>{if(!(!i||!q))return i.getView()?.getCenter()?i.addLayer(q):i.once("moveend",()=>{i.addLayer(q)}),x(q),()=>{i.removeLayer(q),x(null)}},[i,x,q]),s5(()=>{U||g(!1)},[U,g]),s5(()=>{let e1=[];return a&&g(!1),()=>{je(e1)}},[a,g]),s5(()=>{if(!i)return;let e1=null;return e1=i.getView().on("change:center",c1=>{c1.target.getInteracting()&&(g(!1),m(!1))}),()=>{je(e1)}},[i,g,m]),s5(()=>{let e1=null;return q&&(q.engine.useThrottle=!n,q.engine.isUpdateBboxOnMoveEnd=!n,q.allowRenderWhenAnimating=!!n),!n||!U||!i||!q?void 0:(m(!1),(async g1=>{let _1=g1&&q?.trajectories?.[g1];_1||(_1=(await q.api.getTrajectory(U.id,q.mode))?.content),await Zy(_1,i,P$)===!0&&(e1=setInterval(()=>{Zy(q?.trajectories?.[U.id],i)},1e3))})(U.id),()=>{clearInterval(e1)})},[n,i,q,U,m]),s5(()=>{if(Q){let e1=q?.trajectories?.[Q]?.properties?.coordinate;e1&&i.getView().setCenter(e1)}},[i,Q,q]),s5(()=>{if(!(!O||!q?.api))return q?.api?.subscribe(`station ${O}`,({content:e1})=>{e1&&T(e1)}),()=>{T(null),O&&q?.api?.unsubscribe(`station ${O}`)}},[O,q?.api,T]),s5(()=>{if(!(!Q||!q?.api))return q.selectedVehicleId=Q,q.highlightTrajectory(Q).catch(e1=>{console.error("Error highlighting trajectory:",e1)}),q?.api?.subscribeStopSequence(Q,({content:e1})=>{if(e1){let[c1]=e1;c1&&b(c1)}}),()=>{b(null),Q&&q&&(q.api?.unsubscribeStopSequence(Q),q.selectedVehicleId=null,q.vectorLayer.getSource().clear())}},[Q,q,q?.api,b]),s5(()=>{if(!i||!e||!R$)return;let e1=i.once("rendercomplete",()=>{let c1=e.mapLibreMap?.getStyle()?.metadata,g1=[];for(let _1=0;_1<26;_1++)g1.push(Qs(_1,c1?.graphs));q.engine.graphByZoom=g1,q.engine.setBbox()});return()=>{je(e1)}},[i,e,q]),null}var Oy=m5(z$);var Uy="units",D$=[1,2,5],vu=25.4/.28,Ny=class extends Wr{constructor(t){t=t||{};let e=document.createElement("div");e.style.pointerEvents="none",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un;let n=t.className!==void 0?t.className:t.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=n+"-inner",this.element.className=n+" "+Vi,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=t.minWidth!==void 0?t.minWidth:64,this.maxWidth_=t.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(Uy,this.handleUnitsChanged_),this.setUnits(t.units||"metric"),this.scaleBar_=t.bar||!1,this.scaleBarSteps_=t.steps||4,this.scaleBarText_=t.text||!1,this.dpi_=t.dpi||void 0}getUnits(){return this.get(Uy)}handleUnitsChanged_(){this.updateElement_()}setUnits(t){this.set(Uy,t)}setDpi(t){this.dpi_=t}updateElement_(){let t=this.viewState_;if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}let e=t.center,n=t.projection,a=this.getUnits(),i=a=="degrees"?"degrees":"m",c=vg(n,t.resolution,e,i),A=this.minWidth_*(this.dpi_||vu)/vu,d=this.maxWidth_!==void 0?this.maxWidth_*(this.dpi_||vu)/vu:void 0,g=A*c,m="";if(a=="degrees"){let e1=U4.degrees;g*=e1,g<e1/60?(m="\u2033",c*=3600):g<e1?(m="\u2032",c*=60):m="\xB0"}else if(a=="imperial")g<.9144?(m="in",c/=.0254):g<1609.344?(m="ft",c/=.3048):(m="mi",c/=1609.344);else if(a=="nautical")c/=1852,m="NM";else if(a=="metric")g<1e-6?(m="nm",c*=1e9):g<.001?(m="\u03BCm",c*=1e6):g<1?(m="mm",c*=1e3):g<1e3?m="m":(m="km",c/=1e3);else if(a=="us")g<.9144?(m="in",c*=39.37):g<1609.344?(m="ft",c/=.30480061):(m="mi",c/=1609.3472);else throw new Error("Invalid units");let x=3*Math.floor(Math.log(A*c)/Math.log(10)),T,b,O,U=0,H,Q;for(;;){O=Math.floor(x/3);let e1=Math.pow(10,O);if(T=D$[(x%3+3)%3]*e1,b=Math.round(T/c),isNaN(b)){this.element.style.display="none",this.renderedVisible_=!1;return}if(d!==void 0&&b>=d){T=U,b=H,O=Q;break}else if(b>=A)break;U=T,H=b,Q=O,++x}let q=this.scaleBar_?this.createScaleBar(b,T,m):T.toFixed(O<0?-O:0)+" "+m;this.renderedHTML_!=q&&(this.innerElement_.innerHTML=q,this.renderedHTML_=q),this.renderedWidth_!=b&&(this.innerElement_.style.width=b+"px",this.renderedWidth_=b),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(t,e,n){let a=this.getScaleForResolution(),i=a<1?Math.round(1/a).toLocaleString()+" : 1":"1 : "+Math.round(a).toLocaleString(),c=this.scaleBarSteps_,A=t/c,d=[this.createMarker("absolute")];for(let m=0;m<c;++m){let x=m%2===0?"ol-scale-singlebar-odd":"ol-scale-singlebar-even";d.push(`<div><div class="ol-scale-singlebar ${x}" style="width: ${A}px;"></div>`+this.createMarker("relative")+(m%2===0||c===2?this.createStepText(m,t,!1,e,n):"")+"</div>")}return d.push(this.createStepText(c,t,!0,e,n)),(this.scaleBarText_?`<div class="ol-scale-text" style="width: ${t}px;">`+i+"</div>":"")+d.join("")}createMarker(t){return`<div class="ol-scale-step-marker" style="position: ${t}; top: ${t==="absolute"?3:-10}px;"></div>`}createStepText(t,e,n,a,i){let A=(t===0?0:Math.round(a/this.scaleBarSteps_*t*100)/100)+(t===0?"":" "+i),d=t===0?-3:e/this.scaleBarSteps_*-1,g=t===0?0:e/this.scaleBarSteps_*2;return`<div class="ol-scale-step-text" style="margin-left: ${d}px;text-align: ${t===0?"left":"center"};min-width: ${g}px;left: ${n?e+"px":"unset"};">`+A+"</div>"}getScaleForResolution(){let t=vg(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m"),e=this.dpi_||vu,n=1e3/25.4;return t*n*e}render(t){let e=t.frameState;e?this.viewState_=e.viewState:this.viewState_=null,this.updateElement_()}},lP=Ny;var Qy=class extends Wr{dragPan;icon;onPointerDragRef;text;constructor(t={}){let e=document.createElement("div");e.className=t.className!==void 0?t.className:"ol-drag-pan-warning",e.style.display="none",e.style.pointerEvents="auto",super({element:e,render:t.render,target:t.target}),this.icon=document.createElement("div"),this.icon.className=`${e.className}-icon`,this.icon.innerHTML=`
|
|
1124
|
+
our ${nP} .`,type:"boolean"},notificationat:{description:null},notificationtenant:{defaultValue:"rvf",description:null},notificationurl:{defaultValue:"https://moco.geops.io/api/v2/",description:`The ${nP} url to use.`},permalink:{defaultValue:"false",description:"Update some url parameters x,y,z,layers to the current window location. These parameters are used to store the current state of the map. They will be used on page load to configure the web-component.",type:"boolean"},print:{defaultValue:"true",description:"Show/hide the print button in the toolbar.",type:"boolean"},queryablelayers:{defaultValue:ZF,description:"A comma separated list of layers's name. The data of these layers will be queryable by click on the map (see selectedfeature event). If empty, all layers will not be queryable."},realtime:{defaultValue:"true",description:`Add the realtime layer to the map. Data comes from the ${v$} .`,type:"boolean"},realtimebboxparameters:{defaultValue:"line_tags=RVF",description:null},realtimetenant:{description:null},realtimeurl:{defaultValue:"wss://api.geops.io/tracker-ws/v1/ws",description:null},runs:{defaultValue:"false",description:"Shows the number of trips on a line in the sidebar, use only for debugging.",type:"boolean"},search:{defaultValue:"false",description:"Toggle the search stops input.",type:"boolean"},share:{defaultValue:"true",description:"Show/hide the share button in the toolbar.",type:"boolean"},stopsurl:{defaultValue:"https://api.geops.io/stops/v1/",description:null},tenant:{description:null},toolbar:{defaultValue:"true",description:"Show/hide the toolbar on the top left.",type:"boolean"},zoom:{description:"The zoom level of the map."}},js=y$;function x$(r){let{apikey:t,baseLayer:e,map:n,notificationat:a,notificationtenant:i,notificationurl:c,previewNotifications:A}=it(),d=W5(()=>{if(!e)return null;let g=new fy({apiKey:t,apiParameters:{contentMedium:!0},date:a?new Date(a):void 0,maplibreLayer:e,name:zy,situations:A,tenant:i,url:c,...r||{},loadAll:!A});return A&&!g.getVisible()&&g.setVisible(!0),g},[t,e,a,i,c,A,r]);return s5(()=>{if(!(!n||!d))return n.addLayer(d),()=>{n.removeLayer(d)}},[n,d]),null}var Dy=m5(x$);function _$(r){let[t,e]=G5(),[n,a]=G5(),{children:i}=r;return s5(()=>()=>{n&&(n.style.height="",n.style.maxHeight="")},[n]),K("div",{ref:c=>{c&&(e(c),a(c.parentElement))},...r,onPointerDown:c=>{t.setPointerCapture(c.pointerId);let A=n.parentElement.getBoundingClientRect(),d=t.getBoundingClientRect(),g=A.top+(c.clientY-d.top);function m(T){n.style.height=`calc(100% - ${T.clientY-g}px)`,n.style.maxHeight="100%"}function x(T){T.target.releasePointerCapture(c.pointerId),document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",x)}document.addEventListener("pointerup",x),document.addEventListener("pointermove",m),document.addEventListener("pointercancel",T=>{document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",x),T.stopPropagation(),T.preventDefault()})},children:i})}var ky=_$;function w$({children:r,className:t,ScrollableHandlerProps:e={}}){let n=!!r;return Array.isArray(r)&&(n=r?.length&&(r||[]).find(a=>!!a)),n?K("div",{className:(ke("pointer-events-auto relative z-50 flex flex-col overflow-hidden bg-white transition-[min-height,max-height] @lg:transition-[width]"),t),children:n&&K($t,{children:[K(ky,{className:"absolute inset-0 flex h-[65px] touch-none justify-center @lg/main:hidden",style:{width:"100%"},...e,children:K("div",{className:"m-2 mr-[-60px] bg-gray-300",style:{borderRadius:2,height:4,width:32}})}),r]})}):null}var Zd=w$;var b$=async(r,t,e=0)=>{if(!r)return Promise.reject(new Error("No vehicle provided"));let{geometry:n,properties:{coordinate:a}}=r,i=t.getView(),c=e||i.getZoom(),A=c>0?i.getResolutionForZoom(c):void 0,d=a;if(!d&&n){let{coord:m}=Pc(Date.now(),r,!0);d=m}return d?(i.cancelAnimations(),new Promise(m=>{i.animate({center:d,duration:1e3,easing:ed,resolution:A},x=>{m(x)})})):Promise.reject(new Error("No center found"))},Zy=b$;var M$=(r,t=!1)=>{let e=Math.round(r/1e3/60);return e>5?"#dc2626":e>=3?"#ea580c":t?"#16a34a":"transparent"},gu=M$;var B$=(r,t,e)=>t?e?"#dc2626":"#a0a0a0":r===null?"transparent":gu(r,e),aP=B$;var S$=r=>`bold ${r}px arial`,oP=S$;var E$=r=>{let t=r;t<0&&(t=0);let e=Math.floor(t/36e5),n=Math.round(t%36e5/6e4),a="";return e>0&&(a+=`${e}h`),n>0&&(a+=`${n}m`),a||"0"},mu=E$;var T$=(r,t=!1)=>{if(t)return String.fromCodePoint(215);let e=mu(r);return e==="0"?"":`+${e}`},sP=T$;var I$=(r,t)=>`bold ${r}px arial`,Od=I$;var F$=(r="")=>r?.properties?.line?.name||r?.line?.name||r?.name||r||"",Ud=F$;var P$=16,R$=!1;function z$(r){let{apikey:t,baseLayer:e,isFollowing:n,isTracking:a,map:i,mots:c,realtimebboxparameters:A,realtimeurl:d,setIsFollowing:g,setIsTracking:m,setRealtimeLayer:x,setStation:T,setStopSequence:b,stationId:O,stopSequence:U,tenant:H,trainId:Q}=it(),q=W5(()=>!t||!d?null:new by({apiKey:t,bboxParameters:A?.split(" ").reduce((c1,g1)=>{if(!g1)return c1;let[_1,w1]=g1.split("=");return c1[_1]=w1,c1},{}),getMotsByZoom:c?()=>c.split(","):void 0,isQueryable:!0,name:Lu,tenant:H,url:d,zIndex:1,...r,styleOptions:{getDelayColor:aP,getDelayFont:oP,getDelayText:sP,getText:Ud,getTextFont:Od,...r?.styleOptions||{}}}),[t,d,A,c,H,r]);return s5(()=>{if(!(!i||!q))return i.getView()?.getCenter()?i.addLayer(q):i.once("moveend",()=>{i.addLayer(q)}),x(q),()=>{i.removeLayer(q),x(null)}},[i,x,q]),s5(()=>{U||g(!1)},[U,g]),s5(()=>{let e1=[];return a&&g(!1),()=>{je(e1)}},[a,g]),s5(()=>{if(!i)return;let e1=null;return e1=i.getView().on("change:center",c1=>{c1.target.getInteracting()&&(g(!1),m(!1))}),()=>{je(e1)}},[i,g,m]),s5(()=>{let e1=null;return q&&(q.engine.useThrottle=!n,q.engine.isUpdateBboxOnMoveEnd=!n,q.allowRenderWhenAnimating=!!n),!n||!U||!i||!q?void 0:(m(!1),(async g1=>{let _1=g1&&q?.trajectories?.[g1];_1||(_1=(await q.api.getTrajectory(U.id,q.mode))?.content),await Zy(_1,i,P$)===!0&&(e1=setInterval(()=>{Zy(q?.trajectories?.[U.id],i)},1e3))})(U.id),()=>{clearInterval(e1)})},[n,i,q,U,m]),s5(()=>{if(Q){let e1=q?.trajectories?.[Q]?.properties?.coordinate;e1&&i.getView().setCenter(e1)}},[i,Q,q]),s5(()=>{if(!(!O||!q?.api))return q?.api?.subscribe(`station ${O}`,({content:e1})=>{e1&&T(e1)}),()=>{T(null),O&&q?.api?.unsubscribe(`station ${O}`)}},[O,q?.api,T]),s5(()=>{if(!(!Q||!q?.api))return q.selectedVehicleId=Q,q.highlightTrajectory(Q).catch(e1=>{console.error("Error highlighting trajectory:",e1)}),q?.api?.subscribeStopSequence(Q,({content:e1})=>{if(e1){let[c1]=e1;c1&&b(c1)}}),()=>{b(null),Q&&q&&(q.api?.unsubscribeStopSequence(Q),q.selectedVehicleId=null,q.vectorLayer.getSource().clear())}},[Q,q,q?.api,b]),s5(()=>{if(!i||!e||!R$)return;let e1=i.once("rendercomplete",()=>{let c1=e.mapLibreMap?.getStyle()?.metadata,g1=[];for(let _1=0;_1<26;_1++)g1.push(Qs(_1,c1?.graphs));q.engine.graphByZoom=g1,q.engine.setBbox()});return()=>{je(e1)}},[i,e,q]),null}var Oy=m5(z$);var Uy="units",D$=[1,2,5],vu=25.4/.28,Ny=class extends Wr{constructor(t){t=t||{};let e=document.createElement("div");e.style.pointerEvents="none",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un;let n=t.className!==void 0?t.className:t.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=n+"-inner",this.element.className=n+" "+Vi,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=t.minWidth!==void 0?t.minWidth:64,this.maxWidth_=t.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(Uy,this.handleUnitsChanged_),this.setUnits(t.units||"metric"),this.scaleBar_=t.bar||!1,this.scaleBarSteps_=t.steps||4,this.scaleBarText_=t.text||!1,this.dpi_=t.dpi||void 0}getUnits(){return this.get(Uy)}handleUnitsChanged_(){this.updateElement_()}setUnits(t){this.set(Uy,t)}setDpi(t){this.dpi_=t}updateElement_(){let t=this.viewState_;if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}let e=t.center,n=t.projection,a=this.getUnits(),i=a=="degrees"?"degrees":"m",c=vg(n,t.resolution,e,i),A=this.minWidth_*(this.dpi_||vu)/vu,d=this.maxWidth_!==void 0?this.maxWidth_*(this.dpi_||vu)/vu:void 0,g=A*c,m="";if(a=="degrees"){let e1=U4.degrees;g*=e1,g<e1/60?(m="\u2033",c*=3600):g<e1?(m="\u2032",c*=60):m="\xB0"}else if(a=="imperial")g<.9144?(m="in",c/=.0254):g<1609.344?(m="ft",c/=.3048):(m="mi",c/=1609.344);else if(a=="nautical")c/=1852,m="NM";else if(a=="metric")g<1e-6?(m="nm",c*=1e9):g<.001?(m="\u03BCm",c*=1e6):g<1?(m="mm",c*=1e3):g<1e3?m="m":(m="km",c/=1e3);else if(a=="us")g<.9144?(m="in",c*=39.37):g<1609.344?(m="ft",c/=.30480061):(m="mi",c/=1609.3472);else throw new Error("Invalid units");let x=3*Math.floor(Math.log(A*c)/Math.log(10)),T,b,O,U=0,H,Q;for(;;){O=Math.floor(x/3);let e1=Math.pow(10,O);if(T=D$[(x%3+3)%3]*e1,b=Math.round(T/c),isNaN(b)){this.element.style.display="none",this.renderedVisible_=!1;return}if(d!==void 0&&b>=d){T=U,b=H,O=Q;break}else if(b>=A)break;U=T,H=b,Q=O,++x}let q=this.scaleBar_?this.createScaleBar(b,T,m):T.toFixed(O<0?-O:0)+" "+m;this.renderedHTML_!=q&&(this.innerElement_.innerHTML=q,this.renderedHTML_=q),this.renderedWidth_!=b&&(this.innerElement_.style.width=b+"px",this.renderedWidth_=b),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(t,e,n){let a=this.getScaleForResolution(),i=a<1?Math.round(1/a).toLocaleString()+" : 1":"1 : "+Math.round(a).toLocaleString(),c=this.scaleBarSteps_,A=t/c,d=[this.createMarker("absolute")];for(let m=0;m<c;++m){let x=m%2===0?"ol-scale-singlebar-odd":"ol-scale-singlebar-even";d.push(`<div><div class="ol-scale-singlebar ${x}" style="width: ${A}px;"></div>`+this.createMarker("relative")+(m%2===0||c===2?this.createStepText(m,t,!1,e,n):"")+"</div>")}return d.push(this.createStepText(c,t,!0,e,n)),(this.scaleBarText_?`<div class="ol-scale-text" style="width: ${t}px;">`+i+"</div>":"")+d.join("")}createMarker(t){return`<div class="ol-scale-step-marker" style="position: ${t}; top: ${t==="absolute"?3:-10}px;"></div>`}createStepText(t,e,n,a,i){let A=(t===0?0:Math.round(a/this.scaleBarSteps_*t*100)/100)+(t===0?"":" "+i),d=t===0?-3:e/this.scaleBarSteps_*-1,g=t===0?0:e/this.scaleBarSteps_*2;return`<div class="ol-scale-step-text" style="margin-left: ${d}px;text-align: ${t===0?"left":"center"};min-width: ${g}px;left: ${n?e+"px":"unset"};">`+A+"</div>"}getScaleForResolution(){let t=vg(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m"),e=this.dpi_||vu,n=1e3/25.4;return t*n*e}render(t){let e=t.frameState;e?this.viewState_=e.viewState:this.viewState_=null,this.updateElement_()}},lP=Ny;var Qy=class extends Wr{dragPan;icon;onPointerDragRef;text;constructor(t={}){let e=document.createElement("div");e.className=t.className!==void 0?t.className:"ol-drag-pan-warning",e.style.display="none",e.style.pointerEvents="auto",super({element:e,render:t.render,target:t.target}),this.icon=document.createElement("div"),this.icon.className=`${e.className}-icon`,this.icon.innerHTML=`
|
|
1125
1125
|
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
|
|
1126
1126
|
<path fill="none" stroke="currentColor" stroke-width="2" d="M22.999,25 L22.997,13.002 C22.997,11.896 23.893,11 24.999,11 C26.105,11 27.001,11.896 27.001,13.002 L26.999,26.002 M31,25.003 C31,23.897 31.896,23.001 33.002,23.001 C34.11,23.001 35.006,23.897 35.006,25.003 C35.006,25.003 35,26.125 35,32.001 C35,37.875 33.2,41.001 33.2,41.001 L19,41.001 C19,41.001 12.21,29.483 11.586,28.419 C10.962,27.355 10.804,26.369 11.586,25.587 C12.37,24.805 13.636,24.805 14.418,25.587 L18.998,30.169 L19,30.169 L19,25.001 L18.996,15.003 C18.996,13.897 19.894,13.001 21,13.001 C22.106,13.001 23.002,13.897 23.002,15.003 L23,26.015 M26.9942,22.997 C26.9942,21.891 27.8902,20.995 28.9962,20.995 C30.1042,20.995 31.0002,21.891 31.0002,22.997 L31.0002,26.001 M30,16.3046 C30.632,15.3606 31,14.2246 31,13.0006 C31,9.6846 28.314,7.0006 25,7.0006 C23.208,7.0006 21.616,7.8026 20.518,9.0486 C17.432,9.2986 15,11.8506 15,15.0006 C15,16.2166 15.368,17.3426 15.988,18.2866"/>
|
|
1127
1127
|
</svg>
|
|
@@ -3452,7 +3452,54 @@ html {
|
|
|
3452
3452
|
flex-direction: column;
|
|
3453
3453
|
padding: 25px;
|
|
3454
3454
|
z-index: 100000;
|
|
3455
|
-
}`;var wH={bus:25,coach:15,train:30,tram:20},Di1={mapLibreOptions:{maxCanvasSize:[2e4,2e4],preserveDrawingBuffer:!0}},ki1={},bH={style:{width:"calc(100% - 60px)"}},Zi1={fullTrajectoryStyle:oH,getMotsByZoom:r=>r<9?["rail"]:null,sort:({properties:{delay:r,type:t}},{properties:{delay:e,type:n}})=>t!==n?wH[t]<wH[n]?-1:1:r===e?0:r<e?-1:1,style:yH,styleOptions:{getBgColor:aa,getMaxRadiusForStrokeAndDelay:()=>4,getMaxRadiusForText:()=>8,getRadius:sH,getTextColor:Qd}};function Oi1(r){let t=j9(),[e,n]=G5(),[a,i]=G5(!1),[c,A]=G5(!1),[d,g]=G5(),[m,x]=G5(),[T,b]=G5(),[O,U]=G5(),[H,Q]=G5(),[q,e1]=G5(),[c1,g1]=G5(),[_1,w1]=G5(!1),[h1,S1]=G5(!1),[G1,A1]=G5(),[p1,Z1]=G5(),[B1,e2]=G5(!1),[Y1,H1]=G5(!1),[T1,o2]=G5(),[g2,N2]=G5(),[a1,I1]=G5(),[U1,r2]=G5(),[c2,C2]=G5(),[_2,B2]=G5(),{details:q2,embed:U2,geolocation:X2,layers:A5,layertree:z5,mainlink:Z2,mainlinktitle:K1,notification:O5,permalink:D5,print:Y2,realtime:u5,search:d5,share:i5,tenant:w5,toolbar:E5}=r,et=W5(()=>E5==="true",[E5]),Q2=W5(()=>z5==="true",[z5]),F1=W5(()=>u5==="true",[u5]),o1=W5(()=>O5==="true"||!!_2,[O5,_2]),n1=W5(()=>X2==="true",[X2]),f1=W5(()=>d5==="true",[d5]),b1=W5(()=>i5==="true",[i5]),V1=W5(()=>Y2==="true",[Y2]),J1=W5(()=>q2==="true",[q2]),v2=W5(()=>U2==="true",[U2]);cH(H,A5),AH(H,D5==="true",t);let a2=W5(()=>({...r,baseLayer:e,geolocation:X2,isFollowing:a,isTracking:c,map:H,previewNotifications:_2,realtimeLayer:O,setBaseLayer:n,setIsFollowing:i,setIsTracking:A,setMap:Q,setPreviewNotifications:B2,setRealtimeLayer:U,setStation:b,setStationId:e1,setStationsLayer:x,setStopSequence:g,setTrainId:g1,station:T,stationId:q,stationsLayer:m,stopSequence:d,trainId:c1}),[r,e,X2,a,c,H,_2,O,T,q,m,d,c1]),x2=W5(()=>({isExportMenuOpen:_1,isLayerTreeOpen:B1,isSearchOpen:Y1,isShareMenuOpen:h1,layertree:z5,lineNetworkPlanLayer:U1,poisLayer:a1,previewNotifications:_2,selectedFeature:G1,selectedFeatures:p1,sellingPointsLayer:T1,setIsExportMenuOpen:w1,setIsLayerTreeOpen:e2,setIsSearchOpen:H1,setIsShareMenuOpen:S1,setLineNetworkPlanLayer:r2,setPoisLayer:I1,setSelectedFeature:A1,setSelectedFeatures:Z1,setSellingPointsLayer:o2,setSharedMobilityLayerGroup:C2,setTarifZonenLayer:N2,sharedMobilityLayerGroup:c2,tarifZonenLayer:g2}),[_1,B1,Y1,h1,z5,U1,a1,_2,G1,p1,T1,c2,g2]),j2=W5(()=>({format:n2=>{let U5=[],N5=!1;return n2.forEach(C5=>{/geops/i.test(C5)?N5||(N5=!0,U5.push(C5)):/(sbb|rvf)/i.test(C5)||U5.push(C5)}),U5.join(" | ")}}),[]),T2=W5(()=>({layersFilter:({metadata:n2})=>n2?.["general.filter"]==="stations"}),[]);s5(()=>{Y1&&(e2(!1),w1(!1),S1(!1),e1(null),g1(null),A1(null))},[Y1]),s5(()=>{h1&&(e2(!1),w1(!1),H1(!1),e1(null),g1(null),A1(null))},[h1]),s5(()=>{B1&&(w1(!1),e2(B1),H1(!1),A1(null),g1(null),e1(null),S1(!1))},[B1]),s5(()=>{_1&&(e2(!1),w1(_1),H1(!1),A1(null),g1(null),S1(!1),e1(null))},[_1]),s5(()=>{G1&&(e2(!1),H1(!1),w1(!1),g1(null),S1(!1),e1(null))},[G1]),s5(()=>{q&&(e2(!1),w1(!1),H1(!1),g1(null),S1(!1),A1(null))},[q]),s5(()=>{c1&&(e2(!1),w1(!1),H1(!1),e1(null),S1(!1),A1(null))},[c1]);let y5=W5(()=>J1&&!!G1||V1&&_1||Q2&&B1||b1&&h1||F1&&!!c1||w5&&!!q,[J1,G1,V1,_1,Q2,B1,b1,h1,F1,c1,w5,q]);return K(yu.Provider,{value:fp,children:[K("style",{children
|
|
3455
|
+
}`;var wH={bus:25,coach:15,train:30,tram:20},Di1={mapLibreOptions:{maxCanvasSize:[2e4,2e4],preserveDrawingBuffer:!0}},ki1={},bH={style:{width:"calc(100% - 60px)"}},Zi1={fullTrajectoryStyle:oH,getMotsByZoom:r=>r<9?["rail"]:null,sort:({properties:{delay:r,type:t}},{properties:{delay:e,type:n}})=>t!==n?wH[t]<wH[n]?-1:1:r===e?0:r<e?-1:1,style:yH,styleOptions:{getBgColor:aa,getMaxRadiusForStrokeAndDelay:()=>4,getMaxRadiusForText:()=>8,getRadius:sH,getTextColor:Qd}};function Oi1(r){let t=j9(),[e,n]=G5(),[a,i]=G5(!1),[c,A]=G5(!1),[d,g]=G5(),[m,x]=G5(),[T,b]=G5(),[O,U]=G5(),[H,Q]=G5(),[q,e1]=G5(),[c1,g1]=G5(),[_1,w1]=G5(!1),[h1,S1]=G5(!1),[G1,A1]=G5(),[p1,Z1]=G5(),[B1,e2]=G5(!1),[Y1,H1]=G5(!1),[T1,o2]=G5(),[g2,N2]=G5(),[a1,I1]=G5(),[U1,r2]=G5(),[c2,C2]=G5(),[_2,B2]=G5(),{details:q2,embed:U2,geolocation:X2,layers:A5,layertree:z5,mainlink:Z2,mainlinktitle:K1,notification:O5,permalink:D5,print:Y2,realtime:u5,search:d5,share:i5,tenant:w5,toolbar:E5}=r,et=W5(()=>E5==="true",[E5]),Q2=W5(()=>z5==="true",[z5]),F1=W5(()=>u5==="true",[u5]),o1=W5(()=>O5==="true"||!!_2,[O5,_2]),n1=W5(()=>X2==="true",[X2]),f1=W5(()=>d5==="true",[d5]),b1=W5(()=>i5==="true",[i5]),V1=W5(()=>Y2==="true",[Y2]),J1=W5(()=>q2==="true",[q2]),v2=W5(()=>U2==="true",[U2]);cH(H,A5),AH(H,D5==="true",t);let a2=W5(()=>({...r,baseLayer:e,geolocation:X2,isFollowing:a,isTracking:c,map:H,previewNotifications:_2,realtimeLayer:O,setBaseLayer:n,setIsFollowing:i,setIsTracking:A,setMap:Q,setPreviewNotifications:B2,setRealtimeLayer:U,setStation:b,setStationId:e1,setStationsLayer:x,setStopSequence:g,setTrainId:g1,station:T,stationId:q,stationsLayer:m,stopSequence:d,trainId:c1}),[r,e,X2,a,c,H,_2,O,T,q,m,d,c1]),x2=W5(()=>({isExportMenuOpen:_1,isLayerTreeOpen:B1,isSearchOpen:Y1,isShareMenuOpen:h1,layertree:z5,lineNetworkPlanLayer:U1,poisLayer:a1,previewNotifications:_2,selectedFeature:G1,selectedFeatures:p1,sellingPointsLayer:T1,setIsExportMenuOpen:w1,setIsLayerTreeOpen:e2,setIsSearchOpen:H1,setIsShareMenuOpen:S1,setLineNetworkPlanLayer:r2,setPoisLayer:I1,setSelectedFeature:A1,setSelectedFeatures:Z1,setSellingPointsLayer:o2,setSharedMobilityLayerGroup:C2,setTarifZonenLayer:N2,sharedMobilityLayerGroup:c2,tarifZonenLayer:g2}),[_1,B1,Y1,h1,z5,U1,a1,_2,G1,p1,T1,c2,g2]),j2=W5(()=>({format:n2=>{let U5=[],N5=!1;return n2.forEach(C5=>{/geops/i.test(C5)?N5||(N5=!0,U5.push(C5)):/(sbb|rvf)/i.test(C5)||U5.push(C5)}),U5.join(" | ")}}),[]),T2=W5(()=>({layersFilter:({metadata:n2})=>n2?.["general.filter"]==="stations"}),[]);s5(()=>{Y1&&(e2(!1),w1(!1),S1(!1),e1(null),g1(null),A1(null))},[Y1]),s5(()=>{h1&&(e2(!1),w1(!1),H1(!1),e1(null),g1(null),A1(null))},[h1]),s5(()=>{B1&&(w1(!1),e2(B1),H1(!1),A1(null),g1(null),e1(null),S1(!1))},[B1]),s5(()=>{_1&&(e2(!1),w1(_1),H1(!1),A1(null),g1(null),S1(!1),e1(null))},[_1]),s5(()=>{G1&&(e2(!1),H1(!1),w1(!1),g1(null),S1(!1),e1(null))},[G1]),s5(()=>{q&&(e2(!1),w1(!1),H1(!1),g1(null),S1(!1),A1(null))},[q]),s5(()=>{c1&&(e2(!1),w1(!1),H1(!1),e1(null),S1(!1),A1(null))},[c1]);let y5=W5(()=>J1&&!!G1||V1&&_1||Q2&&B1||b1&&h1||F1&&!!c1||w5&&!!q,[J1,G1,V1,_1,Q2,B1,b1,h1,F1,c1,w5,q]);return K(yu.Provider,{value:fp,children:[K("style",{children:`:host {
|
|
3456
|
+
--tw-divide-y-reverse: 0;
|
|
3457
|
+
--tw-border-style: solid;
|
|
3458
|
+
--tw-font-weight: initial;
|
|
3459
|
+
--tw-tracking: initial;
|
|
3460
|
+
--tw-translate-x: 0;
|
|
3461
|
+
--tw-translate-y: 0;
|
|
3462
|
+
--tw-translate-z: 0;
|
|
3463
|
+
--tw-rotate-x: rotateX(0);
|
|
3464
|
+
--tw-rotate-y: rotateY(0);
|
|
3465
|
+
--tw-rotate-z: rotateZ(0);
|
|
3466
|
+
--tw-skew-x: skewX(0);
|
|
3467
|
+
--tw-skew-y: skewY(0);
|
|
3468
|
+
--tw-space-x-reverse: 0;
|
|
3469
|
+
--tw-gradient-position: initial;
|
|
3470
|
+
--tw-gradient-from: #0000;
|
|
3471
|
+
--tw-gradient-via: #0000;
|
|
3472
|
+
--tw-gradient-to: #0000;
|
|
3473
|
+
--tw-gradient-stops: initial;
|
|
3474
|
+
--tw-gradient-via-stops: initial;
|
|
3475
|
+
--tw-gradient-from-position: 0%;
|
|
3476
|
+
--tw-gradient-via-position: 50%;
|
|
3477
|
+
--tw-gradient-to-position: 100%;
|
|
3478
|
+
--tw-shadow: 0 0 #0000;
|
|
3479
|
+
--tw-shadow-color: initial;
|
|
3480
|
+
--tw-inset-shadow: 0 0 #0000;
|
|
3481
|
+
--tw-inset-shadow-color: initial;
|
|
3482
|
+
--tw-ring-color: initial;
|
|
3483
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
3484
|
+
--tw-inset-ring-color: initial;
|
|
3485
|
+
--tw-inset-ring-shadow: 0 0 #0000;
|
|
3486
|
+
--tw-ring-inset: initial;
|
|
3487
|
+
--tw-ring-offset-width: 0px;
|
|
3488
|
+
--tw-ring-offset-color: #fff;
|
|
3489
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
3490
|
+
--tw-blur: initial;
|
|
3491
|
+
--tw-brightness: initial;
|
|
3492
|
+
--tw-contrast: initial;
|
|
3493
|
+
--tw-grayscale: initial;
|
|
3494
|
+
--tw-hue-rotate: initial;
|
|
3495
|
+
--tw-invert: initial;
|
|
3496
|
+
--tw-opacity: initial;
|
|
3497
|
+
--tw-saturate: initial;
|
|
3498
|
+
--tw-sepia: initial;
|
|
3499
|
+
--tw-drop-shadow: initial;
|
|
3500
|
+
--tw-duration: initial;
|
|
3501
|
+
--tw-ease: initial;
|
|
3502
|
+
}`}),K("style",{children:gp}),K("style",{children:_H}),K(By.Provider,{value:a2,children:K(Vy.Provider,{value:x2,children:[K(Ry,{node:t.current,wcAttributes:r}),K(GM,{eventNode:t.current}),K("div",{className:"@container/main relative size-full overflow-hidden font-sans",ref:t,style:ki1,children:K("div",{className:"relative flex size-full flex-col text-base @lg/main:flex-row-reverse",children:[K(Fy,{className:"relative flex-1 overflow-visible",children:[K(Sy,{...Di1}),K(Cp,{eventNode:t.current}),v2&&K(uP,{}),o1&&K(Dy,{isQueryable:!0,title:x3.meldungen}),K(_M,{}),F1&&K(Oy,{title:x3.echtzeit,...Zi1}),K(DM,{minZoom:10,title:x3.haltestellen,...T2}),K(IM,{title:x3.tarifzonen}),K(wM,{isQueryable:!0,title:x3.verkaufsstellen}),K(Ky,{isQueryable:!0,title:x3.liniennetz}),K(yM,{title:x3.pois}),K(SM,{title:x3.sharedMobility}),Z2&&K(C6,{className:"absolute inset-x-2 bottom-8 z-10 rounded-xl border-3 border-white",href:Z2,target:"_blank",theme:"primary",title:K1,children:K(DS,{})}),K("div",{className:"pointer-events-none absolute inset-x-2 bottom-2 z-10 flex items-end justify-between gap-2 text-[10px]",children:[K(zM,{className:"bg-slate-50/70"}),K(Ey,{className:"pointer-events-auto bg-slate-50/70",options:j2})]}),K("div",{className:"absolute top-2 right-2 z-10 flex",children:n1&&K(zd,{title:"Geolokalisierung"})}),K("div",{className:"absolute right-2 bottom-10 z-10 flex flex-col justify-between gap-2",children:K(RM,{})})]}),K("div",{className:"pointer-events-none absolute top-2 bottom-2 left-2 z-10 flex flex-col gap-2 *:pointer-events-auto",children:[K("div",{className:"relative z-10 w-fit rounded-2xl bg-black/10 p-0 backdrop-blur-sm",children:[K("div",{className:ke("absolute top-12 left-0 h-[40px] w-0 p-0 opacity-0 transition-all @sm:top-0 @sm:left-[calc(100%-43px)] @md:left-[calc(100%-47px)]",Y1?"w-64 opacity-100":""),children:K(kl,{className:"border-grey @container m-0 h-[40px] rounded-2xl border p-2 px-4 text-base @sm/main:h-[44px] @sm/main:rounded-l-none @sm/main:rounded-r-2xl @md/main:h-[48px]",inputClassName:"h-6 text-base",inputContainerClassName:"border-none",resultClassName:"text-base **:hover:cursor-pointer hover:text-red-500 p-2",resultsContainerClassName:"@container rounded-b-2xl max-h-[200px] overflow-y-auto border border-grey border-t-0 ",withResultsClassName:"text-base !rounded-b-none"})}),et&&K("div",{className:ke("border-grey relative flex gap-[1px] overflow-hidden rounded-2xl border","*:size-[38px] *:rounded-none *:border-none *:@sm/main:size-[42px] *:@md/main:!size-[46px]","*:first:!rounded-l-2xl","*:last:!rounded-r-2xl",Y1?"@sm:rounded-r-none @sm:border-r-0 @sm:*:last:!rounded-r-none @sm:*:last:border-r-0":""),children:[V1&&K(jy,{title:"Drucken"}),b1&&K(TM,{title:"Share"}),Q2&&K(qy,{title:"Layers"}),f1&&K(xM,{title:"Suche"})]})]}),K("div",{className:ke("flex w-0 flex-1 flex-col overflow-hidden rounded-2xl",y5?"@lg:min-w-60":"p-0"),style:{containerType:"normal"},children:K(Zd,{className:"border-grey @container/overlay pointer-events-auto relative hidden flex-col overflow-hidden rounded-2xl border bg-white text-base shadow-lg @lg:flex",ScrollableHandlerProps:bH,children:K(vM,{hasDetails:J1,hasLayerTree:Q2,hasPrint:V1,hasRealtime:F1,hasSearch:!1,hasShare:b1})})})]}),K(Zd,{className:y5?"absolute bottom-0 z-20 flex max-h-[70%] min-h-[75px] w-full flex-col border-t bg-white @lg:hidden":"@lg:hidden",ScrollableHandlerProps:bH,children:K(vM,{hasDetails:J1,hasLayerTree:Q2,hasPrint:V1,hasRealtime:F1,hasSearch:!1,hasShare:b1})})]})})]})})]})}var MH={};Object.entries(js).forEach(([r])=>{MH[r]=js[r].defaultValue||null});function Ui1(r){return K(Oi1,{...MH,...r})}var mp=m5(Ui1);var Ni1='<a href="https://developer.geops.io/">geOps API key</a>',_a='<a href="https://developer.geops.io/apis/stops">geOps Stops API</a>',Qi1={apikey:{description:`Your ${Ni1}`},bbox:{description:`The extent where to search the stops (minx,miny,maxx,maxy). See the ${_a} documentation.`},countrycode:{description:"The country code to filter the results (IT, DE, CH ...)"},event:{defaultValue:"mwc:stopssearchselect",description:"The event's name to listen to when a stop is selected."},field:{description:`Which field to look up, default all of them, Possible values:id, name, coords. See the ${_a} documentation.`},limit:{defaultValue:"5",description:`The number of suggestions to show. See the ${_a} documentation.`},mots:{description:`Commas separated list of mots used to filter the results (rail, bus, coach, foot, tram, subway, gondola, funicular, ferry, car). See the ${_a} documentation.`},onselect:{description:null},params:{description:`JSON string with additional parameters to pass to the request to the API. Ex: {"{ 'key': 'value' }"}. See the ${_a} documentation.`},prefagencies:{description:`comma seperated list, order chooses which agency will be preferred as
|
|
3456
3503
|
ident_source (for id and code fields). Possible values: sbb, db. See the ${_a} documentation.`},reflocation:{description:`Coordinates in WGS84 (in lat,lon order) used to rank stops close to this position higher. See the ${_a} documentation.`},url:{defaultValue:"https://api.geops.io/stops/v1/",description:`The URL to the ${_a}.`}},Zl=Qi1;function Hi1(r){return K(yu.Provider,{value:fp,children:[K("style",{children:gp}),K(Sh,{...r})]})}var BH={};Object.entries(Zl).forEach(([r])=>{BH[r]=Zl[r].defaultValue||null});function Vi1(r){return K(Hi1,{...BH,...r})}var qM=m5(Vi1);wf(mp,"geops-mobility",Object.keys(js),{mode:"open",shadow:!0});wf(qM,"geops-mobility-search",Object.keys(Zl),{mode:"open",shadow:!0});})();
|
|
3457
3504
|
/*! Bundled license information:
|
|
3458
3505
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@geops/rvf-mobility-web-component",
|
|
3
3
|
"license": "UNLICENSED",
|
|
4
4
|
"description": "Web components for rvf in the domains of mobility and logistics.",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.51",
|
|
6
6
|
"homepage": "https://rvf-mobility-web-component-geops.vercel.app/",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "index.js",
|
|
@@ -241,8 +241,8 @@ const attrs: MobilityMapAttributes = {
|
|
|
241
241
|
description: null, //`The tenant to use by default for all geOps APIs (Stops, Realtime, MOCO ...). Can be override for each API by other XXXXtenant parameters.`,
|
|
242
242
|
},
|
|
243
243
|
toolbar: {
|
|
244
|
-
defaultValue: "
|
|
245
|
-
description: "Show/hide the toolbar on the left.",
|
|
244
|
+
defaultValue: "true",
|
|
245
|
+
description: "Show/hide the toolbar on the top left.",
|
|
246
246
|
type: "boolean",
|
|
247
247
|
},
|
|
248
248
|
zoom: {
|
|
@@ -474,6 +474,58 @@ function RvfMobilityMap(props: RvfMobilityMapProps) {
|
|
|
474
474
|
|
|
475
475
|
return (
|
|
476
476
|
<I18nContext.Provider value={i18n}>
|
|
477
|
+
{/* There is a bug in tailwindcss@4 , variables are not imported in the shadow dom
|
|
478
|
+
see https://github.com/tailwindlabs/tailwindcss/issues/15005*/}
|
|
479
|
+
<style>
|
|
480
|
+
{`:host {
|
|
481
|
+
--tw-divide-y-reverse: 0;
|
|
482
|
+
--tw-border-style: solid;
|
|
483
|
+
--tw-font-weight: initial;
|
|
484
|
+
--tw-tracking: initial;
|
|
485
|
+
--tw-translate-x: 0;
|
|
486
|
+
--tw-translate-y: 0;
|
|
487
|
+
--tw-translate-z: 0;
|
|
488
|
+
--tw-rotate-x: rotateX(0);
|
|
489
|
+
--tw-rotate-y: rotateY(0);
|
|
490
|
+
--tw-rotate-z: rotateZ(0);
|
|
491
|
+
--tw-skew-x: skewX(0);
|
|
492
|
+
--tw-skew-y: skewY(0);
|
|
493
|
+
--tw-space-x-reverse: 0;
|
|
494
|
+
--tw-gradient-position: initial;
|
|
495
|
+
--tw-gradient-from: #0000;
|
|
496
|
+
--tw-gradient-via: #0000;
|
|
497
|
+
--tw-gradient-to: #0000;
|
|
498
|
+
--tw-gradient-stops: initial;
|
|
499
|
+
--tw-gradient-via-stops: initial;
|
|
500
|
+
--tw-gradient-from-position: 0%;
|
|
501
|
+
--tw-gradient-via-position: 50%;
|
|
502
|
+
--tw-gradient-to-position: 100%;
|
|
503
|
+
--tw-shadow: 0 0 #0000;
|
|
504
|
+
--tw-shadow-color: initial;
|
|
505
|
+
--tw-inset-shadow: 0 0 #0000;
|
|
506
|
+
--tw-inset-shadow-color: initial;
|
|
507
|
+
--tw-ring-color: initial;
|
|
508
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
509
|
+
--tw-inset-ring-color: initial;
|
|
510
|
+
--tw-inset-ring-shadow: 0 0 #0000;
|
|
511
|
+
--tw-ring-inset: initial;
|
|
512
|
+
--tw-ring-offset-width: 0px;
|
|
513
|
+
--tw-ring-offset-color: #fff;
|
|
514
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
515
|
+
--tw-blur: initial;
|
|
516
|
+
--tw-brightness: initial;
|
|
517
|
+
--tw-contrast: initial;
|
|
518
|
+
--tw-grayscale: initial;
|
|
519
|
+
--tw-hue-rotate: initial;
|
|
520
|
+
--tw-invert: initial;
|
|
521
|
+
--tw-opacity: initial;
|
|
522
|
+
--tw-saturate: initial;
|
|
523
|
+
--tw-sepia: initial;
|
|
524
|
+
--tw-drop-shadow: initial;
|
|
525
|
+
--tw-duration: initial;
|
|
526
|
+
--tw-ease: initial;
|
|
527
|
+
}`}
|
|
528
|
+
</style>
|
|
477
529
|
<style>{tailwind}</style>
|
|
478
530
|
<style>{style}</style>
|
|
479
531
|
<MapContext.Provider value={mapContextValue}>
|