@wssto2/vue-core 0.9.2 → 0.9.4

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 (51) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/{Activity-DBy2ZG5b.js → Activity-29hsZ28j.js} +3 -3
  3. package/dist/{Changes-DDicMqpj.js → Changes-Dxjdkd_5.js} +2 -2
  4. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-5QSqmIFj.js → CollectionPage.vue_vue_type_script_setup_true_lang-DHcekGNn.js} +3 -3
  5. package/dist/{DataTable.vue_vue_type_script_setup_true_lang-Ba3vLxt6.js → DataTable.vue_vue_type_script_setup_true_lang-8kBsNRuq.js} +1 -1
  6. package/dist/{DateField.vue_vue_type_script_setup_true_lang-MP9frI9g.js → DateField.vue_vue_type_script_setup_true_lang-BhKdCVFn.js} +2 -2
  7. package/dist/{DeadLetters-qOY8lQQn.js → DeadLetters-Bb5pPlOY.js} +3 -3
  8. package/dist/{General-VsiXKARg.js → General-BAG7S6wV.js} +3 -3
  9. package/dist/{IncidentRecord-CoweBFQ8.js → IncidentRecord-D8aOpNHo.js} +2 -2
  10. package/dist/{IncidentsList-DphbU1FK.js → IncidentsList-C0cFl0Db.js} +5 -5
  11. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-CLN2COfp.js → NumberField.vue_vue_type_script_setup_true_lang-TGGAq8J-.js} +1 -1
  12. package/dist/{ProfilePage-DrKiof1I.js → ProfilePage-BnohZIEg.js} +4 -4
  13. package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-CrtVy3Ea.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-aWkKwxNe.js} +2 -2
  14. package/dist/{ServiceAccountRecord-DnunLV1K.js → ServiceAccountRecord-bxX9yQkC.js} +4 -4
  15. package/dist/{ServiceAccountsList-7OovJ7gR.js → ServiceAccountsList-BXE6htxk.js} +3 -3
  16. package/dist/{SessionList.vue_vue_type_script_setup_true_lang-B04ECmcf.js → SessionList.vue_vue_type_script_setup_true_lang-Cnyt5V8T.js} +1 -1
  17. package/dist/{Sessions-DzyRG4PP.js → Sessions--Gvc0kxw.js} +2 -2
  18. package/dist/{SettingsPage-CaMER5m8.js → SettingsPage-DzDC7gD-.js} +5 -5
  19. package/dist/{SignIn-MHbY4kg8.js → SignIn-CTI_699e.js} +2 -2
  20. package/dist/{SignInPage-3nerqsOt.js → SignInPage-HKC1bm2E.js} +1 -1
  21. package/dist/{SignIns-B3uCHdLX.js → SignIns-BcqBgWgN.js} +2 -2
  22. package/dist/{TimeField.vue_vue_type_script_setup_true_lang-DsWI9A-z.js → TimeField.vue_vue_type_script_setup_true_lang-gGFfQLuK.js} +2 -2
  23. package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-CAz2W69d.js → Timestamp.vue_vue_type_script_setup_true_lang-ClZAAUMd.js} +1 -1
  24. package/dist/{UserRecord-m4c7H9X9.js → UserRecord-CtUPpbCt.js} +3 -3
  25. package/dist/{UsersList-C-c8J2XS.js → UsersList-BMkIgIg8.js} +5 -5
  26. package/dist/app/index.js +1 -1
  27. package/dist/{application-Dqm5sJdZ.js → application-BmXW6iW_.js} +1 -1
  28. package/dist/collection/index.js +3 -3
  29. package/dist/content/index.js +46 -49
  30. package/dist/{fieldMessages-DuyspfNV.js → fieldMessages-B6GHgi40.js} +1 -1
  31. package/dist/form/index.d.ts +2 -0
  32. package/dist/form/index.js +611 -593
  33. package/dist/form/storableText.d.ts +24 -0
  34. package/dist/format/format.d.ts +16 -4
  35. package/dist/format/index.d.ts +1 -1
  36. package/dist/format/index.js +1 -1
  37. package/dist/format-D8KUBmbS.js +87 -0
  38. package/dist/identity/index.js +1 -1
  39. package/dist/incidents/index.js +1 -1
  40. package/dist/{index-DLq_tp3t.js → index-CdtofdcJ.js} +13 -13
  41. package/dist/{index-DwgdsKJN.js → index-Dm-sdJJr.js} +3 -3
  42. package/dist/{index-W80SBKUX.js → index-Dz0LkLM8.js} +3 -3
  43. package/dist/index.d.ts +1 -1
  44. package/dist/index.js +1 -1
  45. package/dist/notifications/index.js +1 -1
  46. package/dist/{rowLayout-DQtop4nN.js → rowLayout-CT8vWYgI.js} +3 -3
  47. package/dist/{status-MUjElKZC.js → status-BRA14qwX.js} +1 -1
  48. package/dist/testing/index.js +1 -1
  49. package/dist/{useTypedEntry-KfhdrVqp.js → useTypedEntry-C_Bk4sI0.js} +1 -1
  50. package/package.json +1 -1
  51. package/dist/format-Dn-BOb-o.js +0 -86
