@wssto2/vue-core 0.8.0 → 0.9.1

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 (103) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-CkomzGrt.js → AccessGate.vue_vue_type_script_setup_true_lang-B8gpkhbw.js} +1 -1
  3. package/dist/{Activity-Cm1dlM2b.js → Activity-CfG8_Pp3.js} +7 -7
  4. package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-9Lt1XggN.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-DC-zSRcl.js} +1 -1
  5. package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-GxAsImnO.js → AsyncSection.vue_vue_type_script_setup_true_lang-BTIUz3cG.js} +1 -1
  6. package/dist/{Button.vue_vue_type_script_setup_true_lang-DQq_0P0p.js → Button.vue_vue_type_script_setup_true_lang-Dn-cJcj3.js} +67 -65
  7. package/dist/{Changes-fN0KMYbW.js → Changes-BT__0XX0.js} +6 -6
  8. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang--onFdKOB.js → CollectionPage.vue_vue_type_script_setup_true_lang-Bcwwr8ng.js} +7 -7
  9. package/dist/{DataTable.vue_vue_type_script_setup_true_lang-CTukf2B2.js → DataTable.vue_vue_type_script_setup_true_lang-CJlllQII.js} +1 -1
  10. package/dist/{DateField.vue_vue_type_script_setup_true_lang-DmYp54mq.js → DateField.vue_vue_type_script_setup_true_lang-BuQY5e5x.js} +2 -2
  11. package/dist/{DeadLetters-BslDh93e.js → DeadLetters-Btv3u3qh.js} +4 -4
  12. package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-BTADNpwB.js → FormGroup.vue_vue_type_script_setup_true_lang-Bzm3yJy5.js} +1 -1
  13. package/dist/{General-DJ53Egpp.js → General-Cum9U4Z3.js} +6 -6
  14. package/dist/{IncidentRecord-DQTnYQEe.js → IncidentRecord-C4K8hDJ1.js} +10 -10
  15. package/dist/{IncidentsList-C3yUnwwY.js → IncidentsList-BHfJ1cbg.js} +6 -6
  16. package/dist/{Modal.vue_vue_type_script_setup_true_lang-4MsnTWyx.js → Modal.vue_vue_type_script_setup_true_lang-BqO9X_-u.js} +1 -1
  17. package/dist/{NewRolePage-Bw2_jXcQ.js → NewRolePage-BSvYZkH4.js} +4 -4
  18. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-C3nw944P.js → NumberField.vue_vue_type_script_setup_true_lang-CLN2COfp.js} +1 -1
  19. package/dist/{PageBar.vue_vue_type_script_setup_true_lang-DPpcZxuT.js → PageBar.vue_vue_type_script_setup_true_lang-OE8VgTkY.js} +1 -1
  20. package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-07pq4SrY.js → PersonAccess.vue_vue_type_script_setup_true_lang-CBQ1kv8G.js} +7 -7
  21. package/dist/{ProfilePage-DxALOfzC.js → ProfilePage-Dnn_VUoB.js} +13 -13
  22. package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-DPm9q1P_.js → RecordHeader.vue_vue_type_script_setup_true_lang-CU7fZpp2.js} +1 -1
  23. package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-Cm3tx76N.js → ResourcePage.vue_vue_type_script_setup_true_lang-y3gyR5A-.js} +3 -3
  24. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-DuQR8hFf.js → RoleEditor.vue_vue_type_script_setup_true_lang-BcUxVL9y.js} +5 -5
  25. package/dist/{RolePage-Yv6m6u7o.js → RolePage-BIY9dEME.js} +10 -10
  26. package/dist/{RolesPage-TibtzxzQ.js → RolesPage-Be35CA_4.js} +5 -5
  27. package/dist/{SectionList.vue_vue_type_script_setup_true_lang-DAnZbfWA.js → SectionList.vue_vue_type_script_setup_true_lang-DzoE_o8v.js} +1 -1
  28. package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-ivdGWUeF.js → SectionNavigator.vue_vue_type_script_setup_true_lang-CWPD9zQJ.js} +3 -3
  29. package/dist/{SelectField.vue_vue_type_script_setup_true_lang-iJm8qmjT.js → SelectField.vue_vue_type_script_setup_true_lang-CYiarLAK.js} +1 -1
  30. package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-en2w_pAJ.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-CKIq1Ljb.js} +7 -7
  31. package/dist/{ServiceAccountRecord-B_amE8fL.js → ServiceAccountRecord-QsIfylwj.js} +13 -13
  32. package/dist/{ServiceAccountsList-CoDKG_15.js → ServiceAccountsList-CVDIhuCh.js} +7 -7
  33. package/dist/{SessionList.vue_vue_type_script_setup_true_lang-BEKTaL0g.js → SessionList.vue_vue_type_script_setup_true_lang-CkN7vR71.js} +3 -3
  34. package/dist/{Sessions-BrAEXAMA.js → Sessions-Cl2DTM7s.js} +5 -5
  35. package/dist/{SettingsPage-Cje1X0ix.js → SettingsPage-B2uWw27O.js} +10 -10
  36. package/dist/{SignIn-CbWgDlFb.js → SignIn-BHYFSMOX.js} +5 -5
  37. package/dist/{SignInPage-DmHdrZR-.js → SignInPage--OC0hQ8M.js} +3 -3
  38. package/dist/{SignIns-D5BRb9Sr.js → SignIns-CJ09NqOn.js} +5 -5
  39. package/dist/{TimeField.vue_vue_type_script_setup_true_lang-BwoE08jT.js → TimeField.vue_vue_type_script_setup_true_lang-B140Gjqd.js} +2 -2
  40. package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-u53rHMFG.js → Timestamp.vue_vue_type_script_setup_true_lang-CAz2W69d.js} +1 -1
  41. package/dist/{UserRecord-rIeTkocJ.js → UserRecord-BjXUcHo8.js} +9 -9
  42. package/dist/{UsersList-CiPeerC7.js → UsersList-D4-eC5tC.js} +9 -9
  43. package/dist/access/index.js +4 -4
  44. package/dist/app/application.d.ts +4 -2
  45. package/dist/app/index.js +2 -2
  46. package/dist/application-DtY0ef-w.js +420 -0
  47. package/dist/button/index.js +1 -1
  48. package/dist/button/shortcut.d.ts +7 -0
  49. package/dist/client/client.d.ts +33 -0
  50. package/dist/client/disposition.d.ts +5 -0
  51. package/dist/client/index.d.ts +1 -1
  52. package/dist/client/index.js +1 -1
  53. package/dist/client-Dr2vV3qH.js +193 -0
  54. package/dist/collection/index.js +5 -5
  55. package/dist/content/Money.vue.d.ts +31 -0
  56. package/dist/content/index.d.ts +1 -0
  57. package/dist/content/index.js +75 -40
  58. package/dist/{contributions-BQ9dZoRw.js → contributions-DGsAIWd8.js} +1 -1
  59. package/dist/{fieldMessages-DTXpWnBd.js → fieldMessages-6UTV9yWL.js} +1 -1
  60. package/dist/form/EditorPage.vue.d.ts +6 -0
  61. package/dist/form/FileField.vue.d.ts +1 -1
  62. package/dist/form/PhotoField.vue.d.ts +1 -1
  63. package/dist/form/index.js +108 -108
  64. package/dist/format/format.d.ts +9 -1
  65. package/dist/format/index.js +1 -1
  66. package/dist/format-Dn-BOb-o.js +86 -0
  67. package/dist/{guards-BFCulig0.js → guards-Cz7TOQD8.js} +1 -1
  68. package/dist/identity/index.js +1 -1
  69. package/dist/incidents/index.js +1 -1
  70. package/dist/{index-B_lzrZot.js → index-BB0_hxmE.js} +16 -16
  71. package/dist/{index-BQg5X6iK.js → index-C1jSzT1V.js} +7 -7
  72. package/dist/{index-Cgu6Ntok.js → index-DZQ3gy3e.js} +8 -8
  73. package/dist/index.d.ts +1 -1
  74. package/dist/index.js +1 -1
  75. package/dist/modal/index.js +15 -15
  76. package/dist/{navigation-BSC9X7FM.js → navigation-CWj6F_cV.js} +1 -1
  77. package/dist/{neighbors-BKzihEGQ.js → neighbors-CcCaurV5.js} +1 -1
  78. package/dist/notifications/index.js +1 -1
  79. package/dist/page/index.js +5 -5
  80. package/dist/platform/index.js +3 -3
  81. package/dist/{platform-Dr4iY3b8.js → platform-BZUWAXQV.js} +1 -1
  82. package/dist/pwa/index.d.ts +2 -0
  83. package/dist/pwa/index.js +51 -0
  84. package/dist/pwa/install.d.ts +12 -0
  85. package/dist/pwa/worker.d.ts +13 -0
  86. package/dist/resource/index.js +1 -1
  87. package/dist/router/index.js +3 -3
  88. package/dist/{rowLayout-XlTcD4de.js → rowLayout-BLhJ9-42.js} +2 -2
  89. package/dist/{sections-BXg4_ZhO.js → sections-CmqFs-U-.js} +1 -1
  90. package/dist/shell/index.js +3 -3
  91. package/dist/state/index.js +1 -1
  92. package/dist/{state-ChVIjayU.js → state-BiYPPKoj.js} +1 -1
  93. package/dist/{status-BV5Ae4K4.js → status-Bf4nfIe0.js} +1 -1
  94. package/dist/styles.css +1 -1
  95. package/dist/testing/index.js +2 -2
  96. package/dist/{useCommand-BIZX1ReM.js → useCommand-C3QTZIIw.js} +1 -1
  97. package/dist/{useGroupSheet-DxXzdKo3.js → useGroupSheet-LAnO37WV.js} +2 -2
  98. package/dist/{useRecordDialog-BLVSz7g3.js → useRecordDialog-Da1Sfak1.js} +1 -1
  99. package/dist/{useTypedEntry-CKuGqWT8.js → useTypedEntry-DIYdA7DK.js} +1 -1
  100. package/package.json +5 -1
  101. package/dist/application-D8Nm17zA.js +0 -420
  102. package/dist/client-CZgikXPG.js +0 -151
  103. package/dist/format-D8X4zsx6.js +0 -78
