bitboss-ui 2.1.130 → 2.1.131
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/BbTable.md +33 -82
- package/dist/index.css +1 -1
- package/dist/index109.js +9 -9
- package/dist/index110.js +18 -18
- package/dist/index118.js +1 -1
- package/dist/index124.js +3 -3
- package/dist/index126.js +310 -323
- package/dist/index134.js +1 -1
- package/dist/index136.js +4 -4
- package/dist/index138.js +1 -1
- package/dist/index14.js +1 -1
- package/dist/index142.js +2 -2
- package/dist/index146.js +1 -1
- package/dist/index148.js +2 -2
- package/dist/index150.js +1 -1
- package/dist/index16.js +3 -3
- package/dist/index18.js +3 -3
- package/dist/index20.js +9 -9
- package/dist/index22.js +14 -14
- package/dist/index224.js +2 -138
- package/dist/index225.js +138 -2
- package/dist/index226.js +2 -2
- package/dist/index227.js +1 -1
- package/dist/index228.js +1 -1
- package/dist/index229.js +3 -32
- package/dist/index230.js +12 -27
- package/dist/index231.js +375 -0
- package/dist/index233.js +160 -2
- package/dist/index235.js +25 -13
- package/dist/index236.js +2 -86
- package/dist/index237.js +4 -0
- package/dist/index238.js +2 -30
- package/dist/index239.js +6 -17
- package/dist/index24.js +10 -10
- package/dist/index240.js +2 -17
- package/dist/index241.js +7 -51
- package/dist/index242.js +3 -18
- package/dist/index243.js +34 -3
- package/dist/index244.js +5 -12
- package/dist/index245.js +4 -4
- package/dist/index246.js +4 -4
- package/dist/index247.js +4 -4
- package/dist/index248.js +4 -4
- package/dist/index249.js +5 -5
- package/dist/index250.js +3 -5
- package/dist/index251.js +8 -3
- package/dist/index252.js +3 -8
- package/dist/index253.js +16 -158
- package/dist/index254.js +14 -0
- package/dist/index255.js +51 -5
- package/dist/index256.js +18 -2
- package/dist/index257.js +12 -6
- package/dist/index258.js +17 -268
- package/dist/index259.js +30 -52
- package/dist/index26.js +3 -3
- package/dist/index260.js +18 -52
- package/dist/index261.js +4 -32
- package/dist/index262.js +100 -54
- package/dist/index264.js +94 -367
- package/dist/index266.js +107 -4
- package/dist/index267.js +12 -6
- package/dist/index268.js +11 -2
- package/dist/index269.js +9 -12
- package/dist/index270.js +2 -12
- package/dist/index271.js +3 -9
- package/dist/index272.js +86 -23
- package/dist/index274.js +9 -3
- package/dist/index275.js +23 -11
- package/dist/index276.js +22 -33
- package/dist/index277.js +13 -3
- package/dist/index278.js +7 -25
- package/dist/index279.js +8 -3
- package/dist/index28.js +1 -1
- package/dist/index280.js +5 -20
- package/dist/index281.js +2 -9
- package/dist/index282.js +186 -42
- package/dist/index283.js +3 -53
- package/dist/index284.js +32 -17
- package/dist/index285.js +28 -12
- package/dist/index287.js +11 -0
- package/dist/index288.js +44 -100
- package/dist/index289.js +55 -0
- package/dist/index290.js +2 -107
- package/dist/index291.js +5 -9
- package/dist/index292.js +6 -6
- package/dist/index293.js +266 -14
- package/dist/index294.js +52 -5
- package/dist/index295.js +52 -188
- package/dist/index296.js +32 -3
- package/dist/index297.js +59 -20
- package/dist/index298.js +3 -6
- package/dist/index299.js +20 -66
- package/dist/index30.js +3 -3
- package/dist/index300.js +67 -3
- package/dist/index301.js +6 -10
- package/dist/index302.js +4 -3
- package/dist/index303.js +20 -2
- package/dist/index304.js +6 -7
- package/dist/index305.js +16 -7
- package/dist/index306.js +4 -3
- package/dist/index307.js +7 -17
- package/dist/index308.js +3 -28
- package/dist/index309.js +4 -4
- package/dist/index310.js +2 -7
- package/dist/index312.js +6 -3
- package/dist/index313.js +5 -0
- package/dist/index314.js +280 -7
- package/dist/index315.js +2 -3
- package/dist/index316.js +125 -3
- package/dist/index317.js +2 -3
- package/dist/index318.js +13 -278
- package/dist/index319.js +2 -2
- package/dist/index32.js +2 -2
- package/dist/index324.js +17 -25
- package/dist/index326.js +3 -2
- package/dist/index327.js +3 -2
- package/dist/index328.js +17 -2
- package/dist/index329.js +28 -2
- package/dist/index330.js +3 -2
- package/dist/index331.js +3 -125
- package/dist/index332.js +2 -2
- package/dist/index333.js +4 -15
- package/dist/index334.js +5 -2
- package/dist/index335.js +25 -17
- package/dist/index337.js +2 -3
- package/dist/index338.js +2 -3
- package/dist/index339.js +1 -1
- package/dist/index34.js +8 -8
- package/dist/index340.js +2 -4
- package/dist/index341.js +2 -719
- package/dist/index342.js +2 -366
- package/dist/index343.js +719 -57
- package/dist/index344.js +366 -6
- package/dist/index345.js +57 -2
- package/dist/index348.js +221 -86
- package/dist/index349.js +6 -5
- package/dist/index350.js +34 -6
- package/dist/index351.js +128 -17
- package/dist/index352.js +397 -7
- package/dist/index353.js +90 -12
- package/dist/index354.js +200 -5
- package/dist/index355.js +259 -7
- package/dist/index356.js +6 -34
- package/dist/index357.js +17 -128
- package/dist/index358.js +7 -397
- package/dist/index359.js +14 -199
- package/dist/index36.js +4 -4
- package/dist/index360.js +5 -259
- package/dist/index361.js +7 -22
- package/dist/index362.js +136 -0
- package/dist/index363.js +21 -133
- package/dist/index365.js +1 -1
- package/dist/index366.js +2 -228
- package/dist/index370.js +1 -1
- package/dist/index38.js +21 -21
- package/dist/index40.js +7 -7
- package/dist/index42.js +2 -2
- package/dist/index44.js +8 -8
- package/dist/index46.js +6 -6
- package/dist/index50.js +2 -2
- package/dist/index54.js +1 -1
- package/dist/index56.js +1 -1
- package/dist/index58.js +2 -2
- package/dist/index60.js +2 -2
- package/dist/index62.js +5 -5
- package/dist/index68.js +1 -1
- package/dist/index74.js +4 -4
- package/dist/index82.js +6 -6
- package/dist/index84.js +1 -1
- package/dist/index86.js +2 -2
- package/dist/index88.js +3 -3
- package/dist/index90.js +1 -1
- package/dist/index93.js +3 -3
- package/dist/index95.js +2 -2
- package/dist/index97.js +5 -5
- package/dist/index99.js +1 -1
- package/package.json +1 -1
- package/dist/index232.js +0 -4
- package/dist/index234.js +0 -4
- package/dist/index263.js +0 -6
- package/dist/index273.js +0 -25
- package/dist/index286.js +0 -108
- package/dist/index311.js +0 -4
- package/dist/index364.js +0 -4
package/dist/index126.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { clamp as
|
|
3
|
-
import { hash as le } from "./
|
|
4
|
-
import { isNil as
|
|
5
|
-
import { when as Lt } from "./
|
|
6
|
-
import { useId as
|
|
7
|
-
import { useItemValue as
|
|
8
|
-
import { useItemsGetter as
|
|
9
|
-
import { usePrefill as
|
|
10
|
-
import { useIndexById as
|
|
11
|
-
import { useBaseOptions as
|
|
12
|
-
import { useHashedWatcher as
|
|
13
|
-
import { useTableWidthContext as
|
|
14
|
-
import { useLocale as
|
|
15
|
-
import
|
|
1
|
+
import { defineComponent as At, mergeModels as Ke, ref as R, computed as c, reactive as Ue, onMounted as Vt, nextTick as Ge, onBeforeUnmount as Bt, watch as te, toRef as ge, useModel as Je, createBlock as Qe, openBlock as o, resolveDynamicComponent as St, normalizeStyle as N, unref as T, normalizeClass as g, withCtx as Et, createElementBlock as r, createCommentVNode as w, createElementVNode as d, toDisplayString as x, Fragment as I, renderList as E, renderSlot as _, createVNode as Xe, createTextVNode as Ht, mergeProps as Rt } from "vue";
|
|
2
|
+
import { clamp as Nt } from "./index224.js";
|
|
3
|
+
import { hash as le } from "./index252.js";
|
|
4
|
+
import { isNil as L } from "./index238.js";
|
|
5
|
+
import { when as Lt } from "./index261.js";
|
|
6
|
+
import { useId as Mt } from "./index8.js";
|
|
7
|
+
import { useItemValue as Ot } from "./index287.js";
|
|
8
|
+
import { useItemsGetter as Wt } from "./index259.js";
|
|
9
|
+
import { usePrefill as Dt } from "./index260.js";
|
|
10
|
+
import { useIndexById as Ye } from "./index258.js";
|
|
11
|
+
import { useBaseOptions as Ft } from "./index255.js";
|
|
12
|
+
import { useHashedWatcher as Pt } from "./index257.js";
|
|
13
|
+
import { useTableWidthContext as zt } from "./index288.js";
|
|
14
|
+
import { useLocale as qt } from "./index230.js";
|
|
15
|
+
import Ze from "./index18.js";
|
|
16
16
|
/* empty css */
|
|
17
|
-
import
|
|
17
|
+
import jt from "./index32.js";
|
|
18
18
|
/* empty css */
|
|
19
|
-
import { columnKeyToSlotName as
|
|
20
|
-
import { useLogger as
|
|
21
|
-
const
|
|
19
|
+
import { columnKeyToSlotName as Kt, mergeHeaderClasses as Ut, applyFixedTableColumns as Gt, mergeCellClasses as Jt } from "./index289.js";
|
|
20
|
+
import { useLogger as Qt } from "./index251.js";
|
|
21
|
+
const Xt = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "sr-only"
|
|
24
|
-
},
|
|
24
|
+
}, Yt = ["aria-rowindex"], Zt = { class: "bb-table-header__content" }, el = { class: "bb-table-check__label-text sr-only" }, tl = {
|
|
25
25
|
key: 1,
|
|
26
26
|
class: "bb-table-radio__label-text sr-only"
|
|
27
|
-
},
|
|
27
|
+
}, ll = ["aria-sort"], al = { class: "bb-table-header__content" }, sl = { class: "bb-table-header__content sr-only" }, nl = ["aria-rowindex"], ol = {
|
|
28
28
|
key: 0,
|
|
29
29
|
class: "bb-table-skeleton__cell bb-table-skeleton__cell--select"
|
|
30
|
-
},
|
|
30
|
+
}, rl = {
|
|
31
31
|
key: 0,
|
|
32
32
|
class: "bb-table-skeleton__cell-content"
|
|
33
|
-
},
|
|
33
|
+
}, cl = {
|
|
34
34
|
key: 1,
|
|
35
35
|
class: "bb-table-skeleton__avatar"
|
|
36
|
-
},
|
|
36
|
+
}, ul = {
|
|
37
37
|
key: 2,
|
|
38
38
|
class: "bb-table-skeleton__avatar-text"
|
|
39
|
-
},
|
|
39
|
+
}, dl = { class: "bb-table-skeleton__cell-content" }, il = {
|
|
40
40
|
key: 3,
|
|
41
41
|
class: "bb-table-skeleton__image"
|
|
42
|
-
},
|
|
42
|
+
}, bl = {
|
|
43
43
|
key: 4,
|
|
44
44
|
class: "bb-table-skeleton__badge"
|
|
45
|
-
},
|
|
45
|
+
}, pl = {
|
|
46
46
|
key: 1,
|
|
47
47
|
class: "bb-table-skeleton__cell bb-table-skeleton__cell--actions"
|
|
48
|
-
},
|
|
48
|
+
}, fl = ["aria-rowindex"], hl = ["colspan"], vl = { class: "bb-table-loading__text sr-only" }, ml = ["aria-rowindex"], yl = ["colspan"], kl = { class: "bb-table-no-data__text" }, gl = ["aria-rowindex", "onClick", "onContextmenu", "onDblclick"], _l = { class: "bb-table-check__label-text sr-only" }, wl = { class: "bb-table-radio__label-text sr-only" }, xl = ["aria-rowindex", "id"], Cl = ["colspan"], jl = /* @__PURE__ */ At({
|
|
49
49
|
__name: "BbTable",
|
|
50
|
-
props: /* @__PURE__ */
|
|
50
|
+
props: /* @__PURE__ */ Ke({
|
|
51
51
|
accessibleLabel: {},
|
|
52
52
|
actions: { type: Boolean },
|
|
53
53
|
actionsText: { default: "Azioni" },
|
|
@@ -95,149 +95,145 @@ const el = {
|
|
|
95
95
|
},
|
|
96
96
|
expandedItemsModifiers: {}
|
|
97
97
|
}),
|
|
98
|
-
emits: /* @__PURE__ */
|
|
99
|
-
setup(ae, { emit:
|
|
100
|
-
const { getItemValue:
|
|
101
|
-
a.multiple && !Array.isArray(a.modelValue) &&
|
|
98
|
+
emits: /* @__PURE__ */ Ke(["click:row", "contextmenu:row", "dblclick:row", "update:modelValue", "update:selectAll", "update:expandedItems", "update:unselectedItems", "item:selected", "item:unselected"], ["update:selectAll", "update:expandedItems"]),
|
|
99
|
+
setup(ae, { emit: et }) {
|
|
100
|
+
const { getItemValue: tt } = Ot(), _e = Mt().id.value, a = ae, m = et;
|
|
101
|
+
a.multiple && !Array.isArray(a.modelValue) && Qt().throw(
|
|
102
102
|
"BbTable is set for multiple selection but modelValue is not an array."
|
|
103
103
|
);
|
|
104
|
-
const { t:
|
|
105
|
-
id:
|
|
106
|
-
parentId:
|
|
104
|
+
const { t: M } = qt(), A = R(), O = R(), {
|
|
105
|
+
id: lt,
|
|
106
|
+
parentId: W,
|
|
107
107
|
parentNode: U,
|
|
108
|
-
cssVars:
|
|
108
|
+
cssVars: at,
|
|
109
109
|
parentVar: we,
|
|
110
|
-
setTracks:
|
|
111
|
-
} =
|
|
110
|
+
setTracks: st
|
|
111
|
+
} = zt({
|
|
112
112
|
id: () => a.id,
|
|
113
|
-
container: () =>
|
|
113
|
+
container: () => O.value,
|
|
114
114
|
inheritFrom: () => typeof a.inheritColumnWidths == "string" ? a.inheritColumnWidths : void 0
|
|
115
|
-
}), D =
|
|
116
|
-
() => a.fixed || a.columns.some((e) => e.width != null) || D.value && !!
|
|
117
|
-
), J =
|
|
118
|
-
() => D.value && !!
|
|
119
|
-
),
|
|
115
|
+
}), D = c(() => a.inheritColumnWidths !== !1), G = c(
|
|
116
|
+
() => a.fixed || a.columns.some((e) => e.width != null) || D.value && !!W.value
|
|
117
|
+
), J = c(
|
|
118
|
+
() => D.value && !!W.value
|
|
119
|
+
), nt = J, ot = (e) => {
|
|
120
120
|
if (typeof e == "number") return `${e}px`;
|
|
121
121
|
const l = e.trim();
|
|
122
122
|
return /^-?\d*\.?\d+$/.test(l) ? `${l}px` : l;
|
|
123
|
-
},
|
|
124
|
-
const t = xe(e);
|
|
125
|
-
if (/^-?\d*\.?\d+px$/.test(t)) return parseFloat(t);
|
|
126
|
-
const s = document.createElement("div");
|
|
127
|
-
s.style.position = "absolute", s.style.visibility = "hidden", s.style.pointerEvents = "none", s.style.width = t, l.appendChild(s);
|
|
128
|
-
const n = s.getBoundingClientRect().width;
|
|
129
|
-
return l.removeChild(s), Number.isFinite(n) && n > 0 ? n : null;
|
|
130
|
-
}, Ce = i(() => {
|
|
123
|
+
}, xe = c(() => {
|
|
131
124
|
const e = U.value?.tracks;
|
|
132
125
|
return e ? Object.keys(e).filter((l) => /^\d+$/.test(l)).length : 0;
|
|
133
|
-
}),
|
|
126
|
+
}), Ce = c(() => {
|
|
134
127
|
const e = U.value?.tracks ?? {}, l = [];
|
|
135
128
|
"select" in e && l.push("select");
|
|
136
|
-
for (let t = 0; t <
|
|
129
|
+
for (let t = 0; t < xe.value; t++) l.push(String(t));
|
|
137
130
|
return "actions" in e && l.push("actions"), l;
|
|
138
|
-
}),
|
|
131
|
+
}), Te = c(
|
|
139
132
|
() => "select" in (U.value?.tracks ?? {}) ? 1 : 0
|
|
140
|
-
),
|
|
141
|
-
() =>
|
|
142
|
-
),
|
|
143
|
-
const l =
|
|
133
|
+
), $e = c(
|
|
134
|
+
() => Te.value + xe.value
|
|
135
|
+
), rt = c(() => Ce.value.length), ct = (e) => {
|
|
136
|
+
const l = Ce.value[e];
|
|
144
137
|
return l ? we(l, "0px") : "0px";
|
|
145
138
|
}, se = (e, l) => {
|
|
146
|
-
if (!
|
|
139
|
+
if (!W.value || l - e <= 1e-6) return null;
|
|
147
140
|
const t = [];
|
|
148
141
|
for (let s = Math.floor(e); s < Math.ceil(l - 1e-6); s++) {
|
|
149
142
|
const n = Math.min(l, s + 1) - Math.max(e, s);
|
|
150
143
|
if (n <= 1e-6) continue;
|
|
151
|
-
const
|
|
144
|
+
const u = ct(s);
|
|
152
145
|
t.push(
|
|
153
|
-
n >= 1 - 1e-6 ?
|
|
146
|
+
n >= 1 - 1e-6 ? u : `${Number(n.toFixed(4))} * ${u}`
|
|
154
147
|
);
|
|
155
148
|
}
|
|
156
149
|
return t.length ? t.length === 1 && !t[0].includes("*") ? t[0] : `calc(${t.join(" + ")})` : null;
|
|
157
|
-
}, Q =
|
|
150
|
+
}, Q = c(() => {
|
|
158
151
|
const e = a.columns, l = e.map(
|
|
159
152
|
(s) => typeof s.snap == "number" ? s.snap : Array.isArray(s.snap) ? s.snap[0] : null
|
|
160
153
|
);
|
|
161
|
-
let t =
|
|
154
|
+
let t = Te.value;
|
|
162
155
|
return e.map((s, n) => {
|
|
163
|
-
const
|
|
164
|
-
let
|
|
156
|
+
const u = l[n] ?? t;
|
|
157
|
+
let f;
|
|
165
158
|
if (Array.isArray(s.snap))
|
|
166
|
-
|
|
159
|
+
f = s.snap[1] === -1 ? $e.value : s.snap[1];
|
|
167
160
|
else {
|
|
168
|
-
const
|
|
169
|
-
|
|
161
|
+
const y = l[n + 1];
|
|
162
|
+
f = y != null && y > u ? y : Math.floor(u) + 1;
|
|
170
163
|
}
|
|
171
|
-
return t =
|
|
164
|
+
return t = f, { start: u, end: f };
|
|
172
165
|
});
|
|
173
|
-
}),
|
|
174
|
-
() => Q.value.some(
|
|
175
|
-
), X = (e) => a.columns[e]?.width == null && !J.value, Y =
|
|
166
|
+
}), Ie = (e) => J.value && e.start >= $e.value, ne = c(
|
|
167
|
+
() => Q.value.some(Ie)
|
|
168
|
+
), X = (e) => a.columns[e]?.width == null && !J.value, Y = c(() => {
|
|
176
169
|
if (!J.value) return -1;
|
|
177
170
|
for (let e = a.columns.length - 1; e >= 0; e--) {
|
|
178
171
|
const l = a.columns[e];
|
|
179
172
|
if (l.width == null && l.snap == null) return e;
|
|
180
173
|
}
|
|
181
174
|
return -1;
|
|
182
|
-
}), oe =
|
|
175
|
+
}), oe = c(() => {
|
|
183
176
|
const e = Q.value[0];
|
|
184
|
-
if (!D.value || !
|
|
177
|
+
if (!D.value || !W.value || !e) return null;
|
|
185
178
|
const l = se(0, e.start), t = a.selectable ? C.select : null;
|
|
186
179
|
return t ? `calc(${l ?? "0px"} - ${t})` : l;
|
|
187
|
-
}), re =
|
|
180
|
+
}), re = c(() => {
|
|
188
181
|
const e = Q.value, l = e[e.length - 1];
|
|
189
|
-
if (!D.value || !
|
|
190
|
-
const t = se(l.end,
|
|
182
|
+
if (!D.value || !W.value || !l || ne.value || Y.value === a.columns.length - 1) return null;
|
|
183
|
+
const t = se(l.end, rt.value), s = a.actions ? C.actions : null;
|
|
191
184
|
return s ? `calc(${t ?? "0px"} - ${s})` : t;
|
|
192
|
-
}), ut =
|
|
185
|
+
}), ut = c(() => oe.value !== null), dt = c(() => re.value !== null), C = Ue({ select: null, actions: null }), ce = c(() => {
|
|
193
186
|
const e = (n) => D.value ? we(n) : "auto", l = (n) => G.value && C[n] ? C[n] : e(n), t = [];
|
|
194
|
-
a.selectable && t.push({ key: "select", width: l("select")
|
|
187
|
+
a.selectable && t.push({ key: "select", width: l("select") });
|
|
195
188
|
const s = a.columns.length - 1;
|
|
196
|
-
return a.columns.forEach((n,
|
|
197
|
-
const
|
|
198
|
-
if (
|
|
199
|
-
t.push({ key:
|
|
189
|
+
return a.columns.forEach((n, u) => {
|
|
190
|
+
const f = String(u), y = n.width != null ? ot(n.width) : null, h = Q.value[u];
|
|
191
|
+
if (u === Y.value && !ne.value) {
|
|
192
|
+
t.push({ key: f, width: "auto" });
|
|
200
193
|
return;
|
|
201
194
|
}
|
|
202
|
-
let
|
|
203
|
-
|
|
195
|
+
let b;
|
|
196
|
+
y != null ? b = y : X(u) ? b = G.value && Ve.value[u] || null : Ie(h) ? b = Be.value[u] ?? null : b = se(h.start, h.end);
|
|
204
197
|
const $ = [];
|
|
205
|
-
|
|
206
|
-
const
|
|
207
|
-
t.push({ key:
|
|
208
|
-
}), a.actions && t.push({ key: "actions", width: l("actions")
|
|
209
|
-
}),
|
|
198
|
+
u === 0 && ut.value && $.push("var(--bb-table-offset-internal-start)"), u === s && dt.value && $.push("var(--bb-table-offset-internal-end)");
|
|
199
|
+
const k = $.length ? `calc(${[...$, b ?? "0px"].join(" + ")})` : b ?? "auto";
|
|
200
|
+
t.push({ key: f, width: k });
|
|
201
|
+
}), a.actions && t.push({ key: "actions", width: l("actions") }), t;
|
|
202
|
+
}), it = c(() => {
|
|
210
203
|
const e = {};
|
|
211
204
|
return oe.value && (e["--bb-table-offset-start"] = oe.value), re.value && (e["--bb-table-offset-end"] = re.value), e;
|
|
212
|
-
}),
|
|
205
|
+
}), bt = c(() => {
|
|
213
206
|
const e = {
|
|
214
|
-
...
|
|
215
|
-
...
|
|
207
|
+
...at.value,
|
|
208
|
+
...it.value
|
|
216
209
|
};
|
|
217
|
-
return
|
|
218
|
-
}),
|
|
210
|
+
return de.value && (e["--bb-table-natural-width"] = de.value), F.value > 0 && (e["--bb-table-fill"] = `${F.value}px`), e;
|
|
211
|
+
}), ue = () => Array.from(
|
|
219
212
|
A.value?.querySelectorAll(
|
|
220
213
|
":scope > thead > tr.bb-table-header-row > th"
|
|
221
214
|
) ?? []
|
|
222
|
-
),
|
|
223
|
-
const e =
|
|
224
|
-
|
|
215
|
+
), pt = () => {
|
|
216
|
+
const e = ce.value.map((t) => t.key), l = {};
|
|
217
|
+
ue().forEach((t, s) => {
|
|
225
218
|
const n = e[s];
|
|
226
219
|
n != null && (l[n] = `${t.getBoundingClientRect().width}px`);
|
|
227
|
-
}),
|
|
228
|
-
},
|
|
220
|
+
}), st(l);
|
|
221
|
+
}, ft = () => {
|
|
229
222
|
const e = A.value;
|
|
230
223
|
if (!e) return;
|
|
231
224
|
const l = (t) => {
|
|
232
225
|
let s = 0;
|
|
233
226
|
return e.querySelectorAll(t).forEach((n) => {
|
|
234
|
-
let
|
|
235
|
-
n.querySelectorAll(":scope > *").forEach((
|
|
236
|
-
const
|
|
237
|
-
|
|
227
|
+
let u = 0;
|
|
228
|
+
n.querySelectorAll(":scope > *").forEach((h) => {
|
|
229
|
+
const b = getComputedStyle(h);
|
|
230
|
+
if (b.position === "absolute" || b.position === "fixed")
|
|
231
|
+
return;
|
|
232
|
+
const $ = parseFloat(b.marginLeft) + parseFloat(b.marginRight);
|
|
233
|
+
u += h.getBoundingClientRect().width + ($ || 0);
|
|
238
234
|
});
|
|
239
|
-
const
|
|
240
|
-
s = Math.max(s,
|
|
235
|
+
const f = getComputedStyle(n), y = parseFloat(f.paddingLeft) + parseFloat(f.paddingRight);
|
|
236
|
+
s = Math.max(s, u + y);
|
|
241
237
|
}), s > 0 ? `${Math.ceil(s)}px` : null;
|
|
242
238
|
};
|
|
243
239
|
C.select = a.selectable ? l(
|
|
@@ -245,25 +241,20 @@ const el = {
|
|
|
245
241
|
) : null, C.actions = a.actions ? l(
|
|
246
242
|
":scope > thead > tr > th.bb-table-header--actions, :scope > tbody > tr > td.bb-table__cell--actions"
|
|
247
243
|
) : null;
|
|
248
|
-
},
|
|
249
|
-
|
|
250
|
-
},
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
}, We = () => {
|
|
254
|
-
const e = L.value;
|
|
255
|
-
if (!e || !G.value || !a.columns.some((u) => u.width != null) && !ne.value && Y.value < 0)
|
|
244
|
+
}, Ae = () => {
|
|
245
|
+
ft(), pt();
|
|
246
|
+
}, Ve = R([]), Be = R([]), F = R(0), de = R(null), Se = () => {
|
|
247
|
+
const e = O.value;
|
|
248
|
+
if (!e || !G.value || !a.columns.some((i) => i.width != null) && !ne.value && Y.value < 0)
|
|
256
249
|
return;
|
|
257
|
-
const l =
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
const b = d[t + y]?.getBoundingClientRect().width ?? 0, Ue = (u.width != null ? dt(u.width, e) : null) ?? b;
|
|
263
|
-
u.width != null && (p += Ue), X(y) || (m += Ue);
|
|
250
|
+
const l = e.offsetWidth, t = a.selectable ? 1 : 0, s = C.select ? parseFloat(C.select) : 0, n = C.actions ? parseFloat(C.actions) : 0, u = ue();
|
|
251
|
+
let f = 0, y = 0;
|
|
252
|
+
a.columns.forEach((i, v) => {
|
|
253
|
+
const p = u[t + v]?.getBoundingClientRect().width ?? 0;
|
|
254
|
+
i.width != null && (f += p), X(v) || (y += p);
|
|
264
255
|
});
|
|
265
|
-
const
|
|
266
|
-
|
|
256
|
+
const h = document.createElement("div");
|
|
257
|
+
h.style.cssText = [
|
|
267
258
|
"position:absolute",
|
|
268
259
|
"top:-9999px",
|
|
269
260
|
"left:-9999px",
|
|
@@ -273,132 +264,132 @@ const el = {
|
|
|
273
264
|
`height:${e.offsetHeight}px`,
|
|
274
265
|
"overflow:visible"
|
|
275
266
|
].join(";");
|
|
276
|
-
const
|
|
277
|
-
|
|
278
|
-
const $ = Array.from(
|
|
279
|
-
a.columns.forEach((
|
|
280
|
-
if (
|
|
281
|
-
const
|
|
282
|
-
|
|
267
|
+
const b = e.cloneNode(!0);
|
|
268
|
+
b.classList.remove("bb-table--fixed"), b.querySelectorAll(".bb-table-expand__row").forEach((i) => i.remove());
|
|
269
|
+
const $ = Array.from(b.querySelectorAll("col"));
|
|
270
|
+
a.columns.forEach((i, v) => {
|
|
271
|
+
if (i.width == null) {
|
|
272
|
+
const p = $[t + v];
|
|
273
|
+
p && (p.style.width = "");
|
|
283
274
|
}
|
|
284
275
|
});
|
|
285
|
-
const
|
|
286
|
-
|
|
287
|
-
const
|
|
276
|
+
const k = b.querySelector("table");
|
|
277
|
+
k && (k.style.width = "min-content", k.style.minWidth = "0"), h.appendChild(b), document.body.appendChild(h);
|
|
278
|
+
const Pe = h.querySelector(
|
|
288
279
|
"table thead tr.bb-table-header-row"
|
|
289
|
-
),
|
|
290
|
-
if (
|
|
291
|
-
const
|
|
292
|
-
return
|
|
280
|
+
), $t = Pe ? Array.from(Pe.querySelectorAll(":scope > th")) : [], ee = a.columns.map((i, v) => {
|
|
281
|
+
if (i.width != null) return 0;
|
|
282
|
+
const p = $t[t + v];
|
|
283
|
+
return p ? p.getBoundingClientRect().width : 0;
|
|
293
284
|
});
|
|
294
|
-
document.body.removeChild(
|
|
295
|
-
const
|
|
296
|
-
(
|
|
285
|
+
document.body.removeChild(h);
|
|
286
|
+
const ze = a.columns.reduce(
|
|
287
|
+
(i, v, p) => i + (X(p) ? ee[p] : 0),
|
|
297
288
|
0
|
|
298
|
-
),
|
|
299
|
-
if (
|
|
300
|
-
if (!X(
|
|
301
|
-
const
|
|
302
|
-
if (
|
|
303
|
-
const
|
|
304
|
-
return ke(Math.max(
|
|
305
|
-
}),
|
|
306
|
-
const
|
|
307
|
-
(
|
|
289
|
+
), qe = l - y - s - n, ke = (i) => `${Number(i.toFixed(3))}px`;
|
|
290
|
+
if (Ve.value = a.columns.map((i, v) => {
|
|
291
|
+
if (!X(v)) return null;
|
|
292
|
+
const p = ee[v];
|
|
293
|
+
if (ze <= 0) return ke(p);
|
|
294
|
+
const K = qe > 0 ? qe * (p / ze) : 0;
|
|
295
|
+
return ke(Math.max(p, K));
|
|
296
|
+
}), Be.value = ee.map((i) => i > 0 ? ke(i) : null), Y.value >= 0) {
|
|
297
|
+
const i = Object.values(U.value?.tracks ?? {}).reduce(
|
|
298
|
+
(p, K) => p + (parseFloat(K) || 0),
|
|
308
299
|
0
|
|
309
|
-
),
|
|
310
|
-
(
|
|
300
|
+
), v = u.reduce(
|
|
301
|
+
(p, K) => p + K.getBoundingClientRect().width,
|
|
311
302
|
0
|
|
312
303
|
);
|
|
313
|
-
|
|
304
|
+
F.value = Math.max(0, i - v + F.value);
|
|
314
305
|
} else
|
|
315
|
-
|
|
316
|
-
const
|
|
317
|
-
|
|
306
|
+
F.value = 0;
|
|
307
|
+
const It = ee.reduce((i, v) => i + v, 0), je = f + It + s + n;
|
|
308
|
+
de.value = je > 0 ? `${Math.ceil(je)}px` : null;
|
|
318
309
|
};
|
|
319
|
-
let
|
|
320
|
-
const
|
|
321
|
-
|
|
322
|
-
|
|
310
|
+
let H = null, ie;
|
|
311
|
+
const Ee = () => {
|
|
312
|
+
H !== null && clearTimeout(H), H = setTimeout(() => {
|
|
313
|
+
H = null, Se();
|
|
323
314
|
}, 200);
|
|
324
315
|
};
|
|
325
|
-
let
|
|
316
|
+
let P, be;
|
|
326
317
|
const He = () => {
|
|
327
|
-
|
|
318
|
+
P && (P.disconnect(), ue().forEach((e) => P?.observe(e)), Ae());
|
|
328
319
|
};
|
|
329
|
-
|
|
330
|
-
|
|
320
|
+
Vt(() => {
|
|
321
|
+
P = new ResizeObserver(() => Ae()), He(), Ge(Se), A.value && (ie = new MutationObserver(Ee), ie.observe(A.value, {
|
|
331
322
|
childList: !0,
|
|
332
323
|
subtree: !0,
|
|
333
324
|
characterData: !0
|
|
334
|
-
})),
|
|
335
|
-
}),
|
|
336
|
-
|
|
337
|
-
}), te(
|
|
338
|
-
const
|
|
339
|
-
() => !
|
|
340
|
-
),
|
|
325
|
+
})), O.value && (be = new ResizeObserver(Ee), be.observe(O.value));
|
|
326
|
+
}), Bt(() => {
|
|
327
|
+
P?.disconnect(), be?.disconnect(), ie?.disconnect(), H !== null && clearTimeout(H);
|
|
328
|
+
}), te(ce, () => Ge(He), { flush: "post" });
|
|
329
|
+
const ht = (e) => [M("table.select").value, ...e.map((l) => l.content)].join(" "), vt = c(() => a.selectable ? "fieldset" : "div"), pe = c(() => a.loading || yt.value), V = c(
|
|
330
|
+
() => !L(a.page) && !L(a.perPage) && !L(a.totalItems)
|
|
331
|
+
), mt = c(() => ({
|
|
341
332
|
"bb-table": !0,
|
|
342
333
|
[`bb-table--align-${a.align}`]: !0,
|
|
343
334
|
"bb-table--compact": a.compact,
|
|
344
335
|
"bb-table--fixed": G.value,
|
|
345
|
-
"bb-table--inherit-widths":
|
|
336
|
+
"bb-table--inherit-widths": nt.value,
|
|
346
337
|
"bb-table--fixed-header": a.fixedHeaders,
|
|
347
338
|
"bb-table--loading": pe.value,
|
|
348
|
-
"bb-table--empty": !
|
|
339
|
+
"bb-table--empty": !z.value.length,
|
|
349
340
|
"bb-table--selectable": !!a.selectable,
|
|
350
341
|
"scrollbar-border": !0
|
|
351
|
-
})),
|
|
342
|
+
})), fe = c(
|
|
352
343
|
() => a.columns.length + +!!a.selectable + +!!a.actions
|
|
353
|
-
), Re =
|
|
344
|
+
), Re = c(
|
|
354
345
|
() => Object.fromEntries(
|
|
355
|
-
a.columns.map((e) => [e.key,
|
|
346
|
+
a.columns.map((e) => [e.key, Kt(e.key)])
|
|
356
347
|
)
|
|
357
348
|
), {
|
|
358
349
|
getter: Ne,
|
|
359
|
-
items:
|
|
360
|
-
loading:
|
|
361
|
-
} =
|
|
350
|
+
items: he,
|
|
351
|
+
loading: yt
|
|
352
|
+
} = Wt({
|
|
362
353
|
items: ge(a, "items")
|
|
363
|
-
}), { hasPrefilled:
|
|
354
|
+
}), { hasPrefilled: kt } = Dt({
|
|
364
355
|
trigger: !0,
|
|
365
356
|
fn: async (e) => {
|
|
366
357
|
await Ne(e, a.modelValue);
|
|
367
358
|
}
|
|
368
|
-
}), { data:
|
|
359
|
+
}), { data: Le } = Ye({
|
|
369
360
|
items: ge(a, "modelValue")
|
|
370
|
-
}), { options:
|
|
361
|
+
}), { options: z } = Ft({
|
|
371
362
|
disabled: ge(a, "disabled"),
|
|
372
|
-
items:
|
|
363
|
+
items: he,
|
|
373
364
|
itemText: void 0,
|
|
374
365
|
itemValue: a.itemValue,
|
|
375
366
|
max: a.max,
|
|
376
367
|
selectable: !0,
|
|
377
|
-
selectedIndexedByHash:
|
|
378
|
-
}),
|
|
379
|
-
a.multiple ?
|
|
380
|
-
},
|
|
368
|
+
selectedIndexedByHash: Le
|
|
369
|
+
}), gt = async (e) => {
|
|
370
|
+
a.multiple ? m("update:modelValue", a.modelValue.concat(e.value)) : m("update:modelValue", e.value);
|
|
371
|
+
}, _t = async (e) => {
|
|
381
372
|
if (a.multiple) {
|
|
382
|
-
const l = { ...
|
|
383
|
-
delete l[e.valueHash],
|
|
373
|
+
const l = { ...Le.value };
|
|
374
|
+
delete l[e.valueHash], m("update:modelValue", Object.values(l));
|
|
384
375
|
} else
|
|
385
|
-
|
|
376
|
+
m("update:modelValue", null);
|
|
386
377
|
};
|
|
387
|
-
|
|
378
|
+
Pt(
|
|
388
379
|
() => [a.dependencies, a.items],
|
|
389
380
|
async () => {
|
|
390
|
-
|
|
381
|
+
kt.value && await Ne(!1, a.modelValue);
|
|
391
382
|
},
|
|
392
383
|
{
|
|
393
384
|
debounce: a.depsDebounceTime
|
|
394
385
|
}
|
|
395
386
|
);
|
|
396
|
-
const
|
|
387
|
+
const wt = (e, l) => {
|
|
397
388
|
const t = Re.value[e.key], s = e.align ?? "left";
|
|
398
|
-
let n =
|
|
399
|
-
return e.formatter && (!
|
|
389
|
+
let n = tt(l.item, e.key);
|
|
390
|
+
return e.formatter && (!L(n) || e.formatOnNull !== !1) && (n = e.formatter(n, e.key, l.item)), e.placeholder && L(n) && (n = e.placeholder), {
|
|
400
391
|
align: s,
|
|
401
|
-
classes:
|
|
392
|
+
classes: Jt(
|
|
402
393
|
[`bb-table-data__cell--${s}`],
|
|
403
394
|
a.tdClass,
|
|
404
395
|
e.tdClass,
|
|
@@ -411,7 +402,7 @@ const el = {
|
|
|
411
402
|
label: e.label,
|
|
412
403
|
slotName: t
|
|
413
404
|
};
|
|
414
|
-
},
|
|
405
|
+
}, Me = c(
|
|
415
406
|
() => a.columns.map((e) => {
|
|
416
407
|
const l = e.align ?? "left", t = `header:${Re.value[e.key]}`, s = e.sorted ? e.sorted === "asc" ? "ascending" : "descending" : void 0;
|
|
417
408
|
return {
|
|
@@ -419,7 +410,7 @@ const el = {
|
|
|
419
410
|
key: e.key,
|
|
420
411
|
label: e.label,
|
|
421
412
|
slotName: t,
|
|
422
|
-
classes:
|
|
413
|
+
classes: Ut(
|
|
423
414
|
[`bb-table-header--${l}`],
|
|
424
415
|
a.thClass,
|
|
425
416
|
e.thClass
|
|
@@ -427,98 +418,98 @@ const el = {
|
|
|
427
418
|
sortDirection: s
|
|
428
419
|
};
|
|
429
420
|
})
|
|
430
|
-
),
|
|
421
|
+
), Oe = c(() => {
|
|
431
422
|
let e = 0;
|
|
432
|
-
return
|
|
433
|
-
const s = !a.selectable || typeof a.selectable == "function" && !a.selectable(l.item) || !!l.disabled, n = (a.page ?? -1) * (a.perPage ?? 0),
|
|
434
|
-
(
|
|
435
|
-
),
|
|
436
|
-
return
|
|
437
|
-
accessibleLabel:
|
|
438
|
-
cols:
|
|
439
|
-
expanded:
|
|
440
|
-
onRowClick: (
|
|
441
|
-
onRowContextMenu: (
|
|
442
|
-
onRowDblClick: (
|
|
423
|
+
return z.value.map((l, t) => {
|
|
424
|
+
const s = !a.selectable || typeof a.selectable == "function" && !a.selectable(l.item) || !!l.disabled, n = (a.page ?? -1) * (a.perPage ?? 0), u = 1, f = t + 1, y = n + u + f + e, h = a.columns.map(
|
|
425
|
+
(k) => wt(k, l)
|
|
426
|
+
), b = ve.value[l.valueHash] ?? !1;
|
|
427
|
+
return b && e++, {
|
|
428
|
+
accessibleLabel: ht(h),
|
|
429
|
+
cols: h,
|
|
430
|
+
expanded: b,
|
|
431
|
+
onRowClick: (k) => m("click:row", k, l, !!l.selected),
|
|
432
|
+
onRowContextMenu: (k) => m("contextmenu:row", k, l, !!l.selected),
|
|
433
|
+
onRowDblClick: (k) => m("dblclick:row", k, l, !!l.selected),
|
|
443
434
|
item: l.item,
|
|
444
435
|
text: l.text,
|
|
445
|
-
rowIndex:
|
|
436
|
+
rowIndex: y,
|
|
446
437
|
valueHash: l.valueHash,
|
|
447
438
|
value: l.value,
|
|
448
439
|
selected: l.selected,
|
|
449
440
|
disabled: s
|
|
450
441
|
};
|
|
451
442
|
});
|
|
452
|
-
}), B =
|
|
453
|
-
items:
|
|
454
|
-
}),
|
|
455
|
-
e.target instanceof HTMLElement && (e.target instanceof HTMLButtonElement || e.key !== "Enter" && e.key !== " " || (e.preventDefault(),
|
|
443
|
+
}), B = Je(ae, "selectAll"), q = Je(ae, "expandedItems"), { data: ve } = Ye({
|
|
444
|
+
items: q
|
|
445
|
+
}), xt = (e, l) => {
|
|
446
|
+
e.target instanceof HTMLElement && (e.target instanceof HTMLButtonElement || e.key !== "Enter" && e.key !== " " || (e.preventDefault(), j(l)));
|
|
456
447
|
}, me = (e) => ({
|
|
457
|
-
"aria-controls":
|
|
448
|
+
"aria-controls": L(ve.value[e.valueHash]) ? void 0 : `expanded_${e.valueHash}`,
|
|
458
449
|
"aria-expanded": e.expanded ? "true" : "false",
|
|
459
450
|
onClick: (l) => {
|
|
460
|
-
l.stopPropagation(),
|
|
451
|
+
l.stopPropagation(), j(e.valueHash);
|
|
461
452
|
},
|
|
462
|
-
onKeydown: (l) =>
|
|
463
|
-
}),
|
|
464
|
-
const l =
|
|
465
|
-
l && (e in ve.value ?
|
|
453
|
+
onKeydown: (l) => xt(l, e.valueHash)
|
|
454
|
+
}), j = (e) => {
|
|
455
|
+
const l = z.value.find((t) => t.valueHash === e);
|
|
456
|
+
l && (e in ve.value ? q.value = q.value.filter(
|
|
466
457
|
(t) => le(t) !== e
|
|
467
|
-
) :
|
|
458
|
+
) : q.value = [...q.value, l.value]);
|
|
468
459
|
};
|
|
469
460
|
te(B, () => {
|
|
470
|
-
|
|
461
|
+
S.clear(), m("update:unselectedItems", []), m("update:modelValue", []);
|
|
471
462
|
});
|
|
472
|
-
const
|
|
463
|
+
const We = c(() => !!(a.multiple && a.modelValue.length > 0 && !a.selectAll || B.value && S.size > 0)), S = Ue(/* @__PURE__ */ new Set());
|
|
473
464
|
te(
|
|
474
465
|
() => a.unselectedItems,
|
|
475
466
|
() => {
|
|
476
|
-
|
|
477
|
-
|
|
467
|
+
S.clear(), a.unselectedItems.forEach((e) => {
|
|
468
|
+
S.add(le(e));
|
|
478
469
|
});
|
|
479
470
|
}
|
|
480
471
|
);
|
|
481
472
|
const De = (e) => {
|
|
482
473
|
if (ye(e)) {
|
|
483
|
-
|
|
474
|
+
_t(e), m("item:unselected", e.value), S.add(e.valueHash), m("update:unselectedItems", [...a.unselectedItems, e.value]);
|
|
484
475
|
return;
|
|
485
476
|
}
|
|
486
|
-
B.value ||
|
|
477
|
+
B.value || gt(e), m("item:selected", e.value), S.delete(e.valueHash), m(
|
|
487
478
|
"update:unselectedItems",
|
|
488
479
|
a.unselectedItems.filter((l) => le(l) !== le(e.value))
|
|
489
480
|
);
|
|
490
|
-
}, ye = (e) =>
|
|
481
|
+
}, ye = (e) => S.has(e.valueHash) ? !1 : e.selected || B.value, Ct = Lt(
|
|
491
482
|
(e) => typeof e != "string",
|
|
492
483
|
JSON.stringify
|
|
493
|
-
),
|
|
484
|
+
), Tt = c(
|
|
494
485
|
() => [].concat(a.modelValue ?? []).map((e) => ({
|
|
495
486
|
disabled: a.disabled,
|
|
496
487
|
name: a.name,
|
|
497
488
|
type: "hidden",
|
|
498
|
-
value:
|
|
489
|
+
value: Ct(e)
|
|
499
490
|
}))
|
|
500
|
-
), Z = [70, 45, 85, 55],
|
|
501
|
-
() =>
|
|
491
|
+
), Z = [70, 45, 85, 55], Fe = c(
|
|
492
|
+
() => Nt(z.value.length || a.columns.length || 1, 4, 10)
|
|
502
493
|
);
|
|
503
494
|
return te(
|
|
504
|
-
() => [
|
|
495
|
+
() => [Oe.value, a.fixedColumns],
|
|
505
496
|
() => {
|
|
506
|
-
A.value && a.fixedColumns?.length &&
|
|
497
|
+
A.value && a.fixedColumns?.length && Gt(A.value, a.fixedColumns);
|
|
507
498
|
},
|
|
508
499
|
{ flush: "post" }
|
|
509
|
-
), (e, l) => (o(),
|
|
500
|
+
), (e, l) => (o(), Qe(St(vt.value), {
|
|
510
501
|
ref_key: "containerRef",
|
|
511
|
-
ref:
|
|
502
|
+
ref: O,
|
|
512
503
|
"aria-busy": pe.value,
|
|
513
504
|
"aria-rowcount": V.value ? a.totalItems : void 0,
|
|
514
|
-
class: g(
|
|
515
|
-
"data-bb-table-id": T(
|
|
505
|
+
class: g(mt.value),
|
|
506
|
+
"data-bb-table-id": T(lt),
|
|
516
507
|
inert: e.disabled,
|
|
517
|
-
style: N(
|
|
508
|
+
style: N(bt.value)
|
|
518
509
|
}, {
|
|
519
|
-
default:
|
|
520
|
-
e.selectable ? (o(), r("legend",
|
|
521
|
-
|
|
510
|
+
default: Et(() => [
|
|
511
|
+
e.selectable ? (o(), r("legend", Xt, x(e.legend), 1)) : w("", !0),
|
|
512
|
+
d("table", {
|
|
522
513
|
ref_key: "tableRef",
|
|
523
514
|
ref: A
|
|
524
515
|
}, [
|
|
@@ -529,19 +520,15 @@ const el = {
|
|
|
529
520
|
"sr-only": !e.displayCaption
|
|
530
521
|
})
|
|
531
522
|
}, x(e.caption), 3)) : w("", !0),
|
|
532
|
-
|
|
533
|
-
(o(!0), r(I, null,
|
|
523
|
+
d("colgroup", null, [
|
|
524
|
+
(o(!0), r(I, null, E(ce.value, (t) => (o(), r("col", {
|
|
534
525
|
key: t.key,
|
|
535
|
-
style: N({
|
|
536
|
-
width: t.width,
|
|
537
|
-
minWidth: t.locked ? t.width : void 0,
|
|
538
|
-
maxWidth: t.locked ? t.width : void 0
|
|
539
|
-
})
|
|
526
|
+
style: N({ width: t.width })
|
|
540
527
|
}, null, 4))), 128))
|
|
541
528
|
]),
|
|
542
|
-
|
|
529
|
+
d("thead", null, [
|
|
543
530
|
_(e.$slots, "thead", {}, () => [
|
|
544
|
-
|
|
531
|
+
d("tr", {
|
|
545
532
|
"aria-rowindex": V.value ? 1 : void 0,
|
|
546
533
|
class: "bb-table-header-row"
|
|
547
534
|
}, [
|
|
@@ -553,135 +540,135 @@ const el = {
|
|
|
553
540
|
_(e.$slots, "header:select", {
|
|
554
541
|
multiple: e.multiple,
|
|
555
542
|
selectAll: !!B.value,
|
|
556
|
-
text: e.selectText || T(
|
|
543
|
+
text: e.selectText || T(M)("table.selectText").value
|
|
557
544
|
}, () => [
|
|
558
|
-
|
|
545
|
+
d("span", Zt, [
|
|
559
546
|
e.allowSelectAll && e.multiple ? (o(), r("label", {
|
|
560
547
|
key: 0,
|
|
561
548
|
class: g(["bb-table-check__label", {
|
|
562
549
|
"bb-table-check__label--disabled": e.disabled
|
|
563
550
|
}])
|
|
564
551
|
}, [
|
|
565
|
-
(o(),
|
|
566
|
-
key:
|
|
552
|
+
(o(), Qe(Ze, {
|
|
553
|
+
key: We.value.toString(),
|
|
567
554
|
modelValue: B.value,
|
|
568
555
|
"onUpdate:modelValue": l[0] || (l[0] = (t) => B.value = t),
|
|
569
556
|
class: "bb-table-check",
|
|
570
557
|
disabled: e.disabled,
|
|
571
|
-
indeterminate:
|
|
558
|
+
indeterminate: We.value,
|
|
572
559
|
name: `select_all_${e.name || ""}`,
|
|
573
560
|
readonly: e.readonly
|
|
574
561
|
}, null, 8, ["modelValue", "disabled", "indeterminate", "name", "readonly"])),
|
|
575
|
-
|
|
576
|
-
], 2)) : e.multiple ? w("", !0) : (o(), r("span",
|
|
562
|
+
d("span", el, x(e.selectAllLabel || T(M)("table.selectAllLabel").value), 1)
|
|
563
|
+
], 2)) : e.multiple ? w("", !0) : (o(), r("span", tl, x(e.selectText || T(M)("table.selectText").value), 1))
|
|
577
564
|
])
|
|
578
565
|
])
|
|
579
566
|
], 2)) : w("", !0),
|
|
580
|
-
(o(!0), r(I, null,
|
|
567
|
+
(o(!0), r(I, null, E(Me.value, (t, s) => (o(), r("th", {
|
|
581
568
|
key: t.key,
|
|
582
569
|
"aria-sort": t.sortDirection,
|
|
583
570
|
class: g(["bb-table-header", [
|
|
584
571
|
t.classes,
|
|
585
572
|
{
|
|
586
573
|
"bb-table-header--edge-start": s === 0,
|
|
587
|
-
"bb-table-header--edge-end": s ===
|
|
574
|
+
"bb-table-header--edge-end": s === Me.value.length - 1
|
|
588
575
|
}
|
|
589
576
|
]]),
|
|
590
577
|
scope: "col"
|
|
591
578
|
}, [
|
|
592
579
|
_(e.$slots, t.slotName, {
|
|
593
580
|
classes: t.classes,
|
|
594
|
-
items: T(
|
|
581
|
+
items: T(he),
|
|
595
582
|
label: t.label
|
|
596
583
|
}, () => [
|
|
597
|
-
|
|
584
|
+
d("span", al, x(t.label), 1)
|
|
598
585
|
])
|
|
599
|
-
], 10,
|
|
586
|
+
], 10, ll))), 128)),
|
|
600
587
|
e.actions ? (o(), r("th", {
|
|
601
588
|
key: 1,
|
|
602
589
|
class: g(["bb-table-header bb-table-header--actions", e.thClass]),
|
|
603
590
|
scope: "col"
|
|
604
591
|
}, [
|
|
605
592
|
_(e.$slots, "header:actions", { text: e.actionsText }, () => [
|
|
606
|
-
|
|
593
|
+
d("span", sl, x(e.actionsText), 1)
|
|
607
594
|
])
|
|
608
595
|
], 2)) : w("", !0)
|
|
609
|
-
], 8,
|
|
596
|
+
], 8, Yt)
|
|
610
597
|
])
|
|
611
598
|
]),
|
|
612
|
-
|
|
599
|
+
d("tbody", null, [
|
|
613
600
|
pe.value ? _(e.$slots, "loading", {
|
|
614
601
|
key: 0,
|
|
615
|
-
items: T(
|
|
602
|
+
items: T(he)
|
|
616
603
|
}, () => [
|
|
617
|
-
(o(!0), r(I, null,
|
|
604
|
+
(o(!0), r(I, null, E(Fe.value, (t, s) => (o(), r("tr", {
|
|
618
605
|
key: s,
|
|
619
606
|
"aria-rowindex": V.value ? s + 2 : void 0,
|
|
620
607
|
class: "bb-table-skeleton__row"
|
|
621
608
|
}, [
|
|
622
|
-
e.selectable ? (o(), r("td",
|
|
623
|
-
|
|
609
|
+
e.selectable ? (o(), r("td", ol, l[1] || (l[1] = [
|
|
610
|
+
d("div", { class: "bb-table-skeleton__placeholder" }, null, -1)
|
|
624
611
|
]))) : w("", !0),
|
|
625
|
-
(o(!0), r(I, null,
|
|
612
|
+
(o(!0), r(I, null, E(a.columns, (n, u) => (o(), r("td", {
|
|
626
613
|
key: n.key,
|
|
627
614
|
class: g([
|
|
628
615
|
"bb-table-skeleton__cell",
|
|
629
616
|
`bb-table-skeleton__cell--${n.skeleton ?? "text"}`
|
|
630
617
|
])
|
|
631
618
|
}, [
|
|
632
|
-
!n.skeleton || n.skeleton === "text" ? (o(), r("div",
|
|
633
|
-
|
|
619
|
+
!n.skeleton || n.skeleton === "text" ? (o(), r("div", rl, [
|
|
620
|
+
d("div", {
|
|
634
621
|
class: "bb-table-skeleton__line",
|
|
635
622
|
style: N({
|
|
636
|
-
width: `${Z[(s +
|
|
623
|
+
width: `${Z[(s + u) % 4]}%`
|
|
637
624
|
})
|
|
638
625
|
}, null, 4),
|
|
639
|
-
|
|
626
|
+
d("div", {
|
|
640
627
|
class: "bb-table-skeleton__line",
|
|
641
628
|
style: N({
|
|
642
|
-
width: `${Z[(s +
|
|
629
|
+
width: `${Z[(s + u + 2) % 4]}%`
|
|
643
630
|
})
|
|
644
631
|
}, null, 4)
|
|
645
|
-
])) : n.skeleton === "avatar" ? (o(), r("div",
|
|
646
|
-
l[2] || (l[2] =
|
|
647
|
-
|
|
648
|
-
|
|
632
|
+
])) : n.skeleton === "avatar" ? (o(), r("div", cl)) : n.skeleton === "avatar-text" ? (o(), r("div", ul, [
|
|
633
|
+
l[2] || (l[2] = d("div", { class: "bb-table-skeleton__avatar" }, null, -1)),
|
|
634
|
+
d("div", dl, [
|
|
635
|
+
d("div", {
|
|
649
636
|
class: "bb-table-skeleton__line",
|
|
650
637
|
style: N({
|
|
651
|
-
width: `${Z[(s +
|
|
638
|
+
width: `${Z[(s + u) % 4]}%`
|
|
652
639
|
})
|
|
653
640
|
}, null, 4),
|
|
654
|
-
|
|
641
|
+
d("div", {
|
|
655
642
|
class: "bb-table-skeleton__line",
|
|
656
643
|
style: N({
|
|
657
|
-
width: `${Z[(s +
|
|
644
|
+
width: `${Z[(s + u + 2) % 4]}%`
|
|
658
645
|
})
|
|
659
646
|
}, null, 4)
|
|
660
647
|
])
|
|
661
|
-
])) : n.skeleton === "image" ? (o(), r("div",
|
|
648
|
+
])) : n.skeleton === "image" ? (o(), r("div", il)) : n.skeleton === "badge" ? (o(), r("div", bl)) : w("", !0)
|
|
662
649
|
], 2))), 128)),
|
|
663
|
-
e.actions ? (o(), r("td",
|
|
664
|
-
|
|
650
|
+
e.actions ? (o(), r("td", pl, l[3] || (l[3] = [
|
|
651
|
+
d("div", { class: "bb-table-skeleton__placeholder" }, null, -1)
|
|
665
652
|
]))) : w("", !0)
|
|
666
|
-
], 8,
|
|
667
|
-
|
|
668
|
-
"aria-rowindex": V.value ?
|
|
653
|
+
], 8, nl))), 128)),
|
|
654
|
+
d("tr", {
|
|
655
|
+
"aria-rowindex": V.value ? Fe.value + 2 : void 0,
|
|
669
656
|
class: "bb-table-loading__row bb-table-loading__row--sr-only"
|
|
670
657
|
}, [
|
|
671
|
-
|
|
672
|
-
colspan:
|
|
658
|
+
d("td", {
|
|
659
|
+
colspan: fe.value,
|
|
673
660
|
class: "bb-table-loading__cell",
|
|
674
661
|
"aria-live": "polite",
|
|
675
662
|
role: "status"
|
|
676
663
|
}, [
|
|
677
|
-
|
|
678
|
-
], 8,
|
|
679
|
-
], 8,
|
|
680
|
-
]) : T(
|
|
681
|
-
(o(!0), r(I, null,
|
|
664
|
+
d("span", vl, x(e.loadingText), 1)
|
|
665
|
+
], 8, hl)
|
|
666
|
+
], 8, fl)
|
|
667
|
+
]) : T(z).length ? _(e.$slots, "tbody", { key: 2 }, () => [
|
|
668
|
+
(o(!0), r(I, null, E(Oe.value, (t) => (o(), r(I, {
|
|
682
669
|
key: t.valueHash
|
|
683
670
|
}, [
|
|
684
|
-
|
|
671
|
+
d("tr", {
|
|
685
672
|
"aria-rowindex": V.value && t.rowIndex ? t.rowIndex : void 0,
|
|
686
673
|
class: "bb-table-data__row",
|
|
687
674
|
onClick: t.onRowClick,
|
|
@@ -706,21 +693,21 @@ const el = {
|
|
|
706
693
|
"bb-table-check__label--disabled": t.disabled
|
|
707
694
|
}])
|
|
708
695
|
}, [
|
|
709
|
-
Ze
|
|
696
|
+
Xe(Ze, {
|
|
710
697
|
checked: ye(t),
|
|
711
698
|
class: "bb-table-check",
|
|
712
699
|
disabled: t.disabled,
|
|
713
700
|
readonly: e.readonly,
|
|
714
701
|
onChange: () => De(t)
|
|
715
702
|
}, null, 8, ["checked", "disabled", "readonly", "onChange"]),
|
|
716
|
-
|
|
703
|
+
d("span", _l, x(t.accessibleLabel), 1)
|
|
717
704
|
], 2)) : (o(), r("label", {
|
|
718
705
|
key: 1,
|
|
719
706
|
class: g(["bb-table-radio__label", {
|
|
720
707
|
"bb-table-radio__label--disabled": t.disabled
|
|
721
708
|
}])
|
|
722
709
|
}, [
|
|
723
|
-
|
|
710
|
+
Xe(jt, {
|
|
724
711
|
checked: t.selected,
|
|
725
712
|
class: "bb-table-radio",
|
|
726
713
|
disabled: t.disabled,
|
|
@@ -729,11 +716,11 @@ const el = {
|
|
|
729
716
|
value: t.value,
|
|
730
717
|
onChange: () => De(t)
|
|
731
718
|
}, null, 8, ["checked", "disabled", "name", "readonly", "value", "onChange"]),
|
|
732
|
-
|
|
719
|
+
d("span", wl, x(t.accessibleLabel), 1)
|
|
733
720
|
], 2))
|
|
734
721
|
])
|
|
735
722
|
], 2)) : w("", !0),
|
|
736
|
-
(o(!0), r(I, null,
|
|
723
|
+
(o(!0), r(I, null, E(t.cols, (s, n) => (o(), r("td", {
|
|
737
724
|
key: s.key,
|
|
738
725
|
class: g(["bb-table-data__cell", [
|
|
739
726
|
s.classes,
|
|
@@ -749,10 +736,10 @@ const el = {
|
|
|
749
736
|
expanded: t.expanded,
|
|
750
737
|
item: t.item,
|
|
751
738
|
expandProps: me(t),
|
|
752
|
-
toggleExpanded: () =>
|
|
739
|
+
toggleExpanded: () => j(t.valueHash),
|
|
753
740
|
value: t.value
|
|
754
741
|
}, () => [
|
|
755
|
-
|
|
742
|
+
Ht(x(s.content), 1)
|
|
756
743
|
])
|
|
757
744
|
], 2))), 128)),
|
|
758
745
|
e.actions ? (o(), r("td", {
|
|
@@ -763,50 +750,50 @@ const el = {
|
|
|
763
750
|
expanded: t.expanded,
|
|
764
751
|
item: t.item,
|
|
765
752
|
expandProps: me(t),
|
|
766
|
-
toggleExpanded: () =>
|
|
753
|
+
toggleExpanded: () => j(t.valueHash),
|
|
767
754
|
value: t.value
|
|
768
755
|
})
|
|
769
756
|
], 2)) : w("", !0)
|
|
770
|
-
], 40,
|
|
757
|
+
], 40, gl),
|
|
771
758
|
t.expanded ? (o(), r("tr", {
|
|
772
759
|
key: 0,
|
|
773
760
|
"aria-rowindex": V.value && t.rowIndex ? t.rowIndex + 1 : void 0,
|
|
774
761
|
id: `expanded_${t.valueHash}`,
|
|
775
762
|
class: "bb-table-expand__row"
|
|
776
763
|
}, [
|
|
777
|
-
|
|
778
|
-
colspan:
|
|
764
|
+
d("td", {
|
|
765
|
+
colspan: fe.value,
|
|
779
766
|
class: "bb-table-expand__cell"
|
|
780
767
|
}, [
|
|
781
768
|
_(e.$slots, "expand", {
|
|
782
769
|
expanded: t.expanded,
|
|
783
770
|
item: t.item,
|
|
784
771
|
expandProps: me(t),
|
|
785
|
-
toggleExpanded: () =>
|
|
772
|
+
toggleExpanded: () => j(t.valueHash),
|
|
786
773
|
value: t.value
|
|
787
774
|
})
|
|
788
|
-
], 8,
|
|
789
|
-
], 8,
|
|
775
|
+
], 8, Cl)
|
|
776
|
+
], 8, xl)) : w("", !0)
|
|
790
777
|
], 64))), 128))
|
|
791
778
|
]) : _(e.$slots, "no-data", { key: 1 }, () => [
|
|
792
|
-
|
|
779
|
+
d("tr", {
|
|
793
780
|
"aria-rowindex": V.value ? 2 : void 0,
|
|
794
781
|
class: "bb-table-no-data__row"
|
|
795
782
|
}, [
|
|
796
|
-
|
|
783
|
+
d("td", {
|
|
797
784
|
class: "bb-table-no-data__cell",
|
|
798
|
-
colspan:
|
|
785
|
+
colspan: fe.value
|
|
799
786
|
}, [
|
|
800
|
-
|
|
801
|
-
], 8,
|
|
802
|
-
], 8,
|
|
787
|
+
d("span", kl, x(e.noDataText || T(M)("table.noDataText").value), 1)
|
|
788
|
+
], 8, yl)
|
|
789
|
+
], 8, ml)
|
|
803
790
|
])
|
|
804
791
|
]),
|
|
805
|
-
|
|
792
|
+
d("tfoot", null, [
|
|
806
793
|
_(e.$slots, "tfoot")
|
|
807
794
|
])
|
|
808
795
|
], 512),
|
|
809
|
-
(o(!0), r(I, null,
|
|
796
|
+
(o(!0), r(I, null, E(Tt.value, (t) => (o(), r("input", Rt({
|
|
810
797
|
key: t.value,
|
|
811
798
|
ref_for: !0
|
|
812
799
|
}, t), null, 16))), 128))
|
|
@@ -816,5 +803,5 @@ const el = {
|
|
|
816
803
|
}
|
|
817
804
|
});
|
|
818
805
|
export {
|
|
819
|
-
|
|
806
|
+
jl as default
|
|
820
807
|
};
|