bitboss-ui 2.0.134 → 2.0.136
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/index100.js +9 -9
- package/dist/index111.js +352 -342
- package/dist/index119.js +2 -2
- package/dist/index121.js +4 -4
- package/dist/index123.js +1 -1
- package/dist/index125.js +1 -1
- package/dist/index127.js +1 -1
- package/dist/index128.js +1 -1
- package/dist/index129.js +1 -1
- package/dist/index13.js +2 -2
- package/dist/index15.js +8 -8
- package/dist/index17.js +3 -3
- package/dist/index19.js +8 -8
- package/dist/index207.js +2 -86
- package/dist/index208.js +6 -0
- package/dist/index209.js +2 -29
- package/dist/index21.js +16 -16
- package/dist/index210.js +86 -17
- package/dist/index212.js +26 -12
- package/dist/index213.js +17 -3
- package/dist/index214.js +50 -11
- package/dist/index215.js +13 -14
- package/dist/index216.js +3 -4
- package/dist/index217.js +11 -40
- package/dist/index218.js +15 -19
- package/dist/index219.js +4 -94
- package/dist/index220.js +43 -0
- package/dist/index221.js +18 -198
- package/dist/index222.js +96 -0
- package/dist/index224.js +202 -0
- package/dist/index226.js +64 -12
- package/dist/index228.js +13 -3
- package/dist/index229.js +12 -5
- package/dist/index23.js +16 -16
- package/dist/index230.js +3 -7
- package/dist/index231.js +5 -15
- package/dist/index232.js +16 -2
- package/dist/index233.js +16 -4
- package/dist/index234.js +19 -2
- package/dist/index235.js +15 -5
- package/dist/index236.js +16 -122
- package/dist/index237.js +24 -13
- package/dist/index238.js +2 -16
- package/dist/index239.js +8 -19
- package/dist/index240.js +250 -15
- package/dist/index241.js +52 -2
- package/dist/index242.js +44 -2
- package/dist/index243.js +5 -2
- package/dist/index244.js +60 -3
- package/dist/index245.js +122 -16
- package/dist/index246.js +2 -27
- package/dist/index247.js +5 -249
- package/dist/index248.js +2 -52
- package/dist/index249.js +3 -44
- package/dist/index25.js +7 -7
- package/dist/index250.js +7 -5
- package/dist/index251.js +11 -56
- package/dist/index252.js +106 -2
- package/dist/index254.js +47 -53
- package/dist/index256.js +2 -100
- package/dist/index258.js +1 -1
- package/dist/index259.js +2 -2
- package/dist/index261.js +4 -4
- package/dist/index262.js +3 -3
- package/dist/index265.js +3 -8
- package/dist/index266.js +6 -23
- package/dist/index267.js +16 -6
- package/dist/index268.js +8 -15
- package/dist/index269.js +23 -9
- package/dist/index27.js +1 -1
- package/dist/index270.js +9 -9
- package/dist/index271.js +3 -8
- package/dist/index272.js +17 -3
- package/dist/index273.js +7 -15
- package/dist/index275.js +1 -1
- package/dist/index277.js +1 -1
- package/dist/index278.js +1 -1
- package/dist/index279.js +1 -1
- package/dist/index282.js +2 -2
- package/dist/index284.js +224 -2
- package/dist/index285.js +281 -5
- package/dist/index286.js +6 -67
- package/dist/index287.js +2 -200
- package/dist/index288.js +2 -2
- package/dist/index289.js +2 -89
- package/dist/index29.js +2 -2
- package/dist/index290.js +2 -4
- package/dist/index291.js +2 -281
- package/dist/index292.js +2 -6
- package/dist/index293.js +2 -2
- package/dist/index294.js +2 -2
- package/dist/index295.js +2 -2
- package/dist/index296.js +2 -2
- package/dist/index297.js +2 -2
- package/dist/index298.js +22 -2
- package/dist/index300.js +200 -2
- package/dist/index301.js +8 -2
- package/dist/index302.js +2 -2
- package/dist/index303.js +1 -1
- package/dist/index304.js +89 -2
- package/dist/index305.js +3 -2
- package/dist/index306.js +3 -22
- package/dist/index307.js +128 -0
- package/dist/index308.js +2 -3
- package/dist/index309.js +436 -3
- package/dist/index31.js +2 -2
- package/dist/index310.js +121 -120
- package/dist/index311.js +2 -2
- package/dist/index312.js +5 -436
- package/dist/index313.js +66 -126
- package/dist/index320.js +480 -8
- package/dist/index321.js +57 -6
- package/dist/index322.js +56 -7
- package/dist/index323.js +8 -57
- package/dist/index324.js +6 -57
- package/dist/index325.js +8 -7
- package/dist/index326.js +32 -18
- package/dist/index327.js +25 -6
- package/dist/index328.js +6 -46
- package/dist/index329.js +18 -32
- package/dist/index33.js +8 -8
- package/dist/index330.js +6 -25
- package/dist/index331.js +47 -480
- package/dist/index332.js +1 -1
- package/dist/index335.js +4 -0
- package/dist/index336.js +420 -43
- package/dist/index337.js +47 -2
- package/dist/index35.js +4 -4
- package/dist/index37.js +17 -17
- package/dist/index39.js +4 -4
- package/dist/index41.js +2 -2
- package/dist/index43.js +8 -8
- package/dist/index45.js +8 -8
- package/dist/index47.js +2 -2
- package/dist/index49.js +2 -2
- package/dist/index53.js +1 -1
- package/dist/index55.js +1 -1
- package/dist/index57.js +2 -2
- package/dist/index61.js +1 -1
- package/dist/index75.js +3 -3
- package/dist/index77.js +1 -1
- package/dist/index79.js +2 -2
- package/dist/index81.js +1 -1
- package/dist/index84.js +4 -4
- package/dist/index86.js +2 -2
- package/dist/index88.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/index211.js +0 -53
- package/dist/index223.js +0 -67
- package/dist/index225.js +0 -15
- package/dist/index227.js +0 -10
- package/dist/index299.js +0 -226
- package/dist/index333.js +0 -426
- /package/dist/{index253.js → index257.js} +0 -0
package/dist/index111.js
CHANGED
@@ -1,31 +1,31 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { add as
|
3
|
-
import { clamp as
|
4
|
-
import { isNil as
|
5
|
-
import { useId as
|
6
|
-
import { useItemValue as
|
7
|
-
import { when as
|
8
|
-
import
|
1
|
+
import { defineComponent as pe, ref as E, computed as h, toRef as z, watch as D, reactive as me, openBlock as d, createBlock as X, resolveDynamicComponent as fe, normalizeClass as p, unref as v, normalizeStyle as ye, withCtx as he, createElementBlock as c, toDisplayString as m, createCommentVNode as C, createElementVNode as n, renderSlot as f, Fragment as T, renderList as $, createVNode as Y, createTextVNode as ve, mergeProps as ke } from "vue";
|
2
|
+
import { add as _e } from "./index311.js";
|
3
|
+
import { clamp as ge } from "./index206.js";
|
4
|
+
import { isNil as A } from "./index257.js";
|
5
|
+
import { useId as Ce } from "./index8.js";
|
6
|
+
import { useItemValue as we } from "./index273.js";
|
7
|
+
import { when as Ie } from "./index208.js";
|
8
|
+
import Z from "./index17.js";
|
9
9
|
/* empty css */
|
10
|
-
import
|
10
|
+
import Ve from "./index31.js";
|
11
11
|
/* empty css */
|
12
|
-
import { hash as
|
13
|
-
import { useItemsGetter as
|
14
|
-
import { usePrefill as
|
15
|
-
import { useIndexById as
|
16
|
-
import { useBaseOptions as
|
17
|
-
import { useHashedWatcher as
|
18
|
-
import { useLocale as
|
19
|
-
const
|
12
|
+
import { hash as W } from "./index216.js";
|
13
|
+
import { useItemsGetter as Be } from "./index212.js";
|
14
|
+
import { usePrefill as Te } from "./index218.js";
|
15
|
+
import { useIndexById as $e } from "./index213.js";
|
16
|
+
import { useBaseOptions as Ae } from "./index214.js";
|
17
|
+
import { useHashedWatcher as xe } from "./index217.js";
|
18
|
+
import { useLocale as Le } from "./index229.js";
|
19
|
+
const Ne = {
|
20
20
|
key: 0,
|
21
21
|
class: "sr-only"
|
22
|
-
},
|
22
|
+
}, De = ["aria-rowindex"], Se = { class: "bb-table-header__content" }, He = { class: "bb-table-check__label-text sr-only" }, Re = {
|
23
23
|
key: 1,
|
24
24
|
class: "bb-table-radio__label-text sr-only"
|
25
|
-
},
|
25
|
+
}, Oe = ["aria-sort"], Pe = { class: "bb-table-header__content" }, je = { class: "bb-table-header__content sr-only" }, Ee = ["aria-rowindex"], ze = ["colspan"], We = { class: "bb-table-loading__text sr-only" }, Fe = {
|
26
26
|
class: "bb-table-skeleton__container",
|
27
27
|
role: "status"
|
28
|
-
},
|
28
|
+
}, Me = ["aria-rowindex"], qe = ["colspan"], Ue = { class: "bb-table-no-data__text" }, Ge = ["aria-rowindex", "onClick", "onContextmenu", "onDblclick"], Je = { class: "bb-table-check__label-text sr-only" }, Ke = { class: "bb-table-radio__label-text sr-only" }, ml = /* @__PURE__ */ pe({
|
29
29
|
__name: "BbTable",
|
30
30
|
props: {
|
31
31
|
accessibleLabel: {},
|
@@ -66,190 +66,188 @@ const xe = {
|
|
66
66
|
unselectedItems: { default: () => [] }
|
67
67
|
},
|
68
68
|
emits: ["click:row", "contextmenu:row", "dblclick:row", "update:modelValue", "update:selectAll", "update:unselectedItems", "item:selected", "item:unselected"],
|
69
|
-
setup(
|
70
|
-
const { getItemValue:
|
71
|
-
() => !
|
72
|
-
),
|
69
|
+
setup(ee, { emit: le }) {
|
70
|
+
const { getItemValue: te } = we(), F = Ce().id.value, l = ee, r = le, { t: I } = Le(), S = E(), ae = (e) => [I("table.select").value].concat(e.map((a) => a.content)).join(" "), se = h(() => l.selectable ? "fieldset" : "div"), M = h(() => l.loading || oe.value), V = h(
|
71
|
+
() => !A(l.page) && !A(l.perPage) && !A(l.totalItems)
|
72
|
+
), q = h(() => [!!l.selectable, !!l.actions].reduce(
|
73
73
|
(e, a) => e + +!!a,
|
74
|
-
|
75
|
-
)),
|
76
|
-
() =>
|
74
|
+
l.columns.length
|
75
|
+
)), U = h(
|
76
|
+
() => l.columns.reduce(
|
77
77
|
(e, a) => {
|
78
|
-
const
|
79
|
-
return e[a.key] =
|
78
|
+
const i = a.key.split(/\W+/g).join("_").toLowerCase();
|
79
|
+
return e[a.key] = i, e;
|
80
80
|
},
|
81
81
|
{}
|
82
82
|
)
|
83
83
|
), {
|
84
|
-
getter:
|
85
|
-
items:
|
86
|
-
loading:
|
87
|
-
} =
|
88
|
-
items:
|
89
|
-
}), { hasPrefilled:
|
84
|
+
getter: G,
|
85
|
+
items: H,
|
86
|
+
loading: oe
|
87
|
+
} = Be({
|
88
|
+
items: z(l, "items")
|
89
|
+
}), { hasPrefilled: ne } = Te({
|
90
90
|
onStart: !0,
|
91
|
-
currentValue:
|
92
|
-
multiple:
|
91
|
+
currentValue: l.modelValue,
|
92
|
+
multiple: l.multiple,
|
93
93
|
fn: async ({ prefill: e }) => {
|
94
|
-
await
|
94
|
+
await G(e, l.modelValue);
|
95
95
|
}
|
96
|
-
}), { data:
|
97
|
-
items:
|
98
|
-
}), { options: x } =
|
99
|
-
disabled:
|
100
|
-
items:
|
96
|
+
}), { data: J } = $e({
|
97
|
+
items: z(l, "modelValue")
|
98
|
+
}), { options: x } = Ae({
|
99
|
+
disabled: z(l, "disabled"),
|
100
|
+
items: H,
|
101
101
|
itemText: void 0,
|
102
|
-
itemValue:
|
103
|
-
max:
|
102
|
+
itemValue: l.itemValue,
|
103
|
+
max: l.max,
|
104
104
|
selectable: !0,
|
105
|
-
selectedIndexedByHash:
|
106
|
-
}),
|
107
|
-
|
108
|
-
},
|
109
|
-
if (
|
110
|
-
const a = { ...
|
111
|
-
delete a[e.valueHash],
|
105
|
+
selectedIndexedByHash: J
|
106
|
+
}), de = async (e) => {
|
107
|
+
l.multiple ? r("update:modelValue", l.modelValue.concat(e.value)) : r("update:modelValue", e.value);
|
108
|
+
}, ce = async (e) => {
|
109
|
+
if (l.multiple) {
|
110
|
+
const a = { ...J.value };
|
111
|
+
delete a[e.valueHash], r("update:modelValue", Object.values(a));
|
112
112
|
} else
|
113
|
-
|
113
|
+
r("update:modelValue", null);
|
114
114
|
};
|
115
|
-
|
116
|
-
() => [
|
115
|
+
xe(
|
116
|
+
() => [l.dependencies, l.items],
|
117
117
|
async () => {
|
118
|
-
|
118
|
+
ne.value && await G(!1, l.modelValue);
|
119
119
|
},
|
120
120
|
{
|
121
|
-
debounce:
|
121
|
+
debounce: l.depsDebounceTime
|
122
122
|
}
|
123
123
|
);
|
124
|
-
const
|
125
|
-
() =>
|
124
|
+
const ie = h(
|
125
|
+
() => l.columns.map(
|
126
126
|
(e) => {
|
127
|
-
const a = e.align || "left", { label:
|
128
|
-
let
|
129
|
-
|
130
|
-
const
|
127
|
+
const a = e.align || "left", { label: i, key: g } = e, t = `header:${U.value[e.key]}`;
|
128
|
+
let o = [`bb-table-header--${a}`];
|
129
|
+
l.thClass && (o = o.concat(l.thClass)), e.thClass && (o = o.concat(e.thClass));
|
130
|
+
const b = e.sorted ? e.sorted === "asc" ? "ascending" : "descending" : void 0;
|
131
131
|
return {
|
132
132
|
align: a,
|
133
|
-
key:
|
134
|
-
label:
|
135
|
-
slotName:
|
136
|
-
classes:
|
137
|
-
sortDirection:
|
133
|
+
key: g,
|
134
|
+
label: i,
|
135
|
+
slotName: t,
|
136
|
+
classes: o,
|
137
|
+
sortDirection: b
|
138
138
|
};
|
139
139
|
}
|
140
140
|
)
|
141
|
-
),
|
141
|
+
), R = h(() => x.value.map(
|
142
142
|
(e, a) => {
|
143
|
-
let
|
144
|
-
typeof
|
145
|
-
const
|
143
|
+
let i = !l.selectable;
|
144
|
+
typeof l.selectable == "function" && (i = !l.selectable(e.item)), i = i || !!e.disabled;
|
145
|
+
const g = V.value ? a + (l.page - 1) * l.perPage + 2 : void 0, t = l.columns.map(
|
146
146
|
(s) => {
|
147
|
-
const L =
|
148
|
-
let y =
|
147
|
+
const L = U.value[s.key], N = s.align || "left", { label: P, key: j } = s;
|
148
|
+
let y = te(e.item, s.key);
|
149
149
|
s.formatter && // By default the formatter runs anyway
|
150
|
-
(!
|
151
|
-
let
|
152
|
-
if (
|
153
|
-
if (typeof
|
154
|
-
let
|
155
|
-
|
156
|
-
} else
|
150
|
+
(!A(y) || s.formatOnNull !== !1) && (y = s.formatter(y, s.key, e.item)), s.placeholder && A(y) && (y = s.placeholder);
|
151
|
+
let u = [`bb-table-data__cell--${N}`];
|
152
|
+
if (l.tdClass)
|
153
|
+
if (typeof l.tdClass == "function") {
|
154
|
+
let B = l.tdClass(y, s.key, e.item);
|
155
|
+
B && (u = u.concat(B));
|
156
|
+
} else u = u.concat(l.tdClass);
|
157
157
|
if (s.tdClass)
|
158
158
|
if (typeof s.tdClass == "function") {
|
159
|
-
let
|
160
|
-
|
161
|
-
} else
|
159
|
+
let B = s.tdClass(y, s.key, e.item);
|
160
|
+
B && (u = u.concat(B));
|
161
|
+
} else u = u.concat(s.tdClass);
|
162
162
|
return {
|
163
163
|
align: N,
|
164
|
-
classes:
|
164
|
+
classes: u,
|
165
165
|
content: y,
|
166
|
-
key:
|
166
|
+
key: j,
|
167
167
|
label: P,
|
168
168
|
slotName: L
|
169
169
|
};
|
170
170
|
}
|
171
171
|
);
|
172
172
|
return {
|
173
|
-
accessibleLabel:
|
174
|
-
cols:
|
175
|
-
onRowClick: (s) =>
|
176
|
-
onRowContextMenu: (s) =>
|
177
|
-
onRowDblClick: (s) =>
|
173
|
+
accessibleLabel: ae(t),
|
174
|
+
cols: t,
|
175
|
+
onRowClick: (s) => r("click:row", s, e, !!e.selected),
|
176
|
+
onRowContextMenu: (s) => r("contextmenu:row", s, e, !!e.selected),
|
177
|
+
onRowDblClick: (s) => r("dblclick:row", s, e, !!e.selected),
|
178
178
|
item: e.item,
|
179
179
|
text: e.text,
|
180
|
-
rowIndex:
|
180
|
+
rowIndex: g,
|
181
181
|
valueHash: e.valueHash,
|
182
182
|
value: e.value,
|
183
183
|
selected: e.selected,
|
184
|
-
disabled:
|
184
|
+
disabled: i
|
185
185
|
};
|
186
186
|
}
|
187
|
-
)), k =
|
187
|
+
)), k = E(l.selectAll);
|
188
188
|
D(
|
189
|
-
() =>
|
189
|
+
() => l.selectAll,
|
190
190
|
() => {
|
191
|
-
k.value =
|
191
|
+
k.value = l.selectAll;
|
192
192
|
}
|
193
193
|
), D(k, () => {
|
194
|
-
_.clear(),
|
194
|
+
_.clear(), r("update:unselectedItems", []), r("update:modelValue", []);
|
195
195
|
});
|
196
|
-
const
|
196
|
+
const K = h(() => {
|
197
197
|
var e;
|
198
|
-
return (e =
|
199
|
-
}), _ =
|
198
|
+
return (e = l.modelValue) != null && e.length ? R.value.some((a) => !a.selected) : !!(k.value && _.size);
|
199
|
+
}), _ = me(/* @__PURE__ */ new Set());
|
200
200
|
D(
|
201
|
-
() =>
|
201
|
+
() => l.unselectedItems,
|
202
202
|
() => {
|
203
|
-
_.clear(),
|
204
|
-
_.add(
|
203
|
+
_.clear(), l.unselectedItems.forEach((e) => {
|
204
|
+
_.add(W(e));
|
205
205
|
});
|
206
206
|
}
|
207
207
|
);
|
208
|
-
const
|
209
|
-
|
208
|
+
const Q = (e) => {
|
209
|
+
O(e) ? (ce(e), r("item:unselected", e.value), _.add(e.valueHash), r("update:unselectedItems", [...l.unselectedItems, e.value])) : (k.value || de(e), r("item:selected", e.value), _.delete(e.valueHash), r(
|
210
210
|
"update:unselectedItems",
|
211
|
-
|
211
|
+
l.unselectedItems.filter((a) => W(a) !== W(e.value))
|
212
212
|
));
|
213
|
-
},
|
213
|
+
}, O = (e) => _.has(e.valueHash) ? !1 : e.selected || k.value, re = Ie(
|
214
214
|
(e) => typeof e != "string",
|
215
215
|
JSON.stringify
|
216
|
-
),
|
217
|
-
const a =
|
216
|
+
), be = h(() => [].concat(l.modelValue).map((e) => {
|
217
|
+
const a = re(e);
|
218
218
|
return {
|
219
|
-
disabled:
|
220
|
-
name:
|
219
|
+
disabled: l.disabled,
|
220
|
+
name: l.name,
|
221
221
|
type: "hidden",
|
222
222
|
value: a
|
223
223
|
};
|
224
|
-
})),
|
224
|
+
})), ue = h(() => ge(x.value.length, 4, 10)), w = E({});
|
225
225
|
return D(
|
226
|
-
() =>
|
226
|
+
() => R.value,
|
227
227
|
() => {
|
228
228
|
var e;
|
229
|
-
if (
|
230
|
-
const a =
|
231
|
-
|
232
|
-
|
233
|
-
(i, r) => {
|
234
|
-
const s = typeof r == "number" ? r : r.index, L = typeof r == "number" ? "left" : r.position, N = a[s].getBoundingClientRect(), P = Math.floor(N.width), O = i.filter((b) => b.position === L).map((b) => b.width).reduce(ve, 0), y = {
|
229
|
+
if (l.fixedColumns.length && l.items && S.value) {
|
230
|
+
const a = Object.values(w.value), i = l.fixedColumns.reduce(
|
231
|
+
(o, b) => {
|
232
|
+
const s = typeof b == "number" ? b : b.index, L = typeof b == "number" ? "left" : b.position, N = a[s].getBoundingClientRect(), P = Math.floor(N.width), j = o.filter((u) => u.position === L).map((u) => u.width).reduce(_e, 0), y = {
|
235
233
|
index: s,
|
236
234
|
position: L,
|
237
235
|
width: P,
|
238
|
-
offset:
|
236
|
+
offset: j
|
239
237
|
};
|
240
|
-
return
|
238
|
+
return o.push(y), o;
|
241
239
|
},
|
242
240
|
[]
|
243
241
|
);
|
244
|
-
Array.from((e =
|
245
|
-
(
|
246
|
-
|
247
|
-
|
242
|
+
Array.from((e = S.value) == null ? void 0 : e.querySelectorAll("tr")).map(
|
243
|
+
(o) => Array.from(
|
244
|
+
o.querySelectorAll(
|
245
|
+
i.map((b) => `:scope > :nth-child(${b.index + 1})`).join(", ")
|
248
246
|
)
|
249
247
|
)
|
250
|
-
).forEach((
|
251
|
-
|
252
|
-
|
248
|
+
).forEach((o) => {
|
249
|
+
o.forEach((b, s) => {
|
250
|
+
b.style.position = "sticky", i[s].position === "left" ? b.style.left = `${i[s].offset}px` : b.style.right = `${i[s].offset}px`;
|
253
251
|
});
|
254
252
|
});
|
255
253
|
}
|
@@ -257,232 +255,244 @@ const xe = {
|
|
257
255
|
{
|
258
256
|
flush: "post"
|
259
257
|
}
|
260
|
-
), (e, a) =>
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
"
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
"
|
289
|
-
|
290
|
-
}
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
258
|
+
), (e, a) => {
|
259
|
+
var i, g;
|
260
|
+
return d(), X(fe(se.value), {
|
261
|
+
ref_key: "container",
|
262
|
+
ref: S,
|
263
|
+
"aria-rowcount": V.value ? e.totalItems : void 0,
|
264
|
+
class: p({
|
265
|
+
"bb-table": !0,
|
266
|
+
[`bb-table--align-${e.align}`]: !0,
|
267
|
+
"bb-table--compact": e.compact,
|
268
|
+
"bb-table--fixed": e.fixed,
|
269
|
+
"bb-table--fixed-header": e.fixedHeaders,
|
270
|
+
"bb-table--loading": M.value,
|
271
|
+
"bb-table--empty": !v(x).length,
|
272
|
+
"bb-table--selectable": e.selectable
|
273
|
+
}),
|
274
|
+
style: ye({
|
275
|
+
"--bb-columns": e.columns.length + (l.selectable ? 1 : 0) + (l.actions ? 1 : 0),
|
276
|
+
"--bb-selectable-width": (((i = w.value.selectable) == null ? void 0 : i.clientWidth) || 0) + "px",
|
277
|
+
"--bb-actions-width": (((g = w.value.actions) == null ? void 0 : g.clientWidth) || 0) + "px"
|
278
|
+
})
|
279
|
+
}, {
|
280
|
+
default: he(() => [
|
281
|
+
e.selectable ? (d(), c("legend", Ne, m(e.legend), 1)) : C("", !0),
|
282
|
+
n("table", null, [
|
283
|
+
e.caption ? (d(), c("caption", {
|
284
|
+
key: 0,
|
285
|
+
class: p({
|
286
|
+
"bb-table-caption": !0,
|
287
|
+
"sr-only": !e.displayCaption
|
288
|
+
})
|
289
|
+
}, m(e.caption), 3)) : C("", !0),
|
290
|
+
n("thead", null, [
|
291
|
+
f(e.$slots, "thead", {}, () => [
|
292
|
+
n("tr", {
|
293
|
+
"aria-rowindex": V.value ? 1 : void 0,
|
294
|
+
class: "bb-table-header-row"
|
295
|
+
}, [
|
296
|
+
e.selectable ? (d(), c("th", {
|
297
|
+
key: 0,
|
298
|
+
ref: (t) => w.value.selectable = t,
|
299
|
+
class: p(["bb-table-header bb-table-header--select", e.thClass]),
|
300
|
+
scope: "col"
|
301
|
+
}, [
|
302
|
+
f(e.$slots, "header:select", {
|
303
|
+
multiple: e.multiple,
|
304
|
+
selectAll: !!k.value,
|
305
|
+
text: e.selectText || v(I)("table.selectText").value
|
306
|
+
}, () => [
|
307
|
+
n("span", Se, [
|
308
|
+
e.allowSelectAll && e.multiple ? (d(), c("label", {
|
309
|
+
key: 0,
|
310
|
+
class: p(["bb-table-check__label", {
|
311
|
+
"bb-table-check__label--disabled": e.disabled
|
312
|
+
}])
|
313
|
+
}, [
|
314
|
+
(d(), X(Z, {
|
315
|
+
key: K.value.toString(),
|
316
|
+
modelValue: k.value,
|
317
|
+
"onUpdate:modelValue": [
|
318
|
+
a[0] || (a[0] = (t) => k.value = t),
|
319
|
+
a[1] || (a[1] = (t) => r("update:selectAll", t))
|
320
|
+
],
|
321
|
+
class: "bb-table-check",
|
322
|
+
disabled: e.disabled,
|
323
|
+
indeterminate: K.value,
|
324
|
+
name: `select_all_${e.name || ""}`,
|
325
|
+
readonly: e.readonly
|
326
|
+
}, null, 8, ["modelValue", "disabled", "indeterminate", "name", "readonly"])),
|
327
|
+
n("span", He, m(e.selectAllLabel || v(I)("table.selectAllLabel").value), 1)
|
328
|
+
], 2)) : e.multiple ? C("", !0) : (d(), c("span", Re, m(e.selectText || v(I)("table.selectText").value), 1))
|
329
|
+
])
|
330
|
+
])
|
331
|
+
], 2)) : C("", !0),
|
332
|
+
(d(!0), c(T, null, $(ie.value, (t) => (d(), c("th", {
|
333
|
+
key: t.key,
|
334
|
+
ref_for: !0,
|
335
|
+
ref: (o) => w.value[t.key] = o,
|
336
|
+
"aria-sort": t.sortDirection,
|
337
|
+
class: p(["bb-table-header", t.classes]),
|
338
|
+
scope: "col"
|
339
|
+
}, [
|
340
|
+
f(e.$slots, t.slotName, {
|
341
|
+
classes: t.classes,
|
342
|
+
items: v(H),
|
343
|
+
label: t.label
|
344
|
+
}, () => [
|
345
|
+
n("span", Pe, m(t.label), 1)
|
346
|
+
])
|
347
|
+
], 10, Oe))), 128)),
|
348
|
+
e.actions ? (d(), c("th", {
|
349
|
+
key: 1,
|
350
|
+
ref: (t) => w.value.actions = t,
|
351
|
+
class: p(["bb-table-header bb-table-header--actions", e.thClass]),
|
352
|
+
scope: "col"
|
353
|
+
}, [
|
354
|
+
f(e.$slots, "header:actions", { text: e.actionsText }, () => [
|
355
|
+
n("span", je, m(e.actionsText), 1)
|
356
|
+
])
|
357
|
+
], 2)) : C("", !0)
|
358
|
+
], 8, De)
|
359
|
+
])
|
360
|
+
]),
|
361
|
+
n("tbody", null, [
|
362
|
+
M.value ? f(e.$slots, "loading", {
|
363
|
+
key: 0,
|
364
|
+
items: v(H)
|
365
|
+
}, () => [
|
366
|
+
n("tr", {
|
367
|
+
"aria-rowindex": V.value ? 2 : void 0,
|
368
|
+
class: "bb-table-loading__row"
|
295
369
|
}, [
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
370
|
+
n("td", {
|
371
|
+
class: "bb-table-loading__cell",
|
372
|
+
colspan: q.value
|
373
|
+
}, [
|
374
|
+
n("span", We, m(e.loadingText), 1),
|
375
|
+
n("div", Fe, [
|
376
|
+
(d(!0), c(T, null, $(ue.value, (t) => (d(), c("div", {
|
377
|
+
key: t,
|
378
|
+
class: "bb-table-skeleton-item"
|
379
|
+
}, a[2] || (a[2] = [
|
380
|
+
n("div", { class: "bb-table-skeleton-item__avatar-container" }, [
|
381
|
+
n("div", { class: "bb-table-skeleton-item__avatar" })
|
382
|
+
], -1),
|
383
|
+
n("div", { class: "bb-table-skeleton-item__text" }, [
|
384
|
+
n("div", { class: "bb-table-skeleton-item__line" }),
|
385
|
+
n("div", { class: "bb-table-skeleton-item__line" })
|
386
|
+
], -1)
|
387
|
+
])))), 128))
|
388
|
+
])
|
389
|
+
], 8, ze)
|
390
|
+
], 8, Ee)
|
391
|
+
]) : v(x).length ? f(e.$slots, "tbody", { key: 2 }, () => [
|
392
|
+
(d(!0), c(T, null, $(R.value, (t) => (d(), c("tr", {
|
393
|
+
key: t.valueHash,
|
394
|
+
"aria-rowindex": t.rowIndex,
|
395
|
+
class: "bb-table-data__row",
|
396
|
+
onClick: t.onRowClick,
|
397
|
+
onContextmenu: t.onRowContextMenu,
|
398
|
+
onDblclick: t.onRowDblClick
|
399
|
+
}, [
|
400
|
+
e.selectable ? (d(), c("td", {
|
401
|
+
key: 0,
|
402
|
+
class: p(["bb-table-data__cell bb-table-data__cell--select", e.tdClass])
|
403
|
+
}, [
|
404
|
+
f(e.$slots, "select", {
|
405
|
+
checked: O(t),
|
406
|
+
disabled: !!t.disabled,
|
407
|
+
inputName: v(F),
|
408
|
+
item: t.item,
|
409
|
+
readonly: !!e.readonly,
|
410
|
+
value: t.value
|
411
|
+
}, () => [
|
412
|
+
e.multiple ? (d(), c("label", {
|
303
413
|
key: 0,
|
304
414
|
class: p(["bb-table-check__label", {
|
305
|
-
"bb-table-check__label--disabled":
|
415
|
+
"bb-table-check__label--disabled": t.disabled
|
306
416
|
}])
|
307
417
|
}, [
|
308
|
-
(
|
309
|
-
|
310
|
-
modelValue: k.value,
|
311
|
-
"onUpdate:modelValue": [
|
312
|
-
a[0] || (a[0] = (l) => k.value = l),
|
313
|
-
a[1] || (a[1] = (l) => c("update:selectAll", l))
|
314
|
-
],
|
418
|
+
Y(Z, {
|
419
|
+
checked: O(t),
|
315
420
|
class: "bb-table-check",
|
316
|
-
disabled:
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
421
|
+
disabled: t.disabled,
|
422
|
+
readonly: e.readonly,
|
423
|
+
onChange: () => Q(t)
|
424
|
+
}, null, 8, ["checked", "disabled", "readonly", "onChange"]),
|
425
|
+
n("span", Je, m(t.accessibleLabel), 1)
|
426
|
+
], 2)) : (d(), c("label", {
|
427
|
+
key: 1,
|
428
|
+
class: p(["bb-table-radio__label", {
|
429
|
+
"bb-table-radio__label--disabled": t.disabled
|
430
|
+
}])
|
431
|
+
}, [
|
432
|
+
Y(Ve, {
|
433
|
+
checked: t.selected,
|
434
|
+
class: "bb-table-radio",
|
435
|
+
disabled: t.disabled,
|
436
|
+
name: v(F),
|
437
|
+
readonly: e.readonly,
|
438
|
+
value: t.value,
|
439
|
+
onChange: () => Q(t)
|
440
|
+
}, null, 8, ["checked", "disabled", "name", "readonly", "value", "onChange"]),
|
441
|
+
n("span", Ke, m(t.accessibleLabel), 1)
|
442
|
+
], 2))
|
323
443
|
])
|
324
|
-
])
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
o("tbody", null, [
|
353
|
-
z.value ? f(e.$slots, "loading", {
|
354
|
-
key: 0,
|
355
|
-
items: v(S)
|
356
|
-
}, () => [
|
357
|
-
o("tr", {
|
358
|
-
"aria-rowindex": w.value ? 2 : void 0,
|
359
|
-
class: "bb-table-loading__row"
|
360
|
-
}, [
|
361
|
-
o("td", {
|
362
|
-
class: "bb-table-loading__cell",
|
363
|
-
colspan: F.value
|
364
|
-
}, [
|
365
|
-
o("span", je, m(e.loadingText), 1),
|
366
|
-
o("div", qe, [
|
367
|
-
(n(!0), d(A, null, B(be.value, (l) => (n(), d("div", {
|
368
|
-
key: l,
|
369
|
-
class: "bb-table-skeleton-item"
|
370
|
-
}, a[2] || (a[2] = [
|
371
|
-
o("div", { class: "bb-table-skeleton-item__avatar-container" }, [
|
372
|
-
o("div", { class: "bb-table-skeleton-item__avatar" })
|
373
|
-
], -1),
|
374
|
-
o("div", { class: "bb-table-skeleton-item__text" }, [
|
375
|
-
o("div", { class: "bb-table-skeleton-item__line" }),
|
376
|
-
o("div", { class: "bb-table-skeleton-item__line" })
|
377
|
-
], -1)
|
378
|
-
])))), 128))
|
379
|
-
])
|
380
|
-
], 8, Ee)
|
381
|
-
], 8, Oe)
|
382
|
-
]) : v(x).length ? f(e.$slots, "tbody", { key: 2 }, () => [
|
383
|
-
(n(!0), d(A, null, B(H.value, (l) => (n(), d("tr", {
|
384
|
-
key: l.valueHash,
|
385
|
-
"aria-rowindex": l.rowIndex,
|
386
|
-
class: "bb-table-data__row",
|
387
|
-
onClick: l.onRowClick,
|
388
|
-
onContextmenu: l.onRowContextMenu,
|
389
|
-
onDblclick: l.onRowDblClick
|
390
|
-
}, [
|
391
|
-
e.selectable ? (n(), d("td", {
|
392
|
-
key: 0,
|
393
|
-
class: p(["bb-table-data__cell bb-table-data__cell--select", e.tdClass])
|
394
|
-
}, [
|
395
|
-
f(e.$slots, "select", {
|
396
|
-
checked: R(l),
|
397
|
-
disabled: !!l.disabled,
|
398
|
-
inputName: v(q),
|
399
|
-
item: l.item,
|
400
|
-
readonly: !!e.readonly,
|
401
|
-
value: l.value
|
402
|
-
}, () => [
|
403
|
-
e.multiple ? (n(), d("label", {
|
404
|
-
key: 0,
|
405
|
-
class: p(["bb-table-check__label", {
|
406
|
-
"bb-table-check__label--disabled": l.disabled
|
407
|
-
}])
|
408
|
-
}, [
|
409
|
-
X(Y, {
|
410
|
-
checked: R(l),
|
411
|
-
class: "bb-table-check",
|
412
|
-
disabled: l.disabled,
|
413
|
-
readonly: e.readonly,
|
414
|
-
onChange: () => J(l)
|
415
|
-
}, null, 8, ["checked", "disabled", "readonly", "onChange"]),
|
416
|
-
o("span", We, m(l.accessibleLabel), 1)
|
417
|
-
], 2)) : (n(), d("label", {
|
418
|
-
key: 1,
|
419
|
-
class: p(["bb-table-radio__label", {
|
420
|
-
"bb-table-radio__label--disabled": l.disabled
|
421
|
-
}])
|
422
|
-
}, [
|
423
|
-
X(we, {
|
424
|
-
checked: l.selected,
|
425
|
-
class: "bb-table-radio",
|
426
|
-
disabled: l.disabled,
|
427
|
-
name: v(q),
|
428
|
-
readonly: e.readonly,
|
429
|
-
value: l.value,
|
430
|
-
onChange: () => J(l)
|
431
|
-
}, null, 8, ["checked", "disabled", "name", "readonly", "value", "onChange"]),
|
432
|
-
o("span", Ge, m(l.accessibleLabel), 1)
|
433
|
-
], 2))
|
434
|
-
])
|
435
|
-
], 2)) : g("", !0),
|
436
|
-
(n(!0), d(A, null, B(l.cols, (u) => (n(), d("td", {
|
437
|
-
key: u.key,
|
438
|
-
class: p(["bb-table-data__cell", u.classes])
|
439
|
-
}, [
|
440
|
-
f(e.$slots, u.slotName, {
|
441
|
-
classes: u.classes,
|
442
|
-
content: u.content,
|
443
|
-
item: l.item,
|
444
|
-
value: l.value
|
445
|
-
}, () => [
|
446
|
-
ye(m(u.content), 1)
|
447
|
-
])
|
448
|
-
], 2))), 128)),
|
449
|
-
e.actions ? (n(), d("td", {
|
450
|
-
key: 1,
|
451
|
-
class: p(["bb-table__cell bb-table__cell--actions", e.tdClass])
|
452
|
-
}, [
|
453
|
-
f(e.$slots, "actions", {
|
454
|
-
item: l.item,
|
455
|
-
value: l.value
|
456
|
-
})
|
457
|
-
], 2)) : g("", !0)
|
458
|
-
], 40, Ue))), 128))
|
459
|
-
]) : f(e.$slots, "no-data", { key: 1 }, () => [
|
460
|
-
o("tr", {
|
461
|
-
"aria-rowindex": w.value ? 2 : void 0,
|
462
|
-
class: "bb-table-no-data__row"
|
463
|
-
}, [
|
464
|
-
o("td", {
|
465
|
-
class: "bb-table-no-data__cell",
|
466
|
-
colspan: F.value
|
444
|
+
], 2)) : C("", !0),
|
445
|
+
(d(!0), c(T, null, $(t.cols, (o) => (d(), c("td", {
|
446
|
+
key: o.key,
|
447
|
+
class: p(["bb-table-data__cell", o.classes])
|
448
|
+
}, [
|
449
|
+
f(e.$slots, o.slotName, {
|
450
|
+
classes: o.classes,
|
451
|
+
content: o.content,
|
452
|
+
item: t.item,
|
453
|
+
value: t.value
|
454
|
+
}, () => [
|
455
|
+
ve(m(o.content), 1)
|
456
|
+
])
|
457
|
+
], 2))), 128)),
|
458
|
+
e.actions ? (d(), c("td", {
|
459
|
+
key: 1,
|
460
|
+
class: p(["bb-table__cell bb-table__cell--actions", e.tdClass])
|
461
|
+
}, [
|
462
|
+
f(e.$slots, "actions", {
|
463
|
+
item: t.item,
|
464
|
+
value: t.value
|
465
|
+
})
|
466
|
+
], 2)) : C("", !0)
|
467
|
+
], 40, Ge))), 128))
|
468
|
+
]) : f(e.$slots, "no-data", { key: 1 }, () => [
|
469
|
+
n("tr", {
|
470
|
+
"aria-rowindex": V.value ? 2 : void 0,
|
471
|
+
class: "bb-table-no-data__row"
|
467
472
|
}, [
|
468
|
-
|
469
|
-
|
470
|
-
|
473
|
+
n("td", {
|
474
|
+
class: "bb-table-no-data__cell",
|
475
|
+
colspan: q.value
|
476
|
+
}, [
|
477
|
+
n("span", Ue, m(e.noDataText || v(I)("table.noDataText").value), 1)
|
478
|
+
], 8, qe)
|
479
|
+
], 8, Me)
|
480
|
+
])
|
481
|
+
]),
|
482
|
+
n("tfoot", null, [
|
483
|
+
f(e.$slots, "tfoot")
|
471
484
|
])
|
472
485
|
]),
|
473
|
-
|
474
|
-
|
475
|
-
|
486
|
+
(d(!0), c(T, null, $(be.value, (t) => (d(), c("input", ke({
|
487
|
+
key: t.value,
|
488
|
+
ref_for: !0
|
489
|
+
}, t), null, 16))), 128))
|
476
490
|
]),
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
}, l), null, 16))), 128))
|
481
|
-
]),
|
482
|
-
_: 3
|
483
|
-
}, 8, ["aria-rowcount", "class"]));
|
491
|
+
_: 3
|
492
|
+
}, 8, ["aria-rowcount", "class", "style"]);
|
493
|
+
};
|
484
494
|
}
|
485
495
|
});
|
486
496
|
export {
|
487
|
-
|
497
|
+
ml as default
|
488
498
|
};
|