@ianicdev/datatables2 0.10.0 → 0.10.2
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-uuugU4i9.cjs → Columns-YRc6N3N3.cjs} +1 -1
- package/dist/{Columns-BVivQbA1.js → Columns-pBvbnYlf.js} +1 -1
- package/dist/{Comparison-BNSlLRqf.cjs → Comparison--anN00Qz.cjs} +1 -1
- package/dist/{Comparison-D6zByMKH.js → Comparison-DRfZKR1Q.js} +1 -1
- package/dist/Datepicker-Bo4pQ0Ky.cjs +2 -0
- package/dist/Datepicker-DVl_NGDU.js +1411 -0
- package/dist/{Download-BSWYh8Kp.js → Download-BsS86MB6.js} +1 -1
- package/dist/{Download-CnCzctX1.cjs → Download-Cn0vLJdo.cjs} +1 -1
- package/dist/{Options-CB6BQtI-.cjs → Options-C07MvEiF.cjs} +1 -1
- package/dist/{Options-1LMo1jYF.js → Options-DCQAU-J6.js} +1 -1
- package/dist/{RefreshTable-DIwWSpaJ.cjs → RefreshTable-A1eCYmwb.cjs} +1 -1
- package/dist/{RefreshTable-DEXlcdI0.js → RefreshTable-CJghSR2x.js} +2 -2
- package/dist/{Search-BNaYhckX.cjs → Search-Ctr2CVNw.cjs} +1 -1
- package/dist/{Search-BsWYytSk.js → Search-btos05iH.js} +2 -2
- package/dist/Table-BPOv1XC0.cjs +1 -0
- package/dist/{Table-BMwdrPuC.js → Table-BtvvPIo_.js} +23 -21
- package/dist/{TableServer-DaBF1vxr.js → TableServer-BPveUKR2.js} +1136 -1137
- package/dist/TableServer-LBPwG9Z1.cjs +20 -0
- package/dist/cellRender-DM-C_7Lj.cjs +1 -0
- package/dist/cellRender-D_-HT--u.js +2351 -0
- package/dist/{dataTables-CxEnAUfF.js → dataTables-4_0nZg-y.js} +2409 -2263
- package/dist/dataTables-CnvsuROu.cjs +4 -0
- package/dist/datatables.cjs +1 -1
- package/dist/datatables.js +1 -1
- package/dist/datatables2.css +1 -1
- package/dist/{index-VkGoAdXo.cjs → index-B0N3w8xu.cjs} +1 -1
- package/dist/{index-Bc0AtRk2.js → index-ByfcZypn.js} +1 -1
- package/dist/index-CHiQ3XrO.cjs +1 -0
- package/dist/index-D-1LWR3S.js +4090 -0
- package/package.json +8 -8
- package/dist/Datepicker-B8PS_dQ1.cjs +0 -1
- package/dist/Datepicker-DXbpHltW.js +0 -1269
- package/dist/Table-CGDzgkKx.cjs +0 -1
- package/dist/TableServer-ZDSaEYRy.cjs +0 -20
- package/dist/cellRender-BuLj_AFK.js +0 -2298
- package/dist/cellRender-CYGQmmZC.cjs +0 -1
- package/dist/dataTables-P7hOrFAn.cjs +0 -4
- package/dist/index-BjcvkMIS.js +0 -4106
- package/dist/index-DfTO4Zx6.cjs +0 -1
|
@@ -1 +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"),p=require("./dataTables-
|
|
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"),p=require("./dataTables-CnvsuROu.cjs");var g=f.requirePrint();const y=f.getDefaultExportFromCjs(g);function k(){const u=e.inject("table_props"),a=e.inject("tableRef"),l=e.inject("downloadModal"),s=e.computed(()=>u.headers.filter(n=>n?.printable!==!1));return{printTable:async()=>{l.value=!0;const n=await a.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}))}),l.value=!1}}}const v={__name:"Options",setup(u){const a=e.inject("table_props"),l=e.inject("pluginOptions"),{t:s}=b.useI18n(),{printTable:d}=k(),n=e.ref(!1),i=e.computed(()=>[{title:s("$datatables.print"),onClick:d,prependIcon:l.header.icons.print,...a.options.header?.export?.buttons},...a.options?.globalButtons??[]]);return(o,r)=>(e.openBlock(),e.createBlock(p.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(p.VBtn,e.mergeProps({"prepend-icon":e.unref(l).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(p.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(p.VListItem,e.mergeProps({ref_for:!0},t,{key:m,rounded:"lg",link:""}),null,16))),128))]),_:1})]),_:1},8,["modelValue"]))}};exports.default=v;
|
|
@@ -2,7 +2,7 @@ import { inject as r, computed as v, ref as y, createBlock as b, openBlock as p,
|
|
|
2
2
|
import { useI18n as E } from "vue-i18n";
|
|
3
3
|
import { g as P, 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,
|
|
5
|
+
import { aD as j, a9 as C, aa as F, a7 as L } from "./dataTables-4_0nZg-y.js";
|
|
6
6
|
var M = h();
|
|
7
7
|
const O = /* @__PURE__ */ P(M);
|
|
8
8
|
function R() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-CHiQ3XrO.cjs"),l=require("vue-i18n"),u=require("./dataTables-CnvsuROu.cjs"),d={__name:"RefreshTable",setup(p){const t=e.inject("busEmits"),n=e.inject("table_props"),s=e.inject("pluginOptions"),{deleteDataStorage:r}=i.useDatastate(n),{t:a}=l.useI18n(),c=e.ref(!1),o=()=>{r(),t("refetchData")};return(f,b)=>(e.openBlock(),e.createBlock(u.VBtn,{disabled:e.unref(c),"prepend-icon":e.unref(s).header.icons.refresh,text:e.unref(a)("$datatables.refresh"),variant:"text",density:"comfortable",color:"dark",stacked:"",class:"text-capitalize",onClick:o},null,8,["disabled","prepend-icon","text"]))}};exports.default=d;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { inject as t, ref as l, createBlock as p, openBlock as d, unref as e } from "vue";
|
|
2
|
-
import { h as f } from "./index-
|
|
2
|
+
import { h as f } from "./index-D-1LWR3S.js";
|
|
3
3
|
import { useI18n as m } from "vue-i18n";
|
|
4
|
-
import {
|
|
4
|
+
import { a7 as u } from "./dataTables-4_0nZg-y.js";
|
|
5
5
|
const D = {
|
|
6
6
|
__name: "RefreshTable",
|
|
7
7
|
setup(_) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-CHiQ3XrO.cjs"),b=require("@vueuse/core"),i=require("./dataTables-CnvsuROu.cjs"),h={__name:"Search",setup(V){const d=e.inject("table_props"),c=e.inject("pluginOptions"),p=n.useDatatablesStore(),{searchState:s}=n.useTableState(),{setData:f}=p,a=e.ref(null),r=e.ref(!1),u=e.useTemplateRef("searchField"),m=e.computed(()=>s.value);return b.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=s.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(c).header.icons.search,text:t.$t("$datatables.search"),variant:"text",density:"comfortable",color:e.unref(m)?"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(c).header.icons.search},null,8,["modelValue","label","prepend-inner-icon"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}};exports.default=h;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { inject as d, 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 { c as g, u as w, e as D, f as F, g as $ } from "./index-
|
|
2
|
+
import { c as g, u as w, e as D, f as F, g as $ } from "./index-D-1LWR3S.js";
|
|
3
3
|
import { watchDebounced as B } from "@vueuse/core";
|
|
4
|
-
import { aD as C,
|
|
4
|
+
import { aD as C, a7 as M } from "./dataTables-4_0nZg-y.js";
|
|
5
5
|
const z = {
|
|
6
6
|
__name: "Search",
|
|
7
7
|
setup(O) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),V=require("./index-CHiQ3XrO.cjs"),n=require("./cellRender-DM-C_7Lj.cjs"),y={key:1},S={class:"expandable-row"},w=["colspan"],B={__name:"Table",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(f,{expose:b}){const{tableState:g,searchState:k,headersState:s,saveTableOptions:h}=V.useTableState(),{filteredData:d}=n.useTableData(),a=e.inject("table_props"),c=e.useModel(f,"modelValue"),_=e.ref(null),x=l=>l?.lock?null:`item.${l.key}`;return b({getItemsForPrint:async()=>d.value}),(l,i)=>(e.openBlock(),e.createBlock(n.VDataTable,e.mergeProps({ref_key:"datatable",ref:_,modelValue:c.value,"onUpdate:modelValue":i[0]||(i[0]=t=>c.value=t),color:"primary","fixed-header":"","fixed-footer":"","show-select":"",items:e.unref(d),headers:e.unref(s),loading:e.unref(a).loading},{...e.unref(a).options,...e.unref(g).options.state},{search:e.unref(k),"onUpdate:options":e.unref(h)}),e.createSlots({loading:e.withCtx(()=>[e.createVNode(n.VSkeletonLoader,{type:"table-row@10"})]),"expanded-row":e.withCtx(({columns:t,item:p})=>[e.createElementVNode("tr",S,[e.createElementVNode("td",{class:"expandable-row--column",colspan:t.length},[e.unref(a).options.expandedRowRenderer?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(a).options.expandedRowRenderer),{key:0,params:{columns:t,item:p}},null,8,["params"])):e.createCommentVNode("",!0)],8,w)])]),_:2},[e.renderList(e.unref(s),(t,p)=>({name:x(t),fn:e.withCtx(({item:u,internalItem:m,value:o,column:r})=>[e.createElementVNode("div",{class:e.normalizeClass(r.cellClass)},[r?.cell?(e.openBlock(),e.createBlock(e.unref(n.CellRender),{key:0,render:r.cell({item:u,internalItem:m,value:o,column:r}),params:{item:u,internalItem:m,value:o,column:r}},null,8,["render","params"])):(e.openBlock(),e.createElementBlock("span",y,e.toDisplayString(String(o).length||String(o)==="0"?o:"-"),1))],2)])}))]),1040,["modelValue","items","headers","loading","search","onUpdate:options"]))}};exports.default=B;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { inject as w, useModel as C, ref as D, createBlock as n, openBlock as
|
|
2
|
-
import { u as I } from "./index-
|
|
3
|
-
import { u as L, V as M, a as j, C as z } from "./cellRender-
|
|
1
|
+
import { inject as w, useModel as C, ref as D, createBlock as n, openBlock as s, mergeProps as R, unref as e, createSlots as T, withCtx as d, createElementVNode as p, createCommentVNode as B, resolveDynamicComponent as N, createVNode as P, renderList as U, normalizeClass as v, createElementBlock as E, toDisplayString as F } from "vue";
|
|
2
|
+
import { u as I } from "./index-D-1LWR3S.js";
|
|
3
|
+
import { u as L, V as M, a as j, C as z } from "./cellRender-D_-HT--u.js";
|
|
4
4
|
const O = { key: 1 }, $ = { class: "expandable-row" }, q = ["colspan"], K = {
|
|
5
5
|
__name: "Table",
|
|
6
6
|
props: {
|
|
@@ -8,51 +8,53 @@ const O = { key: 1 }, $ = { class: "expandable-row" }, q = ["colspan"], K = {
|
|
|
8
8
|
modelModifiers: {}
|
|
9
9
|
},
|
|
10
10
|
emits: ["update:modelValue"],
|
|
11
|
-
setup(
|
|
12
|
-
const { tableState:
|
|
13
|
-
return
|
|
11
|
+
setup(g, { expose: h }) {
|
|
12
|
+
const { tableState: V, searchState: x, headersState: i, saveTableOptions: k } = I(), { filteredData: c } = L(), r = w("table_props"), m = C(g, "modelValue"), y = D(null), S = (l) => l?.lock ? null : `item.${l.key}`;
|
|
13
|
+
return h({ getItemsForPrint: async () => c.value }), (l, u) => (s(), n(M, R({
|
|
14
14
|
ref_key: "datatable",
|
|
15
|
-
ref:
|
|
15
|
+
ref: y,
|
|
16
16
|
modelValue: m.value,
|
|
17
17
|
"onUpdate:modelValue": u[0] || (u[0] = (t) => m.value = t),
|
|
18
18
|
color: "primary",
|
|
19
|
+
"fixed-header": "",
|
|
20
|
+
"fixed-footer": "",
|
|
19
21
|
"show-select": "",
|
|
20
22
|
items: e(c),
|
|
21
23
|
headers: e(i),
|
|
22
|
-
loading: e(
|
|
23
|
-
}, { ...e(
|
|
24
|
-
search: e(
|
|
25
|
-
"onUpdate:options": e(
|
|
24
|
+
loading: e(r).loading
|
|
25
|
+
}, { ...e(r).options, ...e(V).options.state }, {
|
|
26
|
+
search: e(x),
|
|
27
|
+
"onUpdate:options": e(k)
|
|
26
28
|
}), T({
|
|
27
29
|
loading: d(() => [
|
|
28
30
|
P(j, { type: "table-row@10" })
|
|
29
31
|
]),
|
|
30
|
-
"expanded-row": d(({ columns: t, item:
|
|
32
|
+
"expanded-row": d(({ columns: t, item: f }) => [
|
|
31
33
|
p("tr", $, [
|
|
32
34
|
p("td", {
|
|
33
35
|
class: "expandable-row--column",
|
|
34
36
|
colspan: t.length
|
|
35
37
|
}, [
|
|
36
|
-
e(
|
|
38
|
+
e(r).options.expandedRowRenderer ? (s(), n(N(e(r).options.expandedRowRenderer), {
|
|
37
39
|
key: 0,
|
|
38
|
-
params: { columns: t, item:
|
|
40
|
+
params: { columns: t, item: f }
|
|
39
41
|
}, null, 8, ["params"])) : B("", !0)
|
|
40
42
|
], 8, q)
|
|
41
43
|
])
|
|
42
44
|
]),
|
|
43
45
|
_: 2
|
|
44
46
|
}, [
|
|
45
|
-
U(e(i), (t,
|
|
46
|
-
name:
|
|
47
|
-
fn: d(({ item:
|
|
47
|
+
U(e(i), (t, f) => ({
|
|
48
|
+
name: S(t),
|
|
49
|
+
fn: d(({ item: _, internalItem: b, value: a, column: o }) => [
|
|
48
50
|
p("div", {
|
|
49
51
|
class: v(o.cellClass)
|
|
50
52
|
}, [
|
|
51
|
-
o?.cell ? (
|
|
53
|
+
o?.cell ? (s(), n(e(z), {
|
|
52
54
|
key: 0,
|
|
53
|
-
render: o.cell({ item:
|
|
54
|
-
params: { item:
|
|
55
|
-
}, null, 8, ["render", "params"])) : (
|
|
55
|
+
render: o.cell({ item: _, internalItem: b, value: a, column: o }),
|
|
56
|
+
params: { item: _, internalItem: b, value: a, column: o }
|
|
57
|
+
}, null, 8, ["render", "params"])) : (s(), E("span", O, F(String(a).length || String(a) === "0" ? a : "-"), 1))
|
|
56
58
|
], 2)
|
|
57
59
|
])
|
|
58
60
|
}))
|