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