@7pmlabs/design-system 1.0.8 → 1.0.10
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/design-system.css +1 -1
- package/dist/design-system.js +24 -16
- package/dist/design-system177.js +29 -326
- package/dist/design-system177.js.map +1 -1
- package/dist/design-system179.js +1 -1
- package/dist/design-system179.js.map +1 -1
- package/dist/design-system180.js +73 -85
- package/dist/design-system180.js.map +1 -1
- package/dist/design-system182.js +1 -1
- package/dist/design-system182.js.map +1 -1
- package/dist/design-system183.js +32 -105
- package/dist/design-system183.js.map +1 -1
- package/dist/design-system185.js +4 -5
- package/dist/design-system185.js.map +1 -1
- package/dist/design-system186.js +26 -104
- package/dist/design-system186.js.map +1 -1
- package/dist/design-system188.js +4 -5
- package/dist/design-system188.js.map +1 -1
- package/dist/design-system189.js +23 -727
- package/dist/design-system189.js.map +1 -1
- package/dist/design-system191.js +1 -1
- package/dist/design-system191.js.map +1 -1
- package/dist/design-system192.js +31 -11
- package/dist/design-system192.js.map +1 -1
- package/dist/design-system194.js +8 -0
- package/dist/design-system194.js.map +1 -0
- package/dist/design-system195.js +332 -5
- package/dist/design-system195.js.map +1 -1
- package/dist/design-system197.js +5 -46
- package/dist/design-system197.js.map +1 -1
- package/dist/design-system198.js +100 -4
- package/dist/design-system198.js.map +1 -1
- package/dist/design-system200.js +8 -0
- package/dist/design-system200.js.map +1 -0
- package/dist/design-system201.js +19 -5
- package/dist/design-system201.js.map +1 -1
- package/dist/design-system202.js +4 -119
- package/dist/design-system202.js.map +1 -1
- package/dist/design-system203.js +6 -0
- package/dist/design-system203.js.map +1 -0
- package/dist/design-system204.js +419 -5
- package/dist/design-system204.js.map +1 -1
- package/dist/design-system206.js +8 -0
- package/dist/design-system206.js.map +1 -0
- package/dist/design-system207.js +108 -5
- package/dist/design-system207.js.map +1 -1
- package/dist/design-system209.js +6 -4
- package/dist/design-system209.js.map +1 -1
- package/dist/design-system210.js +90 -154
- package/dist/design-system210.js.map +1 -1
- package/dist/design-system212.js +5 -4
- package/dist/design-system212.js.map +1 -1
- package/dist/design-system213.js +737 -7
- package/dist/design-system213.js.map +1 -1
- package/dist/design-system215.js +8 -0
- package/dist/design-system215.js.map +1 -0
- package/dist/design-system216.js +11 -5
- package/dist/design-system216.js.map +1 -1
- package/dist/design-system217.js +451 -506
- package/dist/design-system217.js.map +1 -1
- package/dist/design-system219.js +4 -5
- package/dist/design-system219.js.map +1 -1
- package/dist/design-system220.js +3 -7
- package/dist/design-system220.js.map +1 -1
- package/dist/design-system221.js +41 -369
- package/dist/design-system221.js.map +1 -1
- package/dist/design-system222.js +7 -0
- package/dist/design-system222.js.map +1 -0
- package/dist/design-system223.js +283 -6
- package/dist/design-system223.js.map +1 -1
- package/dist/design-system225.js +8 -0
- package/dist/design-system225.js.map +1 -0
- package/dist/design-system226.js +122 -0
- package/dist/design-system226.js.map +1 -0
- package/dist/design-system228.js +8 -0
- package/dist/design-system228.js.map +1 -0
- package/dist/{design-system205.js → design-system229.js} +1 -1
- package/dist/{design-system205.js.map → design-system229.js.map} +1 -1
- package/dist/design-system231.js +8 -0
- package/dist/design-system231.js.map +1 -0
- package/dist/{design-system208.js → design-system232.js} +1 -1
- package/dist/{design-system208.js.map → design-system232.js.map} +1 -1
- package/dist/design-system233.js +7 -0
- package/dist/design-system233.js.map +1 -0
- package/dist/design-system234.js +173 -0
- package/dist/design-system234.js.map +1 -0
- package/dist/design-system236.js +8 -0
- package/dist/design-system236.js.map +1 -0
- package/dist/design-system237.js +10 -0
- package/dist/design-system237.js.map +1 -0
- package/dist/{design-system214.js → design-system238.js} +2 -2
- package/dist/{design-system214.js.map → design-system238.js.map} +1 -1
- package/dist/design-system240.js +8 -0
- package/dist/design-system240.js.map +1 -0
- package/dist/design-system241.js +583 -0
- package/dist/design-system241.js.map +1 -0
- package/dist/design-system243.js +9 -0
- package/dist/design-system243.js.map +1 -0
- package/dist/design-system244.js +10 -0
- package/dist/design-system244.js.map +1 -0
- package/dist/design-system245.js +377 -0
- package/dist/design-system245.js.map +1 -0
- package/dist/design-system247.js +9 -0
- package/dist/design-system247.js.map +1 -0
- package/dist/types/components/BSkeleton/BSkeleton.spec.d.ts +1 -0
- package/dist/types/components/BSkeleton/BSkeleton.vue.d.ts +46 -0
- package/dist/types/components/BSkeleton/BSkeletonAvatar.vue.d.ts +12 -0
- package/dist/types/components/BSkeleton/BSkeletonButton.vue.d.ts +14 -0
- package/dist/types/components/BSkeleton/BSkeletonImage.vue.d.ts +7 -0
- package/dist/types/components/BSkeleton/BSkeletonInput.vue.d.ts +12 -0
- package/dist/types/components/BSkeleton/BSkeletonNode.vue.d.ts +19 -0
- package/dist/types/components/BSkeleton/index.d.ts +7 -0
- package/dist/types/components/BSkeleton/types.d.ts +20 -0
- package/dist/types/components/BSplitter/BSplitter.spec.d.ts +1 -0
- package/dist/types/components/BSplitter/BSplitter.vue.d.ts +45 -0
- package/dist/types/components/BSplitter/BSplitterPanel.vue.d.ts +40 -0
- package/dist/types/components/BSplitter/index.d.ts +3 -0
- package/dist/types/components/BSplitter/types.d.ts +42 -0
- package/dist/types/components/index.d.ts +2 -0
- package/package.json +1 -1
- package/dist/design-system193.js +0 -528
- package/dist/design-system193.js.map +0 -1
- package/dist/design-system196.js +0 -6
- package/dist/design-system196.js.map +0 -1
- package/dist/design-system199.js +0 -286
- package/dist/design-system199.js.map +0 -1
package/dist/design-system189.js
CHANGED
|
@@ -1,740 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region src/components/
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
class: "b-table__loading-overlay",
|
|
6
|
-
role: "status",
|
|
7
|
-
"aria-live": "polite",
|
|
8
|
-
"aria-label": "Loading data"
|
|
9
|
-
}, se = ["aria-hidden"], ce = ["aria-hidden", "tabindex"], le = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "b-table__caption"
|
|
12
|
-
}, ue = {
|
|
13
|
-
key: 1,
|
|
14
|
-
style: { width: "48px" }
|
|
15
|
-
}, de = ["rowspan", "aria-label"], fe = { key: 0 }, pe = {
|
|
16
|
-
key: 1,
|
|
17
|
-
class: "b-table__checkbox-wrapper"
|
|
18
|
-
}, me = [
|
|
19
|
-
"checked",
|
|
20
|
-
"indeterminate",
|
|
21
|
-
"aria-label"
|
|
22
|
-
], he = ["rowspan"], ge = [
|
|
23
|
-
"colspan",
|
|
24
|
-
"rowspan",
|
|
25
|
-
"aria-sort"
|
|
26
|
-
], _e = { class: "b-table__th-inner" }, ve = [
|
|
27
|
-
"aria-label",
|
|
28
|
-
"data-sort",
|
|
29
|
-
"onClick"
|
|
30
|
-
], ye = {
|
|
31
|
-
class: "b-table__sorter-inner",
|
|
32
|
-
"aria-hidden": "true"
|
|
33
|
-
}, be = [
|
|
34
|
-
"aria-expanded",
|
|
35
|
-
"aria-label",
|
|
36
|
-
"onClick"
|
|
37
|
-
], xe = ["aria-label"], Se = {
|
|
38
|
-
key: 0,
|
|
39
|
-
class: "b-table__filter-search"
|
|
40
|
-
}, Ce = ["onUpdate:modelValue"], we = ["aria-multiselectable"], Te = ["aria-selected"], Ee = { class: "b-table__filter-item-label" }, De = [
|
|
41
|
-
"type",
|
|
42
|
-
"checked",
|
|
43
|
-
"onChange"
|
|
44
|
-
], Oe = { class: "b-table__filter-actions" }, ke = ["onClick"], Ae = ["onClick"], je = { class: "b-table__tbody" }, Me = {
|
|
45
|
-
key: 0,
|
|
46
|
-
class: "b-table__tr--empty"
|
|
47
|
-
}, Ne = ["colspan"], Pe = { class: "b-table__empty" }, Fe = { class: "b-table__empty-text" }, Ie = {
|
|
48
|
-
key: 0,
|
|
49
|
-
class: "b-table__td b-table__td--selection"
|
|
50
|
-
}, Le = { class: "b-table__checkbox-wrapper" }, Re = [
|
|
51
|
-
"type",
|
|
52
|
-
"checked",
|
|
53
|
-
"disabled",
|
|
54
|
-
"aria-label",
|
|
55
|
-
"onChange"
|
|
56
|
-
], ze = {
|
|
57
|
-
key: 1,
|
|
58
|
-
class: "b-table__td b-table__td--expand"
|
|
59
|
-
}, Be = [
|
|
60
|
-
"aria-label",
|
|
61
|
-
"aria-expanded",
|
|
62
|
-
"onClick"
|
|
63
|
-
], Ve = ["title"], He = ["colspan"], Ue = ["aria-hidden"], We = ["aria-hidden"], Ge = {
|
|
64
|
-
key: 0,
|
|
65
|
-
class: "b-table__pagination-total"
|
|
66
|
-
}, Ke = { class: "b-table__pagination-controls" }, qe = ["disabled"], Je = [
|
|
67
|
-
"aria-label",
|
|
68
|
-
"aria-current",
|
|
69
|
-
"onClick"
|
|
70
|
-
], Ye = {
|
|
71
|
-
key: 1,
|
|
72
|
-
class: "b-table__page-ellipsis",
|
|
73
|
-
"aria-hidden": "true"
|
|
74
|
-
}, Xe = {
|
|
75
|
-
key: 2,
|
|
76
|
-
class: "b-table__page-ellipsis",
|
|
77
|
-
"aria-hidden": "true"
|
|
78
|
-
}, Ze = ["disabled"], Qe = ["value"], $e = ["value"], et = {
|
|
79
|
-
key: 1,
|
|
80
|
-
class: "b-table__page-jump"
|
|
81
|
-
}, tt = ["max"], nt = /* @__PURE__ */ c({
|
|
82
|
-
__name: "BTable",
|
|
1
|
+
import { computed as e, createElementBlock as t, defineComponent as n, normalizeClass as r, openBlock as i } from "vue";
|
|
2
|
+
//#region src/components/BSkeleton/BSkeletonInput.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var a = /* @__PURE__ */ n({
|
|
4
|
+
__name: "BSkeletonInput",
|
|
83
5
|
props: {
|
|
84
|
-
|
|
85
|
-
columns: { default: () => [] },
|
|
86
|
-
rowKey: {
|
|
87
|
-
type: [String, Function],
|
|
88
|
-
default: "key"
|
|
89
|
-
},
|
|
90
|
-
size: { default: "default" },
|
|
91
|
-
bordered: {
|
|
92
|
-
type: Boolean,
|
|
93
|
-
default: !1
|
|
94
|
-
},
|
|
95
|
-
loading: {
|
|
6
|
+
active: {
|
|
96
7
|
type: Boolean,
|
|
97
8
|
default: !1
|
|
98
9
|
},
|
|
99
|
-
|
|
10
|
+
block: {
|
|
100
11
|
type: Boolean,
|
|
101
|
-
default: !0
|
|
102
|
-
},
|
|
103
|
-
tableLayout: {},
|
|
104
|
-
scroll: {},
|
|
105
|
-
pagination: {
|
|
106
|
-
type: [Object, Boolean],
|
|
107
|
-
default: !1
|
|
108
|
-
},
|
|
109
|
-
rowSelection: {},
|
|
110
|
-
expandable: {},
|
|
111
|
-
sticky: {
|
|
112
|
-
type: [Boolean, Object],
|
|
113
12
|
default: !1
|
|
114
13
|
},
|
|
115
|
-
|
|
116
|
-
locale: {},
|
|
117
|
-
rowClassName: { type: Function },
|
|
118
|
-
onRow: { type: Function },
|
|
119
|
-
onHeaderRow: { type: Function },
|
|
120
|
-
components: {}
|
|
14
|
+
size: { default: "default" }
|
|
121
15
|
},
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
collapse: c.locale?.collapse ?? "Collapse row"
|
|
138
|
-
}));
|
|
139
|
-
function x(e, t) {
|
|
140
|
-
return typeof c.rowKey == "function" ? c.rowKey(e) : e[c.rowKey] ?? t;
|
|
141
|
-
}
|
|
142
|
-
function S(e, t) {
|
|
143
|
-
if (!t) return;
|
|
144
|
-
let n = Array.isArray(t) ? t : t.split("."), r = e;
|
|
145
|
-
for (let e of n) {
|
|
146
|
-
if (typeof r != "object" || !r) return;
|
|
147
|
-
r = r[e];
|
|
148
|
-
}
|
|
149
|
-
return r;
|
|
150
|
-
}
|
|
151
|
-
let C = h({
|
|
152
|
-
key: "",
|
|
153
|
-
order: null
|
|
154
|
-
});
|
|
155
|
-
function w(e) {
|
|
156
|
-
return e.key ?? (Array.isArray(e.dataIndex) ? e.dataIndex.join(".") : e.dataIndex ?? "");
|
|
157
|
-
}
|
|
158
|
-
function T(e) {
|
|
159
|
-
if (e.sortOrder !== void 0) return e.sortOrder;
|
|
160
|
-
let t = w(e);
|
|
161
|
-
return C.value.key === t ? C.value.order : e.defaultSortOrder ?? null;
|
|
162
|
-
}
|
|
163
|
-
function rt(e, t) {
|
|
164
|
-
let n = t.length ? t : [
|
|
165
|
-
"ascend",
|
|
166
|
-
"descend",
|
|
167
|
-
null
|
|
168
|
-
];
|
|
169
|
-
return n[(n.indexOf(e) + 1) % n.length] ?? null;
|
|
170
|
-
}
|
|
171
|
-
function it(e) {
|
|
172
|
-
if (!e.sorter) return;
|
|
173
|
-
let t = w(e), n = rt(T(e), e.sortDirections ?? [
|
|
174
|
-
"ascend",
|
|
175
|
-
"descend",
|
|
176
|
-
null
|
|
177
|
-
]);
|
|
178
|
-
e.sortOrder === void 0 && (C.value = {
|
|
179
|
-
key: t,
|
|
180
|
-
order: n
|
|
181
|
-
});
|
|
182
|
-
let r = {
|
|
183
|
-
column: e,
|
|
184
|
-
order: n,
|
|
185
|
-
field: e.dataIndex,
|
|
186
|
-
columnKey: t
|
|
187
|
-
};
|
|
188
|
-
y("change", R.value, j.value, r, {
|
|
189
|
-
currentDataSource: H.value,
|
|
190
|
-
action: "sort"
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
let E = h({}), D = h(null), O = h({});
|
|
194
|
-
function k(e) {
|
|
195
|
-
return e.key ?? (Array.isArray(e.dataIndex) ? e.dataIndex.join(".") : e.dataIndex ?? "");
|
|
196
|
-
}
|
|
197
|
-
function A(e) {
|
|
198
|
-
return e.filteredValue === void 0 ? E.value[k(e)] ?? e.defaultFilteredValue ?? null : e.filteredValue;
|
|
199
|
-
}
|
|
200
|
-
let j = t(() => {
|
|
201
|
-
let e = {};
|
|
202
|
-
for (let t of U.value) if (t.filters || t.filteredValue !== void 0) {
|
|
203
|
-
let n = k(t);
|
|
204
|
-
e[n] = A(t);
|
|
205
|
-
}
|
|
206
|
-
return e;
|
|
207
|
-
});
|
|
208
|
-
function at(e) {
|
|
209
|
-
let t = k(e);
|
|
210
|
-
D.value = D.value === t ? null : t;
|
|
211
|
-
}
|
|
212
|
-
function ot(e, t) {
|
|
213
|
-
let n = k(e);
|
|
214
|
-
e.filteredValue === void 0 && (E.value = {
|
|
215
|
-
...E.value,
|
|
216
|
-
[n]: t.length ? t : null
|
|
217
|
-
}), D.value = null, e.filterResetToDefaultFilteredValue !== !1 && (P.value = 1), y("change", R.value, j.value, M(), {
|
|
218
|
-
currentDataSource: H.value,
|
|
219
|
-
action: "filter"
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
function st(e) {
|
|
223
|
-
let t = k(e), n = e.defaultFilteredValue ?? [];
|
|
224
|
-
e.filteredValue === void 0 && (E.value = {
|
|
225
|
-
...E.value,
|
|
226
|
-
[t]: n.length ? n : null
|
|
227
|
-
}), D.value = null, y("change", R.value, j.value, M(), {
|
|
228
|
-
currentDataSource: H.value,
|
|
229
|
-
action: "filter"
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
function M() {
|
|
233
|
-
let e = U.value.find((e) => T(e) !== null);
|
|
234
|
-
return e ? {
|
|
235
|
-
column: e,
|
|
236
|
-
order: T(e),
|
|
237
|
-
field: e.dataIndex,
|
|
238
|
-
columnKey: w(e)
|
|
239
|
-
} : { order: null };
|
|
240
|
-
}
|
|
241
|
-
function ct(e) {
|
|
242
|
-
let t = O.value[k(e)] ?? "";
|
|
243
|
-
if (!t) return e.filters ?? [];
|
|
244
|
-
let n = t.toLowerCase(), r = typeof e.filterSearch == "function" ? e.filterSearch : (e, t) => t.text.toLowerCase().includes(e.toLowerCase());
|
|
245
|
-
return (e.filters ?? []).filter((e) => r(n, e));
|
|
246
|
-
}
|
|
247
|
-
let N = h({});
|
|
248
|
-
function lt(e) {
|
|
249
|
-
let t = k(e);
|
|
250
|
-
N.value[t] = [...A(e) ?? []], at(e);
|
|
251
|
-
}
|
|
252
|
-
function ut(e, t) {
|
|
253
|
-
let n = k(e), r = N.value[n] ?? [];
|
|
254
|
-
if (e.filterMultiple !== !1) {
|
|
255
|
-
let e = r.indexOf(t);
|
|
256
|
-
N.value[n] = e === -1 ? [...r, t] : r.filter((e) => e !== t);
|
|
257
|
-
} else N.value[n] = [t];
|
|
258
|
-
}
|
|
259
|
-
function dt(e) {
|
|
260
|
-
let t = k(e);
|
|
261
|
-
ot(e, N.value[t] ?? []);
|
|
262
|
-
}
|
|
263
|
-
let P = h(1), F = h(typeof c.pagination == "object" ? c.pagination.defaultPageSize ?? c.pagination.pageSize ?? 10 : 10);
|
|
264
|
-
ne(() => typeof c.pagination == "object" ? c.pagination.pageSize : void 0, (e) => {
|
|
265
|
-
e != null && (F.value = e);
|
|
266
|
-
});
|
|
267
|
-
let I = t(() => typeof c.pagination == "object" && c.pagination.current != null ? c.pagination.current : P.value), L = t(() => typeof c.pagination == "object" && c.pagination.pageSize != null ? c.pagination.pageSize : F.value), R = t(() => ({
|
|
268
|
-
current: I.value,
|
|
269
|
-
pageSize: L.value,
|
|
270
|
-
total: V.value.length
|
|
271
|
-
}));
|
|
272
|
-
function z(e) {
|
|
273
|
-
typeof c.pagination == "object" && c.pagination.current == null && (P.value = e), typeof c.pagination == "object" && c.pagination.onChange?.(e, L.value), y("change", {
|
|
274
|
-
...R.value,
|
|
275
|
-
current: e
|
|
276
|
-
}, j.value, M(), {
|
|
277
|
-
currentDataSource: H.value,
|
|
278
|
-
action: "paginate"
|
|
279
|
-
});
|
|
280
|
-
}
|
|
281
|
-
function ft(e) {
|
|
282
|
-
F.value = e, P.value = 1, typeof c.pagination == "object" && c.pagination.onShowSizeChange?.(1, e);
|
|
283
|
-
}
|
|
284
|
-
let B = t(() => Math.ceil(V.value.length / L.value)), pt = t(() => typeof c.pagination == "object" && c.pagination.pageSizeOptions ? c.pagination.pageSizeOptions.map(Number) : [
|
|
285
|
-
10,
|
|
286
|
-
20,
|
|
287
|
-
50,
|
|
288
|
-
100
|
|
289
|
-
]), V = t(() => {
|
|
290
|
-
let e = [...c.dataSource];
|
|
291
|
-
for (let t of U.value) {
|
|
292
|
-
let n = A(t);
|
|
293
|
-
!n || n.length === 0 || (t.onFilter ? e = e.filter((e) => n.some((n) => t.onFilter(n, e))) : t.dataIndex && (e = e.filter((e) => {
|
|
294
|
-
let r = S(e, t.dataIndex);
|
|
295
|
-
return n.some((e) => String(r) === String(e));
|
|
296
|
-
})));
|
|
297
|
-
}
|
|
298
|
-
return e;
|
|
299
|
-
}), mt = t(() => {
|
|
300
|
-
let e = [...V.value], t = U.value.find((e) => T(e) !== null);
|
|
301
|
-
if (!t || !t.sorter) return e;
|
|
302
|
-
let n = T(t);
|
|
303
|
-
return n && (typeof t.sorter == "function" ? e.sort((e, r) => {
|
|
304
|
-
let i = t.sorter(e, r);
|
|
305
|
-
return n === "ascend" ? i : -i;
|
|
306
|
-
}) : e.sort((e, r) => {
|
|
307
|
-
let i = String(S(e, t.dataIndex) ?? ""), a = String(S(r, t.dataIndex) ?? "");
|
|
308
|
-
return n === "ascend" ? i.localeCompare(a) : a.localeCompare(i);
|
|
309
|
-
})), e;
|
|
310
|
-
}), H = t(() => {
|
|
311
|
-
if (!c.pagination) return mt.value;
|
|
312
|
-
let e = (I.value - 1) * L.value;
|
|
313
|
-
return mt.value.slice(e, e + L.value);
|
|
314
|
-
}), U = t(() => {
|
|
315
|
-
function e(t) {
|
|
316
|
-
let n = [];
|
|
317
|
-
for (let r of t) r.children?.length ? n.push(...e(r.children)) : n.push(r);
|
|
318
|
-
return n;
|
|
319
|
-
}
|
|
320
|
-
return e(c.columns);
|
|
321
|
-
}), W = t(() => {
|
|
322
|
-
function e(t) {
|
|
323
|
-
return t.children?.length ? 1 + Math.max(...t.children.map(e)) : 1;
|
|
324
|
-
}
|
|
325
|
-
let t = Math.max(...c.columns.map(e), 1);
|
|
326
|
-
function n(e, i, a) {
|
|
327
|
-
for (let o of e) {
|
|
328
|
-
let e = !o.children?.length, s = {
|
|
329
|
-
col: o,
|
|
330
|
-
colSpan: e ? 1 : r(o),
|
|
331
|
-
rowSpan: e ? t - a : 1,
|
|
332
|
-
isLeaf: e
|
|
333
|
-
};
|
|
334
|
-
i[a] || (i[a] = []), i[a].push(s), e || n(o.children, i, a + 1);
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
function r(e) {
|
|
338
|
-
return e.children?.length ? e.children.reduce((e, t) => e + r(t), 0) : 1;
|
|
339
|
-
}
|
|
340
|
-
let i = [];
|
|
341
|
-
return n(c.columns, i, 0), i;
|
|
342
|
-
}), ht = h(new Set(c.rowSelection?.defaultSelectedRowKeys ?? [])), G = t(() => c.rowSelection?.selectedRowKeys ? new Set(c.rowSelection.selectedRowKeys) : ht.value), gt = t(() => c.rowSelection?.type !== "radio"), _t = t(() => H.value.map((e, t) => x(e, t))), K = t(() => _t.value.filter((e, t) => !c.rowSelection?.getCheckboxProps?.(H.value[t])?.disabled)), q = t(() => K.value.length > 0 && K.value.every((e) => G.value.has(e))), vt = t(() => !q.value && K.value.some((e) => G.value.has(e)));
|
|
343
|
-
function yt(e) {
|
|
344
|
-
c.rowSelection?.selectedRowKeys || (ht.value = e);
|
|
345
|
-
let t = [...e], n = c.dataSource.filter((t, n) => e.has(x(t, n)));
|
|
346
|
-
c.rowSelection?.onChange?.(t, n);
|
|
347
|
-
}
|
|
348
|
-
function bt(e, t, n) {
|
|
349
|
-
let r = x(e, t), i = new Set(G.value);
|
|
350
|
-
gt.value ? i.has(r) ? (i.delete(r), c.rowSelection?.onSelect?.(e, !1, [...i].map((e) => c.dataSource.find((t, n) => x(t, n) === e)), n)) : (i.add(r), c.rowSelection?.onSelect?.(e, !0, [...i].map((e) => c.dataSource.find((t, n) => x(t, n) === e)), n)) : (i.clear(), i.add(r), c.rowSelection?.onSelect?.(e, !0, [e], n)), yt(i);
|
|
351
|
-
}
|
|
352
|
-
function xt(e) {
|
|
353
|
-
let t = new Set(c.rowSelection?.preserveSelectedRowKeys ? G.value : /* @__PURE__ */ new Set());
|
|
354
|
-
q.value ? (K.value.forEach((e) => t.delete(e)), c.rowSelection?.onSelectAll?.(!1, [], H.value)) : (K.value.forEach((e) => t.add(e)), c.rowSelection?.onSelectAll?.(!0, [...t].map((e) => c.dataSource.find((t, n) => x(t, n) === e)), H.value)), yt(t);
|
|
355
|
-
}
|
|
356
|
-
let St = h(new Set(c.expandable?.defaultExpandedRowKeys ?? [])), Ct = t(() => c.expandable?.expandedRowKeys ? new Set(c.expandable.expandedRowKeys) : St.value);
|
|
357
|
-
function wt(e, t, n) {
|
|
358
|
-
let r = x(e, t), i = new Set(Ct.value), a = i.has(r);
|
|
359
|
-
a ? i.delete(r) : i.add(r), c.expandable?.expandedRowKeys || (St.value = i), c.expandable?.onExpand?.(!a, e), c.expandable?.onExpandedRowsChange?.([...i]), y("expand", !a, e), y("expandedRowsChange", [...i]);
|
|
360
|
-
}
|
|
361
|
-
function J(e, t) {
|
|
362
|
-
return Ct.value.has(x(e, t));
|
|
363
|
-
}
|
|
364
|
-
function Tt(e) {
|
|
365
|
-
if (c.expandable?.rowExpandable) return c.expandable.rowExpandable(e);
|
|
366
|
-
let t = e[c.expandable?.childrenColumnName ?? "children"];
|
|
367
|
-
return Array.isArray(t) && t.length > 0;
|
|
368
|
-
}
|
|
369
|
-
function Y(e, t) {
|
|
370
|
-
return S(e, t.dataIndex);
|
|
371
|
-
}
|
|
372
|
-
function X(e, t) {
|
|
373
|
-
return e.key ?? (Array.isArray(e.dataIndex) ? e.dataIndex.join(".") : e.dataIndex ?? t);
|
|
374
|
-
}
|
|
375
|
-
let Et = t(() => typeof c.sticky == "object" ? c.sticky.offsetHeader ?? 0 : 0), Z = h(null), Dt = h(!1);
|
|
376
|
-
p(() => {
|
|
377
|
-
Ot();
|
|
378
|
-
}), ne(() => c.columns, () => u(Ot));
|
|
379
|
-
function Ot() {
|
|
380
|
-
Z.value && (Dt.value = Z.value.scrollWidth > Z.value.clientWidth);
|
|
381
|
-
}
|
|
382
|
-
let kt = t(() => ["b-table", {
|
|
383
|
-
"b-table--bordered": c.bordered,
|
|
384
|
-
"b-table--loading": c.loading,
|
|
385
|
-
"b-table--small": c.size === "small",
|
|
386
|
-
"b-table--middle": c.size === "middle",
|
|
387
|
-
"b-table--sticky": c.sticky,
|
|
388
|
-
"b-table--fixed-header": !!c.scroll?.y,
|
|
389
|
-
"b-table--scroll-x": !!c.scroll?.x,
|
|
390
|
-
"b-table--has-selection": !!c.rowSelection,
|
|
391
|
-
"b-table--has-expand": !!c.expandable,
|
|
392
|
-
"b-table--empty": H.value.length === 0
|
|
393
|
-
}]), At = t(() => {
|
|
394
|
-
let e = {};
|
|
395
|
-
return c.tableLayout && (e.tableLayout = c.tableLayout), c.scroll?.x === !0 ? e.minWidth = "100%" : c.scroll?.x && (e.width = typeof c.scroll.x == "number" ? `${c.scroll.x}px` : c.scroll.x), e;
|
|
396
|
-
}), jt = t(() => {
|
|
397
|
-
let e = {};
|
|
398
|
-
return c.scroll?.x && (e.overflowX = "auto"), c.scroll?.y && (e.overflowY = "auto", e.maxHeight = typeof c.scroll.y == "number" ? `${c.scroll.y}px` : c.scroll.y), e;
|
|
399
|
-
}), Mt = t(() => c.sticky ? {
|
|
400
|
-
position: "sticky",
|
|
401
|
-
top: Et.value ? `${Et.value}px` : "0",
|
|
402
|
-
zIndex: 2
|
|
403
|
-
} : {});
|
|
404
|
-
function Nt(e) {
|
|
405
|
-
let t = T(e);
|
|
406
|
-
return t === "ascend" ? "asc" : t === "descend" ? "desc" : "none";
|
|
407
|
-
}
|
|
408
|
-
function Pt(e) {
|
|
409
|
-
return typeof e.ellipsis == "boolean" ? e.ellipsis : !!e.ellipsis;
|
|
410
|
-
}
|
|
411
|
-
function Q(e) {
|
|
412
|
-
let t = {};
|
|
413
|
-
return e.width != null && (t.width = typeof e.width == "number" ? `${e.width}px` : e.width), e.minWidth != null && (t.minWidth = `${e.minWidth}px`), e.maxWidth != null && (t.maxWidth = `${e.maxWidth}px`), e.align && (t.textAlign = e.align), t;
|
|
414
|
-
}
|
|
415
|
-
let $ = h("");
|
|
416
|
-
function Ft(e) {
|
|
417
|
-
if (e.key === "Enter") {
|
|
418
|
-
let e = parseInt($.value, 10);
|
|
419
|
-
!isNaN(e) && e >= 1 && e <= B.value && z(e), $.value = "";
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
function It(e) {
|
|
423
|
-
e.key === "Escape" && (D.value = null);
|
|
424
|
-
}
|
|
425
|
-
function Lt(e, t, n) {
|
|
426
|
-
if (e.cellStyle) return typeof e.cellStyle == "function" ? e.cellStyle(t, n) : e.cellStyle;
|
|
427
|
-
}
|
|
428
|
-
return (t, u) => (m(), i("div", {
|
|
429
|
-
class: d(kt.value),
|
|
430
|
-
role: "region",
|
|
431
|
-
"aria-label": c.caption ?? void 0,
|
|
432
|
-
"aria-busy": c.loading ? "true" : void 0
|
|
433
|
-
}, [
|
|
434
|
-
c.loading ? (m(), i("div", oe, [...u[5] ||= [o("<div class=\"b-table__spin\" aria-hidden=\"true\"><span class=\"b-table__spin-dot\"></span><span class=\"b-table__spin-dot\"></span><span class=\"b-table__spin-dot\"></span><span class=\"b-table__spin-dot\"></span></div>", 1)]])) : r("", !0),
|
|
435
|
-
t.$slots.title ? (m(), i("div", {
|
|
436
|
-
key: 1,
|
|
437
|
-
class: "b-table__title",
|
|
438
|
-
"aria-hidden": c.loading ? "true" : void 0,
|
|
439
|
-
style: f(c.loading ? { visibility: "hidden" } : {})
|
|
440
|
-
}, [_(t.$slots, "title")], 12, se)) : r("", !0),
|
|
441
|
-
a("div", {
|
|
442
|
-
ref_key: "scrollRef",
|
|
443
|
-
ref: Z,
|
|
444
|
-
class: "b-table__scroll-wrapper",
|
|
445
|
-
style: f([jt.value, c.loading ? { visibility: "hidden" } : {}]),
|
|
446
|
-
"aria-hidden": c.loading ? "true" : void 0,
|
|
447
|
-
tabindex: c.scroll?.x || c.scroll?.y ? 0 : void 0
|
|
448
|
-
}, [a("table", {
|
|
449
|
-
class: "b-table__table",
|
|
450
|
-
style: f(At.value),
|
|
451
|
-
role: "table"
|
|
452
|
-
}, [
|
|
453
|
-
c.caption ? (m(), i("caption", le, v(c.caption), 1)) : r("", !0),
|
|
454
|
-
a("colgroup", null, [
|
|
455
|
-
c.rowSelection ? (m(), i("col", {
|
|
456
|
-
key: 0,
|
|
457
|
-
style: f({ width: c.rowSelection.columnWidth ? typeof c.rowSelection.columnWidth == "number" ? `${c.rowSelection.columnWidth}px` : c.rowSelection.columnWidth : "48px" })
|
|
458
|
-
}, null, 4)) : r("", !0),
|
|
459
|
-
c.expandable && c.expandable.showExpandColumn !== !1 ? (m(), i("col", ue)) : r("", !0),
|
|
460
|
-
(m(!0), i(e, null, g(U.value, (e, t) => (m(), i("col", {
|
|
461
|
-
key: X(e, t),
|
|
462
|
-
style: f(Q(e))
|
|
463
|
-
}, null, 4))), 128))
|
|
464
|
-
]),
|
|
465
|
-
c.showHeader ? (m(), i("thead", {
|
|
466
|
-
key: 1,
|
|
467
|
-
class: "b-table__thead",
|
|
468
|
-
style: f(Mt.value)
|
|
469
|
-
}, [(m(!0), i(e, null, g(W.value, (t, n) => (m(), i("tr", l({
|
|
470
|
-
key: n,
|
|
471
|
-
class: "b-table__tr b-table__tr--header"
|
|
472
|
-
}, { ref_for: !0 }, c.onHeaderRow?.(c.columns, n)), [
|
|
473
|
-
c.rowSelection && n === 0 ? (m(), i("th", {
|
|
474
|
-
key: 0,
|
|
475
|
-
class: "b-table__th b-table__th--selection",
|
|
476
|
-
rowspan: W.value.length,
|
|
477
|
-
scope: "col",
|
|
478
|
-
"aria-label": b.value.selectAll
|
|
479
|
-
}, [c.rowSelection.columnTitle ? (m(), i("span", fe, v(c.rowSelection.columnTitle), 1)) : gt.value && !c.rowSelection.hideSelectAll ? (m(), i("label", pe, [a("input", {
|
|
480
|
-
type: "checkbox",
|
|
481
|
-
class: "b-table__checkbox",
|
|
482
|
-
checked: q.value,
|
|
483
|
-
indeterminate: vt.value,
|
|
484
|
-
"aria-label": b.value.selectAll,
|
|
485
|
-
onChange: u[0] ||= (e) => xt(e)
|
|
486
|
-
}, null, 40, me), a("span", {
|
|
487
|
-
class: d(["b-table__checkbox-inner", {
|
|
488
|
-
"b-table__checkbox-inner--indeterminate": vt.value,
|
|
489
|
-
"b-table__checkbox-inner--checked": q.value
|
|
490
|
-
}]),
|
|
491
|
-
"aria-hidden": "true"
|
|
492
|
-
}, null, 2)])) : r("", !0)], 8, de)) : r("", !0),
|
|
493
|
-
c.expandable && c.expandable.showExpandColumn !== !1 && n === 0 ? (m(), i("th", {
|
|
494
|
-
key: 1,
|
|
495
|
-
class: "b-table__th b-table__th--expand",
|
|
496
|
-
rowspan: W.value.length,
|
|
497
|
-
scope: "col",
|
|
498
|
-
"aria-hidden": "true"
|
|
499
|
-
}, null, 8, he)) : r("", !0),
|
|
500
|
-
(m(!0), i(e, null, g(t, (t) => (m(), i("th", l({
|
|
501
|
-
key: X(t.col, 0),
|
|
502
|
-
class: ["b-table__th", {
|
|
503
|
-
"b-table__th--sorted": T(t.col) !== null,
|
|
504
|
-
"b-table__th--sortable": !!t.col.sorter,
|
|
505
|
-
"b-table__th--filtered": (A(t.col)?.length ?? 0) > 0,
|
|
506
|
-
[`b-table__th--align-${t.col.align ?? "left"}`]: !0,
|
|
507
|
-
[t.col.className ?? ""]: !!t.col.className
|
|
508
|
-
}],
|
|
509
|
-
colspan: t.colSpan > 1 ? t.colSpan : void 0,
|
|
510
|
-
rowspan: t.rowSpan > 1 ? t.rowSpan : void 0,
|
|
511
|
-
style: Q(t.col),
|
|
512
|
-
scope: "col",
|
|
513
|
-
"aria-sort": t.col.sorter ? T(t.col) === "ascend" ? "ascending" : T(t.col) === "descend" ? "descending" : "none" : void 0
|
|
514
|
-
}, { ref_for: !0 }, c.onHeaderRow?.(c.columns, 0)), [a("div", _e, [
|
|
515
|
-
a("span", { class: d(["b-table__col-title", { "b-table__col-title--rowspan": t.rowSpan > 1 }]) }, v(t.col.titleText ?? t.col.title), 3),
|
|
516
|
-
t.col.sorter && t.isLeaf ? (m(), i("button", {
|
|
517
|
-
key: 0,
|
|
518
|
-
class: "b-table__sorter",
|
|
519
|
-
type: "button",
|
|
520
|
-
"aria-label": `${b.value.sortTitle}: ${t.col.titleText ?? t.col.title}`,
|
|
521
|
-
"data-sort": Nt(t.col),
|
|
522
|
-
onClick: ie((e) => it(t.col), ["stop"])
|
|
523
|
-
}, [a("span", ye, [(m(), i("svg", {
|
|
524
|
-
class: d(["b-table__sort-up", { active: Nt(t.col) === "asc" }]),
|
|
525
|
-
viewBox: "0 0 1024 1024",
|
|
526
|
-
width: "1em",
|
|
527
|
-
height: "1em",
|
|
528
|
-
fill: "currentColor",
|
|
529
|
-
"aria-hidden": "true"
|
|
530
|
-
}, [...u[6] ||= [a("path", { d: "M858.9 689L530.5 308.2a24 24 0 0 0-36.9 0L165.1 689c-4.7 5.2-.4 13 6.5 13h496.8c6.9 0 11.2-7.8 6.5-13z" }, null, -1)]], 2)), (m(), i("svg", {
|
|
531
|
-
class: d(["b-table__sort-down", { active: Nt(t.col) === "desc" }]),
|
|
532
|
-
viewBox: "0 0 1024 1024",
|
|
533
|
-
width: "1em",
|
|
534
|
-
height: "1em",
|
|
535
|
-
fill: "currentColor",
|
|
536
|
-
"aria-hidden": "true"
|
|
537
|
-
}, [...u[7] ||= [a("path", { d: "M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z" }, null, -1)]], 2))])], 8, ve)) : r("", !0),
|
|
538
|
-
t.col.filters && t.isLeaf ? (m(), i("div", {
|
|
539
|
-
key: 1,
|
|
540
|
-
class: d(["b-table__filter-trigger", { "b-table__filter-trigger--active": (A(t.col)?.length ?? 0) > 0 || D.value === k(t.col) }])
|
|
541
|
-
}, [a("button", {
|
|
542
|
-
type: "button",
|
|
543
|
-
class: "b-table__filter-btn",
|
|
544
|
-
"aria-expanded": D.value === k(t.col) ? "true" : "false",
|
|
545
|
-
"aria-label": `Filter ${t.col.titleText ?? t.col.title}`,
|
|
546
|
-
onClick: ie((e) => lt(t.col), ["stop"])
|
|
547
|
-
}, [...u[8] ||= [a("svg", {
|
|
548
|
-
viewBox: "0 0 1024 1024",
|
|
549
|
-
width: "1em",
|
|
550
|
-
height: "1em",
|
|
551
|
-
fill: "currentColor",
|
|
552
|
-
"aria-hidden": "true"
|
|
553
|
-
}, [a("path", { d: "M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.8 14.5 32 32.3 32h263.4c17.8 0 32.3-14.2 32.3-32V597.4L909.6 202c12.3-21.3-3-48-29.5-48z" })], -1)]], 8, be), D.value === k(t.col) ? (m(), i("div", {
|
|
554
|
-
key: 0,
|
|
555
|
-
class: "b-table__filter-dropdown",
|
|
556
|
-
role: "dialog",
|
|
557
|
-
"aria-label": `Filter ${t.col.titleText ?? t.col.title}`,
|
|
558
|
-
onKeydown: It
|
|
559
|
-
}, [
|
|
560
|
-
t.col.filterSearch ? (m(), i("div", Se, [re(a("input", {
|
|
561
|
-
"onUpdate:modelValue": (e) => O.value[k(t.col)] = e,
|
|
562
|
-
type: "search",
|
|
563
|
-
class: "b-table__filter-search-input",
|
|
564
|
-
placeholder: "Search...",
|
|
565
|
-
"aria-label": "Search filter options"
|
|
566
|
-
}, null, 8, Ce), [[te, O.value[k(t.col)]]])])) : r("", !0),
|
|
567
|
-
a("ul", {
|
|
568
|
-
class: "b-table__filter-list",
|
|
569
|
-
role: "listbox",
|
|
570
|
-
"aria-multiselectable": t.col.filterMultiple === !1 ? "false" : "true"
|
|
571
|
-
}, [(m(!0), i(e, null, g(ct(t.col), (e) => (m(), i("li", {
|
|
572
|
-
key: String(e.value),
|
|
573
|
-
class: "b-table__filter-item",
|
|
574
|
-
role: "option",
|
|
575
|
-
"aria-selected": (N.value[k(t.col)] ?? []).includes(e.value)
|
|
576
|
-
}, [a("label", Ee, [a("input", {
|
|
577
|
-
type: t.col.filterMultiple === !1 ? "radio" : "checkbox",
|
|
578
|
-
class: "b-table__filter-item-input",
|
|
579
|
-
checked: (N.value[k(t.col)] ?? []).includes(e.value),
|
|
580
|
-
onChange: (n) => ut(t.col, e.value)
|
|
581
|
-
}, null, 40, De), a("span", null, v(e.text), 1)])], 8, Te))), 128))], 8, we),
|
|
582
|
-
a("div", Oe, [a("button", {
|
|
583
|
-
type: "button",
|
|
584
|
-
class: "b-table__filter-reset",
|
|
585
|
-
onClick: (e) => st(t.col)
|
|
586
|
-
}, v(b.value.filterReset), 9, ke), a("button", {
|
|
587
|
-
type: "button",
|
|
588
|
-
class: "b-table__filter-confirm",
|
|
589
|
-
onClick: (e) => dt(t.col)
|
|
590
|
-
}, v(b.value.filterConfirm), 9, Ae)])
|
|
591
|
-
], 40, xe)) : r("", !0)], 2)) : r("", !0)
|
|
592
|
-
])], 16, ge))), 128))
|
|
593
|
-
], 16))), 128))], 4)) : r("", !0),
|
|
594
|
-
a("tbody", je, [
|
|
595
|
-
H.value.length === 0 ? (m(), i("tr", Me, [a("td", {
|
|
596
|
-
class: "b-table__td b-table__td--empty",
|
|
597
|
-
colspan: U.value.length + (c.rowSelection ? 1 : 0) + (c.expandable && c.expandable.showExpandColumn !== !1 ? 1 : 0)
|
|
598
|
-
}, [_(t.$slots, "emptyText", {}, () => [a("div", Pe, [u[9] ||= o("<svg class=\"b-table__empty-icon\" viewBox=\"0 0 64 41\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\"><g transform=\"translate(0 1)\" fill=\"none\" fill-rule=\"evenodd\"><ellipse cx=\"32\" cy=\"33\" rx=\"32\" ry=\"7\" fill=\"currentColor\" opacity=\".2\"></ellipse><g fill-rule=\"nonzero\" stroke=\"currentColor\"><path d=\"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z\"></path><path d=\"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z\" fill=\"currentColor\" opacity=\".08\"></path></g></g></svg>", 1), a("p", Fe, v(b.value.emptyText), 1)])])], 8, Ne)])) : r("", !0),
|
|
599
|
-
(m(!0), i(e, null, g(H.value, (o, p) => (m(), i(e, { key: x(o, p) }, [a("tr", l({ class: ["b-table__tr b-table__tr--data", [c.rowClassName?.(o, p), {
|
|
600
|
-
"b-table__tr--selected": G.value.has(x(o, p)),
|
|
601
|
-
"b-table__tr--expanded": J(o, p)
|
|
602
|
-
}]] }, { ref_for: !0 }, c.onRow?.(o, p)), [
|
|
603
|
-
c.rowSelection ? (m(), i("td", Ie, [a("label", Le, [a("input", l({
|
|
604
|
-
type: gt.value ? "checkbox" : "radio",
|
|
605
|
-
class: "b-table__checkbox",
|
|
606
|
-
checked: G.value.has(x(o, p)),
|
|
607
|
-
disabled: !!c.rowSelection.getCheckboxProps?.(o)?.disabled,
|
|
608
|
-
"aria-label": `Select row ${p + 1}`
|
|
609
|
-
}, { ref_for: !0 }, c.rowSelection.getCheckboxProps?.(o), { onChange: (e) => bt(o, p, e) }), null, 16, Re), a("span", {
|
|
610
|
-
class: d(["b-table__checkbox-inner", { "b-table__checkbox-inner--checked": G.value.has(x(o, p)) }]),
|
|
611
|
-
"aria-hidden": "true"
|
|
612
|
-
}, null, 2)])])) : r("", !0),
|
|
613
|
-
c.expandable && c.expandable.showExpandColumn !== !1 ? (m(), i("td", ze, [Tt(o) ? (m(), i("button", {
|
|
614
|
-
key: 0,
|
|
615
|
-
type: "button",
|
|
616
|
-
class: d(["b-table__expand-btn", { "b-table__expand-btn--expanded": J(o, p) }]),
|
|
617
|
-
"aria-label": J(o, p) ? b.value.collapse : b.value.expand,
|
|
618
|
-
"aria-expanded": J(o, p) ? "true" : "false",
|
|
619
|
-
onClick: (e) => wt(o, p, e)
|
|
620
|
-
}, [...u[10] ||= [a("svg", {
|
|
621
|
-
class: "b-table__expand-icon",
|
|
622
|
-
viewBox: "0 0 1024 1024",
|
|
623
|
-
width: "1em",
|
|
624
|
-
height: "1em",
|
|
625
|
-
fill: "currentColor",
|
|
626
|
-
"aria-hidden": "true"
|
|
627
|
-
}, [a("path", { d: "M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 0 0 0-50.4z" })], -1)]], 10, Be)) : r("", !0)])) : r("", !0),
|
|
628
|
-
(m(!0), i(e, null, g(U.value, (r, a) => (m(), i("td", {
|
|
629
|
-
key: X(r, a),
|
|
630
|
-
class: d(["b-table__td", {
|
|
631
|
-
[`b-table__td--align-${r.align ?? "left"}`]: !0,
|
|
632
|
-
"b-table__td--ellipsis": Pt(r),
|
|
633
|
-
[r.className ?? ""]: !!r.className
|
|
634
|
-
}]),
|
|
635
|
-
style: f([Q(r), Lt(r, o, p)])
|
|
636
|
-
}, [t.$slots[String(X(r, a))] ? _(t.$slots, String(X(r, a)), {
|
|
637
|
-
key: 0,
|
|
638
|
-
value: Y(o, r),
|
|
639
|
-
record: o,
|
|
640
|
-
index: p,
|
|
641
|
-
column: r
|
|
642
|
-
}) : r.customRender ? (m(), n(ee(() => r.customRender({
|
|
643
|
-
value: Y(o, r),
|
|
644
|
-
record: o,
|
|
645
|
-
index: p,
|
|
646
|
-
column: r
|
|
647
|
-
})), { key: 1 })) : (m(), i(e, { key: 2 }, [Pt(r) ? (m(), i("span", {
|
|
648
|
-
key: 0,
|
|
649
|
-
class: "b-table__cell-ellipsis",
|
|
650
|
-
title: typeof r.ellipsis == "object" && r.ellipsis.showTitle !== !1 ? String(Y(o, r) ?? "") : void 0
|
|
651
|
-
}, v(Y(o, r)), 9, Ve)) : (m(), i(e, { key: 1 }, [s(v(Y(o, r)), 1)], 64))], 64))], 6))), 128))
|
|
652
|
-
], 16), c.expandable && J(o, p) ? (m(), i("tr", {
|
|
653
|
-
class: "b-table__tr b-table__tr--expanded-content",
|
|
654
|
-
key: `${x(o, p)}-expanded`
|
|
655
|
-
}, [a("td", {
|
|
656
|
-
colspan: U.value.length + (c.rowSelection ? 1 : 0) + (c.expandable && c.expandable.showExpandColumn !== !1 ? 1 : 0),
|
|
657
|
-
class: "b-table__td b-table__td--expanded"
|
|
658
|
-
}, [c.expandable.expandedRowRender ? (m(), n(ee(() => c.expandable.expandedRowRender(o, p, 0, J(o, p))), { key: 0 })) : _(t.$slots, "expandedRow", {
|
|
659
|
-
key: 1,
|
|
660
|
-
record: o,
|
|
661
|
-
index: p
|
|
662
|
-
})], 8, He)])) : r("", !0)], 64))), 128)),
|
|
663
|
-
_(t.$slots, "summary", { pageData: H.value })
|
|
664
|
-
])
|
|
665
|
-
], 4)], 12, ce),
|
|
666
|
-
t.$slots.footer ? (m(), i("div", {
|
|
667
|
-
key: 2,
|
|
668
|
-
class: "b-table__footer",
|
|
669
|
-
"aria-hidden": c.loading ? "true" : void 0,
|
|
670
|
-
style: f(c.loading ? { visibility: "hidden" } : {})
|
|
671
|
-
}, [_(t.$slots, "footer")], 12, Ue)) : r("", !0),
|
|
672
|
-
c.pagination !== !1 && V.value.length > 0 ? (m(), i("div", {
|
|
673
|
-
key: 3,
|
|
674
|
-
class: "b-table__pagination",
|
|
675
|
-
role: "navigation",
|
|
676
|
-
"aria-label": "Table pagination",
|
|
677
|
-
"aria-hidden": c.loading ? "true" : void 0,
|
|
678
|
-
style: f(c.loading ? { visibility: "hidden" } : {})
|
|
679
|
-
}, [typeof c.pagination == "object" && c.pagination.showTotal ? (m(), i("span", Ge, v(c.pagination.showTotal(V.value.length, [(I.value - 1) * L.value + 1, Math.min(I.value * L.value, V.value.length)])), 1)) : r("", !0), a("div", Ke, [
|
|
680
|
-
a("button", {
|
|
681
|
-
type: "button",
|
|
682
|
-
class: "b-table__page-btn",
|
|
683
|
-
disabled: I.value <= 1,
|
|
684
|
-
"aria-label": "Previous page",
|
|
685
|
-
onClick: u[1] ||= (e) => z(I.value - 1)
|
|
686
|
-
}, [...u[11] ||= [a("svg", {
|
|
687
|
-
viewBox: "0 0 1024 1024",
|
|
688
|
-
width: "1em",
|
|
689
|
-
height: "1em",
|
|
690
|
-
fill: "currentColor",
|
|
691
|
-
"aria-hidden": "true"
|
|
692
|
-
}, [a("path", { d: "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.96 31.96 0 0 0 0 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" })], -1)]], 8, qe),
|
|
693
|
-
(m(!0), i(e, null, g(B.value, (t) => (m(), i(e, { key: t }, [B.value <= 7 || t === 1 || t === B.value || Math.abs(t - I.value) <= 1 ? (m(), i("button", {
|
|
694
|
-
key: 0,
|
|
695
|
-
type: "button",
|
|
696
|
-
class: d(["b-table__page-btn", { "b-table__page-btn--active": t === I.value }]),
|
|
697
|
-
"aria-label": `Page ${t}`,
|
|
698
|
-
"aria-current": t === I.value ? "page" : void 0,
|
|
699
|
-
onClick: (e) => z(t)
|
|
700
|
-
}, v(t), 11, Je)) : t === 2 && I.value > 4 ? (m(), i("span", Ye, "…")) : t === B.value - 1 && I.value < B.value - 3 ? (m(), i("span", Xe, "…")) : r("", !0)], 64))), 128)),
|
|
701
|
-
a("button", {
|
|
702
|
-
type: "button",
|
|
703
|
-
class: "b-table__page-btn",
|
|
704
|
-
disabled: I.value >= B.value,
|
|
705
|
-
"aria-label": "Next page",
|
|
706
|
-
onClick: u[2] ||= (e) => z(I.value + 1)
|
|
707
|
-
}, [...u[12] ||= [a("svg", {
|
|
708
|
-
viewBox: "0 0 1024 1024",
|
|
709
|
-
width: "1em",
|
|
710
|
-
height: "1em",
|
|
711
|
-
fill: "currentColor",
|
|
712
|
-
"aria-hidden": "true"
|
|
713
|
-
}, [a("path", { d: "M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 0 0 0-50.4z" })], -1)]], 8, Ze),
|
|
714
|
-
typeof c.pagination == "object" && c.pagination.showSizeChanger ? (m(), i("select", {
|
|
715
|
-
key: 0,
|
|
716
|
-
class: "b-table__page-size",
|
|
717
|
-
value: L.value,
|
|
718
|
-
"aria-label": "Rows per page",
|
|
719
|
-
onChange: u[3] ||= (e) => ft(Number(e.target.value))
|
|
720
|
-
}, [(m(!0), i(e, null, g(pt.value, (e) => (m(), i("option", {
|
|
721
|
-
key: e,
|
|
722
|
-
value: e
|
|
723
|
-
}, v(e) + " / page", 9, $e))), 128))], 40, Qe)) : r("", !0),
|
|
724
|
-
typeof c.pagination == "object" && c.pagination.showQuickJumper ? (m(), i("span", et, [u[13] ||= s(" Go to ", -1), re(a("input", {
|
|
725
|
-
"onUpdate:modelValue": u[4] ||= (e) => $.value = e,
|
|
726
|
-
type: "number",
|
|
727
|
-
class: "b-table__page-jump-input",
|
|
728
|
-
min: 1,
|
|
729
|
-
max: B.value,
|
|
730
|
-
"aria-label": "Go to page",
|
|
731
|
-
onKeydown: Ft
|
|
732
|
-
}, null, 40, tt), [[te, $.value]])])) : r("", !0)
|
|
733
|
-
])], 12, We)) : r("", !0)
|
|
734
|
-
], 10, ae));
|
|
16
|
+
setup(n) {
|
|
17
|
+
let a = e(() => [
|
|
18
|
+
"b-skeleton-element",
|
|
19
|
+
"b-skeleton-input",
|
|
20
|
+
`b-skeleton-input--${n.size}`,
|
|
21
|
+
{
|
|
22
|
+
"b-skeleton-input--block": n.block,
|
|
23
|
+
"b-skeleton-element--active": n.active
|
|
24
|
+
}
|
|
25
|
+
]);
|
|
26
|
+
return (e, n) => (i(), t("span", {
|
|
27
|
+
class: r(a.value),
|
|
28
|
+
role: "presentation",
|
|
29
|
+
"aria-hidden": "true"
|
|
30
|
+
}, null, 2));
|
|
735
31
|
}
|
|
736
32
|
});
|
|
737
33
|
//#endregion
|
|
738
|
-
export {
|
|
34
|
+
export { a as default };
|
|
739
35
|
|
|
740
36
|
//# sourceMappingURL=design-system189.js.map
|