@wssto2/vue-core 0.15.3 → 0.17.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 +32 -0
- package/README.md +4 -3
- package/bin/architecture/engine.mjs +3 -0
- package/bin/architecture/permissions.mjs +56 -0
- package/bin/architecture/rules.mjs +17 -0
- package/bin/commands/check-architecture.mjs +19 -0
- package/bin/config.mjs +2 -0
- package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-BH3f0hda.js → AccessGate.vue_vue_type_script_setup_true_lang-Bg8JFAOT.js} +1 -1
- package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-DybAIOHS.js → ActionRow.vue_vue_type_script_setup_true_lang-B5IMNnTf.js} +4 -4
- package/dist/{Activity-DM9t5d3D.js → Activity-CiYn5E6A.js} +7 -7
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-uO4EAmBb.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-oXWQTfBs.js} +170 -168
- package/dist/{Changes-DYpysvfX.js → Changes-Cy8STpLX.js} +3 -3
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-qxeSTAKV.js → CollectionPage.vue_vue_type_script_setup_true_lang-Dr6nFNBB.js} +6 -6
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-DbRS37n3.js → DataTable.vue_vue_type_script_setup_true_lang-D372wlxR.js} +1 -1
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-DzCvYHAf.js → DateField.vue_vue_type_script_setup_true_lang-D0KcfW8R.js} +17 -16
- package/dist/{DeadLetters-vt9vhJD7.js → DeadLetters-DhJkMpd_.js} +4 -4
- package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-dsO1m9Mm.js → FormGroup.vue_vue_type_script_setup_true_lang-lvAuBG-0.js} +2 -2
- package/dist/FormRow.vue_vue_type_script_setup_true_lang-CpgNVQF4.js +160 -0
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-Bq_Qa4py.js → FormView.vue_vue_type_script_setup_true_lang-D01Jr4UU.js} +5 -5
- package/dist/{General-oUI2MiwO.js → General-CwTPC5UP.js} +11 -11
- package/dist/{IncidentRecord-CQdv_bN5.js → IncidentRecord-hXEGuLGg.js} +14 -14
- package/dist/{IncidentsList-DwQ0wuM8.js → IncidentsList-C41VyDwK.js} +6 -6
- package/dist/{NewRolePage-C-wbA-uW.js → NewRolePage-BYYZJkK7.js} +3 -3
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-U-_kcnGr.js → NumberField.vue_vue_type_script_setup_true_lang-BhNZgEW6.js} +7 -6
- package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-BPDh9s2m.js → PersonAccess.vue_vue_type_script_setup_true_lang-mYFuG-Y3.js} +56 -56
- package/dist/{ProfilePage-Di77M2cX.js → ProfilePage-DGEsIycR.js} +13 -13
- package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-CZtvUH5L.js → RecordHeader.vue_vue_type_script_setup_true_lang-B3BnYg1x.js} +1 -1
- package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-uLrX13ab.js → ResourcePage.vue_vue_type_script_setup_true_lang-1iZtj3rh.js} +1 -1
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-V2D7fhR9.js → RoleEditor.vue_vue_type_script_setup_true_lang-BslSDDiM.js} +10 -10
- package/dist/{RolePage-Crp71rRb.js → RolePage-C08ZUqw1.js} +9 -9
- package/dist/{RolesPage-DKXXnnDV.js → RolesPage-FOuY1VKg.js} +10 -10
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-5ogQCj8M.js → SectionNavigator.vue_vue_type_script_setup_true_lang-DCTFxfPB.js} +2 -2
- package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-zv_AxpBn.js → SegmentedField.vue_vue_type_script_setup_true_lang-CLR6EvzO.js} +13 -12
- package/dist/{SelectField.vue_vue_type_script_setup_true_lang-CLkoPbGm.js → SelectField.vue_vue_type_script_setup_true_lang-D5xYofdb.js} +10 -9
- package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-C7WKxJ9i.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-CDr4WNIb.js} +9 -9
- package/dist/{ServiceAccountRecord-CTU10RWy.js → ServiceAccountRecord-kWwIQGZb.js} +12 -12
- package/dist/{ServiceAccountsList-BVRjoswH.js → ServiceAccountsList-CKy9_YHP.js} +8 -8
- package/dist/{Sessions-BHwMrF7c.js → Sessions-BDc8gdYH.js} +4 -4
- package/dist/{SettingsPage-lRWvsMYK.js → SettingsPage-t-8kmFVT.js} +13 -13
- package/dist/{SignIn-HnujOMRY.js → SignIn-CqtkvtCZ.js} +7 -7
- package/dist/{SignInPage-c886Fvd7.js → SignInPage-DcdNKZIb.js} +4 -4
- package/dist/{SignIns-BsTlN2Zc.js → SignIns-D4-nGu0B.js} +3 -3
- package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-Ds4q0bbl.js → SwitchField.vue_vue_type_script_setup_true_lang-CLtcuofe.js} +15 -14
- package/dist/{TextField.vue_vue_type_script_setup_true_lang-CWIeeZRE.js → TextField.vue_vue_type_script_setup_true_lang-CVGh-p3J.js} +7 -6
- package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-D2j4s96s.js → TextareaField.vue_vue_type_script_setup_true_lang-YxUlNHSk.js} +6 -5
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-C1mLvOkc.js → TimeField.vue_vue_type_script_setup_true_lang-DHNC_MLt.js} +30 -29
- package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-jCXYFLtq.js → Timestamp.vue_vue_type_script_setup_true_lang-d_KuxWjH.js} +1 -1
- package/dist/{UserRecord-DrbpVHh9.js → UserRecord-CwZCr9Im.js} +10 -10
- package/dist/{UsersList-M5tBxrox.js → UsersList-Cn19sFgv.js} +4 -4
- package/dist/access/index.js +4 -4
- package/dist/app/application.d.ts +2 -0
- package/dist/app/index.js +2 -2
- package/dist/app/validate.d.ts +3 -1
- package/dist/{application-C900Wz0A.js → application-CDSweJb9.js} +144 -142
- package/dist/back-LcLlFodC.js +63 -0
- package/dist/{chrome-nUcmVu8G.js → chrome-kMBKIB1N.js} +2 -2
- package/dist/collection/authors.d.ts +27 -0
- package/dist/collection/index.d.ts +2 -0
- package/dist/collection/index.js +81 -76
- package/dist/config/index.d.ts +42 -0
- package/dist/config/index.js +12 -3
- package/dist/content/Panel.vue.d.ts +1 -1
- package/dist/content/index.js +2 -2
- package/dist/{contributions-9CPT-Z5v.js → contributions-B0x5x5xD.js} +1 -1
- package/dist/form/CommandDialog.vue.d.ts +1 -1
- package/dist/form/DateField.vue.d.ts +1 -1
- package/dist/form/DateTimeField.vue.d.ts +1 -1
- package/dist/form/FileField.vue.d.ts +1 -1
- package/dist/form/FormRow.vue.d.ts +2 -2
- package/dist/form/I18nField.vue.d.ts +2 -2
- package/dist/form/TextField.vue.d.ts +1 -1
- package/dist/form/TextareaField.vue.d.ts +2 -2
- package/dist/form/date/value.d.ts +21 -0
- package/dist/form/index.d.ts +1 -0
- package/dist/form/index.js +745 -715
- package/dist/format/format.d.ts +8 -2
- package/dist/format/index.js +1 -1
- package/dist/format-C_HXlOYQ.js +136 -0
- package/dist/{guards-6fJxfUtk.js → guards-CNJ0ATVC.js} +1 -1
- package/dist/i18n/index.d.ts +14 -2
- package/dist/i18n/index.js +84 -73
- package/dist/i18n/messages.d.ts +10 -1
- package/dist/i18n/runtime.d.ts +3 -1
- package/dist/identity/index.js +3 -3
- package/dist/identity/profile/EmailChangeDialog.vue.d.ts +2 -2
- package/dist/identity/users/list.d.ts +1 -1
- package/dist/incidents/index.js +1 -1
- package/dist/{index-_hDHxrt5.js → index-1HS7O2-e.js} +9 -9
- package/dist/{index-DM_nWOYf.js → index-BA2w8uwD.js} +86 -86
- package/dist/{index-vES_D5ls.js → index-SLJWm40T.js} +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/modal/DiscardChangesModal.vue.d.ts +2 -2
- package/dist/modal/Modal.vue.d.ts +2 -2
- package/dist/modal/Sheet.vue.d.ts +2 -2
- package/dist/modules/identity/routes.d.ts +1 -1
- package/dist/modules/identity/schemas.d.ts +2 -2
- package/dist/{navigation-DMJ6akat.js → navigation-d-JAPBGA.js} +1 -1
- package/dist/{neighbors-DrEahe7B.js → neighbors-Dg_LU9ry.js} +32 -31
- package/dist/notifications/index.js +1 -1
- package/dist/onboarding/index.js +1 -1
- package/dist/options-mOOX6JSS.js +214 -0
- package/dist/overlay/AlertDialog.vue.d.ts +3 -3
- package/dist/overlay/Menu.vue.d.ts +2 -2
- package/dist/overlay/PhotoViewer.vue.d.ts +2 -2
- package/dist/overlay/Popover.vue.d.ts +2 -2
- package/dist/page/SectionNavigator.vue.d.ts +1 -1
- package/dist/page/SectionPanel.vue.d.ts +1 -1
- package/dist/page/back.d.ts +37 -0
- package/dist/page/index.d.ts +1 -0
- package/dist/page/index.js +46 -42
- package/dist/phone/index.js +57 -56
- package/dist/platform/index.d.ts +10 -1
- package/dist/platform/index.js +16 -15
- package/dist/platform/platform.d.ts +4 -2
- package/dist/{platform-ORzRR3Tw.js → platform-DU9QFts8.js} +7 -6
- package/dist/playwright/config.d.ts +33 -0
- package/dist/playwright/index.d.ts +2 -0
- package/dist/playwright/index.js +192 -171
- package/dist/resource/index.js +1 -1
- package/dist/router/index.js +3 -3
- package/dist/router/sections.d.ts +1 -1
- package/dist/{rowLayout-QKfNHsML.js → rowLayout-PIuD7MGo.js} +2 -2
- package/dist/sections-BpiRLntE.js +54 -0
- package/dist/{serverMessages-Ce8-MK4e.js → serverMessages-C_KkDvpT.js} +1 -1
- package/dist/shell/index.js +5 -5
- package/dist/state/NextStepPanel.vue.d.ts +63 -0
- package/dist/state/PhaseTiles.vue.d.ts +20 -0
- package/dist/state/PhaseTrack.vue.d.ts +48 -0
- package/dist/state/RequirementList.vue.d.ts +10 -0
- package/dist/state/TodoRow.vue.d.ts +52 -0
- package/dist/state/index.d.ts +9 -0
- package/dist/state/index.js +731 -126
- package/dist/state/phaseStep.d.ts +7 -0
- package/dist/state/phaseTile.d.ts +10 -0
- package/dist/state/requirementItem.d.ts +16 -0
- package/dist/state/todoRow.d.ts +8 -0
- package/dist/{state-QDaxntgR.js → state-z1iPF1DT.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/{suggestions-q_v3M7G6.js → suggestions-DeMgs_ki.js} +1 -1
- package/dist/testing/format.d.ts +1 -1
- package/dist/testing/index.js +31 -31
- package/dist/{useCommand-DAMgQ5NE.js → useCommand-DQKvro1n.js} +2 -2
- package/dist/{useGroupSheet-B-Hs4gNO.js → useGroupSheet-CRw3MUmX.js} +3 -3
- package/dist/{usePreferences-BfMXVbSO.js → usePreferences-DB29UTFD.js} +1 -1
- package/dist/{useRecordDialog-QPKFH1Ww.js → useRecordDialog-0azHxxvm.js} +1 -1
- package/dist/{useResourceForm-Oa6bk3NI.js → useResourceForm-zVuWerSn.js} +1 -1
- package/dist/{useSaveChrome-7huA3FzR.js → useSaveChrome-DB9OwIjT.js} +1 -1
- package/dist/{useTypedEntry-CITij2C_.js → useTypedEntry-BsMV66Yc.js} +46 -45
- package/package.json +1 -1
- package/dist/format-Cp1h0vsC.js +0 -125
- package/dist/options-B48UiYsG.js +0 -368
- package/dist/sections-DI_JhgQG.js +0 -53
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** A person behind a record, as go-core's `meta.author` / `meta.editor` and a list's `meta.authors` carry them. */
|
|
2
|
+
export interface ResourceAuthor {
|
|
3
|
+
readonly id: number;
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly email: string | null;
|
|
6
|
+
readonly phone_number: string | null;
|
|
7
|
+
readonly avatar: string | null;
|
|
8
|
+
readonly active: boolean;
|
|
9
|
+
}
|
|
10
|
+
/** The `meta` of a record answer: who created it and who last changed it (and who switched it on or off, where the resource has that). */
|
|
11
|
+
export interface ResourceMeta {
|
|
12
|
+
readonly author: ResourceAuthor | null;
|
|
13
|
+
readonly editor: ResourceAuthor | null;
|
|
14
|
+
readonly activator?: ResourceAuthor | null;
|
|
15
|
+
readonly deactivator?: ResourceAuthor | null;
|
|
16
|
+
readonly [key: string]: unknown;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The person behind a row's `created_by` / `updated_by`: a list answer carries them once, in `meta.authors`.
|
|
20
|
+
*
|
|
21
|
+
* const creator = authorOf(page.meta, row.created_by);
|
|
22
|
+
*
|
|
23
|
+
* Null for no id, no `authors` in the meta, or an id nobody in it has. `A` is your own author type where it has more fields.
|
|
24
|
+
*/
|
|
25
|
+
export declare function authorOf<A extends {
|
|
26
|
+
readonly id: number;
|
|
27
|
+
} = ResourceAuthor>(meta: object | null | undefined, id: number | null | undefined): NoInfer<A> | null;
|
|
@@ -3,6 +3,8 @@ export type { CollectionDefaults, CollectionDefinition, CollectionDefinitionInpu
|
|
|
3
3
|
export { useCollection } from "./useCollection";
|
|
4
4
|
export type { Collection, CollectionDisplay, LinkedQuery, SavedViewsHandle, UseCollectionOptions } from "./useCollection";
|
|
5
5
|
export type { CollectionLoader, ListMeta, ListPage, CollectionQuery, CollectionStateSource, LoadContext, SortDirection } from "./types";
|
|
6
|
+
export { authorOf } from "./authors";
|
|
7
|
+
export type { ResourceAuthor, ResourceMeta } from "./authors";
|
|
6
8
|
export { httpList, listLoader, listParams, readListPage, routeListLoader } from "./http";
|
|
7
9
|
export { LIST_CONTEXT_PARAM } from "./location";
|
|
8
10
|
export type { CollectionColumns, Column, ColumnKey, ColumnKind, ColumnValue, MobileRole, RowAction, SlotKey, TableColumns } from "./columns";
|
package/dist/collection/index.js
CHANGED
|
@@ -1,53 +1,57 @@
|
|
|
1
|
-
import { D as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { L as
|
|
4
|
-
import { a as
|
|
1
|
+
import { D as Q, d as W, h as Y, l as ee, a as te, r as se, b as oe } from "../http-D6qOS6xs.js";
|
|
2
|
+
import { _ as ae, a as ne, u as le } from "../CollectionPage.vue_vue_type_script_setup_true_lang-Dr6nFNBB.js";
|
|
3
|
+
import { L as ce } from "../state-z1iPF1DT.js";
|
|
4
|
+
import { a as ue, u as fe } from "../neighbors-Dg_LU9ry.js";
|
|
5
5
|
import { r as p } from "../route-goWMxDUN.js";
|
|
6
|
-
import { b as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { defineComponent as
|
|
6
|
+
import { b as me, a as ve } from "../rowLayout-PIuD7MGo.js";
|
|
7
|
+
import { _ as be } from "../DataTable.vue_vue_type_script_setup_true_lang-D372wlxR.js";
|
|
8
|
+
import { defineComponent as x, openBlock as c, createElementBlock as u, Fragment as P, renderList as E, createBlock as w, unref as d, withCtx as y, normalizeClass as v, createVNode as _, createCommentVNode as g, shallowRef as S, useTemplateRef as T, watch as L, renderSlot as A } from "vue";
|
|
9
9
|
import { _ as b } from "../Icon.vue_vue_type_script_lang-BhhsFYwp.js";
|
|
10
|
-
import { _ as
|
|
11
|
-
import { D as
|
|
12
|
-
import { _ as
|
|
13
|
-
import { useI18n as
|
|
14
|
-
import { _ as
|
|
10
|
+
import { _ as D } from "../Tooltip.vue_vue_type_script_setup_true_lang-C1C1qeBj.js";
|
|
11
|
+
import { D as he, u as xe } from "../datePresets-DB13HHHd.js";
|
|
12
|
+
import { _ as ye, h as ge } from "../Highlight.vue_vue_type_script_setup_true_lang-DZGBmwcX.js";
|
|
13
|
+
import { useI18n as R } from "vue-i18n";
|
|
14
|
+
import { _ as z } from "../Modal.vue_vue_type_script_setup_true_lang-CZ7WrDwu.js";
|
|
15
|
+
function j(a, e) {
|
|
16
|
+
const i = a?.authors;
|
|
17
|
+
return e == null || !Array.isArray(i) ? null : i.find((s) => s.id === e) ?? null;
|
|
18
|
+
}
|
|
15
19
|
const m = {
|
|
16
20
|
index: p("GET", "/v1/saved-views"),
|
|
17
21
|
store: p("POST", "/v1/saved-views"),
|
|
18
22
|
delete: p("DELETE", "/v1/saved-views/:id")
|
|
19
23
|
}, k = ({ id: a, name: e, state: i }) => ({ id: a, name: e, state: i });
|
|
20
|
-
function
|
|
24
|
+
function G(a) {
|
|
21
25
|
return {
|
|
22
26
|
async list(e, { signal: i }) {
|
|
23
27
|
return (await a.request(m.index, { list: e }, { signal: i })).data.map(k);
|
|
24
28
|
},
|
|
25
|
-
async save(e, i,
|
|
26
|
-
const
|
|
27
|
-
return k((await a.request(m.store, { list_key: e, name: i, state:
|
|
29
|
+
async save(e, i, s) {
|
|
30
|
+
const o = JSON.stringify({ ...s, view: s.view || void 0 });
|
|
31
|
+
return k((await a.request(m.store, { list_key: e, name: i, state: o })).data);
|
|
28
32
|
},
|
|
29
33
|
async remove(e, i) {
|
|
30
34
|
await a.request(m.delete, { id: Number(i) });
|
|
31
35
|
}
|
|
32
36
|
};
|
|
33
37
|
}
|
|
34
|
-
function
|
|
35
|
-
const e = new Map(Object.entries(a).map(([
|
|
38
|
+
function U(a = {}) {
|
|
39
|
+
const e = new Map(Object.entries(a).map(([o, t]) => [o, [...t]]));
|
|
36
40
|
let i = 1;
|
|
37
|
-
const
|
|
38
|
-
let t = e.get(
|
|
39
|
-
return t || e.set(
|
|
41
|
+
const s = (o) => {
|
|
42
|
+
let t = e.get(o);
|
|
43
|
+
return t || e.set(o, t = []), t;
|
|
40
44
|
};
|
|
41
45
|
return {
|
|
42
|
-
async list(
|
|
43
|
-
return [...o
|
|
46
|
+
async list(o) {
|
|
47
|
+
return [...s(o)];
|
|
44
48
|
},
|
|
45
|
-
async save(
|
|
46
|
-
const n = o
|
|
49
|
+
async save(o, t, l) {
|
|
50
|
+
const n = s(o), r = n.findIndex((C) => C.name === t), f = { id: r === -1 ? `view-${i++}` : n[r].id, name: t, state: l };
|
|
47
51
|
return r === -1 ? n.push(f) : n[r] = f, f;
|
|
48
52
|
},
|
|
49
|
-
async remove(
|
|
50
|
-
const l = o
|
|
53
|
+
async remove(o, t) {
|
|
54
|
+
const l = s(o), n = l.findIndex((r) => r.id === t);
|
|
51
55
|
n !== -1 && l.splice(n, 1);
|
|
52
56
|
}
|
|
53
57
|
};
|
|
@@ -56,21 +60,21 @@ const $ = {
|
|
|
56
60
|
key: 0,
|
|
57
61
|
class: "flex items-center justify-center gap-1",
|
|
58
62
|
"data-test": "row-actions"
|
|
59
|
-
}, I = ["href", "target", "rel", "aria-label", "data-action"], N = ["aria-label", "data-action", "disabled", "onClick"],
|
|
63
|
+
}, I = ["href", "target", "rel", "aria-label", "data-action"], N = ["aria-label", "data-action", "disabled", "onClick"], h = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus", H = /* @__PURE__ */ x({
|
|
60
64
|
__name: "RowActions",
|
|
61
65
|
props: {
|
|
62
66
|
actions: {},
|
|
63
67
|
disabled: { type: Boolean, default: !1 }
|
|
64
68
|
},
|
|
65
69
|
setup(a) {
|
|
66
|
-
const e = a, i = (
|
|
67
|
-
return (
|
|
68
|
-
(c(!0), u(P, null, E(e.actions, (t) => (c(), w(d(
|
|
70
|
+
const e = a, i = (s) => s.tone === "critical" ? "text-status-danger-content hover:bg-status-danger-surface" : "text-content-link hover:bg-tint-soft";
|
|
71
|
+
return (s, o) => e.actions.length > 0 ? (c(), u("div", $, [
|
|
72
|
+
(c(!0), u(P, null, E(e.actions, (t) => (c(), w(d(D), {
|
|
69
73
|
key: t.key,
|
|
70
74
|
text: t.label,
|
|
71
75
|
side: "left"
|
|
72
76
|
}, {
|
|
73
|
-
default:
|
|
77
|
+
default: y(() => [
|
|
74
78
|
t.href && !e.disabled ? (c(), u("a", {
|
|
75
79
|
key: 0,
|
|
76
80
|
href: t.href,
|
|
@@ -78,7 +82,7 @@ const $ = {
|
|
|
78
82
|
rel: t.external ? "noopener" : void 0,
|
|
79
83
|
"aria-label": t.label,
|
|
80
84
|
"data-action": t.key,
|
|
81
|
-
class: v(["inline-flex rounded-md p-1.5 transition-colors", [i(t),
|
|
85
|
+
class: v(["inline-flex rounded-md p-1.5 transition-colors", [i(t), h]])
|
|
82
86
|
}, [
|
|
83
87
|
_(d(b), {
|
|
84
88
|
name: t.icon,
|
|
@@ -90,7 +94,7 @@ const $ = {
|
|
|
90
94
|
"aria-label": t.label,
|
|
91
95
|
"data-action": t.key,
|
|
92
96
|
disabled: e.disabled,
|
|
93
|
-
class: v(["inline-flex cursor-pointer rounded-md p-1.5 transition-colors disabled:pointer-events-none disabled:opacity-40", [i(t),
|
|
97
|
+
class: v(["inline-flex cursor-pointer rounded-md p-1.5 transition-colors disabled:pointer-events-none disabled:opacity-40", [i(t), h]]),
|
|
94
98
|
onClick: (l) => t.onSelect?.()
|
|
95
99
|
}, [
|
|
96
100
|
_(d(b), {
|
|
@@ -101,28 +105,28 @@ const $ = {
|
|
|
101
105
|
]),
|
|
102
106
|
_: 2
|
|
103
107
|
}, 1032, ["text"]))), 128))
|
|
104
|
-
])) :
|
|
108
|
+
])) : g("", !0);
|
|
105
109
|
}
|
|
106
110
|
});
|
|
107
|
-
function
|
|
111
|
+
function J() {
|
|
108
112
|
const a = S({ open: !1, options: null });
|
|
109
113
|
let e = null;
|
|
110
|
-
function i(
|
|
111
|
-
const
|
|
112
|
-
e = null, a.value = { open: !1, options: a.value.options },
|
|
114
|
+
function i(s) {
|
|
115
|
+
const o = e;
|
|
116
|
+
e = null, a.value = { open: !1, options: a.value.options }, o?.(s);
|
|
113
117
|
}
|
|
114
118
|
return {
|
|
115
119
|
state: a,
|
|
116
|
-
pick(...[
|
|
117
|
-
return e?.(null), new Promise((
|
|
118
|
-
e =
|
|
120
|
+
pick(...[s]) {
|
|
121
|
+
return e?.(null), new Promise((o) => {
|
|
122
|
+
e = o, a.value = { open: !0, options: s ?? {} };
|
|
119
123
|
});
|
|
120
124
|
},
|
|
121
|
-
select: (
|
|
125
|
+
select: (s) => i(s),
|
|
122
126
|
cancel: () => i(null)
|
|
123
127
|
};
|
|
124
128
|
}
|
|
125
|
-
const
|
|
129
|
+
const X = /* @__PURE__ */ x({
|
|
126
130
|
__name: "PickerModal",
|
|
127
131
|
props: {
|
|
128
132
|
picker: {},
|
|
@@ -131,57 +135,58 @@ const J = /* @__PURE__ */ h({
|
|
|
131
135
|
size: { default: "lg" }
|
|
132
136
|
},
|
|
133
137
|
setup(a) {
|
|
134
|
-
const e = a, { t: i } =
|
|
135
|
-
let
|
|
138
|
+
const e = a, { t: i } = R(), s = T("modal");
|
|
139
|
+
let o = !1, t = !1;
|
|
136
140
|
L(() => e.picker.state.value.open, (n) => {
|
|
137
|
-
n ? (
|
|
141
|
+
n ? (o = !0, s.value?.present()) : o && (t = !0, s.value?.dismiss());
|
|
138
142
|
}, { flush: "post" });
|
|
139
143
|
function l() {
|
|
140
|
-
|
|
144
|
+
o = !1, t ? t = !1 : e.picker.cancel();
|
|
141
145
|
}
|
|
142
|
-
return (n, r) => (c(), w(d(
|
|
146
|
+
return (n, r) => (c(), w(d(z), {
|
|
143
147
|
ref_key: "modal",
|
|
144
|
-
ref:
|
|
148
|
+
ref: s,
|
|
145
149
|
title: e.picker.state.value.options?.title ?? e.title ?? d(i)("core.collection.pick_label"),
|
|
146
150
|
subtitle: e.picker.state.value.options?.description ?? e.description,
|
|
147
151
|
size: e.size,
|
|
148
152
|
grouped: "",
|
|
149
153
|
onDismissed: l
|
|
150
154
|
}, {
|
|
151
|
-
default:
|
|
152
|
-
e.picker.state.value.options ?
|
|
155
|
+
default: y(() => [
|
|
156
|
+
e.picker.state.value.options ? A(n.$slots, "default", {
|
|
153
157
|
options: e.picker.state.value.options,
|
|
154
158
|
select: e.picker.select
|
|
155
|
-
}, void 0, void 0, 0) :
|
|
159
|
+
}, void 0, void 0, 0) : g("", !0)
|
|
156
160
|
]),
|
|
157
161
|
_: 3
|
|
158
162
|
}, 8, ["title", "subtitle", "size"]));
|
|
159
163
|
}
|
|
160
164
|
});
|
|
161
165
|
export {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
166
|
+
me as CollectionCell,
|
|
167
|
+
ae as CollectionPage,
|
|
168
|
+
ne as CollectionTable,
|
|
169
|
+
he as DATE_PRESETS,
|
|
170
|
+
Q as DEFAULT_PAGE_SIZES,
|
|
171
|
+
be as DataTable,
|
|
172
|
+
ye as Highlight,
|
|
173
|
+
ce as LIST_CONTEXT_PARAM,
|
|
174
|
+
X as PickerModal,
|
|
175
|
+
ve as RecordIdentity,
|
|
176
|
+
H as RowActions,
|
|
177
|
+
j as authorOf,
|
|
178
|
+
U as createMemorySavedViews,
|
|
179
|
+
J as createPicker,
|
|
180
|
+
W as defineCollection,
|
|
176
181
|
ge as highlightParts,
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
182
|
+
Y as httpList,
|
|
183
|
+
ee as listLoader,
|
|
184
|
+
te as listParams,
|
|
185
|
+
se as readListPage,
|
|
186
|
+
oe as routeListLoader,
|
|
187
|
+
G as serverSavedViews,
|
|
188
|
+
le as useCollection,
|
|
189
|
+
ue as useCollectionBack,
|
|
190
|
+
fe as useCollectionNeighbors,
|
|
186
191
|
xe as useDatePresetFilter
|
|
187
192
|
};
|
package/dist/config/index.d.ts
CHANGED
|
@@ -57,6 +57,28 @@ export interface RouteAccessConfig {
|
|
|
57
57
|
/** Files (by path from the config's folder) that are not scanned: scripts, docs, e2e. Tests are never scanned. */
|
|
58
58
|
exclude?: RegExp;
|
|
59
59
|
}
|
|
60
|
+
/** A rule of the application's own as data: `forbidden[]`. A file (comments cut out, tests never) with a line `pattern` matches breaks it. */
|
|
61
|
+
export interface ForbiddenRuleConfig {
|
|
62
|
+
/** The rule's name: in the message and the key of its allowlist (`allow[id]`, a ratchet). */
|
|
63
|
+
id: string;
|
|
64
|
+
/** Matched line by line. */
|
|
65
|
+
pattern: RegExp;
|
|
66
|
+
/** What to do instead; follows the quoted line. */
|
|
67
|
+
message: string;
|
|
68
|
+
/** Files (by path from the config's folder) that are not scanned. Default: `e2e`, `review`, `scripts`, `tests`, `docs`, `templates` and `static` folders; replaces that default. */
|
|
69
|
+
exclude?: RegExp;
|
|
70
|
+
}
|
|
71
|
+
/** The rule `permission-texts`: the generated permission ids and the texts of the locale files agree. */
|
|
72
|
+
export interface PermissionTextsConfig {
|
|
73
|
+
/** The generated permissions file (a TypeScript union of string literals), relative to the config's folder. */
|
|
74
|
+
generated: string;
|
|
75
|
+
/** The message keys every id needs, `"<namespace>.{id}"`: `policies.{id}` is the file `i18n/policies/<locale>.json`, nested by dots (`"crm": { "lead:view": "…" }` holds `crm.lead:view`). */
|
|
76
|
+
keys: string[];
|
|
77
|
+
/** The locale file names to check (`hr`, `en`, ...). */
|
|
78
|
+
locales: string[];
|
|
79
|
+
/** The folder of the namespaces, relative to the config's folder. Default `"i18n"`. */
|
|
80
|
+
dir?: string;
|
|
81
|
+
}
|
|
60
82
|
export interface ArchitectureConfig {
|
|
61
83
|
/** The folder of the features, relative to the config file (default "features"). */
|
|
62
84
|
featuresDir?: string;
|
|
@@ -88,6 +110,10 @@ export interface ArchitectureConfig {
|
|
|
88
110
|
copy?: CopyRuleConfig;
|
|
89
111
|
/** Switches on `no-route-policy`; its allowlist is `allow["no-route-policy"]`. */
|
|
90
112
|
routeAccess?: RouteAccessConfig;
|
|
113
|
+
/** Switches on `permission-texts`: every id of the generated permissions has each key in each locale, and no locale keeps a key for an id that is gone. */
|
|
114
|
+
permissions?: PermissionTextsConfig;
|
|
115
|
+
/** The application's own text rules as data; each is a rule with an allowlist. */
|
|
116
|
+
forbidden?: ForbiddenRuleConfig[];
|
|
91
117
|
/** The application's own rules, run on every source file. */
|
|
92
118
|
rules?: ArchitectureRule[];
|
|
93
119
|
/** A document to name after a rule's message, by rule: "shared-layer", "api-error" or a pack rule's id. */
|
|
@@ -115,3 +141,19 @@ export interface VueCoreConfig {
|
|
|
115
141
|
}
|
|
116
142
|
/** Types a `vue-core.config.mjs` (`export default defineConfig({ … })`); returns the config unchanged. */
|
|
117
143
|
export declare function defineConfig(config: VueCoreConfig): VueCoreConfig;
|
|
144
|
+
export interface VitestDefaultsOptions {
|
|
145
|
+
/** The zone the unit tests run in, so a test of local calendar dates does not depend on the shell's. Sets `TZ`; unset leaves it alone. */
|
|
146
|
+
timezone?: string;
|
|
147
|
+
/** Files run before every test file (the application's `tests/setup.ts`). Default none. */
|
|
148
|
+
setupFiles?: string[];
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* The `test` block of an application's vitest config: jest-style globals, a happy-dom document, the Playwright folders (`e2e/`, `review/`)
|
|
152
|
+
* left to Playwright, and `TZ` pinned. Spread more over it, or pass it whole: `test: vitestDefaults({ timezone: "Europe/Zagreb" })`.
|
|
153
|
+
*/
|
|
154
|
+
export declare function vitestDefaults(options?: VitestDefaultsOptions): {
|
|
155
|
+
globals: boolean;
|
|
156
|
+
environment: string;
|
|
157
|
+
exclude: string[];
|
|
158
|
+
setupFiles: string[];
|
|
159
|
+
};
|
package/dist/config/index.js
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
function e
|
|
2
|
-
return
|
|
1
|
+
function n(e) {
|
|
2
|
+
return e;
|
|
3
|
+
}
|
|
4
|
+
function t(e = {}) {
|
|
5
|
+
return e.timezone && (process.env.TZ = e.timezone), {
|
|
6
|
+
globals: !0,
|
|
7
|
+
environment: "happy-dom",
|
|
8
|
+
exclude: ["**/node_modules/**", "**/dist/**", "e2e/**", "review/**"],
|
|
9
|
+
setupFiles: e.setupFiles ?? []
|
|
10
|
+
};
|
|
3
11
|
}
|
|
4
12
|
export {
|
|
5
|
-
|
|
13
|
+
n as defineConfig,
|
|
14
|
+
t as vitestDefaults
|
|
6
15
|
};
|
|
@@ -41,8 +41,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
|
|
|
41
41
|
icon: import("../icon").IconName;
|
|
42
42
|
presentation: "card" | "section";
|
|
43
43
|
subtitle: string;
|
|
44
|
-
flush: boolean;
|
|
45
44
|
collapsible: boolean;
|
|
45
|
+
flush: boolean;
|
|
46
46
|
headingLevel: 2 | 3 | 4;
|
|
47
47
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
48
48
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
package/dist/content/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as w, computed as h, openBlock as t, createElementBlock as o, Fragment as S, renderList as M, toDisplayString as b, createCommentVNode as v, createElementVNode as u, normalizeClass as y, createVNode as U, unref as g, renderSlot as k, createTextVNode as V, createBlock as $, useModel as K, useId as N, useTemplateRef as R, watch as I, nextTick as Z, withModifiers as G, withDirectives as H, vModelText as O, mergeModels as D, ref as A, withCtx as z, createSlots as P, resolveDynamicComponent as q, normalizeStyle as E } from "vue";
|
|
2
|
-
import { u as L, t as J } from "../format-
|
|
2
|
+
import { u as L, t as J } from "../format-C_HXlOYQ.js";
|
|
3
3
|
import { _ as C } from "../Icon.vue_vue_type_script_lang-BhhsFYwp.js";
|
|
4
4
|
import { _ as Q } from "../Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
|
|
5
5
|
import { i as Ne } from "../Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
|
|
6
6
|
import { useI18n as j } from "vue-i18n";
|
|
7
7
|
import { _ as W } from "../KeyValue.vue_vue_type_script_setup_true_lang-wcZcvnow.js";
|
|
8
8
|
import { _ as Ie } from "../Panel.vue_vue_type_script_setup_true_lang-D_Wg42hu.js";
|
|
9
|
-
import { _ as Ge } from "../Timestamp.vue_vue_type_script_setup_true_lang-
|
|
9
|
+
import { _ as Ge } from "../Timestamp.vue_vue_type_script_setup_true_lang-d_KuxWjH.js";
|
|
10
10
|
const X = ["aria-label"], Y = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "py-1.5 text-center text-caption font-semibold text-content-muted",
|
|
@@ -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-DU9QFts8.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 {
|
|
@@ -59,9 +59,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
|
|
|
59
59
|
message: string;
|
|
60
60
|
size: "sm" | "md" | "lg";
|
|
61
61
|
subtitle: string;
|
|
62
|
+
doneLabel: string;
|
|
62
63
|
editable: boolean;
|
|
63
64
|
fieldLabel: (field: string) => string;
|
|
64
|
-
doneLabel: string;
|
|
65
65
|
confirmDisabled: boolean;
|
|
66
66
|
busyLabel: string;
|
|
67
67
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -43,9 +43,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
|
|
|
43
43
|
error: string;
|
|
44
44
|
required: boolean;
|
|
45
45
|
presentation: "control" | "value";
|
|
46
|
+
labelHidden: boolean;
|
|
46
47
|
min: Day;
|
|
47
48
|
max: Day;
|
|
48
|
-
labelHidden: boolean;
|
|
49
49
|
hint: string;
|
|
50
50
|
editable: boolean;
|
|
51
51
|
lockedReason: string;
|
|
@@ -43,9 +43,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
|
|
|
43
43
|
error: string;
|
|
44
44
|
required: boolean;
|
|
45
45
|
presentation: "control" | "value";
|
|
46
|
+
labelHidden: boolean;
|
|
46
47
|
min: string;
|
|
47
48
|
max: string;
|
|
48
|
-
labelHidden: boolean;
|
|
49
49
|
hint: string;
|
|
50
50
|
editable: boolean;
|
|
51
51
|
lockedReason: string;
|
|
@@ -35,8 +35,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
|
|
|
35
35
|
required: boolean;
|
|
36
36
|
presentation: "control" | "value";
|
|
37
37
|
accept: readonly string[];
|
|
38
|
-
variant: "button" | "dropzone";
|
|
39
38
|
labelHidden: boolean;
|
|
39
|
+
variant: "button" | "dropzone";
|
|
40
40
|
hint: string;
|
|
41
41
|
editable: boolean;
|
|
42
42
|
lockedReason: string;
|
|
@@ -53,10 +53,10 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
|
|
|
53
53
|
error: string;
|
|
54
54
|
required: boolean;
|
|
55
55
|
value: string | number | null;
|
|
56
|
-
|
|
56
|
+
layout: FormRowLayout;
|
|
57
57
|
labelHidden: boolean;
|
|
58
|
+
for: string;
|
|
58
59
|
subId: string;
|
|
59
|
-
layout: FormRowLayout;
|
|
60
60
|
errorId: string;
|
|
61
61
|
indent: number;
|
|
62
62
|
labelLines: 1 | 2 | 3;
|
|
@@ -39,8 +39,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
|
|
|
39
39
|
error: string;
|
|
40
40
|
required: boolean;
|
|
41
41
|
presentation: "control" | "value";
|
|
42
|
-
|
|
42
|
+
maxLength: number;
|
|
43
43
|
labelHidden: boolean;
|
|
44
|
+
rows: number;
|
|
44
45
|
hint: string;
|
|
45
46
|
editable: boolean;
|
|
46
47
|
lockedReason: string;
|
|
@@ -48,7 +49,6 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
|
|
|
48
49
|
defaultLocale: string;
|
|
49
50
|
requiredLocales: readonly string[];
|
|
50
51
|
multiline: boolean;
|
|
51
|
-
maxLength: number;
|
|
52
52
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
53
53
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
54
54
|
export default _default;
|
|
@@ -77,6 +77,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
|
|
|
77
77
|
width: Exclude<ControlWidth, "content">;
|
|
78
78
|
prefix: string;
|
|
79
79
|
presentation: "control" | "value";
|
|
80
|
+
maxLength: number;
|
|
80
81
|
labelHidden: boolean;
|
|
81
82
|
hint: string;
|
|
82
83
|
editable: boolean;
|
|
@@ -87,7 +88,6 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
|
|
|
87
88
|
suggestions: readonly TextSuggestion[] | ((query: string, context: {
|
|
88
89
|
signal: AbortSignal;
|
|
89
90
|
}) => Promise<readonly TextSuggestion[]>);
|
|
90
|
-
maxLength: number;
|
|
91
91
|
autocomplete: string;
|
|
92
92
|
suggestionsMinLength: number;
|
|
93
93
|
suggestionsDebounce: number;
|
|
@@ -36,13 +36,13 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
|
|
|
36
36
|
error: string;
|
|
37
37
|
required: boolean;
|
|
38
38
|
presentation: "control" | "value";
|
|
39
|
-
|
|
39
|
+
maxLength: number;
|
|
40
40
|
stacked: boolean;
|
|
41
41
|
labelHidden: boolean;
|
|
42
|
+
rows: number;
|
|
42
43
|
hint: string;
|
|
43
44
|
editable: boolean;
|
|
44
45
|
lockedReason: string;
|
|
45
|
-
maxLength: number;
|
|
46
46
|
autocomplete: string;
|
|
47
47
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
48
48
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { today } from "./days";
|
|
2
|
+
/**
|
|
3
|
+
* An API date or timestamp as the `YYYY-MM-DD` a `DateField` binds, or null (empty, the Go zero date, not a date). A string is sliced as
|
|
4
|
+
* written, never read through `new Date()`, which would move the day across midnight in a zone away from UTC; a `Date` is read on the
|
|
5
|
+
* user's clock.
|
|
6
|
+
*/
|
|
7
|
+
export declare function dateValue(value: string | Date | null | undefined): string | null;
|
|
8
|
+
/**
|
|
9
|
+
* An API timestamp as the `YYYY-MM-DDTHH:mm` a `DateTimeField` binds (the user's clock, minutes), or null. An instant with an offset
|
|
10
|
+
* (`...Z`, `+01:00`) is converted; a value without one (`2026-09-30 14:35`) is already local.
|
|
11
|
+
*/
|
|
12
|
+
export declare function dateTimeValue(value: string | Date | null | undefined): string | null;
|
|
13
|
+
/**
|
|
14
|
+
* A date model or API value as a `Date`. `YYYY-MM-DDTHH:mm` and the older `YYYY-MM-DD HH:mm` are both read as local time (Safari rejects
|
|
15
|
+
* the space), and a bare `YYYY-MM-DD` is local midnight, not UTC. Anything else goes to `new Date`. An unreadable value is an invalid
|
|
16
|
+
* `Date` (`getTime()` is NaN).
|
|
17
|
+
*/
|
|
18
|
+
export declare function parseDateValue(value: string): Date;
|
|
19
|
+
/** The current minute on the user's clock, as a `DateTimeField` value. */
|
|
20
|
+
export declare function now(clock?: Date): string;
|
|
21
|
+
export { today };
|
package/dist/form/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export { default as ChoiceChips } from "./ChoiceChips.vue";
|
|
|
17
17
|
export { default as ComboField } from "./ComboField.vue";
|
|
18
18
|
export { default as Calendar } from "./date/Calendar.vue";
|
|
19
19
|
export type { DisabledDates } from "./date/days";
|
|
20
|
+
export { dateTimeValue, dateValue, now, parseDateValue, today } from "./date/value";
|
|
20
21
|
export type { QuickPick, QuickTime } from "./date/quickPicks";
|
|
21
22
|
export { default as DateField } from "./DateField.vue";
|
|
22
23
|
export { default as DateTimeField } from "./DateTimeField.vue";
|