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