@dcodegroup-au/dsg-vue 0.0.28 → 0.0.29

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.
@@ -303,6 +303,7 @@ declare const __VLS_component: import('vue').DefineComponent<DsgTableProps, {
303
303
  "dsg-table:action-edit": (ev: Event, rowData: Record<string, any>) => any;
304
304
  "dsg-table:action-view": (ev: Event, rowData: Record<string, any>) => any;
305
305
  "dsg-table:action-delete": (ev: Event, rowData: Record<string, any>) => any;
306
+ "dsg-table:action-archive": (ev: Event, rowData: Record<string, any>) => any;
306
307
  "dsg-table:link-clicked": (ev: Event, actionId: string | number, rowData: Record<string, any>) => any;
307
308
  "dsg-table:term-changed": (term: string | null) => any;
308
309
  "dsg-table:filter-updated": (params: any, payload: any, activeFacet: DsgTableSearchFacet | null | undefined) => any;
@@ -311,6 +312,7 @@ declare const __VLS_component: import('vue').DefineComponent<DsgTableProps, {
311
312
  "onDsg-table:action-edit"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
312
313
  "onDsg-table:action-view"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
313
314
  "onDsg-table:action-delete"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
315
+ "onDsg-table:action-archive"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
314
316
  "onDsg-table:link-clicked"?: ((ev: Event, actionId: string | number, rowData: Record<string, any>) => any) | undefined;
315
317
  "onDsg-table:term-changed"?: ((term: string | null) => any) | undefined;
316
318
  "onDsg-table:filter-updated"?: ((params: any, payload: any, activeFacet: DsgTableSearchFacet | null | undefined) => any) | undefined;
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),B=require("./DsgTablePerPage.vue_vue_type_style_index_0_lang-BaEuuE3O.cjs"),U=require("./dsg-vue.helpers-string.cjs"),A=require("./dsg-vue.helpers-object.cjs"),ge={class:"dsg-table--pagination"},me=["disabled"],fe=["disabled"],ve=["onClick","innerHTML"],pe=["onClick","innerHTML"],be=["disabled"],ke=["disabled"],K=e.defineComponent({__name:"DsgTablePagination",props:e.mergeModels({onEachSide:{default:3},firstPage:{default:1},showFirstLast:{type:Boolean,default:!0},firstIcon:{default:"chevron-left-double"},lastIcon:{default:"chevron-right-double"},prevIcon:{default:"chevron-left"},nextIcon:{default:"chevron-right"}},{pagination:{default:null},paginationModifiers:{}}),emits:e.mergeModels(["dsg-table:change-page"],["update:pagination"]),setup(a,{expose:h,emit:g}){const s=e.useModel(a,"pagination"),f=e.computed(()=>s.value===null?0:s.value?.last_page-a.firstPage+1),m=e.computed(()=>s.value===null?0:s.value?.last_page),p=e.computed(()=>s.value===null?!1:s.value?.current_page===a.firstPage),v=e.computed(()=>s.value===null?!1:s.value?.current_page===m.value),S=e.computed(()=>f.value<a.onEachSide*2+4),N=e.computed(()=>a.onEachSide*2+1),r=e.computed(()=>!s.value||s.value?.current_page<=a.onEachSide?1:s.value?.current_page>=f.value-a.onEachSide?f.value-a.onEachSide*2:s.value?.current_page-a.onEachSide),b=g,o=d=>{b("dsg-table:change-page",d)},i=d=>d===s.value?.current_page;return h({loadPage:o}),(d,C)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",ge,[d.showFirstLast?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:C[0]||(C[0]=$=>o(d.firstPage)),class:e.normalizeClass([[p.value?"disabled":""],"dsg-table--pagination-link"]),disabled:p.value,title:"First","aria-label":"First"},[e.createVNode(B._sfc_main,{icon:d.firstIcon,size:"sm"},null,8,["icon"])],10,me)):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:C[1]||(C[1]=$=>o("prev")),class:e.normalizeClass([[p.value?"disabled":""],"dsg-table--pagination-link"]),disabled:p.value,title:"Previous","aria-label":"Previous"},[e.createVNode(B._sfc_main,{icon:d.prevIcon,size:"sm"},null,8,["icon"])],10,fe),S.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(f.value,($,y)=>(e.openBlock(),e.createElementBlock("a",{key:y,onClick:T=>o(y+d.firstPage),class:e.normalizeClass([[i(y+d.firstPage)?"active":""],"dsg-table--pagination-link"]),innerHTML:$},null,10,ve))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(N.value,($,y)=>(e.openBlock(),e.createElementBlock("a",{key:y,onClick:T=>o(r.value+y+d.firstPage-1),class:e.normalizeClass([[i(r.value+y+d.firstPage-1)?"active":""],"dsg-table--pagination-link"]),innerHTML:r.value+$-1},null,10,pe))),128)),e.createElementVNode("a",{onClick:C[2]||(C[2]=$=>o("next")),class:e.normalizeClass([[v.value?"disabled":""],"dsg-table--pagination-link"]),disabled:v.value,title:"Next","aria-label":"Next"},[e.createVNode(B._sfc_main,{icon:d.nextIcon,size:"sm"},null,8,["icon"])],10,be),d.showFirstLast?(e.openBlock(),e.createElementBlock("a",{key:3,onClick:C[3]||(C[3]=$=>o(m.value)),class:e.normalizeClass([[v.value?"disabled":""],"dsg-table--pagination-link"]),disabled:v.value,title:"Last","aria-label":"Last"},[e.createVNode(B._sfc_main,{icon:d.lastIcon,size:"sm"},null,8,["icon"])],10,ke)):e.createCommentVNode("",!0)],512)),[[e.vShow,s.value&&m.value>d.firstPage]])}}),he=["innerHTML"],Q=e.defineComponent({__name:"DsgTablePaginationInfo",props:e.mergeModels({infoTemplate:{default:"Displaying {from} to {to} of {total} items"},noDataTemplate:{default:"No relevant data"}},{pagination:{default:null},paginationModifiers:{}}),emits:["update:pagination"],setup(a){const h=e.useModel(a,"pagination"),g=e.computed(()=>h.value==null||h.value.total==0?a.noDataTemplate:a.infoTemplate.replace("{from}",(h.value?.from||0).toString()).replace("{to}",(h.value?.to||0).toString()).replace("{total}",(h.value?.total||0).toString()));return(s,f)=>(e.openBlock(),e.createElementBlock("div",{class:"dsg-table--pagination-info",innerHTML:g.value},null,8,he))}}),ye={class:"dsg-table--actions",ref:"dsgTableActions"},Be={class:"dsg-table--action-trigger"},Ce={key:0,class:"dsg-table--actions-menu-wrapper"},we=["href","target","onClick"],Pe=["textContent"],Ee={key:0},Se={key:1},De=["href","target","onClick"],$e={class:"flex-1"},Y=e.defineComponent({__name:"DsgTableActions",props:{placement:{default:"auto"}},emits:["dsg-table:action-edit","dsg-table:action-view","dsg-table:action-delete","dsg-table:action-archive","dsg-table:link-clicked"],setup(a,{emit:h}){const g=e.ref(!1);e.useTemplateRef("dsgTableActions");const s=e.useAttrs(),f=e.ref(s.data.rowData?.actions??null),m=e.ref(s.data.rowData?.links??null),p=e.ref(s.data.rowData??null),v=b=>{switch(b){case"edit":return"edit-05";case"view":return"eye";case"delete":return"trash-01";case"archive":return"eye-off";default:return"dots-horizontal"}},S=(b,o,i)=>{switch(o){case"edit":r("dsg-table:action-edit",i,p.value);break;case"view":r("dsg-table:action-view",i,p.value);break;case"delete":r("dsg-table:action-delete",i,p.value);break;case"archive":r("dsg-table:action-archive",i,p.value);break}},N=(b,o)=>{const i=b.actionId||b.label.trim().toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-");r("dsg-table:link-clicked",o,i,p.value)},r=h;return(b,o)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",ye,[e.createVNode(e.unref(B.kt),{triggers:[],placement:b.placement,"handle-resize":!0,strategy:"absolute",shown:g.value,class:"dsg-table--actions__popper",onHide:o[1]||(o[1]=i=>g.value=!1),ref:"floatingVueFilterDropdown"},{popper:e.withCtx(()=>[g.value?(e.openBlock(),e.createElementBlock("div",Ce,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(i,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[["edit","view","delete","archive"].includes(String(d))?(e.openBlock(),e.createElementBlock("a",{key:d,href:f.value?.link,target:f.value?.target||"_self",onClick:C=>S(i,String(d),C)},[e.createElementVNode("div",{class:e.normalizeClass(["dsg-table--actions-menu-item",String(d)])},[e.createVNode(B._sfc_main,{icon:v(String(d)),size:"sm"},null,8,["icon"]),e.createElementVNode("span",{class:"flex-1",textContent:e.toDisplayString(e.unref(U.ucfirst)(String(d)))},null,8,Pe)],2)],8,we)):e.createCommentVNode("",!0)],64))),256)),f.value&&m.value?(e.openBlock(),e.createElementBlock("hr",Ee)):e.createCommentVNode("",!0),m.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(m.value,i=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:i.label},[i.hasOwnProperty("component")?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.component),{key:0,quote:e.unref(s).data.data.rowData,"row-data":e.unref(s).data.data.rowData},null,8,["quote","row-data"])):i.hasOwnProperty("type")&&i.type=="break"?(e.openBlock(),e.createElementBlock("hr",Se)):(e.openBlock(),e.createElementBlock("a",{key:2,href:i.link,target:i.target||"_self",class:e.normalizeClass(["dsg-table--actions-menu-item",i.class]),onClick:d=>N(i,d)},[i.icon?(e.openBlock(),e.createBlock(B._sfc_main,{key:0,icon:i.icon,size:"sm"},null,8,["icon"])):e.createCommentVNode("",!0),e.createElementVNode("span",$e,e.toDisplayString(i.label),1)],10,De))],64))),128)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createElementVNode("div",Be,[e.createElementVNode("button",{type:"button",class:"dsg-table--actions-button","aria-expanded":"false","aria-haspopup":"true",onClick:o[0]||(o[0]=i=>g.value=!g.value)},[e.renderSlot(b.$slots,"dsg-table-action-button-content",{},()=>[e.createVNode(B._sfc_main,{icon:"dots-vertical",size:"sm"})])])])]),_:3},8,["placement","shown"])])),[[e.unref(B.vOnClickOutside),()=>g.value=!1]])}}),Ve={class:"dsg-table--search"},G=e.defineComponent({__name:"DsgTableSearch",props:{name:{},id:{},placeholder:{default:"Search"},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1},extraClasses:{},eventName:{}},emits:["dsg-table:term-changed"],setup(a,{emit:h}){const g=e.ref(""),s=h,f=B.useDebounceFn(m=>{g.value=m,s("dsg-table:term-changed",g.value)},300);return(m,p)=>(e.openBlock(),e.createElementBlock("div",Ve,[e.createVNode(B._sfc_main$5,{value:g.value,"onUpdate:value":p[0]||(p[0]=v=>g.value=v),name:m.name,id:m.id||m.name,placeholder:m.placeholder,disabled:m.disabled,required:m.required,readonly:m.readonly,hidden:m.hidden,"has-clear-button":!0,autocomplete:"off",size:"sm",icon:"search-sm","icon-clickable":!0,onIconClicked:p[1]||(p[1]=v=>e.unref(f)(v)),onEnterPressed:p[2]||(p[2]=v=>e.unref(f)(v)),onOnClear:p[3]||(p[3]=()=>e.unref(f)(""))},null,8,["value","name","id","placeholder","disabled","required","readonly","hidden"])]))}}),Ne={class:"dsg-table--header-row"},Te={key:0,class:"dsg-table--th dsg-table--th-checkbox",scope:"col"},Fe={key:1,class:"dsg-table--th dsg-table--th-expand-detail",scope:"col"},Me=["title","id","onClick"],Le={key:0,class:"dsg-table--th-sort-icon"},ze=["innerHTML"],Re=["innerHTML"],J=e.defineComponent({__name:"DsgTableRowHeader",props:e.mergeModels({fields:{},scrollVisible:{type:Boolean},hasSelectAll:{type:Boolean,default:!1},showExpandDetail:{type:Boolean,default:!0},tableDataLength:{default:0}},{sortField:{default:null},sortFieldModifiers:{},selectedRows:{default:[]},selectedRowsModifiers:{},hasSelected:{type:Boolean,default:!1},hasSelectedModifiers:{}}),emits:e.mergeModels(["dsg-table:sort-field","dsg-table:on-select-all","dsg-table:on-deselect-all"],["update:sortField","update:selectedRows","update:hasSelected"]),setup(a,{emit:h}){const g=e.useModel(a,"sortField"),s=e.useModel(a,"selectedRows"),f=e.useModel(a,"hasSelected"),m=e.ref("17px"),p=r=>{f.value&&s.value.length>0&&s.value.length!==a.tableDataLength?(f.value=!0,v("dsg-table:on-select-all")):!f.value&&s.value.length===0?(f.value=!1,v("dsg-table:on-select-all")):v("dsg-table:on-deselect-all")},v=h,S=(r,b)=>[r,r+"-"+U.toSnakeCase(String(b?.name)),b.titleClass||"",{sortable:b.sortable},{"sort-active":g.value?.name===b.name}],N=r=>{r.sortable&&(g.value={name:String(r?.name),field:String(r?.sortField),direction:g.value?.name===r.name&&g.value?.direction==="asc"?"desc":"asc"},v("dsg-table:sort-field",r))};return(r,b)=>(e.openBlock(),e.createElementBlock("tr",Ne,[r.hasSelectAll?(e.openBlock(),e.createElementBlock("th",Te,[e.createVNode(B._sfc_main$2,{modelValue:f.value,"onUpdate:modelValue":[b[0]||(b[0]=o=>f.value=o),p],indeterminate:s.value.length>0&&s.value.length!==r.tableDataLength},null,8,["modelValue","indeterminate"])])):e.createCommentVNode("",!0),r.showExpandDetail?(e.openBlock(),e.createElementBlock("th",Fe)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.fields,(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o?.visible?(e.openBlock(),e.createElementBlock("th",{key:i,class:e.normalizeClass(S("dsg-table--th",o)),style:e.normalizeStyle([{width:o.width||void 0},o.style]),title:o.title+(o.sortable?" Sort":""),id:"_"+o.name,onClick:d=>N(o),scope:"col"},[o.sortable?(e.openBlock(),e.createElementBlock("div",Le,[o.title?(e.openBlock(),e.createElementBlock("span",{key:0,class:"dsg-table--th-title",innerHTML:o.title},null,8,ze)):e.createCommentVNode("",!0),o.sortable&&g.value?.name!==o.name?(e.openBlock(),e.createBlock(B._sfc_main,{key:1,icon:"chevron-selector-vertical",class:"inline-flex",size:"xs"})):e.createCommentVNode("",!0),o.sortable&&g.value?.name===o.name&&g.value?.direction==="asc"?(e.openBlock(),e.createBlock(B._sfc_main,{key:2,icon:"chevron-down",class:"inline-flex",size:"xs"})):e.createCommentVNode("",!0),o.sortable&&g.value?.name===o.name&&g.value?.direction==="desc"?(e.openBlock(),e.createBlock(B._sfc_main,{key:3,icon:"chevron-up",class:"inline-flex",size:"xs"})):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("span",{key:1,class:"dsg-table--th-title",innerHTML:e.unref(U.ucwords)(String(o?.title))},null,8,Re))],14,Me)):e.createCommentVNode("",!0)],64))),256)),r.scrollVisible?(e.openBlock(),e.createElementBlock("th",{key:2,style:e.normalizeStyle({width:m.value}),class:"dsg-table--th-col-gutter"},null,4)):e.createCommentVNode("",!0)]))}}),He={class:"dsg-table--wrapper"},Ie=["span"],Oe={key:0,class:"dsg-table--loading"},Ae=["colspan"],Ue=["colspan"],qe=["onClick","onDblclick","onMouseover"],We={key:0,class:"dsg-table--tbody-cell dsg-table--tbody-cell-checkbox"},xe=["onClick","onDblclick","onContextmenu"],je=["innerHTML"],Ke=["onClick"],Qe=["colspan"],Ye={key:2},Ge=["colspan"],Je={class:"dsg-table--footer"},Xe=e.defineComponent({__name:"DsgTableComponent",props:e.mergeModels({fields:{default:()=>[]},isDraggable:{type:Boolean,default:!1},dragApi:{default:""},loadOnStart:{type:Boolean,default:!0},apiUrl:{default:""},httpMethod:{default:"get"},reactiveApiUrl:{type:Boolean,default:!0},apiMode:{type:Boolean,default:!0},data:{default:null},dataManager:{type:[Function,null],default:null},dataPath:{default:"data"},tableLayout:{default:"fixed"},paginationPath:{default:"links.pagination"},queryParams:{default:()=>({sort:"sort",order:"order",page:"page",perPage:"per_page"})},httpOptions:{default:()=>({})},hasDetailRow:{type:Boolean,default:!1},showExpandDetail:{type:Boolean,default:!0},initialPage:{default:1},firstPage:{default:1},sortOrder:{default:()=>[]},multiSort:{type:Boolean},tableHeight:{default:null},multiSortKey:{},rowClass:{type:[String,Function],default:""},detailRowComponent:{},detailRowTransition:{default:"fade"},detailRowClass:{type:[String,Function]},detailRowOptions:{default:()=>({})},trackBy:{default:"id"},css:{default:()=>({tableWrapper:"dsg-table-wrapper",thead:"dsg-table-thead",tbody:"dsg-table-tbody",table:"dsg-table-component"})},minRows:{default:0},noDataTemplate:{default:"No Data Available"},showSortIcons:{type:Boolean},headerRows:{},transform:{type:[Function,null],default:null},sortParams:{type:[Function,null],default:null},fieldPrefix:{},eventPrefix:{},selectable:{type:Boolean,default:!1}},{filterParams:{default:{}},filterParamsModifiers:{},perPage:{default:20},perPageModifiers:{}}),emits:e.mergeModels(["dsg-table:loading","dsg-table:loaded","dsg-table:load-success","dsg-table:load-error","dsg-table:pagination-data","dsg-table:rows-selected"],["update:filterParams","update:perPage"]),setup(a,{expose:h,emit:g}){const s=t=>t.map((n,u)=>({field:n.field||"",title:n.title||"",name:n.name||"",titleClass:n.titleClass||"",dataClass:n.dataClass||"",visible:n.visible!==!1,width:n.width||void 0,sortField:n.sortField||null,sortable:n.sortField,formatter:n.formatter||null,$_index:u})),f=e.ref(s(a.fields)),m=e.ref(a.data),p=e.ref(null),v=e.ref(a.initialPage),S=e.ref("17px"),N=e.ref(!1),r=e.ref({}),b=e.ref(0),o=e.ref(!0),i=e.ref(null),d=e.ref(null),C=e.useModel(a,"filterParams"),$=e.useModel(a,"perPage"),y=e.ref([]),T=e.ref(!1),F=e.computed(()=>a.tableHeight!=null),M=e.computed(()=>f.value.filter(t=>t.visible).length);e.watch(()=>y.value.length,t=>{T.value=a.selectable&&t>0},{immediate:!0}),e.watch(()=>a.fields,t=>{f.value=s(t)},{immediate:!0}),e.watch(()=>C.value,()=>{z()},{deep:!0}),e.watch(()=>$.value,()=>{z()});const V=g,R=(t,n)=>t.formatter&&typeof t.formatter=="function"?t.formatter(t,n):A.data_get(n,String(t?.name),""),H=t=>"dsg-field--"+t.name?.toLowerCase().replaceAll(/[_ ]/g,"-"),l=t=>{if(a.selectable){if(t.selected)y.value.push(t);else{const n=y.value.findIndex(u=>u[a.trackBy]===t[a.trackBy]);n!==-1&&y.value.splice(n,1)}V("dsg-table:rows-selected",y.value)}},c=()=>{a.selectable&&(m.value?.forEach(t=>{t.selected=!0}),y.value=m.value?.filter(t=>t.selected)??[],V("dsg-table:rows-selected",y.value))},k=()=>{a.selectable&&(m.value?.forEach(t=>{t.selected=!1}),y.value=[],V("dsg-table:rows-selected",y.value))},w=t=>{t==="prev"?v.value>a.firstPage&&v.value--:t==="next"?v.value<(p.value?.last_page??0)&&v.value++:t!=v.value&&t>=a.firstPage&&t<=(p.value?.last_page??0)&&(v.value=t),z()},D=()=>({[a.queryParams?.sort]:i.value?(i.value?.direction==="desc"?"-":"")+i.value?.field:void 0,[a.queryParams?.order]:i.value?.direction,[a.queryParams?.page]:v.value,[a.queryParams?.perPage]:$.value}),L=()=>{d.value&&(d.value.abort(),d.value=null)},I=async(t,n)=>{L();const u=new AbortController;if(n.signal=u.signal,d.value=u,a.httpMethod.toLowerCase()==="get")return await B.axios.get(t,n);{const E=n.params;return delete n.params,await B.axios.post(t,E,n)}},q=t=>{V("dsg-table:load-success",t);const n=a.transform?a.transform(t.data):t.data;m.value=A.data_get(n,a.dataPath,null),a.selectable&&m.value?.forEach(u=>{u.selected=u.selected??!1}),p.value=A.data_get(n,a.paginationPath,null)??null,b.value=m.value?.length?m.value[0].order:b,p.value===null&&console.warn('DsgTable: pagination-path "'+a.paginationPath+`" not found. It looks like the data returned from the server does not have pagination information or you may have set it incorrectly.
2
- You can explicitly suppress this warning by setting pagination-path="".`),V("dsg-table:pagination-data",p.value),V("dsg-table:loaded"),o.value=!1},W=t=>{console.error("load-error",t),V("dsg-table:load-error",t),V("dsg-table:loaded"),o.value=!1},z=(t=q,n=W,u={})=>{const E=t||q,P=n||W;if(a.apiMode)return o.value=!0,V("dsg-table:loading",o.value),a.httpOptions.params={...D(),...C.value},I(a.apiUrl,a.httpOptions).then(E).catch(O=>P(O))},ne=(t,n,u)=>{},se=(t,n,u)=>{},re=(t,n,u)=>{},ie=(t,n,u,E)=>{},de=(t,n,u,E)=>{},ce=(t,n,u,E)=>{},ue=(t,n,u)=>{};e.onMounted(()=>{a.apiMode===!0&&z()});const x=()=>{a.apiMode&&(v.value=a.initialPage,y.value=[],L(),z())};return h({changePage:w,reload:x}),(t,n)=>(e.openBlock(),e.createElementBlock("div",He,[e.createElementVNode("div",{ref:"dsgTableBodyWrapper",class:e.normalizeClass(["dsg-table-body-wrapper",{"fixed-header":F.value}]),style:e.normalizeStyle({height:t.tableHeight||void 0})},[e.createElementVNode("table",{class:e.normalizeClass(["dsg-table-main",F.value?"fixed-header":"",r.value.table,"table-"+t.tableLayout])},[e.createElementVNode("colgroup",{span:M.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(u,E)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u?.visible?(e.openBlock(),e.createElementBlock("col",{key:E,style:e.normalizeStyle({width:u.width||void 0}),class:e.normalizeClass("dsg-table--col-"+u.name+" "+u.titleClass)},null,6)):e.createCommentVNode("",!0)],64))),256)),!F.value&&N.value?(e.openBlock(),e.createElementBlock("col",{key:0,style:e.normalizeStyle({width:S.value}),class:"dsg-table--col-gutter"},null,4)):e.createCommentVNode("",!0)],8,Ie),e.createElementVNode("thead",{class:e.normalizeClass([[r.value.thead,{sticky:F.value,"top-0":F.value}],"dsg-table--head"])},[e.renderSlot(t.$slots,"tableHeader",{fields:f.value},()=>[e.createVNode(J,{fields:f.value,"has-select-all":t.selectable,"selected-rows":y.value,"onUpdate:selectedRows":n[0]||(n[0]=u=>y.value=u),"has-selected":T.value,"onUpdate:hasSelected":n[1]||(n[1]=u=>T.value=u),"scroll-visible":N.value,"show-expand-detail":t.hasDetailRow&&t.showExpandDetail,"table-data-length":m.value?.length,"sort-field":i.value,"onUpdate:sortField":n[2]||(n[2]=u=>i.value=u),"onDsgTable:sortField":n[3]||(n[3]=u=>x()),"onDsgTable:onSelectAll":c,"onDsgTable:onDeselectAll":k},null,8,["fields","has-select-all","selected-rows","has-selected","scroll-visible","show-expand-detail","table-data-length","sort-field"])])],2),e.createElementVNode("tbody",{class:e.normalizeClass(["dsg-table--body",r.value.tbody])},[o.value?(e.openBlock(),e.createElementBlock("tr",Oe,[e.createElementVNode("td",{colspan:M.value},[e.createElementVNode("div",{"aria-label":"Loading...",role:"status",class:"flex items-center space-x-3 h-12 w-full justify-center",colspan:M.value},[e.renderSlot(t.$slots,"dsg-table-loading",{},()=>[e.createVNode(B._sfc_main,{icon:"loading-02",class:"animate-spin"}),n[4]||(n[4]=e.createElementVNode("span",{class:"text-xs font-medium text-gray-500"},"Loading...",-1))])],8,Ue)],8,Ae)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(m.value,(u,E)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:E},[e.createElementVNode("tr",{class:e.normalizeClass(["dsg-table--tbody-row",{odd:E%2===0,even:E%2!==0,"row-selected":u.selected}]),onClick:P=>ne(),onDblclick:P=>se(),onMouseover:P=>re()},[t.selectable?(e.openBlock(),e.createElementBlock("td",We,[e.createVNode(B._sfc_main$2,{modelValue:u.selected,"onUpdate:modelValue":[P=>u.selected=P,P=>l(u)]},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(P,O)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:O},[P.visible?(e.openBlock(),e.createElementBlock("td",{key:0,class:e.normalizeClass(["dsg-table--tbody-cell",P.dataClass]),style:e.normalizeStyle({width:P.width||void 0}),onClick:j=>ie(),onDblclick:j=>de(),onContextmenu:j=>ce()},[e.renderSlot(t.$slots,H(P),{rowData:u,rowIndex:E,rowField:P},()=>[e.createElementVNode("span",{innerHTML:R(P,u)},null,8,je)])],46,xe)):e.createCommentVNode("",!0)],64))),128))],42,qe),t.hasDetailRow?(e.openBlock(),e.createBlock(e.Transition,{key:0,name:t.detailRowTransition},{default:e.withCtx(()=>[e.createElementVNode("tr",{class:"dsg-table--tbody-detail-row",onClick:P=>ue()},[e.createElementVNode("td",{colspan:M.value},[e.renderSlot(t.$slots,"dsg-table-detail-row",{rowData:u,rowIndex:E,options:t.detailRowOptions})],8,Qe)],8,Ke)]),_:2},1032,["name"])):e.createCommentVNode("",!0)],64))),128)),!m.value?.length&&t.noDataTemplate.length?(e.openBlock(),e.createElementBlock("tr",Ye,[e.createElementVNode("td",{colspan:M.value,class:"dsg-table--empty-result"},[e.renderSlot(t.$slots,"dsg-table-empty-result",{},()=>[e.createTextVNode(e.toDisplayString(t.noDataTemplate),1)])],8,Ge)])):e.createCommentVNode("",!0)],2),e.createElementVNode("tfoot",Je,[e.renderSlot(t.$slots,"dsg-table-footer",{fields:f.value,data:m.value})])],2)],6)]))}}),Ze={class:"dsg-table"},_e={class:"dsg-table--pre-header"},et={class:"dsg-table--pre-header-left"},tt=["textContent"],at={class:"dsg-table--pre-header-right"},lt={key:0,class:"dsg-table--search-header"},ot={class:"dsg-table--search-top"},nt={class:"dsg-table--footer"},st={class:"dsg-table--footer-left"},rt={class:"dsg-table--footer-center"},it={class:"dsg-table--footer-right"},dt=e.defineComponent({__name:"DsgTable",props:{getUrl:{},fields:{},loadOnStart:{type:Boolean,default:!0},displayPaginationInfo:{type:Boolean,default:!0},reloadOnChangeTimer:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},trackBy:{default:"id"},title:{default:""},filters:{default:()=>{}},filterEntity:{default:""},filterEndpoint:{default:""},filterSearchEndpoint:{default:""},tableLayout:{default:"fixed"}},emits:["dsg-table:action-edit","dsg-table:action-view","dsg-table:action-delete","dsg-table:link-clicked","dsg-table:rows-selected","dsg-table:filter-updated","dsg-table:term-changed"],setup(a,{expose:h,emit:g}){const s=l=>{i.value=l},f=e.ref(!!(a.filterEntity||a.filterEndpoint)),m=()=>{if(f.value){let l={};return B.getQueryStrings().forEach(c=>{if(c.key.startsWith("filter[")){const k=c.key.replace("filter[","").replace("]",""),w=c.value;l[`filter[${k}]`]=w.join(",")}}),l}else return{}},p=e.useSlots(),v=e.ref(!0),S=e.ref(null),N=e.ref("<p>Showing {from} to {to} of {total}</p>"),r=e.ref(null),b=e.useTemplateRef("dsgTable"),o=e.ref({perPage:20,change:s}),i=e.ref(20),d=e.ref(m()),C=g,$=l=>{b.value?.changePage(l)},y=l=>{r.value=l},T=({data:l})=>{S.value=l},F=()=>{v.value===!1&&b.value?.reload()},M=l=>{b.value?.setData(b.value?.tableData.map(c=>c.id===l.id?l:c))},V=l=>{d.value=l},R=l=>{d.value["filter[term]"]=l,C("dsg-table:term-changed",l)},H=(l,c,k)=>{d.value={"filter[term]":d.value["filter[term]"],...l},C("dsg-table:filter-updated",d.value,c,k)};return h({reloadTable:F,updateRowTable:M,termChanged:R,setFilters:V}),(l,c)=>(e.openBlock(),e.createElementBlock("div",Ze,[e.createElementVNode("div",_e,[e.renderSlot(l.$slots,"dsg-table--pre-header",{},()=>[e.createElementVNode("div",et,[e.renderSlot(l.$slots,"dsg-table--page-title",{data:S.value,title:l.title},()=>[l.title.length>0?(e.openBlock(),e.createElementBlock("h1",{key:0,class:"dsg-table--title",textContent:e.toDisplayString(l.title)},null,8,tt)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",at,[e.renderSlot(l.$slots,"dsg-table--page-actions",{data:S.value})])])]),l.displayPaginationInfo?(e.openBlock(),e.createElementBlock("div",lt,[e.createElementVNode("div",ot,[e.renderSlot(l.$slots,"dsg-table--search-header",{data:S.value},()=>[e.createVNode(G,{name:"term","onDsgTable:termChanged":c[0]||(c[0]=k=>R(k))}),e.createVNode(B._sfc_main$7,{entity:l.filterEntity,"filter-endpoint":l.filterEndpoint,"search-endpoint":l.filterSearchEndpoint,filters:l.filters,"onDsgTable:filterUpdated":c[1]||(c[1]=(k,w,D)=>H(k,w,D))},null,8,["entity","filter-endpoint","search-endpoint","filters"]),e.renderSlot(l.$slots,"dsg-table--search-actions",{data:S.value})])]),e.renderSlot(l.$slots,"dsg-table--search-navigation")])):e.createCommentVNode("",!0),e.createVNode(Xe,{ref:"dsgTable","api-url":l.getUrl,"filter-params":d.value,"onUpdate:filterParams":c[6]||(c[6]=k=>d.value=k),"per-page":i.value,"onUpdate:perPage":c[7]||(c[7]=k=>i.value=k),fields:l.fields,"load-on-start":l.loadOnStart,"pagination-path":"meta",selectable:l.selectable,"track-by":l.trackBy,"table-layout":l.tableLayout,css:{tableWrapper:"border-b"},"onDsgTable:loading":c[8]||(c[8]=k=>v.value=!0),"onDsgTable:loaded":c[9]||(c[9]=k=>v.value=!1),"onDsgTable:paginationData":y,"onDsgTable:loadSuccess":T,"onDsgTable:rowsSelected":c[10]||(c[10]=k=>C("dsg-table:rows-selected",k))},e.createSlots({"dsg-field--actions":e.withCtx(k=>[e.renderSlot(l.$slots,"dsg-table-actions",{data:k},()=>[(e.openBlock(),e.createBlock(Y,{key:k.rowIndex,data:k,"onDsgTable:actionEdit":c[2]||(c[2]=(w,D)=>C("dsg-table:action-edit",w,D)),"onDsgTable:actionView":c[3]||(c[3]=(w,D)=>C("dsg-table:action-view",w,D)),"onDsgTable:actionDelete":c[4]||(c[4]=(w,D)=>C("dsg-table:action-delete",w,D)),"onDsgTable:linkClicked":c[5]||(c[5]=(w,D,L)=>C("dsg-table:link-clicked",w,D,L))},null,8,["data"]))])]),_:2},[e.renderList(e.unref(p),(k,w)=>({name:w,fn:e.withCtx(({rowData:D,rowField:L,rowIndex:I})=>[String(w)!=="dsg-field--actions"?e.renderSlot(l.$slots,w,e.normalizeProps(e.mergeProps({key:0},{rowData:D,rowField:L,rowIndex:I}))):e.createCommentVNode("",!0)])}))]),1032,["api-url","filter-params","per-page","fields","load-on-start","selectable","track-by","table-layout"]),e.createElementVNode("div",nt,[e.createElementVNode("div",st,[e.renderSlot(l.$slots,"dsg-table--footer-left",{data:r.value,perPage:o.value},()=>[e.createVNode(Q,{"no-data-template":"",ref:"paginationInfoStart",pagination:r.value,"onUpdate:pagination":c[11]||(c[11]=k=>r.value=k),"info-template":N.value},null,8,["pagination","info-template"]),e.renderSlot(l.$slots,"dsg-table--footer-left-extras",{data:r.value,perPage:o.value})])]),e.createElementVNode("div",rt,[e.renderSlot(l.$slots,"dsg-table--footer-center",{data:r.value,perPage:o.value},()=>[e.renderSlot(l.$slots,"dsg-table--footer-center-extras",{data:r.value,perPage:o.value})])]),e.createElementVNode("div",it,[e.renderSlot(l.$slots,"dsg-table--footer-right",{data:r.value,perPage:o.value},()=>[v.value===!1?(e.openBlock(),e.createBlock(K,{key:0,ref:"pagination",pagination:r.value,"onUpdate:pagination":c[12]||(c[12]=k=>r.value=k),"onDsgTable:changePage":$},null,8,["pagination"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"dsg-table--footer-right-extras",{data:r.value,perPage:o.value})])])])]))}}),ct={class:"dsg-table--per-page"},ut=["value","textContent"],gt=e.defineComponent({__name:"DsgTablePerPage",props:{perPageOptions:{default:()=>[10,20,30,50,100]},perPage:{}},setup(a){return(h,g)=>(e.openBlock(),e.createElementBlock("div",ct,[e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":g[0]||(g[0]=s=>h.perPage.perPage=s),class:"dsg-table--per-page-select",onChange:g[1]||(g[1]=s=>h.perPage.change(h.perPage.perPage))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.perPageOptions,s=>(e.openBlock(),e.createElementBlock("option",{key:s,value:s,textContent:e.toDisplayString(s)},null,8,ut))),128))],544),[[e.vModelSelect,h.perPage.perPage]])]))}}),X=dt,Z=Y,_=gt,ee=B._sfc_main$7,te=K,ae=Q,le=G,oe=J,mt={DsgTable:X,DsgTableActions:Z,DsgTablePerPage:_,DsgTableFilter:ee,DsgTablePagination:te,DsgTablePaginationInfo:ae,DsgTableSearch:le,DsgTableRowHeader:oe};exports.DsgTable=X;exports.DsgTableActions=Z;exports.DsgTableFilter=ee;exports.DsgTablePagination=te;exports.DsgTablePaginationInfo=ae;exports.DsgTablePerPage=_;exports.DsgTableRowHeader=oe;exports.DsgTableSearch=le;exports.default=mt;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("./DsgTablePerPage.vue_vue_type_style_index_0_lang-BaEuuE3O.cjs"),U=require("./dsg-vue.helpers-string.cjs"),O=require("./dsg-vue.helpers-object.cjs"),ge={class:"dsg-table--pagination"},me=["disabled"],fe=["disabled"],ve=["onClick","innerHTML"],pe=["onClick","innerHTML"],be=["disabled"],ke=["disabled"],K=e.defineComponent({__name:"DsgTablePagination",props:e.mergeModels({onEachSide:{default:3},firstPage:{default:1},showFirstLast:{type:Boolean,default:!0},firstIcon:{default:"chevron-left-double"},lastIcon:{default:"chevron-right-double"},prevIcon:{default:"chevron-left"},nextIcon:{default:"chevron-right"}},{pagination:{default:null},paginationModifiers:{}}),emits:e.mergeModels(["dsg-table:change-page"],["update:pagination"]),setup(a,{expose:h,emit:g}){const s=e.useModel(a,"pagination"),f=e.computed(()=>s.value===null?0:s.value?.last_page-a.firstPage+1),m=e.computed(()=>s.value===null?0:s.value?.last_page),p=e.computed(()=>s.value===null?!1:s.value?.current_page===a.firstPage),v=e.computed(()=>s.value===null?!1:s.value?.current_page===m.value),D=e.computed(()=>f.value<a.onEachSide*2+4),N=e.computed(()=>a.onEachSide*2+1),r=e.computed(()=>!s.value||s.value?.current_page<=a.onEachSide?1:s.value?.current_page>=f.value-a.onEachSide?f.value-a.onEachSide*2:s.value?.current_page-a.onEachSide),b=g,o=d=>{b("dsg-table:change-page",d)},i=d=>d===s.value?.current_page;return h({loadPage:o}),(d,y)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",ge,[d.showFirstLast?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:y[0]||(y[0]=$=>o(d.firstPage)),class:e.normalizeClass([[p.value?"disabled":""],"dsg-table--pagination-link"]),disabled:p.value,title:"First","aria-label":"First"},[e.createVNode(C._sfc_main,{icon:d.firstIcon,size:"sm"},null,8,["icon"])],10,me)):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:y[1]||(y[1]=$=>o("prev")),class:e.normalizeClass([[p.value?"disabled":""],"dsg-table--pagination-link"]),disabled:p.value,title:"Previous","aria-label":"Previous"},[e.createVNode(C._sfc_main,{icon:d.prevIcon,size:"sm"},null,8,["icon"])],10,fe),D.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(f.value,($,B)=>(e.openBlock(),e.createElementBlock("a",{key:B,onClick:T=>o(B+d.firstPage),class:e.normalizeClass([[i(B+d.firstPage)?"active":""],"dsg-table--pagination-link"]),innerHTML:$},null,10,ve))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(N.value,($,B)=>(e.openBlock(),e.createElementBlock("a",{key:B,onClick:T=>o(r.value+B+d.firstPage-1),class:e.normalizeClass([[i(r.value+B+d.firstPage-1)?"active":""],"dsg-table--pagination-link"]),innerHTML:r.value+$-1},null,10,pe))),128)),e.createElementVNode("a",{onClick:y[2]||(y[2]=$=>o("next")),class:e.normalizeClass([[v.value?"disabled":""],"dsg-table--pagination-link"]),disabled:v.value,title:"Next","aria-label":"Next"},[e.createVNode(C._sfc_main,{icon:d.nextIcon,size:"sm"},null,8,["icon"])],10,be),d.showFirstLast?(e.openBlock(),e.createElementBlock("a",{key:3,onClick:y[3]||(y[3]=$=>o(m.value)),class:e.normalizeClass([[v.value?"disabled":""],"dsg-table--pagination-link"]),disabled:v.value,title:"Last","aria-label":"Last"},[e.createVNode(C._sfc_main,{icon:d.lastIcon,size:"sm"},null,8,["icon"])],10,ke)):e.createCommentVNode("",!0)],512)),[[e.vShow,s.value&&m.value>d.firstPage]])}}),he=["innerHTML"],Q=e.defineComponent({__name:"DsgTablePaginationInfo",props:e.mergeModels({infoTemplate:{default:"Displaying {from} to {to} of {total} items"},noDataTemplate:{default:"No relevant data"}},{pagination:{default:null},paginationModifiers:{}}),emits:["update:pagination"],setup(a){const h=e.useModel(a,"pagination"),g=e.computed(()=>h.value==null||h.value.total==0?a.noDataTemplate:a.infoTemplate.replace("{from}",(h.value?.from||0).toString()).replace("{to}",(h.value?.to||0).toString()).replace("{total}",(h.value?.total||0).toString()));return(s,f)=>(e.openBlock(),e.createElementBlock("div",{class:"dsg-table--pagination-info",innerHTML:g.value},null,8,he))}}),ye={class:"dsg-table--actions",ref:"dsgTableActions"},Be={class:"dsg-table--action-trigger"},Ce={key:0,class:"dsg-table--actions-menu-wrapper"},we=["href","target","onClick"],Pe=["textContent"],Ee={key:0},Se={key:1},De=["href","target","onClick"],$e={class:"flex-1"},Y=e.defineComponent({__name:"DsgTableActions",props:{placement:{default:"auto"}},emits:["dsg-table:action-edit","dsg-table:action-view","dsg-table:action-delete","dsg-table:action-archive","dsg-table:link-clicked"],setup(a,{emit:h}){const g=e.ref(!1);e.useTemplateRef("dsgTableActions");const s=e.useAttrs(),f=e.ref(s.data.rowData?.actions??null),m=e.ref(s.data.rowData?.links??null),p=e.ref(s.data.rowData??null),v=b=>{switch(b){case"edit":return"edit-05";case"view":return"eye";case"delete":return"trash-01";case"archive":return"eye-off";default:return"dots-horizontal"}},D=(b,o,i)=>{switch(o){case"edit":r("dsg-table:action-edit",i,p.value);break;case"view":r("dsg-table:action-view",i,p.value);break;case"delete":r("dsg-table:action-delete",i,p.value);break;case"archive":r("dsg-table:action-archive",i,p.value);break}},N=(b,o)=>{const i=b.actionId||b.label.trim().toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-");r("dsg-table:link-clicked",o,i,p.value)},r=h;return(b,o)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",ye,[e.createVNode(e.unref(C.kt),{triggers:[],placement:b.placement,"handle-resize":!0,strategy:"absolute",shown:g.value,class:"dsg-table--actions__popper",onHide:o[1]||(o[1]=i=>g.value=!1),ref:"floatingVueFilterDropdown"},{popper:e.withCtx(()=>[g.value?(e.openBlock(),e.createElementBlock("div",Ce,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(i,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[["edit","view","delete","archive"].includes(String(d))?(e.openBlock(),e.createElementBlock("a",{key:d,href:f.value?.link,target:f.value?.target||"_self",onClick:y=>D(i,String(d),y)},[e.createElementVNode("div",{class:e.normalizeClass(["dsg-table--actions-menu-item",String(d)])},[e.createVNode(C._sfc_main,{icon:v(String(d)),size:"sm"},null,8,["icon"]),e.createElementVNode("span",{class:"flex-1",textContent:e.toDisplayString(e.unref(U.ucfirst)(String(d)))},null,8,Pe)],2)],8,we)):e.createCommentVNode("",!0)],64))),256)),f.value&&m.value?(e.openBlock(),e.createElementBlock("hr",Ee)):e.createCommentVNode("",!0),m.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(m.value,i=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:i.label},[i.hasOwnProperty("component")?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.component),{key:0,quote:e.unref(s).data.data.rowData,"row-data":e.unref(s).data.data.rowData},null,8,["quote","row-data"])):i.hasOwnProperty("type")&&i.type=="break"?(e.openBlock(),e.createElementBlock("hr",Se)):(e.openBlock(),e.createElementBlock("a",{key:2,href:i.link,target:i.target||"_self",class:e.normalizeClass(["dsg-table--actions-menu-item",i.class]),onClick:d=>N(i,d)},[i.icon?(e.openBlock(),e.createBlock(C._sfc_main,{key:0,icon:i.icon,size:"sm"},null,8,["icon"])):e.createCommentVNode("",!0),e.createElementVNode("span",$e,e.toDisplayString(i.label),1)],10,De))],64))),128)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createElementVNode("div",Be,[e.createElementVNode("button",{type:"button",class:"dsg-table--actions-button","aria-expanded":"false","aria-haspopup":"true",onClick:o[0]||(o[0]=i=>g.value=!g.value)},[e.renderSlot(b.$slots,"dsg-table-action-button-content",{},()=>[e.createVNode(C._sfc_main,{icon:"dots-vertical",size:"sm"})])])])]),_:3},8,["placement","shown"])])),[[e.unref(C.vOnClickOutside),()=>g.value=!1]])}}),Ve={class:"dsg-table--search"},G=e.defineComponent({__name:"DsgTableSearch",props:{name:{},id:{},placeholder:{default:"Search"},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1},extraClasses:{},eventName:{}},emits:["dsg-table:term-changed"],setup(a,{emit:h}){const g=e.ref(""),s=h,f=C.useDebounceFn(m=>{g.value=m,s("dsg-table:term-changed",g.value)},300);return(m,p)=>(e.openBlock(),e.createElementBlock("div",Ve,[e.createVNode(C._sfc_main$5,{value:g.value,"onUpdate:value":p[0]||(p[0]=v=>g.value=v),name:m.name,id:m.id||m.name,placeholder:m.placeholder,disabled:m.disabled,required:m.required,readonly:m.readonly,hidden:m.hidden,"has-clear-button":!0,autocomplete:"off",size:"sm",icon:"search-sm","icon-clickable":!0,onIconClicked:p[1]||(p[1]=v=>e.unref(f)(v)),onEnterPressed:p[2]||(p[2]=v=>e.unref(f)(v)),onOnClear:p[3]||(p[3]=()=>e.unref(f)(""))},null,8,["value","name","id","placeholder","disabled","required","readonly","hidden"])]))}}),Ne={class:"dsg-table--header-row"},Te={key:0,class:"dsg-table--th dsg-table--th-checkbox",scope:"col"},Fe={key:1,class:"dsg-table--th dsg-table--th-expand-detail",scope:"col"},Me=["title","id","onClick"],Le={key:0,class:"dsg-table--th-sort-icon"},ze=["innerHTML"],Re=["innerHTML"],J=e.defineComponent({__name:"DsgTableRowHeader",props:e.mergeModels({fields:{},scrollVisible:{type:Boolean},hasSelectAll:{type:Boolean,default:!1},showExpandDetail:{type:Boolean,default:!0},tableDataLength:{default:0}},{sortField:{default:null},sortFieldModifiers:{},selectedRows:{default:[]},selectedRowsModifiers:{},hasSelected:{type:Boolean,default:!1},hasSelectedModifiers:{}}),emits:e.mergeModels(["dsg-table:sort-field","dsg-table:on-select-all","dsg-table:on-deselect-all"],["update:sortField","update:selectedRows","update:hasSelected"]),setup(a,{emit:h}){const g=e.useModel(a,"sortField"),s=e.useModel(a,"selectedRows"),f=e.useModel(a,"hasSelected"),m=e.ref("17px"),p=r=>{f.value&&s.value.length>0&&s.value.length!==a.tableDataLength?(f.value=!0,v("dsg-table:on-select-all")):!f.value&&s.value.length===0?(f.value=!1,v("dsg-table:on-select-all")):v("dsg-table:on-deselect-all")},v=h,D=(r,b)=>[r,r+"-"+U.toSnakeCase(String(b?.name)),b.titleClass||"",{sortable:b.sortable},{"sort-active":g.value?.name===b.name}],N=r=>{r.sortable&&(g.value={name:String(r?.name),field:String(r?.sortField),direction:g.value?.name===r.name&&g.value?.direction==="asc"?"desc":"asc"},v("dsg-table:sort-field",r))};return(r,b)=>(e.openBlock(),e.createElementBlock("tr",Ne,[r.hasSelectAll?(e.openBlock(),e.createElementBlock("th",Te,[e.createVNode(C._sfc_main$2,{modelValue:f.value,"onUpdate:modelValue":[b[0]||(b[0]=o=>f.value=o),p],indeterminate:s.value.length>0&&s.value.length!==r.tableDataLength},null,8,["modelValue","indeterminate"])])):e.createCommentVNode("",!0),r.showExpandDetail?(e.openBlock(),e.createElementBlock("th",Fe)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.fields,(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o?.visible?(e.openBlock(),e.createElementBlock("th",{key:i,class:e.normalizeClass(D("dsg-table--th",o)),style:e.normalizeStyle([{width:o.width||void 0},o.style]),title:o.title+(o.sortable?" Sort":""),id:"_"+o.name,onClick:d=>N(o),scope:"col"},[o.sortable?(e.openBlock(),e.createElementBlock("div",Le,[o.title?(e.openBlock(),e.createElementBlock("span",{key:0,class:"dsg-table--th-title",innerHTML:o.title},null,8,ze)):e.createCommentVNode("",!0),o.sortable&&g.value?.name!==o.name?(e.openBlock(),e.createBlock(C._sfc_main,{key:1,icon:"chevron-selector-vertical",class:"inline-flex",size:"xs"})):e.createCommentVNode("",!0),o.sortable&&g.value?.name===o.name&&g.value?.direction==="asc"?(e.openBlock(),e.createBlock(C._sfc_main,{key:2,icon:"chevron-down",class:"inline-flex",size:"xs"})):e.createCommentVNode("",!0),o.sortable&&g.value?.name===o.name&&g.value?.direction==="desc"?(e.openBlock(),e.createBlock(C._sfc_main,{key:3,icon:"chevron-up",class:"inline-flex",size:"xs"})):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("span",{key:1,class:"dsg-table--th-title",innerHTML:e.unref(U.ucwords)(String(o?.title))},null,8,Re))],14,Me)):e.createCommentVNode("",!0)],64))),256)),r.scrollVisible?(e.openBlock(),e.createElementBlock("th",{key:2,style:e.normalizeStyle({width:m.value}),class:"dsg-table--th-col-gutter"},null,4)):e.createCommentVNode("",!0)]))}}),He={class:"dsg-table--wrapper"},Ie=["span"],Ae={key:0,class:"dsg-table--loading"},Oe=["colspan"],Ue=["colspan"],qe=["onClick","onDblclick","onMouseover"],We={key:0,class:"dsg-table--tbody-cell dsg-table--tbody-cell-checkbox"},xe=["onClick","onDblclick","onContextmenu"],je=["innerHTML"],Ke=["onClick"],Qe=["colspan"],Ye={key:2},Ge=["colspan"],Je={class:"dsg-table--footer"},Xe=e.defineComponent({__name:"DsgTableComponent",props:e.mergeModels({fields:{default:()=>[]},isDraggable:{type:Boolean,default:!1},dragApi:{default:""},loadOnStart:{type:Boolean,default:!0},apiUrl:{default:""},httpMethod:{default:"get"},reactiveApiUrl:{type:Boolean,default:!0},apiMode:{type:Boolean,default:!0},data:{default:null},dataManager:{type:[Function,null],default:null},dataPath:{default:"data"},tableLayout:{default:"fixed"},paginationPath:{default:"links.pagination"},queryParams:{default:()=>({sort:"sort",order:"order",page:"page",perPage:"per_page"})},httpOptions:{default:()=>({})},hasDetailRow:{type:Boolean,default:!1},showExpandDetail:{type:Boolean,default:!0},initialPage:{default:1},firstPage:{default:1},sortOrder:{default:()=>[]},multiSort:{type:Boolean},tableHeight:{default:null},multiSortKey:{},rowClass:{type:[String,Function],default:""},detailRowComponent:{},detailRowTransition:{default:"fade"},detailRowClass:{type:[String,Function]},detailRowOptions:{default:()=>({})},trackBy:{default:"id"},css:{default:()=>({tableWrapper:"dsg-table-wrapper",thead:"dsg-table-thead",tbody:"dsg-table-tbody",table:"dsg-table-component"})},minRows:{default:0},noDataTemplate:{default:"No Data Available"},showSortIcons:{type:Boolean},headerRows:{},transform:{type:[Function,null],default:null},sortParams:{type:[Function,null],default:null},fieldPrefix:{},eventPrefix:{},selectable:{type:Boolean,default:!1}},{filterParams:{default:{}},filterParamsModifiers:{},perPage:{default:20},perPageModifiers:{}}),emits:e.mergeModels(["dsg-table:loading","dsg-table:loaded","dsg-table:load-success","dsg-table:load-error","dsg-table:pagination-data","dsg-table:rows-selected"],["update:filterParams","update:perPage"]),setup(a,{expose:h,emit:g}){const s=t=>t.map((n,u)=>({field:n.field||"",title:n.title||"",name:n.name||"",titleClass:n.titleClass||"",dataClass:n.dataClass||"",visible:n.visible!==!1,width:n.width||void 0,sortField:n.sortField||null,sortable:n.sortField,formatter:n.formatter||null,$_index:u})),f=e.ref(s(a.fields)),m=e.ref(a.data),p=e.ref(null),v=e.ref(a.initialPage),D=e.ref("17px"),N=e.ref(!1),r=e.ref({}),b=e.ref(0),o=e.ref(!0),i=e.ref(null),d=e.ref(null),y=e.useModel(a,"filterParams"),$=e.useModel(a,"perPage"),B=e.ref([]),T=e.ref(!1),F=e.computed(()=>a.tableHeight!=null),M=e.computed(()=>f.value.filter(t=>t.visible).length);e.watch(()=>B.value.length,t=>{T.value=a.selectable&&t>0},{immediate:!0}),e.watch(()=>a.fields,t=>{f.value=s(t)},{immediate:!0}),e.watch(()=>y.value,()=>{z()},{deep:!0}),e.watch(()=>$.value,()=>{z()});const V=g,R=(t,n)=>t.formatter&&typeof t.formatter=="function"?t.formatter(t,n):O.data_get(n,String(t?.name),""),H=t=>"dsg-field--"+t.name?.toLowerCase().replaceAll(/[_ ]/g,"-"),l=t=>{if(a.selectable){if(t.selected)B.value.push(t);else{const n=B.value.findIndex(u=>u[a.trackBy]===t[a.trackBy]);n!==-1&&B.value.splice(n,1)}V("dsg-table:rows-selected",B.value)}},c=()=>{a.selectable&&(m.value?.forEach(t=>{t.selected=!0}),B.value=m.value?.filter(t=>t.selected)??[],V("dsg-table:rows-selected",B.value))},k=()=>{a.selectable&&(m.value?.forEach(t=>{t.selected=!1}),B.value=[],V("dsg-table:rows-selected",B.value))},w=t=>{t==="prev"?v.value>a.firstPage&&v.value--:t==="next"?v.value<(p.value?.last_page??0)&&v.value++:t!=v.value&&t>=a.firstPage&&t<=(p.value?.last_page??0)&&(v.value=t),z()},P=()=>({[a.queryParams?.sort]:i.value?(i.value?.direction==="desc"?"-":"")+i.value?.field:void 0,[a.queryParams?.order]:i.value?.direction,[a.queryParams?.page]:v.value,[a.queryParams?.perPage]:$.value}),L=()=>{d.value&&(d.value.abort(),d.value=null)},I=async(t,n)=>{L();const u=new AbortController;if(n.signal=u.signal,d.value=u,a.httpMethod.toLowerCase()==="get")return await C.axios.get(t,n);{const S=n.params;return delete n.params,await C.axios.post(t,S,n)}},q=t=>{V("dsg-table:load-success",t);const n=a.transform?a.transform(t.data):t.data;m.value=O.data_get(n,a.dataPath,null),a.selectable&&m.value?.forEach(u=>{u.selected=u.selected??!1}),p.value=O.data_get(n,a.paginationPath,null)??null,b.value=m.value?.length?m.value[0].order:b,p.value===null&&console.warn('DsgTable: pagination-path "'+a.paginationPath+`" not found. It looks like the data returned from the server does not have pagination information or you may have set it incorrectly.
2
+ You can explicitly suppress this warning by setting pagination-path="".`),V("dsg-table:pagination-data",p.value),V("dsg-table:loaded"),o.value=!1},W=t=>{console.error("load-error",t),V("dsg-table:load-error",t),V("dsg-table:loaded"),o.value=!1},z=(t=q,n=W,u={})=>{const S=t||q,E=n||W;if(a.apiMode)return o.value=!0,V("dsg-table:loading",o.value),a.httpOptions.params={...P(),...y.value},I(a.apiUrl,a.httpOptions).then(S).catch(A=>E(A))},ne=(t,n,u)=>{},se=(t,n,u)=>{},re=(t,n,u)=>{},ie=(t,n,u,S)=>{},de=(t,n,u,S)=>{},ce=(t,n,u,S)=>{},ue=(t,n,u)=>{};e.onMounted(()=>{a.apiMode===!0&&z()});const x=()=>{a.apiMode&&(v.value=a.initialPage,B.value=[],L(),z())};return h({changePage:w,reload:x}),(t,n)=>(e.openBlock(),e.createElementBlock("div",He,[e.createElementVNode("div",{ref:"dsgTableBodyWrapper",class:e.normalizeClass(["dsg-table-body-wrapper",{"fixed-header":F.value}]),style:e.normalizeStyle({height:t.tableHeight||void 0})},[e.createElementVNode("table",{class:e.normalizeClass(["dsg-table-main",F.value?"fixed-header":"",r.value.table,"table-"+t.tableLayout])},[e.createElementVNode("colgroup",{span:M.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(u,S)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u?.visible?(e.openBlock(),e.createElementBlock("col",{key:S,style:e.normalizeStyle({width:u.width||void 0}),class:e.normalizeClass("dsg-table--col-"+u.name+" "+u.titleClass)},null,6)):e.createCommentVNode("",!0)],64))),256)),!F.value&&N.value?(e.openBlock(),e.createElementBlock("col",{key:0,style:e.normalizeStyle({width:D.value}),class:"dsg-table--col-gutter"},null,4)):e.createCommentVNode("",!0)],8,Ie),e.createElementVNode("thead",{class:e.normalizeClass([[r.value.thead,{sticky:F.value,"top-0":F.value}],"dsg-table--head"])},[e.renderSlot(t.$slots,"tableHeader",{fields:f.value},()=>[e.createVNode(J,{fields:f.value,"has-select-all":t.selectable,"selected-rows":B.value,"onUpdate:selectedRows":n[0]||(n[0]=u=>B.value=u),"has-selected":T.value,"onUpdate:hasSelected":n[1]||(n[1]=u=>T.value=u),"scroll-visible":N.value,"show-expand-detail":t.hasDetailRow&&t.showExpandDetail,"table-data-length":m.value?.length,"sort-field":i.value,"onUpdate:sortField":n[2]||(n[2]=u=>i.value=u),"onDsgTable:sortField":n[3]||(n[3]=u=>x()),"onDsgTable:onSelectAll":c,"onDsgTable:onDeselectAll":k},null,8,["fields","has-select-all","selected-rows","has-selected","scroll-visible","show-expand-detail","table-data-length","sort-field"])])],2),e.createElementVNode("tbody",{class:e.normalizeClass(["dsg-table--body",r.value.tbody])},[o.value?(e.openBlock(),e.createElementBlock("tr",Ae,[e.createElementVNode("td",{colspan:M.value},[e.createElementVNode("div",{"aria-label":"Loading...",role:"status",class:"flex items-center space-x-3 h-12 w-full justify-center",colspan:M.value},[e.renderSlot(t.$slots,"dsg-table-loading",{},()=>[e.createVNode(C._sfc_main,{icon:"loading-02",class:"animate-spin"}),n[4]||(n[4]=e.createElementVNode("span",{class:"text-xs font-medium text-gray-500"},"Loading...",-1))])],8,Ue)],8,Oe)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(m.value,(u,S)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:S},[e.createElementVNode("tr",{class:e.normalizeClass(["dsg-table--tbody-row",{odd:S%2===0,even:S%2!==0,"row-selected":u.selected}]),onClick:E=>ne(),onDblclick:E=>se(),onMouseover:E=>re()},[t.selectable?(e.openBlock(),e.createElementBlock("td",We,[e.createVNode(C._sfc_main$2,{modelValue:u.selected,"onUpdate:modelValue":[E=>u.selected=E,E=>l(u)]},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(E,A)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:A},[E.visible?(e.openBlock(),e.createElementBlock("td",{key:0,class:e.normalizeClass(["dsg-table--tbody-cell",E.dataClass]),style:e.normalizeStyle({width:E.width||void 0}),onClick:j=>ie(),onDblclick:j=>de(),onContextmenu:j=>ce()},[e.renderSlot(t.$slots,H(E),{rowData:u,rowIndex:S,rowField:E},()=>[e.createElementVNode("span",{innerHTML:R(E,u)},null,8,je)])],46,xe)):e.createCommentVNode("",!0)],64))),128))],42,qe),t.hasDetailRow?(e.openBlock(),e.createBlock(e.Transition,{key:0,name:t.detailRowTransition},{default:e.withCtx(()=>[e.createElementVNode("tr",{class:"dsg-table--tbody-detail-row",onClick:E=>ue()},[e.createElementVNode("td",{colspan:M.value},[e.renderSlot(t.$slots,"dsg-table-detail-row",{rowData:u,rowIndex:S,options:t.detailRowOptions})],8,Qe)],8,Ke)]),_:2},1032,["name"])):e.createCommentVNode("",!0)],64))),128)),!m.value?.length&&t.noDataTemplate.length?(e.openBlock(),e.createElementBlock("tr",Ye,[e.createElementVNode("td",{colspan:M.value,class:"dsg-table--empty-result"},[e.renderSlot(t.$slots,"dsg-table-empty-result",{},()=>[e.createTextVNode(e.toDisplayString(t.noDataTemplate),1)])],8,Ge)])):e.createCommentVNode("",!0)],2),e.createElementVNode("tfoot",Je,[e.renderSlot(t.$slots,"dsg-table-footer",{fields:f.value,data:m.value})])],2)],6)]))}}),Ze={class:"dsg-table"},_e={class:"dsg-table--pre-header"},et={class:"dsg-table--pre-header-left"},tt=["textContent"],at={class:"dsg-table--pre-header-right"},lt={key:0,class:"dsg-table--search-header"},ot={class:"dsg-table--search-top"},nt={class:"dsg-table--footer"},st={class:"dsg-table--footer-left"},rt={class:"dsg-table--footer-center"},it={class:"dsg-table--footer-right"},dt=e.defineComponent({__name:"DsgTable",props:{getUrl:{},fields:{},loadOnStart:{type:Boolean,default:!0},displayPaginationInfo:{type:Boolean,default:!0},reloadOnChangeTimer:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},trackBy:{default:"id"},title:{default:""},filters:{default:()=>{}},filterEntity:{default:""},filterEndpoint:{default:""},filterSearchEndpoint:{default:""},tableLayout:{default:"fixed"}},emits:["dsg-table:action-edit","dsg-table:action-view","dsg-table:action-delete","dsg-table:action-archive","dsg-table:link-clicked","dsg-table:rows-selected","dsg-table:filter-updated","dsg-table:term-changed"],setup(a,{expose:h,emit:g}){const s=l=>{i.value=l},f=e.ref(!!(a.filterEntity||a.filterEndpoint)),m=()=>{if(f.value){let l={};return C.getQueryStrings().forEach(c=>{if(c.key.startsWith("filter[")){const k=c.key.replace("filter[","").replace("]",""),w=c.value;l[`filter[${k}]`]=w.join(",")}}),l}else return{}},p=e.useSlots(),v=e.ref(!0),D=e.ref(null),N=e.ref("<p>Showing {from} to {to} of {total}</p>"),r=e.ref(null),b=e.useTemplateRef("dsgTable"),o=e.ref({perPage:20,change:s}),i=e.ref(20),d=e.ref(m()),y=g,$=l=>{b.value?.changePage(l)},B=l=>{r.value=l},T=({data:l})=>{D.value=l},F=()=>{v.value===!1&&b.value?.reload()},M=l=>{b.value?.setData(b.value?.tableData.map(c=>c.id===l.id?l:c))},V=l=>{d.value=l},R=l=>{d.value["filter[term]"]=l,y("dsg-table:term-changed",l)},H=(l,c,k)=>{d.value={"filter[term]":d.value["filter[term]"],...l},y("dsg-table:filter-updated",d.value,c,k)};return h({reloadTable:F,updateRowTable:M,termChanged:R,setFilters:V}),(l,c)=>(e.openBlock(),e.createElementBlock("div",Ze,[e.createElementVNode("div",_e,[e.renderSlot(l.$slots,"dsg-table--pre-header",{},()=>[e.createElementVNode("div",et,[e.renderSlot(l.$slots,"dsg-table--page-title",{data:D.value,title:l.title},()=>[l.title.length>0?(e.openBlock(),e.createElementBlock("h1",{key:0,class:"dsg-table--title",textContent:e.toDisplayString(l.title)},null,8,tt)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",at,[e.renderSlot(l.$slots,"dsg-table--page-actions",{data:D.value})])])]),l.displayPaginationInfo?(e.openBlock(),e.createElementBlock("div",lt,[e.createElementVNode("div",ot,[e.renderSlot(l.$slots,"dsg-table--search-header",{data:D.value},()=>[e.createVNode(G,{name:"term","onDsgTable:termChanged":c[0]||(c[0]=k=>R(k))}),e.createVNode(C._sfc_main$7,{entity:l.filterEntity,"filter-endpoint":l.filterEndpoint,"search-endpoint":l.filterSearchEndpoint,filters:l.filters,"onDsgTable:filterUpdated":c[1]||(c[1]=(k,w,P)=>H(k,w,P))},null,8,["entity","filter-endpoint","search-endpoint","filters"]),e.renderSlot(l.$slots,"dsg-table--search-actions",{data:D.value})])]),e.renderSlot(l.$slots,"dsg-table--search-navigation")])):e.createCommentVNode("",!0),e.createVNode(Xe,{ref:"dsgTable","api-url":l.getUrl,"filter-params":d.value,"onUpdate:filterParams":c[7]||(c[7]=k=>d.value=k),"per-page":i.value,"onUpdate:perPage":c[8]||(c[8]=k=>i.value=k),fields:l.fields,"load-on-start":l.loadOnStart,"pagination-path":"meta",selectable:l.selectable,"track-by":l.trackBy,"table-layout":l.tableLayout,css:{tableWrapper:"border-b"},"onDsgTable:loading":c[9]||(c[9]=k=>v.value=!0),"onDsgTable:loaded":c[10]||(c[10]=k=>v.value=!1),"onDsgTable:paginationData":B,"onDsgTable:loadSuccess":T,"onDsgTable:rowsSelected":c[11]||(c[11]=k=>y("dsg-table:rows-selected",k))},e.createSlots({"dsg-field--actions":e.withCtx(k=>[e.renderSlot(l.$slots,"dsg-table-actions",{data:k},()=>[(e.openBlock(),e.createBlock(Y,{key:k.rowIndex,data:k,"onDsgTable:actionEdit":c[2]||(c[2]=(w,P)=>y("dsg-table:action-edit",w,P)),"onDsgTable:actionView":c[3]||(c[3]=(w,P)=>y("dsg-table:action-view",w,P)),"onDsgTable:actionDelete":c[4]||(c[4]=(w,P)=>y("dsg-table:action-delete",w,P)),"onDsgTable:actionArchive":c[5]||(c[5]=(w,P)=>y("dsg-table:action-archive",w,P)),"onDsgTable:linkClicked":c[6]||(c[6]=(w,P,L)=>y("dsg-table:link-clicked",w,P,L))},null,8,["data"]))])]),_:2},[e.renderList(e.unref(p),(k,w)=>({name:w,fn:e.withCtx(({rowData:P,rowField:L,rowIndex:I})=>[String(w)!=="dsg-field--actions"?e.renderSlot(l.$slots,w,e.normalizeProps(e.mergeProps({key:0},{rowData:P,rowField:L,rowIndex:I}))):e.createCommentVNode("",!0)])}))]),1032,["api-url","filter-params","per-page","fields","load-on-start","selectable","track-by","table-layout"]),e.createElementVNode("div",nt,[e.createElementVNode("div",st,[e.renderSlot(l.$slots,"dsg-table--footer-left",{data:r.value,perPage:o.value},()=>[e.createVNode(Q,{"no-data-template":"",ref:"paginationInfoStart",pagination:r.value,"onUpdate:pagination":c[12]||(c[12]=k=>r.value=k),"info-template":N.value},null,8,["pagination","info-template"]),e.renderSlot(l.$slots,"dsg-table--footer-left-extras",{data:r.value,perPage:o.value})])]),e.createElementVNode("div",rt,[e.renderSlot(l.$slots,"dsg-table--footer-center",{data:r.value,perPage:o.value},()=>[e.renderSlot(l.$slots,"dsg-table--footer-center-extras",{data:r.value,perPage:o.value})])]),e.createElementVNode("div",it,[e.renderSlot(l.$slots,"dsg-table--footer-right",{data:r.value,perPage:o.value},()=>[v.value===!1?(e.openBlock(),e.createBlock(K,{key:0,ref:"pagination",pagination:r.value,"onUpdate:pagination":c[13]||(c[13]=k=>r.value=k),"onDsgTable:changePage":$},null,8,["pagination"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"dsg-table--footer-right-extras",{data:r.value,perPage:o.value})])])])]))}}),ct={class:"dsg-table--per-page"},ut=["value","textContent"],gt=e.defineComponent({__name:"DsgTablePerPage",props:{perPageOptions:{default:()=>[10,20,30,50,100]},perPage:{}},setup(a){return(h,g)=>(e.openBlock(),e.createElementBlock("div",ct,[e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":g[0]||(g[0]=s=>h.perPage.perPage=s),class:"dsg-table--per-page-select",onChange:g[1]||(g[1]=s=>h.perPage.change(h.perPage.perPage))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.perPageOptions,s=>(e.openBlock(),e.createElementBlock("option",{key:s,value:s,textContent:e.toDisplayString(s)},null,8,ut))),128))],544),[[e.vModelSelect,h.perPage.perPage]])]))}}),X=dt,Z=Y,_=gt,ee=C._sfc_main$7,te=K,ae=Q,le=G,oe=J,mt={DsgTable:X,DsgTableActions:Z,DsgTablePerPage:_,DsgTableFilter:ee,DsgTablePagination:te,DsgTablePaginationInfo:ae,DsgTableSearch:le,DsgTableRowHeader:oe};exports.DsgTable=X;exports.DsgTableActions=Z;exports.DsgTableFilter=ee;exports.DsgTablePagination=te;exports.DsgTablePaginationInfo=ae;exports.DsgTablePerPage=_;exports.DsgTableRowHeader=oe;exports.DsgTableSearch=le;exports.default=mt;
@@ -1,5 +1,5 @@
1
- import { defineComponent as W, mergeModels as x, useModel as Y, computed as O, withDirectives as oe, createElementBlock as n, openBlock as a, createCommentVNode as P, createElementVNode as h, normalizeClass as F, createVNode as M, Fragment as L, renderList as q, vShow as Se, ref as y, useTemplateRef as ge, useAttrs as Fe, unref as U, withCtx as Z, renderSlot as T, toDisplayString as _, createBlock as N, resolveDynamicComponent as Me, normalizeStyle as J, watch as te, onMounted as Be, Transition as Le, createTextVNode as Ee, useSlots as Re, createSlots as He, normalizeProps as Ie, mergeProps as ze, vModelSelect as Ve } from "vue";
2
- import { _ as V, k as Ae, v as Oe, g as Ue, u as qe, c as ve, e as ce, i as be, j as Ne } from "./DsgTablePerPage.vue_vue_type_style_index_0_lang-BDrIBOCO.js";
1
+ import { defineComponent as W, mergeModels as x, useModel as Y, computed as O, withDirectives as oe, createElementBlock as n, openBlock as a, createCommentVNode as P, createElementVNode as h, normalizeClass as F, createVNode as M, Fragment as E, renderList as q, vShow as Se, ref as y, useTemplateRef as ge, useAttrs as Fe, unref as U, withCtx as Z, renderSlot as T, toDisplayString as _, createBlock as N, resolveDynamicComponent as Me, normalizeStyle as J, watch as te, onMounted as Be, Transition as Le, createTextVNode as Ee, useSlots as Re, createSlots as He, normalizeProps as Ie, mergeProps as ze, vModelSelect as Ae } from "vue";
2
+ import { _ as A, k as Ve, v as Oe, g as Ue, u as qe, c as ve, e as ce, i as be, j as Ne } from "./DsgTablePerPage.vue_vue_type_style_index_0_lang-BDrIBOCO.js";
3
3
  import { ucfirst as We, ucwords as je, toSnakeCase as Ke } from "./dsg-vue.helpers-string.esm.js";
4
4
  import { data_get as ne } from "./dsg-vue.helpers-object.esm.js";
5
5
  const Qe = { class: "dsg-table--pagination" }, Ye = ["disabled"], xe = ["disabled"], Ge = ["onClick", "innerHTML"], Je = ["onClick", "innerHTML"], Xe = ["disabled"], Ze = ["disabled"], fe = /* @__PURE__ */ W({
@@ -18,69 +18,69 @@ const Qe = { class: "dsg-table--pagination" }, Ye = ["disabled"], xe = ["disable
18
18
  }),
19
19
  emits: /* @__PURE__ */ x(["dsg-table:change-page"], ["update:pagination"]),
20
20
  setup(t, { expose: $, emit: v }) {
21
- const i = Y(t, "pagination"), f = O(() => i.value === null ? 0 : i.value?.last_page - t.firstPage + 1), b = O(() => i.value === null ? 0 : i.value?.last_page), m = O(() => i.value === null ? !1 : i.value?.current_page === t.firstPage), p = O(() => i.value === null ? !1 : i.value?.current_page === b.value), R = O(() => f.value < t.onEachSide * 2 + 4), A = O(() => t.onEachSide * 2 + 1), r = O(() => !i.value || i.value?.current_page <= t.onEachSide ? 1 : i.value?.current_page >= f.value - t.onEachSide ? f.value - t.onEachSide * 2 : i.value?.current_page - t.onEachSide), k = v, s = (u) => {
21
+ const i = Y(t, "pagination"), f = O(() => i.value === null ? 0 : i.value?.last_page - t.firstPage + 1), b = O(() => i.value === null ? 0 : i.value?.last_page), m = O(() => i.value === null ? !1 : i.value?.current_page === t.firstPage), p = O(() => i.value === null ? !1 : i.value?.current_page === b.value), H = O(() => f.value < t.onEachSide * 2 + 4), V = O(() => t.onEachSide * 2 + 1), r = O(() => !i.value || i.value?.current_page <= t.onEachSide ? 1 : i.value?.current_page >= f.value - t.onEachSide ? f.value - t.onEachSide * 2 : i.value?.current_page - t.onEachSide), k = v, s = (u) => {
22
22
  k("dsg-table:change-page", u);
23
23
  }, d = (u) => u === i.value?.current_page;
24
24
  return $({
25
25
  loadPage: s
26
- }), (u, C) => oe((a(), n("div", Qe, [
26
+ }), (u, D) => oe((a(), n("div", Qe, [
27
27
  u.showFirstLast ? (a(), n("a", {
28
28
  key: 0,
29
- onClick: C[0] || (C[0] = (I) => s(u.firstPage)),
29
+ onClick: D[0] || (D[0] = (I) => s(u.firstPage)),
30
30
  class: F([[m.value ? "disabled" : ""], "dsg-table--pagination-link"]),
31
31
  disabled: m.value,
32
32
  title: "First",
33
33
  "aria-label": "First"
34
34
  }, [
35
- M(V, {
35
+ M(A, {
36
36
  icon: u.firstIcon,
37
37
  size: "sm"
38
38
  }, null, 8, ["icon"])
39
39
  ], 10, Ye)) : P("", !0),
40
40
  h("a", {
41
- onClick: C[1] || (C[1] = (I) => s("prev")),
41
+ onClick: D[1] || (D[1] = (I) => s("prev")),
42
42
  class: F([[m.value ? "disabled" : ""], "dsg-table--pagination-link"]),
43
43
  disabled: m.value,
44
44
  title: "Previous",
45
45
  "aria-label": "Previous"
46
46
  }, [
47
- M(V, {
47
+ M(A, {
48
48
  icon: u.prevIcon,
49
49
  size: "sm"
50
50
  }, null, 8, ["icon"])
51
51
  ], 10, xe),
52
- R.value ? (a(!0), n(L, { key: 1 }, q(f.value, (I, D) => (a(), n("a", {
53
- key: D,
54
- onClick: (j) => s(D + u.firstPage),
55
- class: F([[d(D + u.firstPage) ? "active" : ""], "dsg-table--pagination-link"]),
52
+ H.value ? (a(!0), n(E, { key: 1 }, q(f.value, (I, C) => (a(), n("a", {
53
+ key: C,
54
+ onClick: (j) => s(C + u.firstPage),
55
+ class: F([[d(C + u.firstPage) ? "active" : ""], "dsg-table--pagination-link"]),
56
56
  innerHTML: I
57
- }, null, 10, Ge))), 128)) : (a(!0), n(L, { key: 2 }, q(A.value, (I, D) => (a(), n("a", {
58
- key: D,
59
- onClick: (j) => s(r.value + D + u.firstPage - 1),
60
- class: F([[d(r.value + D + u.firstPage - 1) ? "active" : ""], "dsg-table--pagination-link"]),
57
+ }, null, 10, Ge))), 128)) : (a(!0), n(E, { key: 2 }, q(V.value, (I, C) => (a(), n("a", {
58
+ key: C,
59
+ onClick: (j) => s(r.value + C + u.firstPage - 1),
60
+ class: F([[d(r.value + C + u.firstPage - 1) ? "active" : ""], "dsg-table--pagination-link"]),
61
61
  innerHTML: r.value + I - 1
62
62
  }, null, 10, Je))), 128)),
63
63
  h("a", {
64
- onClick: C[2] || (C[2] = (I) => s("next")),
64
+ onClick: D[2] || (D[2] = (I) => s("next")),
65
65
  class: F([[p.value ? "disabled" : ""], "dsg-table--pagination-link"]),
66
66
  disabled: p.value,
67
67
  title: "Next",
68
68
  "aria-label": "Next"
69
69
  }, [
70
- M(V, {
70
+ M(A, {
71
71
  icon: u.nextIcon,
72
72
  size: "sm"
73
73
  }, null, 8, ["icon"])
74
74
  ], 10, Xe),
75
75
  u.showFirstLast ? (a(), n("a", {
76
76
  key: 3,
77
- onClick: C[3] || (C[3] = (I) => s(b.value)),
77
+ onClick: D[3] || (D[3] = (I) => s(b.value)),
78
78
  class: F([[p.value ? "disabled" : ""], "dsg-table--pagination-link"]),
79
79
  disabled: p.value,
80
80
  title: "Last",
81
81
  "aria-label": "Last"
82
82
  }, [
83
- M(V, {
83
+ M(A, {
84
84
  icon: u.lastIcon,
85
85
  size: "sm"
86
86
  }, null, 8, ["icon"])
@@ -134,7 +134,7 @@ const Qe = { class: "dsg-table--pagination" }, Ye = ["disabled"], xe = ["disable
134
134
  default:
135
135
  return "dots-horizontal";
136
136
  }
137
- }, R = (k, s, d) => {
137
+ }, H = (k, s, d) => {
138
138
  switch (s) {
139
139
  case "edit":
140
140
  r("dsg-table:action-edit", d, m.value);
@@ -149,12 +149,12 @@ const Qe = { class: "dsg-table--pagination" }, Ye = ["disabled"], xe = ["disable
149
149
  r("dsg-table:action-archive", d, m.value);
150
150
  break;
151
151
  }
152
- }, A = (k, s) => {
152
+ }, V = (k, s) => {
153
153
  const d = k.actionId || k.label.trim().toLowerCase().replace(/[^a-z0-9-]/g, "-").replace(/-+/g, "-");
154
154
  r("dsg-table:link-clicked", s, d, m.value);
155
155
  }, r = $;
156
156
  return (k, s) => oe((a(), n("div", et, [
157
- M(U(Ae), {
157
+ M(U(Ve), {
158
158
  triggers: [],
159
159
  placement: k.placement,
160
160
  "handle-resize": !0,
@@ -166,17 +166,17 @@ const Qe = { class: "dsg-table--pagination" }, Ye = ["disabled"], xe = ["disable
166
166
  }, {
167
167
  popper: Z(() => [
168
168
  v.value ? (a(), n("div", at, [
169
- (a(!0), n(L, null, q(f.value, (d, u) => (a(), n(L, null, [
169
+ (a(!0), n(E, null, q(f.value, (d, u) => (a(), n(E, null, [
170
170
  ["edit", "view", "delete", "archive"].includes(String(u)) ? (a(), n("a", {
171
171
  key: u,
172
172
  href: f.value?.link,
173
173
  target: f.value?.target || "_self",
174
- onClick: (C) => R(d, String(u), C)
174
+ onClick: (D) => H(d, String(u), D)
175
175
  }, [
176
176
  h("div", {
177
177
  class: F(["dsg-table--actions-menu-item", String(u)])
178
178
  }, [
179
- M(V, {
179
+ M(A, {
180
180
  icon: p(String(u)),
181
181
  size: "sm"
182
182
  }, null, 8, ["icon"]),
@@ -188,7 +188,7 @@ const Qe = { class: "dsg-table--pagination" }, Ye = ["disabled"], xe = ["disable
188
188
  ], 8, lt)) : P("", !0)
189
189
  ], 64))), 256)),
190
190
  f.value && b.value ? (a(), n("hr", nt)) : P("", !0),
191
- b.value ? (a(!0), n(L, { key: 1 }, q(b.value, (d) => (a(), n(L, {
191
+ b.value ? (a(!0), n(E, { key: 1 }, q(b.value, (d) => (a(), n(E, {
192
192
  key: d.label
193
193
  }, [
194
194
  d.hasOwnProperty("component") ? (a(), N(Me(d.component), {
@@ -200,9 +200,9 @@ const Qe = { class: "dsg-table--pagination" }, Ye = ["disabled"], xe = ["disable
200
200
  href: d.link,
201
201
  target: d.target || "_self",
202
202
  class: F(["dsg-table--actions-menu-item", d.class]),
203
- onClick: (u) => A(d, u)
203
+ onClick: (u) => V(d, u)
204
204
  }, [
205
- d.icon ? (a(), N(V, {
205
+ d.icon ? (a(), N(A, {
206
206
  key: 0,
207
207
  icon: d.icon,
208
208
  size: "sm"
@@ -222,7 +222,7 @@ const Qe = { class: "dsg-table--pagination" }, Ye = ["disabled"], xe = ["disable
222
222
  onClick: s[0] || (s[0] = (d) => v.value = !v.value)
223
223
  }, [
224
224
  T(k.$slots, "dsg-table-action-button-content", {}, () => [
225
- M(V, {
225
+ M(A, {
226
226
  icon: "dots-vertical",
227
227
  size: "sm"
228
228
  })
@@ -307,13 +307,13 @@ const Qe = { class: "dsg-table--pagination" }, Ye = ["disabled"], xe = ["disable
307
307
  setup(t, { emit: $ }) {
308
308
  const v = Y(t, "sortField"), i = Y(t, "selectedRows"), f = Y(t, "hasSelected"), b = y("17px"), m = (r) => {
309
309
  f.value && i.value.length > 0 && i.value.length !== t.tableDataLength ? (f.value = !0, p("dsg-table:on-select-all")) : !f.value && i.value.length === 0 ? (f.value = !1, p("dsg-table:on-select-all")) : p("dsg-table:on-deselect-all");
310
- }, p = $, R = (r, k) => [
310
+ }, p = $, H = (r, k) => [
311
311
  r,
312
312
  r + "-" + Ke(String(k?.name)),
313
313
  k.titleClass || "",
314
314
  { sortable: k.sortable },
315
315
  { "sort-active": v.value?.name === k.name }
316
- ], A = (r) => {
316
+ ], V = (r) => {
317
317
  r.sortable && (v.value = {
318
318
  name: String(r?.name),
319
319
  field: String(r?.sortField),
@@ -332,14 +332,14 @@ const Qe = { class: "dsg-table--pagination" }, Ye = ["disabled"], xe = ["disable
332
332
  }, null, 8, ["modelValue", "indeterminate"])
333
333
  ])) : P("", !0),
334
334
  r.showExpandDetail ? (a(), n("th", gt)) : P("", !0),
335
- (a(!0), n(L, null, q(r.fields, (s, d) => (a(), n(L, null, [
335
+ (a(!0), n(E, null, q(r.fields, (s, d) => (a(), n(E, null, [
336
336
  s?.visible ? (a(), n("th", {
337
337
  key: d,
338
- class: F(R("dsg-table--th", s)),
338
+ class: F(H("dsg-table--th", s)),
339
339
  style: J([{ width: s.width || void 0 }, s.style]),
340
340
  title: s.title + (s.sortable ? " Sort" : ""),
341
341
  id: "_" + s.name,
342
- onClick: (u) => A(s),
342
+ onClick: (u) => V(s),
343
343
  scope: "col"
344
344
  }, [
345
345
  s.sortable ? (a(), n("div", bt, [
@@ -348,19 +348,19 @@ const Qe = { class: "dsg-table--pagination" }, Ye = ["disabled"], xe = ["disable
348
348
  class: "dsg-table--th-title",
349
349
  innerHTML: s.title
350
350
  }, null, 8, ft)) : P("", !0),
351
- s.sortable && v.value?.name !== s.name ? (a(), N(V, {
351
+ s.sortable && v.value?.name !== s.name ? (a(), N(A, {
352
352
  key: 1,
353
353
  icon: "chevron-selector-vertical",
354
354
  class: "inline-flex",
355
355
  size: "xs"
356
356
  })) : P("", !0),
357
- s.sortable && v.value?.name === s.name && v.value?.direction === "asc" ? (a(), N(V, {
357
+ s.sortable && v.value?.name === s.name && v.value?.direction === "asc" ? (a(), N(A, {
358
358
  key: 2,
359
359
  icon: "chevron-down",
360
360
  class: "inline-flex",
361
361
  size: "xs"
362
362
  })) : P("", !0),
363
- s.sortable && v.value?.name === s.name && v.value?.direction === "desc" ? (a(), N(V, {
363
+ s.sortable && v.value?.name === s.name && v.value?.direction === "desc" ? (a(), N(A, {
364
364
  key: 3,
365
365
  icon: "chevron-up",
366
366
  class: "inline-flex",
@@ -458,9 +458,9 @@ const Qe = { class: "dsg-table--pagination" }, Ye = ["disabled"], xe = ["disable
458
458
  sortable: o.sortField,
459
459
  formatter: o.formatter || null,
460
460
  $_index: g
461
- })), f = y(i(t.fields)), b = y(t.data), m = y(null), p = y(t.initialPage), R = y("17px"), A = y(!1), r = y({}), k = y(0), s = y(!0), d = y(null), u = y(null), C = Y(t, "filterParams"), I = Y(t, "perPage"), D = y([]), j = y(!1), K = O(() => t.tableHeight != null), Q = O(() => f.value.filter((e) => e.visible).length);
461
+ })), f = y(i(t.fields)), b = y(t.data), m = y(null), p = y(t.initialPage), H = y("17px"), V = y(!1), r = y({}), k = y(0), s = y(!0), d = y(null), u = y(null), D = Y(t, "filterParams"), I = Y(t, "perPage"), C = y([]), j = y(!1), K = O(() => t.tableHeight != null), Q = O(() => f.value.filter((e) => e.visible).length);
462
462
  te(
463
- () => D.value.length,
463
+ () => C.value.length,
464
464
  (e) => {
465
465
  j.value = t.selectable && e > 0;
466
466
  },
@@ -472,7 +472,7 @@ const Qe = { class: "dsg-table--pagination" }, Ye = ["disabled"], xe = ["disable
472
472
  },
473
473
  { immediate: !0 }
474
474
  ), te(
475
- () => C.value,
475
+ () => D.value,
476
476
  () => {
477
477
  X();
478
478
  },
@@ -486,24 +486,24 @@ const Qe = { class: "dsg-table--pagination" }, Ye = ["disabled"], xe = ["disable
486
486
  const z = v, ee = (e, o) => e.formatter && typeof e.formatter == "function" ? e.formatter(e, o) : ne(o, String(e?.name), ""), ae = (e) => "dsg-field--" + e.name?.toLowerCase().replaceAll(/[_ ]/g, "-"), l = (e) => {
487
487
  if (t.selectable) {
488
488
  if (e.selected)
489
- D.value.push(e);
489
+ C.value.push(e);
490
490
  else {
491
- const o = D.value.findIndex((g) => g[t.trackBy] === e[t.trackBy]);
492
- o !== -1 && D.value.splice(o, 1);
491
+ const o = C.value.findIndex((g) => g[t.trackBy] === e[t.trackBy]);
492
+ o !== -1 && C.value.splice(o, 1);
493
493
  }
494
- z("dsg-table:rows-selected", D.value);
494
+ z("dsg-table:rows-selected", C.value);
495
495
  }
496
496
  }, c = () => {
497
497
  t.selectable && (b.value?.forEach((e) => {
498
498
  e.selected = !0;
499
- }), D.value = b.value?.filter((e) => e.selected) ?? [], z("dsg-table:rows-selected", D.value));
499
+ }), C.value = b.value?.filter((e) => e.selected) ?? [], z("dsg-table:rows-selected", C.value));
500
500
  }, w = () => {
501
501
  t.selectable && (b.value?.forEach((e) => {
502
502
  e.selected = !1;
503
- }), D.value = [], z("dsg-table:rows-selected", D.value));
503
+ }), C.value = [], z("dsg-table:rows-selected", C.value));
504
504
  }, S = (e) => {
505
505
  e === "prev" ? p.value > t.firstPage && p.value-- : e === "next" ? p.value < (m.value?.last_page ?? 0) && p.value++ : e != p.value && e >= t.firstPage && e <= (m.value?.last_page ?? 0) && (p.value = e), X();
506
- }, H = () => ({
506
+ }, B = () => ({
507
507
  [t.queryParams?.sort]: d.value ? (d.value?.direction === "desc" ? "-" : "") + d.value?.field : void 0,
508
508
  [t.queryParams?.order]: d.value?.direction,
509
509
  [t.queryParams?.page]: p.value,
@@ -516,8 +516,8 @@ const Qe = { class: "dsg-table--pagination" }, Ye = ["disabled"], xe = ["disable
516
516
  if (o.signal = g.signal, u.value = g, t.httpMethod.toLowerCase() === "get")
517
517
  return await ce.get(e, o);
518
518
  {
519
- const E = o.params;
520
- return delete o.params, await ce.post(e, E, o);
519
+ const R = o.params;
520
+ return delete o.params, await ce.post(e, R, o);
521
521
  }
522
522
  }, ie = (e) => {
523
523
  z("dsg-table:load-success", e);
@@ -531,25 +531,25 @@ You can explicitly suppress this warning by setting pagination-path="".`
531
531
  }, re = (e) => {
532
532
  console.error("load-error", e), z("dsg-table:load-error", e), z("dsg-table:loaded"), s.value = !1;
533
533
  }, X = (e = ie, o = re, g = {}) => {
534
- const E = e || ie, B = o || re;
534
+ const R = e || ie, L = o || re;
535
535
  if (t.apiMode)
536
536
  return s.value = !0, z("dsg-table:loading", s.value), t.httpOptions.params = {
537
- ...H(),
538
- ...C.value
539
- }, le(t.apiUrl, t.httpOptions).then(E).catch((se) => B(se));
537
+ ...B(),
538
+ ...D.value
539
+ }, le(t.apiUrl, t.httpOptions).then(R).catch((se) => L(se));
540
540
  }, ke = (e, o, g) => {
541
541
  }, we = (e, o, g) => {
542
542
  }, Pe = (e, o, g) => {
543
- }, $e = (e, o, g, E) => {
544
- }, De = (e, o, g, E) => {
545
- }, Ce = (e, o, g, E) => {
543
+ }, $e = (e, o, g, R) => {
544
+ }, De = (e, o, g, R) => {
545
+ }, Ce = (e, o, g, R) => {
546
546
  }, Te = (e, o, g) => {
547
547
  };
