@wssto2/vue-core 0.10.0 → 0.11.0

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