@wssto2/vue-core 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/ActionRow.vue_vue_type_script_setup_true_lang-DybAIOHS.js +64 -0
  3. package/dist/{Activity-CeAG0ZtJ.js → Activity-CdkJW68R.js} +2 -2
  4. package/dist/{Changes-B9-zpDxG.js → Changes-DxK_QfiB.js} +2 -2
  5. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-Cn0YOWJF.js → CollectionPage.vue_vue_type_script_setup_true_lang-x0jyJ01f.js} +1 -1
  6. package/dist/{DataTable.vue_vue_type_script_setup_true_lang-BQRG8bpH.js → DataTable.vue_vue_type_script_setup_true_lang-C_ZytnW-.js} +1 -1
  7. package/dist/{DeadLetters-BP03yC4R.js → DeadLetters-DnA7LP1w.js} +2 -2
  8. package/dist/{General-BDmCJr3H.js → General-2matxl2Y.js} +23 -21
  9. package/dist/Highlight.vue_vue_type_script_setup_true_lang-DZGBmwcX.js +29 -0
  10. package/dist/{IncidentRecord-DEhl6AyA.js → IncidentRecord-Bt3G4HlX.js} +1 -1
  11. package/dist/{IncidentsList-COgRPdk3.js → IncidentsList-2iwgqp9J.js} +3 -3
  12. package/dist/{ProfilePage-BQCK2w8R.js → ProfilePage-CpuyDBAv.js} +21 -20
  13. package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-C0OIBrSp.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-FJbWxME_.js} +2 -2
  14. package/dist/{ServiceAccountRecord-gtlhYaAz.js → ServiceAccountRecord-0-JF5lRx.js} +29 -29
  15. package/dist/{ServiceAccountsList-BM7GGcvw.js → ServiceAccountsList-DcsnOcf-.js} +6 -6
  16. package/dist/{Sessions-BCDJYuV2.js → Sessions-DgWhpk-i.js} +2 -2
  17. package/dist/{SettingsPage-DUhMsYBf.js → SettingsPage-BXPWATYU.js} +5 -4
  18. package/dist/{SignIn-4D7WohI8.js → SignIn-DPoUwHZd.js} +2 -2
  19. package/dist/{SignInPage-B6B-34GG.js → SignInPage-OyrVemro.js} +1 -1
  20. package/dist/{SignIns-CFoe4hpX.js → SignIns-BMDrZVVp.js} +6 -6
  21. package/dist/{UserRecord-Cd1TCpJZ.js → UserRecord-BW-gdCqi.js} +43 -43
  22. package/dist/{UsersList-GJU5-CTG.js → UsersList-B3ZF_1Dj.js} +25 -25
  23. package/dist/app/index.d.ts +1 -0
  24. package/dist/app/index.js +11 -10
  25. package/dist/app/languages.d.ts +8 -0
  26. package/dist/collection/Highlight.vue.d.ts +12 -0
  27. package/dist/collection/index.d.ts +1 -0
  28. package/dist/collection/index.js +18 -17
  29. package/dist/i18n/index.d.ts +1 -0
  30. package/dist/i18n/index.js +6 -4
  31. package/dist/i18n/serverMessages.d.ts +16 -0
  32. package/dist/identity/index.d.ts +2 -1
  33. package/dist/identity/index.js +7 -7
  34. package/dist/identity/users/context.d.ts +3 -0
  35. package/dist/identity/users/feature.d.ts +12 -1
  36. package/dist/identity/users/list.d.ts +12 -1
  37. package/dist/identity/users/personSections.d.ts +14 -5
  38. package/dist/incidents/index.js +1 -1
  39. package/dist/{index-CTkG-acm.js → index-ClJeyW3F.js} +2 -2
  40. package/dist/{index-pJ_eRg80.js → index-Cq9TuOqH.js} +441 -434
  41. package/dist/{index-DUs7WSz-.js → index-kEHY7hcG.js} +2 -2
  42. package/dist/index.d.ts +1 -1
  43. package/dist/index.js +1 -1
  44. package/dist/keepAlive-ClGnsIzT.js +55 -0
  45. package/dist/notifications/index.js +1 -1
  46. package/dist/rowLayout-BsKEzEME.js +650 -0
  47. package/dist/serverMessages-B6GHgi40.js +25 -0
  48. package/dist/shell/QuickSearchPalette.vue.d.ts +3 -3
  49. package/dist/shell/index.js +419 -427
  50. package/dist/shell/quickSearchControl.d.ts +8 -5
  51. package/dist/styles.css +1 -1
  52. package/package.json +1 -1
  53. package/dist/ActionRow.vue_vue_type_script_setup_true_lang-IpcP3Bjc.js +0 -87
  54. package/dist/highlight-DnYhLXnu.js +0 -9
  55. package/dist/identity/fieldMessages.d.ts +0 -15
  56. package/dist/identity/users/languages.d.ts +0 -4
  57. package/dist/keepAlive-z3IRFkQq.js +0 -46
  58. package/dist/rowLayout-Il4psyXN.js +0 -658
