@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
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
var ue = Object.defineProperty;
|
|
2
|
+
var ce = (o, e, t) => e in o ? ue(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
|
+
var q = (o, e, t) => ce(o, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { shallowRef as W, computed as p, toRaw as de, reactive as fe, ref as R, watch as me, nextTick as pe, toValue as ve, defineComponent as Y, unref as O, openBlock as v, createBlock as J, withCtx as ae, createElementBlock as k, toDisplayString as w, createCommentVNode as h, Fragment as z, createElementVNode as M, normalizeClass as N, renderList as ge, createTextVNode as S, inject as ne, provide as P, useSlots as he, shallowReactive as te, useTemplateRef as ye, useId as be, normalizeStyle as ke, renderSlot as I } from "vue";
|
|
5
|
+
import { useI18n as Q } from "vue-i18n";
|
|
6
|
+
import { i as _e, a as L } from "./error-CD7x0Jrz.js";
|
|
7
|
+
import { d as we, u as je, a as Ee } from "./describeError-B-NMa--w.js";
|
|
8
|
+
import { _ as Oe } from "./Banner.vue_vue_type_script_setup_true_lang-sv0phngk.js";
|
|
9
|
+
import { s as xe, u as $e } from "./sectionIndex-BS0ic5W7.js";
|
|
10
|
+
import { d as re, i as Ae } from "./options-B48UiYsG.js";
|
|
11
|
+
import { _ as Fe } from "./Button.vue_vue_type_script_setup_true_lang-C74hcb0N.js";
|
|
12
|
+
class Be {
|
|
13
|
+
constructor() {
|
|
14
|
+
q(this, "messages", W({}));
|
|
15
|
+
/** How many fields have a message. */
|
|
16
|
+
q(this, "count", p(() => Object.keys(this.messages.value).length));
|
|
17
|
+
}
|
|
18
|
+
/** Replaces everything. Empty lists are dropped. */
|
|
19
|
+
set(e) {
|
|
20
|
+
this.messages.value = Object.fromEntries(Object.entries(e).filter(([, t]) => t.length > 0).map(([t, r]) => [t, [...r]]));
|
|
21
|
+
}
|
|
22
|
+
add(e, t) {
|
|
23
|
+
this.messages.value = { ...this.messages.value, [e]: [...this.messages.value[e] ?? [], t] };
|
|
24
|
+
}
|
|
25
|
+
/** Clears one field (and its nested paths), or everything. */
|
|
26
|
+
clear(e) {
|
|
27
|
+
if (e === void 0) {
|
|
28
|
+
this.count.value > 0 && (this.messages.value = {});
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const t = Object.fromEntries(Object.entries(this.messages.value).filter(([r]) => r !== e && !r.startsWith(`${e}.`)));
|
|
32
|
+
Object.keys(t).length !== this.count.value && (this.messages.value = t);
|
|
33
|
+
}
|
|
34
|
+
/** Whether the field, or a value inside it (`items.0.quantity` for `items`), has a message. */
|
|
35
|
+
has(e) {
|
|
36
|
+
return this.first(e) !== void 0 || Object.keys(this.messages.value).some((t) => t.startsWith(`${e}.`));
|
|
37
|
+
}
|
|
38
|
+
first(e) {
|
|
39
|
+
return this.messages.value[e]?.[0];
|
|
40
|
+
}
|
|
41
|
+
all() {
|
|
42
|
+
return this.messages.value;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function m(o) {
|
|
46
|
+
const e = de(o);
|
|
47
|
+
return e === null || typeof e != "object" ? e : e instanceof Date ? new Date(e.getTime()) : typeof Blob < "u" && e instanceof Blob ? e : Array.isArray(e) ? e.map(m) : Object.fromEntries(Object.entries(e).map(([t, r]) => [t, m(r)]));
|
|
48
|
+
}
|
|
49
|
+
function H(o, e) {
|
|
50
|
+
const t = o, r = e;
|
|
51
|
+
if (Object.is(t, r)) return !0;
|
|
52
|
+
if (t === null || r === null || typeof t != "object" || typeof r != "object") return !1;
|
|
53
|
+
if (t instanceof Date || r instanceof Date) return t instanceof Date && r instanceof Date && t.getTime() === r.getTime();
|
|
54
|
+
if (Array.isArray(t) || Array.isArray(r))
|
|
55
|
+
return Array.isArray(t) && Array.isArray(r) && t.length === r.length && t.every((a, u) => H(a, r[u]));
|
|
56
|
+
if (typeof Blob < "u" && (t instanceof Blob || r instanceof Blob)) return !1;
|
|
57
|
+
const i = (a) => Object.keys(a).filter((u) => a[u] !== void 0), y = i(t);
|
|
58
|
+
return y.length === i(r).length && y.every((a) => H(t[a], r[a]));
|
|
59
|
+
}
|
|
60
|
+
function se(o) {
|
|
61
|
+
const e = {};
|
|
62
|
+
for (const t of o) {
|
|
63
|
+
const r = t.path.map(String).join(".");
|
|
64
|
+
(e[r] ?? (e[r] = [])).push(t.message);
|
|
65
|
+
}
|
|
66
|
+
return e;
|
|
67
|
+
}
|
|
68
|
+
const De = (o) => o.split(".")[0] ?? o, oe = () => typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
69
|
+
function Ke(o) {
|
|
70
|
+
const { t: e } = Q(), t = o.describeFieldError ?? we(), r = je(), i = Ee(), a = fe(m(typeof o.defaults == "function" ? o.defaults() : o.defaults)), u = W(m(a)), c = new Be(), j = R(!1), g = W(null), V = p(() => !H(a, u.value));
|
|
71
|
+
let x = null, G = oe();
|
|
72
|
+
function F(s) {
|
|
73
|
+
const n = a;
|
|
74
|
+
for (const l of Object.keys(n)) l in s || delete n[l];
|
|
75
|
+
Object.assign(n, m(s));
|
|
76
|
+
}
|
|
77
|
+
function f() {
|
|
78
|
+
c.clear(), g.value = null;
|
|
79
|
+
}
|
|
80
|
+
function $(s, n) {
|
|
81
|
+
const l = e(`core.form.failure.${s}`);
|
|
82
|
+
if (s === "refresh") return l;
|
|
83
|
+
const d = i?.(n);
|
|
84
|
+
if (d !== void 0) return d;
|
|
85
|
+
if (!L(n) || s === "invalid" && Object.keys(n.fields).length > 0) return l;
|
|
86
|
+
const A = s === "invalid" || s === "failed" && n.status !== null && n.status < 500;
|
|
87
|
+
return n.code ? r(n, { fallback: l }) : A && n.message ? r(n) : l;
|
|
88
|
+
}
|
|
89
|
+
function B(s, n) {
|
|
90
|
+
const l = L(n) ? n.requestId : null, d = o.failureMessage?.(s, n) ?? $(s, n);
|
|
91
|
+
return g.value = { kind: s, message: d, requestId: l, error: n };
|
|
92
|
+
}
|
|
93
|
+
function C(s, n = !1) {
|
|
94
|
+
const { serverField: l } = o, d = t, A = n && l ? Object.entries(s).map(([b, _]) => [l(b), _]) : Object.entries(s);
|
|
95
|
+
c.set(Object.fromEntries(d ? A.map(([b, _]) => [b, _.map((T) => d(T, b))]) : A));
|
|
96
|
+
}
|
|
97
|
+
function X() {
|
|
98
|
+
if (c.clear(), !o.validator)
|
|
99
|
+
return g.value = null, m(a);
|
|
100
|
+
const s = o.validator.safeParse(m(a));
|
|
101
|
+
return s.success ? (g.value = null, s.data) : (C(se(s.error.issues)), null);
|
|
102
|
+
}
|
|
103
|
+
function Z(s) {
|
|
104
|
+
if (c.clear(), !o.validator) return !0;
|
|
105
|
+
const n = o.validator.safeParse(m(a));
|
|
106
|
+
if (n.success) return !0;
|
|
107
|
+
const l = Object.fromEntries(Object.entries(se(n.error.issues)).filter(([d]) => s.includes(De(d))));
|
|
108
|
+
return C(l), Object.keys(l).length === 0;
|
|
109
|
+
}
|
|
110
|
+
function ie(s) {
|
|
111
|
+
if (!L(s)) return "failed";
|
|
112
|
+
switch (s.kind) {
|
|
113
|
+
case "validation":
|
|
114
|
+
return "invalid";
|
|
115
|
+
case "conflict":
|
|
116
|
+
return "conflict";
|
|
117
|
+
case "forbidden":
|
|
118
|
+
return "forbidden";
|
|
119
|
+
case "unauthorized":
|
|
120
|
+
return "unauthorized";
|
|
121
|
+
case "network":
|
|
122
|
+
return "offline";
|
|
123
|
+
default:
|
|
124
|
+
return "failed";
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
async function K(s, n, l, d) {
|
|
128
|
+
if (x) return x;
|
|
129
|
+
const b = (async () => {
|
|
130
|
+
g.value = null;
|
|
131
|
+
const _ = s();
|
|
132
|
+
if (_ === null) return { status: "failed", failure: B("invalid", null) };
|
|
133
|
+
const T = m(a);
|
|
134
|
+
let D;
|
|
135
|
+
j.value = !0;
|
|
136
|
+
try {
|
|
137
|
+
D = await n(_, { idempotencyKey: G });
|
|
138
|
+
} catch (E) {
|
|
139
|
+
if (j.value = !1, _e(E)) return { status: "aborted" };
|
|
140
|
+
const ee = ie(E);
|
|
141
|
+
return ee === "invalid" && L(E) && C(E.fields, !0), { status: "failed", failure: B(ee, E) };
|
|
142
|
+
}
|
|
143
|
+
const U = d?.hydrateFrom?.(D) ?? null;
|
|
144
|
+
U ? (F(U), u.value = m(U), c.clear()) : l(D, T);
|
|
145
|
+
try {
|
|
146
|
+
await d?.refresh?.(D);
|
|
147
|
+
} catch (E) {
|
|
148
|
+
return B("refresh", E), { status: "saved-refresh-failed", value: D, error: E };
|
|
149
|
+
} finally {
|
|
150
|
+
j.value = !1;
|
|
151
|
+
}
|
|
152
|
+
return { status: "saved", value: D };
|
|
153
|
+
})().finally(() => {
|
|
154
|
+
x = null, G = oe();
|
|
155
|
+
});
|
|
156
|
+
return x = b, b;
|
|
157
|
+
}
|
|
158
|
+
return {
|
|
159
|
+
values: a,
|
|
160
|
+
errors: c,
|
|
161
|
+
dirty: V,
|
|
162
|
+
submitting: j,
|
|
163
|
+
failure: g,
|
|
164
|
+
bind(s) {
|
|
165
|
+
return {
|
|
166
|
+
get modelValue() {
|
|
167
|
+
return a[s];
|
|
168
|
+
},
|
|
169
|
+
"onUpdate:modelValue"(n) {
|
|
170
|
+
a[s] = n, c.clear(s);
|
|
171
|
+
},
|
|
172
|
+
get error() {
|
|
173
|
+
return c.first(s);
|
|
174
|
+
},
|
|
175
|
+
"data-field-key": s
|
|
176
|
+
};
|
|
177
|
+
},
|
|
178
|
+
bindMonthYear(s, n) {
|
|
179
|
+
const l = a;
|
|
180
|
+
return {
|
|
181
|
+
get month() {
|
|
182
|
+
return l[s] ?? null;
|
|
183
|
+
},
|
|
184
|
+
get year() {
|
|
185
|
+
return l[n] ?? null;
|
|
186
|
+
},
|
|
187
|
+
"onUpdate:month"(d) {
|
|
188
|
+
l[s] = d, c.clear(s);
|
|
189
|
+
},
|
|
190
|
+
"onUpdate:year"(d) {
|
|
191
|
+
l[n] = d, c.clear(n);
|
|
192
|
+
},
|
|
193
|
+
get error() {
|
|
194
|
+
return c.first(s) ?? c.first(n);
|
|
195
|
+
},
|
|
196
|
+
"data-field-key": `${s} ${n}`
|
|
197
|
+
};
|
|
198
|
+
},
|
|
199
|
+
hydrate(s) {
|
|
200
|
+
F(s), u.value = m(s), f();
|
|
201
|
+
},
|
|
202
|
+
reset() {
|
|
203
|
+
F(u.value), f();
|
|
204
|
+
},
|
|
205
|
+
markClean() {
|
|
206
|
+
u.value = m(a);
|
|
207
|
+
},
|
|
208
|
+
validate: X,
|
|
209
|
+
check: Z,
|
|
210
|
+
submit: (s, n) => K(X, s, (l, d) => u.value = d, n),
|
|
211
|
+
submitFields: (s, n, l) => K(
|
|
212
|
+
() => Z(s) ? Object.fromEntries(s.map((d) => [d, m(a[d])])) : null,
|
|
213
|
+
n,
|
|
214
|
+
(d, A) => {
|
|
215
|
+
const b = m(u.value);
|
|
216
|
+
for (const _ of s) b[_] = m(A[_]);
|
|
217
|
+
u.value = b;
|
|
218
|
+
},
|
|
219
|
+
l
|
|
220
|
+
),
|
|
221
|
+
dismissFailure() {
|
|
222
|
+
g.value = null;
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
function Se(o) {
|
|
227
|
+
const e = R([]);
|
|
228
|
+
return me(
|
|
229
|
+
() => o.form.errors.all(),
|
|
230
|
+
async (t) => {
|
|
231
|
+
await pe();
|
|
232
|
+
const r = ve(o.root) ?? document, i = new Set([...r.querySelectorAll("[data-field-key]")].flatMap((a) => (a.getAttribute("data-field-key") ?? "").split(/\s+/))), y = (a) => a.split(".").some((u, c, j) => i.has(j.slice(0, c + 1).join(".")));
|
|
233
|
+
e.value = Object.entries(t).flatMap(([a, u]) => u[0] && !y(a) ? [{ field: a, message: u[0] }] : []);
|
|
234
|
+
},
|
|
235
|
+
{ immediate: !0 }
|
|
236
|
+
), p(() => e.value);
|
|
237
|
+
}
|
|
238
|
+
const Ge = {
|
|
239
|
+
key: 0,
|
|
240
|
+
class: "text-footnote font-medium"
|
|
241
|
+
}, Ie = {
|
|
242
|
+
class: "mt-1 list-inside list-disc text-footnote",
|
|
243
|
+
"data-test": "form-errors-hidden"
|
|
244
|
+
}, Le = {
|
|
245
|
+
key: 2,
|
|
246
|
+
class: "mt-1 text-caption text-content-muted"
|
|
247
|
+
}, et = /* @__PURE__ */ Y({
|
|
248
|
+
__name: "FormErrors",
|
|
249
|
+
props: {
|
|
250
|
+
form: {},
|
|
251
|
+
label: { type: Function, default: (o) => o },
|
|
252
|
+
scope: { default: null }
|
|
253
|
+
},
|
|
254
|
+
setup(o) {
|
|
255
|
+
const e = o, { t } = Q(), r = Se({
|
|
256
|
+
get form() {
|
|
257
|
+
return e.form;
|
|
258
|
+
},
|
|
259
|
+
root: () => e.scope
|
|
260
|
+
}), i = p(() => e.form.failure.value), y = p(() => i.value?.kind === "conflict" || i.value?.kind === "refresh" ? "warning" : "critical");
|
|
261
|
+
return (a, u) => i.value || O(r).length ? (v(), J(Oe, {
|
|
262
|
+
key: 0,
|
|
263
|
+
tone: i.value ? y.value : "warning",
|
|
264
|
+
"data-test": "form-errors"
|
|
265
|
+
}, {
|
|
266
|
+
default: ae(() => [
|
|
267
|
+
i.value ? (v(), k("p", Ge, w(i.value.message), 1)) : h("", !0),
|
|
268
|
+
O(r).length ? (v(), k(z, { key: 1 }, [
|
|
269
|
+
M("p", {
|
|
270
|
+
class: N(["text-footnote", i.value ? "mt-1" : "font-medium"])
|
|
271
|
+
}, w(O(t)("core.form.errors.hidden_title")), 3),
|
|
272
|
+
M("ul", Ie, [
|
|
273
|
+
(v(!0), k(z, null, ge(O(r), (c) => (v(), k("li", {
|
|
274
|
+
key: c.field
|
|
275
|
+
}, [
|
|
276
|
+
S(w(c.field ? e.label(c.field) : ""), 1),
|
|
277
|
+
c.field ? (v(), k(z, { key: 0 }, [
|
|
278
|
+
S(": ")
|
|
279
|
+
], 64)) : h("", !0),
|
|
280
|
+
S(w(c.message), 1)
|
|
281
|
+
]))), 128))
|
|
282
|
+
])
|
|
283
|
+
], 64)) : h("", !0),
|
|
284
|
+
i.value?.requestId ? (v(), k("p", Le, w(O(t)("core.form.errors.request", { id: i.value.requestId })), 1)) : h("", !0)
|
|
285
|
+
]),
|
|
286
|
+
_: 1
|
|
287
|
+
}, 8, ["tone"])) : h("", !0);
|
|
288
|
+
}
|
|
289
|
+
}), Me = /* @__PURE__ */ Y({
|
|
290
|
+
__name: "GroupEditAction",
|
|
291
|
+
props: {
|
|
292
|
+
allowed: { type: Boolean, default: !0 },
|
|
293
|
+
locked: { type: Boolean, default: !1 },
|
|
294
|
+
label: { default: void 0 }
|
|
295
|
+
},
|
|
296
|
+
emits: ["click"],
|
|
297
|
+
setup(o, { emit: e }) {
|
|
298
|
+
const t = o, r = e, { t: i } = Q();
|
|
299
|
+
return (y, a) => t.allowed && !t.locked ? (v(), J(Fe, {
|
|
300
|
+
key: 0,
|
|
301
|
+
prominence: "plain",
|
|
302
|
+
size: "sm",
|
|
303
|
+
"data-test": "group-edit",
|
|
304
|
+
onClick: a[0] || (a[0] = (u) => r("click"))
|
|
305
|
+
}, {
|
|
306
|
+
default: ae(() => [
|
|
307
|
+
S(w(t.label ?? O(i)("core.actions.edit")), 1)
|
|
308
|
+
]),
|
|
309
|
+
_: 1
|
|
310
|
+
})) : h("", !0);
|
|
311
|
+
}
|
|
312
|
+
}), le = Symbol("vue-core.recordGroups"), Re = () => ne(le, null);
|
|
313
|
+
function Ve() {
|
|
314
|
+
const o = /* @__PURE__ */ new Map();
|
|
315
|
+
return {
|
|
316
|
+
register(e, t) {
|
|
317
|
+
const r = o.get(t) ?? /* @__PURE__ */ new Map();
|
|
318
|
+
return r.set(e, (r.get(e) ?? 0) + 1), o.set(t, r), () => {
|
|
319
|
+
const i = (r.get(e) ?? 1) - 1;
|
|
320
|
+
i <= 0 ? r.delete(e) : r.set(e, i);
|
|
321
|
+
};
|
|
322
|
+
},
|
|
323
|
+
groupOf: (e) => o.get(e)?.keys().next().value,
|
|
324
|
+
fieldsOf: (e) => [...o.entries()].filter(([, t]) => t.has(e)).map(([t]) => t)
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
function tt(o) {
|
|
328
|
+
const e = Ve();
|
|
329
|
+
return P(le, {
|
|
330
|
+
only: R(null),
|
|
331
|
+
edit: (t, r) => o.edit(t, r),
|
|
332
|
+
editLabel: o.editLabel ? (t) => o.editLabel?.(t) : void 0,
|
|
333
|
+
register: (t, r) => e.register(t, r)
|
|
334
|
+
}), e;
|
|
335
|
+
}
|
|
336
|
+
const Ce = ["id", "data-group"], Te = {
|
|
337
|
+
key: 0,
|
|
338
|
+
class: "flex min-w-0 items-baseline gap-2 px-row-inset pb-2"
|
|
339
|
+
}, Ue = { class: "min-w-0 flex-1 text-subheadline font-semibold text-content-strong compact:text-footnote compact:font-normal compact:uppercase compact:tracking-wide compact:text-content-muted" }, qe = { class: "form-group-cell rounded-group bg-surface-cell shadow-group" }, ze = {
|
|
340
|
+
key: 1,
|
|
341
|
+
class: "px-row-inset pt-2 text-footnote text-content-muted text-pretty"
|
|
342
|
+
}, rt = /* @__PURE__ */ Y({
|
|
343
|
+
__name: "FormGroup",
|
|
344
|
+
props: {
|
|
345
|
+
header: { default: void 0 },
|
|
346
|
+
footer: { default: void 0 },
|
|
347
|
+
hideEmpty: { type: Boolean, default: !0 },
|
|
348
|
+
labelWidth: { default: "11rem" },
|
|
349
|
+
section: { type: Boolean, default: !1 },
|
|
350
|
+
anchor: { default: void 0 },
|
|
351
|
+
editable: { type: Boolean, default: void 0 },
|
|
352
|
+
lockedFooter: { default: void 0 },
|
|
353
|
+
group: { default: void 0 }
|
|
354
|
+
},
|
|
355
|
+
setup(o) {
|
|
356
|
+
const e = o, t = he(), r = ne(re, R(!0));
|
|
357
|
+
P(re, p(() => r.value && e.editable !== !1));
|
|
358
|
+
const i = te(/* @__PURE__ */ new Set()), y = p(() => [...i].some((f) => f.value)), a = Re(), u = te(/* @__PURE__ */ new Set()), c = p(() => u.size > 0 && [...u].every((f) => f.value)), j = p(() => !a?.only.value || a.only.value === e.group), g = p(() => e.group && a?.edit && !c.value ? a.edit(e.group, e.header ?? "") : null), V = p(() => !!e.group && a?.only.value === e.group);
|
|
359
|
+
P(Ae, {
|
|
360
|
+
hideEmpty: p(() => e.hideEmpty),
|
|
361
|
+
registerLocked(f) {
|
|
362
|
+
return i.add(f), () => i.delete(f);
|
|
363
|
+
},
|
|
364
|
+
registerField(f, $) {
|
|
365
|
+
u.add($);
|
|
366
|
+
const B = e.group && f && a?.register ? a.register(e.group, f) : null;
|
|
367
|
+
return () => {
|
|
368
|
+
u.delete($), B?.();
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
const x = p(() => y.value ? e.lockedFooter : void 0), G = ye("root"), F = e.anchor ?? (xe(e.header ?? "") || `group-${be()}`);
|
|
373
|
+
return e.section && $e(F, () => e.header ?? "", G), (f, $) => j.value ? (v(), k("section", {
|
|
374
|
+
key: 0,
|
|
375
|
+
ref_key: "root",
|
|
376
|
+
ref: G,
|
|
377
|
+
id: e.section ? O(F) : void 0,
|
|
378
|
+
"data-test": "form-group",
|
|
379
|
+
"data-group": e.group,
|
|
380
|
+
class: N(["form-group flex min-w-0 flex-col has-[>.form-group-cell:empty]:hidden", { "scroll-mt-4": e.section }]),
|
|
381
|
+
style: ke({ "--form-label-width": e.labelWidth })
|
|
382
|
+
}, [
|
|
383
|
+
!V.value && (e.header || t.header || t["header-trailing"] || g.value) ? (v(), k("header", Te, [
|
|
384
|
+
M("h3", Ue, [
|
|
385
|
+
I(f.$slots, "header", {}, () => [
|
|
386
|
+
S(w(e.header), 1)
|
|
387
|
+
])
|
|
388
|
+
]),
|
|
389
|
+
I(f.$slots, "header-trailing", {}, () => [
|
|
390
|
+
g.value ? (v(), J(Me, {
|
|
391
|
+
key: 0,
|
|
392
|
+
label: e.group ? O(a)?.editLabel?.(e.group) : void 0,
|
|
393
|
+
onClick: $[0] || ($[0] = (B) => g.value())
|
|
394
|
+
}, null, 8, ["label"])) : h("", !0)
|
|
395
|
+
])
|
|
396
|
+
])) : h("", !0),
|
|
397
|
+
M("div", qe, [
|
|
398
|
+
I(f.$slots, "default")
|
|
399
|
+
]),
|
|
400
|
+
e.footer || t.footer ? (v(), k("p", ze, [
|
|
401
|
+
I(f.$slots, "footer", {}, () => [
|
|
402
|
+
S(w(e.footer), 1)
|
|
403
|
+
])
|
|
404
|
+
])) : h("", !0),
|
|
405
|
+
x.value ? (v(), k("p", {
|
|
406
|
+
key: 2,
|
|
407
|
+
"data-test": "form-group-locked-footer",
|
|
408
|
+
class: N(["px-row-inset text-footnote text-content-muted text-pretty", e.footer || t.footer ? "pt-1" : "pt-2"])
|
|
409
|
+
}, w(x.value), 3)) : h("", !0)
|
|
410
|
+
], 14, Ce)) : h("", !0);
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
export {
|
|
414
|
+
Be as E,
|
|
415
|
+
et as _,
|
|
416
|
+
rt as a,
|
|
417
|
+
Me as b,
|
|
418
|
+
m as c,
|
|
419
|
+
Ve as d,
|
|
420
|
+
Se as e,
|
|
421
|
+
De as f,
|
|
422
|
+
Re as g,
|
|
423
|
+
tt as p,
|
|
424
|
+
le as r,
|
|
425
|
+
H as s,
|
|
426
|
+
Ke as u
|
|
427
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as n, provide as f, computed as s, useTemplateRef as u, openBlock as t, createElementBlock as p, withModifiers as c, createBlock as d, createCommentVNode as b, renderSlot as _ } from "vue";
|
|
2
|
-
import { d as v } from "./options-
|
|
3
|
-
import { _ as k } from "./
|
|
2
|
+
import { d as v } from "./options-B48UiYsG.js";
|
|
3
|
+
import { _ as k } from "./FormGroup.vue_vue_type_script_setup_true_lang-D6jYfNjW.js";
|
|
4
4
|
const x = /* @__PURE__ */ n({
|
|
5
5
|
__name: "FormView",
|
|
6
6
|
props: {
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import { defineComponent as R, computed as N, openBlock as i, createElementBlock as k, createVNode as o, unref as e, withCtx as u, mergeProps as c, createBlock as
|
|
1
|
+
import { defineComponent as R, computed as N, openBlock as i, createElementBlock as k, createVNode as o, unref as e, withCtx as u, mergeProps as c, createBlock as v, createCommentVNode as m, createElementVNode as p, toDisplayString as b, createTextVNode as S } from "vue";
|
|
2
2
|
import { useI18n as V } from "vue-i18n";
|
|
3
3
|
import { RouterLink as B } from "vue-router";
|
|
4
4
|
import { u as E } from "./format-D8KUBmbS.js";
|
|
5
|
-
import { u as T } from "./useResourceForm-
|
|
6
|
-
import {
|
|
7
|
-
import { _ as F } from "./FormView.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { _ as L } from "./SelectField.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { _ as f } from "./TextField.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { u as T } from "./useResourceForm-Dl6YFYyz.js";
|
|
6
|
+
import { a as h } from "./FormGroup.vue_vue_type_script_setup_true_lang-D6jYfNjW.js";
|
|
7
|
+
import { _ as F } from "./FormView.vue_vue_type_script_setup_true_lang-DvbPEiNQ.js";
|
|
8
|
+
import { _ as L } from "./SelectField.vue_vue_type_script_setup_true_lang-BZwdANL3.js";
|
|
9
|
+
import { _ as f } from "./TextField.vue_vue_type_script_setup_true_lang-CWIeeZRE.js";
|
|
10
10
|
import { u as A } from "./useSaveChrome-7huA3FzR.js";
|
|
11
|
-
import { P as D,
|
|
12
|
-
import { t as
|
|
13
|
-
import { u as
|
|
14
|
-
import { b as
|
|
15
|
-
import { u as
|
|
16
|
-
import { _ as $ } from "./ActionRow.vue_vue_type_script_setup_true_lang-Cg1lhpcA.js";
|
|
17
|
-
import { _ as z } from "./SectionIntro.vue_vue_type_script_setup_true_lang-CZtPrmXD.js";
|
|
18
|
-
import { u as H } from "./languages-BShG9LpE.js";
|
|
11
|
+
import { P as D, e as G, f as I, i as M } from "./index-pJ_eRg80.js";
|
|
12
|
+
import { t as O } from "./toast-CqSDTWRX.js";
|
|
13
|
+
import { u as U } from "./platform-BQOX_Ntw.js";
|
|
14
|
+
import { b as j } from "./routeResource-DlTsGTg_.js";
|
|
15
|
+
import { u as z, _ as H, a as $ } from "./ActionRow.vue_vue_type_script_setup_true_lang-IpcP3Bjc.js";
|
|
19
16
|
const J = {
|
|
20
17
|
class: "flex min-w-0 max-w-200 flex-col gap-group-gap",
|
|
21
18
|
"data-person-general": ""
|
|
@@ -23,30 +20,30 @@ const J = {
|
|
|
23
20
|
key: 1,
|
|
24
21
|
class: "flex flex-wrap items-center gap-x-1.5 px-row-inset text-footnote text-content-muted",
|
|
25
22
|
"data-person-audit": ""
|
|
26
|
-
},
|
|
23
|
+
}, de = /* @__PURE__ */ R({
|
|
27
24
|
__name: "General",
|
|
28
25
|
setup(Q) {
|
|
29
|
-
const { t: a } = V(), { http: q } =
|
|
26
|
+
const { t: a } = V(), { http: q } = U(), w = E(), g = j(D), n = G(), C = I(), x = (t) => t === null || t.trim() === "", P = {
|
|
30
27
|
safeParse(t) {
|
|
31
|
-
const s = t,
|
|
32
|
-
return
|
|
28
|
+
const s = t, d = ["login", "name", "email", "locale"].filter((_) => x(s[_])).map((_) => ({ path: [_], message: a("core.account.validation.required") }));
|
|
29
|
+
return d.length > 0 ? { success: !1, error: { issues: d } } : { success: !0, data: { ...s, locale: s.locale ?? "", phone: x(s.phone) ? void 0 : s.phone } };
|
|
33
30
|
}
|
|
34
31
|
}, r = T({
|
|
35
|
-
...
|
|
36
|
-
source:
|
|
32
|
+
...z(),
|
|
33
|
+
source: g,
|
|
37
34
|
defaults: () => ({ login: "", name: "", email: "", phone: "", locale: null }),
|
|
38
35
|
validator: P,
|
|
39
36
|
toValues: (t) => ({ login: t.login, name: t.name, email: t.email, phone: t.phone, locale: t.locale }),
|
|
40
|
-
save: async (t, s) => (await q.request(
|
|
37
|
+
save: async (t, s) => (await q.request(M.usersUpdate, { id: s.id, ...t })).data
|
|
41
38
|
});
|
|
42
39
|
async function y() {
|
|
43
40
|
const t = await r.save();
|
|
44
|
-
(t.status === "saved" || t.status === "saved-refresh-failed") &&
|
|
41
|
+
(t.status === "saved" || t.status === "saved-refresh-failed") && O.success(a("core.users.general.saved"));
|
|
45
42
|
}
|
|
46
|
-
A({ form: r, allowed: () => n.can.manage, ready: () =>
|
|
47
|
-
const l = N(() =>
|
|
43
|
+
A({ form: r, allowed: () => n.can.manage, ready: () => g.data.value !== null, save: y, cancel: () => r.reset() });
|
|
44
|
+
const l = N(() => g.data.value);
|
|
48
45
|
return (t, s) => (i(), k("div", J, [
|
|
49
|
-
o(
|
|
46
|
+
o(H, {
|
|
50
47
|
title: e(a)("core.users.sections.general"),
|
|
51
48
|
description: e(a)("core.users.intro.general")
|
|
52
49
|
}, null, 8, ["title", "description"]),
|
|
@@ -99,47 +96,47 @@ const J = {
|
|
|
99
96
|
]),
|
|
100
97
|
_: 1
|
|
101
98
|
}, 8, ["form", "editable"]),
|
|
102
|
-
e(n).can.deactivate || e(n).can.activate ? (i(),
|
|
99
|
+
e(n).can.deactivate || e(n).can.activate ? (i(), v(e(h), {
|
|
103
100
|
key: 0,
|
|
104
101
|
"data-person-actions": ""
|
|
105
102
|
}, {
|
|
106
103
|
default: u(() => [
|
|
107
|
-
e(n).can.deactivate ? (i(),
|
|
104
|
+
e(n).can.deactivate ? (i(), v($, {
|
|
108
105
|
key: 0,
|
|
109
106
|
label: e(a)("core.users.actions.deactivate"),
|
|
110
107
|
sub: e(a)("core.users.deactivate.row_sub"),
|
|
111
108
|
tone: "critical",
|
|
112
109
|
"data-deactivate-row": "",
|
|
113
|
-
onClick: s[0] || (s[0] = (
|
|
114
|
-
}, null, 8, ["label", "sub"])) :
|
|
115
|
-
e(n).can.activate ? (i(),
|
|
110
|
+
onClick: s[0] || (s[0] = (d) => e(n).deactivate())
|
|
111
|
+
}, null, 8, ["label", "sub"])) : m("", !0),
|
|
112
|
+
e(n).can.activate ? (i(), v($, {
|
|
116
113
|
key: 1,
|
|
117
114
|
label: e(a)("core.users.actions.activate"),
|
|
118
115
|
sub: e(a)("core.users.activate.row_sub"),
|
|
119
116
|
"data-activate-row": "",
|
|
120
|
-
onClick: s[1] || (s[1] = (
|
|
121
|
-
}, null, 8, ["label", "sub"])) :
|
|
117
|
+
onClick: s[1] || (s[1] = (d) => e(n).activate())
|
|
118
|
+
}, null, 8, ["label", "sub"])) : m("", !0)
|
|
122
119
|
]),
|
|
123
120
|
_: 1
|
|
124
|
-
})) :
|
|
121
|
+
})) : m("", !0),
|
|
125
122
|
l.value ? (i(), k("p", K, [
|
|
126
|
-
p("span", null,
|
|
123
|
+
p("span", null, b(e(a)("core.users.general.created", { when: e(w).dateTime(l.value.created_at) })), 1),
|
|
127
124
|
s[2] || (s[2] = p("span", { "aria-hidden": "true" }, "·", -1)),
|
|
128
|
-
p("span", null,
|
|
125
|
+
p("span", null, b(l.value.last_sign_in ? e(a)("core.users.general.last_sign_in", { when: e(w).dateTime(l.value.last_sign_in) }) : e(a)("core.users.general.never_signed_in")), 1),
|
|
129
126
|
s[3] || (s[3] = p("span", { "aria-hidden": "true" }, "·", -1)),
|
|
130
127
|
o(e(B), {
|
|
131
128
|
to: { name: "users.record.changes", params: { id: l.value.id }, query: t.$route.query },
|
|
132
129
|
class: "text-content-link"
|
|
133
130
|
}, {
|
|
134
131
|
default: u(() => [
|
|
135
|
-
S(
|
|
132
|
+
S(b(e(a)("core.users.general.all_changes")), 1)
|
|
136
133
|
]),
|
|
137
134
|
_: 1
|
|
138
135
|
}, 8, ["to"])
|
|
139
|
-
])) :
|
|
136
|
+
])) : m("", !0)
|
|
140
137
|
]));
|
|
141
138
|
}
|
|
142
139
|
});
|
|
143
140
|
export {
|
|
144
|
-
|
|
141
|
+
de as default
|
|
145
142
|
};
|
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
import { defineComponent as G, openBlock as a, createElementBlock as p, createVNode as l, unref as e, createElementVNode as n, toDisplayString as o, createCommentVNode as c, computed as h, createBlock as d, withCtx as r, Fragment as U, renderList as F, createTextVNode as S, mergeProps as b } from "vue";
|
|
2
2
|
import { useI18n as ee } from "vue-i18n";
|
|
3
3
|
import { useRoute as te } from "vue-router";
|
|
4
|
-
import { _ as se } from "./Button.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import {
|
|
4
|
+
import { _ as se } from "./Button.vue_vue_type_script_setup_true_lang-C74hcb0N.js";
|
|
5
|
+
import { u as ne } from "./neighbors-OyvGi233.js";
|
|
6
6
|
import { _ as m } from "./KeyValue.vue_vue_type_script_setup_true_lang-wcZcvnow.js";
|
|
7
7
|
import { _ as T } from "./Panel.vue_vue_type_script_setup_true_lang-D_Wg42hu.js";
|
|
8
8
|
import { _ as ie } from "./IconTile.vue_vue_type_script_setup_true_lang-BmxCuUZ9.js";
|
|
9
9
|
import { a as ae } from "./leaveGuard-Cc8yeLxM.js";
|
|
10
|
-
import { u as le } from "./useResourceForm-
|
|
11
|
-
import { _ as oe } from "./
|
|
12
|
-
import { _ as
|
|
13
|
-
import { _ as
|
|
14
|
-
import { _ as
|
|
15
|
-
import { _ as
|
|
16
|
-
import { _ as M } from "./TextField.vue_vue_type_script_setup_true_lang-BFVsqcBX.js";
|
|
10
|
+
import { u as le } from "./useResourceForm-Dl6YFYyz.js";
|
|
11
|
+
import { _ as oe, a as re } from "./FormGroup.vue_vue_type_script_setup_true_lang-D6jYfNjW.js";
|
|
12
|
+
import { _ as ce } from "./FormView.vue_vue_type_script_setup_true_lang-DvbPEiNQ.js";
|
|
13
|
+
import { _ as w } from "./SelectField.vue_vue_type_script_setup_true_lang-BZwdANL3.js";
|
|
14
|
+
import { _ as P } from "./TextareaField.vue_vue_type_script_setup_true_lang-D2j4s96s.js";
|
|
15
|
+
import { _ as M } from "./TextField.vue_vue_type_script_setup_true_lang-CWIeeZRE.js";
|
|
17
16
|
import { u as de } from "./useSaveChrome-7huA3FzR.js";
|
|
18
|
-
import { u as ue } from "./useCommand-
|
|
17
|
+
import { u as ue } from "./useCommand-Ch_nx1AQ.js";
|
|
19
18
|
import { u as _e } from "./format-D8KUBmbS.js";
|
|
20
19
|
import { t as me } from "./toast-CqSDTWRX.js";
|
|
21
|
-
import { _ as fe } from "./RecordHeader.vue_vue_type_script_setup_true_lang-
|
|
20
|
+
import { _ as fe } from "./RecordHeader.vue_vue_type_script_setup_true_lang-DqGc3Jyo.js";
|
|
22
21
|
import { u as pe } from "./platform-BQOX_Ntw.js";
|
|
23
22
|
import { a as be } from "./routeResource-DlTsGTg_.js";
|
|
24
|
-
import { a as ve } from "./ResourcePage.vue_vue_type_script_setup_true_lang-
|
|
23
|
+
import { a as ve } from "./ResourcePage.vue_vue_type_script_setup_true_lang-DljhsTU4.js";
|
|
25
24
|
import { _ as N } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
|
|
26
25
|
import { _ as q } from "./EmptyState.vue_vue_type_script_setup_true_lang-DbZiO2RF.js";
|
|
27
|
-
import { u as xe, i as he, a as ye, M as ge, U as ke, m as we, f as $e, g as z, r as Se, S as Te, e as D, c as L, d as Ee, b as Ie } from "./index-
|
|
26
|
+
import { u as xe, i as he, a as ye, M as ge, U as ke, m as we, f as $e, g as z, r as Se, S as Te, e as D, c as L, d as Ee, b as Ie } from "./index-DUs7WSz-.js";
|
|
28
27
|
import { _ as Ne } from "./Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
|
|
29
28
|
const De = { class: "flex min-w-0 items-center gap-2" }, Le = { class: "flex min-w-0 flex-col items-start" }, Ce = { class: "max-w-full truncate text-xs font-semibold text-content-strong" }, Ae = {
|
|
30
29
|
key: 0,
|
|
@@ -55,7 +54,7 @@ const De = { class: "flex min-w-0 items-center gap-2" }, Le = { class: "flex min
|
|
|
55
54
|
}, nt = {
|
|
56
55
|
class: "flex flex-col gap-3 border-t border-border-separator p-4",
|
|
57
56
|
"data-test": "incident-comment"
|
|
58
|
-
}, it = { class: "flex min-w-0 flex-col gap-4" }, at = { class: "flex flex-col gap-3 text-xs" }, lt = { key: 0 }, ot = { class: "mb-1 font-semibold uppercase text-content-muted" }, rt = { key: 1 }, ct = { class: "mb-1 font-semibold uppercase text-content-muted" }, dt = { key: 2 }, ut = { class: "mb-1 font-semibold uppercase text-content-muted" }, _t = ["href"],
|
|
57
|
+
}, it = { class: "flex min-w-0 flex-col gap-4" }, at = { class: "flex flex-col gap-3 text-xs" }, lt = { key: 0 }, ot = { class: "mb-1 font-semibold uppercase text-content-muted" }, rt = { key: 1 }, ct = { class: "mb-1 font-semibold uppercase text-content-muted" }, dt = { key: 2 }, ut = { class: "mb-1 font-semibold uppercase text-content-muted" }, _t = ["href"], Ft = /* @__PURE__ */ G({
|
|
59
58
|
__name: "IncidentRecord",
|
|
60
59
|
setup(y) {
|
|
61
60
|
const { t } = ee(), C = te(), { http: Y, access: A } = pe(), $ = _e(), I = xe(), v = be({ param: "incidentID", load: (u, { signal: _ }) => I.show(u, { signal: _ }), identify: (u) => u.incident.id }), H = ne(ye(Y), { current: () => v.id.value, list: he.index, param: "incidentID", backLabel: () => t("core.incidents.title") }), O = Number(C.params.incidentID), J = h(() => A.can(ge)), R = h(() => A.can(ke)), i = h(() => v.data.value?.incident ?? null), V = h(() => v.data.value?.reports ?? []), j = h(() => v.data.value?.comments ?? []), f = le({
|
|
@@ -401,5 +400,5 @@ const De = { class: "flex min-w-0 items-center gap-2" }, Le = { class: "flex min
|
|
|
401
400
|
}
|
|
402
401
|
});
|
|
403
402
|
export {
|
|
404
|
-
|
|
403
|
+
Ft as default
|
|
405
404
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineComponent as $, useTemplateRef as D, computed as d, openBlock as n, createBlock as m, unref as e, withCtx as i, createVNode as c, createElementBlock as p, toDisplayString as a, createElementVNode as F, createTextVNode as f, createCommentVNode as O } from "vue";
|
|
2
2
|
import { useI18n as q } from "vue-i18n";
|
|
3
3
|
import { useRouter as U } from "vue-router";
|
|
4
|
-
import { u as z, _ as P } from "./CollectionPage.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { a as y } from "./rowLayout-
|
|
4
|
+
import { u as z, _ as P } from "./CollectionPage.vue_vue_type_script_setup_true_lang-Cn0YOWJF.js";
|
|
5
|
+
import { a as y } from "./rowLayout-Il4psyXN.js";
|
|
6
6
|
import { u as Y } from "./datePresets-DB13HHHd.js";
|
|
7
7
|
import { _ as j } from "./Timestamp.vue_vue_type_script_setup_true_lang-ClZAAUMd.js";
|
|
8
8
|
import { _ as g } from "./IconTile.vue_vue_type_script_setup_true_lang-BmxCuUZ9.js";
|
|
9
9
|
import { u as K } from "./format-D8KUBmbS.js";
|
|
10
10
|
import { u as G } from "./platform-BQOX_Ntw.js";
|
|
11
11
|
import { _ as k } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
|
|
12
|
-
import { i as v, a as H, C as J, _ as M, S as T, b as Q, c as S, d as W, e as E } from "./index-
|
|
12
|
+
import { i as v, a as H, C as J, _ as M, S as T, b as Q, c as S, d as W, e as E } from "./index-DUs7WSz-.js";
|
|
13
13
|
const X = {
|
|
14
14
|
key: 1,
|
|
15
15
|
class: "flex min-w-0 items-center gap-3"
|