@wssto2/vue-core 0.9.4 → 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 +24 -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.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/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
package/dist/content/index.js
CHANGED
|
@@ -1,75 +1,337 @@
|
|
|
1
|
-
import { _ as I,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { _ as
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { defineComponent as $, computed as g, openBlock as t, createElementBlock as r, Fragment as V, renderList as z, toDisplayString as x, createCommentVNode as k, createElementVNode as p, normalizeClass as _, createVNode as E, unref as b, renderSlot as M, createTextVNode as L, createBlock as w, useModel as U, useId as F, useTemplateRef as R, watch as H, nextTick as I, withModifiers as Z, withDirectives as G, vModelText as O, mergeModels as T, ref as A, withCtx as C, createSlots as P, resolveDynamicComponent as q } from "vue";
|
|
2
|
+
import { useI18n as D } from "vue-i18n";
|
|
3
|
+
import { u as K, t as j } from "../format-D8KUBmbS.js";
|
|
4
|
+
import { _ as S } from "../Icon.vue_vue_type_script_lang-BhhsFYwp.js";
|
|
5
|
+
import { _ as J } from "../Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
|
|
6
|
+
import { i as ze } from "../Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
|
|
7
|
+
import { _ as Q } from "../KeyValue.vue_vue_type_script_setup_true_lang-wcZcvnow.js";
|
|
8
|
+
import { _ as De } from "../Panel.vue_vue_type_script_setup_true_lang-D_Wg42hu.js";
|
|
9
|
+
import { _ as Ae } from "../Timestamp.vue_vue_type_script_setup_true_lang-ClZAAUMd.js";
|
|
10
|
+
const W = ["aria-label"], X = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "py-1.5 text-center text-caption font-semibold text-content-muted",
|
|
13
|
+
"data-test": "activity-day"
|
|
14
|
+
}, Y = { class: "flex min-w-0 flex-col gap-3.5 compact:gap-3" }, ee = {
|
|
15
|
+
key: 0,
|
|
16
|
+
"data-test": "activity-event",
|
|
17
|
+
class: "flex min-w-0 items-center gap-2.5 py-0.5 compact:items-start"
|
|
18
|
+
}, te = { class: "flex min-w-0 flex-1 items-center gap-3 compact:flex-col compact:items-start compact:gap-1" }, se = { class: "flex min-w-0 flex-1 flex-wrap items-center gap-x-1.5 gap-y-1 text-subheadline text-content-strong" }, ae = { class: "shrink-0 text-footnote text-content-muted" }, oe = ["data-mine"], ne = /* @__PURE__ */ $({
|
|
19
|
+
__name: "ActivityStream",
|
|
20
|
+
props: {
|
|
21
|
+
items: {},
|
|
22
|
+
label: { default: void 0 }
|
|
23
|
+
},
|
|
24
|
+
setup(d) {
|
|
25
|
+
const o = d, { t: s } = D(), n = K(), f = {
|
|
26
|
+
neutral: "bg-status-neutral-surface text-status-neutral-content",
|
|
27
|
+
info: "bg-status-info-surface text-status-info-content",
|
|
28
|
+
warning: "bg-status-warning-surface text-status-warning-content",
|
|
29
|
+
critical: "bg-status-danger-surface text-status-danger-content",
|
|
30
|
+
positive: "bg-status-success-surface text-status-success-content"
|
|
31
|
+
}, a = (c) => j(c.at)?.getTime() ?? 0;
|
|
32
|
+
function v(c) {
|
|
33
|
+
const m = j(c);
|
|
34
|
+
if (!m) return "";
|
|
35
|
+
const l = Math.round(((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0) - new Date(m).setHours(0, 0, 0, 0)) / 864e5);
|
|
36
|
+
return l === 0 ? s("core.activity.today") : l === 1 ? s("core.activity.yesterday") : n.date(m);
|
|
37
|
+
}
|
|
38
|
+
const h = g(() => {
|
|
39
|
+
const c = o.items.map((l, e) => ({ item: l, index: e })).sort((l, e) => a(l.item) - a(e.item) || l.index - e.index).map(({ item: l }) => l), m = [];
|
|
40
|
+
for (const l of c) {
|
|
41
|
+
const e = a(l) > 0 ? new Date(l.at).toDateString() : "", B = m[m.length - 1];
|
|
42
|
+
B && B.key === e ? B.items.push(l) : m.push({ key: e, label: v(l.at), items: [l] });
|
|
43
|
+
}
|
|
44
|
+
return m;
|
|
45
|
+
}), y = (c, m) => [c, n.time(m)].filter(Boolean).join(" · "), u = (c) => c, i = (c) => c;
|
|
46
|
+
return (c, m) => (t(), r("div", {
|
|
47
|
+
"data-test": "activity-stream",
|
|
48
|
+
class: "flex min-w-0 flex-col gap-3.5 compact:gap-3",
|
|
49
|
+
"aria-label": o.label,
|
|
50
|
+
role: "group"
|
|
51
|
+
}, [
|
|
52
|
+
(t(!0), r(V, null, z(h.value, (l) => (t(), r("section", {
|
|
53
|
+
key: l.key,
|
|
54
|
+
class: "flex min-w-0 flex-col gap-3.5 compact:gap-3"
|
|
55
|
+
}, [
|
|
56
|
+
l.label ? (t(), r("h4", X, x(l.label), 1)) : k("", !0),
|
|
57
|
+
p("ol", Y, [
|
|
58
|
+
(t(!0), r(V, null, z(l.items, (e) => (t(), r("li", {
|
|
59
|
+
key: `${e.kind}-${e.id}`,
|
|
60
|
+
class: "min-w-0"
|
|
61
|
+
}, [
|
|
62
|
+
e.kind === "event" ? (t(), r("div", ee, [
|
|
63
|
+
p("span", {
|
|
64
|
+
"aria-hidden": "true",
|
|
65
|
+
class: _(["flex size-7 shrink-0 items-center justify-center rounded-full", f[u(e).tone ?? "neutral"]])
|
|
66
|
+
}, [
|
|
67
|
+
E(b(S), {
|
|
68
|
+
name: u(e).icon,
|
|
69
|
+
size: 14
|
|
70
|
+
}, null, 8, ["name"])
|
|
71
|
+
], 2),
|
|
72
|
+
p("div", te, [
|
|
73
|
+
p("div", se, [
|
|
74
|
+
M(c.$slots, "event", {
|
|
75
|
+
item: u(e)
|
|
76
|
+
}, () => [
|
|
77
|
+
L(x(u(e).text), 1)
|
|
78
|
+
])
|
|
79
|
+
]),
|
|
80
|
+
p("span", ae, x(y(u(e).actor, e.at)), 1)
|
|
81
|
+
])
|
|
82
|
+
])) : (t(), r("div", {
|
|
83
|
+
key: 1,
|
|
84
|
+
"data-test": "activity-comment",
|
|
85
|
+
"data-mine": i(e).mine ? "true" : void 0,
|
|
86
|
+
class: _(["flex min-w-0 items-end gap-2", i(e).mine ? "justify-end" : ""])
|
|
87
|
+
}, [
|
|
88
|
+
i(e).mine ? k("", !0) : (t(), w(J, {
|
|
89
|
+
key: 0,
|
|
90
|
+
src: i(e).avatarUrl,
|
|
91
|
+
name: i(e).author,
|
|
92
|
+
size: "md"
|
|
93
|
+
}, null, 8, ["src", "name"])),
|
|
94
|
+
p("div", {
|
|
95
|
+
class: _(["flex max-w-[78%] min-w-0 flex-col gap-1", i(e).mine ? "items-end" : "items-start"])
|
|
96
|
+
}, [
|
|
97
|
+
p("p", {
|
|
98
|
+
class: _(["rounded-2xl px-3.5 py-2 text-body break-words whitespace-pre-line text-content-strong", i(e).mine ? "rounded-br-md bg-surface-selected" : "rounded-bl-md bg-surface-cell shadow-group"])
|
|
99
|
+
}, x(i(e).body), 3),
|
|
100
|
+
p("span", {
|
|
101
|
+
class: _(["flex flex-wrap items-center gap-1.5 px-1 text-caption text-content-muted", i(e).mine ? "justify-end" : ""])
|
|
102
|
+
}, [
|
|
103
|
+
L(x(y(i(e).author, e.at)) + " ", 1),
|
|
104
|
+
M(c.$slots, "comment-meta", {
|
|
105
|
+
item: i(e)
|
|
106
|
+
}),
|
|
107
|
+
M(c.$slots, "comment-actions", {
|
|
108
|
+
item: i(e)
|
|
109
|
+
})
|
|
110
|
+
], 2)
|
|
111
|
+
], 2)
|
|
112
|
+
], 10, oe))
|
|
113
|
+
]))), 128))
|
|
114
|
+
])
|
|
115
|
+
]))), 128))
|
|
116
|
+
], 8, W));
|
|
117
|
+
}
|
|
118
|
+
}), le = ["for"], re = ["id", "maxlength", "placeholder", "disabled"], ie = ["disabled", "aria-label"], ce = /* @__PURE__ */ $({
|
|
119
|
+
__name: "Composer",
|
|
120
|
+
props: /* @__PURE__ */ T({
|
|
121
|
+
placeholder: { default: void 0 },
|
|
122
|
+
label: { default: void 0 },
|
|
123
|
+
maxLength: { default: 2e3 },
|
|
124
|
+
disabled: { type: Boolean, default: !1 },
|
|
125
|
+
processing: { type: Boolean, default: !1 }
|
|
126
|
+
}, {
|
|
127
|
+
modelValue: { default: "" },
|
|
128
|
+
modelModifiers: {}
|
|
129
|
+
}),
|
|
130
|
+
emits: /* @__PURE__ */ T(["submit"], ["update:modelValue"]),
|
|
131
|
+
setup(d, { expose: o, emit: s }) {
|
|
132
|
+
const n = d, f = s, a = U(d, "modelValue"), { t: v } = D(), h = F(), y = R("field"), u = g(() => n.placeholder ?? v("core.comments.placeholder")), i = g(() => !n.disabled && !n.processing && a.value.trim().length > 0);
|
|
133
|
+
function c() {
|
|
134
|
+
const e = y.value;
|
|
135
|
+
e && (e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, 192)}px`);
|
|
136
|
+
}
|
|
137
|
+
H(a, () => I(c));
|
|
138
|
+
function m() {
|
|
139
|
+
i.value && f("submit", a.value.trim());
|
|
140
|
+
}
|
|
141
|
+
function l(e) {
|
|
142
|
+
e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), m());
|
|
143
|
+
}
|
|
144
|
+
return o({ focus: () => y.value?.focus() }), (e, B) => (t(), r("form", {
|
|
145
|
+
"data-test": "composer",
|
|
146
|
+
class: "flex items-end gap-2",
|
|
147
|
+
onSubmit: Z(m, ["prevent"])
|
|
148
|
+
}, [
|
|
149
|
+
p("label", {
|
|
150
|
+
for: b(h),
|
|
151
|
+
class: "sr-only"
|
|
152
|
+
}, x(n.label ?? u.value), 9, le),
|
|
153
|
+
G(p("textarea", {
|
|
154
|
+
id: b(h),
|
|
155
|
+
ref_key: "field",
|
|
156
|
+
ref: y,
|
|
157
|
+
"onUpdate:modelValue": B[0] || (B[0] = (N) => a.value = N),
|
|
158
|
+
rows: "1",
|
|
159
|
+
maxlength: n.maxLength,
|
|
160
|
+
placeholder: u.value,
|
|
161
|
+
disabled: n.disabled,
|
|
162
|
+
"data-test": "composer-input",
|
|
163
|
+
class: "block max-h-48 min-h-10 min-w-0 flex-1 resize-none rounded-3xl border-0 bg-surface-cell px-3.5 py-2.5 text-body text-content-strong ring-1 ring-border-separator ring-inset placeholder:text-content-disabled focus:outline-2 focus:outline-offset-0 focus:outline-border-focus focus:ring-0 disabled:cursor-not-allowed disabled:bg-fill compact:min-h-[2.375rem] compact:py-2",
|
|
164
|
+
onKeydown: l
|
|
165
|
+
}, null, 40, re), [
|
|
166
|
+
[O, a.value]
|
|
167
|
+
]),
|
|
168
|
+
p("button", {
|
|
169
|
+
type: "submit",
|
|
170
|
+
"data-test": "composer-send",
|
|
171
|
+
disabled: !i.value,
|
|
172
|
+
"aria-label": b(v)("core.comments.send"),
|
|
173
|
+
class: _(["hit-target relative mb-0.5 flex size-9 shrink-0 items-center justify-center rounded-full transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus compact:size-[2.125rem]", i.value ? "cursor-pointer bg-tint text-content-on-tint hover:bg-tint/90" : "cursor-not-allowed bg-fill-strong text-surface-cell"])
|
|
174
|
+
}, [
|
|
175
|
+
n.processing ? (t(), w(b(S), {
|
|
176
|
+
key: 0,
|
|
177
|
+
name: "loader4Line",
|
|
178
|
+
size: 18,
|
|
179
|
+
class: "animate-spin"
|
|
180
|
+
})) : (t(), w(b(S), {
|
|
181
|
+
key: 1,
|
|
182
|
+
name: "arrowUpSLine",
|
|
183
|
+
size: 20
|
|
184
|
+
}))
|
|
185
|
+
], 10, ie)
|
|
186
|
+
], 32));
|
|
187
|
+
}
|
|
188
|
+
}), ue = {
|
|
189
|
+
class: "flex min-w-0 flex-col gap-3",
|
|
190
|
+
"data-test": "comment-thread"
|
|
191
|
+
}, de = {
|
|
192
|
+
key: 0,
|
|
193
|
+
class: "px-1 text-subheadline font-semibold text-content-strong compact:text-footnote compact:font-normal compact:uppercase compact:tracking-wide compact:text-content-muted"
|
|
194
|
+
}, me = {
|
|
195
|
+
key: 1,
|
|
196
|
+
class: "px-1 text-body text-content-muted",
|
|
197
|
+
"data-test": "comment-thread-empty"
|
|
198
|
+
}, pe = ["disabled", "aria-label", "title", "onClick"], we = /* @__PURE__ */ $({
|
|
199
|
+
__name: "CommentThread",
|
|
200
|
+
props: {
|
|
201
|
+
comments: {},
|
|
202
|
+
canAdd: { type: Boolean, default: !1 },
|
|
203
|
+
canRemove: { type: Boolean, default: !1 },
|
|
204
|
+
disabled: { type: Boolean, default: !1 },
|
|
205
|
+
title: { default: void 0 },
|
|
206
|
+
hideTitle: { type: Boolean, default: !1 },
|
|
207
|
+
maxLength: { default: 2e3 },
|
|
208
|
+
onAdd: { type: Function, default: void 0 }
|
|
209
|
+
},
|
|
210
|
+
emits: ["remove"],
|
|
211
|
+
setup(d, { emit: o }) {
|
|
212
|
+
const s = d, n = o, { t: f } = D(), a = A(""), v = A(!1), h = g(
|
|
213
|
+
() => s.comments.map((u) => ({
|
|
214
|
+
kind: "comment",
|
|
215
|
+
id: u.id,
|
|
216
|
+
at: u.createdAt ?? null,
|
|
217
|
+
body: u.body,
|
|
218
|
+
author: u.author,
|
|
219
|
+
avatarUrl: u.avatarUrl,
|
|
220
|
+
mine: u.mine,
|
|
221
|
+
source: u
|
|
222
|
+
}))
|
|
223
|
+
);
|
|
224
|
+
async function y(u) {
|
|
225
|
+
v.value = !0;
|
|
226
|
+
try {
|
|
227
|
+
await s.onAdd?.(u) !== !1 && (a.value = "");
|
|
228
|
+
} finally {
|
|
229
|
+
v.value = !1;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
return (u, i) => (t(), r("section", ue, [
|
|
233
|
+
s.hideTitle ? k("", !0) : (t(), r("h3", de, x(s.title ?? b(f)("core.comments.title")), 1)),
|
|
234
|
+
s.comments.length === 0 ? (t(), r("p", me, x(b(f)("core.comments.none")), 1)) : (t(), w(ne, {
|
|
235
|
+
key: 2,
|
|
236
|
+
items: h.value,
|
|
237
|
+
label: s.title ?? b(f)("core.comments.title")
|
|
238
|
+
}, {
|
|
239
|
+
"comment-actions": C(({ item: c }) => [
|
|
240
|
+
s.canRemove ? (t(), r("button", {
|
|
241
|
+
key: 0,
|
|
242
|
+
type: "button",
|
|
243
|
+
"data-test": "comment-remove",
|
|
244
|
+
class: "hit-target relative inline-flex size-5 cursor-pointer items-center justify-center rounded-full text-content-muted transition-colors duration-motion-fast hover:text-content-destructive focus-visible:outline-2 focus-visible:outline-border-focus disabled:cursor-not-allowed disabled:opacity-40",
|
|
245
|
+
disabled: s.disabled,
|
|
246
|
+
"aria-label": b(f)("core.comments.remove"),
|
|
247
|
+
title: b(f)("core.comments.remove"),
|
|
248
|
+
onClick: (m) => n("remove", c.source)
|
|
249
|
+
}, [
|
|
250
|
+
E(b(S), {
|
|
251
|
+
name: "deleteBin2Line",
|
|
252
|
+
size: 14
|
|
253
|
+
})
|
|
254
|
+
], 8, pe)) : k("", !0)
|
|
255
|
+
]),
|
|
256
|
+
_: 1
|
|
257
|
+
}, 8, ["items", "label"])),
|
|
258
|
+
s.canAdd ? (t(), w(ce, {
|
|
259
|
+
key: 3,
|
|
260
|
+
modelValue: a.value,
|
|
261
|
+
"onUpdate:modelValue": i[0] || (i[0] = (c) => a.value = c),
|
|
262
|
+
"max-length": s.maxLength,
|
|
263
|
+
disabled: s.disabled,
|
|
264
|
+
processing: v.value,
|
|
265
|
+
onSubmit: y
|
|
266
|
+
}, null, 8, ["modelValue", "max-length", "disabled", "processing"])) : k("", !0)
|
|
267
|
+
]));
|
|
268
|
+
}
|
|
269
|
+
}), fe = {
|
|
8
270
|
role: "separator",
|
|
9
271
|
class: "my-2 flex items-center gap-4"
|
|
10
|
-
},
|
|
272
|
+
}, be = {
|
|
11
273
|
key: 0,
|
|
12
274
|
class: "select-none whitespace-nowrap font-mono text-2xs uppercase tracking-widest text-content-muted"
|
|
13
|
-
},
|
|
275
|
+
}, $e = /* @__PURE__ */ $({
|
|
14
276
|
__name: "Divider",
|
|
15
277
|
props: {
|
|
16
278
|
label: {}
|
|
17
279
|
},
|
|
18
|
-
setup(
|
|
19
|
-
return (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
280
|
+
setup(d) {
|
|
281
|
+
return (o, s) => (t(), r("div", fe, [
|
|
282
|
+
s[0] || (s[0] = p("span", { class: "h-px flex-1 bg-border-separator" }, null, -1)),
|
|
283
|
+
d.label ? (t(), r("span", be, x(d.label), 1)) : k("", !0),
|
|
284
|
+
s[1] || (s[1] = p("span", { class: "h-px flex-1 bg-border-separator" }, null, -1))
|
|
23
285
|
]));
|
|
24
286
|
}
|
|
25
|
-
}),
|
|
287
|
+
}), Be = /* @__PURE__ */ $({
|
|
26
288
|
__name: "KeyValueList",
|
|
27
289
|
props: {
|
|
28
290
|
items: {},
|
|
29
291
|
columns: { default: 1 }
|
|
30
292
|
},
|
|
31
|
-
setup(
|
|
32
|
-
const
|
|
293
|
+
setup(d) {
|
|
294
|
+
const o = d, s = {
|
|
33
295
|
1: "grid-cols-1",
|
|
34
296
|
2: "grid-cols-1 sm:grid-cols-2",
|
|
35
297
|
3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"
|
|
36
298
|
};
|
|
37
|
-
return (
|
|
38
|
-
class:
|
|
299
|
+
return (n, f) => (t(), r("dl", {
|
|
300
|
+
class: _(["grid gap-x-6 gap-y-3", s[o.columns]])
|
|
39
301
|
}, [
|
|
40
|
-
(t(!0),
|
|
41
|
-
key:
|
|
42
|
-
label:
|
|
43
|
-
value:
|
|
44
|
-
"data-key":
|
|
45
|
-
},
|
|
46
|
-
|
|
302
|
+
(t(!0), r(V, null, z(o.items, (a) => (t(), w(Q, {
|
|
303
|
+
key: a.key,
|
|
304
|
+
label: a.label,
|
|
305
|
+
value: a.value,
|
|
306
|
+
"data-key": a.key
|
|
307
|
+
}, P({ _: 2 }, [
|
|
308
|
+
n.$slots.value ? {
|
|
47
309
|
name: "default",
|
|
48
|
-
fn:
|
|
49
|
-
|
|
310
|
+
fn: C(() => [
|
|
311
|
+
M(n.$slots, "value", { item: a })
|
|
50
312
|
]),
|
|
51
313
|
key: "0"
|
|
52
314
|
} : void 0
|
|
53
315
|
]), 1032, ["label", "value", "data-key"]))), 128))
|
|
54
316
|
], 2));
|
|
55
317
|
}
|
|
56
|
-
}),
|
|
318
|
+
}), Me = /* @__PURE__ */ $({
|
|
57
319
|
__name: "MicroLabel",
|
|
58
320
|
props: {
|
|
59
321
|
as: { default: "span" }
|
|
60
322
|
},
|
|
61
|
-
setup(
|
|
62
|
-
return (
|
|
63
|
-
default:
|
|
64
|
-
|
|
323
|
+
setup(d) {
|
|
324
|
+
return (o, s) => (t(), w(q(d.as), { class: "text-2xs font-semibold uppercase tracking-[0.06em] text-content-muted" }, {
|
|
325
|
+
default: C(() => [
|
|
326
|
+
M(o.$slots, "default")
|
|
65
327
|
]),
|
|
66
328
|
_: 3
|
|
67
329
|
}));
|
|
68
330
|
}
|
|
69
|
-
}),
|
|
331
|
+
}), xe = {
|
|
70
332
|
key: 0,
|
|
71
333
|
class: "mr-0.5"
|
|
72
|
-
},
|
|
334
|
+
}, Ve = /* @__PURE__ */ $({
|
|
73
335
|
__name: "Money",
|
|
74
336
|
props: {
|
|
75
337
|
amount: {},
|
|
@@ -79,32 +341,35 @@ const V = {
|
|
|
79
341
|
emptyZero: { type: Boolean, default: !1 },
|
|
80
342
|
signed: { type: Boolean, default: !1 }
|
|
81
343
|
},
|
|
82
|
-
setup(
|
|
83
|
-
const
|
|
84
|
-
return (
|
|
85
|
-
class:
|
|
344
|
+
setup(d) {
|
|
345
|
+
const o = d, s = K(), n = g(() => typeof o.amount == "number" && Number.isFinite(o.amount) ? o.amount : 0), f = g(() => o.emptyZero && !n.value), a = g(() => !o.signed || !n.value || !Math.round(Math.abs(n.value) * 10 ** o.decimals) ? "" : n.value > 0 ? "+" : "−"), v = g(() => s.money(o.signed ? Math.abs(n.value) : n.value, { decimals: o.decimals, whole: o.whole, symbol: !1 })), h = g(() => a.value === "+" ? "font-medium text-status-success-content" : a.value === "−" ? "font-medium text-status-danger-content" : ""), y = g(() => o.symbol ? s.currencySymbol : "");
|
|
346
|
+
return (u, i) => (t(), r("span", {
|
|
347
|
+
class: _(["whitespace-nowrap tabular-nums", h.value])
|
|
86
348
|
}, [
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
], 64)) : (t(),
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
y.value ? (t(),
|
|
349
|
+
f.value ? (t(), r(V, { key: 0 }, [
|
|
350
|
+
L("—")
|
|
351
|
+
], 64)) : (t(), r(V, { key: 1 }, [
|
|
352
|
+
a.value ? (t(), r("span", xe, x(a.value), 1)) : k("", !0),
|
|
353
|
+
L(x(v.value), 1),
|
|
354
|
+
y.value ? (t(), r("span", {
|
|
93
355
|
key: 1,
|
|
94
|
-
class:
|
|
95
|
-
},
|
|
356
|
+
class: _(["ml-1 font-normal", h.value ? "opacity-75" : "text-content-muted"])
|
|
357
|
+
}, x(y.value), 3)) : k("", !0)
|
|
96
358
|
], 64))
|
|
97
359
|
], 2));
|
|
98
360
|
}
|
|
99
361
|
});
|
|
100
362
|
export {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
363
|
+
ne as ActivityStream,
|
|
364
|
+
J as Avatar,
|
|
365
|
+
we as CommentThread,
|
|
366
|
+
ce as Composer,
|
|
367
|
+
$e as Divider,
|
|
368
|
+
Q as KeyValue,
|
|
369
|
+
Be as KeyValueList,
|
|
370
|
+
Me as MicroLabel,
|
|
371
|
+
Ve as Money,
|
|
372
|
+
De as Panel,
|
|
373
|
+
Ae as Timestamp,
|
|
374
|
+
ze as initialsFor
|
|
110
375
|
};
|
package/dist/controls/index.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { defineComponent as p, useSlots as c, openBlock as
|
|
3
|
-
import { _ as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { _ as
|
|
7
|
-
import {
|
|
8
|
-
|
|
1
|
+
import { _ as C } from "../IconTile.vue_vue_type_script_setup_true_lang-BmxCuUZ9.js";
|
|
2
|
+
import { defineComponent as p, useSlots as c, openBlock as o, createElementBlock as a, normalizeClass as u, createElementVNode as f, renderSlot as m, toDisplayString as x, createVNode as b, unref as _ } from "vue";
|
|
3
|
+
import { _ as v } from "../Icon.vue_vue_type_script_lang-BhhsFYwp.js";
|
|
4
|
+
import { _ as z } from "../DateButton.vue_vue_type_script_setup_true_lang-CovKG5lN.js";
|
|
5
|
+
import { _ as I } from "../SearchInput.vue_vue_type_script_setup_true_lang-w4eAqyZ9.js";
|
|
6
|
+
import { _ as T } from "../Tabs.vue_vue_type_script_setup_true_lang-tpkGp98F.js";
|
|
7
|
+
import { _ as W } from "../SwipeActions.vue_vue_type_script_setup_true_lang-D8SiC0G7.js";
|
|
8
|
+
import { c as A, a as L, b as U, d as j } from "../controlSurface-t7OEFESJ.js";
|
|
9
|
+
const h = ["disabled", "aria-haspopup", "aria-expanded", "aria-invalid"], y = { class: "min-w-0 truncate" }, g = {
|
|
9
10
|
key: 1,
|
|
10
11
|
class: "text-content-disabled"
|
|
11
|
-
},
|
|
12
|
+
}, S = /* @__PURE__ */ p({
|
|
12
13
|
__name: "PopupButton",
|
|
13
14
|
props: {
|
|
14
15
|
variant: { default: "filled" },
|
|
@@ -19,64 +20,37 @@ const S = ["disabled", "aria-haspopup", "aria-expanded", "aria-invalid"], V = {
|
|
|
19
20
|
popup: { default: "listbox" }
|
|
20
21
|
},
|
|
21
22
|
emits: ["click"],
|
|
22
|
-
setup(
|
|
23
|
-
const e =
|
|
24
|
-
return (
|
|
23
|
+
setup(n, { emit: i }) {
|
|
24
|
+
const e = n, s = i, l = c();
|
|
25
|
+
return (r, t) => (o(), a("button", {
|
|
25
26
|
type: "button",
|
|
26
27
|
disabled: e.disabled,
|
|
27
28
|
"aria-haspopup": e.popup,
|
|
28
29
|
"aria-expanded": e.expanded,
|
|
29
30
|
"aria-invalid": e.invalid || void 0,
|
|
30
31
|
class: u(["hit-target inline-flex min-w-0 max-w-full items-center gap-1.5 rounded-control text-body transition-colors duration-motion-fast ease-motion-standard focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus disabled:cursor-not-allowed disabled:opacity-45", e.variant === "filled" ? ["py-1 pl-2.5 pr-2 text-content-strong", e.expanded ? "bg-fill-strong" : "bg-fill hover:bg-fill-strong"] : ["py-1", e.expanded ? "text-content-link" : "text-content-muted hover:text-content"]]),
|
|
31
|
-
onClick: t[0] || (t[0] = (
|
|
32
|
+
onClick: t[0] || (t[0] = (d) => s("click", d))
|
|
32
33
|
}, [
|
|
33
|
-
f("span",
|
|
34
|
-
l.default ? m(
|
|
34
|
+
f("span", y, [
|
|
35
|
+
l.default ? m(r.$slots, "default", {}, void 0, void 0, 0) : (o(), a("span", g, x(e.placeholder), 1))
|
|
35
36
|
]),
|
|
36
|
-
|
|
37
|
+
b(_(v), {
|
|
37
38
|
name: "expandUpDownLine",
|
|
38
39
|
size: 14,
|
|
39
40
|
class: "text-content-muted"
|
|
40
41
|
})
|
|
41
|
-
], 10,
|
|
42
|
-
}
|
|
43
|
-
}), $ = ["aria-label", "placeholder"], C = /* @__PURE__ */ p({
|
|
44
|
-
inheritAttrs: !1,
|
|
45
|
-
__name: "SearchInput",
|
|
46
|
-
props: /* @__PURE__ */ w({
|
|
47
|
-
label: {},
|
|
48
|
-
placeholder: {}
|
|
49
|
-
}, {
|
|
50
|
-
modelValue: { required: !0 },
|
|
51
|
-
modelModifiers: {}
|
|
52
|
-
}),
|
|
53
|
-
emits: ["update:modelValue"],
|
|
54
|
-
setup(o, { expose: n }) {
|
|
55
|
-
const e = v(o, "modelValue"), a = o, l = _("input");
|
|
56
|
-
return n({ focus: () => l.value?.focus() }), (s, t) => y((r(), d("input", g({
|
|
57
|
-
ref_key: "input",
|
|
58
|
-
ref: l,
|
|
59
|
-
"onUpdate:modelValue": t[0] || (t[0] = (i) => e.value = i),
|
|
60
|
-
type: "search",
|
|
61
|
-
enterkeyhint: "search",
|
|
62
|
-
autocomplete: "off",
|
|
63
|
-
spellcheck: "false",
|
|
64
|
-
"aria-label": a.label,
|
|
65
|
-
placeholder: a.placeholder
|
|
66
|
-
}, s.$attrs, { class: "min-w-0 flex-1 bg-transparent text-title outline-none placeholder:text-content-disabled [&::-webkit-search-cancel-button]:hidden" }), null, 16, $)), [
|
|
67
|
-
[k, e.value]
|
|
68
|
-
]);
|
|
42
|
+
], 10, h));
|
|
69
43
|
}
|
|
70
44
|
});
|
|
71
45
|
export {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
46
|
+
z as DateButton,
|
|
47
|
+
C as IconTile,
|
|
48
|
+
S as PopupButton,
|
|
49
|
+
I as SearchInput,
|
|
50
|
+
W as SwipeActions,
|
|
51
|
+
T as Tabs,
|
|
52
|
+
A as controlSurface,
|
|
53
|
+
L as controlSurfacePairs,
|
|
54
|
+
U as controlWidth,
|
|
55
|
+
j as controlWidthPair
|
|
82
56
|
};
|