@pantograph/vue 0.10.13 → 0.11.0
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/DataTable/index.js +393 -525
- package/dist/DataTable/index.umd.cjs +1 -1
- package/dist/DropZone/DropZone.model.d.ts +4 -0
- package/dist/DropZone/index.d.ts +1 -0
- package/dist/DropZone/index.js +1 -0
- package/dist/DropZone/index.umd.cjs +1 -0
- package/dist/Empty/index.d.ts +2 -1
- package/dist/Empty/index.js +6 -1
- package/dist/Empty/index.umd.cjs +1 -1
- package/dist/Empty.vue_vue_type_style_index_0_lang-C9fZc_AL.js +1 -0
- package/dist/Empty.vue_vue_type_style_index_0_lang-DbUtm7Hx.js +143 -0
- package/dist/{THead.vue_vue_type_style_index_0_lang-tkq9EicC.js → THead.vue_vue_type_style_index_0_lang-B4yro5EP.js} +19 -16
- package/dist/THead.vue_vue_type_style_index_0_lang-C1I8ZLa2.js +1 -0
- package/dist/Table/index.js +1 -1
- package/dist/Table/index.umd.cjs +1 -1
- package/dist/style/index.css +1 -1
- package/package.json +6 -1
- package/dist/THead.vue_vue_type_style_index_0_lang-BG_UqFq7.js +0 -1
package/dist/DataTable/index.js
CHANGED
|
@@ -1,282 +1,150 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createColumnHelper as
|
|
3
|
-
import { b as
|
|
4
|
-
import { i as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { c as
|
|
7
|
-
import { _ as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { _ as
|
|
18
|
-
import { _ as
|
|
19
|
-
import { _ as
|
|
20
|
-
import { _ as
|
|
21
|
-
import { _ as
|
|
22
|
-
import { _ as ft } from "../Switch.vue_vue_type_style_index_0_lang-DnmgMCHT.js";
|
|
1
|
+
import { h as Ke, ref as Z, computed as D, watch as le, defineComponent as We, useSlots as je, unref as t, useTemplateRef as Ee, onBeforeUnmount as He, shallowRef as Le, createElementBlock as v, openBlock as c, normalizeClass as g, createVNode as f, withCtx as m, createElementVNode as R, normalizeStyle as Ve, createBlock as I, createCommentVNode as P, Fragment as $, renderList as M, mergeProps as z, renderSlot as T, createSlots as fe, toDisplayString as Me, normalizeProps as Ne, guardReactiveProps as Oe, nextTick as ee } from "vue";
|
|
2
|
+
import { createColumnHelper as xe, flattenBy as qe, useVueTable as Fe, getSortedRowModel as Ge, getCoreRowModel as Ze } from "@tanstack/vue-table";
|
|
3
|
+
import { b as Ue } from "../_baseIsEqual-BknLKouD.js";
|
|
4
|
+
import { i as Je, b as Qe, a as oe } from "../isArray-CdbPONHA.js";
|
|
5
|
+
import { _ as pe } from "../Checkbox.vue_vue_type_style_index_0_lang-C7it9Wv8.js";
|
|
6
|
+
import { c as ge, _ as Xe, a as te } from "../Menu.vue_vue_type_style_index_0_lang-U69mRopb.js";
|
|
7
|
+
import { _ as Ye } from "../ActionButton.vue_vue_type_script_setup_true_lang-BZf08kPh.js";
|
|
8
|
+
import { _ as eo } from "../Empty.vue_vue_type_style_index_0_lang-DbUtm7Hx.js";
|
|
9
|
+
import { o as _e } from "../omit-CD3OjwFx.js";
|
|
10
|
+
import { u as oo } from "../uniq-DSVd52ma.js";
|
|
11
|
+
import { i as ne, a as W } from "../_flatRest-Dx0ZZgOx.js";
|
|
12
|
+
import { getBemBlock as to, wgt_pre as no, generateVariantClassList as ro, getBemElement as _, usePCId as lo } from "@pantograph/utils";
|
|
13
|
+
import { getBreakpoints as so } from "@pantograph/tokens";
|
|
14
|
+
import { useBreakpoints as io, useIntersectionObserver as ao } from "@vueuse/core";
|
|
15
|
+
import { _ as co } from "../Skeleton.vue_vue_type_style_index_0_lang-aSGb2hn6.js";
|
|
16
|
+
import { _ as ye } from "../Popover.vue_vue_type_style_index_0_lang-BCFXul8O.js";
|
|
17
|
+
import { _ as uo } from "../Badge.vue_vue_type_script_setup_true_lang-C8L2pGJ3.js";
|
|
18
|
+
import { _ as he } from "../Divider.vue_vue_type_style_index_0_lang-DapqjSGc.js";
|
|
19
|
+
import { _ as we } from "../IconButton.vue_vue_type_script_setup_true_lang-DytRXxrl.js";
|
|
20
|
+
import { _ as re } from "../Icon.vue_vue_type_style_index_0_lang-BlmMv3wD.js";
|
|
21
|
+
import { _ as mo } from "../Switch.vue_vue_type_style_index_0_lang-DnmgMCHT.js";
|
|
23
22
|
import { g as be } from "../get-B14Mml42.js";
|
|
24
|
-
import {
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
import { cva as fo } from "class-variance-authority";
|
|
24
|
+
import { _ as po, e as go, c as F, a as yo, d as ho, b as G } from "../THead.vue_vue_type_style_index_0_lang-B4yro5EP.js";
|
|
25
|
+
function ve(B, C) {
|
|
26
|
+
return Ue(B, C);
|
|
27
27
|
}
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}, kt = ["fill"], bt = ["fill"], _t = ["fill"], St = ["fill"], $t = ["stroke"], Rt = ["stroke"], Ht = ["stroke"], zt = /* @__PURE__ */ Se({
|
|
33
|
-
...it("Empty"),
|
|
34
|
-
__name: "Empty",
|
|
35
|
-
props: {
|
|
36
|
-
type: { default: "simple" },
|
|
37
|
-
class: {},
|
|
38
|
-
imageCls: {},
|
|
39
|
-
titleCls: {},
|
|
40
|
-
descriptionCls: {},
|
|
41
|
-
contentCls: {},
|
|
42
|
-
textCls: {},
|
|
43
|
-
actionsCls: {},
|
|
44
|
-
icon: { default: "tabler:barrier-block" },
|
|
45
|
-
title: {},
|
|
46
|
-
description: {}
|
|
47
|
-
},
|
|
48
|
-
setup(B) {
|
|
49
|
-
const S = B, s = $e(), z = Re("empty"), b = ze(z, {
|
|
50
|
-
variants: {
|
|
51
|
-
type: He(vt, z)
|
|
52
|
-
}
|
|
53
|
-
}), c = P(() => S.title || !!s.title), $ = P(() => S.description || !!s.description);
|
|
54
|
-
return (l, y) => (a(), f("div", {
|
|
55
|
-
class: d([
|
|
56
|
-
t(b)({
|
|
57
|
-
type: l.type
|
|
58
|
-
}),
|
|
59
|
-
S.class
|
|
60
|
-
])
|
|
61
|
-
}, [
|
|
62
|
-
w("div", {
|
|
63
|
-
class: d([t(C)(t(z), "image"), l.imageCls])
|
|
64
|
-
}, [
|
|
65
|
-
H(l.$slots, "image", {}, () => [
|
|
66
|
-
l.type === "simple" ? (a(), T(X, {
|
|
67
|
-
key: 0,
|
|
68
|
-
icon: l.icon,
|
|
69
|
-
size: "sm"
|
|
70
|
-
}, null, 8, ["icon"])) : (a(), f("svg", wt, [
|
|
71
|
-
w("path", {
|
|
72
|
-
"fill-rule": "evenodd",
|
|
73
|
-
"clip-rule": "evenodd",
|
|
74
|
-
d: "M23.6045 61.3504H67.8586C68.1089 61.3504 68.353 61.323 68.588 61.2709C68.823 61.323 69.0671 61.3504 69.3175 61.3504H94.6055C96.4856 61.3504 98.0097 59.8051 98.0097 57.899C98.0097 55.9929 96.4856 54.4477 94.6055 54.4477H91.6877C89.8076 54.4477 88.2835 52.9024 88.2835 50.9963C88.2835 49.0902 89.8076 47.545 91.6877 47.545H100.928C102.808 47.545 104.332 45.9997 104.332 44.0936C104.332 42.1875 102.808 40.6423 100.928 40.6423H90.2287C92.1088 40.6423 93.6329 39.0971 93.6329 37.1909C93.6329 35.2848 92.1088 33.7396 90.2287 33.7396H59.105C60.9851 33.7396 62.5092 32.1944 62.5092 30.2882C62.5092 28.3821 60.9851 26.8369 59.105 26.8369H31.3854C29.5053 26.8369 27.9813 28.3821 27.9813 30.2882C27.9813 32.1944 29.5053 33.7396 31.3854 33.7396H11.9331C10.053 33.7396 8.52891 35.2848 8.52891 37.1909C8.52891 39.0971 10.053 40.6423 11.9331 40.6423H24.0908C25.9708 40.6423 27.4949 42.1875 27.4949 44.0936C27.4949 45.9997 25.9708 47.545 24.0908 47.545H4.63844C2.75838 47.545 1.23428 49.0902 1.23428 50.9963C1.23428 52.9024 2.75838 54.4477 4.63844 54.4477H23.6045C21.7244 54.4477 20.2003 55.9929 20.2003 57.899C20.2003 59.8051 21.7244 61.3504 23.6045 61.3504ZM102.873 61.3504C104.753 61.3504 106.277 59.8051 106.277 57.899C106.277 55.9929 104.753 54.4477 102.873 54.4477C100.993 54.4477 99.4686 55.9929 99.4686 57.899C99.4686 59.8051 100.993 61.3504 102.873 61.3504Z",
|
|
75
|
-
fill: t(N)("primary-0")
|
|
76
|
-
}, null, 8, kt),
|
|
77
|
-
w("path", {
|
|
78
|
-
"fill-rule": "evenodd",
|
|
79
|
-
"clip-rule": "evenodd",
|
|
80
|
-
d: "M45.9044 52.7159C45.8528 53.0686 45.8261 53.4291 45.8261 53.7956C45.8261 58.0211 49.3738 61.4465 53.75 61.4465C58.1262 61.4465 61.6738 58.0211 61.6738 53.7956C61.6738 53.4291 61.6472 53.0686 61.5956 52.7159H80.8232V69.735C80.8232 70.7914 79.9363 71.6477 78.8422 71.6477H28.6578C27.5637 71.6477 26.6768 70.7914 26.6768 69.735V52.7159H45.9044Z",
|
|
81
|
-
fill: t(N)("gray-0")
|
|
82
|
-
}, null, 8, bt),
|
|
83
|
-
w("path", {
|
|
84
|
-
"fill-rule": "evenodd",
|
|
85
|
-
"clip-rule": "evenodd",
|
|
86
|
-
d: "M62.3342 52.9157C62.3342 57.6598 58.4909 61.5057 53.75 61.5057C49.0091 61.5057 45.1658 57.6598 45.1658 52.9157C45.1658 52.762 45.1698 52.6092 45.1778 52.4575H26.6768L32.9898 33.779C33.2619 32.9738 34.0169 32.4318 34.8663 32.4318H72.6337C73.4831 32.4318 74.238 32.9738 74.5102 33.779L80.8232 52.4575H62.3222C62.3301 52.6092 62.3342 52.762 62.3342 52.9157Z",
|
|
87
|
-
fill: t(N)("gray-0")
|
|
88
|
-
}, null, 8, _t),
|
|
89
|
-
w("path", {
|
|
90
|
-
"fill-rule": "evenodd",
|
|
91
|
-
"clip-rule": "evenodd",
|
|
92
|
-
d: "M61.2612 53.3613C61.2612 57.1125 57.8983 60.8295 53.75 60.8295C49.6017 60.8295 46.2388 57.1125 46.2388 53.3613C46.2388 53.2398 46.2424 52.4429 46.2493 52.3229H32.0915L37.6153 38.9061C37.8534 38.2694 38.514 37.8409 39.2573 37.8409H68.2427C68.986 37.8409 69.6466 38.2694 69.8847 38.9061L75.4085 52.3229H61.2507C61.2576 52.4429 61.2612 53.2398 61.2612 53.3613Z",
|
|
93
|
-
fill: t(N)("primary-1")
|
|
94
|
-
}, null, 8, St),
|
|
95
|
-
w("path", {
|
|
96
|
-
"fill-rule": "evenodd",
|
|
97
|
-
"clip-rule": "evenodd",
|
|
98
|
-
d: "M26.846 52.3862V70.2955C26.846 70.9489 27.3763 71.4787 28.0305 71.4787H79.4695C80.1237 71.4787 80.654 70.9489 80.654 70.2955V52.3862L74.2278 33.405C74.065 32.9244 73.6137 32.6009 73.1058 32.6009H34.3942C33.8863 32.6009 33.435 32.9244 33.2722 33.405L26.846 52.3862Z",
|
|
99
|
-
stroke: t(N)("primary-5"),
|
|
100
|
-
"stroke-width": "2"
|
|
101
|
-
}, null, 8, $t),
|
|
102
|
-
w("path", {
|
|
103
|
-
d: "M35.4756 52.0398C38.14 52.0398 41.0154 52.0398 44.1017 52.0398C45.3716 52.0398 45.3716 52.9313 45.3716 53.392C45.3716 57.8731 49.0916 61.5057 53.6805 61.5057C58.2693 61.5057 61.9893 57.8731 61.9893 53.392C61.9893 52.9313 61.9893 52.0398 63.2592 52.0398H80.1463M30.4493 52.0398H32.0915H30.4493Z",
|
|
104
|
-
stroke: t(N)("primary-5"),
|
|
105
|
-
"stroke-width": "2",
|
|
106
|
-
"stroke-linecap": "round",
|
|
107
|
-
"stroke-linejoin": "round"
|
|
108
|
-
}, null, 8, Rt),
|
|
109
|
-
w("path", {
|
|
110
|
-
d: "M70.7382 16.4092L63.2256 24.8292M53.1406 13.5V24.8292V13.5ZM35.4756 16.4092L42.9882 24.8292L35.4756 16.4092Z",
|
|
111
|
-
stroke: t(N)("primary-5"),
|
|
112
|
-
"stroke-width": "2",
|
|
113
|
-
"stroke-linecap": "round",
|
|
114
|
-
"stroke-linejoin": "round"
|
|
115
|
-
}, null, 8, Ht)
|
|
116
|
-
]))
|
|
117
|
-
])
|
|
118
|
-
], 2),
|
|
119
|
-
l.type === "simple" && c.value ? (a(), f("div", {
|
|
120
|
-
key: 0,
|
|
121
|
-
class: d([t(C)(t(z), "title"), l.titleCls])
|
|
122
|
-
}, [
|
|
123
|
-
H(l.$slots, "title", {}, () => [
|
|
124
|
-
ne(J(l.title), 1)
|
|
125
|
-
])
|
|
126
|
-
], 2)) : c.value || $.value || s.actions ? (a(), f("div", {
|
|
127
|
-
key: 1,
|
|
128
|
-
class: d([t(C)(t(z), "content"), l.contentCls])
|
|
129
|
-
}, [
|
|
130
|
-
c.value || $.value ? (a(), f("div", {
|
|
131
|
-
key: 0,
|
|
132
|
-
class: d([t(C)(t(z), "text"), l.textCls])
|
|
133
|
-
}, [
|
|
134
|
-
c.value ? (a(), f("div", {
|
|
135
|
-
key: 0,
|
|
136
|
-
class: d([t(C)(t(z), "title"), l.titleCls])
|
|
137
|
-
}, [
|
|
138
|
-
H(l.$slots, "title", {}, () => [
|
|
139
|
-
ne(J(l.title), 1)
|
|
140
|
-
])
|
|
141
|
-
], 2)) : R("", !0),
|
|
142
|
-
$.value ? (a(), f("div", {
|
|
143
|
-
key: 1,
|
|
144
|
-
class: d([t(C)(t(z), "description"), l.descriptionCls])
|
|
145
|
-
}, [
|
|
146
|
-
H(l.$slots, "description", {}, () => [
|
|
147
|
-
ne(J(l.description), 1)
|
|
148
|
-
])
|
|
149
|
-
], 2)) : R("", !0)
|
|
150
|
-
], 2)) : R("", !0),
|
|
151
|
-
s.actions ? (a(), f("div", {
|
|
152
|
-
key: 1,
|
|
153
|
-
class: d([t(C)(t(z), "actions"), l.actionsCls])
|
|
154
|
-
}, [
|
|
155
|
-
H(l.$slots, "actions")
|
|
156
|
-
], 2)) : R("", !0)
|
|
157
|
-
], 2)) : R("", !0)
|
|
158
|
-
], 2));
|
|
159
|
-
}
|
|
160
|
-
}), Bt = (B, { isColumnWrapped: S, selectionId: s }) => {
|
|
161
|
-
const z = (o) => {
|
|
162
|
-
var m;
|
|
163
|
-
const u = (h) => h === "list" ? "md" : "sm";
|
|
28
|
+
const wo = (B, { isColumnWrapped: C, selectionId: r }) => {
|
|
29
|
+
const x = (o) => {
|
|
30
|
+
var d;
|
|
31
|
+
const a = (y) => y === "list" ? "md" : "sm";
|
|
164
32
|
return {
|
|
165
33
|
...(o == null ? void 0 : o.skeletonProps) ?? {},
|
|
166
34
|
style: "width: 100%",
|
|
167
|
-
size:
|
|
35
|
+
size: a((d = o == null ? void 0 : o.skeletonProps) == null ? void 0 : d.type)
|
|
168
36
|
};
|
|
169
|
-
},
|
|
170
|
-
var
|
|
171
|
-
const
|
|
172
|
-
return
|
|
37
|
+
}, S = (o) => {
|
|
38
|
+
var d, y;
|
|
39
|
+
const a = (d = o.props) == null ? void 0 : d.column.columnDef;
|
|
40
|
+
return W(a == null ? void 0 : a.render) && o.props.row ? (y = a == null ? void 0 : a.render) == null ? void 0 : y.call(a, {
|
|
173
41
|
index: o.props.row.index,
|
|
174
42
|
record: o.props.row.original,
|
|
175
|
-
column:
|
|
176
|
-
}) : typeof o.render == "function" || typeof o.render == "object" ?
|
|
177
|
-
},
|
|
178
|
-
let
|
|
43
|
+
column: _e(a, "render")
|
|
44
|
+
}) : typeof o.render == "function" || typeof o.render == "object" ? Ke(o.render, o.props) : o.render;
|
|
45
|
+
}, u = (o) => {
|
|
46
|
+
let a = {};
|
|
179
47
|
if (o) {
|
|
180
|
-
const
|
|
181
|
-
(
|
|
182
|
-
width:
|
|
183
|
-
maxWidth:
|
|
184
|
-
minWidth:
|
|
185
|
-
overflow:
|
|
48
|
+
const d = (j) => Number(j) >= 0 ? `${j}px` : j, { width: y, maxWidth: K, minWidth: A } = o;
|
|
49
|
+
(y || K || A) && (a = {
|
|
50
|
+
width: d(y),
|
|
51
|
+
maxWidth: d(K),
|
|
52
|
+
minWidth: d(A),
|
|
53
|
+
overflow: y || K ? "hidden" : void 0
|
|
186
54
|
});
|
|
187
55
|
}
|
|
188
|
-
return
|
|
189
|
-
},
|
|
190
|
-
var
|
|
191
|
-
let
|
|
192
|
-
return ((
|
|
193
|
-
},
|
|
194
|
-
var
|
|
56
|
+
return a;
|
|
57
|
+
}, k = {}, i = (o, a = !0) => {
|
|
58
|
+
var y;
|
|
59
|
+
let d = 1;
|
|
60
|
+
return ((y = o == null ? void 0 : o.subHeaders) == null ? void 0 : y.length) === 1 && o.column.id === o.subHeaders[0].column.id && (d += i(o.subHeaders[0], !1)), a && (!k[o.column.id] || k[o.column.id] < d) && (k[o.column.id] = d), d;
|
|
61
|
+
}, p = (o, a = {}) => {
|
|
62
|
+
var d;
|
|
195
63
|
if (o != null && o.column) {
|
|
196
|
-
const
|
|
197
|
-
if (
|
|
198
|
-
let
|
|
199
|
-
const { customCell:
|
|
200
|
-
if (
|
|
201
|
-
const
|
|
202
|
-
if (
|
|
203
|
-
const { wrap:
|
|
204
|
-
|
|
64
|
+
const y = (d = o == null ? void 0 : o.column) == null ? void 0 : d.columnDef, K = [], A = {};
|
|
65
|
+
if (ne(y)) {
|
|
66
|
+
let j = C(o.column.id);
|
|
67
|
+
const { customCell: E, class: q } = y;
|
|
68
|
+
if (ge(q) || K.push(q), E && (ne(E) || W(E))) {
|
|
69
|
+
const O = (w) => {
|
|
70
|
+
if (ne(w)) {
|
|
71
|
+
const { wrap: H, colSpan: J, rowSpan: Q } = w;
|
|
72
|
+
j = j || (H ?? !1), A.colSpan = J, A.rowSpan = Q;
|
|
205
73
|
}
|
|
206
74
|
};
|
|
207
|
-
|
|
208
|
-
|
|
75
|
+
W(E) && o.row ? O(
|
|
76
|
+
E({
|
|
209
77
|
index: o.row.index,
|
|
210
78
|
record: o.row.original,
|
|
211
|
-
column:
|
|
79
|
+
column: y
|
|
212
80
|
})
|
|
213
|
-
) :
|
|
81
|
+
) : O(E);
|
|
214
82
|
}
|
|
215
|
-
o.header ?
|
|
83
|
+
o.header ? A.rowSpan = i(o.header) : j && (A.wrap = !0);
|
|
216
84
|
}
|
|
217
85
|
return {
|
|
218
|
-
class:
|
|
219
|
-
...
|
|
220
|
-
...
|
|
86
|
+
class: ge(K) ? void 0 : K,
|
|
87
|
+
...A,
|
|
88
|
+
...a
|
|
221
89
|
};
|
|
222
90
|
}
|
|
223
91
|
return {};
|
|
224
92
|
};
|
|
225
93
|
return {
|
|
226
|
-
getSkeletonProps:
|
|
227
|
-
RenderCell:
|
|
94
|
+
getSkeletonProps: x,
|
|
95
|
+
RenderCell: S,
|
|
228
96
|
getThProps: (o) => {
|
|
229
|
-
var
|
|
230
|
-
return
|
|
231
|
-
colSpan: (
|
|
232
|
-
"data-has-children": ((
|
|
97
|
+
var a, d, y;
|
|
98
|
+
return p(o, {
|
|
99
|
+
colSpan: (a = o == null ? void 0 : o.header) == null ? void 0 : a.colSpan,
|
|
100
|
+
"data-has-children": ((y = (d = o == null ? void 0 : o.column) == null ? void 0 : d.columns) == null ? void 0 : y.length) > 1 ? !0 : void 0
|
|
233
101
|
});
|
|
234
102
|
},
|
|
235
|
-
getTdProps: (o) =>
|
|
103
|
+
getTdProps: (o) => p(o),
|
|
236
104
|
getColProps: (o) => {
|
|
237
|
-
const
|
|
238
|
-
return o.id ===
|
|
239
|
-
style:
|
|
105
|
+
const a = u(o.columnDef);
|
|
106
|
+
return o.id === r && (a.width = "var(--pt-dimension-2800)"), {
|
|
107
|
+
style: a
|
|
240
108
|
};
|
|
241
109
|
},
|
|
242
|
-
isThVisible: (o,
|
|
110
|
+
isThVisible: (o, a, d) => k[d] === 1 ? !0 : a - o === k[d]
|
|
243
111
|
};
|
|
244
112
|
};
|
|
245
|
-
var
|
|
246
|
-
function
|
|
247
|
-
return B === !0 || B === !1 ||
|
|
113
|
+
var bo = "[object Boolean]";
|
|
114
|
+
function vo(B) {
|
|
115
|
+
return B === !0 || B === !1 || Je(B) && Qe(B) == bo;
|
|
248
116
|
}
|
|
249
|
-
const
|
|
250
|
-
const
|
|
251
|
-
if (
|
|
252
|
-
},
|
|
253
|
-
var
|
|
254
|
-
return !!((
|
|
255
|
-
},
|
|
256
|
-
const { id:
|
|
257
|
-
if (!
|
|
258
|
-
const
|
|
259
|
-
return
|
|
260
|
-
},
|
|
261
|
-
() => (B.columns ?? []).filter((
|
|
262
|
-
id:
|
|
263
|
-
wrap: !!
|
|
117
|
+
const _o = (B) => {
|
|
118
|
+
const C = Z([]), r = (i) => i ? C.value.findIndex((p) => p.id === i) : -1, x = (i) => {
|
|
119
|
+
if (i) return C.value.find((p) => p.id === i);
|
|
120
|
+
}, S = (i) => {
|
|
121
|
+
var p;
|
|
122
|
+
return !!((p = x(i)) != null && p.wrap);
|
|
123
|
+
}, u = (i) => {
|
|
124
|
+
const { id: p } = i;
|
|
125
|
+
if (!p) return !1;
|
|
126
|
+
const V = i.wrap ?? !S(p), N = r(p);
|
|
127
|
+
return N >= 0 ? C.value[N] = { id: p, wrap: V } : C.value.push({ id: p, wrap: V }), !0;
|
|
128
|
+
}, k = D(
|
|
129
|
+
() => (B.columns ?? []).filter((i) => vo(i.wrap)).map((i) => ({
|
|
130
|
+
id: i.id,
|
|
131
|
+
wrap: !!i.wrap
|
|
264
132
|
}))
|
|
265
133
|
);
|
|
266
|
-
return
|
|
267
|
-
|
|
268
|
-
(
|
|
269
|
-
|
|
134
|
+
return le(
|
|
135
|
+
k,
|
|
136
|
+
(i) => {
|
|
137
|
+
C.value = [...C.value, ...i];
|
|
270
138
|
},
|
|
271
139
|
{
|
|
272
140
|
immediate: !0,
|
|
273
141
|
deep: !0
|
|
274
142
|
}
|
|
275
143
|
), {
|
|
276
|
-
isColumnWrapped:
|
|
277
|
-
toggleWrap:
|
|
144
|
+
isColumnWrapped: S,
|
|
145
|
+
toggleWrap: u
|
|
278
146
|
};
|
|
279
|
-
},
|
|
147
|
+
}, Fo = /* @__PURE__ */ We({
|
|
280
148
|
__name: "DataTable",
|
|
281
149
|
props: {
|
|
282
150
|
columns: {},
|
|
@@ -304,379 +172,379 @@ const Tt = (B) => {
|
|
|
304
172
|
noHeader: { type: Boolean }
|
|
305
173
|
},
|
|
306
174
|
emits: ["fetch"],
|
|
307
|
-
setup(B, { emit:
|
|
308
|
-
const
|
|
175
|
+
setup(B, { emit: C }) {
|
|
176
|
+
const r = B, x = C, S = je(), u = to("data_table", no), k = xe(), i = `$${u}_selection$`, p = D(() => {
|
|
309
177
|
var e;
|
|
310
|
-
return ((e =
|
|
311
|
-
}),
|
|
312
|
-
var
|
|
178
|
+
return ((e = r.actionCol) == null ? void 0 : e.id) ?? `$${u}_action$`;
|
|
179
|
+
}), V = (e) => _e(e ?? {}, "title", "sorter", "columns", "id", "dataIndex"), N = D(() => {
|
|
180
|
+
var h;
|
|
313
181
|
const e = (n) => {
|
|
314
|
-
var
|
|
315
|
-
const
|
|
316
|
-
return
|
|
182
|
+
var L;
|
|
183
|
+
const b = n.id ?? lo(`${u}--col`);
|
|
184
|
+
return oe(be(n, r.childrenColumnName)) ? k.group({
|
|
317
185
|
header: n.title,
|
|
318
|
-
id:
|
|
319
|
-
columns: (
|
|
186
|
+
id: b,
|
|
187
|
+
columns: (L = be(n, r.childrenColumnName) ?? []) == null ? void 0 : L.map(e),
|
|
320
188
|
enableSorting: !1,
|
|
321
|
-
...
|
|
322
|
-
}) :
|
|
189
|
+
...V(n)
|
|
190
|
+
}) : k.accessor(n.dataIndex ?? n.id, {
|
|
323
191
|
header: n.title,
|
|
324
|
-
id:
|
|
325
|
-
sortingFn: typeof n.sorter == "function" ? (
|
|
192
|
+
id: b,
|
|
193
|
+
sortingFn: typeof n.sorter == "function" ? (Y, De) => n.sorter(Y.original, De.original) : n.sorter,
|
|
326
194
|
enableSorting: !!n.sorter,
|
|
327
|
-
...
|
|
195
|
+
...V(n)
|
|
328
196
|
});
|
|
329
197
|
};
|
|
330
|
-
if (!
|
|
331
|
-
const
|
|
332
|
-
if (
|
|
333
|
-
const
|
|
334
|
-
return
|
|
335
|
-
|
|
336
|
-
id:
|
|
198
|
+
if (!oe(r.columns)) throw "no columns";
|
|
199
|
+
const l = r.columns.map(({ id: n }) => n);
|
|
200
|
+
if (oo(l).length !== l.length) throw "no uniq column ids";
|
|
201
|
+
const s = [];
|
|
202
|
+
return r.rowSelection && r.rowKey && s.push(
|
|
203
|
+
k.accessor(i, {
|
|
204
|
+
id: i,
|
|
337
205
|
enableSorting: !1
|
|
338
206
|
})
|
|
339
|
-
),
|
|
340
|
-
|
|
341
|
-
}), (
|
|
342
|
-
|
|
343
|
-
id:
|
|
344
|
-
header: (
|
|
207
|
+
), r.columns.forEach((n) => {
|
|
208
|
+
s.push(e(n));
|
|
209
|
+
}), (S.action || S.hoverAction) && s.push(
|
|
210
|
+
k.accessor(p.value, {
|
|
211
|
+
id: p.value,
|
|
212
|
+
header: (h = r.actionCol) == null ? void 0 : h.title,
|
|
345
213
|
enableSorting: !1,
|
|
346
|
-
...
|
|
214
|
+
...V(r.actionCol)
|
|
347
215
|
})
|
|
348
|
-
),
|
|
349
|
-
}), { toggleWrap:
|
|
350
|
-
() =>
|
|
351
|
-
(e) => e[
|
|
216
|
+
), s;
|
|
217
|
+
}), { toggleWrap: se, isColumnWrapped: U } = _o(r), o = Z({}), a = D(() => Object.keys(o.value)), d = D(
|
|
218
|
+
() => r.rowKey ? qe(r.data, (e) => e.children).map(
|
|
219
|
+
(e) => e[r.rowKey]
|
|
352
220
|
) : []
|
|
353
|
-
),
|
|
221
|
+
), y = () => {
|
|
354
222
|
const e = Object.fromEntries(
|
|
355
|
-
|
|
356
|
-
var
|
|
357
|
-
return !((
|
|
358
|
-
}).map((
|
|
223
|
+
a.value.filter((l) => {
|
|
224
|
+
var s;
|
|
225
|
+
return !((s = r.rowSelection) != null && s.preserveSelectedRowKeys) && r.rowKey ? d.value.includes(l) : !0;
|
|
226
|
+
}).map((l) => [l, !0])
|
|
359
227
|
);
|
|
360
|
-
Object.keys(e).length !==
|
|
361
|
-
var
|
|
362
|
-
|
|
228
|
+
Object.keys(e).length !== a.value.length && (o.value = e, ee(() => {
|
|
229
|
+
var l;
|
|
230
|
+
W((l = r.rowSelection) == null ? void 0 : l.onChange) && r.rowSelection.onChange(H.value);
|
|
363
231
|
}));
|
|
364
|
-
},
|
|
232
|
+
}, K = D(() => (y(), [...r.data])), A = so(), E = io(
|
|
365
233
|
Object.fromEntries(
|
|
366
|
-
Object.keys(
|
|
234
|
+
Object.keys(A).map((e) => [e, A[e].minWidth])
|
|
367
235
|
),
|
|
368
236
|
{ strategy: "min-width" }
|
|
369
|
-
).active(),
|
|
370
|
-
|
|
371
|
-
|
|
237
|
+
).active(), q = Z({});
|
|
238
|
+
le(
|
|
239
|
+
E,
|
|
372
240
|
(e) => {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
var
|
|
241
|
+
q.value = Object.fromEntries(
|
|
242
|
+
N.value.map((l) => {
|
|
243
|
+
var s;
|
|
376
244
|
return [
|
|
377
|
-
|
|
378
|
-
|
|
245
|
+
l.id,
|
|
246
|
+
oe(l == null ? void 0 : l.responsive) ? (s = l.responsive) == null ? void 0 : s.includes(e) : !0
|
|
379
247
|
];
|
|
380
248
|
})
|
|
381
249
|
);
|
|
382
250
|
},
|
|
383
251
|
{ immediate: !0 }
|
|
384
252
|
);
|
|
385
|
-
const
|
|
253
|
+
const O = Z([]), w = Fe({
|
|
386
254
|
// debugTable: true,
|
|
387
255
|
getSubRows: (e) => e.children,
|
|
388
256
|
enableSorting: !0,
|
|
389
257
|
enableMultiSort: !0,
|
|
390
258
|
get data() {
|
|
391
|
-
return
|
|
259
|
+
return K.value;
|
|
392
260
|
},
|
|
393
261
|
onSortingChange: (e) => {
|
|
394
|
-
|
|
262
|
+
O.value = typeof e == "function" ? e(O.value) : e;
|
|
395
263
|
},
|
|
396
264
|
state: {
|
|
397
265
|
get sorting() {
|
|
398
|
-
return
|
|
266
|
+
return O.value;
|
|
399
267
|
},
|
|
400
268
|
get rowSelection() {
|
|
401
269
|
return o.value;
|
|
402
270
|
},
|
|
403
271
|
get columnVisibility() {
|
|
404
|
-
return
|
|
272
|
+
return q.value;
|
|
405
273
|
}
|
|
406
274
|
},
|
|
407
275
|
enableRowSelection: !0,
|
|
408
276
|
get columns() {
|
|
409
|
-
return
|
|
277
|
+
return N.value;
|
|
410
278
|
},
|
|
411
|
-
getRowId(e,
|
|
412
|
-
return
|
|
279
|
+
getRowId(e, l) {
|
|
280
|
+
return r.rowKey ? e[r.rowKey] : l;
|
|
413
281
|
},
|
|
414
282
|
getRowCanExpand: () => !0,
|
|
415
|
-
getCoreRowModel:
|
|
416
|
-
getSortedRowModel:
|
|
283
|
+
getCoreRowModel: Ze(),
|
|
284
|
+
getSortedRowModel: Ge(),
|
|
417
285
|
onRowSelectionChange: (e) => {
|
|
418
286
|
o.value = typeof e == "function" ? e(o.value) : e;
|
|
419
287
|
}
|
|
420
|
-
}),
|
|
421
|
-
selectedRowKeys:
|
|
422
|
-
selectedRows:
|
|
288
|
+
}), H = D(() => ({
|
|
289
|
+
selectedRowKeys: a.value,
|
|
290
|
+
selectedRows: w.getFilteredSelectedRowModel().flatRows.map((e) => e.original)
|
|
423
291
|
}));
|
|
424
|
-
|
|
292
|
+
le(
|
|
425
293
|
() => {
|
|
426
294
|
var e;
|
|
427
|
-
return (e =
|
|
295
|
+
return (e = r.rowSelection) == null ? void 0 : e.selectedRowKeys;
|
|
428
296
|
},
|
|
429
|
-
(e,
|
|
430
|
-
var
|
|
431
|
-
if ((
|
|
297
|
+
(e, l) => {
|
|
298
|
+
var s, h;
|
|
299
|
+
if ((h = (s = r.rowSelection) == null ? void 0 : s.selectedRowKeys) != null && h.length && !ve(e, l)) {
|
|
432
300
|
const n = Object.fromEntries(
|
|
433
|
-
t(
|
|
434
|
-
(
|
|
301
|
+
t(r.rowSelection.selectedRowKeys ?? Object.keys(o.value)).map(
|
|
302
|
+
(b) => [b, !0]
|
|
435
303
|
)
|
|
436
304
|
);
|
|
437
|
-
|
|
305
|
+
ve(n, o.value) || (o.value = n);
|
|
438
306
|
}
|
|
439
307
|
},
|
|
440
308
|
{ immediate: !0 }
|
|
441
309
|
);
|
|
442
|
-
const
|
|
443
|
-
|
|
444
|
-
var
|
|
445
|
-
|
|
310
|
+
const J = D(() => w.getIsAllRowsSelected() ? !0 : w.getIsSomeRowsSelected() ? "indeterminate" : !1), Q = (e) => {
|
|
311
|
+
w.getIsSomeRowsSelected() || w.getIsAllRowsSelected() ? w.toggleAllRowsSelected(!1) : w.toggleAllRowsSelected(!0), ee(() => {
|
|
312
|
+
var l, s;
|
|
313
|
+
W((l = r.rowSelection) == null ? void 0 : l.onSelectAll) && r.rowSelection.onSelectAll({ ...H.value, selected: e }), W((s = r.rowSelection) == null ? void 0 : s.onChange) && r.rowSelection.onChange(H.value);
|
|
446
314
|
});
|
|
447
|
-
},
|
|
448
|
-
var
|
|
449
|
-
|
|
450
|
-
selectChildren: !((
|
|
451
|
-
}),
|
|
452
|
-
var
|
|
453
|
-
|
|
454
|
-
...
|
|
315
|
+
}, Se = (e, l) => {
|
|
316
|
+
var s;
|
|
317
|
+
l.toggleSelected(e, {
|
|
318
|
+
selectChildren: !((s = r.rowSelection) != null && s.checkStrictly)
|
|
319
|
+
}), ee(() => {
|
|
320
|
+
var h, n;
|
|
321
|
+
W((h = r.rowSelection) == null ? void 0 : h.onSelect) && r.rowSelection.onSelect({
|
|
322
|
+
...H.value,
|
|
455
323
|
selected: e,
|
|
456
|
-
record:
|
|
457
|
-
}),
|
|
324
|
+
record: l.original
|
|
325
|
+
}), W((n = r.rowSelection) == null ? void 0 : n.onChange) && r.rowSelection.onChange(H.value);
|
|
458
326
|
});
|
|
459
|
-
},
|
|
460
|
-
var
|
|
461
|
-
return
|
|
462
|
-
},
|
|
463
|
-
var
|
|
327
|
+
}, Ce = (e) => {
|
|
328
|
+
var l, s;
|
|
329
|
+
return W((l = r.rowSelection) == null ? void 0 : l.getCheckboxProps) && ((s = r.rowSelection) == null || s.getCheckboxProps(e)), {};
|
|
330
|
+
}, ie = (e) => {
|
|
331
|
+
var l;
|
|
464
332
|
if (e.getIsSelected()) return !0;
|
|
465
|
-
if ((
|
|
333
|
+
if ((l = e.subRows) != null && l.length) {
|
|
466
334
|
if (e.getIsAllSubRowsSelected()) return !0;
|
|
467
335
|
if (e.getIsSomeSelected()) return "indeterminate";
|
|
468
336
|
}
|
|
469
337
|
return !1;
|
|
470
|
-
},
|
|
471
|
-
|
|
338
|
+
}, ae = Ee("target"), { stop: ke } = ao(ae, ([e]) => {
|
|
339
|
+
r.lazyLoading && !r.loading && (e != null && e.isIntersecting) && x("fetch");
|
|
472
340
|
});
|
|
473
|
-
|
|
474
|
-
const { getSkeletonProps:
|
|
475
|
-
selectionId:
|
|
476
|
-
isColumnWrapped:
|
|
477
|
-
}),
|
|
341
|
+
He(ke);
|
|
342
|
+
const { getSkeletonProps: Re, getThProps: $e, RenderCell: ce, getTdProps: X, getColProps: ze, isThVisible: Be } = wo(r, {
|
|
343
|
+
selectionId: i,
|
|
344
|
+
isColumnWrapped: U
|
|
345
|
+
}), ue = D(() => Object.keys(o.value).length), Ae = () => {
|
|
478
346
|
o.value = {};
|
|
479
|
-
},
|
|
347
|
+
}, Ie = fo(u, {
|
|
480
348
|
variants: {
|
|
481
|
-
empty:
|
|
349
|
+
empty: ro("empty", u)
|
|
482
350
|
}
|
|
483
|
-
}),
|
|
484
|
-
e.key === "a-z" &&
|
|
485
|
-
},
|
|
486
|
-
const
|
|
487
|
-
if (!
|
|
488
|
-
if (
|
|
489
|
-
if (
|
|
490
|
-
},
|
|
491
|
-
() =>
|
|
351
|
+
}), me = Le(0), Pe = ({ item: e }, l) => {
|
|
352
|
+
e.key === "a-z" && l.toggleSorting(!1, !1), e.key === "z-a" && l.toggleSorting(!0, !1), e.key === "wrap" && se({ id: l.id }), me.value++;
|
|
353
|
+
}, Te = (e) => {
|
|
354
|
+
const l = e.getIsSorted();
|
|
355
|
+
if (!l) return "tabler:arrows-up-down";
|
|
356
|
+
if (l === "desc") return "tabler:arrow-down";
|
|
357
|
+
if (l === "asc") return "tabler:arrow-up";
|
|
358
|
+
}, de = D(
|
|
359
|
+
() => w.getHeaderGroups().map((e) => ({
|
|
492
360
|
...e,
|
|
493
|
-
headers: e.headers.map((
|
|
494
|
-
...
|
|
495
|
-
bindings:
|
|
361
|
+
headers: e.headers.map((l) => ({
|
|
362
|
+
...l,
|
|
363
|
+
bindings: $e(l.getContext())
|
|
496
364
|
}))
|
|
497
365
|
}))
|
|
498
366
|
);
|
|
499
|
-
return (e,
|
|
500
|
-
class:
|
|
367
|
+
return (e, l) => (c(), v("div", {
|
|
368
|
+
class: g([t(_)(t(u), "root"), e.rootCls])
|
|
501
369
|
}, [
|
|
502
|
-
|
|
370
|
+
f(ye, {
|
|
503
371
|
"z-index": "1",
|
|
504
|
-
open: !!(
|
|
372
|
+
open: !!(ue.value && S.batchActions),
|
|
505
373
|
placement: "bottom",
|
|
506
374
|
"side-offset": -54,
|
|
507
375
|
"container-cls": "pantograph-tokens pantograph-dark"
|
|
508
376
|
}, {
|
|
509
|
-
content:
|
|
510
|
-
|
|
511
|
-
class:
|
|
377
|
+
content: m(() => [
|
|
378
|
+
R("div", {
|
|
379
|
+
class: g(t(_)(t(u), "batch_actions"))
|
|
512
380
|
}, [
|
|
513
|
-
|
|
514
|
-
text:
|
|
381
|
+
f(uo, {
|
|
382
|
+
text: ue.value,
|
|
515
383
|
size: "xsm"
|
|
516
384
|
}, null, 8, ["text"]),
|
|
517
|
-
|
|
518
|
-
class:
|
|
519
|
-
},
|
|
520
|
-
|
|
521
|
-
class:
|
|
385
|
+
R("div", {
|
|
386
|
+
class: g(t(_)(t(u), "batch_actions__title"))
|
|
387
|
+
}, Me(e.batchActionsTitle), 3),
|
|
388
|
+
R("div", {
|
|
389
|
+
class: g(t(_)(t(u), "batch_actions__actions"))
|
|
522
390
|
}, [
|
|
523
|
-
|
|
391
|
+
T(e.$slots, "batchActions", Ne(Oe(H.value)))
|
|
524
392
|
], 2),
|
|
525
|
-
|
|
393
|
+
f(he, {
|
|
526
394
|
type: "vertical",
|
|
527
|
-
class:
|
|
395
|
+
class: g(t(_)(t(u), "batch_actions__divider"))
|
|
528
396
|
}, null, 8, ["class"]),
|
|
529
|
-
|
|
397
|
+
f(we, {
|
|
530
398
|
icon: "tabler:x",
|
|
531
399
|
color: "gray",
|
|
532
400
|
type: "ghost",
|
|
533
|
-
onClick:
|
|
401
|
+
onClick: Ae
|
|
534
402
|
})
|
|
535
403
|
], 2)
|
|
536
404
|
]),
|
|
537
|
-
default:
|
|
538
|
-
|
|
539
|
-
class:
|
|
405
|
+
default: m(() => [
|
|
406
|
+
R("div", {
|
|
407
|
+
class: g([t(_)(t(u), "scroll_area"), e.scrollAreaCls])
|
|
540
408
|
}, [
|
|
541
|
-
|
|
542
|
-
class:
|
|
409
|
+
R("div", {
|
|
410
|
+
class: g([t(_)(t(u), "scroll_viewport"), e.scrollViewportCls])
|
|
543
411
|
}, [
|
|
544
|
-
|
|
412
|
+
f(t(po), {
|
|
545
413
|
size: e.size,
|
|
546
|
-
style:
|
|
414
|
+
style: Ve({
|
|
547
415
|
tableLayout: e.tableLayout
|
|
548
416
|
}),
|
|
549
|
-
class:
|
|
550
|
-
t(
|
|
551
|
-
empty: !t(
|
|
417
|
+
class: g([
|
|
418
|
+
t(Ie)({
|
|
419
|
+
empty: !t(w).getRowModel().rows.length
|
|
552
420
|
}),
|
|
553
|
-
|
|
421
|
+
r.class
|
|
554
422
|
])
|
|
555
423
|
}, {
|
|
556
|
-
default:
|
|
557
|
-
|
|
558
|
-
(
|
|
559
|
-
key:
|
|
424
|
+
default: m(() => [
|
|
425
|
+
R("colgroup", null, [
|
|
426
|
+
(c(!0), v($, null, M(t(w).getVisibleLeafColumns(), (s, h) => (c(), v("col", z({
|
|
427
|
+
key: s.id,
|
|
560
428
|
ref_for: !0
|
|
561
|
-
}, t(
|
|
429
|
+
}, t(ze)(s)), null, 16))), 128))
|
|
562
430
|
]),
|
|
563
|
-
e.noHeader ?
|
|
431
|
+
e.noHeader ? P("", !0) : (c(), I(t(go), {
|
|
564
432
|
key: 0,
|
|
565
|
-
class:
|
|
433
|
+
class: g(e.theadCls),
|
|
566
434
|
sticky: e.stickyHeader
|
|
567
435
|
}, {
|
|
568
|
-
default:
|
|
569
|
-
(
|
|
570
|
-
key:
|
|
436
|
+
default: m(() => [
|
|
437
|
+
(c(!0), v($, null, M(de.value, (s, h) => (c(), I(t(F), {
|
|
438
|
+
key: s.id
|
|
571
439
|
}, {
|
|
572
|
-
default:
|
|
573
|
-
(
|
|
440
|
+
default: m(() => [
|
|
441
|
+
(c(!0), v($, null, M(s.headers, (n) => (c(), v($, {
|
|
574
442
|
key: n.id
|
|
575
443
|
}, [
|
|
576
|
-
t(
|
|
444
|
+
t(Be)(h, de.value.length, n.column.id) ? (c(), I(t(yo), z({
|
|
577
445
|
key: 0,
|
|
578
446
|
ref_for: !0
|
|
579
447
|
}, n.bindings, {
|
|
580
|
-
"data-selection": n.column.id ===
|
|
448
|
+
"data-selection": n.column.id === i
|
|
581
449
|
}), {
|
|
582
|
-
default:
|
|
583
|
-
|
|
584
|
-
class:
|
|
450
|
+
default: m(() => [
|
|
451
|
+
R("div", {
|
|
452
|
+
class: g(t(_)(t(u), "header"))
|
|
585
453
|
}, [
|
|
586
|
-
|
|
587
|
-
class:
|
|
454
|
+
R("div", {
|
|
455
|
+
class: g(t(_)(t(u), "header__content"))
|
|
588
456
|
}, [
|
|
589
|
-
n.column.id !==
|
|
590
|
-
|
|
591
|
-
class:
|
|
457
|
+
n.column.id !== i ? (c(), v($, { key: 0 }, [
|
|
458
|
+
R("div", {
|
|
459
|
+
class: g(t(_)(t(u), "header__content__title"))
|
|
592
460
|
}, [
|
|
593
|
-
|
|
461
|
+
T(e.$slots, "headerCell", z({ ref_for: !0 }, {
|
|
594
462
|
column: n.column.columnDef
|
|
595
463
|
}), () => [
|
|
596
|
-
|
|
464
|
+
f(t(ce), {
|
|
597
465
|
props: n.getContext(),
|
|
598
466
|
render: n.column.columnDef.header
|
|
599
467
|
}, null, 8, ["props", "render"])
|
|
600
468
|
])
|
|
601
469
|
], 2),
|
|
602
|
-
n.column.getCanSort() ? (
|
|
470
|
+
n.column.getCanSort() ? (c(), I(Ye, {
|
|
603
471
|
key: 0,
|
|
604
|
-
class:
|
|
605
|
-
icon:
|
|
472
|
+
class: g({ hide_filter_action: !n.column.getIsSorted() }),
|
|
473
|
+
icon: Te(n.column),
|
|
606
474
|
size: "sm",
|
|
607
475
|
type: "ghost",
|
|
608
476
|
variant: "icon",
|
|
609
477
|
active: !!n.column.getIsSorted(),
|
|
610
|
-
onClick: (
|
|
611
|
-
var
|
|
612
|
-
return (
|
|
478
|
+
onClick: (b) => {
|
|
479
|
+
var L;
|
|
480
|
+
return (L = n.column.getToggleSortingHandler()) == null ? void 0 : L(b);
|
|
613
481
|
}
|
|
614
|
-
}, null, 8, ["class", "icon", "active", "onClick"])) :
|
|
615
|
-
], 64)) : (
|
|
616
|
-
|
|
617
|
-
class:
|
|
482
|
+
}, null, 8, ["class", "icon", "active", "onClick"])) : P("", !0)
|
|
483
|
+
], 64)) : (c(), v($, { key: 1 }, [
|
|
484
|
+
R("div", {
|
|
485
|
+
class: g(t(_)(t(u), "selection_space"))
|
|
618
486
|
}, null, 2),
|
|
619
|
-
|
|
487
|
+
f(pe, {
|
|
620
488
|
rootCls: "w-fit",
|
|
621
|
-
checked:
|
|
622
|
-
onChange:
|
|
489
|
+
checked: J.value,
|
|
490
|
+
onChange: Q
|
|
623
491
|
}, null, 8, ["checked"])
|
|
624
492
|
], 64))
|
|
625
493
|
], 2),
|
|
626
|
-
![
|
|
494
|
+
![p.value, i].includes(n.column.id) && !n.column.columns.length ? (c(), v("div", {
|
|
627
495
|
key: 0,
|
|
628
|
-
class:
|
|
496
|
+
class: g(t(_)(t(u), "header__action"))
|
|
629
497
|
}, [
|
|
630
|
-
(
|
|
498
|
+
(c(), I(ye, {
|
|
631
499
|
"z-index": "1",
|
|
632
500
|
placement: "bottom-end",
|
|
633
|
-
key:
|
|
501
|
+
key: me.value
|
|
634
502
|
}, {
|
|
635
|
-
content:
|
|
636
|
-
|
|
637
|
-
onSelect: (
|
|
503
|
+
content: m(() => [
|
|
504
|
+
f(Xe, {
|
|
505
|
+
onSelect: (b) => Pe(b, n.column)
|
|
638
506
|
}, {
|
|
639
|
-
default:
|
|
640
|
-
n.column.getCanSort() ? (
|
|
641
|
-
|
|
507
|
+
default: m(() => [
|
|
508
|
+
n.column.getCanSort() ? (c(), v($, { key: 0 }, [
|
|
509
|
+
f(te, {
|
|
642
510
|
title: "Sort A → Z",
|
|
643
511
|
key: "a-z"
|
|
644
512
|
}, {
|
|
645
|
-
leading:
|
|
646
|
-
|
|
513
|
+
leading: m(({ iconSize: b }) => [
|
|
514
|
+
f(re, {
|
|
647
515
|
icon: "tabler:arrow-up",
|
|
648
|
-
size:
|
|
516
|
+
size: b
|
|
649
517
|
}, null, 8, ["size"])
|
|
650
518
|
]),
|
|
651
519
|
_: 1
|
|
652
520
|
}),
|
|
653
|
-
|
|
521
|
+
f(te, {
|
|
654
522
|
title: "Sort Z → A",
|
|
655
523
|
key: "z-a"
|
|
656
524
|
}, {
|
|
657
|
-
leading:
|
|
658
|
-
|
|
525
|
+
leading: m(({ iconSize: b }) => [
|
|
526
|
+
f(re, {
|
|
659
527
|
icon: "tabler:arrow-down",
|
|
660
|
-
size:
|
|
528
|
+
size: b
|
|
661
529
|
}, null, 8, ["size"])
|
|
662
530
|
]),
|
|
663
531
|
_: 1
|
|
664
532
|
}),
|
|
665
|
-
|
|
666
|
-
], 64)) :
|
|
667
|
-
|
|
533
|
+
f(he)
|
|
534
|
+
], 64)) : P("", !0),
|
|
535
|
+
f(te, {
|
|
668
536
|
title: "Wrap Column",
|
|
669
537
|
key: "wrap"
|
|
670
538
|
}, {
|
|
671
|
-
leading:
|
|
672
|
-
|
|
539
|
+
leading: m(({ iconSize: b }) => [
|
|
540
|
+
f(re, {
|
|
673
541
|
icon: "tabler:text-wrap",
|
|
674
|
-
size:
|
|
542
|
+
size: b
|
|
675
543
|
}, null, 8, ["size"])
|
|
676
544
|
]),
|
|
677
|
-
trailing:
|
|
678
|
-
|
|
679
|
-
checked: t(
|
|
545
|
+
trailing: m(() => [
|
|
546
|
+
f(mo, {
|
|
547
|
+
checked: t(U)(n.column.id)
|
|
680
548
|
}, null, 8, ["checked"])
|
|
681
549
|
]),
|
|
682
550
|
_: 2
|
|
@@ -685,22 +553,22 @@ const Tt = (B) => {
|
|
|
685
553
|
_: 2
|
|
686
554
|
}, 1032, ["onSelect"])
|
|
687
555
|
]),
|
|
688
|
-
default:
|
|
689
|
-
|
|
556
|
+
default: m(() => [
|
|
557
|
+
f(we, {
|
|
690
558
|
icon: "tabler:dots-vertical",
|
|
691
559
|
size: "sm",
|
|
692
560
|
color: "gray",
|
|
693
561
|
type: "ghost",
|
|
694
|
-
class:
|
|
562
|
+
class: g(t(_)(t(u), "header__action__hover"))
|
|
695
563
|
}, null, 8, ["class"])
|
|
696
564
|
]),
|
|
697
565
|
_: 2
|
|
698
566
|
}, 1024))
|
|
699
|
-
], 2)) :
|
|
567
|
+
], 2)) : P("", !0)
|
|
700
568
|
], 2)
|
|
701
569
|
]),
|
|
702
570
|
_: 2
|
|
703
|
-
}, 1040, ["data-selection"])) :
|
|
571
|
+
}, 1040, ["data-selection"])) : P("", !0)
|
|
704
572
|
], 64))), 128))
|
|
705
573
|
]),
|
|
706
574
|
_: 2
|
|
@@ -708,158 +576,158 @@ const Tt = (B) => {
|
|
|
708
576
|
]),
|
|
709
577
|
_: 3
|
|
710
578
|
}, 8, ["class", "sticky"])),
|
|
711
|
-
|
|
712
|
-
class:
|
|
579
|
+
f(t(ho), {
|
|
580
|
+
class: g(e.tbodyCls)
|
|
713
581
|
}, {
|
|
714
|
-
default:
|
|
715
|
-
(
|
|
716
|
-
key:
|
|
582
|
+
default: m(() => [
|
|
583
|
+
(c(!0), v($, null, M(t(w).getRowModel().rows, (s, h) => (c(), I(t(F), {
|
|
584
|
+
key: s.id,
|
|
717
585
|
zebra: e.zebra,
|
|
718
|
-
checked: !!
|
|
586
|
+
checked: !!ie(s)
|
|
719
587
|
}, {
|
|
720
|
-
default:
|
|
721
|
-
(
|
|
722
|
-
var
|
|
723
|
-
return
|
|
588
|
+
default: m(() => [
|
|
589
|
+
(c(!0), v($, null, M(s.getVisibleCells(), (n) => {
|
|
590
|
+
var b, L;
|
|
591
|
+
return c(), v($, {
|
|
724
592
|
key: n.id
|
|
725
593
|
}, [
|
|
726
|
-
((
|
|
594
|
+
((b = t(X)(n.getContext())) == null ? void 0 : b.colSpan) !== 0 && ((L = t(X)(n.getContext())) == null ? void 0 : L.rowSpan) !== 0 ? (c(), I(t(G), z({
|
|
727
595
|
key: 0,
|
|
728
596
|
ref_for: !0
|
|
729
|
-
}, t(
|
|
730
|
-
default:
|
|
731
|
-
n.column.id ===
|
|
597
|
+
}, t(X)(n.getContext())), fe({
|
|
598
|
+
default: m(() => [
|
|
599
|
+
n.column.id === p.value && (S.hoverAction || S.action) ? (c(), v("div", {
|
|
732
600
|
key: 0,
|
|
733
|
-
class:
|
|
601
|
+
class: g(t(_)(t(u), "action_cell"))
|
|
734
602
|
}, [
|
|
735
|
-
|
|
736
|
-
class:
|
|
603
|
+
R("div", {
|
|
604
|
+
class: g([t(_)(t(u), "action_cell__hover"), e.actionHoverCls])
|
|
737
605
|
}, [
|
|
738
|
-
|
|
606
|
+
T(e.$slots, "hoverAction", z(
|
|
739
607
|
{ ref_for: !0 },
|
|
740
608
|
{
|
|
741
609
|
column: n.column.columnDef,
|
|
742
|
-
record:
|
|
743
|
-
index:
|
|
610
|
+
record: s.original,
|
|
611
|
+
index: h
|
|
744
612
|
}
|
|
745
613
|
))
|
|
746
614
|
], 2),
|
|
747
|
-
|
|
615
|
+
T(e.$slots, "action", z(
|
|
748
616
|
{ ref_for: !0 },
|
|
749
617
|
{
|
|
750
618
|
column: n.column.columnDef,
|
|
751
|
-
record:
|
|
752
|
-
index:
|
|
619
|
+
record: s.original,
|
|
620
|
+
index: h
|
|
753
621
|
}
|
|
754
622
|
))
|
|
755
|
-
], 2)) : n.column.id !==
|
|
623
|
+
], 2)) : n.column.id !== i ? T(e.$slots, "bodyCell", z(
|
|
756
624
|
{
|
|
757
625
|
key: 1,
|
|
758
626
|
ref_for: !0
|
|
759
627
|
},
|
|
760
628
|
{
|
|
761
629
|
column: n.column.columnDef,
|
|
762
|
-
record:
|
|
763
|
-
index:
|
|
630
|
+
record: s.original,
|
|
631
|
+
index: h
|
|
764
632
|
}
|
|
765
633
|
), () => [
|
|
766
|
-
|
|
634
|
+
f(t(ce), {
|
|
767
635
|
render: n.column.columnDef.cell,
|
|
768
636
|
props: n.getContext()
|
|
769
637
|
}, null, 8, ["render", "props"])
|
|
770
|
-
]) : e.rowKey &&
|
|
638
|
+
]) : e.rowKey && s.original[e.rowKey] ? (c(), v("div", {
|
|
771
639
|
key: 2,
|
|
772
|
-
class:
|
|
640
|
+
class: g(t(_)(t(u), "selection"))
|
|
773
641
|
}, [
|
|
774
|
-
|
|
775
|
-
class:
|
|
642
|
+
R("div", {
|
|
643
|
+
class: g(t(_)(t(u), "selection_space"))
|
|
776
644
|
}, null, 2),
|
|
777
|
-
|
|
645
|
+
f(pe, z({
|
|
778
646
|
rootCls: "w-fit",
|
|
779
|
-
disabled: !
|
|
780
|
-
checked:
|
|
781
|
-
onChange: (
|
|
647
|
+
disabled: !s.getCanSelect(),
|
|
648
|
+
checked: ie(s),
|
|
649
|
+
onChange: (Y) => Se(Y, s),
|
|
782
650
|
ref_for: !0
|
|
783
|
-
},
|
|
784
|
-
], 2)) :
|
|
651
|
+
}, Ce(s.original)), null, 16, ["disabled", "checked", "onChange"])
|
|
652
|
+
], 2)) : P("", !0)
|
|
785
653
|
]),
|
|
786
654
|
_: 2
|
|
787
655
|
}, [
|
|
788
|
-
|
|
656
|
+
S.cellAction && ![p.value, i].includes(n.column.id) ? {
|
|
789
657
|
name: "absoluteAction",
|
|
790
|
-
fn:
|
|
791
|
-
|
|
658
|
+
fn: m(() => [
|
|
659
|
+
T(e.$slots, "cellAction", z(
|
|
792
660
|
{ ref_for: !0 },
|
|
793
661
|
{
|
|
794
662
|
column: n.column.columnDef,
|
|
795
|
-
record:
|
|
796
|
-
index:
|
|
663
|
+
record: s.original,
|
|
664
|
+
index: h
|
|
797
665
|
}
|
|
798
666
|
))
|
|
799
667
|
]),
|
|
800
668
|
key: "0"
|
|
801
669
|
} : void 0
|
|
802
|
-
]), 1040)) :
|
|
670
|
+
]), 1040)) : P("", !0)
|
|
803
671
|
], 64);
|
|
804
672
|
}), 128))
|
|
805
673
|
]),
|
|
806
674
|
_: 2
|
|
807
675
|
}, 1032, ["zebra", "checked"]))), 128)),
|
|
808
|
-
|
|
809
|
-
key:
|
|
676
|
+
r.loading ? (c(!0), v($, { key: 0 }, M(t(w).getRowModel().rows.length ? 2 : e.loadingRowCount, (s) => (c(), I(t(F), {
|
|
677
|
+
key: s,
|
|
810
678
|
zebra: e.zebra
|
|
811
679
|
}, {
|
|
812
|
-
default:
|
|
813
|
-
(
|
|
814
|
-
default:
|
|
815
|
-
|
|
680
|
+
default: m(() => [
|
|
681
|
+
(c(!0), v($, null, M(t(w).getVisibleLeafColumns(), (h, n) => (c(), I(t(G), { key: n }, {
|
|
682
|
+
default: m(() => [
|
|
683
|
+
h.id !== i ? T(e.$slots, "skeleton", z({
|
|
816
684
|
key: 0,
|
|
817
685
|
ref_for: !0
|
|
818
|
-
}, { index: n, column:
|
|
819
|
-
|
|
820
|
-
]) :
|
|
686
|
+
}, { index: n, column: h.columnDef }), () => [
|
|
687
|
+
f(co, z({ ref_for: !0 }, t(Re)(h.columnDef)), null, 16)
|
|
688
|
+
]) : P("", !0)
|
|
821
689
|
]),
|
|
822
690
|
_: 2
|
|
823
691
|
}, 1024))), 128))
|
|
824
692
|
]),
|
|
825
693
|
_: 2
|
|
826
|
-
}, 1032, ["zebra"]))), 128)) :
|
|
827
|
-
t(
|
|
694
|
+
}, 1032, ["zebra"]))), 128)) : P("", !0),
|
|
695
|
+
t(w).getRowModel().rows.length ? P("", !0) : (c(), I(t(F), {
|
|
828
696
|
key: 1,
|
|
829
697
|
empty: ""
|
|
830
698
|
}, {
|
|
831
|
-
default:
|
|
832
|
-
|
|
833
|
-
colspan: t(
|
|
699
|
+
default: m(() => [
|
|
700
|
+
f(t(G), {
|
|
701
|
+
colspan: t(w).getVisibleLeafColumns().length,
|
|
834
702
|
empty: ""
|
|
835
703
|
}, {
|
|
836
|
-
default:
|
|
837
|
-
|
|
838
|
-
|
|
704
|
+
default: m(() => [
|
|
705
|
+
f(eo, z({ type: "advance" }, e.emptyProps), fe({ _: 2 }, [
|
|
706
|
+
S.emptyTitle ? {
|
|
839
707
|
name: "title",
|
|
840
|
-
fn:
|
|
841
|
-
|
|
708
|
+
fn: m(() => [
|
|
709
|
+
T(e.$slots, "emptyTitle")
|
|
842
710
|
]),
|
|
843
711
|
key: "0"
|
|
844
712
|
} : void 0,
|
|
845
|
-
|
|
713
|
+
S.emptyDescription ? {
|
|
846
714
|
name: "title",
|
|
847
|
-
fn:
|
|
848
|
-
|
|
715
|
+
fn: m(() => [
|
|
716
|
+
T(e.$slots, "emptyDescription")
|
|
849
717
|
]),
|
|
850
718
|
key: "1"
|
|
851
719
|
} : void 0,
|
|
852
|
-
|
|
720
|
+
S.emptyActions ? {
|
|
853
721
|
name: "title",
|
|
854
|
-
fn:
|
|
855
|
-
|
|
722
|
+
fn: m(() => [
|
|
723
|
+
T(e.$slots, "emptyActions")
|
|
856
724
|
]),
|
|
857
725
|
key: "2"
|
|
858
726
|
} : void 0,
|
|
859
|
-
|
|
727
|
+
S.emptyImage ? {
|
|
860
728
|
name: "title",
|
|
861
|
-
fn:
|
|
862
|
-
|
|
729
|
+
fn: m(() => [
|
|
730
|
+
T(e.$slots, "emptyImage")
|
|
863
731
|
]),
|
|
864
732
|
key: "3"
|
|
865
733
|
} : void 0
|
|
@@ -870,19 +738,19 @@ const Tt = (B) => {
|
|
|
870
738
|
]),
|
|
871
739
|
_: 3
|
|
872
740
|
})),
|
|
873
|
-
e.lazyLoading ? (
|
|
741
|
+
e.lazyLoading ? (c(), I(t(F), {
|
|
874
742
|
key: 2,
|
|
875
743
|
"lazy-load-observer": ""
|
|
876
744
|
}, {
|
|
877
|
-
default:
|
|
878
|
-
|
|
745
|
+
default: m(() => [
|
|
746
|
+
f(t(G), {
|
|
879
747
|
ref_key: "target",
|
|
880
|
-
ref:
|
|
748
|
+
ref: ae,
|
|
881
749
|
"lazy-load-observer": ""
|
|
882
750
|
}, null, 512)
|
|
883
751
|
]),
|
|
884
752
|
_: 1
|
|
885
|
-
})) :
|
|
753
|
+
})) : P("", !0)
|
|
886
754
|
]),
|
|
887
755
|
_: 3
|
|
888
756
|
}, 8, ["class"])
|
|
@@ -898,6 +766,6 @@ const Tt = (B) => {
|
|
|
898
766
|
}
|
|
899
767
|
});
|
|
900
768
|
export {
|
|
901
|
-
|
|
902
|
-
|
|
769
|
+
Fo as DataTable,
|
|
770
|
+
Fo as default
|
|
903
771
|
};
|