@@ -1,87 +0,0 @@
1
- import { useI18n as k } from "vue-i18n";
2
- import { a as p } from "./error-CD7x0Jrz.js";
3
- import { u as g } from "./format-D8KUBmbS.js";
4
- import { u as h } from "./describeError-B-NMa--w.js";
5
- import { defineComponent as b, openBlock as a, createElementBlock as m, createElementVNode as c, toDisplayString as l, createCommentVNode as x, renderSlot as y, createBlock as v, unref as _, withCtx as w, normalizeClass as $, createVNode as E } from "vue";
6
- import { g as N } from "./options-B48UiYsG.js";
7
- import { _ as C } from "./Icon.vue_vue_type_script_lang-BhhsFYwp.js";
8
- function q() {
9
- const { t: s, te: n } = k(), o = g(), r = h(), d = (t) => [`errors.${t}`, `core.errors.${t}`].find((e) => n(e));
10
- function i(t, e) {
11
- if (p(t) && t.code) {
12
- const f = d(t.code), u = typeof t.params?.locked_until == "string" ? new Date(t.params.locked_until) : null;
13
- if (f && u && !Number.isNaN(u.getTime())) return s(f, { ...t.params, locked_until: o.time(u) });
14
- }
15
- return r(t, e === void 0 ? void 0 : { fallback: e });
16
- }
17
- return {
18
- sentence: i,
19
- describeFieldError: (t) => {
20
- const e = d(t);
21
- return e === void 0 ? t : s(e);
22
- },
23
- failureMessage: (t, e) => p(e) && e.code && (t === "failed" || t === "forbidden" || t === "conflict") ? i(e) : void 0
24
- };
25
- }
26
- const S = { class: "flex flex-wrap items-end gap-3 px-row-inset" }, B = { class: "flex min-w-0 grow basis-56 flex-col gap-1" }, D = { class: "text-title font-semibold tracking-tight text-content-strong" }, V = {
27
- key: 0,
28
- class: "max-w-readable text-subheadline text-content-muted"
29
- }, G = /* @__PURE__ */ b({
30
- __name: "SectionIntro",
31
- props: {
32
- title: {},
33
- description: {}
34
- },
35
- setup(s) {
36
- return (n, o) => (a(), m("div", S, [
37
- c("div", B, [
38
- c("h2", D, l(s.title), 1),
39
- s.description ? (a(), m("p", V, l(s.description), 1)) : x("", !0)
40
- ]),
41
- y(n.$slots, "actions")
42
- ]));
43
- }
44
- }), z = ["disabled"], A = { class: "flex min-w-0 flex-1 flex-col" }, F = {
45
- key: 0,
46
- class: "text-footnote text-content-muted"
47
- }, H = /* @__PURE__ */ b({
48
- __name: "ActionRow",
49
- props: {
50
- label: {},
51
- sub: { default: void 0 },
52
- tone: { default: "link" },
53
- disabled: { type: Boolean, default: !1 }
54
- },
55
- emits: ["click"],
56
- setup(s, { emit: n }) {
57
- const o = s, r = n;
58
- return (d, i) => (a(), v(_(N), { layout: "stacked" }, {
59
- default: w(() => [
60
- c("button", {
61
- type: "button",
62
- disabled: o.disabled,
63
- class: "flex w-full items-center gap-3 py-0.5 text-left focus-visible:outline-2 focus-visible:outline-border-focus disabled:opacity-50",
64
- onClick: i[0] || (i[0] = (t) => r("click"))
65
- }, [
66
- c("span", A, [
67
- c("span", {
68
- class: $(["text-body", o.tone === "critical" ? "text-content-destructive" : "text-content-link"])
69
- }, l(o.label), 3),
70
- o.sub ? (a(), m("span", F, l(o.sub), 1)) : x("", !0)
71
- ]),
72
- E(_(C), {
73
- name: "arrowRightSLine",
74
- size: 18,
75
- class: "shrink-0 text-content-disabled"
76
- })
77
- ], 8, z)
78
- ]),
79
- _: 1
80
- }));
81
- }
82
- });
83
- export {
84
- G as _,
85
- H as a,
86
- q as u
87
- };
@@ -1,9 +0,0 @@
1
- function a(e, r) {
2
- const l = (r ?? "").split(/\s+/).filter((t) => t !== "");
3
- if (l.length === 0 || e === "") return [{ text: e, match: !1 }];
4
- const s = new RegExp(`(${l.sort((t, n) => n.length - t.length).map((t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})`, "giu");
5
- return e.split(s).flatMap((t, n) => t === "" ? [] : [{ text: t, match: n % 2 === 1 }]);
6
- }
7
- export {
8
- a as h
9
- };
@@ -1,15 +0,0 @@
1
- import type { FormFailureKind } from "../form";
2
- /**
3
- * What a form of these screens needs to speak go-core's refusals, in the app's language (an app's `errors.<reason>` first, then
4
- * `core.errors.<reason>`): the reason of a field (`identity.email.taken`) becomes a sentence; a refusal of the whole action (a
5
- * veto of the application's deactivation hook, a lock) says its reason instead of the generic line; a time a lock ends (`locked_until`)
6
- * reads as a time of day. Spread into `useForm` / `useCommand`; `sentence` is the same for a toast or a line of your own:
7
- *
8
- * const messages = useServerMessages();
9
- * useCommand({ ...messages, run, done });
10
- */
11
- export declare function useServerMessages(): {
12
- sentence: (error: unknown, fallback?: string) => string;
13
- describeFieldError: (message: string) => string;
14
- failureMessage: (kind: FormFailureKind, error: unknown) => string | undefined;
15
- };
@@ -1,4 +0,0 @@
1
- import { type ComputedRef } from "vue";
2
- import type { SelectOption } from "../../form";
3
- /** The languages the application offers, as the options of a select (each named in itself). */
4
- export declare function useLanguages(): ComputedRef<readonly SelectOption<string>[]>;
@@ -1,46 +0,0 @@
1
- function b(d = {}) {
2
- const { margin: l = 6e4, retryAfter: v = 3e4 } = d;
3
- return {
4
- id: "vue-core.keep-session-alive",
5
- scope: "session",
6
- start({ signal: n, platform: i, report: m }) {
7
- let s;
8
- const o = () => {
9
- const e = i.session.state.value;
10
- return i.session.renewable && e.status === "authenticated" && e.expiresAt ? e.expiresAt.getTime() - Date.now() - l : null;
11
- }, w = async () => {
12
- try {
13
- await i.session.renew();
14
- } catch (e) {
15
- m(e);
16
- }
17
- };
18
- function r(e = 0) {
19
- clearTimeout(s);
20
- const u = o();
21
- u !== null && !n.aborted && (s = setTimeout(() => void t(), Math.min(Math.max(u, e), 864e5)));
22
- }
23
- async function t() {
24
- if (n.aborted || !navigator.onLine) return;
25
- const e = o();
26
- if (e !== null) {
27
- if (e <= 0) {
28
- if (await w(), n.aborted) return;
29
- r((o() ?? 1) <= 0 ? v : 0);
30
- return;
31
- }
32
- r();
33
- }
34
- }
35
- const a = () => {
36
- document.visibilityState === "visible" && t();
37
- }, c = () => void t();
38
- return document.addEventListener("visibilitychange", a), window.addEventListener("online", c), t(), () => {
39
- clearTimeout(s), document.removeEventListener("visibilitychange", a), window.removeEventListener("online", c);
40
- };
41
- }
42
- };
43
- }
44
- export {
45
- b as k
46
- };