@prefabs.tech/vue3-tanstack-table 0.16.0 → 0.18.0
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.
- package/dist/PrefabsTechVue3TanstackTable.es.js +30 -10
- package/dist/PrefabsTechVue3TanstackTable.umd.js +1 -1
- package/dist/src/components/FilesPresentation/Index.vue.d.ts +9 -0
- package/dist/src/components/FilesPresentation/Index.vue.d.ts.map +1 -1
- package/dist/src/components/FilesTable/Index.vue.d.ts +9 -0
- package/dist/src/components/FilesTable/Index.vue.d.ts.map +1 -1
- package/dist/src/components/Table.vue.d.ts +9 -0
- package/dist/src/components/Table.vue.d.ts.map +1 -1
- package/dist/src/components/TableBody.vue.d.ts +9 -0
- package/dist/src/components/TableBody.vue.d.ts.map +1 -1
- package/dist/vue3-tanstack-table.css +1 -1
- package/package.json +5 -5
|
@@ -3450,6 +3450,10 @@ const ri = { class: "pagination" }, li = {
|
|
|
3450
3450
|
type: String
|
|
3451
3451
|
},
|
|
3452
3452
|
enableRowSelection: Boolean,
|
|
3453
|
+
locale: {
|
|
3454
|
+
default: void 0,
|
|
3455
|
+
type: String
|
|
3456
|
+
},
|
|
3453
3457
|
table: {
|
|
3454
3458
|
required: !0,
|
|
3455
3459
|
type: Object
|
|
@@ -3465,25 +3469,25 @@ const ri = { class: "pagination" }, li = {
|
|
|
3465
3469
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3466
3470
|
number: (g) => vt({
|
|
3467
3471
|
value: Number(g),
|
|
3468
|
-
locale: s?.locale,
|
|
3472
|
+
locale: s?.locale ?? o.locale,
|
|
3469
3473
|
formatOptions: s?.formatOptions
|
|
3470
3474
|
}),
|
|
3471
3475
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3472
3476
|
date: (g) => on(
|
|
3473
3477
|
g,
|
|
3474
|
-
l?.locale,
|
|
3478
|
+
l?.locale ?? o.locale,
|
|
3475
3479
|
l?.formatOptions
|
|
3476
3480
|
),
|
|
3477
3481
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3478
3482
|
datetime: (g) => ke(
|
|
3479
3483
|
g,
|
|
3480
|
-
l?.locale,
|
|
3484
|
+
l?.locale ?? o.locale,
|
|
3481
3485
|
l?.formatOptions
|
|
3482
3486
|
),
|
|
3483
3487
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3484
3488
|
currency: (g) => vt({
|
|
3485
3489
|
value: Number(g),
|
|
3486
|
-
locale: s?.locale,
|
|
3490
|
+
locale: s?.locale ?? o.locale,
|
|
3487
3491
|
formatOptions: {
|
|
3488
3492
|
style: "currency",
|
|
3489
3493
|
currency: "USD",
|
|
@@ -3957,6 +3961,10 @@ const ri = { class: "pagination" }, li = {
|
|
|
3957
3961
|
},
|
|
3958
3962
|
isLoading: Boolean,
|
|
3959
3963
|
isServerTable: Boolean,
|
|
3964
|
+
locale: {
|
|
3965
|
+
default: void 0,
|
|
3966
|
+
type: String
|
|
3967
|
+
},
|
|
3960
3968
|
paginated: {
|
|
3961
3969
|
default: !0,
|
|
3962
3970
|
type: Boolean
|
|
@@ -4214,8 +4222,9 @@ const ri = { class: "pagination" }, li = {
|
|
|
4214
4222
|
M($i, {
|
|
4215
4223
|
"custom-formatters": e.customFormatters,
|
|
4216
4224
|
"empty-table-message": e.emptyTableMessage,
|
|
4225
|
+
locale: e.locale,
|
|
4217
4226
|
table: h.value
|
|
4218
|
-
}, null, 8, ["custom-formatters", "empty-table-message", "table"]),
|
|
4227
|
+
}, null, 8, ["custom-formatters", "empty-table-message", "locale", "table"]),
|
|
4219
4228
|
v.$slots.footer ? (S(), y("tfoot", Ui, [
|
|
4220
4229
|
J(v.$slots, "footer")
|
|
4221
4230
|
])) : V("", !0)
|
|
@@ -4261,6 +4270,10 @@ const ri = { class: "pagination" }, li = {
|
|
|
4261
4270
|
},
|
|
4262
4271
|
isLoading: Boolean,
|
|
4263
4272
|
isServerTable: Boolean,
|
|
4273
|
+
locale: {
|
|
4274
|
+
default: void 0,
|
|
4275
|
+
type: String
|
|
4276
|
+
},
|
|
4264
4277
|
persistState: Boolean,
|
|
4265
4278
|
persistStateStorage: {
|
|
4266
4279
|
default: "localStorage",
|
|
@@ -4336,7 +4349,7 @@ const ri = { class: "pagination" }, li = {
|
|
|
4336
4349
|
},
|
|
4337
4350
|
{
|
|
4338
4351
|
accessorKey: "uploadedAt",
|
|
4339
|
-
cell: ({ getValue: u }) => ke(u()),
|
|
4352
|
+
cell: ({ getValue: u }) => ke(u(), t.locale),
|
|
4340
4353
|
enableColumnFilter: !0,
|
|
4341
4354
|
enableSorting: !0,
|
|
4342
4355
|
filterPlaceholder: "Date range",
|
|
@@ -4359,7 +4372,7 @@ const ri = { class: "pagination" }, li = {
|
|
|
4359
4372
|
},
|
|
4360
4373
|
{
|
|
4361
4374
|
accessorKey: "lastDownloadedAt",
|
|
4362
|
-
cell: ({ getValue: u }) => u() ? ke(u()) : X("code", {}, "—"),
|
|
4375
|
+
cell: ({ getValue: u }) => u() ? ke(u(), t.locale) : X("code", {}, "—"),
|
|
4363
4376
|
enableColumnFilter: !0,
|
|
4364
4377
|
enableSorting: !0,
|
|
4365
4378
|
filterPlaceholder: "Date range",
|
|
@@ -4454,6 +4467,7 @@ const ri = { class: "pagination" }, li = {
|
|
|
4454
4467
|
"initial-sorting": e.initialSorting,
|
|
4455
4468
|
"is-loading": e.isLoading,
|
|
4456
4469
|
"is-server-table": e.isServerTable,
|
|
4470
|
+
locale: String(e.locale),
|
|
4457
4471
|
"persist-state": e.persistState,
|
|
4458
4472
|
"persist-state-storage": e.persistStateStorage,
|
|
4459
4473
|
"total-records": e.totalRecords,
|
|
@@ -4484,7 +4498,7 @@ const ri = { class: "pagination" }, li = {
|
|
|
4484
4498
|
]),
|
|
4485
4499
|
key: "2"
|
|
4486
4500
|
} : void 0
|
|
4487
|
-
]), 1040, ["id", "columns-data", "data", "data-action-menu", "empty-table-message", "initial-sorting", "is-loading", "is-server-table", "persist-state", "persist-state-storage", "total-records", "visible-columns"]));
|
|
4501
|
+
]), 1040, ["id", "columns-data", "data", "data-action-menu", "empty-table-message", "initial-sorting", "is-loading", "is-server-table", "locale", "persist-state", "persist-state-storage", "total-records", "visible-columns"]));
|
|
4488
4502
|
}
|
|
4489
4503
|
}), Ji = {
|
|
4490
4504
|
name: "FilesPresentation"
|
|
@@ -4515,6 +4529,10 @@ const ri = { class: "pagination" }, li = {
|
|
|
4515
4529
|
},
|
|
4516
4530
|
type: Object
|
|
4517
4531
|
},
|
|
4532
|
+
locale: {
|
|
4533
|
+
default: void 0,
|
|
4534
|
+
type: String
|
|
4535
|
+
},
|
|
4518
4536
|
presentation: {
|
|
4519
4537
|
default: () => "list",
|
|
4520
4538
|
type: String,
|
|
@@ -4575,6 +4593,7 @@ const ri = { class: "pagination" }, li = {
|
|
|
4575
4593
|
"action-buttons-visibility": e.actionButtonsVisibility,
|
|
4576
4594
|
files: e.files,
|
|
4577
4595
|
"file-detail-visibility": i.value,
|
|
4596
|
+
locale: e.locale,
|
|
4578
4597
|
messages: e.messages,
|
|
4579
4598
|
"onAction:archive": s[0] || (s[0] = (a) => r("archive", a)),
|
|
4580
4599
|
"onAction:delete": s[1] || (s[1] = (a) => r("delete", a)),
|
|
@@ -4582,12 +4601,13 @@ const ri = { class: "pagination" }, li = {
|
|
|
4582
4601
|
"onAction:edit": s[3] || (s[3] = (a) => r("edit", a)),
|
|
4583
4602
|
"onAction:share": s[4] || (s[4] = (a) => r("share", a)),
|
|
4584
4603
|
"onAction:view": s[5] || (s[5] = (a) => r("view", a))
|
|
4585
|
-
}), null, 16, ["action-buttons-visibility", "files", "file-detail-visibility", "messages"])) : (S(), E(Yi, ne({ key: 1 }, e.tableProps, {
|
|
4604
|
+
}), null, 16, ["action-buttons-visibility", "files", "file-detail-visibility", "locale", "messages"])) : (S(), E(Yi, ne({ key: 1 }, e.tableProps, {
|
|
4586
4605
|
"archive-file": e.actionButtonsVisibility.archive,
|
|
4587
4606
|
"delete-file": e.actionButtonsVisibility.delete,
|
|
4588
4607
|
"download-file": e.actionButtonsVisibility.download,
|
|
4589
4608
|
"edit-description": e.actionButtonsVisibility.edit,
|
|
4590
4609
|
files: e.files,
|
|
4610
|
+
locale: e.locale,
|
|
4591
4611
|
messages: e.messages,
|
|
4592
4612
|
"share-file": e.actionButtonsVisibility.share,
|
|
4593
4613
|
"view-file": e.actionButtonsVisibility.view,
|
|
@@ -4598,7 +4618,7 @@ const ri = { class: "pagination" }, li = {
|
|
|
4598
4618
|
"onAction:edit": s[9] || (s[9] = (a) => r("edit", a)),
|
|
4599
4619
|
"onAction:share": s[10] || (s[10] = (a) => r("share", a)),
|
|
4600
4620
|
"onAction:view": s[11] || (s[11] = (a) => r("view", a))
|
|
4601
|
-
}), null, 16, ["archive-file", "delete-file", "download-file", "edit-description", "files", "messages", "share-file", "view-file", "visible-columns"]));
|
|
4621
|
+
}), null, 16, ["archive-file", "delete-file", "download-file", "edit-description", "files", "locale", "messages", "share-file", "view-file", "visible-columns"]));
|
|
4602
4622
|
}
|
|
4603
4623
|
}), Zi = { class: "table-wrapper" }, er = {
|
|
4604
4624
|
key: 0,
|
|
@@ -19,4 +19,4 @@
|
|
|
19
19
|
* LICENSE.md file in the root directory of this source tree.
|
|
20
20
|
*
|
|
21
21
|
* @license MIT
|
|
22
|
-
*/function ae(){return!0}const co=Symbol("merge-proxy"),go={get(e,o,t){return o===co?t:e.get(o)},has(e,o){return e.has(o)},set:ae,deleteProperty:ae,getOwnPropertyDescriptor(e,o){return{configurable:!0,enumerable:!0,get(){return e.get(o)},set:ae,deleteProperty:ae}},ownKeys(e){return e.keys()}};function De(e){return"value"in e?e.value:e}function U(){for(var e=arguments.length,o=new Array(e),t=0;t<e;t++)o[t]=arguments[t];return new Proxy({get(n){for(let r=o.length-1;r>=0;r--){const i=De(o[r])[n];if(i!==void 0)return i}},has(n){for(let r=o.length-1;r>=0;r--)if(n in De(o[r]))return!0;return!1},keys(){const n=[];for(let r=0;r<o.length;r++)n.push(...Object.keys(De(o[r])));return[...Array.from(new Set(n))]}},go)}const X=l.defineComponent({props:["render","props"],setup:e=>()=>typeof e.render=="function"||typeof e.render=="object"?l.h(e.render,e.props):e.render});function Rt(e){return U(e,{data:l.unref(e.data)})}function Ft(e){const o=l.isRef(e.data),t=U({state:{},onStateChange:()=>{},renderFallbackValue:null,mergeOptions(i,s){return o?{...i,...s}:U(i,s)}},o?Rt(e):e),n=io(t);if(o){const i=l.shallowRef(e.data);l.watch(i,()=>{n.setState(s=>({...s,data:i.value}))},{immediate:!0})}const r=l.ref(n.initialState);return l.watchEffect(()=>{n.setOptions(i=>{var s;const a=new Proxy({},{get:(u,d)=>r.value[d]});return U(i,o?Rt(e):e,{state:U(a,(s=e.state)!=null?s:{}),onStateChange:u=>{u instanceof Function?r.value=u(r.value):r.value=u,e.onStateChange==null||e.onStateChange(u)}})})}),n}var k=(e=>(e.BETWEEN="between",e.CONTAINS="contains",e.ENDS_WITH="endsWith",e.EQUALS="equals",e.GREATER_THAN="greaterThan",e.GREATER_THAN_OR_EQUAL="greaterThanOrEqual",e.IN="in",e.IS_EMPTY="isEmpty",e.IS_NOT_EMPTY="isNotEmpty",e.IS_NOT_NULL="isNotNull",e.IS_NULL="isNull",e.LESS_THAN="lessThan",e.LESS_THAN_OR_EQUAL="lessThanOrEqual",e.LIKE="like",e.NOT_BETWEEN="notBetween",e.NOT_EQUAL="notEqual",e.NOT_IN="notIn",e.NOT_LIKE="notLike",e.STARTS_WITH="startsWith",e))(k||{}),I=(e=>(e.BETWEEN="bt",e.CONTAINS="ct",e.EMPTY="empty",e.ENDS_WITH="ew",e.EQUALS="eq",e.GREATER_THAN="gt",e.GREATER_THAN_OR_EQUAL="gte",e.IN="in",e.LESS_THAN="lt",e.LESS_THAN_OR_EQUAL="lte",e.LIKE="like",e.NULL="null",e.STARTS_WITH="sw",e))(I||{});const fo={class:"pagination"},po={key:0,class:"items-per-page-control"},mo=["value"],ho=["value"],So={key:1,class:"page-input-control"},wo={key:2,class:"pagination-buttons-wrapper"},Co={key:0},yo={key:1},Ro={key:1},Fo={key:3},bo={name:"TablePagination"},Po=l.defineComponent({...bo,props:{currentPage:{required:!0,type:Number},defaultItemsPerPage:{default:void 0,type:Number},inputDebounceTime:{default:void 0,type:Number},itemsPerPageControlLabel:{default:"Items per page",type:String},itemsPerPageOptions:{default:()=>[5,10,20,30],type:Array},pageInputLabel:{default:"Go to page:",type:String},showFirstLastButtons:{default:!0,type:Boolean},showItemsPerPageControl:{default:!0,type:Boolean},showPageButtons:{default:!1,type:Boolean},showPageInput:{type:Boolean,default:!1},showPreviousNextButtons:{default:!0,type:Boolean},totalItems:{required:!0,type:Number}},emits:["update:currentPage","update:itemsPerPage"],setup(e,{emit:o}){const t=e,n=o,r=l.ref(t.defaultItemsPerPage||t.itemsPerPageOptions[0]),i=l.computed(()=>Math.ceil(t.totalItems/r.value)),s=l.computed(()=>Array.from({length:i.value},(d,c)=>c+1)),a=d=>{const c=parseInt(d.target.value,10);r.value=c,n("update:itemsPerPage",r.value)},u=d=>{const c=parseInt(d.toString(),10)-1;!isNaN(c)&&c>=0&&c<i.value&&n("update:currentPage",c)};return(d,c)=>(l.openBlock(),l.createElementBlock("div",fo,[e.showItemsPerPageControl?(l.openBlock(),l.createElementBlock("div",po,[l.createElementVNode("span",null,l.toDisplayString(e.itemsPerPageControlLabel),1),l.createElementVNode("select",{value:r.value,onChange:a},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.itemsPerPageOptions,p=>(l.openBlock(),l.createElementBlock("option",{key:`items-per-page-option-${p}`,value:p},l.toDisplayString(p),9,ho))),128))],40,mo)])):l.createCommentVNode("",!0),i.value>1&&e.showPageInput?(l.openBlock(),l.createElementBlock("div",So,[l.createElementVNode("span",null,l.toDisplayString(e.pageInputLabel),1),l.createVNode(l.unref(x.DebouncedInput),{type:"number","debounce-time":e.inputDebounceTime,"onUpdate:modelValue":u},null,8,["debounce-time"])])):l.createCommentVNode("",!0),i.value>1?(l.openBlock(),l.createElementBlock("div",wo,[e.showFirstLastButtons||e.showPreviousNextButtons?(l.openBlock(),l.createElementBlock("div",Co,[e.showFirstLastButtons?(l.openBlock(),l.createBlock(l.unref(x.ButtonElement),{key:0,disabled:!(e.currentPage>0),class:"first-page",size:"small",onClick:c[0]||(c[0]=p=>d.$emit("update:currentPage",0))},{iconLeft:l.withCtx(()=>[l.createVNode(l.unref(_),{icon:"prime:angle-double-left"})]),_:1},8,["disabled"])):l.createCommentVNode("",!0),e.showPreviousNextButtons?(l.openBlock(),l.createBlock(l.unref(x.ButtonElement),{key:1,disabled:!(e.currentPage>0),class:"previous-page",size:"small",onClick:c[1]||(c[1]=p=>d.$emit("update:currentPage",e.currentPage-1))},{iconLeft:l.withCtx(()=>[l.createVNode(l.unref(_),{icon:"prime:angle-left"})]),_:1},8,["disabled"])):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0),l.createElementVNode("div",null,[e.showPageButtons?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(s.value,p=>(l.openBlock(),l.createBlock(l.unref(x.ButtonElement),{key:`page-button-${p}`,class:l.normalizeClass(`page-button ${p===e.currentPage+1?"active":""}`),label:`${p}`,size:"small",onClick:f=>d.$emit("update:currentPage",p-1)},null,8,["class","label","onClick"]))),128)):(l.openBlock(),l.createElementBlock("span",yo,l.toDisplayString(`${e.currentPage+1} / ${i.value}`),1))]),e.showFirstLastButtons||e.showPreviousNextButtons?(l.openBlock(),l.createElementBlock("div",Ro,[e.showPreviousNextButtons?(l.openBlock(),l.createBlock(l.unref(x.ButtonElement),{key:0,disabled:!(e.currentPage<i.value-1),class:"next-page",size:"small",onClick:c[2]||(c[2]=p=>d.$emit("update:currentPage",e.currentPage+1))},{iconLeft:l.withCtx(()=>[l.createVNode(l.unref(_),{icon:"prime:angle-right"})]),_:1},8,["disabled"])):l.createCommentVNode("",!0),e.showFirstLastButtons?(l.openBlock(),l.createBlock(l.unref(x.ButtonElement),{key:1,disabled:!(e.currentPage<i.value-1),class:"last-page",size:"small",onClick:c[3]||(c[3]=p=>d.$emit("update:currentPage",i.value-1))},{iconLeft:l.withCtx(()=>[l.createVNode(l.unref(_),{icon:"prime:angle-double-right"})]),_:1},8,["disabled"])):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)])):(l.openBlock(),l.createElementBlock("span",Fo,l.toDisplayString(`${e.currentPage+1} / ${i.value}`),1))]))}}),_e=0,ko=[10,20,30],Vo=10,bt="table",Pt=({value:e,locale:o="en-GB",formatOptions:t})=>typeof e!="number"||isNaN(e)?e:new Intl.NumberFormat(o,t).format(e),Y=e=>{switch(e){case k.CONTAINS:return{operator:I.CONTAINS};case k.STARTS_WITH:return{operator:I.STARTS_WITH};case k.ENDS_WITH:return{operator:I.ENDS_WITH};case k.EQUALS:return{operator:I.EQUALS};case k.NOT_EQUAL:return{operator:I.EQUALS,not:!0};case k.GREATER_THAN:return{operator:I.GREATER_THAN};case k.GREATER_THAN_OR_EQUAL:return{operator:I.GREATER_THAN_OR_EQUAL};case k.LESS_THAN:return{operator:I.LESS_THAN};case k.LESS_THAN_OR_EQUAL:return{operator:I.LESS_THAN_OR_EQUAL};case k.IS_NULL:return{operator:I.NULL};case k.IS_NOT_NULL:return{operator:I.NULL,not:!0};case k.IS_EMPTY:return{operator:I.EMPTY};case k.IS_NOT_EMPTY:return{operator:I.EMPTY,not:!0};case k.LIKE:return{operator:I.LIKE};case k.NOT_LIKE:return{operator:I.LIKE,not:!0};case k.IN:return{operator:I.IN};case k.NOT_IN:return{operator:I.IN,not:!0};case k.BETWEEN:return{operator:I.BETWEEN};case k.NOT_BETWEEN:return{operator:I.BETWEEN,not:!0};default:throw new Error(`Unhandled filter function: ${e}`)}},kt=e=>{switch(e){case!1:return"ASC";case!0:return"DESC";default:return""}},Me=({align:e,dataType:o})=>e||(o=="other"?"center":o=="number"||o=="currency"?"right":"left"),Vt=e=>{const o=e.value.filter(t=>vt(t));return o.length<1?null:e.filterFn===k.BETWEEN?o.length>1?{key:e.id,...Y(e.filterFn),value:o.slice(0,2).join(",")}:null:e.filterFn&&!xo(e.filterFn)?{key:e.id,...Y(e.filterFn),value:o[0]}:{key:e.id,...Y(e.filterFn||k.IN),value:o.join(",")}},$o=(e,o,t)=>{const n=()=>{if(!o||o.length===0)return null;const a=o.filter(u=>Array.isArray(u.value)?u.value.filter(c=>vt(c)).length>0:typeof u.value=="string"?u.value.trim()!=="":u.value!=null);return a.length===0?null:a.length===1?Array.isArray(a[0].value)?Vt(a[0]):{key:a[0].id,...Y(a[0].filterFn||k.CONTAINS),value:String(a[0].value)}:{AND:a.map(u=>Array.isArray(u.value)?Vt(u):{key:u.id,...Y(u.filterFn||k.CONTAINS),value:String(u.value)})}},r=()=>!t||t&&Object.keys(t).length===0?null:t.pageSize,i=()=>!t||t&&Object.keys(t).length===0?null:t.pageIndex*t.pageSize,s=()=>!e||e.length===0?null:e.length>1?e.map(a=>({key:a.id,direction:kt(a.desc)})):[{key:e[0].id,direction:kt(e[0].desc)}];return{filter:n(),limit:r(),sort:s(),offset:i()}},vo=(e,o)=>{try{const t=o.getItem(`${bt}-${e}`);return t&&JSON.parse(t)}catch(t){console.log("[Dz table] Could not restore table state",t)}return null},$t=(e,o,t)=>{try{t.setItem(`${bt}-${e}`,JSON.stringify(o))}catch(n){console.log("[Dz table] Could not store table state",n)}},xo=e=>[k.IN,k.NOT_IN,k.BETWEEN,k.NOT_BETWEEN].includes(e),vt=e=>e!=null,Io=["data-id","data-selected"],Bo=["data-label","data-align"],Eo={key:1},Ao={name:"TableBody"},xt=l.defineComponent({...Ao,props:{customFormatters:{default:()=>({}),type:Object},emptyTableMessage:{default:"No results.",type:String},enableRowSelection:Boolean,table:{required:!0,type:Object}},setup(e){const o=e,t=r=>{const i=r.getContext(),s=r.column.columnDef.dateOptions,a=r.column.columnDef.numberOptions,u=r.column.columnDef.cell;return{props:i,render:(()=>{const c={number:f=>Pt({value:Number(f),locale:a?.locale,formatOptions:a?.formatOptions}),date:f=>x.formatDate(f,s?.locale,s?.formatOptions),datetime:f=>x.formatDateTime(f,s?.locale,s?.formatOptions),currency:f=>Pt({value:Number(f),locale:a?.locale,formatOptions:{style:"currency",currency:"USD",...a?.formatOptions&&a.formatOptions}}),...o.customFormatters},p=r.column.columnDef.dataType||"text";return c?.[p]?.(i.getValue())||u})()}},n=r=>{const i=r.column.columnDef.tooltip;return typeof i=="string"?i:typeof i=="function"?i(r):r.getValue()};return(r,i)=>(l.openBlock(),l.createElementBlock("tbody",null,[e.table.getRowModel().rows?.length?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(e.table.getRowModel().rows,s=>(l.openBlock(),l.createElementBlock("tr",{key:`table-row-${s.id}`,"data-id":s.id,"data-selected":e.enableRowSelection?s.getIsSelected():void 0},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.getVisibleCells(),a=>(l.openBlock(),l.createElementBlock("td",{key:`table-data-${s.id}-${a.id}`,class:l.normalizeClass([a.column.id?`cell-${a.column.id}`:""]),"data-label":a.column.id,"data-align":l.unref(Me)({align:a.column.columnDef.align,dataType:a.column.columnDef.dataType}),style:l.normalizeStyle({width:a.column.columnDef.width,maxWidth:a.column.columnDef.maxWidth,minWidth:a.column.columnDef.minWidth})},[a.column.columnDef.tooltip?(l.openBlock(),l.createBlock(l.unref(x.Tooltip),l.mergeProps({key:0,ref_for:!0},a.column.columnDef.tooltipOptions),{content:l.withCtx(()=>[typeof a.column.columnDef.tooltip=="function"&&typeof n(a)!="string"?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n(a)),{key:0})):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createTextVNode(l.toDisplayString(n(a)),1)],64))]),default:l.withCtx(()=>[l.createVNode(l.unref(X),l.mergeProps({ref_for:!0},t(a)),null,16)]),_:2},1040)):(l.openBlock(),l.createBlock(l.unref(X),l.mergeProps({key:1,ref_for:!0},t(a)),null,16))],14,Bo))),128))],8,Io))),128)):(l.openBlock(),l.createElementBlock("tr",Eo,[l.createElementVNode("td",null,l.toDisplayString(e.emptyTableMessage),1)]))]))}}),Do={key:0,class:"data-actions"},_o={name:"TableDataActions"},Mo=l.defineComponent({..._o,props:{actions:{type:Array,required:!0},data:{default:()=>({}),type:Object},displayActions:{default:!0,type:[Boolean,Function]},singleActionMode:{default:"button",type:String,validator:e=>["button","menu"].includes(e)}},emits:["action:click","action:select"],setup(e,{emit:o}){const t=e,n=o,r=l.ref(!1),i=l.ref(),s=l.computed(()=>t.actions.map(p=>({...p,display:typeof p.display=="function"?p.display(t.data):p.display??!0,disabled:typeof p.disabled=="function"?p.disabled(t.data):p.disabled})).filter(p=>p.display)),a=l.computed(()=>s.value.length===1&&s.value[0].icon&&t.singleActionMode==="button"),u=l.computed(()=>typeof t.displayActions=="function"?t.displayActions(t.data):t.displayActions),d=()=>{r.value=!1,n("action:select",i.value)},c=p=>{i.value=p,p?.requireConfirmationModal?r.value=!0:n("action:select",i.value)};return(p,f)=>u.value?(l.openBlock(),l.createElementBlock("div",Do,[a.value?(l.openBlock(),l.createBlock(l.unref(x.ButtonElement),{key:0,disabled:s.value[0].disabled,"icon-left":s.value[0].icon,label:s.value[0].label,rounded:"",variant:"textOnly",onClick:f[0]||(f[0]=g=>p.$emit("action:click"))},null,8,["disabled","icon-left","label"])):s.value.length?(l.openBlock(),l.createBlock(l.unref(x.Dropdown),{key:1,menu:s.value,onSelect:c},{default:l.withCtx(()=>[l.renderSlot(p.$slots,"trigger",{},()=>[l.createVNode(l.unref(_),{icon:"prime:cog",width:"22"})])]),_:3},8,["menu"])):l.createCommentVNode("",!0),l.renderSlot(p.$slots,"confirmationModal",{},()=>[r.value?(l.openBlock(),l.createBlock(l.unref(x.ConfirmationModal),{key:0,"onOn:close":f[1]||(f[1]=g=>r.value=!1),"onOn:confirm":d},l.createSlots({_:2},[i.value?.confirmationOptions?.header?{name:"header",fn:l.withCtx(()=>[l.createElementVNode("p",null,l.toDisplayString(i.value?.confirmationOptions?.header),1)]),key:"0"}:void 0,i.value?.confirmationOptions?.body?{name:"body",fn:l.withCtx(()=>[l.createElementVNode("p",null,l.toDisplayString(i.value?.confirmationOptions?.body),1)]),key:"1"}:void 0,i.value?.confirmationOptions?.footer?{name:"footer",fn:l.withCtx(()=>[l.createElementVNode("p",null,l.toDisplayString(i.value?.confirmationOptions?.footer),1)]),key:"2"}:void 0]),1024)):l.createCommentVNode("",!0)])])):l.createCommentVNode("",!0)}}),Lo=["colSpan","data-align","onClick"],No={key:0,class:"sort-state"},To={key:0,class:"sort-icon",height:"16",viewBox:"0 0 24 24",width:"16",xmlns:"http://www.w3.org/2000/svg"},Ho={key:0,class:"sort-icon",height:"16",viewBox:"0 0 24 24",width:"16",xmlns:"http://www.w3.org/2000/svg"},Oo={key:1,class:"sort-icon",height:"16",viewBox:"0 0 24 24",width:"16",xmlns:"http://www.w3.org/2000/svg"},zo={key:0,class:"header-row filters"},Go=["data-align"],jo={key:3,class:"number-range-filter"},qo={name:"TableHeader"},It=l.defineComponent({...qo,props:{highlightActiveColumn:Boolean,inputDebounceTime:{default:void 0,type:Number},isFilterRowVisible:{default:!1,type:Boolean},table:{required:!0,type:Object}},setup(e){const o=e,t=s=>o.highlightActiveColumn&&(s.getIsSorted()==="asc"||s.getIsSorted()==="desc"||s.getIsFiltered())?"highlight":"",n=s=>s.getFilterValue(),r=s=>s?.length?s.map((a,u)=>{const d=String(a.getDate()).padStart(2,"0"),c=String(a.getMonth()+1).padStart(2,"0"),p=u===0?"00:00:00":"23:59:59";return`${a.getFullYear()}-${c}-${d} ${p}`}).filter(a=>a!==null):null,i=(s,a,u)=>{const d=s.getFilterValue(),c=Array.isArray(d)?[...d]:[void 0,void 0];c[a]=u!==void 0?Number(u):void 0;const p=c.some(f=>f!==void 0);s.setFilterValue(p?c:[])};return(s,a)=>(l.openBlock(),l.createElementBlock("thead",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.table.getHeaderGroups(),u=>(l.openBlock(),l.createElementBlock("tr",{key:u.id,class:"header-row"},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(u.headers,d=>(l.openBlock(),l.createElementBlock("th",{key:`table-header-${d.id}`,class:l.normalizeClass([t(d.column),`column-${d.id}`,d.column.columnDef.enableSorting?"sortable":""]),colSpan:d.colSpan,"data-align":l.unref(Me)({align:d.column.columnDef.align,dataType:d.column.columnDef.dataType}),style:l.normalizeStyle({width:d.column.columnDef.width,maxWidth:d.column.columnDef.maxWidth,minWidth:d.column.columnDef.minWidth}),onClick:c=>d.column.getCanSort()?d.column.getToggleSortingHandler()?.(c):null},[d.isPlaceholder?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createVNode(l.unref(X),{props:d.getContext(),render:d.column.columnDef.header},null,8,["props","render"]),d.column.columnDef.enableSorting?(l.openBlock(),l.createElementBlock("span",No,[!d.column.getIsSorted()&&d.column.getCanSort()?(l.openBlock(),l.createElementBlock("svg",To,a[0]||(a[0]=[l.createElementVNode("path",{d:"M18 10.75H6a.74.74 0 0 1-.69-.46a.75.75 0 0 1 .16-.82l6-6a.75.75 0 0 1 1.06 0l6 6a.75.75 0 0 1 .16.82a.74.74 0 0 1-.69.46M7.81 9.25h8.38L12 5.06ZM12 20.75a.74.74 0 0 1-.53-.22l-6-6a.75.75 0 0 1-.16-.82a.74.74 0 0 1 .69-.46h12a.74.74 0 0 1 .69.46a.75.75 0 0 1-.16.82l-6 6a.74.74 0 0 1-.53.22m-4.19-6L12 18.94l4.19-4.19Z",fill:"currentColor"},null,-1)]))):l.createCommentVNode("",!0),d.column.getIsSorted()&&d.column.getCanSort()?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[d.column.getIsSorted()==="asc"?(l.openBlock(),l.createElementBlock("svg",Ho,a[1]||(a[1]=[l.createElementVNode("path",{d:"M12.53 7.97a.75.75 0 0 0-1.06 0l-7 7A.75.75 0 0 0 5 16.25h14a.75.75 0 0 0 .53-1.28z",fill:"currentColor"},null,-1)]))):(l.openBlock(),l.createElementBlock("svg",Oo,a[2]||(a[2]=[l.createElementVNode("path",{d:"M5 7.75a.75.75 0 0 0-.53 1.28l7 7a.75.75 0 0 0 1.06 0l7-7A.75.75 0 0 0 19 7.75z",fill:"currentColor"},null,-1)])))],64)):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)],64))],14,Lo))),128))]))),128)),e.isFilterRowVisible?(l.openBlock(),l.createElementBlock("tr",zo,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.table.getVisibleLeafColumns(),u=>(l.openBlock(),l.createElementBlock("th",{key:`table-filter-${u.id}`,class:l.normalizeClass([t(u),u.id?`column-${u.id}`:"",u.columnDef.className||"",u.getCanFilter()?`filter ${u.columnDef.meta?.filterVariant}`:""]),"data-align":l.unref(Me)({align:u.columnDef.align,dataType:u.columnDef.dataType}),style:l.normalizeStyle({width:u.columnDef.width,maxWidth:u.columnDef.maxWidth,minWidth:u.columnDef.minWidth})},[u.getCanFilter()?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[u.columnDef.customFilterComponent?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(u.columnDef.customFilterComponent(u)),{key:0})):u.columnDef.meta?.filterVariant==="multiselect"||u.columnDef.meta?.filterVariant==="select"?(l.openBlock(),l.createBlock(l.unref(z.SelectInput),{key:1,"model-value":n(u),options:u.columnDef.meta?.filterOptions||[],placeholder:u.columnDef.filterPlaceholder,name:`multiselect-filter-${u.columnDef.accessorKey}`,multiple:u.columnDef.meta?.filterVariant==="multiselect","enable-tooltip":"","onUpdate:modelValue":d=>u.setFilterValue(d)},null,8,["model-value","options","placeholder","name","multiple","onUpdate:modelValue"])):u.columnDef.meta?.filterVariant==="dateRange"?(l.openBlock(),l.createBlock(l.unref(z.DatePicker),{key:2,"model-value":n(u),placeholder:u.columnDef.filterPlaceholder,name:"`date-range-${column.columnDef.accessorKey}`",range:"","onUpdate:modelValue":d=>u.setFilterValue(r(d))},null,8,["model-value","placeholder","onUpdate:modelValue"])):u.columnDef.meta?.filterVariant==="range"?(l.openBlock(),l.createElementBlock("div",jo,[l.createVNode(l.unref(z.NumberInput),{"model-value":Array.isArray(n(u))&&n(u)[0]!==null?Number(n(u)[0]):void 0,placeholder:u.columnDef.filterPlaceholder?.split(",")[0],name:"`range-${column.columnDef.accessorKey}-start`","onUpdate:modelValue":d=>i(u,0,d)},null,8,["model-value","placeholder","onUpdate:modelValue"]),l.createVNode(l.unref(z.NumberInput),{"model-value":Array.isArray(n(u))&&n(u)[1]!==null?Number(n(u)[1]):void 0,placeholder:u.columnDef.filterPlaceholder?.split(",")[1]??u.columnDef.filterPlaceholder,name:"`range-${column.columnDef.accessorKey}-end`","onUpdate:modelValue":d=>i(u,1,d)},null,8,["model-value","placeholder","onUpdate:modelValue"])])):(l.openBlock(),l.createBlock(l.unref(x.DebouncedInput),{key:4,id:`input-filter-${u.id}`,"debounce-time":e.inputDebounceTime,"model-value":typeof n(u)=="string"?String(n(u)):"",placeholder:u.columnDef.filterPlaceholder,"onUpdate:modelValue":d=>u.setFilterValue(d)},null,8,["id","debounce-time","model-value","placeholder","onUpdate:modelValue"]))],64)):l.createCommentVNode("",!0)],14,Go))),128))])):l.createCommentVNode("",!0)]))}}),Ko={class:"toolbar"},Wo={name:"TableToolbar"},Qo=l.defineComponent({...Wo,props:{columnActionButtonLabel:{default:"Columns",type:String},hasActionsColumn:Boolean,hasSelectionColumn:Boolean,resetButtonLabel:{default:"Reset all",type:String},showColumnAction:Boolean,showResetButton:Boolean,table:{required:!0,type:Object}},emits:["on:drag","on:reset"],setup(e,{emit:o}){const t=e,n=o,r=l.computed(()=>t.table.getAllLeafColumns().filter(s=>s.id!=="select"&&s.id!=="actions").map((s,a)=>({id:a,data:s,render:u=>{let d=u.columnDef.header;return typeof u.columnDef.header=="function"&&(d=u.columnDef.header()),l.h(z.Checkbox,{label:d,modelValue:u.getIsVisible(),name:u.columnDef.accessorKey,"onUpdate:modelValue":()=>u.toggleVisibility()})}}))),i=s=>{const a=[...t.hasSelectionColumn?["select"]:[],...s.map(u=>String(u?.data?.id)),...t.hasActionsColumn?["actions"]:[]];n("on:drag",a)};return(s,a)=>(l.openBlock(),l.createElementBlock("div",Ko,[e.showResetButton?(l.openBlock(),l.createBlock(l.unref(x.ButtonElement),{key:0,label:e.resetButtonLabel,variant:"outlined",severity:"secondary",onClick:a[0]||(a[0]=u=>s.$emit("on:reset"))},null,8,["label"])):l.createCommentVNode("",!0),e.showColumnAction?(l.openBlock(),l.createBlock(l.unref(x.Popup),{key:1,position:"bottom"},{content:l.withCtx(()=>[l.createVNode(l.unref(x.SortableList),{list:r.value,onOnDrag:i},null,8,["list"])]),default:l.withCtx(()=>[l.createVNode(l.unref(x.ButtonElement),{label:e.columnActionButtonLabel,variant:"outlined",severity:"secondary"},null,8,["label"])]),_:1})):l.createCommentVNode("",!0),l.renderSlot(s.$slots,"default")]))}}),Uo=["id"],Xo={key:0,class:"loading-overlay"},Yo=["data-align"],Jo={class:"table-wrapper"},Zo={key:0},er={name:"DataTable"},Bt=l.defineComponent({...er,props:{dataActionMenu:{default:()=>[],type:Array},columnActionButtonLabel:{default:void 0,type:String},columnsData:{type:Array,default:()=>[]},customFormatters:{default:()=>({}),type:Object},data:{type:Array,default:()=>[]},displayActions:{default:!0,type:[Boolean,Function]},emptyTableMessage:{default:void 0,type:String},enableRowSelection:{default:!1,type:Boolean},enableSortingRemoval:{default:!1,type:Boolean},highlightActiveHeaderColumn:Boolean,id:{default:void 0,type:String},initialFilters:{default:()=>[],type:Array},initialSorting:{default:()=>[],type:Array},inputDebounceTime:{default:void 0,type:Number},isLoading:Boolean,isServerTable:Boolean,paginated:{default:!0,type:Boolean},paginationOptions:{default:()=>({}),type:Object},persistState:Boolean,persistStateStorage:{default:"localStorage",type:String,validator:e=>["localStorage","sessionStorage"].includes(e)},resetButtonLabel:{default:void 0,type:String},rowPerPage:{default:Vo,type:Number},rowPerPageOptions:{default:()=>ko,type:Array},showColumnAction:Boolean,showResetButton:Boolean,singleActionMode:{default:"menu",type:String,validator:e=>["button","menu"].includes(e)},tableOptions:{default:()=>({}),type:Object},titleInfo:{default:void 0,type:Object},totalRecords:{default:0,type:Number},visibleColumns:{default:()=>[],type:Array}},emits:["action:click","action:select","change:rowSelection","update:request"],setup(e,{emit:o}){const t=e,n=o,r=[],i=l.ref(t.initialFilters),s=l.ref([]),a=l.ref({}),u=l.ref({pageIndex:_e,pageSize:t.paginated?t.rowPerPage:t.data.length}),d=l.ref({}),c=l.ref(t.initialSorting),p=l.computed(()=>t.columnsData.some(w=>w.enableColumnFilter)),f=l.computed(()=>({columnFilters:i.value,columnOrder:s.value,columnVisibility:a.value,pagination:u.value,sorting:c.value})),g=l.computed(()=>x.getStorage(t.persistStateStorage)),m=l.computed(()=>t.isServerTable?t.totalRecords:S.value.getFilteredRowModel().rows?.length),h=l.computed(()=>S.value.getSelectedRowModel().rows.map(w=>w.original)),S=l.computed(()=>Ft({columns:r,state:{columnFilters:i.value,columnOrder:s.value?.length?s.value:t.visibleColumns,columnVisibility:a.value,pagination:u.value,rowSelection:d.value,get sorting(){return c.value}},onColumnFiltersChange:w=>{i.value=typeof w=="function"?w(i.value):w,Array.isArray(i.value)||(i.value=[]),u.value.pageIndex=_e,t.isServerTable&&(i.value=t.columnsData.filter(C=>C.enableColumnFilter&&(t.visibleColumns.includes(String(C.accessorKey??C.id))||!t.visibleColumns.length)).map(C=>{if(C.meta?.filterVariant==="range"){const V=i.value.find(N=>N?.id===C.accessorKey)?.value,[$,B]=V||[],E=C.meta?.serverFilterFn||(typeof $=="number"&&typeof B=="number"&&$<=B?k.BETWEEN:typeof $=="number"&&!B?k.GREATER_THAN_OR_EQUAL:typeof B=="number"?k.LESS_THAN_OR_EQUAL:null);return E&&V?.length?{filterFn:E,id:C.accessorKey,value:V}:void 0}else return{filterFn:C?.meta?.serverFilterFn,id:C.accessorKey,value:i.value.find(V=>V.id===C.accessorKey)?.value}}).filter(Boolean),F())},onColumnVisibilityChange:w=>{a.value=typeof w=="function"?w(a.value):w},onPaginationChange:w=>{u.value=typeof w=="function"?w(u.value):w,t.isServerTable&&F()},onRowSelectionChange:w=>{d.value=typeof w=="function"?w(d.value):w,n("change:rowSelection",h.value)},onSortingChange:w=>{c.value=typeof w=="function"?w(c.value):w,t.isServerTable&&F()},columnResizeMode:"onChange",data:t.data,enableSortingRemoval:t.enableSortingRemoval,getCoreRowModel:St(),getFilteredRowModel:wt(),getPaginationRowModel:Ct(),getSortedRowModel:yt(),manualFiltering:t.isServerTable,manualSorting:t.isServerTable,manualPagination:t.isServerTable,...t.tableOptions}));l.watch([i,s,a,u,c],()=>{t.persistState&&t.id&&$t(t.id,f.value,g.value)});const F=()=>{const w=$o(c.value,i.value,u.value);n("update:request",w)},P=()=>{i.value=t.initialFilters,s.value=[],a.value={},u.value={pageIndex:_e,pageSize:t.paginated?t.rowPerPage:t.data.length},c.value=t.initialSorting},b=()=>{if(t.enableRowSelection&&r.push({accessorKey:"select",header:({table:w})=>l.h(z.Checkbox,{"aria-label":"Select all",modelValue:w.getIsAllPageRowsSelected(),"onUpdate:modelValue":()=>w.toggleAllPageRowsSelected(!w.getIsAllPageRowsSelected())}),cell:({row:w})=>l.h(z.Checkbox,{"aria-label":"Select row",modelValue:w.getIsSelected(),"onUpdate:modelValue":()=>w.toggleSelected(!w.getIsSelected())}),align:"center",enableColumnFilter:!1,enableSorting:!1}),t.columnsData.forEach(w=>{t.visibleColumns.length&&!t.visibleColumns.includes(String(w.accessorKey??w.id))||(w.meta?.filterVariant==="multiselect"&&!w.filterFn?w.filterFn=(C,V,$)=>!$||$.length===0?C:$.some(B=>C.getValue(V)==B):w.meta?.filterVariant==="select"&&!w.filterFn?w.filterFn=(C,V,$)=>$===void 0||$.length===0?!0:String($)===String(C.getValue(V)):w.meta?.filterVariant==="dateRange"&&!w.filterFn?w.filterFn=(C,V,$)=>{if($?.length){const B=new Date($[1]).setHours(23,59,59,999),E=new Date(C.getValue(V)),N=new Date($[0]).setHours(0,0,0,0);return E.getTime()>=N&&E.getTime()<=B}return!0}:w.meta?.filterVariant==="range"&&(w.filterFn=(C,V,$)=>{if(!Array.isArray($))return!0;const[B,E]=$,N=C.getValue(V);return B&&E?N>=B&&N<=E:B?N>=B:E?N<=E:!0}),r.push({...w,enableColumnFilter:w.enableColumnFilter??!1,enableSorting:w.enableSorting??!1}))}),t.dataActionMenu.length&&r.push({accessorKey:"actions",align:"center",enableColumnFilter:!1,enableSorting:!1,header:()=>l.h(_,{icon:"prime:cog",width:"24"}),cell:({row:w})=>l.h(Mo,{actions:t.dataActionMenu,data:w.original,displayActions:t.displayActions,singleActionMode:t.singleActionMode,"onAction:click":()=>n("action:click",w.original),"onAction:select":C=>n("action:select",{action:C?.key||C?.label,data:w.original})})}),t.persistState&&!t.id)throw new Error('Id is required when prop "persistState" is true');v(),t.isServerTable&&F()},v=()=>{if(!t.persistState||!t.id)return;const w=vo(t.id,g.value);w&&(i.value=w.columnFilters,s.value=w.columnOrder,a.value=w.columnVisibility,c.value=w.sorting,t.rowPerPageOptions.includes(w.pagination.pageSize)&&(u.value=w.pagination)),$t(t.id,f.value,g.value)};return b(),(w,C)=>(l.openBlock(),l.createElementBlock("div",{id:e.id,class:"table-container"},[e.isLoading?(l.openBlock(),l.createElementBlock("div",Xo,[l.createVNode(l.unref(x.LoadingIcon),{class:"loading-icon"})])):l.createCommentVNode("",!0),e.titleInfo?(l.openBlock(),l.createElementBlock("span",{key:1,"data-align":e.titleInfo.align||"center"},l.toDisplayString(e.titleInfo.text),9,Yo)):l.createCommentVNode("",!0),e.showColumnAction||e.showResetButton||w.$slots.toolbar?(l.openBlock(),l.createBlock(Qo,{key:2,"column-action-button-label":e.columnActionButtonLabel,"has-actions-column":!!e.dataActionMenu.length,"has-selection-column":e.enableRowSelection,"reset-button-label":e.resetButtonLabel,"show-column-action":e.showColumnAction,"show-reset-button":e.showResetButton,table:S.value,"onOn:reset":P,"onOn:drag":C[0]||(C[0]=V=>s.value=V)},{default:l.withCtx(()=>[l.renderSlot(w.$slots,"toolbar")]),_:3},8,["column-action-button-label","has-actions-column","has-selection-column","reset-button-label","show-column-action","show-reset-button","table"])):l.createCommentVNode("",!0),l.createElementVNode("div",Jo,[l.createElementVNode("table",{style:l.normalizeStyle(`width: ${S.value.getCenterTotalSize()}`)},[l.createVNode(It,{"highlight-active-column":e.highlightActiveHeaderColumn,"input-debounce-time":e.inputDebounceTime,"is-filter-row-visible":p.value,table:S.value},null,8,["highlight-active-column","input-debounce-time","is-filter-row-visible","table"]),l.createVNode(xt,{"custom-formatters":e.customFormatters,"empty-table-message":e.emptyTableMessage,table:S.value},null,8,["custom-formatters","empty-table-message","table"]),w.$slots.footer?(l.openBlock(),l.createElementBlock("tfoot",Zo,[l.renderSlot(w.$slots,"footer")])):l.createCommentVNode("",!0)],4)]),(e.isServerTable||e.paginated)&&m.value>0?l.renderSlot(w.$slots,"pagination",{key:3},()=>[l.createVNode(Po,l.mergeProps(e.paginationOptions,{"current-page":u.value.pageIndex,"default-items-per-page":u.value.pageSize,"items-per-page-options":e.rowPerPageOptions,"total-items":m.value,"onUpdate:currentPage":S.value.setPageIndex,"onUpdate:itemsPerPage":S.value.setPageSize}),null,16,["current-page","default-items-per-page","items-per-page-options","total-items","onUpdate:currentPage","onUpdate:itemsPerPage"])]):l.createCommentVNode("",!0)],8,Uo))}}),tr={name:"FilesTable"},Et=l.defineComponent({...tr,props:{archiveFile:Boolean,columnsData:{default:()=>[],type:Array},deleteFile:Boolean,downloadFile:Boolean,editDescription:Boolean,initialSorting:{default:()=>[],type:Array},files:{default:()=>[],type:Array},id:{default:"files-table",type:String},isLoading:Boolean,isServerTable:Boolean,persistState:Boolean,persistStateStorage:{default:"localStorage",type:String,validator:e=>["localStorage","sessionStorage"].includes(e)},messages:{default:void 0,type:Object},shareFile:Boolean,tableOptions:{default:()=>({}),type:Object},totalRecords:{default:0,type:Number},viewFile:Boolean,visibleColumns:{default:()=>[],type:Array}},emits:["action:archive","action:delete","action:download","action:edit","action:share","action:view","update:request"],setup(e,{emit:o}){const t=e,n=o,r=[{accessorKey:"originalFileName",enableColumnFilter:!0,enableSorting:!0,filterPlaceholder:"File name",header:"File"},{accessorKey:"description",enableColumnFilter:!0,enableSorting:!0,filterPlaceholder:"Description",header:"Description",tooltip:!0},{accessorKey:"size",enableColumnFilter:!t.isServerTable,enableSorting:!t.isServerTable,filterPlaceholder:"Size",header:"Size",meta:{filterVariant:"range"}},{accessorKey:"uploadedBy",cell:({row:{original:c}})=>c.uploadedBy?c.uploadedBy.givenName||c.uploadedBy.lastName?`${c.uploadedBy.givenName||""} ${c.uploadedBy.lastName||""}`:c.uploadedBy.email:l.h("code",{},"—"),enableColumnFilter:!t.isServerTable,enableSorting:!t.isServerTable,filterFn:(c,p,f)=>{const g=c.getValue(p);return!f||f.length===0?!0:`${g.givenName||""} ${g.lastName||""}`.trim().toLowerCase().includes(f.toLowerCase())||(g.email?.toLowerCase().includes(f.toLowerCase())??!1)},filterPlaceholder:"Name",header:"Uploaded by"},{accessorKey:"uploadedAt",cell:({getValue:c})=>x.formatDateTime(c()),enableColumnFilter:!0,enableSorting:!0,filterPlaceholder:"Date range",header:"Uploaded at",meta:{filterVariant:"dateRange",serverFilterFn:"between"}},{accessorKey:"downloadCount",align:"right",enableColumnFilter:!0,enableSorting:!0,filterPlaceholder:"Number of downloads",header:"Download count",meta:{filterVariant:"range"}},{accessorKey:"lastDownloadedAt",cell:({getValue:c})=>c()?x.formatDateTime(c()):l.h("code",{},"—"),enableColumnFilter:!0,enableSorting:!0,filterPlaceholder:"Date range",header:"Last downloaded at",meta:{filterVariant:"dateRange",serverFilterFn:"between"}}],i=l.computed(()=>{const c=[];return t.archiveFile&&c.push({confirmationOptions:{body:t.messages?.archiveConfirmationMessage||"Are you sure you want to archive this file?",header:t.messages?.archiveConfirmationHeader||"Archive file"},icon:"pi pi-book",key:"archive",label:t.messages?.archiveAction||"Archive",requireConfirmationModal:!0}),t.downloadFile&&c.push({icon:"pi pi-download",key:"download",label:t.messages?.downloadAction||"Download"}),t.editDescription&&c.push({icon:"pi pi-pencil",key:"edit",label:t.messages?.editDescriptionAction||"Edit description"}),t.shareFile&&c.push({icon:"pi pi-share-alt",key:"share",label:t.messages?.shareAction||"Share"}),t.viewFile&&c.push({icon:"pi pi-eye",key:"view",label:t.messages?.viewAction||"View"}),t.deleteFile&&c.push({class:"danger",confirmationOptions:{body:t.messages?.deleteConfirmationMessage||"Are you sure you want to delete this file?",header:t.messages?.deleteConfirmationHeader||"Delete file"},icon:"pi pi-trash",label:t.messages?.deleteAction||"Delete",key:"delete",requireConfirmationModal:!0}),c}),s=l.computed(()=>[...r.map(c=>{const p=t.columnsData.find(f=>f.accessorKey===c.accessorKey);return p?{...c,...p}:c}),...t.columnsData.filter(c=>!r.some(p=>p.accessorKey===c.accessorKey))]),a=c=>{t.archiveFile?n("action:archive",c):t.downloadFile?n("action:download",c):t.editDescription?n("action:edit",c):t.shareFile?n("action:share",c):t.viewFile?n("action:view",c):t.deleteFile&&n("action:delete",c)},u=c=>{switch(c.action){case"archive":n("action:archive",c.data);break;case"delete":n("action:delete",c.data);break;case"download":n("action:download",c.data);break;case"edit":n("action:edit",c.data);break;case"share":n("action:share",c.data);break;case"view":n("action:view",c.data);break}},d=c=>{n("update:request",c)};return(c,p)=>(l.openBlock(),l.createBlock(Bt,l.mergeProps(e.tableOptions,{id:e.id,"columns-data":s.value,data:e.files,"data-action-menu":i.value,"empty-table-message":t.messages?.tableEmpty||"The table is empty","initial-sorting":e.initialSorting,"is-loading":e.isLoading,"is-server-table":e.isServerTable,"persist-state":e.persistState,"persist-state-storage":e.persistStateStorage,"total-records":e.totalRecords,"visible-columns":e.visibleColumns,class:"table-files","onAction:click":a,"onAction:select":u,"onUpdate:request":d}),l.createSlots({_:2},[c.$slots.toolbar?{name:"toolbar",fn:l.withCtx(()=>[l.renderSlot(c.$slots,"toolbar")]),key:"0"}:void 0,c.$slots.footer?{name:"footer",fn:l.withCtx(()=>[l.renderSlot(c.$slots,"footer")]),key:"1"}:void 0,c.$slots.pagination?{name:"pagination",fn:l.withCtx(()=>[l.renderSlot(c.$slots,"pagination")]),key:"2"}:void 0]),1040,["id","columns-data","data","data-action-menu","empty-table-message","initial-sorting","is-loading","is-server-table","persist-state","persist-state-storage","total-records","visible-columns"]))}}),nr={name:"FilesPresentation"},or=l.defineComponent({...nr,props:{actionButtonsVisibility:{default:()=>({archive:!0,delete:!0,download:!0,edit:!0,share:!0,view:!0}),type:Object},files:{default:()=>[],type:Array},messages:{default:void 0,type:Object},listProps:{default:()=>{},type:Object},presentation:{default:()=>"list",type:String,validator:e=>["list","table"].includes(e)},tableProps:{default:()=>{},type:Object},visibleFileDetails:{default:()=>["actions","description","downloadCount","lastDownloadedAt","originalFileName","size","uploadedAt","uploadedBy"],type:Array}},emits:["action:archive","action:delete","action:download","action:edit","action:share","action:view"],setup(e,{emit:o}){const t=e,n=o,r=l.computed(()=>Object.fromEntries(["actions","description","downloadCount","lastDownloadedAt","originalFileName","size","uploadedAt","uploadedBy"].map(a=>[a,t.visibleFileDetails.includes(a)]))),i=(s,a)=>{switch(s){case"archive":case"delete":case"download":case"edit":case"share":case"view":n(`action:${s}`,a);break}};return(s,a)=>e.presentation==="list"?(l.openBlock(),l.createBlock(l.unref(x.FilesList),l.mergeProps({key:0},e.listProps,{"action-buttons-visibility":e.actionButtonsVisibility,files:e.files,"file-detail-visibility":r.value,messages:e.messages,"onAction:archive":a[0]||(a[0]=u=>i("archive",u)),"onAction:delete":a[1]||(a[1]=u=>i("delete",u)),"onAction:download":a[2]||(a[2]=u=>i("download",u)),"onAction:edit":a[3]||(a[3]=u=>i("edit",u)),"onAction:share":a[4]||(a[4]=u=>i("share",u)),"onAction:view":a[5]||(a[5]=u=>i("view",u))}),null,16,["action-buttons-visibility","files","file-detail-visibility","messages"])):(l.openBlock(),l.createBlock(Et,l.mergeProps({key:1},e.tableProps,{"archive-file":e.actionButtonsVisibility.archive,"delete-file":e.actionButtonsVisibility.delete,"download-file":e.actionButtonsVisibility.download,"edit-description":e.actionButtonsVisibility.edit,files:e.files,messages:e.messages,"share-file":e.actionButtonsVisibility.share,"view-file":e.actionButtonsVisibility.view,"visible-columns":e.visibleFileDetails,"onAction:archive":a[6]||(a[6]=u=>i("archive",u)),"onAction:delete":a[7]||(a[7]=u=>i("delete",u)),"onAction:download":a[8]||(a[8]=u=>i("download",u)),"onAction:edit":a[9]||(a[9]=u=>i("edit",u)),"onAction:share":a[10]||(a[10]=u=>i("share",u)),"onAction:view":a[11]||(a[11]=u=>i("view",u))}),null,16,["archive-file","delete-file","download-file","edit-description","files","messages","share-file","view-file","visible-columns"]))}}),rr={class:"table-wrapper"},ir={key:0,class:"toggle-wrap"},lr=["colSpan","onClick"],sr={key:0},ar=["data-label"],ur={class:"page-navigation-container"},cr={class:"page-indicators-selection-container"},dr={class:"page-number-indicators"},gr={class:"go-to-page-container"},fr=["value","max"],pr=["value"],mr=["value"],hr={class:"page-navigation-buttons-container"},Sr=["disabled"],wr=["disabled"],Cr=["disabled"],yr=["disabled"],Rr={name:"TanstackTable"},Fr=l.defineComponent({...Rr,props:{columnsData:{type:Array,default:()=>[]},rows:{type:Array,default:()=>[]},enableToggle:{type:Boolean,default:()=>!1}},setup(e){const o=e,t=Bn(),n=[];o.columnsData.forEach(c=>{const p=t.accessor(c.accessorKey,{header:()=>c.header,footer:f=>f.column.id,enableSorting:c.sort!==void 0?c.sort:!1});n.push(p)});const r=l.ref([]),i=Ft({columns:n,state:{get sorting(){return r.value}},onSortingChange:c=>{r.value=typeof c=="function"?c(r.value):c},columnResizeMode:"onChange",data:o.rows,getCoreRowModel:St(),getFilteredRowModel:wt(),getPaginationRowModel:Ct(),getSortedRowModel:yt()}),s=l.ref(!1),a=()=>{s.value=!s.value},u=c=>{const p=c.target,f=p.value?Number(p.value)-1:0;i.setPageIndex(f)},d=c=>{const p=c.target,f=p.value?Number(p.value):10;i.setPageSize(f)};return(c,p)=>(l.openBlock(),l.createElementBlock("div",rr,[l.createElementVNode("table",{style:l.normalizeStyle(`width: ${l.unref(i).getCenterTotalSize()}`)},[o.enableToggle?(l.openBlock(),l.createElementBlock("div",ir,[l.createElementVNode("button",{class:"table-toggle",onClick:a},[l.createVNode(l.unref(_),{icon:"mingcute:menu-fill",class:"toggle-icon"})])])):l.createCommentVNode("",!0),l.createElementVNode("colgroup",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(o.columnsData,f=>(l.openBlock(),l.createElementBlock("col",{key:f.accessorKey,style:l.normalizeStyle(`width: ${f.size}px`)},null,4))),128))]),l.createElementVNode("thead",{class:l.normalizeClass({expand:s.value})},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(i).getHeaderGroups(),f=>(l.openBlock(),l.createElementBlock("tr",{key:f.id},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(f.headers,g=>(l.openBlock(),l.createElementBlock("th",{key:g.id,colSpan:g.colSpan,onClick:m=>g.column.getCanSort()?g.column.getToggleSortingHandler()?.(m):null},[g.isPlaceholder?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",sr,[l.createVNode(l.unref(X),{props:g.getContext(),render:g.column.columnDef.header},null,8,["props","render"]),!g.column.getIsSorted()&&g.column.getCanSort()?(l.openBlock(),l.createBlock(l.unref(_),{key:0,icon:"ri:arrow-up-down-line",class:"sort-icon"})):l.createCommentVNode("",!0),g.column.getIsSorted()&&g.column.getCanSort()?(l.openBlock(),l.createBlock(l.unref(_),{key:1,icon:g.column.getIsSorted()==="asc"?"mdi:arrow-up":"mdi:arrow-down",class:"sort-icon"},null,8,["icon"])):l.createCommentVNode("",!0)]))],8,lr))),128))]))),128))],2),l.createElementVNode("tbody",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(i).getRowModel().rows,f=>(l.openBlock(),l.createElementBlock("tr",{key:f.id},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(f.getVisibleCells(),g=>(l.openBlock(),l.createElementBlock("td",{key:g.id,"data-label":g.column.id},[l.createVNode(l.unref(X),{props:g.getContext(),render:g.column.columnDef.cell},null,8,["props","render"])],8,ar))),128))]))),128))])],4),l.createElementVNode("div",ur,[l.createElementVNode("div",cr,[l.createElementVNode("span",dr,l.toDisplayString(l.unref(i).getState().pagination.pageIndex+1)+" of "+l.toDisplayString(l.unref(i).getPageCount()),1),l.createElementVNode("span",gr,[p[6]||(p[6]=l.createElementVNode("span",{class:"go-to-page-text"}," Go to page: ",-1)),l.createElementVNode("input",{class:"page-input",type:"number",value:l.unref(i).getState().pagination.pageIndex+1,max:l.unref(i).getPageCount(),onInput:p[0]||(p[0]=f=>u(f))},null,40,fr)]),l.createElementVNode("select",{value:l.unref(i).getState().pagination.pageSize,onChange:p[1]||(p[1]=f=>d(f))},[(l.openBlock(),l.createElementBlock(l.Fragment,null,l.renderList([10,20,30,40,50],f=>l.createElementVNode("option",{key:f,value:f}," Show "+l.toDisplayString(f),9,mr)),64))],40,pr)]),l.createElementVNode("div",hr,[l.createElementVNode("button",{class:"page-navigation-button",disabled:!l.unref(i).getCanPreviousPage(),onClick:p[2]||(p[2]=f=>l.unref(i).setPageIndex(0))},[l.createVNode(l.unref(_),{icon:"material-symbols:keyboard-double-arrow-left-rounded",class:"navigation-button-icon"})],8,Sr),l.createElementVNode("button",{class:"page-navigation-button",disabled:!l.unref(i).getCanPreviousPage(),onClick:p[3]||(p[3]=f=>l.unref(i).previousPage())},[l.createVNode(l.unref(_),{icon:"material-symbols:arrow-back-ios-new-rounded",class:"navigation-button-icon"})],8,wr),l.createElementVNode("button",{class:"page-navigation-button",disabled:!l.unref(i).getCanNextPage(),onClick:p[4]||(p[4]=f=>l.unref(i).nextPage())},[l.createVNode(l.unref(_),{icon:"material-symbols:arrow-forward-ios-rounded",class:"navigation-button-icon"})],8,Cr),l.createElementVNode("button",{class:"page-navigation-button",disabled:!l.unref(i).getCanNextPage(),onClick:p[5]||(p[5]=f=>l.unref(i).setPageIndex(l.unref(i).getPageCount()-1))},[l.createVNode(l.unref(_),{icon:"material-symbols:keyboard-double-arrow-right-rounded",class:"navigation-button-icon"})],8,yr)])])]))}});D.FilesPresentation=or,D.FilesTable=Et,D.Table=Bt,D.TableBody=xt,D.TableHeader=It,D.TanstackTable=Fr,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})});
|
|
22
|
+
*/function ae(){return!0}const co=Symbol("merge-proxy"),go={get(e,o,t){return o===co?t:e.get(o)},has(e,o){return e.has(o)},set:ae,deleteProperty:ae,getOwnPropertyDescriptor(e,o){return{configurable:!0,enumerable:!0,get(){return e.get(o)},set:ae,deleteProperty:ae}},ownKeys(e){return e.keys()}};function De(e){return"value"in e?e.value:e}function U(){for(var e=arguments.length,o=new Array(e),t=0;t<e;t++)o[t]=arguments[t];return new Proxy({get(n){for(let r=o.length-1;r>=0;r--){const i=De(o[r])[n];if(i!==void 0)return i}},has(n){for(let r=o.length-1;r>=0;r--)if(n in De(o[r]))return!0;return!1},keys(){const n=[];for(let r=0;r<o.length;r++)n.push(...Object.keys(De(o[r])));return[...Array.from(new Set(n))]}},go)}const X=l.defineComponent({props:["render","props"],setup:e=>()=>typeof e.render=="function"||typeof e.render=="object"?l.h(e.render,e.props):e.render});function Rt(e){return U(e,{data:l.unref(e.data)})}function Ft(e){const o=l.isRef(e.data),t=U({state:{},onStateChange:()=>{},renderFallbackValue:null,mergeOptions(i,s){return o?{...i,...s}:U(i,s)}},o?Rt(e):e),n=io(t);if(o){const i=l.shallowRef(e.data);l.watch(i,()=>{n.setState(s=>({...s,data:i.value}))},{immediate:!0})}const r=l.ref(n.initialState);return l.watchEffect(()=>{n.setOptions(i=>{var s;const a=new Proxy({},{get:(u,d)=>r.value[d]});return U(i,o?Rt(e):e,{state:U(a,(s=e.state)!=null?s:{}),onStateChange:u=>{u instanceof Function?r.value=u(r.value):r.value=u,e.onStateChange==null||e.onStateChange(u)}})})}),n}var k=(e=>(e.BETWEEN="between",e.CONTAINS="contains",e.ENDS_WITH="endsWith",e.EQUALS="equals",e.GREATER_THAN="greaterThan",e.GREATER_THAN_OR_EQUAL="greaterThanOrEqual",e.IN="in",e.IS_EMPTY="isEmpty",e.IS_NOT_EMPTY="isNotEmpty",e.IS_NOT_NULL="isNotNull",e.IS_NULL="isNull",e.LESS_THAN="lessThan",e.LESS_THAN_OR_EQUAL="lessThanOrEqual",e.LIKE="like",e.NOT_BETWEEN="notBetween",e.NOT_EQUAL="notEqual",e.NOT_IN="notIn",e.NOT_LIKE="notLike",e.STARTS_WITH="startsWith",e))(k||{}),I=(e=>(e.BETWEEN="bt",e.CONTAINS="ct",e.EMPTY="empty",e.ENDS_WITH="ew",e.EQUALS="eq",e.GREATER_THAN="gt",e.GREATER_THAN_OR_EQUAL="gte",e.IN="in",e.LESS_THAN="lt",e.LESS_THAN_OR_EQUAL="lte",e.LIKE="like",e.NULL="null",e.STARTS_WITH="sw",e))(I||{});const fo={class:"pagination"},po={key:0,class:"items-per-page-control"},mo=["value"],ho=["value"],So={key:1,class:"page-input-control"},wo={key:2,class:"pagination-buttons-wrapper"},Co={key:0},yo={key:1},Ro={key:1},Fo={key:3},bo={name:"TablePagination"},Po=l.defineComponent({...bo,props:{currentPage:{required:!0,type:Number},defaultItemsPerPage:{default:void 0,type:Number},inputDebounceTime:{default:void 0,type:Number},itemsPerPageControlLabel:{default:"Items per page",type:String},itemsPerPageOptions:{default:()=>[5,10,20,30],type:Array},pageInputLabel:{default:"Go to page:",type:String},showFirstLastButtons:{default:!0,type:Boolean},showItemsPerPageControl:{default:!0,type:Boolean},showPageButtons:{default:!1,type:Boolean},showPageInput:{type:Boolean,default:!1},showPreviousNextButtons:{default:!0,type:Boolean},totalItems:{required:!0,type:Number}},emits:["update:currentPage","update:itemsPerPage"],setup(e,{emit:o}){const t=e,n=o,r=l.ref(t.defaultItemsPerPage||t.itemsPerPageOptions[0]),i=l.computed(()=>Math.ceil(t.totalItems/r.value)),s=l.computed(()=>Array.from({length:i.value},(d,c)=>c+1)),a=d=>{const c=parseInt(d.target.value,10);r.value=c,n("update:itemsPerPage",r.value)},u=d=>{const c=parseInt(d.toString(),10)-1;!isNaN(c)&&c>=0&&c<i.value&&n("update:currentPage",c)};return(d,c)=>(l.openBlock(),l.createElementBlock("div",fo,[e.showItemsPerPageControl?(l.openBlock(),l.createElementBlock("div",po,[l.createElementVNode("span",null,l.toDisplayString(e.itemsPerPageControlLabel),1),l.createElementVNode("select",{value:r.value,onChange:a},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.itemsPerPageOptions,p=>(l.openBlock(),l.createElementBlock("option",{key:`items-per-page-option-${p}`,value:p},l.toDisplayString(p),9,ho))),128))],40,mo)])):l.createCommentVNode("",!0),i.value>1&&e.showPageInput?(l.openBlock(),l.createElementBlock("div",So,[l.createElementVNode("span",null,l.toDisplayString(e.pageInputLabel),1),l.createVNode(l.unref(x.DebouncedInput),{type:"number","debounce-time":e.inputDebounceTime,"onUpdate:modelValue":u},null,8,["debounce-time"])])):l.createCommentVNode("",!0),i.value>1?(l.openBlock(),l.createElementBlock("div",wo,[e.showFirstLastButtons||e.showPreviousNextButtons?(l.openBlock(),l.createElementBlock("div",Co,[e.showFirstLastButtons?(l.openBlock(),l.createBlock(l.unref(x.ButtonElement),{key:0,disabled:!(e.currentPage>0),class:"first-page",size:"small",onClick:c[0]||(c[0]=p=>d.$emit("update:currentPage",0))},{iconLeft:l.withCtx(()=>[l.createVNode(l.unref(_),{icon:"prime:angle-double-left"})]),_:1},8,["disabled"])):l.createCommentVNode("",!0),e.showPreviousNextButtons?(l.openBlock(),l.createBlock(l.unref(x.ButtonElement),{key:1,disabled:!(e.currentPage>0),class:"previous-page",size:"small",onClick:c[1]||(c[1]=p=>d.$emit("update:currentPage",e.currentPage-1))},{iconLeft:l.withCtx(()=>[l.createVNode(l.unref(_),{icon:"prime:angle-left"})]),_:1},8,["disabled"])):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0),l.createElementVNode("div",null,[e.showPageButtons?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(s.value,p=>(l.openBlock(),l.createBlock(l.unref(x.ButtonElement),{key:`page-button-${p}`,class:l.normalizeClass(`page-button ${p===e.currentPage+1?"active":""}`),label:`${p}`,size:"small",onClick:f=>d.$emit("update:currentPage",p-1)},null,8,["class","label","onClick"]))),128)):(l.openBlock(),l.createElementBlock("span",yo,l.toDisplayString(`${e.currentPage+1} / ${i.value}`),1))]),e.showFirstLastButtons||e.showPreviousNextButtons?(l.openBlock(),l.createElementBlock("div",Ro,[e.showPreviousNextButtons?(l.openBlock(),l.createBlock(l.unref(x.ButtonElement),{key:0,disabled:!(e.currentPage<i.value-1),class:"next-page",size:"small",onClick:c[2]||(c[2]=p=>d.$emit("update:currentPage",e.currentPage+1))},{iconLeft:l.withCtx(()=>[l.createVNode(l.unref(_),{icon:"prime:angle-right"})]),_:1},8,["disabled"])):l.createCommentVNode("",!0),e.showFirstLastButtons?(l.openBlock(),l.createBlock(l.unref(x.ButtonElement),{key:1,disabled:!(e.currentPage<i.value-1),class:"last-page",size:"small",onClick:c[3]||(c[3]=p=>d.$emit("update:currentPage",i.value-1))},{iconLeft:l.withCtx(()=>[l.createVNode(l.unref(_),{icon:"prime:angle-double-right"})]),_:1},8,["disabled"])):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)])):(l.openBlock(),l.createElementBlock("span",Fo,l.toDisplayString(`${e.currentPage+1} / ${i.value}`),1))]))}}),_e=0,ko=[10,20,30],Vo=10,bt="table",Pt=({value:e,locale:o="en-GB",formatOptions:t})=>typeof e!="number"||isNaN(e)?e:new Intl.NumberFormat(o,t).format(e),Y=e=>{switch(e){case k.CONTAINS:return{operator:I.CONTAINS};case k.STARTS_WITH:return{operator:I.STARTS_WITH};case k.ENDS_WITH:return{operator:I.ENDS_WITH};case k.EQUALS:return{operator:I.EQUALS};case k.NOT_EQUAL:return{operator:I.EQUALS,not:!0};case k.GREATER_THAN:return{operator:I.GREATER_THAN};case k.GREATER_THAN_OR_EQUAL:return{operator:I.GREATER_THAN_OR_EQUAL};case k.LESS_THAN:return{operator:I.LESS_THAN};case k.LESS_THAN_OR_EQUAL:return{operator:I.LESS_THAN_OR_EQUAL};case k.IS_NULL:return{operator:I.NULL};case k.IS_NOT_NULL:return{operator:I.NULL,not:!0};case k.IS_EMPTY:return{operator:I.EMPTY};case k.IS_NOT_EMPTY:return{operator:I.EMPTY,not:!0};case k.LIKE:return{operator:I.LIKE};case k.NOT_LIKE:return{operator:I.LIKE,not:!0};case k.IN:return{operator:I.IN};case k.NOT_IN:return{operator:I.IN,not:!0};case k.BETWEEN:return{operator:I.BETWEEN};case k.NOT_BETWEEN:return{operator:I.BETWEEN,not:!0};default:throw new Error(`Unhandled filter function: ${e}`)}},kt=e=>{switch(e){case!1:return"ASC";case!0:return"DESC";default:return""}},Me=({align:e,dataType:o})=>e||(o=="other"?"center":o=="number"||o=="currency"?"right":"left"),Vt=e=>{const o=e.value.filter(t=>vt(t));return o.length<1?null:e.filterFn===k.BETWEEN?o.length>1?{key:e.id,...Y(e.filterFn),value:o.slice(0,2).join(",")}:null:e.filterFn&&!xo(e.filterFn)?{key:e.id,...Y(e.filterFn),value:o[0]}:{key:e.id,...Y(e.filterFn||k.IN),value:o.join(",")}},$o=(e,o,t)=>{const n=()=>{if(!o||o.length===0)return null;const a=o.filter(u=>Array.isArray(u.value)?u.value.filter(c=>vt(c)).length>0:typeof u.value=="string"?u.value.trim()!=="":u.value!=null);return a.length===0?null:a.length===1?Array.isArray(a[0].value)?Vt(a[0]):{key:a[0].id,...Y(a[0].filterFn||k.CONTAINS),value:String(a[0].value)}:{AND:a.map(u=>Array.isArray(u.value)?Vt(u):{key:u.id,...Y(u.filterFn||k.CONTAINS),value:String(u.value)})}},r=()=>!t||t&&Object.keys(t).length===0?null:t.pageSize,i=()=>!t||t&&Object.keys(t).length===0?null:t.pageIndex*t.pageSize,s=()=>!e||e.length===0?null:e.length>1?e.map(a=>({key:a.id,direction:kt(a.desc)})):[{key:e[0].id,direction:kt(e[0].desc)}];return{filter:n(),limit:r(),sort:s(),offset:i()}},vo=(e,o)=>{try{const t=o.getItem(`${bt}-${e}`);return t&&JSON.parse(t)}catch(t){console.log("[Dz table] Could not restore table state",t)}return null},$t=(e,o,t)=>{try{t.setItem(`${bt}-${e}`,JSON.stringify(o))}catch(n){console.log("[Dz table] Could not store table state",n)}},xo=e=>[k.IN,k.NOT_IN,k.BETWEEN,k.NOT_BETWEEN].includes(e),vt=e=>e!=null,Io=["data-id","data-selected"],Bo=["data-label","data-align"],Eo={key:1},Ao={name:"TableBody"},xt=l.defineComponent({...Ao,props:{customFormatters:{default:()=>({}),type:Object},emptyTableMessage:{default:"No results.",type:String},enableRowSelection:Boolean,locale:{default:void 0,type:String},table:{required:!0,type:Object}},setup(e){const o=e,t=r=>{const i=r.getContext(),s=r.column.columnDef.dateOptions,a=r.column.columnDef.numberOptions,u=r.column.columnDef.cell;return{props:i,render:(()=>{const c={number:f=>Pt({value:Number(f),locale:a?.locale??o.locale,formatOptions:a?.formatOptions}),date:f=>x.formatDate(f,s?.locale??o.locale,s?.formatOptions),datetime:f=>x.formatDateTime(f,s?.locale??o.locale,s?.formatOptions),currency:f=>Pt({value:Number(f),locale:a?.locale??o.locale,formatOptions:{style:"currency",currency:"USD",...a?.formatOptions&&a.formatOptions}}),...o.customFormatters},p=r.column.columnDef.dataType||"text";return c?.[p]?.(i.getValue())||u})()}},n=r=>{const i=r.column.columnDef.tooltip;return typeof i=="string"?i:typeof i=="function"?i(r):r.getValue()};return(r,i)=>(l.openBlock(),l.createElementBlock("tbody",null,[e.table.getRowModel().rows?.length?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(e.table.getRowModel().rows,s=>(l.openBlock(),l.createElementBlock("tr",{key:`table-row-${s.id}`,"data-id":s.id,"data-selected":e.enableRowSelection?s.getIsSelected():void 0},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.getVisibleCells(),a=>(l.openBlock(),l.createElementBlock("td",{key:`table-data-${s.id}-${a.id}`,class:l.normalizeClass([a.column.id?`cell-${a.column.id}`:""]),"data-label":a.column.id,"data-align":l.unref(Me)({align:a.column.columnDef.align,dataType:a.column.columnDef.dataType}),style:l.normalizeStyle({width:a.column.columnDef.width,maxWidth:a.column.columnDef.maxWidth,minWidth:a.column.columnDef.minWidth})},[a.column.columnDef.tooltip?(l.openBlock(),l.createBlock(l.unref(x.Tooltip),l.mergeProps({key:0,ref_for:!0},a.column.columnDef.tooltipOptions),{content:l.withCtx(()=>[typeof a.column.columnDef.tooltip=="function"&&typeof n(a)!="string"?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n(a)),{key:0})):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createTextVNode(l.toDisplayString(n(a)),1)],64))]),default:l.withCtx(()=>[l.createVNode(l.unref(X),l.mergeProps({ref_for:!0},t(a)),null,16)]),_:2},1040)):(l.openBlock(),l.createBlock(l.unref(X),l.mergeProps({key:1,ref_for:!0},t(a)),null,16))],14,Bo))),128))],8,Io))),128)):(l.openBlock(),l.createElementBlock("tr",Eo,[l.createElementVNode("td",null,l.toDisplayString(e.emptyTableMessage),1)]))]))}}),Do={key:0,class:"data-actions"},_o={name:"TableDataActions"},Mo=l.defineComponent({..._o,props:{actions:{type:Array,required:!0},data:{default:()=>({}),type:Object},displayActions:{default:!0,type:[Boolean,Function]},singleActionMode:{default:"button",type:String,validator:e=>["button","menu"].includes(e)}},emits:["action:click","action:select"],setup(e,{emit:o}){const t=e,n=o,r=l.ref(!1),i=l.ref(),s=l.computed(()=>t.actions.map(p=>({...p,display:typeof p.display=="function"?p.display(t.data):p.display??!0,disabled:typeof p.disabled=="function"?p.disabled(t.data):p.disabled})).filter(p=>p.display)),a=l.computed(()=>s.value.length===1&&s.value[0].icon&&t.singleActionMode==="button"),u=l.computed(()=>typeof t.displayActions=="function"?t.displayActions(t.data):t.displayActions),d=()=>{r.value=!1,n("action:select",i.value)},c=p=>{i.value=p,p?.requireConfirmationModal?r.value=!0:n("action:select",i.value)};return(p,f)=>u.value?(l.openBlock(),l.createElementBlock("div",Do,[a.value?(l.openBlock(),l.createBlock(l.unref(x.ButtonElement),{key:0,disabled:s.value[0].disabled,"icon-left":s.value[0].icon,label:s.value[0].label,rounded:"",variant:"textOnly",onClick:f[0]||(f[0]=g=>p.$emit("action:click"))},null,8,["disabled","icon-left","label"])):s.value.length?(l.openBlock(),l.createBlock(l.unref(x.Dropdown),{key:1,menu:s.value,onSelect:c},{default:l.withCtx(()=>[l.renderSlot(p.$slots,"trigger",{},()=>[l.createVNode(l.unref(_),{icon:"prime:cog",width:"22"})])]),_:3},8,["menu"])):l.createCommentVNode("",!0),l.renderSlot(p.$slots,"confirmationModal",{},()=>[r.value?(l.openBlock(),l.createBlock(l.unref(x.ConfirmationModal),{key:0,"onOn:close":f[1]||(f[1]=g=>r.value=!1),"onOn:confirm":d},l.createSlots({_:2},[i.value?.confirmationOptions?.header?{name:"header",fn:l.withCtx(()=>[l.createElementVNode("p",null,l.toDisplayString(i.value?.confirmationOptions?.header),1)]),key:"0"}:void 0,i.value?.confirmationOptions?.body?{name:"body",fn:l.withCtx(()=>[l.createElementVNode("p",null,l.toDisplayString(i.value?.confirmationOptions?.body),1)]),key:"1"}:void 0,i.value?.confirmationOptions?.footer?{name:"footer",fn:l.withCtx(()=>[l.createElementVNode("p",null,l.toDisplayString(i.value?.confirmationOptions?.footer),1)]),key:"2"}:void 0]),1024)):l.createCommentVNode("",!0)])])):l.createCommentVNode("",!0)}}),Lo=["colSpan","data-align","onClick"],No={key:0,class:"sort-state"},To={key:0,class:"sort-icon",height:"16",viewBox:"0 0 24 24",width:"16",xmlns:"http://www.w3.org/2000/svg"},Ho={key:0,class:"sort-icon",height:"16",viewBox:"0 0 24 24",width:"16",xmlns:"http://www.w3.org/2000/svg"},Oo={key:1,class:"sort-icon",height:"16",viewBox:"0 0 24 24",width:"16",xmlns:"http://www.w3.org/2000/svg"},zo={key:0,class:"header-row filters"},Go=["data-align"],jo={key:3,class:"number-range-filter"},qo={name:"TableHeader"},It=l.defineComponent({...qo,props:{highlightActiveColumn:Boolean,inputDebounceTime:{default:void 0,type:Number},isFilterRowVisible:{default:!1,type:Boolean},table:{required:!0,type:Object}},setup(e){const o=e,t=s=>o.highlightActiveColumn&&(s.getIsSorted()==="asc"||s.getIsSorted()==="desc"||s.getIsFiltered())?"highlight":"",n=s=>s.getFilterValue(),r=s=>s?.length?s.map((a,u)=>{const d=String(a.getDate()).padStart(2,"0"),c=String(a.getMonth()+1).padStart(2,"0"),p=u===0?"00:00:00":"23:59:59";return`${a.getFullYear()}-${c}-${d} ${p}`}).filter(a=>a!==null):null,i=(s,a,u)=>{const d=s.getFilterValue(),c=Array.isArray(d)?[...d]:[void 0,void 0];c[a]=u!==void 0?Number(u):void 0;const p=c.some(f=>f!==void 0);s.setFilterValue(p?c:[])};return(s,a)=>(l.openBlock(),l.createElementBlock("thead",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.table.getHeaderGroups(),u=>(l.openBlock(),l.createElementBlock("tr",{key:u.id,class:"header-row"},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(u.headers,d=>(l.openBlock(),l.createElementBlock("th",{key:`table-header-${d.id}`,class:l.normalizeClass([t(d.column),`column-${d.id}`,d.column.columnDef.enableSorting?"sortable":""]),colSpan:d.colSpan,"data-align":l.unref(Me)({align:d.column.columnDef.align,dataType:d.column.columnDef.dataType}),style:l.normalizeStyle({width:d.column.columnDef.width,maxWidth:d.column.columnDef.maxWidth,minWidth:d.column.columnDef.minWidth}),onClick:c=>d.column.getCanSort()?d.column.getToggleSortingHandler()?.(c):null},[d.isPlaceholder?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createVNode(l.unref(X),{props:d.getContext(),render:d.column.columnDef.header},null,8,["props","render"]),d.column.columnDef.enableSorting?(l.openBlock(),l.createElementBlock("span",No,[!d.column.getIsSorted()&&d.column.getCanSort()?(l.openBlock(),l.createElementBlock("svg",To,a[0]||(a[0]=[l.createElementVNode("path",{d:"M18 10.75H6a.74.74 0 0 1-.69-.46a.75.75 0 0 1 .16-.82l6-6a.75.75 0 0 1 1.06 0l6 6a.75.75 0 0 1 .16.82a.74.74 0 0 1-.69.46M7.81 9.25h8.38L12 5.06ZM12 20.75a.74.74 0 0 1-.53-.22l-6-6a.75.75 0 0 1-.16-.82a.74.74 0 0 1 .69-.46h12a.74.74 0 0 1 .69.46a.75.75 0 0 1-.16.82l-6 6a.74.74 0 0 1-.53.22m-4.19-6L12 18.94l4.19-4.19Z",fill:"currentColor"},null,-1)]))):l.createCommentVNode("",!0),d.column.getIsSorted()&&d.column.getCanSort()?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[d.column.getIsSorted()==="asc"?(l.openBlock(),l.createElementBlock("svg",Ho,a[1]||(a[1]=[l.createElementVNode("path",{d:"M12.53 7.97a.75.75 0 0 0-1.06 0l-7 7A.75.75 0 0 0 5 16.25h14a.75.75 0 0 0 .53-1.28z",fill:"currentColor"},null,-1)]))):(l.openBlock(),l.createElementBlock("svg",Oo,a[2]||(a[2]=[l.createElementVNode("path",{d:"M5 7.75a.75.75 0 0 0-.53 1.28l7 7a.75.75 0 0 0 1.06 0l7-7A.75.75 0 0 0 19 7.75z",fill:"currentColor"},null,-1)])))],64)):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)],64))],14,Lo))),128))]))),128)),e.isFilterRowVisible?(l.openBlock(),l.createElementBlock("tr",zo,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.table.getVisibleLeafColumns(),u=>(l.openBlock(),l.createElementBlock("th",{key:`table-filter-${u.id}`,class:l.normalizeClass([t(u),u.id?`column-${u.id}`:"",u.columnDef.className||"",u.getCanFilter()?`filter ${u.columnDef.meta?.filterVariant}`:""]),"data-align":l.unref(Me)({align:u.columnDef.align,dataType:u.columnDef.dataType}),style:l.normalizeStyle({width:u.columnDef.width,maxWidth:u.columnDef.maxWidth,minWidth:u.columnDef.minWidth})},[u.getCanFilter()?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[u.columnDef.customFilterComponent?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(u.columnDef.customFilterComponent(u)),{key:0})):u.columnDef.meta?.filterVariant==="multiselect"||u.columnDef.meta?.filterVariant==="select"?(l.openBlock(),l.createBlock(l.unref(z.SelectInput),{key:1,"model-value":n(u),options:u.columnDef.meta?.filterOptions||[],placeholder:u.columnDef.filterPlaceholder,name:`multiselect-filter-${u.columnDef.accessorKey}`,multiple:u.columnDef.meta?.filterVariant==="multiselect","enable-tooltip":"","onUpdate:modelValue":d=>u.setFilterValue(d)},null,8,["model-value","options","placeholder","name","multiple","onUpdate:modelValue"])):u.columnDef.meta?.filterVariant==="dateRange"?(l.openBlock(),l.createBlock(l.unref(z.DatePicker),{key:2,"model-value":n(u),placeholder:u.columnDef.filterPlaceholder,name:"`date-range-${column.columnDef.accessorKey}`",range:"","onUpdate:modelValue":d=>u.setFilterValue(r(d))},null,8,["model-value","placeholder","onUpdate:modelValue"])):u.columnDef.meta?.filterVariant==="range"?(l.openBlock(),l.createElementBlock("div",jo,[l.createVNode(l.unref(z.NumberInput),{"model-value":Array.isArray(n(u))&&n(u)[0]!==null?Number(n(u)[0]):void 0,placeholder:u.columnDef.filterPlaceholder?.split(",")[0],name:"`range-${column.columnDef.accessorKey}-start`","onUpdate:modelValue":d=>i(u,0,d)},null,8,["model-value","placeholder","onUpdate:modelValue"]),l.createVNode(l.unref(z.NumberInput),{"model-value":Array.isArray(n(u))&&n(u)[1]!==null?Number(n(u)[1]):void 0,placeholder:u.columnDef.filterPlaceholder?.split(",")[1]??u.columnDef.filterPlaceholder,name:"`range-${column.columnDef.accessorKey}-end`","onUpdate:modelValue":d=>i(u,1,d)},null,8,["model-value","placeholder","onUpdate:modelValue"])])):(l.openBlock(),l.createBlock(l.unref(x.DebouncedInput),{key:4,id:`input-filter-${u.id}`,"debounce-time":e.inputDebounceTime,"model-value":typeof n(u)=="string"?String(n(u)):"",placeholder:u.columnDef.filterPlaceholder,"onUpdate:modelValue":d=>u.setFilterValue(d)},null,8,["id","debounce-time","model-value","placeholder","onUpdate:modelValue"]))],64)):l.createCommentVNode("",!0)],14,Go))),128))])):l.createCommentVNode("",!0)]))}}),Ko={class:"toolbar"},Wo={name:"TableToolbar"},Qo=l.defineComponent({...Wo,props:{columnActionButtonLabel:{default:"Columns",type:String},hasActionsColumn:Boolean,hasSelectionColumn:Boolean,resetButtonLabel:{default:"Reset all",type:String},showColumnAction:Boolean,showResetButton:Boolean,table:{required:!0,type:Object}},emits:["on:drag","on:reset"],setup(e,{emit:o}){const t=e,n=o,r=l.computed(()=>t.table.getAllLeafColumns().filter(s=>s.id!=="select"&&s.id!=="actions").map((s,a)=>({id:a,data:s,render:u=>{let d=u.columnDef.header;return typeof u.columnDef.header=="function"&&(d=u.columnDef.header()),l.h(z.Checkbox,{label:d,modelValue:u.getIsVisible(),name:u.columnDef.accessorKey,"onUpdate:modelValue":()=>u.toggleVisibility()})}}))),i=s=>{const a=[...t.hasSelectionColumn?["select"]:[],...s.map(u=>String(u?.data?.id)),...t.hasActionsColumn?["actions"]:[]];n("on:drag",a)};return(s,a)=>(l.openBlock(),l.createElementBlock("div",Ko,[e.showResetButton?(l.openBlock(),l.createBlock(l.unref(x.ButtonElement),{key:0,label:e.resetButtonLabel,variant:"outlined",severity:"secondary",onClick:a[0]||(a[0]=u=>s.$emit("on:reset"))},null,8,["label"])):l.createCommentVNode("",!0),e.showColumnAction?(l.openBlock(),l.createBlock(l.unref(x.Popup),{key:1,position:"bottom"},{content:l.withCtx(()=>[l.createVNode(l.unref(x.SortableList),{list:r.value,onOnDrag:i},null,8,["list"])]),default:l.withCtx(()=>[l.createVNode(l.unref(x.ButtonElement),{label:e.columnActionButtonLabel,variant:"outlined",severity:"secondary"},null,8,["label"])]),_:1})):l.createCommentVNode("",!0),l.renderSlot(s.$slots,"default")]))}}),Uo=["id"],Xo={key:0,class:"loading-overlay"},Yo=["data-align"],Jo={class:"table-wrapper"},Zo={key:0},er={name:"DataTable"},Bt=l.defineComponent({...er,props:{dataActionMenu:{default:()=>[],type:Array},columnActionButtonLabel:{default:void 0,type:String},columnsData:{type:Array,default:()=>[]},customFormatters:{default:()=>({}),type:Object},data:{type:Array,default:()=>[]},displayActions:{default:!0,type:[Boolean,Function]},emptyTableMessage:{default:void 0,type:String},enableRowSelection:{default:!1,type:Boolean},enableSortingRemoval:{default:!1,type:Boolean},highlightActiveHeaderColumn:Boolean,id:{default:void 0,type:String},initialFilters:{default:()=>[],type:Array},initialSorting:{default:()=>[],type:Array},inputDebounceTime:{default:void 0,type:Number},isLoading:Boolean,isServerTable:Boolean,locale:{default:void 0,type:String},paginated:{default:!0,type:Boolean},paginationOptions:{default:()=>({}),type:Object},persistState:Boolean,persistStateStorage:{default:"localStorage",type:String,validator:e=>["localStorage","sessionStorage"].includes(e)},resetButtonLabel:{default:void 0,type:String},rowPerPage:{default:Vo,type:Number},rowPerPageOptions:{default:()=>ko,type:Array},showColumnAction:Boolean,showResetButton:Boolean,singleActionMode:{default:"menu",type:String,validator:e=>["button","menu"].includes(e)},tableOptions:{default:()=>({}),type:Object},titleInfo:{default:void 0,type:Object},totalRecords:{default:0,type:Number},visibleColumns:{default:()=>[],type:Array}},emits:["action:click","action:select","change:rowSelection","update:request"],setup(e,{emit:o}){const t=e,n=o,r=[],i=l.ref(t.initialFilters),s=l.ref([]),a=l.ref({}),u=l.ref({pageIndex:_e,pageSize:t.paginated?t.rowPerPage:t.data.length}),d=l.ref({}),c=l.ref(t.initialSorting),p=l.computed(()=>t.columnsData.some(w=>w.enableColumnFilter)),f=l.computed(()=>({columnFilters:i.value,columnOrder:s.value,columnVisibility:a.value,pagination:u.value,sorting:c.value})),g=l.computed(()=>x.getStorage(t.persistStateStorage)),m=l.computed(()=>t.isServerTable?t.totalRecords:S.value.getFilteredRowModel().rows?.length),h=l.computed(()=>S.value.getSelectedRowModel().rows.map(w=>w.original)),S=l.computed(()=>Ft({columns:r,state:{columnFilters:i.value,columnOrder:s.value?.length?s.value:t.visibleColumns,columnVisibility:a.value,pagination:u.value,rowSelection:d.value,get sorting(){return c.value}},onColumnFiltersChange:w=>{i.value=typeof w=="function"?w(i.value):w,Array.isArray(i.value)||(i.value=[]),u.value.pageIndex=_e,t.isServerTable&&(i.value=t.columnsData.filter(C=>C.enableColumnFilter&&(t.visibleColumns.includes(String(C.accessorKey??C.id))||!t.visibleColumns.length)).map(C=>{if(C.meta?.filterVariant==="range"){const V=i.value.find(N=>N?.id===C.accessorKey)?.value,[$,B]=V||[],E=C.meta?.serverFilterFn||(typeof $=="number"&&typeof B=="number"&&$<=B?k.BETWEEN:typeof $=="number"&&!B?k.GREATER_THAN_OR_EQUAL:typeof B=="number"?k.LESS_THAN_OR_EQUAL:null);return E&&V?.length?{filterFn:E,id:C.accessorKey,value:V}:void 0}else return{filterFn:C?.meta?.serverFilterFn,id:C.accessorKey,value:i.value.find(V=>V.id===C.accessorKey)?.value}}).filter(Boolean),F())},onColumnVisibilityChange:w=>{a.value=typeof w=="function"?w(a.value):w},onPaginationChange:w=>{u.value=typeof w=="function"?w(u.value):w,t.isServerTable&&F()},onRowSelectionChange:w=>{d.value=typeof w=="function"?w(d.value):w,n("change:rowSelection",h.value)},onSortingChange:w=>{c.value=typeof w=="function"?w(c.value):w,t.isServerTable&&F()},columnResizeMode:"onChange",data:t.data,enableSortingRemoval:t.enableSortingRemoval,getCoreRowModel:St(),getFilteredRowModel:wt(),getPaginationRowModel:Ct(),getSortedRowModel:yt(),manualFiltering:t.isServerTable,manualSorting:t.isServerTable,manualPagination:t.isServerTable,...t.tableOptions}));l.watch([i,s,a,u,c],()=>{t.persistState&&t.id&&$t(t.id,f.value,g.value)});const F=()=>{const w=$o(c.value,i.value,u.value);n("update:request",w)},P=()=>{i.value=t.initialFilters,s.value=[],a.value={},u.value={pageIndex:_e,pageSize:t.paginated?t.rowPerPage:t.data.length},c.value=t.initialSorting},b=()=>{if(t.enableRowSelection&&r.push({accessorKey:"select",header:({table:w})=>l.h(z.Checkbox,{"aria-label":"Select all",modelValue:w.getIsAllPageRowsSelected(),"onUpdate:modelValue":()=>w.toggleAllPageRowsSelected(!w.getIsAllPageRowsSelected())}),cell:({row:w})=>l.h(z.Checkbox,{"aria-label":"Select row",modelValue:w.getIsSelected(),"onUpdate:modelValue":()=>w.toggleSelected(!w.getIsSelected())}),align:"center",enableColumnFilter:!1,enableSorting:!1}),t.columnsData.forEach(w=>{t.visibleColumns.length&&!t.visibleColumns.includes(String(w.accessorKey??w.id))||(w.meta?.filterVariant==="multiselect"&&!w.filterFn?w.filterFn=(C,V,$)=>!$||$.length===0?C:$.some(B=>C.getValue(V)==B):w.meta?.filterVariant==="select"&&!w.filterFn?w.filterFn=(C,V,$)=>$===void 0||$.length===0?!0:String($)===String(C.getValue(V)):w.meta?.filterVariant==="dateRange"&&!w.filterFn?w.filterFn=(C,V,$)=>{if($?.length){const B=new Date($[1]).setHours(23,59,59,999),E=new Date(C.getValue(V)),N=new Date($[0]).setHours(0,0,0,0);return E.getTime()>=N&&E.getTime()<=B}return!0}:w.meta?.filterVariant==="range"&&(w.filterFn=(C,V,$)=>{if(!Array.isArray($))return!0;const[B,E]=$,N=C.getValue(V);return B&&E?N>=B&&N<=E:B?N>=B:E?N<=E:!0}),r.push({...w,enableColumnFilter:w.enableColumnFilter??!1,enableSorting:w.enableSorting??!1}))}),t.dataActionMenu.length&&r.push({accessorKey:"actions",align:"center",enableColumnFilter:!1,enableSorting:!1,header:()=>l.h(_,{icon:"prime:cog",width:"24"}),cell:({row:w})=>l.h(Mo,{actions:t.dataActionMenu,data:w.original,displayActions:t.displayActions,singleActionMode:t.singleActionMode,"onAction:click":()=>n("action:click",w.original),"onAction:select":C=>n("action:select",{action:C?.key||C?.label,data:w.original})})}),t.persistState&&!t.id)throw new Error('Id is required when prop "persistState" is true');v(),t.isServerTable&&F()},v=()=>{if(!t.persistState||!t.id)return;const w=vo(t.id,g.value);w&&(i.value=w.columnFilters,s.value=w.columnOrder,a.value=w.columnVisibility,c.value=w.sorting,t.rowPerPageOptions.includes(w.pagination.pageSize)&&(u.value=w.pagination)),$t(t.id,f.value,g.value)};return b(),(w,C)=>(l.openBlock(),l.createElementBlock("div",{id:e.id,class:"table-container"},[e.isLoading?(l.openBlock(),l.createElementBlock("div",Xo,[l.createVNode(l.unref(x.LoadingIcon),{class:"loading-icon"})])):l.createCommentVNode("",!0),e.titleInfo?(l.openBlock(),l.createElementBlock("span",{key:1,"data-align":e.titleInfo.align||"center"},l.toDisplayString(e.titleInfo.text),9,Yo)):l.createCommentVNode("",!0),e.showColumnAction||e.showResetButton||w.$slots.toolbar?(l.openBlock(),l.createBlock(Qo,{key:2,"column-action-button-label":e.columnActionButtonLabel,"has-actions-column":!!e.dataActionMenu.length,"has-selection-column":e.enableRowSelection,"reset-button-label":e.resetButtonLabel,"show-column-action":e.showColumnAction,"show-reset-button":e.showResetButton,table:S.value,"onOn:reset":P,"onOn:drag":C[0]||(C[0]=V=>s.value=V)},{default:l.withCtx(()=>[l.renderSlot(w.$slots,"toolbar")]),_:3},8,["column-action-button-label","has-actions-column","has-selection-column","reset-button-label","show-column-action","show-reset-button","table"])):l.createCommentVNode("",!0),l.createElementVNode("div",Jo,[l.createElementVNode("table",{style:l.normalizeStyle(`width: ${S.value.getCenterTotalSize()}`)},[l.createVNode(It,{"highlight-active-column":e.highlightActiveHeaderColumn,"input-debounce-time":e.inputDebounceTime,"is-filter-row-visible":p.value,table:S.value},null,8,["highlight-active-column","input-debounce-time","is-filter-row-visible","table"]),l.createVNode(xt,{"custom-formatters":e.customFormatters,"empty-table-message":e.emptyTableMessage,locale:e.locale,table:S.value},null,8,["custom-formatters","empty-table-message","locale","table"]),w.$slots.footer?(l.openBlock(),l.createElementBlock("tfoot",Zo,[l.renderSlot(w.$slots,"footer")])):l.createCommentVNode("",!0)],4)]),(e.isServerTable||e.paginated)&&m.value>0?l.renderSlot(w.$slots,"pagination",{key:3},()=>[l.createVNode(Po,l.mergeProps(e.paginationOptions,{"current-page":u.value.pageIndex,"default-items-per-page":u.value.pageSize,"items-per-page-options":e.rowPerPageOptions,"total-items":m.value,"onUpdate:currentPage":S.value.setPageIndex,"onUpdate:itemsPerPage":S.value.setPageSize}),null,16,["current-page","default-items-per-page","items-per-page-options","total-items","onUpdate:currentPage","onUpdate:itemsPerPage"])]):l.createCommentVNode("",!0)],8,Uo))}}),tr={name:"FilesTable"},Et=l.defineComponent({...tr,props:{archiveFile:Boolean,columnsData:{default:()=>[],type:Array},deleteFile:Boolean,downloadFile:Boolean,editDescription:Boolean,initialSorting:{default:()=>[],type:Array},files:{default:()=>[],type:Array},id:{default:"files-table",type:String},isLoading:Boolean,isServerTable:Boolean,locale:{default:void 0,type:String},persistState:Boolean,persistStateStorage:{default:"localStorage",type:String,validator:e=>["localStorage","sessionStorage"].includes(e)},messages:{default:void 0,type:Object},shareFile:Boolean,tableOptions:{default:()=>({}),type:Object},totalRecords:{default:0,type:Number},viewFile:Boolean,visibleColumns:{default:()=>[],type:Array}},emits:["action:archive","action:delete","action:download","action:edit","action:share","action:view","update:request"],setup(e,{emit:o}){const t=e,n=o,r=[{accessorKey:"originalFileName",enableColumnFilter:!0,enableSorting:!0,filterPlaceholder:"File name",header:"File"},{accessorKey:"description",enableColumnFilter:!0,enableSorting:!0,filterPlaceholder:"Description",header:"Description",tooltip:!0},{accessorKey:"size",enableColumnFilter:!t.isServerTable,enableSorting:!t.isServerTable,filterPlaceholder:"Size",header:"Size",meta:{filterVariant:"range"}},{accessorKey:"uploadedBy",cell:({row:{original:c}})=>c.uploadedBy?c.uploadedBy.givenName||c.uploadedBy.lastName?`${c.uploadedBy.givenName||""} ${c.uploadedBy.lastName||""}`:c.uploadedBy.email:l.h("code",{},"—"),enableColumnFilter:!t.isServerTable,enableSorting:!t.isServerTable,filterFn:(c,p,f)=>{const g=c.getValue(p);return!f||f.length===0?!0:`${g.givenName||""} ${g.lastName||""}`.trim().toLowerCase().includes(f.toLowerCase())||(g.email?.toLowerCase().includes(f.toLowerCase())??!1)},filterPlaceholder:"Name",header:"Uploaded by"},{accessorKey:"uploadedAt",cell:({getValue:c})=>x.formatDateTime(c(),t.locale),enableColumnFilter:!0,enableSorting:!0,filterPlaceholder:"Date range",header:"Uploaded at",meta:{filterVariant:"dateRange",serverFilterFn:"between"}},{accessorKey:"downloadCount",align:"right",enableColumnFilter:!0,enableSorting:!0,filterPlaceholder:"Number of downloads",header:"Download count",meta:{filterVariant:"range"}},{accessorKey:"lastDownloadedAt",cell:({getValue:c})=>c()?x.formatDateTime(c(),t.locale):l.h("code",{},"—"),enableColumnFilter:!0,enableSorting:!0,filterPlaceholder:"Date range",header:"Last downloaded at",meta:{filterVariant:"dateRange",serverFilterFn:"between"}}],i=l.computed(()=>{const c=[];return t.archiveFile&&c.push({confirmationOptions:{body:t.messages?.archiveConfirmationMessage||"Are you sure you want to archive this file?",header:t.messages?.archiveConfirmationHeader||"Archive file"},icon:"pi pi-book",key:"archive",label:t.messages?.archiveAction||"Archive",requireConfirmationModal:!0}),t.downloadFile&&c.push({icon:"pi pi-download",key:"download",label:t.messages?.downloadAction||"Download"}),t.editDescription&&c.push({icon:"pi pi-pencil",key:"edit",label:t.messages?.editDescriptionAction||"Edit description"}),t.shareFile&&c.push({icon:"pi pi-share-alt",key:"share",label:t.messages?.shareAction||"Share"}),t.viewFile&&c.push({icon:"pi pi-eye",key:"view",label:t.messages?.viewAction||"View"}),t.deleteFile&&c.push({class:"danger",confirmationOptions:{body:t.messages?.deleteConfirmationMessage||"Are you sure you want to delete this file?",header:t.messages?.deleteConfirmationHeader||"Delete file"},icon:"pi pi-trash",label:t.messages?.deleteAction||"Delete",key:"delete",requireConfirmationModal:!0}),c}),s=l.computed(()=>[...r.map(c=>{const p=t.columnsData.find(f=>f.accessorKey===c.accessorKey);return p?{...c,...p}:c}),...t.columnsData.filter(c=>!r.some(p=>p.accessorKey===c.accessorKey))]),a=c=>{t.archiveFile?n("action:archive",c):t.downloadFile?n("action:download",c):t.editDescription?n("action:edit",c):t.shareFile?n("action:share",c):t.viewFile?n("action:view",c):t.deleteFile&&n("action:delete",c)},u=c=>{switch(c.action){case"archive":n("action:archive",c.data);break;case"delete":n("action:delete",c.data);break;case"download":n("action:download",c.data);break;case"edit":n("action:edit",c.data);break;case"share":n("action:share",c.data);break;case"view":n("action:view",c.data);break}},d=c=>{n("update:request",c)};return(c,p)=>(l.openBlock(),l.createBlock(Bt,l.mergeProps(e.tableOptions,{id:e.id,"columns-data":s.value,data:e.files,"data-action-menu":i.value,"empty-table-message":t.messages?.tableEmpty||"The table is empty","initial-sorting":e.initialSorting,"is-loading":e.isLoading,"is-server-table":e.isServerTable,locale:String(e.locale),"persist-state":e.persistState,"persist-state-storage":e.persistStateStorage,"total-records":e.totalRecords,"visible-columns":e.visibleColumns,class:"table-files","onAction:click":a,"onAction:select":u,"onUpdate:request":d}),l.createSlots({_:2},[c.$slots.toolbar?{name:"toolbar",fn:l.withCtx(()=>[l.renderSlot(c.$slots,"toolbar")]),key:"0"}:void 0,c.$slots.footer?{name:"footer",fn:l.withCtx(()=>[l.renderSlot(c.$slots,"footer")]),key:"1"}:void 0,c.$slots.pagination?{name:"pagination",fn:l.withCtx(()=>[l.renderSlot(c.$slots,"pagination")]),key:"2"}:void 0]),1040,["id","columns-data","data","data-action-menu","empty-table-message","initial-sorting","is-loading","is-server-table","locale","persist-state","persist-state-storage","total-records","visible-columns"]))}}),nr={name:"FilesPresentation"},or=l.defineComponent({...nr,props:{actionButtonsVisibility:{default:()=>({archive:!0,delete:!0,download:!0,edit:!0,share:!0,view:!0}),type:Object},files:{default:()=>[],type:Array},messages:{default:void 0,type:Object},listProps:{default:()=>{},type:Object},locale:{default:void 0,type:String},presentation:{default:()=>"list",type:String,validator:e=>["list","table"].includes(e)},tableProps:{default:()=>{},type:Object},visibleFileDetails:{default:()=>["actions","description","downloadCount","lastDownloadedAt","originalFileName","size","uploadedAt","uploadedBy"],type:Array}},emits:["action:archive","action:delete","action:download","action:edit","action:share","action:view"],setup(e,{emit:o}){const t=e,n=o,r=l.computed(()=>Object.fromEntries(["actions","description","downloadCount","lastDownloadedAt","originalFileName","size","uploadedAt","uploadedBy"].map(a=>[a,t.visibleFileDetails.includes(a)]))),i=(s,a)=>{switch(s){case"archive":case"delete":case"download":case"edit":case"share":case"view":n(`action:${s}`,a);break}};return(s,a)=>e.presentation==="list"?(l.openBlock(),l.createBlock(l.unref(x.FilesList),l.mergeProps({key:0},e.listProps,{"action-buttons-visibility":e.actionButtonsVisibility,files:e.files,"file-detail-visibility":r.value,locale:e.locale,messages:e.messages,"onAction:archive":a[0]||(a[0]=u=>i("archive",u)),"onAction:delete":a[1]||(a[1]=u=>i("delete",u)),"onAction:download":a[2]||(a[2]=u=>i("download",u)),"onAction:edit":a[3]||(a[3]=u=>i("edit",u)),"onAction:share":a[4]||(a[4]=u=>i("share",u)),"onAction:view":a[5]||(a[5]=u=>i("view",u))}),null,16,["action-buttons-visibility","files","file-detail-visibility","locale","messages"])):(l.openBlock(),l.createBlock(Et,l.mergeProps({key:1},e.tableProps,{"archive-file":e.actionButtonsVisibility.archive,"delete-file":e.actionButtonsVisibility.delete,"download-file":e.actionButtonsVisibility.download,"edit-description":e.actionButtonsVisibility.edit,files:e.files,locale:e.locale,messages:e.messages,"share-file":e.actionButtonsVisibility.share,"view-file":e.actionButtonsVisibility.view,"visible-columns":e.visibleFileDetails,"onAction:archive":a[6]||(a[6]=u=>i("archive",u)),"onAction:delete":a[7]||(a[7]=u=>i("delete",u)),"onAction:download":a[8]||(a[8]=u=>i("download",u)),"onAction:edit":a[9]||(a[9]=u=>i("edit",u)),"onAction:share":a[10]||(a[10]=u=>i("share",u)),"onAction:view":a[11]||(a[11]=u=>i("view",u))}),null,16,["archive-file","delete-file","download-file","edit-description","files","locale","messages","share-file","view-file","visible-columns"]))}}),rr={class:"table-wrapper"},ir={key:0,class:"toggle-wrap"},lr=["colSpan","onClick"],sr={key:0},ar=["data-label"],ur={class:"page-navigation-container"},cr={class:"page-indicators-selection-container"},dr={class:"page-number-indicators"},gr={class:"go-to-page-container"},fr=["value","max"],pr=["value"],mr=["value"],hr={class:"page-navigation-buttons-container"},Sr=["disabled"],wr=["disabled"],Cr=["disabled"],yr=["disabled"],Rr={name:"TanstackTable"},Fr=l.defineComponent({...Rr,props:{columnsData:{type:Array,default:()=>[]},rows:{type:Array,default:()=>[]},enableToggle:{type:Boolean,default:()=>!1}},setup(e){const o=e,t=Bn(),n=[];o.columnsData.forEach(c=>{const p=t.accessor(c.accessorKey,{header:()=>c.header,footer:f=>f.column.id,enableSorting:c.sort!==void 0?c.sort:!1});n.push(p)});const r=l.ref([]),i=Ft({columns:n,state:{get sorting(){return r.value}},onSortingChange:c=>{r.value=typeof c=="function"?c(r.value):c},columnResizeMode:"onChange",data:o.rows,getCoreRowModel:St(),getFilteredRowModel:wt(),getPaginationRowModel:Ct(),getSortedRowModel:yt()}),s=l.ref(!1),a=()=>{s.value=!s.value},u=c=>{const p=c.target,f=p.value?Number(p.value)-1:0;i.setPageIndex(f)},d=c=>{const p=c.target,f=p.value?Number(p.value):10;i.setPageSize(f)};return(c,p)=>(l.openBlock(),l.createElementBlock("div",rr,[l.createElementVNode("table",{style:l.normalizeStyle(`width: ${l.unref(i).getCenterTotalSize()}`)},[o.enableToggle?(l.openBlock(),l.createElementBlock("div",ir,[l.createElementVNode("button",{class:"table-toggle",onClick:a},[l.createVNode(l.unref(_),{icon:"mingcute:menu-fill",class:"toggle-icon"})])])):l.createCommentVNode("",!0),l.createElementVNode("colgroup",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(o.columnsData,f=>(l.openBlock(),l.createElementBlock("col",{key:f.accessorKey,style:l.normalizeStyle(`width: ${f.size}px`)},null,4))),128))]),l.createElementVNode("thead",{class:l.normalizeClass({expand:s.value})},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(i).getHeaderGroups(),f=>(l.openBlock(),l.createElementBlock("tr",{key:f.id},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(f.headers,g=>(l.openBlock(),l.createElementBlock("th",{key:g.id,colSpan:g.colSpan,onClick:m=>g.column.getCanSort()?g.column.getToggleSortingHandler()?.(m):null},[g.isPlaceholder?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",sr,[l.createVNode(l.unref(X),{props:g.getContext(),render:g.column.columnDef.header},null,8,["props","render"]),!g.column.getIsSorted()&&g.column.getCanSort()?(l.openBlock(),l.createBlock(l.unref(_),{key:0,icon:"ri:arrow-up-down-line",class:"sort-icon"})):l.createCommentVNode("",!0),g.column.getIsSorted()&&g.column.getCanSort()?(l.openBlock(),l.createBlock(l.unref(_),{key:1,icon:g.column.getIsSorted()==="asc"?"mdi:arrow-up":"mdi:arrow-down",class:"sort-icon"},null,8,["icon"])):l.createCommentVNode("",!0)]))],8,lr))),128))]))),128))],2),l.createElementVNode("tbody",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(i).getRowModel().rows,f=>(l.openBlock(),l.createElementBlock("tr",{key:f.id},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(f.getVisibleCells(),g=>(l.openBlock(),l.createElementBlock("td",{key:g.id,"data-label":g.column.id},[l.createVNode(l.unref(X),{props:g.getContext(),render:g.column.columnDef.cell},null,8,["props","render"])],8,ar))),128))]))),128))])],4),l.createElementVNode("div",ur,[l.createElementVNode("div",cr,[l.createElementVNode("span",dr,l.toDisplayString(l.unref(i).getState().pagination.pageIndex+1)+" of "+l.toDisplayString(l.unref(i).getPageCount()),1),l.createElementVNode("span",gr,[p[6]||(p[6]=l.createElementVNode("span",{class:"go-to-page-text"}," Go to page: ",-1)),l.createElementVNode("input",{class:"page-input",type:"number",value:l.unref(i).getState().pagination.pageIndex+1,max:l.unref(i).getPageCount(),onInput:p[0]||(p[0]=f=>u(f))},null,40,fr)]),l.createElementVNode("select",{value:l.unref(i).getState().pagination.pageSize,onChange:p[1]||(p[1]=f=>d(f))},[(l.openBlock(),l.createElementBlock(l.Fragment,null,l.renderList([10,20,30,40,50],f=>l.createElementVNode("option",{key:f,value:f}," Show "+l.toDisplayString(f),9,mr)),64))],40,pr)]),l.createElementVNode("div",hr,[l.createElementVNode("button",{class:"page-navigation-button",disabled:!l.unref(i).getCanPreviousPage(),onClick:p[2]||(p[2]=f=>l.unref(i).setPageIndex(0))},[l.createVNode(l.unref(_),{icon:"material-symbols:keyboard-double-arrow-left-rounded",class:"navigation-button-icon"})],8,Sr),l.createElementVNode("button",{class:"page-navigation-button",disabled:!l.unref(i).getCanPreviousPage(),onClick:p[3]||(p[3]=f=>l.unref(i).previousPage())},[l.createVNode(l.unref(_),{icon:"material-symbols:arrow-back-ios-new-rounded",class:"navigation-button-icon"})],8,wr),l.createElementVNode("button",{class:"page-navigation-button",disabled:!l.unref(i).getCanNextPage(),onClick:p[4]||(p[4]=f=>l.unref(i).nextPage())},[l.createVNode(l.unref(_),{icon:"material-symbols:arrow-forward-ios-rounded",class:"navigation-button-icon"})],8,Cr),l.createElementVNode("button",{class:"page-navigation-button",disabled:!l.unref(i).getCanNextPage(),onClick:p[5]||(p[5]=f=>l.unref(i).setPageIndex(l.unref(i).getPageCount()-1))},[l.createVNode(l.unref(_),{icon:"material-symbols:keyboard-double-arrow-right-rounded",class:"navigation-button-icon"})],8,yr)])])]))}});D.FilesPresentation=or,D.FilesTable=Et,D.Table=Bt,D.TableBody=xt,D.TableHeader=It,D.TanstackTable=Fr,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -24,6 +24,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
24
24
|
default: () => void;
|
|
25
25
|
type: ObjectConstructor;
|
|
26
26
|
};
|
|
27
|
+
locale: {
|
|
28
|
+
default: undefined;
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
};
|
|
27
31
|
presentation: {
|
|
28
32
|
default: () => string;
|
|
29
33
|
type: StringConstructor;
|
|
@@ -61,6 +65,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
61
65
|
default: () => void;
|
|
62
66
|
type: ObjectConstructor;
|
|
63
67
|
};
|
|
68
|
+
locale: {
|
|
69
|
+
default: undefined;
|
|
70
|
+
type: StringConstructor;
|
|
71
|
+
};
|
|
64
72
|
presentation: {
|
|
65
73
|
default: () => string;
|
|
66
74
|
type: StringConstructor;
|
|
@@ -82,6 +90,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
82
90
|
"onAction:share"?: ((...args: any[]) => any) | undefined;
|
|
83
91
|
"onAction:view"?: ((...args: any[]) => any) | undefined;
|
|
84
92
|
}>, {
|
|
93
|
+
locale: string;
|
|
85
94
|
files: IFile[];
|
|
86
95
|
messages: TableMessages;
|
|
87
96
|
actionButtonsVisibility: Record<string, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Index.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/FilesPresentation/Index.vue.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Index.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/FilesPresentation/Index.vue.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;;;;;;;;;;;;;;;cA8GjB,QAAQ,CAAC,KAAK,EAAE,CAAC;;;;cAIhB,QAAQ,CAAC,aAAa,CAAC;;;;;;;;;;;;;2BAapB,MAAM;;;;;;;;cAiBV,QAAQ,CAAC,MAAM,EAAE,CAAC;;;;;;;;;;;;;;;;cAlClB,QAAQ,CAAC,KAAK,EAAE,CAAC;;;;cAIhB,QAAQ,CAAC,aAAa,CAAC;;;;;;;;;;;;;2BAapB,MAAM;;;;;;;;cAiBV,QAAQ,CAAC,MAAM,EAAE,CAAC;;;;;;;;;;;;;;;;;;;AA7IrC,wBAoTc"}
|
|
@@ -24,6 +24,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
|
|
|
24
24
|
};
|
|
25
25
|
isLoading: BooleanConstructor;
|
|
26
26
|
isServerTable: BooleanConstructor;
|
|
27
|
+
locale: {
|
|
28
|
+
default: undefined;
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
};
|
|
27
31
|
persistState: BooleanConstructor;
|
|
28
32
|
persistStateStorage: {
|
|
29
33
|
default: string;
|
|
@@ -71,6 +75,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
|
|
|
71
75
|
};
|
|
72
76
|
isLoading: BooleanConstructor;
|
|
73
77
|
isServerTable: BooleanConstructor;
|
|
78
|
+
locale: {
|
|
79
|
+
default: undefined;
|
|
80
|
+
type: StringConstructor;
|
|
81
|
+
};
|
|
74
82
|
persistState: BooleanConstructor;
|
|
75
83
|
persistStateStorage: {
|
|
76
84
|
default: string;
|
|
@@ -105,6 +113,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
|
|
|
105
113
|
"onAction:view"?: ((...args: any[]) => any) | undefined;
|
|
106
114
|
}>, {
|
|
107
115
|
id: string;
|
|
116
|
+
locale: string;
|
|
108
117
|
isLoading: boolean;
|
|
109
118
|
isServerTable: boolean;
|
|
110
119
|
persistState: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Index.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/FilesTable/Index.vue.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAEV,YAAY,EACZ,qBAAqB,EAEtB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;;;;;
|
|
1
|
+
{"version":3,"file":"Index.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/FilesTable/Index.vue.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAEV,YAAY,EACZ,qBAAqB,EAEtB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;;;;;cAuTjB,QAAQ,CAAC,qBAAqB,CAAC,GAAG,CAAC,EAAE,CAAC;;;;;;;cAOtC,QAAQ,CAAC,YAAY,CAAC;;;;cAItB,QAAQ,CAAC,KAAK,EAAE,CAAC;;;;;;;;;;;;;;;;2BAgBb,MAAM;;;;cAKT,QAAQ,CAAC,aAAa,CAAC;;;;;;;;;;;;;;cAcxB,QAAQ,CAAC,MAAM,EAAE,CAAC;;;;;;cA9ClB,QAAQ,CAAC,qBAAqB,CAAC,GAAG,CAAC,EAAE,CAAC;;;;;;;cAOtC,QAAQ,CAAC,YAAY,CAAC;;;;cAItB,QAAQ,CAAC,KAAK,EAAE,CAAC;;;;;;;;;;;;;;;;2BAgBb,MAAM;;;;cAKT,QAAQ,CAAC,aAAa,CAAC;;;;;;;;;;;;;;cAcxB,QAAQ,CAAC,MAAM,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAmI5B,CAAC,CAAC,IAAiB,KAAK,GAAG;YAC5B,CAAC,CAAC,IAAiB,KAAK,GAAG;gBACvB,CAAC,CAAC,IAAiB,KAAK,GAAG;;AAvevC,wBA2fc;AACd,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAAE,MAAM,EAAE,CAAC,CAAA;KAAE,CAAA;CAAE,CAAC"}
|
|
@@ -57,6 +57,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
|
|
|
57
57
|
};
|
|
58
58
|
isLoading: BooleanConstructor;
|
|
59
59
|
isServerTable: BooleanConstructor;
|
|
60
|
+
locale: {
|
|
61
|
+
default: undefined;
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
};
|
|
60
64
|
paginated: {
|
|
61
65
|
default: boolean;
|
|
62
66
|
type: BooleanConstructor;
|
|
@@ -165,6 +169,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
|
|
|
165
169
|
};
|
|
166
170
|
isLoading: BooleanConstructor;
|
|
167
171
|
isServerTable: BooleanConstructor;
|
|
172
|
+
locale: {
|
|
173
|
+
default: undefined;
|
|
174
|
+
type: StringConstructor;
|
|
175
|
+
};
|
|
168
176
|
paginated: {
|
|
169
177
|
default: boolean;
|
|
170
178
|
type: BooleanConstructor;
|
|
@@ -225,6 +233,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
|
|
|
225
233
|
}>, {
|
|
226
234
|
inputDebounceTime: number;
|
|
227
235
|
id: string;
|
|
236
|
+
locale: string;
|
|
228
237
|
enableRowSelection: boolean;
|
|
229
238
|
customFormatters: Record<string, (value: unknown) => unknown>;
|
|
230
239
|
emptyTableMessage: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Table.vue.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,mBAAmB,EAAwB,MAAM,UAAU,CAAC;AAE1E,OAAO,KAAK,EACV,SAAS,EACT,kBAAkB,EAElB,YAAY,EAEb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;;;;
|
|
1
|
+
{"version":3,"file":"Table.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Table.vue.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,mBAAmB,EAAwB,MAAM,UAAU,CAAC;AAE1E,OAAO,KAAK,EACV,SAAS,EACT,kBAAkB,EAElB,YAAY,EAEb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;;;;cAqejB,QAAQ,CAAC,mBAAmB,EAAE,CAAC;;;;;;;cAQ/B,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;;;;;cAKzB,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;;;;;;;;cAQpC,QAAQ,CACnC,OAAO,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CACtC;;;;;;;;;;;;;;;;;;;;;cAqBc,QAAQ,CAAC,kBAAkB,CAAC;;;;cAI5B,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;2BAwBlB,MAAM;;;;;;;;;;;;cAaV,MAAM,MAAM,EAAE;;;;;;;2BAOV,MAAM;;;;;;;;cAQT,MAAM;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE;;;;;;;;cAQvC,QAAQ,CAAC,MAAM,EAAE,CAAC;;;;;cA5GlB,QAAQ,CAAC,mBAAmB,EAAE,CAAC;;;;;;;cAQ/B,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;;;;;cAKzB,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;;;;;;;;cAQpC,QAAQ,CACnC,OAAO,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CACtC;;;;;;;;;;;;;;;;;;;;;cAqBc,QAAQ,CAAC,kBAAkB,CAAC;;;;cAI5B,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;2BAwBlB,MAAM;;;;;;;;;;;;cAaV,MAAM,MAAM,EAAE;;;;;;;2BAOV,MAAM;;;;;;;;cAQT,MAAM;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE;;;;;;;;cAQvC,QAAQ,CAAC,MAAM,EAAE,CAAC;;;;;;;;;;;;6CA/FY,OAAO,KAAK,OAAO;;;sCAS5C,MAAM,KAAK,OAAO;;;;;;;;;;;;;;;;;;;;;;cA8ER,MAAM;gBAAU,MAAM;;;;;aAwM/C,CAAC,CAAC,IAAgB,KAAK,GAAG;YAC3B,CAAC,CAAC,IAAiB,KAAK,GAAG;gBACvB,CAAC,CAAC,IAAiB,KAAK,GAAG;;AAhxBvC,wBAwyBc;AACd,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAAE,MAAM,EAAE,CAAC,CAAA;KAAE,CAAA;CAAE,CAAC"}
|
|
@@ -9,6 +9,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
9
9
|
type: StringConstructor;
|
|
10
10
|
};
|
|
11
11
|
enableRowSelection: BooleanConstructor;
|
|
12
|
+
locale: {
|
|
13
|
+
default: undefined;
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
};
|
|
12
16
|
table: {
|
|
13
17
|
required: true;
|
|
14
18
|
type: () => Table<unknown>;
|
|
@@ -23,11 +27,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
23
27
|
type: StringConstructor;
|
|
24
28
|
};
|
|
25
29
|
enableRowSelection: BooleanConstructor;
|
|
30
|
+
locale: {
|
|
31
|
+
default: undefined;
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
};
|
|
26
34
|
table: {
|
|
27
35
|
required: true;
|
|
28
36
|
type: () => Table<unknown>;
|
|
29
37
|
};
|
|
30
38
|
}>> & Readonly<{}>, {
|
|
39
|
+
locale: string;
|
|
31
40
|
enableRowSelection: boolean;
|
|
32
41
|
customFormatters: Record<string, (value: unknown) => unknown>;
|
|
33
42
|
emptyTableMessage: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableBody.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TableBody.vue.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAiB,KAAK,EAAE,MAAM,qBAAqB,CAAC;;;;
|
|
1
|
+
{"version":3,"file":"TableBody.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TableBody.vue.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAiB,KAAK,EAAE,MAAM,qBAAqB,CAAC;;;;cAqG5C,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;;;;;;;;;;;;;cAajD,MAAM,KAAK,CAAC,OAAO,CAAC;;;;;cAbpB,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;;;;;;;;;;;;;cAajD,MAAM,KAAK,CAAC,OAAO,CAAC;;;;;6CAbS,OAAO,KAAK,OAAO;;;AAlGpE,wBAgRc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--pagination-bg-color:
|
|
1
|
+
:root{--pagination-bg-color: var(--table-header-footer-bg, transparent);--pagination-padding: .8rem;--pagination-gap: .5rem;--pagination-buttons-bg-color: var(--dz-primary-color);--pagination-buttons-bg-color-hover: #0056b3;--pagination-buttons-bg-color-active: #0056b3;--pagination-buttons-bg-color-disabled: #e4e4e4;--pagination-buttons-color-disabled: inherit;--pagination-border-color: var(--dz-primary-color)}.pagination{align-items:center;background-color:var(--pagination-bg-color);display:flex;flex-wrap:wrap-reverse;justify-content:space-between;gap:var(--pagination-gap);list-style:none;padding:var(--pagination-padding)}.pagination .pagination-buttons-wrapper,.pagination .pagination-buttons-wrapper>div{align-items:center;display:flex;flex-wrap:wrap;gap:var(--pagination-gap);justify-content:center;width:fit-content}.pagination .pagination-buttons-wrapper{margin-left:auto;padding:.5rem 0}.pagination .pagination-buttons-wrapper svg{font-size:1.5rem;max-width:fit-content}.page-button.active{background-color:var(--pagination-buttons-bg-color-active)}.items-per-page-control,.page-input-control{align-items:center;color:#495057;display:flex}.items-per-page-control span,.page-input-control span{margin-right:8px}.items-per-page-control select,.page-input-control input{padding:.375rem;width:4rem}.items-per-page-control select{background:var(--table-header-footer-bg, transparent);border:1px solid var(--border-color);border-radius:4px}.items-per-page-control select:focus{border-color:var(--pagination-border-color);box-shadow:0 0 0 .2rem #007bff40;outline:none}:root{--table-border: 1px solid rgb(226, 226, 226);--table-header-bg: var(--table-header-footer-bg, transparent);--table-overlay-bg: rgba(255, 255, 255, .6);--table-header-active-bg: var(--active-bg, #eff6ff);--table-row-hover-bg: var(--hover-bg, #f0f2f7ad);--table-column-padding: .8rem;--table-row-selected-bg: var(--active-bg, #eff6ff);--table-body-bg: transparent;--table-stripe-color: transparent;--table-actions-column-width: 4rem;--table-loading-icon-color: black}.table-container{display:flex;flex-direction:column;width:100%;position:relative}.table-container>span{font-weight:700;text-align:center;padding:.2rem 0;margin:0;font-size:1rem}.table-container>span[data-align=left]{text-align:left}.table-container>span[data-align=right]{text-align:right}.table-container .loading-overlay{align-items:center;background:var(--table-overlay-bg);display:flex;justify-content:center;inset:0;position:absolute;z-index:1}.table-container .loading-overlay>.loading{color:var(--table-loading-icon-color, #ffffff);font-size:.5rem}.table-container .toolbar{align-items:center;background:var(--table-header-bg);display:flex;flex-direction:row;flex-wrap:wrap;gap:1rem;justify-content:flex-end;padding:var(--table-column-padding);width:100%}.table-container .table-wrapper{width:100%;overflow-x:auto}.table-container .table-wrapper>table{min-width:100%;border-collapse:collapse}.table-container .table-wrapper>table>tbody{background:var(--table-body-bg)}.table-container .table-wrapper>table>tfoot>tr{background:var(--table-header-footer-bg, transparent)}.table-container .toolbar,.table-container .table-wrapper>table,.table-container .table-wrapper>table tr,.table-container .table-wrapper>table>tbody>tr>td,.table-container .table-wrapper>table>thead>tr>th,.table-container .pagination{border:var(--table-border)}.table-container .pagination{border-top:none}.table-container .toolbar{border-bottom:none}.table-container .table-wrapper>table>tbody>tr>td,.table-container .table-wrapper>table>thead>tr>th{overflow:hidden}.table-container .table-wrapper>table>tbody>tr>td>.tooltip-container{height:100%;width:100%}.table-container .table-wrapper>table>thead>tr>th.filter{overflow:visible}.table-container .table-wrapper>table tr>td[data-align=center]>*{margin:auto}.table-container .table-wrapper>table tr>th{text-align:left}.table-container .table-wrapper>table tr>td[data-align=center],.table-container .table-wrapper>table tr>th[data-align=center]{text-align:center}.table-container .table-wrapper>table tr>td[data-align=center]>svg,.table-container .table-wrapper>table tr>th[data-align=center]>svg{display:inline-flex;width:100%}.table-container .table-wrapper>table tr>td .dropdown-menu-trigger>svg{max-width:max-content}.table-container .table-wrapper>table tr>td[data-align=right]{text-align:right;padding-right:2rem}.table-container .table-wrapper>table tr>th.sortable{cursor:pointer}.table-container .table-wrapper>table tr>th .sort-state{margin-left:.5rem}.table-container .table-wrapper>table tr>th .sort-state .sort-icon{display:inline-block;vertical-align:text-bottom}.table-container .table-wrapper>table tr>th.highlight,.table-container .table-wrapper>table tr>td.highlight{background:var(--table-header-active-bg)}.table-container .table-wrapper>table>tbody>tr:nth-child(2n){background:var(--table-stripe-color)}.table-container .table-wrapper>table>tbody>tr[data-selected=true]{background:var(--table-row-selected-bg)!important}.table-container .table-wrapper>table>tbody>tr[data-selected=true]:hover,.table-wrapper>table>tbody>tr:hover{background:var(--table-row-hover-bg)!important;transition:background var(--transition-duration) ease}.table-wrapper>table .header-row{background:var(--table-header-bg);font-size:1rem}.table-wrapper>table tr.filters>th.range>.number-range-filter{display:flex;gap:.25rem}.table-wrapper>table tr.filters>th>div input{width:100%;min-width:fit-content;font-weight:400;background:#fff}.table-wrapper>table tr.filters>th.multiselect>div,.table-wrapper>table tr.filters>th.select>div{background:#fff;font-weight:400}.table-wrapper>table tr.filters>th:last-child .multiselect>ul{right:0}.table-wrapper>table tr.filters>th.multiselect>div .input-field-select{margin-top:0}.table-container .table-wrapper>table>tbody>tr>td,.table-container .table-wrapper>table>thead>tr>th{padding:var(--table-column-padding)}.table-container .table-wrapper>table>thead>tr>th.column-actions,.table-container .table-wrapper>table>thead>tr>th.column-select{width:var(--table-actions-column-width);max-width:var(--table-actions-column-width);min-width:var(--table-actions-column-width)}.table-container tbody td.cell-actions ul.dropdown-menu{text-align:left}.table-container tbody td.cell-select .checkbox-wrapper:not(:has(label)),.table-container thead th.column-select .checkbox-wrapper:not(:has(label)){display:block}.table-container .pagination .page-input-control input{background:#fff}.table-files .column-description{max-width:15rem;min-width:15rem;width:15rem}.table-files .column-downloadCount{max-width:12rem;min-width:12rem;width:12rem}.table-files .column-lastDownloadedAt{max-width:13rem;min-width:13rem;width:13rem}.table-files .column-uploadedAt{max-width:12rem;min-width:12rem;width:12rem}.table-files .column-uploadedBy{max-width:10rem;min-width:10rem;width:10rem}.table-files .column-actions{max-width:4rem;min-width:4rem;width:4rem}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prefabs.tech/vue3-tanstack-table",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "Vue3 Tanstack Table Component Library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@prefabs.tech/eslint-config": "0.2.0",
|
|
24
24
|
"@prefabs.tech/tsconfig": "0.2.0",
|
|
25
|
-
"@prefabs.tech/vue3-form": "0.
|
|
26
|
-
"@prefabs.tech/vue3-ui": "0.
|
|
25
|
+
"@prefabs.tech/vue3-form": "0.18.0",
|
|
26
|
+
"@prefabs.tech/vue3-ui": "0.18.0",
|
|
27
27
|
"@iconify/vue": "4.3.0",
|
|
28
28
|
"@types/node": "22.13.5",
|
|
29
29
|
"@typescript-eslint/eslint-plugin": "8.24.1",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"vue-tsc": "1.2.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@prefabs.tech/vue3-form": "0.
|
|
54
|
-
"@prefabs.tech/vue3-ui": "0.
|
|
53
|
+
"@prefabs.tech/vue3-form": "0.18.0",
|
|
54
|
+
"@prefabs.tech/vue3-ui": "0.18.0",
|
|
55
55
|
"vue": ">=3.2"
|
|
56
56
|
},
|
|
57
57
|
"engines": {
|