548
548
  Be(() => {
549
549
  t.apiMode === !0 && X();
550
550
  });
551
551
  const de = () => {
552
- t.apiMode && (p.value = t.initialPage, D.value = [], G(), X());
552
+ t.apiMode && (p.value = t.initialPage, C.value = [], G(), X());
553
553
  };
554
554
  return $({
555
555
  changePage: S,
@@ -564,16 +564,16 @@ You can explicitly suppress this warning by setting pagination-path="".`
564
564
  class: F(["dsg-table-main", K.value ? "fixed-header" : "", r.value.table, "table-" + e.tableLayout])
565
565
  }, [
566
566
  h("colgroup", { span: Q.value }, [
567
- (a(!0), n(L, null, q(f.value, (g, E) => (a(), n(L, null, [
567
+ (a(!0), n(E, null, q(f.value, (g, R) => (a(), n(E, null, [
568
568
  g?.visible ? (a(), n("col", {
569
- key: E,
569
+ key: R,
570
570
  style: J({ width: g.width || void 0 }),
571
571
  class: F("dsg-table--col-" + g.name + " " + g.titleClass)
572
572
  }, null, 6)) : P("", !0)
573
573
  ], 64))), 256)),
574
- !K.value && A.value ? (a(), n("col", {
574
+ !K.value && V.value ? (a(), n("col", {
575
575
  key: 0,
576
- style: J({ width: R.value }),
576
+ style: J({ width: H.value }),
577
577
  class: "dsg-table--col-gutter"
578
578
  }, null, 4)) : P("", !0)
579
579
  ], 8, mt),
@@ -584,11 +584,11 @@ You can explicitly suppress this warning by setting pagination-path="".`
584
584
  M(ye, {
585
585
  fields: f.value,
586
586
  "has-select-all": e.selectable,
587
- "selected-rows": D.value,
588
- "onUpdate:selectedRows": o[0] || (o[0] = (g) => D.value = g),
587
+ "selected-rows": C.value,
588
+ "onUpdate:selectedRows": o[0] || (o[0] = (g) => C.value = g),
589
589
  "has-selected": j.value,
590
590
  "onUpdate:hasSelected": o[1] || (o[1] = (g) => j.value = g),
591
- "scroll-visible": A.value,
591
+ "scroll-visible": V.value,
592
592
  "show-expand-detail": e.hasDetailRow && e.showExpandDetail,
593
593
  "table-data-length": b.value?.length,
594
594
  "sort-field": d.value,
@@ -611,7 +611,7 @@ You can explicitly suppress this warning by setting pagination-path="".`
611
611
  colspan: Q.value
612
612
  }, [
613
613
  T(e.$slots, "dsg-table-loading", {}, () => [
614
- M(V, {
614
+ M(A, {
615
615
  icon: "loading-02",
616
616
  class: "animate-spin"
617
617
  }),
@@ -619,35 +619,35 @@ You can explicitly suppress this warning by setting pagination-path="".`
619
619
  ])
620
620
  ], 8, wt)
