@ianicdev/datatables2 0.10.9 → 0.11.1

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.
Files changed (55) hide show
  1. package/dist/{Comparison-ChMG_TLF.js → Comparison-C4t1CoQN.js} +3 -3
  2. package/dist/{Comparison-Cz2qINPo.cjs → Comparison-K_C8fK5q.cjs} +1 -1
  3. package/dist/{Datepicker-DHZwRCiL.cjs → Datepicker-8vMCYK64.cjs} +1 -1
  4. package/dist/{Datepicker-CHMHJOq1.js → Datepicker-CvoUCd6e.js} +51 -51
  5. package/dist/Options-CLwvsyYI.cjs +1 -0
  6. package/dist/Options-DtOz8dqa.js +108 -0
  7. package/dist/RefreshTable-03hYqy0d.js +21 -0
  8. package/dist/RefreshTable-BDCdK574.cjs +1 -0
  9. package/dist/{Search-DsKhSX_l.cjs → Search-BfHfgRqm.cjs} +1 -1
  10. package/dist/{Search-C5Nj3AJd.js → Search-DCvbaw38.js} +8 -8
  11. package/dist/Table-BdiBnyG7.js +59 -0
  12. package/dist/Table-hSaWsE5Z.cjs +1 -0
  13. package/dist/TableServer-DfNCjOUI.cjs +20 -0
  14. package/dist/{TableServer-B1QsOkJ2.js → TableServer-eOtGylb9.js} +415 -402
  15. package/dist/{cellRender-n1kqNyoy.js → cellRender-B7hkYbUV.js} +56 -56
  16. package/dist/{cellRender-DGXXI6zI.cjs → cellRender-BN5jkrLA.cjs} +1 -1
  17. package/dist/{dataTables-BMvhNk0d.cjs → dataTables-B51qe1LD.cjs} +1 -1
  18. package/dist/{dataTables-RDdW6ocQ.js → dataTables-EUusYEBd.js} +100 -100
  19. package/dist/datatables.cjs +1 -1
  20. package/dist/datatables.js +1 -1
  21. package/dist/datatables2.css +1 -1
  22. package/dist/index-9hGXBnYN.cjs +1 -0
  23. package/dist/{index-CXga_1To.cjs → index-BSh8Y0C1.cjs} +1 -1
  24. package/dist/index-BTwaqzMN.js +61 -0
  25. package/dist/index-B_fG3b5A.js +30 -0
  26. package/dist/index-CsgCe_gz.js +4482 -0
  27. package/dist/{index-Xn9pmgz0.js → index-DG3Vs3j9.js} +2 -2
  28. package/dist/index-Hcb-nE49.cjs +1 -0
  29. package/dist/index-sB-PMcO7.cjs +1 -0
  30. package/dist/{index.es-CtLP1GTc.js → index.es-D48oZl91.js} +4 -4
  31. package/dist/{index.es-BCJd8pS0.cjs → index.es-DQaLNvpD.cjs} +1 -1
  32. package/dist/{jspdf-DyYqWhF9.cjs → jspdf-D8dTvh2d.cjs} +1 -1
  33. package/dist/{jspdf-3qJBK9tP.js → jspdf-v7nU-ziX.js} +1 -1
  34. package/dist/useColumns-DV---ndr.cjs +1 -0
  35. package/dist/useColumns-UM_zCt0D.js +1473 -0
  36. package/dist/{Download-DhsPo8yJ.js → useDownload-CR3A1-nS.js} +105 -132
  37. package/dist/useDownload-wLFMGFcn.cjs +1 -0
  38. package/dist/useRefreshTable-CRquY8ZU.js +18 -0
  39. package/dist/useRefreshTable-Dg9LI59z.cjs +1 -0
  40. package/lib/index.d.ts +26 -0
  41. package/package.json +12 -12
  42. package/dist/Columns-W_jSwaNc.cjs +0 -1
  43. package/dist/Columns-dl3eMPe2.js +0 -28
  44. package/dist/Download-kq1kmD5M.cjs +0 -1
  45. package/dist/Options-BNWiVRrF.cjs +0 -1
  46. package/dist/Options-DwiLD_hO.js +0 -82
  47. package/dist/RefreshTable-Cq6mrqWi.js +0 -26
  48. package/dist/RefreshTable-OLZf9tHE.cjs +0 -1
  49. package/dist/Table-BnieRooB.cjs +0 -1
  50. package/dist/Table-dk0Au7Sd.js +0 -63
  51. package/dist/TableServer-CW6o1KQR.cjs +0 -20
  52. package/dist/escapeKeyString-CngwDxKW.js +0 -17
  53. package/dist/escapeKeyString-nS7kXLwu.cjs +0 -1
  54. package/dist/index-DIHxM6eL.cjs +0 -1
  55. package/dist/index-Doqj_5F5.js +0 -5891
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./useDownload-wLFMGFcn.cjs"),o=require("./dataTables-B51qe1LD.cjs"),u=require("vue-i18n"),p=e.defineComponent({__name:"List",setup(s){const{downloadItems:a}=i.useDownload();return(r,t)=>(e.openBlock(),e.createBlock(o.VList,{"bg-color":"surface-light",class:"options-list d-flex flex-column ga-1 pa-1",density:"compact",rounded:"lg",variant:"text",slim:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),(c,n)=>(e.openBlock(),e.createBlock(o.VListItem,e.mergeProps({ref_for:!0},c,{key:n,rounded:"lg",link:""}),null,16))),128))]),_:1}))}}),m=e.defineComponent({__name:"index",setup(s){const a=e.inject("datatablesPluginOptions"),{t:r}=u.useI18n(),t=e.ref(!1);return(c,n)=>{const d=p;return e.openBlock(),e.createBlock(o.VMenu,{modelValue:e.unref(t),"onUpdate:modelValue":n[0]||(n[0]=l=>e.isRef(t)?t.value=l:null),"close-on-content-click":!1,location:"bottom center"},{activator:e.withCtx(({props:l})=>[e.createVNode(o.VBtn,e.mergeProps({id:"header-download","prepend-icon":e.unref(a).header.icons.download,text:e.unref(r)("$datatables.download"),variant:"text",density:"comfortable",color:"dark",stacked:"",class:"text-capitalize"},l),null,16,["prepend-icon","text"])]),default:e.withCtx(()=>[e.createVNode(d)]),_:1},8,["modelValue"])}}});exports.default=m;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),F=require("./dataTables-BMvhNk0d.cjs"),u=require("./index-DIHxM6eL.cjs"),S={__name:"Selected",props:{modelValue:{},modelModifiers:{}},emits:e.mergeModels(["save"],["update:modelValue"]),setup(h,{emit:b}){const o=e.inject("table_props"),n=e.inject("datatablesPluginOptions"),p=e.useModel(h,"modelValue"),{hardFiltersState:f}=u.useTableState(),{registerHook:m}=u.useDatatablesHooksStore(),l=e.ref([]),s=b,d=e.inject("busEmits"),c=e.computed(()=>F.defu(o.options,n.options));e.watch(l,r=>{const t={};r.forEach(a=>{let i=o.hardFilters?.[a]??null;isNaN(a)&&(i=o.hardFilters.find(y=>y.value===a)),t[a]=i}),p.value=t,d("hardFilters:update",{keys:r,filters:t}),s("save")}),e.onMounted(()=>{l.value=Object.keys(f.value),l.value.length||o.hardFilters.forEach((r,t)=>{r.active&&l.value.push(r.value??t)}),m("hardFilters:activate",_),m("hardFilters:deactivate",v)});const _=r=>{const t=JSON.parse(JSON.stringify(l.value));t.push(r),l.value=t},v=r=>{const t=JSON.parse(JSON.stringify(l.value)),a=t.findIndex(i=>i===r);a!==-1&&(t.splice(a,1),l.value=t)};return(r,t)=>(e.openBlock(),e.createBlock(u.VSheet,null,{default:e.withCtx(()=>[e.createVNode(u.VChipGroup,{modelValue:e.unref(l),"onUpdate:modelValue":t[0]||(t[0]=a=>e.isRef(l)?l.value=a:null),"selected-class":`text-${e.unref(c).color}`,color:e.unref(c).color,multiple:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o).hardFilters,(a,i)=>(e.openBlock(),e.createBlock(u.VChip,e.mergeProps({key:i,class:"my-0"},{ref_for:!0},a,{density:"comfortable"}),null,16))),128))]),_:1},8,["modelValue","selected-class","color"])]),_:1}))}},k={__name:"index",setup(h){const b=u.useDatatablesStore(),{setData:o}=b,n=e.ref({}),p=e.inject("table_props"),f=e.ref(0),m=()=>{const l=Object.entries(n.value).filter(([,s])=>Array.isArray(s)||typeof s=="string"?s.length>0:s!=null&&s!=="").reduce((s,[d,c])=>(s[d]=c,s),{});o({table_id:p.id,name:"hardFilters",value:{query:l}})};return e.watch(()=>p.hardFilters,()=>{f.value++}),(l,s)=>{const d=S;return e.openBlock(),e.createBlock(d,{key:e.unref(f),modelValue:e.unref(n),"onUpdate:modelValue":s[0]||(s[0]=c=>e.isRef(n)?n.value=c:null),onSave:m},null,8,["modelValue"])}}};exports.default=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),F=require("./dataTables-B51qe1LD.cjs"),u=require("./index-sB-PMcO7.cjs"),S={__name:"Selected",props:{modelValue:{},modelModifiers:{}},emits:e.mergeModels(["save"],["update:modelValue"]),setup(h,{emit:b}){const o=e.inject("table_props"),n=e.inject("datatablesPluginOptions"),p=e.useModel(h,"modelValue"),{hardFiltersState:f}=u.useTableState(),{registerHook:m}=u.useDatatablesHooksStore(),l=e.ref([]),s=b,d=e.inject("busEmits"),c=e.computed(()=>F.defu(o.options,n.options));e.watch(l,r=>{const t={};r.forEach(a=>{let i=o.hardFilters?.[a]??null;isNaN(a)&&(i=o.hardFilters.find(y=>y.value===a)),t[a]=i}),p.value=t,d("hardFilters:update",{keys:r,filters:t}),s("save")}),e.onMounted(()=>{l.value=Object.keys(f.value),l.value.length||o.hardFilters.forEach((r,t)=>{r.active&&l.value.push(r.value??t)}),m("hardFilters:activate",_),m("hardFilters:deactivate",v)});const _=r=>{const t=JSON.parse(JSON.stringify(l.value));t.push(r),l.value=t},v=r=>{const t=JSON.parse(JSON.stringify(l.value)),a=t.findIndex(i=>i===r);a!==-1&&(t.splice(a,1),l.value=t)};return(r,t)=>(e.openBlock(),e.createBlock(u.VSheet,null,{default:e.withCtx(()=>[e.createVNode(u.VChipGroup,{modelValue:e.unref(l),"onUpdate:modelValue":t[0]||(t[0]=a=>e.isRef(l)?l.value=a:null),"selected-class":`text-${e.unref(c).color}`,color:e.unref(c).color,multiple:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o).hardFilters,(a,i)=>(e.openBlock(),e.createBlock(u.VChip,e.mergeProps({key:i,class:"my-0"},{ref_for:!0},a,{density:"comfortable"}),null,16))),128))]),_:1},8,["modelValue","selected-class","color"])]),_:1}))}},k={__name:"index",setup(h){const b=u.useDatatablesStore(),{setData:o}=b,n=e.ref({}),p=e.inject("table_props"),f=e.ref(0),m=()=>{const l=Object.entries(n.value).filter(([,s])=>Array.isArray(s)||typeof s=="string"?s.length>0:s!=null&&s!=="").reduce((s,[d,c])=>(s[d]=c,s),{});o({table_id:p.id,name:"hardFilters",value:{query:l}})};return e.watch(()=>p.hardFilters,()=>{f.value++}),(l,s)=>{const d=S;return e.openBlock(),e.createBlock(d,{key:e.unref(f),modelValue:e.unref(n),"onUpdate:modelValue":s[0]||(s[0]=c=>e.isRef(n)?n.value=c:null),onSave:m},null,8,["modelValue"])}}};exports.default=k;
@@ -0,0 +1,61 @@
1
+ import { defineComponent as u, createBlock as r, openBlock as o, withCtx as s, createElementBlock as _, Fragment as x, renderList as g, unref as a, mergeProps as m, inject as k, ref as V, isRef as b, createVNode as i } from "vue";
2
+ import { u as w } from "./useDownload-CR3A1-nS.js";
3
+ import { au as L, av as v, at as h, aL as B } from "./dataTables-EUusYEBd.js";
4
+ import { useI18n as y } from "vue-i18n";
5
+ const D = /* @__PURE__ */ u({
6
+ __name: "List",
7
+ setup(p) {
8
+ const { downloadItems: n } = w();
9
+ return (c, e) => (o(), r(L, {
10
+ "bg-color": "surface-light",
11
+ class: "options-list d-flex flex-column ga-1 pa-1",
12
+ density: "compact",
13
+ rounded: "lg",
14
+ variant: "text",
15
+ slim: ""
16
+ }, {
17
+ default: s(() => [
18
+ (o(!0), _(x, null, g(a(n), (d, t) => (o(), r(v, m({ ref_for: !0 }, d, {
19
+ key: t,
20
+ rounded: "lg",
21
+ link: ""
22
+ }), null, 16))), 128))
23
+ ]),
24
+ _: 1
25
+ }));
26
+ }
27
+ }), $ = /* @__PURE__ */ u({
28
+ __name: "index",
29
+ setup(p) {
30
+ const n = k("datatablesPluginOptions"), { t: c } = y(), e = V(!1);
31
+ return (d, t) => {
32
+ const f = D;
33
+ return o(), r(h, {
34
+ modelValue: a(e),
35
+ "onUpdate:modelValue": t[0] || (t[0] = (l) => b(e) ? e.value = l : null),
36
+ "close-on-content-click": !1,
37
+ location: "bottom center"
38
+ }, {
39
+ activator: s(({ props: l }) => [
40
+ i(B, m({
41
+ id: "header-download",
42
+ "prepend-icon": a(n).header.icons.download,
43
+ text: a(c)("$datatables.download"),
44
+ variant: "text",
45
+ density: "comfortable",
46
+ color: "dark",
47
+ stacked: "",
48
+ class: "text-capitalize"
49
+ }, l), null, 16, ["prepend-icon", "text"])
50
+ ]),
51
+ default: s(() => [
52
+ i(f)
53
+ ]),
54
+ _: 1
55
+ }, 8, ["modelValue"]);
56
+ };
57
+ }
58
+ });
59
+ export {
60
+ $ as default
61
+ };
@@ -0,0 +1,30 @@
1
+ import { u as c, _ as l } from "./useColumns-UM_zCt0D.js";
2
+ import { defineComponent as m, createElementBlock as o, openBlock as e, createVNode as u, Fragment as i, renderList as _, unref as f, createBlock as d, mergeProps as p } from "vue";
3
+ import { aL as k } from "./dataTables-EUusYEBd.js";
4
+ const x = { class: "d-inline-block" }, v = /* @__PURE__ */ m({
5
+ __name: "index",
6
+ setup(B) {
7
+ const { columnsItems: n, columnsRef: r } = c();
8
+ return (b, g) => {
9
+ const s = l;
10
+ return e(), o("div", x, [
11
+ (e(!0), o(i, null, _(f(n), (t, a) => (e(), d(k, p({ id: "header-columns" }, { ref_for: !0 }, t, {
12
+ key: a,
13
+ text: t.title,
14
+ variant: "text",
15
+ density: "comfortable",
16
+ color: "dark",
17
+ stacked: "",
18
+ class: "text-capitalize"
19
+ }), null, 16, ["text"]))), 128)),
20
+ u(s, {
21
+ ref_key: "columnsRef",
22
+ ref: r
23
+ }, null, 512)
24
+ ]);
25
+ };
26
+ }
27
+ });
28
+ export {
29
+ v as default
30
+ };