@ianicdev/datatables2 0.10.3 → 0.10.5
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-B2I3fQK-.cjs → Columns-CPCKKIx3.cjs} +1 -1
- package/dist/{Columns-Cul89zUK.js → Columns-ZxF5CuL6.js} +1 -1
- package/dist/{Comparison-DqBhxa7w.js → Comparison-CMTDEfUJ.js} +6 -6
- package/dist/{Comparison-BR_UI0MQ.cjs → Comparison-DfPeTvCT.cjs} +1 -1
- package/dist/{Datepicker-B-Whoyb7.js → Datepicker-BLYCUwKH.js} +2 -2
- package/dist/{Datepicker-DAsmREFO.cjs → Datepicker-CbsULJsG.cjs} +1 -1
- package/dist/{Download-eF23Wfl5.js → Download-CBodg9GI.js} +1 -1
- package/dist/{Download-CaYGcN68.cjs → Download-CjD4NWhV.cjs} +1 -1
- package/dist/{Options-DKcffgvi.js → Options-BHx4o8aa.js} +1 -1
- package/dist/{Options-DjlXBvIh.cjs → Options-e0hJOpF8.cjs} +1 -1
- package/dist/{RefreshTable-DLAVYGly.cjs → RefreshTable-CyPWCK3e.cjs} +1 -1
- package/dist/{RefreshTable-BdKbgZ6r.js → RefreshTable-DlG8UH4c.js} +2 -2
- package/dist/{Search-RSFNzOye.cjs → Search-D4UmoZpS.cjs} +1 -1
- package/dist/{Search-3cdgX6ng.js → Search-DDRz2N_S.js} +2 -2
- package/dist/{Table-CMF3XY7Y.cjs → Table-ACmKFpAk.cjs} +1 -1
- package/dist/{Table-DDIeeeXR.js → Table-QxreAQB1.js} +8 -8
- package/dist/{TableServer-CgG-cidx.js → TableServer-BQUFKBeQ.js} +134 -134
- package/dist/{TableServer-BorxYj9a.cjs → TableServer-pRzLKhVw.cjs} +1 -1
- package/dist/{cellRender-Cf0NNgl8.js → cellRender-B3IOPLJf.js} +854 -951
- package/dist/cellRender-CA6S9KvF.cjs +1 -0
- package/dist/{dataTables-Dh14DLi7.cjs → dataTables-BbXv6am2.cjs} +3 -3
- package/dist/{dataTables-BcX90H2j.js → dataTables-Be-U1RVV.js} +133 -130
- package/dist/datatables.cjs +1 -1
- package/dist/datatables.js +1 -1
- package/dist/datatables2.css +1 -1
- package/dist/{index-DyARQ6Al.js → index-5WIEduUN.js} +20 -20
- package/dist/index-BAxGZLuh.js +4533 -0
- package/dist/{index-B8YkxY0t.cjs → index-CDteNa2i.cjs} +1 -1
- package/dist/index-m_LBTAkz.cjs +1 -0
- package/package.json +6 -6
- package/dist/cellRender-BjvgzE1x.cjs +0 -1
- package/dist/index-BSSvj4Pj.cjs +0 -1
- package/dist/index-BhA2W09j.js +0 -4078
|
@@ -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 B } from "vue-i18n";
|
|
3
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
7
|
const O = /* @__PURE__ */ E(M);
|
|
8
8
|
function R() {
|
|
@@ -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"),u=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"),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;
|
|
@@ -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-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,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 {
|
|
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
7
|
setup(b) {
|
|
@@ -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-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,7 +1,7 @@
|
|
|
1
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 {
|
|
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 P } from "./dataTables-
|
|
4
|
+
import { aD as C, a7 as P } from "./dataTables-Be-U1RVV.js";
|
|
5
5
|
const q = {
|
|
6
6
|
__name: "Search",
|
|
7
7
|
setup(M) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),y=require("./dataTables-
|
|
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;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { inject as _, useModel as
|
|
2
|
-
import {
|
|
3
|
-
import { u as j } from "./index-
|
|
4
|
-
import { u as z, V as $, a as q, C as A } from "./cellRender-
|
|
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
5
|
const G = { key: 1 }, H = { class: "expandable-row" }, J = ["colspan"], Z = {
|
|
6
6
|
__name: "Table",
|
|
7
7
|
props: {
|
|
@@ -10,8 +10,8 @@ const G = { key: 1 }, H = { class: "expandable-row" }, J = ["colspan"], Z = {
|
|
|
10
10
|
},
|
|
11
11
|
emits: ["update:modelValue"],
|
|
12
12
|
setup(V, { expose: h }) {
|
|
13
|
-
const s = _("table_props"), k = _("datatablesPluginOptions"), i =
|
|
14
|
-
return h({ getItemsForPrint: async () => m.value }), (r, u) => (n(), l($,
|
|
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
15
|
ref_key: "datatable",
|
|
16
16
|
ref: w,
|
|
17
17
|
modelValue: i.value,
|
|
@@ -22,7 +22,7 @@ const G = { key: 1 }, H = { class: "expandable-row" }, J = ["colspan"], Z = {
|
|
|
22
22
|
headers: e(c),
|
|
23
23
|
search: e(x),
|
|
24
24
|
"onUpdate:options": e(y)
|
|
25
|
-
}),
|
|
25
|
+
}), B({
|
|
26
26
|
loading: d(() => [
|
|
27
27
|
v(q, { type: "table-row@10" })
|
|
28
28
|
]),
|
|
@@ -35,7 +35,7 @@ const G = { key: 1 }, H = { class: "expandable-row" }, J = ["colspan"], Z = {
|
|
|
35
35
|
e(s).options.expandedRowRenderer ? (n(), l(U(e(s).options.expandedRowRenderer), {
|
|
36
36
|
key: 0,
|
|
37
37
|
params: { columns: t, item: b }
|
|
38
|
-
}, null, 8, ["params"])) :
|
|
38
|
+
}, null, 8, ["params"])) : N("", !0)
|
|
39
39
|
], 8, J)
|
|
40
40
|
])
|
|
41
41
|
]),
|