@wssto2/vue-core 0.8.0 → 0.9.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 +17 -0
- package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-CkomzGrt.js → AccessGate.vue_vue_type_script_setup_true_lang-B8gpkhbw.js} +1 -1
- package/dist/{Activity-Cm1dlM2b.js → Activity-CfG8_Pp3.js} +7 -7
- 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
- package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-GxAsImnO.js → AsyncSection.vue_vue_type_script_setup_true_lang-BTIUz3cG.js} +1 -1
- 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
- package/dist/{Changes-fN0KMYbW.js → Changes-BT__0XX0.js} +6 -6
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang--onFdKOB.js → CollectionPage.vue_vue_type_script_setup_true_lang-Bcwwr8ng.js} +7 -7
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-CTukf2B2.js → DataTable.vue_vue_type_script_setup_true_lang-CJlllQII.js} +1 -1
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-DmYp54mq.js → DateField.vue_vue_type_script_setup_true_lang-BuQY5e5x.js} +2 -2
- package/dist/{DeadLetters-BslDh93e.js → DeadLetters-Btv3u3qh.js} +4 -4
- package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-BTADNpwB.js → FormGroup.vue_vue_type_script_setup_true_lang-Bzm3yJy5.js} +1 -1
- package/dist/{General-DJ53Egpp.js → General-Cum9U4Z3.js} +6 -6
- package/dist/{IncidentRecord-DQTnYQEe.js → IncidentRecord-C4K8hDJ1.js} +10 -10
- package/dist/{IncidentsList-C3yUnwwY.js → IncidentsList-BHfJ1cbg.js} +6 -6
- 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
- package/dist/{NewRolePage-Bw2_jXcQ.js → NewRolePage-BSvYZkH4.js} +4 -4
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-C3nw944P.js → NumberField.vue_vue_type_script_setup_true_lang-CLN2COfp.js} +1 -1
- package/dist/{PageBar.vue_vue_type_script_setup_true_lang-DPpcZxuT.js → PageBar.vue_vue_type_script_setup_true_lang-OE8VgTkY.js} +1 -1
- package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-07pq4SrY.js → PersonAccess.vue_vue_type_script_setup_true_lang-CBQ1kv8G.js} +7 -7
- package/dist/{ProfilePage-DxALOfzC.js → ProfilePage-Dnn_VUoB.js} +13 -13
- package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-DPm9q1P_.js → RecordHeader.vue_vue_type_script_setup_true_lang-CU7fZpp2.js} +1 -1
- package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-Cm3tx76N.js → ResourcePage.vue_vue_type_script_setup_true_lang-y3gyR5A-.js} +3 -3
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-DuQR8hFf.js → RoleEditor.vue_vue_type_script_setup_true_lang-BcUxVL9y.js} +5 -5
- package/dist/{RolePage-Yv6m6u7o.js → RolePage-BIY9dEME.js} +10 -10
- package/dist/{RolesPage-TibtzxzQ.js → RolesPage-Be35CA_4.js} +5 -5
- 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
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-ivdGWUeF.js → SectionNavigator.vue_vue_type_script_setup_true_lang-CWPD9zQJ.js} +3 -3
- package/dist/{SelectField.vue_vue_type_script_setup_true_lang-iJm8qmjT.js → SelectField.vue_vue_type_script_setup_true_lang-CYiarLAK.js} +1 -1
- 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
- package/dist/{ServiceAccountRecord-B_amE8fL.js → ServiceAccountRecord-QsIfylwj.js} +13 -13
- package/dist/{ServiceAccountsList-CoDKG_15.js → ServiceAccountsList-CVDIhuCh.js} +7 -7
- package/dist/{SessionList.vue_vue_type_script_setup_true_lang-BEKTaL0g.js → SessionList.vue_vue_type_script_setup_true_lang-CkN7vR71.js} +3 -3
- package/dist/{Sessions-BrAEXAMA.js → Sessions-Cl2DTM7s.js} +5 -5
- package/dist/{SettingsPage-Cje1X0ix.js → SettingsPage-B2uWw27O.js} +10 -10
- package/dist/{SignIn-CbWgDlFb.js → SignIn-BHYFSMOX.js} +5 -5
- package/dist/{SignInPage-DmHdrZR-.js → SignInPage--OC0hQ8M.js} +3 -3
- package/dist/{SignIns-D5BRb9Sr.js → SignIns-CJ09NqOn.js} +5 -5
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-BwoE08jT.js → TimeField.vue_vue_type_script_setup_true_lang-B140Gjqd.js} +2 -2
- package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-u53rHMFG.js → Timestamp.vue_vue_type_script_setup_true_lang-CAz2W69d.js} +1 -1
- package/dist/{UserRecord-rIeTkocJ.js → UserRecord-BjXUcHo8.js} +9 -9
- package/dist/{UsersList-CiPeerC7.js → UsersList-D4-eC5tC.js} +9 -9
- package/dist/access/index.js +4 -4
- package/dist/app/application.d.ts +4 -2
- package/dist/app/index.js +2 -2
- package/dist/application-DtY0ef-w.js +420 -0
- package/dist/button/index.js +1 -1
- package/dist/button/shortcut.d.ts +7 -0
- package/dist/client/client.d.ts +33 -0
- package/dist/client/disposition.d.ts +5 -0
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client-Dr2vV3qH.js +193 -0
- package/dist/collection/index.js +5 -5
- package/dist/content/Money.vue.d.ts +31 -0
- package/dist/content/index.d.ts +1 -0
- package/dist/content/index.js +75 -40
- package/dist/{contributions-BQ9dZoRw.js → contributions-DGsAIWd8.js} +1 -1
- package/dist/{fieldMessages-DTXpWnBd.js → fieldMessages-6UTV9yWL.js} +1 -1
- package/dist/form/FileField.vue.d.ts +1 -1
- package/dist/form/PhotoField.vue.d.ts +1 -1
- package/dist/form/index.js +18 -18
- package/dist/format/format.d.ts +9 -1
- package/dist/format/index.js +1 -1
- package/dist/format-Dn-BOb-o.js +86 -0
- package/dist/{guards-BFCulig0.js → guards-Cz7TOQD8.js} +1 -1
- package/dist/identity/index.js +1 -1
- package/dist/incidents/index.js +1 -1
- package/dist/{index-B_lzrZot.js → index-BB0_hxmE.js} +16 -16
- package/dist/{index-BQg5X6iK.js → index-C1jSzT1V.js} +7 -7
- package/dist/{index-Cgu6Ntok.js → index-DZQ3gy3e.js} +8 -8
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/modal/index.js +15 -15
- package/dist/{navigation-BSC9X7FM.js → navigation-CWj6F_cV.js} +1 -1
- package/dist/{neighbors-BKzihEGQ.js → neighbors-CcCaurV5.js} +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/page/index.js +5 -5
- package/dist/platform/index.js +3 -3
- package/dist/{platform-Dr4iY3b8.js → platform-BZUWAXQV.js} +1 -1
- package/dist/pwa/index.d.ts +2 -0
- package/dist/pwa/index.js +51 -0
- package/dist/pwa/install.d.ts +12 -0
- package/dist/pwa/worker.d.ts +13 -0
- package/dist/resource/index.js +1 -1
- package/dist/router/index.js +3 -3
- package/dist/{rowLayout-XlTcD4de.js → rowLayout-BLhJ9-42.js} +2 -2
- package/dist/{sections-BXg4_ZhO.js → sections-CmqFs-U-.js} +1 -1
- package/dist/shell/index.js +3 -3
- package/dist/state/index.js +1 -1
- package/dist/{state-ChVIjayU.js → state-BiYPPKoj.js} +1 -1
- package/dist/{status-BV5Ae4K4.js → status-Bf4nfIe0.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/testing/index.js +2 -2
- package/dist/{useCommand-BIZX1ReM.js → useCommand-C3QTZIIw.js} +1 -1
- package/dist/{useGroupSheet-DxXzdKo3.js → useGroupSheet-LAnO37WV.js} +2 -2
- package/dist/{useRecordDialog-BLVSz7g3.js → useRecordDialog-Da1Sfak1.js} +1 -1
- package/dist/{useTypedEntry-CKuGqWT8.js → useTypedEntry-DIYdA7DK.js} +1 -1
- package/package.json +5 -1
- package/dist/application-D8Nm17zA.js +0 -420
- package/dist/client-CZgikXPG.js +0 -151
- 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
|
+
};
|
package/dist/collection/index.js
CHANGED
|
@@ -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
|
|
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-
|
|
5
|
-
import { u as Y, a as ee } from "../neighbors-
|
|
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-
|
|
8
|
-
import { _ as ne } from "../DataTable.vue_vue_type_script_setup_true_lang-
|
|
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;
|
package/dist/content/index.d.ts
CHANGED
|
@@ -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";
|
package/dist/content/index.js
CHANGED
|
@@ -1,78 +1,113 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { _ as
|
|
4
|
-
import {
|
|
5
|
-
import { _ as
|
|
6
|
-
|
|
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
|
-
},
|
|
10
|
+
}, V = {
|
|
10
11
|
key: 0,
|
|
11
12
|
class: "select-none whitespace-nowrap font-mono text-2xs uppercase tracking-widest text-content-muted"
|
|
12
|
-
},
|
|
13
|
+
}, K = /* @__PURE__ */ c({
|
|
13
14
|
__name: "Divider",
|
|
14
15
|
props: {
|
|
15
16
|
label: {}
|
|
16
17
|
},
|
|
17
|
-
setup(
|
|
18
|
-
return (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
}),
|
|
25
|
+
}), I = /* @__PURE__ */ c({
|
|
25
26
|
__name: "KeyValueList",
|
|
26
27
|
props: {
|
|
27
28
|
items: {},
|
|
28
29
|
columns: { default: 1 }
|
|
29
30
|
},
|
|
30
|
-
setup(
|
|
31
|
-
const
|
|
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 (
|
|
37
|
-
class:
|
|
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),
|
|
40
|
-
key:
|
|
41
|
-
label:
|
|
42
|
-
value:
|
|
43
|
-
"data-key":
|
|
44
|
-
},
|
|
45
|
-
|
|
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:
|
|
48
|
-
|
|
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
|
-
}),
|
|
56
|
+
}), T = /* @__PURE__ */ c({
|
|
56
57
|
__name: "MicroLabel",
|
|
57
58
|
props: {
|
|
58
59
|
as: { default: "span" }
|
|
59
60
|
},
|
|
60
|
-
setup(
|
|
61
|
-
return (
|
|
62
|
-
default:
|
|
63
|
-
|
|
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
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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-
|
|
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-
|
|
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));
|
|
@@ -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>;
|
package/dist/form/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as He, c as et, f as tt } from "../FormErrors.vue_vue_type_script_setup_true_lang-DJiK8iqo.js";
|
|
2
2
|
import { E as $o, u as _o, a as Co } from "../FormErrors.vue_vue_type_script_setup_true_lang-DJiK8iqo.js";
|
|
3
|
-
import { f as Te } from "../useCommand-
|
|
4
|
-
import { _ as Fo, a as Bo, u as Lo } from "../useCommand-
|
|
3
|
+
import { f as Te } from "../useCommand-C3QTZIIw.js";
|
|
4
|
+
import { _ as Fo, a as Bo, u as Lo } from "../useCommand-C3QTZIIw.js";
|
|
5
5
|
import { ref as A, computed as h, defineComponent as G, openBlock as u, createBlock as D, mergeProps as W, unref as l, createSlots as J, withCtx as f, createElementVNode as y, normalizeClass as I, createElementBlock as g, Fragment as ie, renderList as xe, createVNode as j, createCommentVNode as L, toDisplayString as _, renderSlot as F, mergeDefaults as ue, useModel as re, useId as qe, withKeys as Ce, withModifiers as pe, createTextVNode as H, mergeModels as le, useTemplateRef as U, shallowRef as Oe, watch as ye, normalizeProps as ze, guardReactiveProps as Ve, nextTick as he, provide as at, inject as Ue, onBeforeUnmount as Ye, getCurrentScope as lt, onScopeDispose as ot, toValue as nt, shallowReactive as Ee, normalizeStyle as st, resolveDynamicComponent as rt } from "vue";
|
|
6
6
|
import { a as We } from "../leaveGuard-Cc8yeLxM.js";
|
|
7
7
|
import { M as zo, c as Vo, i as qo, l as Do, u as Ro } from "../leaveGuard-Cc8yeLxM.js";
|
|
@@ -16,35 +16,35 @@ import { a as ft } from "../TextField.vue_vue_type_script_setup_true_lang-7IAl4e
|
|
|
16
16
|
import { _ as Ao } from "../TextField.vue_vue_type_script_setup_true_lang-7IAl4eAE.js";
|
|
17
17
|
import { u as mt, l as vt } from "../suggestions-niXd1oOl.js";
|
|
18
18
|
import { r as Uo } from "../suggestions-niXd1oOl.js";
|
|
19
|
-
import { s as $e, u as Ne, i as pt, o as _e, e as Se, k as bt, _ as yt, l as gt, c as ht, b as kt, t as Le, g as xt, q as wt } from "../useTypedEntry-
|
|
20
|
-
import { u as $t, a as _t, s as Ct } from "../DateField.vue_vue_type_script_setup_true_lang-
|
|
21
|
-
import { _ as Wo } from "../DateField.vue_vue_type_script_setup_true_lang-
|
|
19
|
+
import { s as $e, u as Ne, i as pt, o as _e, e as Se, k as bt, _ as yt, l as gt, c as ht, b as kt, t as Le, g as xt, q as wt } from "../useTypedEntry-DIYdA7DK.js";
|
|
20
|
+
import { u as $t, a as _t, s as Ct } from "../DateField.vue_vue_type_script_setup_true_lang-BuQY5e5x.js";
|
|
21
|
+
import { _ as Wo } from "../DateField.vue_vue_type_script_setup_true_lang-BuQY5e5x.js";
|
|
22
22
|
import { _ as Xe } from "../DateButton.vue_vue_type_script_setup_true_lang-CovKG5lN.js";
|
|
23
|
-
import { u as St } from "../format-
|
|
23
|
+
import { u as St } from "../format-Dn-BOb-o.js";
|
|
24
24
|
import { u as Re } from "../mediaQuery-CygcXmFW.js";
|
|
25
25
|
import { _ as Me } from "../Popover.vue_vue_type_script_setup_true_lang-C70GrCP7.js";
|
|
26
|
-
import { u as Ft } from "../TimeField.vue_vue_type_script_setup_true_lang-
|
|
27
|
-
import { _ as Zo } from "../TimeField.vue_vue_type_script_setup_true_lang-
|
|
28
|
-
import { _ as be } from "../Button.vue_vue_type_script_setup_true_lang-
|
|
29
|
-
import { _ as Bt } from "../FormGroup.vue_vue_type_script_setup_true_lang-
|
|
30
|
-
import { a as Qo, c as en, p as tn, r as an, u as ln } from "../FormGroup.vue_vue_type_script_setup_true_lang-
|
|
26
|
+
import { u as Ft } from "../TimeField.vue_vue_type_script_setup_true_lang-B140Gjqd.js";
|
|
27
|
+
import { _ as Zo } from "../TimeField.vue_vue_type_script_setup_true_lang-B140Gjqd.js";
|
|
28
|
+
import { _ as be } from "../Button.vue_vue_type_script_setup_true_lang-Dn-cJcj3.js";
|
|
29
|
+
import { _ as Bt } from "../FormGroup.vue_vue_type_script_setup_true_lang-Bzm3yJy5.js";
|
|
30
|
+
import { a as Qo, c as en, p as tn, r as an, u as ln } from "../FormGroup.vue_vue_type_script_setup_true_lang-Bzm3yJy5.js";
|
|
31
31
|
import { _ as nn } from "../FormView.vue_vue_type_script_setup_true_lang-Ncl9DmFB.js";
|
|
32
32
|
import { i as Lt } from "../intlLocale-CeRU44qJ.js";
|
|
33
33
|
import { a as Tt } from "../environment-Dva-SG8D.js";
|
|
34
|
-
import { _ as zt } from "../NumberField.vue_vue_type_script_setup_true_lang-
|
|
34
|
+
import { _ as zt } from "../NumberField.vue_vue_type_script_setup_true_lang-CLN2COfp.js";
|
|
35
35
|
import { _ as Vt } from "../Sheet.vue_vue_type_script_setup_true_lang-sh9YD0Pm.js";
|
|
36
|
-
import { b as qt, a as Ge } from "../SelectField.vue_vue_type_script_setup_true_lang-
|
|
37
|
-
import { _ as rn, u as un } from "../SelectField.vue_vue_type_script_setup_true_lang-
|
|
38
|
-
import { _ as cn, b as fn, a as mn, u as vn } from "../useGroupSheet-
|
|
36
|
+
import { b as qt, a as Ge } from "../SelectField.vue_vue_type_script_setup_true_lang-CYiarLAK.js";
|
|
37
|
+
import { _ as rn, u as un } from "../SelectField.vue_vue_type_script_setup_true_lang-CYiarLAK.js";
|
|
38
|
+
import { _ as cn, b as fn, a as mn, u as vn } from "../useGroupSheet-LAnO37WV.js";
|
|
39
39
|
import { _ as Ke } from "../PhotoViewer.vue_vue_type_script_setup_true_lang-Cj0hSMk9.js";
|
|
40
40
|
import { _ as bn } from "../SegmentedField.vue_vue_type_script_setup_true_lang-ChfDFAA2.js";
|
|
41
41
|
import { _ as gn } from "../SwitchField.vue_vue_type_script_setup_true_lang-BMA2YXTZ.js";
|
|
42
42
|
import { _ as kn } from "../TextareaField.vue_vue_type_script_setup_true_lang-Dyh4Hhyl.js";
|
|
43
|
-
import { a as Dt } from "../AdaptivePageShell.vue_vue_type_script_setup_true_lang-
|
|
44
|
-
import { _ as Rt, a as Mt } from "../SectionList.vue_vue_type_script_setup_true_lang-
|
|
43
|
+
import { a as Dt } from "../AdaptivePageShell.vue_vue_type_script_setup_true_lang-DC-zSRcl.js";
|
|
44
|
+
import { _ as Rt, a as Mt } from "../SectionList.vue_vue_type_script_setup_true_lang-DzoE_o8v.js";
|
|
45
45
|
import { p as jt } from "../sectionIndex-BS0ic5W7.js";
|
|
46
46
|
import { u as It } from "../useSaveChrome-7huA3FzR.js";
|
|
47
|
-
import { u as wn } from "../useRecordDialog-
|
|
47
|
+
import { u as wn } from "../useRecordDialog-Da1Sfak1.js";
|
|
48
48
|
import { matchedRouteKey as Ot, onBeforeRouteLeave as Et } from "vue-router";
|
|
49
49
|
function Nt(r) {
|
|
50
50
|
const a = A(null);
|
package/dist/format/format.d.ts
CHANGED
|
@@ -34,7 +34,13 @@ export interface Formatting {
|
|
|
34
34
|
dateTime(value: DateInput): string;
|
|
35
35
|
time(value: DateInput): string;
|
|
36
36
|
number(value: number | null | undefined, options?: Intl.NumberFormatOptions): string;
|
|
37
|
-
|
|
37
|
+
/**
|
|
38
|
+
* With an ISO `currency` ("EUR"): `Intl`'s currency style. Without one: the amount with two decimals, then the
|
|
39
|
+
* `currencySymbol` after a space ("1.234,50 KM"), or the bare amount when the application set no symbol.
|
|
40
|
+
*/
|
|
41
|
+
money(amount: number | null | undefined, currency?: string): string;
|
|
42
|
+
/** The display symbol the application set (`""` when none), for a caller that draws it apart from the amount. */
|
|
43
|
+
readonly currencySymbol: string;
|
|
38
44
|
/** "3 days ago", "in 2 hours", "now": the largest whole unit. */
|
|
39
45
|
relative(value: DateInput, now?: Date): string;
|
|
40
46
|
}
|
|
@@ -45,6 +51,8 @@ export interface FormattingOptions {
|
|
|
45
51
|
locale: () => string;
|
|
46
52
|
/** Replaces any of the `Intl` defaults. */
|
|
47
53
|
formatters?: Partial<Formatters>;
|
|
54
|
+
/** The symbol shown after an amount when no ISO currency is passed: "€", "KM". It is text, not a currency code. */
|
|
55
|
+
currencySymbol?: string;
|
|
48
56
|
}
|
|
49
57
|
export declare function createFormatting(options: FormattingOptions): Formatting;
|
|
50
58
|
/** The formatting of the app (or of a subtree): `installFormatting(app, createFormatting(...))` once, `useFormat()` below. */
|
package/dist/format/index.js
CHANGED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { d as y } from "./context-Ch1r4fdN.js";
|
|
2
|
+
import { i } from "./intlLocale-CeRU44qJ.js";
|
|
3
|
+
const b = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
4
|
+
function c(r) {
|
|
5
|
+
if (r == null || r === "") return null;
|
|
6
|
+
let n;
|
|
7
|
+
if (r instanceof Date) n = r;
|
|
8
|
+
else if (typeof r == "number") n = new Date(r);
|
|
9
|
+
else {
|
|
10
|
+
const a = b.exec(r);
|
|
11
|
+
n = a ? new Date(Number(a[1]), Number(a[2]) - 1, Number(a[3])) : new Date(r);
|
|
12
|
+
}
|
|
13
|
+
return Number.isNaN(n.getTime()) || n.getTime() <= 0 ? null : n;
|
|
14
|
+
}
|
|
15
|
+
const s = { year: "numeric", month: "2-digit", day: "2-digit" }, f = { hour: "2-digit", minute: "2-digit" }, o = [
|
|
16
|
+
["year", 31536e3],
|
|
17
|
+
["month", 2592e3],
|
|
18
|
+
["week", 604800],
|
|
19
|
+
["day", 86400],
|
|
20
|
+
["hour", 3600],
|
|
21
|
+
["minute", 60],
|
|
22
|
+
["second", 1]
|
|
23
|
+
];
|
|
24
|
+
function T() {
|
|
25
|
+
const r = /* @__PURE__ */ new Map(), n = (e, t) => {
|
|
26
|
+
let m = r.get(e);
|
|
27
|
+
return m || (m = t(), r.set(e, m)), m;
|
|
28
|
+
}, a = (e, t) => n(`d|${e}|${JSON.stringify(t)}`, () => new Intl.DateTimeFormat(i(e), t));
|
|
29
|
+
return {
|
|
30
|
+
date: (e, t) => a(t, s).format(e),
|
|
31
|
+
dateTime: (e, t) => a(t, { ...s, ...f }).format(e),
|
|
32
|
+
time: (e, t) => a(t, f).format(e),
|
|
33
|
+
number: (e, t, m) => n(`n|${t}|${JSON.stringify(m ?? {})}`, () => new Intl.NumberFormat(i(t), m)).format(e),
|
|
34
|
+
money: (e, t, m) => n(`m|${m}|${t}`, () => new Intl.NumberFormat(i(m), { style: "currency", currency: t })).format(e),
|
|
35
|
+
relative(e, t, m) {
|
|
36
|
+
const u = Math.trunc((e.getTime() - m.getTime()) / 1e3), [d, l] = o.find(([, g]) => Math.abs(u) >= g) ?? o[o.length - 1];
|
|
37
|
+
return n(`r|${t}`, () => new Intl.RelativeTimeFormat(i(t), { numeric: "auto" })).format(Math.trunc(u / l), d);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function h(r) {
|
|
42
|
+
const n = { ...T(), ...r.formatters }, a = (e) => typeof e == "number" && Number.isFinite(e);
|
|
43
|
+
return {
|
|
44
|
+
get locale() {
|
|
45
|
+
return r.locale();
|
|
46
|
+
},
|
|
47
|
+
date: (e) => {
|
|
48
|
+
const t = c(e);
|
|
49
|
+
return t ? n.date(t, r.locale()) : "";
|
|
50
|
+
},
|
|
51
|
+
dateTime: (e) => {
|
|
52
|
+
const t = c(e);
|
|
53
|
+
return t ? n.dateTime(t, r.locale()) : "";
|
|
54
|
+
},
|
|
55
|
+
time: (e) => {
|
|
56
|
+
const t = c(e);
|
|
57
|
+
return t ? n.time(t, r.locale()) : "";
|
|
58
|
+
},
|
|
59
|
+
number: (e, t) => a(e) ? n.number(e, r.locale(), t) : "",
|
|
60
|
+
get currencySymbol() {
|
|
61
|
+
return r.currencySymbol ?? "";
|
|
62
|
+
},
|
|
63
|
+
money: (e, t) => {
|
|
64
|
+
if (!a(e)) return "";
|
|
65
|
+
if (t) return n.money(e, t, r.locale());
|
|
66
|
+
const m = n.number(e, r.locale(), { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
67
|
+
return r.currencySymbol ? `${m} ${r.currencySymbol}` : m;
|
|
68
|
+
},
|
|
69
|
+
relative: (e, t = /* @__PURE__ */ new Date()) => {
|
|
70
|
+
const m = c(e);
|
|
71
|
+
return m ? n.relative(m, r.locale(), t) : "";
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
const [F, w] = y("vue-core.formatting");
|
|
76
|
+
function $(r, n) {
|
|
77
|
+
r.provide(F, n);
|
|
78
|
+
}
|
|
79
|
+
export {
|
|
80
|
+
T as a,
|
|
81
|
+
h as c,
|
|
82
|
+
F as f,
|
|
83
|
+
$ as i,
|
|
84
|
+
c as t,
|
|
85
|
+
w as u
|
|
86
|
+
};
|
package/dist/identity/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as t, k as a, l as o, i as n, m as i, d as r, n as u, o as c, q as d, r as A, t as p, s as R, v as f, w as l, x as m, g as y } from "../index-
|
|
1
|
+
import { _ as t, k as a, l as o, i as n, m as i, d as r, n as u, o as c, q as d, r as A, t as p, s as R, v as f, w as l, x as m, g as y } from "../index-BB0_hxmE.js";
|
|
2
2
|
import { _ as v } from "../ActionRow.vue_vue_type_script_setup_true_lang-Cg1lhpcA.js";
|
|
3
3
|
import { s as I } from "../routes-CVckt7Pj.js";
|
|
4
4
|
export {
|