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