@wssto2/vue-core 0.9.3 → 0.10.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 +28 -0
- package/dist/ActionRow.vue_vue_type_script_setup_true_lang-IpcP3Bjc.js +87 -0
- package/dist/Activity-CeAG0ZtJ.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-B9-zpDxG.js +69 -0
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-DHcekGNn.js → CollectionPage.vue_vue_type_script_setup_true_lang-Cn0YOWJF.js} +19 -18
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-8kBsNRuq.js → DataTable.vue_vue_type_script_setup_true_lang-BQRG8bpH.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-BP03yC4R.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-BDmCJr3H.js} +35 -38
- package/dist/{IncidentRecord-D8aOpNHo.js → IncidentRecord-DEhl6AyA.js} +14 -15
- package/dist/{IncidentsList-C0cFl0Db.js → IncidentsList-COgRPdk3.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-BQCK2w8R.js +684 -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-C0OIBrSp.js} +20 -20
- package/dist/{ServiceAccountRecord-bxX9yQkC.js → ServiceAccountRecord-gtlhYaAz.js} +37 -37
- package/dist/{ServiceAccountsList-BXE6htxk.js → ServiceAccountsList-BM7GGcvw.js} +33 -33
- package/dist/{Sessions--Gvc0kxw.js → Sessions-BCDJYuV2.js} +23 -24
- package/dist/{SettingsPage-DzDC7gD-.js → SettingsPage-DUhMsYBf.js} +27 -30
- package/dist/{SignIn-CTI_699e.js → SignIn-4D7WohI8.js} +9 -10
- package/dist/{SignInPage-HKC1bm2E.js → SignInPage-B6B-34GG.js} +4 -4
- package/dist/SignIns-CFoe4hpX.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-Cd1TCpJZ.js +202 -0
- package/dist/UsersList-GJU5-CTG.js +74 -0
- package/dist/access/index.js +4 -4
- package/dist/app/index.js +1 -1
- package/dist/{application-BmXW6iW_.js → application-CuzT-0vW.js} +1 -1
- package/dist/button/index.js +6 -5
- 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 +5 -1
- package/dist/collection/index.js +144 -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.d.ts +2 -0
- package/dist/form/index.js +611 -595
- package/dist/form/storableText.d.ts +24 -0
- 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/highlight-DnYhLXnu.js +9 -0
- package/dist/http-Dm0uXY9O.js +95 -0
- package/dist/i18n/index.d.ts +14 -0
- package/dist/i18n/index.js +87 -63
- package/dist/i18n/plural.d.ts +23 -0
- package/dist/identity/embed.d.ts +39 -0
- package/dist/identity/index.d.ts +20 -0
- 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 +8 -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 +10 -0
- package/dist/identity/users/list.d.ts +1 -1
- package/dist/identity/users/personSections.d.ts +1 -1
- 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-CTkG-acm.js} +4 -4
- package/dist/{index-Dm-sdJJr.js → index-DUs7WSz-.js} +31 -32
- package/dist/index-pJ_eRg80.js +1257 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- 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-CT8vWYgI.js → rowLayout-Il4psyXN.js} +183 -188
- 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 +963 -580
- package/dist/shell/offlineNotice.d.ts +3 -0
- package/dist/shell/quickSearch.d.ts +14 -0
- package/dist/shell/quickSearchControl.d.ts +66 -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/fieldMessages-B6GHgi40.js +0 -25
- package/dist/http-nz92KjdS.js +0 -42
- package/dist/index-CdtofdcJ.js +0 -501
- package/dist/languages-BShG9LpE.js +0 -10
- package/dist/signInEvents-DWShrJox.js +0 -30
- package/dist/status-BRA14qwX.js +0 -34
- package/dist/useWaitStatus-fsacMl4W.js +0 -24
|
@@ -1,22 +1,17 @@
|
|
|
1
|
-
import { defineComponent as se, computed as
|
|
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
2
|
import { useI18n as Be } from "vue-i18n";
|
|
3
3
|
import { RouterLink as we, useRouter as He } from "vue-router";
|
|
4
4
|
import { _ as Ke } from "./SwipeActions.vue_vue_type_script_setup_true_lang-D8SiC0G7.js";
|
|
5
5
|
import { _ as J } from "./Icon.vue_vue_type_script_lang-BhhsFYwp.js";
|
|
6
6
|
import { _ as Ne } from "./Menu.vue_vue_type_script_setup_true_lang-wKc9gdCn.js";
|
|
7
7
|
import { _ as ze } from "./Tooltip.vue_vue_type_script_setup_true_lang-Dtg5Y6pf.js";
|
|
8
|
-
import { _ as
|
|
8
|
+
import { _ as me } from "./EmptyState.vue_vue_type_script_setup_true_lang-DbZiO2RF.js";
|
|
9
9
|
import { u as Fe } from "./format-D8KUBmbS.js";
|
|
10
10
|
import { _ as Ve } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
|
|
11
11
|
import { _ as Oe } from "./Timestamp.vue_vue_type_script_setup_true_lang-ClZAAUMd.js";
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
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({
|
|
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({
|
|
20
15
|
__name: "RecordIdentity",
|
|
21
16
|
props: {
|
|
22
17
|
title: {},
|
|
@@ -26,55 +21,55 @@ const Ye = ["data-row-click-ignore"], me = "rounded-sm bg-status-warning-surface
|
|
|
26
21
|
highlight: { default: null },
|
|
27
22
|
spread: { type: Boolean, default: !1 }
|
|
28
23
|
},
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
31
|
-
return (e,
|
|
32
|
-
class:
|
|
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")
|
|
33
28
|
}, [
|
|
34
|
-
|
|
29
|
+
l.to ? (s(), D(i(we), {
|
|
35
30
|
key: 0,
|
|
36
|
-
to:
|
|
37
|
-
class:
|
|
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])
|
|
38
33
|
}, {
|
|
39
34
|
default: F(() => [
|
|
40
|
-
(s(!0),
|
|
41
|
-
c.match ? (s(),
|
|
35
|
+
(s(!0), n(f, null, P(b.value, (c, p) => (s(), n(f, { key: p }, [
|
|
36
|
+
c.match ? (s(), n("mark", {
|
|
42
37
|
key: 0,
|
|
43
|
-
class:
|
|
44
|
-
}, C(c.text), 1)) : (s(),
|
|
38
|
+
class: g(he)
|
|
39
|
+
}, C(c.text), 1)) : (s(), n(f, { key: 1 }, [
|
|
45
40
|
Q(C(c.text), 1)
|
|
46
41
|
], 64))
|
|
47
42
|
], 64))), 128))
|
|
48
43
|
]),
|
|
49
44
|
_: 1
|
|
50
|
-
}, 8, ["to", "class"])) : (s(),
|
|
45
|
+
}, 8, ["to", "class"])) : (s(), n("span", {
|
|
51
46
|
key: 1,
|
|
52
|
-
class:
|
|
47
|
+
class: g(["truncate text-row-title", l.spread ? be : void 0])
|
|
53
48
|
}, [
|
|
54
|
-
(s(!0),
|
|
55
|
-
c.match ? (s(),
|
|
49
|
+
(s(!0), n(f, null, P(b.value, (c, p) => (s(), n(f, { key: p }, [
|
|
50
|
+
c.match ? (s(), n("mark", {
|
|
56
51
|
key: 0,
|
|
57
|
-
class:
|
|
58
|
-
}, C(c.text), 1)) : (s(),
|
|
52
|
+
class: g(he)
|
|
53
|
+
}, C(c.text), 1)) : (s(), n(f, { key: 1 }, [
|
|
59
54
|
Q(C(c.text), 1)
|
|
60
55
|
], 64))
|
|
61
56
|
], 64))), 128))
|
|
62
57
|
], 2)),
|
|
63
|
-
|
|
58
|
+
l.subtitle ? (s(), n("span", {
|
|
64
59
|
key: 2,
|
|
65
|
-
"data-row-click-ignore":
|
|
66
|
-
class:
|
|
67
|
-
}, C(
|
|
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)
|
|
68
63
|
], 2));
|
|
69
64
|
}
|
|
70
65
|
});
|
|
71
|
-
function _e(
|
|
72
|
-
let
|
|
73
|
-
for (const e of String(
|
|
74
|
-
if (typeof
|
|
75
|
-
|
|
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];
|
|
76
71
|
}
|
|
77
|
-
return
|
|
72
|
+
return b;
|
|
78
73
|
}
|
|
79
74
|
const We = {
|
|
80
75
|
key: 0,
|
|
@@ -95,61 +90,61 @@ const We = {
|
|
|
95
90
|
search: {},
|
|
96
91
|
spread: { type: Boolean }
|
|
97
92
|
},
|
|
98
|
-
setup(
|
|
99
|
-
const
|
|
100
|
-
return (E, N) =>
|
|
101
|
-
!
|
|
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, [
|
|
102
97
|
S(E.$slots, "leading"),
|
|
103
98
|
L(ke, {
|
|
104
|
-
to:
|
|
105
|
-
title:
|
|
106
|
-
subtitle:
|
|
107
|
-
highlight:
|
|
99
|
+
to: l.to,
|
|
100
|
+
title: l.column.title?.(l.item) ?? c.value,
|
|
101
|
+
subtitle: l.column.subtitle?.(l.item),
|
|
102
|
+
highlight: l.search,
|
|
108
103
|
"subtitle-selectable": ""
|
|
109
104
|
}, null, 8, ["to", "title", "subtitle", "highlight"])
|
|
110
105
|
])) : (s(), D(ke, {
|
|
111
106
|
key: 1,
|
|
112
|
-
spread:
|
|
113
|
-
to:
|
|
114
|
-
title:
|
|
115
|
-
subtitle:
|
|
116
|
-
highlight:
|
|
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,
|
|
117
112
|
"subtitle-selectable": ""
|
|
118
113
|
}, null, 8, ["spread", "to", "title", "subtitle", "highlight"]))
|
|
119
|
-
], 64)) :
|
|
120
|
-
|
|
114
|
+
], 64)) : l.column.kind === "timestamp" ? (s(), n(f, { key: 1 }, [
|
|
115
|
+
l.compact && w.value ? (s(), n("time", {
|
|
121
116
|
key: 0,
|
|
122
117
|
class: "tabular-nums",
|
|
123
118
|
datetime: String(e.value)
|
|
124
|
-
}, C(
|
|
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), {
|
|
125
120
|
key: 1,
|
|
126
|
-
value:
|
|
127
|
-
precision:
|
|
121
|
+
value: w.value,
|
|
122
|
+
precision: l.column.precision ?? "dateTime"
|
|
128
123
|
}, null, 8, ["value", "precision"]))
|
|
129
|
-
], 64)) :
|
|
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), {
|
|
130
125
|
key: 4,
|
|
131
|
-
tone:
|
|
126
|
+
tone: l.column.tone(l.item),
|
|
132
127
|
dot: ""
|
|
133
128
|
}, {
|
|
134
129
|
default: F(() => [
|
|
135
|
-
Q(C(
|
|
130
|
+
Q(C(l.column.text?.(l.item) ?? c.value), 1)
|
|
136
131
|
]),
|
|
137
132
|
_: 1
|
|
138
|
-
}, 8, ["tone"])) : (s(),
|
|
133
|
+
}, 8, ["tone"])) : (s(), n(f, { key: 5 }, [
|
|
139
134
|
Q(C(c.value), 1)
|
|
140
135
|
], 64));
|
|
141
136
|
}
|
|
142
137
|
}), Qe = 'a, button, input, select, textarea, label, [role="button"], [data-row-click-ignore]', Ze = 500, et = 8;
|
|
143
|
-
function tt(
|
|
144
|
-
const
|
|
145
|
-
let
|
|
146
|
-
const E = (a) =>
|
|
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) ?? [];
|
|
147
142
|
function N(a) {
|
|
148
|
-
return E(a).filter((
|
|
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 }));
|
|
149
144
|
}
|
|
150
|
-
function I(a,
|
|
145
|
+
function I(a, m, _) {
|
|
151
146
|
const A = E(a);
|
|
152
|
-
return A.length === 0 ? !1 : (e.value =
|
|
147
|
+
return A.length === 0 ? !1 : (e.value = k.label()?.(a) ?? k.moreLabel(), b.value = A.map((x) => ({
|
|
153
148
|
id: x.key,
|
|
154
149
|
label: x.label,
|
|
155
150
|
icon: x.icon,
|
|
@@ -158,44 +153,44 @@ function tt(y) {
|
|
|
158
153
|
onSelect: () => {
|
|
159
154
|
x.onSelect ? x.onSelect() : x.href && (x.external ? window.open(x.href, "_blank", "noopener") : window.location.assign(x.href));
|
|
160
155
|
}
|
|
161
|
-
})), ge(() =>
|
|
156
|
+
})), ge(() => k.presentMenu(m, _)), !0);
|
|
162
157
|
}
|
|
163
|
-
function O(a,
|
|
158
|
+
function O(a, m) {
|
|
164
159
|
const _ = a.currentTarget.getBoundingClientRect();
|
|
165
|
-
I(
|
|
160
|
+
I(m, _.left, _.bottom);
|
|
166
161
|
}
|
|
167
|
-
function j(a,
|
|
168
|
-
!
|
|
162
|
+
function j(a, m) {
|
|
163
|
+
!k.actions() || a.target.closest("a") || I(m, a.clientX, a.clientY) && (a.preventDefault(), w = !0);
|
|
169
164
|
}
|
|
170
165
|
function B() {
|
|
171
166
|
c && clearTimeout(c), c = null;
|
|
172
167
|
}
|
|
173
|
-
function U(a,
|
|
174
|
-
|
|
175
|
-
c = null, I(
|
|
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));
|
|
176
171
|
}, Ze));
|
|
177
172
|
}
|
|
178
173
|
function H(a) {
|
|
179
|
-
c && Math.hypot(a.clientX -
|
|
174
|
+
c && Math.hypot(a.clientX - p.x, a.clientY - p.y) > et && B();
|
|
180
175
|
}
|
|
181
176
|
function z(a) {
|
|
182
|
-
|
|
177
|
+
w && (w = !1, a.preventDefault(), a.stopPropagation());
|
|
183
178
|
}
|
|
184
|
-
function K(a,
|
|
185
|
-
const _ =
|
|
179
|
+
function K(a, m) {
|
|
180
|
+
const _ = k.pick?.(), A = _ ? null : k.target(m);
|
|
186
181
|
if (!(!_ && !A || a.target.closest(Qe)) && !window.getSelection()?.toString()) {
|
|
187
182
|
if (_) {
|
|
188
|
-
_(
|
|
183
|
+
_(m);
|
|
189
184
|
return;
|
|
190
185
|
}
|
|
191
186
|
if (a.metaKey || a.ctrlKey) {
|
|
192
|
-
window.open(
|
|
187
|
+
window.open(l.resolve(A).href, "_blank");
|
|
193
188
|
return;
|
|
194
189
|
}
|
|
195
|
-
|
|
190
|
+
l.push(A);
|
|
196
191
|
}
|
|
197
192
|
}
|
|
198
|
-
return Ie() && Ae(B), { menuItems:
|
|
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 };
|
|
199
194
|
}
|
|
200
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 = {
|
|
201
196
|
key: 0,
|
|
@@ -223,7 +218,7 @@ const ot = { class: "flex flex-1 flex-col gap-2 pt-1" }, st = ["onClick", "onCon
|
|
|
223
218
|
}, yt = {
|
|
224
219
|
key: 1,
|
|
225
220
|
class: "inline-block w-full align-middle"
|
|
226
|
-
}, vt = ["role"],
|
|
221
|
+
}, vt = ["role"], mt = { class: "border-b border-border-separator" }, ht = ["aria-sort"], bt = ["onClick"], kt = { key: 1 }, gt = {
|
|
227
222
|
key: 0,
|
|
228
223
|
class: "px-4 pt-2.5 pb-2",
|
|
229
224
|
style: { width: "20px" }
|
|
@@ -236,7 +231,7 @@ const ot = { class: "flex flex-1 flex-col gap-2 pt-1" }, st = ["onClick", "onCon
|
|
|
236
231
|
}, Mt = ["colspan"], Et = {
|
|
237
232
|
key: 3,
|
|
238
233
|
"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,
|
|
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({
|
|
240
235
|
__name: "CollectionRows",
|
|
241
236
|
props: {
|
|
242
237
|
columns: {},
|
|
@@ -259,19 +254,19 @@ const ot = { class: "flex flex-1 flex-col gap-2 pt-1" }, st = ["onClick", "onCon
|
|
|
259
254
|
pickLabel: { default: void 0 }
|
|
260
255
|
},
|
|
261
256
|
emits: ["sort"],
|
|
262
|
-
setup(
|
|
263
|
-
const e =
|
|
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");
|
|
264
259
|
ye(() => e.rows, () => R.value = -1), ye(R, (o) => void ge(() => Y.value?.querySelector(`[id="${Z(o)}"]`)?.scrollIntoView?.({ block: "nearest" })));
|
|
265
260
|
function Se(o) {
|
|
266
261
|
if (o.target !== o.currentTarget || o.altKey || o.ctrlKey || o.metaKey || o.shiftKey) return;
|
|
267
|
-
const
|
|
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 };
|
|
268
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]));
|
|
269
264
|
}
|
|
270
|
-
const le =
|
|
265
|
+
const le = h(
|
|
271
266
|
() => T.value ? {
|
|
272
267
|
role: "listbox",
|
|
273
268
|
tabindex: 0,
|
|
274
|
-
"aria-label": e.pickLabel ??
|
|
269
|
+
"aria-label": e.pickLabel ?? p("core.collection.pick_label"),
|
|
275
270
|
"aria-activedescendant": R.value >= 0 ? Z(R.value) : void 0,
|
|
276
271
|
onKeydown: Se,
|
|
277
272
|
onFocus: () => {
|
|
@@ -282,17 +277,17 @@ const ot = { class: "flex flex-1 flex-col gap-2 pt-1" }, st = ["onClick", "onCon
|
|
|
282
277
|
function Le() {
|
|
283
278
|
return T.value ? (Y.value?.focus(), !0) : !1;
|
|
284
279
|
}
|
|
285
|
-
|
|
286
|
-
const ie = pe("rowMenu"),
|
|
280
|
+
l({ focusRows: Le });
|
|
281
|
+
const ie = pe("rowMenu"), y = tt({
|
|
287
282
|
actions: () => e.rowActions,
|
|
288
283
|
label: () => e.rowLabel,
|
|
289
284
|
target: (o) => e.link(o),
|
|
290
285
|
pick: () => e.pick,
|
|
291
|
-
presentMenu: (o,
|
|
292
|
-
moreLabel: () =>
|
|
293
|
-
}), G =
|
|
294
|
-
return (o,
|
|
295
|
-
e.phone ? (s(),
|
|
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({
|
|
296
291
|
key: 0,
|
|
297
292
|
ref_key: "list",
|
|
298
293
|
ref: Y
|
|
@@ -300,13 +295,13 @@ const ot = { class: "flex flex-1 flex-col gap-2 pt-1" }, st = ["onClick", "onCon
|
|
|
300
295
|
class: ["overflow-hidden rounded-group bg-surface-cell shadow-group", T.value ? "group/pick outline-0" : void 0],
|
|
301
296
|
"data-test": "collection-mobile-rows"
|
|
302
297
|
}), [
|
|
303
|
-
te.value ? (s(!0),
|
|
298
|
+
te.value ? (s(!0), n(f, { key: 0 }, P(e.skeletonRows, (t) => (s(), n("li", {
|
|
304
299
|
key: `skeleton-${t}`,
|
|
305
300
|
"aria-hidden": "true",
|
|
306
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",
|
|
307
302
|
style: M({ animationDelay: `${t * 60}ms` })
|
|
308
303
|
}, [
|
|
309
|
-
|
|
304
|
+
d[5] || (d[5] = u("span", { class: "size-9 shrink-0 rounded-full bg-fill" }, null, -1)),
|
|
310
305
|
u("span", ot, [
|
|
311
306
|
u("span", {
|
|
312
307
|
class: "h-2.5 rounded-full bg-fill-strong",
|
|
@@ -317,46 +312,46 @@ const ot = { class: "flex flex-1 flex-col gap-2 pt-1" }, st = ["onClick", "onCon
|
|
|
317
312
|
style: M({ width: `${60 + t * 7 % 25}%` })
|
|
318
313
|
}, null, 4)
|
|
319
314
|
])
|
|
320
|
-
], 4))), 128)) :
|
|
321
|
-
e.display === "rows" ? (s(!0),
|
|
315
|
+
], 4))), 128)) : v("", !0),
|
|
316
|
+
e.display === "rows" ? (s(!0), n(f, { key: 1 }, P(e.rows, (t, $) => (s(), n("li", q({
|
|
322
317
|
key: e.rowKey(t),
|
|
323
318
|
style: ue($),
|
|
324
319
|
"data-test": "collection-row"
|
|
325
320
|
}, { ref_for: !0 }, re($), {
|
|
326
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)]],
|
|
327
|
-
onClickCapture:
|
|
328
|
-
(...r) => i(
|
|
329
|
-
onClick: (r) => i(
|
|
330
|
-
onContextmenu: (r) => i(
|
|
331
|
-
onPointerdown: (r) => i(
|
|
332
|
-
onPointermove:
|
|
333
|
-
(...r) => i(
|
|
334
|
-
onPointerup:
|
|
335
|
-
(...r) => i(
|
|
336
|
-
onPointercancel:
|
|
337
|
-
(...r) => i(
|
|
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))
|
|
338
333
|
}), [
|
|
339
334
|
L(i(Ke), {
|
|
340
|
-
actions: i(
|
|
335
|
+
actions: i(y).swipeActions(t),
|
|
341
336
|
"content-class": "px-row-inset py-2.5"
|
|
342
337
|
}, {
|
|
343
338
|
default: F(() => [
|
|
344
339
|
u("div", nt, [
|
|
345
|
-
c.leading ? (s(),
|
|
340
|
+
c.leading ? (s(), n("div", lt, [
|
|
346
341
|
S(o.$slots, "leading", {
|
|
347
342
|
item: t,
|
|
348
343
|
compact: !0
|
|
349
344
|
})
|
|
350
|
-
])) :
|
|
345
|
+
])) : v("", !0),
|
|
351
346
|
u("div", rt, [
|
|
352
347
|
u("div", {
|
|
353
|
-
class:
|
|
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)]"]),
|
|
354
349
|
"data-test": "collection-row-head"
|
|
355
350
|
}, [
|
|
356
351
|
u("div", {
|
|
357
|
-
class:
|
|
352
|
+
class: g(B.value ? "contents" : "col-start-1 row-start-1 min-w-0")
|
|
358
353
|
}, [
|
|
359
|
-
(s(!0),
|
|
354
|
+
(s(!0), n(f, null, P(I.value, (r) => (s(), n(f, {
|
|
360
355
|
key: String(r.key)
|
|
361
356
|
}, [
|
|
362
357
|
z(r) ? S(o.$slots, H(r), {
|
|
@@ -373,7 +368,7 @@ const ot = { class: "flex flex-1 flex-col gap-2 pt-1" }, st = ["onClick", "onCon
|
|
|
373
368
|
to: e.link(t),
|
|
374
369
|
search: e.search,
|
|
375
370
|
spread: ""
|
|
376
|
-
}, null, 8, ["column", "item", "to", "search"])) : (s(),
|
|
371
|
+
}, null, 8, ["column", "item", "to", "search"])) : (s(), n("span", it, [
|
|
377
372
|
L(V, {
|
|
378
373
|
column: r,
|
|
379
374
|
item: t,
|
|
@@ -384,8 +379,8 @@ const ot = { class: "flex flex-1 flex-col gap-2 pt-1" }, st = ["onClick", "onCon
|
|
|
384
379
|
]))
|
|
385
380
|
], 64))), 128))
|
|
386
381
|
], 2),
|
|
387
|
-
U(t) ? (s(),
|
|
388
|
-
(s(!0),
|
|
382
|
+
U(t) ? (s(), n("div", at, [
|
|
383
|
+
(s(!0), n(f, null, P(O.value, (r) => (s(), n(f, {
|
|
389
384
|
key: String(r.key)
|
|
390
385
|
}, [
|
|
391
386
|
z(r) ? S(o.$slots, H(r), {
|
|
@@ -403,23 +398,23 @@ const ot = { class: "flex flex-1 flex-col gap-2 pt-1" }, st = ["onClick", "onCon
|
|
|
403
398
|
search: e.search
|
|
404
399
|
}, null, 8, ["column", "item", "to", "search"]))
|
|
405
400
|
], 64))), 128)),
|
|
406
|
-
G.value && ee(t) ? (s(),
|
|
401
|
+
G.value && ee(t) ? (s(), n("button", {
|
|
407
402
|
key: 0,
|
|
408
403
|
type: "button",
|
|
409
404
|
"data-test": "collection-row-more",
|
|
410
405
|
"aria-label": ae(t),
|
|
411
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",
|
|
412
|
-
onClick: ve((r) => i(
|
|
407
|
+
onClick: ve((r) => i(y).openMenuFrom(r, t), ["stop"])
|
|
413
408
|
}, [
|
|
414
409
|
L(i(J), {
|
|
415
410
|
name: "moreLine",
|
|
416
411
|
size: 20
|
|
417
412
|
})
|
|
418
|
-
], 8, ct)) :
|
|
419
|
-
])) :
|
|
413
|
+
], 8, ct)) : v("", !0)
|
|
414
|
+
])) : v("", !0)
|
|
420
415
|
], 2),
|
|
421
|
-
j.value.length ? (s(),
|
|
422
|
-
(s(!0),
|
|
416
|
+
j.value.length ? (s(), n("div", ut, [
|
|
417
|
+
(s(!0), n(f, null, P(j.value, (r) => (s(), n(f, {
|
|
423
418
|
key: String(r.key)
|
|
424
419
|
}, [
|
|
425
420
|
z(r) ? S(o.$slots, H(r), {
|
|
@@ -428,7 +423,7 @@ const ot = { class: "flex flex-1 flex-col gap-2 pt-1" }, st = ["onClick", "onCon
|
|
|
428
423
|
compact: !0,
|
|
429
424
|
to: e.link(t),
|
|
430
425
|
search: e.search
|
|
431
|
-
}, void 0, void 0, 0) : a(K(t, r)) ?
|
|
426
|
+
}, void 0, void 0, 0) : a(K(t, r)) ? v("", !0) : (s(), n("span", dt, [
|
|
432
427
|
L(V, {
|
|
433
428
|
column: r,
|
|
434
429
|
item: t,
|
|
@@ -438,62 +433,62 @@ const ot = { class: "flex flex-1 flex-col gap-2 pt-1" }, st = ["onClick", "onCon
|
|
|
438
433
|
}, null, 8, ["column", "item", "to", "search"])
|
|
439
434
|
]))
|
|
440
435
|
], 64))), 128))
|
|
441
|
-
])) :
|
|
436
|
+
])) : v("", !0)
|
|
442
437
|
])
|
|
443
438
|
])
|
|
444
439
|
]),
|
|
445
440
|
_: 2
|
|
446
441
|
}, 1032, ["actions"])
|
|
447
|
-
], 16, st))), 128)) :
|
|
448
|
-
e.display === "failed" ? (s(),
|
|
442
|
+
], 16, st))), 128)) : v("", !0),
|
|
443
|
+
e.display === "failed" ? (s(), n("li", ft, [
|
|
449
444
|
S(o.$slots, "failed")
|
|
450
|
-
])) :
|
|
451
|
-
de.value ? (s(),
|
|
445
|
+
])) : v("", !0),
|
|
446
|
+
de.value ? (s(), n("li", pt, [
|
|
452
447
|
S(o.$slots, "empty", {}, () => [
|
|
453
|
-
L(i(
|
|
454
|
-
title: i(
|
|
448
|
+
L(i(me), {
|
|
449
|
+
title: i(p)("core.collection.no_data")
|
|
455
450
|
}, null, 8, ["title"])
|
|
456
451
|
])
|
|
457
|
-
])) :
|
|
458
|
-
], 16)) : (s(),
|
|
452
|
+
])) : v("", !0)
|
|
453
|
+
], 16)) : (s(), n("div", yt, [
|
|
459
454
|
u("div", {
|
|
460
455
|
class: "overflow-x-auto",
|
|
461
456
|
style: M({ minHeight: Me.value })
|
|
462
457
|
}, [
|
|
463
458
|
u("table", {
|
|
464
|
-
class:
|
|
459
|
+
class: g(["collection-grid w-full", { condensed: e.density === "condensed" }]),
|
|
465
460
|
role: T.value ? "presentation" : void 0
|
|
466
461
|
}, [
|
|
467
|
-
u("thead",
|
|
462
|
+
u("thead", mt, [
|
|
468
463
|
u("tr", null, [
|
|
469
|
-
(s(!0),
|
|
464
|
+
(s(!0), n(f, null, P(e.columns, (t) => (s(), n("th", {
|
|
470
465
|
key: String(t.key),
|
|
471
466
|
scope: "col",
|
|
472
|
-
class:
|
|
467
|
+
class: g(A(t)),
|
|
473
468
|
style: M({ width: t.width ? `${t.width}px` : void 0, textAlign: t.align ?? "start" }),
|
|
474
469
|
"aria-sort": Pe(t)
|
|
475
470
|
}, [
|
|
476
471
|
u("div", {
|
|
477
|
-
class:
|
|
472
|
+
class: g(["flex", Ce[t.align ?? "start"]])
|
|
478
473
|
}, [
|
|
479
|
-
t.sort !== void 0 ? (s(),
|
|
474
|
+
t.sort !== void 0 ? (s(), n("button", {
|
|
480
475
|
key: 0,
|
|
481
476
|
type: "button",
|
|
482
|
-
class:
|
|
483
|
-
onClick: ($) =>
|
|
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)
|
|
484
479
|
}, [
|
|
485
480
|
u("span", null, C(t.label), 1),
|
|
486
481
|
L(i(J), {
|
|
487
482
|
name: Re(t),
|
|
488
483
|
size: 14,
|
|
489
|
-
class:
|
|
484
|
+
class: g(X(t) ? "text-content-muted" : "text-content-disabled opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100")
|
|
490
485
|
}, null, 8, ["name", "class"])
|
|
491
|
-
], 10, bt)) : (s(),
|
|
486
|
+
], 10, bt)) : (s(), n("span", kt, C(t.label), 1))
|
|
492
487
|
], 2)
|
|
493
|
-
], 14,
|
|
494
|
-
W.value ? (s(),
|
|
495
|
-
u("span", wt, C(i(
|
|
496
|
-
])) :
|
|
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)
|
|
497
492
|
])
|
|
498
493
|
]),
|
|
499
494
|
u("tbody", q({
|
|
@@ -502,20 +497,20 @@ const ot = { class: "flex flex-1 flex-col gap-2 pt-1" }, st = ["onClick", "onCon
|
|
|
502
497
|
}, le.value, {
|
|
503
498
|
class: T.value ? "group/pick outline-0" : void 0
|
|
504
499
|
}), [
|
|
505
|
-
te.value ? (s(!0),
|
|
500
|
+
te.value ? (s(!0), n(f, { key: 0 }, P(e.skeletonRows, (t) => (s(), n("tr", {
|
|
506
501
|
key: `skeleton-${t}`,
|
|
507
502
|
"aria-hidden": "true",
|
|
508
503
|
style: M(e.rowHeight ? { height: `${e.rowHeight}px` } : void 0)
|
|
509
504
|
}, [
|
|
510
|
-
(s(!0),
|
|
505
|
+
(s(!0), n(f, null, P(e.columns, ($, r) => (s(), n("td", {
|
|
511
506
|
key: String($.key),
|
|
512
|
-
class:
|
|
507
|
+
class: g(_($))
|
|
513
508
|
}, [
|
|
514
509
|
u("div", {
|
|
515
510
|
class: "flex animate-pulse items-center gap-3 motion-reduce:animate-none",
|
|
516
511
|
style: M({ animationDelay: `${t * 60}ms` })
|
|
517
512
|
}, [
|
|
518
|
-
r === 0 ? (s(),
|
|
513
|
+
r === 0 ? (s(), n("span", _t)) : v("", !0),
|
|
519
514
|
u("span", xt, [
|
|
520
515
|
u("span", {
|
|
521
516
|
class: "h-2.5 rounded-full bg-fill-strong",
|
|
@@ -528,26 +523,26 @@ const ot = { class: "flex flex-1 flex-col gap-2 pt-1" }, st = ["onClick", "onCon
|
|
|
528
523
|
])
|
|
529
524
|
], 4)
|
|
530
525
|
], 2))), 128)),
|
|
531
|
-
W.value ? (s(),
|
|
526
|
+
W.value ? (s(), n("td", Ct, [...d[6] || (d[6] = [
|
|
532
527
|
u("div", { class: "mx-auto h-6 w-6 animate-pulse rounded-full bg-fill motion-reduce:animate-none" }, null, -1)
|
|
533
|
-
])])) :
|
|
534
|
-
], 4))), 128)) :
|
|
535
|
-
e.display === "rows" ? (s(!0),
|
|
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({
|
|
536
531
|
key: e.rowKey(t),
|
|
537
532
|
class: "animate-row-in",
|
|
538
533
|
"data-test": "collection-row"
|
|
539
534
|
}, { ref_for: !0 }, re($), {
|
|
540
535
|
class: [e.link(t) ? "cursor-pointer" : void 0, T.value ? At : void 0, e.rowClass?.(t)],
|
|
541
536
|
style: [e.rowHeight ? { height: `${e.rowHeight}px` } : {}, ue($)],
|
|
542
|
-
onClickCapture:
|
|
543
|
-
(...r) => i(
|
|
544
|
-
onClick: (r) => i(
|
|
545
|
-
onContextmenu: (r) => i(
|
|
546
|
-
onPointerdown: (r) => i(
|
|
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)
|
|
547
542
|
}), [
|
|
548
|
-
(s(!0),
|
|
543
|
+
(s(!0), n(f, null, P(e.columns, (r, Ee) => (s(), n("td", {
|
|
549
544
|
key: String(r.key),
|
|
550
|
-
class:
|
|
545
|
+
class: g(xe(r))
|
|
551
546
|
}, [
|
|
552
547
|
S(o.$slots, H(r), {
|
|
553
548
|
item: t,
|
|
@@ -575,18 +570,18 @@ const ot = { class: "flex flex-1 flex-col gap-2 pt-1" }, st = ["onClick", "onCon
|
|
|
575
570
|
]), 1032, ["column", "item", "to", "search"])
|
|
576
571
|
])
|
|
577
572
|
], 2))), 128)),
|
|
578
|
-
W.value ? (s(),
|
|
573
|
+
W.value ? (s(), n("td", St, [
|
|
579
574
|
S(o.$slots, "actions", { item: t }, () => [
|
|
580
575
|
u("div", Lt, [
|
|
581
576
|
e.link(t) ? (s(), D(i(ze), {
|
|
582
577
|
key: 0,
|
|
583
|
-
text: i(
|
|
578
|
+
text: i(p)("core.collection.open_record"),
|
|
584
579
|
side: "left"
|
|
585
580
|
}, {
|
|
586
581
|
default: F(() => [
|
|
587
582
|
L(i(we), {
|
|
588
583
|
to: e.link(t),
|
|
589
|
-
"aria-label": `${i(
|
|
584
|
+
"aria-label": `${i(p)("core.collection.open_record")}${e.rowLabel ? `: ${e.rowLabel(t)}` : ""}`,
|
|
590
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"
|
|
591
586
|
}, {
|
|
592
587
|
default: F(() => [
|
|
@@ -599,44 +594,44 @@ const ot = { class: "flex flex-1 flex-col gap-2 pt-1" }, st = ["onClick", "onCon
|
|
|
599
594
|
}, 8, ["to", "aria-label"])
|
|
600
595
|
]),
|
|
601
596
|
_: 2
|
|
602
|
-
}, 1032, ["text"])) :
|
|
603
|
-
G.value && ee(t) ? (s(),
|
|
597
|
+
}, 1032, ["text"])) : v("", !0),
|
|
598
|
+
G.value && ee(t) ? (s(), n("button", {
|
|
604
599
|
key: 1,
|
|
605
600
|
type: "button",
|
|
606
601
|
"data-test": "collection-row-more",
|
|
607
602
|
"aria-label": ae(t),
|
|
608
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",
|
|
609
|
-
onClick: ve((r) => i(
|
|
604
|
+
onClick: ve((r) => i(y).openMenuFrom(r, t), ["stop"])
|
|
610
605
|
}, [
|
|
611
606
|
L(i(J), {
|
|
612
607
|
name: "moreLine",
|
|
613
608
|
size: 18
|
|
614
609
|
})
|
|
615
|
-
], 8, Pt)) :
|
|
610
|
+
], 8, Pt)) : v("", !0)
|
|
616
611
|
])
|
|
617
612
|
])
|
|
618
|
-
])) :
|
|
619
|
-
], 16, $t))), 128)) :
|
|
620
|
-
e.display === "failed" ? (s(),
|
|
613
|
+
])) : v("", !0)
|
|
614
|
+
], 16, $t))), 128)) : v("", !0),
|
|
615
|
+
e.display === "failed" ? (s(), n("tr", Rt, [
|
|
621
616
|
u("td", {
|
|
622
617
|
colspan: ce.value,
|
|
623
618
|
class: "!whitespace-normal py-6"
|
|
624
619
|
}, [
|
|
625
620
|
S(o.$slots, "failed")
|
|
626
621
|
], 8, Mt)
|
|
627
|
-
])) :
|
|
628
|
-
de.value ? (s(),
|
|
622
|
+
])) : v("", !0),
|
|
623
|
+
de.value ? (s(), n("tr", Et, [
|
|
629
624
|
u("td", {
|
|
630
625
|
colspan: ce.value,
|
|
631
626
|
class: "!whitespace-normal py-6 text-center"
|
|
632
627
|
}, [
|
|
633
628
|
S(o.$slots, "empty", {}, () => [
|
|
634
|
-
L(i(
|
|
635
|
-
title: i(
|
|
629
|
+
L(i(me), {
|
|
630
|
+
title: i(p)("core.collection.no_data")
|
|
636
631
|
}, null, 8, ["title"])
|
|
637
632
|
])
|
|
638
633
|
], 8, It)
|
|
639
|
-
])) :
|
|
634
|
+
])) : v("", !0)
|
|
640
635
|
], 16)
|
|
641
636
|
], 10, vt)
|
|
642
637
|
], 4)
|
|
@@ -645,19 +640,19 @@ const ot = { class: "flex flex-1 flex-col gap-2 pt-1" }, st = ["onClick", "onCon
|
|
|
645
640
|
key: 2,
|
|
646
641
|
ref_key: "rowMenu",
|
|
647
642
|
ref: ie,
|
|
648
|
-
items: i(
|
|
649
|
-
label: i(
|
|
650
|
-
}, null, 8, ["items", "label"])) :
|
|
643
|
+
items: i(y).menuItems.value,
|
|
644
|
+
label: i(y).menuLabel.value
|
|
645
|
+
}, null, 8, ["items", "label"])) : v("", !0)
|
|
651
646
|
], 64));
|
|
652
647
|
}
|
|
653
648
|
});
|
|
654
|
-
function
|
|
655
|
-
const
|
|
656
|
-
return { narrow:
|
|
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) };
|
|
657
652
|
}
|
|
658
653
|
export {
|
|
659
|
-
|
|
654
|
+
Xt as _,
|
|
660
655
|
ke as a,
|
|
661
656
|
V as b,
|
|
662
|
-
|
|
657
|
+
qt as u
|
|
663
658
|
};
|