@@ -0,0 +1,24 @@
1
+ /** The `params.code` of the issue `refineStorableText` adds, and the code the server answers with (422). */
2
+ export declare const unsupportedCharactersCode = "unsupported_characters";
3
+ /** True when `value` holds a character a utf8mb3 column cannot store. */
4
+ export declare function hasUnsupportedCharacters(value: string): boolean;
5
+ /** What `refineStorableText` needs of the validator's context; Zod's `RefinementCtx` fits, the library does not import Zod. */
6
+ export interface StorableTextContext {
7
+ addIssue(issue: {
8
+ code: "custom";
9
+ path: (string | number)[];
10
+ params: {
11
+ code: typeof unsupportedCharactersCode;
12
+ };
13
+ }): void;
14
+ }
15
+ /**
16
+ * `.superRefine` callback: reports every string anywhere in the value that holds an unsupported
17
+ * character, on that string's path, with `params.code` set to `unsupportedCharactersCode` (the
18
+ * app's i18n owns the wording).
19
+ *
20
+ * ```ts
21
+ * const schema = z.object({ name: z.string(), notes: z.array(z.string()) }).superRefine(refineStorableText);
22
+ * ```
23
+ */
24
+ export declare function refineStorableText(data: unknown, ctx: StorableTextContext): void;
@@ -17,10 +17,21 @@ export interface Formatters {
17
17
  dateTime(value: Date, locale: string): string;
18
18
  time(value: Date, locale: string): string;
19
19
  number(value: number, locale: string, options?: Intl.NumberFormatOptions): string;
20
- money(amount: number, currency: string, locale: string): string;
20
+ /** `options` carries the fraction digits when the caller asked for them; ignoring it is allowed. */
21
+ money(amount: number, currency: string, locale: string, options?: Intl.NumberFormatOptions): string;
21
22
  /** `now` is the moment to count from. */
22
23
  relative(value: Date, locale: string, now: Date): string;
23
24
  }
25
+ export interface MoneyOptions {
26
+ /** An ISO code ("EUR"): `Intl`'s currency style instead of the application's `currencySymbol`. */
27
+ currency?: string;
28
+ /** Fraction digits (default 2; with a `currency`, the currency's own). */
29
+ decimals?: number;
30
+ /** An amount with no fraction shows none ("39.600", not "39.600,00"); any other keeps `decimals`. */
31
+ whole?: boolean;
32
+ /** `false` gives the number alone (default true). */
33
+ symbol?: boolean;
34
+ }
24
35
  /**
25
36
  * Formats values for the active locale. The functions read the locale when called, so a template that
26
37
  * calls them re-renders when the locale changes. A value with nothing to show (null, not a date, NaN)
@@ -35,10 +46,11 @@ export interface Formatting {
35
46
  time(value: DateInput): string;
36
47
  number(value: number | null | undefined, options?: Intl.NumberFormatOptions): string;
37
48
  /**
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.
49
+ * Without a `currency`: the amount through `formatters.number`, then the `currencySymbol` after a space
50
+ * ("1.234,50 KM"), or the bare amount when the application set no symbol. With an ISO `currency` ("EUR"):
51
+ * `Intl`'s currency style. A missing or non-finite amount is the empty string, like the other functions.
40
52
  */
41
- money(amount: number | null | undefined, currency?: string): string;
53
+ money(amount: number | null | undefined, options?: MoneyOptions): string;
42
54
  /** The display symbol the application set (`""` when none), for a caller that draws it apart from the amount. */
43
55
  readonly currencySymbol: string;
44
56
  /** "3 days ago", "in 2 hours", "now": the largest whole unit. */
