@molecule/app-ui-angular 1.0.5 → 1.1.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/README.md +11742 -1145
- package/dist/components/accordion.component.d.ts +114 -0
- package/dist/components/accordion.component.d.ts.map +1 -0
- package/dist/components/accordion.component.js +286 -0
- package/dist/components/accordion.component.js.map +1 -0
- package/dist/components/alert.component.d.ts +81 -37
- package/dist/components/alert.component.d.ts.map +1 -1
- package/dist/components/alert.component.js +232 -146
- package/dist/components/alert.component.js.map +1 -1
- package/dist/components/auth-guard.component.d.ts +94 -0
- package/dist/components/auth-guard.component.d.ts.map +1 -0
- package/dist/components/auth-guard.component.js +212 -0
- package/dist/components/auth-guard.component.js.map +1 -0
- package/dist/components/avatar.component.d.ts +97 -0
- package/dist/components/avatar.component.d.ts.map +1 -0
- package/dist/components/avatar.component.js +216 -0
- package/dist/components/avatar.component.js.map +1 -0
- package/dist/components/badge.component.d.ts +27 -12
- package/dist/components/badge.component.d.ts.map +1 -1
- package/dist/components/badge.component.js +47 -47
- package/dist/components/badge.component.js.map +1 -1
- package/dist/components/button.component.d.ts +96 -14
- package/dist/components/button.component.d.ts.map +1 -1
- package/dist/components/button.component.js +232 -87
- package/dist/components/button.component.js.map +1 -1
- package/dist/components/card.component.d.ts +135 -0
- package/dist/components/card.component.d.ts.map +1 -0
- package/dist/components/card.component.js +291 -0
- package/dist/components/card.component.js.map +1 -0
- package/dist/components/checkbox.component.d.ts +102 -29
- package/dist/components/checkbox.component.d.ts.map +1 -1
- package/dist/components/checkbox.component.js +222 -113
- package/dist/components/checkbox.component.js.map +1 -1
- package/dist/components/confirm-button.component.d.ts +130 -0
- package/dist/components/confirm-button.component.d.ts.map +1 -0
- package/dist/components/confirm-button.component.js +322 -0
- package/dist/components/confirm-button.component.js.map +1 -0
- package/dist/components/confirm-dialog.component.d.ts +60 -0
- package/dist/components/confirm-dialog.component.d.ts.map +1 -0
- package/dist/components/confirm-dialog.component.js +152 -0
- package/dist/components/confirm-dialog.component.js.map +1 -0
- package/dist/components/dropdown.component.d.ts +313 -0
- package/dist/components/dropdown.component.d.ts.map +1 -0
- package/dist/components/dropdown.component.js +919 -0
- package/dist/components/dropdown.component.js.map +1 -0
- package/dist/components/empty-state.component.d.ts +73 -0
- package/dist/components/empty-state.component.d.ts.map +1 -0
- package/dist/components/empty-state.component.js +180 -0
- package/dist/components/empty-state.component.js.map +1 -0
- package/dist/components/floating-input.component.d.ts +86 -0
- package/dist/components/floating-input.component.d.ts.map +1 -0
- package/dist/components/floating-input.component.js +167 -0
- package/dist/components/floating-input.component.js.map +1 -0
- package/dist/components/form-field.component.d.ts +111 -0
- package/dist/components/form-field.component.d.ts.map +1 -0
- package/dist/components/form-field.component.js +300 -0
- package/dist/components/form-field.component.js.map +1 -0
- package/dist/components/form.component.d.ts +77 -0
- package/dist/components/form.component.d.ts.map +1 -0
- package/dist/components/form.component.js +222 -0
- package/dist/components/form.component.js.map +1 -0
- package/dist/components/icon.component.d.ts +85 -0
- package/dist/components/icon.component.d.ts.map +1 -0
- package/dist/components/icon.component.js +187 -0
- package/dist/components/icon.component.js.map +1 -0
- package/dist/components/index.d.ts +49 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +49 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/input.component.d.ts +157 -54
- package/dist/components/input.component.d.ts.map +1 -1
- package/dist/components/input.component.js +437 -222
- package/dist/components/input.component.js.map +1 -1
- package/dist/components/label.component.d.ts +29 -0
- package/dist/components/label.component.d.ts.map +1 -0
- package/dist/components/label.component.js +60 -0
- package/dist/components/label.component.js.map +1 -0
- package/dist/components/language-picker.component.d.ts +124 -0
- package/dist/components/language-picker.component.d.ts.map +1 -0
- package/dist/components/language-picker.component.js +305 -0
- package/dist/components/language-picker.component.js.map +1 -0
- package/dist/components/layout.component.d.ts +167 -0
- package/dist/components/layout.component.d.ts.map +1 -0
- package/dist/components/layout.component.js +364 -0
- package/dist/components/layout.component.js.map +1 -0
- package/dist/components/load-error-banner.component.d.ts +103 -0
- package/dist/components/load-error-banner.component.d.ts.map +1 -0
- package/dist/components/load-error-banner.component.js +263 -0
- package/dist/components/load-error-banner.component.js.map +1 -0
- package/dist/components/modal.component.d.ts +125 -95
- package/dist/components/modal.component.d.ts.map +1 -1
- package/dist/components/modal.component.js +458 -271
- package/dist/components/modal.component.js.map +1 -1
- package/dist/components/molecule/alert.component.d.ts +77 -0
- package/dist/components/molecule/alert.component.d.ts.map +1 -0
- package/dist/components/molecule/alert.component.js +229 -0
- package/dist/components/molecule/alert.component.js.map +1 -0
- package/dist/components/molecule/badge.component.d.ts +27 -0
- package/dist/components/molecule/badge.component.d.ts.map +1 -0
- package/dist/components/molecule/badge.component.js +79 -0
- package/dist/components/molecule/badge.component.js.map +1 -0
- package/dist/components/molecule/button.component.d.ts +38 -0
- package/dist/components/molecule/button.component.d.ts.map +1 -0
- package/dist/components/molecule/button.component.js +137 -0
- package/dist/components/molecule/button.component.js.map +1 -0
- package/dist/components/molecule/checkbox.component.d.ts +53 -0
- package/dist/components/molecule/checkbox.component.d.ts.map +1 -0
- package/dist/components/molecule/checkbox.component.js +166 -0
- package/dist/components/molecule/checkbox.component.js.map +1 -0
- package/dist/components/molecule/index.d.ts +18 -0
- package/dist/components/molecule/index.d.ts.map +1 -0
- package/dist/components/molecule/index.js +18 -0
- package/dist/components/molecule/index.js.map +1 -0
- package/dist/components/molecule/input.component.d.ts +93 -0
- package/dist/components/molecule/input.component.d.ts.map +1 -0
- package/dist/components/molecule/input.component.js +314 -0
- package/dist/components/molecule/input.component.js.map +1 -0
- package/dist/components/molecule/modal.component.d.ts +148 -0
- package/dist/components/molecule/modal.component.d.ts.map +1 -0
- package/dist/components/molecule/modal.component.js +382 -0
- package/dist/components/molecule/modal.component.js.map +1 -0
- package/dist/components/molecule/radio-group.component.d.ts +63 -0
- package/dist/components/molecule/radio-group.component.d.ts.map +1 -0
- package/dist/components/molecule/radio-group.component.js +208 -0
- package/dist/components/molecule/radio-group.component.js.map +1 -0
- package/dist/components/molecule/select.component.d.ts +72 -0
- package/dist/components/molecule/select.component.d.ts.map +1 -0
- package/dist/components/molecule/select.component.js +274 -0
- package/dist/components/molecule/select.component.js.map +1 -0
- package/dist/components/molecule/spinner.component.d.ts +42 -0
- package/dist/components/molecule/spinner.component.d.ts.map +1 -0
- package/dist/components/molecule/spinner.component.js +122 -0
- package/dist/components/molecule/spinner.component.js.map +1 -0
- package/dist/components/molecule/switch.component.d.ts +54 -0
- package/dist/components/molecule/switch.component.d.ts.map +1 -0
- package/dist/components/molecule/switch.component.js +148 -0
- package/dist/components/molecule/switch.component.js.map +1 -0
- package/dist/components/molecule/toast.component.d.ts +98 -0
- package/dist/components/molecule/toast.component.d.ts.map +1 -0
- package/dist/components/molecule/toast.component.js +305 -0
- package/dist/components/molecule/toast.component.js.map +1 -0
- package/dist/components/molecule/tooltip.component.d.ts +77 -0
- package/dist/components/molecule/tooltip.component.d.ts.map +1 -0
- package/dist/components/molecule/tooltip.component.js +316 -0
- package/dist/components/molecule/tooltip.component.js.map +1 -0
- package/dist/components/optimistic-toggle-button.component.d.ts +125 -0
- package/dist/components/optimistic-toggle-button.component.d.ts.map +1 -0
- package/dist/components/optimistic-toggle-button.component.js +296 -0
- package/dist/components/optimistic-toggle-button.component.js.map +1 -0
- package/dist/components/page-header.component.d.ts +77 -0
- package/dist/components/page-header.component.d.ts.map +1 -0
- package/dist/components/page-header.component.js +225 -0
- package/dist/components/page-header.component.js.map +1 -0
- package/dist/components/page-shell.component.d.ts +101 -0
- package/dist/components/page-shell.component.d.ts.map +1 -0
- package/dist/components/page-shell.component.js +221 -0
- package/dist/components/page-shell.component.js.map +1 -0
- package/dist/components/pagination.component.d.ts +137 -0
- package/dist/components/pagination.component.d.ts.map +1 -0
- package/dist/components/pagination.component.js +419 -0
- package/dist/components/pagination.component.js.map +1 -0
- package/dist/components/panel-close.component.d.ts +43 -0
- package/dist/components/panel-close.component.d.ts.map +1 -0
- package/dist/components/panel-close.component.js +75 -0
- package/dist/components/panel-close.component.js.map +1 -0
- package/dist/components/progress.component.d.ts +84 -0
- package/dist/components/progress.component.d.ts.map +1 -0
- package/dist/components/progress.component.js +219 -0
- package/dist/components/progress.component.js.map +1 -0
- package/dist/components/prompt-dialog.component.d.ts +121 -0
- package/dist/components/prompt-dialog.component.d.ts.map +1 -0
- package/dist/components/prompt-dialog.component.js +332 -0
- package/dist/components/prompt-dialog.component.js.map +1 -0
- package/dist/components/radio-group.component.d.ts +66 -34
- package/dist/components/radio-group.component.d.ts.map +1 -1
- package/dist/components/radio-group.component.js +146 -125
- package/dist/components/radio-group.component.js.map +1 -1
- package/dist/components/responsive-app-shell.component.d.ts +408 -0
- package/dist/components/responsive-app-shell.component.d.ts.map +1 -0
- package/dist/components/responsive-app-shell.component.js +1144 -0
- package/dist/components/responsive-app-shell.component.js.map +1 -0
- package/dist/components/select.component.d.ts +135 -38
- package/dist/components/select.component.d.ts.map +1 -1
- package/dist/components/select.component.js +373 -181
- package/dist/components/select.component.js.map +1 -1
- package/dist/components/separator.component.d.ts +39 -0
- package/dist/components/separator.component.d.ts.map +1 -0
- package/dist/components/separator.component.js +73 -0
- package/dist/components/separator.component.js.map +1 -0
- package/dist/components/sidebar-user-card.component.d.ts +106 -0
- package/dist/components/sidebar-user-card.component.d.ts.map +1 -0
- package/dist/components/sidebar-user-card.component.js +277 -0
- package/dist/components/sidebar-user-card.component.js.map +1 -0
- package/dist/components/skeleton.component.d.ts +100 -0
- package/dist/components/skeleton.component.d.ts.map +1 -0
- package/dist/components/skeleton.component.js +214 -0
- package/dist/components/skeleton.component.js.map +1 -0
- package/dist/components/spinner.component.d.ts +36 -19
- package/dist/components/spinner.component.d.ts.map +1 -1
- package/dist/components/spinner.component.js +69 -71
- package/dist/components/spinner.component.js.map +1 -1
- package/dist/components/switch.component.d.ts +72 -29
- package/dist/components/switch.component.d.ts.map +1 -1
- package/dist/components/switch.component.js +163 -91
- package/dist/components/switch.component.js.map +1 -1
- package/dist/components/table.component.d.ts +193 -0
- package/dist/components/table.component.d.ts.map +1 -0
- package/dist/components/table.component.js +550 -0
- package/dist/components/table.component.js.map +1 -0
- package/dist/components/tabs.component.d.ts +140 -0
- package/dist/components/tabs.component.d.ts.map +1 -0
- package/dist/components/tabs.component.js +390 -0
- package/dist/components/tabs.component.js.map +1 -0
- package/dist/components/template-outlet.directive.d.ts +50 -0
- package/dist/components/template-outlet.directive.d.ts.map +1 -0
- package/dist/components/template-outlet.directive.js +81 -0
- package/dist/components/template-outlet.directive.js.map +1 -0
- package/dist/components/textarea.component.d.ts +151 -0
- package/dist/components/textarea.component.d.ts.map +1 -0
- package/dist/components/textarea.component.js +340 -0
- package/dist/components/textarea.component.js.map +1 -0
- package/dist/components/theme-toggle.component.d.ts +58 -0
- package/dist/components/theme-toggle.component.d.ts.map +1 -0
- package/dist/components/theme-toggle.component.js +124 -0
- package/dist/components/theme-toggle.component.js.map +1 -0
- package/dist/components/toast.component.d.ts +237 -49
- package/dist/components/toast.component.d.ts.map +1 -1
- package/dist/components/toast.component.js +636 -201
- package/dist/components/toast.component.js.map +1 -1
- package/dist/components/tooltip.component.d.ts +95 -45
- package/dist/components/tooltip.component.d.ts.map +1 -1
- package/dist/components/tooltip.component.js +372 -221
- package/dist/components/tooltip.component.js.map +1 -1
- package/dist/components/user-menu-popover.component.d.ts +283 -0
- package/dist/components/user-menu-popover.component.d.ts.map +1 -0
- package/dist/components/user-menu-popover.component.js +646 -0
- package/dist/components/user-menu-popover.component.js.map +1 -0
- package/dist/components/user-menu.component.d.ts +95 -0
- package/dist/components/user-menu.component.d.ts.map +1 -0
- package/dist/components/user-menu.component.js +218 -0
- package/dist/components/user-menu.component.js.map +1 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +7 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/use-is-desktop.d.ts +22 -0
- package/dist/hooks/use-is-desktop.d.ts.map +1 -0
- package/dist/hooks/use-is-desktop.js +37 -0
- package/dist/hooks/use-is-desktop.js.map +1 -0
- package/dist/index.d.ts +32 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -17
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utilities/dom-context.d.ts +42 -0
- package/dist/utilities/dom-context.d.ts.map +1 -0
- package/dist/utilities/dom-context.js +66 -0
- package/dist/utilities/dom-context.js.map +1 -0
- package/dist/utilities/focus.d.ts +32 -0
- package/dist/utilities/focus.d.ts.map +1 -0
- package/dist/utilities/focus.js +47 -0
- package/dist/utilities/focus.js.map +1 -0
- package/dist/utilities/form-field-context.d.ts +34 -0
- package/dist/utilities/form-field-context.d.ts.map +1 -0
- package/dist/utilities/form-field-context.js +28 -0
- package/dist/utilities/form-field-context.js.map +1 -0
- package/dist/utilities/form-submit-error.d.ts +17 -0
- package/dist/utilities/form-submit-error.d.ts.map +1 -0
- package/dist/utilities/form-submit-error.js +42 -0
- package/dist/utilities/form-submit-error.js.map +1 -0
- package/dist/utilities/icon-markup.d.ts +17 -0
- package/dist/utilities/icon-markup.d.ts.map +1 -0
- package/dist/utilities/icon-markup.js +46 -0
- package/dist/utilities/icon-markup.js.map +1 -0
- package/dist/utilities/ids.d.ts +15 -0
- package/dist/utilities/ids.d.ts.map +1 -0
- package/dist/utilities/ids.js +19 -0
- package/dist/utilities/ids.js.map +1 -0
- package/dist/utilities/index.d.ts +11 -0
- package/dist/utilities/index.d.ts.map +1 -1
- package/dist/utilities/index.js +11 -0
- package/dist/utilities/index.js.map +1 -1
- package/dist/utilities/initials.d.ts +13 -0
- package/dist/utilities/initials.d.ts.map +1 -0
- package/dist/utilities/initials.js +23 -0
- package/dist/utilities/initials.js.map +1 -0
- package/dist/utilities/node-value.d.ts +31 -0
- package/dist/utilities/node-value.d.ts.map +1 -0
- package/dist/utilities/node-value.js +37 -0
- package/dist/utilities/node-value.js.map +1 -0
- package/dist/utilities/optimistic-value.d.ts +81 -0
- package/dist/utilities/optimistic-value.d.ts.map +1 -0
- package/dist/utilities/optimistic-value.js +154 -0
- package/dist/utilities/optimistic-value.js.map +1 -0
- package/dist/utilities/render-icon.d.ts +77 -7
- package/dist/utilities/render-icon.d.ts.map +1 -1
- package/dist/utilities/render-icon.js +123 -33
- package/dist/utilities/render-icon.js.map +1 -1
- package/dist/utilities/rest-attrs.d.ts +21 -0
- package/dist/utilities/rest-attrs.d.ts.map +1 -0
- package/dist/utilities/rest-attrs.js +37 -0
- package/dist/utilities/rest-attrs.js.map +1 -0
- package/dist/utilities/style.d.ts +23 -0
- package/dist/utilities/style.d.ts.map +1 -0
- package/dist/utilities/style.js +86 -0
- package/dist/utilities/style.js.map +1 -0
- package/package.json +10 -5
|
@@ -0,0 +1,646 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UserMenuPopover family (React parity): an inline, non-modal popover
|
|
3
|
+
* account menu — the root, its trigger, panel and sign-out item, plus the
|
|
4
|
+
* `useUserMenuPopoverClose` hook.
|
|
5
|
+
*
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
import { ChangeDetectorRef, Component, effect, ElementRef, inject, signal, ViewChild, } from '@angular/core';
|
|
9
|
+
import { useAuth, useRouter, useTranslation } from '@molecule/app-angular';
|
|
10
|
+
import { getClassMap } from '@molecule/app-ui';
|
|
11
|
+
import { findDomContext, provideDomContext, removeDomContext } from '../utilities/dom-context.js';
|
|
12
|
+
import { nextInstanceId } from '../utilities/ids.js';
|
|
13
|
+
import { getInitials } from '../utilities/initials.js';
|
|
14
|
+
import { styleText } from '../utilities/style.js';
|
|
15
|
+
import * as i0 from "@angular/core";
|
|
16
|
+
const _c0 = ["*"];
|
|
17
|
+
function UserMenuPopoverTrigger_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
18
|
+
i0.ɵɵdomElementStart(0, "span");
|
|
19
|
+
i0.ɵɵtext(1);
|
|
20
|
+
i0.ɵɵdomElementEnd();
|
|
21
|
+
} if (rf & 2) {
|
|
22
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
23
|
+
i0.ɵɵclassMap(ctx_r0.secondaryClasses());
|
|
24
|
+
i0.ɵɵadvance();
|
|
25
|
+
i0.ɵɵtextInterpolate(ctx);
|
|
26
|
+
} }
|
|
27
|
+
const _c1 = ["panel"];
|
|
28
|
+
function UserMenuPopoverPanel_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
29
|
+
i0.ɵɵdomElementStart(0, "p");
|
|
30
|
+
i0.ɵɵtext(1);
|
|
31
|
+
i0.ɵɵdomElementEnd();
|
|
32
|
+
} if (rf & 2) {
|
|
33
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
34
|
+
i0.ɵɵclassMap(ctx_r0.cm().cn(ctx_r0.cm().textSize("xs"), ctx_r0.cm().textMuted));
|
|
35
|
+
i0.ɵɵadvance();
|
|
36
|
+
i0.ɵɵtextInterpolate(ctx);
|
|
37
|
+
} }
|
|
38
|
+
/**
|
|
39
|
+
* UserMenuPopover root: owns the open state and the auto-dismiss behavior
|
|
40
|
+
* (route change, outside click, Escape) and provides the identity context.
|
|
41
|
+
*/
|
|
42
|
+
export class UserMenuPopover {
|
|
43
|
+
/** Label shown when there is no authenticated user (default `Account`). */
|
|
44
|
+
guestName;
|
|
45
|
+
/** Extra classes composed onto the relative-positioned container. */
|
|
46
|
+
className;
|
|
47
|
+
/** Whether the popover is open. */
|
|
48
|
+
isOpen = signal(false, /* @ts-ignore */
|
|
49
|
+
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
50
|
+
/** The popover's shared id (the normalizer renumbers it). */
|
|
51
|
+
panelId = nextInstanceId();
|
|
52
|
+
/** Auth state (identity defaults). */
|
|
53
|
+
auth = useAuth();
|
|
54
|
+
/**
|
|
55
|
+
* Translation state. Its `t` reads the locale, so the views that render it
|
|
56
|
+
* re-render on a locale switch (the static `t` does not follow a switch).
|
|
57
|
+
*/
|
|
58
|
+
i18n = useTranslation();
|
|
59
|
+
/** Router state: a route change closes the popover. */
|
|
60
|
+
router = useRouter();
|
|
61
|
+
host = inject(ElementRef);
|
|
62
|
+
cdr = inject(ChangeDetectorRef);
|
|
63
|
+
listeners = [];
|
|
64
|
+
openListener = false;
|
|
65
|
+
lastOpen = false;
|
|
66
|
+
lastRoute = null;
|
|
67
|
+
/** Closes the popover on any route change (React's location effect). */
|
|
68
|
+
routeEffect = effect(() => {
|
|
69
|
+
const location = this.router.location();
|
|
70
|
+
const key = `${location.pathname}${location.search}${location.hash ?? ''}`;
|
|
71
|
+
if (this.lastRoute === null) {
|
|
72
|
+
this.lastRoute = key;
|
|
73
|
+
this.isOpen.set(false);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
if (key !== this.lastRoute) {
|
|
77
|
+
this.lastRoute = key;
|
|
78
|
+
this.isOpen.set(false);
|
|
79
|
+
}
|
|
80
|
+
}, /* @ts-ignore */
|
|
81
|
+
...(ngDevMode ? [{ debugName: "routeEffect" }] : /* istanbul ignore next */ []));
|
|
82
|
+
/** Registers the context on the host before any projected child resolves it. */
|
|
83
|
+
constructor() {
|
|
84
|
+
provideDomContext(this.host.nativeElement, new UserMenuPopoverContextValue(this));
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The current class map.
|
|
88
|
+
* @returns The UIClassMap.
|
|
89
|
+
*/
|
|
90
|
+
cm() {
|
|
91
|
+
return getClassMap();
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* The container class list.
|
|
95
|
+
* @returns The class string.
|
|
96
|
+
*/
|
|
97
|
+
classes() {
|
|
98
|
+
return this.cm().cn(this.cm().position('relative'), this.className);
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* The resolved display name (auth name, then email, then the guest label).
|
|
102
|
+
* @returns The name.
|
|
103
|
+
*/
|
|
104
|
+
displayName() {
|
|
105
|
+
const user = this.auth.user();
|
|
106
|
+
return (user?.name ??
|
|
107
|
+
user?.email ??
|
|
108
|
+
this.guestName ??
|
|
109
|
+
this.i18n.t('userMenuPopover.guest', {}, { defaultValue: 'Account' }));
|
|
110
|
+
}
|
|
111
|
+
/** Schedules a re-render of this component's view. */
|
|
112
|
+
markForCheck() {
|
|
113
|
+
this.cdr.markForCheck();
|
|
114
|
+
}
|
|
115
|
+
/** Closes the popover on the first pass and keeps the outside listeners in sync. */
|
|
116
|
+
ngAfterViewInit() {
|
|
117
|
+
// React's route effect runs on mount and closes the (closed) popover.
|
|
118
|
+
this.isOpen.set(false);
|
|
119
|
+
this.lastOpen = false;
|
|
120
|
+
}
|
|
121
|
+
/** Reconciles the document listeners for the open state. */
|
|
122
|
+
ngDoCheck() {
|
|
123
|
+
const open = this.isOpen();
|
|
124
|
+
if (open !== this.lastOpen) {
|
|
125
|
+
this.lastOpen = open;
|
|
126
|
+
if (open)
|
|
127
|
+
this.addDocumentListeners();
|
|
128
|
+
else
|
|
129
|
+
this.removeDocumentListeners();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/** Removes listeners and the context registration (unmount). */
|
|
133
|
+
ngOnDestroy() {
|
|
134
|
+
this.removeDocumentListeners();
|
|
135
|
+
removeDomContext(this.host.nativeElement);
|
|
136
|
+
}
|
|
137
|
+
/** Adds the outside-click and Escape dismiss listeners while open. */
|
|
138
|
+
addDocumentListeners() {
|
|
139
|
+
this.removeDocumentListeners();
|
|
140
|
+
if (this.openListener)
|
|
141
|
+
return;
|
|
142
|
+
this.openListener = true;
|
|
143
|
+
const onMouseDown = (event) => {
|
|
144
|
+
if (!this.host.nativeElement.contains(event.target)) {
|
|
145
|
+
this.isOpen.set(false);
|
|
146
|
+
this.cdr.markForCheck();
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
const onKeyDown = (event) => {
|
|
150
|
+
if (event.key === 'Escape') {
|
|
151
|
+
this.isOpen.set(false);
|
|
152
|
+
this.cdr.markForCheck();
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
document.addEventListener('mousedown', onMouseDown);
|
|
156
|
+
document.addEventListener('keydown', onKeyDown);
|
|
157
|
+
this.listeners.push(() => document.removeEventListener('mousedown', onMouseDown), () => document.removeEventListener('keydown', onKeyDown));
|
|
158
|
+
}
|
|
159
|
+
/** Removes the document listeners. */
|
|
160
|
+
removeDocumentListeners() {
|
|
161
|
+
for (const off of this.listeners)
|
|
162
|
+
off();
|
|
163
|
+
this.listeners = [];
|
|
164
|
+
this.openListener = false;
|
|
165
|
+
}
|
|
166
|
+
static ɵfac = function UserMenuPopover_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || UserMenuPopover)(); };
|
|
167
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserMenuPopover, selectors: [["div", "mol-user-menu-popover", ""]], hostVars: 2, hostBindings: function UserMenuPopover_HostBindings(rf, ctx) { if (rf & 2) {
|
|
168
|
+
i0.ɵɵclassMap(ctx.classes());
|
|
169
|
+
} }, inputs: { guestName: "guestName", className: "className" }, ngContentSelectors: _c0, decls: 1, vars: 0, template: function UserMenuPopover_Template(rf, ctx) { if (rf & 1) {
|
|
170
|
+
i0.ɵɵprojectionDef();
|
|
171
|
+
i0.ɵɵprojection(0);
|
|
172
|
+
} }, encapsulation: 2 });
|
|
173
|
+
}
|
|
174
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserMenuPopover, [{
|
|
175
|
+
type: Component,
|
|
176
|
+
args: [{
|
|
177
|
+
selector: 'div[mol-user-menu-popover]',
|
|
178
|
+
standalone: true,
|
|
179
|
+
inputs: ['guestName', 'className'],
|
|
180
|
+
host: {
|
|
181
|
+
'[class]': 'classes()',
|
|
182
|
+
},
|
|
183
|
+
template: `<ng-content></ng-content>`,
|
|
184
|
+
}]
|
|
185
|
+
}], () => [], null); })();
|
|
186
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserMenuPopover, { className: "UserMenuPopover", filePath: "components/user-menu-popover.component.ts", lineNumber: 69 }); })();
|
|
187
|
+
/** The popover context a `UserMenuPopover` root registers. */
|
|
188
|
+
class UserMenuPopoverContextValue {
|
|
189
|
+
root;
|
|
190
|
+
/**
|
|
191
|
+
* Creates the context for a popover root.
|
|
192
|
+
*
|
|
193
|
+
* @param root - The owning popover root.
|
|
194
|
+
*/
|
|
195
|
+
constructor(root) {
|
|
196
|
+
this.root = root;
|
|
197
|
+
}
|
|
198
|
+
/** Whether the popover is open. */
|
|
199
|
+
get open() {
|
|
200
|
+
return this.root.isOpen();
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Sets the open state and schedules the root's re-render.
|
|
204
|
+
* @param open - The new state.
|
|
205
|
+
*/
|
|
206
|
+
setOpen(open) {
|
|
207
|
+
this.root.isOpen.set(open);
|
|
208
|
+
this.root.markForCheck();
|
|
209
|
+
}
|
|
210
|
+
/** The resolved display name. */
|
|
211
|
+
get displayName() {
|
|
212
|
+
return this.root.displayName();
|
|
213
|
+
}
|
|
214
|
+
/** The resolved account email. */
|
|
215
|
+
get email() {
|
|
216
|
+
return this.root.auth.user()?.email ?? undefined;
|
|
217
|
+
}
|
|
218
|
+
/** The panel's shared id. */
|
|
219
|
+
get panelId() {
|
|
220
|
+
return this.root.panelId;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* The trigger: an initials avatar plus the account name and email, toggling
|
|
225
|
+
* the popover (the disclosure `aria-expanded` + `aria-controls` contract).
|
|
226
|
+
*/
|
|
227
|
+
export class UserMenuPopoverTrigger {
|
|
228
|
+
/** i18n key for the trigger's aria-label (default `userMenu.open`). */
|
|
229
|
+
ariaLabelKey;
|
|
230
|
+
/** Fallback aria-label (default `Open user menu`). */
|
|
231
|
+
ariaLabelDefault;
|
|
232
|
+
/** `data-mol-id` for the trigger (default `user-menu`). */
|
|
233
|
+
dataMolId = 'user-menu';
|
|
234
|
+
/** Extra classes for the trigger. */
|
|
235
|
+
className;
|
|
236
|
+
host = inject(ElementRef);
|
|
237
|
+
/**
|
|
238
|
+
* Reactive translation, read in the injection context. Its `t` reads the
|
|
239
|
+
* locale, so the view re-renders the text on a locale switch (the static `t`
|
|
240
|
+
* does not).
|
|
241
|
+
*/
|
|
242
|
+
i18n = useTranslation();
|
|
243
|
+
/**
|
|
244
|
+
* The current class map.
|
|
245
|
+
* @returns The UIClassMap.
|
|
246
|
+
*/
|
|
247
|
+
cm() {
|
|
248
|
+
return getClassMap();
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* The nearest popover context (React's context value).
|
|
252
|
+
* @returns The context, or null outside a popover.
|
|
253
|
+
*/
|
|
254
|
+
context() {
|
|
255
|
+
return findDomContext(this.host.nativeElement) ?? null;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Whether the popover is open.
|
|
259
|
+
* @returns The open state (false outside a popover).
|
|
260
|
+
*/
|
|
261
|
+
open() {
|
|
262
|
+
return this.context()?.open ?? false;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* The trigger's accessible label.
|
|
266
|
+
* @returns The label text.
|
|
267
|
+
*/
|
|
268
|
+
ariaLabel() {
|
|
269
|
+
return this.i18n.t(this.ariaLabelKey ?? 'userMenu.open', {}, {
|
|
270
|
+
defaultValue: this.ariaLabelDefault ?? 'Open user menu',
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* The resolved display name.
|
|
275
|
+
* @returns The name.
|
|
276
|
+
*/
|
|
277
|
+
displayName() {
|
|
278
|
+
return this.context()?.displayName ?? '';
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* The resolved account email.
|
|
282
|
+
* @returns The email, or undefined.
|
|
283
|
+
*/
|
|
284
|
+
email() {
|
|
285
|
+
return this.context()?.email;
|
|
286
|
+
}
|
|
287
|
+
/** The initials shown in the avatar badge. */
|
|
288
|
+
initials() {
|
|
289
|
+
return getInitials(this.displayName());
|
|
290
|
+
}
|
|
291
|
+
/** The trigger's class list. */
|
|
292
|
+
classes() {
|
|
293
|
+
return this.cm().cn(this.cm().flex({ align: 'center', gap: 'sm' }), this.cm().sp('px', 3), this.cm().sp('py', 3), this.cm().userMenuPopoverTrigger, this.className);
|
|
294
|
+
}
|
|
295
|
+
/** The initials badge class list. */
|
|
296
|
+
initialsClasses() {
|
|
297
|
+
return this.cm().cn(this.cm().w(10), this.cm().h(10), this.cm().roundedFull, this.cm().flex({ align: 'center', justify: 'center' }), this.cm().textSize('sm'), this.cm().fontWeight('bold'), this.cm().shrink0);
|
|
298
|
+
}
|
|
299
|
+
/** The initials badge's inline style. */
|
|
300
|
+
initialsStyle() {
|
|
301
|
+
return styleText({
|
|
302
|
+
backgroundColor: 'var(--color-primary)',
|
|
303
|
+
color: 'var(--color-on-primary, #ffffff)',
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
/** The display-name class list. */
|
|
307
|
+
nameClasses() {
|
|
308
|
+
return this.cm().cn(this.cm().textSize('sm'), this.cm().fontWeight('semibold'), this.cm().displayBlock, this.cm().textTruncate);
|
|
309
|
+
}
|
|
310
|
+
/** The email class list. */
|
|
311
|
+
secondaryClasses() {
|
|
312
|
+
return this.cm().cn(this.cm().textSize('xs'), this.cm().displayBlock, this.cm().textTruncate, this.cm().textMuted);
|
|
313
|
+
}
|
|
314
|
+
/** Toggles the popover (React's `setOpen(!open)`). */
|
|
315
|
+
toggle() {
|
|
316
|
+
this.context()?.setOpen(!this.open());
|
|
317
|
+
}
|
|
318
|
+
static ɵfac = function UserMenuPopoverTrigger_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || UserMenuPopoverTrigger)(); };
|
|
319
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserMenuPopoverTrigger, selectors: [["button", "mol-user-menu-popover-trigger", ""]], hostAttrs: ["type", "button"], hostVars: 6, hostBindings: function UserMenuPopoverTrigger_HostBindings(rf, ctx) { if (rf & 1) {
|
|
320
|
+
i0.ɵɵlistener("click", function UserMenuPopoverTrigger_click_HostBindingHandler() { return ctx.toggle(); });
|
|
321
|
+
} if (rf & 2) {
|
|
322
|
+
i0.ɵɵattribute("aria-expanded", ctx.open() ? "true" : "false")("aria-controls", ctx.context()?.panelId)("aria-label", ctx.ariaLabel())("data-mol-id", ctx.dataMolId);
|
|
323
|
+
i0.ɵɵclassMap(ctx.classes());
|
|
324
|
+
} }, inputs: { ariaLabelKey: "ariaLabelKey", ariaLabelDefault: "ariaLabelDefault", dataMolId: "dataMolId", className: "className" }, decls: 6, vars: 11, consts: [["aria-hidden", "true"], [3, "class"]], template: function UserMenuPopoverTrigger_Template(rf, ctx) { if (rf & 1) {
|
|
325
|
+
i0.ɵɵdomElementStart(0, "span", 0);
|
|
326
|
+
i0.ɵɵtext(1);
|
|
327
|
+
i0.ɵɵdomElementEnd();
|
|
328
|
+
i0.ɵɵdomElementStart(2, "span")(3, "span");
|
|
329
|
+
i0.ɵɵtext(4);
|
|
330
|
+
i0.ɵɵdomElementEnd();
|
|
331
|
+
i0.ɵɵconditionalCreate(5, UserMenuPopoverTrigger_Conditional_5_Template, 2, 3, "span", 1);
|
|
332
|
+
i0.ɵɵdomElementEnd();
|
|
333
|
+
} if (rf & 2) {
|
|
334
|
+
let tmp_6_0;
|
|
335
|
+
i0.ɵɵstyleMap(ctx.initialsStyle());
|
|
336
|
+
i0.ɵɵclassMap(ctx.initialsClasses());
|
|
337
|
+
i0.ɵɵadvance();
|
|
338
|
+
i0.ɵɵtextInterpolate(ctx.initials());
|
|
339
|
+
i0.ɵɵadvance();
|
|
340
|
+
i0.ɵɵclassMap(ctx.cm().cn(ctx.cm().flex1, ctx.cm().minW(0)));
|
|
341
|
+
i0.ɵɵadvance();
|
|
342
|
+
i0.ɵɵclassMap(ctx.nameClasses());
|
|
343
|
+
i0.ɵɵadvance();
|
|
344
|
+
i0.ɵɵtextInterpolate(ctx.displayName());
|
|
345
|
+
i0.ɵɵadvance();
|
|
346
|
+
i0.ɵɵconditional((tmp_6_0 = ctx.email()) ? 5 : -1, tmp_6_0);
|
|
347
|
+
} }, encapsulation: 2 });
|
|
348
|
+
}
|
|
349
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserMenuPopoverTrigger, [{
|
|
350
|
+
type: Component,
|
|
351
|
+
args: [{
|
|
352
|
+
selector: 'button[mol-user-menu-popover-trigger]',
|
|
353
|
+
standalone: true,
|
|
354
|
+
inputs: ['ariaLabelKey', 'ariaLabelDefault', 'dataMolId', 'className'],
|
|
355
|
+
host: {
|
|
356
|
+
type: 'button',
|
|
357
|
+
'[attr.aria-expanded]': 'open() ? "true" : "false"',
|
|
358
|
+
'[attr.aria-controls]': 'context()?.panelId',
|
|
359
|
+
'[attr.aria-label]': 'ariaLabel()',
|
|
360
|
+
'[attr.data-mol-id]': 'dataMolId',
|
|
361
|
+
'[class]': 'classes()',
|
|
362
|
+
'(click)': 'toggle()',
|
|
363
|
+
},
|
|
364
|
+
template: `<span aria-hidden="true" [class]="initialsClasses()" [style]="initialsStyle()">{{
|
|
365
|
+
initials()
|
|
366
|
+
}}</span
|
|
367
|
+
><span [class]="cm().cn(cm().flex1, cm().minW(0))"
|
|
368
|
+
><span [class]="nameClasses()">{{ displayName() }}</span>
|
|
369
|
+
@if (email(); as accountEmail) {
|
|
370
|
+
<span [class]="secondaryClasses()">{{ accountEmail }}</span>
|
|
371
|
+
}
|
|
372
|
+
</span>`,
|
|
373
|
+
}]
|
|
374
|
+
}], null, null); })();
|
|
375
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserMenuPopoverTrigger, { className: "UserMenuPopoverTrigger", filePath: "components/user-menu-popover.component.ts", lineNumber: 272 }); })();
|
|
376
|
+
/**
|
|
377
|
+
* The popover panel: an absolutely-positioned card with an identity header
|
|
378
|
+
* and a `<nav>` wrapping the caller's items. Renders nothing while closed.
|
|
379
|
+
*/
|
|
380
|
+
export class UserMenuPopoverPanel {
|
|
381
|
+
/** i18n key for the panel's aria-label (default `userMenu.panelLabel`). */
|
|
382
|
+
ariaLabelKey;
|
|
383
|
+
/** Fallback aria-label (default `Account menu`). */
|
|
384
|
+
ariaLabelDefault;
|
|
385
|
+
/** `data-mol-id` for the panel (default `user-menu-panel`). */
|
|
386
|
+
dataMolId = 'user-menu-panel';
|
|
387
|
+
/** Extra classes for the panel. */
|
|
388
|
+
className;
|
|
389
|
+
/** The panel element (removed from the DOM while closed). */
|
|
390
|
+
panel;
|
|
391
|
+
host = inject(ElementRef);
|
|
392
|
+
/**
|
|
393
|
+
* Reactive translation, read in the injection context. Its `t` reads the
|
|
394
|
+
* locale, so the view re-renders the text on a locale switch (the static `t`
|
|
395
|
+
* does not).
|
|
396
|
+
*/
|
|
397
|
+
i18n = useTranslation();
|
|
398
|
+
panelParent = null;
|
|
399
|
+
panelAnchor = null;
|
|
400
|
+
lastOpen = false;
|
|
401
|
+
/**
|
|
402
|
+
* The current class map.
|
|
403
|
+
* @returns The UIClassMap.
|
|
404
|
+
*/
|
|
405
|
+
cm() {
|
|
406
|
+
return getClassMap();
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* The nearest popover context.
|
|
410
|
+
* @returns The context, or null outside a popover.
|
|
411
|
+
*/
|
|
412
|
+
context() {
|
|
413
|
+
return findDomContext(this.host.nativeElement) ?? null;
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Whether the popover is open.
|
|
417
|
+
* @returns The open state.
|
|
418
|
+
*/
|
|
419
|
+
open() {
|
|
420
|
+
return this.context()?.open ?? false;
|
|
421
|
+
}
|
|
422
|
+
/** The panel's shared id. */
|
|
423
|
+
panelId() {
|
|
424
|
+
return this.context()?.panelId ?? null;
|
|
425
|
+
}
|
|
426
|
+
/** The resolved display name. */
|
|
427
|
+
displayName() {
|
|
428
|
+
return this.context()?.displayName ?? '';
|
|
429
|
+
}
|
|
430
|
+
/** The resolved account email. */
|
|
431
|
+
email() {
|
|
432
|
+
return this.context()?.email;
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* The nav's accessible label.
|
|
436
|
+
* @returns The label text.
|
|
437
|
+
*/
|
|
438
|
+
navLabel() {
|
|
439
|
+
return this.i18n.t(this.ariaLabelKey ?? 'userMenu.panelLabel', {}, {
|
|
440
|
+
defaultValue: this.ariaLabelDefault ?? 'Account menu',
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* The panel card class list.
|
|
445
|
+
* @returns The class string.
|
|
446
|
+
*/
|
|
447
|
+
classes() {
|
|
448
|
+
return this.cm().cn(this.cm().userMenuPopoverPanel, this.className);
|
|
449
|
+
}
|
|
450
|
+
/** Records where the panel lives and applies the initial open state. */
|
|
451
|
+
ngAfterViewInit() {
|
|
452
|
+
const panel = this.panel?.nativeElement;
|
|
453
|
+
if (!panel)
|
|
454
|
+
return;
|
|
455
|
+
this.panelParent = panel.parentNode;
|
|
456
|
+
this.panelAnchor = panel.nextSibling;
|
|
457
|
+
this.lastOpen = this.open();
|
|
458
|
+
if (!this.lastOpen)
|
|
459
|
+
panel.remove();
|
|
460
|
+
}
|
|
461
|
+
/** Attaches or detaches the panel to match the open state (React renders null). */
|
|
462
|
+
ngDoCheck() {
|
|
463
|
+
const open = this.open();
|
|
464
|
+
if (open === this.lastOpen)
|
|
465
|
+
return;
|
|
466
|
+
this.lastOpen = open;
|
|
467
|
+
const panel = this.panel?.nativeElement;
|
|
468
|
+
if (!panel || !this.panelParent)
|
|
469
|
+
return;
|
|
470
|
+
if (open)
|
|
471
|
+
this.panelParent.insertBefore(panel, this.panelAnchor);
|
|
472
|
+
else
|
|
473
|
+
panel.remove();
|
|
474
|
+
}
|
|
475
|
+
static ɵfac = function UserMenuPopoverPanel_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || UserMenuPopoverPanel)(); };
|
|
476
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserMenuPopoverPanel, selectors: [["div", "mol-user-menu-popover-panel", ""]], viewQuery: function UserMenuPopoverPanel_Query(rf, ctx) { if (rf & 1) {
|
|
477
|
+
i0.ɵɵviewQuery(_c1, 5);
|
|
478
|
+
} if (rf & 2) {
|
|
479
|
+
let _t;
|
|
480
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.panel = _t.first);
|
|
481
|
+
} }, hostAttrs: ["data-parity-unwrap", "", 2, "display", "contents"], hostVars: 1, hostBindings: function UserMenuPopoverPanel_HostBindings(rf, ctx) { if (rf & 2) {
|
|
482
|
+
i0.ɵɵattribute("data-open", ctx.open() ? "true" : null);
|
|
483
|
+
} }, inputs: { ariaLabelKey: "ariaLabelKey", ariaLabelDefault: "ariaLabelDefault", dataMolId: "dataMolId", className: "className" }, ngContentSelectors: _c0, decls: 8, vars: 13, consts: [["panel", ""], [3, "id"], [3, "class"]], template: function UserMenuPopoverPanel_Template(rf, ctx) { if (rf & 1) {
|
|
484
|
+
i0.ɵɵprojectionDef();
|
|
485
|
+
i0.ɵɵdomElementStart(0, "div", 1, 0)(2, "header")(3, "p");
|
|
486
|
+
i0.ɵɵtext(4);
|
|
487
|
+
i0.ɵɵdomElementEnd();
|
|
488
|
+
i0.ɵɵconditionalCreate(5, UserMenuPopoverPanel_Conditional_5_Template, 2, 3, "p", 2);
|
|
489
|
+
i0.ɵɵdomElementEnd();
|
|
490
|
+
i0.ɵɵdomElementStart(6, "nav");
|
|
491
|
+
i0.ɵɵprojection(7);
|
|
492
|
+
i0.ɵɵdomElementEnd()();
|
|
493
|
+
} if (rf & 2) {
|
|
494
|
+
let tmp_7_0;
|
|
495
|
+
i0.ɵɵclassMap(ctx.classes());
|
|
496
|
+
i0.ɵɵdomProperty("id", ctx.panelId());
|
|
497
|
+
i0.ɵɵattribute("data-mol-id", ctx.dataMolId);
|
|
498
|
+
i0.ɵɵadvance(2);
|
|
499
|
+
i0.ɵɵclassMap(ctx.cm().cn(ctx.cm().sp("pb", 4), ctx.cm().userMenuPopoverHeader));
|
|
500
|
+
i0.ɵɵadvance();
|
|
501
|
+
i0.ɵɵclassMap(ctx.cm().cn(ctx.cm().textSize("sm"), ctx.cm().fontWeight("semibold")));
|
|
502
|
+
i0.ɵɵadvance();
|
|
503
|
+
i0.ɵɵtextInterpolate(ctx.displayName());
|
|
504
|
+
i0.ɵɵadvance();
|
|
505
|
+
i0.ɵɵconditional((tmp_7_0 = ctx.email()) ? 5 : -1, tmp_7_0);
|
|
506
|
+
i0.ɵɵadvance();
|
|
507
|
+
i0.ɵɵclassMap(ctx.cm().cn(ctx.cm().sp("mt", 4), ctx.cm().stack(1)));
|
|
508
|
+
i0.ɵɵattribute("aria-label", ctx.navLabel());
|
|
509
|
+
} }, encapsulation: 2 });
|
|
510
|
+
}
|
|
511
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserMenuPopoverPanel, [{
|
|
512
|
+
type: Component,
|
|
513
|
+
args: [{
|
|
514
|
+
selector: 'div[mol-user-menu-popover-panel]',
|
|
515
|
+
standalone: true,
|
|
516
|
+
inputs: ['ariaLabelKey', 'ariaLabelDefault', 'dataMolId', 'className'],
|
|
517
|
+
host: {
|
|
518
|
+
'data-parity-unwrap': '',
|
|
519
|
+
'[attr.data-open]': 'open() ? "true" : null',
|
|
520
|
+
style: 'display: contents',
|
|
521
|
+
},
|
|
522
|
+
template: `<div #panel [id]="panelId()" [attr.data-mol-id]="dataMolId" [class]="classes()">
|
|
523
|
+
<header [class]="cm().cn(cm().sp('pb', 4), cm().userMenuPopoverHeader)">
|
|
524
|
+
<p [class]="cm().cn(cm().textSize('sm'), cm().fontWeight('semibold'))">{{ displayName() }}</p>
|
|
525
|
+
@if (email(); as accountEmail) {
|
|
526
|
+
<p [class]="cm().cn(cm().textSize('xs'), cm().textMuted)">{{ accountEmail }}</p>
|
|
527
|
+
}
|
|
528
|
+
</header>
|
|
529
|
+
<nav [class]="cm().cn(cm().sp('mt', 4), cm().stack(1))" [attr.aria-label]="navLabel()">
|
|
530
|
+
<ng-content></ng-content>
|
|
531
|
+
</nav>
|
|
532
|
+
</div>`,
|
|
533
|
+
}]
|
|
534
|
+
}], null, { panel: [{
|
|
535
|
+
type: ViewChild,
|
|
536
|
+
args: ['panel']
|
|
537
|
+
}] }); })();
|
|
538
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserMenuPopoverPanel, { className: "UserMenuPopoverPanel", filePath: "components/user-menu-popover.component.ts", lineNumber: 433 }); })();
|
|
539
|
+
/**
|
|
540
|
+
* The sign-out nav item: closes the popover and signs out.
|
|
541
|
+
*/
|
|
542
|
+
export class UserMenuPopoverSignOut {
|
|
543
|
+
/** i18n key for the button label (default `userMenu.signOut`). */
|
|
544
|
+
labelKey;
|
|
545
|
+
/** Fallback label (default `Sign out`). */
|
|
546
|
+
labelDefault;
|
|
547
|
+
/** `data-mol-id` for the button (default `user-menu-sign-out`). */
|
|
548
|
+
dataMolId = 'user-menu-sign-out';
|
|
549
|
+
/** Extra classes for the button. */
|
|
550
|
+
className;
|
|
551
|
+
/** Auth state (the logout action). */
|
|
552
|
+
auth = useAuth();
|
|
553
|
+
host = inject(ElementRef);
|
|
554
|
+
/**
|
|
555
|
+
* Reactive translation, read in the injection context. Its `t` reads the
|
|
556
|
+
* locale, so the view re-renders the text on a locale switch (the static `t`
|
|
557
|
+
* does not).
|
|
558
|
+
*/
|
|
559
|
+
i18n = useTranslation();
|
|
560
|
+
/**
|
|
561
|
+
* The current class map.
|
|
562
|
+
* @returns The UIClassMap.
|
|
563
|
+
*/
|
|
564
|
+
cm() {
|
|
565
|
+
return getClassMap();
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* The nearest popover context.
|
|
569
|
+
* @returns The context, or null outside a popover.
|
|
570
|
+
*/
|
|
571
|
+
context() {
|
|
572
|
+
return findDomContext(this.host.nativeElement) ?? null;
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* The button label.
|
|
576
|
+
* @returns The label text.
|
|
577
|
+
*/
|
|
578
|
+
label() {
|
|
579
|
+
return this.i18n.t(this.labelKey ?? 'userMenu.signOut', {}, {
|
|
580
|
+
defaultValue: this.labelDefault ?? 'Sign out',
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* The button class list.
|
|
585
|
+
* @returns The class string.
|
|
586
|
+
*/
|
|
587
|
+
classes() {
|
|
588
|
+
return this.cm().cn(this.cm().sp('px', 3), this.cm().sp('py', 2), this.cm().textSize('sm'), this.cm().fontWeight('semibold'), this.cm().displayBlock, this.cm().w('full'), this.cm().textError, this.cm().userMenuPopoverSignOut, this.className);
|
|
589
|
+
}
|
|
590
|
+
/** Closes the popover and signs out (React's click handler). */
|
|
591
|
+
async signOut() {
|
|
592
|
+
this.context()?.setOpen(false);
|
|
593
|
+
try {
|
|
594
|
+
await this.auth.logout();
|
|
595
|
+
}
|
|
596
|
+
catch (_error) {
|
|
597
|
+
// A logout failure should not crash the panel — the user is already
|
|
598
|
+
// treated as signed out from the UI's perspective.
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
static ɵfac = function UserMenuPopoverSignOut_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || UserMenuPopoverSignOut)(); };
|
|
602
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserMenuPopoverSignOut, selectors: [["button", "mol-user-menu-popover-sign-out", ""]], hostAttrs: ["type", "button"], hostVars: 3, hostBindings: function UserMenuPopoverSignOut_HostBindings(rf, ctx) { if (rf & 1) {
|
|
603
|
+
i0.ɵɵlistener("click", function UserMenuPopoverSignOut_click_HostBindingHandler() { return ctx.signOut(); });
|
|
604
|
+
} if (rf & 2) {
|
|
605
|
+
i0.ɵɵattribute("data-mol-id", ctx.dataMolId);
|
|
606
|
+
i0.ɵɵclassMap(ctx.classes());
|
|
607
|
+
} }, inputs: { labelKey: "labelKey", labelDefault: "labelDefault", dataMolId: "dataMolId", className: "className" }, decls: 1, vars: 1, template: function UserMenuPopoverSignOut_Template(rf, ctx) { if (rf & 1) {
|
|
608
|
+
i0.ɵɵtext(0);
|
|
609
|
+
} if (rf & 2) {
|
|
610
|
+
i0.ɵɵtextInterpolate(ctx.label());
|
|
611
|
+
} }, encapsulation: 2 });
|
|
612
|
+
}
|
|
613
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserMenuPopoverSignOut, [{
|
|
614
|
+
type: Component,
|
|
615
|
+
args: [{
|
|
616
|
+
selector: 'button[mol-user-menu-popover-sign-out]',
|
|
617
|
+
standalone: true,
|
|
618
|
+
inputs: ['labelKey', 'labelDefault', 'dataMolId', 'className'],
|
|
619
|
+
host: {
|
|
620
|
+
type: 'button',
|
|
621
|
+
'[attr.data-mol-id]': 'dataMolId',
|
|
622
|
+
'[class]': 'classes()',
|
|
623
|
+
'(click)': 'signOut()',
|
|
624
|
+
},
|
|
625
|
+
template: `{{ label() }}`,
|
|
626
|
+
}]
|
|
627
|
+
}], null, null); })();
|
|
628
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserMenuPopoverSignOut, { className: "UserMenuPopoverSignOut", filePath: "components/user-menu-popover.component.ts", lineNumber: 557 }); })();
|
|
629
|
+
/**
|
|
630
|
+
* Returns a callback that closes the enclosing `UserMenuPopover` (a no-op
|
|
631
|
+
* outside one).
|
|
632
|
+
*
|
|
633
|
+
* Must be called in an injection context (a component field initializer or
|
|
634
|
+
* constructor).
|
|
635
|
+
*
|
|
636
|
+
* @returns A function that closes the popover.
|
|
637
|
+
*/
|
|
638
|
+
export function useUserMenuPopoverClose() {
|
|
639
|
+
const el = inject(ElementRef, { optional: true });
|
|
640
|
+
// Resolved at call time: a probe resolves its context in its constructor,
|
|
641
|
+
// before Angular has inserted its host into the DOM.
|
|
642
|
+
return () => {
|
|
643
|
+
findDomContext(el?.nativeElement ?? null)?.setOpen(false);
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
//# sourceMappingURL=user-menu-popover.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-menu-popover.component.js","sourceRoot":"","sources":["../../src/components/user-menu-popover.component.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAEL,iBAAiB,EACjB,SAAS,EAET,MAAM,EACN,UAAU,EACV,MAAM,EAEN,MAAM,EACN,SAAS,GACV,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAE1E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;;;;IA+OzC,+BAAmC;IAAA,YAAkB;IAAA,oBAAO;;;IAAtD,wCAA4B;IAAC,cAAkB;IAAlB,yBAAkB;;;;IA6JrD,4BAA0D;IAAA,YAAkB;IAAA,oBAAI;;;IAA7E,gFAAsD;IAAC,cAAkB;IAAlB,yBAAkB;;AAjXpF;;;GAGG;AAUH,MAAM,OAAO,eAAe;IAC1B,2EAA2E;IAC3E,SAAS,CAAS;IAClB,qEAAqE;IACrE,SAAS,CAAS;IAElB,mCAAmC;IAC1B,MAAM,GAAG,MAAM,CAAC,KAAK;+EAAC,CAAA;IAC/B,6DAA6D;IACpD,OAAO,GAAG,cAAc,EAAE,CAAA;IACnC,sCAAsC;IAC7B,IAAI,GAAG,OAAO,EAAe,CAAA;IACtC;;;OAGG;IACM,IAAI,GAAG,cAAc,EAAE,CAAA;IAChC,uDAAuD;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