bitboss-ui 2.1.128 → 2.1.129
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/ai/BbTable.md +326 -90
- package/dist/components/BbTable/types.d.ts +10 -4
- package/dist/composables/useTableWidthContext.d.ts +7 -0
- package/dist/index.css +1 -1
- package/dist/index325.js +25 -21
- package/dist/index327.js +312 -280
- package/package.json +2 -2
package/dist/index327.js
CHANGED
|
@@ -13,52 +13,52 @@ import { useHashedWatcher as d } from "./index96.js";
|
|
|
13
13
|
import { usePrefill as ee } from "./index97.js";
|
|
14
14
|
import { when as te } from "./index151.js";
|
|
15
15
|
import f from "./index154.js";
|
|
16
|
-
import { useTableWidthContext as
|
|
17
|
-
import { applyFixedTableColumns as
|
|
18
|
-
import { Fragment as
|
|
16
|
+
import { useTableWidthContext as ne } from "./index325.js";
|
|
17
|
+
import { applyFixedTableColumns as re, columnKeyToSlotName as p, mergeCellClasses as ie, mergeHeaderClasses as ae } from "./index326.js";
|
|
18
|
+
import { Fragment as m, computed as h, createBlock as oe, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createTextVNode as se, createVNode as ce, defineComponent as y, mergeModels as le, mergeProps as ue, nextTick as de, normalizeClass as b, normalizeStyle as x, onBeforeUnmount as fe, onMounted as pe, openBlock as S, reactive as me, ref as C, renderList as w, renderSlot as T, resolveDynamicComponent as he, toDisplayString as E, toRef as ge, unref as D, useModel as _e, watch as O, withCtx as ve } from "vue";
|
|
19
19
|
//#region src/components/BbTable/BbTable.vue?vue&type=script&setup=true&lang.ts
|
|
20
|
-
var
|
|
20
|
+
var ye = {
|
|
21
21
|
key: 0,
|
|
22
22
|
class: "sr-only"
|
|
23
|
-
},
|
|
23
|
+
}, be = ["aria-rowindex"], xe = { class: "bb-table-header__content" }, Se = { class: "bb-table-check__label-text sr-only" }, Ce = {
|
|
24
24
|
key: 1,
|
|
25
25
|
class: "bb-table-radio__label-text sr-only"
|
|
26
|
-
},
|
|
26
|
+
}, we = ["aria-sort"], Te = { class: "bb-table-header__content" }, Ee = { class: "bb-table-header__content sr-only" }, De = ["aria-rowindex"], Oe = {
|
|
27
27
|
key: 0,
|
|
28
28
|
class: "bb-table-skeleton__cell bb-table-skeleton__cell--select"
|
|
29
|
-
},
|
|
29
|
+
}, ke = {
|
|
30
30
|
key: 0,
|
|
31
31
|
class: "bb-table-skeleton__cell-content"
|
|
32
|
-
},
|
|
32
|
+
}, Ae = {
|
|
33
33
|
key: 1,
|
|
34
34
|
class: "bb-table-skeleton__avatar"
|
|
35
|
-
},
|
|
35
|
+
}, je = {
|
|
36
36
|
key: 2,
|
|
37
37
|
class: "bb-table-skeleton__avatar-text"
|
|
38
|
-
},
|
|
38
|
+
}, Me = { class: "bb-table-skeleton__cell-content" }, Ne = {
|
|
39
39
|
key: 3,
|
|
40
40
|
class: "bb-table-skeleton__image"
|
|
41
|
-
},
|
|
41
|
+
}, Pe = {
|
|
42
42
|
key: 4,
|
|
43
43
|
class: "bb-table-skeleton__badge"
|
|
44
|
-
},
|
|
44
|
+
}, Fe = {
|
|
45
45
|
key: 1,
|
|
46
46
|
class: "bb-table-skeleton__cell bb-table-skeleton__cell--actions"
|
|
47
|
-
},
|
|
47
|
+
}, Ie = ["aria-rowindex"], Le = ["colspan"], Re = { class: "bb-table-loading__text sr-only" }, ze = ["aria-rowindex"], Be = ["colspan"], Ve = { class: "bb-table-no-data__text" }, He = [
|
|
48
48
|
"aria-rowindex",
|
|
49
49
|
"onClick",
|
|
50
50
|
"onContextmenu",
|
|
51
51
|
"onDblclick"
|
|
52
|
-
],
|
|
52
|
+
], Ue = { class: "bb-table-check__label-text sr-only" }, We = { class: "bb-table-radio__label-text sr-only" }, Ge = ["aria-rowindex", "id"], Ke = ["colspan"], qe = /* @__PURE__ */ y({
|
|
53
53
|
__name: "BbTable",
|
|
54
|
-
props: /* @__PURE__ */
|
|
54
|
+
props: /* @__PURE__ */ le({
|
|
55
55
|
accessibleLabel: {},
|
|
56
56
|
actions: { type: Boolean },
|
|
57
57
|
actionsText: { default: "Azioni" },
|
|
58
58
|
align: { default: "left" },
|
|
59
59
|
id: {},
|
|
60
60
|
inheritColumnWidths: {
|
|
61
|
-
type: Boolean,
|
|
61
|
+
type: [Boolean, String],
|
|
62
62
|
default: !0
|
|
63
63
|
},
|
|
64
64
|
allowSelectAll: {
|
|
@@ -115,7 +115,7 @@ var ve = {
|
|
|
115
115
|
},
|
|
116
116
|
expandedItemsModifiers: {}
|
|
117
117
|
}),
|
|
118
|
-
emits: /* @__PURE__ */
|
|
118
|
+
emits: /* @__PURE__ */ le([
|
|
119
119
|
"click:row",
|
|
120
120
|
"contextmenu:row",
|
|
121
121
|
"dblclick:row",
|
|
@@ -126,42 +126,43 @@ var ve = {
|
|
|
126
126
|
"item:selected",
|
|
127
127
|
"item:unselected"
|
|
128
128
|
], ["update:selectAll", "update:expandedItems"]),
|
|
129
|
-
setup(
|
|
130
|
-
let { getItemValue:
|
|
131
|
-
|
|
132
|
-
let { t:
|
|
133
|
-
id: () =>
|
|
134
|
-
container: () =>
|
|
135
|
-
|
|
129
|
+
setup(y, { emit: le }) {
|
|
130
|
+
let { getItemValue: qe } = c(), Je = t().id.value, k = y, A = le;
|
|
131
|
+
k.multiple && !Array.isArray(k.modelValue) && n().throw("BbTable is set for multiple selection but modelValue is not an array.");
|
|
132
|
+
let { t: j } = r(), M = C(), N = C(), { id: Ye, parentId: P, parentNode: F, cssVars: Xe, parentVar: Ze, setTracks: Qe } = ne({
|
|
133
|
+
id: () => k.id,
|
|
134
|
+
container: () => N.value,
|
|
135
|
+
inheritFrom: () => typeof k.inheritColumnWidths == "string" ? k.inheritColumnWidths : void 0
|
|
136
|
+
}), I = h(() => k.inheritColumnWidths !== !1), L = h(() => k.fixed || k.columns.some((e) => e.width != null) || I.value && !!P.value), R = h(() => I.value && !!P.value), $e = R, et = (e) => {
|
|
136
137
|
if (typeof e == "number") return `${e}px`;
|
|
137
138
|
let t = e.trim();
|
|
138
139
|
return /^-?\d*\.?\d+$/.test(t) ? `${t}px` : t;
|
|
139
|
-
},
|
|
140
|
-
let e =
|
|
140
|
+
}, tt = h(() => {
|
|
141
|
+
let e = F.value?.tracks;
|
|
141
142
|
return e ? Object.keys(e).filter((e) => /^\d+$/.test(e)).length : 0;
|
|
142
|
-
}),
|
|
143
|
-
let e =
|
|
143
|
+
}), nt = h(() => {
|
|
144
|
+
let e = F.value?.tracks ?? {}, t = [];
|
|
144
145
|
"select" in e && t.push("select");
|
|
145
|
-
for (let e = 0; e <
|
|
146
|
+
for (let e = 0; e < tt.value; e++) t.push(String(e));
|
|
146
147
|
return "actions" in e && t.push("actions"), t;
|
|
147
|
-
}),
|
|
148
|
-
let t =
|
|
149
|
-
return t ?
|
|
150
|
-
},
|
|
151
|
-
if (!
|
|
148
|
+
}), rt = h(() => +("select" in (F.value?.tracks ?? {}))), it = h(() => rt.value + tt.value), at = h(() => nt.value.length), ot = (e) => {
|
|
149
|
+
let t = nt.value[e];
|
|
150
|
+
return t ? Ze(t, "0px") : "0px";
|
|
151
|
+
}, st = (e, t) => {
|
|
152
|
+
if (!P.value || t - e <= 1e-6) return null;
|
|
152
153
|
let n = [];
|
|
153
154
|
for (let r = Math.floor(e); r < Math.ceil(t - 1e-6); r++) {
|
|
154
155
|
let i = Math.min(t, r + 1) - Math.max(e, r);
|
|
155
156
|
if (i <= 1e-6) continue;
|
|
156
|
-
let a =
|
|
157
|
+
let a = ot(r);
|
|
157
158
|
n.push(i >= .999999 ? a : `${Number(i.toFixed(4))} * ${a}`);
|
|
158
159
|
}
|
|
159
160
|
return n.length ? n.length === 1 && !n[0].includes("*") ? n[0] : `calc(${n.join(" + ")})` : null;
|
|
160
|
-
},
|
|
161
|
-
let e =
|
|
161
|
+
}, z = h(() => {
|
|
162
|
+
let e = k.columns, t = e.map((e) => typeof e.snap == "number" ? e.snap : Array.isArray(e.snap) ? e.snap[0] : null), n = rt.value;
|
|
162
163
|
return e.map((e, r) => {
|
|
163
164
|
let i = t[r] ?? n, a;
|
|
164
|
-
if (Array.isArray(e.snap)) a = e.snap[1] === -1 ?
|
|
165
|
+
if (Array.isArray(e.snap)) a = e.snap[1] === -1 ? it.value : e.snap[1];
|
|
165
166
|
else {
|
|
166
167
|
let e = t[r + 1];
|
|
167
168
|
a = e != null && e > i ? e : Math.floor(i) + 1;
|
|
@@ -171,77 +172,98 @@ var ve = {
|
|
|
171
172
|
end: a
|
|
172
173
|
};
|
|
173
174
|
});
|
|
174
|
-
}),
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
175
|
+
}), ct = (e) => R.value && e.start >= it.value, lt = h(() => z.value.some(ct)), B = (e) => k.columns[e]?.width == null && !R.value, V = h(() => {
|
|
176
|
+
if (!R.value) return -1;
|
|
177
|
+
for (let e = k.columns.length - 1; e >= 0; e--) {
|
|
178
|
+
let t = k.columns[e];
|
|
179
|
+
if (t.width == null && t.snap == null) return e;
|
|
180
|
+
}
|
|
181
|
+
return -1;
|
|
182
|
+
}), ut = h(() => {
|
|
183
|
+
let e = z.value[0];
|
|
184
|
+
if (!I.value || !P.value || !e) return null;
|
|
185
|
+
let t = st(0, e.start), n = k.selectable ? H.select : null;
|
|
186
|
+
return n ? `calc(${t ?? "0px"} - ${n})` : t;
|
|
187
|
+
}), dt = h(() => {
|
|
188
|
+
let e = z.value, t = e[e.length - 1];
|
|
189
|
+
if (!I.value || !P.value || !t || lt.value || V.value === k.columns.length - 1) return null;
|
|
190
|
+
let n = st(t.end, at.value), r = k.actions ? H.actions : null;
|
|
191
|
+
return r ? `calc(${n ?? "0px"} - ${r})` : n;
|
|
192
|
+
}), ft = h(() => ut.value !== null), pt = h(() => dt.value !== null), H = me({
|
|
183
193
|
select: null,
|
|
184
194
|
actions: null
|
|
185
|
-
}),
|
|
186
|
-
let e = (e) =>
|
|
187
|
-
|
|
195
|
+
}), mt = h(() => {
|
|
196
|
+
let e = (e) => I.value ? Ze(e) : "auto", t = (t) => L.value && H[t] ? H[t] : e(t), n = [];
|
|
197
|
+
k.selectable && n.push({
|
|
188
198
|
key: "select",
|
|
189
199
|
width: t("select")
|
|
190
200
|
});
|
|
191
|
-
let r =
|
|
192
|
-
return
|
|
193
|
-
let i = String(t), a = e.width == null ? null :
|
|
194
|
-
|
|
195
|
-
|
|
201
|
+
let r = k.columns.length - 1;
|
|
202
|
+
return k.columns.forEach((e, t) => {
|
|
203
|
+
let i = String(t), a = e.width == null ? null : et(e.width), o = z.value[t];
|
|
204
|
+
if (t === V.value && !lt.value) {
|
|
205
|
+
n.push({
|
|
206
|
+
key: i,
|
|
207
|
+
width: "auto"
|
|
208
|
+
});
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
let s;
|
|
212
|
+
s = a ?? (B(t) ? L.value && xt.value[t] || null : ct(o) ? St.value[t] ?? null : st(o.start, o.end));
|
|
213
|
+
let c = [];
|
|
214
|
+
t === 0 && ft.value && c.push("var(--bb-table-offset-internal-start)"), t === r && pt.value && c.push("var(--bb-table-offset-internal-end)");
|
|
215
|
+
let l = c.length ? `calc(${[...c, s ?? "0px"].join(" + ")})` : s ?? "auto";
|
|
196
216
|
n.push({
|
|
197
217
|
key: i,
|
|
198
|
-
width:
|
|
218
|
+
width: l
|
|
199
219
|
});
|
|
200
|
-
}),
|
|
220
|
+
}), k.actions && n.push({
|
|
201
221
|
key: "actions",
|
|
202
222
|
width: t("actions")
|
|
203
223
|
}), n;
|
|
204
|
-
}),
|
|
224
|
+
}), ht = h(() => {
|
|
205
225
|
let e = {};
|
|
206
|
-
return
|
|
207
|
-
}),
|
|
226
|
+
return ut.value && (e["--bb-table-offset-start"] = ut.value), dt.value && (e["--bb-table-offset-end"] = dt.value), e;
|
|
227
|
+
}), gt = h(() => {
|
|
208
228
|
let e = {
|
|
209
|
-
...
|
|
210
|
-
...
|
|
229
|
+
...Xe.value,
|
|
230
|
+
...ht.value
|
|
211
231
|
};
|
|
212
|
-
return
|
|
213
|
-
}),
|
|
214
|
-
let e =
|
|
215
|
-
|
|
232
|
+
return Ct.value && (e["--bb-table-natural-width"] = Ct.value), U.value > 0 && (e["--bb-table-fill"] = `${U.value}px`), e;
|
|
233
|
+
}), _t = () => Array.from(M.value?.querySelectorAll(":scope > thead > tr.bb-table-header-row > th") ?? []), vt = () => {
|
|
234
|
+
let e = mt.value.map((e) => e.key), t = {};
|
|
235
|
+
_t().forEach((n, r) => {
|
|
216
236
|
let i = e[r];
|
|
217
237
|
i != null && (t[i] = `${n.getBoundingClientRect().width}px`);
|
|
218
|
-
}),
|
|
219
|
-
},
|
|
220
|
-
let e =
|
|
238
|
+
}), Qe(t);
|
|
239
|
+
}, yt = () => {
|
|
240
|
+
let e = M.value;
|
|
221
241
|
if (!e) return;
|
|
222
242
|
let t = (t) => {
|
|
223
243
|
let n = 0;
|
|
224
244
|
return e.querySelectorAll(t).forEach((e) => {
|
|
225
|
-
let t =
|
|
245
|
+
let t = Infinity, r = -Infinity;
|
|
226
246
|
e.querySelectorAll(":scope > *").forEach((e) => {
|
|
227
|
-
|
|
247
|
+
let n = e.getBoundingClientRect();
|
|
248
|
+
t = Math.min(t, n.left), r = Math.max(r, n.right);
|
|
228
249
|
});
|
|
229
|
-
let r = getComputedStyle(e),
|
|
230
|
-
n = Math.max(n,
|
|
250
|
+
let i = r > t ? r - t : 0, a = getComputedStyle(e), o = parseFloat(a.paddingLeft) + parseFloat(a.paddingRight);
|
|
251
|
+
n = Math.max(n, i + o);
|
|
231
252
|
}), n > 0 ? `${Math.ceil(n)}px` : null;
|
|
232
253
|
};
|
|
233
|
-
|
|
234
|
-
},
|
|
235
|
-
|
|
236
|
-
},
|
|
237
|
-
let e =
|
|
238
|
-
if (!e || !
|
|
239
|
-
let t = e.offsetWidth, n = +!!
|
|
240
|
-
|
|
241
|
-
|
|
254
|
+
H.select = k.selectable ? t(":scope > thead > tr > th.bb-table-header--select, :scope > tbody > tr > td.bb-table-data__cell--select") : null, H.actions = k.actions ? t(":scope > thead > tr > th.bb-table-header--actions, :scope > tbody > tr > td.bb-table__cell--actions") : null;
|
|
255
|
+
}, bt = () => {
|
|
256
|
+
yt(), vt();
|
|
257
|
+
}, xt = C([]), St = C([]), U = C(0), Ct = C(null), wt = () => {
|
|
258
|
+
let e = N.value;
|
|
259
|
+
if (!e || !L.value || !k.columns.some((e) => e.width != null) && !lt.value && V.value < 0) return;
|
|
260
|
+
let t = e.offsetWidth, n = +!!k.selectable, r = H.select ? parseFloat(H.select) : 0, i = H.actions ? parseFloat(H.actions) : 0, a = _t(), o = 0, s = 0;
|
|
261
|
+
k.columns.forEach((e, t) => {
|
|
262
|
+
let r = a[n + t]?.getBoundingClientRect().width ?? 0;
|
|
263
|
+
e.width != null && (o += r), B(t) || (s += r);
|
|
242
264
|
});
|
|
243
|
-
let
|
|
244
|
-
|
|
265
|
+
let c = document.createElement("div");
|
|
266
|
+
c.style.cssText = [
|
|
245
267
|
"position:absolute",
|
|
246
268
|
"top:-9999px",
|
|
247
269
|
"left:-9999px",
|
|
@@ -251,114 +273,118 @@ var ve = {
|
|
|
251
273
|
`height:${e.offsetHeight}px`,
|
|
252
274
|
"overflow:visible"
|
|
253
275
|
].join(";");
|
|
254
|
-
let
|
|
255
|
-
|
|
256
|
-
let
|
|
257
|
-
|
|
276
|
+
let l = e.cloneNode(!0);
|
|
277
|
+
l.classList.remove("bb-table--fixed"), l.querySelectorAll(".bb-table-expand__row").forEach((e) => e.remove());
|
|
278
|
+
let u = Array.from(l.querySelectorAll("col"));
|
|
279
|
+
k.columns.forEach((e, t) => {
|
|
258
280
|
if (e.width == null) {
|
|
259
|
-
let e =
|
|
281
|
+
let e = u[n + t];
|
|
260
282
|
e && (e.style.width = "");
|
|
261
283
|
}
|
|
262
284
|
});
|
|
263
|
-
let
|
|
264
|
-
|
|
265
|
-
let
|
|
285
|
+
let d = l.querySelector("table");
|
|
286
|
+
d && (d.style.width = "min-content", d.style.minWidth = "0"), c.appendChild(l), document.body.appendChild(c);
|
|
287
|
+
let ee = c.querySelector("table thead tr.bb-table-header-row"), te = ee ? Array.from(ee.querySelectorAll(":scope > th")) : [], f = k.columns.map((e, t) => {
|
|
266
288
|
if (e.width != null) return 0;
|
|
267
|
-
let r =
|
|
289
|
+
let r = te[n + t];
|
|
268
290
|
return r ? r.getBoundingClientRect().width : 0;
|
|
269
291
|
});
|
|
270
|
-
document.body.removeChild(
|
|
271
|
-
let
|
|
272
|
-
|
|
273
|
-
if (
|
|
274
|
-
let n =
|
|
275
|
-
if (
|
|
276
|
-
let r =
|
|
277
|
-
return
|
|
278
|
-
})
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
292
|
+
document.body.removeChild(c);
|
|
293
|
+
let ne = k.columns.reduce((e, t, n) => e + (B(n) ? f[n] : 0), 0), re = t - s - r - i, p = (e) => `${Number(e.toFixed(3))}px`;
|
|
294
|
+
if (xt.value = k.columns.map((e, t) => {
|
|
295
|
+
if (!B(t)) return null;
|
|
296
|
+
let n = f[t];
|
|
297
|
+
if (ne <= 0) return p(n);
|
|
298
|
+
let r = re > 0 ? n / ne * re : 0;
|
|
299
|
+
return p(Math.max(n, r));
|
|
300
|
+
}), St.value = f.map((e) => e > 0 ? p(e) : null), V.value >= 0) {
|
|
301
|
+
let e = Object.values(F.value?.tracks ?? {}).reduce((e, t) => e + (parseFloat(t) || 0), 0), t = a.reduce((e, t) => e + t.getBoundingClientRect().width, 0);
|
|
302
|
+
U.value = Math.max(0, e - t + U.value);
|
|
303
|
+
} else U.value = 0;
|
|
304
|
+
let ie = f.reduce((e, t) => e + t, 0), ae = o + ie + r + i;
|
|
305
|
+
Ct.value = ae > 0 ? `${Math.ceil(ae)}px` : null;
|
|
306
|
+
}, W = null, Tt, Et = () => {
|
|
307
|
+
W !== null && clearTimeout(W), W = setTimeout(() => {
|
|
308
|
+
W = null, wt();
|
|
284
309
|
}, 200);
|
|
285
|
-
},
|
|
286
|
-
|
|
310
|
+
}, G, Dt, Ot = () => {
|
|
311
|
+
G && (G.disconnect(), _t().forEach((e) => G?.observe(e)), bt());
|
|
287
312
|
};
|
|
288
|
-
|
|
289
|
-
|
|
313
|
+
pe(() => {
|
|
314
|
+
G = new ResizeObserver(() => bt()), Ot(), de(wt), M.value && (Tt = new MutationObserver(Et), Tt.observe(M.value, {
|
|
290
315
|
childList: !0,
|
|
291
316
|
subtree: !0,
|
|
292
317
|
characterData: !0
|
|
293
|
-
})),
|
|
294
|
-
}),
|
|
295
|
-
|
|
296
|
-
}),
|
|
297
|
-
let
|
|
318
|
+
})), N.value && (Dt = new ResizeObserver(Et), Dt.observe(N.value));
|
|
319
|
+
}), fe(() => {
|
|
320
|
+
G?.disconnect(), Dt?.disconnect(), Tt?.disconnect(), W !== null && clearTimeout(W);
|
|
321
|
+
}), O(mt, () => de(Ot), { flush: "post" });
|
|
322
|
+
let kt = (e) => [j("table.select").value, ...e.map((e) => e.content)].join(" "), At = h(() => k.selectable ? "fieldset" : "div"), jt = h(() => k.loading || Lt.value), K = h(() => !u(k.page) && !u(k.perPage) && !u(k.totalItems)), Mt = h(() => ({
|
|
298
323
|
"bb-table": !0,
|
|
299
|
-
[`bb-table--align-${
|
|
300
|
-
"bb-table--compact":
|
|
301
|
-
"bb-table--fixed":
|
|
302
|
-
"bb-table--inherit-widths":
|
|
303
|
-
"bb-table--fixed-header":
|
|
304
|
-
"bb-table--loading":
|
|
305
|
-
"bb-table--empty": !
|
|
306
|
-
"bb-table--selectable": !!
|
|
307
|
-
|
|
324
|
+
[`bb-table--align-${k.align}`]: !0,
|
|
325
|
+
"bb-table--compact": k.compact,
|
|
326
|
+
"bb-table--fixed": L.value,
|
|
327
|
+
"bb-table--inherit-widths": $e.value,
|
|
328
|
+
"bb-table--fixed-header": k.fixedHeaders,
|
|
329
|
+
"bb-table--loading": jt.value,
|
|
330
|
+
"bb-table--empty": !q.value.length,
|
|
331
|
+
"bb-table--selectable": !!k.selectable,
|
|
332
|
+
"scrollbar-border": !0
|
|
333
|
+
})), Nt = h(() => k.columns.length + Number(!!k.selectable) + Number(!!k.actions)), Pt = h(() => Object.fromEntries(k.columns.map((e) => [e.key, p(e.key)]))), { getter: Ft, items: It, loading: Lt } = o({ items: ge(k, "items") }), { hasPrefilled: Rt } = ee({
|
|
308
334
|
trigger: !0,
|
|
309
335
|
fn: async (e) => {
|
|
310
|
-
await
|
|
336
|
+
await Ft(e, k.modelValue);
|
|
311
337
|
}
|
|
312
|
-
}), { data:
|
|
313
|
-
disabled:
|
|
314
|
-
items:
|
|
338
|
+
}), { data: zt } = s({ items: ge(k, "modelValue") }), { options: q } = l({
|
|
339
|
+
disabled: ge(k, "disabled"),
|
|
340
|
+
items: It,
|
|
315
341
|
itemText: void 0,
|
|
316
|
-
itemValue:
|
|
317
|
-
max:
|
|
342
|
+
itemValue: k.itemValue,
|
|
343
|
+
max: k.max,
|
|
318
344
|
selectable: !0,
|
|
319
|
-
selectedIndexedByHash:
|
|
320
|
-
}),
|
|
321
|
-
|
|
322
|
-
},
|
|
323
|
-
if (
|
|
324
|
-
let t = { ...
|
|
325
|
-
delete t[e.valueHash],
|
|
326
|
-
} else
|
|
345
|
+
selectedIndexedByHash: zt
|
|
346
|
+
}), Bt = async (e) => {
|
|
347
|
+
k.multiple ? A("update:modelValue", k.modelValue.concat(e.value)) : A("update:modelValue", e.value);
|
|
348
|
+
}, Vt = async (e) => {
|
|
349
|
+
if (k.multiple) {
|
|
350
|
+
let t = { ...zt.value };
|
|
351
|
+
delete t[e.valueHash], A("update:modelValue", Object.values(t));
|
|
352
|
+
} else A("update:modelValue", null);
|
|
327
353
|
};
|
|
328
|
-
d(() => [
|
|
329
|
-
|
|
330
|
-
}, { debounce:
|
|
331
|
-
let
|
|
332
|
-
let n =
|
|
354
|
+
d(() => [k.dependencies, k.items], async () => {
|
|
355
|
+
Rt.value && await Ft(!1, k.modelValue);
|
|
356
|
+
}, { debounce: k.depsDebounceTime });
|
|
357
|
+
let Ht = (e, t) => {
|
|
358
|
+
let n = Pt.value[e.key], r = e.align ?? "left", i = qe(t.item, e.key);
|
|
333
359
|
return e.formatter && (!u(i) || e.formatOnNull !== !1) && (i = e.formatter(i, e.key, t.item)), e.placeholder && u(i) && (i = e.placeholder), {
|
|
334
360
|
align: r,
|
|
335
|
-
classes:
|
|
361
|
+
classes: ie([`bb-table-data__cell--${r}`], k.tdClass, e.tdClass, i, e.key, t.item),
|
|
336
362
|
content: i,
|
|
337
363
|
key: e.key,
|
|
338
364
|
label: e.label,
|
|
339
365
|
slotName: n
|
|
340
366
|
};
|
|
341
|
-
},
|
|
342
|
-
let t = e.align ?? "left", n = `header:${
|
|
367
|
+
}, Ut = h(() => k.columns.map((e) => {
|
|
368
|
+
let t = e.align ?? "left", n = `header:${Pt.value[e.key]}`, r = e.sorted ? e.sorted === "asc" ? "ascending" : "descending" : void 0;
|
|
343
369
|
return {
|
|
344
370
|
align: t,
|
|
345
371
|
key: e.key,
|
|
346
372
|
label: e.label,
|
|
347
373
|
slotName: n,
|
|
348
|
-
classes:
|
|
374
|
+
classes: ae([`bb-table-header--${t}`], k.thClass, e.thClass),
|
|
349
375
|
sortDirection: r
|
|
350
376
|
};
|
|
351
|
-
})),
|
|
377
|
+
})), Wt = h(() => {
|
|
352
378
|
let e = 0;
|
|
353
|
-
return
|
|
354
|
-
let r = !
|
|
379
|
+
return q.value.map((t, n) => {
|
|
380
|
+
let r = !k.selectable || typeof k.selectable == "function" && !k.selectable(t.item) || !!t.disabled, i = (k.page ?? -1) * (k.perPage ?? 0), a = n + 1, o = i + 1 + a + e, s = k.columns.map((e) => Ht(e, t)), c = X.value[t.valueHash] ?? !1;
|
|
355
381
|
return c && e++, {
|
|
356
|
-
accessibleLabel:
|
|
382
|
+
accessibleLabel: kt(s),
|
|
357
383
|
cols: s,
|
|
358
384
|
expanded: c,
|
|
359
|
-
onRowClick: (e) =>
|
|
360
|
-
onRowContextMenu: (e) =>
|
|
361
|
-
onRowDblClick: (e) =>
|
|
385
|
+
onRowClick: (e) => A("click:row", e, t, !!t.selected),
|
|
386
|
+
onRowContextMenu: (e) => A("contextmenu:row", e, t, !!t.selected),
|
|
387
|
+
onRowDblClick: (e) => A("dblclick:row", e, t, !!t.selected),
|
|
362
388
|
item: t.item,
|
|
363
389
|
text: t.text,
|
|
364
390
|
rowIndex: o,
|
|
@@ -368,96 +394,96 @@ var ve = {
|
|
|
368
394
|
disabled: r
|
|
369
395
|
};
|
|
370
396
|
});
|
|
371
|
-
}),
|
|
397
|
+
}), J = _e(y, "selectAll"), Y = _e(y, "expandedItems"), { data: X } = s({ items: Y }), Gt = (e, t) => {
|
|
372
398
|
e.target instanceof HTMLElement && (e.target instanceof HTMLButtonElement || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), Z(t)));
|
|
373
|
-
},
|
|
374
|
-
"aria-controls": u(
|
|
399
|
+
}, Kt = (e) => ({
|
|
400
|
+
"aria-controls": u(X.value[e.valueHash]) ? void 0 : `expanded_${e.valueHash}`,
|
|
375
401
|
"aria-expanded": e.expanded ? "true" : "false",
|
|
376
402
|
onClick: (t) => {
|
|
377
403
|
t.stopPropagation(), Z(e.valueHash);
|
|
378
404
|
},
|
|
379
|
-
onKeydown: (t) =>
|
|
405
|
+
onKeydown: (t) => Gt(t, e.valueHash)
|
|
380
406
|
}), Z = (e) => {
|
|
381
|
-
let t =
|
|
382
|
-
t && (e in
|
|
407
|
+
let t = q.value.find((t) => t.valueHash === e);
|
|
408
|
+
t && (e in X.value ? Y.value = Y.value.filter((t) => i(t) !== e) : Y.value = [...Y.value, t.value]);
|
|
383
409
|
};
|
|
384
|
-
|
|
385
|
-
Q.clear(),
|
|
410
|
+
O(J, () => {
|
|
411
|
+
Q.clear(), A("update:unselectedItems", []), A("update:modelValue", []);
|
|
386
412
|
});
|
|
387
|
-
let
|
|
388
|
-
|
|
389
|
-
Q.clear(),
|
|
413
|
+
let qt = h(() => !!(k.multiple && k.modelValue.length > 0 && !k.selectAll || J.value && Q.size > 0)), Q = me(/* @__PURE__ */ new Set());
|
|
414
|
+
O(() => k.unselectedItems, () => {
|
|
415
|
+
Q.clear(), k.unselectedItems.forEach((e) => {
|
|
390
416
|
Q.add(i(e));
|
|
391
417
|
});
|
|
392
418
|
});
|
|
393
|
-
let
|
|
394
|
-
if (
|
|
395
|
-
|
|
419
|
+
let Jt = (e) => {
|
|
420
|
+
if (Yt(e)) {
|
|
421
|
+
Vt(e), A("item:unselected", e.value), Q.add(e.valueHash), A("update:unselectedItems", [...k.unselectedItems, e.value]);
|
|
396
422
|
return;
|
|
397
423
|
}
|
|
398
|
-
|
|
399
|
-
},
|
|
400
|
-
disabled:
|
|
401
|
-
name:
|
|
424
|
+
J.value || Bt(e), A("item:selected", e.value), Q.delete(e.valueHash), A("update:unselectedItems", k.unselectedItems.filter((t) => i(t) !== i(e.value)));
|
|
425
|
+
}, Yt = (e) => Q.has(e.valueHash) ? !1 : e.selected || J.value, Xt = te((e) => typeof e != "string", JSON.stringify), Zt = h(() => [].concat(k.modelValue ?? []).map((e) => ({
|
|
426
|
+
disabled: k.disabled,
|
|
427
|
+
name: k.name,
|
|
402
428
|
type: "hidden",
|
|
403
|
-
value:
|
|
429
|
+
value: Xt(e)
|
|
404
430
|
}))), $ = [
|
|
405
431
|
70,
|
|
406
432
|
45,
|
|
407
433
|
85,
|
|
408
434
|
55
|
|
409
|
-
],
|
|
410
|
-
return
|
|
411
|
-
|
|
412
|
-
}, { flush: "post" }), (e, t) => (
|
|
435
|
+
], Qt = h(() => e(q.value.length || k.columns.length || 1, 4, 10));
|
|
436
|
+
return O(() => [Wt.value, k.fixedColumns], () => {
|
|
437
|
+
M.value && k.fixedColumns?.length && re(M.value, k.fixedColumns);
|
|
438
|
+
}, { flush: "post" }), (e, t) => (S(), oe(he(At.value), {
|
|
413
439
|
ref_key: "containerRef",
|
|
414
|
-
ref:
|
|
415
|
-
"aria-busy":
|
|
416
|
-
"aria-rowcount":
|
|
417
|
-
class:
|
|
418
|
-
"data-bb-table-id":
|
|
440
|
+
ref: N,
|
|
441
|
+
"aria-busy": jt.value,
|
|
442
|
+
"aria-rowcount": K.value ? k.totalItems : void 0,
|
|
443
|
+
class: b(Mt.value),
|
|
444
|
+
"data-bb-table-id": D(Ye),
|
|
419
445
|
inert: e.disabled,
|
|
420
|
-
style:
|
|
446
|
+
style: x(gt.value)
|
|
421
447
|
}, {
|
|
422
|
-
default:
|
|
423
|
-
e.selectable ? (
|
|
424
|
-
|
|
448
|
+
default: ve(() => [
|
|
449
|
+
e.selectable ? (S(), _("legend", ye, E(e.legend), 1)) : g("", !0),
|
|
450
|
+
v("table", {
|
|
425
451
|
ref_key: "tableRef",
|
|
426
|
-
ref:
|
|
452
|
+
ref: M
|
|
427
453
|
}, [
|
|
428
|
-
e.caption ? (
|
|
454
|
+
e.caption ? (S(), _("caption", {
|
|
429
455
|
key: 0,
|
|
430
|
-
class:
|
|
456
|
+
class: b({
|
|
431
457
|
"bb-table-caption": !0,
|
|
432
458
|
"sr-only": !e.displayCaption
|
|
433
459
|
})
|
|
434
|
-
},
|
|
435
|
-
|
|
460
|
+
}, E(e.caption), 3)) : g("", !0),
|
|
461
|
+
v("colgroup", null, [(S(!0), _(m, null, w(mt.value, (e) => (S(), _("col", {
|
|
436
462
|
key: e.key,
|
|
437
|
-
style:
|
|
463
|
+
style: x({ width: e.width })
|
|
438
464
|
}, null, 4))), 128))]),
|
|
439
|
-
|
|
440
|
-
"aria-rowindex":
|
|
465
|
+
v("thead", null, [T(e.$slots, "thead", {}, () => [v("tr", {
|
|
466
|
+
"aria-rowindex": K.value ? 1 : void 0,
|
|
441
467
|
class: "bb-table-header-row"
|
|
442
468
|
}, [
|
|
443
|
-
e.selectable ? (
|
|
469
|
+
e.selectable ? (S(), _("th", {
|
|
444
470
|
key: 0,
|
|
445
|
-
class:
|
|
471
|
+
class: b(["bb-table-header bb-table-header--select", e.thClass]),
|
|
446
472
|
scope: "col"
|
|
447
|
-
}, [
|
|
473
|
+
}, [T(e.$slots, "header:select", {
|
|
448
474
|
multiple: e.multiple,
|
|
449
|
-
selectAll: !!
|
|
450
|
-
text: e.selectText ||
|
|
451
|
-
}, () => [
|
|
475
|
+
selectAll: !!J.value,
|
|
476
|
+
text: e.selectText || D(j)("table.selectText").value
|
|
477
|
+
}, () => [v("span", xe, [e.allowSelectAll && e.multiple ? (S(), _("label", {
|
|
452
478
|
key: 0,
|
|
453
|
-
class:
|
|
454
|
-
}, [(
|
|
455
|
-
key:
|
|
456
|
-
modelValue:
|
|
457
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
479
|
+
class: b(["bb-table-check__label", { "bb-table-check__label--disabled": e.disabled }])
|
|
480
|
+
}, [(S(), oe(a, {
|
|
481
|
+
key: qt.value.toString(),
|
|
482
|
+
modelValue: J.value,
|
|
483
|
+
"onUpdate:modelValue": t[0] ||= (e) => J.value = e,
|
|
458
484
|
class: "bb-table-check",
|
|
459
485
|
disabled: e.disabled,
|
|
460
|
-
indeterminate:
|
|
486
|
+
indeterminate: qt.value,
|
|
461
487
|
name: `select_all_${e.name || ""}`,
|
|
462
488
|
readonly: e.readonly
|
|
463
489
|
}, null, 8, [
|
|
@@ -466,99 +492,102 @@ var ve = {
|
|
|
466
492
|
"indeterminate",
|
|
467
493
|
"name",
|
|
468
494
|
"readonly"
|
|
469
|
-
])),
|
|
470
|
-
(
|
|
495
|
+
])), v("span", Se, E(e.selectAllLabel || D(j)("table.selectAllLabel").value), 1)], 2)) : e.multiple ? g("", !0) : (S(), _("span", Ce, E(e.selectText || D(j)("table.selectText").value), 1))])])], 2)) : g("", !0),
|
|
496
|
+
(S(!0), _(m, null, w(Ut.value, (t, n) => (S(), _("th", {
|
|
471
497
|
key: t.key,
|
|
472
498
|
"aria-sort": t.sortDirection,
|
|
473
|
-
class:
|
|
499
|
+
class: b(["bb-table-header", [t.classes, {
|
|
500
|
+
"bb-table-header--edge-start": n === 0,
|
|
501
|
+
"bb-table-header--edge-end": n === Ut.value.length - 1
|
|
502
|
+
}]]),
|
|
474
503
|
scope: "col"
|
|
475
|
-
}, [
|
|
504
|
+
}, [T(e.$slots, t.slotName, {
|
|
476
505
|
classes: t.classes,
|
|
477
|
-
items:
|
|
506
|
+
items: D(It),
|
|
478
507
|
label: t.label
|
|
479
|
-
}, () => [
|
|
480
|
-
e.actions ? (
|
|
508
|
+
}, () => [v("span", Te, E(t.label), 1)])], 10, we))), 128)),
|
|
509
|
+
e.actions ? (S(), _("th", {
|
|
481
510
|
key: 1,
|
|
482
|
-
class:
|
|
511
|
+
class: b(["bb-table-header bb-table-header--actions", e.thClass]),
|
|
483
512
|
scope: "col"
|
|
484
|
-
}, [
|
|
485
|
-
], 8,
|
|
486
|
-
|
|
513
|
+
}, [T(e.$slots, "header:actions", { text: e.actionsText }, () => [v("span", Ee, E(e.actionsText), 1)])], 2)) : g("", !0)
|
|
514
|
+
], 8, be)])]),
|
|
515
|
+
v("tbody", null, [jt.value ? T(e.$slots, "loading", {
|
|
487
516
|
key: 0,
|
|
488
|
-
items:
|
|
489
|
-
}, () => [(
|
|
517
|
+
items: D(It)
|
|
518
|
+
}, () => [(S(!0), _(m, null, w(Qt.value, (n, r) => (S(), _("tr", {
|
|
490
519
|
key: r,
|
|
491
|
-
"aria-rowindex":
|
|
520
|
+
"aria-rowindex": K.value ? r + 2 : void 0,
|
|
492
521
|
class: "bb-table-skeleton__row"
|
|
493
522
|
}, [
|
|
494
|
-
e.selectable ? (
|
|
495
|
-
(
|
|
523
|
+
e.selectable ? (S(), _("td", Oe, t[1] ||= [v("div", { class: "bb-table-skeleton__placeholder" }, null, -1)])) : g("", !0),
|
|
524
|
+
(S(!0), _(m, null, w(k.columns, (e, n) => (S(), _("td", {
|
|
496
525
|
key: e.key,
|
|
497
|
-
class:
|
|
498
|
-
}, [!e.skeleton || e.skeleton === "text" ? (
|
|
526
|
+
class: b(["bb-table-skeleton__cell", `bb-table-skeleton__cell--${e.skeleton ?? "text"}`])
|
|
527
|
+
}, [!e.skeleton || e.skeleton === "text" ? (S(), _("div", ke, [v("div", {
|
|
499
528
|
class: "bb-table-skeleton__line",
|
|
500
|
-
style:
|
|
501
|
-
}, null, 4),
|
|
529
|
+
style: x({ width: `${$[(r + n) % 4]}%` })
|
|
530
|
+
}, null, 4), v("div", {
|
|
502
531
|
class: "bb-table-skeleton__line",
|
|
503
|
-
style:
|
|
504
|
-
}, null, 4)])) : e.skeleton === "avatar" ? (
|
|
532
|
+
style: x({ width: `${$[(r + n + 2) % 4]}%` })
|
|
533
|
+
}, null, 4)])) : e.skeleton === "avatar" ? (S(), _("div", Ae)) : e.skeleton === "avatar-text" ? (S(), _("div", je, [t[2] ||= v("div", { class: "bb-table-skeleton__avatar" }, null, -1), v("div", Me, [v("div", {
|
|
505
534
|
class: "bb-table-skeleton__line",
|
|
506
|
-
style:
|
|
507
|
-
}, null, 4),
|
|
535
|
+
style: x({ width: `${$[(r + n) % 4]}%` })
|
|
536
|
+
}, null, 4), v("div", {
|
|
508
537
|
class: "bb-table-skeleton__line",
|
|
509
|
-
style:
|
|
510
|
-
}, null, 4)])])) : e.skeleton === "image" ? (
|
|
511
|
-
e.actions ? (
|
|
512
|
-
], 8,
|
|
513
|
-
"aria-rowindex":
|
|
538
|
+
style: x({ width: `${$[(r + n + 2) % 4]}%` })
|
|
539
|
+
}, null, 4)])])) : e.skeleton === "image" ? (S(), _("div", Ne)) : e.skeleton === "badge" ? (S(), _("div", Pe)) : g("", !0)], 2))), 128)),
|
|
540
|
+
e.actions ? (S(), _("td", Fe, t[3] ||= [v("div", { class: "bb-table-skeleton__placeholder" }, null, -1)])) : g("", !0)
|
|
541
|
+
], 8, De))), 128)), v("tr", {
|
|
542
|
+
"aria-rowindex": K.value ? Qt.value + 2 : void 0,
|
|
514
543
|
class: "bb-table-loading__row bb-table-loading__row--sr-only"
|
|
515
|
-
}, [
|
|
516
|
-
colspan:
|
|
544
|
+
}, [v("td", {
|
|
545
|
+
colspan: Nt.value,
|
|
517
546
|
class: "bb-table-loading__cell",
|
|
518
547
|
"aria-live": "polite",
|
|
519
548
|
role: "status"
|
|
520
|
-
}, [
|
|
521
|
-
"aria-rowindex":
|
|
549
|
+
}, [v("span", Re, E(e.loadingText), 1)], 8, Le)], 8, Ie)]) : D(q).length ? T(e.$slots, "tbody", { key: 2 }, () => [(S(!0), _(m, null, w(Wt.value, (t) => (S(), _(m, { key: t.valueHash }, [v("tr", {
|
|
550
|
+
"aria-rowindex": K.value && t.rowIndex ? t.rowIndex : void 0,
|
|
522
551
|
class: "bb-table-data__row",
|
|
523
552
|
onClick: t.onRowClick,
|
|
524
553
|
onContextmenu: t.onRowContextMenu,
|
|
525
554
|
onDblclick: t.onRowDblClick
|
|
526
555
|
}, [
|
|
527
|
-
e.selectable ? (
|
|
556
|
+
e.selectable ? (S(), _("td", {
|
|
528
557
|
key: 0,
|
|
529
|
-
class:
|
|
530
|
-
}, [
|
|
531
|
-
checked:
|
|
558
|
+
class: b(["bb-table-data__cell bb-table-data__cell--select", e.tdClass])
|
|
559
|
+
}, [T(e.$slots, "select", {
|
|
560
|
+
checked: Yt(t),
|
|
532
561
|
disabled: !!t.disabled,
|
|
533
|
-
inputName:
|
|
562
|
+
inputName: D(Je),
|
|
534
563
|
item: t.item,
|
|
535
564
|
readonly: !!e.readonly,
|
|
536
565
|
value: t.value
|
|
537
|
-
}, () => [e.multiple ? (
|
|
566
|
+
}, () => [e.multiple ? (S(), _("label", {
|
|
538
567
|
key: 0,
|
|
539
|
-
class:
|
|
540
|
-
}, [
|
|
541
|
-
checked:
|
|
568
|
+
class: b(["bb-table-check__label", { "bb-table-check__label--disabled": t.disabled }])
|
|
569
|
+
}, [ce(a, {
|
|
570
|
+
checked: Yt(t),
|
|
542
571
|
class: "bb-table-check",
|
|
543
572
|
disabled: t.disabled,
|
|
544
573
|
readonly: e.readonly,
|
|
545
|
-
onChange: () =>
|
|
574
|
+
onChange: () => Jt(t)
|
|
546
575
|
}, null, 8, [
|
|
547
576
|
"checked",
|
|
548
577
|
"disabled",
|
|
549
578
|
"readonly",
|
|
550
579
|
"onChange"
|
|
551
|
-
]),
|
|
580
|
+
]), v("span", Ue, E(t.accessibleLabel), 1)], 2)) : (S(), _("label", {
|
|
552
581
|
key: 1,
|
|
553
|
-
class:
|
|
554
|
-
}, [
|
|
582
|
+
class: b(["bb-table-radio__label", { "bb-table-radio__label--disabled": t.disabled }])
|
|
583
|
+
}, [ce(f, {
|
|
555
584
|
checked: t.selected,
|
|
556
585
|
class: "bb-table-radio",
|
|
557
586
|
disabled: t.disabled,
|
|
558
|
-
name:
|
|
587
|
+
name: D(Je),
|
|
559
588
|
readonly: e.readonly,
|
|
560
589
|
value: t.value,
|
|
561
|
-
onChange: () =>
|
|
590
|
+
onChange: () => Jt(t)
|
|
562
591
|
}, null, 8, [
|
|
563
592
|
"checked",
|
|
564
593
|
"disabled",
|
|
@@ -566,53 +595,56 @@ var ve = {
|
|
|
566
595
|
"readonly",
|
|
567
596
|
"value",
|
|
568
597
|
"onChange"
|
|
569
|
-
]),
|
|
570
|
-
(
|
|
598
|
+
]), v("span", We, E(t.accessibleLabel), 1)], 2))])], 2)) : g("", !0),
|
|
599
|
+
(S(!0), _(m, null, w(t.cols, (n, r) => (S(), _("td", {
|
|
571
600
|
key: n.key,
|
|
572
|
-
class:
|
|
573
|
-
|
|
601
|
+
class: b(["bb-table-data__cell", [n.classes, {
|
|
602
|
+
"bb-table-data__cell--edge-start": r === 0,
|
|
603
|
+
"bb-table-data__cell--edge-end": r === t.cols.length - 1
|
|
604
|
+
}]])
|
|
605
|
+
}, [T(e.$slots, n.slotName, {
|
|
574
606
|
classes: n.classes,
|
|
575
607
|
content: n.content,
|
|
576
608
|
expanded: t.expanded,
|
|
577
609
|
item: t.item,
|
|
578
|
-
expandProps:
|
|
610
|
+
expandProps: Kt(t),
|
|
579
611
|
toggleExpanded: () => Z(t.valueHash),
|
|
580
612
|
value: t.value
|
|
581
|
-
}, () => [
|
|
582
|
-
e.actions ? (
|
|
613
|
+
}, () => [se(E(n.content), 1)])], 2))), 128)),
|
|
614
|
+
e.actions ? (S(), _("td", {
|
|
583
615
|
key: 1,
|
|
584
|
-
class:
|
|
585
|
-
}, [
|
|
616
|
+
class: b(["bb-table__cell bb-table__cell--actions", e.tdClass])
|
|
617
|
+
}, [T(e.$slots, "actions", {
|
|
586
618
|
expanded: t.expanded,
|
|
587
619
|
item: t.item,
|
|
588
|
-
expandProps:
|
|
620
|
+
expandProps: Kt(t),
|
|
589
621
|
toggleExpanded: () => Z(t.valueHash),
|
|
590
622
|
value: t.value
|
|
591
|
-
})], 2)) :
|
|
592
|
-
], 40,
|
|
623
|
+
})], 2)) : g("", !0)
|
|
624
|
+
], 40, He), t.expanded ? (S(), _("tr", {
|
|
593
625
|
key: 0,
|
|
594
|
-
"aria-rowindex":
|
|
626
|
+
"aria-rowindex": K.value && t.rowIndex ? t.rowIndex + 1 : void 0,
|
|
595
627
|
id: `expanded_${t.valueHash}`,
|
|
596
628
|
class: "bb-table-expand__row"
|
|
597
|
-
}, [
|
|
598
|
-
colspan:
|
|
629
|
+
}, [v("td", {
|
|
630
|
+
colspan: Nt.value,
|
|
599
631
|
class: "bb-table-expand__cell"
|
|
600
|
-
}, [
|
|
632
|
+
}, [T(e.$slots, "expand", {
|
|
601
633
|
expanded: t.expanded,
|
|
602
634
|
item: t.item,
|
|
603
|
-
expandProps:
|
|
635
|
+
expandProps: Kt(t),
|
|
604
636
|
toggleExpanded: () => Z(t.valueHash),
|
|
605
637
|
value: t.value
|
|
606
|
-
})], 8,
|
|
607
|
-
"aria-rowindex":
|
|
638
|
+
})], 8, Ke)], 8, Ge)) : g("", !0)], 64))), 128))]) : T(e.$slots, "no-data", { key: 1 }, () => [v("tr", {
|
|
639
|
+
"aria-rowindex": K.value ? 2 : void 0,
|
|
608
640
|
class: "bb-table-no-data__row"
|
|
609
|
-
}, [
|
|
641
|
+
}, [v("td", {
|
|
610
642
|
class: "bb-table-no-data__cell",
|
|
611
|
-
colspan:
|
|
612
|
-
}, [
|
|
613
|
-
|
|
643
|
+
colspan: Nt.value
|
|
644
|
+
}, [v("span", Ve, E(e.noDataText || D(j)("table.noDataText").value), 1)], 8, Be)], 8, ze)])]),
|
|
645
|
+
v("tfoot", null, [T(e.$slots, "tfoot")])
|
|
614
646
|
], 512),
|
|
615
|
-
(
|
|
647
|
+
(S(!0), _(m, null, w(Zt.value, (e) => (S(), _("input", ue({
|
|
616
648
|
key: e.value,
|
|
617
649
|
ref_for: !0
|
|
618
650
|
}, e), null, 16))), 128))
|
|
@@ -629,4 +661,4 @@ var ve = {
|
|
|
629
661
|
}
|
|
630
662
|
});
|
|
631
663
|
//#endregion
|
|
632
|
-
export {
|
|
664
|
+
export { qe as default };
|