admins-components 1.2.16 → 1.2.17
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=(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,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)=>{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;
|
|
@@ -63,7 +63,7 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
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"], N = /* @__PURE__ */ w({
|
|
67
67
|
__name: "DropDown",
|
|
68
68
|
props: {
|
|
69
69
|
id: {},
|
|
@@ -84,48 +84,48 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
84
84
|
}), H(
|
|
85
85
|
() => t.selected,
|
|
86
86
|
() => {
|
|
87
|
-
|
|
87
|
+
m();
|
|
88
88
|
}
|
|
89
89
|
), H(
|
|
90
90
|
() => t.label,
|
|
91
91
|
() => {
|
|
92
|
-
|
|
92
|
+
m();
|
|
93
93
|
}
|
|
94
94
|
);
|
|
95
95
|
const e = l, o = (h) => {
|
|
96
96
|
t.storeselected || (p.value = h.label), e("selected", h);
|
|
97
|
-
}, r = "törlés", p = y(""),
|
|
97
|
+
}, r = "törlés", p = y(""), m = () => {
|
|
98
98
|
if (t.options.value) {
|
|
99
99
|
const h = t.options.value.find((k) => k.id == t.selected);
|
|
100
100
|
h ? p.value = h.label : (i(""), p.value = t.label);
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
103
|
M(() => {
|
|
104
|
-
t.label && (p.value = t.label),
|
|
105
|
-
|
|
104
|
+
t.label && (p.value = t.label), m(), 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,14 +137,14 @@ 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
143
|
d("div", ve, C(p.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
|
}, [
|
|
@@ -175,12 +175,12 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
175
175
|
class: L([T.icon, "dd-item__icon"])
|
|
176
176
|
}, null, 2)) : f("", !0),
|
|
177
177
|
O(C(T.label), 1)
|
|
178
|
-
], 8,
|
|
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: {},
|
|
@@ -209,9 +209,9 @@ 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 = p.value.offsetHeight;
|
|
213
213
|
}, 20);
|
|
214
|
-
}, p = y(null),
|
|
214
|
+
}, p = y(null), m = 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
|
|
@@ -233,9 +233,9 @@ 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: m
|
|
239
239
|
}, [
|
|
240
240
|
e.value != l.default ? (s(), a("button", {
|
|
241
241
|
key: 0,
|
|
@@ -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,
|
|
@@ -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), p = y(null),
|
|
294
|
-
return (
|
|
291
|
+
const g = r.value, i = p.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), p = y(null), m = 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,10 +302,10 @@ 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)) : f("", !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
|
])) : f("", !0)
|
|
311
311
|
], 512),
|
|
@@ -314,12 +314,12 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
314
314
|
class: "ddm-menu",
|
|
315
315
|
ref_key: "DropDownMenu",
|
|
316
316
|
ref: p,
|
|
317
|
-
style: j({ "margin-top":
|
|
317
|
+
style: j({ "margin-top": m.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)
|
|
@@ -352,7 +352,7 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
352
352
|
});
|
|
353
353
|
p.value = c;
|
|
354
354
|
});
|
|
355
|
-
const
|
|
355
|
+
const m = y({}), g = y(void 0), i = y(0);
|
|
356
356
|
return (c, n) => (s(), a("div", Se, [
|
|
357
357
|
p.value ? (s(), B(G, {
|
|
358
358
|
key: 0,
|
|
@@ -382,7 +382,7 @@ const ne = { class: "form-check" }, se = ["checked", "id"], ie = ["for"], V = /*
|
|
|
382
382
|
class: "form-control",
|
|
383
383
|
value: o.value.defFrom ?? "",
|
|
384
384
|
onInput: n[1] || (n[1] = (u) => {
|
|
385
|
-
|
|
385
|
+
m.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, m.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
|
+
m.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, m.value);
|
|
395
395
|
})
|
|
396
396
|
}, null, 40, Re)
|
|
397
397
|
])) : f("", !0),
|
|
398
398
|
o.value.type == "dropdown" ? (s(), B(N, {
|
|
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) => {
|
|
@@ -504,7 +504,7 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
504
504
|
() => `${t.icon} ${t.big ? "ib-button-big" : ""}`
|
|
505
505
|
), o = l;
|
|
506
506
|
return (r, p) => (s(), a("div", {
|
|
507
|
-
onClick: p[0] || (p[0] = (
|
|
507
|
+
onClick: p[0] || (p[0] = (m) => o("click")),
|
|
508
508
|
class: "ib-container"
|
|
509
509
|
}, [
|
|
510
510
|
d("div", {
|
|
@@ -537,15 +537,15 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
537
537
|
);
|
|
538
538
|
const p = x(
|
|
539
539
|
() => Math.floor(t.settings.value.total / t.settings.value.pagesize) + 1
|
|
540
|
-
),
|
|
540
|
+
), m = () => {
|
|
541
541
|
r.value > 1 && (r.value -= 1, e("page", r.value));
|
|
542
|
-
},
|
|
542
|
+
}, g = () => {
|
|
543
543
|
r.value < p.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: m
|
|
549
549
|
}, "<"),
|
|
550
550
|
d("input", {
|
|
551
551
|
class: "form-control pc-input",
|
|
@@ -558,7 +558,7 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
558
558
|
O("/" + C(p.value) + " ", 1),
|
|
559
559
|
d("button", {
|
|
560
560
|
class: "btn btn-outline-secondary",
|
|
561
|
-
onClick:
|
|
561
|
+
onClick: g
|
|
562
562
|
}, ">"),
|
|
563
563
|
z(N, {
|
|
564
564
|
opentop: !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({
|
|
@@ -677,7 +677,7 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
677
677
|
), r = x(() => Math.ceil(t.value.length / l.config.smColCount)), p = (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
|
+
}, m = (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) => {
|
|
@@ -697,7 +697,7 @@ 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
702
|
}, null, 8, ["icon", "onClick", "active"])) : f("", !0),
|
|
703
703
|
O(" " + C(n.label), 1)
|
|
@@ -734,7 +734,7 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
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: m(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", {
|
|
@@ -803,12 +803,12 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
803
803
|
p(D, b) ? (s(), a("div", vt, [
|
|
804
804
|
d("span", ft, C(p(D, b).label), 1),
|
|
805
805
|
d("div", {
|
|
806
|
-
innerHTML:
|
|
807
|
-
}, null, 8,
|
|
806
|
+
innerHTML: m(p(D, b), n)
|
|
807
|
+
}, null, 8, gt)
|
|
808
808
|
])) : f("", !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,
|
|
@@ -850,20 +850,20 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
850
850
|
var b = t.options[(n - 1) * o.value + u - 1];
|
|
851
851
|
return b;
|
|
852
852
|
}, p = () => {
|
|
853
|
-
|
|
854
|
-
},
|
|
853
|
+
m("save", e.value);
|
|
854
|
+
}, m = 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 ? f("", !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,7 +878,7 @@ 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
884
|
}, null, 8, ["id", "label", "checked"])) : f("", !0)
|
|
@@ -960,32 +960,32 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
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
962
|
}, A), (r, p) => e.value.length > 0 ? (s(), a("div", xt, [
|
|
963
|
-
(s(!0), a(_, null, $(e.value, (
|
|
964
|
-
key:
|
|
963
|
+
(s(!0), a(_, null, $(e.value, (m) => (s(), a("div", {
|
|
964
|
+
key: m.message,
|
|
965
965
|
class: L(["toast d-block", {
|
|
966
|
-
"toast-info":
|
|
967
|
-
"toast-success":
|
|
968
|
-
"toast-warning":
|
|
969
|
-
"toast-error":
|
|
966
|
+
"toast-info": m.type === "info",
|
|
967
|
+
"toast-success": m.type === "success",
|
|
968
|
+
"toast-warning": m.type === "warning",
|
|
969
|
+
"toast-error": m.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(m.title), 1),
|
|
977
|
+
d("small", Et, C(m.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 !== m.id)
|
|
984
984
|
}, null, 8, Ht)
|
|
985
985
|
]),
|
|
986
986
|
d("div", {
|
|
987
987
|
class: "toast-body",
|
|
988
|
-
innerHTML:
|
|
988
|
+
innerHTML: m.message
|
|
989
989
|
}, null, 8, zt)
|
|
990
990
|
], 2))), 128))
|
|
991
991
|
])) : f("", !0);
|
|
@@ -1029,23 +1029,23 @@ const E = y({}), Q = /* @__PURE__ */ w({
|
|
|
1029
1029
|
defaultDisplayDuration: 5e3
|
|
1030
1030
|
}, null, 512));
|
|
1031
1031
|
}
|
|
1032
|
-
}),
|
|
1032
|
+
}), I = class I {
|
|
1033
1033
|
};
|
|
1034
|
-
F(
|
|
1035
|
-
localStorage.setItem(l, JSON.stringify(
|
|
1036
|
-
}), F(
|
|
1034
|
+
F(I, "getId", (l, t) => `${l}_${t}`), F(I, "saveOptions", (l, t, e) => {
|
|
1035
|
+
localStorage.setItem(I.getId(l, t), JSON.stringify(e)), window.location.reload();
|
|
1036
|
+
}), F(I, "cleanOptions", (l, t) => {
|
|
1037
1037
|
for (let e = 0; e < localStorage.length; e++)
|
|
1038
|
-
localStorage.key(e).includes(l) && localStorage.key(e) !=
|
|
1039
|
-
}), F(
|
|
1040
|
-
|
|
1041
|
-
const r =
|
|
1038
|
+
localStorage.key(e).includes(l) && localStorage.key(e) != I.getId(l, t) && localStorage.removeItem(localStorage.key(e));
|
|
1039
|
+
}), F(I, "loadOptions", (l, t, e, o) => {
|
|
1040
|
+
I.cleanOptions(l, t);
|
|
1041
|
+
const r = I.getId(l, t);
|
|
1042
1042
|
if (localStorage.getItem(r))
|
|
1043
1043
|
try {
|
|
1044
1044
|
o.value = JSON.parse(localStorage.getItem(r)), o.value.forEach(
|
|
1045
|
-
(p) => e.columns.find((
|
|
1045
|
+
(p) => e.columns.find((m) => m.property == p.property).visible = p.checked
|
|
1046
1046
|
);
|
|
1047
1047
|
} catch {
|
|
1048
|
-
localStorage.removeItem(r),
|
|
1048
|
+
localStorage.removeItem(r), I.loadOptions(l, r, e, o);
|
|
1049
1049
|
}
|
|
1050
1050
|
else
|
|
1051
1051
|
o.value = e.columns.map((p) => (p.visible = !0, {
|
|
@@ -1054,7 +1054,7 @@ F(S, "getId", (l, t) => `${l}_${t}`), F(S, "saveOptions", (l, t) => {
|
|
|
1054
1054
|
checked: p.visible
|
|
1055
1055
|
}));
|
|
1056
1056
|
});
|
|
1057
|
-
let J =
|
|
1057
|
+
let J = I;
|
|
1058
1058
|
const Nt = {
|
|
1059
1059
|
CheckBox: V,
|
|
1060
1060
|
CheckBoxList: ue,
|
|
@@ -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
8
|
static loadOptions: (base: string, version: string, t2lconfig: TableToListConfig, options: Ref<TableToListColumnOptions[] | null>) => void;
|
|
9
9
|
}
|