@@ -1,2 +1,2 @@
1
1
  export { createFormatting, formattingKey, installFormatting, intlFormatters, toDate, useFormat } from "./format";
2
- export type { DateInput, Formatters, Formatting, FormattingOptions } from "./format";
2
+ export type { DateInput, Formatters, Formatting, FormattingOptions, MoneyOptions } from "./format";
@@ -1,4 +1,4 @@
1
- import { c as r, f as s, i as o, a as e, t as i, u as m } from "../format-Dn-BOb-o.js";
1
+ import { c as r, f as s, i as o, a as e, t as i, u as m } from "../format-D8KUBmbS.js";
2
2
  export {
3
3
  r as createFormatting,
4
4
  s as formattingKey,
@@ -0,0 +1,87 @@
1
+ import { d as F } from "./context-Ch1r4fdN.js";
2
+ import { i as s } from "./intlLocale-CeRU44qJ.js";
3
+ const N = /^(\d{4})-(\d{2})-(\d{2})$/;
4
+ function d(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 m = N.exec(r);
11
+ n = m ? new Date(Number(m[1]), Number(m[2]) - 1, Number(m[3])) : new Date(r);
12
+ }
13
+ return Number.isNaN(n.getTime()) || n.getTime() <= 0 ? null : n;
14
+ }
15
+ const b = { year: "numeric", month: "2-digit", day: "2-digit" }, y = { hour: "2-digit", minute: "2-digit" }, f = [
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 i = r.get(e);
27
+ return i || (i = t(), r.set(e, i)), i;
28
+ }, m = (e, t) => n(`d|${e}|${JSON.stringify(t)}`, () => new Intl.DateTimeFormat(s(e), t));
29
+ return {
30
+ date: (e, t) => m(t, b).format(e),
31
+ dateTime: (e, t) => m(t, { ...b, ...y }).format(e),
32
+ time: (e, t) => m(t, y).format(e),
33
+ number: (e, t, i) => n(`n|${t}|${JSON.stringify(i ?? {})}`, () => new Intl.NumberFormat(s(t), i)).format(e),
34
+ money: (e, t, i, a) => n(`m|${i}|${t}|${JSON.stringify(a ?? {})}`, () => new Intl.NumberFormat(s(i), { ...a, style: "currency", currency: t })).format(e),
35
+ relative(e, t, i) {
36
+ const a = Math.trunc((e.getTime() - i.getTime()) / 1e3), [u, c] = f.find(([, o]) => Math.abs(a) >= o) ?? f[f.length - 1];
37
+ return n(`r|${t}`, () => new Intl.RelativeTimeFormat(s(t), { numeric: "auto" })).format(Math.trunc(a / c), u);
38
+ }
39
+ };
40
+ }
41
+ function w(r) {
42
+ const n = { ...T(), ...r.formatters }, m = (e) => typeof e == "number" && Number.isFinite(e);
43
+ return {
44
+ get locale() {
45
+ return r.locale();
46
+ },
47
+ date: (e) => {
48
+ const t = d(e);
49
+ return t ? n.date(t, r.locale()) : "";
50
+ },
51
+ dateTime: (e) => {
52
+ const t = d(e);
53
+ return t ? n.dateTime(t, r.locale()) : "";
54
+ },
55
+ time: (e) => {
56
+ const t = d(e);
57
+ return t ? n.time(t, r.locale()) : "";
58
+ },
59
+ number: (e, t) => m(e) ? n.number(e, r.locale(), t) : "",
60
+ get currencySymbol() {
61
+ return r.currencySymbol ?? "";
62
+ },
63
+ money: (e, { currency: t, decimals: i, whole: a, symbol: u = !0 } = {}) => {
64
+ if (!m(e)) return "";
65
+ const c = e, o = a && Number.isInteger(c) ? 0 : i, l = o === void 0 ? void 0 : { minimumFractionDigits: o, maximumFractionDigits: o };
66
+ if (t && u) return n.money(c, t, r.locale(), l);
67
+ const g = n.number(c, r.locale(), l ?? { minimumFractionDigits: 2, maximumFractionDigits: 2 });
68
+ return u && !t && r.currencySymbol ? `${g} ${r.currencySymbol}` : g;
69
+ },
70
+ relative: (e, t = /* @__PURE__ */ new Date()) => {
71
+ const i = d(e);
72
+ return i ? n.relative(i, r.locale(), t) : "";
73
+ }
74
+ };
75
+ }
76
+ const [D, I] = F("vue-core.formatting");
77
+ function S(r, n) {
78
+ r.provide(D, n);
79
+ }
80
+ export {
81
+ T as a,
82
+ w as c,
83
+ D as f,
84
+ S as i,
85
+ d as t,
86
+ I as u
87
+ };
@@ -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-DLq_tp3t.js";
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-CdtofdcJ.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-Beyr5NQo.js";
4
4
  export {
@@ -1,4 +1,4 @@
1
- import { h as t, j as i, k as r, l as n, i as a } from "../index-DwgdsKJN.js";
1
+ import { h as t, j as i, k as r, l as n, i as a } from "../index-Dm-sdJJr.js";
2
2
  export {
3
3
  t as MAX_REPORTS_PER_SESSION,
4
4
  i as clientErrorReporter,
@@ -21,7 +21,7 @@ import { u as we } from "./mediaQuery-CygcXmFW.js";
21
21
  import { u as xe } from "./useDialog-DfNmqM-0.js";
22
22
  import { c as Ee } from "./closeOverlays-CjVsIrpL.js";
23
23
  import { u as Se } from "./FormErrors.vue_vue_type_script_setup_true_lang-CIggKPtq.js";
24
- import { u as Te } from "./format-Dn-BOb-o.js";
24
+ import { u as Te } from "./format-D8KUBmbS.js";
25
25
  import { b as ke } from "./routeResource-DlTsGTg_.js";
26
26
  import "./ActionRow.vue_vue_type_script_setup_true_lang-Cg1lhpcA.js";
27
27
  import { _ as Ae } from "./AccessGate.vue_vue_type_script_setup_true_lang-CzQbD2Pc.js";
@@ -287,7 +287,7 @@ const De = ["aria-labelledby"], Ve = ["id"], Me = { class: "mt-1 text-subheadlin
287
287
  ]));
