@wssto2/vue-core 0.9.4 → 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.
- package/CHANGELOG.md +39 -0
- package/dist/ActionRow.vue_vue_type_script_setup_true_lang-DybAIOHS.js +64 -0
- package/dist/Activity-CdkJW68R.js +169 -0
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-DdJOodn8.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-D5i77H6S.js} +147 -159
- package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-BdeOKqz_.js → AsyncSection.vue_vue_type_script_setup_true_lang-DGzQ-Snp.js} +1 -1
- package/dist/BottomDockPortal.vue_vue_type_script_setup_true_lang-DmwR-2SP.js +17 -0
- package/dist/Button.vue_vue_type_script_setup_true_lang-C74hcb0N.js +123 -0
- package/dist/Changes-DxK_QfiB.js +69 -0
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-DHcekGNn.js → CollectionPage.vue_vue_type_script_setup_true_lang-x0jyJ01f.js} +19 -18
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-8kBsNRuq.js → DataTable.vue_vue_type_script_setup_true_lang-C_ZytnW-.js} +1 -1
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-BhKdCVFn.js → DateField.vue_vue_type_script_setup_true_lang-CeNwBbJT.js} +1 -1
- package/dist/{DeadLetters-Bb5pPlOY.js → DeadLetters-DnA7LP1w.js} +5 -6
- package/dist/DrawnCheck.vue_vue_type_script_setup_true_lang-9DzDJlIA.js +38 -0
- package/dist/FormGroup.vue_vue_type_script_setup_true_lang-D6jYfNjW.js +427 -0
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-aaNnMIOi.js → FormView.vue_vue_type_script_setup_true_lang-DvbPEiNQ.js} +2 -2
- package/dist/{General-BAG7S6wV.js → General-2matxl2Y.js} +23 -24
- package/dist/Highlight.vue_vue_type_script_setup_true_lang-DZGBmwcX.js +29 -0
- package/dist/{IncidentRecord-D8aOpNHo.js → IncidentRecord-Bt3G4HlX.js} +14 -15
- package/dist/{IncidentsList-C0cFl0Db.js → IncidentsList-2iwgqp9J.js} +3 -3
- package/dist/{Modal.vue_vue_type_script_setup_true_lang-BlHhdmMy.js → Modal.vue_vue_type_script_setup_true_lang-DDS0iEnn.js} +9 -8
- package/dist/{NewRolePage-C6Iu-EQJ.js → NewRolePage-DhGFwvk3.js} +4 -4
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-TGGAq8J-.js → NumberField.vue_vue_type_script_setup_true_lang-B3UrXNqH.js} +1 -1
- package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-qz1tmYpF.js → PersonAccess.vue_vue_type_script_setup_true_lang-DbGZSNQc.js} +56 -56
- package/dist/ProfilePage-CpuyDBAv.js +685 -0
- package/dist/ProgressTrack.vue_vue_type_script_setup_true_lang-DrOm8k--.js +30 -0
- package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-B9mN7UxZ.js → RecordHeader.vue_vue_type_script_setup_true_lang-DqGc3Jyo.js} +1 -1
- package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-Cw8mGf_B.js → ResourcePage.vue_vue_type_script_setup_true_lang-DljhsTU4.js} +3 -3
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-CJPvOVDV.js → RoleEditor.vue_vue_type_script_setup_true_lang-C0FIotFA.js} +11 -12
- package/dist/{RolePage-Dj_ocMnM.js → RolePage-DaNv049g.js} +10 -10
- package/dist/{RolesPage-PXrs4O-1.js → RolesPage-6hlzJes_.js} +6 -6
- package/dist/SearchInput.vue_vue_type_script_setup_true_lang-w4eAqyZ9.js +32 -0
- package/dist/{SectionList.vue_vue_type_script_setup_true_lang-CtdF1zuv.js → SectionList.vue_vue_type_script_setup_true_lang-DR0_NsqC.js} +1 -1
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-B5ove3rM.js → SectionNavigator.vue_vue_type_script_setup_true_lang-Dh3sXUt_.js} +2 -2
- package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-ChfDFAA2.js → SegmentedField.vue_vue_type_script_setup_true_lang-zv_AxpBn.js} +1 -1
- package/dist/{SelectField.vue_vue_type_script_setup_true_lang-BP8nAQwo.js → SelectField.vue_vue_type_script_setup_true_lang-BZwdANL3.js} +3 -3
- package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-aWkKwxNe.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-FJbWxME_.js} +20 -20
- package/dist/{ServiceAccountRecord-bxX9yQkC.js → ServiceAccountRecord-0-JF5lRx.js} +24 -24
- package/dist/{ServiceAccountsList-BXE6htxk.js → ServiceAccountsList-DcsnOcf-.js} +32 -32
- package/dist/{Sessions--Gvc0kxw.js → Sessions-DgWhpk-i.js} +23 -24
- package/dist/{SettingsPage-DzDC7gD-.js → SettingsPage-BXPWATYU.js} +28 -30
- package/dist/{SignIn-CTI_699e.js → SignIn-DPoUwHZd.js} +9 -10
- package/dist/{SignInPage-HKC1bm2E.js → SignInPage-OyrVemro.js} +4 -4
- package/dist/SignIns-BMDrZVVp.js +64 -0
- package/dist/StatusLine.vue_vue_type_script_setup_true_lang-DsdQmLq6.js +56 -0
- package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-BMA2YXTZ.js → SwitchField.vue_vue_type_script_setup_true_lang-Ds4q0bbl.js} +1 -1
- package/dist/{TextField.vue_vue_type_script_setup_true_lang-BFVsqcBX.js → TextField.vue_vue_type_script_setup_true_lang-CWIeeZRE.js} +2 -2
- package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-Dyh4Hhyl.js → TextareaField.vue_vue_type_script_setup_true_lang-D2j4s96s.js} +1 -1
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-gGFfQLuK.js → TimeField.vue_vue_type_script_setup_true_lang-D-Em4glH.js} +1 -1
- package/dist/UserRecord-BW-gdCqi.js +202 -0
- package/dist/UsersList-B3ZF_1Dj.js +74 -0
- package/dist/access/index.js +4 -4
- package/dist/app/index.d.ts +1 -0
- package/dist/app/index.js +11 -10
- package/dist/app/languages.d.ts +8 -0
- package/dist/{application-BmXW6iW_.js → application-CuzT-0vW.js} +1 -1
- package/dist/button/index.js +6 -5
- package/dist/collection/Highlight.vue.d.ts +12 -0
- package/dist/collection/PickerModal.vue.d.ts +26 -0
- package/dist/collection/definition.d.ts +6 -6
- package/dist/collection/http.d.ts +6 -6
- package/dist/collection/index.d.ts +6 -1
- package/dist/collection/index.js +145 -85
- package/dist/collection/picker.d.ts +39 -0
- package/dist/collection/types.d.ts +9 -4
- package/dist/collection/useCollection.d.ts +5 -5
- package/dist/content/ActivityStream.vue.d.ts +62 -0
- package/dist/content/CommentThread.vue.d.ts +52 -0
- package/dist/content/Composer.vue.d.ts +36 -0
- package/dist/content/index.d.ts +3 -0
- package/dist/content/index.js +321 -56
- package/dist/controls/index.js +28 -54
- package/dist/form/index.js +132 -134
- package/dist/format/index.d.ts +1 -0
- package/dist/format/index.js +10 -6
- package/dist/format/slug.d.ts +8 -0
- package/dist/http-Dm0uXY9O.js +95 -0
- package/dist/i18n/index.d.ts +15 -0
- package/dist/i18n/index.js +89 -63
- package/dist/i18n/plural.d.ts +23 -0
- package/dist/i18n/serverMessages.d.ts +16 -0
- package/dist/identity/embed.d.ts +39 -0
- package/dist/identity/index.d.ts +22 -1
- package/dist/identity/index.js +40 -21
- package/dist/identity/session.d.ts +9 -1
- package/dist/identity/shared/ChangeFeed.vue.d.ts +6 -3
- package/dist/identity/users/context.d.ts +11 -0
- package/dist/identity/users/dialogs.d.ts +10 -0
- package/dist/identity/users/ext.d.ts +8 -0
- package/dist/identity/users/feature.d.ts +22 -1
- package/dist/identity/users/list.d.ts +12 -1
- package/dist/identity/users/personSections.d.ts +15 -6
- package/dist/identity/users/replace.d.ts +45 -0
- package/dist/identity/users/words.d.ts +28 -0
- package/dist/incidents/api.d.ts +1 -1
- package/dist/incidents/index.js +1 -1
- package/dist/{index-Dz0LkLM8.js → index-ClJeyW3F.js} +4 -4
- package/dist/index-Cq9TuOqH.js +1264 -0
- package/dist/{index-Dm-sdJJr.js → index-kEHY7hcG.js} +31 -32
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/keepAlive-ClGnsIzT.js +55 -0
- package/dist/modal/index.js +3 -3
- package/dist/modules/identity/entities.d.ts +7 -0
- package/dist/modules/identity/routes.d.ts +8 -4
- package/dist/modules/identity/schemas.d.ts +16 -0
- package/dist/{neighbors-DVfU9T0o.js → neighbors-OyvGi233.js} +2 -2
- package/dist/notifications/deadletters/list.d.ts +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/{options-QuOkMKVZ.js → options-B48UiYsG.js} +2 -2
- package/dist/page/index.js +11 -11
- package/dist/phone/index.js +1 -1
- package/dist/pwa/AndroidInstallBanner.vue.d.ts +18 -0
- package/dist/pwa/InstallQrSheet.vue.d.ts +21 -0
- package/dist/pwa/IosInstallGuide.vue.d.ts +19 -0
- package/dist/pwa/QrCode.vue.d.ts +16 -0
- package/dist/pwa/index.d.ts +4 -0
- package/dist/pwa/index.js +244 -24
- package/dist/resource/index.js +1 -1
- package/dist/rowLayout-BsKEzEME.js +650 -0
- package/dist/shell/DarkModeRow.vue.d.ts +15 -0
- package/dist/shell/OfflineNotice.vue.d.ts +2 -0
- package/dist/shell/QuickSearchButton.vue.d.ts +2 -0
- package/dist/shell/QuickSearchPalette.vue.d.ts +12 -0
- package/dist/shell/darkMode.d.ts +26 -0
- package/dist/shell/index.d.ts +10 -0
- package/dist/shell/index.js +954 -579
- package/dist/shell/offlineNotice.d.ts +3 -0
- package/dist/shell/quickSearch.d.ts +14 -0
- package/dist/shell/quickSearchControl.d.ts +69 -0
- package/dist/shortcut-DUR6yPWA.js +93 -0
- package/dist/state/BackgroundTaskCapsule.vue.d.ts +18 -0
- package/dist/state/backgroundTasks.d.ts +58 -0
- package/dist/state/index.d.ts +4 -0
- package/dist/state/index.js +194 -80
- package/dist/state/useCountUp.d.ts +9 -0
- package/dist/styles.css +1 -1
- package/dist/{suggestions-BVQhoXzS.js → suggestions-q_v3M7G6.js} +1 -1
- package/dist/testing/collection.d.ts +1 -1
- package/dist/{useCommand-Dc8Lgs9h.js → useCommand-Ch_nx1AQ.js} +4 -4
- package/dist/{useGroupSheet-DQ6cVG-z.js → useGroupSheet-CPjHydQV.js} +14 -15
- package/dist/{useRecordDialog-BTsbHY38.js → useRecordDialog-DdkauXnU.js} +1 -1
- package/dist/{useResourceForm-DJ4Q75pq.js → useResourceForm-Dl6YFYyz.js} +1 -1
- package/package.json +3 -2
- package/dist/ActionRow.vue_vue_type_script_setup_true_lang-Cg1lhpcA.js +0 -45
- package/dist/Activity-29hsZ28j.js +0 -156
- package/dist/Button.vue_vue_type_script_setup_true_lang-Dp7OB-eF.js +0 -192
- package/dist/Changes-Dxjdkd_5.js +0 -129
- package/dist/FormErrors.vue_vue_type_script_setup_true_lang-CIggKPtq.js +0 -295
- package/dist/FormGroup.vue_vue_type_script_setup_true_lang-B37dixvJ.js +0 -137
- package/dist/PageBar.vue_vue_type_script_setup_true_lang-qI94fjJv.js +0 -47
- package/dist/ProfilePage-BnohZIEg.js +0 -764
- package/dist/ProgressTrack.vue_vue_type_script_setup_true_lang-B6Prw9hi.js +0 -64
- package/dist/SectionIntro.vue_vue_type_script_setup_true_lang-CZtPrmXD.js +0 -23
- package/dist/SessionList.vue_vue_type_script_setup_true_lang-Cnyt5V8T.js +0 -133
- package/dist/SignIns-BcqBgWgN.js +0 -121
- package/dist/UserRecord-CtUPpbCt.js +0 -267
- package/dist/UsersList-BMkIgIg8.js +0 -155
- package/dist/definition-C7QuyV3i.js +0 -54
- package/dist/http-nz92KjdS.js +0 -42
- package/dist/identity/fieldMessages.d.ts +0 -15
- package/dist/identity/users/languages.d.ts +0 -4
- package/dist/index-CdtofdcJ.js +0 -501
- package/dist/keepAlive-z3IRFkQq.js +0 -46
- package/dist/languages-BShG9LpE.js +0 -10
- package/dist/rowLayout-CT8vWYgI.js +0 -663
- package/dist/signInEvents-DWShrJox.js +0 -30
- package/dist/status-BRA14qwX.js +0 -34
- package/dist/useWaitStatus-fsacMl4W.js +0 -24
- /package/dist/{fieldMessages-B6GHgi40.js → serverMessages-B6GHgi40.js} +0 -0
|
@@ -1,663 +0,0 @@
|
|
|
1
|
-
import { defineComponent as se, computed as g, openBlock as s, createElementBlock as l, normalizeClass as w, createBlock as D, unref as i, withCtx as F, Fragment as p, renderList as P, toDisplayString as C, createTextVNode as Q, createCommentVNode as b, 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 he } 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 { a as je } from "./mediaQuery-CygcXmFW.js";
|
|
13
|
-
function Ue(y, n) {
|
|
14
|
-
const d = (n ?? "").split(/\s+/).filter((v) => v !== "");
|
|
15
|
-
if (d.length === 0 || y === "") return [{ text: y, match: !1 }];
|
|
16
|
-
const e = new RegExp(`(${d.sort((v, c) => c.length - v.length).map((v) => v.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})`, "giu");
|
|
17
|
-
return y.split(e).flatMap((v, c) => v === "" ? [] : [{ text: v, match: c % 2 === 1 }]);
|
|
18
|
-
}
|
|
19
|
-
const Ye = ["data-row-click-ignore"], me = "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({
|
|
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(y) {
|
|
30
|
-
const n = y, d = g(() => Ue(n.title, n.highlight));
|
|
31
|
-
return (e, v) => (s(), l("div", {
|
|
32
|
-
class: w(n.spread ? "contents" : "flex min-w-0 flex-col")
|
|
33
|
-
}, [
|
|
34
|
-
n.to ? (s(), D(i(we), {
|
|
35
|
-
key: 0,
|
|
36
|
-
to: n.to,
|
|
37
|
-
class: w(["block truncate rounded-sm text-row-title focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus", n.spread ? be : void 0])
|
|
38
|
-
}, {
|
|
39
|
-
default: F(() => [
|
|
40
|
-
(s(!0), l(p, null, P(d.value, (c, h) => (s(), l(p, { key: h }, [
|
|
41
|
-
c.match ? (s(), l("mark", {
|
|
42
|
-
key: 0,
|
|
43
|
-
class: w(me)
|
|
44
|
-
}, C(c.text), 1)) : (s(), l(p, { key: 1 }, [
|
|
45
|
-
Q(C(c.text), 1)
|
|
46
|
-
], 64))
|
|
47
|
-
], 64))), 128))
|
|
48
|
-
]),
|
|
49
|
-
_: 1
|
|
50
|
-
}, 8, ["to", "class"])) : (s(), l("span", {
|
|
51
|
-
key: 1,
|
|
52
|
-
class: w(["truncate text-row-title", n.spread ? be : void 0])
|
|
53
|
-
}, [
|
|
54
|
-
(s(!0), l(p, null, P(d.value, (c, h) => (s(), l(p, { key: h }, [
|
|
55
|
-
c.match ? (s(), l("mark", {
|
|
56
|
-
key: 0,
|
|
57
|
-
class: w(me)
|
|
58
|
-
}, C(c.text), 1)) : (s(), l(p, { key: 1 }, [
|
|
59
|
-
Q(C(c.text), 1)
|
|
60
|
-
], 64))
|
|
61
|
-
], 64))), 128))
|
|
62
|
-
], 2)),
|
|
63
|
-
n.subtitle ? (s(), l("span", {
|
|
64
|
-
key: 2,
|
|
65
|
-
"data-row-click-ignore": n.subtitleSelectable ? "" : void 0,
|
|
66
|
-
class: w(["truncate text-row-subtitle", [n.subtitleSelectable ? "w-fit cursor-text select-text" : void 0, n.spread ? Ge : void 0]])
|
|
67
|
-
}, C(n.subtitle), 11, Ye)) : b("", !0)
|
|
68
|
-
], 2));
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
function _e(y, n) {
|
|
72
|
-
let d = y;
|
|
73
|
-
for (const e of String(n).split(".")) {
|
|
74
|
-
if (typeof d != "object" || d === null) return;
|
|
75
|
-
d = d[e];
|
|
76
|
-
}
|
|
77
|
-
return d;
|
|
78
|
-
}
|
|
79
|
-
const We = {
|
|
80
|
-
key: 0,
|
|
81
|
-
class: "flex items-center gap-3"
|
|
82
|
-
}, Xe = ["datetime"], qe = {
|
|
83
|
-
key: 2,
|
|
84
|
-
class: "tabular-nums"
|
|
85
|
-
}, Je = {
|
|
86
|
-
key: 3,
|
|
87
|
-
class: "tabular-nums"
|
|
88
|
-
}, V = /* @__PURE__ */ se({
|
|
89
|
-
__name: "CollectionCell",
|
|
90
|
-
props: {
|
|
91
|
-
column: {},
|
|
92
|
-
item: {},
|
|
93
|
-
compact: { type: Boolean },
|
|
94
|
-
to: {},
|
|
95
|
-
search: {},
|
|
96
|
-
spread: { type: Boolean }
|
|
97
|
-
},
|
|
98
|
-
setup(y) {
|
|
99
|
-
const n = y, d = Fe(), e = g(() => _e(n.item, n.column.key)), v = g(() => e.value), c = g(() => e.value === null || e.value === void 0 ? "" : String(e.value)), h = g(() => typeof e.value == "number" ? e.value : typeof e.value == "string" && e.value.trim() !== "" ? Number(e.value) : null);
|
|
100
|
-
return (E, N) => n.column.kind === "identity" ? (s(), l(p, { key: 0 }, [
|
|
101
|
-
!n.compact && E.$slots.leading ? (s(), l("div", We, [
|
|
102
|
-
S(E.$slots, "leading"),
|
|
103
|
-
L(ke, {
|
|
104
|
-
to: n.to,
|
|
105
|
-
title: n.column.title?.(n.item) ?? c.value,
|
|
106
|
-
subtitle: n.column.subtitle?.(n.item),
|
|
107
|
-
highlight: n.search,
|
|
108
|
-
"subtitle-selectable": ""
|
|
109
|
-
}, null, 8, ["to", "title", "subtitle", "highlight"])
|
|
110
|
-
])) : (s(), D(ke, {
|
|
111
|
-
key: 1,
|
|
112
|
-
spread: n.spread,
|
|
113
|
-
to: n.to,
|
|
114
|
-
title: n.column.title?.(n.item) ?? c.value,
|
|
115
|
-
subtitle: n.column.subtitle?.(n.item),
|
|
116
|
-
highlight: n.search,
|
|
117
|
-
"subtitle-selectable": ""
|
|
118
|
-
}, null, 8, ["spread", "to", "title", "subtitle", "highlight"]))
|
|
119
|
-
], 64)) : n.column.kind === "timestamp" ? (s(), l(p, { key: 1 }, [
|
|
120
|
-
n.compact && v.value ? (s(), l("time", {
|
|
121
|
-
key: 0,
|
|
122
|
-
class: "tabular-nums",
|
|
123
|
-
datetime: String(e.value)
|
|
124
|
-
}, C(n.column.precision === "date" ? i(d).date(v.value) : i(d).dateTime(v.value)), 9, Xe)) : n.compact ? b("", !0) : (s(), D(i(Oe), {
|
|
125
|
-
key: 1,
|
|
126
|
-
value: v.value,
|
|
127
|
-
precision: n.column.precision ?? "dateTime"
|
|
128
|
-
}, null, 8, ["value", "precision"]))
|
|
129
|
-
], 64)) : n.column.kind === "number" ? (s(), l("span", qe, C(i(d).number(h.value, n.column.format)), 1)) : n.column.kind === "money" ? (s(), l("span", Je, C(i(d).money(h.value, { currency: typeof n.column.currency == "function" ? n.column.currency(n.item) : n.column.currency })), 1)) : n.column.kind === "badge" ? (s(), D(i(Ve), {
|
|
130
|
-
key: 4,
|
|
131
|
-
tone: n.column.tone(n.item),
|
|
132
|
-
dot: ""
|
|
133
|
-
}, {
|
|
134
|
-
default: F(() => [
|
|
135
|
-
Q(C(n.column.text?.(n.item) ?? c.value), 1)
|
|
136
|
-
]),
|
|
137
|
-
_: 1
|
|
138
|
-
}, 8, ["tone"])) : (s(), l(p, { key: 5 }, [
|
|
139
|
-
Q(C(c.value), 1)
|
|
140
|
-
], 64));
|
|
141
|
-
}
|
|
142
|
-
}), Qe = 'a, button, input, select, textarea, label, [role="button"], [data-row-click-ignore]', Ze = 500, et = 8;
|
|
143
|
-
function tt(y) {
|
|
144
|
-
const n = He(), d = oe([]), e = oe("");
|
|
145
|
-
let v = !1, c = null, h = { x: 0, y: 0 };
|
|
146
|
-
const E = (a) => y.actions()?.(a) ?? [];
|
|
147
|
-
function N(a) {
|
|
148
|
-
return E(a).filter((k) => k.href).map((k) => ({ key: k.key, label: k.label, icon: k.icon, href: k.href, tone: k.tone ?? "neutral", external: k.external }));
|
|
149
|
-
}
|
|
150
|
-
function I(a, k, _) {
|
|
151
|
-
const A = E(a);
|
|
152
|
-
return A.length === 0 ? !1 : (e.value = y.label()?.(a) ?? y.moreLabel(), d.value = A.map((x) => ({
|
|
153
|
-
id: x.key,
|
|
154
|
-
label: x.label,
|
|
155
|
-
icon: x.icon,
|
|
156
|
-
section: x.section,
|
|
157
|
-
tone: x.tone === "critical" ? "critical" : void 0,
|
|
158
|
-
onSelect: () => {
|
|
159
|
-
x.onSelect ? x.onSelect() : x.href && (x.external ? window.open(x.href, "_blank", "noopener") : window.location.assign(x.href));
|
|
160
|
-
}
|
|
161
|
-
})), ge(() => y.presentMenu(k, _)), !0);
|
|
162
|
-
}
|
|
163
|
-
function O(a, k) {
|
|
164
|
-
const _ = a.currentTarget.getBoundingClientRect();
|
|
165
|
-
I(k, _.left, _.bottom);
|
|
166
|
-
}
|
|
167
|
-
function j(a, k) {
|
|
168
|
-
!y.actions() || a.target.closest("a") || I(k, a.clientX, a.clientY) && (a.preventDefault(), v = !0);
|
|
169
|
-
}
|
|
170
|
-
function B() {
|
|
171
|
-
c && clearTimeout(c), c = null;
|
|
172
|
-
}
|
|
173
|
-
function U(a, k) {
|
|
174
|
-
v = !1, !(a.pointerType !== "touch" || !y.actions()) && (h = { x: a.clientX, y: a.clientY }, B(), c = setTimeout(() => {
|
|
175
|
-
c = null, I(k, h.x, h.y) && (v = !0, navigator.vibrate?.(10));
|
|
176
|
-
}, Ze));
|
|
177
|
-
}
|
|
178
|
-
function H(a) {
|
|
179
|
-
c && Math.hypot(a.clientX - h.x, a.clientY - h.y) > et && B();
|
|
180
|
-
}
|
|
181
|
-
function z(a) {
|
|
182
|
-
v && (v = !1, a.preventDefault(), a.stopPropagation());
|
|
183
|
-
}
|
|
184
|
-
function K(a, k) {
|
|
185
|
-
const _ = y.pick?.(), A = _ ? null : y.target(k);
|
|
186
|
-
if (!(!_ && !A || a.target.closest(Qe)) && !window.getSelection()?.toString()) {
|
|
187
|
-
if (_) {
|
|
188
|
-
_(k);
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
if (a.metaKey || a.ctrlKey) {
|
|
192
|
-
window.open(n.resolve(A).href, "_blank");
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
n.push(A);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
return Ie() && Ae(B), { menuItems: d, menuLabel: e, swipeActions: N, openMenuFrom: O, onContextMenu: j, onPointerDown: U, onPointerMove: H, cancelPress: B, onClickCapture: z, onClick: K, actionsOf: E };
|
|
199
|
-
}
|
|
200
|
-
const ot = { class: "flex flex-1 flex-col gap-2 pt-1" }, st = ["onClick", "onContextmenu", "onPointerdown"], nt = { class: "flex items-start gap-3" }, lt = {
|
|
201
|
-
key: 0,
|
|
202
|
-
class: "shrink-0 pt-0.5"
|
|
203
|
-
}, rt = { class: "flex min-w-0 flex-1 flex-col gap-1" }, it = {
|
|
204
|
-
key: 2,
|
|
205
|
-
class: "block truncate text-row-title"
|
|
206
|
-
}, at = {
|
|
207
|
-
key: 0,
|
|
208
|
-
class: "col-start-2 row-start-1 flex shrink-0 items-center gap-2 pt-0.5"
|
|
209
|
-
}, ct = ["aria-label", "onClick"], ut = {
|
|
210
|
-
key: 0,
|
|
211
|
-
class: "flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1 text-row-meta"
|
|
212
|
-
}, dt = {
|
|
213
|
-
key: 1,
|
|
214
|
-
class: "truncate"
|
|
215
|
-
}, ft = {
|
|
216
|
-
key: 2,
|
|
217
|
-
class: "px-4 py-6",
|
|
218
|
-
"data-test": "collection-failed"
|
|
219
|
-
}, pt = {
|
|
220
|
-
key: 3,
|
|
221
|
-
class: "px-4 py-2 text-center",
|
|
222
|
-
"data-test": "collection-empty"
|
|
223
|
-
}, yt = {
|
|
224
|
-
key: 1,
|
|
225
|
-
class: "inline-block w-full align-middle"
|
|
226
|
-
}, vt = ["role"], ht = { class: "border-b border-border-separator" }, mt = ["aria-sort"], bt = ["onClick"], kt = { key: 1 }, gt = {
|
|
227
|
-
key: 0,
|
|
228
|
-
class: "px-4 pt-2.5 pb-2",
|
|
229
|
-
style: { width: "20px" }
|
|
230
|
-
}, wt = { class: "sr-only" }, _t = {
|
|
231
|
-
key: 0,
|
|
232
|
-
class: "size-8 shrink-0 rounded-full bg-fill"
|
|
233
|
-
}, 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 = {
|
|
234
|
-
key: 2,
|
|
235
|
-
"data-test": "collection-failed"
|
|
236
|
-
}, Mt = ["colspan"], Et = {
|
|
237
|
-
key: 3,
|
|
238
|
-
"data-test": "collection-empty"
|
|
239
|
-
}, 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, Wt = /* @__PURE__ */ se({
|
|
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
|
-
pick: { type: Function, default: void 0 },
|
|
259
|
-
pickLabel: { default: void 0 }
|
|
260
|
-
},
|
|
261
|
-
emits: ["sort"],
|
|
262
|
-
setup(y, { expose: n, emit: d }) {
|
|
263
|
-
const e = y, v = d, c = fe(), { t: h } = Be(), E = fe(), N = (o) => e.columns.filter((f) => f.mobile === o), I = g(() => N("primary")), O = g(() => N("accessory")), j = g(() => N("meta")), B = g(() => 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, f) => _e(o, f.key), a = (o) => o == null || o === "", k = { md: "hidden md:table-cell", xl: "hidden xl:table-cell", "2xl": "hidden 2xl:table-cell" }, _ = (o) => o.hideBelow ? [k[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 = g(() => e.rows.length > 0 && e.link(e.rows[0]) !== null), T = g(() => e.pick !== void 0 && e.display === "rows" && e.rows.length > 0), $e = Te(), Z = (o) => `${$e}-option-${o}`, R = oe(-1), Y = pe("list");
|
|
264
|
-
ye(() => e.rows, () => R.value = -1), ye(R, (o) => void ge(() => Y.value?.querySelector(`[id="${Z(o)}"]`)?.scrollIntoView?.({ block: "nearest" })));
|
|
265
|
-
function Se(o) {
|
|
266
|
-
if (o.target !== o.currentTarget || o.altKey || o.ctrlKey || o.metaKey || o.shiftKey) return;
|
|
267
|
-
const f = e.rows.length - 1, t = R.value, $ = { ArrowDown: Math.min(t + 1, f), ArrowUp: Math.max(t - 1, 0), Home: 0, End: f };
|
|
268
|
-
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]));
|
|
269
|
-
}
|
|
270
|
-
const le = g(
|
|
271
|
-
() => T.value ? {
|
|
272
|
-
role: "listbox",
|
|
273
|
-
tabindex: 0,
|
|
274
|
-
"aria-label": e.pickLabel ?? h("core.collection.pick_label"),
|
|
275
|
-
"aria-activedescendant": R.value >= 0 ? Z(R.value) : void 0,
|
|
276
|
-
onKeydown: Se,
|
|
277
|
-
onFocus: () => {
|
|
278
|
-
R.value < 0 && (R.value = 0);
|
|
279
|
-
}
|
|
280
|
-
} : {}
|
|
281
|
-
), re = (o) => T.value ? { role: "option", id: Z(o), "data-current": o === R.value ? "" : void 0 } : {};
|
|
282
|
-
function Le() {
|
|
283
|
-
return T.value ? (Y.value?.focus(), !0) : !1;
|
|
284
|
-
}
|
|
285
|
-
n({ focusRows: Le });
|
|
286
|
-
const ie = pe("rowMenu"), m = tt({
|
|
287
|
-
actions: () => e.rowActions,
|
|
288
|
-
label: () => e.rowLabel,
|
|
289
|
-
target: (o) => e.link(o),
|
|
290
|
-
pick: () => e.pick,
|
|
291
|
-
presentMenu: (o, f) => ie.value?.presentAt(o, f),
|
|
292
|
-
moreLabel: () => h("core.page.more_actions")
|
|
293
|
-
}), G = g(() => !!e.rowActions && (e.actionsVisible || !c.actions && !ne.value)), W = g(() => !!c.actions || ne.value || G.value), ae = (o) => e.rowLabel ? `${h("core.page.more_actions")}: ${e.rowLabel(o)}` : h("core.page.more_actions"), ee = (o) => m.actionsOf(o).length > 0, ce = g(() => 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 = g(() => e.display === "loading"), Me = g(() => te.value && e.reserveRows !== void 0 ? `${e.reserveRows * (e.rowHeight ?? 40) + Dt}px` : void 0), de = g(() => e.display === "empty" || e.display === "no-matches");
|
|
294
|
-
return (o, f) => (s(), l(p, null, [
|
|
295
|
-
e.phone ? (s(), l("ul", q({
|
|
296
|
-
key: 0,
|
|
297
|
-
ref_key: "list",
|
|
298
|
-
ref: Y
|
|
299
|
-
}, le.value, {
|
|
300
|
-
class: ["overflow-hidden rounded-group bg-surface-cell shadow-group", T.value ? "group/pick outline-0" : void 0],
|
|
301
|
-
"data-test": "collection-mobile-rows"
|
|
302
|
-
}), [
|
|
303
|
-
te.value ? (s(!0), l(p, { key: 0 }, P(e.skeletonRows, (t) => (s(), l("li", {
|
|
304
|
-
key: `skeleton-${t}`,
|
|
305
|
-
"aria-hidden": "true",
|
|
306
|
-
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",
|
|
307
|
-
style: M({ animationDelay: `${t * 60}ms` })
|
|
308
|
-
}, [
|
|
309
|
-
f[5] || (f[5] = u("span", { class: "size-9 shrink-0 rounded-full bg-fill" }, null, -1)),
|
|
310
|
-
u("span", ot, [
|
|
311
|
-
u("span", {
|
|
312
|
-
class: "h-2.5 rounded-full bg-fill-strong",
|
|
313
|
-
style: M({ width: `${45 + t * 13 % 30}%` })
|
|
314
|
-
}, null, 4),
|
|
315
|
-
u("span", {
|
|
316
|
-
class: "h-2 rounded-full bg-fill",
|
|
317
|
-
style: M({ width: `${60 + t * 7 % 25}%` })
|
|
318
|
-
}, null, 4)
|
|
319
|
-
])
|
|
320
|
-
], 4))), 128)) : b("", !0),
|
|
321
|
-
e.display === "rows" ? (s(!0), l(p, { key: 1 }, P(e.rows, (t, $) => (s(), l("li", q({
|
|
322
|
-
key: e.rowKey(t),
|
|
323
|
-
style: ue($),
|
|
324
|
-
"data-test": "collection-row"
|
|
325
|
-
}, { ref_for: !0 }, re($), {
|
|
326
|
-
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)]],
|
|
327
|
-
onClickCapture: f[0] || (f[0] = //@ts-ignore
|
|
328
|
-
(...r) => i(m).onClickCapture && i(m).onClickCapture(...r)),
|
|
329
|
-
onClick: (r) => i(m).onClick(r, t),
|
|
330
|
-
onContextmenu: (r) => i(m).onContextMenu(r, t),
|
|
331
|
-
onPointerdown: (r) => i(m).onPointerDown(r, t),
|
|
332
|
-
onPointermove: f[1] || (f[1] = //@ts-ignore
|
|
333
|
-
(...r) => i(m).onPointerMove && i(m).onPointerMove(...r)),
|
|
334
|
-
onPointerup: f[2] || (f[2] = //@ts-ignore
|
|
335
|
-
(...r) => i(m).cancelPress && i(m).cancelPress(...r)),
|
|
336
|
-
onPointercancel: f[3] || (f[3] = //@ts-ignore
|
|
337
|
-
(...r) => i(m).cancelPress && i(m).cancelPress(...r))
|
|
338
|
-
}), [
|
|
339
|
-
L(i(Ke), {
|
|
340
|
-
actions: i(m).swipeActions(t),
|
|
341
|
-
"content-class": "px-row-inset py-2.5"
|
|
342
|
-
}, {
|
|
343
|
-
default: F(() => [
|
|
344
|
-
u("div", nt, [
|
|
345
|
-
c.leading ? (s(), l("div", lt, [
|
|
346
|
-
S(o.$slots, "leading", {
|
|
347
|
-
item: t,
|
|
348
|
-
compact: !0
|
|
349
|
-
})
|
|
350
|
-
])) : b("", !0),
|
|
351
|
-
u("div", rt, [
|
|
352
|
-
u("div", {
|
|
353
|
-
class: w(["grid min-w-0 items-start gap-x-3", U(t) ? "grid-cols-[minmax(0,1fr)_auto]" : "grid-cols-[minmax(0,1fr)]"]),
|
|
354
|
-
"data-test": "collection-row-head"
|
|
355
|
-
}, [
|
|
356
|
-
u("div", {
|
|
357
|
-
class: w(B.value ? "contents" : "col-start-1 row-start-1 min-w-0")
|
|
358
|
-
}, [
|
|
359
|
-
(s(!0), l(p, null, P(I.value, (r) => (s(), l(p, {
|
|
360
|
-
key: String(r.key)
|
|
361
|
-
}, [
|
|
362
|
-
z(r) ? S(o.$slots, H(r), {
|
|
363
|
-
item: t,
|
|
364
|
-
value: K(t, r),
|
|
365
|
-
compact: !0,
|
|
366
|
-
to: e.link(t),
|
|
367
|
-
search: e.search
|
|
368
|
-
}, void 0, void 0, 0) : B.value ? (s(), D(V, {
|
|
369
|
-
key: 1,
|
|
370
|
-
column: r,
|
|
371
|
-
item: t,
|
|
372
|
-
compact: !0,
|
|
373
|
-
to: e.link(t),
|
|
374
|
-
search: e.search,
|
|
375
|
-
spread: ""
|
|
376
|
-
}, null, 8, ["column", "item", "to", "search"])) : (s(), l("span", it, [
|
|
377
|
-
L(V, {
|
|
378
|
-
column: r,
|
|
379
|
-
item: t,
|
|
380
|
-
compact: !0,
|
|
381
|
-
to: e.link(t),
|
|
382
|
-
search: e.search
|
|
383
|
-
}, null, 8, ["column", "item", "to", "search"])
|
|
384
|
-
]))
|
|
385
|
-
], 64))), 128))
|
|
386
|
-
], 2),
|
|
387
|
-
U(t) ? (s(), l("div", at, [
|
|
388
|
-
(s(!0), l(p, null, P(O.value, (r) => (s(), l(p, {
|
|
389
|
-
key: String(r.key)
|
|
390
|
-
}, [
|
|
391
|
-
z(r) ? S(o.$slots, H(r), {
|
|
392
|
-
item: t,
|
|
393
|
-
value: K(t, r),
|
|
394
|
-
compact: !0,
|
|
395
|
-
to: e.link(t),
|
|
396
|
-
search: e.search
|
|
397
|
-
}, void 0, void 0, 0) : (s(), D(V, {
|
|
398
|
-
key: 1,
|
|
399
|
-
column: r,
|
|
400
|
-
item: t,
|
|
401
|
-
compact: !0,
|
|
402
|
-
to: e.link(t),
|
|
403
|
-
search: e.search
|
|
404
|
-
}, null, 8, ["column", "item", "to", "search"]))
|
|
405
|
-
], 64))), 128)),
|
|
406
|
-
G.value && ee(t) ? (s(), l("button", {
|
|
407
|
-
key: 0,
|
|
408
|
-
type: "button",
|
|
409
|
-
"data-test": "collection-row-more",
|
|
410
|
-
"aria-label": ae(t),
|
|
411
|
-
class: "hit-target -my-1 -mr-1 flex size-8 cursor-pointer items-center justify-center rounded-full text-content-muted active:bg-fill",
|
|
412
|
-
onClick: ve((r) => i(m).openMenuFrom(r, t), ["stop"])
|
|
413
|
-
}, [
|
|
414
|
-
L(i(J), {
|
|
415
|
-
name: "moreLine",
|
|
416
|
-
size: 20
|
|
417
|
-
})
|
|
418
|
-
], 8, ct)) : b("", !0)
|
|
419
|
-
])) : b("", !0)
|
|
420
|
-
], 2),
|
|
421
|
-
j.value.length ? (s(), l("div", ut, [
|
|
422
|
-
(s(!0), l(p, null, P(j.value, (r) => (s(), l(p, {
|
|
423
|
-
key: String(r.key)
|
|
424
|
-
}, [
|
|
425
|
-
z(r) ? S(o.$slots, H(r), {
|
|
426
|
-
item: t,
|
|
427
|
-
value: K(t, r),
|
|
428
|
-
compact: !0,
|
|
429
|
-
to: e.link(t),
|
|
430
|
-
search: e.search
|
|
431
|
-
}, void 0, void 0, 0) : a(K(t, r)) ? b("", !0) : (s(), l("span", dt, [
|
|
432
|
-
L(V, {
|
|
433
|
-
column: r,
|
|
434
|
-
item: t,
|
|
435
|
-
compact: !0,
|
|
436
|
-
to: e.link(t),
|
|
437
|
-
search: e.search
|
|
438
|
-
}, null, 8, ["column", "item", "to", "search"])
|
|
439
|
-
]))
|
|
440
|
-
], 64))), 128))
|
|
441
|
-
])) : b("", !0)
|
|
442
|
-
])
|
|
443
|
-
])
|
|
444
|
-
]),
|
|
445
|
-
_: 2
|
|
446
|
-
}, 1032, ["actions"])
|
|
447
|
-
], 16, st))), 128)) : b("", !0),
|
|
448
|
-
e.display === "failed" ? (s(), l("li", ft, [
|
|
449
|
-
S(o.$slots, "failed")
|
|
450
|
-
])) : b("", !0),
|
|
451
|
-
de.value ? (s(), l("li", pt, [
|
|
452
|
-
S(o.$slots, "empty", {}, () => [
|
|
453
|
-
L(i(he), {
|
|
454
|
-
title: i(h)("core.collection.no_data")
|
|
455
|
-
}, null, 8, ["title"])
|
|
456
|
-
])
|
|
457
|
-
])) : b("", !0)
|
|
458
|
-
], 16)) : (s(), l("div", yt, [
|
|
459
|
-
u("div", {
|
|
460
|
-
class: "overflow-x-auto",
|
|
461
|
-
style: M({ minHeight: Me.value })
|
|
462
|
-
}, [
|
|
463
|
-
u("table", {
|
|
464
|
-
class: w(["collection-grid w-full", { condensed: e.density === "condensed" }]),
|
|
465
|
-
role: T.value ? "presentation" : void 0
|
|
466
|
-
}, [
|
|
467
|
-
u("thead", ht, [
|
|
468
|
-
u("tr", null, [
|
|
469
|
-
(s(!0), l(p, null, P(e.columns, (t) => (s(), l("th", {
|
|
470
|
-
key: String(t.key),
|
|
471
|
-
scope: "col",
|
|
472
|
-
class: w(A(t)),
|
|
473
|
-
style: M({ width: t.width ? `${t.width}px` : void 0, textAlign: t.align ?? "start" }),
|
|
474
|
-
"aria-sort": Pe(t)
|
|
475
|
-
}, [
|
|
476
|
-
u("div", {
|
|
477
|
-
class: w(["flex", Ce[t.align ?? "start"]])
|
|
478
|
-
}, [
|
|
479
|
-
t.sort !== void 0 ? (s(), l("button", {
|
|
480
|
-
key: 0,
|
|
481
|
-
type: "button",
|
|
482
|
-
class: w(["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" : ""]]),
|
|
483
|
-
onClick: ($) => v("sort", t.sort)
|
|
484
|
-
}, [
|
|
485
|
-
u("span", null, C(t.label), 1),
|
|
486
|
-
L(i(J), {
|
|
487
|
-
name: Re(t),
|
|
488
|
-
size: 14,
|
|
489
|
-
class: w(X(t) ? "text-content-muted" : "text-content-disabled opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100")
|
|
490
|
-
}, null, 8, ["name", "class"])
|
|
491
|
-
], 10, bt)) : (s(), l("span", kt, C(t.label), 1))
|
|
492
|
-
], 2)
|
|
493
|
-
], 14, mt))), 128)),
|
|
494
|
-
W.value ? (s(), l("th", gt, [
|
|
495
|
-
u("span", wt, C(i(h)("core.actions.more")), 1)
|
|
496
|
-
])) : b("", !0)
|
|
497
|
-
])
|
|
498
|
-
]),
|
|
499
|
-
u("tbody", q({
|
|
500
|
-
ref_key: "list",
|
|
501
|
-
ref: Y
|
|
502
|
-
}, le.value, {
|
|
503
|
-
class: T.value ? "group/pick outline-0" : void 0
|
|
504
|
-
}), [
|
|
505
|
-
te.value ? (s(!0), l(p, { key: 0 }, P(e.skeletonRows, (t) => (s(), l("tr", {
|
|
506
|
-
key: `skeleton-${t}`,
|
|
507
|
-
"aria-hidden": "true",
|
|
508
|
-
style: M(e.rowHeight ? { height: `${e.rowHeight}px` } : void 0)
|
|
509
|
-
}, [
|
|
510
|
-
(s(!0), l(p, null, P(e.columns, ($, r) => (s(), l("td", {
|
|
511
|
-
key: String($.key),
|
|
512
|
-
class: w(_($))
|
|
513
|
-
}, [
|
|
514
|
-
u("div", {
|
|
515
|
-
class: "flex animate-pulse items-center gap-3 motion-reduce:animate-none",
|
|
516
|
-
style: M({ animationDelay: `${t * 60}ms` })
|
|
517
|
-
}, [
|
|
518
|
-
r === 0 ? (s(), l("span", _t)) : b("", !0),
|
|
519
|
-
u("span", xt, [
|
|
520
|
-
u("span", {
|
|
521
|
-
class: "h-2.5 rounded-full bg-fill-strong",
|
|
522
|
-
style: M({ width: `${55 + (t * 7 + r * 13) % 35}%` })
|
|
523
|
-
}, null, 4),
|
|
524
|
-
u("span", {
|
|
525
|
-
class: "h-2 rounded-full bg-fill",
|
|
526
|
-
style: M({ width: `${30 + (t * 11 + r * 5) % 30}%` })
|
|
527
|
-
}, null, 4)
|
|
528
|
-
])
|
|
529
|
-
], 4)
|
|
530
|
-
], 2))), 128)),
|
|
531
|
-
W.value ? (s(), l("td", Ct, [...f[6] || (f[6] = [
|
|
532
|
-
u("div", { class: "mx-auto h-6 w-6 animate-pulse rounded-full bg-fill motion-reduce:animate-none" }, null, -1)
|
|
533
|
-
])])) : b("", !0)
|
|
534
|
-
], 4))), 128)) : b("", !0),
|
|
535
|
-
e.display === "rows" ? (s(!0), l(p, { key: 1 }, P(e.rows, (t, $) => (s(), l("tr", q({
|
|
536
|
-
key: e.rowKey(t),
|
|
537
|
-
class: "animate-row-in",
|
|
538
|
-
"data-test": "collection-row"
|
|
539
|
-
}, { ref_for: !0 }, re($), {
|
|
540
|
-
class: [e.link(t) ? "cursor-pointer" : void 0, T.value ? At : void 0, e.rowClass?.(t)],
|
|
541
|
-
style: [e.rowHeight ? { height: `${e.rowHeight}px` } : {}, ue($)],
|
|
542
|
-
onClickCapture: f[4] || (f[4] = //@ts-ignore
|
|
543
|
-
(...r) => i(m).onClickCapture && i(m).onClickCapture(...r)),
|
|
544
|
-
onClick: (r) => i(m).onClick(r, t),
|
|
545
|
-
onContextmenu: (r) => i(m).onContextMenu(r, t),
|
|
546
|
-
onPointerdown: (r) => i(m).onPointerDown(r, t)
|
|
547
|
-
}), [
|
|
548
|
-
(s(!0), l(p, null, P(e.columns, (r, Ee) => (s(), l("td", {
|
|
549
|
-
key: String(r.key),
|
|
550
|
-
class: w(xe(r))
|
|
551
|
-
}, [
|
|
552
|
-
S(o.$slots, H(r), {
|
|
553
|
-
item: t,
|
|
554
|
-
value: K(t, r),
|
|
555
|
-
compact: !1,
|
|
556
|
-
to: e.link(t)
|
|
557
|
-
}, () => [
|
|
558
|
-
L(V, {
|
|
559
|
-
column: r,
|
|
560
|
-
item: t,
|
|
561
|
-
compact: !1,
|
|
562
|
-
to: e.link(t),
|
|
563
|
-
search: e.search
|
|
564
|
-
}, De({ _: 2 }, [
|
|
565
|
-
c.leading && Ee === 0 ? {
|
|
566
|
-
name: "leading",
|
|
567
|
-
fn: F(() => [
|
|
568
|
-
S(o.$slots, "leading", {
|
|
569
|
-
item: t,
|
|
570
|
-
compact: !1
|
|
571
|
-
})
|
|
572
|
-
]),
|
|
573
|
-
key: "0"
|
|
574
|
-
} : void 0
|
|
575
|
-
]), 1032, ["column", "item", "to", "search"])
|
|
576
|
-
])
|
|
577
|
-
], 2))), 128)),
|
|
578
|
-
W.value ? (s(), l("td", St, [
|
|
579
|
-
S(o.$slots, "actions", { item: t }, () => [
|
|
580
|
-
u("div", Lt, [
|
|
581
|
-
e.link(t) ? (s(), D(i(ze), {
|
|
582
|
-
key: 0,
|
|
583
|
-
text: i(h)("core.collection.open_record"),
|
|
584
|
-
side: "left"
|
|
585
|
-
}, {
|
|
586
|
-
default: F(() => [
|
|
587
|
-
L(i(we), {
|
|
588
|
-
to: e.link(t),
|
|
589
|
-
"aria-label": `${i(h)("core.collection.open_record")}${e.rowLabel ? `: ${e.rowLabel(t)}` : ""}`,
|
|
590
|
-
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"
|
|
591
|
-
}, {
|
|
592
|
-
default: F(() => [
|
|
593
|
-
L(i(J), {
|
|
594
|
-
name: "eye",
|
|
595
|
-
size: 18
|
|
596
|
-
})
|
|
597
|
-
]),
|
|
598
|
-
_: 1
|
|
599
|
-
}, 8, ["to", "aria-label"])
|
|
600
|
-
]),
|
|
601
|
-
_: 2
|
|
602
|
-
}, 1032, ["text"])) : b("", !0),
|
|
603
|
-
G.value && ee(t) ? (s(), l("button", {
|
|
604
|
-
key: 1,
|
|
605
|
-
type: "button",
|
|
606
|
-
"data-test": "collection-row-more",
|
|
607
|
-
"aria-label": ae(t),
|
|
608
|
-
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",
|
|
609
|
-
onClick: ve((r) => i(m).openMenuFrom(r, t), ["stop"])
|
|
610
|
-
}, [
|
|
611
|
-
L(i(J), {
|
|
612
|
-
name: "moreLine",
|
|
613
|
-
size: 18
|
|
614
|
-
})
|
|
615
|
-
], 8, Pt)) : b("", !0)
|
|
616
|
-
])
|
|
617
|
-
])
|
|
618
|
-
])) : b("", !0)
|
|
619
|
-
], 16, $t))), 128)) : b("", !0),
|
|
620
|
-
e.display === "failed" ? (s(), l("tr", Rt, [
|
|
621
|
-
u("td", {
|
|
622
|
-
colspan: ce.value,
|
|
623
|
-
class: "!whitespace-normal py-6"
|
|
624
|
-
}, [
|
|
625
|
-
S(o.$slots, "failed")
|
|
626
|
-
], 8, Mt)
|
|
627
|
-
])) : b("", !0),
|
|
628
|
-
de.value ? (s(), l("tr", Et, [
|
|
629
|
-
u("td", {
|
|
630
|
-
colspan: ce.value,
|
|
631
|
-
class: "!whitespace-normal py-6 text-center"
|
|
632
|
-
}, [
|
|
633
|
-
S(o.$slots, "empty", {}, () => [
|
|
634
|
-
L(i(he), {
|
|
635
|
-
title: i(h)("core.collection.no_data")
|
|
636
|
-
}, null, 8, ["title"])
|
|
637
|
-
])
|
|
638
|
-
], 8, It)
|
|
639
|
-
])) : b("", !0)
|
|
640
|
-
], 16)
|
|
641
|
-
], 10, vt)
|
|
642
|
-
], 4)
|
|
643
|
-
])),
|
|
644
|
-
e.rowActions ? (s(), D(i(Ne), {
|
|
645
|
-
key: 2,
|
|
646
|
-
ref_key: "rowMenu",
|
|
647
|
-
ref: ie,
|
|
648
|
-
items: i(m).menuItems.value,
|
|
649
|
-
label: i(m).menuLabel.value
|
|
650
|
-
}, null, 8, ["items", "label"])) : b("", !0)
|
|
651
|
-
], 64));
|
|
652
|
-
}
|
|
653
|
-
});
|
|
654
|
-
function Xt(y) {
|
|
655
|
-
const n = je("(max-width: 1023px)"), d = g(() => y().some((e) => e.mobile && e.mobile !== "hidden"));
|
|
656
|
-
return { narrow: g(() => n.value), phone: g(() => n.value && d.value) };
|
|
657
|
-
}
|
|
658
|
-
export {
|
|
659
|
-
Wt as _,
|
|
660
|
-
ke as a,
|
|
661
|
-
V as b,
|
|
662
|
-
Xt as u
|
|
663
|
-
};
|