bitboss-ui 3.0.0-beta.4 → 3.0.0-beta.8
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/README.md +36 -29
- package/dist/ai/BbBadge.md +10 -5
- package/dist/ai/BbSelect.md +8 -0
- package/dist/ai/BbTable.md +257 -51
- package/dist/ai/changelog.json +86 -2
- package/dist/ai/components.json +25 -15
- package/dist/ai/guides/design-language.md +14 -14
- package/dist/ai/guides/design-tokens.md +25 -18
- package/dist/ai/guides/installation-and-plugin-setup.md +1 -1
- package/dist/ai/guides/migration/components/bb-dialog.md +35 -29
- package/dist/ai/guides/migration/components/bb-table.md +406 -28
- package/dist/ai/guides/migration/v2-to-v3.md +175 -75
- package/dist/ai/index.md +1 -1
- package/dist/ai/recipes/inertia/layout-scaffold.md +5 -1
- package/dist/ai/recipes/inertia/ownership-atlas.md +41 -20
- package/dist/ai/recipes/inertia/records-workspace.md +26 -7
- package/dist/ai/recipes/nuxt/layout-scaffold.md +5 -1
- package/dist/ai/recipes/nuxt/records-workspace.md +26 -7
- package/dist/ai/recipes/vue/layout-scaffold.md +5 -1
- package/dist/ai/recipes/vue/records-workspace.md +26 -7
- package/dist/ai/source/BbBaseInputContainer.md +26 -0
- package/dist/ai/source/BbBreadcrumbs.md +31 -0
- package/dist/ai/source/BbDialog.md +15 -9
- package/dist/ai/source/BbOffCanvas.md +17 -11
- package/dist/ai/source/BbProgress.md +2 -2
- package/dist/ai/source/BbTable.md +837 -787
- package/dist/ai/source/CommonInputWrapper.md +4 -0
- package/dist/components/BbPagination/BbPagination.vue.d.ts +1 -1
- package/dist/components/BbTable/BbTable.vue.d.ts +5 -2
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +439 -484
- package/dist/components/BbTable/types.d.ts +83 -21
- package/dist/components/BbTable/utils.d.ts +18 -3
- package/dist/components/BbTable/utils.js +36 -28
- package/dist/index.d.ts +5 -1
- package/dist/index.js +68 -67
- package/dist/llms-full.txt +1065 -265
- package/dist/llms-medium.txt +15 -15
- package/dist/llms.txt +1 -1
- package/dist/styles.css +1 -1
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/dist/assets/svgs/sort.svg_raw.js +0 -4
|
@@ -3,58 +3,61 @@ import { removedPropsFor as t } from "../../deprecation/removedProps.js";
|
|
|
3
3
|
import { useLogger as n } from "../../composables/useLogger.js";
|
|
4
4
|
import { warnRemovedAttrs as r } from "../../utilities/functions/warnRemovedAttrs.js";
|
|
5
5
|
import i from "../BbBaseButton/BbBaseButton.vue.js";
|
|
6
|
-
import a from "
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import { useIndexById as f } from "../../composables/useIndexById.js";
|
|
6
|
+
import { isNil as a } from "../../utilities/functions/isNil.js";
|
|
7
|
+
import { useLocale as o } from "../../composables/useLocale.js";
|
|
8
|
+
import { useItemsGetter as s } from "../../composables/useItemsGetter.js";
|
|
9
|
+
import { useItemValue as c } from "../../composables/useItemValue.js";
|
|
10
|
+
import { hash as l } from "../../utilities/functions/hash.js";
|
|
11
|
+
import { useHashedWatcher as u } from "../../composables/useHashedWatcher.js";
|
|
12
|
+
import { useBbTableContextHost as ee } from "../../composables/useBbTableContext.js";
|
|
13
|
+
import { clamp as d } from "../../utilities/functions/clamp.js";
|
|
14
|
+
import te from "../BbBaseCheckbox/BbBaseCheckbox.vue.js";
|
|
15
|
+
import { useIndexById as ne } from "../../composables/useIndexById.js";
|
|
17
16
|
import { useBaseOptions as re } from "../../composables/useBaseOptions.js";
|
|
18
17
|
import { usePrefill as ie } from "../../composables/usePrefill.js";
|
|
19
|
-
import { parseCount as ae, parsePositiveInteger as
|
|
20
|
-
import
|
|
21
|
-
import { when as
|
|
22
|
-
import { useTableWidthContext as
|
|
23
|
-
import
|
|
24
|
-
import {
|
|
25
|
-
import { Fragment as m, computed as h, createBlock as he, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createTextVNode as ge, createVNode as _e, defineComponent as y, mergeModels as ve, mergeProps as ye, nextTick as be, normalizeClass as b, normalizeStyle as x, onBeforeUnmount as xe, onMounted as Se, openBlock as S, reactive as Ce, ref as C, renderList as w, renderSlot as T, resolveDynamicComponent as we, toDisplayString as E, toRef as Te, unref as D, useModel as Ee, watch as O, withCtx as De } from "vue";
|
|
18
|
+
import { parseCount as ae, parsePositiveInteger as oe } from "../../utilities/functions/parsePaginationNumber.js";
|
|
19
|
+
import se from "../BbBaseRadio/BbBaseRadio.vue.js";
|
|
20
|
+
import { when as ce } from "../../utilities/functions/when.js";
|
|
21
|
+
import { useTableWidthContext as le } from "../../composables/useTableWidthContext.js";
|
|
22
|
+
import { applyFixedTableColumns as ue, columnKeyToSlotName as de, mergeCellClasses as fe, mergeHeaderClasses as pe, mergeRowClasses as me, readResolvedTracks as he } from "./utils.js";
|
|
23
|
+
import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as ge, createVNode as _e, defineComponent as v, mergeModels as ve, mergeProps as ye, nextTick as be, normalizeClass as y, normalizeStyle as b, onBeforeUnmount as xe, onMounted as Se, openBlock as x, reactive as Ce, ref as we, renderList as S, renderSlot as C, resolveDynamicComponent as Te, toDisplayString as w, toRef as Ee, unref as T, useModel as E, useSlots as De, watch as D, withCtx as Oe } from "vue";
|
|
26
24
|
//#region src/components/BbTable/BbTable.vue?vue&type=script&setup=true&lang.ts
|
|
27
|
-
var
|
|
25
|
+
var ke = {
|
|
28
26
|
key: 0,
|
|
29
27
|
class: "sr-only"
|
|
30
|
-
},
|
|
28
|
+
}, Ae = ["id"], je = ["aria-labelledby", "aria-rowcount"], Me = ["inert"], Ne = ["aria-rowindex"], Pe = { class: "bb-table-header__content" }, Fe = { class: "bb-table-check__label-text sr-only" }, Ie = {
|
|
31
29
|
key: 1,
|
|
32
30
|
class: "bb-table-radio__label-text sr-only"
|
|
33
|
-
},
|
|
31
|
+
}, Le = ["aria-sort"], Re = { class: "bb-table-header__content" }, ze = {
|
|
34
32
|
key: 1,
|
|
35
33
|
class: "bb-table-header__content"
|
|
36
|
-
},
|
|
34
|
+
}, Be = { class: "bb-table-header__content sr-only" }, Ve = {
|
|
35
|
+
class: "bb-table__body",
|
|
36
|
+
role: "rowgroup"
|
|
37
|
+
}, He = ["aria-rowindex"], Ue = {
|
|
37
38
|
key: 0,
|
|
38
|
-
class: "bb-table-skeleton__cell bb-table-skeleton__cell--select"
|
|
39
|
-
|
|
39
|
+
class: "bb-table-skeleton__cell bb-table-skeleton__cell--select",
|
|
40
|
+
role: "cell"
|
|
41
|
+
}, We = {
|
|
40
42
|
key: 0,
|
|
41
43
|
class: "bb-table-skeleton__cell-content"
|
|
42
|
-
},
|
|
44
|
+
}, Ge = {
|
|
43
45
|
key: 1,
|
|
44
46
|
class: "bb-table-skeleton__avatar"
|
|
45
|
-
},
|
|
47
|
+
}, Ke = {
|
|
46
48
|
key: 2,
|
|
47
49
|
class: "bb-table-skeleton__avatar-text"
|
|
48
|
-
},
|
|
50
|
+
}, qe = { class: "bb-table-skeleton__cell-content" }, Je = {
|
|
49
51
|
key: 3,
|
|
50
52
|
class: "bb-table-skeleton__image"
|
|
51
|
-
},
|
|
53
|
+
}, Ye = {
|
|
52
54
|
key: 4,
|
|
53
55
|
class: "bb-table-skeleton__badge"
|
|
54
|
-
},
|
|
56
|
+
}, Xe = {
|
|
55
57
|
key: 1,
|
|
56
|
-
class: "bb-table-skeleton__cell bb-table-skeleton__cell--actions"
|
|
57
|
-
|
|
58
|
+
class: "bb-table-skeleton__cell bb-table-skeleton__cell--actions",
|
|
59
|
+
role: "cell"
|
|
60
|
+
}, Ze = ["aria-rowindex"], Qe = ["aria-colspan"], $e = { class: "bb-table-no-data__text" }, et = [
|
|
58
61
|
"aria-current",
|
|
59
62
|
"aria-rowindex",
|
|
60
63
|
"inert",
|
|
@@ -64,7 +67,11 @@ var Oe = {
|
|
|
64
67
|
"onDblclick",
|
|
65
68
|
"onFocus",
|
|
66
69
|
"onKeydown"
|
|
67
|
-
],
|
|
70
|
+
], tt = { class: "bb-table-check__label-text sr-only" }, nt = { class: "bb-table-radio__label-text sr-only" }, rt = ["id", "aria-rowindex"], it = ["aria-colspan"], at = ["aria-rowindex"], ot = ["aria-colspan"], st = {
|
|
71
|
+
"aria-live": "polite",
|
|
72
|
+
class: "bb-table-loading__text sr-only",
|
|
73
|
+
role: "status"
|
|
74
|
+
}, ct = ["role"], lt = 10, O = /*@__PURE__*/ v({
|
|
68
75
|
__name: "BbTable",
|
|
69
76
|
props: /*@__PURE__*/ ve({
|
|
70
77
|
accessibleLabel: {},
|
|
@@ -161,95 +168,99 @@ var Oe = {
|
|
|
161
168
|
"update:highlighted",
|
|
162
169
|
"update:expandedItems"
|
|
163
170
|
]),
|
|
164
|
-
setup(
|
|
165
|
-
let
|
|
171
|
+
setup(v, { emit: ve }) {
|
|
172
|
+
let O = E(v, "selectAll"), k = E(v, "sort"), A = E(v, "highlighted"), j = E(v, "expandedItems"), M = v, N = ve, P = De();
|
|
166
173
|
process.env.NODE_ENV !== "production" && r("BbTable", t("BbTable"));
|
|
167
|
-
let { getItemValue:
|
|
168
|
-
|
|
169
|
-
let
|
|
174
|
+
let { getItemValue: ut } = c(), dt = e().id.value;
|
|
175
|
+
M.multiple && !Array.isArray(M.modelValue) && n().throw("BbTable is set for multiple selection but modelValue is not an array.");
|
|
176
|
+
let ft = ["actions", "select"], pt = ["prepend", "append"], mt = (e) => pt.includes(e);
|
|
170
177
|
if (process.env.NODE_ENV !== "production") {
|
|
171
|
-
let e =
|
|
178
|
+
let e = M.columns.filter((e) => ft.includes(e.key));
|
|
172
179
|
for (let t of e) n().warn(`BbTable: \`{ key: '${String(t.key)}' }\` is a reserved column and must not appear in \`columns\`. ` + (t.key === "actions" ? "Set the `actions` prop and fill the `#actions` slot instead." : "Selection is controlled by the `selectable` prop."));
|
|
180
|
+
for (let e of M.columns) {
|
|
181
|
+
let t = de(e.key);
|
|
182
|
+
mt(t) && n().warn(`BbTable: column key '${String(e.key)}' normalizes to the slot name '${t}', which collides with the table-wide \`#header:${t}\` slot. That name keeps its table-wide meaning and per-column header slots are unavailable for this column.`);
|
|
183
|
+
}
|
|
173
184
|
}
|
|
174
|
-
let { t: F } =
|
|
175
|
-
id: () =>
|
|
176
|
-
container: () =>
|
|
177
|
-
inheritFrom: () => typeof
|
|
178
|
-
}), { data:
|
|
179
|
-
let t = e.valueHash in
|
|
180
|
-
|
|
181
|
-
},
|
|
185
|
+
let { t: F } = o(), I = we(), ht = we(), { id: gt, parentId: L, parentNode: R, node: _t, cssVars: vt, parentVar: yt, setTracks: bt } = le({
|
|
186
|
+
id: () => M.id,
|
|
187
|
+
container: () => ht.value,
|
|
188
|
+
inheritFrom: () => typeof M.inheritColumnWidths == "string" ? M.inheritColumnWidths : void 0
|
|
189
|
+
}), xt = p(() => `${gt.value}__caption`), { data: St } = ne({ items: p(() => a(A.value) ? [] : [A.value]) }), z = (e) => {
|
|
190
|
+
let t = e.valueHash in St.value;
|
|
191
|
+
A.value = t ? null : e.value;
|
|
192
|
+
}, Ct = (e, t) => {
|
|
182
193
|
e.target instanceof Element && (e.target.closest("a, button, input, label, select, textarea, [contenteditable], [role=\"button\"]") || window.getSelection()?.toString() || z(t));
|
|
183
|
-
},
|
|
184
|
-
let t =
|
|
185
|
-
t === null ?
|
|
186
|
-
}, { state: B, isReady:
|
|
194
|
+
}, wt = (e) => k.value.find(([t]) => t === e)?.[1] ?? null, Tt = (e) => {
|
|
195
|
+
let t = wt(e);
|
|
196
|
+
t === null ? k.value = [...k.value, [e, "asc"]] : t === "asc" ? k.value = k.value.map((t) => t[0] === e ? [e, "desc"] : t) : k.value = k.value.filter(([t]) => t !== e);
|
|
197
|
+
}, { state: B, isReady: Et } = ee(() => gt.value, {
|
|
187
198
|
selected: {
|
|
188
|
-
get: () =>
|
|
189
|
-
set: (e) =>
|
|
199
|
+
get: () => M.modelValue,
|
|
200
|
+
set: (e) => N("update:modelValue", e)
|
|
190
201
|
},
|
|
191
202
|
unselected: {
|
|
192
|
-
get: () =>
|
|
193
|
-
set: (e) =>
|
|
203
|
+
get: () => M.unselectedItems,
|
|
204
|
+
set: (e) => N("update:unselectedItems", e)
|
|
194
205
|
},
|
|
195
206
|
all: {
|
|
196
|
-
get: () =>
|
|
207
|
+
get: () => O.value,
|
|
197
208
|
set: (e) => {
|
|
198
|
-
|
|
209
|
+
O.value = e;
|
|
199
210
|
}
|
|
200
211
|
},
|
|
201
212
|
sort: {
|
|
202
|
-
get: () =>
|
|
213
|
+
get: () => k.value,
|
|
203
214
|
set: (e) => {
|
|
204
|
-
|
|
215
|
+
k.value = e;
|
|
205
216
|
}
|
|
206
217
|
},
|
|
207
218
|
highlighted: {
|
|
208
|
-
get: () =>
|
|
219
|
+
get: () => A.value ?? null,
|
|
209
220
|
set: (e) => {
|
|
210
|
-
|
|
221
|
+
A.value = e;
|
|
211
222
|
}
|
|
212
223
|
},
|
|
213
|
-
page: { get: () =>
|
|
224
|
+
page: { get: () => M.page === void 0 ? void 0 : oe(M.page, 1) },
|
|
214
225
|
perPage: {
|
|
215
|
-
get: () => ae(
|
|
216
|
-
infer: () => Array.isArray(
|
|
226
|
+
get: () => ae(M.perPage),
|
|
227
|
+
infer: () => Array.isArray(M.items) ? M.items.length : void 0
|
|
217
228
|
},
|
|
218
229
|
totalItems: {
|
|
219
|
-
get: () => ae(
|
|
220
|
-
infer: () => Array.isArray(
|
|
230
|
+
get: () => ae(M.totalItems),
|
|
231
|
+
infer: () => Array.isArray(M.items) ? M.items.length : void 0
|
|
221
232
|
},
|
|
222
|
-
totalPages: { get: () =>
|
|
223
|
-
}),
|
|
233
|
+
totalPages: { get: () => M.totalPages === void 0 ? void 0 : oe(M.totalPages, 1) }
|
|
234
|
+
}), Dt = p(() => M.columns.some((e) => e.snap != null)), V = p(() => !!M.inheritColumnWidths || Dt.value), Ot = p(() => M.fixed || Dt.value || M.columns.some((e) => e.width != null) || V.value && !!L.value), H = p(() => V.value && !!L.value), kt = H, At = (e) => {
|
|
224
235
|
if (typeof e == "number") return `${e}px`;
|
|
225
236
|
let t = e.trim();
|
|
226
237
|
return /^-?\d*\.?\d+$/.test(t) ? `${t}px` : t;
|
|
227
|
-
},
|
|
228
|
-
let e =
|
|
238
|
+
}, jt = p(() => {
|
|
239
|
+
let e = R.value?.tracks;
|
|
229
240
|
return e ? Object.keys(e).filter((e) => /^\d+$/.test(e)).length : 0;
|
|
230
|
-
}),
|
|
231
|
-
let e =
|
|
241
|
+
}), Mt = p(() => {
|
|
242
|
+
let e = R.value?.tracks ?? {}, t = [];
|
|
232
243
|
"select" in e && t.push("select");
|
|
233
|
-
for (let e = 0; e <
|
|
244
|
+
for (let e = 0; e < jt.value; e++) t.push(String(e));
|
|
234
245
|
return "actions" in e && t.push("actions"), t;
|
|
235
|
-
}),
|
|
236
|
-
let t =
|
|
237
|
-
return t ?
|
|
238
|
-
},
|
|
239
|
-
if (!
|
|
246
|
+
}), Nt = p(() => +("select" in (R.value?.tracks ?? {}))), Pt = p(() => Nt.value + jt.value), Ft = p(() => Mt.value.length), It = (e) => {
|
|
247
|
+
let t = Mt.value[e];
|
|
248
|
+
return t ? yt(t, "0px") : "0px";
|
|
249
|
+
}, Lt = (e, t) => {
|
|
250
|
+
if (!L.value || t - e <= 1e-6) return null;
|
|
240
251
|
let n = [];
|
|
241
252
|
for (let r = Math.floor(e); r < Math.ceil(t - 1e-6); r++) {
|
|
242
253
|
let i = Math.min(t, r + 1) - Math.max(e, r);
|
|
243
254
|
if (i <= 1e-6) continue;
|
|
244
|
-
let a =
|
|
255
|
+
let a = It(r);
|
|
245
256
|
n.push(i >= .999999 ? a : `${Number(i.toFixed(4))} * ${a}`);
|
|
246
257
|
}
|
|
247
258
|
return n.length ? n.length === 1 && !n[0].includes("*") ? n[0] : `calc(${n.join(" + ")})` : null;
|
|
248
|
-
},
|
|
249
|
-
let e =
|
|
259
|
+
}, U = p(() => {
|
|
260
|
+
let e = M.columns, t = e.map((e) => typeof e.snap == "number" ? e.snap : Array.isArray(e.snap) ? e.snap[0] : null), n = Nt.value;
|
|
250
261
|
return e.map((e, r) => {
|
|
251
262
|
let i = t[r] ?? n, a;
|
|
252
|
-
if (Array.isArray(e.snap)) a = e.snap[1] === -1 ?
|
|
263
|
+
if (Array.isArray(e.snap)) a = e.snap[1] === -1 ? Pt.value : e.snap[1];
|
|
253
264
|
else {
|
|
254
265
|
let e = t[r + 1];
|
|
255
266
|
a = e != null && e > i ? e : Math.floor(i) + 1;
|
|
@@ -259,312 +270,220 @@ var Oe = {
|
|
|
259
270
|
end: a
|
|
260
271
|
};
|
|
261
272
|
});
|
|
262
|
-
}),
|
|
263
|
-
if (!
|
|
264
|
-
for (let e =
|
|
265
|
-
let t =
|
|
273
|
+
}), Rt = (e) => H.value && e.start >= Pt.value, zt = p(() => U.value.some(Rt)), Bt = (e) => M.columns[e]?.width == null && !H.value, Vt = p(() => {
|
|
274
|
+
if (!H.value) return -1;
|
|
275
|
+
for (let e = M.columns.length - 1; e >= 0; e--) {
|
|
276
|
+
let t = M.columns[e];
|
|
266
277
|
if (t.width == null && t.snap == null) return e;
|
|
267
278
|
}
|
|
268
279
|
return -1;
|
|
269
|
-
}),
|
|
270
|
-
let e =
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
return r ? `calc(${n ?? "0px"} - ${r})` : n;
|
|
279
|
-
}), Lt = h(() => Ft.value !== null), Rt = h(() => It.value !== null), U = Ce({
|
|
280
|
-
select: null,
|
|
281
|
-
actions: null
|
|
282
|
-
}), zt = h(() => {
|
|
283
|
-
let e = (e) => V.value ? ft(e) : "auto", t = (t) => H.value && U[t] ? U[t] : e(t), n = [];
|
|
284
|
-
N.selectable && n.push({
|
|
280
|
+
}), W = p(() => {
|
|
281
|
+
let e = U.value[0];
|
|
282
|
+
return !V.value || !L.value || !e ? null : Lt(0, e.start);
|
|
283
|
+
}), G = p(() => {
|
|
284
|
+
let e = U.value, t = e[e.length - 1];
|
|
285
|
+
return !V.value || !L.value || !t || zt.value ? null : Lt(t.end, Ft.value);
|
|
286
|
+
}), Ht = (e) => _t.tracks[e] ?? null, Ut = (e, t, n) => !V.value || !L.value ? null : n ? t ? `calc(${e ?? "0px"} - ${t})` : null : e, Wt = p(() => Ut(W.value, M.selectable ? Ht("select") : null, !!M.selectable)), Gt = p(() => zt.value ? null : Ut(G.value, M.actions ? Ht("actions") : null, !!M.actions)), Kt = p(() => Wt.value !== null), qt = p(() => Gt.value !== null), Jt = (e) => e && Yt.value ? `minmax(${e}, max-content)` : "max-content", Yt = p(() => Object.keys(R.value?.tracks ?? {}).length > 0), Xt = (e) => /^(auto|min-content|max-content|fit-content\(.*\)|-?[\d.]+fr)$/.test(e.trim()), Zt = p(() => {
|
|
287
|
+
let e = [];
|
|
288
|
+
M.selectable && e.push({
|
|
285
289
|
key: "select",
|
|
286
|
-
width:
|
|
290
|
+
width: Jt(W.value)
|
|
287
291
|
});
|
|
288
|
-
let
|
|
289
|
-
return
|
|
290
|
-
let
|
|
291
|
-
if (
|
|
292
|
-
|
|
293
|
-
key:
|
|
294
|
-
width:
|
|
292
|
+
let t = M.columns.length - 1, n = !H.value && M.columns.length > 0 && M.columns.every((e) => e.width != null);
|
|
293
|
+
return M.columns.forEach((r, i) => {
|
|
294
|
+
let a = String(i), o = r.width == null ? null : At(r.width), s = U.value[i], c = null, l = null;
|
|
295
|
+
if (o != null && Xt(o) ? l = o : o != null && n ? l = `minmax(${o}, ${parseFloat(o) || 1}fr)` : o == null ? Bt(i) ? l = M.fixed ? "minmax(0, 1fr)" : "auto" : Yt.value ? Rt(s) ? l = "min-content" : (c = Lt(s.start, s.end), c === null && (l = "auto")) : l = "max-content" : c = o, l !== null) {
|
|
296
|
+
e.push({
|
|
297
|
+
key: a,
|
|
298
|
+
width: l
|
|
295
299
|
});
|
|
296
300
|
return;
|
|
297
301
|
}
|
|
298
|
-
let
|
|
299
|
-
|
|
300
|
-
let
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
key: i,
|
|
305
|
-
width: l
|
|
302
|
+
let u = [];
|
|
303
|
+
i === 0 && Kt.value && u.push("var(--offset-internal-start, 0px)"), i === t && qt.value && u.push("var(--offset-internal-end, 0px)");
|
|
304
|
+
let ee = u.length ? `calc(${[...u, c].join(" + ")})` : c, d = i === Vt.value && !zt.value ? `minmax(${ee}, 1fr)` : ee;
|
|
305
|
+
e.push({
|
|
306
|
+
key: a,
|
|
307
|
+
width: d
|
|
306
308
|
});
|
|
307
|
-
}),
|
|
309
|
+
}), M.actions && e.push({
|
|
308
310
|
key: "actions",
|
|
309
|
-
width:
|
|
310
|
-
}),
|
|
311
|
-
}),
|
|
311
|
+
width: Jt(G.value)
|
|
312
|
+
}), e;
|
|
313
|
+
}), Qt = p(() => Zt.value.map((e) => e.width).join(" ")), $t = p(() => {
|
|
312
314
|
let e = {};
|
|
313
|
-
return
|
|
314
|
-
}),
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
let i = e[r];
|
|
324
|
-
i != null && (t[i] = `${n.getBoundingClientRect().width}px`);
|
|
325
|
-
}), pt(t);
|
|
326
|
-
}, Wt = () => {
|
|
315
|
+
return Wt.value && (e["--offset-start"] = Wt.value), Gt.value && (e["--offset-end"] = Gt.value), e;
|
|
316
|
+
}), en = p(() => ({
|
|
317
|
+
...vt.value,
|
|
318
|
+
...$t.value
|
|
319
|
+
})), tn = () => {
|
|
320
|
+
let e = I.value, t = Zt.value.length;
|
|
321
|
+
if (!e || !t) return [];
|
|
322
|
+
let n = e.querySelector(":scope > .bb-table__head > .bb-table-header-row"), r = [...n ? [n] : [], ...Array.from(e.querySelectorAll(":scope > .bb-table__head > [role=\"row\"], :scope > .bb-table__body > [role=\"row\"]"))].find((e) => e.children.length >= t);
|
|
323
|
+
return r ? Array.from(r.children) : [];
|
|
324
|
+
}, nn = "", rn = () => {
|
|
327
325
|
let e = I.value;
|
|
328
326
|
if (!e) return;
|
|
329
|
-
let t =
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
"TEXTAREA",
|
|
340
|
-
"IMG",
|
|
341
|
-
"svg",
|
|
342
|
-
"VIDEO",
|
|
343
|
-
"CANVAS"
|
|
344
|
-
], r = (e) => {
|
|
345
|
-
let i = getComputedStyle(e), a = i.display.includes("flex") || i.display.includes("grid"), o = 0, s = 0;
|
|
346
|
-
if (e.querySelectorAll(":scope > *").forEach((e) => {
|
|
347
|
-
let i = getComputedStyle(e);
|
|
348
|
-
if (i.position === "absolute" || i.position === "fixed") return;
|
|
349
|
-
let c = parseFloat(i.marginLeft) + parseFloat(i.marginRight), l = !a && !n.includes(e.tagName) && i.cssFloat === "none" && t.includes(i.display) ? r(e) + parseFloat(i.paddingLeft) + parseFloat(i.paddingRight) + parseFloat(i.borderLeftWidth) + parseFloat(i.borderRightWidth) : e.getBoundingClientRect().width;
|
|
350
|
-
o += l + (c || 0), s += 1;
|
|
351
|
-
}), s === 0) {
|
|
352
|
-
let t = document.createRange();
|
|
353
|
-
return t.selectNodeContents(e), t.getBoundingClientRect().width;
|
|
354
|
-
}
|
|
355
|
-
if (s > 1) {
|
|
356
|
-
let e = parseFloat(i.columnGap);
|
|
357
|
-
e && (o += e * (s - 1));
|
|
358
|
-
}
|
|
359
|
-
return o;
|
|
360
|
-
}, i = (t) => {
|
|
361
|
-
let n = 0;
|
|
362
|
-
return e.querySelectorAll(t).forEach((e) => {
|
|
363
|
-
let t = getComputedStyle(e), i = parseFloat(t.paddingLeft) + parseFloat(t.paddingRight);
|
|
364
|
-
n = Math.max(n, r(e) + i);
|
|
365
|
-
}), n > 0 ? `${Math.ceil(n)}px` : null;
|
|
366
|
-
};
|
|
367
|
-
U.select = N.selectable ? i(":scope > thead > tr > th.bb-table-header--select, :scope > tbody > tr > td.bb-table-data__cell--select") : null, U.actions = N.actions ? i(":scope > thead > tr > th.bb-table-header--actions, :scope > tbody > tr > td.bb-table__cell--actions") : null;
|
|
368
|
-
}, Gt = () => {
|
|
369
|
-
Wt(), Ut();
|
|
370
|
-
}, Kt = C([]), qt = C([]), W = C(0), Jt = C(null), Yt = () => {
|
|
371
|
-
let e = L.value;
|
|
372
|
-
if (!e || !H.value || !N.columns.some((e) => e.width != null) && !Mt.value && Pt.value < 0) return;
|
|
373
|
-
let t = e.offsetWidth, n = +!!N.selectable, r = U.select ? parseFloat(U.select) : 0, i = U.actions ? parseFloat(U.actions) : 0, a = Ht(), o = 0, s = 0;
|
|
374
|
-
N.columns.forEach((e, t) => {
|
|
375
|
-
let r = a[n + t]?.getBoundingClientRect().width ?? 0;
|
|
376
|
-
e.width != null && (o += r), Nt(t) || (s += r);
|
|
377
|
-
});
|
|
378
|
-
let c = document.createElement("div");
|
|
379
|
-
c.style.cssText = [
|
|
380
|
-
"position:absolute",
|
|
381
|
-
"top:-9999px",
|
|
382
|
-
"left:-9999px",
|
|
383
|
-
"visibility:hidden",
|
|
384
|
-
"pointer-events:none",
|
|
385
|
-
`width:${t}px`,
|
|
386
|
-
`height:${e.offsetHeight}px`,
|
|
387
|
-
"overflow:visible"
|
|
388
|
-
].join(";");
|
|
389
|
-
let l = e.cloneNode(!0);
|
|
390
|
-
l.classList.remove("bb-table--fixed"), l.querySelectorAll(".bb-table-expand__row").forEach((e) => e.remove());
|
|
391
|
-
let u = Array.from(l.querySelectorAll("col"));
|
|
392
|
-
N.columns.forEach((e, t) => {
|
|
393
|
-
if (e.width == null) {
|
|
394
|
-
let e = u[n + t];
|
|
395
|
-
e && (e.style.width = "");
|
|
396
|
-
}
|
|
397
|
-
});
|
|
398
|
-
let ee = l.querySelector("table");
|
|
399
|
-
ee && (ee.style.width = "min-content", ee.style.minWidth = "0"), c.appendChild(l), document.body.appendChild(c);
|
|
400
|
-
let te = c.querySelector("table thead tr.bb-table-header-row"), ne = te ? Array.from(te.querySelectorAll(":scope > th")) : [], d = N.columns.map((e, t) => {
|
|
401
|
-
if (e.width != null) return 0;
|
|
402
|
-
let r = ne[n + t];
|
|
403
|
-
return r ? r.getBoundingClientRect().width : 0;
|
|
327
|
+
let t = he(e);
|
|
328
|
+
if (!t) return;
|
|
329
|
+
let n = Zt.value.map((e) => e.key);
|
|
330
|
+
if (t.length !== n.length) return;
|
|
331
|
+
let r = t.join(" ");
|
|
332
|
+
if (r === nn) return;
|
|
333
|
+
nn = r;
|
|
334
|
+
let i = {};
|
|
335
|
+
n.forEach((e, n) => {
|
|
336
|
+
i[e] = t[n];
|
|
404
337
|
});
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
return ie(Math.max(n, r));
|
|
413
|
-
}), qt.value = d.map((e) => e > 0 ? ie(e) : null), Pt.value >= 0) {
|
|
414
|
-
let e = Object.values(ut.value?.tracks ?? {}).reduce((e, t) => e + (parseFloat(t) || 0), 0), t = a.reduce((e, t) => e + t.getBoundingClientRect().width, 0);
|
|
415
|
-
W.value = Math.max(0, e - t + W.value);
|
|
416
|
-
} else W.value = 0;
|
|
417
|
-
let ae = d.reduce((e, t) => e + t, 0), p = o + ae + r + i;
|
|
418
|
-
Jt.value = p > 0 ? `${Math.ceil(p)}px` : null;
|
|
419
|
-
}, G = null, Xt, Zt = C(!1), Qt = !1, $t = () => {
|
|
420
|
-
let e = L.value, t = I.value;
|
|
421
|
-
Qt = !!e && !!t && t.getBoundingClientRect().width > e.clientWidth + 1;
|
|
422
|
-
}, en = () => {
|
|
423
|
-
G !== null && clearTimeout(G), G = setTimeout(() => {
|
|
424
|
-
G = null, Yt(), be(() => {
|
|
425
|
-
Zt.value = !1, $t();
|
|
426
|
-
});
|
|
427
|
-
}, 200);
|
|
428
|
-
}, K, tn, nn = () => {
|
|
429
|
-
K && (K.disconnect(), Ht().forEach((e) => K?.observe(e)), Gt());
|
|
338
|
+
let a = String(M.columns.length - 1), o = Wt.value, s = Gt.value;
|
|
339
|
+
o && i[0] && (i[0] = `calc(${i[0]} - (${o}))`, !M.selectable && W.value && (i.select = W.value)), s && i[a] && (i[a] = `calc(${i[a]} - (${s}))`, !M.actions && G.value && (i.actions = G.value)), bt(i), M.fixedColumns?.length && ue(e, M.fixedColumns);
|
|
340
|
+
}, K, an = () => {
|
|
341
|
+
if (!K) return;
|
|
342
|
+
K.disconnect();
|
|
343
|
+
let e = tn();
|
|
344
|
+
e.forEach((e) => K?.observe(e)), e.length && rn();
|
|
430
345
|
};
|
|
431
346
|
Se(() => {
|
|
432
|
-
K = new ResizeObserver(
|
|
433
|
-
childList: !0,
|
|
434
|
-
subtree: !0,
|
|
435
|
-
characterData: !0
|
|
436
|
-
})), L.value && (tn = new ResizeObserver(() => {
|
|
437
|
-
Qt || (Zt.value = !0), en();
|
|
438
|
-
}), tn.observe(L.value));
|
|
347
|
+
K = new ResizeObserver(rn), an();
|
|
439
348
|
}), xe(() => {
|
|
440
|
-
K?.disconnect()
|
|
441
|
-
}),
|
|
442
|
-
let
|
|
349
|
+
K?.disconnect();
|
|
350
|
+
}), D(Zt, () => be(an), { flush: "post" });
|
|
351
|
+
let on = (e, t) => M.accessibleLabel ? M.accessibleLabel(e, t) : [F("table.select").value, ...e.map((e) => e.content)].join(" "), sn = p(() => M.selectable ? "fieldset" : "div"), cn = p(() => M.legend || M.caption || F("table.selectableLegend").value), q = p(() => M.loading || hn.value), ln = p(() => q.value && !M.interactiveWhileLoading), J = p(() => Et.value && !a(B.page) && !a(B.perPage) && !a(B.totalItems) && B.page >= 1 && B.perPage > 0 && B.totalItems >= 0), un = p(() => ({
|
|
443
352
|
"bb-table": !0,
|
|
444
|
-
[`bb-table--align-${
|
|
445
|
-
"bb-table--compact":
|
|
446
|
-
"bb-table--fixed":
|
|
447
|
-
"bb-table--inherit-widths":
|
|
448
|
-
"bb-table--fixed-header":
|
|
353
|
+
[`bb-table--align-${M.align}`]: !0,
|
|
354
|
+
"bb-table--compact": M.compact,
|
|
355
|
+
"bb-table--fixed": Ot.value,
|
|
356
|
+
"bb-table--inherit-widths": kt.value,
|
|
357
|
+
"bb-table--fixed-header": M.fixedHeaders,
|
|
449
358
|
"bb-table--loading": q.value,
|
|
450
359
|
"bb-table--empty": !Y.value.length,
|
|
451
|
-
"bb-table--selectable": !!
|
|
452
|
-
"bb-table--measuring": Zt.value,
|
|
360
|
+
"bb-table--selectable": !!M.selectable,
|
|
453
361
|
"scrollbar-border": !0
|
|
454
|
-
})),
|
|
362
|
+
})), dn = p(() => M.columns.length + Number(!!M.selectable) + Number(!!M.actions)), fn = p(() => Object.fromEntries(M.columns.map((e) => [e.key, de(e.key)]))), { getter: pn, items: mn, loading: hn } = s({ items: Ee(M, "items") }), { hasPrefilled: gn } = ie({
|
|
455
363
|
trigger: !0,
|
|
456
364
|
fn: async (e) => {
|
|
457
|
-
await
|
|
365
|
+
await pn(e, B.selected), xn();
|
|
458
366
|
}
|
|
459
|
-
}), { data:
|
|
460
|
-
disabled:
|
|
461
|
-
items:
|
|
367
|
+
}), { data: _n } = ne({ items: p(() => B.selected) }), { options: Y, baseOptions: vn } = re({
|
|
368
|
+
disabled: Ee(M, "disabled"),
|
|
369
|
+
items: mn,
|
|
462
370
|
itemText: void 0,
|
|
463
|
-
itemValue:
|
|
464
|
-
max:
|
|
371
|
+
itemValue: M.itemValue,
|
|
372
|
+
max: M.max,
|
|
465
373
|
selectable: !0,
|
|
466
|
-
selectedIndexedByHash:
|
|
467
|
-
}),
|
|
468
|
-
|
|
469
|
-
},
|
|
470
|
-
if (
|
|
471
|
-
let t = { ...
|
|
374
|
+
selectedIndexedByHash: _n
|
|
375
|
+
}), yn = async (e) => {
|
|
376
|
+
M.multiple ? B.selected = (B.selected ?? []).concat(e.value) : B.selected = e.value;
|
|
377
|
+
}, bn = async (e) => {
|
|
378
|
+
if (M.multiple) {
|
|
379
|
+
let t = { ..._n.value };
|
|
472
380
|
delete t[e.valueHash], B.selected = Object.values(t);
|
|
473
381
|
} else B.selected = null;
|
|
474
382
|
};
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
typeof
|
|
383
|
+
u(() => [
|
|
384
|
+
M.dependencies,
|
|
385
|
+
M.items,
|
|
386
|
+
typeof M.items == "function" ? [B.page, B.perPage] : void 0
|
|
479
387
|
], async () => {
|
|
480
|
-
|
|
481
|
-
}, { debounce:
|
|
482
|
-
let
|
|
483
|
-
if (!
|
|
484
|
-
let e = new Set(Y.value.map((e) => e.valueHash)), t = (t) => e.has(
|
|
485
|
-
if (
|
|
388
|
+
gn.value && (await pn(!0, B.selected), xn());
|
|
389
|
+
}, { debounce: M.depsDebounceTime });
|
|
390
|
+
let xn = () => {
|
|
391
|
+
if (!M.enforceCoherence) return;
|
|
392
|
+
let e = new Set(Y.value.map((e) => e.valueHash)), t = (t) => e.has(l(t));
|
|
393
|
+
if (M.multiple) {
|
|
486
394
|
let e = B.selected ?? [];
|
|
487
395
|
e.every(t) || (B.selected = e.filter(t));
|
|
488
|
-
} else !
|
|
396
|
+
} else !a(B.selected) && !t(B.selected) && (B.selected = null);
|
|
489
397
|
let n = B.unselected ?? [];
|
|
490
|
-
n.every(t) || (B.unselected = n.filter(t)), !
|
|
491
|
-
},
|
|
492
|
-
let n =
|
|
493
|
-
return e.formatter && (!
|
|
398
|
+
n.every(t) || (B.unselected = n.filter(t)), !a(A.value) && !t(A.value) && (A.value = null), j.value.every(t) || (j.value = j.value.filter(t));
|
|
399
|
+
}, Sn = (e, t) => {
|
|
400
|
+
let n = fn.value[e.key], r = e.align ?? "left", i = ut(t.item, e.key);
|
|
401
|
+
return e.formatter && (!a(i) || e.formatOnNull !== !1) && (i = e.formatter(i, e.key, t.item)), e.placeholder && a(i) && (i = e.placeholder), {
|
|
494
402
|
align: r,
|
|
495
|
-
classes: fe([`bb-table-data__cell--${r}`],
|
|
403
|
+
classes: fe([`bb-table-data__cell--${r}`], M.tdClass, e.tdClass, i, e.key, t.item),
|
|
496
404
|
content: i,
|
|
497
405
|
key: e.key,
|
|
498
406
|
label: e.label,
|
|
499
407
|
slotName: n
|
|
500
408
|
};
|
|
501
|
-
},
|
|
502
|
-
let t = e.align ?? "left", n =
|
|
409
|
+
}, Cn = p(() => M.columns.map((e) => {
|
|
410
|
+
let t = e.align ?? "left", n = fn.value[e.key], r = mt(n) ? `header:${n} (shadowed)` : `header:${n}`, i = wt(e.key), a = i ?? e.sorted, o = a ? a === "asc" ? "ascending" : "descending" : void 0;
|
|
503
411
|
return {
|
|
504
412
|
align: t,
|
|
505
413
|
key: e.key,
|
|
506
414
|
label: e.label,
|
|
507
|
-
slotName:
|
|
508
|
-
classes: pe([`bb-table-header--${t}`],
|
|
415
|
+
slotName: r,
|
|
416
|
+
classes: pe([`bb-table-header--${t}`], M.thClass, e.thClass),
|
|
509
417
|
sortable: !!e.sortable,
|
|
510
|
-
sortDirection:
|
|
511
|
-
sortOrder:
|
|
418
|
+
sortDirection: o,
|
|
419
|
+
sortOrder: i
|
|
512
420
|
};
|
|
513
|
-
})),
|
|
421
|
+
})), wn = (e, t) => {
|
|
422
|
+
let n = fn.value[e];
|
|
423
|
+
return (mt(n) ? void 0 : P[`header:${n}:${t}`]) ?? P[`header:${t}`];
|
|
424
|
+
}, Tn = (e) => ({
|
|
425
|
+
classes: e.classes,
|
|
426
|
+
columnKey: e.key,
|
|
427
|
+
items: mn.value,
|
|
428
|
+
label: e.label,
|
|
429
|
+
sortable: e.sortable,
|
|
430
|
+
sortOrder: e.sortOrder,
|
|
431
|
+
toggleSort: () => Tt(e.key)
|
|
432
|
+
}), En = (e, t) => {
|
|
514
433
|
let n = Y.value[e];
|
|
515
434
|
return n && n.valueHash === t ? n : Y.value.find((e) => e.valueHash === t);
|
|
516
|
-
},
|
|
517
|
-
let n =
|
|
435
|
+
}, Dn = p(() => vn.value.map((e, t) => {
|
|
436
|
+
let n = M.columns.map((t) => Sn(t, e));
|
|
518
437
|
return {
|
|
519
|
-
accessibleLabel:
|
|
438
|
+
accessibleLabel: on(n, e.item),
|
|
520
439
|
cols: n,
|
|
521
|
-
rowClasses: me(
|
|
440
|
+
rowClasses: me(M.rowClass, M.columns, n, e.item),
|
|
522
441
|
onRowClick: (n) => {
|
|
523
|
-
let r =
|
|
524
|
-
r && (
|
|
442
|
+
let r = En(t, e.valueHash);
|
|
443
|
+
r && (Ct(n, r), N("click:row", n, r.item));
|
|
525
444
|
},
|
|
526
445
|
onRowContextMenu: (n) => {
|
|
527
|
-
let r =
|
|
528
|
-
r &&
|
|
446
|
+
let r = En(t, e.valueHash);
|
|
447
|
+
r && N("contextmenu:row", n, r.item);
|
|
529
448
|
},
|
|
530
449
|
onRowDblClick: (n) => {
|
|
531
|
-
let r =
|
|
532
|
-
r &&
|
|
450
|
+
let r = En(t, e.valueHash);
|
|
451
|
+
r && N("dblclick:row", n, r.item);
|
|
533
452
|
},
|
|
534
453
|
item: e.item,
|
|
535
454
|
text: e.text,
|
|
536
455
|
valueHash: e.valueHash,
|
|
537
456
|
value: e.value
|
|
538
457
|
};
|
|
539
|
-
})),
|
|
458
|
+
})), On = p(() => {
|
|
540
459
|
let e = 0, t = ((B.page ?? 0) - 1) * (B.perPage ?? 0);
|
|
541
|
-
return
|
|
542
|
-
let i = Y.value[r], a = !
|
|
460
|
+
return Dn.value.map((n, r) => {
|
|
461
|
+
let i = Y.value[r], a = !M.selectable || typeof M.selectable == "function" && !M.selectable(n.item) || !!i.disabled, o = r + 1, s = t + 1 + o + e, c = Nn.value[n.valueHash] ?? !1;
|
|
543
462
|
return c && e++, {
|
|
544
463
|
...n,
|
|
545
464
|
expanded: c,
|
|
546
|
-
highlighted: n.valueHash in
|
|
465
|
+
highlighted: n.valueHash in St.value,
|
|
547
466
|
rowIndex: s,
|
|
548
467
|
selected: i.selected,
|
|
549
468
|
disabled: a
|
|
550
469
|
};
|
|
551
470
|
});
|
|
552
|
-
}), X =
|
|
553
|
-
|
|
554
|
-
X.value =
|
|
471
|
+
}), X = we(0);
|
|
472
|
+
D(() => On.value.length, (e) => {
|
|
473
|
+
X.value = d(X.value, 0, Math.max(0, e - 1));
|
|
555
474
|
});
|
|
556
|
-
let
|
|
475
|
+
let kn = () => I.value?.querySelectorAll(":scope > .bb-table__body > .bb-table-data__row"), An = (e) => {
|
|
557
476
|
X.value = e;
|
|
558
|
-
let t =
|
|
477
|
+
let t = kn()?.[e];
|
|
559
478
|
t?.focus(), t?.scrollIntoView({ block: "nearest" });
|
|
560
|
-
},
|
|
561
|
-
|
|
562
|
-
},
|
|
563
|
-
if (!
|
|
564
|
-
let n =
|
|
479
|
+
}, jn = (e) => {
|
|
480
|
+
M.keyboardNavigation && (X.value = e);
|
|
481
|
+
}, Mn = (e, t) => {
|
|
482
|
+
if (!M.keyboardNavigation || e.target !== e.currentTarget) return;
|
|
483
|
+
let n = On.value.length - 1;
|
|
565
484
|
if (n < 0) return;
|
|
566
485
|
let r = (t) => {
|
|
567
|
-
e.preventDefault(),
|
|
486
|
+
e.preventDefault(), An(d(t, 0, n));
|
|
568
487
|
};
|
|
569
488
|
switch (e.key) {
|
|
570
489
|
case "ArrowDown":
|
|
@@ -574,10 +493,10 @@ var Oe = {
|
|
|
574
493
|
r(t - 1);
|
|
575
494
|
break;
|
|
576
495
|
case "PageDown":
|
|
577
|
-
r(t +
|
|
496
|
+
r(t + lt);
|
|
578
497
|
break;
|
|
579
498
|
case "PageUp":
|
|
580
|
-
r(t -
|
|
499
|
+
r(t - lt);
|
|
581
500
|
break;
|
|
582
501
|
case "Home":
|
|
583
502
|
r(0);
|
|
@@ -590,105 +509,111 @@ var Oe = {
|
|
|
590
509
|
e.preventDefault(), e.currentTarget.click();
|
|
591
510
|
break;
|
|
592
511
|
}
|
|
593
|
-
}, { data:
|
|
512
|
+
}, { data: Nn } = ne({ items: j }), Pn = (e, t) => {
|
|
594
513
|
e.target instanceof HTMLElement && (e.target instanceof HTMLButtonElement || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), Z(t)));
|
|
595
|
-
},
|
|
596
|
-
"aria-controls":
|
|
514
|
+
}, Fn = (e) => ({
|
|
515
|
+
"aria-controls": a(Nn.value[e.valueHash]) ? void 0 : `expanded_${e.valueHash}`,
|
|
597
516
|
"aria-expanded": e.expanded ? "true" : "false",
|
|
598
517
|
onClick: (t) => {
|
|
599
518
|
t.stopPropagation(), Z(e.valueHash);
|
|
600
519
|
},
|
|
601
|
-
onKeydown: (t) =>
|
|
520
|
+
onKeydown: (t) => Pn(t, e.valueHash)
|
|
602
521
|
}), Z = (e) => {
|
|
603
522
|
let t = Y.value.find((t) => t.valueHash === e);
|
|
604
|
-
t && (e in
|
|
523
|
+
t && (e in Nn.value ? j.value = j.value.filter((t) => l(t) !== e) : j.value = [...j.value, t.value]);
|
|
605
524
|
};
|
|
606
|
-
O
|
|
525
|
+
D(O, () => {
|
|
607
526
|
Q.clear(), B.unselected = [], B.selected = [];
|
|
608
527
|
});
|
|
609
|
-
let
|
|
528
|
+
let In = p(() => {
|
|
610
529
|
let e = Array.isArray(B.selected) ? B.selected.length : 0;
|
|
611
|
-
return !!(
|
|
530
|
+
return !!(M.multiple && e > 0 && !O.value || O.value && Q.size > 0);
|
|
612
531
|
}), Q = Ce(/* @__PURE__ */ new Set());
|
|
613
|
-
|
|
532
|
+
D(() => B.unselected, (e) => {
|
|
614
533
|
Q.clear(), (e ?? []).forEach((e) => {
|
|
615
|
-
Q.add(
|
|
534
|
+
Q.add(l(e));
|
|
616
535
|
});
|
|
617
536
|
}, { immediate: !0 });
|
|
618
|
-
let
|
|
537
|
+
let Ln = (e) => {
|
|
619
538
|
let t = B.unselected ?? [];
|
|
620
539
|
if ($(e)) {
|
|
621
|
-
|
|
540
|
+
bn(e), N("item:unselected", e.value), Q.add(e.valueHash), B.unselected = [...t, e.value];
|
|
622
541
|
return;
|
|
623
542
|
}
|
|
624
|
-
|
|
625
|
-
}, $ = (e) => Q.has(e.valueHash) ? !1 : e.selected ||
|
|
626
|
-
if (
|
|
543
|
+
O.value || yn(e), N("item:selected", e.value), Q.delete(e.valueHash), B.unselected = t.filter((t) => l(t) !== l(e.value));
|
|
544
|
+
}, $ = (e) => Q.has(e.valueHash) ? !1 : e.selected || O.value, Rn = (e) => {
|
|
545
|
+
if (M.disabled || M.readonly || typeof M.selectable == "function" && !M.selectable(e.item)) return !0;
|
|
627
546
|
let t = Y.value.find((t) => t.valueHash === e.valueHash);
|
|
628
547
|
return !t || !!t.disabled;
|
|
629
|
-
},
|
|
630
|
-
|
|
631
|
-
},
|
|
632
|
-
disabled:
|
|
633
|
-
name:
|
|
548
|
+
}, zn = (e) => {
|
|
549
|
+
Rn(e) || Ln(e);
|
|
550
|
+
}, Bn = ce((e) => typeof e != "string", JSON.stringify), Vn = p(() => [].concat(B.selected ?? []).map((e) => ({
|
|
551
|
+
disabled: M.disabled,
|
|
552
|
+
name: M.name,
|
|
634
553
|
type: "hidden",
|
|
635
|
-
value:
|
|
636
|
-
}))),
|
|
554
|
+
value: Bn(e)
|
|
555
|
+
}))), Hn = [
|
|
637
556
|
70,
|
|
638
557
|
45,
|
|
639
558
|
85,
|
|
640
559
|
55
|
|
641
|
-
],
|
|
642
|
-
return
|
|
643
|
-
I.value &&
|
|
644
|
-
}, { flush: "post" }), (e, t) => (
|
|
560
|
+
], Un = p(() => d(Y.value.length || M.columns.length || 1, 4, 10));
|
|
561
|
+
return D(() => [On.value, M.fixedColumns], () => {
|
|
562
|
+
I.value && M.fixedColumns?.length && ue(I.value, M.fixedColumns), P.thead && be(an);
|
|
563
|
+
}, { flush: "post" }), (e, t) => (x(), m(Te(sn.value), {
|
|
645
564
|
id: e.id,
|
|
646
565
|
ref_key: "containerRef",
|
|
647
|
-
ref:
|
|
566
|
+
ref: ht,
|
|
648
567
|
"aria-busy": q.value,
|
|
649
|
-
class:
|
|
650
|
-
"data-bb-table-id":
|
|
568
|
+
class: y(un.value),
|
|
569
|
+
"data-bb-table-id": T(gt),
|
|
651
570
|
inert: e.disabled,
|
|
652
|
-
style:
|
|
571
|
+
style: b(en.value)
|
|
653
572
|
}, {
|
|
654
|
-
default:
|
|
655
|
-
e.selectable ? (
|
|
656
|
-
|
|
573
|
+
default: Oe(() => [
|
|
574
|
+
e.selectable ? (x(), g("legend", ke, w(cn.value), 1)) : h("", !0),
|
|
575
|
+
e.caption ? (x(), g("div", {
|
|
576
|
+
key: 1,
|
|
577
|
+
id: xt.value,
|
|
578
|
+
class: y(["bb-table-caption", { "sr-only": !e.displayCaption }])
|
|
579
|
+
}, w(e.caption), 11, Ae)) : h("", !0),
|
|
580
|
+
_("div", {
|
|
657
581
|
ref_key: "tableRef",
|
|
658
582
|
ref: I,
|
|
659
|
-
"aria-
|
|
583
|
+
"aria-labelledby": e.caption ? xt.value : void 0,
|
|
584
|
+
"aria-rowcount": J.value && T(B).totalItems != null ? T(B).totalItems + 1 : void 0,
|
|
585
|
+
class: "bb-table__table",
|
|
586
|
+
role: "table",
|
|
587
|
+
style: b({ gridTemplateColumns: Qt.value })
|
|
660
588
|
}, [
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
key: e.key,
|
|
667
|
-
style: x({ width: e.width })
|
|
668
|
-
}, null, 4))), 128))]),
|
|
669
|
-
v("thead", { inert: sn.value }, [T(e.$slots, "thead", {}, () => [v("tr", {
|
|
589
|
+
_("div", {
|
|
590
|
+
class: "bb-table__head",
|
|
591
|
+
inert: ln.value,
|
|
592
|
+
role: "rowgroup"
|
|
593
|
+
}, [C(e.$slots, "thead", {}, () => [_("div", {
|
|
670
594
|
"aria-rowindex": J.value ? 1 : void 0,
|
|
671
|
-
class:
|
|
595
|
+
class: y(["bb-table-header-row", e.headerRowClass]),
|
|
596
|
+
role: "row"
|
|
672
597
|
}, [
|
|
673
|
-
e.selectable ? (
|
|
598
|
+
e.selectable ? (x(), g("div", {
|
|
674
599
|
key: 0,
|
|
675
|
-
class:
|
|
676
|
-
|
|
677
|
-
}, [
|
|
600
|
+
class: y(["bb-table-header bb-table-header--select", e.thClass]),
|
|
601
|
+
role: "columnheader"
|
|
602
|
+
}, [C(e.$slots, "header:select", {
|
|
678
603
|
multiple: e.multiple,
|
|
679
|
-
selectAll: !!
|
|
680
|
-
text: e.selectText ||
|
|
681
|
-
}, () => [
|
|
604
|
+
selectAll: !!O.value,
|
|
605
|
+
text: e.selectText || T(F)("table.selectText").value
|
|
606
|
+
}, () => [_("span", Pe, [!e.disableSelectAll && e.multiple ? (x(), g("label", {
|
|
682
607
|
key: 0,
|
|
683
|
-
class:
|
|
684
|
-
}, [(
|
|
685
|
-
key:
|
|
686
|
-
modelValue:
|
|
687
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
688
|
-
checked: !!
|
|
608
|
+
class: y(["bb-table-check__label", { "bb-table-check__label--disabled": e.disabled }])
|
|
609
|
+
}, [(x(), m(te, {
|
|
610
|
+
key: In.value.toString(),
|
|
611
|
+
modelValue: O.value,
|
|
612
|
+
"onUpdate:modelValue": t[0] ||= (e) => O.value = e,
|
|
613
|
+
checked: !!O.value,
|
|
689
614
|
class: "bb-table-check",
|
|
690
615
|
disabled: e.disabled,
|
|
691
|
-
indeterminate:
|
|
616
|
+
indeterminate: In.value,
|
|
692
617
|
name: `select_all_${e.name || ""}`,
|
|
693
618
|
readonly: e.readonly
|
|
694
619
|
}, null, 8, [
|
|
@@ -698,118 +623,139 @@ var Oe = {
|
|
|
698
623
|
"indeterminate",
|
|
699
624
|
"name",
|
|
700
625
|
"readonly"
|
|
701
|
-
])),
|
|
702
|
-
(
|
|
703
|
-
key:
|
|
704
|
-
"aria-sort":
|
|
705
|
-
class:
|
|
706
|
-
"bb-table-header--edge-start":
|
|
707
|
-
"bb-table-header--edge-end":
|
|
626
|
+
])), _("span", Fe, w(e.selectAllLabel || T(F)("table.selectAllLabel").value), 1)], 2)) : e.multiple ? h("", !0) : (x(), g("span", Ie, w(e.selectText || T(F)("table.selectText").value), 1))])])], 2)) : h("", !0),
|
|
627
|
+
(x(!0), g(f, null, S(Cn.value, (n, r) => (x(), g("div", {
|
|
628
|
+
key: n.key,
|
|
629
|
+
"aria-sort": n.sortDirection ?? (n.sortable ? "none" : void 0),
|
|
630
|
+
class: y(["bb-table-header", [n.classes, {
|
|
631
|
+
"bb-table-header--edge-start": r === 0,
|
|
632
|
+
"bb-table-header--edge-end": r === Cn.value.length - 1
|
|
708
633
|
}]]),
|
|
709
|
-
|
|
710
|
-
}, [
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
},
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
634
|
+
role: "columnheader"
|
|
635
|
+
}, [
|
|
636
|
+
wn(n.key, "prepend") ? (x(), m(Te(wn(n.key, "prepend")), ye({
|
|
637
|
+
key: 0,
|
|
638
|
+
ref_for: !0
|
|
639
|
+
}, Tn(n)), null, 16)) : h("", !0),
|
|
640
|
+
C(e.$slots, n.slotName, {
|
|
641
|
+
classes: n.classes,
|
|
642
|
+
items: T(mn),
|
|
643
|
+
label: n.label,
|
|
644
|
+
sortOrder: n.sortOrder,
|
|
645
|
+
sortable: n.sortable,
|
|
646
|
+
toggleSort: () => Tt(n.key)
|
|
647
|
+
}, () => [n.sortable ? (x(), m(i, {
|
|
648
|
+
key: 0,
|
|
649
|
+
class: y(["bb-table-sort", {
|
|
650
|
+
"bb-table-sort--asc": n.sortOrder === "asc",
|
|
651
|
+
"bb-table-sort--desc": n.sortOrder === "desc"
|
|
652
|
+
}]),
|
|
653
|
+
type: "button",
|
|
654
|
+
onClick: () => Tt(n.key)
|
|
655
|
+
}, {
|
|
656
|
+
default: Oe(() => [_("span", Re, w(n.label), 1), t[1] ||= _("svg", {
|
|
657
|
+
"aria-hidden": "true",
|
|
658
|
+
class: "bb-table-sort__icon",
|
|
659
|
+
fill: "none",
|
|
660
|
+
height: "1em",
|
|
661
|
+
stroke: "currentColor",
|
|
662
|
+
"stroke-linecap": "round",
|
|
663
|
+
"stroke-linejoin": "round",
|
|
664
|
+
"stroke-width": "2",
|
|
665
|
+
viewBox: "0 0 24 24",
|
|
666
|
+
width: "1em"
|
|
667
|
+
}, [_("path", { d: "M12 20V4m-7 7l7-7l7 7" })], -1)]),
|
|
668
|
+
_: 2
|
|
669
|
+
}, 1032, ["class", "onClick"])) : (x(), g("span", ze, w(n.label), 1))]),
|
|
670
|
+
wn(n.key, "append") ? (x(), m(Te(wn(n.key, "append")), ye({
|
|
671
|
+
key: 1,
|
|
672
|
+
ref_for: !0
|
|
673
|
+
}, Tn(n)), null, 16)) : h("", !0)
|
|
674
|
+
], 10, Le))), 128)),
|
|
675
|
+
e.actions ? (x(), g("div", {
|
|
734
676
|
key: 1,
|
|
735
|
-
class:
|
|
736
|
-
|
|
737
|
-
}, [
|
|
738
|
-
], 10,
|
|
739
|
-
|
|
677
|
+
class: y(["bb-table-header bb-table-header--actions", e.thClass]),
|
|
678
|
+
role: "columnheader"
|
|
679
|
+
}, [C(e.$slots, "header:actions", { text: e.actionsText || T(F)("table.actionsText").value }, () => [_("span", Be, w(e.actionsText || T(F)("table.actionsText").value), 1)])], 2)) : h("", !0)
|
|
680
|
+
], 10, Ne)])], 8, Me),
|
|
681
|
+
_("div", Ve, [q.value && !T(Y).length ? C(e.$slots, "loading", {
|
|
740
682
|
key: 0,
|
|
741
|
-
items:
|
|
742
|
-
}, () => [(
|
|
683
|
+
items: T(mn)
|
|
684
|
+
}, () => [(x(!0), g(f, null, S(Un.value, (n, r) => (x(), g("div", {
|
|
743
685
|
key: r,
|
|
744
686
|
"aria-rowindex": J.value ? r + 2 : void 0,
|
|
745
|
-
class: "bb-table-skeleton__row"
|
|
687
|
+
class: "bb-table-skeleton__row",
|
|
688
|
+
role: "row"
|
|
746
689
|
}, [
|
|
747
|
-
e.selectable ? (
|
|
748
|
-
(
|
|
690
|
+
e.selectable ? (x(), g("div", Ue, t[2] ||= [_("div", { class: "bb-table-skeleton__placeholder" }, null, -1)])) : h("", !0),
|
|
691
|
+
(x(!0), g(f, null, S(M.columns, (e, n) => (x(), g("div", {
|
|
749
692
|
key: e.key,
|
|
750
|
-
class:
|
|
751
|
-
|
|
693
|
+
class: y(["bb-table-skeleton__cell", [`bb-table-skeleton__cell--${e.skeleton ?? "text"}`]]),
|
|
694
|
+
role: "cell"
|
|
695
|
+
}, [!e.skeleton || e.skeleton === "text" ? (x(), g("div", We, [_("div", {
|
|
752
696
|
class: "bb-table-skeleton__line",
|
|
753
|
-
style:
|
|
754
|
-
}, null, 4),
|
|
697
|
+
style: b({ width: `${Hn[(r + n) % 4]}%` })
|
|
698
|
+
}, null, 4), _("div", {
|
|
755
699
|
class: "bb-table-skeleton__line",
|
|
756
|
-
style:
|
|
757
|
-
}, null, 4)])) : e.skeleton === "avatar" ? (
|
|
700
|
+
style: b({ width: `${Hn[(r + n + 2) % 4]}%` })
|
|
701
|
+
}, null, 4)])) : e.skeleton === "avatar" ? (x(), g("div", Ge)) : e.skeleton === "avatar-text" ? (x(), g("div", Ke, [t[3] ||= _("div", { class: "bb-table-skeleton__avatar" }, null, -1), _("div", qe, [_("div", {
|
|
758
702
|
class: "bb-table-skeleton__line",
|
|
759
|
-
style:
|
|
760
|
-
}, null, 4),
|
|
703
|
+
style: b({ width: `${Hn[(r + n) % 4]}%` })
|
|
704
|
+
}, null, 4), _("div", {
|
|
761
705
|
class: "bb-table-skeleton__line",
|
|
762
|
-
style:
|
|
763
|
-
}, null, 4)])])) : e.skeleton === "image" ? (
|
|
764
|
-
e.actions ? (
|
|
765
|
-
], 8,
|
|
706
|
+
style: b({ width: `${Hn[(r + n + 2) % 4]}%` })
|
|
707
|
+
}, null, 4)])])) : e.skeleton === "image" ? (x(), g("div", Je)) : e.skeleton === "badge" ? (x(), g("div", Ye)) : h("", !0)], 2))), 128)),
|
|
708
|
+
e.actions ? (x(), g("div", Xe, t[4] ||= [_("div", { class: "bb-table-skeleton__placeholder" }, null, -1)])) : h("", !0)
|
|
709
|
+
], 8, He))), 128))]) : T(Y).length ? C(e.$slots, "tbody", { key: 2 }, () => [(x(!0), g(f, null, S(On.value, (t, n) => (x(), g(f, { key: t.valueHash }, [_("div", {
|
|
766
710
|
"aria-current": t.highlighted ? "true" : void 0,
|
|
767
711
|
"aria-rowindex": J.value && t.rowIndex ? t.rowIndex : void 0,
|
|
768
|
-
class:
|
|
769
|
-
inert:
|
|
712
|
+
class: y(["bb-table-data__row", [t.rowClasses, { "bb-table-data__row--highlighted": t.highlighted }]]),
|
|
713
|
+
inert: ln.value,
|
|
714
|
+
role: "row",
|
|
770
715
|
tabindex: e.keyboardNavigation ? n === X.value ? 0 : -1 : void 0,
|
|
771
716
|
onClick: t.onRowClick,
|
|
772
717
|
onContextmenu: t.onRowContextMenu,
|
|
773
718
|
onDblclick: t.onRowDblClick,
|
|
774
|
-
onFocus: () =>
|
|
775
|
-
onKeydown: (e) =>
|
|
719
|
+
onFocus: () => jn(n),
|
|
720
|
+
onKeydown: (e) => Mn(e, n)
|
|
776
721
|
}, [
|
|
777
|
-
e.selectable ? (
|
|
722
|
+
e.selectable ? (x(), g("div", {
|
|
778
723
|
key: 0,
|
|
779
|
-
class:
|
|
780
|
-
|
|
724
|
+
class: y(["bb-table-data__cell bb-table-data__cell--select", e.tdClass]),
|
|
725
|
+
role: "cell"
|
|
726
|
+
}, [C(e.$slots, "select", {
|
|
781
727
|
checked: $(t),
|
|
782
|
-
disabled:
|
|
783
|
-
inputName:
|
|
728
|
+
disabled: Rn(t),
|
|
729
|
+
inputName: T(dt),
|
|
784
730
|
item: t.item,
|
|
785
731
|
readonly: !!e.readonly,
|
|
786
|
-
toggleSelected: () =>
|
|
732
|
+
toggleSelected: () => zn(t),
|
|
787
733
|
value: t.value
|
|
788
|
-
}, () => [e.multiple ? (
|
|
734
|
+
}, () => [e.multiple ? (x(), g("label", {
|
|
789
735
|
key: 0,
|
|
790
|
-
class:
|
|
791
|
-
}, [_e(
|
|
736
|
+
class: y(["bb-table-check__label", { "bb-table-check__label--disabled": t.disabled }])
|
|
737
|
+
}, [_e(te, {
|
|
792
738
|
checked: $(t),
|
|
793
739
|
class: "bb-table-check",
|
|
794
740
|
disabled: t.disabled,
|
|
795
741
|
readonly: e.readonly,
|
|
796
|
-
onChange: () =>
|
|
742
|
+
onChange: () => Ln(t)
|
|
797
743
|
}, null, 8, [
|
|
798
744
|
"checked",
|
|
799
745
|
"disabled",
|
|
800
746
|
"readonly",
|
|
801
747
|
"onChange"
|
|
802
|
-
]),
|
|
748
|
+
]), _("span", tt, w(t.accessibleLabel), 1)], 2)) : (x(), g("label", {
|
|
803
749
|
key: 1,
|
|
804
|
-
class:
|
|
805
|
-
}, [_e(
|
|
750
|
+
class: y(["bb-table-radio__label", { "bb-table-radio__label--disabled": t.disabled }])
|
|
751
|
+
}, [_e(se, {
|
|
806
752
|
checked: t.selected,
|
|
807
753
|
class: "bb-table-radio",
|
|
808
754
|
disabled: t.disabled,
|
|
809
|
-
name:
|
|
755
|
+
name: T(dt),
|
|
810
756
|
readonly: e.readonly,
|
|
811
757
|
value: t.value,
|
|
812
|
-
onChange: () =>
|
|
758
|
+
onChange: () => Ln(t)
|
|
813
759
|
}, null, 8, [
|
|
814
760
|
"checked",
|
|
815
761
|
"disabled",
|
|
@@ -817,79 +763,88 @@ var Oe = {
|
|
|
817
763
|
"readonly",
|
|
818
764
|
"value",
|
|
819
765
|
"onChange"
|
|
820
|
-
]),
|
|
821
|
-
(
|
|
766
|
+
]), _("span", nt, w(t.accessibleLabel), 1)], 2))])], 2)) : h("", !0),
|
|
767
|
+
(x(!0), g(f, null, S(t.cols, (n, r) => (x(), g("div", {
|
|
822
768
|
key: n.key,
|
|
823
|
-
class:
|
|
769
|
+
class: y(["bb-table-data__cell", [n.classes, {
|
|
824
770
|
"bb-table-data__cell--edge-start": r === 0,
|
|
825
771
|
"bb-table-data__cell--edge-end": r === t.cols.length - 1
|
|
826
|
-
}]])
|
|
827
|
-
|
|
772
|
+
}]]),
|
|
773
|
+
role: "cell"
|
|
774
|
+
}, [C(e.$slots, n.slotName, {
|
|
828
775
|
classes: n.classes,
|
|
829
776
|
content: n.content,
|
|
830
|
-
expandProps:
|
|
777
|
+
expandProps: Fn(t),
|
|
831
778
|
expanded: t.expanded,
|
|
832
779
|
highlighted: t.highlighted,
|
|
833
780
|
item: t.item,
|
|
834
781
|
selected: $(t),
|
|
835
|
-
sortOrder:
|
|
782
|
+
sortOrder: wt(n.key),
|
|
836
783
|
toggleExpanded: () => Z(t.valueHash),
|
|
837
784
|
toggleHighlighted: () => z(t),
|
|
838
|
-
toggleSelected: () =>
|
|
785
|
+
toggleSelected: () => zn(t),
|
|
839
786
|
value: t.value
|
|
840
|
-
}, () => [ge(
|
|
841
|
-
e.actions ? (
|
|
787
|
+
}, () => [ge(w(n.content), 1)])], 2))), 128)),
|
|
788
|
+
e.actions ? (x(), g("div", {
|
|
842
789
|
key: 1,
|
|
843
|
-
class:
|
|
844
|
-
|
|
845
|
-
|
|
790
|
+
class: y(["bb-table__cell bb-table__cell--actions", e.tdClass]),
|
|
791
|
+
role: "cell"
|
|
792
|
+
}, [C(e.$slots, "actions", {
|
|
793
|
+
expandProps: Fn(t),
|
|
846
794
|
expanded: t.expanded,
|
|
847
795
|
highlighted: t.highlighted,
|
|
848
796
|
item: t.item,
|
|
849
797
|
selected: $(t),
|
|
850
798
|
toggleExpanded: () => Z(t.valueHash),
|
|
851
799
|
toggleHighlighted: () => z(t),
|
|
852
|
-
toggleSelected: () =>
|
|
800
|
+
toggleSelected: () => zn(t),
|
|
853
801
|
value: t.value
|
|
854
|
-
})], 2)) :
|
|
855
|
-
], 42,
|
|
802
|
+
})], 2)) : h("", !0)
|
|
803
|
+
], 42, et), t.expanded ? (x(), g("div", {
|
|
856
804
|
key: 0,
|
|
857
805
|
id: `expanded_${t.valueHash}`,
|
|
858
806
|
"aria-rowindex": J.value && t.rowIndex ? t.rowIndex + 1 : void 0,
|
|
859
|
-
class:
|
|
860
|
-
|
|
807
|
+
class: y(["bb-table-expand__row", { "bb-table-expand__row--highlighted": t.highlighted }]),
|
|
808
|
+
role: "row"
|
|
809
|
+
}, [_("div", {
|
|
810
|
+
"aria-colspan": dn.value,
|
|
861
811
|
class: "bb-table-expand__cell",
|
|
862
|
-
|
|
863
|
-
}, [
|
|
864
|
-
expandProps:
|
|
812
|
+
role: "cell"
|
|
813
|
+
}, [C(e.$slots, "expand", {
|
|
814
|
+
expandProps: Fn(t),
|
|
865
815
|
expanded: t.expanded,
|
|
866
816
|
highlighted: t.highlighted,
|
|
867
817
|
item: t.item,
|
|
868
818
|
selected: $(t),
|
|
869
819
|
toggleExpanded: () => Z(t.valueHash),
|
|
870
820
|
toggleHighlighted: () => z(t),
|
|
871
|
-
toggleSelected: () =>
|
|
821
|
+
toggleSelected: () => zn(t),
|
|
872
822
|
value: t.value
|
|
873
|
-
})], 8,
|
|
823
|
+
})], 8, it)], 10, rt)) : h("", !0)], 64))), 128))]) : (x(), g("div", {
|
|
874
824
|
key: 1,
|
|
875
825
|
"aria-rowindex": J.value ? 2 : void 0,
|
|
876
|
-
class: "bb-table-no-data__row"
|
|
877
|
-
|
|
826
|
+
class: "bb-table-no-data__row",
|
|
827
|
+
role: "row"
|
|
828
|
+
}, [_("div", {
|
|
829
|
+
"aria-colspan": dn.value,
|
|
878
830
|
class: "bb-table-no-data__cell",
|
|
879
|
-
|
|
880
|
-
}, [
|
|
831
|
+
role: "cell"
|
|
832
|
+
}, [C(e.$slots, "no-data", {}, () => [_("span", $e, w(e.noDataText || T(F)("common.noDataText").value), 1)])], 8, Qe)], 8, Ze)), q.value ? (x(), g("div", {
|
|
881
833
|
key: 3,
|
|
882
|
-
"aria-rowindex": J.value && !
|
|
883
|
-
class: "bb-table-loading__row bb-table-loading__row--sr-only"
|
|
884
|
-
|
|
885
|
-
|
|
834
|
+
"aria-rowindex": J.value && !T(Y).length ? Un.value + 2 : void 0,
|
|
835
|
+
class: "bb-table-loading__row bb-table-loading__row--sr-only",
|
|
836
|
+
role: "row"
|
|
837
|
+
}, [_("div", {
|
|
838
|
+
"aria-colspan": dn.value,
|
|
886
839
|
class: "bb-table-loading__cell",
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
840
|
+
role: "cell"
|
|
841
|
+
}, [_("span", st, w(e.loadingText || T(F)("common.loadingText").value), 1)], 8, ot)], 8, at)) : h("", !0)]),
|
|
842
|
+
_("div", {
|
|
843
|
+
class: "bb-table__foot",
|
|
844
|
+
role: P.tfoot ? "rowgroup" : void 0
|
|
845
|
+
}, [C(e.$slots, "tfoot", { columnCount: dn.value })], 8, ct)
|
|
846
|
+
], 12, je),
|
|
847
|
+
(x(!0), g(f, null, S(Vn.value, (e) => (x(), g("input", ye({
|
|
893
848
|
key: e.value,
|
|
894
849
|
ref_for: !0
|
|
895
850
|
}, e), null, 16))), 128))
|
|
@@ -906,4 +861,4 @@ var Oe = {
|
|
|
906
861
|
}
|
|
907
862
|
});
|
|
908
863
|
//#endregion
|
|
909
|
-
export {
|
|
864
|
+
export { O as default };
|