@wssto2/vue-core 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/ActionRow.vue_vue_type_script_setup_true_lang-DybAIOHS.js +64 -0
  3. package/dist/{Activity-CeAG0ZtJ.js → Activity-CdkJW68R.js} +2 -2
  4. package/dist/{Changes-B9-zpDxG.js → Changes-DxK_QfiB.js} +2 -2
  5. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-Cn0YOWJF.js → CollectionPage.vue_vue_type_script_setup_true_lang-x0jyJ01f.js} +1 -1
  6. package/dist/{DataTable.vue_vue_type_script_setup_true_lang-BQRG8bpH.js → DataTable.vue_vue_type_script_setup_true_lang-C_ZytnW-.js} +1 -1
  7. package/dist/{DeadLetters-BP03yC4R.js → DeadLetters-DnA7LP1w.js} +2 -2
  8. package/dist/{General-BDmCJr3H.js → General-2matxl2Y.js} +23 -21
  9. package/dist/Highlight.vue_vue_type_script_setup_true_lang-DZGBmwcX.js +29 -0
  10. package/dist/{IncidentRecord-DEhl6AyA.js → IncidentRecord-Bt3G4HlX.js} +1 -1
  11. package/dist/{IncidentsList-COgRPdk3.js → IncidentsList-2iwgqp9J.js} +3 -3
  12. package/dist/{ProfilePage-BQCK2w8R.js → ProfilePage-CpuyDBAv.js} +21 -20
  13. package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-C0OIBrSp.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-FJbWxME_.js} +2 -2
  14. package/dist/{ServiceAccountRecord-gtlhYaAz.js → ServiceAccountRecord-0-JF5lRx.js} +29 -29
  15. package/dist/{ServiceAccountsList-BM7GGcvw.js → ServiceAccountsList-DcsnOcf-.js} +6 -6
  16. package/dist/{Sessions-BCDJYuV2.js → Sessions-DgWhpk-i.js} +2 -2
  17. package/dist/{SettingsPage-DUhMsYBf.js → SettingsPage-BXPWATYU.js} +5 -4
  18. package/dist/{SignIn-4D7WohI8.js → SignIn-DPoUwHZd.js} +2 -2
  19. package/dist/{SignInPage-B6B-34GG.js → SignInPage-OyrVemro.js} +1 -1
  20. package/dist/{SignIns-CFoe4hpX.js → SignIns-BMDrZVVp.js} +6 -6
  21. package/dist/{UserRecord-Cd1TCpJZ.js → UserRecord-BW-gdCqi.js} +43 -43
  22. package/dist/{UsersList-GJU5-CTG.js → UsersList-B3ZF_1Dj.js} +25 -25
  23. package/dist/app/index.d.ts +1 -0
  24. package/dist/app/index.js +11 -10
  25. package/dist/app/languages.d.ts +8 -0
  26. package/dist/collection/Highlight.vue.d.ts +12 -0
  27. package/dist/collection/index.d.ts +1 -0
  28. package/dist/collection/index.js +18 -17
  29. package/dist/i18n/index.d.ts +1 -0
  30. package/dist/i18n/index.js +6 -4
  31. package/dist/i18n/serverMessages.d.ts +16 -0
  32. package/dist/identity/index.d.ts +2 -1
  33. package/dist/identity/index.js +7 -7
  34. package/dist/identity/users/context.d.ts +3 -0
  35. package/dist/identity/users/feature.d.ts +12 -1
  36. package/dist/identity/users/list.d.ts +12 -1
  37. package/dist/identity/users/personSections.d.ts +14 -5
  38. package/dist/incidents/index.js +1 -1
  39. package/dist/{index-CTkG-acm.js → index-ClJeyW3F.js} +2 -2
  40. package/dist/{index-pJ_eRg80.js → index-Cq9TuOqH.js} +441 -434
  41. package/dist/{index-DUs7WSz-.js → index-kEHY7hcG.js} +2 -2
  42. package/dist/index.d.ts +1 -1
  43. package/dist/index.js +1 -1
  44. package/dist/keepAlive-ClGnsIzT.js +55 -0
  45. package/dist/notifications/index.js +1 -1
  46. package/dist/rowLayout-BsKEzEME.js +650 -0
  47. package/dist/serverMessages-B6GHgi40.js +25 -0
  48. package/dist/shell/QuickSearchPalette.vue.d.ts +3 -3
  49. package/dist/shell/index.js +419 -427
  50. package/dist/shell/quickSearchControl.d.ts +8 -5
  51. package/dist/styles.css +1 -1
  52. package/package.json +1 -1
  53. package/dist/ActionRow.vue_vue_type_script_setup_true_lang-IpcP3Bjc.js +0 -87
  54. package/dist/highlight-DnYhLXnu.js +0 -9
  55. package/dist/identity/fieldMessages.d.ts +0 -15
  56. package/dist/identity/users/languages.d.ts +0 -4
  57. package/dist/keepAlive-z3IRFkQq.js +0 -46
  58. package/dist/rowLayout-Il4psyXN.js +0 -658
