admins-components 1.2.16 → 1.2.18
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var W=Object.defineProperty;var A=(u,l,o)=>l in u?W(u,l,{enumerable:!0,configurable:!0,writable:!0,value:o}):u[l]=o;var h=(u,l,o)=>A(u,typeof l!="symbol"?l+"":l,o);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),J={class:"form-check"},q=["checked","id"],K=["for"],N=e.defineComponent({__name:"CheckBox",props:{id:{},label:{},checked:{type:Boolean}},emits:["changed"],setup(u){return(l,o)=>(e.openBlock(),e.createElementBlock("div",J,[e.createElementVNode("input",{class:"form-check-input",type:"checkbox",checked:l.checked,value:"",id:l.id,onChange:o[0]||(o[0]=t=>l.$emit("changed",{id:l.id,checked:t.target.checked}))},null,40,q),e.createElementVNode("label",{class:"form-check-label",for:l.id},e.toDisplayString(l.label),9,K)]))}}),U={class:"cbl-childrend-container"},Q=e.defineComponent({__name:"CheckBoxList",props:{items:{},callback:{type:Function}},setup(u){return(l,o)=>{const t=e.resolveComponent("CheckBoxList",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.items,n=>(e.openBlock(),e.createElementBlock("div",{key:n.id,class:"cbl-container"},[e.createVNode(N,{id:n.id,label:n.label,checked:n.checked,onChanged:o[0]||(o[0]=r=>l.callback(r.id,r.checked))},null,8,["id","label","checked"]),e.createElementVNode("div",U,[n.childrend?(e.openBlock(),e.createBlock(t,{key:0,items:n.childrend,callback:l.callback},null,8,["items","callback"])):e.createCommentVNode("",!0)])]))),128)}}}),X=(u,l)=>{const o=u.__vccOpts||u;for(const[t,n]of l)o[t]=n;return o},z=X(Q,[["__scopeId","data-v-ae2832c5"]]),Y=["id"],Z=["disabled"],ee={class:"dd-label"},te={class:"dd-item-list"},oe=["onClick"],E=e.defineComponent({__name:"DropDown",props:{id:{},label:{},selected:{},options:{},opentop:{type:Boolean},disableFilter:{type:Boolean},storeselected:{type:Boolean},filterevent:{type:Boolean},disabled:{type:Boolean}},emits:["selected","filtered"],setup(u,{emit:l}){const o=u;e.watch(o.options,()=>{o.filterevent&&(c.value=o.options.value)}),e.watch(()=>o.selected,()=>{m()}),e.watch(()=>o.label,()=>{m()});const t=l,n=k=>{o.storeselected||(d.value=k.label),t("selected",k)},r="törlés",d=e.ref(""),m=()=>{if(o.options.value){const k=o.options.value.find(v=>v.id==o.selected);k?d.value=k.label:(a(""),d.value=o.label)}};e.onMounted(()=>{o.label&&(d.value=o.label),m(),p="",document.addEventListener("click",function(){B.value=="block"&&(B.value="none")}),window.addEventListener("scrolled",function(){B.value=="block"&&(B.value="none")}),f()});let p="";const a=k=>{p=k,o.filterevent?t("filtered",k):k==""?c.value=o.options.value:c.value=o.options.value.filter(v=>v.label.toLowerCase().includes(k.toLowerCase()))},c=e.ref([]),s=()=>{n({label:o.label,id:""}),a("")},i=()=>{if(B.value=="block"){B.value="none";return}setTimeout(()=>{B.value="block"},10),setTimeout(f,20)},f=()=>{const k=g.value,v=C.value;o.opentop?v.style.top=k.getBoundingClientRect().y-v.offsetHeight+"px":(v.style.top=k.getBoundingClientRect().y+k.offsetHeight+"px",k.getBoundingClientRect().y-v.getBoundingClientRect().y!=-k.offsetHeight&&(v.style.top=parseInt(v.style.top.substring(0,v.style.top.length-2))+(k.getBoundingClientRect().y-v.getBoundingClientRect().y)+k.offsetHeight+"px")),D.value&&D.value.focus()},g=e.ref(null),C=e.ref(null),B=e.ref("none"),D=e.ref(null);return(k,v)=>(e.openBlock(),e.createElementBlock("div",{id:k.id,class:"dd-flex"},[e.createElementVNode("button",{ref_key:"DropDownTriggerButton",ref:g,class:"btn btn-outline-secondary dd-toggle dd-flex",type:"button",disabled:k.disabled,onClick:v[0]||(v[0]=y=>{a(e.unref(p)),i()})},[e.createElementVNode("div",ee,e.toDisplayString(d.value),1)],8,Z),e.createElementVNode("div",{class:"dd-menu",style:e.normalizeStyle({display:B.value}),ref_key:"DropDownMenu",ref:C},[d.value!=o.label?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"btn btn-outline-secondary dd-button",onClick:v[1]||(v[1]=y=>s())},e.toDisplayString(r))):e.createCommentVNode("",!0),k.disableFilter?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("input",{key:1,ref_key:"ddSearch",ref:D,type:"text ",class:"form-control",placeholder:"keresés",onInput:v[2]||(v[2]=y=>a(y.target.value)),onClick:v[3]||(v[3]=y=>y.stopPropagation())},null,544)),e.createElementVNode("div",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,y=>(e.openBlock(),e.createElementBlock("div",{key:y.id,class:"dd-item",onClick:Nt=>n(y)},[y.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([y.icon,"dd-item__icon"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(e.toDisplayString(y.label),1)],8,oe))),128))])],4)],8,Y))}}),le=["id"],ne=["disabled"],se={class:"ddc-row"},ae={class:"ddc-label"},re={class:"dd-item-list"},ie=["onClick"],ce={class:"ddc-item"},de={class:"ddc-label"},ue="törlés",S=e.defineComponent({__name:"DropDownCallBack",props:{id:{},default:{},selected:{},enabled:{type:Boolean},options:{}},setup(u){const l=u,o=c=>{c==l.default&&t.value.callback(""),t.value=c,t.value.callback(t.value.value)},t=e.ref(l.default),n=()=>{if(l.selected&&l.options.value){const c=l.options.value.find(s=>s.value==l.selected);c&&(t.value=c)}};e.onMounted(()=>{n(),document.addEventListener("click",function(){a.value=="block"&&(a.value="none")})});const r=()=>{setTimeout(()=>{a.value="block"},10),setTimeout(()=>{p.value=d.value.offsetHeight},20)},d=e.ref(null),m=e.ref(null),p=e.ref(0),a=e.ref("none");return(c,s)=>(e.openBlock(),e.createElementBlock("div",{class:"ddc-flex",id:c.id},[e.createElementVNode("button",{ref_key:"DropDownTriggerButton",ref:d,class:"btn btn-outline-secondary ddc-button",type:"button",disabled:!c.enabled,onClick:s[0]||(s[0]=i=>r())},[e.createElementVNode("span",se,[e.createElementVNode("i",{class:e.normalizeClass([t.value.icon,"ddc-icon"])},null,2),e.createElementVNode("span",ae,e.toDisplayString(t.value.label),1)])],8,ne),e.createElementVNode("div",{class:"ddc-menu",style:e.normalizeStyle({display:a.value,"margin-top":p.value+"px"}),ref_key:"DropDownMenu",ref:m},[t.value!=l.default?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"btn btn-outline-secondary ddc-button",onClick:s[1]||(s[1]=i=>o(l.default))},e.toDisplayString(ue))):e.createCommentVNode("",!0),e.createElementVNode("div",re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options.value,i=>(e.openBlock(),e.createElementBlock("div",{key:i.label,class:"ddc-item",onClick:f=>o(i)},[e.createElementVNode("span",ce,[e.createElementVNode("i",{class:e.normalizeClass([i.icon,"ddc-icon"])},null,2),e.createElementVNode("span",de,e.toDisplayString(i.label),1)])],8,ie))),128))])],4)],8,le))}}),pe=["id"],me={key:0,class:"ddm-label"},fe={key:1,class:"ddm-label"},ke=["onClick"],V=e.defineComponent({__name:"DropDownMenu",props:{label:{},icon:{},options:{},item:{},id:{},right:{type:Boolean}},setup(u){const l=u;e.onMounted(()=>{document.addEventListener("click",function(){o.value&&(o.value=!1)})});const o=e.ref(!1),t=()=>{setTimeout(()=>{o.value=!0},10),setTimeout(n,20)},n=()=>{const p=r.value,a=d.value;a.style.top=p.getBoundingClientRect().y+p.offsetHeight+"px",p.getBoundingClientRect().y-a.getBoundingClientRect().y!=-p.offsetHeight&&(a.style.top=parseInt(a.style.top.substring(0,a.style.top.length-2))+(p.getBoundingClientRect().y-a.getBoundingClientRect().y)+p.offsetHeight+"px"),a.style.left=p.getBoundingClientRect().x-(l.right?100:0)+"px"},r=e.ref(null),d=e.ref(null),m=e.ref(0);return(p,a)=>(e.openBlock(),e.createElementBlock("div",{class:"d-flex",id:p.id},[e.createElementVNode("button",{ref_key:"DropDownTriggerButton",ref:r,class:"btn btn-outline-secondary",type:"button",onClick:a[0]||(a[0]=c=>t())},[p.label?(e.openBlock(),e.createElementBlock("span",me,e.toDisplayString(p.label),1)):e.createCommentVNode("",!0),p.icon?(e.openBlock(),e.createElementBlock("span",fe,[e.createElementVNode("i",{class:e.normalizeClass(p.icon)},null,2)])):e.createCommentVNode("",!0)],512),o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"ddm-menu",ref_key:"DropDownMenu",ref:d,style:e.normalizeStyle({"margin-top":m.value+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.options,c=>(e.openBlock(),e.createElementBlock("div",{key:c.icon,class:"ddm-item",onClick:s=>c.command(p.item)},[e.createElementVNode("i",{class:e.normalizeClass(c.icon)},null,2),e.createTextVNode(e.toDisplayString(c.label),1)],8,ke))),128))],4)):e.createCommentVNode("",!0)],8,pe))}}),ve={class:"fltrc-container"},ge={class:"fltrc-container"},ye=["placeholder","value"],Be={key:1,class:"d-flex flex-row input-group align-items-center"},be=["value"],he=["value"],T=e.defineComponent({__name:"FilterCompact",props:{items:{}},setup(u){const l=u,o=e.ref(0),t=e.ref(0),n=e.computed(()=>l.items[o.value].filter),r=c=>{let s=l.items[t.value];s.filter.filtered(s.filter.key,""),o.value=c,t.value=c,a.value+=1},d=e.ref(void 0);e.onMounted(()=>{let c=[];for(let s=0;s<l.items.length;s++)c.push({icon:l.items[s].icon,label:l.items[s].label,command:()=>r(s)});d.value=c});const m=e.ref({}),p=e.ref(void 0),a=e.ref(0);return(c,s)=>(e.openBlock(),e.createElementBlock("div",ve,[d.value?(e.openBlock(),e.createBlock(V,{key:0,id:"ddm",icon:c.items[o.value].icon,item:c.items[o.value],label:"",options:d.value},null,8,["icon","item","options"])):e.createCommentVNode("",!0),e.createElementVNode("div",ge,[n.value.type=="text"?(e.openBlock(),e.createElementBlock("input",{key:0,type:"text",class:"form-control",placeholder:n.value.placeholder,value:n.value.defaultv??"",onInput:s[0]||(s[0]=i=>{n.value.filtered(n.value.key,i.target.value),n.value.defaultv=i.target.value})},null,40,ye)):e.createCommentVNode("",!0),n.value.type=="date"?(e.openBlock(),e.createElementBlock("div",Be,[e.createElementVNode("input",{type:"date",class:"form-control",value:n.value.defFrom??"",onInput:s[1]||(s[1]=i=>{m.value.from=i.target.value==""?null:i.target.value,n.value.defFrom=i.target.value==""?null:i.target.value,n.value.filtered(n.value.key,m.value)})},null,40,be),s[5]||(s[5]=e.createElementVNode("span",{class:"input-group-text"},"-",-1)),e.createElementVNode("input",{type:"date",class:"form-control",value:n.value.defTill??"",onInput:s[2]||(s[2]=i=>{m.value.untill=i.target.value==""?null:i.target.value,n.value.defTill=i.target.value==""?null:i.target.value,n.value.filtered(n.value.key,m.value)})},null,40,he)])):e.createCommentVNode("",!0),n.value.type=="dropdown"?(e.openBlock(),e.createBlock(E,{key:a.value,selected:p.value,options:n.value.options,filterevent:n.value.filterevent,onFiltered:s[3]||(s[3]=i=>{n.value.onfiltered&&n.value.onfiltered(i)}),id:n.value.key,label:n.value.label,onSelected:s[4]||(s[4]=i=>n.value.filtered(n.value.key,i.id))},null,8,["selected","options","filterevent","id","label"])):e.createCommentVNode("",!0)])]))}}),Ce={class:"fltrctrl-container"},Ee=["placeholder","value"],_e={key:1,class:"d-flex flex-row input-group align-items-center"},Ne=["value"],Ve=["value"];class $e{constructor(l,o,t){h(this,"type");this.key=l,this.placeholder=o,this.filtered=t,this.type="text"}}class De{constructor(l,o,t,n,r,d){h(this,"type");this.key=l,this.label=o,this.options=t,this.filterevent=n,this.onfiltered=r,this.filtered=d,this.type="dropdown"}}class we{constructor(l,o,t,n,r){h(this,"type");this.key=l,this.label=o,this.filtered=t,this.defFrom=n,this.defTill=r,this.type="date"}}const _=e.ref({}),L=e.defineComponent({__name:"FilterControl",props:{item:{}},setup(u){const l=u;e.onMounted(()=>{var t;if(l.item.type=="dropdown"){const n=l.item;o.value=(t=n.options.value.find(r=>r.id==l.item.defaultv))==null?void 0:t.id}});const o=e.ref(void 0);return(t,n)=>(e.openBlock(),e.createElementBlock("div",Ce,[t.item.type=="text"?(e.openBlock(),e.createElementBlock("input",{key:0,type:"text",class:"form-control",placeholder:t.item.placeholder,value:t.item.defaultv??"",onInput:n[0]||(n[0]=r=>t.item.filtered(t.item.key,r.target.value))},null,40,Ee)):e.createCommentVNode("",!0),t.item.type=="date"?(e.openBlock(),e.createElementBlock("div",_e,[e.createElementVNode("input",{type:"date",class:"form-control",value:t.item.defFrom??"",onInput:n[1]||(n[1]=r=>{_.value.from=r.target.value==""?null:r.target.value,t.item.filtered(t.item.key,_.value)})},null,40,Ne),n[5]||(n[5]=e.createElementVNode("span",{class:"input-group-text"},"-",-1)),e.createElementVNode("input",{type:"date",class:"form-control",value:t.item.defTill??"",onInput:n[2]||(n[2]=r=>{_.value.untill=r.target.value==""?null:r.target.value,t.item.filtered(t.item.key,_.value)})},null,40,Ve)])):e.createCommentVNode("",!0),t.item.type=="dropdown"?(e.openBlock(),e.createBlock(E,{key:2,selected:o.value,options:e.ref(t.item.options),filterevent:t.item.filterevent,onFiltered:n[3]||(n[3]=r=>{t.item.onfiltered&&t.item.onfiltered(r)}),id:t.item.key,label:t.item.label,onSelected:n[4]||(n[4]=r=>t.item.filtered(t.item.key,r.id))},null,8,["selected","options","filterevent","id","label"])):e.createCommentVNode("",!0)]))}}),$=e.defineComponent({__name:"IconButton",props:{icon:{},active:{type:Boolean},big:{type:Boolean}},emits:["click"],setup(u,{emit:l}){const o=u,t=e.computed(()=>`${o.icon} ${o.big?"ib-button-big":""}`),n=l;return(r,d)=>(e.openBlock(),e.createElementBlock("div",{onClick:d[0]||(d[0]=m=>n("click")),class:"ib-container"},[e.createElementVNode("div",{class:e.normalizeClass(["ib-button",{"ib-button-active":r.active}])},[e.createElementVNode("i",{class:e.normalizeClass(t.value)},null,2)],2)]))}}),Se={class:"pc-container"},Te=["value","max"],F=e.defineComponent({__name:"PaginatorControl",props:{settings:{}},emits:["pagesize","page"],setup(u,{emit:l}){const o=u,t=l,n=()=>{let a=e.ref([]);return o.settings.value.sizes.forEach(c=>a.value.push({label:c.toString(),id:c.toString()})),a},r=e.ref(1);e.watch(()=>o.settings.value,()=>{r.value=1});const d=e.computed(()=>Math.floor(o.settings.value.total/o.settings.value.pagesize)+1),m=()=>{r.value>1&&(r.value-=1,t("page",r.value))},p=()=>{r.value<d.value&&(r.value+=1,t("page",r.value))};return(a,c)=>(e.openBlock(),e.createElementBlock("div",Se,[e.createElementVNode("button",{class:"btn btn-outline-secondary",onClick:m},"<"),e.createElementVNode("input",{class:"form-control pc-input",type:"number",value:r.value,min:"1",max:d.value,onChange:c[0]||(c[0]=s=>a.$emit("page",s.target.value))},null,40,Te),e.createTextVNode("/"+e.toDisplayString(d.value)+" ",1),e.createElementVNode("button",{class:"btn btn-outline-secondary",onClick:p},">"),e.createVNode(E,{opentop:!0,class:"pc-dropdown",id:"pagecount",label:"10",selected:a.settings.value.pagesize.toString(),options:n(),onSelected:c[1]||(c[1]=s=>{r.value=1,a.$emit("pagesize",parseInt(s.id))})},null,8,["selected","options"])]))}}),Le={class:"form-check"},Fe=["name","id","checked"],Ie=["for"],I=e.defineComponent({__name:"RadioButton",props:{group:{},label:{},id:{},selected:{type:Boolean}},emits:["selected"],setup(u){return(l,o)=>(e.openBlock(),e.createElementBlock("div",Le,[e.createElementVNode("input",{class:"form-check-input",type:"radio",name:l.group,id:l.id,checked:l.selected,onChange:o[0]||(o[0]=t=>l.$emit("selected",l.id))},null,40,Fe),e.createElementVNode("label",{class:"form-check-label",for:l.id},e.toDisplayString(l.label),9,Ie)]))}}),Me={class:"d-flex flex-column gap-2 justify-content-around"},R=e.defineComponent({__name:"RadioButtonGroup",props:{group:{},items:{}},emits:["selected"],setup(u){return(l,o)=>(e.openBlock(),e.createElementBlock("div",Me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.items,t=>(e.openBlock(),e.createBlock(I,{key:t.id,id:t.id,label:t.label,group:l.group,selected:t.selected,onSelected:o[0]||(o[0]=n=>l.$emit("selected",n))},null,8,["id","label","group","selected"]))),128))]))}}),xe={key:0,class:"spinner-border",role:"status"},H=e.defineComponent({__name:"SpinningProgress",props:{loading:{type:Boolean}},setup(u){return(l,o)=>l.loading?(e.openBlock(),e.createElementBlock("div",xe,o[0]||(o[0]=[e.createElementVNode("span",{class:"visually-hidden"},"Loading...",-1)]))):e.createCommentVNode("",!0)}}),ze={class:"t2l-table-view t2l-table-header-label"},Re={key:0,class:"t2l-select"},He={key:1,class:"t2l-cell"},Oe={class:"t2l-table-view t2l-table-header-filter"},Pe={key:0,class:"t2l-select"},je={key:1,class:"t2l-cell"},Ge={class:"t2l-table-view t2l-rows"},We={key:0,class:"t2l-select"},Ae=["id","onChange"],Je=["innerHTML"],qe={key:1,class:"t2l-cell t2l-actions"},Ke=["title","disabled","onClick"],Ue={class:"t2l-card-view t2l-card-filters"},Qe={class:"t2l-card-filter-order"},Xe={class:"t2l-card-filter-search"},Ye={class:"t2l-card-view t2l-rows"},Ze={key:0,class:"t2l-card-select"},et=["id","onChange"],tt={key:0,class:"t2l-property"},ot={class:"t2l-label"},lt=["innerHTML"],nt={class:"d-flex align-items-center"},st={key:1,class:"d-flex justify-content-center t2l-footer"},O=e.defineComponent({__name:"TableToList",props:{items:{},config:{}},emits:["pagesize","page"],setup(u){const l=u,o=e.computed(()=>l.config.columns.filter(a=>a.visible!=!1)),t=e.computed(()=>l.config.columns.filter(a=>a.visible!=!1&&a.filter)),n=e.computed(()=>o.value.filter(a=>a.sort&&a.sort.active&&a.sort.active.value)),r=e.computed(()=>Math.ceil(o.value.length/l.config.smColCount)),d=(a,c)=>{var s=a-1+(c-1)*r.value;return s<o.value.length?o.value[s]:null},m=(a,c)=>a.converter?a.converter(c[a.property],c):c[a.property],p=a=>{if(a.sort&&a.sort.active){let c=!a.sort.active.value;l.config.columns.forEach(s=>{s.sort&&s.sort.active&&(s.sort.active.value=!1)}),a.sort.active.value=c,a.sort.callback(c?a.property:"")}};return(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",ze,[a.config.selectableId?(e.openBlock(),e.createElementBlock("span",Re)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,s=>{var i,f;return e.openBlock(),e.createElementBlock("span",{class:"t2l-cell",key:s.property},[s.sort?(e.openBlock(),e.createBlock($,{key:0,icon:s.sort.icon,onClick:g=>p(s),active:(f=(i=s.sort)==null?void 0:i.active)==null?void 0:f.value},null,8,["icon","onClick","active"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(s.label),1)])}),128)),a.config.actionHeader?(e.openBlock(),e.createElementBlock("span",He,e.toDisplayString(a.config.actionHeader),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Oe,[a.config.selectableId?(e.openBlock(),e.createElementBlock("span",Pe)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,s=>(e.openBlock(),e.createElementBlock("span",{class:"t2l-cell",key:s.label},[s.filter?(e.openBlock(),e.createBlock(L,{key:0,item:s.filter},null,8,["item"])):e.createCommentVNode("",!0)]))),128)),a.config.actionHeader?(e.openBlock(),e.createElementBlock("span",je)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.items,s=>(e.openBlock(),e.createElementBlock("div",{key:s,class:"t2l-row"},[a.config.selectableId?(e.openBlock(),e.createElementBlock("div",We,[e.createElementVNode("input",{class:"form-check-input",type:"checkbox",id:s[a.config.selectableId],onChange:i=>s.selected=!s.selected},null,40,Ae)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,i=>(e.openBlock(),e.createElementBlock("div",{class:"t2l-cell",key:i.property,innerHTML:m(i,s)},null,8,Je))),128)),a.config.actions?(e.openBlock(),e.createElementBlock("div",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.config.actions,i=>(e.openBlock(),e.createElementBlock("button",{key:i,type:"button",class:"btn btn-outline-secondary",title:i.label,disabled:!i.enabled(s),onClick:f=>i.command(s)},[e.createElementVNode("i",{class:e.normalizeClass(i.icon)},null,2)],8,Ke))),128))])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Ue,[e.createElementVNode("div",Qe,[e.createVNode(S,{id:"card-filter-order",default:{icon:"fa-solid fa-chevron-down",label:"rendezés"},selected:n.value.length>0?n.value[0].property:"",enabled:a.config.sortEnabled,options:e.ref(o.value.filter(s=>s.sort).map(s=>({icon:s.sort.icon,label:s.sort.label,value:s.property,callback:s.sort.callback})))},null,8,["selected","enabled","options"])]),e.createElementVNode("div",Xe,[e.createVNode(T,{items:t.value.map(s=>({filter:s.filter,icon:s.filterIcon,label:s.label}))},null,8,["items"])])]),e.createElementVNode("div",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.items,(s,i)=>(e.openBlock(),e.createElementBlock("div",{class:"t2l-row",key:i},[a.config.selectableId?(e.openBlock(),e.createElementBlock("div",Ze,[e.createElementVNode("input",{class:"form-check-input",type:"checkbox",id:s[a.config.selectableId],onChange:f=>s.selected=!s.selected},null,40,et)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.config.smColCount,f=>(e.openBlock(),e.createElementBlock("div",{class:"t2l-card-col",key:f},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,g=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:g},[d(g,f)?(e.openBlock(),e.createElementBlock("div",tt,[e.createElementVNode("span",ot,e.toDisplayString(d(g,f).label),1),e.createElementVNode("div",{innerHTML:m(d(g,f),s)},null,8,lt)])):e.createCommentVNode("",!0)],64))),128))]))),128)),e.createElementVNode("div",nt,[l.config.actions?(e.openBlock(),e.createBlock(V,{key:0,item:s,options:l.config.actions,label:"...",id:i.toString(),right:!0},null,8,["item","options","id"])):e.createCommentVNode("",!0)])]))),128))]),a.config.paginatorSettings?(e.openBlock(),e.createBlock(F,{key:0,settings:a.config.paginatorSettings,onPagesize:c[0]||(c[0]=s=>a.$emit("pagesize",s)),onPage:c[1]||(c[1]=s=>a.$emit("page",s))},null,8,["settings"])):e.createCommentVNode("",!0),a.config.paginatorSettings?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",st," Elemek: "+e.toDisplayString(l.items.length),1))],64))}}),at={class:"d-flex flex flex-row"},rt={key:1,class:"d-flex flex-column gap-2 options-body flex-grow-1"},it={class:"d-flex flex-row"},ct={class:"d-flex align-items-end"},dt=["disabled"],P=e.defineComponent({__name:"TableToListOptions",props:{colCount:{},options:{}},emits:["save"],setup(u,{emit:l}){const o=u,t=e.ref([]);e.onMounted(()=>{t.value=o.options,c()});const n=e.computed(()=>o.colCount!=0?Math.ceil(o.options.length/o.colCount):0),r=(s,i)=>{var f=o.options[(s-1)*n.value+i-1];return f},d=()=>{m("save",t.value)},m=l,p=e.ref(!1),a=e.ref(!0),c=()=>{a.value=t.value.filter(s=>s.checked).length<=1};return(s,i)=>(e.openBlock(),e.createElementBlock("div",at,[p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"d-flex flex-row align-items-center gap-2 options-header justify-content-start",onClick:i[0]||(i[0]=f=>p.value=!p.value)},i[2]||(i[2]=[e.createElementVNode("i",{class:"fa-solid fa-cog"},null,-1),e.createElementVNode("div",{class:"options-header-label"},"beállítások",-1)]))),p.value?(e.openBlock(),e.createElementBlock("div",rt,[i[4]||(i[4]=e.createElementVNode("div",{class:"options-header-label"},"Látható oszlopok",-1)),e.createElementVNode("div",it,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.colCount,f=>(e.openBlock(),e.createElementBlock("div",{class:"d-flex flex-grow-1 flex-column",key:f},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,g=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:g},[r(f,g)?(e.openBlock(),e.createBlock(N,{key:0,id:r(f,g).property,label:r(f,g).label,checked:r(f,g).checked,onChanged:i[1]||(i[1]=C=>{t.value.find(B=>B.property==C.id).checked=C.checked,c()})},null,8,["id","label","checked"])):e.createCommentVNode("",!0)],64))),128))]))),128)),e.createElementVNode("div",ct,[e.createElementVNode("button",{class:"btn btn-outline-secondary",type:"button",onClick:d,disabled:a.value},i[3]||(i[3]=[e.createElementVNode("i",{class:"fa-solid fa-save"},null,-1)]),8,dt)])])])):e.createCommentVNode("",!0)]))}}),ut={class:"tlb-container d-flex flex-column flex-grow-1"},pt={class:"d-flex flex-row tlb-item"},mt={class:"d-flex flex-column flex-grow-1 flex-sm-row justify-content-between tlb-item"},ft=["id"],kt={key:0,class:"d-flex id"},vt={class:"d-flex flex-row align-items-center tlb-children-container"},j=e.defineComponent({__name:"TextListBox",props:{items:{}},emits:["deleted"],setup(u){return(l,o)=>{const t=e.resolveComponent("TextListBox",!0);return e.openBlock(),e.createElementBlock("div",ut,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.items,n=>(e.openBlock(),e.createElementBlock("div",{class:"d-flex flex-column",key:n.id},[e.createElementVNode("div",pt,[e.createElementVNode("div",mt,[e.createElementVNode("div",{class:"d-flex flex-grow-1",id:n.id},e.toDisplayString(n.label),9,ft),n.showId?(e.openBlock(),e.createElementBlock("div",kt,e.toDisplayString(n.id),1)):e.createCommentVNode("",!0)]),n.hideDelete?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($,{key:0,icon:"fa-solid fa-trash",onClick:r=>l.$emit("deleted",n.id)},null,8,["onClick"]))]),e.createElementVNode("div",vt,[n.childrend?(e.openBlock(),e.createBlock(t,{key:0,items:n.childrend,showId:n.showId,hideDelete:n.hideDelete},null,8,["items","showId","hideDelete"])):e.createCommentVNode("",!0)])]))),128))])}}}),gt={key:0,class:"toast-container position-fixed bottom-0 start-50 translate-middle-x p-4 toast-zindex"},yt={class:"toast-header"},Bt={class:"me-auto"},bt={class:"text-body-secondary"},ht=["onClick"],Ct=["innerHTML"],x=500,M=e.defineComponent({__name:"ToastComponent",props:{defaultDisplayDuration:{}},setup(u,{expose:l}){const o=u,t=e.ref([]);return l({addToast:r=>{r.displayDuration||(r.displayDuration=o.defaultDisplayDuration),r.id=new Date,t.value.filter(function(d){return d.id!==r.id}),t.value.push(r)}}),setInterval(()=>{t.value=t.value.map(r=>(r.displayDuration-=x,r)),t.value=t.value.filter(r=>r.displayDuration>0)},x),(r,d)=>t.value.length>0?(e.openBlock(),e.createElementBlock("div",gt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,m=>(e.openBlock(),e.createElementBlock("div",{key:m.message,class:e.normalizeClass(["toast d-block",{"toast-info":m.type==="info","toast-success":m.type==="success","toast-warning":m.type==="warning","toast-error":m.type==="error"}]),role:"alert","aria-live":"assertive","aria-atomic":"true"},[e.createElementVNode("div",yt,[e.createElementVNode("strong",Bt,e.toDisplayString(m.title),1),e.createElementVNode("small",bt,e.toDisplayString(m.id.toLocaleTimeString()),1),e.createElementVNode("button",{type:"button",class:"btn-close","data-bs-dismiss":"toast","aria-label":"Close",onClick:p=>t.value=t.value.filter(a=>a.id!==m.id)},null,8,ht)]),e.createElementVNode("div",{class:"toast-body",innerHTML:m.message},null,8,Ct)],2))),128))])):e.createCommentVNode("",!0)}}),G=e.defineComponent({__name:"ToastWrapper",setup(u){const l=e.ref(),o=[{id:"toast-notification-message",handler:t=>{let n=t.detail;l.value.addToast({title:n.title,message:n.message,type:n.severity,displayDuration:n.displayDuration})}},{id:"fetch-error",handler:t=>{let n=t.detail;l.value.addToast({title:n.title,message:n.message,type:"error",displayDuration:1e4})}}];return e.onMounted(()=>{o.forEach(t=>window.addEventListener(t.id,t.handler))}),e.onUnmounted(()=>{o.forEach(t=>window.removeEventListener(t.id,t.handler))}),(t,n)=>(e.openBlock(),e.createBlock(M,{ref_key:"toast",ref:l,defaultDisplayDuration:5e3},null,512))}}),b=class b{};h(b,"getId",(l,o)=>`${l}_${o}`),h(b,"saveOptions",(l,o)=>{localStorage.setItem(l,JSON.stringify(o)),window.location.reload()}),h(b,"cleanOptions",(l,o)=>{for(let t=0;t<localStorage.length;t++)localStorage.key(t).includes(l)&&localStorage.key(t)!=b.getId(l,o)&&localStorage.removeItem(localStorage.key(t))}),h(b,"loadOptions",(l,o,t,n)=>{b.cleanOptions(l,o);const r=b.getId(l,o);if(localStorage.getItem(r))try{n.value=JSON.parse(localStorage.getItem(r)),n.value.forEach(d=>t.columns.find(m=>m.property==d.property).visible=d.checked)}catch{localStorage.removeItem(r),b.loadOptions(l,r,t,n)}else n.value=t.columns.map(d=>(d.visible=!0,{label:d.label,property:d.property,checked:d.visible}))});let w=b;const Et={CheckBox:N,CheckBoxList:z,DropDown:E,DropDownMenu:V,DropDownCallBack:S,FilterCompact:T,FilterControl:L,IconButton:$,PaginatorControl:F,RadioButton:I,RadioButtonGroup:R,SpinningProgress:H,TableToList:O,TableToListOptions:P,TextListBox:j,ToastComponent:M,ToastWrapper:G},_t={install(u){Object.entries(Et).forEach(([l,o])=>{u.component(l,o)})}};exports.CheckBox=N;exports.CheckBoxList=z;exports.DropDown=E;exports.DropDownCallBack=S;exports.DropDownMenu=V;exports.FilterCompact=T;exports.FilterControl=L;exports.FilterDate=we;exports.FilterDropDown=De;exports.FilterText=$e;exports.IconButton=$;exports.PaginatorControl=F;exports.RadioButton=I;exports.RadioButtonGroup=R;exports.SpinningProgress=H;exports.TabelToListOptionsPersister=w;exports.TableToList=O;exports.TableToListOptions=P;exports.TextListBox=j;exports.ToastComponent=M;exports.ToastWrapper=G;exports.default=_t;
|
|
1
|
+
"use strict";var W=Object.defineProperty;var A=(d,l,o)=>l in d?W(d,l,{enumerable:!0,configurable:!0,writable:!0,value:o}):d[l]=o;var h=(d,l,o)=>A(d,typeof l!="symbol"?l+"":l,o);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),J={class:"form-check"},q=["checked","id"],K=["for"],N=e.defineComponent({__name:"CheckBox",props:{id:{},label:{},checked:{type:Boolean}},emits:["changed"],setup(d){return(l,o)=>(e.openBlock(),e.createElementBlock("div",J,[e.createElementVNode("input",{class:"form-check-input",type:"checkbox",checked:l.checked,value:"",id:l.id,onChange:o[0]||(o[0]=t=>l.$emit("changed",{id:l.id,checked:t.target.checked}))},null,40,q),e.createElementVNode("label",{class:"form-check-label",for:l.id},e.toDisplayString(l.label),9,K)]))}}),U={class:"cbl-childrend-container"},Q=e.defineComponent({__name:"CheckBoxList",props:{items:{},callback:{type:Function}},setup(d){return(l,o)=>{const t=e.resolveComponent("CheckBoxList",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.items,n=>(e.openBlock(),e.createElementBlock("div",{key:n.id,class:"cbl-container"},[e.createVNode(N,{id:n.id,label:n.label,checked:n.checked,onChanged:o[0]||(o[0]=r=>l.callback(r.id,r.checked))},null,8,["id","label","checked"]),e.createElementVNode("div",U,[n.childrend?(e.openBlock(),e.createBlock(t,{key:0,items:n.childrend,callback:l.callback},null,8,["items","callback"])):e.createCommentVNode("",!0)])]))),128)}}}),X=(d,l)=>{const o=d.__vccOpts||d;for(const[t,n]of l)o[t]=n;return o},z=X(Q,[["__scopeId","data-v-ae2832c5"]]),Y=["id"],Z=["disabled"],ee={class:"dd-label"},te={class:"dd-item-list"},oe=["onClick"],E=e.defineComponent({__name:"DropDown",props:{id:{},label:{},selected:{},options:{},opentop:{type:Boolean},disableFilter:{type:Boolean},storeselected:{type:Boolean},filterevent:{type:Boolean},disabled:{type:Boolean}},emits:["selected","filtered"],setup(d,{emit:l}){const o=d;e.watch(o.options,()=>{o.filterevent&&(c.value=o.options.value)}),e.watch(()=>o.selected,()=>{u()}),e.watch(()=>o.label,()=>{u()});const t=l,n=f=>{o.storeselected||(p.value=f.label),t("selected",f)},r="törlés",p=e.ref(""),u=()=>{if(o.options.value){const f=o.options.value.find(v=>v.id==o.selected);f?p.value=f.label:(a(""),p.value=o.label)}};e.onMounted(()=>{o.label&&(p.value=o.label),u(),m="",document.addEventListener("click",function(){b.value=="block"&&(b.value="none")}),window.addEventListener("scrolled",function(){b.value=="block"&&(b.value="none")}),k()});let m="";const a=f=>{m=f,o.filterevent?t("filtered",f):f==""?c.value=o.options.value:c.value=o.options.value.filter(v=>v.label.toLowerCase().includes(f.toLowerCase()))},c=e.ref([]),s=()=>{n({label:o.label,id:""}),a("")},i=()=>{if(b.value=="block"){b.value="none";return}setTimeout(()=>{b.value="block"},10),setTimeout(k,20)},k=()=>{const f=g.value,v=C.value;o.opentop?v.style.top=f.getBoundingClientRect().y-v.offsetHeight+"px":(v.style.top=f.getBoundingClientRect().y+f.offsetHeight+"px",f.getBoundingClientRect().y-v.getBoundingClientRect().y!=-f.offsetHeight&&(v.style.top=parseInt(v.style.top.substring(0,v.style.top.length-2))+(f.getBoundingClientRect().y-v.getBoundingClientRect().y)+f.offsetHeight+"px")),D.value&&D.value.focus()},g=e.ref(null),C=e.ref(null),b=e.ref("none"),D=e.ref(null);return(f,v)=>(e.openBlock(),e.createElementBlock("div",{id:f.id,class:"dd-flex"},[e.createElementVNode("button",{ref_key:"DropDownTriggerButton",ref:g,class:"btn btn-outline-secondary dd-toggle dd-flex",type:"button",disabled:f.disabled,onClick:v[0]||(v[0]=y=>{a(e.unref(m)),i()})},[e.createElementVNode("div",ee,e.toDisplayString(p.value),1)],8,Z),e.createElementVNode("div",{class:"dd-menu",style:e.normalizeStyle({display:b.value}),ref_key:"DropDownMenu",ref:C},[p.value!=o.label?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"btn btn-outline-secondary dd-button",onClick:v[1]||(v[1]=y=>s())},e.toDisplayString(r))):e.createCommentVNode("",!0),f.disableFilter?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("input",{key:1,ref_key:"ddSearch",ref:D,type:"text ",class:"form-control",placeholder:"keresés",onInput:v[2]||(v[2]=y=>a(y.target.value)),onClick:v[3]||(v[3]=y=>y.stopPropagation())},null,544)),e.createElementVNode("div",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,y=>(e.openBlock(),e.createElementBlock("div",{key:y.id,class:"dd-item",onClick:Nt=>n(y)},[y.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([y.icon,"dd-item__icon"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(e.toDisplayString(y.label),1)],8,oe))),128))])],4)],8,Y))}}),le=["id"],ne=["disabled"],se={class:"ddc-row"},ae={class:"ddc-label"},re={class:"dd-item-list"},ie=["onClick"],ce={class:"ddc-item"},de={class:"ddc-label"},ue="törlés",S=e.defineComponent({__name:"DropDownCallBack",props:{id:{},default:{},selected:{},enabled:{type:Boolean},options:{}},setup(d){const l=d,o=c=>{c==l.default&&t.value.callback(""),t.value=c,t.value.callback(t.value.value)},t=e.ref(l.default),n=()=>{if(l.selected&&l.options.value){const c=l.options.value.find(s=>s.value==l.selected);c&&(t.value=c)}};e.onMounted(()=>{n(),document.addEventListener("click",function(){a.value=="block"&&(a.value="none")})});const r=()=>{setTimeout(()=>{a.value="block"},10),setTimeout(()=>{m.value=p.value.offsetHeight},20)},p=e.ref(null),u=e.ref(null),m=e.ref(0),a=e.ref("none");return(c,s)=>(e.openBlock(),e.createElementBlock("div",{class:"ddc-flex",id:c.id},[e.createElementVNode("button",{ref_key:"DropDownTriggerButton",ref:p,class:"btn btn-outline-secondary ddc-button",type:"button",disabled:!c.enabled,onClick:s[0]||(s[0]=i=>r())},[e.createElementVNode("span",se,[e.createElementVNode("i",{class:e.normalizeClass([t.value.icon,"ddc-icon"])},null,2),e.createElementVNode("span",ae,e.toDisplayString(t.value.label),1)])],8,ne),e.createElementVNode("div",{class:"ddc-menu",style:e.normalizeStyle({display:a.value,"margin-top":m.value+"px"}),ref_key:"DropDownMenu",ref:u},[t.value!=l.default?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"btn btn-outline-secondary ddc-button",onClick:s[1]||(s[1]=i=>o(l.default))},e.toDisplayString(ue))):e.createCommentVNode("",!0),e.createElementVNode("div",re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.options.value,i=>(e.openBlock(),e.createElementBlock("div",{key:i.label,class:"ddc-item",onClick:k=>o(i)},[e.createElementVNode("span",ce,[e.createElementVNode("i",{class:e.normalizeClass([i.icon,"ddc-icon"])},null,2),e.createElementVNode("span",de,e.toDisplayString(i.label),1)])],8,ie))),128))])],4)],8,le))}}),pe=["id"],me={key:0,class:"ddm-label"},ke={key:1,class:"ddm-label"},fe=["onClick"],V=e.defineComponent({__name:"DropDownMenu",props:{label:{},icon:{},options:{},item:{},id:{},right:{type:Boolean}},setup(d){const l=d;e.onMounted(()=>{document.addEventListener("click",function(){o.value&&(o.value=!1)})});const o=e.ref(!1),t=()=>{setTimeout(()=>{o.value=!0},10),setTimeout(n,20)},n=()=>{const m=r.value,a=p.value;a.style.top=m.getBoundingClientRect().y+m.offsetHeight+"px",m.getBoundingClientRect().y-a.getBoundingClientRect().y!=-m.offsetHeight&&(a.style.top=parseInt(a.style.top.substring(0,a.style.top.length-2))+(m.getBoundingClientRect().y-a.getBoundingClientRect().y)+m.offsetHeight+"px"),a.style.left=m.getBoundingClientRect().x-(l.right?100:0)+"px"},r=e.ref(null),p=e.ref(null),u=e.ref(0);return(m,a)=>(e.openBlock(),e.createElementBlock("div",{class:"d-flex",id:m.id},[e.createElementVNode("button",{ref_key:"DropDownTriggerButton",ref:r,class:"btn btn-outline-secondary",type:"button",onClick:a[0]||(a[0]=c=>t())},[m.label?(e.openBlock(),e.createElementBlock("span",me,e.toDisplayString(m.label),1)):e.createCommentVNode("",!0),m.icon?(e.openBlock(),e.createElementBlock("span",ke,[e.createElementVNode("i",{class:e.normalizeClass(m.icon)},null,2)])):e.createCommentVNode("",!0)],512),o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"ddm-menu",ref_key:"DropDownMenu",ref:p,style:e.normalizeStyle({"margin-top":u.value+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.options,c=>(e.openBlock(),e.createElementBlock("div",{key:c.icon,class:"ddm-item",onClick:s=>c.command(m.item)},[e.createElementVNode("i",{class:e.normalizeClass(c.icon)},null,2),e.createTextVNode(e.toDisplayString(c.label),1)],8,fe))),128))],4)):e.createCommentVNode("",!0)],8,pe))}}),ve={class:"fltrc-container"},ge={class:"fltrc-container"},ye=["placeholder","value"],Be={key:1,class:"d-flex flex-row input-group align-items-center"},be=["value"],he=["value"],T=e.defineComponent({__name:"FilterCompact",props:{items:{}},setup(d){const l=d,o=e.ref(0),t=e.ref(0),n=e.computed(()=>l.items[o.value].filter),r=c=>{let s=l.items[t.value];s.filter.filtered(s.filter.key,""),o.value=c,t.value=c,a.value+=1},p=e.ref(void 0);e.onMounted(()=>{let c=[];for(let s=0;s<l.items.length;s++)c.push({icon:l.items[s].icon,label:l.items[s].label,command:()=>r(s)});p.value=c});const u=e.ref({}),m=e.ref(void 0),a=e.ref(0);return(c,s)=>(e.openBlock(),e.createElementBlock("div",ve,[p.value?(e.openBlock(),e.createBlock(V,{key:0,id:"ddm",icon:c.items[o.value].icon,item:c.items[o.value],label:"",options:p.value},null,8,["icon","item","options"])):e.createCommentVNode("",!0),e.createElementVNode("div",ge,[n.value.type=="text"?(e.openBlock(),e.createElementBlock("input",{key:0,type:"text",class:"form-control",placeholder:n.value.placeholder,value:n.value.defaultv??"",onInput:s[0]||(s[0]=i=>{n.value.filtered(n.value.key,i.target.value),n.value.defaultv=i.target.value})},null,40,ye)):e.createCommentVNode("",!0),n.value.type=="date"?(e.openBlock(),e.createElementBlock("div",Be,[e.createElementVNode("input",{type:"date",class:"form-control",value:n.value.defFrom??"",onInput:s[1]||(s[1]=i=>{u.value.from=i.target.value==""?null:i.target.value,n.value.defFrom=i.target.value==""?null:i.target.value,n.value.filtered(n.value.key,u.value)})},null,40,be),s[5]||(s[5]=e.createElementVNode("span",{class:"input-group-text"},"-",-1)),e.createElementVNode("input",{type:"date",class:"form-control",value:n.value.defTill??"",onInput:s[2]||(s[2]=i=>{u.value.untill=i.target.value==""?null:i.target.value,n.value.defTill=i.target.value==""?null:i.target.value,n.value.filtered(n.value.key,u.value)})},null,40,he)])):e.createCommentVNode("",!0),n.value.type=="dropdown"?(e.openBlock(),e.createBlock(E,{key:a.value,selected:m.value,options:n.value.options,filterevent:n.value.filterevent,onFiltered:s[3]||(s[3]=i=>{n.value.onfiltered&&n.value.onfiltered(i)}),id:n.value.key,label:n.value.label,onSelected:s[4]||(s[4]=i=>n.value.filtered(n.value.key,i.id))},null,8,["selected","options","filterevent","id","label"])):e.createCommentVNode("",!0)])]))}}),Ce={class:"fltrctrl-container"},Ee=["placeholder","value"],_e={key:1,class:"d-flex flex-row input-group align-items-center"},Ne=["value"],Ve=["value"];class $e{constructor(l,o,t){h(this,"type");this.key=l,this.placeholder=o,this.filtered=t,this.type="text"}}class De{constructor(l,o,t,n,r,p){h(this,"type");this.key=l,this.label=o,this.options=t,this.filterevent=n,this.onfiltered=r,this.filtered=p,this.type="dropdown"}}class we{constructor(l,o,t,n,r){h(this,"type");this.key=l,this.label=o,this.filtered=t,this.defFrom=n,this.defTill=r,this.type="date"}}const _=e.ref({}),L=e.defineComponent({__name:"FilterControl",props:{item:{}},setup(d){const l=d;e.onMounted(()=>{var t;if(l.item.type=="dropdown"){const n=l.item;o.value=(t=n.options.value.find(r=>r.id==l.item.defaultv))==null?void 0:t.id}});const o=e.ref(void 0);return(t,n)=>(e.openBlock(),e.createElementBlock("div",Ce,[t.item.type=="text"?(e.openBlock(),e.createElementBlock("input",{key:0,type:"text",class:"form-control",placeholder:t.item.placeholder,value:t.item.defaultv??"",onInput:n[0]||(n[0]=r=>t.item.filtered(t.item.key,r.target.value))},null,40,Ee)):e.createCommentVNode("",!0),t.item.type=="date"?(e.openBlock(),e.createElementBlock("div",_e,[e.createElementVNode("input",{type:"date",class:"form-control",value:t.item.defFrom??"",onInput:n[1]||(n[1]=r=>{_.value.from=r.target.value==""?null:r.target.value,t.item.filtered(t.item.key,_.value)})},null,40,Ne),n[5]||(n[5]=e.createElementVNode("span",{class:"input-group-text"},"-",-1)),e.createElementVNode("input",{type:"date",class:"form-control",value:t.item.defTill??"",onInput:n[2]||(n[2]=r=>{_.value.untill=r.target.value==""?null:r.target.value,t.item.filtered(t.item.key,_.value)})},null,40,Ve)])):e.createCommentVNode("",!0),t.item.type=="dropdown"?(e.openBlock(),e.createBlock(E,{key:2,selected:o.value,options:e.ref(t.item.options),filterevent:t.item.filterevent,onFiltered:n[3]||(n[3]=r=>{t.item.onfiltered&&t.item.onfiltered(r)}),id:t.item.key,label:t.item.label,onSelected:n[4]||(n[4]=r=>t.item.filtered(t.item.key,r.id))},null,8,["selected","options","filterevent","id","label"])):e.createCommentVNode("",!0)]))}}),$=e.defineComponent({__name:"IconButton",props:{icon:{},active:{type:Boolean},big:{type:Boolean}},emits:["click"],setup(d,{emit:l}){const o=d,t=e.computed(()=>`${o.icon} ${o.big?"ib-button-big":""}`),n=l;return(r,p)=>(e.openBlock(),e.createElementBlock("div",{onClick:p[0]||(p[0]=u=>n("click")),class:"ib-container"},[e.createElementVNode("div",{class:e.normalizeClass(["ib-button",{"ib-button-active":r.active}])},[e.createElementVNode("i",{class:e.normalizeClass(t.value)},null,2)],2)]))}}),Se={class:"pc-container"},Te=["value","max"],F=e.defineComponent({__name:"PaginatorControl",props:{settings:{}},emits:["pagesize","page"],setup(d,{emit:l}){const o=d,t=l,n=()=>{let a=e.ref([]);return o.settings.value.sizes.forEach(c=>a.value.push({label:c.toString(),id:c.toString()})),a},r=e.ref(1);e.watch(()=>o.settings.value,()=>{r.value=1});const p=e.computed(()=>Math.floor(o.settings.value.total/o.settings.value.pagesize)+1),u=()=>{r.value>1&&(r.value-=1,t("page",r.value))},m=()=>{r.value<p.value&&(r.value+=1,t("page",r.value))};return(a,c)=>(e.openBlock(),e.createElementBlock("div",Se,[e.createElementVNode("button",{class:"btn btn-outline-secondary",onClick:u},"<"),e.createElementVNode("input",{class:"form-control pc-input",type:"number",value:r.value,min:"1",max:p.value,onChange:c[0]||(c[0]=s=>a.$emit("page",s.target.value))},null,40,Te),e.createTextVNode("/"+e.toDisplayString(p.value)+" ",1),e.createElementVNode("button",{class:"btn btn-outline-secondary",onClick:m},">"),e.createVNode(E,{opentop:!0,class:"pc-dropdown",id:"pagecount",label:"10",selected:a.settings.value.pagesize.toString(),options:n(),onSelected:c[1]||(c[1]=s=>{r.value=1,a.$emit("pagesize",parseInt(s.id))})},null,8,["selected","options"])]))}}),Le={class:"form-check"},Fe=["name","id","checked"],Ie=["for"],I=e.defineComponent({__name:"RadioButton",props:{group:{},label:{},id:{},selected:{type:Boolean}},emits:["selected"],setup(d){return(l,o)=>(e.openBlock(),e.createElementBlock("div",Le,[e.createElementVNode("input",{class:"form-check-input",type:"radio",name:l.group,id:l.id,checked:l.selected,onChange:o[0]||(o[0]=t=>l.$emit("selected",l.id))},null,40,Fe),e.createElementVNode("label",{class:"form-check-label",for:l.id},e.toDisplayString(l.label),9,Ie)]))}}),Me={class:"d-flex flex-column gap-2 justify-content-around"},R=e.defineComponent({__name:"RadioButtonGroup",props:{group:{},items:{}},emits:["selected"],setup(d){return(l,o)=>(e.openBlock(),e.createElementBlock("div",Me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.items,t=>(e.openBlock(),e.createBlock(I,{key:t.id,id:t.id,label:t.label,group:l.group,selected:t.selected,onSelected:o[0]||(o[0]=n=>l.$emit("selected",n))},null,8,["id","label","group","selected"]))),128))]))}}),xe={key:0,class:"spinner-border",role:"status"},H=e.defineComponent({__name:"SpinningProgress",props:{loading:{type:Boolean}},setup(d){return(l,o)=>l.loading?(e.openBlock(),e.createElementBlock("div",xe,o[0]||(o[0]=[e.createElementVNode("span",{class:"visually-hidden"},"Loading...",-1)]))):e.createCommentVNode("",!0)}}),ze={class:"t2l-table-view t2l-table-header-label"},Re={key:0,class:"t2l-select"},He={key:1,class:"t2l-cell"},Oe={class:"t2l-table-view t2l-table-header-filter"},Pe={key:0,class:"t2l-select"},je={key:1,class:"t2l-cell"},Ge={class:"t2l-table-view t2l-rows"},We={key:0,class:"t2l-select"},Ae=["id","onChange"],Je=["innerHTML"],qe={key:1,class:"t2l-cell t2l-actions"},Ke=["title","disabled","onClick"],Ue={class:"t2l-card-view t2l-card-filters"},Qe={class:"t2l-card-filter-order"},Xe={class:"t2l-card-filter-search"},Ye={class:"t2l-card-view t2l-rows"},Ze={key:0,class:"t2l-card-select"},et=["id","onChange"],tt={key:0,class:"t2l-property"},ot={class:"t2l-label"},lt=["innerHTML"],nt={class:"d-flex align-items-center"},st={key:1,class:"d-flex justify-content-center t2l-footer"},O=e.defineComponent({__name:"TableToList",props:{items:{},config:{}},emits:["pagesize","page"],setup(d){const l=d,o=e.computed(()=>l.config.columns.filter(a=>a.visible!=!1)),t=e.computed(()=>l.config.columns.filter(a=>a.visible!=!1&&a.filter)),n=e.computed(()=>o.value.filter(a=>a.sort&&a.sort.active&&a.sort.active.value)),r=e.computed(()=>Math.ceil(o.value.length/l.config.smColCount)),p=(a,c)=>{var s=a-1+(c-1)*r.value;return s<o.value.length?o.value[s]:null},u=(a,c)=>a.converter?a.converter(c[a.property],c):c[a.property],m=a=>{if(a.sort&&a.sort.active){let c=!a.sort.active.value;l.config.columns.forEach(s=>{s.sort&&s.sort.active&&(s.sort.active.value=!1)}),a.sort.active.value=c,a.sort.callback(c?a.property:"")}};return(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",ze,[a.config.selectableId?(e.openBlock(),e.createElementBlock("span",Re)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,s=>{var i,k;return e.openBlock(),e.createElementBlock("span",{class:"t2l-cell",key:s.property},[s.sort?(e.openBlock(),e.createBlock($,{key:0,icon:s.sort.icon,onClick:g=>m(s),active:(k=(i=s.sort)==null?void 0:i.active)==null?void 0:k.value},null,8,["icon","onClick","active"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(s.label),1)])}),128)),a.config.actionHeader?(e.openBlock(),e.createElementBlock("span",He,e.toDisplayString(a.config.actionHeader),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Oe,[a.config.selectableId?(e.openBlock(),e.createElementBlock("span",Pe)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,s=>(e.openBlock(),e.createElementBlock("span",{class:"t2l-cell",key:s.label},[s.filter?(e.openBlock(),e.createBlock(L,{key:0,item:s.filter},null,8,["item"])):e.createCommentVNode("",!0)]))),128)),a.config.actionHeader?(e.openBlock(),e.createElementBlock("span",je)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.items,s=>(e.openBlock(),e.createElementBlock("div",{key:s,class:"t2l-row"},[a.config.selectableId?(e.openBlock(),e.createElementBlock("div",We,[e.createElementVNode("input",{class:"form-check-input",type:"checkbox",id:s[a.config.selectableId],onChange:i=>s.selected=!s.selected},null,40,Ae)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,i=>(e.openBlock(),e.createElementBlock("div",{class:"t2l-cell",key:i.property,innerHTML:u(i,s)},null,8,Je))),128)),a.config.actions?(e.openBlock(),e.createElementBlock("div",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.config.actions,i=>(e.openBlock(),e.createElementBlock("button",{key:i,type:"button",class:"btn btn-outline-secondary",title:i.label,disabled:!i.enabled(s),onClick:k=>i.command(s)},[e.createElementVNode("i",{class:e.normalizeClass(i.icon)},null,2)],8,Ke))),128))])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Ue,[e.createElementVNode("div",Qe,[e.createVNode(S,{id:"card-filter-order",default:{icon:"fa-solid fa-chevron-down",label:"rendezés"},selected:n.value.length>0?n.value[0].property:"",enabled:a.config.sortEnabled,options:e.ref(o.value.filter(s=>s.sort).map(s=>({icon:s.sort.icon,label:s.sort.label,value:s.property,callback:s.sort.callback})))},null,8,["selected","enabled","options"])]),e.createElementVNode("div",Xe,[e.createVNode(T,{items:t.value.map(s=>({filter:s.filter,icon:s.filterIcon,label:s.label}))},null,8,["items"])])]),e.createElementVNode("div",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.items,(s,i)=>(e.openBlock(),e.createElementBlock("div",{class:"t2l-row",key:i},[a.config.selectableId?(e.openBlock(),e.createElementBlock("div",Ze,[e.createElementVNode("input",{class:"form-check-input",type:"checkbox",id:s[a.config.selectableId],onChange:k=>s.selected=!s.selected},null,40,et)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.config.smColCount,k=>(e.openBlock(),e.createElementBlock("div",{class:"t2l-card-col",key:k},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,g=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:g},[p(g,k)?(e.openBlock(),e.createElementBlock("div",tt,[e.createElementVNode("span",ot,e.toDisplayString(p(g,k).label),1),e.createElementVNode("div",{innerHTML:u(p(g,k),s)},null,8,lt)])):e.createCommentVNode("",!0)],64))),128))]))),128)),e.createElementVNode("div",nt,[l.config.actions?(e.openBlock(),e.createBlock(V,{key:0,item:s,options:l.config.actions,label:"...",id:i.toString(),right:!0},null,8,["item","options","id"])):e.createCommentVNode("",!0)])]))),128))]),a.config.paginatorSettings?(e.openBlock(),e.createBlock(F,{key:0,settings:a.config.paginatorSettings,onPagesize:c[0]||(c[0]=s=>a.$emit("pagesize",s)),onPage:c[1]||(c[1]=s=>a.$emit("page",s))},null,8,["settings"])):e.createCommentVNode("",!0),a.config.paginatorSettings?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",st," Elemek: "+e.toDisplayString(l.items.length),1))],64))}}),at={class:"d-flex flex flex-row"},rt={key:1,class:"d-flex flex-column gap-2 options-body flex-grow-1"},it={class:"d-flex flex-row"},ct={class:"d-flex align-items-end"},dt=["disabled"],P=e.defineComponent({__name:"TableToListOptions",props:{colCount:{},options:{}},emits:["save"],setup(d,{emit:l}){const o=d,t=e.ref([]);e.onMounted(()=>{t.value=o.options,c()});const n=e.computed(()=>o.colCount!=0?Math.ceil(o.options.length/o.colCount):0),r=(s,i)=>{var k=o.options[(s-1)*n.value+i-1];return k},p=()=>{u("save",t.value)},u=l,m=e.ref(!1),a=e.ref(!0),c=()=>{a.value=t.value.filter(s=>s.checked).length<=1};return(s,i)=>(e.openBlock(),e.createElementBlock("div",at,[m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"d-flex flex-row align-items-center gap-2 options-header justify-content-start",onClick:i[0]||(i[0]=k=>m.value=!m.value)},i[2]||(i[2]=[e.createElementVNode("i",{class:"fa-solid fa-cog"},null,-1),e.createElementVNode("div",{class:"options-header-label"},"beállítások",-1)]))),m.value?(e.openBlock(),e.createElementBlock("div",rt,[i[4]||(i[4]=e.createElementVNode("div",{class:"options-header-label"},"Látható oszlopok",-1)),e.createElementVNode("div",it,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.colCount,k=>(e.openBlock(),e.createElementBlock("div",{class:"d-flex flex-grow-1 flex-column",key:k},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,g=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:g},[r(k,g)?(e.openBlock(),e.createBlock(N,{key:0,id:r(k,g).property,label:r(k,g).label,checked:r(k,g).checked,onChanged:i[1]||(i[1]=C=>{t.value.find(b=>b.property==C.id).checked=C.checked,c()})},null,8,["id","label","checked"])):e.createCommentVNode("",!0)],64))),128))]))),128)),e.createElementVNode("div",ct,[e.createElementVNode("button",{class:"btn btn-outline-secondary",type:"button",onClick:p,disabled:a.value},i[3]||(i[3]=[e.createElementVNode("i",{class:"fa-solid fa-save"},null,-1)]),8,dt)])])])):e.createCommentVNode("",!0)]))}}),ut={class:"tlb-container d-flex flex-column flex-grow-1"},pt={class:"d-flex flex-row tlb-item"},mt={class:"d-flex flex-column flex-grow-1 flex-sm-row justify-content-between tlb-item"},kt=["id"],ft={key:0,class:"d-flex id"},vt={class:"d-flex flex-row align-items-center tlb-children-container"},j=e.defineComponent({__name:"TextListBox",props:{items:{}},emits:["deleted"],setup(d){return(l,o)=>{const t=e.resolveComponent("TextListBox",!0);return e.openBlock(),e.createElementBlock("div",ut,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.items,n=>(e.openBlock(),e.createElementBlock("div",{class:"d-flex flex-column",key:n.id},[e.createElementVNode("div",pt,[e.createElementVNode("div",mt,[e.createElementVNode("div",{class:"d-flex flex-grow-1",id:n.id},e.toDisplayString(n.label),9,kt),n.showId?(e.openBlock(),e.createElementBlock("div",ft,e.toDisplayString(n.id),1)):e.createCommentVNode("",!0)]),n.hideDelete?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($,{key:0,icon:"fa-solid fa-trash",onClick:r=>l.$emit("deleted",n.id)},null,8,["onClick"]))]),e.createElementVNode("div",vt,[n.childrend?(e.openBlock(),e.createBlock(t,{key:0,items:n.childrend,showId:n.showId,hideDelete:n.hideDelete},null,8,["items","showId","hideDelete"])):e.createCommentVNode("",!0)])]))),128))])}}}),gt={key:0,class:"toast-container position-fixed bottom-0 start-50 translate-middle-x p-4 toast-zindex"},yt={class:"toast-header"},Bt={class:"me-auto"},bt={class:"text-body-secondary"},ht=["onClick"],Ct=["innerHTML"],x=500,M=e.defineComponent({__name:"ToastComponent",props:{defaultDisplayDuration:{}},setup(d,{expose:l}){const o=d,t=e.ref([]);return l({addToast:r=>{r.displayDuration||(r.displayDuration=o.defaultDisplayDuration),r.id=new Date,t.value.filter(function(p){return p.id!==r.id}),t.value.push(r)}}),setInterval(()=>{t.value=t.value.map(r=>(r.displayDuration-=x,r)),t.value=t.value.filter(r=>r.displayDuration>0)},x),(r,p)=>t.value.length>0?(e.openBlock(),e.createElementBlock("div",gt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,u=>(e.openBlock(),e.createElementBlock("div",{key:u.message,class:e.normalizeClass(["toast d-block",{"toast-info":u.type==="info","toast-success":u.type==="success","toast-warning":u.type==="warning","toast-error":u.type==="error"}]),role:"alert","aria-live":"assertive","aria-atomic":"true"},[e.createElementVNode("div",yt,[e.createElementVNode("strong",Bt,e.toDisplayString(u.title),1),e.createElementVNode("small",bt,e.toDisplayString(u.id.toLocaleTimeString()),1),e.createElementVNode("button",{type:"button",class:"btn-close","data-bs-dismiss":"toast","aria-label":"Close",onClick:m=>t.value=t.value.filter(a=>a.id!==u.id)},null,8,ht)]),e.createElementVNode("div",{class:"toast-body",innerHTML:u.message},null,8,Ct)],2))),128))])):e.createCommentVNode("",!0)}}),G=e.defineComponent({__name:"ToastWrapper",setup(d){const l=e.ref(),o=[{id:"toast-notification-message",handler:t=>{let n=t.detail;l.value.addToast({title:n.title,message:n.message,type:n.severity,displayDuration:n.displayDuration})}},{id:"fetch-error",handler:t=>{let n=t.detail;l.value.addToast({title:n.title,message:n.message,type:"error",displayDuration:1e4})}}];return e.onMounted(()=>{o.forEach(t=>window.addEventListener(t.id,t.handler))}),e.onUnmounted(()=>{o.forEach(t=>window.removeEventListener(t.id,t.handler))}),(t,n)=>(e.openBlock(),e.createBlock(M,{ref_key:"toast",ref:l,defaultDisplayDuration:5e3},null,512))}}),B=class B{};h(B,"getId",(l,o)=>`${l}_${o}`),h(B,"saveOptions",(l,o,t)=>{localStorage.setItem(B.getId(l,o),JSON.stringify(t)),window.location.reload()}),h(B,"cleanOptions",(l,o)=>{for(let t=0;t<localStorage.length;t++)localStorage.key(t).includes(l)&&localStorage.key(t)!=B.getId(l,o)&&localStorage.removeItem(localStorage.key(t))}),h(B,"loadOptions",(l,o,t,n,r)=>{B.cleanOptions(l,o);const p=B.getId(l,o);if(localStorage.getItem(p))try{r.value=JSON.parse(localStorage.getItem(p)),r.value.forEach(u=>n.columns.find(m=>m.property==u.property).visible=u.checked)}catch{localStorage.removeItem(p),B.loadOptions(l,o,t,n,r)}else t||(t=[]),r.value=n.columns.map(u=>(u.visible=t.indexOf(u.property)==-1,{label:u.label,property:u.property,checked:u.visible}))});let w=B;const Et={CheckBox:N,CheckBoxList:z,DropDown:E,DropDownMenu:V,DropDownCallBack:S,FilterCompact:T,FilterControl:L,IconButton:$,PaginatorControl:F,RadioButton:I,RadioButtonGroup:R,SpinningProgress:H,TableToList:O,TableToListOptions:P,TextListBox:j,ToastComponent:M,ToastWrapper:G},_t={install(d){Object.entries(Et).forEach(([l,o])=>{d.component(l,o)})}};exports.CheckBox=N;exports.CheckBoxList=z;exports.DropDown=E;exports.DropDownCallBack=S;exports.DropDownMenu=V;exports.FilterCompact=T;exports.FilterControl=L;exports.FilterDate=we;exports.FilterDropDown=De;exports.FilterText=$e;exports.IconButton=$;exports.PaginatorControl=F;exports.RadioButton=I;exports.RadioButtonGroup=R;exports.SpinningProgress=H;exports.TabelToListOptionsPersister=w;exports.TableToList=O;exports.TableToListOptions=P;exports.TextListBox=j;exports.ToastComponent=M;exports.ToastWrapper=G;exports.default=_t;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var ee = Object.defineProperty;
|
|
2
|
-
var te = (
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as w, createElementBlock as a, openBlock as s, createElementVNode as d, toDisplayString as C, resolveComponent as K, Fragment as _, renderList as $, createVNode as z, createBlock as B, createCommentVNode as
|
|
2
|
+
var te = (p, l, t) => l in p ? ee(p, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : p[l] = t;
|
|
3
|
+
var x = (p, l, t) => te(p, typeof l != "symbol" ? l + "" : l, t);
|
|
4
|
+
import { defineComponent as w, createElementBlock as a, openBlock as s, createElementVNode as d, toDisplayString as C, resolveComponent as K, Fragment as _, renderList as $, createVNode as z, createBlock as B, createCommentVNode as m, watch as H, ref as y, onMounted as M, unref as le, normalizeStyle as j, createTextVNode as N, normalizeClass as L, computed as F, onUnmounted as oe } from "vue";
|
|
5
5
|
const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /* @__PURE__ */ w({
|
|
6
6
|
__name: "CheckBox",
|
|
7
7
|
props: {
|
|
@@ -10,7 +10,7 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
10
10
|
checked: { type: Boolean }
|
|
11
11
|
},
|
|
12
12
|
emits: ["changed"],
|
|
13
|
-
setup(
|
|
13
|
+
setup(p) {
|
|
14
14
|
return (l, t) => (s(), a("div", ne, [
|
|
15
15
|
d("input", {
|
|
16
16
|
class: "form-check-input",
|
|
@@ -35,7 +35,7 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
35
35
|
items: {},
|
|
36
36
|
callback: { type: Function }
|
|
37
37
|
},
|
|
38
|
-
setup(
|
|
38
|
+
setup(p) {
|
|
39
39
|
return (l, t) => {
|
|
40
40
|
const e = K("CheckBoxList", !0);
|
|
41
41
|
return s(!0), a(_, null, $(l.items, (o) => (s(), a("div", {
|
|
@@ -53,17 +53,17 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
53
53
|
key: 0,
|
|
54
54
|
items: o.childrend,
|
|
55
55
|
callback: l.callback
|
|
56
|
-
}, null, 8, ["items", "callback"])) :
|
|
56
|
+
}, null, 8, ["items", "callback"])) : m("", !0)
|
|
57
57
|
])
|
|
58
58
|
]))), 128);
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
}), de = (
|
|
62
|
-
const t =
|
|
61
|
+
}), de = (p, l) => {
|
|
62
|
+
const t = p.__vccOpts || p;
|
|
63
63
|
for (const [e, o] of l)
|
|
64
64
|
t[e] = o;
|
|
65
65
|
return t;
|
|
66
|
-
}, ue = /* @__PURE__ */ de(re, [["__scopeId", "data-v-ae2832c5"]]), ce = ["id"], pe = ["disabled"], ve = { class: "dd-label" }, fe = { class: "dd-item-list" },
|
|
66
|
+
}, ue = /* @__PURE__ */ de(re, [["__scopeId", "data-v-ae2832c5"]]), ce = ["id"], pe = ["disabled"], ve = { class: "dd-label" }, fe = { class: "dd-item-list" }, ge = ["onClick"], O = /* @__PURE__ */ w({
|
|
67
67
|
__name: "DropDown",
|
|
68
68
|
props: {
|
|
69
69
|
id: {},
|
|
@@ -77,55 +77,55 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
77
77
|
disabled: { type: Boolean }
|
|
78
78
|
},
|
|
79
79
|
emits: ["selected", "filtered"],
|
|
80
|
-
setup(
|
|
81
|
-
const t =
|
|
80
|
+
setup(p, { emit: l }) {
|
|
81
|
+
const t = p;
|
|
82
82
|
H(t.options, () => {
|
|
83
83
|
t.filterevent && (c.value = t.options.value);
|
|
84
84
|
}), H(
|
|
85
85
|
() => t.selected,
|
|
86
86
|
() => {
|
|
87
|
-
|
|
87
|
+
v();
|
|
88
88
|
}
|
|
89
89
|
), H(
|
|
90
90
|
() => t.label,
|
|
91
91
|
() => {
|
|
92
|
-
|
|
92
|
+
v();
|
|
93
93
|
}
|
|
94
94
|
);
|
|
95
95
|
const e = l, o = (h) => {
|
|
96
|
-
t.storeselected || (
|
|
97
|
-
}, r = "törlés",
|
|
96
|
+
t.storeselected || (f.value = h.label), e("selected", h);
|
|
97
|
+
}, r = "törlés", f = y(""), v = () => {
|
|
98
98
|
if (t.options.value) {
|
|
99
99
|
const h = t.options.value.find((k) => k.id == t.selected);
|
|
100
|
-
h ?
|
|
100
|
+
h ? f.value = h.label : (i(""), f.value = t.label);
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
103
|
M(() => {
|
|
104
|
-
t.label && (
|
|
105
|
-
|
|
104
|
+
t.label && (f.value = t.label), v(), g = "", document.addEventListener("click", function() {
|
|
105
|
+
S.value == "block" && (S.value = "none");
|
|
106
106
|
}), window.addEventListener("scrolled", function() {
|
|
107
|
-
|
|
107
|
+
S.value == "block" && (S.value = "none");
|
|
108
108
|
}), b();
|
|
109
109
|
});
|
|
110
|
-
let
|
|
110
|
+
let g = "";
|
|
111
111
|
const i = (h) => {
|
|
112
|
-
|
|
112
|
+
g = h, t.filterevent ? e("filtered", h) : h == "" ? c.value = t.options.value : c.value = t.options.value.filter(
|
|
113
113
|
(k) => k.label.toLowerCase().includes(h.toLowerCase())
|
|
114
114
|
);
|
|
115
115
|
}, c = y([]), n = () => {
|
|
116
116
|
o({ label: t.label, id: "" }), i("");
|
|
117
117
|
}, u = () => {
|
|
118
|
-
if (
|
|
119
|
-
|
|
118
|
+
if (S.value == "block") {
|
|
119
|
+
S.value = "none";
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
122
|
setTimeout(() => {
|
|
123
|
-
|
|
123
|
+
S.value = "block";
|
|
124
124
|
}, 10), setTimeout(b, 20);
|
|
125
125
|
}, b = () => {
|
|
126
126
|
const h = D.value, k = R.value;
|
|
127
127
|
t.opentop ? k.style.top = h.getBoundingClientRect().y - k.offsetHeight + "px" : (k.style.top = h.getBoundingClientRect().y + h.offsetHeight + "px", h.getBoundingClientRect().y - k.getBoundingClientRect().y != -h.offsetHeight && (k.style.top = parseInt(k.style.top.substring(0, k.style.top.length - 2)) + (h.getBoundingClientRect().y - k.getBoundingClientRect().y) + h.offsetHeight + "px")), P.value && P.value.focus();
|
|
128
|
-
}, D = y(null), R = y(null),
|
|
128
|
+
}, D = y(null), R = y(null), S = y("none"), P = y(null);
|
|
129
129
|
return (h, k) => (s(), a("div", {
|
|
130
130
|
id: h.id,
|
|
131
131
|
class: "dd-flex"
|
|
@@ -137,24 +137,24 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
137
137
|
type: "button",
|
|
138
138
|
disabled: h.disabled,
|
|
139
139
|
onClick: k[0] || (k[0] = (T) => {
|
|
140
|
-
i(le(
|
|
140
|
+
i(le(g)), u();
|
|
141
141
|
})
|
|
142
142
|
}, [
|
|
143
|
-
d("div", ve, C(
|
|
143
|
+
d("div", ve, C(f.value), 1)
|
|
144
144
|
], 8, pe),
|
|
145
145
|
d("div", {
|
|
146
146
|
class: "dd-menu",
|
|
147
|
-
style: j({ display:
|
|
147
|
+
style: j({ display: S.value }),
|
|
148
148
|
ref_key: "DropDownMenu",
|
|
149
149
|
ref: R
|
|
150
150
|
}, [
|
|
151
|
-
|
|
151
|
+
f.value != t.label ? (s(), a("button", {
|
|
152
152
|
key: 0,
|
|
153
153
|
type: "button",
|
|
154
154
|
class: "btn btn-outline-secondary dd-button",
|
|
155
155
|
onClick: k[1] || (k[1] = (T) => n())
|
|
156
|
-
}, C(r))) :
|
|
157
|
-
h.disableFilter ?
|
|
156
|
+
}, C(r))) : m("", !0),
|
|
157
|
+
h.disableFilter ? m("", !0) : (s(), a("input", {
|
|
158
158
|
key: 1,
|
|
159
159
|
ref_key: "ddSearch",
|
|
160
160
|
ref: P,
|
|
@@ -173,14 +173,14 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
173
173
|
T.icon ? (s(), a("i", {
|
|
174
174
|
key: 0,
|
|
175
175
|
class: L([T.icon, "dd-item__icon"])
|
|
176
|
-
}, null, 2)) :
|
|
177
|
-
|
|
178
|
-
], 8,
|
|
176
|
+
}, null, 2)) : m("", !0),
|
|
177
|
+
N(C(T.label), 1)
|
|
178
|
+
], 8, ge))), 128))
|
|
179
179
|
])
|
|
180
180
|
], 4)
|
|
181
181
|
], 8, ce));
|
|
182
182
|
}
|
|
183
|
-
}),
|
|
183
|
+
}), me = ["id"], ye = ["disabled"], be = { class: "ddc-row" }, he = { class: "ddc-label" }, ke = { class: "dd-item-list" }, _e = ["onClick"], Ce = { class: "ddc-item" }, $e = { class: "ddc-label" }, we = "törlés", U = /* @__PURE__ */ w({
|
|
184
184
|
__name: "DropDownCallBack",
|
|
185
185
|
props: {
|
|
186
186
|
id: {},
|
|
@@ -189,8 +189,8 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
189
189
|
enabled: { type: Boolean },
|
|
190
190
|
options: {}
|
|
191
191
|
},
|
|
192
|
-
setup(
|
|
193
|
-
const l =
|
|
192
|
+
setup(p) {
|
|
193
|
+
const l = p, t = (c) => {
|
|
194
194
|
c == l.default && e.value.callback(""), e.value = c, e.value.callback(e.value.value);
|
|
195
195
|
}, e = y(l.default), o = () => {
|
|
196
196
|
if (l.selected && l.options.value) {
|
|
@@ -209,16 +209,16 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
209
209
|
setTimeout(() => {
|
|
210
210
|
i.value = "block";
|
|
211
211
|
}, 10), setTimeout(() => {
|
|
212
|
-
|
|
212
|
+
g.value = f.value.offsetHeight;
|
|
213
213
|
}, 20);
|
|
214
|
-
},
|
|
214
|
+
}, f = y(null), v = y(null), g = y(0), i = y("none");
|
|
215
215
|
return (c, n) => (s(), a("div", {
|
|
216
216
|
class: "ddc-flex",
|
|
217
217
|
id: c.id
|
|
218
218
|
}, [
|
|
219
219
|
d("button", {
|
|
220
220
|
ref_key: "DropDownTriggerButton",
|
|
221
|
-
ref:
|
|
221
|
+
ref: f,
|
|
222
222
|
class: "btn btn-outline-secondary ddc-button",
|
|
223
223
|
type: "button",
|
|
224
224
|
disabled: !c.enabled,
|
|
@@ -233,16 +233,16 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
233
233
|
], 8, ye),
|
|
234
234
|
d("div", {
|
|
235
235
|
class: "ddc-menu",
|
|
236
|
-
style: j({ display: i.value, "margin-top":
|
|
236
|
+
style: j({ display: i.value, "margin-top": g.value + "px" }),
|
|
237
237
|
ref_key: "DropDownMenu",
|
|
238
|
-
ref:
|
|
238
|
+
ref: v
|
|
239
239
|
}, [
|
|
240
240
|
e.value != l.default ? (s(), a("button", {
|
|
241
241
|
key: 0,
|
|
242
242
|
type: "button",
|
|
243
243
|
class: "btn btn-outline-secondary ddc-button",
|
|
244
244
|
onClick: n[1] || (n[1] = (u) => t(l.default))
|
|
245
|
-
}, C(we))) :
|
|
245
|
+
}, C(we))) : m("", !0),
|
|
246
246
|
d("div", ke, [
|
|
247
247
|
(s(!0), a(_, null, $(c.options.value, (u) => (s(), a("div", {
|
|
248
248
|
key: u.label,
|
|
@@ -258,7 +258,7 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
258
258
|
], 8, _e))), 128))
|
|
259
259
|
])
|
|
260
260
|
], 4)
|
|
261
|
-
], 8,
|
|
261
|
+
], 8, me));
|
|
262
262
|
}
|
|
263
263
|
}), De = ["id"], Be = {
|
|
264
264
|
key: 0,
|
|
@@ -276,8 +276,8 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
276
276
|
id: {},
|
|
277
277
|
right: { type: Boolean }
|
|
278
278
|
},
|
|
279
|
-
setup(
|
|
280
|
-
const l =
|
|
279
|
+
setup(p) {
|
|
280
|
+
const l = p;
|
|
281
281
|
M(() => {
|
|
282
282
|
document.addEventListener("click", function() {
|
|
283
283
|
t.value && (t.value = !1);
|
|
@@ -288,12 +288,12 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
288
288
|
t.value = !0;
|
|
289
289
|
}, 10), setTimeout(o, 20);
|
|
290
290
|
}, o = () => {
|
|
291
|
-
const
|
|
292
|
-
i.style.top =
|
|
293
|
-
}, r = y(null),
|
|
294
|
-
return (
|
|
291
|
+
const g = r.value, i = f.value;
|
|
292
|
+
i.style.top = g.getBoundingClientRect().y + g.offsetHeight + "px", g.getBoundingClientRect().y - i.getBoundingClientRect().y != -g.offsetHeight && (i.style.top = parseInt(i.style.top.substring(0, i.style.top.length - 2)) + (g.getBoundingClientRect().y - i.getBoundingClientRect().y) + g.offsetHeight + "px"), i.style.left = g.getBoundingClientRect().x - (l.right ? 100 : 0) + "px";
|
|
293
|
+
}, r = y(null), f = y(null), v = y(0);
|
|
294
|
+
return (g, i) => (s(), a("div", {
|
|
295
295
|
class: "d-flex",
|
|
296
|
-
id:
|
|
296
|
+
id: g.id
|
|
297
297
|
}, [
|
|
298
298
|
d("button", {
|
|
299
299
|
ref_key: "DropDownTriggerButton",
|
|
@@ -302,34 +302,34 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
302
302
|
type: "button",
|
|
303
303
|
onClick: i[0] || (i[0] = (c) => e())
|
|
304
304
|
}, [
|
|
305
|
-
|
|
306
|
-
|
|
305
|
+
g.label ? (s(), a("span", Be, C(g.label), 1)) : m("", !0),
|
|
306
|
+
g.icon ? (s(), a("span", Te, [
|
|
307
307
|
d("i", {
|
|
308
|
-
class: L(
|
|
308
|
+
class: L(g.icon)
|
|
309
309
|
}, null, 2)
|
|
310
|
-
])) :
|
|
310
|
+
])) : m("", !0)
|
|
311
311
|
], 512),
|
|
312
312
|
t.value ? (s(), a("div", {
|
|
313
313
|
key: 0,
|
|
314
314
|
class: "ddm-menu",
|
|
315
315
|
ref_key: "DropDownMenu",
|
|
316
|
-
ref:
|
|
317
|
-
style: j({ "margin-top":
|
|
316
|
+
ref: f,
|
|
317
|
+
style: j({ "margin-top": v.value + "px" })
|
|
318
318
|
}, [
|
|
319
|
-
(s(!0), a(_, null, $(
|
|
319
|
+
(s(!0), a(_, null, $(g.options, (c) => (s(), a("div", {
|
|
320
320
|
key: c.icon,
|
|
321
321
|
class: "ddm-item",
|
|
322
|
-
onClick: (n) => c.command(
|
|
322
|
+
onClick: (n) => c.command(g.item)
|
|
323
323
|
}, [
|
|
324
324
|
d("i", {
|
|
325
325
|
class: L(c.icon)
|
|
326
326
|
}, null, 2),
|
|
327
|
-
|
|
327
|
+
N(C(c.label), 1)
|
|
328
328
|
], 8, Ie))), 128))
|
|
329
|
-
], 4)) :
|
|
329
|
+
], 4)) : m("", !0)
|
|
330
330
|
], 8, De));
|
|
331
331
|
}
|
|
332
|
-
}), Se = { class: "fltrc-container" }, Le = { class: "fltrc-container" },
|
|
332
|
+
}), Se = { class: "fltrc-container" }, Le = { class: "fltrc-container" }, xe = ["placeholder", "value"], Fe = {
|
|
333
333
|
key: 1,
|
|
334
334
|
class: "d-flex flex-row input-group align-items-center"
|
|
335
335
|
}, Me = ["value"], Re = ["value"], q = /* @__PURE__ */ w({
|
|
@@ -337,11 +337,11 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
337
337
|
props: {
|
|
338
338
|
items: {}
|
|
339
339
|
},
|
|
340
|
-
setup(
|
|
341
|
-
const l =
|
|
340
|
+
setup(p) {
|
|
341
|
+
const l = p, t = y(0), e = y(0), o = F(() => l.items[t.value].filter), r = (c) => {
|
|
342
342
|
let n = l.items[e.value];
|
|
343
343
|
n.filter.filtered(n.filter.key, ""), t.value = c, e.value = c, i.value += 1;
|
|
344
|
-
},
|
|
344
|
+
}, f = y(void 0);
|
|
345
345
|
M(() => {
|
|
346
346
|
let c = [];
|
|
347
347
|
for (let n = 0; n < l.items.length; n++)
|
|
@@ -350,18 +350,18 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
350
350
|
label: l.items[n].label,
|
|
351
351
|
command: () => r(n)
|
|
352
352
|
});
|
|
353
|
-
|
|
353
|
+
f.value = c;
|
|
354
354
|
});
|
|
355
|
-
const
|
|
355
|
+
const v = y({}), g = y(void 0), i = y(0);
|
|
356
356
|
return (c, n) => (s(), a("div", Se, [
|
|
357
|
-
|
|
357
|
+
f.value ? (s(), B(G, {
|
|
358
358
|
key: 0,
|
|
359
359
|
id: "ddm",
|
|
360
360
|
icon: c.items[t.value].icon,
|
|
361
361
|
item: c.items[t.value],
|
|
362
362
|
label: "",
|
|
363
|
-
options:
|
|
364
|
-
}, null, 8, ["icon", "item", "options"])) :
|
|
363
|
+
options: f.value
|
|
364
|
+
}, null, 8, ["icon", "item", "options"])) : m("", !0),
|
|
365
365
|
d("div", Le, [
|
|
366
366
|
o.value.type == "text" ? (s(), a("input", {
|
|
367
367
|
key: 0,
|
|
@@ -375,14 +375,14 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
375
375
|
u.target.value
|
|
376
376
|
), o.value.defaultv = u.target.value;
|
|
377
377
|
})
|
|
378
|
-
}, null, 40,
|
|
379
|
-
o.value.type == "date" ? (s(), a("div",
|
|
378
|
+
}, null, 40, xe)) : m("", !0),
|
|
379
|
+
o.value.type == "date" ? (s(), a("div", Fe, [
|
|
380
380
|
d("input", {
|
|
381
381
|
type: "date",
|
|
382
382
|
class: "form-control",
|
|
383
383
|
value: o.value.defFrom ?? "",
|
|
384
384
|
onInput: n[1] || (n[1] = (u) => {
|
|
385
|
-
|
|
385
|
+
v.value.from = u.target.value == "" ? null : u.target.value, o.value.defFrom = u.target.value == "" ? null : u.target.value, o.value.filtered(o.value.key, v.value);
|
|
386
386
|
})
|
|
387
387
|
}, null, 40, Me),
|
|
388
388
|
n[5] || (n[5] = d("span", { class: "input-group-text" }, "-", -1)),
|
|
@@ -391,13 +391,13 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
391
391
|
class: "form-control",
|
|
392
392
|
value: o.value.defTill ?? "",
|
|
393
393
|
onInput: n[2] || (n[2] = (u) => {
|
|
394
|
-
|
|
394
|
+
v.value.untill = u.target.value == "" ? null : u.target.value, o.value.defTill = u.target.value == "" ? null : u.target.value, o.value.filtered(o.value.key, v.value);
|
|
395
395
|
})
|
|
396
396
|
}, null, 40, Re)
|
|
397
|
-
])) :
|
|
398
|
-
o.value.type == "dropdown" ? (s(), B(
|
|
397
|
+
])) : m("", !0),
|
|
398
|
+
o.value.type == "dropdown" ? (s(), B(O, {
|
|
399
399
|
key: i.value,
|
|
400
|
-
selected:
|
|
400
|
+
selected: g.value,
|
|
401
401
|
options: o.value.options,
|
|
402
402
|
filterevent: o.value.filterevent,
|
|
403
403
|
onFiltered: n[3] || (n[3] = (u) => {
|
|
@@ -406,29 +406,29 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
406
406
|
id: o.value.key,
|
|
407
407
|
label: o.value.label,
|
|
408
408
|
onSelected: n[4] || (n[4] = (u) => o.value.filtered(o.value.key, u.id))
|
|
409
|
-
}, null, 8, ["selected", "options", "filterevent", "id", "label"])) :
|
|
409
|
+
}, null, 8, ["selected", "options", "filterevent", "id", "label"])) : m("", !0)
|
|
410
410
|
])
|
|
411
411
|
]));
|
|
412
412
|
}
|
|
413
413
|
}), Ee = { class: "fltrctrl-container" }, He = ["placeholder", "value"], ze = {
|
|
414
414
|
key: 1,
|
|
415
415
|
class: "d-flex flex-row input-group align-items-center"
|
|
416
|
-
},
|
|
416
|
+
}, Ne = ["value"], Oe = ["value"];
|
|
417
417
|
class Gt {
|
|
418
418
|
constructor(l, t, e) {
|
|
419
|
-
|
|
419
|
+
x(this, "type");
|
|
420
420
|
this.key = l, this.placeholder = t, this.filtered = e, this.type = "text";
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
class Wt {
|
|
424
|
-
constructor(l, t, e, o, r,
|
|
425
|
-
|
|
426
|
-
this.key = l, this.label = t, this.options = e, this.filterevent = o, this.onfiltered = r, this.filtered =
|
|
424
|
+
constructor(l, t, e, o, r, f) {
|
|
425
|
+
x(this, "type");
|
|
426
|
+
this.key = l, this.label = t, this.options = e, this.filterevent = o, this.onfiltered = r, this.filtered = f, this.type = "dropdown";
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
429
|
class At {
|
|
430
430
|
constructor(l, t, e, o, r) {
|
|
431
|
-
|
|
431
|
+
x(this, "type");
|
|
432
432
|
this.key = l, this.label = t, this.filtered = e, this.defFrom = o, this.defTill = r, this.type = "date";
|
|
433
433
|
}
|
|
434
434
|
}
|
|
@@ -437,8 +437,8 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
437
437
|
props: {
|
|
438
438
|
item: {}
|
|
439
439
|
},
|
|
440
|
-
setup(
|
|
441
|
-
const l =
|
|
440
|
+
setup(p) {
|
|
441
|
+
const l = p;
|
|
442
442
|
M(() => {
|
|
443
443
|
var e;
|
|
444
444
|
if (l.item.type == "dropdown") {
|
|
@@ -457,7 +457,7 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
457
457
|
placeholder: e.item.placeholder,
|
|
458
458
|
value: e.item.defaultv ?? "",
|
|
459
459
|
onInput: o[0] || (o[0] = (r) => e.item.filtered(e.item.key, r.target.value))
|
|
460
|
-
}, null, 40, He)) :
|
|
460
|
+
}, null, 40, He)) : m("", !0),
|
|
461
461
|
e.item.type == "date" ? (s(), a("div", ze, [
|
|
462
462
|
d("input", {
|
|
463
463
|
type: "date",
|
|
@@ -466,7 +466,7 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
466
466
|
onInput: o[1] || (o[1] = (r) => {
|
|
467
467
|
E.value.from = r.target.value == "" ? null : r.target.value, e.item.filtered(e.item.key, E.value);
|
|
468
468
|
})
|
|
469
|
-
}, null, 40,
|
|
469
|
+
}, null, 40, Ne),
|
|
470
470
|
o[5] || (o[5] = d("span", { class: "input-group-text" }, "-", -1)),
|
|
471
471
|
d("input", {
|
|
472
472
|
type: "date",
|
|
@@ -475,9 +475,9 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
475
475
|
onInput: o[2] || (o[2] = (r) => {
|
|
476
476
|
E.value.untill = r.target.value == "" ? null : r.target.value, e.item.filtered(e.item.key, E.value);
|
|
477
477
|
})
|
|
478
|
-
}, null, 40,
|
|
479
|
-
])) :
|
|
480
|
-
e.item.type == "dropdown" ? (s(), B(
|
|
478
|
+
}, null, 40, Oe)
|
|
479
|
+
])) : m("", !0),
|
|
480
|
+
e.item.type == "dropdown" ? (s(), B(O, {
|
|
481
481
|
key: 2,
|
|
482
482
|
selected: t.value,
|
|
483
483
|
options: y(e.item.options),
|
|
@@ -488,7 +488,7 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
488
488
|
id: e.item.key,
|
|
489
489
|
label: e.item.label,
|
|
490
490
|
onSelected: o[4] || (o[4] = (r) => e.item.filtered(e.item.key, r.id))
|
|
491
|
-
}, null, 8, ["selected", "options", "filterevent", "id", "label"])) :
|
|
491
|
+
}, null, 8, ["selected", "options", "filterevent", "id", "label"])) : m("", !0)
|
|
492
492
|
]));
|
|
493
493
|
}
|
|
494
494
|
}), W = /* @__PURE__ */ w({
|
|
@@ -499,12 +499,12 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
499
499
|
big: { type: Boolean }
|
|
500
500
|
},
|
|
501
501
|
emits: ["click"],
|
|
502
|
-
setup(
|
|
503
|
-
const t =
|
|
502
|
+
setup(p, { emit: l }) {
|
|
503
|
+
const t = p, e = F(
|
|
504
504
|
() => `${t.icon} ${t.big ? "ib-button-big" : ""}`
|
|
505
505
|
), o = l;
|
|
506
|
-
return (r,
|
|
507
|
-
onClick:
|
|
506
|
+
return (r, f) => (s(), a("div", {
|
|
507
|
+
onClick: f[0] || (f[0] = (v) => o("click")),
|
|
508
508
|
class: "ib-container"
|
|
509
509
|
}, [
|
|
510
510
|
d("div", {
|
|
@@ -522,8 +522,8 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
522
522
|
settings: {}
|
|
523
523
|
},
|
|
524
524
|
emits: ["pagesize", "page"],
|
|
525
|
-
setup(
|
|
526
|
-
const t =
|
|
525
|
+
setup(p, { emit: l }) {
|
|
526
|
+
const t = p, e = l, o = () => {
|
|
527
527
|
let i = y([]);
|
|
528
528
|
return t.settings.value.sizes.forEach(
|
|
529
529
|
(c) => i.value.push({ label: c.toString(), id: c.toString() })
|
|
@@ -535,32 +535,32 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
535
535
|
r.value = 1;
|
|
536
536
|
}
|
|
537
537
|
);
|
|
538
|
-
const
|
|
538
|
+
const f = F(
|
|
539
539
|
() => Math.floor(t.settings.value.total / t.settings.value.pagesize) + 1
|
|
540
|
-
),
|
|
540
|
+
), v = () => {
|
|
541
541
|
r.value > 1 && (r.value -= 1, e("page", r.value));
|
|
542
|
-
},
|
|
543
|
-
r.value <
|
|
542
|
+
}, g = () => {
|
|
543
|
+
r.value < f.value && (r.value += 1, e("page", r.value));
|
|
544
544
|
};
|
|
545
545
|
return (i, c) => (s(), a("div", Pe, [
|
|
546
546
|
d("button", {
|
|
547
547
|
class: "btn btn-outline-secondary",
|
|
548
|
-
onClick:
|
|
548
|
+
onClick: v
|
|
549
549
|
}, "<"),
|
|
550
550
|
d("input", {
|
|
551
551
|
class: "form-control pc-input",
|
|
552
552
|
type: "number",
|
|
553
553
|
value: r.value,
|
|
554
554
|
min: "1",
|
|
555
|
-
max:
|
|
555
|
+
max: f.value,
|
|
556
556
|
onChange: c[0] || (c[0] = (n) => i.$emit("page", n.target.value))
|
|
557
557
|
}, null, 40, je),
|
|
558
|
-
|
|
558
|
+
N("/" + C(f.value) + " ", 1),
|
|
559
559
|
d("button", {
|
|
560
560
|
class: "btn btn-outline-secondary",
|
|
561
|
-
onClick:
|
|
561
|
+
onClick: g
|
|
562
562
|
}, ">"),
|
|
563
|
-
z(
|
|
563
|
+
z(O, {
|
|
564
564
|
opentop: !0,
|
|
565
565
|
class: "pc-dropdown",
|
|
566
566
|
id: "pagecount",
|
|
@@ -582,7 +582,7 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
582
582
|
selected: { type: Boolean }
|
|
583
583
|
},
|
|
584
584
|
emits: ["selected"],
|
|
585
|
-
setup(
|
|
585
|
+
setup(p) {
|
|
586
586
|
return (l, t) => (s(), a("div", Ve, [
|
|
587
587
|
d("input", {
|
|
588
588
|
class: "form-check-input",
|
|
@@ -605,7 +605,7 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
605
605
|
items: {}
|
|
606
606
|
},
|
|
607
607
|
emits: ["selected"],
|
|
608
|
-
setup(
|
|
608
|
+
setup(p) {
|
|
609
609
|
return (l, t) => (s(), a("div", Ae, [
|
|
610
610
|
(s(!0), a(_, null, $(l.items, (e) => (s(), B(Y, {
|
|
611
611
|
key: e.id,
|
|
@@ -626,10 +626,10 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
626
626
|
props: {
|
|
627
627
|
loading: { type: Boolean }
|
|
628
628
|
},
|
|
629
|
-
setup(
|
|
629
|
+
setup(p) {
|
|
630
630
|
return (l, t) => l.loading ? (s(), a("div", Ke, t[0] || (t[0] = [
|
|
631
631
|
d("span", { class: "visually-hidden" }, "Loading...", -1)
|
|
632
|
-
]))) :
|
|
632
|
+
]))) : m("", !0);
|
|
633
633
|
}
|
|
634
634
|
}), qe = { class: "t2l-table-view t2l-table-header-label" }, Qe = {
|
|
635
635
|
key: 0,
|
|
@@ -655,7 +655,7 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
655
655
|
}, pt = ["id", "onChange"], vt = {
|
|
656
656
|
key: 0,
|
|
657
657
|
class: "t2l-property"
|
|
658
|
-
}, ft = { class: "t2l-label" },
|
|
658
|
+
}, ft = { class: "t2l-label" }, gt = ["innerHTML"], mt = { class: "d-flex align-items-center" }, yt = {
|
|
659
659
|
key: 1,
|
|
660
660
|
class: "d-flex justify-content-center t2l-footer"
|
|
661
661
|
}, bt = /* @__PURE__ */ w({
|
|
@@ -665,19 +665,19 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
665
665
|
config: {}
|
|
666
666
|
},
|
|
667
667
|
emits: ["pagesize", "page"],
|
|
668
|
-
setup(
|
|
669
|
-
const l =
|
|
668
|
+
setup(p) {
|
|
669
|
+
const l = p, t = F(
|
|
670
670
|
() => l.config.columns.filter((i) => i.visible != !1)
|
|
671
|
-
), e =
|
|
671
|
+
), e = F(
|
|
672
672
|
() => l.config.columns.filter((i) => i.visible != !1 && i.filter)
|
|
673
|
-
), o =
|
|
673
|
+
), o = F(
|
|
674
674
|
() => t.value.filter(
|
|
675
675
|
(i) => i.sort && i.sort.active && i.sort.active.value
|
|
676
676
|
)
|
|
677
|
-
), r =
|
|
677
|
+
), r = F(() => Math.ceil(t.value.length / l.config.smColCount)), f = (i, c) => {
|
|
678
678
|
var n = i - 1 + (c - 1) * r.value;
|
|
679
679
|
return n < t.value.length ? t.value[n] : null;
|
|
680
|
-
},
|
|
680
|
+
}, v = (i, c) => i.converter ? i.converter(c[i.property], c) : c[i.property], g = (i) => {
|
|
681
681
|
if (i.sort && i.sort.active) {
|
|
682
682
|
let c = !i.sort.active.value;
|
|
683
683
|
l.config.columns.forEach((n) => {
|
|
@@ -687,7 +687,7 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
687
687
|
};
|
|
688
688
|
return (i, c) => (s(), a(_, null, [
|
|
689
689
|
d("div", qe, [
|
|
690
|
-
i.config.selectableId ? (s(), a("span", Qe)) :
|
|
690
|
+
i.config.selectableId ? (s(), a("span", Qe)) : m("", !0),
|
|
691
691
|
(s(!0), a(_, null, $(t.value, (n) => {
|
|
692
692
|
var u, b;
|
|
693
693
|
return s(), a("span", {
|
|
@@ -697,16 +697,16 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
697
697
|
n.sort ? (s(), B(W, {
|
|
698
698
|
key: 0,
|
|
699
699
|
icon: n.sort.icon,
|
|
700
|
-
onClick: (D) =>
|
|
700
|
+
onClick: (D) => g(n),
|
|
701
701
|
active: (b = (u = n.sort) == null ? void 0 : u.active) == null ? void 0 : b.value
|
|
702
|
-
}, null, 8, ["icon", "onClick", "active"])) :
|
|
703
|
-
|
|
702
|
+
}, null, 8, ["icon", "onClick", "active"])) : m("", !0),
|
|
703
|
+
N(" " + C(n.label), 1)
|
|
704
704
|
]);
|
|
705
705
|
}), 128)),
|
|
706
|
-
i.config.actionHeader ? (s(), a("span", Xe, C(i.config.actionHeader), 1)) :
|
|
706
|
+
i.config.actionHeader ? (s(), a("span", Xe, C(i.config.actionHeader), 1)) : m("", !0)
|
|
707
707
|
]),
|
|
708
708
|
d("div", Ye, [
|
|
709
|
-
i.config.selectableId ? (s(), a("span", Ze)) :
|
|
709
|
+
i.config.selectableId ? (s(), a("span", Ze)) : m("", !0),
|
|
710
710
|
(s(!0), a(_, null, $(t.value, (n) => (s(), a("span", {
|
|
711
711
|
class: "t2l-cell",
|
|
712
712
|
key: n.label
|
|
@@ -714,9 +714,9 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
714
714
|
n.filter ? (s(), B(Q, {
|
|
715
715
|
key: 0,
|
|
716
716
|
item: n.filter
|
|
717
|
-
}, null, 8, ["item"])) :
|
|
717
|
+
}, null, 8, ["item"])) : m("", !0)
|
|
718
718
|
]))), 128)),
|
|
719
|
-
i.config.actionHeader ? (s(), a("span", et)) :
|
|
719
|
+
i.config.actionHeader ? (s(), a("span", et)) : m("", !0)
|
|
720
720
|
]),
|
|
721
721
|
d("div", tt, [
|
|
722
722
|
(s(!0), a(_, null, $(i.items, (n) => (s(), a("div", {
|
|
@@ -730,11 +730,11 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
730
730
|
id: n[i.config.selectableId],
|
|
731
731
|
onChange: (u) => n.selected = !n.selected
|
|
732
732
|
}, null, 40, ot)
|
|
733
|
-
])) :
|
|
733
|
+
])) : m("", !0),
|
|
734
734
|
(s(!0), a(_, null, $(t.value, (u) => (s(), a("div", {
|
|
735
735
|
class: "t2l-cell",
|
|
736
736
|
key: u.property,
|
|
737
|
-
innerHTML:
|
|
737
|
+
innerHTML: v(u, n)
|
|
738
738
|
}, null, 8, nt))), 128)),
|
|
739
739
|
i.config.actions ? (s(), a("div", st, [
|
|
740
740
|
(s(!0), a(_, null, $(i.config.actions, (u) => (s(), a("button", {
|
|
@@ -749,7 +749,7 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
749
749
|
class: L(u.icon)
|
|
750
750
|
}, null, 2)
|
|
751
751
|
], 8, it))), 128))
|
|
752
|
-
])) :
|
|
752
|
+
])) : m("", !0)
|
|
753
753
|
]))), 128))
|
|
754
754
|
]),
|
|
755
755
|
d("div", at, [
|
|
@@ -794,21 +794,21 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
794
794
|
id: n[i.config.selectableId],
|
|
795
795
|
onChange: (b) => n.selected = !n.selected
|
|
796
796
|
}, null, 40, pt)
|
|
797
|
-
])) :
|
|
797
|
+
])) : m("", !0),
|
|
798
798
|
(s(!0), a(_, null, $(i.config.smColCount, (b) => (s(), a("div", {
|
|
799
799
|
class: "t2l-card-col",
|
|
800
800
|
key: b
|
|
801
801
|
}, [
|
|
802
802
|
(s(!0), a(_, null, $(r.value, (D) => (s(), a(_, { key: D }, [
|
|
803
|
-
|
|
804
|
-
d("span", ft, C(
|
|
803
|
+
f(D, b) ? (s(), a("div", vt, [
|
|
804
|
+
d("span", ft, C(f(D, b).label), 1),
|
|
805
805
|
d("div", {
|
|
806
|
-
innerHTML:
|
|
807
|
-
}, null, 8,
|
|
808
|
-
])) :
|
|
806
|
+
innerHTML: v(f(D, b), n)
|
|
807
|
+
}, null, 8, gt)
|
|
808
|
+
])) : m("", !0)
|
|
809
809
|
], 64))), 128))
|
|
810
810
|
]))), 128)),
|
|
811
|
-
d("div",
|
|
811
|
+
d("div", mt, [
|
|
812
812
|
l.config.actions ? (s(), B(G, {
|
|
813
813
|
key: 0,
|
|
814
814
|
item: n,
|
|
@@ -816,7 +816,7 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
816
816
|
label: "...",
|
|
817
817
|
id: u.toString(),
|
|
818
818
|
right: !0
|
|
819
|
-
}, null, 8, ["item", "options", "id"])) :
|
|
819
|
+
}, null, 8, ["item", "options", "id"])) : m("", !0)
|
|
820
820
|
])
|
|
821
821
|
]))), 128))
|
|
822
822
|
]),
|
|
@@ -825,8 +825,8 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
825
825
|
settings: i.config.paginatorSettings,
|
|
826
826
|
onPagesize: c[0] || (c[0] = (n) => i.$emit("pagesize", n)),
|
|
827
827
|
onPage: c[1] || (c[1] = (n) => i.$emit("page", n))
|
|
828
|
-
}, null, 8, ["settings"])) :
|
|
829
|
-
i.config.paginatorSettings ?
|
|
828
|
+
}, null, 8, ["settings"])) : m("", !0),
|
|
829
|
+
i.config.paginatorSettings ? m("", !0) : (s(), a("div", yt, " Elemek: " + C(l.items.length), 1))
|
|
830
830
|
], 64));
|
|
831
831
|
}
|
|
832
832
|
}), ht = { class: "d-flex flex flex-row" }, kt = {
|
|
@@ -839,31 +839,31 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
839
839
|
options: {}
|
|
840
840
|
},
|
|
841
841
|
emits: ["save"],
|
|
842
|
-
setup(
|
|
843
|
-
const t =
|
|
842
|
+
setup(p, { emit: l }) {
|
|
843
|
+
const t = p, e = y([]);
|
|
844
844
|
M(() => {
|
|
845
845
|
e.value = t.options, c();
|
|
846
846
|
});
|
|
847
|
-
const o =
|
|
847
|
+
const o = F(
|
|
848
848
|
() => t.colCount != 0 ? Math.ceil(t.options.length / t.colCount) : 0
|
|
849
849
|
), r = (n, u) => {
|
|
850
850
|
var b = t.options[(n - 1) * o.value + u - 1];
|
|
851
851
|
return b;
|
|
852
|
-
},
|
|
853
|
-
|
|
854
|
-
},
|
|
852
|
+
}, f = () => {
|
|
853
|
+
v("save", e.value);
|
|
854
|
+
}, v = l, g = y(!1), i = y(!0), c = () => {
|
|
855
855
|
i.value = e.value.filter((n) => n.checked).length <= 1;
|
|
856
856
|
};
|
|
857
857
|
return (n, u) => (s(), a("div", ht, [
|
|
858
|
-
|
|
858
|
+
g.value ? m("", !0) : (s(), a("div", {
|
|
859
859
|
key: 0,
|
|
860
860
|
class: "d-flex flex-row align-items-center gap-2 options-header justify-content-start",
|
|
861
|
-
onClick: u[0] || (u[0] = (b) =>
|
|
861
|
+
onClick: u[0] || (u[0] = (b) => g.value = !g.value)
|
|
862
862
|
}, u[2] || (u[2] = [
|
|
863
863
|
d("i", { class: "fa-solid fa-cog" }, null, -1),
|
|
864
864
|
d("div", { class: "options-header-label" }, "beállítások", -1)
|
|
865
865
|
]))),
|
|
866
|
-
|
|
866
|
+
g.value ? (s(), a("div", kt, [
|
|
867
867
|
u[4] || (u[4] = d("div", { class: "options-header-label" }, "Látható oszlopok", -1)),
|
|
868
868
|
d("div", _t, [
|
|
869
869
|
(s(!0), a(_, null, $(n.colCount, (b) => (s(), a("div", {
|
|
@@ -878,36 +878,36 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
878
878
|
checked: r(b, D).checked,
|
|
879
879
|
onChanged: u[1] || (u[1] = (R) => {
|
|
880
880
|
e.value.find(
|
|
881
|
-
(
|
|
881
|
+
(S) => S.property == R.id
|
|
882
882
|
).checked = R.checked, c();
|
|
883
883
|
})
|
|
884
|
-
}, null, 8, ["id", "label", "checked"])) :
|
|
884
|
+
}, null, 8, ["id", "label", "checked"])) : m("", !0)
|
|
885
885
|
], 64))), 128))
|
|
886
886
|
]))), 128)),
|
|
887
887
|
d("div", Ct, [
|
|
888
888
|
d("button", {
|
|
889
889
|
class: "btn btn-outline-secondary",
|
|
890
890
|
type: "button",
|
|
891
|
-
onClick:
|
|
891
|
+
onClick: f,
|
|
892
892
|
disabled: i.value
|
|
893
893
|
}, u[3] || (u[3] = [
|
|
894
894
|
d("i", { class: "fa-solid fa-save" }, null, -1)
|
|
895
895
|
]), 8, $t)
|
|
896
896
|
])
|
|
897
897
|
])
|
|
898
|
-
])) :
|
|
898
|
+
])) : m("", !0)
|
|
899
899
|
]));
|
|
900
900
|
}
|
|
901
901
|
}), Dt = { class: "tlb-container d-flex flex-column flex-grow-1" }, Bt = { class: "d-flex flex-row tlb-item" }, Tt = { class: "d-flex flex-column flex-grow-1 flex-sm-row justify-content-between tlb-item" }, It = ["id"], St = {
|
|
902
902
|
key: 0,
|
|
903
903
|
class: "d-flex id"
|
|
904
|
-
}, Lt = { class: "d-flex flex-row align-items-center tlb-children-container" },
|
|
904
|
+
}, Lt = { class: "d-flex flex-row align-items-center tlb-children-container" }, xt = /* @__PURE__ */ w({
|
|
905
905
|
__name: "TextListBox",
|
|
906
906
|
props: {
|
|
907
907
|
items: {}
|
|
908
908
|
},
|
|
909
909
|
emits: ["deleted"],
|
|
910
|
-
setup(
|
|
910
|
+
setup(p) {
|
|
911
911
|
return (l, t) => {
|
|
912
912
|
const e = K("TextListBox", !0);
|
|
913
913
|
return s(), a("div", Dt, [
|
|
@@ -921,9 +921,9 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
921
921
|
class: "d-flex flex-grow-1",
|
|
922
922
|
id: o.id
|
|
923
923
|
}, C(o.label), 9, It),
|
|
924
|
-
o.showId ? (s(), a("div", St, C(o.id), 1)) :
|
|
924
|
+
o.showId ? (s(), a("div", St, C(o.id), 1)) : m("", !0)
|
|
925
925
|
]),
|
|
926
|
-
o.hideDelete ?
|
|
926
|
+
o.hideDelete ? m("", !0) : (s(), B(W, {
|
|
927
927
|
key: 0,
|
|
928
928
|
icon: "fa-solid fa-trash",
|
|
929
929
|
onClick: (r) => l.$emit("deleted", o.id)
|
|
@@ -935,13 +935,13 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
935
935
|
items: o.childrend,
|
|
936
936
|
showId: o.showId,
|
|
937
937
|
hideDelete: o.hideDelete
|
|
938
|
-
}, null, 8, ["items", "showId", "hideDelete"])) :
|
|
938
|
+
}, null, 8, ["items", "showId", "hideDelete"])) : m("", !0)
|
|
939
939
|
])
|
|
940
940
|
]))), 128))
|
|
941
941
|
]);
|
|
942
942
|
};
|
|
943
943
|
}
|
|
944
|
-
}),
|
|
944
|
+
}), Ft = {
|
|
945
945
|
key: 0,
|
|
946
946
|
class: "toast-container position-fixed bottom-0 start-50 translate-middle-x p-4 toast-zindex"
|
|
947
947
|
}, Mt = { class: "toast-header" }, Rt = { class: "me-auto" }, Et = { class: "text-body-secondary" }, Ht = ["onClick"], zt = ["innerHTML"], A = 500, Z = /* @__PURE__ */ w({
|
|
@@ -949,50 +949,50 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
949
949
|
props: {
|
|
950
950
|
defaultDisplayDuration: {}
|
|
951
951
|
},
|
|
952
|
-
setup(
|
|
953
|
-
const t =
|
|
952
|
+
setup(p, { expose: l }) {
|
|
953
|
+
const t = p, e = y([]);
|
|
954
954
|
return l({
|
|
955
955
|
addToast: (r) => {
|
|
956
|
-
r.displayDuration || (r.displayDuration = t.defaultDisplayDuration), r.id = /* @__PURE__ */ new Date(), e.value.filter(function(
|
|
957
|
-
return
|
|
956
|
+
r.displayDuration || (r.displayDuration = t.defaultDisplayDuration), r.id = /* @__PURE__ */ new Date(), e.value.filter(function(f) {
|
|
957
|
+
return f.id !== r.id;
|
|
958
958
|
}), e.value.push(r);
|
|
959
959
|
}
|
|
960
960
|
}), setInterval(() => {
|
|
961
961
|
e.value = e.value.map((r) => (r.displayDuration -= A, r)), e.value = e.value.filter((r) => r.displayDuration > 0);
|
|
962
|
-
}, A), (r,
|
|
963
|
-
(s(!0), a(_, null, $(e.value, (
|
|
964
|
-
key:
|
|
962
|
+
}, A), (r, f) => e.value.length > 0 ? (s(), a("div", Ft, [
|
|
963
|
+
(s(!0), a(_, null, $(e.value, (v) => (s(), a("div", {
|
|
964
|
+
key: v.message,
|
|
965
965
|
class: L(["toast d-block", {
|
|
966
|
-
"toast-info":
|
|
967
|
-
"toast-success":
|
|
968
|
-
"toast-warning":
|
|
969
|
-
"toast-error":
|
|
966
|
+
"toast-info": v.type === "info",
|
|
967
|
+
"toast-success": v.type === "success",
|
|
968
|
+
"toast-warning": v.type === "warning",
|
|
969
|
+
"toast-error": v.type === "error"
|
|
970
970
|
}]),
|
|
971
971
|
role: "alert",
|
|
972
972
|
"aria-live": "assertive",
|
|
973
973
|
"aria-atomic": "true"
|
|
974
974
|
}, [
|
|
975
975
|
d("div", Mt, [
|
|
976
|
-
d("strong", Rt, C(
|
|
977
|
-
d("small", Et, C(
|
|
976
|
+
d("strong", Rt, C(v.title), 1),
|
|
977
|
+
d("small", Et, C(v.id.toLocaleTimeString()), 1),
|
|
978
978
|
d("button", {
|
|
979
979
|
type: "button",
|
|
980
980
|
class: "btn-close",
|
|
981
981
|
"data-bs-dismiss": "toast",
|
|
982
982
|
"aria-label": "Close",
|
|
983
|
-
onClick: (
|
|
983
|
+
onClick: (g) => e.value = e.value.filter((i) => i.id !== v.id)
|
|
984
984
|
}, null, 8, Ht)
|
|
985
985
|
]),
|
|
986
986
|
d("div", {
|
|
987
987
|
class: "toast-body",
|
|
988
|
-
innerHTML:
|
|
988
|
+
innerHTML: v.message
|
|
989
989
|
}, null, 8, zt)
|
|
990
990
|
], 2))), 128))
|
|
991
|
-
])) :
|
|
991
|
+
])) : m("", !0);
|
|
992
992
|
}
|
|
993
|
-
}),
|
|
993
|
+
}), Nt = /* @__PURE__ */ w({
|
|
994
994
|
__name: "ToastWrapper",
|
|
995
|
-
setup(
|
|
995
|
+
setup(p) {
|
|
996
996
|
const l = y(), t = [
|
|
997
997
|
{
|
|
998
998
|
id: "toast-notification-message",
|
|
@@ -1029,36 +1029,36 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
1029
1029
|
defaultDisplayDuration: 5e3
|
|
1030
1030
|
}, null, 512));
|
|
1031
1031
|
}
|
|
1032
|
-
}),
|
|
1032
|
+
}), I = class I {
|
|
1033
1033
|
};
|
|
1034
|
-
|
|
1035
|
-
localStorage.setItem(l, JSON.stringify(
|
|
1036
|
-
}),
|
|
1034
|
+
x(I, "getId", (l, t) => `${l}_${t}`), x(I, "saveOptions", (l, t, e) => {
|
|
1035
|
+
localStorage.setItem(I.getId(l, t), JSON.stringify(e)), window.location.reload();
|
|
1036
|
+
}), x(I, "cleanOptions", (l, t) => {
|
|
1037
1037
|
for (let e = 0; e < localStorage.length; e++)
|
|
1038
|
-
localStorage.key(e).includes(l) && localStorage.key(e) !=
|
|
1039
|
-
}),
|
|
1040
|
-
|
|
1041
|
-
const
|
|
1042
|
-
if (localStorage.getItem(
|
|
1038
|
+
localStorage.key(e).includes(l) && localStorage.key(e) != I.getId(l, t) && localStorage.removeItem(localStorage.key(e));
|
|
1039
|
+
}), x(I, "loadOptions", (l, t, e, o, r) => {
|
|
1040
|
+
I.cleanOptions(l, t);
|
|
1041
|
+
const f = I.getId(l, t);
|
|
1042
|
+
if (localStorage.getItem(f))
|
|
1043
1043
|
try {
|
|
1044
|
-
|
|
1045
|
-
(
|
|
1044
|
+
r.value = JSON.parse(localStorage.getItem(f)), r.value.forEach(
|
|
1045
|
+
(v) => o.columns.find((g) => g.property == v.property).visible = v.checked
|
|
1046
1046
|
);
|
|
1047
1047
|
} catch {
|
|
1048
|
-
localStorage.removeItem(
|
|
1048
|
+
localStorage.removeItem(f), I.loadOptions(l, t, e, o, r);
|
|
1049
1049
|
}
|
|
1050
1050
|
else
|
|
1051
|
-
|
|
1052
|
-
label:
|
|
1053
|
-
property:
|
|
1054
|
-
checked:
|
|
1051
|
+
e || (e = []), r.value = o.columns.map((v) => (v.visible = e.indexOf(v.property) == -1, {
|
|
1052
|
+
label: v.label,
|
|
1053
|
+
property: v.property,
|
|
1054
|
+
checked: v.visible
|
|
1055
1055
|
}));
|
|
1056
1056
|
});
|
|
1057
|
-
let J =
|
|
1058
|
-
const
|
|
1057
|
+
let J = I;
|
|
1058
|
+
const Ot = {
|
|
1059
1059
|
CheckBox: V,
|
|
1060
1060
|
CheckBoxList: ue,
|
|
1061
|
-
DropDown:
|
|
1061
|
+
DropDown: O,
|
|
1062
1062
|
DropDownMenu: G,
|
|
1063
1063
|
DropDownCallBack: U,
|
|
1064
1064
|
FilterCompact: q,
|
|
@@ -1070,20 +1070,20 @@ const Nt = {
|
|
|
1070
1070
|
SpinningProgress: Ue,
|
|
1071
1071
|
TableToList: bt,
|
|
1072
1072
|
TableToListOptions: wt,
|
|
1073
|
-
TextListBox:
|
|
1073
|
+
TextListBox: xt,
|
|
1074
1074
|
ToastComponent: Z,
|
|
1075
|
-
ToastWrapper:
|
|
1075
|
+
ToastWrapper: Nt
|
|
1076
1076
|
}, Jt = {
|
|
1077
|
-
install(
|
|
1078
|
-
Object.entries(
|
|
1079
|
-
|
|
1077
|
+
install(p) {
|
|
1078
|
+
Object.entries(Ot).forEach(([l, t]) => {
|
|
1079
|
+
p.component(l, t);
|
|
1080
1080
|
});
|
|
1081
1081
|
}
|
|
1082
1082
|
};
|
|
1083
1083
|
export {
|
|
1084
1084
|
V as CheckBox,
|
|
1085
1085
|
ue as CheckBoxList,
|
|
1086
|
-
|
|
1086
|
+
O as DropDown,
|
|
1087
1087
|
U as DropDownCallBack,
|
|
1088
1088
|
G as DropDownMenu,
|
|
1089
1089
|
q as FilterCompact,
|
|
@@ -1099,8 +1099,8 @@ export {
|
|
|
1099
1099
|
J as TabelToListOptionsPersister,
|
|
1100
1100
|
bt as TableToList,
|
|
1101
1101
|
wt as TableToListOptions,
|
|
1102
|
-
|
|
1102
|
+
xt as TextListBox,
|
|
1103
1103
|
Z as ToastComponent,
|
|
1104
|
-
|
|
1104
|
+
Nt as ToastWrapper,
|
|
1105
1105
|
Jt as default
|
|
1106
1106
|
};
|
|
@@ -3,7 +3,7 @@ import { TableToListConfig } from '../components/TableToList.vue';
|
|
|
3
3
|
import { TableToListColumnOptions } from '../components/TableToListOptions.vue';
|
|
4
4
|
export declare class TabelToListOptionsPersister {
|
|
5
5
|
static getId: (base: string, version: string) => string;
|
|
6
|
-
static saveOptions: (base: string, ttlcos: TableToListColumnOptions[]) => void;
|
|
6
|
+
static saveOptions: (base: string, version: string, ttlcos: TableToListColumnOptions[]) => void;
|
|
7
7
|
static cleanOptions: (base: string, version: string) => void;
|
|
8
|
-
static loadOptions: (base: string, version: string, t2lconfig: TableToListConfig, options: Ref<TableToListColumnOptions[] | null>) => void;
|
|
8
|
+
static loadOptions: (base: string, version: string, defaultOff: string[] | null, t2lconfig: TableToListConfig, options: Ref<TableToListColumnOptions[] | null>) => void;
|
|
9
9
|
}
|