Commit 8081b046 authored by Jean-Baptiste Oellers's avatar Jean-Baptiste Oellers
Browse files

Ajout fichiers compilés front

parent c4cfb7e9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -32,5 +32,6 @@
  },
  "dependencies": {
    "xml2js": "^0.4.23"
  }
  },
  "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
+0 −1
Original line number Diff line number Diff line
li[data-v-7efeeb03]{list-style:none}.selectedmotcle[data-v-7efeeb03]{display:inline;background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;margin-right:5px;margin-top:5px;padding:0 5px;cursor:default;line-break:anywhere}.selectedmotcle>span[data-v-7efeeb03]{color:#999;cursor:pointer;font-weight:700;margin-right:2px}.undetouslesmotscles[data-v-7efeeb03]{padding:6px}.undetouslesmotscles[data-v-7efeeb03]:hover{background-color:#5897fb;color:#fff;cursor:pointer}.selected[data-v-7efeeb03]{background-color:#ddd}.inputNouveauMotCle[data-v-7efeeb03]{width:100%;min-width:80px;border:none;outline:0}.bouton[data-v-7efeeb03]{background-color:#fff;border-radius:0;border:1px solid transparent;line-height:22px;font-size:14px;padding:6px 12px}.bouton[data-v-7efeeb03]:hover{background-color:#e6e6e6;border-color:#adadad}.bouton[disabled][data-v-7efeeb03]{cursor:not-allowed;opacity:.65}.bouton:hover[disabled][data-v-7efeeb03]{background-color:#fff;border-color:#ccc}.listeDeTousLesMotsCles[data-v-7efeeb03]{margin:0;padding:0;width:100%;max-height:200px;overflow-y:auto}
+1 −0
Original line number Diff line number Diff line
li[data-v-926a5c63]{list-style:none}.selectedmotcle[data-v-926a5c63]{display:inline;background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;margin-right:5px;margin-top:5px;padding:0 5px;cursor:default;line-break:anywhere}.selectedmotcle>span[data-v-926a5c63]{color:#999;cursor:pointer;font-weight:700;margin-right:2px}.undetouslesmotscles[data-v-926a5c63]{padding:6px}.undetouslesmotscles[data-v-926a5c63]:hover{background-color:#5897fb;color:#fff;cursor:pointer}.selected[data-v-926a5c63]{background-color:#ddd}.inputNouveauMotCle[data-v-926a5c63]{width:100%;min-width:80px;border:none;outline:0}.bouton[data-v-926a5c63]{background-color:#fff;border-radius:0;border:1px solid transparent;line-height:22px;font-size:14px;padding:6px 12px}.bouton[data-v-926a5c63]:hover{background-color:#e6e6e6;border-color:#adadad}.bouton[disabled][data-v-926a5c63]{cursor:not-allowed;opacity:.65}.bouton:hover[disabled][data-v-926a5c63]{background-color:#fff;border-color:#ccc}.listeDeTousLesMotsCles[data-v-926a5c63]{margin:0;padding:0;width:100%;max-height:200px;overflow-y:auto}
+0 −1
Original line number Diff line number Diff line
import{a as f,r as b,o as n,c as r,b as C,d as l,f as d,h as u,F as a,e as m,k as x,m as w,i as k,t as p,n as L,p as M,g as I,z as D}from"../vendor.js";import{A as E}from"../vendor7.js";import{L as T}from"../vendor13.js";import{_ as N}from"../vendor9.js";const z={components:{Loader:T},props:{url:{default:null},motsclesselectionnes:{default:[]}},computed:{aucunMotCleNeCorrespond(){return this.userInput&&this.touslesmotscles.filter(e=>e.label.toLocaleLowerCase().includes(this.userInput.trim().toLocaleLowerCase())).length==0}},data(){return{touslesmotscles:[],error:null,loading:null,affichertouslesmotscles:!1,userInput:""}},methods:{motCléExiste(){for(const e of this.touslesmotscles)if(e.label.toLocaleLowerCase()==this.userInput.toLocaleLowerCase())return!0;return!1},créerMotClé(e){e.preventDefault(),this.affichertouslesmotscles=!1,this.loading="Création du mot clé",f.post(this.url,{action:"create",label:this.userInput.trim()}).then(s=>{let c=s.data;c.selected=!0,this.touslesmotscles.push(c),this.userInput=""},s=>{this.handleError(s)}).finally(()=>{this.loading=null})},onKeyDown(e){if(e.key==="Enter"){e.preventDefault();return}if(e.key==="Tab"){this.affichertouslesmotscles=!1;return}},clickInput(){this.affichertouslesmotscles=!0},onMouseDown(e){!e.target.classList.contains("undetouslesmotscles")&&!e.target.classList.contains("inputNouveauMotCle")&&!e.target.classList.contains("listeDeTousLesMotsCles")&&(this.affichertouslesmotscles=!1)},fetch(){this.loading="Chargement des mots clés",f.get(this.url).then(e=>{this.touslesmotscles=e.data.motscles;const s=JSON.parse(this.motsclesselectionnes);for(let c of this.touslesmotscles)s.includes(c.id)&&(c.selected=!0);this.loading=null},e=>{this.handleError(e),this.loading=null})},handleError(e){if(!e.response.data){this.error=e;return}if(e.response.headers.get("content-type").includes("text/html")){var s=document.createElement("html");s.innerHTML=e.response.data;const c=s.querySelector('[id="contenu-principal"]');if(c){this.error=c.innerHTML;return}}this.error=E.manageErrorResponse(e)}},mounted(){document.addEventListener("mousedown",this.onMouseDown),this.fetch()},unmounted(){document.removeEventListener("mousedown",this.onMouseDown)}},h=e=>(M("data-v-7efeeb03"),e=e(),I(),e),S={style:{position:"relative"}},A={key:0,class:"overlay",style:{"z-index":"101"}},H={class:"overlay-content",style:{"max-width":"50%"}},V={class:"alert-danger alert"},F=h(()=>l("i",{class:"icon-attention-1"},null,-1)),K=["innerHTML"],B=h(()=>l("i",{class:"icon-cancel-outline"},null,-1)),j=h(()=>l("label",null,"Mots clés",-1)),q={style:{display:"none"},name:"motscles[]",multiple:"",tabindex:"-1","aria-hidden":"true"},J=["value"],O={style:{display:"flex"}},P={style:{width:"50%","min-width":"50%"}},R={style:{display:"flex","background-color":"white",border:"1px solid #aaa","border-radius":"4px","min-height":"34px"}},U={style:{display:"flex","flex-wrap":"wrap",margin:"0","padding-left":"5px","padding-right":"5px","padding-bottom":"5px",width:"100%","align-items":"center"}},X={key:0,class:"selectedmotcle"},G=["onClick"],Q={style:{"margin-top":"5px","flex-grow":"1",overflow:"auto"}},W={key:0,style:{"background-color":"white",border:"1px solid #aaa","border-radius":"4px","border-top-left-radius":"0","border-top-right-radius":"0",position:"absolute","z-index":"1051",width:"50%"}},Y={class:"listeDeTousLesMotsCles"},Z=["onClick"],$={key:0,style:{padding:"6px"}},ee={style:{"max-width":"50%",overflow:"auto","margin-left":"10px"}},te=["disabled"],se={key:0},oe={key:1,style:{"white-space":"preserve-spaces"}},le={key:0,style:{background:"#efefef",color:"#666666",padding:"0.5em 1em","margin-top":"0.5em","font-size":"0.9em","border-radius":"0.5em","font-weight":"100"}},ne={key:1,style:{background:"#efefef",color:"#666666",padding:"0.5em 1em","margin-top":"0.5em","font-size":"0.9em","border-radius":"0.5em","font-weight":"100"}};function re(e,s,c,ce,o,i){const g=b("Loader");return n(),r("section",S,[C(g,{visible:o.loading!=null,text:o.loading},null,8,["visible","text"]),o.error?(n(),r("div",A,[l("div",H,[l("h2",null,[d(" Erreur mots clés "),l("span",{class:"overlay-closer",onClick:s[0]||(s[0]=t=>o.error=null)},"X")]),l("div",V,[F,l("div",{innerHTML:o.error},null,8,K)]),l("button",{class:"btn btn-default",onClick:s[1]||(s[1]=t=>o.error=null)},[B,d(" Fermer ")])])])):u("",!0),j,l("select",q,[(n(!0),r(a,null,m(o.touslesmotscles,t=>(n(),r(a,null,[t.selected?(n(),r("option",{key:0,value:t.id,selected:""},p(t.label),9,J)):u("",!0)],64))),256))]),l("div",O,[l("div",P,[l("span",R,[l("ul",U,[(n(!0),r(a,null,m(o.touslesmotscles,t=>(n(),r(a,null,[t.selected?(n(),r("li",X,[l("span",{onClick:v=>t.selected=!1},"×",8,G),d(p(t.label),1)])):u("",!0)],64))),256)),l("li",Q,[x(l("input",{onFocusin:s[2]||(s[2]=(...t)=>i.clickInput&&i.clickInput(...t)),onClick:s[3]||(s[3]=(...t)=>i.clickInput&&i.clickInput(...t)),onKeydown:s[4]||(s[4]=(...t)=>i.onKeyDown&&i.onKeyDown(...t)),"onUpdate:modelValue":s[5]||(s[5]=t=>o.userInput=t),size:"1",class:"inputNouveauMotCle"},null,544),[[w,o.userInput]])])])]),o.affichertouslesmotscles?(n(),r("span",W,[l("ul",Y,[(n(!0),r(a,null,m(o.touslesmotscles,t=>(n(),r(a,null,[t.label.toLocaleLowerCase().includes(o.userInput.toLocaleLowerCase())?(n(),r("li",{key:0,class:L(["undetouslesmotscles",{selected:t.selected}]),onClick:v=>{t.selected=!t.selected,o.affichertouslesmotscles=!1,o.userInput=""}},p(t.label),11,Z)):u("",!0)],64))),256)),i.aucunMotCleNeCorrespond?(n(),r("li",$,"Aucun mot clé existant correspondant")):u("",!0)])])):u("",!0)]),l("div",ee,[l("button",{class:"bouton",onClick:s[6]||(s[6]=k((...t)=>i.créerMotClé&&i.créerMotClé(...t),["stop"])),disabled:!o.userInput.trim()||i.motCléExiste()},[d("Créer le nouveau mot clé : "),o.userInput.trim()?u("",!0):(n(),r("span",se,"")),o.userInput.trim()?(n(),r("span",oe,p(o.userInput.trim()),1)):u("",!0)],8,te),o.userInput.trim()?u("",!0):(n(),r("div",le,`ℹ️ Pour créer un nouveau mot clé, veuillez d'abord saisir son libellé dans le champ "Mots clés"`)),o.userInput.trim()&&i.motCléExiste()?(n(),r("div",ne,"ℹ️ Le mot clé existe déjà")):u("",!0)])])])}const ie=N(z,[["render",re],["__scopeId","data-v-7efeeb03"]]);let y="#activity-mots-cles",_=document.querySelector(y);const ue=D(ie,{url:_.dataset.url,motsclesselectionnes:_.dataset.motsclesselectionnes});ue.mount(y);
+1 −0
Original line number Diff line number Diff line
import{a as y,r as b,o as n,c as i,b as x,d as l,f as p,h as u,F as a,e as h,k as w,m as k,i as L,t as m,n as M,p as I,g as D,z as E}from"../vendor.js";import{A as N}from"../vendor7.js";import{L as T}from"../vendor13.js";import{_ as z}from"../vendor9.js";const S={components:{Loader:T},props:{url:{default:null},activityid:{default:null},motsclesselectionnes:{default:[]}},computed:{aucunMotCleNeCorrespond(){return this.userInput&&this.touslesmotscles.filter(e=>e.label.toLocaleLowerCase().includes(this.userInput.trim().toLocaleLowerCase())).length==0}},data(){return{touslesmotscles:[],error:null,loading:null,affichertouslesmotscles:!1,userInput:""}},methods:{motCléExiste(){for(const e of this.touslesmotscles)if(e.label.toLocaleLowerCase()==this.userInput.toLocaleLowerCase())return!0;return!1},créerMotClé(e){e.preventDefault(),this.affichertouslesmotscles=!1,this.loading="Création du mot clé",y.post(this.url+"?activity_id="+this.activityid,{action:"create",label:this.userInput.trim()}).then(s=>{let c=s.data;c.selected=!0,this.touslesmotscles.push(c),this.userInput=""},s=>{this.handleError(s)}).finally(()=>{this.loading=null})},onKeyDown(e){if(e.key==="Enter"){e.preventDefault();return}if(e.key==="Tab"){this.affichertouslesmotscles=!1;return}},clickInput(){this.affichertouslesmotscles=!0},onMouseDown(e){!e.target.classList.contains("undetouslesmotscles")&&!e.target.classList.contains("inputNouveauMotCle")&&!e.target.classList.contains("listeDeTousLesMotsCles")&&(this.affichertouslesmotscles=!1)},fetch(){this.loading="Chargement des mots clés",y.get(this.url+"?activity_id="+this.activityid).then(e=>{this.touslesmotscles=e.data.motscles;const s=JSON.parse(this.motsclesselectionnes);for(let c of this.touslesmotscles)s.includes(c.id)&&(c.selected=!0);this.loading=null},e=>{this.handleError(e),this.loading=null})},handleError(e){if(!e.response.data){this.error=e;return}if(e.response.headers.get("content-type").includes("text/html")){var s=document.createElement("html");s.innerHTML=e.response.data;const c=s.querySelector('[id="contenu-principal"]');if(c){this.error=c.innerHTML;return}const d=e.response.headers.get("content-length");if(d&&typeof d=="string"&&!isNaN(d)&&Number(d)<1e3){this.error=e.response.data;return}}this.error=N.manageErrorResponse(e)}},mounted(){document.addEventListener("mousedown",this.onMouseDown),this.fetch()},unmounted(){document.removeEventListener("mousedown",this.onMouseDown)}},_=e=>(I("data-v-926a5c63"),e=e(),D(),e),A={style:{position:"relative"}},H={key:0,class:"overlay",style:{"z-index":"101"}},V={class:"overlay-content",style:{"max-width":"50%"}},F={class:"alert-danger alert"},K=_(()=>l("i",{class:"icon-attention-1"},null,-1)),B=["innerHTML"],j=_(()=>l("i",{class:"icon-cancel-outline"},null,-1)),q=_(()=>l("label",null,"Mots clés",-1)),J={style:{display:"none"},name:"motscles[]",multiple:"",tabindex:"-1","aria-hidden":"true"},O=["value"],P={style:{display:"flex"}},R={style:{width:"50%","min-width":"50%"}},U={style:{display:"flex","background-color":"white",border:"1px solid #aaa","border-radius":"4px","min-height":"34px"}},X={style:{display:"flex","flex-wrap":"wrap",margin:"0","padding-left":"5px","padding-right":"5px","padding-bottom":"5px",width:"100%","align-items":"center"}},G={key:0,class:"selectedmotcle"},Q=["onClick"],W={style:{"margin-top":"5px","flex-grow":"1",overflow:"auto"}},Y={key:0,style:{"background-color":"white",border:"1px solid #aaa","border-radius":"4px","border-top-left-radius":"0","border-top-right-radius":"0",position:"absolute","z-index":"1051",width:"50%"}},Z={class:"listeDeTousLesMotsCles"},$=["onClick"],ee={key:0,style:{padding:"6px"}},te={style:{"max-width":"50%",overflow:"auto","margin-left":"10px"}},se=["disabled"],oe={key:0},le={key:1,style:{"white-space":"preserve-spaces"}},ne={key:0,style:{background:"#efefef",color:"#666666",padding:"0.5em 1em","margin-top":"0.5em","font-size":"0.9em","border-radius":"0.5em","font-weight":"100"}},ie={key:1,style:{background:"#efefef",color:"#666666",padding:"0.5em 1em","margin-top":"0.5em","font-size":"0.9em","border-radius":"0.5em","font-weight":"100"}};function re(e,s,c,d,o,r){const g=b("Loader");return n(),i("section",A,[x(g,{visible:o.loading!=null,text:o.loading},null,8,["visible","text"]),o.error?(n(),i("div",H,[l("div",V,[l("h2",null,[p(" Erreur mots clés "),l("span",{class:"overlay-closer",onClick:s[0]||(s[0]=t=>o.error=null)},"X")]),l("div",F,[K,l("div",{innerHTML:o.error},null,8,B)]),l("button",{class:"btn btn-default",onClick:s[1]||(s[1]=t=>o.error=null)},[j,p(" Fermer ")])])])):u("",!0),q,l("select",J,[(n(!0),i(a,null,h(o.touslesmotscles,t=>(n(),i(a,null,[t.selected?(n(),i("option",{key:0,value:t.id,selected:""},m(t.label),9,O)):u("",!0)],64))),256))]),l("div",P,[l("div",R,[l("span",U,[l("ul",X,[(n(!0),i(a,null,h(o.touslesmotscles,t=>(n(),i(a,null,[t.selected?(n(),i("li",G,[l("span",{onClick:C=>t.selected=!1},"×",8,Q),p(m(t.label),1)])):u("",!0)],64))),256)),l("li",W,[w(l("input",{onFocusin:s[2]||(s[2]=(...t)=>r.clickInput&&r.clickInput(...t)),onClick:s[3]||(s[3]=(...t)=>r.clickInput&&r.clickInput(...t)),onKeydown:s[4]||(s[4]=(...t)=>r.onKeyDown&&r.onKeyDown(...t)),"onUpdate:modelValue":s[5]||(s[5]=t=>o.userInput=t),size:"1",class:"inputNouveauMotCle"},null,544),[[k,o.userInput]])])])]),o.affichertouslesmotscles?(n(),i("span",Y,[l("ul",Z,[(n(!0),i(a,null,h(o.touslesmotscles,t=>(n(),i(a,null,[t.label.toLocaleLowerCase().includes(o.userInput.toLocaleLowerCase())?(n(),i("li",{key:0,class:M(["undetouslesmotscles",{selected:t.selected}]),onClick:C=>{t.selected=!t.selected,o.affichertouslesmotscles=!1,o.userInput=""}},m(t.label),11,$)):u("",!0)],64))),256)),r.aucunMotCleNeCorrespond?(n(),i("li",ee,"Aucun mot clé existant correspondant")):u("",!0)])])):u("",!0)]),l("div",te,[l("button",{class:"bouton",onClick:s[6]||(s[6]=L((...t)=>r.créerMotClé&&r.créerMotClé(...t),["stop"])),disabled:!o.userInput.trim()||r.motCléExiste()},[p("Créer le nouveau mot clé : "),o.userInput.trim()?u("",!0):(n(),i("span",oe,"")),o.userInput.trim()?(n(),i("span",le,m(o.userInput.trim()),1)):u("",!0)],8,se),o.userInput.trim()?u("",!0):(n(),i("div",ne,`ℹ️ Pour créer un nouveau mot clé, veuillez d'abord saisir son libellé dans le champ "Mots clés"`)),o.userInput.trim()&&r.motCléExiste()?(n(),i("div",ie,"ℹ️ Le mot clé existe déjà")):u("",!0)])])])}const ue=z(S,[["render",re],["__scopeId","data-v-926a5c63"]]);let v="#activity-mots-cles",f=document.querySelector(v);const ce=E(ue,{url:f.dataset.url,activityid:f.dataset.activityid,motsclesselectionnes:f.dataset.motsclesselectionnes});ce.mount(v);
Loading