288
288
  }
289
289
  }), Je = K({
290
- login: { name: "login", path: "/login", component: () => import("./SignInPage-3nerqsOt.js"), meta: { public: !0, titleKey: "core.identity.signin.title" } }
290
+ login: { name: "login", path: "/login", component: () => import("./SignInPage-HKC1bm2E.js"), meta: { public: !0, titleKey: "core.identity.signin.title" } }
291
291
  });
292
292
  function $s(e = {}) {
293
293
  return N({
@@ -355,7 +355,7 @@ function Ls(e) {
355
355
  };
356
356
  }
357
357
  const te = K({
358
- index: { name: "profile", path: "/profile", component: () => import("./ProfilePage-DrKiof1I.js"), meta: { titleKey: "core.profile.title" } }
358
+ index: { name: "profile", path: "/profile", component: () => import("./ProfilePage-BnohZIEg.js"), meta: { titleKey: "core.profile.title" } }
359
359
  }), es = /* @__PURE__ */ w({
360
360
  __name: "ProfileMenuItem",
361
361
  setup(e) {
@@ -379,19 +379,19 @@ function ns(e) {
379
379
  return { name: `users.record.${e.path}`, path: e.path, component: s, meta: { ...e.meta } };
380
380
  }
381
381
  const W = "iam.user:view", Ds = "iam.user:manage", os = "iam.user.activity:view", ne = K({
382
- index: { name: "users.index", path: "/users", component: () => import("./UsersList-C-c8J2XS.js"), meta: { access: W, titleKey: "core.users.title" } },
382
+ index: { name: "users.index", path: "/users", component: () => import("./UsersList-BMkIgIg8.js"), meta: { access: W, titleKey: "core.users.title" } },
383
383
  record: {
384
384
  name: "users.record",
385
385
  path: "/users/:id",
386
- component: () => import("./UserRecord-m4c7H9X9.js"),
386
+ component: () => import("./UserRecord-CtUPpbCt.js"),
387
387
  meta: { access: W, titleKey: "core.users.title", remountOnParam: "id" },
388
388
  children: [
389
- { name: "users.record.general", path: "general", component: () => import("./General-VsiXKARg.js"), meta: { section: { labelKey: "core.users.sections.general", icon: "user3Line", groupKey: "core.users.section_groups.person" } } },
390
- { name: "users.record.signin", path: "signin", component: () => import("./SignIn-MHbY4kg8.js"), meta: { section: { labelKey: "core.users.sections.signin", icon: "key2Line", groupKey: "core.users.section_groups.access" } } },
391
- { name: "users.record.sessions", path: "sessions", component: () => import("./Sessions-DzyRG4PP.js"), meta: { section: { labelKey: "core.users.sections.sessions", icon: "deviceLine", groupKey: "core.users.section_groups.access" } } },
392
- { name: "users.record.signins", path: "signins", component: () => import("./SignIns-B3uCHdLX.js"), meta: { section: { labelKey: "core.users.sections.signins", icon: "timeFill", groupKey: "core.users.section_groups.activity" } } },
393
- { name: "users.record.changes", path: "changes", component: () => import("./Changes-DDicMqpj.js"), meta: { section: { labelKey: "core.users.sections.changes", icon: "edit", groupKey: "core.users.section_groups.activity" } } },
394
- { name: "users.record.activity", path: "activity", component: () => import("./Activity-DBy2ZG5b.js"), meta: { access: os, section: { labelKey: "core.users.sections.activity", icon: "listCheck", groupKey: "core.users.section_groups.activity" } } }
389
+ { name: "users.record.general", path: "general", component: () => import("./General-BAG7S6wV.js"), meta: { section: { labelKey: "core.users.sections.general", icon: "user3Line", groupKey: "core.users.section_groups.person" } } },
390
+ { name: "users.record.signin", path: "signin", component: () => import("./SignIn-CTI_699e.js"), meta: { section: { labelKey: "core.users.sections.signin", icon: "key2Line", groupKey: "core.users.section_groups.access" } } },
391
+ { name: "users.record.sessions", path: "sessions", component: () => import("./Sessions--Gvc0kxw.js"), meta: { section: { labelKey: "core.users.sections.sessions", icon: "deviceLine", groupKey: "core.users.section_groups.access" } } },
392
+ { name: "users.record.signins", path: "signins", component: () => import("./SignIns-BcqBgWgN.js"), meta: { section: { labelKey: "core.users.sections.signins", icon: "timeFill", groupKey: "core.users.section_groups.activity" } } },
393
+ { name: "users.record.changes", path: "changes", component: () => import("./Changes-Dxjdkd_5.js"), meta: { section: { labelKey: "core.users.sections.changes", icon: "edit", groupKey: "core.users.section_groups.activity" } } },
394
+ { name: "users.record.activity", path: "activity", component: () => import("./Activity-29hsZ28j.js"), meta: { access: os, section: { labelKey: "core.users.sections.activity", icon: "listCheck", groupKey: "core.users.section_groups.activity" } } }
395
395
  ]
396
396
  }
397
397
  });
@@ -452,11 +452,11 @@ const Ms = /* @__PURE__ */ w({
452
452
  }, 8, ["permission"])) : I("", !0);
453
453
  }
454
454
  }), [rs, Bs] = A("vue-core.serviceaccounts"), Y = "iam.serviceaccount:view", js = "iam.serviceaccount:manage", Ws = "iam.serviceaccount:revoke", H = K({
455
- index: { name: "serviceaccounts.index", path: "/iam/service-accounts", component: () => import("./ServiceAccountsList-7OovJ7gR.js"), meta: { access: Y, titleKey: "core.serviceaccounts.title_plural" } },
455
+ index: { name: "serviceaccounts.index", path: "/iam/service-accounts", component: () => import("./ServiceAccountsList-BXE6htxk.js"), meta: { access: Y, titleKey: "core.serviceaccounts.title_plural" } },
456
456
  record: {
457
457
  name: "serviceaccounts.record",
458
458
  path: "/iam/service-accounts/:id",
459
- component: () => import("./ServiceAccountRecord-DnunLV1K.js"),
459
+ component: () => import("./ServiceAccountRecord-bxX9yQkC.js"),
460
460
  meta: { access: Y, titleKey: "core.serviceaccounts.title_plural", remountOnParam: "id" }
461
461
  }
462
462
  });
@@ -14,7 +14,7 @@ import { d as Q } from "./definition-C7QuyV3i.js";
14
14
  import { r as W, l as Y } from "./http-nz92KjdS.js";
15
15
  import { _ as J } from "./AccountMenuItem.vue_vue_type_script_setup_true_lang-BIYgaihv.js";
16
16
  import { d as Z } from "./defineRoutes-BGAdiIrt.js";
17
- import { d as ee } from "./application-Dqm5sJdZ.js";
17
+ import { d as ee } from "./application-BmXW6iW_.js";
18
18
  import { R as te } from "./client-Dg303Pmc.js";
19
19
  import { a as ne } from "./error-CD7x0Jrz.js";
20
20
  const v = {
@@ -263,11 +263,11 @@ const Qe = {
263
263
  }, null, 8, ["label"])) : R("", !0);
