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