621
621
  ], 8, kt)
622
- ])) : (a(!0), n(L, { key: 1 }, q(b.value, (g, E) => (a(), n(L, { key: E }, [
622
+ ])) : (a(!0), n(E, { key: 1 }, q(b.value, (g, R) => (a(), n(E, { key: R }, [
623
623
  h("tr", {
624
- class: F(["dsg-table--tbody-row", { odd: E % 2 === 0, even: E % 2 !== 0, "row-selected": g.selected }]),
625
- onClick: (B) => ke(),
626
- onDblclick: (B) => we(),
627
- onMouseover: (B) => Pe()
624
+ class: F(["dsg-table--tbody-row", { odd: R % 2 === 0, even: R % 2 !== 0, "row-selected": g.selected }]),
625
+ onClick: (L) => ke(),
626
+ onDblclick: (L) => we(),
627
+ onMouseover: (L) => Pe()
628
628
  }, [
629
629
  e.selectable ? (a(), n("td", $t, [
630
630
  M(ve, {
631
631
  modelValue: g.selected,
632
- "onUpdate:modelValue": [(B) => g.selected = B, (B) => l(g)]
632
+ "onUpdate:modelValue": [(L) => g.selected = L, (L) => l(g)]
633
633
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
634
634
  ])) : P("", !0),
635
- (a(!0), n(L, null, q(f.value, (B, se) => (a(), n(L, { key: se }, [
636
- B.visible ? (a(), n("td", {
635
+ (a(!0), n(E, null, q(f.value, (L, se) => (a(), n(E, { key: se }, [
636
+ L.visible ? (a(), n("td", {
637
637
  key: 0,
638
- class: F(["dsg-table--tbody-cell", B.dataClass]),
639
- style: J({ width: B.width || void 0 }),
638
+ class: F(["dsg-table--tbody-cell", L.dataClass]),
639
+ style: J({ width: L.width || void 0 }),
640
640
  onClick: (ue) => $e(),
641
641
  onDblclick: (ue) => De(),
642
642
  onContextmenu: (ue) => Ce()
643
643
  }, [
644
- T(e.$slots, ae(B), {
644
+ T(e.$slots, ae(L), {
645
645
  rowData: g,
646
- rowIndex: E,
647
- rowField: B
646
+ rowIndex: R,
647
+ rowField: L
648
648
  }, () => [
649
649
  h("span", {
650
- innerHTML: ee(B, g)
650
+ innerHTML: ee(L, g)
651
651
  }, null, 8, Ct)
652
652
  ])
653
653
  ], 46, Dt)) : P("", !0)
@@ -660,12 +660,12 @@ You can explicitly suppress this warning by setting pagination-path="".`
660
660
  default: Z(() => [
661
661
  h("tr", {
662
662
  class: "dsg-table--tbody-detail-row",
663
- onClick: (B) => Te()
663
+ onClick: (L) => Te()
664
664
  }, [
665
665
  h("td", { colspan: Q.value }, [
666
666
  T(e.$slots, "dsg-table-detail-row", {
667
667
  rowData: g,
668
- rowIndex: E,
668
+ rowIndex: R,
669
669
  options: e.detailRowOptions
670
670
  })
671
671
  ], 8, St)
@@ -695,10 +695,10 @@ You can explicitly suppress this warning by setting pagination-path="".`
695
695
  ], 6)
696
696
  ]));
697
697
  }
698
- }), Et = { class: "dsg-table" }, Rt = { class: "dsg-table--pre-header" }, Ht = { class: "dsg-table--pre-header-left" }, It = ["textContent"], zt = { class: "dsg-table--pre-header-right" }, Vt = {
698
+ }), Et = { class: "dsg-table" }, Rt = { class: "dsg-table--pre-header" }, Ht = { class: "dsg-table--pre-header-left" }, It = ["textContent"], zt = { class: "dsg-table--pre-header-right" }, At = {
699
699
  key: 0,
700
700
  class: "dsg-table--search-header"
701
- }, At = { class: "dsg-table--search-top" }, Ot = { class: "dsg-table--footer" }, Ut = { class: "dsg-table--footer-left" }, qt = { class: "dsg-table--footer-center" }, Nt = { class: "dsg-table--footer-right" }, Wt = /* @__PURE__ */ W({
701
+ }, Vt = { class: "dsg-table--search-top" }, Ot = { class: "dsg-table--footer" }, Ut = { class: "dsg-table--footer-left" }, qt = { class: "dsg-table--footer-center" }, Nt = { class: "dsg-table--footer-right" }, Wt = /* @__PURE__ */ W({
702
702
  __name: "DsgTable",
703
703
  props: {
704
704
  getUrl: {},
@@ -716,7 +716,7 @@ You can explicitly suppress this warning by setting pagination-path="".`
716
716
  filterSearchEndpoint: { default: "" },
717
717
  tableLayout: { default: "fixed" }
718
718
  },
719
- emits: ["dsg-table:action-edit", "dsg-table:action-view", "dsg-table:action-delete", "dsg-table:link-clicked", "dsg-table:rows-selected", "dsg-table:filter-updated", "dsg-table:term-changed"],
719
+ emits: ["dsg-table:action-edit", "dsg-table:action-view", "dsg-table:action-delete", "dsg-table:action-archive", "dsg-table:link-clicked", "dsg-table:rows-selected", "dsg-table:filter-updated", "dsg-table:term-changed"],
720
720
  setup(t, { expose: $, emit: v }) {
721
721
  const i = (l) => {
722
722
  d.value = l;
@@ -731,12 +731,12 @@ You can explicitly suppress this warning by setting pagination-path="".`
731
731
  }), l;
732
732
  } else
733
733
  return {};
734
- }, m = Re(), p = y(!0), R = y(null), A = y("<p>Showing {from} to {to} of {total}</p>"), r = y(null), k = ge("dsgTable"), s = y({ perPage: 20, change: i }), d = y(20), u = y(b()), C = v, I = (l) => {
734
+ }, m = Re(), p = y(!0), H = y(null), V = y("<p>Showing {from} to {to} of {total}</p>"), r = y(null), k = ge("dsgTable"), s = y({ perPage: 20, change: i }), d = y(20), u = y(b()), D = v, I = (l) => {
735
735
  k.value?.changePage(l);
736
- }, D = (l) => {
736
+ }, C = (l) => {
737
737
  r.value = l;
738
738
  }, j = ({ data: l }) => {
739
- R.value = l;
739
+ H.value = l;
740
740
  }, K = () => {
741
741
  p.value === !1 && k.value?.reload();
742
742
  }, Q = (l) => {
@@ -746,9 +746,9 @@ You can explicitly suppress this warning by setting pagination-path="".`
746
746
  }, z = (l) => {
747
747
  u.value = l;
748
748
  }, ee = (l) => {
749
- u.value["filter[term]"] = l, C("dsg-table:term-changed", l);
749
+ u.value["filter[term]"] = l, D("dsg-table:term-changed", l);
750
750
  }, ae = (l, c, w) => {
751
- u.value = { "filter[term]": u.value["filter[term]"], ...l }, C("dsg-table:filter-updated", u.value, c, w);
751
+ u.value = { "filter[term]": u.value["filter[term]"], ...l }, D("dsg-table:filter-updated", u.value, c, w);
752
752
  };
753
753
  return $({
754
754
  reloadTable: K,
@@ -760,7 +760,7 @@ You can explicitly suppress this warning by setting pagination-path="".`
760
760
  T(l.$slots, "dsg-table--pre-header", {}, () => [
761
761
  h("div", Ht, [
762
762
  T(l.$slots, "dsg-table--page-title", {
763
- data: R.value,
763
+ data: H.value,
764
764
  title: l.title
765
765
  }, () => [
766
766
  l.title.length > 0 ? (a(), n("h1", {
@@ -771,13 +771,13 @@ You can explicitly suppress this warning by setting pagination-path="".`
771
771
  ])
772
772
  ]),
773
773
  h("div", zt, [
774
- T(l.$slots, "dsg-table--page-actions", { data: R.value })
774
+ T(l.$slots, "dsg-table--page-actions", { data: H.value })
775
775
  ])
776
776
  ])
777
777
  ]),
778
- l.displayPaginationInfo ? (a(), n("div", Vt, [
779
- h("div", At, [
780
- T(l.$slots, "dsg-table--search-header", { data: R.value }, () => [
778
+ l.displayPaginationInfo ? (a(), n("div", At, [
779
+ h("div", Vt, [
780
+ T(l.$slots, "dsg-table--search-header", { data: H.value }, () => [
781
781
  M(me, {
782
782
  name: "term",
783
783
  "onDsgTable:termChanged": c[0] || (c[0] = (w) => ee(w))
@@ -787,9 +787,9 @@ You can explicitly suppress this warning by setting pagination-path="".`
787
787
  "filter-endpoint": l.filterEndpoint,
788
788
  "search-endpoint": l.filterSearchEndpoint,
789
789
  filters: l.filters,
790
- "onDsgTable:filterUpdated": c[1] || (c[1] = (w, S, H) => ae(w, S, H))
790
+ "onDsgTable:filterUpdated": c[1] || (c[1] = (w, S, B) => ae(w, S, B))
791
791
  }, null, 8, ["entity", "filter-endpoint", "search-endpoint", "filters"]),
792
- T(l.$slots, "dsg-table--search-actions", { data: R.value })
792
+ T(l.$slots, "dsg-table--search-actions", { data: H.value })
793
793
  ])
794
794
  ]),
795
795
  T(l.$slots, "dsg-table--search-navigation")
@@ -798,9 +798,9 @@ You can explicitly suppress this warning by setting pagination-path="".`
798
798
  ref: "dsgTable",
799
799
  "api-url": l.getUrl,
800
800
  "filter-params": u.value,
801
- "onUpdate:filterParams": c[6] || (c[6] = (w) => u.value = w),
801
+ "onUpdate:filterParams": c[7] || (c[7] = (w) => u.value = w),
802
802
  "per-page": d.value,
803
- "onUpdate:perPage": c[7] || (c[7] = (w) => d.value = w),
803
+ "onUpdate:perPage": c[8] || (c[8] = (w) => d.value = w),
804
804
  fields: l.fields,
805
805
  "load-on-start": l.loadOnStart,
806
806
  "pagination-path": "meta",
@@ -808,21 +808,22 @@ You can explicitly suppress this warning by setting pagination-path="".`
808
808
  "track-by": l.trackBy,
809
809
  "table-layout": l.tableLayout,
810
810
  css: { tableWrapper: "border-b" },
811
- "onDsgTable:loading": c[8] || (c[8] = (w) => p.value = !0),
812
- "onDsgTable:loaded": c[9] || (c[9] = (w) => p.value = !1),
813
- "onDsgTable:paginationData": D,
811
+ "onDsgTable:loading": c[9] || (c[9] = (w) => p.value = !0),
812
+ "onDsgTable:loaded": c[10] || (c[10] = (w) => p.value = !1),
813
+ "onDsgTable:paginationData": C,
814
814
  "onDsgTable:loadSuccess": j,
815
- "onDsgTable:rowsSelected": c[10] || (c[10] = (w) => C("dsg-table:rows-selected", w))
815
+ "onDsgTable:rowsSelected": c[11] || (c[11] = (w) => D("dsg-table:rows-selected", w))
816
816
  }, He({
817
817
  "dsg-field--actions": Z((w) => [
818
818
  T(l.$slots, "dsg-table-actions", { data: w }, () => [
819
819
  (a(), N(he, {
820
820
  key: w.rowIndex,
821
821
  data: w,
822
- "onDsgTable:actionEdit": c[2] || (c[2] = (S, H) => C("dsg-table:action-edit", S, H)),
823
- "onDsgTable:actionView": c[3] || (c[3] = (S, H) => C("dsg-table:action-view", S, H)),
824
- "onDsgTable:actionDelete": c[4] || (c[4] = (S, H) => C("dsg-table:action-delete", S, H)),
825
- "onDsgTable:linkClicked": c[5] || (c[5] = (S, H, G) => C("dsg-table:link-clicked", S, H, G))
822
+ "onDsgTable:actionEdit": c[2] || (c[2] = (S, B) => D("dsg-table:action-edit", S, B)),
823
+ "onDsgTable:actionView": c[3] || (c[3] = (S, B) => D("dsg-table:action-view", S, B)),
824
+ "onDsgTable:actionDelete": c[4] || (c[4] = (S, B) => D("dsg-table:action-delete", S, B)),
825
+ "onDsgTable:actionArchive": c[5] || (c[5] = (S, B) => D("dsg-table:action-archive", S, B)),
826
+ "onDsgTable:linkClicked": c[6] || (c[6] = (S, B, G) => D("dsg-table:link-clicked", S, B, G))
826
827
  }, null, 8, ["data"]))
827
828
  ])
828
829
  ]),
@@ -830,8 +831,8 @@ You can explicitly suppress this warning by setting pagination-path="".`
830
831
  }, [
831
832
  q(U(m), (w, S) => ({
832
833
  name: S,
833
- fn: Z(({ rowData: H, rowField: G, rowIndex: le }) => [
834
- String(S) !== "dsg-field--actions" ? T(l.$slots, S, Ie(ze({ key: 0 }, { rowData: H, rowField: G, rowIndex: le }))) : P("", !0)
834
+ fn: Z(({ rowData: B, rowField: G, rowIndex: le }) => [
835
+ String(S) !== "dsg-field--actions" ? T(l.$slots, S, Ie(ze({ key: 0 }, { rowData: B, rowField: G, rowIndex: le }))) : P("", !0)
835
836
  ])
836
837
  }))
837
838
  ]), 1032, ["api-url", "filter-params", "per-page", "fields", "load-on-start", "selectable", "track-by", "table-layout"]),
@@ -845,8 +846,8 @@ You can explicitly suppress this warning by setting pagination-path="".`
845
846
  "no-data-template": "",
846
847
  ref: "paginationInfoStart",
847
848
  pagination: r.value,
848
- "onUpdate:pagination": c[11] || (c[11] = (w) => r.value = w),
849
- "info-template": A.value
849
+ "onUpdate:pagination": c[12] || (c[12] = (w) => r.value = w),
850
+ "info-template": V.value
850
851
  }, null, 8, ["pagination", "info-template"]),
851
852
  T(l.$slots, "dsg-table--footer-left-extras", {
852
853
  data: r.value,
@@ -874,7 +875,7 @@ You can explicitly suppress this warning by setting pagination-path="".`
874
875
  key: 0,
875
876
  ref: "pagination",
876
877
  pagination: r.value,
877
- "onUpdate:pagination": c[12] || (c[12] = (w) => r.value = w),
878
+ "onUpdate:pagination": c[13] || (c[13] = (w) => r.value = w),
878
879
  "onDsgTable:changePage": I
879
880
  }, null, 8, ["pagination"])) : P("", !0),
880
881
  T(l.$slots, "dsg-table--footer-right-extras", {
@@ -899,13 +900,13 @@ You can explicitly suppress this warning by setting pagination-path="".`
899
900
  class: "dsg-table--per-page-select",
900
901
  onChange: v[1] || (v[1] = (i) => $.perPage.change($.perPage.perPage))
901
902
  }, [
902
- (a(!0), n(L, null, q($.perPageOptions, (i) => (a(), n("option", {
903
+ (a(!0), n(E, null, q($.perPageOptions, (i) => (a(), n("option", {
903
904
  key: i,
904
905
  value: i,
905
906
  textContent: _(i)
906
907
  }, null, 8, Kt))), 128))
907
908
  ], 544), [
908
- [Ve, $.perPage.perPage]
909
+ [Ae, $.perPage.perPage]
909
910
  ])
910
911
  ]));
911
912
  }
package/dist/table.d.ts CHANGED
@@ -13,6 +13,7 @@ export declare const DsgTable: {
13
13
  "onDsg-table:action-edit"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
14
14
  "onDsg-table:action-view"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
15
15
  "onDsg-table:action-delete"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
16
+ "onDsg-table:action-archive"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
16
17
  "onDsg-table:link-clicked"?: ((ev: Event, actionId: string | number, rowData: Record<string, any>) => any) | undefined;
17
18
  "onDsg-table:term-changed"?: ((term: string | null) => any) | undefined;
18
19
  "onDsg-table:filter-updated"?: ((params: any, payload: any, activeFacet: import('./main').DsgSearchFacet | null | undefined) => any) | undefined;
@@ -26,6 +27,7 @@ export declare const DsgTable: {
26
27
  "dsg-table:action-edit": (ev: Event, rowData: Record<string, any>) => any;
27
28
  "dsg-table:action-view": (ev: Event, rowData: Record<string, any>) => any;
28
29
  "dsg-table:action-delete": (ev: Event, rowData: Record<string, any>) => any;
30
+ "dsg-table:action-archive": (ev: Event, rowData: Record<string, any>) => any;
29
31
  "dsg-table:link-clicked": (ev: Event, actionId: string | number, rowData: Record<string, any>) => any;
30
32
  "dsg-table:term-changed": (term: string | null) => any;
31
33
  "dsg-table:filter-updated": (params: any, payload: any, activeFacet: import('./main').DsgSearchFacet | null | undefined) => any;
@@ -240,6 +242,7 @@ export declare const DsgTable: {
240
242
  "onDsg-table:action-edit"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
241
243
  "onDsg-table:action-view"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
242
244
  "onDsg-table:action-delete"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
245
+ "onDsg-table:action-archive"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
243
246
  "onDsg-table:link-clicked"?: ((ev: Event, actionId: string | number, rowData: Record<string, any>) => any) | undefined;
244
247
  "onDsg-table:term-changed"?: ((term: string | null) => any) | undefined;
245
248
  "onDsg-table:filter-updated"?: ((params: any, payload: any, activeFacet: import('./main').DsgSearchFacet | null | undefined) => any) | undefined;
@@ -257,6 +260,7 @@ export declare const DsgTable: {
257
260
  "onDsg-table:action-edit"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
258
261
  "onDsg-table:action-view"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
259
262
  "onDsg-table:action-delete"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
263
+ "onDsg-table:action-archive"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
260
264
  "onDsg-table:link-clicked"?: ((ev: Event, actionId: string | number, rowData: Record<string, any>) => any) | undefined;
261
265
  "onDsg-table:term-changed"?: ((term: string | null) => any) | undefined;
262
266
  "onDsg-table:filter-updated"?: ((params: any, payload: any, activeFacet: import('./main').DsgSearchFacet | null | undefined) => any) | undefined;
@@ -270,6 +274,7 @@ export declare const DsgTable: {
270
274
  "dsg-table:action-edit": (ev: Event, rowData: Record<string, any>) => any;
271
275
  "dsg-table:action-view": (ev: Event, rowData: Record<string, any>) => any;
272
276
  "dsg-table:action-delete": (ev: Event, rowData: Record<string, any>) => any;
277
+ "dsg-table:action-archive": (ev: Event, rowData: Record<string, any>) => any;
273
278
  "dsg-table:link-clicked": (ev: Event, actionId: string | number, rowData: Record<string, any>) => any;
274
279
  "dsg-table:term-changed": (term: string | null) => any;
275
280
  "dsg-table:filter-updated": (params: any, payload: any, activeFacet: import('./main').DsgSearchFacet | null | undefined) => any;
@@ -1475,6 +1480,7 @@ declare const _default: {
1475
1480
  "onDsg-table:action-edit"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
1476
1481
  "onDsg-table:action-view"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
1477
1482
  "onDsg-table:action-delete"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
1483
+ "onDsg-table:action-archive"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
1478
1484
  "onDsg-table:link-clicked"?: ((ev: Event, actionId: string | number, rowData: Record<string, any>) => any) | undefined;
1479
1485
  "onDsg-table:term-changed"?: ((term: string | null) => any) | undefined;
1480
1486
  "onDsg-table:filter-updated"?: ((params: any, payload: any, activeFacet: import('./main').DsgSearchFacet | null | undefined) => any) | undefined;
@@ -1488,6 +1494,7 @@ declare const _default: {
1488
1494
  "dsg-table:action-edit": (ev: Event, rowData: Record<string, any>) => any;
1489
1495
  "dsg-table:action-view": (ev: Event, rowData: Record<string, any>) => any;
1490
1496
  "dsg-table:action-delete": (ev: Event, rowData: Record<string, any>) => any;
1497
+ "dsg-table:action-archive": (ev: Event, rowData: Record<string, any>) => any;
1491
1498
  "dsg-table:link-clicked": (ev: Event, actionId: string | number, rowData: Record<string, any>) => any;
1492
1499
  "dsg-table:term-changed": (term: string | null) => any;
1493
1500
  "dsg-table:filter-updated": (params: any, payload: any, activeFacet: import('./main').DsgSearchFacet | null | undefined) => any;
@@ -1702,6 +1709,7 @@ declare const _default: {
1702
1709
  "onDsg-table:action-edit"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
1703
1710
  "onDsg-table:action-view"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
1704
1711
  "onDsg-table:action-delete"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
1712
+ "onDsg-table:action-archive"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
1705
1713
  "onDsg-table:link-clicked"?: ((ev: Event, actionId: string | number, rowData: Record<string, any>) => any) | undefined;
1706
1714
  "onDsg-table:term-changed"?: ((term: string | null) => any) | undefined;
1707
1715
  "onDsg-table:filter-updated"?: ((params: any, payload: any, activeFacet: import('./main').DsgSearchFacet | null | undefined) => any) | undefined;
@@ -1719,6 +1727,7 @@ declare const _default: {
1719
1727
  "onDsg-table:action-edit"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
1720
1728
  "onDsg-table:action-view"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
1721
1729
  "onDsg-table:action-delete"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
1730
+ "onDsg-table:action-archive"?: ((ev: Event, rowData: Record<string, any>) => any) | undefined;
1722
1731
  "onDsg-table:link-clicked"?: ((ev: Event, actionId: string | number, rowData: Record<string, any>) => any) | undefined;
1723
1732
  "onDsg-table:term-changed"?: ((term: string | null) => any) | undefined;
1724
1733
  "onDsg-table:filter-updated"?: ((params: any, payload: any, activeFacet: import('./main').DsgSearchFacet | null | undefined) => any) | undefined;
@@ -1732,6 +1741,7 @@ declare const _default: {
1732
1741
  "dsg-table:action-edit": (ev: Event, rowData: Record<string, any>) => any;
1733
1742
  "dsg-table:action-view": (ev: Event, rowData: Record<string, any>) => any;
1734
1743
  "dsg-table:action-delete": (ev: Event, rowData: Record<string, any>) => any;
1744
+ "dsg-table:action-archive": (ev: Event, rowData: Record<string, any>) => any;
1735
1745
  "dsg-table:link-clicked": (ev: Event, actionId: string | number, rowData: Record<string, any>) => any;
1736
1746
  "dsg-table:term-changed": (term: string | null) => any;
1737
1747
  "dsg-table:filter-updated": (params: any, payload: any, activeFacet: import('./main').DsgSearchFacet | null | undefined) => any;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dcodegroup-au/dsg-vue",
3
3
  "description": "Front-end Vue/Tailwind DSG for UntitledUI.",
4
- "version": "0.0.28",
4
+ "version": "0.0.29",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "preinstall": "npx only-allow pnpm",