@soft-stech/bootsman-ui-shadcn 1.4.36 → 1.4.37
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/BuiTableHead.vue_vue_type_script_setup_true_lang-JNDLoSoG.js +37 -0
- package/dist/BuiTableHeader.vue_vue_type_script_setup_true_lang-18MBtNeo.js +30 -0
- package/dist/components/ui/table/BuiDataTable.vue.d.ts +7 -6
- package/dist/components/ui/table/BuiTableHead.js +1 -1
- package/dist/components/ui/table/BuiTableHeader.js +1 -1
- package/dist/components/ui/table/BuiTableHeader.vue.d.ts +6 -2
- package/dist/components/ui/table/index.js +810 -278
- package/dist/index.js +2 -2
- package/dist/lib/useResizeColumns.d.ts +127 -0
- package/dist/lib/useResizeColumns.js +89 -0
- package/package.json +3 -1
- package/src/components/stories/BuiDataTable.story.vue +4 -4
- package/src/components/ui/table/BuiDataTable.vue +56 -20
- package/src/components/ui/table/BuiTableHead.vue +6 -2
- package/src/components/ui/table/BuiTableHeader.vue +6 -0
- package/src/lib/useResizeColumns.ts +202 -0
- package/dist/BuiTableHead.vue_vue_type_script_setup_true_lang-Bz1T89Vm.js +0 -32
- package/dist/BuiTableHeader.vue_vue_type_script_setup_true_lang-H9TKoH8p.js +0 -26
@@ -1,68 +1,69 @@
|
|
1
|
-
import { _ as
|
2
|
-
import { _ as
|
3
|
-
import { _ as
|
4
|
-
import { _ as
|
5
|
-
import { _ as
|
6
|
-
import { _ as
|
7
|
-
import { defineComponent as
|
8
|
-
import { _ as
|
9
|
-
import { _ as
|
10
|
-
import { _ as
|
11
|
-
import { _ as
|
12
|
-
import { _ as
|
13
|
-
import { _ as
|
14
|
-
import { _ as
|
15
|
-
import { h as
|
16
|
-
import { FlexRender as
|
17
|
-
import { _ as
|
18
|
-
import { _ as
|
19
|
-
import { _ as
|
20
|
-
import { _ as
|
21
|
-
import { _ as
|
22
|
-
import { _ as
|
23
|
-
import { _ as
|
24
|
-
import { _ as
|
25
|
-
import { _ as
|
26
|
-
import { useElementSize as
|
27
|
-
import {
|
1
|
+
import { _ as bt } from "../../../BuiTable.vue_vue_type_script_setup_true_lang-Z45MrzQA.js";
|
2
|
+
import { _ as yt } from "../../../BuiTableBody.vue_vue_type_script_setup_true_lang-BGWE-WLM.js";
|
3
|
+
import { _ as me } from "../../../BuiTableCell.vue_vue_type_script_setup_true_lang-BMPBnL81.js";
|
4
|
+
import { _ as vt } from "../../../BuiTableHead.vue_vue_type_script_setup_true_lang-JNDLoSoG.js";
|
5
|
+
import { _ as _t } from "../../../BuiTableHeader.vue_vue_type_script_setup_true_lang-18MBtNeo.js";
|
6
|
+
import { _ as be } from "../../../BuiTableRow.vue_vue_type_script_setup_true_lang-f1ZCSbzt.js";
|
7
|
+
import { defineComponent as We, computed as D, openBlock as p, createElementBlock as T, Fragment as j, createBlock as P, unref as s, normalizeClass as qe, withCtx as d, renderSlot as R, renderList as Q, normalizeStyle as ye, createVNode as _, createCommentVNode as E, resolveDynamicComponent as ht, mergeModels as wt, useModel as K, watchEffect as $e, ref as oe, watch as St, onBeforeMount as Tt, onMounted as $t, createSlots as Ot, createElementVNode as A, createTextVNode as W, toDisplayString as J } from "vue";
|
8
|
+
import { _ as $o } from "../../../BuiTableCaption.vue_vue_type_script_setup_true_lang-C9PP4Fcx.js";
|
9
|
+
import { _ as Ct } from "../../../BuiTableEmpty.vue_vue_type_script_setup_true_lang-BxUialLd.js";
|
10
|
+
import { _ as Co } from "../../../BuiTableFooter.vue_vue_type_script_setup_true_lang-k053xTES.js";
|
11
|
+
import { _ as Pt } from "../../../BuiCollapsible.vue_vue_type_script_setup_true_lang-DjuQBjGZ.js";
|
12
|
+
import { _ as At } from "../../../BuiCollapsibleTrigger.vue_vue_type_script_setup_true_lang-l-nmwAwq.js";
|
13
|
+
import { _ as jt } from "../../../BuiCollapsibleContent.vue_vue_type_script_setup_true_lang-BiD89zzH.js";
|
14
|
+
import { _ as It } from "../../../variables-4ez0MWno.js";
|
15
|
+
import { h as Rt, v as Z, g as Et, _ as zt } from "../../../utils-C11OfLQK.js";
|
16
|
+
import { FlexRender as Xe, useVueTable as xt, getCoreRowModel as Mt, getPaginationRowModel as Bt, getSortedRowModel as Lt } from "@tanstack/vue-table";
|
17
|
+
import { _ as Dt } from "../../../BuiCommand.vue_vue_type_script_setup_true_lang-C8UkqTiX.js";
|
18
|
+
import { _ as Nt } from "../../../BuiCommandEmpty.vue_vue_type_script_setup_true_lang-CSwCtbz1.js";
|
19
|
+
import { _ as Ft } from "../../../BuiCommandInput.vue_vue_type_script_setup_true_lang-3c9TjWnY.js";
|
20
|
+
import { _ as Ht } from "../../../BuiCommandItem.vue_vue_type_script_setup_true_lang-BdkpK55i.js";
|
21
|
+
import { _ as Ut } from "../../../BuiCommandList.vue_vue_type_script_setup_true_lang-C77MBwCW.js";
|
22
|
+
import { _ as Gt } from "../../../BuiPopover.vue_vue_type_script_setup_true_lang-CGkz30K2.js";
|
23
|
+
import { _ as Vt } from "../../../BuiPopoverTrigger.vue_vue_type_script_setup_true_lang-Du2ZN56l.js";
|
24
|
+
import { _ as Kt } from "../../../BuiPopoverContent.vue_vue_type_script_setup_true_lang-CEFHTgEu.js";
|
25
|
+
import { _ as Wt } from "../../../BuiScrollArea.vue_vue_type_script_setup_true_lang-BNcd3g6x.js";
|
26
|
+
import { useElementSize as qt, useEventListener as Xt } from "@vueuse/core";
|
27
|
+
import { useResizeColumns as Yt } from "../../../lib/useResizeColumns.js";
|
28
|
+
import { _ as Jt } from "../../../BuiDataTableColumnList.vue_vue_type_script_setup_true_lang-Dof0WsTF.js";
|
28
29
|
/**
|
29
30
|
* @license lucide-vue-next v0.441.0 - ISC
|
30
31
|
*
|
31
32
|
* This source code is licensed under the ISC license.
|
32
33
|
* See the LICENSE file in the root directory of this source tree.
|
33
34
|
*/
|
34
|
-
const
|
35
|
+
const Zt = Rt("Settings2Icon", [
|
35
36
|
["path", { d: "M20 7h-9", key: "3s1dr2" }],
|
36
37
|
["path", { d: "M14 17H5", key: "gfn3mx" }],
|
37
38
|
["circle", { cx: "17", cy: "17", r: "3", key: "18b49y" }],
|
38
39
|
["circle", { cx: "7", cy: "7", r: "3", key: "dfmy0x" }]
|
39
|
-
]),
|
40
|
+
]), kt = "[!fake-empty!]", Oe = /* @__PURE__ */ We({
|
40
41
|
__name: "BuiTableRowSubrow",
|
41
42
|
props: {
|
42
43
|
row: {},
|
43
44
|
renderSubComponent: { type: Function },
|
44
45
|
columns: {}
|
45
46
|
},
|
46
|
-
setup(
|
47
|
-
const
|
48
|
-
return (
|
49
|
-
|
47
|
+
setup(e) {
|
48
|
+
const t = e, n = D(() => t.row.original.name?.includes(kt));
|
49
|
+
return (r, f) => (p(), T(j, null, [
|
50
|
+
n.value ? E("", !0) : (p(), P(s(be), {
|
50
51
|
key: 0,
|
51
|
-
"data-row-state":
|
52
|
-
class:
|
52
|
+
"data-row-state": r.row.getIsSelected() ? "selected" : void 0,
|
53
|
+
class: qe(t.renderSubComponent?.(r.row) ? "border-b-0" : "")
|
53
54
|
}, {
|
54
|
-
actions:
|
55
|
-
|
55
|
+
actions: d(() => [
|
56
|
+
R(r.$slots, "actions")
|
56
57
|
]),
|
57
|
-
default:
|
58
|
-
(
|
59
|
-
key:
|
60
|
-
style:
|
58
|
+
default: d(() => [
|
59
|
+
(p(!0), T(j, null, Q(r.row.getVisibleCells(), (o) => (p(), P(s(me), {
|
60
|
+
key: o.id,
|
61
|
+
style: ye({ ...s(st)(o.column) })
|
61
62
|
}, {
|
62
|
-
default:
|
63
|
-
|
64
|
-
render:
|
65
|
-
props:
|
63
|
+
default: d(() => [
|
64
|
+
_(s(Xe), {
|
65
|
+
render: o.column.columnDef.cell,
|
66
|
+
props: o.getContext()
|
66
67
|
}, null, 8, ["render", "props"])
|
67
68
|
]),
|
68
69
|
_: 2
|
@@ -70,37 +71,554 @@ const Me = pe("Settings2Icon", [
|
|
70
71
|
]),
|
71
72
|
_: 3
|
72
73
|
}, 8, ["data-row-state", "class"])),
|
73
|
-
|
74
|
+
t.renderSubComponent?.(r.row) ? (p(), P(s(be), {
|
74
75
|
key: 1,
|
75
|
-
"data-row-state":
|
76
|
+
"data-row-state": r.row.getIsSelected() ? "selected" : void 0
|
76
77
|
}, {
|
77
|
-
actions:
|
78
|
-
|
78
|
+
actions: d(() => [
|
79
|
+
R(r.$slots, "actions")
|
79
80
|
]),
|
80
|
-
default:
|
81
|
-
|
82
|
-
colspan:
|
81
|
+
default: d(() => [
|
82
|
+
_(s(me), {
|
83
|
+
colspan: r.columns.length,
|
83
84
|
class: "pt-0"
|
84
85
|
}, {
|
85
|
-
default:
|
86
|
-
(
|
86
|
+
default: d(() => [
|
87
|
+
(p(), P(ht(t.renderSubComponent?.(r.row)?.())))
|
87
88
|
]),
|
88
89
|
_: 1
|
89
90
|
}, 8, ["colspan"])
|
90
91
|
]),
|
91
92
|
_: 3
|
92
|
-
}, 8, ["data-row-state"])) :
|
93
|
+
}, 8, ["data-row-state"])) : E("", !0)
|
93
94
|
], 64));
|
94
95
|
}
|
95
|
-
})
|
96
|
+
});
|
97
|
+
var Ye = typeof global == "object" && global && global.Object === Object && global, Qt = typeof self == "object" && self && self.Object === Object && self, M = Ye || Qt || Function("return this")(), q = M.Symbol, Je = Object.prototype, en = Je.hasOwnProperty, tn = Je.toString, k = q ? q.toStringTag : void 0;
|
98
|
+
function nn(e) {
|
99
|
+
var t = en.call(e, k), n = e[k];
|
100
|
+
try {
|
101
|
+
e[k] = void 0;
|
102
|
+
var r = !0;
|
103
|
+
} catch {
|
104
|
+
}
|
105
|
+
var f = tn.call(e);
|
106
|
+
return r && (t ? e[k] = n : delete e[k]), f;
|
107
|
+
}
|
108
|
+
var rn = Object.prototype, an = rn.toString;
|
109
|
+
function on(e) {
|
110
|
+
return an.call(e);
|
111
|
+
}
|
112
|
+
var sn = "[object Null]", ln = "[object Undefined]", Ce = q ? q.toStringTag : void 0;
|
113
|
+
function ae(e) {
|
114
|
+
return e == null ? e === void 0 ? ln : sn : Ce && Ce in Object(e) ? nn(e) : on(e);
|
115
|
+
}
|
116
|
+
function te(e) {
|
117
|
+
return e != null && typeof e == "object";
|
118
|
+
}
|
119
|
+
var se = Array.isArray;
|
120
|
+
function Ze(e) {
|
121
|
+
var t = typeof e;
|
122
|
+
return e != null && (t == "object" || t == "function");
|
123
|
+
}
|
124
|
+
var un = "[object AsyncFunction]", fn = "[object Function]", dn = "[object GeneratorFunction]", pn = "[object Proxy]";
|
125
|
+
function ke(e) {
|
126
|
+
if (!Ze(e))
|
127
|
+
return !1;
|
128
|
+
var t = ae(e);
|
129
|
+
return t == fn || t == dn || t == un || t == pn;
|
130
|
+
}
|
131
|
+
var pe = M["__core-js_shared__"], Pe = function() {
|
132
|
+
var e = /[^.]+$/.exec(pe && pe.keys && pe.keys.IE_PROTO || "");
|
133
|
+
return e ? "Symbol(src)_1." + e : "";
|
134
|
+
}();
|
135
|
+
function cn(e) {
|
136
|
+
return !!Pe && Pe in e;
|
137
|
+
}
|
138
|
+
var gn = Function.prototype, mn = gn.toString;
|
139
|
+
function U(e) {
|
140
|
+
if (e != null) {
|
141
|
+
try {
|
142
|
+
return mn.call(e);
|
143
|
+
} catch {
|
144
|
+
}
|
145
|
+
try {
|
146
|
+
return e + "";
|
147
|
+
} catch {
|
148
|
+
}
|
149
|
+
}
|
150
|
+
return "";
|
151
|
+
}
|
152
|
+
var bn = /[\\^$.*+?()[\]{}|]/g, yn = /^\[object .+?Constructor\]$/, vn = Function.prototype, _n = Object.prototype, hn = vn.toString, wn = _n.hasOwnProperty, Sn = RegExp(
|
153
|
+
"^" + hn.call(wn).replace(bn, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
154
|
+
);
|
155
|
+
function Tn(e) {
|
156
|
+
if (!Ze(e) || cn(e))
|
157
|
+
return !1;
|
158
|
+
var t = ke(e) ? Sn : yn;
|
159
|
+
return t.test(U(e));
|
160
|
+
}
|
161
|
+
function $n(e, t) {
|
162
|
+
return e?.[t];
|
163
|
+
}
|
164
|
+
function X(e, t) {
|
165
|
+
var n = $n(e, t);
|
166
|
+
return Tn(n) ? n : void 0;
|
167
|
+
}
|
168
|
+
var ve = X(M, "WeakMap"), On = 9007199254740991, Cn = /^(?:0|[1-9]\d*)$/;
|
169
|
+
function Pn(e, t) {
|
170
|
+
var n = typeof e;
|
171
|
+
return t = t ?? On, !!t && (n == "number" || n != "symbol" && Cn.test(e)) && e > -1 && e % 1 == 0 && e < t;
|
172
|
+
}
|
173
|
+
function Qe(e, t) {
|
174
|
+
return e === t || e !== e && t !== t;
|
175
|
+
}
|
176
|
+
var An = 9007199254740991;
|
177
|
+
function et(e) {
|
178
|
+
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= An;
|
179
|
+
}
|
180
|
+
function jn(e) {
|
181
|
+
return e != null && et(e.length) && !ke(e);
|
182
|
+
}
|
183
|
+
var In = Object.prototype;
|
184
|
+
function Rn(e) {
|
185
|
+
var t = e && e.constructor, n = typeof t == "function" && t.prototype || In;
|
186
|
+
return e === n;
|
187
|
+
}
|
188
|
+
function En(e, t) {
|
189
|
+
for (var n = -1, r = Array(e); ++n < e; )
|
190
|
+
r[n] = t(n);
|
191
|
+
return r;
|
192
|
+
}
|
193
|
+
var zn = "[object Arguments]";
|
194
|
+
function Ae(e) {
|
195
|
+
return te(e) && ae(e) == zn;
|
196
|
+
}
|
197
|
+
var tt = Object.prototype, xn = tt.hasOwnProperty, Mn = tt.propertyIsEnumerable, Bn = Ae(/* @__PURE__ */ function() {
|
198
|
+
return arguments;
|
199
|
+
}()) ? Ae : function(e) {
|
200
|
+
return te(e) && xn.call(e, "callee") && !Mn.call(e, "callee");
|
201
|
+
};
|
202
|
+
function Ln() {
|
203
|
+
return !1;
|
204
|
+
}
|
205
|
+
var nt = typeof exports == "object" && exports && !exports.nodeType && exports, je = nt && typeof module == "object" && module && !module.nodeType && module, Dn = je && je.exports === nt, Ie = Dn ? M.Buffer : void 0, Nn = Ie ? Ie.isBuffer : void 0, _e = Nn || Ln, Fn = "[object Arguments]", Hn = "[object Array]", Un = "[object Boolean]", Gn = "[object Date]", Vn = "[object Error]", Kn = "[object Function]", Wn = "[object Map]", qn = "[object Number]", Xn = "[object Object]", Yn = "[object RegExp]", Jn = "[object Set]", Zn = "[object String]", kn = "[object WeakMap]", Qn = "[object ArrayBuffer]", er = "[object DataView]", tr = "[object Float32Array]", nr = "[object Float64Array]", rr = "[object Int8Array]", ar = "[object Int16Array]", or = "[object Int32Array]", ir = "[object Uint8Array]", sr = "[object Uint8ClampedArray]", lr = "[object Uint16Array]", ur = "[object Uint32Array]", m = {};
|
206
|
+
m[tr] = m[nr] = m[rr] = m[ar] = m[or] = m[ir] = m[sr] = m[lr] = m[ur] = !0;
|
207
|
+
m[Fn] = m[Hn] = m[Qn] = m[Un] = m[er] = m[Gn] = m[Vn] = m[Kn] = m[Wn] = m[qn] = m[Xn] = m[Yn] = m[Jn] = m[Zn] = m[kn] = !1;
|
208
|
+
function fr(e) {
|
209
|
+
return te(e) && et(e.length) && !!m[ae(e)];
|
210
|
+
}
|
211
|
+
function dr(e) {
|
212
|
+
return function(t) {
|
213
|
+
return e(t);
|
214
|
+
};
|
215
|
+
}
|
216
|
+
var rt = typeof exports == "object" && exports && !exports.nodeType && exports, ee = rt && typeof module == "object" && module && !module.nodeType && module, pr = ee && ee.exports === rt, ce = pr && Ye.process, Re = function() {
|
217
|
+
try {
|
218
|
+
var e = ee && ee.require && ee.require("util").types;
|
219
|
+
return e || ce && ce.binding && ce.binding("util");
|
220
|
+
} catch {
|
221
|
+
}
|
222
|
+
}(), Ee = Re && Re.isTypedArray, at = Ee ? dr(Ee) : fr, cr = Object.prototype, gr = cr.hasOwnProperty;
|
223
|
+
function mr(e, t) {
|
224
|
+
var n = se(e), r = !n && Bn(e), f = !n && !r && _e(e), o = !n && !r && !f && at(e), l = n || r || f || o, b = l ? En(e.length, String) : [], v = b.length;
|
225
|
+
for (var g in e)
|
226
|
+
gr.call(e, g) && !(l && // Safari 9 has enumerable `arguments.length` in strict mode.
|
227
|
+
(g == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
228
|
+
f && (g == "offset" || g == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
229
|
+
o && (g == "buffer" || g == "byteLength" || g == "byteOffset") || // Skip index properties.
|
230
|
+
Pn(g, v))) && b.push(g);
|
231
|
+
return b;
|
232
|
+
}
|
233
|
+
function br(e, t) {
|
234
|
+
return function(n) {
|
235
|
+
return e(t(n));
|
236
|
+
};
|
237
|
+
}
|
238
|
+
var yr = br(Object.keys, Object), vr = Object.prototype, _r = vr.hasOwnProperty;
|
239
|
+
function hr(e) {
|
240
|
+
if (!Rn(e))
|
241
|
+
return yr(e);
|
242
|
+
var t = [];
|
243
|
+
for (var n in Object(e))
|
244
|
+
_r.call(e, n) && n != "constructor" && t.push(n);
|
245
|
+
return t;
|
246
|
+
}
|
247
|
+
function wr(e) {
|
248
|
+
return jn(e) ? mr(e) : hr(e);
|
249
|
+
}
|
250
|
+
var ne = X(Object, "create");
|
251
|
+
function Sr() {
|
252
|
+
this.__data__ = ne ? ne(null) : {}, this.size = 0;
|
253
|
+
}
|
254
|
+
function Tr(e) {
|
255
|
+
var t = this.has(e) && delete this.__data__[e];
|
256
|
+
return this.size -= t ? 1 : 0, t;
|
257
|
+
}
|
258
|
+
var $r = "__lodash_hash_undefined__", Or = Object.prototype, Cr = Or.hasOwnProperty;
|
259
|
+
function Pr(e) {
|
260
|
+
var t = this.__data__;
|
261
|
+
if (ne) {
|
262
|
+
var n = t[e];
|
263
|
+
return n === $r ? void 0 : n;
|
264
|
+
}
|
265
|
+
return Cr.call(t, e) ? t[e] : void 0;
|
266
|
+
}
|
267
|
+
var Ar = Object.prototype, jr = Ar.hasOwnProperty;
|
268
|
+
function Ir(e) {
|
269
|
+
var t = this.__data__;
|
270
|
+
return ne ? t[e] !== void 0 : jr.call(t, e);
|
271
|
+
}
|
272
|
+
var Rr = "__lodash_hash_undefined__";
|
273
|
+
function Er(e, t) {
|
274
|
+
var n = this.__data__;
|
275
|
+
return this.size += this.has(e) ? 0 : 1, n[e] = ne && t === void 0 ? Rr : t, this;
|
276
|
+
}
|
277
|
+
function H(e) {
|
278
|
+
var t = -1, n = e == null ? 0 : e.length;
|
279
|
+
for (this.clear(); ++t < n; ) {
|
280
|
+
var r = e[t];
|
281
|
+
this.set(r[0], r[1]);
|
282
|
+
}
|
283
|
+
}
|
284
|
+
H.prototype.clear = Sr;
|
285
|
+
H.prototype.delete = Tr;
|
286
|
+
H.prototype.get = Pr;
|
287
|
+
H.prototype.has = Ir;
|
288
|
+
H.prototype.set = Er;
|
289
|
+
function zr() {
|
290
|
+
this.__data__ = [], this.size = 0;
|
291
|
+
}
|
292
|
+
function ue(e, t) {
|
293
|
+
for (var n = e.length; n--; )
|
294
|
+
if (Qe(e[n][0], t))
|
295
|
+
return n;
|
296
|
+
return -1;
|
297
|
+
}
|
298
|
+
var xr = Array.prototype, Mr = xr.splice;
|
299
|
+
function Br(e) {
|
300
|
+
var t = this.__data__, n = ue(t, e);
|
301
|
+
if (n < 0)
|
302
|
+
return !1;
|
303
|
+
var r = t.length - 1;
|
304
|
+
return n == r ? t.pop() : Mr.call(t, n, 1), --this.size, !0;
|
305
|
+
}
|
306
|
+
function Lr(e) {
|
307
|
+
var t = this.__data__, n = ue(t, e);
|
308
|
+
return n < 0 ? void 0 : t[n][1];
|
309
|
+
}
|
310
|
+
function Dr(e) {
|
311
|
+
return ue(this.__data__, e) > -1;
|
312
|
+
}
|
313
|
+
function Nr(e, t) {
|
314
|
+
var n = this.__data__, r = ue(n, e);
|
315
|
+
return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this;
|
316
|
+
}
|
317
|
+
function B(e) {
|
318
|
+
var t = -1, n = e == null ? 0 : e.length;
|
319
|
+
for (this.clear(); ++t < n; ) {
|
320
|
+
var r = e[t];
|
321
|
+
this.set(r[0], r[1]);
|
322
|
+
}
|
323
|
+
}
|
324
|
+
B.prototype.clear = zr;
|
325
|
+
B.prototype.delete = Br;
|
326
|
+
B.prototype.get = Lr;
|
327
|
+
B.prototype.has = Dr;
|
328
|
+
B.prototype.set = Nr;
|
329
|
+
var re = X(M, "Map");
|
330
|
+
function Fr() {
|
331
|
+
this.size = 0, this.__data__ = {
|
332
|
+
hash: new H(),
|
333
|
+
map: new (re || B)(),
|
334
|
+
string: new H()
|
335
|
+
};
|
336
|
+
}
|
337
|
+
function Hr(e) {
|
338
|
+
var t = typeof e;
|
339
|
+
return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
|
340
|
+
}
|
341
|
+
function fe(e, t) {
|
342
|
+
var n = e.__data__;
|
343
|
+
return Hr(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
|
344
|
+
}
|
345
|
+
function Ur(e) {
|
346
|
+
var t = fe(this, e).delete(e);
|
347
|
+
return this.size -= t ? 1 : 0, t;
|
348
|
+
}
|
349
|
+
function Gr(e) {
|
350
|
+
return fe(this, e).get(e);
|
351
|
+
}
|
352
|
+
function Vr(e) {
|
353
|
+
return fe(this, e).has(e);
|
354
|
+
}
|
355
|
+
function Kr(e, t) {
|
356
|
+
var n = fe(this, e), r = n.size;
|
357
|
+
return n.set(e, t), this.size += n.size == r ? 0 : 1, this;
|
358
|
+
}
|
359
|
+
function G(e) {
|
360
|
+
var t = -1, n = e == null ? 0 : e.length;
|
361
|
+
for (this.clear(); ++t < n; ) {
|
362
|
+
var r = e[t];
|
363
|
+
this.set(r[0], r[1]);
|
364
|
+
}
|
365
|
+
}
|
366
|
+
G.prototype.clear = Fr;
|
367
|
+
G.prototype.delete = Ur;
|
368
|
+
G.prototype.get = Gr;
|
369
|
+
G.prototype.has = Vr;
|
370
|
+
G.prototype.set = Kr;
|
371
|
+
function Wr(e, t) {
|
372
|
+
for (var n = -1, r = t.length, f = e.length; ++n < r; )
|
373
|
+
e[f + n] = t[n];
|
374
|
+
return e;
|
375
|
+
}
|
376
|
+
function qr() {
|
377
|
+
this.__data__ = new B(), this.size = 0;
|
378
|
+
}
|
379
|
+
function Xr(e) {
|
380
|
+
var t = this.__data__, n = t.delete(e);
|
381
|
+
return this.size = t.size, n;
|
382
|
+
}
|
383
|
+
function Yr(e) {
|
384
|
+
return this.__data__.get(e);
|
385
|
+
}
|
386
|
+
function Jr(e) {
|
387
|
+
return this.__data__.has(e);
|
388
|
+
}
|
389
|
+
var Zr = 200;
|
390
|
+
function kr(e, t) {
|
391
|
+
var n = this.__data__;
|
392
|
+
if (n instanceof B) {
|
393
|
+
var r = n.__data__;
|
394
|
+
if (!re || r.length < Zr - 1)
|
395
|
+
return r.push([e, t]), this.size = ++n.size, this;
|
396
|
+
n = this.__data__ = new G(r);
|
397
|
+
}
|
398
|
+
return n.set(e, t), this.size = n.size, this;
|
399
|
+
}
|
400
|
+
function F(e) {
|
401
|
+
var t = this.__data__ = new B(e);
|
402
|
+
this.size = t.size;
|
403
|
+
}
|
404
|
+
F.prototype.clear = qr;
|
405
|
+
F.prototype.delete = Xr;
|
406
|
+
F.prototype.get = Yr;
|
407
|
+
F.prototype.has = Jr;
|
408
|
+
F.prototype.set = kr;
|
409
|
+
function Qr(e, t) {
|
410
|
+
for (var n = -1, r = e == null ? 0 : e.length, f = 0, o = []; ++n < r; ) {
|
411
|
+
var l = e[n];
|
412
|
+
t(l, n, e) && (o[f++] = l);
|
413
|
+
}
|
414
|
+
return o;
|
415
|
+
}
|
416
|
+
function ea() {
|
417
|
+
return [];
|
418
|
+
}
|
419
|
+
var ta = Object.prototype, na = ta.propertyIsEnumerable, ze = Object.getOwnPropertySymbols, ra = ze ? function(e) {
|
420
|
+
return e == null ? [] : (e = Object(e), Qr(ze(e), function(t) {
|
421
|
+
return na.call(e, t);
|
422
|
+
}));
|
423
|
+
} : ea;
|
424
|
+
function aa(e, t, n) {
|
425
|
+
var r = t(e);
|
426
|
+
return se(e) ? r : Wr(r, n(e));
|
427
|
+
}
|
428
|
+
function xe(e) {
|
429
|
+
return aa(e, wr, ra);
|
430
|
+
}
|
431
|
+
var he = X(M, "DataView"), we = X(M, "Promise"), Se = X(M, "Set"), Me = "[object Map]", oa = "[object Object]", Be = "[object Promise]", Le = "[object Set]", De = "[object WeakMap]", Ne = "[object DataView]", ia = U(he), sa = U(re), la = U(we), ua = U(Se), fa = U(ve), N = ae;
|
432
|
+
(he && N(new he(new ArrayBuffer(1))) != Ne || re && N(new re()) != Me || we && N(we.resolve()) != Be || Se && N(new Se()) != Le || ve && N(new ve()) != De) && (N = function(e) {
|
433
|
+
var t = ae(e), n = t == oa ? e.constructor : void 0, r = n ? U(n) : "";
|
434
|
+
if (r)
|
435
|
+
switch (r) {
|
436
|
+
case ia:
|
437
|
+
return Ne;
|
438
|
+
case sa:
|
439
|
+
return Me;
|
440
|
+
case la:
|
441
|
+
return Be;
|
442
|
+
case ua:
|
443
|
+
return Le;
|
444
|
+
case fa:
|
445
|
+
return De;
|
446
|
+
}
|
447
|
+
return t;
|
448
|
+
});
|
449
|
+
var Fe = M.Uint8Array, da = "__lodash_hash_undefined__";
|
450
|
+
function pa(e) {
|
451
|
+
return this.__data__.set(e, da), this;
|
452
|
+
}
|
453
|
+
function ca(e) {
|
454
|
+
return this.__data__.has(e);
|
455
|
+
}
|
456
|
+
function le(e) {
|
457
|
+
var t = -1, n = e == null ? 0 : e.length;
|
458
|
+
for (this.__data__ = new G(); ++t < n; )
|
459
|
+
this.add(e[t]);
|
460
|
+
}
|
461
|
+
le.prototype.add = le.prototype.push = pa;
|
462
|
+
le.prototype.has = ca;
|
463
|
+
function ga(e, t) {
|
464
|
+
for (var n = -1, r = e == null ? 0 : e.length; ++n < r; )
|
465
|
+
if (t(e[n], n, e))
|
466
|
+
return !0;
|
467
|
+
return !1;
|
468
|
+
}
|
469
|
+
function ma(e, t) {
|
470
|
+
return e.has(t);
|
471
|
+
}
|
472
|
+
var ba = 1, ya = 2;
|
473
|
+
function ot(e, t, n, r, f, o) {
|
474
|
+
var l = n & ba, b = e.length, v = t.length;
|
475
|
+
if (b != v && !(l && v > b))
|
476
|
+
return !1;
|
477
|
+
var g = o.get(e), c = o.get(t);
|
478
|
+
if (g && c)
|
479
|
+
return g == t && c == e;
|
480
|
+
var h = -1, y = !0, $ = n & ya ? new le() : void 0;
|
481
|
+
for (o.set(e, t), o.set(t, e); ++h < b; ) {
|
482
|
+
var w = e[h], S = t[h];
|
483
|
+
if (r)
|
484
|
+
var O = l ? r(S, w, h, t, e, o) : r(w, S, h, e, t, o);
|
485
|
+
if (O !== void 0) {
|
486
|
+
if (O)
|
487
|
+
continue;
|
488
|
+
y = !1;
|
489
|
+
break;
|
490
|
+
}
|
491
|
+
if ($) {
|
492
|
+
if (!ga(t, function(z, I) {
|
493
|
+
if (!ma($, I) && (w === z || f(w, z, n, r, o)))
|
494
|
+
return $.push(I);
|
495
|
+
})) {
|
496
|
+
y = !1;
|
497
|
+
break;
|
498
|
+
}
|
499
|
+
} else if (!(w === S || f(w, S, n, r, o))) {
|
500
|
+
y = !1;
|
501
|
+
break;
|
502
|
+
}
|
503
|
+
}
|
504
|
+
return o.delete(e), o.delete(t), y;
|
505
|
+
}
|
506
|
+
function va(e) {
|
507
|
+
var t = -1, n = Array(e.size);
|
508
|
+
return e.forEach(function(r, f) {
|
509
|
+
n[++t] = [f, r];
|
510
|
+
}), n;
|
511
|
+
}
|
512
|
+
function _a(e) {
|
513
|
+
var t = -1, n = Array(e.size);
|
514
|
+
return e.forEach(function(r) {
|
515
|
+
n[++t] = r;
|
516
|
+
}), n;
|
517
|
+
}
|
518
|
+
var ha = 1, wa = 2, Sa = "[object Boolean]", Ta = "[object Date]", $a = "[object Error]", Oa = "[object Map]", Ca = "[object Number]", Pa = "[object RegExp]", Aa = "[object Set]", ja = "[object String]", Ia = "[object Symbol]", Ra = "[object ArrayBuffer]", Ea = "[object DataView]", He = q ? q.prototype : void 0, ge = He ? He.valueOf : void 0;
|
519
|
+
function za(e, t, n, r, f, o, l) {
|
520
|
+
switch (n) {
|
521
|
+
case Ea:
|
522
|
+
if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
|
523
|
+
return !1;
|
524
|
+
e = e.buffer, t = t.buffer;
|
525
|
+
case Ra:
|
526
|
+
return !(e.byteLength != t.byteLength || !o(new Fe(e), new Fe(t)));
|
527
|
+
case Sa:
|
528
|
+
case Ta:
|
529
|
+
case Ca:
|
530
|
+
return Qe(+e, +t);
|
531
|
+
case $a:
|
532
|
+
return e.name == t.name && e.message == t.message;
|
533
|
+
case Pa:
|
534
|
+
case ja:
|
535
|
+
return e == t + "";
|
536
|
+
case Oa:
|
537
|
+
var b = va;
|
538
|
+
case Aa:
|
539
|
+
var v = r & ha;
|
540
|
+
if (b || (b = _a), e.size != t.size && !v)
|
541
|
+
return !1;
|
542
|
+
var g = l.get(e);
|
543
|
+
if (g)
|
544
|
+
return g == t;
|
545
|
+
r |= wa, l.set(e, t);
|
546
|
+
var c = ot(b(e), b(t), r, f, o, l);
|
547
|
+
return l.delete(e), c;
|
548
|
+
case Ia:
|
549
|
+
if (ge)
|
550
|
+
return ge.call(e) == ge.call(t);
|
551
|
+
}
|
552
|
+
return !1;
|
553
|
+
}
|
554
|
+
var xa = 1, Ma = Object.prototype, Ba = Ma.hasOwnProperty;
|
555
|
+
function La(e, t, n, r, f, o) {
|
556
|
+
var l = n & xa, b = xe(e), v = b.length, g = xe(t), c = g.length;
|
557
|
+
if (v != c && !l)
|
558
|
+
return !1;
|
559
|
+
for (var h = v; h--; ) {
|
560
|
+
var y = b[h];
|
561
|
+
if (!(l ? y in t : Ba.call(t, y)))
|
562
|
+
return !1;
|
563
|
+
}
|
564
|
+
var $ = o.get(e), w = o.get(t);
|
565
|
+
if ($ && w)
|
566
|
+
return $ == t && w == e;
|
567
|
+
var S = !0;
|
568
|
+
o.set(e, t), o.set(t, e);
|
569
|
+
for (var O = l; ++h < v; ) {
|
570
|
+
y = b[h];
|
571
|
+
var z = e[y], I = t[y];
|
572
|
+
if (r)
|
573
|
+
var V = l ? r(I, z, y, t, e, o) : r(z, I, y, e, t, o);
|
574
|
+
if (!(V === void 0 ? z === I || f(z, I, n, r, o) : V)) {
|
575
|
+
S = !1;
|
576
|
+
break;
|
577
|
+
}
|
578
|
+
O || (O = y == "constructor");
|
579
|
+
}
|
580
|
+
if (S && !O) {
|
581
|
+
var L = e.constructor, x = t.constructor;
|
582
|
+
L != x && "constructor" in e && "constructor" in t && !(typeof L == "function" && L instanceof L && typeof x == "function" && x instanceof x) && (S = !1);
|
583
|
+
}
|
584
|
+
return o.delete(e), o.delete(t), S;
|
585
|
+
}
|
586
|
+
var Da = 1, Ue = "[object Arguments]", Ge = "[object Array]", ie = "[object Object]", Na = Object.prototype, Ve = Na.hasOwnProperty;
|
587
|
+
function Fa(e, t, n, r, f, o) {
|
588
|
+
var l = se(e), b = se(t), v = l ? Ge : N(e), g = b ? Ge : N(t);
|
589
|
+
v = v == Ue ? ie : v, g = g == Ue ? ie : g;
|
590
|
+
var c = v == ie, h = g == ie, y = v == g;
|
591
|
+
if (y && _e(e)) {
|
592
|
+
if (!_e(t))
|
593
|
+
return !1;
|
594
|
+
l = !0, c = !1;
|
595
|
+
}
|
596
|
+
if (y && !c)
|
597
|
+
return o || (o = new F()), l || at(e) ? ot(e, t, n, r, f, o) : za(e, t, v, n, r, f, o);
|
598
|
+
if (!(n & Da)) {
|
599
|
+
var $ = c && Ve.call(e, "__wrapped__"), w = h && Ve.call(t, "__wrapped__");
|
600
|
+
if ($ || w) {
|
601
|
+
var S = $ ? e.value() : e, O = w ? t.value() : t;
|
602
|
+
return o || (o = new F()), f(S, O, n, r, o);
|
603
|
+
}
|
604
|
+
}
|
605
|
+
return y ? (o || (o = new F()), La(e, t, n, r, f, o)) : !1;
|
606
|
+
}
|
607
|
+
function it(e, t, n, r, f) {
|
608
|
+
return e === t ? !0 : e == null || t == null || !te(e) && !te(t) ? e !== e && t !== t : Fa(e, t, n, r, it, f);
|
609
|
+
}
|
610
|
+
function Ha(e, t) {
|
611
|
+
return it(e, t);
|
612
|
+
}
|
613
|
+
const Ua = {
|
96
614
|
key: 0,
|
97
615
|
class: "w-full py-3"
|
98
|
-
},
|
616
|
+
}, Ga = { class: "flex h-full items-center border-b border-l border-border/[0.16] bg-foreground/[0.04] px-1" }, Va = ["onMousedown", "className"], Ka = { class: "mt-1 flex w-full items-center justify-between" }, Wa = { class: "relative -mb-[6px] inline-block rounded-t-lg bg-background px-4 py-2 text-sm font-medium shadow-top-shadow" }, qa = {
|
99
617
|
key: 0,
|
100
618
|
class: "flex min-h-8 items-center"
|
101
|
-
},
|
619
|
+
}, Ke = "#UNDEFINED#", wo = /* @__PURE__ */ We({
|
102
620
|
__name: "BuiDataTable",
|
103
|
-
props: /* @__PURE__ */
|
621
|
+
props: /* @__PURE__ */ wt({
|
104
622
|
columns: {},
|
105
623
|
data: {},
|
106
624
|
pageSize: { default: 10 },
|
@@ -114,6 +632,7 @@ const Me = pe("Settings2Icon", [
|
|
114
632
|
renderSubComponent: {},
|
115
633
|
freezeHeader: { type: Boolean },
|
116
634
|
enableColumnListControl: { type: Boolean },
|
635
|
+
enableColumnResizing: { type: Boolean, default: !0 },
|
117
636
|
columnSearchPlaceholder: { default: "Column name" },
|
118
637
|
columnSearchNotFound: { default: "Not found" },
|
119
638
|
columnResetVisibility: { default: "Reset column visibility" },
|
@@ -127,197 +646,210 @@ const Me = pe("Settings2Icon", [
|
|
127
646
|
selectionModifiers: {},
|
128
647
|
columnVisibility: {},
|
129
648
|
columnVisibilityModifiers: {},
|
130
|
-
columnSizing: {},
|
131
|
-
columnSizingModifiers: {},
|
132
649
|
columnOrder: {},
|
133
|
-
columnOrderModifiers: {}
|
650
|
+
columnOrderModifiers: {},
|
651
|
+
columnSizing: {},
|
652
|
+
columnSizingModifiers: {}
|
134
653
|
}),
|
135
|
-
emits: ["update:sorting", "update:pagination", "update:selection", "update:columnVisibility", "update:
|
136
|
-
setup(
|
137
|
-
const
|
138
|
-
() =>
|
139
|
-
),
|
654
|
+
emits: ["update:sorting", "update:pagination", "update:selection", "update:columnVisibility", "update:columnOrder", "update:columnSizing"],
|
655
|
+
setup(e) {
|
656
|
+
const t = e, n = K(e, "sorting"), r = K(e, "pagination"), f = K(e, "selection"), o = K(e, "columnVisibility"), l = K(e, "columnOrder"), b = K(e, "columnSizing"), v = D(
|
657
|
+
() => t.manualPagination ? t.totalItems : t.data.length
|
658
|
+
), g = t.columns.map((a) => a.meta?.pinLeft && a.id ? a.id : "").filter(Boolean), c = xt({
|
140
659
|
initialState: {
|
141
660
|
// TODO: column freeze
|
142
|
-
columnPinning: { left:
|
143
|
-
pagination: { pageSize:
|
661
|
+
columnPinning: { left: g },
|
662
|
+
pagination: { pageSize: t.pageSize }
|
144
663
|
},
|
145
664
|
get data() {
|
146
|
-
return
|
665
|
+
return t.data;
|
147
666
|
},
|
148
667
|
get columns() {
|
149
|
-
return
|
668
|
+
return t.columns;
|
150
669
|
},
|
151
|
-
getCoreRowModel:
|
152
|
-
getPaginationRowModel:
|
153
|
-
getSortedRowModel:
|
154
|
-
onSortingChange: (
|
155
|
-
|
670
|
+
getCoreRowModel: Mt(),
|
671
|
+
getPaginationRowModel: Bt(),
|
672
|
+
getSortedRowModel: Lt(),
|
673
|
+
onSortingChange: (a) => {
|
674
|
+
Z(a, n);
|
156
675
|
},
|
157
|
-
onPaginationChange: (
|
158
|
-
|
676
|
+
onPaginationChange: (a) => {
|
677
|
+
Z(a, r);
|
159
678
|
},
|
160
|
-
onRowSelectionChange: (
|
161
|
-
|
679
|
+
onRowSelectionChange: (a) => {
|
680
|
+
Z(a, f);
|
162
681
|
},
|
163
|
-
onColumnVisibilityChange: (
|
164
|
-
|
682
|
+
onColumnVisibilityChange: (a) => {
|
683
|
+
Z(a, o);
|
165
684
|
},
|
166
|
-
|
167
|
-
|
168
|
-
},
|
169
|
-
onColumnOrderChange: (e) => {
|
170
|
-
_(e, y);
|
685
|
+
onColumnOrderChange: (a) => {
|
686
|
+
Z(a, l);
|
171
687
|
},
|
172
688
|
autoResetPageIndex: !1,
|
173
|
-
manualPagination:
|
689
|
+
manualPagination: t.manualPagination,
|
174
690
|
// set to false to enable client-side pagination
|
175
|
-
manualSorting:
|
176
|
-
enableColumnResizing: !0,
|
177
|
-
columnResizeMode: "onChange",
|
178
|
-
columnResizeDirection: "ltr",
|
691
|
+
manualSorting: t.manualSorting,
|
179
692
|
state: {
|
180
693
|
get sorting() {
|
181
|
-
return
|
694
|
+
return n.value;
|
182
695
|
},
|
183
696
|
get pagination() {
|
184
|
-
return
|
697
|
+
return r.value;
|
185
698
|
},
|
186
699
|
get rowSelection() {
|
187
|
-
return
|
700
|
+
return f.value;
|
188
701
|
},
|
189
702
|
get columnVisibility() {
|
190
|
-
return
|
191
|
-
},
|
192
|
-
get columnSizing() {
|
193
|
-
return H.value;
|
703
|
+
return o.value;
|
194
704
|
},
|
195
705
|
get columnOrder() {
|
196
|
-
return
|
706
|
+
return l.value;
|
197
707
|
}
|
198
708
|
},
|
199
|
-
getRowId:
|
200
|
-
}),
|
709
|
+
getRowId: t.getRowId
|
710
|
+
}), h = D({
|
201
711
|
get() {
|
202
|
-
return
|
712
|
+
return c.getState().pagination.pageSize;
|
203
713
|
},
|
204
|
-
set(
|
205
|
-
|
714
|
+
set(a) {
|
715
|
+
r.value && (r.value.pageSize = a, c.setPageSize(a), c.setPageIndex(0));
|
206
716
|
}
|
207
|
-
}),
|
717
|
+
}), y = D({
|
208
718
|
get() {
|
209
|
-
return
|
719
|
+
return c.getState().pagination.pageIndex + 1;
|
210
720
|
},
|
211
|
-
set(
|
212
|
-
|
721
|
+
set(a) {
|
722
|
+
r.value && (r.value.pageIndex = a - 1, c.setPageIndex(a - 1));
|
213
723
|
}
|
214
724
|
});
|
215
|
-
|
216
|
-
const
|
217
|
-
|
725
|
+
$e(() => {
|
726
|
+
const a = c.getPageCount();
|
727
|
+
a && a < y.value && (y.value = a);
|
218
728
|
});
|
219
|
-
const
|
220
|
-
const
|
221
|
-
return
|
729
|
+
const $ = D(() => t.groupBy ? c.getRowModel().rows.reduce((a, i) => {
|
730
|
+
const C = i.getValue(t.groupBy) ?? Ke;
|
731
|
+
return a[C] = a[C] || [], a[C].push(i), a;
|
222
732
|
}, /* @__PURE__ */ Object.create(null)) : null);
|
223
|
-
function
|
224
|
-
return (
|
733
|
+
function w(a) {
|
734
|
+
return (t.groupBy && t.groupLabels ? t.groupLabels[t.groupBy] || [] : [])[a];
|
225
735
|
}
|
226
|
-
const
|
227
|
-
|
228
|
-
), O =
|
229
|
-
() => O.value.reduce((
|
230
|
-
),
|
231
|
-
() =>
|
736
|
+
const S = oe(
|
737
|
+
c.getAllColumns().filter((a) => typeof a.accessorFn < "u" && a.getCanHide()).sort((a, i) => l.value ? l.value?.indexOf(a.id) < 0 && l.value?.indexOf(i.id) >= 0 ? 1 : l.value?.indexOf(a.id) >= 0 && l.value?.indexOf(i.id) < 0 ? -1 : l.value?.indexOf(a.id) - l.value?.indexOf(i.id) : 0)
|
738
|
+
), O = D(() => S.value.map((a) => a.id)), z = D(
|
739
|
+
() => O.value.reduce((a, i) => ({ ...a, [i]: !0 }), {})
|
740
|
+
), I = oe(!1), V = oe(""), L = D(
|
741
|
+
() => c.getHeaderGroups().length > 0 ? c.getHeaderGroups()[0].headers : void 0
|
232
742
|
);
|
233
|
-
|
234
|
-
|
743
|
+
St(O, () => {
|
744
|
+
c.setColumnOrder(O.value);
|
235
745
|
});
|
236
|
-
const
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
746
|
+
const x = oe(null), { height: lt } = qt(x), {
|
747
|
+
tableHeaderElement: ut,
|
748
|
+
calculatedColumnSizing: de,
|
749
|
+
isResizing: ft,
|
750
|
+
resizingCellId: dt,
|
751
|
+
resetCells: Te,
|
752
|
+
handleResizeControlMouseDown: pt,
|
753
|
+
handleResizeControlMouseUp: ct,
|
754
|
+
setInitialColumnWidths: gt,
|
755
|
+
setProvidedCellWidths: mt
|
756
|
+
} = Yt();
|
757
|
+
return Tt(() => {
|
758
|
+
de.value = b.value;
|
759
|
+
}), $t(() => {
|
760
|
+
x.value && (ut.value = x.value, mt(b.value), gt());
|
761
|
+
}), $e(() => {
|
762
|
+
Ha(de.value, b.value) || (b.value = de.value);
|
763
|
+
}), Xt(document, "mouseup", ct), (a, i) => (p(), T(j, null, [
|
764
|
+
a.$slots.caption ? (p(), T("div", Ua, [
|
765
|
+
R(a.$slots, "caption", { table: s(c) })
|
766
|
+
])) : E("", !0),
|
767
|
+
_(s(bt), null, Ot({
|
768
|
+
default: d(() => [
|
769
|
+
L.value ? (p(), P(s(_t), {
|
244
770
|
key: 0,
|
245
|
-
"freeze-header":
|
771
|
+
"freeze-header": t.freezeHeader,
|
246
772
|
ref_key: "tableHeaderRef",
|
247
|
-
ref:
|
773
|
+
ref: x
|
248
774
|
}, {
|
249
|
-
default:
|
250
|
-
(
|
251
|
-
key:
|
252
|
-
|
253
|
-
|
775
|
+
default: d(() => [
|
776
|
+
(p(!0), T(j, null, Q(L.value, (u, C) => (p(), P(s(vt), {
|
777
|
+
key: u.id,
|
778
|
+
id: `${u.id}_cell`,
|
779
|
+
style: ye({
|
780
|
+
...s(st)(u.column)
|
781
|
+
}),
|
782
|
+
"freeze-header": t.freezeHeader,
|
783
|
+
"can-resize": u.column.getCanResize() ? !0 : void 0
|
254
784
|
}, {
|
255
|
-
default:
|
256
|
-
|
785
|
+
default: d(() => [
|
786
|
+
u.isPlaceholder ? E("", !0) : (p(), P(s(Xe), {
|
257
787
|
key: 0,
|
258
|
-
render:
|
259
|
-
props:
|
788
|
+
render: u.column.columnDef.header,
|
789
|
+
props: u.getContext()
|
260
790
|
}, null, 8, ["render", "props"])),
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
791
|
+
a.enableColumnResizing && C < L.value.length - 1 && u.column.getCanResize() ? (p(), T("div", {
|
792
|
+
key: 1,
|
793
|
+
onDblclick: i[5] || (i[5] = //@ts-ignore
|
794
|
+
(...Y) => s(Te) && s(Te)(...Y)),
|
795
|
+
onMousedown: () => s(pt)(u.id, t.enableColumnResizing),
|
796
|
+
className: s(Et)(
|
265
797
|
"absolute top-0 right-0 h-full w-1 bg-muted-foreground opacity-0 cursor-col-resize select-none touch-none hover:opacity-50",
|
266
|
-
|
798
|
+
s(ft) && s(dt) === u.id ? "bg-primary opacity-50" : ""
|
267
799
|
)
|
268
|
-
}, null, 40,
|
800
|
+
}, null, 40, Va)) : E("", !0)
|
269
801
|
]),
|
270
802
|
_: 2
|
271
|
-
}, 1032, ["style", "freeze-header"]))), 128))
|
803
|
+
}, 1032, ["id", "style", "freeze-header", "can-resize"]))), 128))
|
272
804
|
]),
|
273
805
|
_: 1
|
274
|
-
}, 8, ["freeze-header"])) :
|
275
|
-
|
276
|
-
default:
|
277
|
-
|
278
|
-
|
806
|
+
}, 8, ["freeze-header"])) : E("", !0),
|
807
|
+
_(s(yt), null, {
|
808
|
+
default: d(() => [
|
809
|
+
s(c).getRowModel().rows?.length ? (p(), T(j, { key: 0 }, [
|
810
|
+
t.groupBy && $.value ? (p(!0), T(j, { key: 0 }, Q($.value, (u, C) => (p(), P(s(Pt), {
|
279
811
|
asChild: "",
|
280
|
-
key:
|
812
|
+
key: C,
|
281
813
|
open: !0
|
282
814
|
}, {
|
283
|
-
default:
|
284
|
-
|
285
|
-
default:
|
286
|
-
|
287
|
-
actions:
|
288
|
-
|
815
|
+
default: d(() => [
|
816
|
+
_(s(At), { asChild: "" }, {
|
817
|
+
default: d(() => [
|
818
|
+
_(s(be), { class: "bg-foreground/[0.04]" }, {
|
819
|
+
actions: d(() => [
|
820
|
+
R(a.$slots, "groupActions", { group: C })
|
289
821
|
]),
|
290
|
-
default:
|
291
|
-
|
292
|
-
colspan:
|
822
|
+
default: d(() => [
|
823
|
+
_(s(me), {
|
824
|
+
colspan: a.columns.length,
|
293
825
|
class: "!pb-0"
|
294
826
|
}, {
|
295
|
-
default:
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
], 64)) : (
|
308
|
-
|
309
|
-
|
827
|
+
default: d(() => [
|
828
|
+
A("div", Ka, [
|
829
|
+
A("div", Wa, [
|
830
|
+
i[8] || (i[8] = A("div", { class: "absolute -left-2 bottom-0 h-2 w-2 bg-background" }, null, -1)),
|
831
|
+
i[9] || (i[9] = A("div", { class: "absolute -left-4 bottom-0 h-4 w-4 rounded-lg bg-background" }, null, -1)),
|
832
|
+
i[10] || (i[10] = A("div", { class: "absolute -left-4 bottom-0 h-4 w-4 rounded-lg bg-foreground/[0.04]" }, null, -1)),
|
833
|
+
i[11] || (i[11] = A("div", { class: "absolute -right-2 bottom-0 h-2 w-2 bg-background" }, null, -1)),
|
834
|
+
i[12] || (i[12] = A("div", { class: "absolute -right-4 bottom-0 h-4 w-4 rounded-lg bg-background" }, null, -1)),
|
835
|
+
i[13] || (i[13] = A("div", { class: "absolute -right-4 bottom-0 h-4 w-4 rounded-lg bg-foreground/[0.04]" }, null, -1)),
|
836
|
+
i[14] || (i[14] = A("div", null, null, -1)),
|
837
|
+
C === Ke ? (p(), T(j, { key: 0 }, [
|
838
|
+
W(J(w(1)), 1)
|
839
|
+
], 64)) : (p(), T(j, { key: 1 }, [
|
840
|
+
W(J(w(0)) + ": ", 1),
|
841
|
+
a.$slots.groupName ? R(a.$slots, "groupName", {
|
310
842
|
key: 0,
|
311
|
-
group:
|
312
|
-
}) : (
|
313
|
-
|
843
|
+
group: C
|
844
|
+
}) : (p(), T(j, { key: 1 }, [
|
845
|
+
W(J(C), 1)
|
314
846
|
], 64))
|
315
847
|
], 64))
|
316
848
|
]),
|
317
|
-
|
849
|
+
a.$slots.groupByRow ? R(a.$slots, "groupByRow", {
|
318
850
|
key: 0,
|
319
|
-
group:
|
320
|
-
}) :
|
851
|
+
group: C
|
852
|
+
}) : E("", !0)
|
321
853
|
])
|
322
854
|
]),
|
323
855
|
_: 2
|
@@ -328,17 +860,17 @@ const Me = pe("Settings2Icon", [
|
|
328
860
|
]),
|
329
861
|
_: 2
|
330
862
|
}, 1024),
|
331
|
-
|
332
|
-
default:
|
333
|
-
(
|
334
|
-
key:
|
335
|
-
columns:
|
336
|
-
row:
|
337
|
-
renderSubComponent:
|
863
|
+
_(s(jt), { asChild: "" }, {
|
864
|
+
default: d(() => [
|
865
|
+
(p(!0), T(j, null, Q(u, (Y) => (p(), P(Oe, {
|
866
|
+
key: Y.id,
|
867
|
+
columns: t.columns,
|
868
|
+
row: Y,
|
869
|
+
renderSubComponent: t.renderSubComponent
|
338
870
|
}, {
|
339
|
-
actions:
|
340
|
-
|
341
|
-
row:
|
871
|
+
actions: d(() => [
|
872
|
+
R(a.$slots, "rowActions", {
|
873
|
+
row: Y.original
|
342
874
|
})
|
343
875
|
]),
|
344
876
|
_: 2
|
@@ -348,26 +880,26 @@ const Me = pe("Settings2Icon", [
|
|
348
880
|
}, 1024)
|
349
881
|
]),
|
350
882
|
_: 2
|
351
|
-
}, 1024))), 128)) : (
|
352
|
-
key:
|
353
|
-
columns:
|
354
|
-
row:
|
355
|
-
renderSubComponent:
|
883
|
+
}, 1024))), 128)) : (p(!0), T(j, { key: 1 }, Q(s(c).getRowModel().rows, (u) => (p(), P(Oe, {
|
884
|
+
key: u.id,
|
885
|
+
columns: t.columns,
|
886
|
+
row: u,
|
887
|
+
renderSubComponent: t.renderSubComponent
|
356
888
|
}, {
|
357
|
-
actions:
|
358
|
-
|
359
|
-
row:
|
889
|
+
actions: d(() => [
|
890
|
+
R(a.$slots, "rowActions", {
|
891
|
+
row: u.original
|
360
892
|
})
|
361
893
|
]),
|
362
894
|
_: 2
|
363
895
|
}, 1032, ["columns", "row", "renderSubComponent"]))), 128))
|
364
|
-
], 64)) : (
|
896
|
+
], 64)) : (p(), P(s(Ct), {
|
365
897
|
key: 1,
|
366
|
-
colspan:
|
898
|
+
colspan: a.columns.length
|
367
899
|
}, {
|
368
|
-
default:
|
369
|
-
|
370
|
-
|
900
|
+
default: d(() => [
|
901
|
+
R(a.$slots, "nodata", {}, () => [
|
902
|
+
i[15] || (i[15] = W("No data"))
|
371
903
|
])
|
372
904
|
]),
|
373
905
|
_: 3
|
@@ -378,27 +910,27 @@ const Me = pe("Settings2Icon", [
|
|
378
910
|
]),
|
379
911
|
_: 2
|
380
912
|
}, [
|
381
|
-
|
913
|
+
a.enableColumnListControl ? {
|
382
914
|
name: "columnVisibility",
|
383
|
-
fn:
|
384
|
-
|
385
|
-
open:
|
386
|
-
"onUpdate:open":
|
915
|
+
fn: d(() => [
|
916
|
+
_(s(Gt), {
|
917
|
+
open: I.value,
|
918
|
+
"onUpdate:open": i[4] || (i[4] = (u) => I.value = u)
|
387
919
|
}, {
|
388
|
-
default:
|
389
|
-
|
390
|
-
default:
|
391
|
-
|
920
|
+
default: d(() => [
|
921
|
+
_(s(Vt), { "as-child": "" }, {
|
922
|
+
default: d(() => [
|
923
|
+
A("div", {
|
392
924
|
class: "absolute right-0 top-0 z-10 bg-background",
|
393
|
-
style:
|
925
|
+
style: ye({ height: `${s(lt).toFixed(1)}px` })
|
394
926
|
}, [
|
395
|
-
|
396
|
-
|
927
|
+
A("div", Ga, [
|
928
|
+
_(s(zt), {
|
397
929
|
variant: "ghost",
|
398
930
|
class: "flex h-8 w-8 items-center justify-center text-foreground"
|
399
931
|
}, {
|
400
|
-
default:
|
401
|
-
|
932
|
+
default: d(() => [
|
933
|
+
_(s(Zt), { class: "h-4 w-4 flex-shrink-0 opacity-50" })
|
402
934
|
]),
|
403
935
|
_: 1
|
404
936
|
})
|
@@ -407,40 +939,40 @@ const Me = pe("Settings2Icon", [
|
|
407
939
|
]),
|
408
940
|
_: 1
|
409
941
|
}),
|
410
|
-
|
942
|
+
_(s(Kt), {
|
411
943
|
class: "w-[250px] p-0",
|
412
944
|
align: "start"
|
413
945
|
}, {
|
414
|
-
default:
|
415
|
-
|
416
|
-
default:
|
417
|
-
|
418
|
-
placeholder:
|
419
|
-
modelValue:
|
420
|
-
"onUpdate:modelValue":
|
421
|
-
onInput:
|
946
|
+
default: d(() => [
|
947
|
+
_(s(Dt), null, {
|
948
|
+
default: d(() => [
|
949
|
+
_(s(Ft), {
|
950
|
+
placeholder: a.columnSearchPlaceholder,
|
951
|
+
modelValue: V.value,
|
952
|
+
"onUpdate:modelValue": i[0] || (i[0] = (u) => V.value = u),
|
953
|
+
onInput: i[1] || (i[1] = (u) => V.value = u.target?.value)
|
422
954
|
}, null, 8, ["placeholder", "modelValue"]),
|
423
|
-
|
424
|
-
default:
|
425
|
-
|
426
|
-
default:
|
427
|
-
|
428
|
-
default:
|
429
|
-
|
955
|
+
_(s(Ut), null, {
|
956
|
+
default: d(() => [
|
957
|
+
_(s(Wt), { class: "h-[300px]" }, {
|
958
|
+
default: d(() => [
|
959
|
+
_(s(Nt), null, {
|
960
|
+
default: d(() => [
|
961
|
+
W(J(a.columnSearchNotFound), 1)
|
430
962
|
]),
|
431
963
|
_: 1
|
432
964
|
}),
|
433
|
-
|
434
|
-
"columns-list":
|
435
|
-
"onUpdate:columnsList":
|
965
|
+
_(s(Jt), {
|
966
|
+
"columns-list": S.value,
|
967
|
+
"onUpdate:columnsList": i[2] || (i[2] = (u) => S.value = u)
|
436
968
|
}, null, 8, ["columns-list"]),
|
437
|
-
|
969
|
+
_(s(Ht), {
|
438
970
|
value: "reset_columns_visibility",
|
439
971
|
class: "px-2 py-1.5 font-medium text-muted-foreground",
|
440
|
-
onSelect:
|
972
|
+
onSelect: i[3] || (i[3] = (u) => s(c).setColumnVisibility({ ...o.value, ...z.value }))
|
441
973
|
}, {
|
442
|
-
default:
|
443
|
-
|
974
|
+
default: d(() => [
|
975
|
+
W(J(a.columnResetVisibility), 1)
|
444
976
|
]),
|
445
977
|
_: 1
|
446
978
|
})
|
@@ -463,45 +995,45 @@ const Me = pe("Settings2Icon", [
|
|
463
995
|
key: "0"
|
464
996
|
} : void 0
|
465
997
|
]), 1024),
|
466
|
-
(
|
998
|
+
(a.showPagination || a.$slots.numberOfItems) && v.value > 0 ? (p(), T("div", {
|
467
999
|
key: 1,
|
468
|
-
class:
|
469
|
-
"justify-between":
|
470
|
-
"justify-start":
|
471
|
-
"justify-end":
|
1000
|
+
class: qe(["flex w-full border-x border-b border-border/[0.16] bg-primary/[0.04] px-2.5 py-1 text-sm text-muted-foreground", {
|
1001
|
+
"justify-between": a.showPagination && a.$slots.numberOfItems,
|
1002
|
+
"justify-start": a.$slots.numberOfItems && !a.showPagination,
|
1003
|
+
"justify-end": a.showPagination && !a.$slots.numberOfItems
|
472
1004
|
}])
|
473
1005
|
}, [
|
474
|
-
|
475
|
-
|
476
|
-
])) :
|
477
|
-
|
1006
|
+
a.$slots.numberOfItems ? (p(), T("div", qa, [
|
1007
|
+
R(a.$slots, "numberOfItems")
|
1008
|
+
])) : E("", !0),
|
1009
|
+
a.showPagination ? (p(), P(s(It), {
|
478
1010
|
key: 1,
|
479
|
-
total:
|
480
|
-
pageIndex:
|
481
|
-
"onUpdate:pageIndex":
|
482
|
-
pageSize:
|
483
|
-
"onUpdate:pageSize":
|
484
|
-
translations:
|
485
|
-
}, null, 8, ["total", "pageIndex", "pageSize", "translations"])) :
|
486
|
-
], 2)) :
|
1011
|
+
total: v.value,
|
1012
|
+
pageIndex: y.value,
|
1013
|
+
"onUpdate:pageIndex": i[6] || (i[6] = (u) => y.value = u),
|
1014
|
+
pageSize: h.value,
|
1015
|
+
"onUpdate:pageSize": i[7] || (i[7] = (u) => h.value = u),
|
1016
|
+
translations: a.paginationTranslations
|
1017
|
+
}, null, 8, ["total", "pageIndex", "pageSize", "translations"])) : E("", !0)
|
1018
|
+
], 2)) : E("", !0)
|
487
1019
|
], 64));
|
488
1020
|
}
|
489
1021
|
});
|
490
|
-
function
|
1022
|
+
function st(e) {
|
491
1023
|
return { position: "relative" };
|
492
1024
|
}
|
493
1025
|
export {
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
1026
|
+
wo as BuiDataTable,
|
1027
|
+
Jt as BuiDataTableColumnList,
|
1028
|
+
bt as BuiTable,
|
1029
|
+
yt as BuiTableBody,
|
1030
|
+
$o as BuiTableCaption,
|
1031
|
+
me as BuiTableCell,
|
1032
|
+
Ct as BuiTableEmpty,
|
1033
|
+
Co as BuiTableFooter,
|
1034
|
+
vt as BuiTableHead,
|
1035
|
+
_t as BuiTableHeader,
|
1036
|
+
be as BuiTableRow,
|
1037
|
+
Oe as BuiTableRowSubrow,
|
1038
|
+
st as getPinningStyle
|
507
1039
|
};
|