@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
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { mergeModels as x, inject as f, useModel as N, ref as b, computed as j, watch as S, onMounted as D, createBlock as v, openBlock as h, withCtx as y, createVNode as E, unref as d, isRef as V, createElementBlock as H, Fragment as J, renderList as M, mergeProps as B } from "vue";
|
|
2
|
+
import { aO as C } from "./dataTables-Be-U1RVV.js";
|
|
3
|
+
import { u as P, j as w, k as A, l as I, a as U, e as $ } from "./index-BAxGZLuh.js";
|
|
4
|
+
const q = {
|
|
5
|
+
__name: "Selected",
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: {},
|
|
8
|
+
modelModifiers: {}
|
|
9
|
+
},
|
|
10
|
+
emits: /* @__PURE__ */ x(["save"], ["update:modelValue"]),
|
|
11
|
+
setup(F, { emit: _ }) {
|
|
12
|
+
const r = f("table_props"), o = f("datatablesPluginOptions"), c = N(F, "modelValue"), { hardFiltersState: p } = P(), { registerHook: m } = w(), t = b([]), s = _, u = f("busEmits"), n = j(() => C(r.options, o.options));
|
|
13
|
+
S(t, (l) => {
|
|
14
|
+
const e = {};
|
|
15
|
+
l.forEach((a) => {
|
|
16
|
+
let i = r.hardFilters?.[a] ?? null;
|
|
17
|
+
isNaN(a) && (i = r.hardFilters.find((k) => k.value === a)), e[a] = i;
|
|
18
|
+
}), c.value = e, u("hardFilters:update", { keys: l, filters: e }), s("save");
|
|
19
|
+
}), D(() => {
|
|
20
|
+
t.value = Object.keys(p.value), t.value.length || r.hardFilters.forEach((l, e) => {
|
|
21
|
+
l.active && t.value.push(l.value ?? e);
|
|
22
|
+
}), m("hardFilters:activate", g), m("hardFilters:deactivate", O);
|
|
23
|
+
});
|
|
24
|
+
const g = (l) => {
|
|
25
|
+
const e = JSON.parse(JSON.stringify(t.value));
|
|
26
|
+
e.push(l), t.value = e;
|
|
27
|
+
}, O = (l) => {
|
|
28
|
+
const e = JSON.parse(JSON.stringify(t.value)), a = e.findIndex((i) => i === l);
|
|
29
|
+
a !== -1 && (e.splice(a, 1), t.value = e);
|
|
30
|
+
};
|
|
31
|
+
return (l, e) => (h(), v(A, null, {
|
|
32
|
+
default: y(() => [
|
|
33
|
+
E(I, {
|
|
34
|
+
modelValue: d(t),
|
|
35
|
+
"onUpdate:modelValue": e[0] || (e[0] = (a) => V(t) ? t.value = a : null),
|
|
36
|
+
"selected-class": `text-${d(n).color}`,
|
|
37
|
+
color: d(n).color,
|
|
38
|
+
multiple: ""
|
|
39
|
+
}, {
|
|
40
|
+
default: y(() => [
|
|
41
|
+
(h(!0), H(J, null, M(d(r).hardFilters, (a, i) => (h(), v(U, B({
|
|
42
|
+
key: i,
|
|
43
|
+
class: "my-0"
|
|
44
|
+
}, { ref_for: !0 }, a, { density: "comfortable" }), null, 16))), 128))
|
|
45
|
+
]),
|
|
46
|
+
_: 1
|
|
47
|
+
}, 8, ["modelValue", "selected-class", "color"])
|
|
48
|
+
]),
|
|
49
|
+
_: 1
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
}, R = {
|
|
53
|
+
__name: "index",
|
|
54
|
+
setup(F) {
|
|
55
|
+
const _ = $(), { setData: r } = _, o = b({}), c = f("table_props"), p = b(0), m = () => {
|
|
56
|
+
const t = Object.entries(o.value).filter(([, s]) => Array.isArray(s) || typeof s == "string" ? s.length > 0 : s != null && s !== "").reduce((s, [u, n]) => (s[u] = n, s), {});
|
|
57
|
+
r({
|
|
58
|
+
table_id: c.id,
|
|
59
|
+
name: "hardFilters",
|
|
60
|
+
value: { query: t }
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
return S(
|
|
64
|
+
() => c.hardFilters,
|
|
65
|
+
() => {
|
|
66
|
+
p.value++;
|
|
67
|
+
}
|
|
68
|
+
), (t, s) => {
|
|
69
|
+
const u = q;
|
|
70
|
+
return h(), v(u, {
|
|
71
|
+
key: d(p),
|
|
72
|
+
modelValue: d(o),
|
|
73
|
+
"onUpdate:modelValue": s[0] || (s[0] = (n) => V(o) ? o.value = n : null),
|
|
74
|
+
onSave: m
|
|
75
|
+
}, null, 8, ["modelValue"]);
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
export {
|
|
80
|
+
R as default
|
|
81
|
+
};
|