264
264
  }
265
265
  }), M = Z({
266
- index: { name: "incidents.index", path: "/incidents", component: () => import("./IncidentsList-DphbU1FK.js"), meta: { access: q, titleKey: "core.incidents.title" } },
266
+ index: { name: "incidents.index", path: "/incidents", component: () => import("./IncidentsList-C0cFl0Db.js"), meta: { access: q, titleKey: "core.incidents.title" } },
267
267
  details: {
268
268
  name: "incidents.details",
269
269
  path: "/incidents/:incidentID",
270
- component: () => import("./IncidentRecord-CoweBFQ8.js"),
270
+ component: () => import("./IncidentRecord-D8aOpNHo.js"),
271
271
  // Previous / next record swaps the id in place.
272
272
  meta: { access: q, titleKey: "core.incidents.title", remountOnParam: "incidentID" }
273
273
  }
@@ -13,7 +13,7 @@ import { _ as Se } from "./Popover.vue_vue_type_script_setup_true_lang-C20Hf3Hl.
13
13
  import { _ as J } from "./HeaderAction.vue_vue_type_script_setup_true_lang-Da59TLBh.js";
14
14
  import { useRouter as Te } from "vue-router";
15
15
  import { _ as K } from "./Button.vue_vue_type_script_setup_true_lang-Dp7OB-eF.js";
16
- import { u as Ee } from "./format-Dn-BOb-o.js";
16
+ import { u as Ee } from "./format-D8KUBmbS.js";
17
17
  import { _ as Pe } from "./Icon.vue_vue_type_script_lang-BhhsFYwp.js";
18
18
  import { _ as Ce } from "./AsyncSection.vue_vue_type_script_setup_true_lang-BdeOKqz_.js";
19
19
  const E = {
@@ -135,9 +135,9 @@ function Me(n = ee().http, t = W()) {
135
135
  return { state: $(e), hash: $(i), busy: $(a), inspect: c, enable: u, disable: g };
136
136
  }
137
137
  const Ne = "events.deadletter:view", $t = "events.deadletter:retry", Y = te({
138
- index: { name: "events.deadletters", path: "/events/dead-letters", component: () => import("./DeadLetters-qOY8lQQn.js"), meta: { access: Ne, titleKey: "core.notifications.dead_letters.title" } }
138
+ index: { name: "events.deadletters", path: "/events/dead-letters", component: () => import("./DeadLetters-Bb5pPlOY.js"), meta: { access: Ne, titleKey: "core.notifications.dead_letters.title" } }
139
139
  }), j = te({
140
- index: { name: "notifications.settings", path: "/profile/notifications", component: () => import("./SettingsPage-CaMER5m8.js"), meta: { titleKey: "core.notifications.settings.title" } }
140
+ index: { name: "notifications.settings", path: "/profile/notifications", component: () => import("./SettingsPage-DzDC7gD-.js"), meta: { titleKey: "core.notifications.settings.title" } }
141
141
  }), Oe = /* @__PURE__ */ q({
142
142
  __name: "SettingsMenuItem",
143
143
  setup(n) {
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  /** The version of @wssto2/vue-core (kept equal to package.json by index.test.ts). */
2
- export declare const version = "0.9.2";
2
+ export declare const version = "0.9.4";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- const o = "0.9.2";
1
+ const o = "0.9.4";
2
2
  export {
3
3
  o as version
4
4
  };
@@ -1,4 +1,4 @@
1
- import { d as s, e as a, n as o, b as i, c as n, f as u } from "../index-W80SBKUX.js";
1
+ import { d as s, e as a, n as o, b as i, c as n, f as u } from "../index-Dz0LkLM8.js";
2
2
  export {
3
3
  s as deadLettersRoutes,
4
4
  a as eventsRoutes,
@@ -6,9 +6,9 @@ import { _ as J } from "./Icon.vue_vue_type_script_lang-BhhsFYwp.js";
6
6
  import { _ as Ne } from "./Menu.vue_vue_type_script_setup_true_lang-wKc9gdCn.js";
7
7
  import { _ as ze } from "./Tooltip.vue_vue_type_script_setup_true_lang-Dtg5Y6pf.js";
8
8
  import { _ as he } from "./EmptyState.vue_vue_type_script_setup_true_lang-DbZiO2RF.js";
9
- import { u as Fe } from "./format-Dn-BOb-o.js";
9
+ import { u as Fe } from "./format-D8KUBmbS.js";
10
10
  import { _ as Ve } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
11
- import { _ as Oe } from "./Timestamp.vue_vue_type_script_setup_true_lang-CAz2W69d.js";
11
+ import { _ as Oe } from "./Timestamp.vue_vue_type_script_setup_true_lang-ClZAAUMd.js";
12
12
  import { a as je } from "./mediaQuery-CygcXmFW.js";
13
13
  function Ue(y, n) {
14
14
  const d = (n ?? "").split(/\s+/).filter((v) => v !== "");
@@ -126,7 +126,7 @@ const We = {
126
126
  value: v.value,
127
127
  precision: n.column.precision ?? "dateTime"
128
128
  }, null, 8, ["value", "precision"]))
129
- ], 64)) : n.column.kind === "number" ? (s(), l("span", qe, C(i(d).number(h.value, n.column.format)), 1)) : n.column.kind === "money" ? (s(), l("span", Je, C(i(d).money(h.value, typeof n.column.currency == "function" ? n.column.currency(n.item) : n.column.currency)), 1)) : n.column.kind === "badge" ? (s(), D(i(Ve), {
129
+ ], 64)) : n.column.kind === "number" ? (s(), l("span", qe, C(i(d).number(h.value, n.column.format)), 1)) : n.column.kind === "money" ? (s(), l("span", Je, C(i(d).money(h.value, { currency: typeof n.column.currency == "function" ? n.column.currency(n.item) : n.column.currency })), 1)) : n.column.kind === "badge" ? (s(), D(i(Ve), {
130
130
  key: 4,
131
131
  tone: n.column.tone(n.item),
132
132
  dot: ""
@@ -1,6 +1,6 @@
1
1
  import { d as o } from "./definition-C7QuyV3i.js";
2
2
  import { r as a } from "./http-nz92KjdS.js";
3
- import { i as r } from "./index-DLq_tp3t.js";
3
+ import { i as r } from "./index-CdtofdcJ.js";
4
4
  const n = ["active", "locked", "inactive", "all"];
5
5
  function v(i) {
6
6
  return o({
@@ -3,7 +3,7 @@ import { createMemoryHistory as P, createRouter as E, RouterView as $ } from "vu
3
3
  import { a as A, i as O } from "../platform-BQOX_Ntw.js";
4
4
  import { createI18n as k } from "vue-i18n";
5
5
  import { coreMessages as M } from "../i18n/index.js";
6
- import { i as R, c as S } from "../format-Dn-BOb-o.js";
6
+ import { i as R, c as S } from "../format-D8KUBmbS.js";
7
7
  function K() {
8
8
  let e, t;
9
9
  return { promise: new Promise((s, r) => {
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as K, ref as L, watch as re, computed as _, openBlock as f, createElementBlock as b, Fragment as I, createElementVNode as h, normalizeClass as $, unref as y, createVNode as N, createTextVNode as Ee, toDisplayString as M, renderList as j, useModel as ce, useId as Te, useTemplateRef as me, createCommentVNode as Z, createBlock as ue, mergeModels as fe, nextTick as Ce, onMounted as Fe, onBeforeUnmount as je, normalizeStyle as ee, withCtx as ye } from "vue";
2
2
  import { i as W } from "./intlLocale-CeRU44qJ.js";
3
3
  import { useI18n as X } from "vue-i18n";
4
- import { u as Me } from "./format-Dn-BOb-o.js";
4
+ import { u as Me } from "./format-D8KUBmbS.js";
5
5
  import { _ as Oe } from "./Sheet.vue_vue_type_script_setup_true_lang-B91aRD_y.js";
6
6
  import { _ as F } from "./Icon.vue_vue_type_script_lang-BhhsFYwp.js";
7
7
  import { a as We } from "./mediaQuery-CygcXmFW.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wssto2/vue-core",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "goCore": "v1.12.0",
5
5
  "description": "Shared Vue 3 library for go-core applications: app shell, list / record / form pages and their controls.",
6
6
  "keywords": [
@@ -1,86 +0,0 @@
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
- };