@wssto2/vue-core 0.13.1 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +2 -2
  3. package/bin/architecture/engine.mjs +11 -1
  4. package/bin/architecture/rules.mjs +95 -0
  5. package/bin/commands/check-architecture.mjs +8 -1
  6. package/bin/config.mjs +2 -0
  7. package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-DEzXovsY.js → AccessGate.vue_vue_type_script_setup_true_lang-BH3f0hda.js} +1 -1
  8. package/dist/{Activity-ChfxdvXf.js → Activity-MOAIv6s4.js} +5 -5
  9. package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-lPj9hPqV.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-Bsv5j5Z8.js} +1 -1
  10. package/dist/{Changes-BCa43_mO.js → Changes-Bu7D0dhY.js} +2 -2
  11. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-C1GCvyZx.js → CollectionPage.vue_vue_type_script_setup_true_lang-D5HsYIck.js} +6 -6
  12. package/dist/{DataTable.vue_vue_type_script_setup_true_lang-B9r9M5Gt.js → DataTable.vue_vue_type_script_setup_true_lang-J3PhyJAS.js} +1 -1
  13. package/dist/{DateField.vue_vue_type_script_setup_true_lang-B5UUY1OO.js → DateField.vue_vue_type_script_setup_true_lang-CKKG4JEg.js} +2 -2
  14. package/dist/{DeadLetters-wFTqhISU.js → DeadLetters-DsujMnLG.js} +5 -5
  15. package/dist/FormGroup.vue_vue_type_script_setup_true_lang-CTVuhEbW.js +428 -0
  16. package/dist/{FormView.vue_vue_type_script_setup_true_lang-DvbPEiNQ.js → FormView.vue_vue_type_script_setup_true_lang-Cfvh7rF6.js} +1 -1
  17. package/dist/{General-jW7u4MjH.js → General-Dswj1oXt.js} +7 -7
  18. package/dist/IncidentRecord-DcmqpziF.js +522 -0
  19. package/dist/{IncidentsList-yu0xSMrH.js → IncidentsList-BRNqHZdU.js} +6 -6
  20. package/dist/{NewRolePage-CQ5UVaHs.js → NewRolePage-dFLznJGH.js} +3 -3
  21. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-YVgf5CP6.js → NumberField.vue_vue_type_script_setup_true_lang-U-_kcnGr.js} +1 -1
  22. package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-CWCt9_dM.js → PersonAccess.vue_vue_type_script_setup_true_lang-D3yp43o5.js} +4 -4
  23. package/dist/{ProfilePage-Ca3x3UAH.js → ProfilePage-BnHR3xGB.js} +10 -10
  24. package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-Do_ATJwT.js → RecordHeader.vue_vue_type_script_setup_true_lang-SDgLjwEI.js} +1 -1
  25. package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-Coz91xht.js → ResourcePage.vue_vue_type_script_setup_true_lang-DRC3h71-.js} +1 -1
  26. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-d_aaeXTT.js → RoleEditor.vue_vue_type_script_setup_true_lang-DNF9wzE9.js} +4 -4
  27. package/dist/{RolePage-BUj1w1m1.js → RolePage-BtM2rFLm.js} +7 -7
  28. package/dist/{RolesPage-NKzBUsrM.js → RolesPage-MO1gAfdT.js} +4 -4
  29. package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-DfKEhTFv.js → SectionNavigator.vue_vue_type_script_setup_true_lang-TMdsmYAg.js} +2 -2
  30. package/dist/ServiceAccountDialog.vue_vue_type_script_setup_true_lang-Bo3phlqB.js +127 -0
  31. package/dist/{ServiceAccountRecord-ClbyeLhL.js → ServiceAccountRecord-C1M-dcju.js} +10 -10
  32. package/dist/{ServiceAccountsList-B2VDnYxD.js → ServiceAccountsList-zfyS2WJB.js} +6 -6
  33. package/dist/{Sessions-BjkciyHH.js → Sessions-BYBUSqHI.js} +3 -3
  34. package/dist/{SettingsPage-Csb14qsx.js → SettingsPage-C9Kp2ddX.js} +9 -9
  35. package/dist/{SignIn-DPFMv4C7.js → SignIn-HBYLSZ1M.js} +5 -5
  36. package/dist/{SignInPage-DukoFqkt.js → SignInPage-CEoz3fWE.js} +3 -3
  37. package/dist/{SignIns-DvdpNkiS.js → SignIns-BAz7V4vy.js} +2 -2
  38. package/dist/{TimeField.vue_vue_type_script_setup_true_lang-DpDXHH7u.js → TimeField.vue_vue_type_script_setup_true_lang-BDlTAMsh.js} +2 -2
  39. package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-DlEUKWra.js → Timestamp.vue_vue_type_script_setup_true_lang-jCXYFLtq.js} +1 -1
  40. package/dist/{UserRecord-B9SeSWQh.js → UserRecord-DkyhGma-.js} +9 -9
  41. package/dist/{UsersList-CREG8q3l.js → UsersList-CsW-jU0m.js} +4 -4
  42. package/dist/access/RestrictedPanel.vue.d.ts +20 -0
  43. package/dist/access/index.d.ts +1 -0
  44. package/dist/access/index.js +91 -31
  45. package/dist/app/application.d.ts +2 -2
  46. package/dist/app/current.d.ts +6 -0
  47. package/dist/app/index.d.ts +1 -1
  48. package/dist/app/index.js +17 -16
  49. package/dist/{application-DomS6sbx.js → application-2gHiwAVy.js} +6 -6
  50. package/dist/client/client.d.ts +6 -0
  51. package/dist/client/index.js +1 -1
  52. package/dist/client-Do8v1I5l.js +193 -0
  53. package/dist/collection/index.js +6 -6
  54. package/dist/config/index.d.ts +21 -1
  55. package/dist/content/StatSummary.vue.d.ts +40 -0
  56. package/dist/content/index.d.ts +1 -0
  57. package/dist/content/index.js +245 -176
  58. package/dist/{contributions-obnyn03x.js → contributions-9CPT-Z5v.js} +1 -1
  59. package/dist/{current-B0lHKTWr.js → current-CslcEPXp.js} +8 -4
  60. package/dist/eslint/index.js +2 -2
  61. package/dist/form/index.js +16 -16
  62. package/dist/form/useForm.d.ts +1 -1
  63. package/dist/format/format.d.ts +5 -2
  64. package/dist/format/index.js +1 -1
  65. package/dist/format-Cp1h0vsC.js +125 -0
  66. package/dist/{guards-DGcSfTEh.js → guards-6fJxfUtk.js} +1 -1
  67. package/dist/{http-DOEfFCDA.js → http-D6qOS6xs.js} +1 -1
  68. package/dist/i18n/index.d.ts +5 -1
  69. package/dist/i18n/index.js +21 -20
  70. package/dist/i18n/serverMessages.d.ts +15 -1
  71. package/dist/identity/index.js +2 -2
  72. package/dist/incidents/Occurrences.vue.d.ts +9 -0
  73. package/dist/incidents/api.d.ts +11 -2
  74. package/dist/incidents/index.js +1 -1
  75. package/dist/{index-DZikGJ8L.js → index--AF_DNhE.js} +22 -22
  76. package/dist/{index-D_yyd4C2.js → index-DYva-K_4.js} +5 -5
  77. package/dist/{index-Be9Q1PB_.js → index-Dlu-PA4W.js} +104 -98
  78. package/dist/index.d.ts +1 -1
  79. package/dist/index.js +1 -1
  80. package/dist/modules/incident/entities.d.ts +19 -0
  81. package/dist/modules/incident/routes.d.ts +4 -1
  82. package/dist/{navigation-CctcxT51.js → navigation-DMJ6akat.js} +1 -1
  83. package/dist/{neighbors-Csfan8Ho.js → neighbors-DrEahe7B.js} +1 -1
  84. package/dist/notifications/index.js +1 -1
  85. package/dist/onboarding/index.js +1 -1
  86. package/dist/page/index.js +3 -3
  87. package/dist/phone/index.d.ts +1 -1
  88. package/dist/phone/index.js +154 -142
  89. package/dist/phone/phone.d.ts +6 -0
  90. package/dist/platform/index.js +3 -3
  91. package/dist/{platform-DtISOEt7.js → platform-ORzRR3Tw.js} +1 -1
  92. package/dist/resource/index.js +2 -2
  93. package/dist/router/index.js +3 -3
  94. package/dist/{rowLayout-y1IB_h2r.js → rowLayout-Ohh5ng1u.js} +2 -2
  95. package/dist/{sections-fkW_IJLc.js → sections-DI_JhgQG.js} +1 -1
  96. package/dist/serverMessages-Ce8-MK4e.js +30 -0
  97. package/dist/shell/index.js +4 -4
  98. package/dist/{state-CXMexi0l.js → state-QDaxntgR.js} +1 -1
  99. package/dist/styles.css +1 -1
  100. package/dist/testing/index.js +3 -3
  101. package/dist/{useCommand-Ch_nx1AQ.js → useCommand-BvcU3AlW.js} +1 -1
  102. package/dist/{useGroupSheet-CPjHydQV.js → useGroupSheet-BGIntPKD.js} +1 -1
  103. package/dist/{usePreferences-B8LIZp_f.js → usePreferences-BfMXVbSO.js} +1 -1
  104. package/dist/{useRecordDialog-DdkauXnU.js → useRecordDialog-q_BNXdb7.js} +1 -1
  105. package/dist/{useResourceForm-Dl6YFYyz.js → useResourceForm-C1S628UI.js} +1 -1
  106. package/dist/{useTypedEntry-DKs8I1yP.js → useTypedEntry-tttjrClq.js} +1 -1
  107. package/package.json +2 -2
  108. package/dist/FormGroup.vue_vue_type_script_setup_true_lang-D6jYfNjW.js +0 -427
  109. package/dist/IncidentRecord-zTemLz2R.js +0 -404
  110. package/dist/ServiceAccountDialog.vue_vue_type_script_setup_true_lang-4nbhEpv_.js +0 -127
  111. package/dist/client-Dg303Pmc.js +0 -193
  112. package/dist/format-DoKs29bZ.js +0 -118
  113. package/dist/serverMessages-Ddghrewh.js +0 -25