@@ -1,5 +1,5 @@
1
- import { n as a, w as t, x as n, P as o, m as i, k as r, _ as u, v as c, l as d, U as S, y as g, z as A, A as l, B as I, i as R, C as m, h as p, D as y, E as U, t as P, F as f, G as v, H as x, q as D, I as E, J as F, s as b, e as w, j as B, b as C, g as L, d as T, K as _, c as h } from "../index-pJ_eRg80.js";
2
- import { a as H, _ as K } from "../ActionRow.vue_vue_type_script_setup_true_lang-IpcP3Bjc.js";
1
+ import { m as a, v as t, w as n, P as o, l as i, j as r, _ as u, t as c, k as d, U as S, x as g, y as A, z as l, A as I, i as p, B as R, g as m, C as y, D as U, r as f, E as P, F as v, G as x, p as D, H as E, I as F, s as b, e as w, h as B, b as C, f as L, J as T, K as _, c as h } from "../index-Cq9TuOqH.js";
2
+ import { a as H, _ as K } from "../ActionRow.vue_vue_type_script_setup_true_lang-DybAIOHS.js";
3
3
  import { s as O } from "../routes-Beyr5NQo.js";
4
4
  export {
5
5
  H as ActionRow,
@@ -18,13 +18,13 @@ export {
18
18
  A as embedSession,
19
19
  l as identityFeature,
20
20
  I as identityPlatform,
21
- R as identityRoutes,
22
- m as identitySessionAdapter,
23
- p as isSessionEnded,
21
+ p as identityRoutes,
22
+ R as identitySessionAdapter,
23
+ m as isSessionEnded,
24
24
  y as lockedUntil,
25
25
  U as parseIdentityUser,
26
- P as personActionsKey,
27
- f as profileRoutes,
26
+ f as personActionsKey,
27
+ P as profileRoutes,
28
28
  v as returnToOwnAccount,
29
29
  x as serviceAccountsFeature,
30
30
  D as serviceAccountsRoutes,
@@ -1,5 +1,6 @@
1
1
  import type { ProfileSection } from "../profile/profileSections";
2
2
  import { type Permission } from "../../platform";
3
+ import type { UsersCollection } from "./list";
3
4
  import type { UsersReplace } from "./replace";
4
5
  import type { ActivityRecord, ChangeWordsFn } from "./words";
5
6
  /** What the screens of `usersFeature` need from the feature that installed them. */
@@ -12,6 +13,8 @@ export interface UsersContext {
12
13
  readonly profileSections: readonly ProfileSection[];
13
14
  /** The screens the application swapped for its own (`useUserDialogs()` resolves the dialogs). */
14
15
  readonly replace: UsersReplace;
16
+ /** The application's definition of the list, used by the list page and the record's previous / next; without it `userList`. */
17
+ readonly collection: UsersCollection | undefined;
15
18
  /** The records the Activity section names and links, by the server's `record_type`. */
16
19
  readonly activityRecords: Readonly<Record<string, ActivityRecord>>;
17
20
  /** The application's wording of a change; without it the library's. */
@@ -2,6 +2,7 @@ import { type Feature } from "../../app";
2
2
  import type { Permission } from "../../platform";
3
3
  import type { Destination } from "../../router";
4
4
  import type { ProfileSection } from "../profile/profileSections";
5
+ import type { UsersCollection } from "./list";
5
6
  import { type PersonSection } from "./personSections";
6
7
  import type { UsersReplace } from "./replace";
7
8
  import type { ActivityRecord, ChangeWordsFn } from "./words";
@@ -14,7 +15,7 @@ export interface UsersFeatureOptions {
14
15
  signInAs?: Permission | false;
15
16
  /** Names of the application's areas in a person's Activity: the area key the audit records (`crm`) and the i18n key of its name. `all`, `identity` and `other` are the library's. An area without a key reads as "Other". */
16
17
  activityAreas?: Readonly<Record<string, string>>;
17
- /** Sections the application adds to a person's record after the feature's own (their roles); each is a child route `users.record.<path>`. */
18
+ /** Sections the application adds to a person's record (their roles), at the end or, with `after`, behind a built-in one; each is a child route `users.record.<path>`. */
18
19
  sections?: readonly PersonSection[];
19
20
  /** Panels the application adds to "My profile" (mobile phone, dealer and location, preferences), each placed after or before a built-in panel. */
20
21
  profileSections?: readonly ProfileSection[];
@@ -24,6 +25,16 @@ export interface UsersFeatureOptions {
24
25
  path?: `/${string}`;
25
26
  /** Whole screens the application swaps for its own, each keeping the contract documented on `UsersReplace`: the list, the details section, the New user and the Deactivate dialogs. */
26
27
  replace?: UsersReplace;
28
+ /**
29
+ * The one definition of the people list, for the list page and for the previous / next of a person's record, so both ask the
30
+ * server the same question. Default `userList` (the library's). An application whose list filters people by more than the
31
+ * library knows (a dealer, a role) passes its own collection: the very definition its `replace.list` page calls `useCollection`
32
+ * on, since the record replays the state that page wrote into the link. A definition, not a factory: the application builds it
33
+ * once, with its own client; the library's default is built from the platform's.
34
+ *
35
+ * usersFeature({ collection: peopleList, replace: { list: PeopleList } }) // peopleList = defineCollection({ id: "identity.users", …, query: { filters: ["dealer_id", "role"] } })
36
+ */
37
+ collection?: UsersCollection;
27
38
  /** What the Activity section calls and links the records the application knows, by the server's `record_type`; an unknown type reads as the type itself. */
28
39
  activityRecords?: Readonly<Record<string, ActivityRecord>>;
29
40
  /** The application's wording for a change (sentence and details, with links), asked for every row of the Changes section with its `ext`; the library words what it returns nothing for. */
@@ -1,8 +1,19 @@
1
1
  import type { HttpClient } from "../../client";
2
+ import { type CollectionDefinition } from "../../collection";
2
3
  /** The views of the list, as go-core's `GET /v1/iam/users` knows them. */
3
4
  export declare const USER_VIEWS: readonly ["active", "locked", "inactive", "all"];
5
+ /**
6
+ * The definition of the people list that `usersFeature({ collection })` takes: any collection of people, with the sorts and
7
+ * filters the application's server accepts. Its rows must carry what the screens read of a `UserRow`.
8
+ */
9
+ export type UsersCollection = CollectionDefinition<any, any, any, any>;
4
10
  /**
5
11
  * The list of people, one definition for the list page and for the previous / next of a person's record, so both ask
6
12
  * the server the same question. The sorts and views are the ones go-core accepts.
7
13
  */
8
- export declare function userList(http: HttpClient): import("../../collection").CollectionDefinition<import("..").UserRow, "name" | "email" | "login" | "created_at", "last_sign_in", "inactive" | "all" | "locked" | "active", Readonly<Record<string, unknown>>>;
14
+ export declare function userList(http: HttpClient): CollectionDefinition<import("..").UserRow, "name" | "email" | "login" | "created_at", "last_sign_in", "inactive" | "all" | "locked" | "active", Readonly<Record<string, unknown>>>;
15
+ /**
16
+ * The definition the users screens ask the list with: the application's (`usersFeature({ collection })`) or `userList`. The list
17
+ * page and the previous / next of a record both call it, so they ask the server the same question.
18
+ */
19
+ export declare function useUserList(): ReturnType<typeof userList>;
@@ -2,15 +2,21 @@ import { type Component } from "vue";
2
2
  import type { RouteRecordRaw } from "vue-router";
3
3
  import type { AccessRequirement, RouteSection } from "../../router";
4
4
  import type { UserDetail } from "../../modules/identity/entities";
5
+ /** The paths of the sections the feature's own record has, in order; what `PersonSection.after` can name. */
6
+ export declare const PERSON_SECTIONS: readonly ["general", "signin", "sessions", "signins", "changes", "activity"];
7
+ export type BuiltInPersonSection = (typeof PERSON_SECTIONS)[number];
5
8
  /**
6
- * A section the application adds to a person's record (their roles, say), listed after the feature's own. The component
7
- * gets what `props` makes of the loaded person; `meta` is the section's route meta (its label, icon and `access`).
9
+ * A section the application adds to a person's record (their roles, say). The component gets what `props` makes of the loaded
10
+ * person; `meta` is the section's route meta (its label, icon and `access`). It is listed after the feature's own, or, with
11
+ * `after`, right behind one of them and in that one's group (`meta.section.groupKey` is then the group's):
8
12
  *
9
- * usersFeature({ sections: [{ path: "roles", component: PersonAccess, props: (p) => ({ subject: { kind: "user", id: p.id }, name: p.name }), meta: personRolesSection }] })
13
+ * usersFeature({ sections: [{ path: "roles", after: "signin", component: PersonAccess, props: (p) => ({ subject: { kind: "user", id: p.id }, name: p.name }), meta: personRolesSection }] })
10
14
  */
11
15
  export interface PersonSection {
12
16
  /** The child route's path under `/users/:id/` and its name suffix (`users.record.<path>`): one lowercase word. */
13
17
  readonly path: string;
18
+ /** Places the section right after this built-in one, in its group (Sign-in is in "Access", so a section after it is too). Several after the same one keep their order. Without it: at the end. */
19
+ readonly after?: BuiltInPersonSection;
14
20
  readonly component: Component;
15
21
  readonly props?: (person: UserDetail) => Record<string, unknown>;
16
22
  readonly meta: {
@@ -18,5 +24,8 @@ export interface PersonSection {
18
24
  readonly section: RouteSection;
19
25
  };
20
26
  }
21
- /** The child route of the record for an extra section. */
22
- export declare function personSectionRoute(section: PersonSection): RouteRecordRaw;
27
+ /**
28
+ * The record's children with the application's sections in place: behind the built-in one they name, in its group, or at the
29
+ * end. A name that is not a built-in section is a start-up error that lists the valid ones.
30
+ */
31
+ export declare function withPersonSections(children: readonly RouteRecordRaw[], sections: readonly PersonSection[]): RouteRecordRaw[];
@@ -1,4 +1,4 @@
1
- import { h as t, j as i, k as r, l as n, i as a } from "../index-DUs7WSz-.js";
1
+ import { h as t, j as i, k as r, l as n, i as a } from "../index-kEHY7hcG.js";
2
2
  export {
3
3
  t as MAX_REPORTS_PER_SESSION,
4
4
  i as clientErrorReporter,
@@ -135,9 +135,9 @@ function Me(n = ee().http, t = W()) {
135
135
  return { state: $(e), hash: $(i), busy: $(a), inspect: c, enable: u, disable: g };
136
136
  }
137
137
  const Ne = "events.deadletter:view", $t = "events.deadletter:retry", Y = te({
138
- index: { name: "events.deadletters", path: "/events/dead-letters", component: () => import("./DeadLetters-BP03yC4R.js"), meta: { access: Ne, titleKey: "core.notifications.dead_letters.title" } }
138
+ index: { name: "events.deadletters", path: "/events/dead-letters", component: () => import("./DeadLetters-DnA7LP1w.js"), meta: { access: Ne, titleKey: "core.notifications.dead_letters.title" } }
139
139
  }), j = te({
140
- index: { name: "notifications.settings", path: "/profile/notifications", component: () => import("./SettingsPage-DUhMsYBf.js"), meta: { titleKey: "core.notifications.settings.title" } }
140
+ index: { name: "notifications.settings", path: "/profile/notifications", component: () => import("./SettingsPage-BXPWATYU.js"), meta: { titleKey: "core.notifications.settings.title" } }
141
141
  }), Oe = /* @__PURE__ */ q({
142
142
  __name: "SettingsMenuItem",
143
143
  setup(n) {