@@ -0,0 +1,193 @@
1
+ import { A as S, k as C, i as q } from "./error-Bb_dr_Ay.js";
2
+ function B(t) {
3
+ if (!t) return "";
4
+ const e = new URLSearchParams();
5
+ for (const [s, r] of Object.entries(t))
6
+ if (!(r == null || r === ""))
7
+ if (Array.isArray(r)) for (const o of r) e.append(s, String(o));
8
+ else e.append(s, String(r));
9
+ return e.toString();
10
+ }
11
+ const E = (t) => typeof Blob < "u" && t instanceof Blob;
12
+ function _(t) {
13
+ const e = new FormData();
14
+ for (const [s, r] of Object.entries(t))
15
+ if (r != null)
16
+ if (Array.isArray(r))
17
+ for (const o of r) e.append(`${s}[]`, j(o));
18
+ else
19
+ e.append(s, j(r));
20
+ return e;
21
+ }
22
+ function j(t) {
23
+ return E(t) ? t : t instanceof Date ? t.toISOString() : typeof t == "object" && t !== null ? JSON.stringify(t) : String(t);
24
+ }
25
+ function F(t) {
26
+ if (t === void 0) return { body: void 0, contentType: null };
27
+ if (typeof t == "string" || t instanceof FormData || t instanceof URLSearchParams || t instanceof ArrayBuffer || ArrayBuffer.isView(t) || E(t))
28
+ return { body: t, contentType: null };
29
+ if (typeof t == "object" && t !== null && !Array.isArray(t)) {
30
+ const e = t;
31
+ if (Object.values(e).some((s) => E(s) || Array.isArray(s) && s.some(E)))
32
+ return { body: _(e), contentType: null };
33
+ }
34
+ return { body: JSON.stringify(t), contentType: "application/json" };
35
+ }
36
+ function N() {
37
+ const t = new Uint8Array(16);
38
+ return globalThis.crypto.getRandomValues(t), Array.from(t, (e) => e.toString(16).padStart(2, "0")).join("");
39
+ }
40
+ const T = "X-Request-ID", R = (t) => typeof t == "object" && t !== null && !Array.isArray(t), A = (t) => typeof t == "string" && t !== "" ? t : null;
41
+ function P(t) {
42
+ const e = t?.errors ?? t?.fields;
43
+ if (!R(e)) return {};
44
+ const s = {};
45
+ for (const [r, o] of Object.entries(e))
46
+ Array.isArray(o) ? s[r] = o.map(String) : o != null && (s[r] = [String(o)]);
47
+ return s;
48
+ }
49
+ async function H(t) {
50
+ const e = await t.text();
51
+ if (e.trim() === "") return { payload: null, readable: !0 };
52
+ try {
53
+ return { payload: JSON.parse(e), readable: !0 };
54
+ } catch {
55
+ return { payload: null, readable: !1 };
56
+ }
57
+ }
58
+ async function k(t, e) {
59
+ const s = t.headers.get(T) ?? e, { payload: r, readable: o } = await H(t), c = R(r) ? r : null;
60
+ if (!t.ok) {
61
+ const b = P(c), p = c?.params;
62
+ throw new S({
63
+ kind: C(t.status, Object.keys(b).length > 0),
64
+ message: A(c?.error) ?? A(c?.message) ?? `Request failed with status ${t.status}`,
65
+ status: t.status,
66
+ fields: b,
67
+ code: A(c?.code),
68
+ params: R(p) ? p : null,
69
+ requestId: s,
70
+ payload: r
71
+ });
72
+ }
73
+ if (!o)
74
+ throw new S({
75
+ kind: "malformed",
76
+ message: `The server answered ${t.status} with a body that is not JSON`,
77
+ status: t.status,
78
+ requestId: s
79
+ });
80
+ return c !== null && typeof c.success == "boolean" ? {
81
+ data: c.data ?? null,
82
+ meta: c.meta ?? null,
83
+ message: A(c.message),
84
+ status: t.status,
85
+ requestId: s
86
+ } : { data: r, meta: null, message: null, status: t.status, requestId: s };
87
+ }
88
+ const J = /;\s*([^\s=;]+)\s*=\s*("(?:[^"\\]|\\.)*"|[^;]*)/g;
89
+ function L(t) {
90
+ const e = /^([^']*)'[^']*'(.*)$/s.exec(t);
91
+ if (!e) return null;
92
+ const s = new TextEncoder(), r = [];
93
+ for (const [, o, c] of e[2].matchAll(/%([0-9a-f]{2})|(.)/gis)) r.push(...o ? [parseInt(o, 16)] : s.encode(c));
94
+ try {
95
+ return new TextDecoder(e[1] || "utf-8", { fatal: !0 }).decode(Uint8Array.from(r));
96
+ } catch {
97
+ return null;
98
+ }
99
+ }
100
+ const G = (t) => t.slice(Math.max(t.lastIndexOf("/"), t.lastIndexOf("\\")) + 1).trim();
101
+ function Q(t) {
102
+ if (!t) return null;
103
+ let e = null, s = null;
104
+ for (const [, r, o] of t.replace(/^[^;]*/, "").matchAll(J)) {
105
+ const c = r.toLowerCase();
106
+ if (c !== "filename" && c !== "filename*") continue;
107
+ const p = o.startsWith('"') ? o.slice(1, -1).replace(/\\(.)/g, "$1") : o.trim();
108
+ c === "filename*" ? s ?? (s = L(p)) : e ?? (e = p);
109
+ }
110
+ return G(s ?? e ?? "") || null;
111
+ }
112
+ const V = (t, e) => globalThis.fetch(t, e), M = 20, Z = (t) => /^[a-z][a-z0-9+.-]*:\/\//i.test(t);
113
+ function W(t, e, s) {
114
+ const r = Z(e) || t === "" ? e : `${t.replace(/\/+$/, "")}/${e.replace(/^\/+/, "")}`;
115
+ return s === "" ? r : `${r}${r.includes("?") ? "&" : "?"}${s}`;
116
+ }
117
+ const $ = (t, e) => new S({ kind: "aborted", message: "The request was cancelled", requestId: t, cause: e });
118
+ function K(t = {}) {
119
+ const { baseUrl: e = "", transport: s = V, credentials: r = "include" } = t, o = [], c = (n) => {
120
+ n !== null && (o.push(n), o.length > M && o.shift());
121
+ };
122
+ async function b(n, a, i, u, h, m) {
123
+ const { signal: f } = u, l = t.requestId === !1 ? null : (t.requestId ?? N)();
124
+ if (f?.aborted) throw $(l, f.reason);
125
+ const y = F(i), w = new Headers({ Accept: h }), D = t.headers ? await t.headers() : void 0;
126
+ for (const d of [D, u.headers])
127
+ d && new Headers(d).forEach((v, z) => w.set(z, v));
128
+ l !== null && !w.has(T) && w.set(T, l), y.contentType !== null && !w.has("Content-Type") && w.set("Content-Type", y.contentType);
129
+ const U = { method: n, headers: w, credentials: r, body: y.body, signal: f }, O = W(e, a, B(u.query));
130
+ try {
131
+ const d = await s(O, U);
132
+ return await m(d, l);
133
+ } catch (d) {
134
+ throw q(d) ? (c(d.requestId), d) : f?.aborted || d instanceof Error && d.name === "AbortError" ? $(l, d) : (c(l), new S({
135
+ kind: "network",
136
+ message: d instanceof Error ? d.message : "The server could not be reached",
137
+ requestId: l,
138
+ cause: d
139
+ }));
140
+ }
141
+ }
142
+ async function p(n, a, i, u, h, m) {
143
+ try {
144
+ return await b(n, a, i, u, h, m);
145
+ } catch (f) {
146
+ if (!q(f) || f.kind !== "unauthorized" || u.handleUnauthorized === !1 || !t.onUnauthorized || await t.onUnauthorized({ error: f, method: n, path: a }) !== "retry") throw f;
147
+ return b(n, a, i, u, h, m);
148
+ }
149
+ }
150
+ const g = (n, a, i, u = {}) => p(n, a, i, u, "application/json", async (h, m) => {
151
+ const f = await k(h, m);
152
+ return c(f.requestId), f;
153
+ });
154
+ function I(n, a = {}, i) {
155
+ const { accept: u = "*/*", method: h = "GET", body: m, ...f } = a;
156
+ return p(h, n, m, f, u, async (l, y) => {
157
+ l.ok || await k(l, y);
158
+ const w = l.headers.get(T) ?? y;
159
+ return c(w), i(l, w);
160
+ });
161
+ }
162
+ async function x(n, a, i = {}) {
163
+ const u = typeof a == "object" && a !== null && !Array.isArray(a) ? { ...a } : {}, h = n.path.replace(/:([A-Za-z_][A-Za-z0-9_]*)/g, (f, l) => {
164
+ const y = u[l];
165
+ if (y == null || y === "")
166
+ throw new Error(`${n.method} ${n.path}: the input has no value for the path parameter "${l}"`);
167
+ return delete u[l], encodeURIComponent(String(y));
168
+ }), m = Object.keys(u).length > 0;
169
+ return n.method === "GET" || n.method === "DELETE" ? g(n.method, h, void 0, { ...i, query: { ...u, ...i.query } }) : g(n.method, h, m ? u : void 0, i);
170
+ }
171
+ return {
172
+ // the rest-tuple overload is the public contract; the implementation takes its arguments positionally
173
+ request: x,
174
+ get: (n, a) => g("GET", n, void 0, a),
175
+ post: (n, a, i) => g("POST", n, a, i),
176
+ put: (n, a, i) => g("PUT", n, a, i),
177
+ patch: (n, a, i) => g("PATCH", n, a, i),
178
+ delete: (n, a) => g("DELETE", n, void 0, a),
179
+ download: (n, a) => I(n, a, async (i, u) => ({
180
+ blob: await i.blob(),
181
+ filename: Q(i.headers.get("Content-Disposition")),
182
+ requestId: u
183
+ })),
184
+ stream: (n, a) => I(n, a, async (i) => i),
185
+ recentRequestIds: () => [...o]
186
+ };
187
+ }
188
+ export {
189
+ M as R,
190
+ T as a,
191
+ K as c,
192
+ V as f
193
+ };
@@ -1,11 +1,11 @@
1
1
  import { D as q, d as z } from "../definition-C7QuyV3i.js";
2
- import { _ as j, a as G, u as U } from "../CollectionPage.vue_vue_type_script_setup_true_lang--onFdKOB.js";
2
+ import { _ as j, a as G, u as U } from "../CollectionPage.vue_vue_type_script_setup_true_lang-Bcwwr8ng.js";
3
3
  import { h as X, l as Z, r as H } from "../http-nz92KjdS.js";
4
- import { L as Q } from "../state-ChVIjayU.js";
5
- import { u as Y, a as ee } from "../neighbors-BKzihEGQ.js";
4
+ import { L as Q } from "../state-BiYPPKoj.js";
5
+ import { u as Y, a as ee } from "../neighbors-CcCaurV5.js";
6
6
  import { route as f } from "../client/index.js";
7
- import { b as se, a as ae } from "../rowLayout-XlTcD4de.js";
8
- import { _ as ne } from "../DataTable.vue_vue_type_script_setup_true_lang-CTukf2B2.js";
7
+ import { b as se, a as ae } from "../rowLayout-BLhJ9-42.js";
8
+ import { _ as ne } from "../DataTable.vue_vue_type_script_setup_true_lang-CJlllQII.js";
9
9
  import { defineComponent as k, openBlock as d, createElementBlock as c, Fragment as C, renderList as g, createBlock as h, unref as m, withCtx as E, normalizeClass as p, createVNode as b, createCommentVNode as S } from "vue";
10
10
  import { _ } from "../Icon.vue_vue_type_script_lang-BhhsFYwp.js";
11
11
  import { _ as T } from "../Tooltip.vue_vue_type_script_setup_true_lang-mErNPt8e.js";
@@ -0,0 +1,31 @@
1
+ /**
2
+ * An amount in major units (12.5 is twelve and a half), in the application's number format and its
3
+ * currency symbol (`createFormatting({ currencySymbol })`). Tabular figures, so digits line up in a
4
+ * column; the symbol a step quieter than the number. A missing amount reads as zero.
5
+ *
6
+ * <Money :amount="offer.price" /> <!-- 12.000,00 € -->
7
+ * <Money :amount="row.amount" :symbol="false" /> <!-- number only -->
8
+ * <Money :amount="price" whole empty-zero /> <!-- 39.600 €, and — for null or 0 -->
9
+ * <Money :amount="correction" signed /> <!-- + 250,00 € in green, − 250,00 € in red -->
10
+ */
11
+ type __VLS_Props = {
12
+ amount: number | null | undefined;
13
+ /** Show the currency symbol (default true; nothing shows when the application set none). */
14
+ symbol?: boolean;
15
+ /** Fraction digits (default 2). */
16
+ decimals?: number;
17
+ /** Drop the fraction of an amount that has none: "39.600", not "39.600,00". */
18
+ whole?: boolean;
19
+ /** Show "—" for null or 0: a missing price, not a free item. */
20
+ emptyZero?: boolean;
21
+ /** A change rather than an amount: "+" and green when it raises, "−" and red when it lowers, plain at 0. */
22
+ signed?: boolean;
23
+ };
24
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
25
+ symbol: boolean;
26
+ decimals: number;
27
+ whole: boolean;
28
+ emptyZero: boolean;
29
+ signed: boolean;
30
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
31
+ export default _default;
@@ -4,5 +4,6 @@ export { initialsFor } from "./initials";
4
4
  export { default as KeyValue } from "./KeyValue.vue";
5
5
  export { default as KeyValueList, type KeyValueItem } from "./KeyValueList.vue";
6
6
  export { default as MicroLabel } from "./MicroLabel.vue";
7
+ export { default as Money } from "./Money.vue";
7
8
  export { default as Panel } from "./Panel.vue";
8
9
  export { default as Timestamp } from "./Timestamp.vue";
@@ -1,78 +1,113 @@
1
- import { _ as K, i as S } from "../Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
2
- import { defineComponent as o, openBlock as t, createElementBlock as l, createElementVNode as c, toDisplayString as u, createCommentVNode as d, normalizeClass as f, Fragment as _, renderList as g, createBlock as i, createSlots as x, withCtx as p, renderSlot as m, resolveDynamicComponent as y } from "vue";
3
- import { _ as b } from "../KeyValue.vue_vue_type_script_setup_true_lang-wcZcvnow.js";
4
- import { _ as F } from "../Panel.vue_vue_type_script_setup_true_lang-D_Wg42hu.js";
5
- import { _ as N } from "../Timestamp.vue_vue_type_script_setup_true_lang-u53rHMFG.js";
6
- const k = {
1
+ import { _ as G, i as P } from "../Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
2
+ import { defineComponent as c, openBlock as t, createElementBlock as n, createElementVNode as _, toDisplayString as u, createCommentVNode as i, normalizeClass as p, Fragment as d, renderList as w, createBlock as b, createSlots as $, withCtx as x, renderSlot as k, resolveDynamicComponent as B, computed as r, createTextVNode as g } from "vue";
3
+ import { _ as D } from "../KeyValue.vue_vue_type_script_setup_true_lang-wcZcvnow.js";
4
+ import { u as M } from "../format-Dn-BOb-o.js";
5
+ import { _ as j } from "../Panel.vue_vue_type_script_setup_true_lang-D_Wg42hu.js";
6
+ import { _ as H } from "../Timestamp.vue_vue_type_script_setup_true_lang-CAz2W69d.js";
7
+ const F = {
7
8
  role: "separator",
8
9
  class: "my-2 flex items-center gap-4"
9
- }, v = {
10
+ }, V = {
10
11
  key: 0,
11
12
  class: "select-none whitespace-nowrap font-mono text-2xs uppercase tracking-widest text-content-muted"
12
- }, D = /* @__PURE__ */ o({
13
+ }, K = /* @__PURE__ */ c({
13
14
  __name: "Divider",
14
15
  props: {
15
16
  label: {}
16
17
  },
17
- setup(s) {
18
- return (a, e) => (t(), l("div", k, [
19
- e[0] || (e[0] = c("span", { class: "h-px flex-1 bg-border-separator" }, null, -1)),
20
- s.label ? (t(), l("span", v, u(s.label), 1)) : d("", !0),
21
- e[1] || (e[1] = c("span", { class: "h-px flex-1 bg-border-separator" }, null, -1))
18
+ setup(l) {
19
+ return (e, a) => (t(), n("div", F, [
20
+ a[0] || (a[0] = _("span", { class: "h-px flex-1 bg-border-separator" }, null, -1)),
21
+ l.label ? (t(), n("span", V, u(l.label), 1)) : i("", !0),
22
+ a[1] || (a[1] = _("span", { class: "h-px flex-1 bg-border-separator" }, null, -1))
22
23
  ]));
23
24
  }
24
- }), L = /* @__PURE__ */ o({
25
+ }), I = /* @__PURE__ */ c({
25
26
  __name: "KeyValueList",
26
27
  props: {
27
28
  items: {},
28
29
  columns: { default: 1 }
29
30
  },
30
- setup(s) {
31
- const a = s, e = {
31
+ setup(l) {
32
+ const e = l, a = {
32
33
  1: "grid-cols-1",
33
34
  2: "grid-cols-1 sm:grid-cols-2",
34
35
  3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"
35
36
  };
36
- return (n, $) => (t(), l("dl", {
37
- class: f(["grid gap-x-6 gap-y-3", e[a.columns]])
37
+ return (s, f) => (t(), n("dl", {
38
+ class: p(["grid gap-x-6 gap-y-3", a[e.columns]])
38
39
  }, [
39
- (t(!0), l(_, null, g(a.items, (r) => (t(), i(b, {
40
- key: r.key,
41
- label: r.label,
42
- value: r.value,
43
- "data-key": r.key
44
- }, x({ _: 2 }, [
45
- n.$slots.value ? {
40
+ (t(!0), n(d, null, w(e.items, (o) => (t(), b(D, {
41
+ key: o.key,
42
+ label: o.label,
43
+ value: o.value,
44
+ "data-key": o.key
45
+ }, $({ _: 2 }, [
46
+ s.$slots.value ? {
46
47
  name: "default",
47
- fn: p(() => [
48
- m(n.$slots, "value", { item: r })
48
+ fn: x(() => [
49
+ k(s.$slots, "value", { item: o })
49
50
  ]),
50
51
  key: "0"
51
52
  } : void 0
52
53
  ]), 1032, ["label", "value", "data-key"]))), 128))
53
54
  ], 2));
54
55
  }
55
- }), V = /* @__PURE__ */ o({
56
+ }), T = /* @__PURE__ */ c({
56
57
  __name: "MicroLabel",
57
58
  props: {
58
59
  as: { default: "span" }
59
60
  },
60
- setup(s) {
61
- return (a, e) => (t(), i(y(s.as), { class: "text-2xs font-semibold uppercase tracking-[0.06em] text-content-muted" }, {
62
- default: p(() => [
63
- m(a.$slots, "default")
61
+ setup(l) {
62
+ return (e, a) => (t(), b(B(l.as), { class: "text-2xs font-semibold uppercase tracking-[0.06em] text-content-muted" }, {
63
+ default: x(() => [
64
+ k(e.$slots, "default")
64
65
  ]),
65
66
  _: 3
66
67
  }));
67
68
  }
69
+ }), C = {
70
+ key: 0,
71
+ class: "mr-0.5"
72
+ }, Z = /* @__PURE__ */ c({
73
+ __name: "Money",
74
+ props: {
75
+ amount: {},
76
+ symbol: { type: Boolean, default: !0 },
77
+ decimals: { default: 2 },
78
+ whole: { type: Boolean, default: !1 },
79
+ emptyZero: { type: Boolean, default: !1 },
80
+ signed: { type: Boolean, default: !1 }
81
+ },
82
+ setup(l) {
83
+ const e = l, a = M(), s = r(() => typeof e.amount == "number" && Number.isFinite(e.amount) ? e.amount : 0), f = r(() => e.emptyZero && !s.value), o = r(() => !e.signed || !s.value || !Math.round(Math.abs(s.value) * 10 ** e.decimals) ? "" : s.value > 0 ? "+" : "−"), h = r(() => {
84
+ const m = e.whole && Number.isInteger(s.value) ? 0 : e.decimals;
85
+ return a.number(e.signed ? Math.abs(s.value) : s.value, { minimumFractionDigits: m, maximumFractionDigits: m });
86
+ }), y = r(() => o.value === "+" ? "font-medium text-status-success-content" : o.value === "−" ? "font-medium text-status-danger-content" : ""), v = r(() => e.symbol ? a.currencySymbol : "");
87
+ return (m, L) => (t(), n("span", {
88
+ class: p(["whitespace-nowrap tabular-nums", y.value])
89
+ }, [
90
+ f.value ? (t(), n(d, { key: 0 }, [
91
+ g("—")
92
+ ], 64)) : (t(), n(d, { key: 1 }, [
93
+ o.value ? (t(), n("span", C, u(o.value), 1)) : i("", !0),
94
+ g(u(h.value), 1),
95
+ v.value ? (t(), n("span", {
96
+ key: 1,
97
+ class: p(["ml-1 font-normal", y.value ? "opacity-75" : "text-content-muted"])
98
+ }, u(v.value), 3)) : i("", !0)
99
+ ], 64))
100
+ ], 2));
101
+ }
68
102
  });
69
103
  export {
70
- K as Avatar,
71
- D as Divider,
72
- b as KeyValue,
73
- L as KeyValueList,
74
- V as MicroLabel,
75
- F as Panel,
76
- N as Timestamp,
77
- S as initialsFor
104
+ G as Avatar,
105
+ K as Divider,
106
+ D as KeyValue,
107
+ I as KeyValueList,
108
+ T as MicroLabel,
109
+ Z as Money,
110
+ j as Panel,
111
+ H as Timestamp,
112
+ P as initialsFor
78
113
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as i, h as l } from "vue";
2
2
  import { d as u } from "./context-Ch1r4fdN.js";
3
- import { h as a } from "./platform-Dr4iY3b8.js";
3
+ import { h as a } from "./platform-BZUWAXQV.js";
4
4
  function h(o, n) {
5
5
  const t = o.map(({ contribution: e }) => e).sort((e, r) => (e.order ?? 0) - (r.order ?? 0));
6
6
  return {
@@ -1,6 +1,6 @@
1
1
  import { useI18n as m } from "vue-i18n";
2
2
  import { i as c } from "./error-Bb_dr_Ay.js";
3
- import { u as a } from "./format-D8X4zsx6.js";
3
+ import { u as a } from "./format-Dn-BOb-o.js";
4
4
  import { u as l } from "./describeError-BqGAUZgX.js";
5
5
  function E() {
6
6
  const { t: i, te: u } = m(), d = a(), f = l(), s = (e) => [`errors.${e}`, `core.errors.${e}`].find((t) => u(t));
@@ -26,6 +26,11 @@ type __VLS_Props = {
26
26
  canSave?: boolean;
27
27
  /** The name of a field for people, for errors whose field is not on screen. */
28
28
  fieldLabel?: (field: string) => string;
29
+ /**
30
+ * An edit of a saved record: Save stays off until something changes. Default false, a create page, where an untouched form
31
+ * is submitted to learn what is missing.
32
+ */
33
+ disabledWhileClean?: boolean;
29
34
  };
30
35
  type __VLS_Slots = {
31
36
  default?: () => unknown;
@@ -50,6 +55,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
50
55
  fieldLabel: (field: string) => string;
51
56
  saveLabel: string;
52
57
  canSave: boolean;
58
+ disabledWhileClean: boolean;
53
59
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
54
60
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
55
61
  export default _default;
@@ -34,12 +34,12 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
34
34
  error: string;
35
35
  required: boolean;
36
36
  presentation: "control" | "value";
37
+ accept: readonly string[];
37
38
  variant: "button" | "dropzone";
38
39
  labelHidden: boolean;
39
40
  hint: string;
40
41
  editable: boolean;
41
42
  lockedReason: string;
42
- accept: readonly string[];
43
43
  maxSize: number;
44
44
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
45
45
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
@@ -25,11 +25,11 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
25
25
  error: string;
26
26
  required: boolean;
27
27
  presentation: "control" | "value";
28
+ accept: readonly string[];
28
29
  labelHidden: boolean;
29
30
  hint: string;
30
31
  editable: boolean;
31
32
  lockedReason: string;
32
- accept: readonly string[];
33
33
  maxSize: number;
34
34
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
35
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;