@wssto2/vue-core 0.4.7 → 0.4.8
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/README.md +2 -1
- package/dist/{Activity-CEeZADHC.js → Activity-BqmMjwAS.js} +1 -1
- package/dist/{Changes-B7TxVDoE.js → Changes-CoDcwt3C.js} +1 -1
- package/dist/CollectionPage.vue_vue_type_script_setup_true_lang-C35PsfKK.js +1569 -0
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-KPm5NrDE.js → DataTable.vue_vue_type_script_setup_true_lang-4CL_kEKf.js} +21 -17
- package/dist/{DeadLetters-DwKeKpu6.js → DeadLetters-DaWaCeYJ.js} +2 -2
- package/dist/{General-C43nVs_x.js → General-sP35jv3T.js} +1 -1
- package/dist/{ProfilePage-BXVPsyS8.js → ProfilePage-CMtis35I.js} +2 -2
- package/dist/{Sessions-9OEiLpje.js → Sessions-CWqbbgzF.js} +1 -1
- package/dist/{SettingsPage-CmPy-kpL.js → SettingsPage-BYwmti4E.js} +1 -1
- package/dist/{SignIn-f-HF9B7-.js → SignIn-BGs0x7Cg.js} +1 -1
- package/dist/{SignInPage-C8zaS_7r.js → SignInPage-Djhf9T9M.js} +1 -1
- package/dist/{SignInTable.vue_vue_type_script_setup_true_lang-ALAuc0sI.js → SignInTable.vue_vue_type_script_setup_true_lang-BxqBA5pD.js} +1 -1
- package/dist/{SignIns-DzKz0Ple.js → SignIns-DkR9TvZT.js} +2 -2
- package/dist/{UserRecord-pciJE77m.js → UserRecord-C2jOiPcF.js} +2 -2
- package/dist/{UsersList-YRJTY69g.js → UsersList-CFDuDIu_.js} +3 -3
- package/dist/collection/CollectionPage.vue.d.ts +2 -0
- package/dist/collection/CollectionRows.vue.d.ts +6 -1
- package/dist/collection/CollectionTable.vue.d.ts +9 -0
- package/dist/collection/CollectionToolbar.vue.d.ts +3 -2
- package/dist/collection/DataTable.vue.d.ts +3 -0
- package/dist/collection/index.js +3 -3
- package/dist/collection/rowInteractions.d.ts +3 -1
- package/dist/i18n/index.js +8 -8
- package/dist/identity/index.js +1 -1
- package/dist/{index-DoowoCS7.js → index-0QeMiN0l.js} +10 -10
- package/dist/{index-DnYLRcv6.js → index-DtPd4laZ.js} +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/rowLayout-D1cYQghV.js +663 -0
- package/dist/{status-GT-QFBrB.js → status-7L8lC-_q.js} +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/CollectionPage.vue_vue_type_script_setup_true_lang-DzuvFLj2.js +0 -1546
- package/dist/rowLayout-BkQWulan.js +0 -621
|
@@ -1,621 +0,0 @@
|
|
|
1
|
-
import { defineComponent as W, computed as v, openBlock as o, createElementBlock as n, normalizeClass as g, createBlock as M, unref as i, withCtx as N, Fragment as p, renderList as S, toDisplayString as x, createTextVNode as G, createCommentVNode as y, renderSlot as C, createVNode as $, ref as ne, getCurrentScope as ke, onScopeDispose as ve, nextTick as ge, useSlots as le, useTemplateRef as we, normalizeStyle as L, createElementVNode as d, withModifiers as re, createSlots as _e } from "vue";
|
|
2
|
-
import { useI18n as xe } from "vue-i18n";
|
|
3
|
-
import { RouterLink as de, useRouter as Ce } from "vue-router";
|
|
4
|
-
import { _ as $e } from "./SwipeActions.vue_vue_type_script_setup_true_lang-BJIA2JfI.js";
|
|
5
|
-
import { _ as Y } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
6
|
-
import { _ as Se } from "./Menu.vue_vue_type_script_setup_true_lang-uPmxWvds.js";
|
|
7
|
-
import { _ as Le } from "./Tooltip.vue_vue_type_script_setup_true_lang-OOD_XNWx.js";
|
|
8
|
-
import { _ as ie } from "./EmptyState.vue_vue_type_script_setup_true_lang-50p-Mp8I.js";
|
|
9
|
-
import { u as Re } from "./format-B8mJm946.js";
|
|
10
|
-
import { _ as Pe } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
|
|
11
|
-
import { _ as Me } from "./Timestamp.vue_vue_type_script_setup_true_lang-FVRUr-9y.js";
|
|
12
|
-
import { a as Ee } from "./mediaQuery-CygcXmFW.js";
|
|
13
|
-
function Te(b, s) {
|
|
14
|
-
const e = (s ?? "").split(/\s+/).filter((u) => u !== "");
|
|
15
|
-
if (e.length === 0 || b === "") return [{ text: b, match: !1 }];
|
|
16
|
-
const f = new RegExp(`(${e.sort((u, a) => a.length - u.length).map((u) => u.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})`, "giu");
|
|
17
|
-
return b.split(f).flatMap((u, a) => u === "" ? [] : [{ text: u, match: a % 2 === 1 }]);
|
|
18
|
-
}
|
|
19
|
-
const Ae = ["data-row-click-ignore"], ae = "rounded-sm bg-status-warning-surface text-status-warning-content", ce = "col-start-1 row-start-1", De = "col-span-full row-start-2 max-w-full", ue = /* @__PURE__ */ W({
|
|
20
|
-
__name: "RecordIdentity",
|
|
21
|
-
props: {
|
|
22
|
-
title: {},
|
|
23
|
-
subtitle: { default: null },
|
|
24
|
-
to: { default: null },
|
|
25
|
-
subtitleSelectable: { type: Boolean, default: !1 },
|
|
26
|
-
highlight: { default: null },
|
|
27
|
-
spread: { type: Boolean, default: !1 }
|
|
28
|
-
},
|
|
29
|
-
setup(b) {
|
|
30
|
-
const s = b, e = v(() => Te(s.title, s.highlight));
|
|
31
|
-
return (f, u) => (o(), n("div", {
|
|
32
|
-
class: g(s.spread ? "contents" : "flex min-w-0 flex-col")
|
|
33
|
-
}, [
|
|
34
|
-
s.to ? (o(), M(i(de), {
|
|
35
|
-
key: 0,
|
|
36
|
-
to: s.to,
|
|
37
|
-
class: g(["block truncate rounded-sm text-row-title focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus", s.spread ? ce : void 0])
|
|
38
|
-
}, {
|
|
39
|
-
default: N(() => [
|
|
40
|
-
(o(!0), n(p, null, S(e.value, (a, w) => (o(), n(p, { key: w }, [
|
|
41
|
-
a.match ? (o(), n("mark", {
|
|
42
|
-
key: 0,
|
|
43
|
-
class: g(ae)
|
|
44
|
-
}, x(a.text), 1)) : (o(), n(p, { key: 1 }, [
|
|
45
|
-
G(x(a.text), 1)
|
|
46
|
-
], 64))
|
|
47
|
-
], 64))), 128))
|
|
48
|
-
]),
|
|
49
|
-
_: 1
|
|
50
|
-
}, 8, ["to", "class"])) : (o(), n("span", {
|
|
51
|
-
key: 1,
|
|
52
|
-
class: g(["truncate text-row-title", s.spread ? ce : void 0])
|
|
53
|
-
}, [
|
|
54
|
-
(o(!0), n(p, null, S(e.value, (a, w) => (o(), n(p, { key: w }, [
|
|
55
|
-
a.match ? (o(), n("mark", {
|
|
56
|
-
key: 0,
|
|
57
|
-
class: g(ae)
|
|
58
|
-
}, x(a.text), 1)) : (o(), n(p, { key: 1 }, [
|
|
59
|
-
G(x(a.text), 1)
|
|
60
|
-
], 64))
|
|
61
|
-
], 64))), 128))
|
|
62
|
-
], 2)),
|
|
63
|
-
s.subtitle ? (o(), n("span", {
|
|
64
|
-
key: 2,
|
|
65
|
-
"data-row-click-ignore": s.subtitleSelectable ? "" : void 0,
|
|
66
|
-
class: g(["truncate text-row-subtitle", [s.subtitleSelectable ? "w-fit cursor-text select-text" : void 0, s.spread ? De : void 0]])
|
|
67
|
-
}, x(s.subtitle), 11, Ae)) : y("", !0)
|
|
68
|
-
], 2));
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
function fe(b, s) {
|
|
72
|
-
let e = b;
|
|
73
|
-
for (const f of String(s).split(".")) {
|
|
74
|
-
if (typeof e != "object" || e === null) return;
|
|
75
|
-
e = e[f];
|
|
76
|
-
}
|
|
77
|
-
return e;
|
|
78
|
-
}
|
|
79
|
-
const Be = {
|
|
80
|
-
key: 0,
|
|
81
|
-
class: "flex items-center gap-3"
|
|
82
|
-
}, Ie = ["datetime"], He = {
|
|
83
|
-
key: 2,
|
|
84
|
-
class: "tabular-nums"
|
|
85
|
-
}, Ne = {
|
|
86
|
-
key: 3,
|
|
87
|
-
class: "tabular-nums"
|
|
88
|
-
}, z = /* @__PURE__ */ W({
|
|
89
|
-
__name: "CollectionCell",
|
|
90
|
-
props: {
|
|
91
|
-
column: {},
|
|
92
|
-
item: {},
|
|
93
|
-
compact: { type: Boolean },
|
|
94
|
-
to: {},
|
|
95
|
-
search: {},
|
|
96
|
-
spread: { type: Boolean }
|
|
97
|
-
},
|
|
98
|
-
setup(b) {
|
|
99
|
-
const s = b, e = Re(), f = v(() => fe(s.item, s.column.key)), u = v(() => f.value), a = v(() => f.value === null || f.value === void 0 ? "" : String(f.value)), w = v(() => typeof f.value == "number" ? f.value : typeof f.value == "string" && f.value.trim() !== "" ? Number(f.value) : null);
|
|
100
|
-
return (R, E) => s.column.kind === "identity" ? (o(), n(p, { key: 0 }, [
|
|
101
|
-
!s.compact && R.$slots.leading ? (o(), n("div", Be, [
|
|
102
|
-
C(R.$slots, "leading"),
|
|
103
|
-
$(ue, {
|
|
104
|
-
to: s.to,
|
|
105
|
-
title: s.column.title?.(s.item) ?? a.value,
|
|
106
|
-
subtitle: s.column.subtitle?.(s.item),
|
|
107
|
-
highlight: s.search,
|
|
108
|
-
"subtitle-selectable": ""
|
|
109
|
-
}, null, 8, ["to", "title", "subtitle", "highlight"])
|
|
110
|
-
])) : (o(), M(ue, {
|
|
111
|
-
key: 1,
|
|
112
|
-
spread: s.spread,
|
|
113
|
-
to: s.to,
|
|
114
|
-
title: s.column.title?.(s.item) ?? a.value,
|
|
115
|
-
subtitle: s.column.subtitle?.(s.item),
|
|
116
|
-
highlight: s.search,
|
|
117
|
-
"subtitle-selectable": ""
|
|
118
|
-
}, null, 8, ["spread", "to", "title", "subtitle", "highlight"]))
|
|
119
|
-
], 64)) : s.column.kind === "timestamp" ? (o(), n(p, { key: 1 }, [
|
|
120
|
-
s.compact && u.value ? (o(), n("time", {
|
|
121
|
-
key: 0,
|
|
122
|
-
class: "tabular-nums",
|
|
123
|
-
datetime: String(f.value)
|
|
124
|
-
}, x(s.column.precision === "date" ? i(e).date(u.value) : i(e).dateTime(u.value)), 9, Ie)) : s.compact ? y("", !0) : (o(), M(i(Me), {
|
|
125
|
-
key: 1,
|
|
126
|
-
value: u.value,
|
|
127
|
-
precision: s.column.precision ?? "dateTime"
|
|
128
|
-
}, null, 8, ["value", "precision"]))
|
|
129
|
-
], 64)) : s.column.kind === "number" ? (o(), n("span", He, x(i(e).number(w.value, s.column.format)), 1)) : s.column.kind === "money" ? (o(), n("span", Ne, x(i(e).money(w.value, typeof s.column.currency == "function" ? s.column.currency(s.item) : s.column.currency)), 1)) : s.column.kind === "badge" ? (o(), M(i(Pe), {
|
|
130
|
-
key: 4,
|
|
131
|
-
tone: s.column.tone(s.item),
|
|
132
|
-
dot: ""
|
|
133
|
-
}, {
|
|
134
|
-
default: N(() => [
|
|
135
|
-
G(x(s.column.text?.(s.item) ?? a.value), 1)
|
|
136
|
-
]),
|
|
137
|
-
_: 1
|
|
138
|
-
}, 8, ["tone"])) : (o(), n(p, { key: 5 }, [
|
|
139
|
-
G(x(a.value), 1)
|
|
140
|
-
], 64));
|
|
141
|
-
}
|
|
142
|
-
}), ze = 'a, button, input, select, textarea, label, [role="button"], [data-row-click-ignore]', Fe = 500, Ve = 8;
|
|
143
|
-
function je(b) {
|
|
144
|
-
const s = Ce(), e = ne([]), f = ne("");
|
|
145
|
-
let u = !1, a = null, w = { x: 0, y: 0 };
|
|
146
|
-
const R = (c) => b.actions()?.(c) ?? [];
|
|
147
|
-
function E(c) {
|
|
148
|
-
return R(c).filter((m) => m.href).map((m) => ({ key: m.key, label: m.label, icon: m.icon, href: m.href, tone: m.tone ?? "neutral", external: m.external }));
|
|
149
|
-
}
|
|
150
|
-
function I(c, m, P) {
|
|
151
|
-
const j = R(c);
|
|
152
|
-
return j.length === 0 ? !1 : (f.value = b.label()?.(c) ?? b.moreLabel(), e.value = j.map((_) => ({
|
|
153
|
-
id: _.key,
|
|
154
|
-
label: _.label,
|
|
155
|
-
icon: _.icon,
|
|
156
|
-
section: _.section,
|
|
157
|
-
tone: _.tone === "critical" ? "critical" : void 0,
|
|
158
|
-
onSelect: () => {
|
|
159
|
-
_.onSelect ? _.onSelect() : _.href && (_.external ? window.open(_.href, "_blank", "noopener") : window.location.assign(_.href));
|
|
160
|
-
}
|
|
161
|
-
})), ge(() => b.presentMenu(m, P)), !0);
|
|
162
|
-
}
|
|
163
|
-
function F(c, m) {
|
|
164
|
-
const P = c.currentTarget.getBoundingClientRect();
|
|
165
|
-
I(m, P.left, P.bottom);
|
|
166
|
-
}
|
|
167
|
-
function V(c, m) {
|
|
168
|
-
!b.actions() || c.target.closest("a") || I(m, c.clientX, c.clientY) && (c.preventDefault(), u = !0);
|
|
169
|
-
}
|
|
170
|
-
function T() {
|
|
171
|
-
a && clearTimeout(a), a = null;
|
|
172
|
-
}
|
|
173
|
-
function A(c, m) {
|
|
174
|
-
u = !1, !(c.pointerType !== "touch" || !b.actions()) && (w = { x: c.clientX, y: c.clientY }, T(), a = setTimeout(() => {
|
|
175
|
-
a = null, I(m, w.x, w.y) && (u = !0, navigator.vibrate?.(10));
|
|
176
|
-
}, Fe));
|
|
177
|
-
}
|
|
178
|
-
function H(c) {
|
|
179
|
-
a && Math.hypot(c.clientX - w.x, c.clientY - w.y) > Ve && T();
|
|
180
|
-
}
|
|
181
|
-
function D(c) {
|
|
182
|
-
u && (u = !1, c.preventDefault(), c.stopPropagation());
|
|
183
|
-
}
|
|
184
|
-
function X(c, m) {
|
|
185
|
-
const P = b.target(m);
|
|
186
|
-
if (!(!P || c.target.closest(ze)) && !window.getSelection()?.toString()) {
|
|
187
|
-
if (c.metaKey || c.ctrlKey) {
|
|
188
|
-
window.open(s.resolve(P).href, "_blank");
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
s.push(P);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
return ke() && ve(T), { menuItems: e, menuLabel: f, swipeActions: E, openMenuFrom: F, onContextMenu: V, onPointerDown: A, onPointerMove: H, cancelPress: T, onClickCapture: D, onClick: X, actionsOf: R };
|
|
195
|
-
}
|
|
196
|
-
const Oe = {
|
|
197
|
-
key: 0,
|
|
198
|
-
class: "overflow-hidden rounded-group bg-surface-cell shadow-group",
|
|
199
|
-
"data-test": "collection-mobile-rows"
|
|
200
|
-
}, Ke = { class: "flex flex-1 flex-col gap-2 pt-1" }, Ue = ["onClick", "onContextmenu", "onPointerdown"], Ye = { class: "flex items-start gap-3" }, Ge = {
|
|
201
|
-
key: 0,
|
|
202
|
-
class: "shrink-0 pt-0.5"
|
|
203
|
-
}, Xe = { class: "flex min-w-0 flex-1 flex-col gap-1" }, Je = {
|
|
204
|
-
key: 2,
|
|
205
|
-
class: "block truncate text-row-title"
|
|
206
|
-
}, Qe = {
|
|
207
|
-
key: 0,
|
|
208
|
-
class: "col-start-2 row-start-1 flex shrink-0 items-center gap-2 pt-0.5"
|
|
209
|
-
}, We = ["aria-label", "onClick"], qe = {
|
|
210
|
-
key: 0,
|
|
211
|
-
class: "flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1 text-row-meta"
|
|
212
|
-
}, Ze = {
|
|
213
|
-
key: 1,
|
|
214
|
-
class: "truncate"
|
|
215
|
-
}, et = {
|
|
216
|
-
key: 2,
|
|
217
|
-
class: "px-4 py-6",
|
|
218
|
-
"data-test": "collection-failed"
|
|
219
|
-
}, tt = {
|
|
220
|
-
key: 3,
|
|
221
|
-
class: "px-4 py-2 text-center",
|
|
222
|
-
"data-test": "collection-empty"
|
|
223
|
-
}, ot = {
|
|
224
|
-
key: 1,
|
|
225
|
-
class: "inline-block w-full align-middle"
|
|
226
|
-
}, st = { class: "border-b border-border-separator" }, nt = ["aria-sort"], lt = ["onClick"], rt = { key: 1 }, it = {
|
|
227
|
-
key: 0,
|
|
228
|
-
class: "px-4 pt-2.5 pb-2",
|
|
229
|
-
style: { width: "20px" }
|
|
230
|
-
}, at = { class: "sr-only" }, ct = {
|
|
231
|
-
key: 0,
|
|
232
|
-
class: "size-8 shrink-0 rounded-full bg-fill"
|
|
233
|
-
}, ut = { class: "flex flex-1 flex-col gap-1.5" }, dt = { key: 0 }, ft = ["onClick", "onContextmenu", "onPointerdown"], pt = { key: 0 }, mt = { class: "flex items-center justify-center gap-1" }, ht = ["aria-label", "onClick"], yt = {
|
|
234
|
-
key: 2,
|
|
235
|
-
"data-test": "collection-failed"
|
|
236
|
-
}, bt = ["colspan"], kt = {
|
|
237
|
-
key: 3,
|
|
238
|
-
"data-test": "collection-empty"
|
|
239
|
-
}, vt = ["colspan"], gt = 37, At = /* @__PURE__ */ W({
|
|
240
|
-
__name: "CollectionRows",
|
|
241
|
-
props: {
|
|
242
|
-
columns: {},
|
|
243
|
-
rows: {},
|
|
244
|
-
rowKey: {},
|
|
245
|
-
display: {},
|
|
246
|
-
phone: { type: Boolean },
|
|
247
|
-
link: {},
|
|
248
|
-
search: { default: void 0 },
|
|
249
|
-
sorted: { default: null },
|
|
250
|
-
rowActions: { type: Function, default: void 0 },
|
|
251
|
-
rowLabel: { type: Function, default: void 0 },
|
|
252
|
-
rowHeight: { default: void 0 },
|
|
253
|
-
density: { default: "regular" },
|
|
254
|
-
actionsVisible: { type: Boolean, default: !1 },
|
|
255
|
-
skeletonRows: {},
|
|
256
|
-
reserveRows: { default: void 0 },
|
|
257
|
-
rowClass: { type: Function, default: void 0 }
|
|
258
|
-
},
|
|
259
|
-
emits: ["sort"],
|
|
260
|
-
setup(b, { emit: s }) {
|
|
261
|
-
const e = b, f = s, u = le(), { t: a } = xe(), w = le(), R = (r) => e.columns.filter((k) => k.mobile === r), E = v(() => R("primary")), I = v(() => R("accessory")), F = v(() => R("meta")), V = v(() => E.value.length === 1 && E.value[0].kind === "identity" && !H(E.value[0])), T = (r) => I.value.length > 0 || O.value && J(r), A = (r) => `cell-${String(r.key).replace(/\./g, "_")}`, H = (r) => !!w[A(r)], D = (r, k) => fe(r, k.key), X = (r) => r == null || r === "", c = { md: "hidden md:table-cell", xl: "hidden xl:table-cell", "2xl": "hidden 2xl:table-cell" }, m = (r) => r.hideBelow ? [c[r.hideBelow]] : [], P = (r) => ["text-nowrap px-4 pt-2.5 pb-2 text-footnote font-normal text-content-muted", ...m(r)], j = { start: "text-left", center: "text-center", end: "text-right" }, _ = (r) => [...m(r), j[r.align ?? "start"]], pe = { start: "justify-start", center: "justify-center", end: "justify-end" }, q = v(() => e.rows.length > 0 && e.link(e.rows[0]) !== null), Z = we("rowMenu"), h = je({
|
|
262
|
-
actions: () => e.rowActions,
|
|
263
|
-
label: () => e.rowLabel,
|
|
264
|
-
target: (r) => e.link(r),
|
|
265
|
-
presentMenu: (r, k) => Z.value?.presentAt(r, k),
|
|
266
|
-
moreLabel: () => a("core.page.more_actions")
|
|
267
|
-
}), O = v(() => !!e.rowActions && (e.actionsVisible || !u.actions && !q.value)), K = v(() => !!u.actions || q.value || O.value), ee = (r) => e.rowLabel ? `${a("core.page.more_actions")}: ${e.rowLabel(r)}` : a("core.page.more_actions"), J = (r) => h.actionsOf(r).length > 0, te = v(() => e.columns.length + (K.value ? 1 : 0)), U = (r) => r.sort !== void 0 && e.sorted?.key === r.sort, me = (r) => r.sort === void 0 ? void 0 : U(r) ? e.sorted?.direction === "asc" ? "ascending" : "descending" : "none", he = (r) => U(r) ? e.sorted?.direction === "asc" ? "arrowUpSLine" : "arrowDownSLine" : "expandUpDownLine", oe = (r) => ({ animationDelay: `${Math.min(r, 8) * 30}ms` }), Q = v(() => e.display === "loading"), ye = v(() => Q.value && e.reserveRows !== void 0 ? `${e.reserveRows * (e.rowHeight ?? 40) + gt}px` : void 0), se = v(() => e.display === "empty" || e.display === "no-matches");
|
|
268
|
-
return (r, k) => (o(), n(p, null, [
|
|
269
|
-
e.phone ? (o(), n("ul", Oe, [
|
|
270
|
-
Q.value ? (o(!0), n(p, { key: 0 }, S(e.skeletonRows, (t) => (o(), n("li", {
|
|
271
|
-
key: `skeleton-${t}`,
|
|
272
|
-
"aria-hidden": "true",
|
|
273
|
-
class: "relative flex animate-pulse items-start gap-3 px-row-inset py-3 motion-reduce:animate-none not-first:before:absolute not-first:before:top-0 not-first:before:right-0 not-first:before:left-row-inset not-first:before:h-px not-first:before:bg-border-separator",
|
|
274
|
-
style: L({ animationDelay: `${t * 60}ms` })
|
|
275
|
-
}, [
|
|
276
|
-
k[5] || (k[5] = d("span", { class: "size-9 shrink-0 rounded-full bg-fill" }, null, -1)),
|
|
277
|
-
d("span", Ke, [
|
|
278
|
-
d("span", {
|
|
279
|
-
class: "h-2.5 rounded-full bg-fill-strong",
|
|
280
|
-
style: L({ width: `${45 + t * 13 % 30}%` })
|
|
281
|
-
}, null, 4),
|
|
282
|
-
d("span", {
|
|
283
|
-
class: "h-2 rounded-full bg-fill",
|
|
284
|
-
style: L({ width: `${60 + t * 7 % 25}%` })
|
|
285
|
-
}, null, 4)
|
|
286
|
-
])
|
|
287
|
-
], 4))), 128)) : y("", !0),
|
|
288
|
-
e.display === "rows" ? (o(!0), n(p, { key: 1 }, S(e.rows, (t, B) => (o(), n("li", {
|
|
289
|
-
key: e.rowKey(t),
|
|
290
|
-
style: L(oe(B)),
|
|
291
|
-
"data-test": "collection-row",
|
|
292
|
-
class: g(["relative animate-row-in transition-colors duration-motion-fast active:bg-fill not-first:before:absolute not-first:before:top-0 not-first:before:right-0 not-first:before:left-row-inset not-first:before:z-10 not-first:before:h-px not-first:before:bg-border-separator", [e.link(t) ? "cursor-pointer" : void 0, e.rowClass?.(t)]]),
|
|
293
|
-
onClickCapture: k[0] || (k[0] = //@ts-ignore
|
|
294
|
-
(...l) => i(h).onClickCapture && i(h).onClickCapture(...l)),
|
|
295
|
-
onClick: (l) => i(h).onClick(l, t),
|
|
296
|
-
onContextmenu: (l) => i(h).onContextMenu(l, t),
|
|
297
|
-
onPointerdown: (l) => i(h).onPointerDown(l, t),
|
|
298
|
-
onPointermove: k[1] || (k[1] = //@ts-ignore
|
|
299
|
-
(...l) => i(h).onPointerMove && i(h).onPointerMove(...l)),
|
|
300
|
-
onPointerup: k[2] || (k[2] = //@ts-ignore
|
|
301
|
-
(...l) => i(h).cancelPress && i(h).cancelPress(...l)),
|
|
302
|
-
onPointercancel: k[3] || (k[3] = //@ts-ignore
|
|
303
|
-
(...l) => i(h).cancelPress && i(h).cancelPress(...l))
|
|
304
|
-
}, [
|
|
305
|
-
$(i($e), {
|
|
306
|
-
actions: i(h).swipeActions(t),
|
|
307
|
-
"content-class": "px-row-inset py-2.5"
|
|
308
|
-
}, {
|
|
309
|
-
default: N(() => [
|
|
310
|
-
d("div", Ye, [
|
|
311
|
-
u.leading ? (o(), n("div", Ge, [
|
|
312
|
-
C(r.$slots, "leading", {
|
|
313
|
-
item: t,
|
|
314
|
-
compact: !0
|
|
315
|
-
})
|
|
316
|
-
])) : y("", !0),
|
|
317
|
-
d("div", Xe, [
|
|
318
|
-
d("div", {
|
|
319
|
-
class: g(["grid min-w-0 items-start gap-x-3", T(t) ? "grid-cols-[minmax(0,1fr)_auto]" : "grid-cols-[minmax(0,1fr)]"]),
|
|
320
|
-
"data-test": "collection-row-head"
|
|
321
|
-
}, [
|
|
322
|
-
d("div", {
|
|
323
|
-
class: g(V.value ? "contents" : "col-start-1 row-start-1 min-w-0")
|
|
324
|
-
}, [
|
|
325
|
-
(o(!0), n(p, null, S(E.value, (l) => (o(), n(p, {
|
|
326
|
-
key: String(l.key)
|
|
327
|
-
}, [
|
|
328
|
-
H(l) ? C(r.$slots, A(l), {
|
|
329
|
-
item: t,
|
|
330
|
-
value: D(t, l),
|
|
331
|
-
compact: !0,
|
|
332
|
-
to: e.link(t),
|
|
333
|
-
search: e.search
|
|
334
|
-
}, void 0, void 0, 0) : V.value ? (o(), M(z, {
|
|
335
|
-
key: 1,
|
|
336
|
-
column: l,
|
|
337
|
-
item: t,
|
|
338
|
-
compact: !0,
|
|
339
|
-
to: e.link(t),
|
|
340
|
-
search: e.search,
|
|
341
|
-
spread: ""
|
|
342
|
-
}, null, 8, ["column", "item", "to", "search"])) : (o(), n("span", Je, [
|
|
343
|
-
$(z, {
|
|
344
|
-
column: l,
|
|
345
|
-
item: t,
|
|
346
|
-
compact: !0,
|
|
347
|
-
to: e.link(t),
|
|
348
|
-
search: e.search
|
|
349
|
-
}, null, 8, ["column", "item", "to", "search"])
|
|
350
|
-
]))
|
|
351
|
-
], 64))), 128))
|
|
352
|
-
], 2),
|
|
353
|
-
T(t) ? (o(), n("div", Qe, [
|
|
354
|
-
(o(!0), n(p, null, S(I.value, (l) => (o(), n(p, {
|
|
355
|
-
key: String(l.key)
|
|
356
|
-
}, [
|
|
357
|
-
H(l) ? C(r.$slots, A(l), {
|
|
358
|
-
item: t,
|
|
359
|
-
value: D(t, l),
|
|
360
|
-
compact: !0,
|
|
361
|
-
to: e.link(t),
|
|
362
|
-
search: e.search
|
|
363
|
-
}, void 0, void 0, 0) : (o(), M(z, {
|
|
364
|
-
key: 1,
|
|
365
|
-
column: l,
|
|
366
|
-
item: t,
|
|
367
|
-
compact: !0,
|
|
368
|
-
to: e.link(t),
|
|
369
|
-
search: e.search
|
|
370
|
-
}, null, 8, ["column", "item", "to", "search"]))
|
|
371
|
-
], 64))), 128)),
|
|
372
|
-
O.value && J(t) ? (o(), n("button", {
|
|
373
|
-
key: 0,
|
|
374
|
-
type: "button",
|
|
375
|
-
"data-test": "collection-row-more",
|
|
376
|
-
"aria-label": ee(t),
|
|
377
|
-
class: "hit-target -my-1 -mr-1 flex size-8 cursor-pointer items-center justify-center rounded-full text-content-muted active:bg-fill",
|
|
378
|
-
onClick: re((l) => i(h).openMenuFrom(l, t), ["stop"])
|
|
379
|
-
}, [
|
|
380
|
-
$(i(Y), {
|
|
381
|
-
name: "moreLine",
|
|
382
|
-
size: 20
|
|
383
|
-
})
|
|
384
|
-
], 8, We)) : y("", !0)
|
|
385
|
-
])) : y("", !0)
|
|
386
|
-
], 2),
|
|
387
|
-
F.value.length ? (o(), n("div", qe, [
|
|
388
|
-
(o(!0), n(p, null, S(F.value, (l) => (o(), n(p, {
|
|
389
|
-
key: String(l.key)
|
|
390
|
-
}, [
|
|
391
|
-
H(l) ? C(r.$slots, A(l), {
|
|
392
|
-
item: t,
|
|
393
|
-
value: D(t, l),
|
|
394
|
-
compact: !0,
|
|
395
|
-
to: e.link(t),
|
|
396
|
-
search: e.search
|
|
397
|
-
}, void 0, void 0, 0) : X(D(t, l)) ? y("", !0) : (o(), n("span", Ze, [
|
|
398
|
-
$(z, {
|
|
399
|
-
column: l,
|
|
400
|
-
item: t,
|
|
401
|
-
compact: !0,
|
|
402
|
-
to: e.link(t),
|
|
403
|
-
search: e.search
|
|
404
|
-
}, null, 8, ["column", "item", "to", "search"])
|
|
405
|
-
]))
|
|
406
|
-
], 64))), 128))
|
|
407
|
-
])) : y("", !0)
|
|
408
|
-
])
|
|
409
|
-
])
|
|
410
|
-
]),
|
|
411
|
-
_: 2
|
|
412
|
-
}, 1032, ["actions"])
|
|
413
|
-
], 46, Ue))), 128)) : y("", !0),
|
|
414
|
-
e.display === "failed" ? (o(), n("li", et, [
|
|
415
|
-
C(r.$slots, "failed")
|
|
416
|
-
])) : y("", !0),
|
|
417
|
-
se.value ? (o(), n("li", tt, [
|
|
418
|
-
C(r.$slots, "empty", {}, () => [
|
|
419
|
-
$(i(ie), {
|
|
420
|
-
title: i(a)("core.collection.no_data")
|
|
421
|
-
}, null, 8, ["title"])
|
|
422
|
-
])
|
|
423
|
-
])) : y("", !0)
|
|
424
|
-
])) : (o(), n("div", ot, [
|
|
425
|
-
d("div", {
|
|
426
|
-
class: "overflow-x-auto",
|
|
427
|
-
style: L({ minHeight: ye.value })
|
|
428
|
-
}, [
|
|
429
|
-
d("table", {
|
|
430
|
-
class: g(["collection-grid w-full", { condensed: e.density === "condensed" }])
|
|
431
|
-
}, [
|
|
432
|
-
d("thead", st, [
|
|
433
|
-
d("tr", null, [
|
|
434
|
-
(o(!0), n(p, null, S(e.columns, (t) => (o(), n("th", {
|
|
435
|
-
key: String(t.key),
|
|
436
|
-
scope: "col",
|
|
437
|
-
class: g(P(t)),
|
|
438
|
-
style: L({ width: t.width ? `${t.width}px` : void 0, textAlign: t.align ?? "start" }),
|
|
439
|
-
"aria-sort": me(t)
|
|
440
|
-
}, [
|
|
441
|
-
d("div", {
|
|
442
|
-
class: g(["flex", pe[t.align ?? "start"]])
|
|
443
|
-
}, [
|
|
444
|
-
t.sort !== void 0 ? (o(), n("button", {
|
|
445
|
-
key: 0,
|
|
446
|
-
type: "button",
|
|
447
|
-
class: g(["group inline-flex cursor-pointer items-center gap-1 rounded-sm transition-colors hover:text-content-strong focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus", [U(t) ? "font-semibold text-content-strong" : "", t.align === "end" ? "flex-row-reverse" : ""]]),
|
|
448
|
-
onClick: (B) => f("sort", t.sort)
|
|
449
|
-
}, [
|
|
450
|
-
d("span", null, x(t.label), 1),
|
|
451
|
-
$(i(Y), {
|
|
452
|
-
name: he(t),
|
|
453
|
-
size: 14,
|
|
454
|
-
class: g(U(t) ? "text-content-muted" : "text-content-disabled opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100")
|
|
455
|
-
}, null, 8, ["name", "class"])
|
|
456
|
-
], 10, lt)) : (o(), n("span", rt, x(t.label), 1))
|
|
457
|
-
], 2)
|
|
458
|
-
], 14, nt))), 128)),
|
|
459
|
-
K.value ? (o(), n("th", it, [
|
|
460
|
-
d("span", at, x(i(a)("core.actions.more")), 1)
|
|
461
|
-
])) : y("", !0)
|
|
462
|
-
])
|
|
463
|
-
]),
|
|
464
|
-
d("tbody", null, [
|
|
465
|
-
Q.value ? (o(!0), n(p, { key: 0 }, S(e.skeletonRows, (t) => (o(), n("tr", {
|
|
466
|
-
key: `skeleton-${t}`,
|
|
467
|
-
"aria-hidden": "true",
|
|
468
|
-
style: L(e.rowHeight ? { height: `${e.rowHeight}px` } : void 0)
|
|
469
|
-
}, [
|
|
470
|
-
(o(!0), n(p, null, S(e.columns, (B, l) => (o(), n("td", {
|
|
471
|
-
key: String(B.key),
|
|
472
|
-
class: g(m(B))
|
|
473
|
-
}, [
|
|
474
|
-
d("div", {
|
|
475
|
-
class: "flex animate-pulse items-center gap-3 motion-reduce:animate-none",
|
|
476
|
-
style: L({ animationDelay: `${t * 60}ms` })
|
|
477
|
-
}, [
|
|
478
|
-
l === 0 ? (o(), n("span", ct)) : y("", !0),
|
|
479
|
-
d("span", ut, [
|
|
480
|
-
d("span", {
|
|
481
|
-
class: "h-2.5 rounded-full bg-fill-strong",
|
|
482
|
-
style: L({ width: `${55 + (t * 7 + l * 13) % 35}%` })
|
|
483
|
-
}, null, 4),
|
|
484
|
-
d("span", {
|
|
485
|
-
class: "h-2 rounded-full bg-fill",
|
|
486
|
-
style: L({ width: `${30 + (t * 11 + l * 5) % 30}%` })
|
|
487
|
-
}, null, 4)
|
|
488
|
-
])
|
|
489
|
-
], 4)
|
|
490
|
-
], 2))), 128)),
|
|
491
|
-
K.value ? (o(), n("td", dt, [...k[6] || (k[6] = [
|
|
492
|
-
d("div", { class: "mx-auto h-6 w-6 animate-pulse rounded-full bg-fill motion-reduce:animate-none" }, null, -1)
|
|
493
|
-
])])) : y("", !0)
|
|
494
|
-
], 4))), 128)) : y("", !0),
|
|
495
|
-
e.display === "rows" ? (o(!0), n(p, { key: 1 }, S(e.rows, (t, B) => (o(), n("tr", {
|
|
496
|
-
key: e.rowKey(t),
|
|
497
|
-
class: g(["animate-row-in", [e.link(t) ? "cursor-pointer" : void 0, e.rowClass?.(t)]]),
|
|
498
|
-
"data-test": "collection-row",
|
|
499
|
-
style: L([e.rowHeight ? { height: `${e.rowHeight}px` } : {}, oe(B)]),
|
|
500
|
-
onClickCapture: k[4] || (k[4] = //@ts-ignore
|
|
501
|
-
(...l) => i(h).onClickCapture && i(h).onClickCapture(...l)),
|
|
502
|
-
onClick: (l) => i(h).onClick(l, t),
|
|
503
|
-
onContextmenu: (l) => i(h).onContextMenu(l, t),
|
|
504
|
-
onPointerdown: (l) => i(h).onPointerDown(l, t)
|
|
505
|
-
}, [
|
|
506
|
-
(o(!0), n(p, null, S(e.columns, (l, be) => (o(), n("td", {
|
|
507
|
-
key: String(l.key),
|
|
508
|
-
class: g(_(l))
|
|
509
|
-
}, [
|
|
510
|
-
C(r.$slots, A(l), {
|
|
511
|
-
item: t,
|
|
512
|
-
value: D(t, l),
|
|
513
|
-
compact: !1,
|
|
514
|
-
to: e.link(t)
|
|
515
|
-
}, () => [
|
|
516
|
-
$(z, {
|
|
517
|
-
column: l,
|
|
518
|
-
item: t,
|
|
519
|
-
compact: !1,
|
|
520
|
-
to: e.link(t),
|
|
521
|
-
search: e.search
|
|
522
|
-
}, _e({ _: 2 }, [
|
|
523
|
-
u.leading && be === 0 ? {
|
|
524
|
-
name: "leading",
|
|
525
|
-
fn: N(() => [
|
|
526
|
-
C(r.$slots, "leading", {
|
|
527
|
-
item: t,
|
|
528
|
-
compact: !1
|
|
529
|
-
})
|
|
530
|
-
]),
|
|
531
|
-
key: "0"
|
|
532
|
-
} : void 0
|
|
533
|
-
]), 1032, ["column", "item", "to", "search"])
|
|
534
|
-
])
|
|
535
|
-
], 2))), 128)),
|
|
536
|
-
K.value ? (o(), n("td", pt, [
|
|
537
|
-
C(r.$slots, "actions", { item: t }, () => [
|
|
538
|
-
d("div", mt, [
|
|
539
|
-
e.link(t) ? (o(), M(i(Le), {
|
|
540
|
-
key: 0,
|
|
541
|
-
text: i(a)("core.collection.open_record"),
|
|
542
|
-
side: "left"
|
|
543
|
-
}, {
|
|
544
|
-
default: N(() => [
|
|
545
|
-
$(i(de), {
|
|
546
|
-
to: e.link(t),
|
|
547
|
-
"aria-label": `${i(a)("core.collection.open_record")}${e.rowLabel ? `: ${e.rowLabel(t)}` : ""}`,
|
|
548
|
-
class: "inline-flex rounded-md p-1.5 text-content-link transition-colors hover:bg-tint-soft focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus"
|
|
549
|
-
}, {
|
|
550
|
-
default: N(() => [
|
|
551
|
-
$(i(Y), {
|
|
552
|
-
name: "eye",
|
|
553
|
-
size: 18
|
|
554
|
-
})
|
|
555
|
-
]),
|
|
556
|
-
_: 1
|
|
557
|
-
}, 8, ["to", "aria-label"])
|
|
558
|
-
]),
|
|
559
|
-
_: 2
|
|
560
|
-
}, 1032, ["text"])) : y("", !0),
|
|
561
|
-
O.value && J(t) ? (o(), n("button", {
|
|
562
|
-
key: 1,
|
|
563
|
-
type: "button",
|
|
564
|
-
"data-test": "collection-row-more",
|
|
565
|
-
"aria-label": ee(t),
|
|
566
|
-
class: "hit-target flex size-8 cursor-pointer items-center justify-center rounded-full bg-fill text-content-strong transition-colors duration-motion-fast hover:bg-fill-strong focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus",
|
|
567
|
-
onClick: re((l) => i(h).openMenuFrom(l, t), ["stop"])
|
|
568
|
-
}, [
|
|
569
|
-
$(i(Y), {
|
|
570
|
-
name: "moreLine",
|
|
571
|
-
size: 18
|
|
572
|
-
})
|
|
573
|
-
], 8, ht)) : y("", !0)
|
|
574
|
-
])
|
|
575
|
-
])
|
|
576
|
-
])) : y("", !0)
|
|
577
|
-
], 46, ft))), 128)) : y("", !0),
|
|
578
|
-
e.display === "failed" ? (o(), n("tr", yt, [
|
|
579
|
-
d("td", {
|
|
580
|
-
colspan: te.value,
|
|
581
|
-
class: "!whitespace-normal py-6"
|
|
582
|
-
}, [
|
|
583
|
-
C(r.$slots, "failed")
|
|
584
|
-
], 8, bt)
|
|
585
|
-
])) : y("", !0),
|
|
586
|
-
se.value ? (o(), n("tr", kt, [
|
|
587
|
-
d("td", {
|
|
588
|
-
colspan: te.value,
|
|
589
|
-
class: "!whitespace-normal py-6 text-center"
|
|
590
|
-
}, [
|
|
591
|
-
C(r.$slots, "empty", {}, () => [
|
|
592
|
-
$(i(ie), {
|
|
593
|
-
title: i(a)("core.collection.no_data")
|
|
594
|
-
}, null, 8, ["title"])
|
|
595
|
-
])
|
|
596
|
-
], 8, vt)
|
|
597
|
-
])) : y("", !0)
|
|
598
|
-
])
|
|
599
|
-
], 2)
|
|
600
|
-
], 4)
|
|
601
|
-
])),
|
|
602
|
-
e.rowActions ? (o(), M(i(Se), {
|
|
603
|
-
key: 2,
|
|
604
|
-
ref_key: "rowMenu",
|
|
605
|
-
ref: Z,
|
|
606
|
-
items: i(h).menuItems.value,
|
|
607
|
-
label: i(h).menuLabel.value
|
|
608
|
-
}, null, 8, ["items", "label"])) : y("", !0)
|
|
609
|
-
], 64));
|
|
610
|
-
}
|
|
611
|
-
});
|
|
612
|
-
function Dt(b) {
|
|
613
|
-
const s = Ee("(max-width: 1023px)"), e = v(() => b().some((f) => f.mobile && f.mobile !== "hidden"));
|
|
614
|
-
return { narrow: v(() => s.value), phone: v(() => s.value && e.value) };
|
|
615
|
-
}
|
|
616
|
-
export {
|
|
617
|
-
At as _,
|
|
618
|
-
z as a,
|
|
619
|
-
ue as b,
|
|
620
|
-
Dt as u
|
|
621
|
-
};
|