@data-fair/app-dashboards 0.8.0 → 0.8.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.
@@ -24,4 +24,4 @@ Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`)}function
|
|
24
24
|
- current synced src: ${this.syncedSrc}`),this.syncedSrc=this.fullSrc,this.emitState(),!this.appliedSrc||!this.iframeWindow)this.appliedSrc=this.fullSrc;else if(this.contentWindowRegistered)sn("replace location after change using postMessage",this.fullSrc),this.sendMessage({viframe:!0,stateAction:"replace",href:this.fullSrc});else{sn("replace location after change using iframe.location.replace",this.fullSrc);try{this.iframeWindow.location.replace(this.fullSrc)}catch(e){sn("failure to replace location, change src",e),this.appliedSrc=this.fullSrc}}},storeState(e){const t=new URL(window.location.href),n=new URL(this.src,window.location.href),l=new URL(this.syncedSrc);for(const i of[...t.searchParams.keys()])this.queryParamsExclude&&this.queryParamsExclude.includes(i)||l.searchParams.has(i)||t.searchParams.delete(i);for(const i of[...l.searchParams.keys()])this.queryParamsExtra&&i in this.queryParamsExtra||this.queryParamsInclude&&!this.queryParamsInclude.includes(i)||this.queryParamsExclude&&this.queryParamsExclude.includes(i)||t.searchParams.set(i,l.searchParams.get(i));if(n.pathname!==l.pathname&&!this.syncStateIgnorePath){let i=n.pathname;i.endsWith("/")||(i+="/");let a=l.pathname;a.startsWith(i)&&(a=a.replace(i,"./")),t.searchParams.set("p",a)}if(this.$route&&this.$router){const i={...this.$route.query};for(const a of[...t.searchParams.keys()])i[a]=t.searchParams.get(a);for(const a of Object.keys(i))t.searchParams.has(a)||(i[a]=void 0);if(JSON.stringify(i)===JSON.stringify(this.$route.query))return;sn(`apply state from iframe to parent using vue router
|
25
25
|
- synced src: ${this.syncedSrc}
|
26
26
|
- current query: ${JSON.stringify(this.$route.query)}
|
27
|
-
- new query: ${JSON.stringify(i)}`),e==="push"?this.$router.push({query:i}):this.$router.replace({query:i})}else if(this.reactiveParams&&e!=="push"){sn("apply state from iframe to parent using reactive params",this.syncedSrc,t.search);for(const i of[...t.searchParams.keys()])this.reactiveParams[i]=t.searchParams.get(i);for(const i of Object.keys(this.reactiveParams))t.searchParams.has(i)||delete this.reactiveParams[i]}else{if(t.href===window.location.href)return;sn("apply state from iframe to parent using window.history",this.syncedSrc,t.search),e==="push"?history.pushState(null,"",t.href):history.replaceState(null,"",t.href)}},iframeLoaded(){this.loaded=!0,this.iframeResizer&&(window.iFrameResize?(this.scrolling!=="no"&&console.error("iframeResizer=true is only compatible with scrolling=no."),window.iFrameResize({log:D0,scrolling:"no",onResized:()=>{this.resized=!0}},`#${this.id}`)):console.error("iframe-resizer is not available."))},sendMessage(e,t="*"){this.iframeWindow.postMessage(e,t)},resize(){const e=this.$el.getBoundingClientRect().width;this.actualWidth!==e&&e&&(this.actualWidth!==null&&this.redrawOnResize?(this.iframeWindow=null,this.actualWidth=null,this.$nextTick(()=>this.applyNewWidth(e))):this.applyNewWidth(e))},applyNewWidth(e,t=!0){this.actualWidth=e,this.$nextTick(()=>{const n=this.$el.getElementsByTagName("iframe")[0];if(!n)return t?this.applyNewWidth(e,!1):console.error("v-iframe - iframe element was not created after setting its width");this.iframeWindow=n.contentWindow,setTimeout(()=>{n.getBoundingClientRect()},300)})},setNotification(e){typeof e=="string"&&(e={msg:e}),e.error&&(e.type="error",e.errorMsg=e.error.response&&(e.error.response.data||e.error.response.status)||e.error.message||e.error),e.type=e.type||"default",this.notification=e,this.showNotification=!0},emitState(){this.$emit("state",{href:this.syncedSrc})}}},j0=["innerHTML"];function H0(e,t,n,l,i,a){return ce(),Be("div",{class:"v-iframe",style:An(`width:${n.width}`)},[a.actualAspectRatio?(ce(),je(hs,{key:0,"aspect-ratio":a.actualAspectRatio,style:{height:"100%"}},{default:_e(()=>[e.actualWidth?(ce(),Be("iframe",ge({key:0},a.fullIframeAttrs,{onLoad:t[0]||(t[0]=s=>a.iframeLoaded())}),null,16)):et("",!0)]),_:1},8,["aspect-ratio"])):et("",!0),e.notification?(ce(),je($0,ge({key:1,ref:"notificationSnackbar",modelValue:e.showNotification,"onUpdate:modelValue":t[2]||(t[2]=s=>e.showNotification=s),class:"ui-notification"},a.fullSnackbarProps),{action:_e(({})=>[h(Qn,{icon:"",onClick:t[1]||(t[1]=s=>e.showNotification=!1)},{default:_e(()=>[h(De,null,{default:_e(()=>[st("mdi-close")]),_:1})]),_:1})]),default:_e(()=>[Yn("p",null,ot(e.notification.msg),1),e.notification.errorMsg?(ce(),Be("p",{key:0,class:"ml-3",innerHTML:e.notification.errorMsg},null,8,j0)):et("",!0)]),_:1},16,["modelValue"])):et("",!0)],4)}const cu=T0(z0,[["render",H0]]),W0=ll("v-alert-title"),U0=["success","info","warning","error"],q0=K({border:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["top","end","bottom","start"].includes(e)},borderColor:String,closable:Boolean,closeIcon:{type:Me,default:"$close"},closeLabel:{type:String,default:"$vuetify.close"},icon:{type:[Boolean,String,Function,Object],default:null},modelValue:{type:Boolean,default:!0},prominent:Boolean,title:String,text:String,type:{type:String,validator:e=>U0.includes(e)},...ke(),...Nt(),...Fn(),...Ln(),...ui(),...pa(),...Tt(),...Je(),...nt(),...ln({variant:"flat"})},"VAlert"),K0=ue()({name:"VAlert",props:q0(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{emit:n,slots:l}=t;const i=Ye(e,"modelValue"),a=w(()=>{if(e.icon!==!1)return e.type?e.icon??`$${e.type}`:e.icon}),s=w(()=>({color:e.color??e.type,variant:e.variant})),{themeClasses:r}=rt(e),{colorClasses:o,colorStyles:d,variantClasses:c}=al(s),{densityClasses:f}=Ut(e),{dimensionStyles:u}=Mn(e),{elevationClasses:v}=Rn(e),{locationStyles:m}=ci(e),{positionClasses:y}=ba(e),{roundedClasses:p}=Vt(e),{textColorClasses:P,textColorStyles:I}=$t(re(e,"borderColor")),{t:E}=_l(),k=w(()=>({"aria-label":E(e.closeLabel),onClick(_){i.value=!1,n("click:close",_)}}));return()=>{const _=!!(l.prepend||a.value),S=!!(l.title||e.title),x=!!(l.close||e.closable);return i.value&&h(e.tag,{class:["v-alert",e.border&&{"v-alert--border":!!e.border,[`v-alert--border-${e.border===!0?"start":e.border}`]:!0},{"v-alert--prominent":e.prominent},r.value,o.value,f.value,v.value,y.value,p.value,c.value,e.class],style:[d.value,u.value,m.value,e.style],role:"alert"},{default:()=>{var T,M;return[il(!1,"v-alert"),e.border&&h("div",{key:"border",class:["v-alert__border",P.value],style:I.value},null),_&&h("div",{key:"prepend",class:"v-alert__prepend"},[l.prepend?h(lt,{key:"prepend-defaults",disabled:!a.value,defaults:{VIcon:{density:e.density,icon:a.value,size:e.prominent?44:28}}},l.prepend):h(De,{key:"prepend-icon",density:e.density,icon:a.value,size:e.prominent?44:28},null)]),h("div",{class:"v-alert__content"},[S&&h(W0,{key:"title"},{default:()=>{var L;return[((L=l.title)==null?void 0:L.call(l))??e.title]}}),((T=l.text)==null?void 0:T.call(l))??e.text,(M=l.default)==null?void 0:M.call(l)]),l.append&&h("div",{key:"append",class:"v-alert__append"},[l.append()]),x&&h("div",{key:"close",class:"v-alert__close"},[l.close?h(lt,{key:"close-defaults",defaults:{VBtn:{icon:e.closeIcon,size:"x-small",variant:"text"}}},{default:()=>{var L;return[(L=l.close)==null?void 0:L.call(l,{props:k.value})]}}):h(Qn,ge({key:"close-btn",icon:e.closeIcon,size:"x-small",variant:"text"},k.value),null)])]}})}}}),G0={key:1,class:"mt-4"},du={__name:"dashboard-element",props:{element:{type:Object,required:!0},height:{type:Number,default:400},filtersValues:{type:[Object,null],required:!0}},setup(e){const t=e,n=window.APPLICATION.configuration,l=Object.assign({},...n.datasets[0].schema.map(c=>({[c.key]:c}))),i=w(()=>{const c={...t.filtersValues};return Ve.primary&&(c.primary=Ve.primary),Ve.secondary&&(c.secondary=Ve.secondary),c}),r=window.APPLICATION.exposedUrl.split("/").pop().split("%3A"),o=r.length===2?r[0]:null,d=w(()=>(t.element.valueMandatory&&t.element.mandatoryFilters||[]).filter(c=>{var f,u;return!((u=(f=t.filtersValues)==null?void 0:f.keys)!=null&&u.includes(c))}));return(c,f)=>d.value.length?(ce(),je(K0,{key:0,type:"info",variant:"outlined"},{default:_e(()=>[Yn("h4",null,"Veuillez sélectionner une valeur de "+ot(d.value.map(u=>le(l)[u].label||le(l)[u].title||le(l)[u]["x-originalName"]||u).join(", ")),1)]),_:1})):e.element.type==="tablePreview"?(ce(),je(le(cu),{key:1,src:`/data-fair/embed/dataset/${le(o)?le(o)+"%3A":""}${e.element.dataset.id}/table?display=${e.element.display}&interaction=${!e.element.noInteractions}${e.element.fields.length?"&cols="+e.element.fields.join(","):""}`,"query-params-extra":i.value,style:An(`height:${e.height>0?e.height+"px":"100%"}`)},null,8,["src","query-params-extra","style"])):(ce(),Be("div",{key:2,style:An(`overflow-y:auto;height:${e.height>0?e.height+"px":"100%"}`)},[e.element.type==="application"?(ce(),je(le(cu),{key:0,src:`/data-fair/app/${le(o)?le(o)+"%3A":""}${e.element.application.id}`,"query-params-extra":i.value,style:An(e.element.application.baseApp.meta["df:overflow"]!=="true"?`height:${e.height>0?e.height+"px":"100%"}`:"")},null,8,["src","query-params-extra","style"])):e.element.type==="text"?(ce(),Be("div",G0,ot(e.element.content),1)):et("",!0)],4))}},Y0={__name:"dashboard-column",props:{element:{type:Object,required:!0},height:{type:Number,default:400},filtersValues:{type:[Object,null],required:!0}},setup(e){return(t,n)=>e.element.type==="column"?(ce(!0),Be(fe,{key:0},on(e.element.elements,(l,i)=>(ce(),je(du,{key:i,element:l,height:e.height/e.element.elements.length,"filters-values":e.filtersValues},null,8,["element","height","filters-values"]))),128)):(ce(),je(du,{key:1,element:e.element,height:e.height,"filters-values":e.filtersValues},null,8,["element","height","filters-values"]))}},X0={key:0,class:"text-h5 mt-8"},J0={key:1,class:"mt-4"},Z0={key:0,class:"text-h6 mt-4"},xi={__name:"dashboard-section",props:{section:{type:Object,required:!0},filtersValues:{type:[Object,null],required:!0},hideTitle:{type:Boolean,default:!1}},setup(e){const t=e,n={sm:[6,12,12],md:[4,6,8],lg:[3,4,6],xl:[2,3,6]};for(const l of t.section.rows)for(const i of["sm","md","lg","xl"]){let a=0;for(;a<l.elements.length;){let s=a,r=0;for(;s<l.elements.length&&r+n[i][l.elements[s].width-1]<=12;)r+=n[i][l.elements[s].width-1],s+=1;for(let o=a;o<s;o++)l.elements[o][i]=Math.floor(.3+12*n[i][l.elements[o].width-1]/r),l.elements[o].class=l.elements[o].class||(l.elements[o].type==="text"?["order-first"]:[]),l.elements[o].type==="text"&&l.elements[o][i]===12?l.elements[o].class.push("order-"+i+"-first"):l.elements[o].class.push("order-"+i+"-"+(o+1));a=s}}return(l,i)=>(ce(),Be(fe,null,[e.hideTitle?et("",!0):(ce(),Be("h3",X0,[e.section.icon?(ce(),Be(fe,{key:0},[h(De,null,{default:_e(()=>[st(" mdi-"+ot(e.section.icon.name),1)]),_:1}),st(" ")],64)):et("",!0),st(" "+ot(e.section.title),1)])),e.section.description?(ce(),Be("p",J0,ot(e.section.description),1)):et("",!0),(ce(!0),Be(fe,null,on(e.section.rows||[],(a,s)=>(ce(),je(ei,{key:s,justify:"center"},{default:_e(()=>[(ce(!0),Be(fe,null,on(a.elements||[],(r,o)=>(ce(),je(un,{key:o,cols:12,sm:r.sm,md:r.md,lg:r.lg,xl:r.xl,class:ta(r.class?r.class.join(" "):"")},{default:_e(()=>[r.title?(ce(),Be("h4",Z0,ot(r.title),1)):et("",!0),h(Y0,{element:r,height:a.height,"filters-values":e.filtersValues},null,8,["element","height","filters-values"])]),_:2},1032,["sm","md","lg","xl","class"]))),128))]),_:2},1024))),128))],64))}},ti=Symbol.for("vuetify:v-expansion-panel"),Q0=["default","accordion","inset","popout"],ew=K({color:String,flat:Boolean,focusable:Boolean,static:Boolean,tile:Boolean,variant:{type:String,default:"default",validator:e=>Q0.includes(e)},readonly:Boolean,...ke(),...fa(),...Je(),...nt()},"VExpansionPanels"),tw=ue()({name:"VExpansionPanels",props:ew(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;oi(e,ti);const{themeClasses:l}=rt(e),i=w(()=>e.variant&&`v-expansion-panels--variant-${e.variant}`);return pn({VExpansionPanel:{color:re(e,"color"),readonly:re(e,"readonly")},VExpansionPanelTitle:{focusable:re(e,"focusable"),static:re(e,"static")}}),pe(()=>h(e.tag,{class:["v-expansion-panels",{"v-expansion-panels--flat":e.flat,"v-expansion-panels--tile":e.tile},l.value,i.value,e.class],style:e.style},n)),{}}}),nw=K({...ke(),...ya()},"VExpansionPanelText"),xf=ue()({name:"VExpansionPanelText",props:nw(),setup(e,t){let{slots:n}=t;const l=Ge(ti);if(!l)throw new Error("[Vuetify] v-expansion-panel-text needs to be placed inside v-expansion-panel");const{hasContent:i,onAfterLeave:a}=fr(e,l.isSelected);return pe(()=>h(kd,{onAfterLeave:a},{default:()=>{var s;return[mt(h("div",{class:["v-expansion-panel-text",e.class],style:e.style},[n.default&&i.value&&h("div",{class:"v-expansion-panel-text__wrapper"},[(s=n.default)==null?void 0:s.call(n)])]),[[On,l.isSelected.value]])]}})),{}}}),_f=K({color:String,expandIcon:{type:Me,default:"$expand"},collapseIcon:{type:Me,default:"$collapse"},hideActions:Boolean,focusable:Boolean,static:Boolean,ripple:{type:[Boolean,Object],default:!1},readonly:Boolean,...ke()},"VExpansionPanelTitle"),kf=ue()({name:"VExpansionPanelTitle",directives:{Ripple:Pl},props:_f(),setup(e,t){let{slots:n}=t;const l=Ge(ti);if(!l)throw new Error("[Vuetify] v-expansion-panel-title needs to be placed inside v-expansion-panel");const{backgroundColorClasses:i,backgroundColorStyles:a}=Qt(e,"color"),s=w(()=>({collapseIcon:e.collapseIcon,disabled:l.disabled.value,expanded:l.isSelected.value,expandIcon:e.expandIcon,readonly:e.readonly}));return pe(()=>{var r;return mt(h("button",{class:["v-expansion-panel-title",{"v-expansion-panel-title--active":l.isSelected.value,"v-expansion-panel-title--focusable":e.focusable,"v-expansion-panel-title--static":e.static},i.value,e.class],style:[a.value,e.style],type:"button",tabindex:l.disabled.value?-1:void 0,disabled:l.disabled.value,"aria-expanded":l.isSelected.value,onClick:e.readonly?void 0:l.toggle},[h("span",{class:"v-expansion-panel-title__overlay"},null),(r=n.default)==null?void 0:r.call(n,s.value),!e.hideActions&&h("span",{class:"v-expansion-panel-title__icon"},[n.actions?n.actions(s.value):h(De,{icon:l.isSelected.value?e.collapseIcon:e.expandIcon},null)])]),[[en("ripple"),e.ripple]])}),{}}}),lw=K({title:String,text:String,bgColor:String,...ke(),...Ln(),...va(),...ya(),...Tt(),...Je(),..._f()},"VExpansionPanel"),iw=ue()({name:"VExpansionPanel",props:lw(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const l=ma(e,ti),{backgroundColorClasses:i,backgroundColorStyles:a}=Qt(e,"bgColor"),{elevationClasses:s}=Rn(e),{roundedClasses:r}=Vt(e),o=w(()=>(l==null?void 0:l.disabled.value)||e.disabled),d=w(()=>l.group.items.value.reduce((u,v,m)=>(l.group.selected.value.includes(v.id)&&u.push(m),u),[])),c=w(()=>{const u=l.group.items.value.findIndex(v=>v.id===l.id);return!l.isSelected.value&&d.value.some(v=>v-u===1)}),f=w(()=>{const u=l.group.items.value.findIndex(v=>v.id===l.id);return!l.isSelected.value&&d.value.some(v=>v-u===-1)});return yt(ti,l),pn({VExpansionPanelText:{eager:re(e,"eager")},VExpansionPanelTitle:{readonly:re(e,"readonly")}}),pe(()=>{const u=!!(n.text||e.text),v=!!(n.title||e.title);return h(e.tag,{class:["v-expansion-panel",{"v-expansion-panel--active":l.isSelected.value,"v-expansion-panel--before-active":c.value,"v-expansion-panel--after-active":f.value,"v-expansion-panel--disabled":o.value},r.value,i.value,e.class],style:[a.value,e.style]},{default:()=>{var m;return[h("div",{class:["v-expansion-panel__shadow",...s.value]},null),v&&h(kf,{key:"title",collapseIcon:e.collapseIcon,color:e.color,expandIcon:e.expandIcon,hideActions:e.hideActions,ripple:e.ripple},{default:()=>[n.title?n.title():e.title]}),u&&h(xf,{key:"text"},{default:()=>[n.text?n.text():e.text]}),(m=n.default)==null?void 0:m.call(n)]}})}),{}}}),Pf=Symbol.for("vuetify:v-tabs"),aw=K({fixed:Boolean,sliderColor:String,hideSlider:Boolean,direction:{type:String,default:"horizontal"},...yn(wf({selectedClass:"v-tab--selected",variant:"text"}),["active","block","flat","location","position","symbol"])},"VTab"),Af=ue()({name:"VTab",props:aw(),setup(e,t){let{slots:n,attrs:l}=t;const{textColorClasses:i,textColorStyles:a}=$t(e,"sliderColor"),s=Q(),r=Q(),o=w(()=>e.direction==="horizontal"),d=w(()=>{var f,u;return((u=(f=s.value)==null?void 0:f.group)==null?void 0:u.isSelected.value)??!1});function c(f){var v,m;let{value:u}=f;if(u){const y=(m=(v=s.value)==null?void 0:v.$el.parentElement)==null?void 0:m.querySelector(".v-tab--selected .v-tab__slider"),p=r.value;if(!y||!p)return;const P=getComputedStyle(y).color,I=y.getBoundingClientRect(),E=p.getBoundingClientRect(),k=o.value?"x":"y",_=o.value?"X":"Y",S=o.value?"right":"bottom",x=o.value?"width":"height",T=I[k],M=E[k],L=T>M?I[S]-E[S]:I[k]-E[k],N=Math.sign(L)>0?o.value?"right":"bottom":Math.sign(L)<0?o.value?"left":"top":"center",F=(Math.abs(L)+(Math.sign(L)<0?I[x]:E[x]))/Math.max(I[x],E[x])||0,D=I[x]/E[x]||0,Z=1.5;Hn(p,{backgroundColor:[P,"currentcolor"],transform:[`translate${_}(${L}px) scale${_}(${D})`,`translate${_}(${L/Z}px) scale${_}(${(F-1)/Z+1})`,"none"],transformOrigin:Array(3).fill(N)},{duration:225,easing:Xl})}}return pe(()=>{const f=Qn.filterProps(e);return h(Qn,ge({symbol:Pf,ref:s,class:["v-tab",e.class],style:e.style,tabindex:d.value?0:-1,role:"tab","aria-selected":String(d.value),active:!1},f,l,{block:e.fixed,maxWidth:e.fixed?300:void 0,"onGroup:selected":c}),{...n,default:()=>{var u;return h(fe,null,[((u=n.default)==null?void 0:u.call(n))??e.text,!e.hideSlider&&h("div",{ref:r,class:["v-tab__slider",i.value],style:a.value},null)])}})}),Il({},s)}});function sw(e){return e?e.map(t=>Ni(t)?t:{text:t,value:t}):[]}const rw=K({alignTabs:{type:String,default:"start"},color:String,fixedTabs:Boolean,items:{type:Array,default:()=>[]},stacked:Boolean,bgColor:String,grow:Boolean,height:{type:[Number,String],default:void 0},hideSlider:Boolean,sliderColor:String,...or({mandatory:"force"}),...Nt(),...Je()},"VTabs"),ow=ue()({name:"VTabs",props:rw(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const l=Ye(e,"modelValue"),i=w(()=>sw(e.items)),{densityClasses:a}=Ut(e),{backgroundColorClasses:s,backgroundColorStyles:r}=Qt(re(e,"bgColor"));return pn({VTab:{color:re(e,"color"),direction:re(e,"direction"),stacked:re(e,"stacked"),fixed:re(e,"fixedTabs"),sliderColor:re(e,"sliderColor"),hideSlider:re(e,"hideSlider")}}),pe(()=>{const o=Yi.filterProps(e);return h(Yi,ge(o,{modelValue:l.value,"onUpdate:modelValue":d=>l.value=d,class:["v-tabs",`v-tabs--${e.direction}`,`v-tabs--align-tabs-${e.alignTabs}`,{"v-tabs--fixed-tabs":e.fixedTabs,"v-tabs--grow":e.grow,"v-tabs--stacked":e.stacked},a.value,s.value,e.class],style:[{"--v-tabs-height":be(e.height)},r.value,e.style],role:"tablist",symbol:Pf}),{default:()=>[n.default?n.default():i.value.map(d=>h(Af,ge(d,{key:d.text}),null))]})}),{}}}),uw=e=>{const{touchstartX:t,touchendX:n,touchstartY:l,touchendY:i}=e,a=.5,s=16;e.offsetX=n-t,e.offsetY=i-l,Math.abs(e.offsetY)<a*Math.abs(e.offsetX)&&(e.left&&n<t-s&&e.left(e),e.right&&n>t+s&&e.right(e)),Math.abs(e.offsetX)<a*Math.abs(e.offsetY)&&(e.up&&i<l-s&&e.up(e),e.down&&i>l+s&&e.down(e))};function cw(e,t){var l;const n=e.changedTouches[0];t.touchstartX=n.clientX,t.touchstartY=n.clientY,(l=t.start)==null||l.call(t,{originalEvent:e,...t})}function dw(e,t){var l;const n=e.changedTouches[0];t.touchendX=n.clientX,t.touchendY=n.clientY,(l=t.end)==null||l.call(t,{originalEvent:e,...t}),uw(t)}function fw(e,t){var l;const n=e.changedTouches[0];t.touchmoveX=n.clientX,t.touchmoveY=n.clientY,(l=t.move)==null||l.call(t,{originalEvent:e,...t})}function vw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t={touchstartX:0,touchstartY:0,touchendX:0,touchendY:0,touchmoveX:0,touchmoveY:0,offsetX:0,offsetY:0,left:e.left,right:e.right,up:e.up,down:e.down,start:e.start,move:e.move,end:e.end};return{touchstart:n=>cw(n,t),touchend:n=>dw(n,t),touchmove:n=>fw(n,t)}}function mw(e,t){var r;const n=t.value,l=n!=null&&n.parent?e.parentElement:e,i=(n==null?void 0:n.options)??{passive:!0},a=(r=t.instance)==null?void 0:r.$.uid;if(!l||!a)return;const s=vw(t.value);l._touchHandlers=l._touchHandlers??Object.create(null),l._touchHandlers[a]=s,kc(s).forEach(o=>{l.addEventListener(o,s[o],i)})}function hw(e,t){var a,s;const n=(a=t.value)!=null&&a.parent?e.parentElement:e,l=(s=t.instance)==null?void 0:s.$.uid;if(!(n!=null&&n._touchHandlers)||!l)return;const i=n._touchHandlers[l];kc(i).forEach(r=>{n.removeEventListener(r,i[r])}),delete n._touchHandlers[l]}const Ef={mounted:mw,unmounted:hw},gw=Ef,If=Symbol.for("vuetify:v-window"),Tf=Symbol.for("vuetify:v-window-group"),yw=K({continuous:Boolean,nextIcon:{type:[Boolean,String,Function,Object],default:"$next"},prevIcon:{type:[Boolean,String,Function,Object],default:"$prev"},reverse:Boolean,showArrows:{type:[Boolean,String],validator:e=>typeof e=="boolean"||e==="hover"},touch:{type:[Object,Boolean],default:void 0},direction:{type:String,default:"horizontal"},modelValue:null,disabled:Boolean,selectedClass:{type:String,default:"v-window-item--active"},mandatory:{type:[Boolean,String],default:"force"},...ke(),...Je(),...nt()},"VWindow"),pw=ue()({name:"VWindow",directives:{Touch:Ef},props:yw(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:l}=rt(e),{isRtl:i}=bn(),{t:a}=_l(),s=oi(e,Tf),r=Q(),o=w(()=>i.value?!e.reverse:e.reverse),d=ve(!1),c=w(()=>{const k=e.direction==="vertical"?"y":"x",S=(o.value?!d.value:d.value)?"-reverse":"";return`v-window-${k}${S}-transition`}),f=ve(0),u=Q(void 0),v=w(()=>s.items.value.findIndex(k=>s.selected.value.includes(k.id)));de(v,(k,_)=>{const S=s.items.value.length,x=S-1;S<=2?d.value=k<_:k===x&&_===0?d.value=!0:k===0&&_===x?d.value=!1:d.value=k<_}),yt(If,{transition:c,isReversed:d,transitionCount:f,transitionHeight:u,rootRef:r});const m=w(()=>e.continuous||v.value!==0),y=w(()=>e.continuous||v.value!==s.items.value.length-1);function p(){m.value&&s.prev()}function P(){y.value&&s.next()}const I=w(()=>{const k=[],_={icon:i.value?e.nextIcon:e.prevIcon,class:`v-window__${o.value?"right":"left"}`,onClick:s.prev,"aria-label":a("$vuetify.carousel.prev")};k.push(m.value?n.prev?n.prev({props:_}):h(Qn,_,null):h("div",null,null));const S={icon:i.value?e.prevIcon:e.nextIcon,class:`v-window__${o.value?"left":"right"}`,onClick:s.next,"aria-label":a("$vuetify.carousel.next")};return k.push(y.value?n.next?n.next({props:S}):h(Qn,S,null):h("div",null,null)),k}),E=w(()=>e.touch===!1?e.touch:{...{left:()=>{o.value?p():P()},right:()=>{o.value?P():p()},start:_=>{let{originalEvent:S}=_;S.stopPropagation()}},...e.touch===!0?{}:e.touch});return pe(()=>mt(h(e.tag,{ref:r,class:["v-window",{"v-window--show-arrows-on-hover":e.showArrows==="hover"},l.value,e.class],style:e.style},{default:()=>{var k,_;return[h("div",{class:"v-window__container",style:{height:u.value}},[(k=n.default)==null?void 0:k.call(n,{group:s}),e.showArrows!==!1&&h("div",{class:"v-window__controls"},[I.value])]),(_=n.additional)==null?void 0:_.call(n,{group:s})]}}),[[en("touch"),E.value]])),{group:s}}}),bw=K({reverseTransition:{type:[Boolean,String],default:void 0},transition:{type:[Boolean,String],default:void 0},...ke(),...va(),...ya()},"VWindowItem"),ww=ue()({name:"VWindowItem",directives:{Touch:gw},props:bw(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const l=Ge(If),i=ma(e,Tf),{isBooted:a}=dr();if(!l||!i)throw new Error("[Vuetify] VWindowItem must be used inside VWindow");const s=ve(!1),r=w(()=>a.value&&(l.isReversed.value?e.reverseTransition!==!1:e.transition!==!1));function o(){!s.value||!l||(s.value=!1,l.transitionCount.value>0&&(l.transitionCount.value-=1,l.transitionCount.value===0&&(l.transitionHeight.value=void 0)))}function d(){var m;s.value||!l||(s.value=!0,l.transitionCount.value===0&&(l.transitionHeight.value=be((m=l.rootRef.value)==null?void 0:m.clientHeight)),l.transitionCount.value+=1)}function c(){o()}function f(m){s.value&&it(()=>{!r.value||!s.value||!l||(l.transitionHeight.value=be(m.clientHeight))})}const u=w(()=>{const m=l.isReversed.value?e.reverseTransition:e.transition;return r.value?{name:typeof m!="string"?l.transition.value:m,onBeforeEnter:d,onAfterEnter:o,onEnterCancelled:c,onBeforeLeave:d,onAfterLeave:o,onLeaveCancelled:c,onEnter:f}:!1}),{hasContent:v}=fr(e,i.isSelected);return pe(()=>h(cn,{transition:u.value,disabled:!a.value},{default:()=>{var m;return[mt(h("div",{class:["v-window-item",i.selectedClass.value,e.class],style:e.style},[v.value&&((m=n.default)==null?void 0:m.call(n))]),[[On,i.isSelected.value]])]}})),{groupItem:i}}}),Sw={key:0,class:"text-h4 text-center"},Cw={key:1,class:"mt-2"},xw={__name:"dashboard",setup(e){const t=window.APPLICATION,n=t.configuration,l=d=>{console.error(d),Ki(t.href+"/error",{method:"POST",body:{message:d.message||d}})};if(Ve.draft==="true"&&window.parent){const d=[].concat(...n.sections.map(f=>[].concat(...f.rows.map(u=>[].concat(...u.elements))))),c=d.filter(f=>f.type==="application"&&f.application).map(f=>({id:f.application.id,title:f.application.title})).filter((f,u,v)=>v.findIndex(m=>f.id===m.id)===u);if((n.applications||[]).map(f=>f.id).join("-")!==c.map(f=>f.id).join("-")&&window.parent.postMessage({type:"set-config",content:{field:"applications",value:c}},"*"),n.datasets&&n.datasets.length){const f=n.datasets[0],u=d.filter(v=>v.type==="tablePreview"&&v.dataset).map(v=>({id:v.dataset.id,title:v.dataset.title,href:v.dataset.href})).filter((v,m,y)=>v.id!==f.id&&y.findIndex(p=>v.id===p.id)===m);u.unshift(f),(n.datasets||[]).map(v=>v.id).join("-")!==u.map(v=>v.id).join("-")&&window.parent.postMessage({type:"set-config",content:{field:"datasets",value:u}},"*")}}const i=Q({}),a=Q(null);let s=0,r=0;if(!n.datasets||!n.datasets.length)l("Veuillez choisir un source de données pour le filtre commun");else if((!n.filters||!n.filters.length)&&!n.periodFilter&&!n.addressFilter)l("Veuillez configurer un filtre");else{const d="_d_"+n.datasets[0].id+"_";for(const c of n.filters)!Ve[d+c.labelField+"_in"]&&c.forceOneValue&&c.startValue&&(Ve[d+c.labelField+"_in"]=c.startValue);if(n.periodFilter&&!Ve.period){const c=(n.datasets[0].timePeriod?n.datasets[0].timePeriod.startDate:new Date().toISOString()).slice(0,10),f=(n.datasets[0].timePeriod?n.datasets[0].timePeriod.endDate:new Date().toISOString()).slice(0,10),u=[c];c!==f&&u.push(f),Ve.period=u.join(",")}s=Math.max(...n.sections.map(c=>c.title&&c.title.length||0)),r=n.sections.reduce((c,f)=>c+(f.title&&f.title.length||0),0)}return(d,c)=>{var f;return(f=le(n).filters)!=null&&f.length||le(n).periodFilter||le(n).addressFilter?(ce(),je(o0,{key:0,fluid:"","data-iframe-height":""},{default:_e(()=>[le(n).title?(ce(),Be("h2",Sw,ot(le(n).title),1)):et("",!0),le(n).description?(ce(),Be("p",Cw,ot(le(n).description),1)):et("",!0),h(I0,{config:le(n),"onUpdate:modelValue":c[0]||(c[0]=u=>i.value=u)},null,8,["config"]),le(n).sections.length===1?(ce(),je(xi,{key:2,section:le(n).sections[0],"filters-values":i.value},null,8,["section","filters-values"])):le(n).sectionsGroup.includes("tabs")?(ce(),Be(fe,{key:3},[le(n).sectionsGroup==="tabs-tab"?(ce(),je(ow,{key:0,modelValue:a.value,"onUpdate:modelValue":c[1]||(c[1]=u=>a.value=u),class:"mb-3",color:"primary","fixed-tabs":le(s)<=30,grow:le(s)>30&&le(r)<200,direction:le(r)>=200?"vertical":"horizontal"},{default:_e(()=>[(ce(!0),Be(fe,null,on(le(n).sections||[],(u,v)=>(ce(),je(Af,{key:v,value:v},{default:_e(()=>[u.icon?(ce(),Be(fe,{key:0},[h(De,null,{default:_e(()=>[st(" mdi-"+ot(u.icon.name),1)]),_:2},1024),st(" ")],64)):et("",!0),st(" "+ot(u.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","fixed-tabs","grow","direction"])):le(n).sectionsGroup==="tabs-button"?(ce(),je(ei,{key:1},{default:_e(()=>[h(ru),h(un,{cols:"auto"},{default:_e(()=>[h(xs,{variant:"outlined"},{default:_e(()=>[h(O0,{modelValue:a.value,"onUpdate:modelValue":c[2]||(c[2]=u=>a.value=u),color:"primary",mandatory:"",style:An(le(r)*15>=d.$vuetify.display.width?`flex-direction: column;height:${le(n).sections.length*36}px`:"")},{default:_e(()=>[(ce(!0),Be(fe,null,on(le(n).sections||[],(u,v)=>(ce(),je(Qn,{key:v,value:v,height:le(r)*15>=d.$vuetify.display.width?36:48},{default:_e(()=>[u.icon?(ce(),Be(fe,{key:0},[h(De,null,{default:_e(()=>[st(" mdi-"+ot(u.icon.name),1)]),_:2},1024),st(" ")],64)):et("",!0),st(" "+ot(u.title),1)]),_:2},1032,["value","height"]))),128))]),_:1},8,["modelValue","style"])]),_:1})]),_:1}),h(ru)]),_:1})):et("",!0),h(pw,{modelValue:a.value,"onUpdate:modelValue":c[3]||(c[3]=u=>a.value=u)},{default:_e(()=>[(ce(!0),Be(fe,null,on(le(n).sections||[],(u,v)=>(ce(),je(ww,{key:v,value:v},{default:_e(()=>[h(xi,{section:u,"filters-values":i.value,"hide-title":""},null,8,["section","filters-values"])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])],64)):le(n).sectionsGroup==="accordion"?(ce(),je(tw,{key:4,multiple:"",variant:"accordion","model-value":le(n).sections.map((u,v)=>v)},{default:_e(()=>[(ce(!0),Be(fe,null,on(le(n).sections||[],(u,v)=>(ce(),je(iw,{key:v,value:v,eager:""},{default:_e(()=>[h(kf,{class:"bg-primary"},{default:_e(()=>[Yn("h3",null,[u.icon?(ce(),Be(fe,{key:0},[h(De,null,{default:_e(()=>[st(" mdi-"+ot(u.icon.name),1)]),_:2},1024),st(" ")],64)):et("",!0),st(" "+ot(u.title),1)])]),_:2},1024),h(xf,null,{default:_e(()=>[h(xi,{section:u,"filters-values":i.value,"hide-title":""},null,8,["section","filters-values"])]),_:2},1024)]),_:2},1032,["value"]))),128))]),_:1},8,["model-value"])):(ce(!0),Be(fe,{key:5},on(le(n).sections||[],(u,v)=>(ce(),Be("div",{key:v,class:"my-6"},[Yn("h2",null,[u.icon?(ce(),Be(fe,{key:0},[h(De,null,{default:_e(()=>[st(" mdi-"+ot(u.icon.name),1)]),_:2},1024),st(" ")],64)):et("",!0),st(" "+ot(u.title),1)]),h(xi,{section:u,"filters-values":i.value,"hide-title":""},null,8,["section","filters-values"])]))),128))]),_:1})):et("",!0)}}},_w=K({...ke(),...ly({fullHeight:!0}),...nt()},"VApp"),kw=ue()({name:"VApp",props:_w(),setup(e,t){let{slots:n}=t;const l=rt(e),{layoutClasses:i,getLayoutItem:a,items:s,layoutRef:r}=sy(e),{rtlClasses:o}=bn();return pe(()=>{var d;return h("div",{ref:r,class:["v-application",l.themeClasses.value,i.value,o.value,e.class],style:[e.style]},[h("div",{class:"v-application__wrap"},[(d=n.default)==null?void 0:d.call(n)])])}),{getLayoutItem:a,items:s,theme:l}}}),Pw=K({scrollable:Boolean,...ke(),...Je({tag:"main"})},"VMain"),Aw=ue()({name:"VMain",props:Pw(),setup(e,t){let{slots:n}=t;const{mainStyles:l}=iy(),{ssrBootStyles:i}=dr();return pe(()=>h(e.tag,{class:["v-main",{"v-main--scrollable":e.scrollable},e.class],style:[l.value,i.value,e.style]},{default:()=>{var a,s;return[e.scrollable?h("div",{class:"v-main__scroller"},[(a=n.default)==null?void 0:a.call(n)]):(s=n.default)==null?void 0:s.call(n)]}})),{}}}),Ew={__name:"app",setup(e){return(t,n)=>(ce(),je(kw,null,{default:_e(()=>[h(Aw,null,{default:_e(()=>[(ce(),je(Fv,null,{default:_e(()=>[h(xw)]),_:1}))]),_:1})]),_:1}))}};window.iFrameResizer={heightCalculationMethod:"taggedElement"};const Vf=dh(Ew);Vf.use(Jc(cy));Vf.mount("#app");
|
27
|
+
- new query: ${JSON.stringify(i)}`),e==="push"?this.$router.push({query:i}):this.$router.replace({query:i})}else if(this.reactiveParams&&e!=="push"){sn("apply state from iframe to parent using reactive params",this.syncedSrc,t.search);for(const i of[...t.searchParams.keys()])this.reactiveParams[i]=t.searchParams.get(i);for(const i of Object.keys(this.reactiveParams))t.searchParams.has(i)||delete this.reactiveParams[i]}else{if(t.href===window.location.href)return;sn("apply state from iframe to parent using window.history",this.syncedSrc,t.search),e==="push"?history.pushState(null,"",t.href):history.replaceState(null,"",t.href)}},iframeLoaded(){this.loaded=!0,this.iframeResizer&&(window.iFrameResize?(this.scrolling!=="no"&&console.error("iframeResizer=true is only compatible with scrolling=no."),window.iFrameResize({log:D0,scrolling:"no",onResized:()=>{this.resized=!0}},`#${this.id}`)):console.error("iframe-resizer is not available."))},sendMessage(e,t="*"){this.iframeWindow.postMessage(e,t)},resize(){const e=this.$el.getBoundingClientRect().width;this.actualWidth!==e&&e&&(this.actualWidth!==null&&this.redrawOnResize?(this.iframeWindow=null,this.actualWidth=null,this.$nextTick(()=>this.applyNewWidth(e))):this.applyNewWidth(e))},applyNewWidth(e,t=!0){this.actualWidth=e,this.$nextTick(()=>{const n=this.$el.getElementsByTagName("iframe")[0];if(!n)return t?this.applyNewWidth(e,!1):console.error("v-iframe - iframe element was not created after setting its width");this.iframeWindow=n.contentWindow,setTimeout(()=>{n.getBoundingClientRect()},300)})},setNotification(e){typeof e=="string"&&(e={msg:e}),e.error&&(e.type="error",e.errorMsg=e.error.response&&(e.error.response.data||e.error.response.status)||e.error.message||e.error),e.type=e.type||"default",this.notification=e,this.showNotification=!0},emitState(){this.$emit("state",{href:this.syncedSrc})}}},j0=["innerHTML"];function H0(e,t,n,l,i,a){return ce(),Be("div",{class:"v-iframe",style:An(`width:${n.width}`)},[a.actualAspectRatio?(ce(),je(hs,{key:0,"aspect-ratio":a.actualAspectRatio,style:{height:"100%"}},{default:_e(()=>[e.actualWidth?(ce(),Be("iframe",ge({key:0},a.fullIframeAttrs,{onLoad:t[0]||(t[0]=s=>a.iframeLoaded())}),null,16)):et("",!0)]),_:1},8,["aspect-ratio"])):et("",!0),e.notification?(ce(),je($0,ge({key:1,ref:"notificationSnackbar",modelValue:e.showNotification,"onUpdate:modelValue":t[2]||(t[2]=s=>e.showNotification=s),class:"ui-notification"},a.fullSnackbarProps),{action:_e(({})=>[h(Qn,{icon:"",onClick:t[1]||(t[1]=s=>e.showNotification=!1)},{default:_e(()=>[h(De,null,{default:_e(()=>[st("mdi-close")]),_:1})]),_:1})]),default:_e(()=>[Yn("p",null,ot(e.notification.msg),1),e.notification.errorMsg?(ce(),Be("p",{key:0,class:"ml-3",innerHTML:e.notification.errorMsg},null,8,j0)):et("",!0)]),_:1},16,["modelValue"])):et("",!0)],4)}const cu=T0(z0,[["render",H0]]),W0=ll("v-alert-title"),U0=["success","info","warning","error"],q0=K({border:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["top","end","bottom","start"].includes(e)},borderColor:String,closable:Boolean,closeIcon:{type:Me,default:"$close"},closeLabel:{type:String,default:"$vuetify.close"},icon:{type:[Boolean,String,Function,Object],default:null},modelValue:{type:Boolean,default:!0},prominent:Boolean,title:String,text:String,type:{type:String,validator:e=>U0.includes(e)},...ke(),...Nt(),...Fn(),...Ln(),...ui(),...pa(),...Tt(),...Je(),...nt(),...ln({variant:"flat"})},"VAlert"),K0=ue()({name:"VAlert",props:q0(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{emit:n,slots:l}=t;const i=Ye(e,"modelValue"),a=w(()=>{if(e.icon!==!1)return e.type?e.icon??`$${e.type}`:e.icon}),s=w(()=>({color:e.color??e.type,variant:e.variant})),{themeClasses:r}=rt(e),{colorClasses:o,colorStyles:d,variantClasses:c}=al(s),{densityClasses:f}=Ut(e),{dimensionStyles:u}=Mn(e),{elevationClasses:v}=Rn(e),{locationStyles:m}=ci(e),{positionClasses:y}=ba(e),{roundedClasses:p}=Vt(e),{textColorClasses:P,textColorStyles:I}=$t(re(e,"borderColor")),{t:E}=_l(),k=w(()=>({"aria-label":E(e.closeLabel),onClick(_){i.value=!1,n("click:close",_)}}));return()=>{const _=!!(l.prepend||a.value),S=!!(l.title||e.title),x=!!(l.close||e.closable);return i.value&&h(e.tag,{class:["v-alert",e.border&&{"v-alert--border":!!e.border,[`v-alert--border-${e.border===!0?"start":e.border}`]:!0},{"v-alert--prominent":e.prominent},r.value,o.value,f.value,v.value,y.value,p.value,c.value,e.class],style:[d.value,u.value,m.value,e.style],role:"alert"},{default:()=>{var T,M;return[il(!1,"v-alert"),e.border&&h("div",{key:"border",class:["v-alert__border",P.value],style:I.value},null),_&&h("div",{key:"prepend",class:"v-alert__prepend"},[l.prepend?h(lt,{key:"prepend-defaults",disabled:!a.value,defaults:{VIcon:{density:e.density,icon:a.value,size:e.prominent?44:28}}},l.prepend):h(De,{key:"prepend-icon",density:e.density,icon:a.value,size:e.prominent?44:28},null)]),h("div",{class:"v-alert__content"},[S&&h(W0,{key:"title"},{default:()=>{var L;return[((L=l.title)==null?void 0:L.call(l))??e.title]}}),((T=l.text)==null?void 0:T.call(l))??e.text,(M=l.default)==null?void 0:M.call(l)]),l.append&&h("div",{key:"append",class:"v-alert__append"},[l.append()]),x&&h("div",{key:"close",class:"v-alert__close"},[l.close?h(lt,{key:"close-defaults",defaults:{VBtn:{icon:e.closeIcon,size:"x-small",variant:"text"}}},{default:()=>{var L;return[(L=l.close)==null?void 0:L.call(l,{props:k.value})]}}):h(Qn,ge({key:"close-btn",icon:e.closeIcon,size:"x-small",variant:"text"},k.value),null)])]}})}}}),G0={key:1,class:"mt-4"},du={__name:"dashboard-element",props:{element:{type:Object,required:!0},height:{type:Number,default:400},filtersValues:{type:[Object,null],required:!0}},setup(e){const t=e,n=window.APPLICATION.configuration,l=Object.assign({},...n.datasets[0].schema.map(c=>({[c.key]:c}))),i=w(()=>{const c={...t.filtersValues};return Ve.primary&&(c.primary=Ve.primary),Ve.secondary&&(c.secondary=Ve.secondary),c}),r=window.APPLICATION.exposedUrl.split("/").pop().split("%3A"),o=r.length===2?r[0]:null,d=w(()=>(t.element.valueMandatory&&t.element.mandatoryFilters||[]).filter(c=>{var f,u;return!((u=(f=t.filtersValues)==null?void 0:f.keys)!=null&&u.includes(c))}));return(c,f)=>d.value.length?(ce(),je(K0,{key:0,type:"info",variant:"outlined"},{default:_e(()=>[Yn("h4",null,"Veuillez sélectionner une valeur de "+ot(d.value.map(u=>le(l)[u].label||le(l)[u].title||le(l)[u]["x-originalName"]||u).join(", ")),1)]),_:1})):e.element.type==="tablePreview"?(ce(),je(le(cu),{key:1,src:`/data-fair/embed/dataset/${le(o)?le(o)+"%3A":""}${(e.element.dataset||le(n).datasets[0]).id}/table?display=${e.element.display}&interaction=${!e.element.noInteractions}${e.element.fields.length?"&cols="+e.element.fields.join(","):""}`,"query-params-extra":i.value,style:An(`height:${e.height>0?e.height+"px":"100%"}`)},null,8,["src","query-params-extra","style"])):(ce(),Be("div",{key:2,style:An(`overflow-y:auto;height:${e.height>0?e.height+"px":"100%"}`)},[e.element.type==="application"?(ce(),je(le(cu),{key:0,src:`/data-fair/app/${le(o)?le(o)+"%3A":""}${e.element.application.id}`,"query-params-extra":i.value,style:An(e.element.application.baseApp.meta["df:overflow"]!=="true"?`height:${e.height>0?e.height+"px":"100%"}`:"")},null,8,["src","query-params-extra","style"])):e.element.type==="text"?(ce(),Be("div",G0,ot(e.element.content),1)):et("",!0)],4))}},Y0={__name:"dashboard-column",props:{element:{type:Object,required:!0},height:{type:Number,default:400},filtersValues:{type:[Object,null],required:!0}},setup(e){return(t,n)=>e.element.type==="column"?(ce(!0),Be(fe,{key:0},on(e.element.elements,(l,i)=>(ce(),je(du,{key:i,element:l,height:e.height/e.element.elements.length,"filters-values":e.filtersValues},null,8,["element","height","filters-values"]))),128)):(ce(),je(du,{key:1,element:e.element,height:e.height,"filters-values":e.filtersValues},null,8,["element","height","filters-values"]))}},X0={key:0,class:"text-h5 mt-8"},J0={key:1,class:"mt-4"},Z0={key:0,class:"text-h6 mt-4"},xi={__name:"dashboard-section",props:{section:{type:Object,required:!0},filtersValues:{type:[Object,null],required:!0},hideTitle:{type:Boolean,default:!1}},setup(e){const t=e,n={sm:[6,12,12],md:[4,6,8],lg:[3,4,6],xl:[2,3,6]};for(const l of t.section.rows)for(const i of["sm","md","lg","xl"]){let a=0;for(;a<l.elements.length;){let s=a,r=0;for(;s<l.elements.length&&r+n[i][l.elements[s].width-1]<=12;)r+=n[i][l.elements[s].width-1],s+=1;for(let o=a;o<s;o++)l.elements[o][i]=Math.floor(.3+12*n[i][l.elements[o].width-1]/r),l.elements[o].class=l.elements[o].class||(l.elements[o].type==="text"?["order-first"]:[]),l.elements[o].type==="text"&&l.elements[o][i]===12?l.elements[o].class.push("order-"+i+"-first"):l.elements[o].class.push("order-"+i+"-"+(o+1));a=s}}return(l,i)=>(ce(),Be(fe,null,[e.hideTitle?et("",!0):(ce(),Be("h3",X0,[e.section.icon?(ce(),Be(fe,{key:0},[h(De,null,{default:_e(()=>[st(" mdi-"+ot(e.section.icon.name),1)]),_:1}),st(" ")],64)):et("",!0),st(" "+ot(e.section.title),1)])),e.section.description?(ce(),Be("p",J0,ot(e.section.description),1)):et("",!0),(ce(!0),Be(fe,null,on(e.section.rows||[],(a,s)=>(ce(),je(ei,{key:s,justify:"center"},{default:_e(()=>[(ce(!0),Be(fe,null,on(a.elements||[],(r,o)=>(ce(),je(un,{key:o,cols:12,sm:r.sm,md:r.md,lg:r.lg,xl:r.xl,class:ta(r.class?r.class.join(" "):"")},{default:_e(()=>[r.title?(ce(),Be("h4",Z0,ot(r.title),1)):et("",!0),h(Y0,{element:r,height:a.height,"filters-values":e.filtersValues},null,8,["element","height","filters-values"])]),_:2},1032,["sm","md","lg","xl","class"]))),128))]),_:2},1024))),128))],64))}},ti=Symbol.for("vuetify:v-expansion-panel"),Q0=["default","accordion","inset","popout"],ew=K({color:String,flat:Boolean,focusable:Boolean,static:Boolean,tile:Boolean,variant:{type:String,default:"default",validator:e=>Q0.includes(e)},readonly:Boolean,...ke(),...fa(),...Je(),...nt()},"VExpansionPanels"),tw=ue()({name:"VExpansionPanels",props:ew(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;oi(e,ti);const{themeClasses:l}=rt(e),i=w(()=>e.variant&&`v-expansion-panels--variant-${e.variant}`);return pn({VExpansionPanel:{color:re(e,"color"),readonly:re(e,"readonly")},VExpansionPanelTitle:{focusable:re(e,"focusable"),static:re(e,"static")}}),pe(()=>h(e.tag,{class:["v-expansion-panels",{"v-expansion-panels--flat":e.flat,"v-expansion-panels--tile":e.tile},l.value,i.value,e.class],style:e.style},n)),{}}}),nw=K({...ke(),...ya()},"VExpansionPanelText"),xf=ue()({name:"VExpansionPanelText",props:nw(),setup(e,t){let{slots:n}=t;const l=Ge(ti);if(!l)throw new Error("[Vuetify] v-expansion-panel-text needs to be placed inside v-expansion-panel");const{hasContent:i,onAfterLeave:a}=fr(e,l.isSelected);return pe(()=>h(kd,{onAfterLeave:a},{default:()=>{var s;return[mt(h("div",{class:["v-expansion-panel-text",e.class],style:e.style},[n.default&&i.value&&h("div",{class:"v-expansion-panel-text__wrapper"},[(s=n.default)==null?void 0:s.call(n)])]),[[On,l.isSelected.value]])]}})),{}}}),_f=K({color:String,expandIcon:{type:Me,default:"$expand"},collapseIcon:{type:Me,default:"$collapse"},hideActions:Boolean,focusable:Boolean,static:Boolean,ripple:{type:[Boolean,Object],default:!1},readonly:Boolean,...ke()},"VExpansionPanelTitle"),kf=ue()({name:"VExpansionPanelTitle",directives:{Ripple:Pl},props:_f(),setup(e,t){let{slots:n}=t;const l=Ge(ti);if(!l)throw new Error("[Vuetify] v-expansion-panel-title needs to be placed inside v-expansion-panel");const{backgroundColorClasses:i,backgroundColorStyles:a}=Qt(e,"color"),s=w(()=>({collapseIcon:e.collapseIcon,disabled:l.disabled.value,expanded:l.isSelected.value,expandIcon:e.expandIcon,readonly:e.readonly}));return pe(()=>{var r;return mt(h("button",{class:["v-expansion-panel-title",{"v-expansion-panel-title--active":l.isSelected.value,"v-expansion-panel-title--focusable":e.focusable,"v-expansion-panel-title--static":e.static},i.value,e.class],style:[a.value,e.style],type:"button",tabindex:l.disabled.value?-1:void 0,disabled:l.disabled.value,"aria-expanded":l.isSelected.value,onClick:e.readonly?void 0:l.toggle},[h("span",{class:"v-expansion-panel-title__overlay"},null),(r=n.default)==null?void 0:r.call(n,s.value),!e.hideActions&&h("span",{class:"v-expansion-panel-title__icon"},[n.actions?n.actions(s.value):h(De,{icon:l.isSelected.value?e.collapseIcon:e.expandIcon},null)])]),[[en("ripple"),e.ripple]])}),{}}}),lw=K({title:String,text:String,bgColor:String,...ke(),...Ln(),...va(),...ya(),...Tt(),...Je(),..._f()},"VExpansionPanel"),iw=ue()({name:"VExpansionPanel",props:lw(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const l=ma(e,ti),{backgroundColorClasses:i,backgroundColorStyles:a}=Qt(e,"bgColor"),{elevationClasses:s}=Rn(e),{roundedClasses:r}=Vt(e),o=w(()=>(l==null?void 0:l.disabled.value)||e.disabled),d=w(()=>l.group.items.value.reduce((u,v,m)=>(l.group.selected.value.includes(v.id)&&u.push(m),u),[])),c=w(()=>{const u=l.group.items.value.findIndex(v=>v.id===l.id);return!l.isSelected.value&&d.value.some(v=>v-u===1)}),f=w(()=>{const u=l.group.items.value.findIndex(v=>v.id===l.id);return!l.isSelected.value&&d.value.some(v=>v-u===-1)});return yt(ti,l),pn({VExpansionPanelText:{eager:re(e,"eager")},VExpansionPanelTitle:{readonly:re(e,"readonly")}}),pe(()=>{const u=!!(n.text||e.text),v=!!(n.title||e.title);return h(e.tag,{class:["v-expansion-panel",{"v-expansion-panel--active":l.isSelected.value,"v-expansion-panel--before-active":c.value,"v-expansion-panel--after-active":f.value,"v-expansion-panel--disabled":o.value},r.value,i.value,e.class],style:[a.value,e.style]},{default:()=>{var m;return[h("div",{class:["v-expansion-panel__shadow",...s.value]},null),v&&h(kf,{key:"title",collapseIcon:e.collapseIcon,color:e.color,expandIcon:e.expandIcon,hideActions:e.hideActions,ripple:e.ripple},{default:()=>[n.title?n.title():e.title]}),u&&h(xf,{key:"text"},{default:()=>[n.text?n.text():e.text]}),(m=n.default)==null?void 0:m.call(n)]}})}),{}}}),Pf=Symbol.for("vuetify:v-tabs"),aw=K({fixed:Boolean,sliderColor:String,hideSlider:Boolean,direction:{type:String,default:"horizontal"},...yn(wf({selectedClass:"v-tab--selected",variant:"text"}),["active","block","flat","location","position","symbol"])},"VTab"),Af=ue()({name:"VTab",props:aw(),setup(e,t){let{slots:n,attrs:l}=t;const{textColorClasses:i,textColorStyles:a}=$t(e,"sliderColor"),s=Q(),r=Q(),o=w(()=>e.direction==="horizontal"),d=w(()=>{var f,u;return((u=(f=s.value)==null?void 0:f.group)==null?void 0:u.isSelected.value)??!1});function c(f){var v,m;let{value:u}=f;if(u){const y=(m=(v=s.value)==null?void 0:v.$el.parentElement)==null?void 0:m.querySelector(".v-tab--selected .v-tab__slider"),p=r.value;if(!y||!p)return;const P=getComputedStyle(y).color,I=y.getBoundingClientRect(),E=p.getBoundingClientRect(),k=o.value?"x":"y",_=o.value?"X":"Y",S=o.value?"right":"bottom",x=o.value?"width":"height",T=I[k],M=E[k],L=T>M?I[S]-E[S]:I[k]-E[k],N=Math.sign(L)>0?o.value?"right":"bottom":Math.sign(L)<0?o.value?"left":"top":"center",F=(Math.abs(L)+(Math.sign(L)<0?I[x]:E[x]))/Math.max(I[x],E[x])||0,D=I[x]/E[x]||0,Z=1.5;Hn(p,{backgroundColor:[P,"currentcolor"],transform:[`translate${_}(${L}px) scale${_}(${D})`,`translate${_}(${L/Z}px) scale${_}(${(F-1)/Z+1})`,"none"],transformOrigin:Array(3).fill(N)},{duration:225,easing:Xl})}}return pe(()=>{const f=Qn.filterProps(e);return h(Qn,ge({symbol:Pf,ref:s,class:["v-tab",e.class],style:e.style,tabindex:d.value?0:-1,role:"tab","aria-selected":String(d.value),active:!1},f,l,{block:e.fixed,maxWidth:e.fixed?300:void 0,"onGroup:selected":c}),{...n,default:()=>{var u;return h(fe,null,[((u=n.default)==null?void 0:u.call(n))??e.text,!e.hideSlider&&h("div",{ref:r,class:["v-tab__slider",i.value],style:a.value},null)])}})}),Il({},s)}});function sw(e){return e?e.map(t=>Ni(t)?t:{text:t,value:t}):[]}const rw=K({alignTabs:{type:String,default:"start"},color:String,fixedTabs:Boolean,items:{type:Array,default:()=>[]},stacked:Boolean,bgColor:String,grow:Boolean,height:{type:[Number,String],default:void 0},hideSlider:Boolean,sliderColor:String,...or({mandatory:"force"}),...Nt(),...Je()},"VTabs"),ow=ue()({name:"VTabs",props:rw(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const l=Ye(e,"modelValue"),i=w(()=>sw(e.items)),{densityClasses:a}=Ut(e),{backgroundColorClasses:s,backgroundColorStyles:r}=Qt(re(e,"bgColor"));return pn({VTab:{color:re(e,"color"),direction:re(e,"direction"),stacked:re(e,"stacked"),fixed:re(e,"fixedTabs"),sliderColor:re(e,"sliderColor"),hideSlider:re(e,"hideSlider")}}),pe(()=>{const o=Yi.filterProps(e);return h(Yi,ge(o,{modelValue:l.value,"onUpdate:modelValue":d=>l.value=d,class:["v-tabs",`v-tabs--${e.direction}`,`v-tabs--align-tabs-${e.alignTabs}`,{"v-tabs--fixed-tabs":e.fixedTabs,"v-tabs--grow":e.grow,"v-tabs--stacked":e.stacked},a.value,s.value,e.class],style:[{"--v-tabs-height":be(e.height)},r.value,e.style],role:"tablist",symbol:Pf}),{default:()=>[n.default?n.default():i.value.map(d=>h(Af,ge(d,{key:d.text}),null))]})}),{}}}),uw=e=>{const{touchstartX:t,touchendX:n,touchstartY:l,touchendY:i}=e,a=.5,s=16;e.offsetX=n-t,e.offsetY=i-l,Math.abs(e.offsetY)<a*Math.abs(e.offsetX)&&(e.left&&n<t-s&&e.left(e),e.right&&n>t+s&&e.right(e)),Math.abs(e.offsetX)<a*Math.abs(e.offsetY)&&(e.up&&i<l-s&&e.up(e),e.down&&i>l+s&&e.down(e))};function cw(e,t){var l;const n=e.changedTouches[0];t.touchstartX=n.clientX,t.touchstartY=n.clientY,(l=t.start)==null||l.call(t,{originalEvent:e,...t})}function dw(e,t){var l;const n=e.changedTouches[0];t.touchendX=n.clientX,t.touchendY=n.clientY,(l=t.end)==null||l.call(t,{originalEvent:e,...t}),uw(t)}function fw(e,t){var l;const n=e.changedTouches[0];t.touchmoveX=n.clientX,t.touchmoveY=n.clientY,(l=t.move)==null||l.call(t,{originalEvent:e,...t})}function vw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t={touchstartX:0,touchstartY:0,touchendX:0,touchendY:0,touchmoveX:0,touchmoveY:0,offsetX:0,offsetY:0,left:e.left,right:e.right,up:e.up,down:e.down,start:e.start,move:e.move,end:e.end};return{touchstart:n=>cw(n,t),touchend:n=>dw(n,t),touchmove:n=>fw(n,t)}}function mw(e,t){var r;const n=t.value,l=n!=null&&n.parent?e.parentElement:e,i=(n==null?void 0:n.options)??{passive:!0},a=(r=t.instance)==null?void 0:r.$.uid;if(!l||!a)return;const s=vw(t.value);l._touchHandlers=l._touchHandlers??Object.create(null),l._touchHandlers[a]=s,kc(s).forEach(o=>{l.addEventListener(o,s[o],i)})}function hw(e,t){var a,s;const n=(a=t.value)!=null&&a.parent?e.parentElement:e,l=(s=t.instance)==null?void 0:s.$.uid;if(!(n!=null&&n._touchHandlers)||!l)return;const i=n._touchHandlers[l];kc(i).forEach(r=>{n.removeEventListener(r,i[r])}),delete n._touchHandlers[l]}const Ef={mounted:mw,unmounted:hw},gw=Ef,If=Symbol.for("vuetify:v-window"),Tf=Symbol.for("vuetify:v-window-group"),yw=K({continuous:Boolean,nextIcon:{type:[Boolean,String,Function,Object],default:"$next"},prevIcon:{type:[Boolean,String,Function,Object],default:"$prev"},reverse:Boolean,showArrows:{type:[Boolean,String],validator:e=>typeof e=="boolean"||e==="hover"},touch:{type:[Object,Boolean],default:void 0},direction:{type:String,default:"horizontal"},modelValue:null,disabled:Boolean,selectedClass:{type:String,default:"v-window-item--active"},mandatory:{type:[Boolean,String],default:"force"},...ke(),...Je(),...nt()},"VWindow"),pw=ue()({name:"VWindow",directives:{Touch:Ef},props:yw(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:l}=rt(e),{isRtl:i}=bn(),{t:a}=_l(),s=oi(e,Tf),r=Q(),o=w(()=>i.value?!e.reverse:e.reverse),d=ve(!1),c=w(()=>{const k=e.direction==="vertical"?"y":"x",S=(o.value?!d.value:d.value)?"-reverse":"";return`v-window-${k}${S}-transition`}),f=ve(0),u=Q(void 0),v=w(()=>s.items.value.findIndex(k=>s.selected.value.includes(k.id)));de(v,(k,_)=>{const S=s.items.value.length,x=S-1;S<=2?d.value=k<_:k===x&&_===0?d.value=!0:k===0&&_===x?d.value=!1:d.value=k<_}),yt(If,{transition:c,isReversed:d,transitionCount:f,transitionHeight:u,rootRef:r});const m=w(()=>e.continuous||v.value!==0),y=w(()=>e.continuous||v.value!==s.items.value.length-1);function p(){m.value&&s.prev()}function P(){y.value&&s.next()}const I=w(()=>{const k=[],_={icon:i.value?e.nextIcon:e.prevIcon,class:`v-window__${o.value?"right":"left"}`,onClick:s.prev,"aria-label":a("$vuetify.carousel.prev")};k.push(m.value?n.prev?n.prev({props:_}):h(Qn,_,null):h("div",null,null));const S={icon:i.value?e.prevIcon:e.nextIcon,class:`v-window__${o.value?"left":"right"}`,onClick:s.next,"aria-label":a("$vuetify.carousel.next")};return k.push(y.value?n.next?n.next({props:S}):h(Qn,S,null):h("div",null,null)),k}),E=w(()=>e.touch===!1?e.touch:{...{left:()=>{o.value?p():P()},right:()=>{o.value?P():p()},start:_=>{let{originalEvent:S}=_;S.stopPropagation()}},...e.touch===!0?{}:e.touch});return pe(()=>mt(h(e.tag,{ref:r,class:["v-window",{"v-window--show-arrows-on-hover":e.showArrows==="hover"},l.value,e.class],style:e.style},{default:()=>{var k,_;return[h("div",{class:"v-window__container",style:{height:u.value}},[(k=n.default)==null?void 0:k.call(n,{group:s}),e.showArrows!==!1&&h("div",{class:"v-window__controls"},[I.value])]),(_=n.additional)==null?void 0:_.call(n,{group:s})]}}),[[en("touch"),E.value]])),{group:s}}}),bw=K({reverseTransition:{type:[Boolean,String],default:void 0},transition:{type:[Boolean,String],default:void 0},...ke(),...va(),...ya()},"VWindowItem"),ww=ue()({name:"VWindowItem",directives:{Touch:gw},props:bw(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const l=Ge(If),i=ma(e,Tf),{isBooted:a}=dr();if(!l||!i)throw new Error("[Vuetify] VWindowItem must be used inside VWindow");const s=ve(!1),r=w(()=>a.value&&(l.isReversed.value?e.reverseTransition!==!1:e.transition!==!1));function o(){!s.value||!l||(s.value=!1,l.transitionCount.value>0&&(l.transitionCount.value-=1,l.transitionCount.value===0&&(l.transitionHeight.value=void 0)))}function d(){var m;s.value||!l||(s.value=!0,l.transitionCount.value===0&&(l.transitionHeight.value=be((m=l.rootRef.value)==null?void 0:m.clientHeight)),l.transitionCount.value+=1)}function c(){o()}function f(m){s.value&&it(()=>{!r.value||!s.value||!l||(l.transitionHeight.value=be(m.clientHeight))})}const u=w(()=>{const m=l.isReversed.value?e.reverseTransition:e.transition;return r.value?{name:typeof m!="string"?l.transition.value:m,onBeforeEnter:d,onAfterEnter:o,onEnterCancelled:c,onBeforeLeave:d,onAfterLeave:o,onLeaveCancelled:c,onEnter:f}:!1}),{hasContent:v}=fr(e,i.isSelected);return pe(()=>h(cn,{transition:u.value,disabled:!a.value},{default:()=>{var m;return[mt(h("div",{class:["v-window-item",i.selectedClass.value,e.class],style:e.style},[v.value&&((m=n.default)==null?void 0:m.call(n))]),[[On,i.isSelected.value]])]}})),{groupItem:i}}}),Sw={key:0,class:"text-h4 text-center"},Cw={key:1,class:"mt-2"},xw={__name:"dashboard",setup(e){const t=window.APPLICATION,n=t.configuration,l=d=>{console.error(d),Ki(t.href+"/error",{method:"POST",body:{message:d.message||d}})};if(Ve.draft==="true"&&window.parent){const d=[].concat(...n.sections.map(f=>[].concat(...f.rows.map(u=>[].concat(...u.elements))))),c=d.filter(f=>f.type==="application"&&f.application).map(f=>({id:f.application.id,title:f.application.title})).filter((f,u,v)=>v.findIndex(m=>f.id===m.id)===u);if((n.applications||[]).map(f=>f.id).join("-")!==c.map(f=>f.id).join("-")&&window.parent.postMessage({type:"set-config",content:{field:"applications",value:c}},"*"),n.datasets&&n.datasets.length){const f=n.datasets[0],u=d.filter(v=>v.type==="tablePreview"&&v.dataset).map(v=>({id:v.dataset.id,title:v.dataset.title,href:v.dataset.href})).filter((v,m,y)=>v.id!==f.id&&y.findIndex(p=>v.id===p.id)===m);u.unshift(f),(n.datasets||[]).map(v=>v.id).join("-")!==u.map(v=>v.id).join("-")&&window.parent.postMessage({type:"set-config",content:{field:"datasets",value:u}},"*")}}const i=Q({}),a=Q(null);let s=0,r=0;if(!n.datasets||!n.datasets.length)l("Veuillez choisir un source de données pour le filtre commun");else if((!n.filters||!n.filters.length)&&!n.periodFilter&&!n.addressFilter)l("Veuillez configurer un filtre");else{const d="_d_"+n.datasets[0].id+"_";for(const c of n.filters)!Ve[d+c.labelField+"_in"]&&c.forceOneValue&&c.startValue&&(Ve[d+c.labelField+"_in"]=c.startValue);if(n.periodFilter&&!Ve.period){const c=(n.datasets[0].timePeriod?n.datasets[0].timePeriod.startDate:new Date().toISOString()).slice(0,10),f=(n.datasets[0].timePeriod?n.datasets[0].timePeriod.endDate:new Date().toISOString()).slice(0,10),u=[c];c!==f&&u.push(f),Ve.period=u.join(",")}s=Math.max(...n.sections.map(c=>c.title&&c.title.length||0)),r=n.sections.reduce((c,f)=>c+(f.title&&f.title.length||0),0)}return(d,c)=>{var f;return(f=le(n).filters)!=null&&f.length||le(n).periodFilter||le(n).addressFilter?(ce(),je(o0,{key:0,fluid:"","data-iframe-height":""},{default:_e(()=>[le(n).title?(ce(),Be("h2",Sw,ot(le(n).title),1)):et("",!0),le(n).description?(ce(),Be("p",Cw,ot(le(n).description),1)):et("",!0),h(I0,{config:le(n),"onUpdate:modelValue":c[0]||(c[0]=u=>i.value=u)},null,8,["config"]),le(n).sections.length===1?(ce(),je(xi,{key:2,section:le(n).sections[0],"filters-values":i.value},null,8,["section","filters-values"])):le(n).sectionsGroup.includes("tabs")?(ce(),Be(fe,{key:3},[le(n).sectionsGroup==="tabs-tab"?(ce(),je(ow,{key:0,modelValue:a.value,"onUpdate:modelValue":c[1]||(c[1]=u=>a.value=u),class:"mb-3",color:"primary","fixed-tabs":le(s)<=30,grow:le(s)>30&&le(r)<200,direction:le(r)>=200?"vertical":"horizontal"},{default:_e(()=>[(ce(!0),Be(fe,null,on(le(n).sections||[],(u,v)=>(ce(),je(Af,{key:v,value:v},{default:_e(()=>[u.icon?(ce(),Be(fe,{key:0},[h(De,null,{default:_e(()=>[st(" mdi-"+ot(u.icon.name),1)]),_:2},1024),st(" ")],64)):et("",!0),st(" "+ot(u.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","fixed-tabs","grow","direction"])):le(n).sectionsGroup==="tabs-button"?(ce(),je(ei,{key:1},{default:_e(()=>[h(ru),h(un,{cols:"auto"},{default:_e(()=>[h(xs,{variant:"outlined"},{default:_e(()=>[h(O0,{modelValue:a.value,"onUpdate:modelValue":c[2]||(c[2]=u=>a.value=u),color:"primary",mandatory:"",style:An(le(r)*15>=d.$vuetify.display.width?`flex-direction: column;height:${le(n).sections.length*36}px`:"")},{default:_e(()=>[(ce(!0),Be(fe,null,on(le(n).sections||[],(u,v)=>(ce(),je(Qn,{key:v,value:v,height:le(r)*15>=d.$vuetify.display.width?36:48},{default:_e(()=>[u.icon?(ce(),Be(fe,{key:0},[h(De,null,{default:_e(()=>[st(" mdi-"+ot(u.icon.name),1)]),_:2},1024),st(" ")],64)):et("",!0),st(" "+ot(u.title),1)]),_:2},1032,["value","height"]))),128))]),_:1},8,["modelValue","style"])]),_:1})]),_:1}),h(ru)]),_:1})):et("",!0),h(pw,{modelValue:a.value,"onUpdate:modelValue":c[3]||(c[3]=u=>a.value=u)},{default:_e(()=>[(ce(!0),Be(fe,null,on(le(n).sections||[],(u,v)=>(ce(),je(ww,{key:v,value:v},{default:_e(()=>[h(xi,{section:u,"filters-values":i.value,"hide-title":""},null,8,["section","filters-values"])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])],64)):le(n).sectionsGroup==="accordion"?(ce(),je(tw,{key:4,multiple:"",variant:"accordion","model-value":le(n).sections.map((u,v)=>v)},{default:_e(()=>[(ce(!0),Be(fe,null,on(le(n).sections||[],(u,v)=>(ce(),je(iw,{key:v,value:v,eager:""},{default:_e(()=>[h(kf,{class:"bg-primary"},{default:_e(()=>[Yn("h3",null,[u.icon?(ce(),Be(fe,{key:0},[h(De,null,{default:_e(()=>[st(" mdi-"+ot(u.icon.name),1)]),_:2},1024),st(" ")],64)):et("",!0),st(" "+ot(u.title),1)])]),_:2},1024),h(xf,null,{default:_e(()=>[h(xi,{section:u,"filters-values":i.value,"hide-title":""},null,8,["section","filters-values"])]),_:2},1024)]),_:2},1032,["value"]))),128))]),_:1},8,["model-value"])):(ce(!0),Be(fe,{key:5},on(le(n).sections||[],(u,v)=>(ce(),Be("div",{key:v,class:"my-6"},[Yn("h2",null,[u.icon?(ce(),Be(fe,{key:0},[h(De,null,{default:_e(()=>[st(" mdi-"+ot(u.icon.name),1)]),_:2},1024),st(" ")],64)):et("",!0),st(" "+ot(u.title),1)]),h(xi,{section:u,"filters-values":i.value,"hide-title":""},null,8,["section","filters-values"])]))),128))]),_:1})):et("",!0)}}},_w=K({...ke(),...ly({fullHeight:!0}),...nt()},"VApp"),kw=ue()({name:"VApp",props:_w(),setup(e,t){let{slots:n}=t;const l=rt(e),{layoutClasses:i,getLayoutItem:a,items:s,layoutRef:r}=sy(e),{rtlClasses:o}=bn();return pe(()=>{var d;return h("div",{ref:r,class:["v-application",l.themeClasses.value,i.value,o.value,e.class],style:[e.style]},[h("div",{class:"v-application__wrap"},[(d=n.default)==null?void 0:d.call(n)])])}),{getLayoutItem:a,items:s,theme:l}}}),Pw=K({scrollable:Boolean,...ke(),...Je({tag:"main"})},"VMain"),Aw=ue()({name:"VMain",props:Pw(),setup(e,t){let{slots:n}=t;const{mainStyles:l}=iy(),{ssrBootStyles:i}=dr();return pe(()=>h(e.tag,{class:["v-main",{"v-main--scrollable":e.scrollable},e.class],style:[l.value,i.value,e.style]},{default:()=>{var a,s;return[e.scrollable?h("div",{class:"v-main__scroller"},[(a=n.default)==null?void 0:a.call(n)]):(s=n.default)==null?void 0:s.call(n)]}})),{}}}),Ew={__name:"app",setup(e){return(t,n)=>(ce(),je(kw,null,{default:_e(()=>[h(Aw,null,{default:_e(()=>[(ce(),je(Fv,null,{default:_e(()=>[h(xw)]),_:1}))]),_:1})]),_:1}))}};window.iFrameResizer={heightCalculationMethod:"taggedElement"};const Vf=dh(Ew);Vf.use(Jc(cy));Vf.mount("#app");
|
package/dist/config-schema.json
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
{
|
8
8
|
"title": "Source des valeurs pour les filtres",
|
9
9
|
"type": "object",
|
10
|
-
"x-fromUrl": "api/v1/datasets?status=finalized&q={q}&select=id,title,schema,timePeriod,bbox&
|
10
|
+
"x-fromUrl": "api/v1/datasets?status=finalized&q={q}&select=id,title,schema,timePeriod,bbox&{context.datasetFilter}&sort=createdAt:-1",
|
11
11
|
"x-itemsProp": "results",
|
12
12
|
"x-itemTitle": "title",
|
13
13
|
"x-itemKey": "href",
|
@@ -220,95 +220,232 @@
|
|
220
220
|
"definitions": {
|
221
221
|
"table": {
|
222
222
|
"title": "Prévisualisation table",
|
223
|
+
"type": "object",
|
223
224
|
"properties": {
|
224
|
-
"type": { "const": "tablePreview", "title": "Type de l'élément" }
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
"
|
229
|
-
"x-itemTitle": "title",
|
230
|
-
"x-itemsProp": "results",
|
225
|
+
"type": { "const": "tablePreview", "title": "Type de l'élément" }
|
226
|
+
},
|
227
|
+
"oneOf": [
|
228
|
+
{
|
229
|
+
"title": "Jeu de données des filtres",
|
231
230
|
"properties": {
|
232
|
-
"
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
"
|
243
|
-
"
|
231
|
+
"source": {
|
232
|
+
"const": "root",
|
233
|
+
"title": "Source des données"
|
234
|
+
},
|
235
|
+
"fields": {
|
236
|
+
"title": "Champs à afficher",
|
237
|
+
"description": "Si vide, tous les champs seront affichés",
|
238
|
+
"type": "array",
|
239
|
+
"x-fromUrl": "{datasets[0].href}/schema?calculated=false",
|
240
|
+
"x-itemTitle": "label",
|
241
|
+
"x-itemKey": "key",
|
242
|
+
"items": {
|
243
|
+
"type": "string"
|
244
|
+
}
|
244
245
|
},
|
245
|
-
{
|
246
|
-
"
|
247
|
-
"
|
246
|
+
"display": {
|
247
|
+
"type": "string",
|
248
|
+
"oneOf": [
|
249
|
+
{
|
250
|
+
"const": "table",
|
251
|
+
"title": "Tableau"
|
252
|
+
},
|
253
|
+
{
|
254
|
+
"const": "table-dense",
|
255
|
+
"title": "Tableau dense"
|
256
|
+
},
|
257
|
+
{
|
258
|
+
"const": "list",
|
259
|
+
"title": "Vignettes"
|
260
|
+
}
|
261
|
+
],
|
262
|
+
"default": "table",
|
263
|
+
"title": "Affichage"
|
248
264
|
},
|
249
|
-
{
|
250
|
-
"
|
251
|
-
"
|
265
|
+
"noInteractions": {
|
266
|
+
"title": "Désactiver les interactions",
|
267
|
+
"type": "boolean",
|
268
|
+
"default": false
|
269
|
+
},
|
270
|
+
"valueMandatory": {
|
271
|
+
"title": "Nécessite une valeur dans des filtres",
|
272
|
+
"type": "boolean",
|
273
|
+
"default": false
|
274
|
+
},
|
275
|
+
"mandatoryFilters": {
|
276
|
+
"title": "Filtres requis",
|
277
|
+
"type": "array",
|
278
|
+
"x-if": "parent.value.valueMandatory",
|
279
|
+
"x-fromData": "filters",
|
280
|
+
"x-itemKey": "labelField",
|
281
|
+
"x-itemTitle": "labelField",
|
282
|
+
"items": {
|
283
|
+
"type": "string"
|
284
|
+
}
|
252
285
|
}
|
253
|
-
],
|
254
|
-
"default": "table",
|
255
|
-
"title": "Affichage"
|
256
|
-
},
|
257
|
-
"noInteractions": {
|
258
|
-
"title": "Désactiver les interactions",
|
259
|
-
"type": "boolean",
|
260
|
-
"default": false
|
261
|
-
},
|
262
|
-
"fields": {
|
263
|
-
"title": "Champs à afficher",
|
264
|
-
"description": "Si vide, tous les champs seront affichés",
|
265
|
-
"type": "array",
|
266
|
-
"x-fromUrl": "{parent.value.dataset.href}/schema?calculated=false",
|
267
|
-
"x-itemTitle": "label",
|
268
|
-
"x-itemKey": "key",
|
269
|
-
"items": {
|
270
|
-
"type": "string"
|
271
286
|
}
|
272
287
|
},
|
273
|
-
|
274
|
-
"title": "
|
275
|
-
"
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
288
|
+
{
|
289
|
+
"title": "Autre jeu de données",
|
290
|
+
"properties": {
|
291
|
+
"source": {
|
292
|
+
"const": "external",
|
293
|
+
"title": "Source des données"
|
294
|
+
},
|
295
|
+
"dataset": {
|
296
|
+
"type": "object",
|
297
|
+
"x-fromUrl": "api/v1/datasets?q={q}&{context.datasetFilter}&select=id,title,schema&sort=createdAt:-1",
|
298
|
+
"x-itemKey": "id",
|
299
|
+
"x-itemTitle": "title",
|
300
|
+
"x-itemsProp": "results",
|
301
|
+
"properties": {
|
302
|
+
"id": { "type": "string" },
|
303
|
+
"title": { "type": "string" },
|
304
|
+
"href": { "type": "string" },
|
305
|
+
"schema": { "type": "array" }
|
306
|
+
}
|
307
|
+
},
|
308
|
+
"fields": {
|
309
|
+
"title": "Champs à afficher",
|
310
|
+
"description": "Si vide, tous les champs seront affichés",
|
311
|
+
"type": "array",
|
312
|
+
"x-fromUrl": "{parent.value.dataset.href}/schema?calculated=false",
|
313
|
+
"x-itemTitle": "label",
|
314
|
+
"x-itemKey": "key",
|
315
|
+
"items": {
|
316
|
+
"type": "string"
|
317
|
+
}
|
318
|
+
},
|
319
|
+
"display": {
|
320
|
+
"type": "string",
|
321
|
+
"oneOf": [
|
322
|
+
{
|
323
|
+
"const": "table",
|
324
|
+
"title": "Tableau"
|
325
|
+
},
|
326
|
+
{
|
327
|
+
"const": "table-dense",
|
328
|
+
"title": "Tableau dense"
|
329
|
+
},
|
330
|
+
{
|
331
|
+
"const": "list",
|
332
|
+
"title": "Vignettes"
|
333
|
+
}
|
334
|
+
],
|
335
|
+
"default": "table",
|
336
|
+
"title": "Affichage"
|
337
|
+
},
|
338
|
+
"noInteractions": {
|
339
|
+
"title": "Désactiver les interactions",
|
340
|
+
"type": "boolean",
|
341
|
+
"default": false
|
342
|
+
},
|
343
|
+
"valueMandatory": {
|
344
|
+
"title": "Nécessite une valeur dans des filtres",
|
345
|
+
"type": "boolean",
|
346
|
+
"default": false
|
347
|
+
},
|
348
|
+
"mandatoryFilters": {
|
349
|
+
"title": "Filtres requis",
|
350
|
+
"type": "array",
|
351
|
+
"x-if": "parent.value.valueMandatory",
|
352
|
+
"x-fromData": "filters",
|
353
|
+
"x-itemKey": "labelField",
|
354
|
+
"x-itemTitle": "labelField",
|
355
|
+
"items": {
|
356
|
+
"type": "string"
|
357
|
+
}
|
358
|
+
}
|
287
359
|
}
|
288
360
|
}
|
361
|
+
],
|
362
|
+
"default": {
|
363
|
+
"source": "root"
|
289
364
|
}
|
290
365
|
},
|
291
366
|
"application": {
|
292
367
|
"title": "Visualisation",
|
293
368
|
"properties": {
|
294
|
-
"type": { "const": "application", "title": "Type de l'élément" }
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
"
|
299
|
-
"x-itemTitle": "title",
|
300
|
-
"x-itemsProp": "results",
|
369
|
+
"type": { "const": "application", "title": "Type de l'élément" }
|
370
|
+
},
|
371
|
+
"oneOf": [
|
372
|
+
{
|
373
|
+
"title": "Jeu de données des filtres",
|
301
374
|
"properties": {
|
302
|
-
"
|
303
|
-
|
304
|
-
|
375
|
+
"source": {
|
376
|
+
"const": "root",
|
377
|
+
"title": "Source des données de l'application"
|
378
|
+
},
|
379
|
+
"application": {
|
380
|
+
"type": "object",
|
381
|
+
"x-fromUrl": "api/v1/applications?q={q}&{context.datasetFilter}&dataset={datasets[0].id}&filterConcepts=true&select=id,title,baseApp&sort=createdAt:-1",
|
382
|
+
"x-itemKey": "id",
|
383
|
+
"x-itemTitle": "title",
|
384
|
+
"x-itemsProp": "results",
|
385
|
+
"properties": {
|
386
|
+
"id": { "type": "string" },
|
387
|
+
"title": { "type": "string" },
|
388
|
+
"baseApp": { "type": "object" }
|
389
|
+
}
|
390
|
+
},
|
391
|
+
"valueMandatory": {
|
392
|
+
"title": "Nécessite une valeur dans des filtres",
|
393
|
+
"type": "boolean",
|
394
|
+
"default": false
|
395
|
+
},
|
396
|
+
"mandatoryFilters": {
|
397
|
+
"title": "Filtres requis",
|
398
|
+
"type": "array",
|
399
|
+
"x-if": "parent.value.valueMandatory",
|
400
|
+
"x-fromData": "filters",
|
401
|
+
"x-itemKey": "labelField",
|
402
|
+
"x-itemTitle": "labelField",
|
403
|
+
"items": {
|
404
|
+
"type": "string"
|
405
|
+
}
|
406
|
+
}
|
305
407
|
}
|
306
408
|
},
|
307
|
-
|
308
|
-
"title": "
|
309
|
-
"
|
310
|
-
|
409
|
+
{
|
410
|
+
"title": "Autre jeu de données",
|
411
|
+
"properties": {
|
412
|
+
"source": {
|
413
|
+
"const": "external",
|
414
|
+
"title": "Source des données de l'application"
|
415
|
+
},
|
416
|
+
"application": {
|
417
|
+
"type": "object",
|
418
|
+
"x-fromUrl": "api/v1/applications?q={q}&{context.datasetFilter}&filterConcepts=true&select=id,title,baseApp",
|
419
|
+
"x-itemKey": "id",
|
420
|
+
"x-itemTitle": "title",
|
421
|
+
"x-itemsProp": "results",
|
422
|
+
"properties": {
|
423
|
+
"id": { "type": "string" },
|
424
|
+
"title": { "type": "string" },
|
425
|
+
"baseApp": { "type": "object" }
|
426
|
+
}
|
427
|
+
},
|
428
|
+
"valueMandatory": {
|
429
|
+
"title": "Nécessite une valeur dans des filtres",
|
430
|
+
"type": "boolean",
|
431
|
+
"default": false
|
432
|
+
},
|
433
|
+
"mandatoryFilters": {
|
434
|
+
"title": "Filtres requis",
|
435
|
+
"type": "array",
|
436
|
+
"x-if": "parent.value.valueMandatory",
|
437
|
+
"x-fromData": "filters",
|
438
|
+
"x-itemKey": "labelField",
|
439
|
+
"x-itemTitle": "labelField",
|
440
|
+
"items": {
|
441
|
+
"type": "string"
|
442
|
+
}
|
443
|
+
}
|
444
|
+
}
|
311
445
|
}
|
446
|
+
],
|
447
|
+
"default": {
|
448
|
+
"source": "root"
|
312
449
|
}
|
313
450
|
},
|
314
451
|
"text": {
|
package/dist/index.html
CHANGED
@@ -20,8 +20,8 @@
|
|
20
20
|
|
21
21
|
<!-- Capture a global variable defined by data-fair's reverse proxy. -->
|
22
22
|
<script type="text/javascript">window.APPLICATION=%APPLICATION%;</script>
|
23
|
-
<script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@data-fair/app-dashboards@0.8.
|
24
|
-
<link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@data-fair/app-dashboards@0.8.
|
23
|
+
<script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@data-fair/app-dashboards@0.8.1/dist/assets/index-B84G-kDO.js"></script>
|
24
|
+
<link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@data-fair/app-dashboards@0.8.1/dist/assets/index-CaUwrmsK.css">
|
25
25
|
</head>
|
26
26
|
|
27
27
|
<body>
|