@webx-ui/module-auth 0.5.4 → 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.
@@ -0,0 +1,20 @@
1
+ import { Component } from 'vue';
2
+ /**
3
+ * Somebody editing themselves.
4
+ *
5
+ * Not `AdminDialog` with the fields taken away. What a person may change about themselves and
6
+ * what an administrator may change about them are different lists, and the difference is the
7
+ * whole point: roles, super, active and the sign-in address are not here, which is what makes
8
+ * this reachable by everybody rather than by whoever holds `admins.manage`.
9
+ *
10
+ * The address is shown and not editable: changing where somebody signs in has to be proved at
11
+ * the new address first, and nothing here can do that yet.
12
+ */
13
+ type __VLS_Props = {
14
+ /** The field to pick the photograph with — `WxMediaField` in a panel with the library. */
15
+ avatarField?: Component;
16
+ };
17
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
18
+ avatarField: Component;
19
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
20
+ export default _default;
@@ -1,3 +1,4 @@
1
+ import { Component } from 'vue';
1
2
  import { AvatarResolver } from './session';
2
3
  /**
3
4
  * The corner of the header: who this is, which language they read the panel in, and the way
@@ -11,9 +12,21 @@ type __VLS_Props = {
11
12
  signOutLabel?: string;
12
13
  /** Overrides the resolver `auth()` was given. Without either, initials. */
13
14
  resolveAvatar?: AvatarResolver;
15
+ /**
16
+ * The field to pick a photograph with, handed down from the plugin. Without one the
17
+ * profile still opens — a panel with no library edits everything else about a person.
18
+ */
19
+ avatarField?: Component;
20
+ /**
21
+ * There is room beside the face for a name. The shell says so: the foot of an open
22
+ * sidebar and the foot of the drawer have it, the icon rail and a phone's bar do not.
23
+ */
24
+ expanded?: boolean;
14
25
  };
15
26
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
27
+ avatarField: Component;
16
28
  resolveAvatar: AvatarResolver;
29
+ expanded: boolean;
17
30
  signOutLabel: string;
18
31
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
19
32
  export default _default;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { Component } from 'vue';
1
2
  import { AdminPlugin } from '@webx-ui/module-admin';
2
3
  import { AvatarResolver } from './session';
3
4
  export interface AuthOptions {
@@ -12,6 +13,12 @@ export interface AuthOptions {
12
13
  * that knows both are installed.
13
14
  */
14
15
  resolveAvatar?: AvatarResolver;
16
+ /**
17
+ * The field that picks a photograph — `WxMediaField` in a panel with the library. Handed
18
+ * in for the same reason as the resolver, and used by the profile dialog in the corner
19
+ * menu. Without it a person edits everything about themselves except their picture.
20
+ */
21
+ avatarField?: Component;
15
22
  }
16
23
  /**
17
24
  * Signing in, as a plugin rather than a section: it owns a route and a guard, and it has no
@@ -27,7 +34,8 @@ export { selectAdmin, selectAdmins, type AdminPickerOptions } from './selectAdmi
27
34
  export { default as WxAdminsPage } from './AdminsPage';
28
35
  export { default as WxAdminList } from './AdminList';
29
36
  export type { Admin, AdminInput, AdminPage, AdminQuery, AdminRole, Role } from './types';
30
- export { createAuthSession, provideAuth, useAuth, authKey, avatarResolverKey } from './session';
37
+ export { createAuthSession, provideAuth, useAuth, authKey, avatarFieldKey, avatarResolverKey, type ProfileInput, } from './session';
38
+ export { default as WxProfileDialog } from './ProfileDialog';
31
39
  export type { AuthSession, AvatarResolver, Credentials } from './session';
32
40
  export { default as WxLoginCard } from './LoginCard';
33
41
  export { default as WxUserMenu } from './UserMenu';