@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.
@@ -1,282 +1,150 @@
1
- import { defineComponent as Se, useSlots as $e, computed as P, createElementBlock as f, openBlock as a, normalizeClass as d, unref as t, createElementVNode as w, createCommentVNode as R, renderSlot as H, createBlock as T, createTextVNode as ne, toDisplayString as J, h as Ze, ref as Q, watch as ae, useTemplateRef as Ne, onBeforeUnmount as Oe, shallowRef as qe, createVNode as g, withCtx as p, normalizeStyle as Fe, Fragment as A, renderList as Z, mergeProps as I, createSlots as Ce, normalizeProps as Ge, guardReactiveProps as Ue, nextTick as le } from "vue";
2
- import { createColumnHelper as Je, flattenBy as Qe, useVueTable as Xe, getSortedRowModel as Ye, getCoreRowModel as xe } from "@tanstack/vue-table";
3
- import { b as et } from "../_baseIsEqual-BknLKouD.js";
4
- import { i as tt, b as ot, a as se } from "../isArray-CdbPONHA.js";
5
- import { _ as ye } from "../Checkbox.vue_vue_type_style_index_0_lang-C7it9Wv8.js";
6
- import { c as he, _ as nt, a as re } from "../Menu.vue_vue_type_style_index_0_lang-U69mRopb.js";
7
- import { _ as lt } from "../ActionButton.vue_vue_type_script_setup_true_lang-BZf08kPh.js";
8
- import { getBemBlock as Re, generateVariantClassList as He, getBemElement as C, wgt_pre as st, usePCId as rt } from "@pantograph/utils";
9
- import { cva as ze } from "class-variance-authority";
10
- import { g as it } from "../options-JBqnVZUl.js";
11
- import { _ as X } from "../Icon.vue_vue_type_style_index_0_lang-BlmMv3wD.js";
12
- import { getCssVar as N, getBreakpoints as at } from "@pantograph/tokens";
13
- import { o as Be } from "../omit-CD3OjwFx.js";
14
- import { u as ct } from "../uniq-DSVd52ma.js";
15
- import { i as ie, a as V } from "../_flatRest-Dx0ZZgOx.js";
16
- import { useBreakpoints as ut, useIntersectionObserver as dt } from "@vueuse/core";
17
- import { _ as pt } from "../Skeleton.vue_vue_type_style_index_0_lang-aSGb2hn6.js";
18
- import { _ as ve } from "../Popover.vue_vue_type_style_index_0_lang-BCFXul8O.js";
19
- import { _ as mt } from "../Badge.vue_vue_type_script_setup_true_lang-C8L2pGJ3.js";
20
- import { _ as we } from "../Divider.vue_vue_type_style_index_0_lang-DapqjSGc.js";
21
- import { _ as ke } from "../IconButton.vue_vue_type_script_setup_true_lang-DytRXxrl.js";
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 { _ as gt, e as Ct, c as G, a as yt, d as ht, b as U } from "../THead.vue_vue_type_style_index_0_lang-tkq9EicC.js";
25
- function _e(B, S) {
26
- return et(B, S);
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 vt = ["simple", "advance"], wt = {
29
- key: 1,
30
- viewBox: "0 0 108 88",
31
- fill: "none"
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: u((m = o == null ? void 0 : o.skeletonProps) == null ? void 0 : m.type)
35
+ size: a((d = o == null ? void 0 : o.skeletonProps) == null ? void 0 : d.type)
168
36
  };
169
- }, b = (o) => {
170
- var m, h;
171
- const u = (m = o.props) == null ? void 0 : m.column.columnDef;
172
- return V(u == null ? void 0 : u.render) && o.props.row ? (h = u == null ? void 0 : u.render) == null ? void 0 : h.call(u, {
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: Be(u, "render")
176
- }) : typeof o.render == "function" || typeof o.render == "object" ? Ze(o.render, o.props) : o.render;
177
- }, c = (o) => {
178
- let u = {};
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 m = (D) => Number(D) >= 0 ? `${D}px` : D, { width: h, maxWidth: M, minWidth: L } = o;
181
- (h || M || L) && (u = {
182
- width: m(h),
183
- maxWidth: m(M),
184
- minWidth: m(L),
185
- overflow: h || M ? "hidden" : void 0
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 u;
189
- }, $ = {}, l = (o, u = !0) => {
190
- var h;
191
- let m = 1;
192
- return ((h = o == null ? void 0 : o.subHeaders) == null ? void 0 : h.length) === 1 && o.column.id === o.subHeaders[0].column.id && (m += l(o.subHeaders[0], !1)), u && (!$[o.column.id] || $[o.column.id] < m) && ($[o.column.id] = m), m;
193
- }, y = (o, u = {}) => {
194
- var m;
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 h = (m = o == null ? void 0 : o.column) == null ? void 0 : m.columnDef, M = [], L = {};
197
- if (ie(h)) {
198
- let D = S(o.column.id);
199
- const { customCell: K, class: F } = h;
200
- if (he(F) || M.push(F), K && (ie(K) || V(K))) {
201
- const q = (k) => {
202
- if (ie(k)) {
203
- const { wrap: E, colSpan: x, rowSpan: ee } = k;
204
- D = D || (E ?? !1), L.colSpan = x, L.rowSpan = ee;
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
- V(K) && o.row ? q(
208
- K({
75
+ W(E) && o.row ? O(
76
+ E({
209
77
  index: o.row.index,
210
78
  record: o.row.original,
211
- column: h
79
+ column: y
212
80
  })
213
- ) : q(K);
81
+ ) : O(E);
214
82
  }
215
- o.header ? L.rowSpan = l(o.header) : D && (L.wrap = !0);
83
+ o.header ? A.rowSpan = i(o.header) : j && (A.wrap = !0);
216
84
  }
217
85
  return {
218
- class: he(M) ? void 0 : M,
219
- ...L,
220
- ...u
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: z,
227
- RenderCell: b,
94
+ getSkeletonProps: x,
95
+ RenderCell: S,
228
96
  getThProps: (o) => {
229
- var u, m, h;
230
- return y(o, {
231
- colSpan: (u = o == null ? void 0 : o.header) == null ? void 0 : u.colSpan,
232
- "data-has-children": ((h = (m = o == null ? void 0 : o.column) == null ? void 0 : m.columns) == null ? void 0 : h.length) > 1 ? !0 : void 0
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) => y(o),
103
+ getTdProps: (o) => p(o),
236
104
  getColProps: (o) => {
237
- const u = c(o.columnDef);
238
- return o.id === s && (u.width = "var(--pt-dimension-2800)"), {
239
- style: u
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, u, m) => $[m] === 1 ? !0 : u - o === $[m]
110
+ isThVisible: (o, a, d) => k[d] === 1 ? !0 : a - o === k[d]
243
111
  };
244
112
  };
245
- var At = "[object Boolean]";
246
- function It(B) {
247
- return B === !0 || B === !1 || tt(B) && ot(B) == At;
113
+ var bo = "[object Boolean]";
114
+ function vo(B) {
115
+ return B === !0 || B === !1 || Je(B) && Qe(B) == bo;
248
116
  }
249
- const Tt = (B) => {
250
- const S = Q([]), s = (l) => l ? S.value.findIndex((y) => y.id === l) : -1, z = (l) => {
251
- if (l) return S.value.find((y) => y.id === l);
252
- }, b = (l) => {
253
- var y;
254
- return !!((y = z(l)) != null && y.wrap);
255
- }, c = (l) => {
256
- const { id: y } = l;
257
- if (!y) return !1;
258
- const W = l.wrap ?? !b(y), O = s(y);
259
- return O >= 0 ? S.value[O] = { id: y, wrap: W } : S.value.push({ id: y, wrap: W }), !0;
260
- }, $ = P(
261
- () => (B.columns ?? []).filter((l) => It(l.wrap)).map((l) => ({
262
- id: l.id,
263
- wrap: !!l.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 ae(
267
- $,
268
- (l) => {
269
- S.value = [...S.value, ...l];
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: b,
277
- toggleWrap: c
144
+ isColumnWrapped: S,
145
+ toggleWrap: u
278
146
  };
279
- }, no = /* @__PURE__ */ Se({
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: S }) {
308
- const s = B, z = S, b = $e(), c = Re("data_table", st), $ = Je(), l = `$${c}_selection$`, y = P(() => {
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 = s.actionCol) == null ? void 0 : e.id) ?? `$${c}_action$`;
311
- }), W = (e) => Be(e ?? {}, "title", "sorter", "columns", "id", "dataIndex"), O = P(() => {
312
- var v;
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 j;
315
- const _ = n.id ?? rt(`${c}--col`);
316
- return se(be(n, s.childrenColumnName)) ? $.group({
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: (j = be(n, s.childrenColumnName) ?? []) == null ? void 0 : j.map(e),
186
+ id: b,
187
+ columns: (L = be(n, r.childrenColumnName) ?? []) == null ? void 0 : L.map(e),
320
188
  enableSorting: !1,
321
- ...W(n)
322
- }) : $.accessor(n.dataIndex ?? n.id, {
189
+ ...V(n)
190
+ }) : k.accessor(n.dataIndex ?? n.id, {
323
191
  header: n.title,
324
- id: _,
325
- sortingFn: typeof n.sorter == "function" ? (oe, We) => n.sorter(oe.original, We.original) : n.sorter,
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
- ...W(n)
195
+ ...V(n)
328
196
  });
329
197
  };
330
- if (!se(s.columns)) throw "no columns";
331
- const r = s.columns.map(({ id: n }) => n);
332
- if (ct(r).length !== r.length) throw "no uniq column ids";
333
- const i = [];
334
- return s.rowSelection && s.rowKey && i.push(
335
- $.accessor(l, {
336
- id: l,
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
- ), s.columns.forEach((n) => {
340
- i.push(e(n));
341
- }), (b.action || b.hoverAction) && i.push(
342
- $.accessor(y.value, {
343
- id: y.value,
344
- header: (v = s.actionCol) == null ? void 0 : v.title,
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
- ...W(s.actionCol)
214
+ ...V(r.actionCol)
347
215
  })
348
- ), i;
349
- }), { toggleWrap: ce, isColumnWrapped: Y } = Tt(s), o = Q({}), u = P(() => Object.keys(o.value)), m = P(
350
- () => s.rowKey ? Qe(s.data, (e) => e.children).map(
351
- (e) => e[s.rowKey]
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
- ), h = () => {
221
+ ), y = () => {
354
222
  const e = Object.fromEntries(
355
- u.value.filter((r) => {
356
- var i;
357
- return !((i = s.rowSelection) != null && i.preserveSelectedRowKeys) && s.rowKey ? m.value.includes(r) : !0;
358
- }).map((r) => [r, !0])
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 !== u.value.length && (o.value = e, le(() => {
361
- var r;
362
- V((r = s.rowSelection) == null ? void 0 : r.onChange) && s.rowSelection.onChange(E.value);
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
- }, M = P(() => (h(), [...s.data])), L = at(), K = ut(
232
+ }, K = D(() => (y(), [...r.data])), A = so(), E = io(
365
233
  Object.fromEntries(
366
- Object.keys(L).map((e) => [e, L[e].minWidth])
234
+ Object.keys(A).map((e) => [e, A[e].minWidth])
367
235
  ),
368
236
  { strategy: "min-width" }
369
- ).active(), F = Q({});
370
- ae(
371
- K,
237
+ ).active(), q = Z({});
238
+ le(
239
+ E,
372
240
  (e) => {
373
- F.value = Object.fromEntries(
374
- O.value.map((r) => {
375
- var i;
241
+ q.value = Object.fromEntries(
242
+ N.value.map((l) => {
243
+ var s;
376
244
  return [
377
- r.id,
378
- se(r == null ? void 0 : r.responsive) ? (i = r.responsive) == null ? void 0 : i.includes(e) : !0
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 q = Q([]), k = Xe({
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 M.value;
259
+ return K.value;
392
260
  },
393
261
  onSortingChange: (e) => {
394
- q.value = typeof e == "function" ? e(q.value) : e;
262
+ O.value = typeof e == "function" ? e(O.value) : e;
395
263
  },
396
264
  state: {
397
265
  get sorting() {
398
- return q.value;
266
+ return O.value;
399
267
  },
400
268
  get rowSelection() {
401
269
  return o.value;
402
270
  },
403
271
  get columnVisibility() {
404
- return F.value;
272
+ return q.value;
405
273
  }
406
274
  },
407
275
  enableRowSelection: !0,
408
276
  get columns() {
409
- return O.value;
277
+ return N.value;
410
278
  },
411
- getRowId(e, r) {
412
- return s.rowKey ? e[s.rowKey] : r;
279
+ getRowId(e, l) {
280
+ return r.rowKey ? e[r.rowKey] : l;
413
281
  },
414
282
  getRowCanExpand: () => !0,
415
- getCoreRowModel: xe(),
416
- getSortedRowModel: Ye(),
283
+ getCoreRowModel: Ze(),
284
+ getSortedRowModel: Ge(),
417
285
  onRowSelectionChange: (e) => {
418
286
  o.value = typeof e == "function" ? e(o.value) : e;
419
287
  }
420
- }), E = P(() => ({
421
- selectedRowKeys: u.value,
422
- selectedRows: k.getFilteredSelectedRowModel().flatRows.map((e) => e.original)
288
+ }), H = D(() => ({
289
+ selectedRowKeys: a.value,
290
+ selectedRows: w.getFilteredSelectedRowModel().flatRows.map((e) => e.original)
423
291
  }));
424
- ae(
292
+ le(
425
293
  () => {
426
294
  var e;
427
- return (e = s.rowSelection) == null ? void 0 : e.selectedRowKeys;
295
+ return (e = r.rowSelection) == null ? void 0 : e.selectedRowKeys;
428
296
  },
429
- (e, r) => {
430
- var i, v;
431
- if ((v = (i = s.rowSelection) == null ? void 0 : i.selectedRowKeys) != null && v.length && !_e(e, r)) {
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(s.rowSelection.selectedRowKeys ?? Object.keys(o.value)).map(
434
- (_) => [_, !0]
301
+ t(r.rowSelection.selectedRowKeys ?? Object.keys(o.value)).map(
302
+ (b) => [b, !0]
435
303
  )
436
304
  );
437
- _e(n, o.value) || (o.value = n);
305
+ ve(n, o.value) || (o.value = n);
438
306
  }
439
307
  },
440
308
  { immediate: !0 }
441
309
  );
442
- const x = P(() => k.getIsAllRowsSelected() ? !0 : k.getIsSomeRowsSelected() ? "indeterminate" : !1), ee = (e) => {
443
- k.getIsSomeRowsSelected() || k.getIsAllRowsSelected() ? k.toggleAllRowsSelected(!1) : k.toggleAllRowsSelected(!0), le(() => {
444
- var r, i;
445
- V((r = s.rowSelection) == null ? void 0 : r.onSelectAll) && s.rowSelection.onSelectAll({ ...E.value, selected: e }), V((i = s.rowSelection) == null ? void 0 : i.onChange) && s.rowSelection.onChange(E.value);
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
- }, Ae = (e, r) => {
448
- var i;
449
- r.toggleSelected(e, {
450
- selectChildren: !((i = s.rowSelection) != null && i.checkStrictly)
451
- }), le(() => {
452
- var v, n;
453
- V((v = s.rowSelection) == null ? void 0 : v.onSelect) && s.rowSelection.onSelect({
454
- ...E.value,
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: r.original
457
- }), V((n = s.rowSelection) == null ? void 0 : n.onChange) && s.rowSelection.onChange(E.value);
324
+ record: l.original
325
+ }), W((n = r.rowSelection) == null ? void 0 : n.onChange) && r.rowSelection.onChange(H.value);
458
326
  });
459
- }, Ie = (e) => {
460
- var r, i;
461
- return V((r = s.rowSelection) == null ? void 0 : r.getCheckboxProps) && ((i = s.rowSelection) == null || i.getCheckboxProps(e)), {};
462
- }, ue = (e) => {
463
- var r;
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 ((r = e.subRows) != null && r.length) {
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
- }, de = Ne("target"), { stop: Te } = dt(de, ([e]) => {
471
- s.lazyLoading && !s.loading && (e != null && e.isIntersecting) && z("fetch");
338
+ }, ae = Ee("target"), { stop: ke } = ao(ae, ([e]) => {
339
+ r.lazyLoading && !r.loading && (e != null && e.isIntersecting) && x("fetch");
472
340
  });
473
- Oe(Te);
474
- const { getSkeletonProps: Pe, getThProps: Le, RenderCell: pe, getTdProps: te, getColProps: Me, isThVisible: Ve } = Bt(s, {
475
- selectionId: l,
476
- isColumnWrapped: Y
477
- }), me = P(() => Object.keys(o.value).length), De = () => {
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
- }, Ke = ze(c, {
347
+ }, Ie = fo(u, {
480
348
  variants: {
481
- empty: He("empty", c)
349
+ empty: ro("empty", u)
482
350
  }
483
- }), fe = qe(0), Ee = ({ item: e }, r) => {
484
- e.key === "a-z" && r.toggleSorting(!1, !1), e.key === "z-a" && r.toggleSorting(!0, !1), e.key === "wrap" && ce({ id: r.id }), fe.value++;
485
- }, je = (e) => {
486
- const r = e.getIsSorted();
487
- if (!r) return "tabler:arrows-up-down";
488
- if (r === "desc") return "tabler:arrow-down";
489
- if (r === "asc") return "tabler:arrow-up";
490
- }, ge = P(
491
- () => k.getHeaderGroups().map((e) => ({
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((r) => ({
494
- ...r,
495
- bindings: Le(r.getContext())
361
+ headers: e.headers.map((l) => ({
362
+ ...l,
363
+ bindings: $e(l.getContext())
496
364
  }))
497
365
  }))
498
366
  );
499
- return (e, r) => (a(), f("div", {
500
- class: d([t(C)(t(c), "root"), e.rootCls])
367
+ return (e, l) => (c(), v("div", {
368
+ class: g([t(_)(t(u), "root"), e.rootCls])
501
369
  }, [
502
- g(ve, {
370
+ f(ye, {
503
371
  "z-index": "1",
504
- open: !!(me.value && b.batchActions),
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: p(() => [
510
- w("div", {
511
- class: d(t(C)(t(c), "batch_actions"))
377
+ content: m(() => [
378
+ R("div", {
379
+ class: g(t(_)(t(u), "batch_actions"))
512
380
  }, [
513
- g(mt, {
514
- text: me.value,
381
+ f(uo, {
382
+ text: ue.value,
515
383
  size: "xsm"
516
384
  }, null, 8, ["text"]),
517
- w("div", {
518
- class: d(t(C)(t(c), "batch_actions__title"))
519
- }, J(e.batchActionsTitle), 3),
520
- w("div", {
521
- class: d(t(C)(t(c), "batch_actions__actions"))
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
- H(e.$slots, "batchActions", Ge(Ue(E.value)))
391
+ T(e.$slots, "batchActions", Ne(Oe(H.value)))
524
392
  ], 2),
525
- g(we, {
393
+ f(he, {
526
394
  type: "vertical",
527
- class: d(t(C)(t(c), "batch_actions__divider"))
395
+ class: g(t(_)(t(u), "batch_actions__divider"))
528
396
  }, null, 8, ["class"]),
529
- g(ke, {
397
+ f(we, {
530
398
  icon: "tabler:x",
531
399
  color: "gray",
532
400
  type: "ghost",
533
- onClick: De
401
+ onClick: Ae
534
402
  })
535
403
  ], 2)
536
404
  ]),
537
- default: p(() => [
538
- w("div", {
539
- class: d([t(C)(t(c), "scroll_area"), e.scrollAreaCls])
405
+ default: m(() => [
406
+ R("div", {
407
+ class: g([t(_)(t(u), "scroll_area"), e.scrollAreaCls])
540
408
  }, [
541
- w("div", {
542
- class: d([t(C)(t(c), "scroll_viewport"), e.scrollViewportCls])
409
+ R("div", {
410
+ class: g([t(_)(t(u), "scroll_viewport"), e.scrollViewportCls])
543
411
  }, [
544
- g(t(gt), {
412
+ f(t(po), {
545
413
  size: e.size,
546
- style: Fe({
414
+ style: Ve({
547
415
  tableLayout: e.tableLayout
548
416
  }),
549
- class: d([
550
- t(Ke)({
551
- empty: !t(k).getRowModel().rows.length
417
+ class: g([
418
+ t(Ie)({
419
+ empty: !t(w).getRowModel().rows.length
552
420
  }),
553
- s.class
421
+ r.class
554
422
  ])
555
423
  }, {
556
- default: p(() => [
557
- w("colgroup", null, [
558
- (a(!0), f(A, null, Z(t(k).getVisibleLeafColumns(), (i, v) => (a(), f("col", I({
559
- key: i.id,
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(Me)(i)), null, 16))), 128))
429
+ }, t(ze)(s)), null, 16))), 128))
562
430
  ]),
563
- e.noHeader ? R("", !0) : (a(), T(t(Ct), {
431
+ e.noHeader ? P("", !0) : (c(), I(t(go), {
564
432
  key: 0,
565
- class: d(e.theadCls),
433
+ class: g(e.theadCls),
566
434
  sticky: e.stickyHeader
567
435
  }, {
568
- default: p(() => [
569
- (a(!0), f(A, null, Z(ge.value, (i, v) => (a(), T(t(G), {
570
- key: i.id
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: p(() => [
573
- (a(!0), f(A, null, Z(i.headers, (n) => (a(), f(A, {
440
+ default: m(() => [
441
+ (c(!0), v($, null, M(s.headers, (n) => (c(), v($, {
574
442
  key: n.id
575
443
  }, [
576
- t(Ve)(v, ge.value.length, n.column.id) ? (a(), T(t(yt), I({
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 === l
448
+ "data-selection": n.column.id === i
581
449
  }), {
582
- default: p(() => [
583
- w("div", {
584
- class: d(t(C)(t(c), "header"))
450
+ default: m(() => [
451
+ R("div", {
452
+ class: g(t(_)(t(u), "header"))
585
453
  }, [
586
- w("div", {
587
- class: d(t(C)(t(c), "header__content"))
454
+ R("div", {
455
+ class: g(t(_)(t(u), "header__content"))
588
456
  }, [
589
- n.column.id !== l ? (a(), f(A, { key: 0 }, [
590
- w("div", {
591
- class: d(t(C)(t(c), "header__content__title"))
457
+ n.column.id !== i ? (c(), v($, { key: 0 }, [
458
+ R("div", {
459
+ class: g(t(_)(t(u), "header__content__title"))
592
460
  }, [
593
- H(e.$slots, "headerCell", I({ ref_for: !0 }, {
461
+ T(e.$slots, "headerCell", z({ ref_for: !0 }, {
594
462
  column: n.column.columnDef
595
463
  }), () => [
596
- g(t(pe), {
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() ? (a(), T(lt, {
470
+ n.column.getCanSort() ? (c(), I(Ye, {
603
471
  key: 0,
604
- class: d({ hide_filter_action: !n.column.getIsSorted() }),
605
- icon: je(n.column),
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 j;
612
- return (j = n.column.getToggleSortingHandler()) == null ? void 0 : j(_);
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"])) : R("", !0)
615
- ], 64)) : (a(), f(A, { key: 1 }, [
616
- w("div", {
617
- class: d(t(C)(t(c), "selection_space"))
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
- g(ye, {
487
+ f(pe, {
620
488
  rootCls: "w-fit",
621
- checked: x.value,
622
- onChange: ee
489
+ checked: J.value,
490
+ onChange: Q
623
491
  }, null, 8, ["checked"])
624
492
  ], 64))
625
493
  ], 2),
626
- ![y.value, l].includes(n.column.id) && !n.column.columns.length ? (a(), f("div", {
494
+ ![p.value, i].includes(n.column.id) && !n.column.columns.length ? (c(), v("div", {
627
495
  key: 0,
628
- class: d(t(C)(t(c), "header__action"))
496
+ class: g(t(_)(t(u), "header__action"))
629
497
  }, [
630
- (a(), T(ve, {
498
+ (c(), I(ye, {
631
499
  "z-index": "1",
632
500
  placement: "bottom-end",
633
- key: fe.value
501
+ key: me.value
634
502
  }, {
635
- content: p(() => [
636
- g(nt, {
637
- onSelect: (_) => Ee(_, n.column)
503
+ content: m(() => [
504
+ f(Xe, {
505
+ onSelect: (b) => Pe(b, n.column)
638
506
  }, {
639
- default: p(() => [
640
- n.column.getCanSort() ? (a(), f(A, { key: 0 }, [
641
- g(re, {
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: p(({ iconSize: _ }) => [
646
- g(X, {
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
- g(re, {
521
+ f(te, {
654
522
  title: "Sort Z → A",
655
523
  key: "z-a"
656
524
  }, {
657
- leading: p(({ iconSize: _ }) => [
658
- g(X, {
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
- g(we)
666
- ], 64)) : R("", !0),
667
- g(re, {
533
+ f(he)
534
+ ], 64)) : P("", !0),
535
+ f(te, {
668
536
  title: "Wrap Column",
669
537
  key: "wrap"
670
538
  }, {
671
- leading: p(({ iconSize: _ }) => [
672
- g(X, {
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: p(() => [
678
- g(ft, {
679
- checked: t(Y)(n.column.id)
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: p(() => [
689
- g(ke, {
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: d(t(C)(t(c), "header__action__hover"))
562
+ class: g(t(_)(t(u), "header__action__hover"))
695
563
  }, null, 8, ["class"])
696
564
  ]),
697
565
  _: 2
698
566
  }, 1024))
699
- ], 2)) : R("", !0)
567
+ ], 2)) : P("", !0)
700
568
  ], 2)
701
569
  ]),
702
570
  _: 2
703
- }, 1040, ["data-selection"])) : R("", !0)
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
- g(t(ht), {
712
- class: d(e.tbodyCls)
579
+ f(t(ho), {
580
+ class: g(e.tbodyCls)
713
581
  }, {
714
- default: p(() => [
715
- (a(!0), f(A, null, Z(t(k).getRowModel().rows, (i, v) => (a(), T(t(G), {
716
- key: i.id,
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: !!ue(i)
586
+ checked: !!ie(s)
719
587
  }, {
720
- default: p(() => [
721
- (a(!0), f(A, null, Z(i.getVisibleCells(), (n) => {
722
- var _, j;
723
- return a(), f(A, {
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
- ((_ = t(te)(n.getContext())) == null ? void 0 : _.colSpan) !== 0 && ((j = t(te)(n.getContext())) == null ? void 0 : j.rowSpan) !== 0 ? (a(), T(t(U), I({
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(te)(n.getContext())), Ce({
730
- default: p(() => [
731
- n.column.id === y.value && (b.hoverAction || b.action) ? (a(), f("div", {
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: d(t(C)(t(c), "action_cell"))
601
+ class: g(t(_)(t(u), "action_cell"))
734
602
  }, [
735
- w("div", {
736
- class: d([t(C)(t(c), "action_cell__hover"), e.actionHoverCls])
603
+ R("div", {
604
+ class: g([t(_)(t(u), "action_cell__hover"), e.actionHoverCls])
737
605
  }, [
738
- H(e.$slots, "hoverAction", I(
606
+ T(e.$slots, "hoverAction", z(
739
607
  { ref_for: !0 },
740
608
  {
741
609
  column: n.column.columnDef,
742
- record: i.original,
743
- index: v
610
+ record: s.original,
611
+ index: h
744
612
  }
745
613
  ))
746
614
  ], 2),
747
- H(e.$slots, "action", I(
615
+ T(e.$slots, "action", z(
748
616
  { ref_for: !0 },
749
617
  {
750
618
  column: n.column.columnDef,
751
- record: i.original,
752
- index: v
619
+ record: s.original,
620
+ index: h
753
621
  }
754
622
  ))
755
- ], 2)) : n.column.id !== l ? H(e.$slots, "bodyCell", I(
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: i.original,
763
- index: v
630
+ record: s.original,
631
+ index: h
764
632
  }
765
633
  ), () => [
766
- g(t(pe), {
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 && i.original[e.rowKey] ? (a(), f("div", {
638
+ ]) : e.rowKey && s.original[e.rowKey] ? (c(), v("div", {
771
639
  key: 2,
772
- class: d(t(C)(t(c), "selection"))
640
+ class: g(t(_)(t(u), "selection"))
773
641
  }, [
774
- w("div", {
775
- class: d(t(C)(t(c), "selection_space"))
642
+ R("div", {
643
+ class: g(t(_)(t(u), "selection_space"))
776
644
  }, null, 2),
777
- g(ye, I({
645
+ f(pe, z({
778
646
  rootCls: "w-fit",
779
- disabled: !i.getCanSelect(),
780
- checked: ue(i),
781
- onChange: (oe) => Ae(oe, i),
647
+ disabled: !s.getCanSelect(),
648
+ checked: ie(s),
649
+ onChange: (Y) => Se(Y, s),
782
650
  ref_for: !0
783
- }, Ie(i.original)), null, 16, ["disabled", "checked", "onChange"])
784
- ], 2)) : R("", !0)
651
+ }, Ce(s.original)), null, 16, ["disabled", "checked", "onChange"])
652
+ ], 2)) : P("", !0)
785
653
  ]),
786
654
  _: 2
787
655
  }, [
788
- b.cellAction && ![y.value, l].includes(n.column.id) ? {
656
+ S.cellAction && ![p.value, i].includes(n.column.id) ? {
789
657
  name: "absoluteAction",
790
- fn: p(() => [
791
- H(e.$slots, "cellAction", I(
658
+ fn: m(() => [
659
+ T(e.$slots, "cellAction", z(
792
660
  { ref_for: !0 },
793
661
  {
794
662
  column: n.column.columnDef,
795
- record: i.original,
796
- index: v
663
+ record: s.original,
664
+ index: h
797
665
  }
798
666
  ))
799
667
  ]),
800
668
  key: "0"
801
669
  } : void 0
802
- ]), 1040)) : R("", !0)
670
+ ]), 1040)) : P("", !0)
803
671
  ], 64);
804
672
  }), 128))
805
673
  ]),
806
674
  _: 2
807
675
  }, 1032, ["zebra", "checked"]))), 128)),
808
- s.loading ? (a(!0), f(A, { key: 0 }, Z(t(k).getRowModel().rows.length ? 2 : e.loadingRowCount, (i) => (a(), T(t(G), {
809
- key: i,
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: p(() => [
813
- (a(!0), f(A, null, Z(t(k).getVisibleLeafColumns(), (v, n) => (a(), T(t(U), { key: n }, {
814
- default: p(() => [
815
- v.id !== l ? H(e.$slots, "skeleton", I({
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: v.columnDef }), () => [
819
- g(pt, I({ ref_for: !0 }, t(Pe)(v.columnDef)), null, 16)
820
- ]) : R("", !0)
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)) : R("", !0),
827
- t(k).getRowModel().rows.length ? R("", !0) : (a(), T(t(G), {
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: p(() => [
832
- g(t(U), {
833
- colspan: t(k).getVisibleLeafColumns().length,
699
+ default: m(() => [
700
+ f(t(G), {
701
+ colspan: t(w).getVisibleLeafColumns().length,
834
702
  empty: ""
835
703
  }, {
836
- default: p(() => [
837
- g(zt, I({ type: "advance" }, e.emptyProps), Ce({ _: 2 }, [
838
- b.emptyTitle ? {
704
+ default: m(() => [
705
+ f(eo, z({ type: "advance" }, e.emptyProps), fe({ _: 2 }, [
706
+ S.emptyTitle ? {
839
707
  name: "title",
840
- fn: p(() => [
841
- H(e.$slots, "emptyTitle")
708
+ fn: m(() => [
709
+ T(e.$slots, "emptyTitle")
842
710
  ]),
843
711
  key: "0"
844
712
  } : void 0,
845
- b.emptyDescription ? {
713
+ S.emptyDescription ? {
846
714
  name: "title",
847
- fn: p(() => [
848
- H(e.$slots, "emptyDescription")
715
+ fn: m(() => [
716
+ T(e.$slots, "emptyDescription")
849
717
  ]),
850
718
  key: "1"
851
719
  } : void 0,
852
- b.emptyActions ? {
720
+ S.emptyActions ? {
853
721
  name: "title",
854
- fn: p(() => [
855
- H(e.$slots, "emptyActions")
722
+ fn: m(() => [
723
+ T(e.$slots, "emptyActions")
856
724
  ]),
857
725
  key: "2"
858
726
  } : void 0,
859
- b.emptyImage ? {
727
+ S.emptyImage ? {
860
728
  name: "title",
861
- fn: p(() => [
862
- H(e.$slots, "emptyImage")
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 ? (a(), T(t(G), {
741
+ e.lazyLoading ? (c(), I(t(F), {
874
742
  key: 2,
875
743
  "lazy-load-observer": ""
876
744
  }, {
877
- default: p(() => [
878
- g(t(U), {
745
+ default: m(() => [
746
+ f(t(G), {
879
747
  ref_key: "target",
880
- ref: de,
748
+ ref: ae,
881
749
  "lazy-load-observer": ""
882
750
  }, null, 512)
883
751
  ]),
884
752
  _: 1
885
- })) : R("", !0)
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
- no as DataTable,
902
- no as default
769
+ Fo as DataTable,
770
+ Fo as default
903
771
  };