@ianicdev/datatables2 0.10.2 → 0.10.4
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/Columns-CPCKKIx3.cjs +1 -0
- package/dist/{Columns-pBvbnYlf.js → Columns-ZxF5CuL6.js} +7 -7
- package/dist/{Comparison-DRfZKR1Q.js → Comparison-CMTDEfUJ.js} +6 -6
- package/dist/{Comparison--anN00Qz.cjs → Comparison-DfPeTvCT.cjs} +1 -1
- package/dist/{Datepicker-DVl_NGDU.js → Datepicker-BLYCUwKH.js} +2 -2
- package/dist/{Datepicker-Bo4pQ0Ky.cjs → Datepicker-CbsULJsG.cjs} +1 -1
- package/dist/{Download-BsS86MB6.js → Download-CBodg9GI.js} +2 -2
- package/dist/{Download-Cn0vLJdo.cjs → Download-CjD4NWhV.cjs} +1 -1
- package/dist/{Options-DCQAU-J6.js → Options-BHx4o8aa.js} +7 -7
- package/dist/Options-e0hJOpF8.cjs +1 -0
- package/dist/RefreshTable-CyPWCK3e.cjs +1 -0
- package/dist/{RefreshTable-CJghSR2x.js → RefreshTable-DlG8UH4c.js} +6 -6
- package/dist/Search-D4UmoZpS.cjs +1 -0
- package/dist/{Search-btos05iH.js → Search-DDRz2N_S.js} +10 -10
- package/dist/Table-ACmKFpAk.cjs +1 -0
- package/dist/Table-QxreAQB1.js +63 -0
- package/dist/TableServer-BQUFKBeQ.js +3925 -0
- package/dist/TableServer-pRzLKhVw.cjs +20 -0
- package/dist/{cellRender-D_-HT--u.js → cellRender-B3IOPLJf.js} +854 -951
- package/dist/cellRender-CA6S9KvF.cjs +1 -0
- package/dist/{dataTables-CnvsuROu.cjs → dataTables-BbXv6am2.cjs} +3 -3
- package/dist/{dataTables-4_0nZg-y.js → dataTables-Be-U1RVV.js} +141 -132
- package/dist/datatables.cjs +1 -1
- package/dist/datatables.js +1 -1
- package/dist/datatables2.css +1 -1
- package/dist/index-5WIEduUN.js +81 -0
- package/dist/index-BAxGZLuh.js +4533 -0
- package/dist/index-CDteNa2i.cjs +1 -0
- package/dist/index-m_LBTAkz.cjs +1 -0
- package/package.json +1 -1
- package/dist/Columns-YRc6N3N3.cjs +0 -1
- package/dist/Options-C07MvEiF.cjs +0 -1
- package/dist/RefreshTable-A1eCYmwb.cjs +0 -1
- package/dist/Search-Ctr2CVNw.cjs +0 -1
- package/dist/Table-BPOv1XC0.cjs +0 -1
- package/dist/Table-BtvvPIo_.js +0 -66
- package/dist/TableServer-BPveUKR2.js +0 -3929
- package/dist/TableServer-LBPwG9Z1.cjs +0 -20
- package/dist/cellRender-DM-C_7Lj.cjs +0 -1
- package/dist/index-B0N3w8xu.cjs +0 -1
- package/dist/index-ByfcZypn.js +0 -79
- package/dist/index-CHiQ3XrO.cjs +0 -1
- package/dist/index-D-1LWR3S.js +0 -4090
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { inject as r, computed as v, ref as y, createBlock as b, openBlock as p, unref as c, isRef as _, withCtx as u, createVNode as g, createElementBlock as V, Fragment as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { g as
|
|
1
|
+
import { inject as r, computed as v, ref as y, createBlock as b, openBlock as p, unref as c, isRef as _, withCtx as u, createVNode as g, createElementBlock as V, Fragment as P, renderList as w, mergeProps as k } from "vue";
|
|
2
|
+
import { useI18n as B } from "vue-i18n";
|
|
3
|
+
import { g as E, r as h } from "./printjs-kC3Qmb-l.js";
|
|
4
4
|
import { e as d, g as I } from "./escapeKeyString-CngwDxKW.js";
|
|
5
|
-
import { aD as j, a9 as C, aa as F, a7 as L } from "./dataTables-
|
|
5
|
+
import { aD as j, a9 as C, aa as F, a7 as L } from "./dataTables-Be-U1RVV.js";
|
|
6
6
|
var M = h();
|
|
7
|
-
const O = /* @__PURE__ */
|
|
7
|
+
const O = /* @__PURE__ */ E(M);
|
|
8
8
|
function R() {
|
|
9
9
|
const m = r("table_props"), l = r("tableRef"), n = r("downloadModal"), s = v(() => m.headers.filter((e) => e?.printable !== !1));
|
|
10
10
|
return { printTable: async () => {
|
|
@@ -28,7 +28,7 @@ function R() {
|
|
|
28
28
|
const q = {
|
|
29
29
|
__name: "Options",
|
|
30
30
|
setup(m) {
|
|
31
|
-
const l = r("table_props"), n = r("
|
|
31
|
+
const l = r("table_props"), n = r("datatablesPluginOptions"), { t: s } = B(), { printTable: f } = R(), e = y(!1), i = v(() => [
|
|
32
32
|
{
|
|
33
33
|
title: s("$datatables.print"),
|
|
34
34
|
onClick: f,
|
|
@@ -64,7 +64,7 @@ const q = {
|
|
|
64
64
|
slim: ""
|
|
65
65
|
}, {
|
|
66
66
|
default: u(() => [
|
|
67
|
-
(p(!0), V(
|
|
67
|
+
(p(!0), V(P, null, w(c(i), (t, x) => (p(), b(F, k({ ref_for: !0 }, t, {
|
|
68
68
|
key: x,
|
|
69
69
|
rounded: "lg",
|
|
70
70
|
link: ""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),b=require("vue-i18n"),f=require("./printjs-BbgDICDe.cjs"),c=require("./escapeKeyString-nS7kXLwu.cjs"),u=require("./dataTables-BbXv6am2.cjs");var g=f.requirePrint();const y=f.getDefaultExportFromCjs(g);function k(){const p=e.inject("table_props"),l=e.inject("tableRef"),a=e.inject("downloadModal"),s=e.computed(()=>p.headers.filter(n=>n?.printable!==!1));return{printTable:async()=>{a.value=!0;const n=await l.value.getItemsForPrint(),i=[];n.forEach(o=>{let r={};s.value.forEach(t=>{t.value?r[c.escapeKeyString(t.key)]=t.value(o):r[c.escapeKeyString(t.key)]=c.getValueByStringPath(o,t.key)??""}),i.push(r)}),y({printable:i,type:"json",properties:s.value.map(o=>({field:c.escapeKeyString(o.key),displayName:o.title}))}),a.value=!1}}}const v={__name:"Options",setup(p){const l=e.inject("table_props"),a=e.inject("datatablesPluginOptions"),{t:s}=b.useI18n(),{printTable:d}=k(),n=e.ref(!1),i=e.computed(()=>[{title:s("$datatables.print"),onClick:d,prependIcon:a.header.icons.print,...l.options.header?.export?.buttons},...l.options?.globalButtons??[]]);return(o,r)=>(e.openBlock(),e.createBlock(u.VMenu,{modelValue:e.unref(n),"onUpdate:modelValue":r[0]||(r[0]=t=>e.isRef(n)?n.value=t:null),"close-on-content-click":!1,location:"bottom end"},{activator:e.withCtx(({props:t})=>[e.createVNode(u.VBtn,e.mergeProps({"prepend-icon":e.unref(a).header.icons.options,text:o.$t("$datatables.more"),variant:"text",density:"comfortable",color:"dark",stacked:"",class:"text-capitalize"},t),null,16,["prepend-icon","text"])]),default:e.withCtx(()=>[e.createVNode(u.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(i),(t,m)=>(e.openBlock(),e.createBlock(u.VListItem,e.mergeProps({ref_for:!0},t,{key:m,rounded:"lg",link:""}),null,16))),128))]),_:1})]),_:1},8,["modelValue"]))}};exports.default=v;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-m_LBTAkz.cjs"),l=require("vue-i18n"),u=require("./dataTables-BbXv6am2.cjs"),d={__name:"RefreshTable",setup(p){const t=e.inject("busEmits"),n=e.inject("table_props"),a=e.inject("datatablesPluginOptions"),{deleteDataStorage:s}=i.useDatastate(n),{t:r}=l.useI18n(),c=e.ref(!1),o=()=>{s(),t("refetchData")};return(b,f)=>(e.openBlock(),e.createBlock(u.VBtn,{disabled:e.unref(c),"prepend-icon":e.unref(a).header.icons.refresh,text:e.unref(r)("$datatables.refresh"),variant:"text",density:"comfortable",color:"dark",stacked:"",class:"text-capitalize",onClick:o},null,8,["disabled","prepend-icon","text"]))}};exports.default=d;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { inject as t, ref as l, createBlock as p, openBlock as d, unref as e } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { i as f } from "./index-BAxGZLuh.js";
|
|
3
3
|
import { useI18n as m } from "vue-i18n";
|
|
4
|
-
import { a7 as u } from "./dataTables-
|
|
4
|
+
import { a7 as u } from "./dataTables-Be-U1RVV.js";
|
|
5
5
|
const D = {
|
|
6
6
|
__name: "RefreshTable",
|
|
7
|
-
setup(
|
|
8
|
-
const
|
|
9
|
-
r(),
|
|
7
|
+
setup(b) {
|
|
8
|
+
const a = t("busEmits"), s = t("table_props"), o = t("datatablesPluginOptions"), { deleteDataStorage: r } = f(s), { t: n } = m(), c = l(!1), i = () => {
|
|
9
|
+
r(), a("refetchData");
|
|
10
10
|
};
|
|
11
|
-
return (
|
|
11
|
+
return (_, h) => (d(), p(u, {
|
|
12
12
|
disabled: e(c),
|
|
13
13
|
"prepend-icon": e(o).header.icons.refresh,
|
|
14
14
|
text: e(n)("$datatables.refresh"),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-m_LBTAkz.cjs"),m=require("@vueuse/core"),i=require("./dataTables-BbXv6am2.cjs"),h={__name:"Search",setup(V){const d=e.inject("table_props"),s=e.inject("datatablesPluginOptions"),p=n.useDatatablesStore(),{searchState:c}=n.useTableState(),{setData:f}=p,a=e.ref(null),r=e.ref(!1),u=e.useTemplateRef("searchField"),b=e.computed(()=>c.value);return m.watchDebounced(a,t=>{f({table_id:d.id,name:"search",value:{query:t}})},{debounce:1e3,maxWait:5e3}),e.watch(r,t=>{t&&setTimeout(()=>{u.value?.focus()},250)}),e.onMounted(()=>{a.value=c.value}),(t,o)=>(e.openBlock(),e.createBlock(i.VMenu,{modelValue:e.unref(r),"onUpdate:modelValue":o[1]||(o[1]=l=>e.isRef(r)?r.value=l:null),"close-on-content-click":!1,location:"bottom center"},{activator:e.withCtx(({props:l})=>[e.createVNode(i.VBtn,e.mergeProps({"prepend-icon":e.unref(s).header.icons.search,text:t.$t("$datatables.search"),variant:"text",density:"comfortable",color:e.unref(b)?"primary":"dark",stacked:"",class:"text-capitalize"},l),null,16,["prepend-icon","text","color"])]),default:e.withCtx(()=>[e.createVNode(n.VCard,{"min-width":"300"},{default:e.withCtx(()=>[e.createVNode(n.VCardText,null,{default:e.withCtx(()=>[e.createVNode(n.VTextField,{ref_key:"searchField",ref:u,modelValue:e.unref(a),"onUpdate:modelValue":o[0]||(o[0]=l=>e.isRef(a)?a.value=l:null),density:"comfortable",label:t.$t("$datatables.search"),variant:"outlined",clearable:"","hide-details":"","prepend-inner-icon":e.unref(s).header.icons.search},null,8,["modelValue","label","prepend-inner-icon"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}};exports.default=h;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
import {
|
|
1
|
+
import { inject as u, ref as p, useTemplateRef as v, computed as _, watch as x, onMounted as k, createBlock as y, openBlock as S, unref as l, isRef as m, withCtx as r, createVNode as s, mergeProps as T } from "vue";
|
|
2
|
+
import { e as g, u as w, f as D, g as F, h as $ } from "./index-BAxGZLuh.js";
|
|
3
3
|
import { watchDebounced as B } from "@vueuse/core";
|
|
4
|
-
import { aD as C, a7 as
|
|
5
|
-
const
|
|
4
|
+
import { aD as C, a7 as P } from "./dataTables-Be-U1RVV.js";
|
|
5
|
+
const q = {
|
|
6
6
|
__name: "Search",
|
|
7
|
-
setup(
|
|
8
|
-
const f =
|
|
7
|
+
setup(M) {
|
|
8
|
+
const f = u("table_props"), c = u("datatablesPluginOptions"), b = g(), { searchState: i } = w(), { setData: h } = b, a = p(null), o = p(!1), d = v("searchField"), V = _(() => i.value);
|
|
9
9
|
return B(
|
|
10
10
|
a,
|
|
11
11
|
(e) => {
|
|
@@ -18,7 +18,7 @@ const z = {
|
|
|
18
18
|
{ debounce: 1e3, maxWait: 5e3 }
|
|
19
19
|
), x(o, (e) => {
|
|
20
20
|
e && setTimeout(() => {
|
|
21
|
-
|
|
21
|
+
d.value?.focus();
|
|
22
22
|
}, 250);
|
|
23
23
|
}), k(() => {
|
|
24
24
|
a.value = i.value;
|
|
@@ -29,7 +29,7 @@ const z = {
|
|
|
29
29
|
location: "bottom center"
|
|
30
30
|
}, {
|
|
31
31
|
activator: r(({ props: t }) => [
|
|
32
|
-
s(
|
|
32
|
+
s(P, T({
|
|
33
33
|
"prepend-icon": l(c).header.icons.search,
|
|
34
34
|
text: e.$t("$datatables.search"),
|
|
35
35
|
variant: "text",
|
|
@@ -46,7 +46,7 @@ const z = {
|
|
|
46
46
|
default: r(() => [
|
|
47
47
|
s($, {
|
|
48
48
|
ref_key: "searchField",
|
|
49
|
-
ref:
|
|
49
|
+
ref: d,
|
|
50
50
|
modelValue: l(a),
|
|
51
51
|
"onUpdate:modelValue": n[0] || (n[0] = (t) => m(a) ? a.value = t : null),
|
|
52
52
|
density: "comfortable",
|
|
@@ -68,5 +68,5 @@ const z = {
|
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
export {
|
|
71
|
-
|
|
71
|
+
q as default
|
|
72
72
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),y=require("./dataTables-BbXv6am2.cjs"),w=require("./index-m_LBTAkz.cjs"),r=require("./cellRender-CA6S9KvF.cjs"),B={key:1},C={class:"expandable-row"},T=["colspan"],P={__name:"Table",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(f,{expose:b}){const n=e.inject("table_props"),g=e.inject("datatablesPluginOptions"),s=e.useModel(f,"modelValue"),{tableState:k,searchState:_,headersState:d,saveTableOptions:V}=w.useTableState(),{filteredData:c}=r.useTableData(),h=e.ref(null),S=e.computed(()=>y.defu(n.options,g.options)),x=l=>l?.lock?null:`item.${l.key}`;return b({getItemsForPrint:async()=>c.value}),(l,i)=>(e.openBlock(),e.createBlock(r.VDataTable,e.mergeProps({ref_key:"datatable",ref:h,modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=t=>s.value=t),loading:e.unref(n).loading},{...e.unref(S),...e.unref(k).options.state},{items:e.unref(c),headers:e.unref(d),search:e.unref(_),"onUpdate:options":e.unref(V)}),e.createSlots({loading:e.withCtx(()=>[e.createVNode(r.VSkeletonLoader,{type:"table-row@10"})]),"expanded-row":e.withCtx(({columns:t,item:p})=>[e.createElementVNode("tr",C,[e.createElementVNode("td",{class:"expandable-row--column",colspan:t.length},[e.unref(n).options.expandedRowRenderer?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(n).options.expandedRowRenderer),{key:0,params:{columns:t,item:p}},null,8,["params"])):e.createCommentVNode("",!0)],8,T)])]),_:2},[e.renderList(e.unref(d),(t,p)=>({name:x(t),fn:e.withCtx(({item:u,internalItem:m,value:o,column:a})=>[e.createElementVNode("div",{class:e.normalizeClass(a.cellClass)},[a?.cell?(e.openBlock(),e.createBlock(e.unref(r.CellRender),{key:0,render:a.cell({item:u,internalItem:m,value:o,column:a}),params:{item:u,internalItem:m,value:o,column:a}},null,8,["render","params"])):(e.openBlock(),e.createElementBlock("span",B,e.toDisplayString(String(o).length||String(o)==="0"?o:"-"),1))],2)])}))]),1040,["modelValue","loading","items","headers","search","onUpdate:options"]))}};exports.default=P;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { inject as _, useModel as O, ref as P, computed as R, createBlock as l, openBlock as n, mergeProps as T, unref as e, createSlots as B, withCtx as d, createElementVNode as p, createCommentVNode as N, resolveDynamicComponent as U, createVNode as v, renderList as E, normalizeClass as F, createElementBlock as I, toDisplayString as L } from "vue";
|
|
2
|
+
import { aO as M } from "./dataTables-Be-U1RVV.js";
|
|
3
|
+
import { u as j } from "./index-BAxGZLuh.js";
|
|
4
|
+
import { u as z, V as $, a as q, C as A } from "./cellRender-B3IOPLJf.js";
|
|
5
|
+
const G = { key: 1 }, H = { class: "expandable-row" }, J = ["colspan"], Z = {
|
|
6
|
+
__name: "Table",
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: {},
|
|
9
|
+
modelModifiers: {}
|
|
10
|
+
},
|
|
11
|
+
emits: ["update:modelValue"],
|
|
12
|
+
setup(V, { expose: h }) {
|
|
13
|
+
const s = _("table_props"), k = _("datatablesPluginOptions"), i = O(V, "modelValue"), { tableState: S, searchState: x, headersState: c, saveTableOptions: y } = j(), { filteredData: m } = z(), w = P(null), C = R(() => M(s.options, k.options)), D = (r) => r?.lock ? null : `item.${r.key}`;
|
|
14
|
+
return h({ getItemsForPrint: async () => m.value }), (r, u) => (n(), l($, T({
|
|
15
|
+
ref_key: "datatable",
|
|
16
|
+
ref: w,
|
|
17
|
+
modelValue: i.value,
|
|
18
|
+
"onUpdate:modelValue": u[0] || (u[0] = (t) => i.value = t),
|
|
19
|
+
loading: e(s).loading
|
|
20
|
+
}, { ...e(C), ...e(S).options.state }, {
|
|
21
|
+
items: e(m),
|
|
22
|
+
headers: e(c),
|
|
23
|
+
search: e(x),
|
|
24
|
+
"onUpdate:options": e(y)
|
|
25
|
+
}), B({
|
|
26
|
+
loading: d(() => [
|
|
27
|
+
v(q, { type: "table-row@10" })
|
|
28
|
+
]),
|
|
29
|
+
"expanded-row": d(({ columns: t, item: b }) => [
|
|
30
|
+
p("tr", H, [
|
|
31
|
+
p("td", {
|
|
32
|
+
class: "expandable-row--column",
|
|
33
|
+
colspan: t.length
|
|
34
|
+
}, [
|
|
35
|
+
e(s).options.expandedRowRenderer ? (n(), l(U(e(s).options.expandedRowRenderer), {
|
|
36
|
+
key: 0,
|
|
37
|
+
params: { columns: t, item: b }
|
|
38
|
+
}, null, 8, ["params"])) : N("", !0)
|
|
39
|
+
], 8, J)
|
|
40
|
+
])
|
|
41
|
+
]),
|
|
42
|
+
_: 2
|
|
43
|
+
}, [
|
|
44
|
+
E(e(c), (t, b) => ({
|
|
45
|
+
name: D(t),
|
|
46
|
+
fn: d(({ item: g, internalItem: f, value: a, column: o }) => [
|
|
47
|
+
p("div", {
|
|
48
|
+
class: F(o.cellClass)
|
|
49
|
+
}, [
|
|
50
|
+
o?.cell ? (n(), l(e(A), {
|
|
51
|
+
key: 0,
|
|
52
|
+
render: o.cell({ item: g, internalItem: f, value: a, column: o }),
|
|
53
|
+
params: { item: g, internalItem: f, value: a, column: o }
|
|
54
|
+
}, null, 8, ["render", "params"])) : (n(), I("span", G, L(String(a).length || String(a) === "0" ? a : "-"), 1))
|
|
55
|
+
], 2)
|
|
56
|
+
])
|
|
57
|
+
}))
|
|
58
|
+
]), 1040, ["modelValue", "loading", "items", "headers", "search", "onUpdate:options"]));
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
export {
|
|
62
|
+
Z as default
|
|
63
|
+
};
|