@wssto2/vue-core 0.14.0 → 0.15.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.
- package/CHANGELOG.md +28 -0
- package/README.md +2 -2
- package/bin/architecture/engine.mjs +11 -1
- package/bin/architecture/rules.mjs +95 -0
- package/bin/commands/check-architecture.mjs +8 -1
- package/bin/config.mjs +2 -0
- package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-DEzXovsY.js → AccessGate.vue_vue_type_script_setup_true_lang-BH3f0hda.js} +1 -1
- package/dist/{Activity-C0HUEDUz.js → Activity-RAk3h7Aa.js} +5 -5
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-Bsv5j5Z8.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-uO4EAmBb.js} +2 -2
- package/dist/{AlertDialog.vue_vue_type_script_setup_true_lang-CrFhR9rJ.js → AlertDialog.vue_vue_type_script_setup_true_lang-WuGvAOrj.js} +1 -1
- package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-DGzQ-Snp.js → AsyncSection.vue_vue_type_script_setup_true_lang-CX8mpXRE.js} +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-C74hcb0N.js → Button.vue_vue_type_script_setup_true_lang-JrqhO99l.js} +1 -1
- package/dist/{Changes-CSaHgVuz.js → Changes-Dsar4rXS.js} +3 -3
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-dIrdS_Gn.js → CollectionPage.vue_vue_type_script_setup_true_lang-qxeSTAKV.js} +10 -10
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-J3PhyJAS.js → DataTable.vue_vue_type_script_setup_true_lang-DbRS37n3.js} +1 -1
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-CKKG4JEg.js → DateField.vue_vue_type_script_setup_true_lang-DzCvYHAf.js} +2 -2
- package/dist/{DeadLetters-CHX4Ypgy.js → DeadLetters-vt9vhJD7.js} +5 -5
- package/dist/{DiscardChangesModal.vue_vue_type_script_setup_true_lang-B3WbLyNb.js → DiscardChangesModal.vue_vue_type_script_setup_true_lang-92szOrYd.js} +1 -1
- package/dist/FormGroup.vue_vue_type_script_setup_true_lang-dsO1m9Mm.js +428 -0
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-DvbPEiNQ.js → FormView.vue_vue_type_script_setup_true_lang-Bq_Qa4py.js} +1 -1
- package/dist/{General-v_24-zZw.js → General-Bu_ZIVbk.js} +7 -7
- package/dist/{IncidentRecord-BwSBNE37.js → IncidentRecord-CQdv_bN5.js} +12 -12
- package/dist/{IncidentsList-BqzRU5cZ.js → IncidentsList-DwQ0wuM8.js} +4 -4
- package/dist/{LeaveGuardRoot.vue_vue_type_script_setup_true_lang-CIwW7y4j.js → LeaveGuardRoot.vue_vue_type_script_setup_true_lang-CrGrjrlO.js} +1 -1
- package/dist/{Menu.vue_vue_type_script_setup_true_lang-wKc9gdCn.js → Menu.vue_vue_type_script_setup_true_lang-Cqu4Ebsb.js} +1 -1
- package/dist/{Modal.vue_vue_type_script_setup_true_lang-DDS0iEnn.js → Modal.vue_vue_type_script_setup_true_lang-CZ7WrDwu.js} +2 -2
- package/dist/{NewRolePage-Dt0O0VSI.js → NewRolePage-C-wbA-uW.js} +4 -4
- package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-CWCt9_dM.js → PersonAccess.vue_vue_type_script_setup_true_lang-BPDh9s2m.js} +8 -8
- package/dist/{PhotoViewer.vue_vue_type_script_setup_true_lang-Bqxj_uJ5.js → PhotoViewer.vue_vue_type_script_setup_true_lang-DmMg1T_V.js} +1 -1
- package/dist/{Popover.vue_vue_type_script_setup_true_lang-C20Hf3Hl.js → Popover.vue_vue_type_script_setup_true_lang-BK8HL_V0.js} +1 -1
- package/dist/{ProfilePage-DApTxq8C.js → ProfilePage-7Xk2hsNL.js} +13 -13
- package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-SDgLjwEI.js → RecordHeader.vue_vue_type_script_setup_true_lang-CZtvUH5L.js} +1 -1
- package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-DRC3h71-.js → ResourcePage.vue_vue_type_script_setup_true_lang-uLrX13ab.js} +4 -4
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-d_aaeXTT.js → RoleEditor.vue_vue_type_script_setup_true_lang-V2D7fhR9.js} +6 -6
- package/dist/{RolePage-noy-wmNc.js → RolePage-Crp71rRb.js} +11 -11
- package/dist/{RolesPage-NRRainCw.js → RolesPage-DKXXnnDV.js} +5 -5
- package/dist/{SectionList.vue_vue_type_script_setup_true_lang-DR0_NsqC.js → SectionList.vue_vue_type_script_setup_true_lang-CodyVezo.js} +1 -1
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-D_08MS1-.js → SectionNavigator.vue_vue_type_script_setup_true_lang-5ogQCj8M.js} +3 -3
- package/dist/{SelectField.vue_vue_type_script_setup_true_lang-BZwdANL3.js → SelectField.vue_vue_type_script_setup_true_lang-CLkoPbGm.js} +3 -3
- package/dist/ServiceAccountDialog.vue_vue_type_script_setup_true_lang-CGvJW3bi.js +127 -0
- package/dist/{ServiceAccountRecord-D_HduQoK.js → ServiceAccountRecord-Caj7mo3A.js} +13 -13
- package/dist/{ServiceAccountsList-CdSsqTGt.js → ServiceAccountsList-D-YqPi_h.js} +6 -6
- package/dist/{Sessions-CTjzMfNg.js → Sessions-Bv5GU5Oi.js} +6 -6
- package/dist/{SettingsPage-CpqASf_D.js → SettingsPage-lRWvsMYK.js} +12 -12
- package/dist/{Sheet.vue_vue_type_script_setup_true_lang-B91aRD_y.js → Sheet.vue_vue_type_script_setup_true_lang-BG8HUNfs.js} +1 -1
- package/dist/{SignIn-D6tWsKf0.js → SignIn-m6PANavm.js} +5 -5
- package/dist/{SignInPage-BCNGI871.js → SignInPage-C9--4P11.js} +4 -4
- package/dist/{SignIns-BxGGA99u.js → SignIns-BhLnkY08.js} +3 -3
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-BDlTAMsh.js → TimeField.vue_vue_type_script_setup_true_lang-C1mLvOkc.js} +2 -2
- package/dist/{Tooltip.vue_vue_type_script_setup_true_lang-Dtg5Y6pf.js → Tooltip.vue_vue_type_script_setup_true_lang-C1C1qeBj.js} +1 -1
- package/dist/{UserRecord-B0kG0-Tm.js → UserRecord-L3ahHNjb.js} +10 -10
- package/dist/{UsersList-KMgImERy.js → UsersList-C6u3YCCp.js} +3 -3
- package/dist/access/RestrictedPanel.vue.d.ts +20 -0
- package/dist/access/index.d.ts +1 -0
- package/dist/access/index.js +91 -31
- package/dist/app/application.d.ts +2 -2
- package/dist/app/current.d.ts +6 -0
- package/dist/app/index.d.ts +1 -1
- package/dist/app/index.js +17 -16
- package/dist/{application-CrXtiGdw.js → application-C900Wz0A.js} +6 -6
- package/dist/button/index.js +2 -2
- package/dist/client/client.d.ts +6 -0
- package/dist/client/index.js +1 -1
- package/dist/client-Do8v1I5l.js +193 -0
- package/dist/collection/index.js +8 -8
- package/dist/config/index.d.ts +21 -1
- package/dist/content/StatSummary.vue.d.ts +40 -0
- package/dist/content/index.d.ts +1 -0
- package/dist/content/index.js +245 -176
- package/dist/{contributions-obnyn03x.js → contributions-9CPT-Z5v.js} +1 -1
- package/dist/{current-B0lHKTWr.js → current-CslcEPXp.js} +8 -4
- package/dist/dialogStack-DbO4IiAq.js +46 -0
- package/dist/eslint/index.js +2 -2
- package/dist/form/index.js +22 -22
- package/dist/form/useForm.d.ts +1 -1
- package/dist/{guards-DGcSfTEh.js → guards-6fJxfUtk.js} +1 -1
- package/dist/{http-DOEfFCDA.js → http-D6qOS6xs.js} +1 -1
- package/dist/i18n/index.d.ts +5 -1
- package/dist/i18n/index.js +14 -13
- package/dist/i18n/serverMessages.d.ts +15 -1
- package/dist/identity/index.js +2 -2
- package/dist/incidents/index.js +1 -1
- package/dist/{index-D-2NNye6.js → index-D5DuvKP1.js} +24 -24
- package/dist/{index-Crz-j_Hu.js → index-_hDHxrt5.js} +105 -105
- package/dist/{index-DNeIZpXo.js → index-vES_D5ls.js} +8 -8
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/modal/index.js +5 -5
- package/dist/{navigation-CctcxT51.js → navigation-DMJ6akat.js} +1 -1
- package/dist/{neighbors-Csfan8Ho.js → neighbors-DrEahe7B.js} +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/onboarding/index.js +1 -1
- package/dist/overlay/dialogStack.d.ts +3 -0
- package/dist/overlay/index.js +7 -7
- package/dist/page/index.js +4 -4
- package/dist/phone/index.d.ts +1 -1
- package/dist/phone/index.js +153 -141
- package/dist/phone/phone.d.ts +6 -0
- package/dist/platform/index.js +3 -3
- package/dist/{platform-DtISOEt7.js → platform-ORzRR3Tw.js} +1 -1
- package/dist/pwa/index.js +2 -2
- package/dist/resource/index.js +2 -2
- package/dist/router/index.js +3 -3
- package/dist/{rowLayout-Ohh5ng1u.js → rowLayout-QKfNHsML.js} +2 -2
- package/dist/{sections-fkW_IJLc.js → sections-DI_JhgQG.js} +1 -1
- package/dist/serverMessages-Ce8-MK4e.js +30 -0
- package/dist/shell/index.js +11 -11
- package/dist/{shortcut-DUR6yPWA.js → shortcut-oixX55SZ.js} +1 -1
- package/dist/state/index.js +2 -2
- package/dist/{state-CXMexi0l.js → state-QDaxntgR.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/testing/index.js +2 -2
- package/dist/{useCommand-Ch_nx1AQ.js → useCommand-DAMgQ5NE.js} +5 -5
- package/dist/{useDialog-DfNmqM-0.js → useDialog-B4_MpX2v.js} +1 -1
- package/dist/{useGroupSheet-CPjHydQV.js → useGroupSheet-Qqo3ywsS.js} +3 -3
- package/dist/{usePreferences-B8LIZp_f.js → usePreferences-BfMXVbSO.js} +1 -1
- package/dist/{useRecordDialog-DdkauXnU.js → useRecordDialog-QPKFH1Ww.js} +1 -1
- package/dist/{useResourceForm-Dl6YFYyz.js → useResourceForm-Oa6bk3NI.js} +1 -1
- package/dist/{useTypedEntry-tttjrClq.js → useTypedEntry-CITij2C_.js} +1 -1
- package/package.json +1 -1
- package/dist/FormGroup.vue_vue_type_script_setup_true_lang-D6jYfNjW.js +0 -427
- package/dist/ServiceAccountDialog.vue_vue_type_script_setup_true_lang-DDcaju7L.js +0 -127
- package/dist/client-Dg303Pmc.js +0 -193
- package/dist/dialogStack-B5G6xHq0.js +0 -36
- package/dist/serverMessages-DnTqVS3h.js +0 -25
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as C, useTemplateRef as N, computed as a, openBlock as i, createBlock as m, unref as s, withCtx as r, createVNode as d, createTextVNode as R, toDisplayString as l, createCommentVNode as S, createElementBlock as _, normalizeClass as p } from "vue";
|
|
2
2
|
import { useI18n as E } from "vue-i18n";
|
|
3
3
|
import { useRouter as $ } from "vue-router";
|
|
4
|
-
import { u as B, _ as T } from "./CollectionPage.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { u as B, _ as T } from "./CollectionPage.vue_vue_type_script_setup_true_lang-qxeSTAKV.js";
|
|
5
5
|
import { _ as V } from "./Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
|
|
6
6
|
import { u as L } from "./format-Cp1h0vsC.js";
|
|
7
|
-
import { u as z } from "./platform-
|
|
7
|
+
import { u as z } from "./platform-ORzRR3Tw.js";
|
|
8
8
|
import { _ as A } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
|
|
9
|
-
import { b as D, U as I, c as f, d as M, M as q, s as F } from "./index-
|
|
9
|
+
import { b as D, U as I, c as f, d as M, M as q, s as F } from "./index-D5DuvKP1.js";
|
|
10
10
|
const G = ["datetime"], Z = /* @__PURE__ */ C({
|
|
11
11
|
__name: "UsersList",
|
|
12
12
|
setup(K) {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type RouteLocationRaw } from "vue-router";
|
|
2
|
+
/**
|
|
3
|
+
* What a page the person may not open shows in its place: a lock, the sentence of `core.no_access`, whom to write to (the `contact`
|
|
4
|
+
* address, when the application has one) and a way back. Use it for `createApplication({ noAccess })`, which renders a component
|
|
5
|
+
* without props: `noAccess: () => h(RestrictedPanel, { contact: "access@example.com" })`.
|
|
6
|
+
*
|
|
7
|
+
* Back goes one step in the application's own history; a page opened directly (a bookmark, a shared link) has none, and going
|
|
8
|
+
* back there would leave the application, so it goes to `home` instead.
|
|
9
|
+
*/
|
|
10
|
+
type __VLS_Props = {
|
|
11
|
+
/** An e-mail address to write to for access, shown as a link. */
|
|
12
|
+
contact?: string;
|
|
13
|
+
/** Where back goes when the application's history has no previous page. Default `/`. */
|
|
14
|
+
home?: RouteLocationRaw;
|
|
15
|
+
};
|
|
16
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
17
|
+
home: RouteLocationRaw;
|
|
18
|
+
contact: string;
|
|
19
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
export default _default;
|
package/dist/access/index.d.ts
CHANGED
|
@@ -13,3 +13,4 @@ export { roleProblems, useDescribeRefusal, useRefusalMessage } from "./refusals"
|
|
|
13
13
|
export type { RoleProblem } from "./refusals";
|
|
14
14
|
export { default as PersonAccess } from "./PersonAccess.vue";
|
|
15
15
|
export { default as BindingRow } from "./BindingRow.vue";
|
|
16
|
+
export { default as RestrictedPanel } from "./RestrictedPanel.vue";
|
package/dist/access/index.js
CHANGED
|
@@ -1,49 +1,109 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { d as
|
|
3
|
-
import { a as
|
|
4
|
-
import { d as
|
|
5
|
-
import { d as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { _ as Q, a as U, b as W } from "../PersonAccess.vue_vue_type_script_setup_true_lang-BPDh9s2m.js";
|
|
2
|
+
import { d as _, p as x } from "../feature-DdUAfyi4.js";
|
|
3
|
+
import { a as n, b } from "../refusals-DfPzVNNY.js";
|
|
4
|
+
import { d as Y, p as Z, r as ee, c as se, u as te, e as oe, f as ce } from "../refusals-DfPzVNNY.js";
|
|
5
|
+
import { d as h } from "../defineRoutes-BGAdiIrt.js";
|
|
6
|
+
import { defineComponent as w, openBlock as m, createBlock as R, unref as s, withCtx as u, createElementVNode as a, createVNode as d, toDisplayString as o, normalizeClass as g, createElementBlock as k, createTextVNode as r, createCommentVNode as y } from "vue";
|
|
7
|
+
import { useI18n as C } from "vue-i18n";
|
|
8
|
+
import { useRouter as v } from "vue-router";
|
|
9
|
+
import { _ as P } from "../Button.vue_vue_type_script_setup_true_lang-JrqhO99l.js";
|
|
10
|
+
import { _ as B } from "../Panel.vue_vue_type_script_setup_true_lang-D_Wg42hu.js";
|
|
11
|
+
import { _ as K } from "../Icon.vue_vue_type_script_lang-BhhsFYwp.js";
|
|
12
|
+
const p = h({
|
|
13
|
+
roles: { name: "access.roles", path: "/iam/roles", component: () => import("../RolesPage-DKXXnnDV.js"), meta: { access: n.viewRoles, titleKey: "core.access.title" } },
|
|
14
|
+
newRole: { name: "access.roles.new", path: "/iam/roles/new", component: () => import("../NewRolePage-C-wbA-uW.js"), meta: { access: n.manageRoles, titleKey: "core.access.new_title" } },
|
|
9
15
|
role: {
|
|
10
16
|
name: "access.role",
|
|
11
17
|
path: "/iam/roles/:ref",
|
|
12
|
-
component: () => import("../RolePage-
|
|
18
|
+
component: () => import("../RolePage-Crp71rRb.js"),
|
|
13
19
|
// A role's ref (its key, or the id of a custom one) swaps in place when a link leads to another role.
|
|
14
|
-
meta: { access:
|
|
20
|
+
meta: { access: n.viewRoles, titleKey: "core.access.title", remountOnParam: "ref" }
|
|
15
21
|
}
|
|
16
|
-
}),
|
|
17
|
-
access:
|
|
22
|
+
}), M = {
|
|
23
|
+
access: n.viewAccess,
|
|
18
24
|
section: { labelKey: "core.access.person_roles", icon: "shieldStarFill" }
|
|
19
25
|
};
|
|
20
|
-
function
|
|
21
|
-
return
|
|
26
|
+
function O(e) {
|
|
27
|
+
return _({
|
|
22
28
|
id: "access",
|
|
23
|
-
routes:
|
|
24
|
-
context:
|
|
29
|
+
routes: p.records,
|
|
30
|
+
context: x(b, {
|
|
25
31
|
catalogue: e.catalogue,
|
|
26
32
|
subjectRoute: e.subjectRoute ?? (() => null),
|
|
27
33
|
constraints: e.roleConstraints ?? [],
|
|
28
34
|
problems: e.problems ?? {},
|
|
29
35
|
scopes: e.scopes ?? null
|
|
30
36
|
}),
|
|
31
|
-
navigation: e.destination ? [{ destination: e.destination, to:
|
|
37
|
+
navigation: e.destination ? [{ destination: e.destination, to: p.roles, within: ["access.role", "access.roles.new"] }] : []
|
|
32
38
|
});
|
|
33
39
|
}
|
|
40
|
+
const z = {
|
|
41
|
+
"data-test": "restricted-panel",
|
|
42
|
+
class: "flex flex-1 flex-col items-center justify-center px-4 py-16 text-center"
|
|
43
|
+
}, L = { class: "mb-2 text-lg font-semibold text-content-strong" }, N = {
|
|
44
|
+
key: 0,
|
|
45
|
+
class: "mb-6 text-subheadline text-content-muted"
|
|
46
|
+
}, S = ["href"], G = /* @__PURE__ */ w({
|
|
47
|
+
__name: "RestrictedPanel",
|
|
48
|
+
props: {
|
|
49
|
+
contact: { default: void 0 },
|
|
50
|
+
home: { default: "/" }
|
|
51
|
+
},
|
|
52
|
+
setup(e) {
|
|
53
|
+
const t = e, i = v(), { t: c } = C();
|
|
54
|
+
function f() {
|
|
55
|
+
window.history.state?.back ? i.back() : i.push(t.home);
|
|
56
|
+
}
|
|
57
|
+
return (V, l) => (m(), R(s(B), null, {
|
|
58
|
+
default: u(() => [
|
|
59
|
+
a("div", z, [
|
|
60
|
+
d(s(K), {
|
|
61
|
+
name: "lockLine",
|
|
62
|
+
size: 32,
|
|
63
|
+
class: "mb-6 size-12 text-status-danger-content"
|
|
64
|
+
}),
|
|
65
|
+
a("h2", L, o(s(c)("core.no_access.title")), 1),
|
|
66
|
+
a("p", {
|
|
67
|
+
class: g(["max-w-prose text-subheadline text-content-muted", t.contact ? "mb-1" : "mb-6"])
|
|
68
|
+
}, o(s(c)("core.no_access.body")), 3),
|
|
69
|
+
t.contact ? (m(), k("p", N, [
|
|
70
|
+
r(o(s(c)("core.no_access.contact")) + " ", 1),
|
|
71
|
+
a("a", {
|
|
72
|
+
href: `mailto:${t.contact}`,
|
|
73
|
+
class: "text-content-link hover:underline"
|
|
74
|
+
}, o(t.contact), 9, S),
|
|
75
|
+
l[0] || (l[0] = r(". ", -1))
|
|
76
|
+
])) : y("", !0),
|
|
77
|
+
d(s(P), {
|
|
78
|
+
size: "sm",
|
|
79
|
+
icon: "arrowLeftSLine",
|
|
80
|
+
onClick: f
|
|
81
|
+
}, {
|
|
82
|
+
default: u(() => [
|
|
83
|
+
r(o(s(c)("core.no_access.back")), 1)
|
|
84
|
+
]),
|
|
85
|
+
_: 1
|
|
86
|
+
})
|
|
87
|
+
])
|
|
88
|
+
]),
|
|
89
|
+
_: 1
|
|
90
|
+
}));
|
|
91
|
+
}
|
|
92
|
+
});
|
|
34
93
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
94
|
+
Q as BindingRow,
|
|
95
|
+
U as PersonAccess,
|
|
96
|
+
G as RestrictedPanel,
|
|
97
|
+
O as accessFeature,
|
|
98
|
+
p as accessPages,
|
|
99
|
+
n as accessPermissions,
|
|
100
|
+
W as accessRoutes,
|
|
101
|
+
Y as dependantsClosure,
|
|
102
|
+
Z as permissionTree,
|
|
103
|
+
M as personRolesSection,
|
|
104
|
+
ee as requiredClosure,
|
|
105
|
+
se as roleProblems,
|
|
106
|
+
te as useAccessLabels,
|
|
107
|
+
oe as useDescribeRefusal,
|
|
108
|
+
ce as useRefusalMessage
|
|
49
109
|
};
|
|
@@ -106,8 +106,8 @@ export interface ApplicationOptions {
|
|
|
106
106
|
describeError?: AppErrorDescriber;
|
|
107
107
|
/**
|
|
108
108
|
* The application's one sentence for a field message the server sent (often a code or a translation key), for every form
|
|
109
|
-
* (`useForm`, `useResourceForm`, `useCommand`) that has no `describeFieldError` of its own; a form's own wins. Without either,
|
|
110
|
-
* messages show as sent.
|
|
109
|
+
* (`useForm`, `useResourceForm`, `useCommand`) that has no `describeFieldError` of its own; a form's own wins. Without either, go-core's validator keys (`validation_errors.*`) are worded by the library and
|
|
110
|
+
* other messages show as sent.
|
|
111
111
|
*/
|
|
112
112
|
describeFieldError?: AppFieldErrorDescriber;
|
|
113
113
|
/** Called with every error the application catches (component errors, unhandled rejections, failed effects and loads). Default: `console.error`. */
|
package/dist/app/current.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { HttpClient } from "../client";
|
|
1
2
|
import type { Application } from "./application";
|
|
2
3
|
/** Called by `createApplication`; the returned function unbinds, and only if this application is still the current one. */
|
|
3
4
|
export declare function bindApplication(application: Application): () => void;
|
|
@@ -9,3 +10,8 @@ export declare function bindApplication(application: Application): () => void;
|
|
|
9
10
|
* Throws before one exists. In a unit test make one first: `createTestApplication()` from `@wssto2/vue-core/testing`, and `dispose()` it after.
|
|
10
11
|
*/
|
|
11
12
|
export declare function currentApplication(): Application;
|
|
13
|
+
/**
|
|
14
|
+
* The platform's HTTP client of the current application, for an `api.ts` (`const http = currentHttp` is a module's one line of setup).
|
|
15
|
+
* Call it when a request is made, not at module load: it throws before `createApplication` ran.
|
|
16
|
+
*/
|
|
17
|
+
export declare function currentHttp(): HttpClient;
|
package/dist/app/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { createApplication } from "./application";
|
|
2
2
|
export type { Application, ApplicationI18n, ApplicationErrorReport, ApplicationI18nOptions, ApplicationLocaleOptions, ApplicationOptions, ApplicationRouterOptions, ShellDefinition, } from "./application";
|
|
3
|
-
export { currentApplication } from "./current";
|
|
3
|
+
export { currentApplication, currentHttp } from "./current";
|
|
4
4
|
export { ShellOutlet } from "./contributions";
|
|
5
5
|
export { applicationKey, useApplication } from "./environment";
|
|
6
6
|
export type { ApplicationEnvironment, ApplicationState } from "./environment";
|
package/dist/app/index.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { c as
|
|
3
|
-
import { S as
|
|
4
|
-
import { a as
|
|
5
|
-
import { d as
|
|
6
|
-
import { k as
|
|
1
|
+
import { A as r, c as o } from "../application-C900Wz0A.js";
|
|
2
|
+
import { c as p, a as s } from "../current-CslcEPXp.js";
|
|
3
|
+
import { S as n } from "../contributions-9CPT-Z5v.js";
|
|
4
|
+
import { a as l, u } from "../environment-Dva-SG8D.js";
|
|
5
|
+
import { d as x, p as m } from "../feature-DdUAfyi4.js";
|
|
6
|
+
import { k as d, u as S } from "../keepAlive-ClGnsIzT.js";
|
|
7
7
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
r as ApplicationError,
|
|
9
|
+
n as ShellOutlet,
|
|
10
|
+
l as applicationKey,
|
|
11
|
+
o as createApplication,
|
|
12
|
+
p as currentApplication,
|
|
13
|
+
s as currentHttp,
|
|
14
|
+
x as defineFeature,
|
|
15
|
+
d as keepSessionAlive,
|
|
16
|
+
m as provideContext,
|
|
17
|
+
u as useApplication,
|
|
18
|
+
S as useLanguages
|
|
18
19
|
};
|
|
@@ -10,16 +10,16 @@ import { coreMessages as le, createMessageRuntime as Xe } from "./i18n/index.js"
|
|
|
10
10
|
import { i as Ye, a as Ze } from "./Icon.vue_vue_type_script_lang-BhhsFYwp.js";
|
|
11
11
|
import { i as et, b as tt } from "./bottomDock-BZEiOPYZ.js";
|
|
12
12
|
import { i as st, p as ot } from "./chrome-nUcmVu8G.js";
|
|
13
|
-
import { i as rt, g as at } from "./platform-
|
|
13
|
+
import { i as rt, g as at } from "./platform-ORzRR3Tw.js";
|
|
14
14
|
import { c as nt, A as it, r as ue } from "./access-DmAceEo5.js";
|
|
15
15
|
import { c as ct, _ as lt } from "./NoAccess.vue_vue_type_script_setup_true_lang-BHzZtZ50.js";
|
|
16
|
-
import { i as ut } from "./guards-
|
|
17
|
-
import { b as ft, c as dt, n as fe } from "./navigation-
|
|
18
|
-
import { c as pt, s as de } from "./contributions-
|
|
16
|
+
import { i as ut } from "./guards-6fJxfUtk.js";
|
|
17
|
+
import { b as ft, c as dt, n as fe } from "./navigation-DMJ6akat.js";
|
|
18
|
+
import { c as pt, s as de } from "./contributions-9CPT-Z5v.js";
|
|
19
19
|
import { a as pe } from "./environment-Dva-SG8D.js";
|
|
20
20
|
import { b as me, c as he } from "./describeError-B-NMa--w.js";
|
|
21
|
-
import { b as mt } from "./current-
|
|
22
|
-
import { _ as ht } from "./Button.vue_vue_type_script_setup_true_lang-
|
|
21
|
+
import { b as mt } from "./current-CslcEPXp.js";
|
|
22
|
+
import { _ as ht } from "./Button.vue_vue_type_script_setup_true_lang-JrqhO99l.js";
|
|
23
23
|
import { _ as gt } from "./EmptyState.vue_vue_type_script_setup_true_lang-DbZiO2RF.js";
|
|
24
24
|
import { i as wt } from "./feature-DdUAfyi4.js";
|
|
25
25
|
function vt(e) {
|
package/dist/button/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as o } from "../Button.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { m as a, s as e, u, a as c } from "../shortcut-
|
|
1
|
+
import { _ as o } from "../Button.vue_vue_type_script_setup_true_lang-JrqhO99l.js";
|
|
2
|
+
import { m as a, s as e, u, a as c } from "../shortcut-oixX55SZ.js";
|
|
3
3
|
export {
|
|
4
4
|
o as Button,
|
|
5
5
|
a as matchesShortcut,
|
package/dist/client/client.d.ts
CHANGED
|
@@ -6,6 +6,12 @@ import { type Transport } from "./transport";
|
|
|
6
6
|
export interface RequestOptions {
|
|
7
7
|
query?: Readonly<Record<string, QueryValue>>;
|
|
8
8
|
headers?: HeadersInit;
|
|
9
|
+
/**
|
|
10
|
+
* The key of this attempt at a change, sent as the `Idempotency-Key` header (it wins over a header of that name): the server does
|
|
11
|
+
* it once however many times the same key arrives. Make it once per attempt (a form holds one until it succeeds) and give it
|
|
12
|
+
* to every retry; the client's own renew-and-retry after a 401 sends it again.
|
|
13
|
+
*/
|
|
14
|
+
idempotencyKey?: string;
|
|
9
15
|
/** Cancels the request; it then fails with kind `aborted` (see `isAborted`), it never resolves half-way. */
|
|
10
16
|
signal?: AbortSignal;
|
|
11
17
|
/** False for calls that establish or end the session (sign-in, `/auth/me`), where a 401 is an answer, not an expiry. Default true. */
|
package/dist/client/index.js
CHANGED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { A as S, k as O, a as q } from "./error-CD7x0Jrz.js";
|
|
2
|
+
function B(e) {
|
|
3
|
+
if (!e) return "";
|
|
4
|
+
const t = new URLSearchParams();
|
|
5
|
+
for (const [s, r] of Object.entries(e))
|
|
6
|
+
if (!(r == null || r === ""))
|
|
7
|
+
if (Array.isArray(r)) for (const o of r) t.append(s, String(o));
|
|
8
|
+
else t.append(s, String(r));
|
|
9
|
+
return t.toString();
|
|
10
|
+
}
|
|
11
|
+
const E = (e) => typeof Blob < "u" && e instanceof Blob;
|
|
12
|
+
function _(e) {
|
|
13
|
+
const t = new FormData();
|
|
14
|
+
for (const [s, r] of Object.entries(e))
|
|
15
|
+
if (r != null)
|
|
16
|
+
if (Array.isArray(r))
|
|
17
|
+
for (const o of r) t.append(`${s}[]`, j(o));
|
|
18
|
+
else
|
|
19
|
+
t.append(s, j(r));
|
|
20
|
+
return t;
|
|
21
|
+
}
|
|
22
|
+
function j(e) {
|
|
23
|
+
return E(e) ? e : e instanceof Date ? e.toISOString() : typeof e == "object" && e !== null ? JSON.stringify(e) : String(e);
|
|
24
|
+
}
|
|
25
|
+
function F(e) {
|
|
26
|
+
if (e === void 0) return { body: void 0, contentType: null };
|
|
27
|
+
if (typeof e == "string" || e instanceof FormData || e instanceof URLSearchParams || e instanceof ArrayBuffer || ArrayBuffer.isView(e) || E(e))
|
|
28
|
+
return { body: e, contentType: null };
|
|
29
|
+
if (typeof e == "object" && e !== null && !Array.isArray(e)) {
|
|
30
|
+
const t = e;
|
|
31
|
+
if (Object.values(t).some((s) => E(s) || Array.isArray(s) && s.some(E)))
|
|
32
|
+
return { body: _(t), contentType: null };
|
|
33
|
+
}
|
|
34
|
+
return { body: JSON.stringify(e), contentType: "application/json" };
|
|
35
|
+
}
|
|
36
|
+
function N() {
|
|
37
|
+
const e = new Uint8Array(16);
|
|
38
|
+
return globalThis.crypto.getRandomValues(e), Array.from(e, (t) => t.toString(16).padStart(2, "0")).join("");
|
|
39
|
+
}
|
|
40
|
+
const T = "X-Request-ID", I = (e) => typeof e == "object" && e !== null && !Array.isArray(e), A = (e) => typeof e == "string" && e !== "" ? e : null;
|
|
41
|
+
function P(e) {
|
|
42
|
+
const t = e?.errors ?? e?.fields;
|
|
43
|
+
if (!I(t)) return {};
|
|
44
|
+
const s = {};
|
|
45
|
+
for (const [r, o] of Object.entries(t))
|
|
46
|
+
Array.isArray(o) ? s[r] = o.map(String) : o != null && (s[r] = [String(o)]);
|
|
47
|
+
return s;
|
|
48
|
+
}
|
|
49
|
+
async function H(e) {
|
|
50
|
+
const t = await e.text();
|
|
51
|
+
if (t.trim() === "") return { payload: null, readable: !0 };
|
|
52
|
+
try {
|
|
53
|
+
return { payload: JSON.parse(t), readable: !0 };
|
|
54
|
+
} catch {
|
|
55
|
+
return { payload: null, readable: !1 };
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
async function k(e, t) {
|
|
59
|
+
const s = e.headers.get(T) ?? t, { payload: r, readable: o } = await H(e), c = I(r) ? r : null;
|
|
60
|
+
if (!e.ok) {
|
|
61
|
+
const b = P(c), p = c?.params;
|
|
62
|
+
throw new S({
|
|
63
|
+
kind: O(e.status, Object.keys(b).length > 0),
|
|
64
|
+
message: A(c?.error) ?? A(c?.message) ?? `Request failed with status ${e.status}`,
|
|
65
|
+
status: e.status,
|
|
66
|
+
fields: b,
|
|
67
|
+
code: A(c?.code),
|
|
68
|
+
params: I(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 ${e.status} with a body that is not JSON`,
|
|
77
|
+
status: e.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: e.status,
|
|
85
|
+
requestId: s
|
|
86
|
+
} : { data: r, meta: null, message: null, status: e.status, requestId: s };
|
|
87
|
+
}
|
|
88
|
+
const J = /;\s*([^\s=;]+)\s*=\s*("(?:[^"\\]|\\.)*"|[^;]*)/g;
|
|
89
|
+
function L(e) {
|
|
90
|
+
const t = /^([^']*)'[^']*'(.*)$/s.exec(e);
|
|
91
|
+
if (!t) return null;
|
|
92
|
+
const s = new TextEncoder(), r = [];
|
|
93
|
+
for (const [, o, c] of t[2].matchAll(/%([0-9a-f]{2})|(.)/gis)) r.push(...o ? [parseInt(o, 16)] : s.encode(c));
|
|
94
|
+
try {
|
|
95
|
+
return new TextDecoder(t[1] || "utf-8", { fatal: !0 }).decode(Uint8Array.from(r));
|
|
96
|
+
} catch {
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const G = (e) => e.slice(Math.max(e.lastIndexOf("/"), e.lastIndexOf("\\")) + 1).trim();
|
|
101
|
+
function K(e) {
|
|
102
|
+
if (!e) return null;
|
|
103
|
+
let t = null, s = null;
|
|
104
|
+
for (const [, r, o] of e.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)) : t ?? (t = p);
|
|
109
|
+
}
|
|
110
|
+
return G(s ?? t ?? "") || null;
|
|
111
|
+
}
|
|
112
|
+
const Q = (e, t) => globalThis.fetch(e, t), V = 20, M = (e) => /^[a-z][a-z0-9+.-]*:\/\//i.test(e);
|
|
113
|
+
function Z(e, t, s) {
|
|
114
|
+
const r = M(t) || e === "" ? t : `${e.replace(/\/+$/, "")}/${t.replace(/^\/+/, "")}`;
|
|
115
|
+
return s === "" ? r : `${r}${r.includes("?") ? "&" : "?"}${s}`;
|
|
116
|
+
}
|
|
117
|
+
const $ = (e, t) => new S({ kind: "aborted", message: "The request was cancelled", requestId: e, cause: t });
|
|
118
|
+
function X(e = {}) {
|
|
119
|
+
const { baseUrl: t = "", transport: s = Q, credentials: r = "include" } = e, o = [], c = (n) => {
|
|
120
|
+
n !== null && (o.push(n), o.length > V && o.shift());
|
|
121
|
+
};
|
|
122
|
+
async function b(n, a, i, u, y, m) {
|
|
123
|
+
const { signal: f } = u, l = e.requestId === !1 ? null : (e.requestId ?? N)();
|
|
124
|
+
if (f?.aborted) throw $(l, f.reason);
|
|
125
|
+
const h = F(i), w = new Headers({ Accept: y }), D = e.headers ? await e.headers() : void 0;
|
|
126
|
+
for (const d of [D, u.headers])
|
|
127
|
+
d && new Headers(d).forEach((z, C) => w.set(C, z));
|
|
128
|
+
u.idempotencyKey !== void 0 && w.set("Idempotency-Key", u.idempotencyKey), l !== null && !w.has(T) && w.set(T, l), h.contentType !== null && !w.has("Content-Type") && w.set("Content-Type", h.contentType);
|
|
129
|
+
const U = { method: n, headers: w, credentials: r, body: h.body, signal: f }, v = Z(t, a, B(u.query));
|
|
130
|
+
try {
|
|
131
|
+
const d = await s(v, 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, y, m) {
|
|
143
|
+
try {
|
|
144
|
+
return await b(n, a, i, u, y, m);
|
|
145
|
+
} catch (f) {
|
|
146
|
+
if (!q(f) || f.kind !== "unauthorized" || u.handleUnauthorized === !1 || !e.onUnauthorized || await e.onUnauthorized({ error: f, method: n, path: a }) !== "retry") throw f;
|
|
147
|
+
return b(n, a, i, u, y, m);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
const g = (n, a, i, u = {}) => p(n, a, i, u, "application/json", async (y, m) => {
|
|
151
|
+
const f = await k(y, m);
|
|
152
|
+
return c(f.requestId), f;
|
|
153
|
+
});
|
|
154
|
+
function R(n, a = {}, i) {
|
|
155
|
+
const { accept: u = "*/*", method: y = "GET", body: m, ...f } = a;
|
|
156
|
+
return p(y, n, m, f, u, async (l, h) => {
|
|
157
|
+
l.ok || await k(l, h);
|
|
158
|
+
const w = l.headers.get(T) ?? h;
|
|
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 } : {}, y = n.path.replace(/:([A-Za-z_][A-Za-z0-9_]*)/g, (f, l) => {
|
|
164
|
+
const h = u[l];
|
|
165
|
+
if (h == null || h === "")
|
|
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(h));
|
|
168
|
+
}), m = Object.keys(u).length > 0;
|
|
169
|
+
return n.method === "GET" || n.method === "DELETE" ? g(n.method, y, void 0, { ...i, query: { ...u, ...i.query } }) : g(n.method, y, 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) => R(n, a, async (i, u) => ({
|
|
180
|
+
blob: await i.blob(),
|
|
181
|
+
filename: K(i.headers.get("Content-Disposition")),
|
|
182
|
+
requestId: u
|
|
183
|
+
})),
|
|
184
|
+
stream: (n, a) => R(n, a, async (i) => i),
|
|
185
|
+
recentRequestIds: () => [...o]
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
export {
|
|
189
|
+
V as R,
|
|
190
|
+
T as a,
|
|
191
|
+
X as c,
|
|
192
|
+
Q as f
|
|
193
|
+
};
|
package/dist/collection/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { D as K, d as Q, h as W, l as Y, a as ee, r as te, b as se } from "../http-
|
|
2
|
-
import { _ as ie, a as ae, u as ne } from "../CollectionPage.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { L as re } from "../state-
|
|
4
|
-
import { a as de, u as ue } from "../neighbors-
|
|
1
|
+
import { D as K, d as Q, h as W, l as Y, a as ee, r as te, b as se } from "../http-D6qOS6xs.js";
|
|
2
|
+
import { _ as ie, a as ae, u as ne } from "../CollectionPage.vue_vue_type_script_setup_true_lang-qxeSTAKV.js";
|
|
3
|
+
import { L as re } from "../state-QDaxntgR.js";
|
|
4
|
+
import { a as de, u as ue } from "../neighbors-DrEahe7B.js";
|
|
5
5
|
import { r as p } from "../route-goWMxDUN.js";
|
|
6
|
-
import { b as pe, a as me } from "../rowLayout-
|
|
7
|
-
import { _ as _e } from "../DataTable.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { b as pe, a as me } from "../rowLayout-QKfNHsML.js";
|
|
7
|
+
import { _ as _e } from "../DataTable.vue_vue_type_script_setup_true_lang-DbRS37n3.js";
|
|
8
8
|
import { defineComponent as h, openBlock as c, createElementBlock as u, Fragment as P, renderList as E, createBlock as w, unref as d, withCtx as g, normalizeClass as v, createVNode as _, createCommentVNode as y, shallowRef as S, useTemplateRef as T, watch as L, renderSlot as D } from "vue";
|
|
9
9
|
import { _ as b } from "../Icon.vue_vue_type_script_lang-BhhsFYwp.js";
|
|
10
|
-
import { _ as R } from "../Tooltip.vue_vue_type_script_setup_true_lang-
|
|
10
|
+
import { _ as R } from "../Tooltip.vue_vue_type_script_setup_true_lang-C1C1qeBj.js";
|
|
11
11
|
import { D as ke, u as xe } from "../datePresets-DB13HHHd.js";
|
|
12
12
|
import { _ as we, h as ge } from "../Highlight.vue_vue_type_script_setup_true_lang-DZGBmwcX.js";
|
|
13
13
|
import { useI18n as z } from "vue-i18n";
|
|
14
|
-
import { _ as A } from "../Modal.vue_vue_type_script_setup_true_lang-
|
|
14
|
+
import { _ as A } from "../Modal.vue_vue_type_script_setup_true_lang-CZ7WrDwu.js";
|
|
15
15
|
const m = {
|
|
16
16
|
index: p("GET", "/v1/saved-views"),
|
|
17
17
|
store: p("POST", "/v1/saved-views"),
|
package/dist/config/index.d.ts
CHANGED
|
@@ -41,6 +41,22 @@ export interface ArchitectureFile {
|
|
|
41
41
|
}
|
|
42
42
|
/** An application's own rule: the messages for one file (each is prefixed with the file's path), or none. */
|
|
43
43
|
export type ArchitectureRule = (file: ArchitectureFile) => string[] | undefined;
|
|
44
|
+
/** The rule `no-hardcoded-copy`: no text in the language of the code's authors where a person reads it. */
|
|
45
|
+
export interface CopyRuleConfig {
|
|
46
|
+
/** What the text of that language looks like: its letters and common words (matched line by line). Required. */
|
|
47
|
+
pattern: RegExp;
|
|
48
|
+
/** Where every string literal of a `.ts` / `<script>` and a template's `placeholder`, `title`, `aria-label` and `label` count. Default: the UI folders (`uiDirs`). Elsewhere only a template's text and the strings of `form.ts`, `*Form.ts` and `forms/` count. */
|
|
49
|
+
scope?: RegExp;
|
|
50
|
+
/** Words that are written in that language's letters in every language (brand names), cut out of what `scope` scans. Give it the `g` flag. */
|
|
51
|
+
properNames?: RegExp;
|
|
52
|
+
}
|
|
53
|
+
/** The rule `no-route-policy`: a route names its permission in `meta.permission`, never in `policy:` / `requires:` of a `routes.ts`. */
|
|
54
|
+
export interface RouteAccessConfig {
|
|
55
|
+
/** The session's retired list of permission names (`policies`): `authStore.<name>` and `state.<name>` are reported too. Default none. */
|
|
56
|
+
sessionField?: string;
|
|
57
|
+
/** Files (by path from the config's folder) that are not scanned: scripts, docs, e2e. Tests are never scanned. */
|
|
58
|
+
exclude?: RegExp;
|
|
59
|
+
}
|
|
44
60
|
export interface ArchitectureConfig {
|
|
45
61
|
/** The folder of the features, relative to the config file (default "features"). */
|
|
46
62
|
featuresDir?: string;
|
|
@@ -63,11 +79,15 @@ export interface ArchitectureConfig {
|
|
|
63
79
|
};
|
|
64
80
|
/**
|
|
65
81
|
* Known offenders that predate a rule, by rule: "deep-import" (`<file> -> <specifier>`), "raw-http", "feature-name" and
|
|
66
|
-
* "feature-shape" (paths), and a pack rule's id (files; a stale entry is a violation, so the list only shrinks).
|
|
82
|
+
* "feature-shape" (paths), and a pack rule's or `copy` / `routeAccess` rule's id (files; a stale entry is a violation, so the list only shrinks).
|
|
67
83
|
*/
|
|
68
84
|
allow?: Record<string, string[]>;
|
|
69
85
|
/** Opt-in rule packs: "design-values" (theme tokens) and "presentation" (use the library's components). */
|
|
70
86
|
packs?: ("design-values" | "presentation")[];
|
|
87
|
+
/** Switches on `no-hardcoded-copy`; its allowlist (`allow["no-hardcoded-copy"]`) is a ratchet like a pack rule's. */
|
|
88
|
+
copy?: CopyRuleConfig;
|
|
89
|
+
/** Switches on `no-route-policy`; its allowlist is `allow["no-route-policy"]`. */
|
|
90
|
+
routeAccess?: RouteAccessConfig;
|
|
71
91
|
/** The application's own rules, run on every source file. */
|
|
72
92
|
rules?: ArchitectureRule[];
|
|
73
93
|
/** A document to name after a rule's message, by rule: "shared-layer", "api-error" or a pack rule's id. */
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An outcome as one grouped card of numbers: a quiet label over a large tabular value per cell, hairlines between cells, an optional
|
|
3
|
+
* share bar under a value, and optional header and footer rows (a run's date and status, a success-rate bar).
|
|
4
|
+
*
|
|
5
|
+
* <StatSummary :items="[{ key: 'total', label: 'Rows', value: 120 },
|
|
6
|
+
* { key: 'failed', label: 'Errors', value: 9, tone: 'danger', share: 7.5 }]">
|
|
7
|
+
* <template #footer>…</template>
|
|
8
|
+
* </StatSummary>
|
|
9
|
+
*
|
|
10
|
+
* Wide screens show every cell in one row; compact screens wrap into `compactColumns` and drop cells marked `compact: false`.
|
|
11
|
+
*/
|
|
12
|
+
export type StatTone = "neutral" | "muted" | "info" | "success" | "warning" | "danger";
|
|
13
|
+
export type StatItem = {
|
|
14
|
+
key: string;
|
|
15
|
+
label: string;
|
|
16
|
+
value: number;
|
|
17
|
+
tone?: StatTone;
|
|
18
|
+
/** 0–100: draws a share bar with the percentage under the value. */
|
|
19
|
+
share?: number | null;
|
|
20
|
+
/** False hides the cell on compact screens (secondary numbers). */
|
|
21
|
+
compact?: boolean;
|
|
22
|
+
};
|
|
23
|
+
type __VLS_Props = {
|
|
24
|
+
items: StatItem[];
|
|
25
|
+
compactColumns?: number;
|
|
26
|
+
};
|
|
27
|
+
type __VLS_Slots = {
|
|
28
|
+
header?: () => unknown;
|
|
29
|
+
footer?: () => unknown;
|
|
30
|
+
};
|
|
31
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
32
|
+
compactColumns: number;
|
|
33
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
35
|
+
export default _default;
|
|
36
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
37
|
+
new (): {
|
|
38
|
+
$slots: S;
|
|
39
|
+
};
|
|
40
|
+
};
|
package/dist/content/index.d.ts
CHANGED
|
@@ -9,4 +9,5 @@ export { default as KeyValueList, type KeyValueItem } from "./KeyValueList.vue";
|
|
|
9
9
|
export { default as MicroLabel } from "./MicroLabel.vue";
|
|
10
10
|
export { default as Money } from "./Money.vue";
|
|
11
11
|
export { default as Panel } from "./Panel.vue";
|
|
12
|
+
export { default as StatSummary, type StatItem, type StatTone } from "./StatSummary.vue";
|
|
12
13
|
export { default as Timestamp } from "./Timestamp.vue";
|