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