@wssto2/vue-core 0.5.3 → 0.6.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 +3 -1
- package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-Bv-APkGf.js → ActionRow.vue_vue_type_script_setup_true_lang-D8NCXX4p.js} +1 -1
- package/dist/{Activity-DUjDaPfP.js → Activity-DGodh6BU.js} +4 -4
- package/dist/{Changes-B0tZO6BZ.js → Changes-38u4xY6e.js} +3 -3
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-o_Pj-JcD.js → CollectionPage.vue_vue_type_script_setup_true_lang-DPcCnrjr.js} +3 -3
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-CDg31ZU7.js → DateField.vue_vue_type_script_setup_true_lang-BxUuUypB.js} +1 -1
- package/dist/{DeadLetters-IgVHao84.js → DeadLetters-CeHfhFHP.js} +6 -5
- package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-CSgT4ITL.js → FormGroup.vue_vue_type_script_setup_true_lang-CNb2CK01.js} +1 -1
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-D31Hk3pJ.js → FormView.vue_vue_type_script_setup_true_lang-nyz8EkzM.js} +1 -1
- package/dist/{General-C40HxupS.js → General-BNTjPvat.js} +6 -6
- package/dist/{NewRolePage-Bhy8KJO1.js → NewRolePage-Btg7gzzH.js} +7 -6
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-BdS7BxuS.js → NumberField.vue_vue_type_script_setup_true_lang-C8um4ARi.js} +1 -1
- package/dist/PersonAccess.vue_vue_type_script_setup_true_lang-ClmawvYm.js +600 -0
- package/dist/{ProfilePage-Bf7dFzGd.js → ProfilePage-CoZyG11N.js} +9 -9
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-C6oloGIh.js → RoleEditor.vue_vue_type_script_setup_true_lang-Bs9bo0Zb.js} +30 -29
- package/dist/{RolePage-BjbvciTg.js → RolePage-CPlwZA6X.js} +37 -35
- package/dist/{RolesPage-DzVOgF4z.js → RolesPage-CdYdIHR4.js} +29 -27
- package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-DXe_iOS8.js → SegmentedField.vue_vue_type_script_setup_true_lang-B_hBL5f4.js} +1 -1
- package/dist/{SelectField.vue_vue_type_script_setup_true_lang-BN4vzvV9.js → SelectField.vue_vue_type_script_setup_true_lang-CBZhGNpm.js} +4 -4
- package/dist/ServiceAccountDialog.vue_vue_type_script_setup_true_lang-DuvSSBbX.js +126 -0
- package/dist/ServiceAccountRecord-BtaUZuWU.js +511 -0
- package/dist/ServiceAccountsList-CcRJvNaf.js +137 -0
- package/dist/{SessionList.vue_vue_type_script_setup_true_lang-PuWIK-Wa.js → SessionList.vue_vue_type_script_setup_true_lang-VvBB2EZz.js} +2 -2
- package/dist/{Sessions-CRUObe5G.js → Sessions-DkGNO1FO.js} +2 -2
- package/dist/{SettingsPage-C0qEC0uI.js → SettingsPage-D4G1HGbG.js} +8 -8
- package/dist/{SignIn-Uy0Jujzz.js → SignIn-DS1YymqD.js} +4 -4
- package/dist/{SignInPage-CpVZfrLZ.js → SignInPage-BrmL0PUw.js} +3 -3
- package/dist/{SignIns-Cp5Gx2dk.js → SignIns-C7l7IPHQ.js} +1 -1
- package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-Dj5Aq8QT.js → SwitchField.vue_vue_type_script_setup_true_lang-DXZK89A3.js} +1 -1
- package/dist/{TextField.vue_vue_type_script_setup_true_lang-BwfNNQEz.js → TextField.vue_vue_type_script_setup_true_lang-CX3LdZLK.js} +2 -2
- package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-aT1P8Xqr.js → TextareaField.vue_vue_type_script_setup_true_lang-BOtn_1GT.js} +1 -1
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-jPKPE1hc.js → TimeField.vue_vue_type_script_setup_true_lang-CbflIrq6.js} +1 -1
- package/dist/{UserRecord-DbSMnTbj.js → UserRecord-Du8M_kuk.js} +25 -25
- package/dist/{UsersList-9MicE2pG.js → UsersList-D3ydQice.js} +13 -13
- package/dist/access/api.d.ts +7 -8
- package/dist/access/context.d.ts +2 -7
- package/dist/access/feature.d.ts +0 -8
- package/dist/access/index.js +47 -15
- package/dist/client/client.d.ts +2 -2
- package/dist/client/index.d.ts +1 -1
- package/dist/client/route.d.ts +22 -3
- package/dist/collection/http.d.ts +3 -2
- package/dist/collection/index.js +17 -16
- package/dist/form/index.js +586 -611
- package/dist/http-nz92KjdS.js +42 -0
- package/dist/i18n/index.js +32 -32
- package/dist/identity/index.d.ts +7 -0
- package/dist/identity/index.js +19 -15
- package/dist/identity/serviceaccounts/ApiKeysPanel.vue.d.ts +17 -0
- package/dist/identity/serviceaccounts/CreatedApiKeyDialog.vue.d.ts +53 -0
- package/dist/identity/serviceaccounts/NewApiKeyDialog.vue.d.ts +24 -0
- package/dist/identity/serviceaccounts/ServiceAccountDialog.vue.d.ts +22 -0
- package/dist/identity/serviceaccounts/ServiceAccountRecord.vue.d.ts +2 -0
- package/dist/identity/serviceaccounts/ServiceAccountsList.vue.d.ts +2 -0
- package/dist/identity/serviceaccounts/access.d.ts +4 -0
- package/dist/identity/serviceaccounts/api.d.ts +27 -0
- package/dist/identity/serviceaccounts/context.d.ts +14 -0
- package/dist/identity/serviceaccounts/feature.d.ts +23 -0
- package/dist/identity/serviceaccounts/form.d.ts +4 -0
- package/dist/identity/serviceaccounts/messages.d.ts +11 -0
- package/dist/identity/serviceaccounts/routes.d.ts +22 -0
- package/dist/{index-Ok29ucE3.js → index-Cmj9iZmT.js} +191 -168
- package/dist/{index-C-oM_Mnf.js → index-DH0MoFqg.js} +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/copyText.d.ts +5 -0
- package/dist/modules/access/routes.d.ts +13 -13
- package/dist/modules/events/routes.d.ts +4 -4
- package/dist/modules/identity/routes.d.ts +31 -31
- package/dist/modules/notification/routes.d.ts +16 -16
- package/dist/modules/serviceaccount/entities.d.ts +127 -0
- package/dist/modules/serviceaccount/routes.d.ts +58 -0
- package/dist/modules/serviceaccount/schemas.d.ts +49 -0
- package/dist/{neighbors-Bv6vnWlW.js → neighbors-DNZuGlQH.js} +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/{options-Bu0XbEpN.js → options-e_CAfvDQ.js} +3 -3
- package/dist/phone/index.js +1 -1
- package/dist/refusals-COPr15XZ.js +135 -0
- package/dist/routes-CVckt7Pj.js +19 -0
- package/dist/state-BC1Fc6U2.js +154 -0
- package/dist/{status-C78NpXyB.js → status-C8XtnK6m.js} +7 -6
- package/dist/styles.css +1 -1
- package/dist/{suggestions-ClyLexMO.js → suggestions-cPjs5gQz.js} +1 -1
- package/dist/{useCommand-DyuPTosF.js → useCommand-CfG727e8.js} +1 -1
- package/dist/{useGroupSheet-C2NyqWRp.js → useGroupSheet-BVcNDWbP.js} +2 -2
- package/dist/useRecordDialog-D65FF85F.js +30 -0
- package/package.json +2 -2
- package/dist/http-CdQowFlW.js +0 -194
- package/dist/index-BdGnA1Jh.js +0 -765
package/dist/access/index.js
CHANGED
|
@@ -1,17 +1,49 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as f, a as R, b } from "../PersonAccess.vue_vue_type_script_setup_true_lang-ClmawvYm.js";
|
|
2
|
+
import { d as o, p as c } from "../feature-DdUAfyi4.js";
|
|
3
|
+
import { a as s, b as t } from "../refusals-COPr15XZ.js";
|
|
4
|
+
import { d as g, p as x, r as h, c as v, u as y, e as C, f as K } from "../refusals-COPr15XZ.js";
|
|
5
|
+
import { d as r } from "../defineRoutes-BGAdiIrt.js";
|
|
6
|
+
const a = r({
|
|
7
|
+
roles: { name: "access.roles", path: "/iam/roles", component: () => import("../RolesPage-CdYdIHR4.js"), meta: { access: s.viewRoles, titleKey: "core.access.title" } },
|
|
8
|
+
newRole: { name: "access.roles.new", path: "/iam/roles/new", component: () => import("../NewRolePage-Btg7gzzH.js"), meta: { access: s.manageRoles, titleKey: "core.access.new_title" } },
|
|
9
|
+
role: {
|
|
10
|
+
name: "access.role",
|
|
11
|
+
path: "/iam/roles/:ref",
|
|
12
|
+
component: () => import("../RolePage-CPlwZA6X.js"),
|
|
13
|
+
// 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: s.viewRoles, titleKey: "core.access.title", remountOnParam: "ref" }
|
|
15
|
+
}
|
|
16
|
+
}), m = {
|
|
17
|
+
access: s.viewAccess,
|
|
18
|
+
section: { labelKey: "core.access.person_roles", icon: "shieldStarFill" }
|
|
19
|
+
};
|
|
20
|
+
function u(e) {
|
|
21
|
+
return o({
|
|
22
|
+
id: "access",
|
|
23
|
+
routes: a.records,
|
|
24
|
+
context: c(t, {
|
|
25
|
+
catalogue: e.catalogue,
|
|
26
|
+
subjectRoute: e.subjectRoute ?? (() => null),
|
|
27
|
+
constraints: e.roleConstraints ?? [],
|
|
28
|
+
problems: e.problems ?? {},
|
|
29
|
+
scopes: e.scopes ?? null
|
|
30
|
+
}),
|
|
31
|
+
navigation: e.destination ? [{ destination: e.destination, to: a.roles, within: ["access.role", "access.roles.new"] }] : []
|
|
32
|
+
});
|
|
33
|
+
}
|
|
2
34
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
35
|
+
f as BindingRow,
|
|
36
|
+
R as PersonAccess,
|
|
37
|
+
u as accessFeature,
|
|
38
|
+
a as accessPages,
|
|
39
|
+
s as accessPermissions,
|
|
40
|
+
b as accessRoutes,
|
|
41
|
+
g as dependantsClosure,
|
|
42
|
+
x as permissionTree,
|
|
43
|
+
m as personRolesSection,
|
|
44
|
+
h as requiredClosure,
|
|
45
|
+
v as roleProblems,
|
|
46
|
+
y as useAccessLabels,
|
|
47
|
+
C as useDescribeRefusal,
|
|
48
|
+
K as useRefusalMessage
|
|
17
49
|
};
|
package/dist/client/client.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export interface HttpClientOptions {
|
|
|
38
38
|
/** A route that takes no input (`void`, or an empty object) needs no second argument. */
|
|
39
39
|
type RequestArguments<In> = [In] extends [void] ? [input?: undefined, options?: RequestOptions] : [In] extends [Record<string, never>] ? [input?: In, options?: RequestOptions] : [input: In, options?: RequestOptions];
|
|
40
40
|
/** A route declared `void` has no body: its data is `null`. */
|
|
41
|
-
export type RouteResult<Out> = ApiResult<[Out] extends [void] ? null : Out>;
|
|
41
|
+
export type RouteResult<Out, Meta = unknown> = ApiResult<[Out] extends [void] ? null : Out, Meta>;
|
|
42
42
|
export interface HttpClient {
|
|
43
43
|
/**
|
|
44
44
|
* Calls a declared route: `:name` segments of the path are filled from `input` (encoded), the rest of
|
|
@@ -46,7 +46,7 @@ export interface HttpClient {
|
|
|
46
46
|
* parameter rejects with a plain `Error` (a bug in the caller, not an answer from the server) before
|
|
47
47
|
* anything is sent. Abort, request ids and 401 handling are those of `get` and `post`.
|
|
48
48
|
*/
|
|
49
|
-
request<In, Out>(route: ApiRoute<In, Out>, ...args: RequestArguments<In>): Promise<RouteResult<Out>>;
|
|
49
|
+
request<In, Out, Meta>(route: ApiRoute<In, Out, Meta>, ...args: RequestArguments<In>): Promise<RouteResult<Out, Meta>>;
|
|
50
50
|
get<TData = unknown, TMeta = unknown>(path: string, options?: RequestOptions): Promise<ApiResult<TData, TMeta>>;
|
|
51
51
|
post<TData = unknown, TMeta = unknown>(path: string, body?: unknown, options?: RequestOptions): Promise<ApiResult<TData, TMeta>>;
|
|
52
52
|
put<TData = unknown, TMeta = unknown>(path: string, body?: unknown, options?: RequestOptions): Promise<ApiResult<TData, TMeta>>;
|
package/dist/client/index.d.ts
CHANGED
|
@@ -8,4 +8,4 @@ export type { ApiErrorInit, ApiErrorKind, FieldErrors } from "./error";
|
|
|
8
8
|
export { fetchTransport } from "./transport";
|
|
9
9
|
export type { Transport } from "./transport";
|
|
10
10
|
export { route } from "./route";
|
|
11
|
-
export type { HttpMethod, ListResult, RawRoute, ApiRoute, RouteOptions, ViewCount } from "./route";
|
|
11
|
+
export type { HttpMethod, ListResult, PageMeta, RawRoute, ApiRoute, RouteOptions, ViewCount } from "./route";
|
package/dist/client/route.d.ts
CHANGED
|
@@ -13,13 +13,18 @@ interface RouteBase {
|
|
|
13
13
|
readonly permission?: string;
|
|
14
14
|
readonly public: boolean;
|
|
15
15
|
}
|
|
16
|
-
/**
|
|
17
|
-
|
|
16
|
+
/**
|
|
17
|
+
* A typed call: `In` is what `client.request` takes, `Out` what it resolves to (`void`: no body), `Meta` the
|
|
18
|
+
* envelope's top-level `meta` (go-core `route.WithMeta` / `route.Page`). `Meta` defaults to `unknown`, not
|
|
19
|
+
* `never`: a route that declares none may still be answered with a meta, and `unknown` makes the caller narrow it.
|
|
20
|
+
*/
|
|
21
|
+
export interface ApiRoute<In, Out, Meta = unknown> extends RouteBase {
|
|
18
22
|
readonly raw: false;
|
|
19
23
|
/** Type-only; never set. */
|
|
20
24
|
readonly [types]?: {
|
|
21
25
|
readonly in: In;
|
|
22
26
|
readonly out: Out;
|
|
27
|
+
readonly meta: Meta;
|
|
23
28
|
};
|
|
24
29
|
}
|
|
25
30
|
/** A route without a JSON answer (an event stream, a file): it keeps method and path for links, `client.request` refuses it. */
|
|
@@ -30,8 +35,9 @@ export interface RawRoute extends RouteBase {
|
|
|
30
35
|
* Declares one endpoint. go-core's generator writes these; the types come from the Go input and response.
|
|
31
36
|
*
|
|
32
37
|
* route<ShowInput, Ticket>("GET", "/v1/tickets/:id", { permission: "tickets.ticket:view" })
|
|
38
|
+
* route<ListInput, Ticket[], PageMeta>("GET", "/v1/tickets") // a page: `result.meta` is a PageMeta
|
|
33
39
|
*/
|
|
34
|
-
export declare function route<In, Out>(method: HttpMethod, path: string, options?: RouteOptions): ApiRoute<In, Out>;
|
|
40
|
+
export declare function route<In, Out, Meta = unknown>(method: HttpMethod, path: string, options?: RouteOptions): ApiRoute<In, Out, Meta>;
|
|
35
41
|
export declare namespace route {
|
|
36
42
|
var raw: (method: HttpMethod, path: string, options?: RouteOptions) => RawRoute;
|
|
37
43
|
}
|
|
@@ -40,6 +46,19 @@ export interface ViewCount {
|
|
|
40
46
|
readonly key: string;
|
|
41
47
|
readonly count: number;
|
|
42
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* The `meta` go-core's `web.PageMeta` writes next to a page of rows (`route.Page[T]`); other keys
|
|
51
|
+
* (lookups, totals) may sit beside these. `readListPage` reads an `ApiResult<Row[], PageMeta>` with no cast.
|
|
52
|
+
*/
|
|
53
|
+
export type PageMeta = Readonly<Record<string, unknown>> & {
|
|
54
|
+
readonly total: number;
|
|
55
|
+
readonly page: number;
|
|
56
|
+
readonly per_page: number;
|
|
57
|
+
readonly last_page: number;
|
|
58
|
+
readonly from: number;
|
|
59
|
+
readonly to: number;
|
|
60
|
+
readonly views?: readonly ViewCount[];
|
|
61
|
+
};
|
|
43
62
|
/**
|
|
44
63
|
* The wire shape of go-core's `datatable.DatatableResult[T]`: a page of rows with its numbers.
|
|
45
64
|
* `readListPage` (`/collection`) reads it into a `ListPage` with no glue.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ApiResult, HttpClient, ListResult, QueryValue } from "../client";
|
|
1
|
+
import type { ApiResult, HttpClient, ListResult, PageMeta, QueryValue } from "../client";
|
|
2
2
|
import type { CollectionLoader, ListPage, CollectionQuery } from "./types";
|
|
3
3
|
/**
|
|
4
4
|
* The query parameters go-core's datatable reads: `page`, `per_page`, `order_col`, `order_dir`,
|
|
@@ -8,10 +8,11 @@ export declare function listParams(query: CollectionQuery): Record<string, Query
|
|
|
8
8
|
/**
|
|
9
9
|
* Reads a list answer into a `ListPage`. Understands go-core's envelope (`data` is the rows,
|
|
10
10
|
* `meta` has `total`, `page`, `per_page`, `last_page`, `from`, `to`, and may carry `views` and lookups)
|
|
11
|
-
* and the shape with the numbers next to `data` (`current_page`), which is `ListResult<Row
|
|
11
|
+
* and the shape with the numbers next to `data` (`current_page`), which is `ListResult<Row>`; a `route.Page` route answers `Row[]` with a `PageMeta`. Pass a typed
|
|
12
12
|
* route's result (`client.request(route, input)`) and `Row` is inferred. Missing numbers are derived
|
|
13
13
|
* from what is there rather than becoming 0; `query` supplies the page and size that were asked for.
|
|
14
14
|
*/
|
|
15
|
+
export declare function readListPage<Row>(result: ApiResult<readonly Row[], PageMeta>, query: Pick<CollectionQuery, "page" | "pageSize">): ListPage<Row>;
|
|
15
16
|
export declare function readListPage<Row>(result: ApiResult<ListResult<Row>, unknown>, query: Pick<CollectionQuery, "page" | "pageSize">): ListPage<Row>;
|
|
16
17
|
export declare function readListPage<Row>(result: ApiResult<unknown, unknown>, query: Pick<CollectionQuery, "page" | "pageSize">): ListPage<Row>;
|
|
17
18
|
/**
|
package/dist/collection/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { D as O, L as j, a as U
|
|
2
|
-
import { _ as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { D as O, L as j, a as U } from "../state-BC1Fc6U2.js";
|
|
2
|
+
import { _ as X, a as Z, u as q } from "../CollectionPage.vue_vue_type_script_setup_true_lang-DPcCnrjr.js";
|
|
3
|
+
import { h as J, l as K, r as Q } from "../http-nz92KjdS.js";
|
|
4
|
+
import { u as Y, a as ee } from "../neighbors-DNZuGlQH.js";
|
|
5
|
+
import { a as se, b as oe } from "../rowLayout-BBFyLbOl.js";
|
|
6
|
+
import { _ as ne } from "../DataTable.vue_vue_type_script_setup_true_lang-BEvz5zqo.js";
|
|
6
7
|
import { defineComponent as y, openBlock as c, createElementBlock as d, Fragment as h, renderList as v, createBlock as k, unref as f, withCtx as C, normalizeClass as m, createVNode as p, createCommentVNode as g, computed as w, toValue as E } from "vue";
|
|
7
8
|
import { _ } from "../Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
8
9
|
import { _ as S } from "../Tooltip.vue_vue_type_script_setup_true_lang-mErNPt8e.js";
|
|
@@ -91,22 +92,22 @@ function V(r, s) {
|
|
|
91
92
|
}));
|
|
92
93
|
}
|
|
93
94
|
export {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
se as CollectionCell,
|
|
96
|
+
X as CollectionPage,
|
|
97
|
+
Z as CollectionTable,
|
|
97
98
|
B as DATE_PRESETS,
|
|
98
99
|
O as DEFAULT_PAGE_SIZES,
|
|
99
|
-
|
|
100
|
+
ne as DataTable,
|
|
100
101
|
j as LIST_CONTEXT_PARAM,
|
|
101
|
-
|
|
102
|
+
oe as RecordIdentity,
|
|
102
103
|
N as RowActions,
|
|
103
104
|
$ as createMemorySavedViews,
|
|
104
105
|
U as defineCollection,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
106
|
+
J as httpList,
|
|
107
|
+
K as listParams,
|
|
108
|
+
Q as readListPage,
|
|
109
|
+
q as useCollection,
|
|
110
|
+
Y as useCollectionBack,
|
|
111
|
+
ee as useCollectionNeighbors,
|
|
111
112
|
V as useDatePresetFilter
|
|
112
113
|
};
|