@@ -0,0 +1,428 @@
1
+ var ce = Object.defineProperty;
2
+ var de = (o, e, t) => e in o ? ce(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
+ var z = (o, e, t) => de(o, typeof e != "symbol" ? e + "" : e, t);
4
+ import { shallowRef as N, computed as v, toRaw as fe, reactive as me, ref as V, watch as pe, nextTick as ve, toValue as ge, defineComponent as J, unref as $, openBlock as g, createBlock as Q, withCtx as ne, createElementBlock as k, toDisplayString as j, createCommentVNode as y, Fragment as W, createElementVNode as R, normalizeClass as P, renderList as he, createTextVNode as D, inject as le, provide as H, useSlots as ye, shallowReactive as re, useTemplateRef as be, useId as ke, normalizeStyle as _e, renderSlot as I } from "vue";
5
+ import { useI18n as X } from "vue-i18n";
6
+ import { i as we, a as L } from "./error-CD7x0Jrz.js";
7
+ import { f as je } from "./serverMessages-Ce8-MK4e.js";
8
+ import { d as Ee, u as Oe, a as xe } from "./describeError-B-NMa--w.js";
9
+ import { _ as $e } from "./Banner.vue_vue_type_script_setup_true_lang-sv0phngk.js";
10
+ import { s as Ae, u as Fe } from "./sectionIndex-BS0ic5W7.js";
11
+ import { d as se, i as Be } from "./options-B48UiYsG.js";
12
+ import { _ as De } from "./Button.vue_vue_type_script_setup_true_lang-C74hcb0N.js";
13
+ class Se {
14
+ constructor() {
15
+ z(this, "messages", N({}));
16
+ /** How many fields have a message. */
17
+ z(this, "count", v(() => Object.keys(this.messages.value).length));
18
+ }
19
+ /** Replaces everything. Empty lists are dropped. */
20
+ set(e) {
21
+ this.messages.value = Object.fromEntries(Object.entries(e).filter(([, t]) => t.length > 0).map(([t, s]) => [t, [...s]]));
22
+ }
23
+ add(e, t) {
24
+ this.messages.value = { ...this.messages.value, [e]: [...this.messages.value[e] ?? [], t] };
25
+ }
26
+ /** Clears one field (and its nested paths), or everything. */
27
+ clear(e) {
28
+ if (e === void 0) {
29
+ this.count.value > 0 && (this.messages.value = {});
30
+ return;
31
+ }
32
+ const t = Object.fromEntries(Object.entries(this.messages.value).filter(([s]) => s !== e && !s.startsWith(`${e}.`)));
33
+ Object.keys(t).length !== this.count.value && (this.messages.value = t);
34
+ }
35
+ /** Whether the field, or a value inside it (`items.0.quantity` for `items`), has a message. */
36
+ has(e) {
37
+ return this.first(e) !== void 0 || Object.keys(this.messages.value).some((t) => t.startsWith(`${e}.`));
38
+ }
39
+ first(e) {
40
+ return this.messages.value[e]?.[0];
41
+ }
42
+ all() {
43
+ return this.messages.value;
44
+ }
45
+ }
46
+ function p(o) {
47
+ const e = fe(o);
48
+ 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(p) : Object.fromEntries(Object.entries(e).map(([t, s]) => [t, p(s)]));
49
+ }
50
+ function Y(o, e) {
51
+ const t = o, s = e;
52
+ if (Object.is(t, s)) return !0;
53
+ if (t === null || s === null || typeof t != "object" || typeof s != "object") return !1;
54
+ if (t instanceof Date || s instanceof Date) return t instanceof Date && s instanceof Date && t.getTime() === s.getTime();
55
+ if (Array.isArray(t) || Array.isArray(s))
56
+ return Array.isArray(t) && Array.isArray(s) && t.length === s.length && t.every((n, l) => Y(n, s[l]));
57
+ if (typeof Blob < "u" && (t instanceof Blob || s instanceof Blob)) return !1;
58
+ const i = (n) => Object.keys(n).filter((l) => n[l] !== void 0), h = i(t);
59
+ return h.length === i(s).length && h.every((n) => Y(t[n], s[n]));
60
+ }
61
+ function oe(o) {
62
+ const e = {};
63
+ for (const t of o) {
64
+ const s = t.path.map(String).join(".");
65
+ (e[s] ?? (e[s] = [])).push(t.message);
66
+ }
67
+ return e;
68
+ }
69
+ const Me = (o) => o.split(".")[0] ?? o, ae = () => typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `${Date.now()}-${Math.random().toString(36).slice(2)}`;
70
+ function rt(o) {
71
+ const { t: e, te: t } = X(), s = o.describeFieldError ?? Ee() ?? je({ t: (r) => e(r), te: t }), i = Oe(), h = xe(), l = me(p(typeof o.defaults == "function" ? o.defaults() : o.defaults)), d = N(p(l)), m = new Se(), E = V(!1), _ = N(null), M = v(() => !Y(l, d.value));
72
+ let A = null, S = ae();
73
+ function f(r) {
74
+ const a = l;
75
+ for (const u of Object.keys(a)) u in r || delete a[u];
76
+ Object.assign(a, p(r));
77
+ }
78
+ function O() {
79
+ m.clear(), _.value = null;
80
+ }
81
+ function G(r, a) {
82
+ const u = e(`core.form.failure.${r}`);
83
+ if (r === "refresh") return u;
84
+ const c = h?.(a);
85
+ if (c !== void 0) return c;
86
+ if (!L(a) || r === "invalid" && Object.keys(a.fields).length > 0) return u;
87
+ const F = r === "invalid" || r === "failed" && a.status !== null && a.status < 500;
88
+ return a.code ? i(a, { fallback: u }) : F && a.message ? i(a) : u;
89
+ }
90
+ function C(r, a) {
91
+ const u = L(a) ? a.requestId : null, c = o.failureMessage?.(r, a) ?? G(r, a);
92
+ return _.value = { kind: r, message: c, requestId: u, error: a };
93
+ }
94
+ function T(r, a = !1) {
95
+ const { serverField: u } = o, c = s, F = a && u ? Object.entries(r).map(([b, w]) => [u(b), w]) : Object.entries(r);
96
+ m.set(Object.fromEntries(c ? F.map(([b, w]) => [b, w.map((U) => c(U, b))]) : F));
97
+ }
98
+ function Z() {
99
+ if (m.clear(), !o.validator)
100
+ return _.value = null, p(l);
101
+ const r = o.validator.safeParse(p(l));
102
+ return r.success ? (_.value = null, r.data) : (T(oe(r.error.issues)), null);
103
+ }
104
+ function K(r) {
105
+ if (m.clear(), !o.validator) return !0;
106
+ const a = o.validator.safeParse(p(l));
107
+ if (a.success) return !0;
108
+ const u = Object.fromEntries(Object.entries(oe(a.error.issues)).filter(([c]) => r.includes(Me(c))));
109
+ return T(u), Object.keys(u).length === 0;
110
+ }
111
+ function ue(r) {
112
+ if (!L(r)) return "failed";
113
+ switch (r.kind) {
114
+ case "validation":
115
+ return "invalid";
116
+ case "conflict":
117
+ return "conflict";
118
+ case "forbidden":
119
+ return "forbidden";
120
+ case "unauthorized":
121
+ return "unauthorized";
122
+ case "network":
123
+ return "offline";
124
+ default:
125
+ return "failed";
126
+ }
127
+ }
128
+ async function ee(r, a, u, c) {
129
+ if (A) return A;
130
+ const b = (async () => {
131
+ _.value = null;
132
+ const w = r();
133
+ if (w === null) return { status: "failed", failure: C("invalid", null) };
134
+ const U = p(l);
135
+ let B;
136
+ E.value = !0;
137
+ try {
138
+ B = await a(w, { idempotencyKey: S });
139
+ } catch (x) {
140
+ if (E.value = !1, we(x)) return { status: "aborted" };
141
+ const te = ue(x);
142
+ return te === "invalid" && L(x) && T(x.fields, !0), { status: "failed", failure: C(te, x) };
143
+ }
144
+ const q = c?.hydrateFrom?.(B) ?? null;
145
+ q ? (f(q), d.value = p(q), m.clear()) : u(B, U);
146
+ try {
147
+ await c?.refresh?.(B);
148
+ } catch (x) {
149
+ return C("refresh", x), { status: "saved-refresh-failed", value: B, error: x };
150
+ } finally {
151
+ E.value = !1;
152
+ }
153
+ return { status: "saved", value: B };
154
+ })().finally(() => {
155
+ A = null, S = ae();
156
+ });
157
+ return A = b, b;
158
+ }
159
+ return {
160
+ values: l,
161
+ errors: m,
162
+ dirty: M,
163
+ submitting: E,
164
+ failure: _,
165
+ bind(r) {
166
+ return {
167
+ get modelValue() {
168
+ return l[r];
169
+ },
170
+ "onUpdate:modelValue"(a) {
171
+ l[r] = a, m.clear(r);
172
+ },
173
+ get error() {
174
+ return m.first(r);
175
+ },
176
+ "data-field-key": r
177
+ };
178
+ },
179
+ bindMonthYear(r, a) {
180
+ const u = l;
181
+ return {
182
+ get month() {
183
+ return u[r] ?? null;
184
+ },
185
+ get year() {
186
+ return u[a] ?? null;
187
+ },
188
+ "onUpdate:month"(c) {
189
+ u[r] = c, m.clear(r);
190
+ },
191
+ "onUpdate:year"(c) {
192
+ u[a] = c, m.clear(a);
193
+ },
194
+ get error() {
195
+ return m.first(r) ?? m.first(a);
196
+ },
197
+ "data-field-key": `${r} ${a}`
198
+ };
199
+ },
200
+ hydrate(r) {
201
+ f(r), d.value = p(r), O();
202
+ },
203
+ reset() {
204
+ f(d.value), O();
205
+ },
206
+ markClean() {
207
+ d.value = p(l);
208
+ },
209
+ validate: Z,
210
+ check: K,
211
+ submit: (r, a) => ee(Z, r, (u, c) => d.value = c, a),
212
+ submitFields: (r, a, u) => ee(
213
+ () => K(r) ? Object.fromEntries(r.map((c) => [c, p(l[c])])) : null,
214
+ a,
215
+ (c, F) => {
216
+ const b = p(d.value);
217
+ for (const w of r) b[w] = p(F[w]);
218
+ d.value = b;
219
+ },
220
+ u
221
+ ),
222
+ dismissFailure() {
223
+ _.value = null;
224
+ }
225
+ };
226
+ }
227
+ function Ge(o) {
228
+ const e = V([]);
229
+ return pe(
230
+ () => o.form.errors.all(),
231
+ async (t) => {
232
+ await ve();
233
+ const s = ge(o.root) ?? document, i = new Set([...s.querySelectorAll("[data-field-key]")].flatMap((n) => (n.getAttribute("data-field-key") ?? "").split(/\s+/))), h = (n) => n.split(".").some((l, d, m) => i.has(m.slice(0, d + 1).join(".")));
234
+ e.value = Object.entries(t).flatMap(([n, l]) => l[0] && !h(n) ? [{ field: n, message: l[0] }] : []);
235
+ },
236
+ { immediate: !0 }
237
+ ), v(() => e.value);
238
+ }
239
+ const Ie = {
240
+ key: 0,
241
+ class: "text-footnote font-medium"
242
+ }, Le = {
243
+ class: "mt-1 list-inside list-disc text-footnote",
244
+ "data-test": "form-errors-hidden"
245
+ }, Re = {
246
+ key: 2,
247
+ class: "mt-1 text-caption text-content-muted"
248
+ }, st = /* @__PURE__ */ J({
249
+ __name: "FormErrors",
250
+ props: {
251
+ form: {},
252
+ label: { type: Function, default: (o) => o },
253
+ scope: { default: null }
254
+ },
255
+ setup(o) {
256
+ const e = o, { t } = X(), s = Ge({
257
+ get form() {
258
+ return e.form;
259
+ },
260
+ root: () => e.scope
261
+ }), i = v(() => e.form.failure.value), h = v(() => i.value?.kind === "conflict" || i.value?.kind === "refresh" ? "warning" : "critical");
262
+ return (n, l) => i.value || $(s).length ? (g(), Q($e, {
263
+ key: 0,
264
+ tone: i.value ? h.value : "warning",
265
+ "data-test": "form-errors"
266
+ }, {
267
+ default: ne(() => [
268
+ i.value ? (g(), k("p", Ie, j(i.value.message), 1)) : y("", !0),
269
+ $(s).length ? (g(), k(W, { key: 1 }, [
270
+ R("p", {
271
+ class: P(["text-footnote", i.value ? "mt-1" : "font-medium"])
272
+ }, j($(t)("core.form.errors.hidden_title")), 3),
273
+ R("ul", Le, [
274
+ (g(!0), k(W, null, he($(s), (d) => (g(), k("li", {
275
+ key: d.field
276
+ }, [
277
+ D(j(d.field ? e.label(d.field) : ""), 1),
278
+ d.field ? (g(), k(W, { key: 0 }, [
279
+ D(": ")
280
+ ], 64)) : y("", !0),
281
+ D(j(d.message), 1)
282
+ ]))), 128))
283
+ ])
284
+ ], 64)) : y("", !0),
285
+ i.value?.requestId ? (g(), k("p", Re, j($(t)("core.form.errors.request", { id: i.value.requestId })), 1)) : y("", !0)
286
+ ]),
287
+ _: 1
288
+ }, 8, ["tone"])) : y("", !0);
289
+ }
290
+ }), Ve = /* @__PURE__ */ J({
291
+ __name: "GroupEditAction",
292
+ props: {
293
+ allowed: { type: Boolean, default: !0 },
294
+ locked: { type: Boolean, default: !1 },
295
+ label: { default: void 0 }
296
+ },
297
+ emits: ["click"],
298
+ setup(o, { emit: e }) {
299
+ const t = o, s = e, { t: i } = X();
300
+ return (h, n) => t.allowed && !t.locked ? (g(), Q(De, {
301
+ key: 0,
302
+ prominence: "plain",
303
+ size: "sm",
304
+ "data-test": "group-edit",
305
+ onClick: n[0] || (n[0] = (l) => s("click"))
306
+ }, {
307
+ default: ne(() => [
308
+ D(j(t.label ?? $(i)("core.actions.edit")), 1)
309
+ ]),
310
+ _: 1
311
+ })) : y("", !0);
312
+ }
313
+ }), ie = Symbol("vue-core.recordGroups"), Ce = () => le(ie, null);
314
+ function Te() {
315
+ const o = /* @__PURE__ */ new Map();
316
+ return {
317
+ register(e, t) {
318
+ const s = o.get(t) ?? /* @__PURE__ */ new Map();
319
+ return s.set(e, (s.get(e) ?? 0) + 1), o.set(t, s), () => {
320
+ const i = (s.get(e) ?? 1) - 1;
321
+ i <= 0 ? s.delete(e) : s.set(e, i);
322
+ };
323
+ },
324
+ groupOf: (e) => o.get(e)?.keys().next().value,
325
+ fieldsOf: (e) => [...o.entries()].filter(([, t]) => t.has(e)).map(([t]) => t)
326
+ };
327
+ }
328
+ function ot(o) {
329
+ const e = Te();
330
+ return H(ie, {
331
+ only: V(null),
332
+ edit: (t, s) => o.edit(t, s),
333
+ editLabel: o.editLabel ? (t) => o.editLabel?.(t) : void 0,
334
+ register: (t, s) => e.register(t, s)
335
+ }), e;
336
+ }
337
+ const Ue = ["id", "data-group"], qe = {
338
+ key: 0,
339
+ class: "flex min-w-0 items-baseline gap-2 px-row-inset pb-2"
340
+ }, ze = { 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" }, We = { class: "form-group-cell rounded-group bg-surface-cell shadow-group" }, Ne = {
341
+ key: 1,
342
+ class: "px-row-inset pt-2 text-footnote text-content-muted text-pretty"
343
+ }, at = /* @__PURE__ */ J({
344
+ __name: "FormGroup",
345
+ props: {
346
+ header: { default: void 0 },
347
+ footer: { default: void 0 },
348
+ hideEmpty: { type: Boolean, default: !0 },
349
+ labelWidth: { default: "11rem" },
350
+ section: { type: Boolean, default: !1 },
351
+ anchor: { default: void 0 },
352
+ editable: { type: Boolean, default: void 0 },
353
+ lockedFooter: { default: void 0 },
354
+ group: { default: void 0 }
355
+ },
356
+ setup(o) {
357
+ const e = o, t = ye(), s = le(se, V(!0));
358
+ H(se, v(() => s.value && e.editable !== !1));
359
+ const i = re(/* @__PURE__ */ new Set()), h = v(() => [...i].some((f) => f.value)), n = Ce(), l = re(/* @__PURE__ */ new Set()), d = v(() => l.size > 0 && [...l].every((f) => f.value)), m = v(() => !n?.only.value || n.only.value === e.group), E = v(() => e.group && n?.edit && !d.value ? n.edit(e.group, e.header ?? "") : null), _ = v(() => !!e.group && n?.only.value === e.group);
360
+ H(Be, {
361
+ hideEmpty: v(() => e.hideEmpty),
362
+ registerLocked(f) {
363
+ return i.add(f), () => i.delete(f);
364
+ },
365
+ registerField(f, O) {
366
+ l.add(O);
367
+ const G = e.group && f && n?.register ? n.register(e.group, f) : null;
368
+ return () => {
369
+ l.delete(O), G?.();
370
+ };
371
+ }
372
+ });
373
+ const M = v(() => h.value ? e.lockedFooter : void 0), A = be("root"), S = e.anchor ?? (Ae(e.header ?? "") || `group-${ke()}`);
374
+ return e.section && Fe(S, () => e.header ?? "", A), (f, O) => m.value ? (g(), k("section", {
375
+ key: 0,
376
+ ref_key: "root",
377
+ ref: A,
378
+ id: e.section ? $(S) : void 0,
379
+ "data-test": "form-group",
380
+ "data-group": e.group,
381
+ class: P(["form-group flex min-w-0 flex-col has-[>.form-group-cell:empty]:hidden", { "scroll-mt-4": e.section }]),
382
+ style: _e({ "--form-label-width": e.labelWidth })
383
+ }, [
384
+ !_.value && (e.header || t.header || t["header-trailing"] || E.value) ? (g(), k("header", qe, [
385
+ R("h3", ze, [
386
+ I(f.$slots, "header", {}, () => [
387
+ D(j(e.header), 1)
388
+ ])
389
+ ]),
390
+ I(f.$slots, "header-trailing", {}, () => [
391
+ E.value ? (g(), Q(Ve, {
392
+ key: 0,
393
+ label: e.group ? $(n)?.editLabel?.(e.group) : void 0,
394
+ onClick: O[0] || (O[0] = (G) => E.value())
395
+ }, null, 8, ["label"])) : y("", !0)
396
+ ])
397
+ ])) : y("", !0),
398
+ R("div", We, [
399
+ I(f.$slots, "default")
400
+ ]),
401
+ e.footer || t.footer ? (g(), k("p", Ne, [
402
+ I(f.$slots, "footer", {}, () => [
403
+ D(j(e.footer), 1)
404
+ ])
405
+ ])) : y("", !0),
406
+ M.value ? (g(), k("p", {
407
+ key: 2,
408
+ "data-test": "form-group-locked-footer",
409
+ class: P(["px-row-inset text-footnote text-content-muted text-pretty", e.footer || t.footer ? "pt-1" : "pt-2"])
410
+ }, j(M.value), 3)) : y("", !0)
411
+ ], 14, Ue)) : y("", !0);
412
+ }
413
+ });
414
+ export {
415
+ Se as E,
416
+ st as _,
417
+ at as a,
418
+ Ve as b,
419
+ p as c,
420
+ Te as d,
421
+ Ge as e,
422
+ Me as f,
423
+ Ce as g,
424
+ ot as p,
425
+ ie as r,
426
+ Y as s,
427
+ rt as u
428
+ };
@@ -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
2
  import { d as v } from "./options-B48UiYsG.js";
3
- import { _ as k } from "./FormGroup.vue_vue_type_script_setup_true_lang-D6jYfNjW.js";
3
+ import { _ as k } from "./FormGroup.vue_vue_type_script_setup_true_lang-CTVuhEbW.js";
4
4
  const x = /* @__PURE__ */ n({
5
5
  __name: "FormView",
6
6
  props: {
@@ -1,21 +1,21 @@
1
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 d, 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
- import { u as E } from "./format-DoKs29bZ.js";
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";
4
+ import { u as E } from "./format-Cp1h0vsC.js";
5
+ import { u as T } from "./useResourceForm-C1S628UI.js";
6
+ import { a as h } from "./FormGroup.vue_vue_type_script_setup_true_lang-CTVuhEbW.js";
7
+ import { _ as F } from "./FormView.vue_vue_type_script_setup_true_lang-Cfvh7rF6.js";
8
8
  import { _ as L } from "./SelectField.vue_vue_type_script_setup_true_lang-BZwdANL3.js";
9
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
11
  import { i as D } from "./preferences-hYhrw8Uy.js";
12
12
  import { t as G } from "./toast-CqSDTWRX.js";
13
- import { u as I } from "./platform-DtISOEt7.js";
13
+ import { u as I } from "./platform-ORzRR3Tw.js";
14
14
  import { b as M } from "./routeResource-DlTsGTg_.js";
15
- import { u as O } from "./serverMessages-Ddghrewh.js";
15
+ import { u as O } from "./serverMessages-Ce8-MK4e.js";
16
16
  import { _ as U, a as $ } from "./ActionRow.vue_vue_type_script_setup_true_lang-DybAIOHS.js";
17
17
  import { u as j } from "./keepAlive-ClGnsIzT.js";
18
- import { P as z, e as H } from "./index-DZikGJ8L.js";
18
+ import { P as z, e as H } from "./index--AF_DNhE.js";
19
19
  const J = {
20
20
  class: "flex min-w-0 max-w-200 flex-col gap-group-gap",
21
21
  "data-person-general": ""