@wssto2/vue-core 0.4.28 → 0.5.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 +77 -0
- package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-J5HoyGNJ.js → AccessGate.vue_vue_type_script_setup_true_lang-DZ9GcLC1.js} +1 -1
- package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-QPvYudWc.js → ActionRow.vue_vue_type_script_setup_true_lang-BCgKzUvG.js} +1 -1
- package/dist/{Activity-BWkVX1Nx.js → Activity-dpY2kIs2.js} +7 -7
- package/dist/{Changes-MG77TDwz.js → Changes-CL8F1w8q.js} +6 -6
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-Bnpv9TEj.js → CollectionPage.vue_vue_type_script_setup_true_lang-l-e-6WeS.js} +4 -4
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-CpuH0WTl.js → DateField.vue_vue_type_script_setup_true_lang-DRuWzSaX.js} +1 -1
- package/dist/{DeadLetters-CkDE71B3.js → DeadLetters-BZLyL5lR.js} +7 -7
- package/dist/{FormErrors.vue_vue_type_script_setup_true_lang-DGOSc-PS.js → FormErrors.vue_vue_type_script_setup_true_lang-D7edzNTL.js} +2 -2
- package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-DSwSRsA5.js → FormGroup.vue_vue_type_script_setup_true_lang-BPchlRCl.js} +2 -2
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-BUrYkjmF.js → FormView.vue_vue_type_script_setup_true_lang-CPSYV7iQ.js} +2 -2
- package/dist/{General-UTBVEXbN.js → General-mrVzi-5R.js} +10 -10
- package/dist/MenuButton.vue_vue_type_script_setup_true_lang-AGbN9r5q.js +28 -0
- package/dist/{NewRolePage-B7DwFWPk.js → NewRolePage-B2DItwvf.js} +3 -3
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-DaE5BLm4.js → NumberField.vue_vue_type_script_setup_true_lang-ButMV_sf.js} +1 -1
- package/dist/ProfilePage-EiTIYzZ5.js +764 -0
- package/dist/RoleEditor.vue_vue_type_script_setup_true_lang-BqqilJGF.js +325 -0
- package/dist/RolePage-jMHAt9y8.js +314 -0
- package/dist/{RolesPage-B5RwSZ89.js → RolesPage-B9GaVQBx.js} +6 -6
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-Dmv6TpCi.js → SectionNavigator.vue_vue_type_script_setup_true_lang-Ci04hApd.js} +1 -1
- package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-Dg-_ZjgR.js → SegmentedField.vue_vue_type_script_setup_true_lang-BwyMvkis.js} +1 -1
- package/dist/{SelectField.vue_vue_type_script_setup_true_lang-C3FbRQW7.js → SelectField.vue_vue_type_script_setup_true_lang-BzQC1qDQ.js} +11 -12
- package/dist/SessionList.vue_vue_type_script_setup_true_lang-DhoTd5D7.js +133 -0
- package/dist/{Sessions-DWj2OGo0.js → Sessions-CHLokZ9e.js} +5 -5
- package/dist/SettingsPage-CudoKdXm.js +632 -0
- package/dist/{SignIn-COThB9XN.js → SignIn-ypRvdmjg.js} +7 -7
- package/dist/{SignInPage-CdzgSvRm.js → SignInPage-CbPeKlAo.js} +4 -4
- package/dist/SignIns-BApzbGq-.js +121 -0
- package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-ALvJisiP.js → SwitchField.vue_vue_type_script_setup_true_lang-D_-HACqT.js} +1 -1
- package/dist/{TextField.vue_vue_type_script_setup_true_lang-CP2WeU36.js → TextField.vue_vue_type_script_setup_true_lang-DTAQPbW0.js} +2 -2
- package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-BJ4__cvJ.js → TextareaField.vue_vue_type_script_setup_true_lang-DsjK2C9T.js} +1 -1
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-DBxKAWRo.js → TimeField.vue_vue_type_script_setup_true_lang-Cz7KhUqt.js} +1 -1
- package/dist/{UserRecord-BWMnXz4q.js → UserRecord-BCTaBajE.js} +13 -13
- package/dist/{UsersList-Chq8yM5C.js → UsersList-CqSK3cQL.js} +9 -9
- package/dist/access/RoleCompareDialog.vue.d.ts +1 -1
- package/dist/access/RoleEditor.vue.d.ts +2 -0
- package/dist/access/constraints.d.ts +28 -0
- package/dist/access/context.d.ts +5 -0
- package/dist/access/feature.d.ts +17 -0
- package/dist/access/index.d.ts +3 -1
- package/dist/access/index.js +11 -9
- package/dist/access/refusals.d.ts +20 -2
- package/dist/app/index.js +118 -116
- package/dist/app/keepAlive.d.ts +4 -8
- package/dist/client/index.js +19 -11
- package/dist/{client-k9euDWF4.js → client-BHPFfBj3.js} +20 -20
- package/dist/collection/index.js +3 -3
- package/dist/content/index.js +66 -37
- package/dist/{contributions-BVBZP5Jb.js → contributions-fx5q5n1u.js} +1 -1
- package/dist/{describeError-B-NMa--w.js → describeError-BqGAUZgX.js} +1 -1
- package/dist/{error-CD7x0Jrz.js → error-Bb_dr_Ay.js} +2 -2
- package/dist/{fieldMessages-6HVzSDqG.js → fieldMessages-DTXpWnBd.js} +7 -7
- package/dist/form/index.js +1235 -1412
- package/dist/{guards-BJZjc3FZ.js → guards-D4mXf_2X.js} +1 -1
- package/dist/{http-BFfkA7gN.js → http-CdQowFlW.js} +1 -1
- package/dist/i18n/index.d.ts +2 -2
- package/dist/i18n/index.js +30 -30
- package/dist/identity/index.d.ts +3 -1
- package/dist/identity/index.js +7 -6
- package/dist/identity/profile/DetailsFields.vue.d.ts +8 -0
- package/dist/identity/profile/{DetailsPanel.vue.d.ts → DetailsGroup.vue.d.ts} +4 -1
- package/dist/identity/profile/{EmailPanel.vue.d.ts → EmailGroup.vue.d.ts} +1 -1
- package/dist/identity/profile/SignInsGroup.vue.d.ts +2 -0
- package/dist/identity/profile/profileSections.d.ts +37 -0
- package/dist/identity/session.d.ts +10 -7
- package/dist/identity/shared/SignInList.vue.d.ts +22 -0
- package/dist/identity/shared/deviceLabel.d.ts +7 -0
- package/dist/identity/useReturnToOwnAccount.d.ts +10 -0
- package/dist/identity/users/context.d.ts +3 -0
- package/dist/identity/users/feature.d.ts +3 -0
- package/dist/index-BTRv8mcf.js +630 -0
- package/dist/index-VPzJJN6Z.js +745 -0
- package/dist/index-auJqVMWC.js +478 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/keepAlive-z3IRFkQq.js +46 -0
- package/dist/modules/notification/entities.d.ts +19 -0
- package/dist/modules/notification/routes.d.ts +25 -1
- package/dist/modules/notification/schemas.d.ts +24 -0
- package/dist/{navigation-DpcDF0rX.js → navigation-Bc5EQ_Si.js} +1 -1
- package/dist/{neighbors-RVQ4O3Qv.js → neighbors-Bv6vnWlW.js} +22 -22
- package/dist/notifications/context.d.ts +24 -1
- package/dist/notifications/feature.d.ts +10 -1
- package/dist/notifications/index.d.ts +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/notifications/push/DevicesSection.vue.d.ts +12 -0
- package/dist/notifications/push/ThisDeviceSection.vue.d.ts +15 -0
- package/dist/notifications/push/browser.d.ts +40 -0
- package/dist/notifications/push/devices.d.ts +15 -0
- package/dist/notifications/push/thisDevice.d.ts +28 -0
- package/dist/notifications/settings/ChannelsSection.vue.d.ts +16 -0
- package/dist/notifications/settings/{QuietHoursPanel.vue.d.ts → QuietHoursSection.vue.d.ts} +3 -1
- package/dist/notifications/settings/SettingsBody.vue.d.ts +17 -0
- package/dist/notifications/settings/settings.d.ts +4 -3
- package/dist/notifications/settings/state.d.ts +4 -2
- package/dist/options-g8RwEhBk.js +366 -0
- package/dist/overlay/index.js +37 -59
- package/dist/page/index.js +1 -1
- package/dist/phone/index.js +10 -11
- package/dist/platform/index.js +3 -3
- package/dist/platform/platform.d.ts +7 -2
- package/dist/platform/session.d.ts +17 -0
- package/dist/platform-Dx6STiwY.js +283 -0
- package/dist/push-worker/index.d.ts +91 -0
- package/dist/push-worker/index.js +54 -0
- package/dist/resource/index.js +1 -1
- package/dist/{routeResource-DlTsGTg_.js → routeResource-CcYA75T2.js} +2 -2
- package/dist/router/index.js +3 -3
- package/dist/{sections-CeZl-Jxg.js → sections-B0HxIOC2.js} +1 -1
- package/dist/shell/index.js +3 -3
- package/dist/signInEvents-DWShrJox.js +30 -0
- package/dist/state/index.js +1 -1
- package/dist/{status-dGvfh1TP.js → status-BUFELJz2.js} +2 -2
- package/dist/styles.css +1 -1
- package/dist/{suggestions-DHJFKB26.js → suggestions-CfFTHi8y.js} +2 -2
- package/dist/testing/index.js +1 -1
- package/dist/{useCommand-Cj-APj-P.js → useCommand-CtqheKUv.js} +2 -2
- package/dist/useGroupSheet-ATvc0IiM.js +278 -0
- package/dist/{useLoad-M7V-AVwR.js → useLoad-W4tfxmm5.js} +1 -1
- package/dist/{useResourceForm-tGYTfKhH.js → useResourceForm-CJfl8rj_.js} +1 -1
- package/package.json +6 -2
- package/dist/KeyValue.vue_vue_type_script_setup_true_lang-wcZcvnow.js +0 -35
- package/dist/OtpInput.vue_vue_type_script_setup_true_lang-gp4FfWAH.js +0 -95
- package/dist/PanelActions.vue_vue_type_script_setup_true_lang-E9VdIGkf.js +0 -46
- package/dist/ProfilePage-C8VhiKIh.js +0 -654
- package/dist/RoleEditor.vue_vue_type_script_setup_true_lang-DRHmjA9w.js +0 -300
- package/dist/RolePage-ODFu68Ce.js +0 -315
- package/dist/SessionList.vue_vue_type_script_setup_true_lang-D5qm77Zo.js +0 -111
- package/dist/SettingsPage-C3fPSmi7.js +0 -255
- package/dist/SignInTable.vue_vue_type_script_setup_true_lang-Bs0yTi2E.js +0 -79
- package/dist/SignIns-cztICmqt.js +0 -66
- package/dist/control-B4SdblL6.js +0 -350
- package/dist/identity/profile/PanelActions.vue.d.ts +0 -17
- package/dist/index-BhtJR4c_.js +0 -459
- package/dist/index-C3E6DcO0.js +0 -706
- package/dist/index-sTBBHqNG.js +0 -504
- package/dist/keepAlive-CDvMQlcJ.js +0 -49
- package/dist/notifications/settings/EmailPanel.vue.d.ts +0 -14
- package/dist/options-Ba_0uLWN.js +0 -18
- package/dist/platform-PZpUkkMS.js +0 -268
- package/dist/route-goWMxDUN.js +0 -13
- package/dist/transport-BnP7WC0Y.js +0 -4
- /package/dist/identity/{profile/PasswordPanel.vue.d.ts → ReturnMenuItem.vue.d.ts} +0 -0
- /package/dist/identity/profile/{SessionsPanel.vue.d.ts → PasswordGroup.vue.d.ts} +0 -0
- /package/dist/identity/profile/{SignInsPanel.vue.d.ts → SessionsGroup.vue.d.ts} +0 -0
package/dist/identity/index.d.ts
CHANGED
|
@@ -3,13 +3,15 @@ export type * as Inputs from "../modules/identity/schemas";
|
|
|
3
3
|
export { identityRoutes } from "../modules/identity/routes";
|
|
4
4
|
export { identityFeature } from "./feature";
|
|
5
5
|
export type { IdentityFeatureOptions } from "./feature";
|
|
6
|
-
export { identityPlatform, identitySessionAdapter
|
|
6
|
+
export { identityPlatform, identitySessionAdapter } from "./session";
|
|
7
7
|
export type { IdentityPlatformOptions } from "./session";
|
|
8
8
|
export { usersFeature } from "./users/feature";
|
|
9
9
|
export type { UsersFeatureOptions } from "./users/feature";
|
|
10
10
|
export type { PersonSection } from "./users/personSections";
|
|
11
|
+
export type { ProfilePanel, ProfileSection } from "./profile/profileSections";
|
|
11
12
|
export { profileRoutes } from "./profile/routes";
|
|
12
13
|
export { usersRoutes } from "./users/routes";
|
|
14
|
+
export { default as ActionRow } from "./shared/ActionRow.vue";
|
|
13
15
|
export { default as SignInAsButton } from "./SignInAsButton.vue";
|
|
14
16
|
export { isSessionEnded, lockedUntil, returnToOwnAccount, signIn, signInAs } from "./signIn";
|
|
15
17
|
export { parseIdentityUser } from "./user";
|
package/dist/identity/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { _ as t, h as n, j as a, i, k as o, d as r, l as d, m as u, n as
|
|
1
|
+
import { _ as t, h as n, j as a, i, k as o, d as r, l as d, m as u, n as f, r as l, s as p, o as y, q as A, f as c } from "../index-auJqVMWC.js";
|
|
2
|
+
import { _ as I } from "../ActionRow.vue_vue_type_script_setup_true_lang-BCgKzUvG.js";
|
|
2
3
|
export {
|
|
4
|
+
I as ActionRow,
|
|
3
5
|
t as SignInAsButton,
|
|
4
6
|
n as identityFeature,
|
|
5
7
|
a as identityPlatform,
|
|
@@ -8,11 +10,10 @@ export {
|
|
|
8
10
|
r as isSessionEnded,
|
|
9
11
|
d as lockedUntil,
|
|
10
12
|
u as parseIdentityUser,
|
|
11
|
-
|
|
12
|
-
l as
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
p as signInAs,
|
|
13
|
+
f as profileRoutes,
|
|
14
|
+
l as returnToOwnAccount,
|
|
15
|
+
p as signIn,
|
|
16
|
+
y as signInAs,
|
|
16
17
|
A as usersFeature,
|
|
17
18
|
c as usersRoutes
|
|
18
19
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type FieldBinding } from "../../form";
|
|
2
|
+
/** The details group, written once: the page reads it, and the sheet shows this same markup with its group alone. */
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
bind: (field: "name" | "phone") => FieldBinding<string>;
|
|
5
|
+
login: string;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
export default _default;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { ProfileResponse } from "../../modules/identity/entities";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* The person's own name and phone, read on the page and changed in a sheet (one save, the page has none). The username is
|
|
4
|
+
* shown with its note, never edited here (an administrator changes it).
|
|
5
|
+
*/
|
|
3
6
|
type __VLS_Props = {
|
|
4
7
|
profile: ProfileResponse;
|
|
5
8
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ProfileResponse } from "../../modules/identity/entities";
|
|
2
|
-
/** The current address
|
|
2
|
+
/** The current address with "Change", and below it a change that waits for its code, to resume or cancel. */
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
profile: ProfileResponse;
|
|
5
5
|
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Component } from "vue";
|
|
2
|
+
import type { ProfileResponse } from "../../modules/identity/entities";
|
|
3
|
+
/** The groups "My profile" ships, in page order, by the id a section positions itself against. */
|
|
4
|
+
export declare const PROFILE_PANELS: readonly ["details", "email", "password", "sessions", "signins"];
|
|
5
|
+
export type ProfilePanel = (typeof PROFILE_PANELS)[number];
|
|
6
|
+
/**
|
|
7
|
+
* A group the application adds to "My profile" (its mobile phone, dealer and location, preferences). The component renders
|
|
8
|
+
* its own `FormGroup`s (rows, a header, a footer; `ActionRow` for a row that opens something), so it reads like the built-in
|
|
9
|
+
* ones; it gets the loaded `profile` as a prop and may emit `updated` with a changed `ProfileResponse`, as they do. Place it
|
|
10
|
+
* `after` or `before` one of the built-in groups (the default is the end of the page); sections with the same position keep
|
|
11
|
+
* the order they were given in.
|
|
12
|
+
*
|
|
13
|
+
* usersFeature({ profileSections: [{ id: "preferences", component: PreferencesGroup, after: "password", visible: (p) => p.id !== 0 }] })
|
|
14
|
+
*/
|
|
15
|
+
export type ProfileSection = {
|
|
16
|
+
/** Unique among the sections, one lowercase word (it is the section's `data-profile-section`). */
|
|
17
|
+
readonly id: string;
|
|
18
|
+
readonly component: Component;
|
|
19
|
+
/** Whether to show it for this person; default always. */
|
|
20
|
+
readonly visible?: (profile: ProfileResponse) => boolean;
|
|
21
|
+
} & ({
|
|
22
|
+
readonly after?: ProfilePanel;
|
|
23
|
+
readonly before?: never;
|
|
24
|
+
} | {
|
|
25
|
+
readonly before?: ProfilePanel;
|
|
26
|
+
readonly after?: never;
|
|
27
|
+
});
|
|
28
|
+
/** One entry of the page: a built-in group or an application's section. */
|
|
29
|
+
export type ProfileEntry = {
|
|
30
|
+
readonly kind: "panel";
|
|
31
|
+
readonly id: ProfilePanel;
|
|
32
|
+
} | {
|
|
33
|
+
readonly kind: "section";
|
|
34
|
+
readonly section: ProfileSection;
|
|
35
|
+
};
|
|
36
|
+
/** The page's groups in order, with the visible sections slotted in. */
|
|
37
|
+
export declare function layoutProfile(sections: readonly ProfileSection[], profile: ProfileResponse): readonly ProfileEntry[];
|
|
@@ -8,7 +8,14 @@ import { type IdentityUser } from "./user";
|
|
|
8
8
|
*/
|
|
9
9
|
export declare function identitySessionAdapter<U extends SessionUser>(http: HttpClient, parseUser: UserParser<U>): SessionAdapter<U>;
|
|
10
10
|
/** What `createPlatform` is given to run on go-core's identity module. */
|
|
11
|
-
export type IdentityPlatformOptions<U extends SessionUser> = Required<Pick<PlatformOptions<U, BootstrapConfig>, "session" | "renewSession"
|
|
11
|
+
export type IdentityPlatformOptions<U extends SessionUser> = Required<Pick<PlatformOptions<U, BootstrapConfig>, "session" | "renewSession">> & Pick<PlatformOptions<U, BootstrapConfig>, "renewable">;
|
|
12
|
+
/** What `identityPlatform` takes. */
|
|
13
|
+
export interface IdentityPlatformInput<U extends SessionUser> {
|
|
14
|
+
/** The application's own user projection; see `identityPlatform`. */
|
|
15
|
+
parseUser?: UserParser<U>;
|
|
16
|
+
/** False while the session has no refresh token (an embed bearer session): nothing renews it, a 401 ends it. See `PlatformOptions.renewable`. */
|
|
17
|
+
renewable?: () => boolean;
|
|
18
|
+
}
|
|
12
19
|
/**
|
|
13
20
|
* The platform options that wire the session to go-core's identity routes: reading it (`/auth/me`, with one
|
|
14
21
|
* refresh when the access token ran out), ending it, and renewing it when a request is answered 401.
|
|
@@ -18,13 +25,9 @@ export type IdentityPlatformOptions<U extends SessionUser> = Required<Pick<Platf
|
|
|
18
25
|
* The user is go-core's default projection (`IdentityUser`); an application that projects its own passes
|
|
19
26
|
* `parseUser`, which must keep the `id` and the `login` (the prompt for an expired session shows it).
|
|
20
27
|
*/
|
|
21
|
-
export declare function identityPlatform(): IdentityPlatformOptions<IdentityUser>;
|
|
28
|
+
export declare function identityPlatform(options?: Omit<IdentityPlatformInput<IdentityUser>, "parseUser">): IdentityPlatformOptions<IdentityUser>;
|
|
22
29
|
export declare function identityPlatform<U extends SessionUser & {
|
|
23
30
|
readonly login: string;
|
|
24
|
-
}>(options: {
|
|
31
|
+
}>(options: IdentityPlatformInput<U> & {
|
|
25
32
|
parseUser: UserParser<U>;
|
|
26
33
|
}): IdentityPlatformOptions<U>;
|
|
27
|
-
/** Renews the tokens, for `keepSessionAlive({ renew })`: the session is read again afterwards. */
|
|
28
|
-
export declare const renewIdentityTokens: (platform: {
|
|
29
|
-
readonly http: HttpClient;
|
|
30
|
-
}) => Promise<void>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { SignInRow } from "../../modules/identity/entities";
|
|
2
|
+
/**
|
|
3
|
+
* A person's sign-in history as a grouped list, one row per sign-in: the device as sessions name it ("Chrome · Linux"), when
|
|
4
|
+
* and from which address, and what happened as a badge (with who did it, for the events somebody else does). The raw
|
|
5
|
+
* User-Agent is the row's tooltip.
|
|
6
|
+
*/
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
rows: readonly SignInRow[];
|
|
9
|
+
header?: string;
|
|
10
|
+
footer?: string;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_Slots = {
|
|
13
|
+
"header-trailing"?: () => unknown;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* "Browser · OS" from a User-Agent, as go-core names a session's device (`account.DeviceLabel`): Chrome, Safari, Edge or
|
|
3
|
+
* Firefox on macOS, Windows, iPhone, iPad, Android or Linux; anything else is the raw string, trimmed to 80 characters.
|
|
4
|
+
* Sign-in rows carry the raw User-Agent (go-core labels only sessions), so the screens that list them label it here; a
|
|
5
|
+
* string that already is a label comes out unchanged.
|
|
6
|
+
*/
|
|
7
|
+
export declare function deviceLabel(userAgent: string): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Leaving an impersonation, for the banner and the account menu row: `impersonating` says whether the session is somebody
|
|
3
|
+
* else's, `leave()` returns to one's own account and lands on the home page (what was on screen belonged to the other
|
|
4
|
+
* person). A refusal is said in a toast and the session is read again, since the impersonation may have ended elsewhere.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useReturnToOwnAccount(): {
|
|
7
|
+
impersonating: import("vue").ComputedRef<boolean>;
|
|
8
|
+
returning: import("vue").Ref<boolean, boolean>;
|
|
9
|
+
leave: () => Promise<void>;
|
|
10
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ProfileSection } from "../profile/profileSections";
|
|
1
2
|
import { type Permission } from "../../platform";
|
|
2
3
|
/** What the screens of `usersFeature` need from the feature that installed them. */
|
|
3
4
|
export interface UsersContext {
|
|
@@ -5,5 +6,7 @@ export interface UsersContext {
|
|
|
5
6
|
readonly signInAs: Permission | false;
|
|
6
7
|
/** The application's areas for the Activity section: an area key of the server's audit, and the i18n key that names it. */
|
|
7
8
|
readonly activityAreas: Readonly<Record<string, string>>;
|
|
9
|
+
/** The panels the application adds to "My profile". */
|
|
10
|
+
readonly profileSections: readonly ProfileSection[];
|
|
8
11
|
}
|
|
9
12
|
export declare const usersContextKey: import("vue").InjectionKey<UsersContext>, useUsersContext: () => UsersContext;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type Feature } from "../../app";
|
|
2
2
|
import type { Permission } from "../../platform";
|
|
3
3
|
import type { Destination } from "../../router";
|
|
4
|
+
import type { ProfileSection } from "../profile/profileSections";
|
|
4
5
|
import { type PersonSection } from "./personSections";
|
|
5
6
|
export interface UsersFeatureOptions {
|
|
6
7
|
/** The users list and a person's record (`/users`), for whoever holds `iam.user:view`. Default true. */
|
|
@@ -13,6 +14,8 @@ export interface UsersFeatureOptions {
|
|
|
13
14
|
activityAreas?: Readonly<Record<string, string>>;
|
|
14
15
|
/** Sections the application adds to a person's record after the feature's own (their roles); each is a child route `users.record.<path>`. */
|
|
15
16
|
sections?: readonly PersonSection[];
|
|
17
|
+
/** Panels the application adds to "My profile" (mobile phone, dealer and location, preferences), each placed after or before a built-in panel. */
|
|
18
|
+
profileSections?: readonly ProfileSection[];
|
|
16
19
|
/** The destination of the backend's menu that opens the users list. Without it the application binds the list itself. */
|
|
17
20
|
destination?: Destination;
|
|
18
21
|
}
|