@forgeroute/ui 0.5.20 → 0.5.22
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/fesm2022/{forgeroute-ui-core-ui-labels.es-ChTmqFlw.mjs → forgeroute-ui-core-ui-labels.es-Bado7tzi.mjs} +44 -1
- package/fesm2022/{forgeroute-ui-core-ui-labels.es-ChTmqFlw.mjs.map → forgeroute-ui-core-ui-labels.es-Bado7tzi.mjs.map} +1 -1
- package/fesm2022/forgeroute-ui-core.mjs +44 -1
- package/fesm2022/forgeroute-ui-core.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-shell.mjs +23 -4
- package/fesm2022/forgeroute-ui-shell.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-square.mjs +5497 -1188
- package/fesm2022/forgeroute-ui-square.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui-core.d.ts +43 -0
- package/types/forgeroute-ui-messaging.d.ts +5 -5
- package/types/forgeroute-ui-payments.d.ts +1 -1
- package/types/forgeroute-ui-quickbooks.d.ts +1 -1
- package/types/forgeroute-ui-shell.d.ts +11 -0
- package/types/forgeroute-ui-square.d.ts +1306 -5
- package/types/forgeroute-ui-stripe.d.ts +1 -1
|
@@ -109,6 +109,17 @@ var AppShellComponent = class AppShellComponent {
|
|
|
109
109
|
_visibleLinks(group) {
|
|
110
110
|
return group.links.filter((l) => l.visible !== false);
|
|
111
111
|
}
|
|
112
|
+
_linkRows(group) {
|
|
113
|
+
let previous;
|
|
114
|
+
return this._visibleLinks(group).map((link) => {
|
|
115
|
+
const heading = link.section && link.section !== previous ? link.section : null;
|
|
116
|
+
previous = link.section;
|
|
117
|
+
return {
|
|
118
|
+
link,
|
|
119
|
+
heading
|
|
120
|
+
};
|
|
121
|
+
});
|
|
122
|
+
}
|
|
112
123
|
_canCollapseGroups() {
|
|
113
124
|
return this._visibleGroups().length > 1;
|
|
114
125
|
}
|
|
@@ -472,7 +483,11 @@ var AppShellComponent = class AppShellComponent {
|
|
|
472
483
|
[id]="'navg-' + group.key"
|
|
473
484
|
[hidden]="!_isRail() && _isCollapsed(group.key)"
|
|
474
485
|
>
|
|
475
|
-
@for (
|
|
486
|
+
@for (row of _linkRows(group); track row.link.route) {
|
|
487
|
+
@let link = row.link;
|
|
488
|
+
@if (row.heading) {
|
|
489
|
+
<div class="nav-section-label" role="presentation" [attr.data-testid]="'nav-section-' + group.key">{{ row.heading }}</div>
|
|
490
|
+
}
|
|
476
491
|
<a
|
|
477
492
|
[routerLink]="link.route"
|
|
478
493
|
routerLinkActive="active"
|
|
@@ -594,7 +609,7 @@ var AppShellComponent = class AppShellComponent {
|
|
|
594
609
|
}
|
|
595
610
|
`,
|
|
596
611
|
isInline: true,
|
|
597
|
-
styles: [":host{display:contents}.shell{display:flex;height:100vh;height:100dvh;overflow:hidden;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.sidebar-backdrop{display:none;position:fixed;inset:0;background:#00000080;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);z-index:199}.sidebar{width:256px;background:var(--shell-bg, linear-gradient(175deg, #0f172a 0%, #111827 100%));display:flex;flex-direction:column;flex-shrink:0;overflow:hidden}.sidebar-header{display:flex;align-items:center;padding:0 20px;min-height:64px;border-bottom:1px solid color-mix(in srgb,var(--shell-text, #fff) 6%,transparent);box-sizing:border-box}.brand-default{display:flex;align-items:center;gap:10px}.brand-text{font-size:1.125rem;font-weight:700;color:var(--shell-text, #fff);letter-spacing:-.01em}.sidebar-nav{padding:6px 0 8px;flex:1;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--shell-text, #fff) 8%,transparent) transparent}.sidebar-nav::-webkit-scrollbar{width:3px}.sidebar-nav::-webkit-scrollbar-track{background:transparent}.sidebar-nav::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--shell-text, #fff) 8%,transparent);border-radius:2px}.nav-group{margin-bottom:6px}.nav-group-links[hidden]{display:none}.nav-group-label{display:flex;align-items:center;gap:6px;width:100%;padding:8px 16px;font-size:.6875rem;font-weight:700;color:color-mix(in srgb,var(--shell-text, #fff) 80%,transparent);text-transform:uppercase;letter-spacing:.12em;background:none;border:none;cursor:pointer;transition:color .15s;text-align:left;border-radius:6px;background:color-mix(in srgb,var(--shell-text, #fff) 10%,transparent);margin:6px 4px 4px;width:calc(100% - 8px);box-sizing:border-box}.nav-group-label:hover{color:color-mix(in srgb,var(--shell-text, #fff) 100%,transparent)}.nav-group-label:focus-visible{outline:2px solid rgba(96,165,250,.5);outline-offset:-1px}.chevron{flex-shrink:0;transition:transform .2s cubic-bezier(.4,0,.2,1);opacity:.85}.chevron.collapsed{transform:rotate(-90deg)}.sidebar-nav a{display:flex;align-items:center;gap:10px;padding:8px 12px 8px 32px;color:color-mix(in srgb,var(--shell-text, #fff) 95%,transparent);font-size:.9375rem;font-weight:500;text-decoration:none;border-left:2px solid transparent;border-radius:0 8px 8px 0;margin-right:10px;transition:color .15s,background .15s,border-color .15s}.sidebar-nav a:hover{color:color-mix(in srgb,var(--shell-text, #fff) 100%,transparent);background:color-mix(in srgb,var(--shell-text, #fff) 6%,transparent)}.sidebar-nav a.active{color:var(--shell-text, #fff);background:#60a5fa21;border-left-color:#60a5fa;font-weight:600}.sidebar-nav a:focus-visible{outline:2px solid rgba(96,165,250,.5);outline-offset:-2px}.nav-icon{display:flex;align-items:center;flex-shrink:0}.nav-label{flex:1}.nav-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#ef4444;color:#fff;font-size:.625rem;font-weight:700;margin-left:auto}.sidebar-footer{padding:10px 14px;border-top:1px solid color-mix(in srgb,var(--shell-text, #fff) 6%,transparent)}.user-info{display:flex;align-items:center;gap:10px}.user-avatar{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,#60a5fa38,#60a5fa14);border:1px solid rgba(96,165,250,.18);color:color-mix(in srgb,var(--shell-text, #fff) 88%,transparent);font-size:.75rem;font-weight:600;display:flex;align-items:center;justify-content:center;flex-shrink:0}.user-details{display:flex;flex-direction:column;min-width:0;flex:1}.user-name{font-size:.8125rem;font-weight:600;color:var(--shell-text, #fff);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-role{font-size:.6875rem;color:color-mix(in srgb,var(--shell-text, #fff) 80%,transparent);text-transform:uppercase;letter-spacing:.05em;font-weight:500}.btn-logout{background:none;border:none;cursor:pointer;color:color-mix(in srgb,var(--shell-text, #fff) 85%,transparent);padding:6px;border-radius:8px;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:color .15s,background .15s}.btn-logout:hover{color:#f87171;background:#f871711a}.btn-logout:focus-visible{outline:2px solid rgba(96,165,250,.5);outline-offset:2px}.brand-full{display:flex;align-items:center;min-width:0;flex:1}.brand-mark{display:none}.shell.collapsed .brand-mark{width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:1.125rem;color:var(--shell-text, #fff);background:color-mix(in srgb,var(--shell-text, #fff) 15%,transparent)}.rail-toggle{display:none;align-items:center;justify-content:center;width:32px;height:32px;margin-left:auto;flex-shrink:0;border:none;background:none;cursor:pointer;border-radius:8px;color:color-mix(in srgb,var(--shell-text, #fff) 85%,transparent);transition:background .15s,color .15s}.rail-toggle:hover{background:color-mix(in srgb,var(--shell-text, #fff) 12%,transparent);color:var(--shell-text, #fff)}.rail-toggle:focus-visible{outline:2px solid rgba(96,165,250,.5);outline-offset:2px}.rail-divider{display:none}@media(min-width:1025px){.rail-toggle{display:flex}.sidebar{transition:width .2s cubic-bezier(.4,0,.2,1)}.shell.collapsed .sidebar{width:68px}.shell.collapsed .sidebar-header{flex-direction:column;justify-content:center;gap:4px;padding:8px 0}.shell.collapsed .brand-full{flex:none;width:44px;height:44px;overflow:hidden;border-radius:10px;justify-content:center}.shell.collapsed .brand-text{display:none}.shell.collapsed .rail-toggle{margin-left:0}.shell.collapsed .nav-group-label{display:none}.shell.collapsed .rail-divider{display:block;height:1px;margin:8px 14px;background:color-mix(in srgb,var(--shell-text, #fff) 20%,transparent)}.shell.collapsed .nav-group:first-child .rail-divider{display:none}.shell.collapsed .sidebar-nav a{position:relative;justify-content:center;padding:10px 0;margin:0 8px 2px;border-left:none;border-radius:8px}.shell.collapsed .sidebar-nav a.active{box-shadow:inset 3px 0 #60a5fa}.shell.collapsed .nav-label{display:none}.shell.collapsed .nav-badge{position:absolute;top:2px;right:4px;min-width:16px;height:16px;padding:0 4px;font-size:.5625rem;margin:0}.shell.collapsed .sidebar-footer{padding:10px 8px}.shell.collapsed .user-info{flex-direction:column;gap:8px}.shell.collapsed .user-details{display:none}}.main-area{flex:1;display:flex;flex-direction:column;overflow:hidden;min-width:0}.top-header{display:flex;align-items:center;gap:8px;padding:0 24px;background:#fff;box-shadow:0 1px 3px #00000012,0 1px #0000000a;min-height:64px;box-sizing:border-box;position:relative;z-index:50}.hamburger{display:none;align-items:center;justify-content:center;width:36px;height:36px;border:none;background:none;cursor:pointer;color:#374151;border-radius:8px;flex-shrink:0;transition:background .15s,color .15s}.hamburger:hover{background:#f3f4f6}.hamburger:focus-visible{outline:2px solid rgba(59,130,246,.5);outline-offset:2px}.page-title{font-size:1.25rem;font-weight:700;color:#111827;margin:0;letter-spacing:-.02em}.page-title:focus{outline:none}.read-only-badge{display:inline-flex;align-items:center;flex-shrink:0;padding:2px 8px;border-radius:9999px;font-size:.6875rem;font-weight:600;letter-spacing:.02em;text-transform:uppercase;background:#fef9c3;color:#854d0e;border:1px solid #fde68a;white-space:nowrap}.header-start{display:flex;align-items:center;min-width:0;margin-left:8px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}.header-start:empty{display:none}.header-start::-webkit-scrollbar{display:none}.header-end{display:flex;align-items:center;margin-left:auto}.content:focus{outline:none}.content{--shell-content-padding: 24px;flex:1;overflow-y:auto;padding:var(--shell-content-padding);background:#f7f8f6;display:flex;flex-direction:column;box-sizing:border-box;min-height:0}.content>*{flex:1;min-height:0;display:flex;flex-direction:column}.skip-link{position:absolute;top:-48px;left:8px;z-index:300;padding:8px 14px;border-radius:6px;background:#fff;color:#1d4ed8;font-size:.875rem;font-weight:600;text-decoration:none;box-shadow:0 2px 10px #00000040}.skip-link:focus{top:8px;outline:2px solid #1d4ed8;outline-offset:2px}.nav-group-label--static{cursor:default}@media(max-width:1024px){.hamburger{display:flex}.sidebar{position:fixed;top:0;left:0;bottom:0;z-index:200;transform:translate(-100%);transition:transform .26s cubic-bezier(.4,0,.2,1),box-shadow .26s cubic-bezier(.4,0,.2,1),visibility 0s linear .26s;visibility:hidden;box-shadow:none}.shell.sidebar-open .sidebar{transform:translate(0);box-shadow:4px 0 32px #0000004d;visibility:visible;transition-delay:0s}.shell.sidebar-open .sidebar-backdrop{display:block}.main-area{width:100%}.top-header{padding:0 16px;gap:4px}.content{--shell-content-padding: 16px}}@media(max-width:480px){.page-title{font-size:1.0625rem}.content{--shell-content-padding: 12px}}@media(pointer:coarse),(max-width:480px){.sidebar-nav a,.nav-group-label{min-height:44px}.btn-logout,.hamburger,.rail-toggle{min-width:44px;min-height:44px}}@media(prefers-reduced-motion:reduce){.chevron,.sidebar-nav a,.sidebar{transition:none!important}}\n"],
|
|
612
|
+
styles: [":host{display:contents}.shell{display:flex;height:100vh;height:100dvh;overflow:hidden;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.sidebar-backdrop{display:none;position:fixed;inset:0;background:#00000080;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);z-index:199}.sidebar{width:256px;background:var(--shell-bg, linear-gradient(175deg, #0f172a 0%, #111827 100%));display:flex;flex-direction:column;flex-shrink:0;overflow:hidden}.sidebar-header{display:flex;align-items:center;padding:0 20px;min-height:64px;border-bottom:1px solid color-mix(in srgb,var(--shell-text, #fff) 6%,transparent);box-sizing:border-box}.brand-default{display:flex;align-items:center;gap:10px}.brand-text{font-size:1.125rem;font-weight:700;color:var(--shell-text, #fff);letter-spacing:-.01em}.sidebar-nav{padding:6px 0 8px;flex:1;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--shell-text, #fff) 8%,transparent) transparent}.sidebar-nav::-webkit-scrollbar{width:3px}.sidebar-nav::-webkit-scrollbar-track{background:transparent}.sidebar-nav::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--shell-text, #fff) 8%,transparent);border-radius:2px}.nav-group{margin-bottom:6px}.nav-group-links[hidden]{display:none}.nav-group-label{display:flex;align-items:center;gap:6px;width:100%;padding:8px 16px;font-size:.6875rem;font-weight:700;color:color-mix(in srgb,var(--shell-text, #fff) 80%,transparent);text-transform:uppercase;letter-spacing:.12em;background:none;border:none;cursor:pointer;transition:color .15s;text-align:left;border-radius:6px;background:color-mix(in srgb,var(--shell-text, #fff) 10%,transparent);margin:6px 4px 4px;width:calc(100% - 8px);box-sizing:border-box}.nav-section-label{padding:10px 16px 3px;font-size:.625rem;font-weight:600;color:color-mix(in srgb,var(--shell-text, #fff) 55%,transparent);text-transform:uppercase;letter-spacing:.1em;-webkit-user-select:none;user-select:none}.nav-section-label:first-child{padding-top:4px}.nav-group-label:hover{color:color-mix(in srgb,var(--shell-text, #fff) 100%,transparent)}.nav-group-label:focus-visible{outline:2px solid rgba(96,165,250,.5);outline-offset:-1px}.chevron{flex-shrink:0;transition:transform .2s cubic-bezier(.4,0,.2,1);opacity:.85}.chevron.collapsed{transform:rotate(-90deg)}.sidebar-nav a{display:flex;align-items:center;gap:10px;padding:8px 12px 8px 32px;color:color-mix(in srgb,var(--shell-text, #fff) 95%,transparent);font-size:.9375rem;font-weight:500;text-decoration:none;border-left:2px solid transparent;border-radius:0 8px 8px 0;margin-right:10px;transition:color .15s,background .15s,border-color .15s}.sidebar-nav a:hover{color:color-mix(in srgb,var(--shell-text, #fff) 100%,transparent);background:color-mix(in srgb,var(--shell-text, #fff) 6%,transparent)}.sidebar-nav a.active{color:var(--shell-text, #fff);background:#60a5fa21;border-left-color:#60a5fa;font-weight:600}.sidebar-nav a:focus-visible{outline:2px solid rgba(96,165,250,.5);outline-offset:-2px}.nav-icon{display:flex;align-items:center;flex-shrink:0}.nav-label{flex:1}.nav-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#ef4444;color:#fff;font-size:.625rem;font-weight:700;margin-left:auto}.sidebar-footer{padding:10px 14px;border-top:1px solid color-mix(in srgb,var(--shell-text, #fff) 6%,transparent)}.user-info{display:flex;align-items:center;gap:10px}.user-avatar{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,#60a5fa38,#60a5fa14);border:1px solid rgba(96,165,250,.18);color:color-mix(in srgb,var(--shell-text, #fff) 88%,transparent);font-size:.75rem;font-weight:600;display:flex;align-items:center;justify-content:center;flex-shrink:0}.user-details{display:flex;flex-direction:column;min-width:0;flex:1}.user-name{font-size:.8125rem;font-weight:600;color:var(--shell-text, #fff);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-role{font-size:.6875rem;color:color-mix(in srgb,var(--shell-text, #fff) 80%,transparent);text-transform:uppercase;letter-spacing:.05em;font-weight:500}.btn-logout{background:none;border:none;cursor:pointer;color:color-mix(in srgb,var(--shell-text, #fff) 85%,transparent);padding:6px;border-radius:8px;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:color .15s,background .15s}.btn-logout:hover{color:#f87171;background:#f871711a}.btn-logout:focus-visible{outline:2px solid rgba(96,165,250,.5);outline-offset:2px}.brand-full{display:flex;align-items:center;min-width:0;flex:1}.brand-mark{display:none}.shell.collapsed .brand-mark{width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:1.125rem;color:var(--shell-text, #fff);background:color-mix(in srgb,var(--shell-text, #fff) 15%,transparent)}.rail-toggle{display:none;align-items:center;justify-content:center;width:32px;height:32px;margin-left:auto;flex-shrink:0;border:none;background:none;cursor:pointer;border-radius:8px;color:color-mix(in srgb,var(--shell-text, #fff) 85%,transparent);transition:background .15s,color .15s}.rail-toggle:hover{background:color-mix(in srgb,var(--shell-text, #fff) 12%,transparent);color:var(--shell-text, #fff)}.rail-toggle:focus-visible{outline:2px solid rgba(96,165,250,.5);outline-offset:2px}.rail-divider{display:none}@media(min-width:1025px){.rail-toggle{display:flex}.sidebar{transition:width .2s cubic-bezier(.4,0,.2,1)}.shell.collapsed .sidebar{width:68px}.shell.collapsed .sidebar-header{flex-direction:column;justify-content:center;gap:4px;padding:8px 0}.shell.collapsed .brand-full{flex:none;width:44px;height:44px;overflow:hidden;border-radius:10px;justify-content:center}.shell.collapsed .brand-text{display:none}.shell.collapsed .rail-toggle{margin-left:0}.shell.collapsed .nav-group-label,.shell.collapsed .nav-section-label{display:none}.shell.collapsed .rail-divider{display:block;height:1px;margin:8px 14px;background:color-mix(in srgb,var(--shell-text, #fff) 20%,transparent)}.shell.collapsed .nav-group:first-child .rail-divider{display:none}.shell.collapsed .sidebar-nav a{position:relative;justify-content:center;padding:10px 0;margin:0 8px 2px;border-left:none;border-radius:8px}.shell.collapsed .sidebar-nav a.active{box-shadow:inset 3px 0 #60a5fa}.shell.collapsed .nav-label{display:none}.shell.collapsed .nav-badge{position:absolute;top:2px;right:4px;min-width:16px;height:16px;padding:0 4px;font-size:.5625rem;margin:0}.shell.collapsed .sidebar-footer{padding:10px 8px}.shell.collapsed .user-info{flex-direction:column;gap:8px}.shell.collapsed .user-details{display:none}}.main-area{flex:1;display:flex;flex-direction:column;overflow:hidden;min-width:0}.top-header{display:flex;align-items:center;gap:8px;padding:0 24px;background:#fff;box-shadow:0 1px 3px #00000012,0 1px #0000000a;min-height:64px;box-sizing:border-box;position:relative;z-index:50}.hamburger{display:none;align-items:center;justify-content:center;width:36px;height:36px;border:none;background:none;cursor:pointer;color:#374151;border-radius:8px;flex-shrink:0;transition:background .15s,color .15s}.hamburger:hover{background:#f3f4f6}.hamburger:focus-visible{outline:2px solid rgba(59,130,246,.5);outline-offset:2px}.page-title{font-size:1.25rem;font-weight:700;color:#111827;margin:0;letter-spacing:-.02em}.page-title:focus{outline:none}.read-only-badge{display:inline-flex;align-items:center;flex-shrink:0;padding:2px 8px;border-radius:9999px;font-size:.6875rem;font-weight:600;letter-spacing:.02em;text-transform:uppercase;background:#fef9c3;color:#854d0e;border:1px solid #fde68a;white-space:nowrap}.header-start{display:flex;align-items:center;min-width:0;margin-left:8px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}.header-start:empty{display:none}.header-start::-webkit-scrollbar{display:none}.header-end{display:flex;align-items:center;margin-left:auto}.content:focus{outline:none}.content{--shell-content-padding: 24px;flex:1;overflow-y:auto;padding:var(--shell-content-padding);background:#f7f8f6;display:flex;flex-direction:column;box-sizing:border-box;min-height:0}.content>*{flex:1;min-height:0;display:flex;flex-direction:column}.skip-link{position:absolute;top:-48px;left:8px;z-index:300;padding:8px 14px;border-radius:6px;background:#fff;color:#1d4ed8;font-size:.875rem;font-weight:600;text-decoration:none;box-shadow:0 2px 10px #00000040}.skip-link:focus{top:8px;outline:2px solid #1d4ed8;outline-offset:2px}.nav-group-label--static{cursor:default}@media(max-width:1024px){.hamburger{display:flex}.sidebar{position:fixed;top:0;left:0;bottom:0;z-index:200;transform:translate(-100%);transition:transform .26s cubic-bezier(.4,0,.2,1),box-shadow .26s cubic-bezier(.4,0,.2,1),visibility 0s linear .26s;visibility:hidden;box-shadow:none}.shell.sidebar-open .sidebar{transform:translate(0);box-shadow:4px 0 32px #0000004d;visibility:visible;transition-delay:0s}.shell.sidebar-open .sidebar-backdrop{display:block}.main-area{width:100%}.top-header{padding:0 16px;gap:4px}.content{--shell-content-padding: 16px}}@media(max-width:480px){.page-title{font-size:1.0625rem}.content{--shell-content-padding: 12px}}@media(pointer:coarse),(max-width:480px){.sidebar-nav a,.nav-group-label{min-height:44px}.btn-logout,.hamburger,.rail-toggle{min-width:44px;min-height:44px}}@media(prefers-reduced-motion:reduce){.chevron,.sidebar-nav a,.sidebar{transition:none!important}}\n"],
|
|
598
613
|
dependencies: [
|
|
599
614
|
{
|
|
600
615
|
kind: "directive",
|
|
@@ -765,7 +780,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
765
780
|
[id]="'navg-' + group.key"
|
|
766
781
|
[hidden]="!_isRail() && _isCollapsed(group.key)"
|
|
767
782
|
>
|
|
768
|
-
@for (
|
|
783
|
+
@for (row of _linkRows(group); track row.link.route) {
|
|
784
|
+
@let link = row.link;
|
|
785
|
+
@if (row.heading) {
|
|
786
|
+
<div class="nav-section-label" role="presentation" [attr.data-testid]="'nav-section-' + group.key">{{ row.heading }}</div>
|
|
787
|
+
}
|
|
769
788
|
<a
|
|
770
789
|
[routerLink]="link.route"
|
|
771
790
|
routerLinkActive="active"
|
|
@@ -886,7 +905,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
886
905
|
<ui-toast />
|
|
887
906
|
}
|
|
888
907
|
`,
|
|
889
|
-
styles: [":host{display:contents}.shell{display:flex;height:100vh;height:100dvh;overflow:hidden;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.sidebar-backdrop{display:none;position:fixed;inset:0;background:#00000080;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);z-index:199}.sidebar{width:256px;background:var(--shell-bg, linear-gradient(175deg, #0f172a 0%, #111827 100%));display:flex;flex-direction:column;flex-shrink:0;overflow:hidden}.sidebar-header{display:flex;align-items:center;padding:0 20px;min-height:64px;border-bottom:1px solid color-mix(in srgb,var(--shell-text, #fff) 6%,transparent);box-sizing:border-box}.brand-default{display:flex;align-items:center;gap:10px}.brand-text{font-size:1.125rem;font-weight:700;color:var(--shell-text, #fff);letter-spacing:-.01em}.sidebar-nav{padding:6px 0 8px;flex:1;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--shell-text, #fff) 8%,transparent) transparent}.sidebar-nav::-webkit-scrollbar{width:3px}.sidebar-nav::-webkit-scrollbar-track{background:transparent}.sidebar-nav::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--shell-text, #fff) 8%,transparent);border-radius:2px}.nav-group{margin-bottom:6px}.nav-group-links[hidden]{display:none}.nav-group-label{display:flex;align-items:center;gap:6px;width:100%;padding:8px 16px;font-size:.6875rem;font-weight:700;color:color-mix(in srgb,var(--shell-text, #fff) 80%,transparent);text-transform:uppercase;letter-spacing:.12em;background:none;border:none;cursor:pointer;transition:color .15s;text-align:left;border-radius:6px;background:color-mix(in srgb,var(--shell-text, #fff) 10%,transparent);margin:6px 4px 4px;width:calc(100% - 8px);box-sizing:border-box}.nav-group-label:hover{color:color-mix(in srgb,var(--shell-text, #fff) 100%,transparent)}.nav-group-label:focus-visible{outline:2px solid rgba(96,165,250,.5);outline-offset:-1px}.chevron{flex-shrink:0;transition:transform .2s cubic-bezier(.4,0,.2,1);opacity:.85}.chevron.collapsed{transform:rotate(-90deg)}.sidebar-nav a{display:flex;align-items:center;gap:10px;padding:8px 12px 8px 32px;color:color-mix(in srgb,var(--shell-text, #fff) 95%,transparent);font-size:.9375rem;font-weight:500;text-decoration:none;border-left:2px solid transparent;border-radius:0 8px 8px 0;margin-right:10px;transition:color .15s,background .15s,border-color .15s}.sidebar-nav a:hover{color:color-mix(in srgb,var(--shell-text, #fff) 100%,transparent);background:color-mix(in srgb,var(--shell-text, #fff) 6%,transparent)}.sidebar-nav a.active{color:var(--shell-text, #fff);background:#60a5fa21;border-left-color:#60a5fa;font-weight:600}.sidebar-nav a:focus-visible{outline:2px solid rgba(96,165,250,.5);outline-offset:-2px}.nav-icon{display:flex;align-items:center;flex-shrink:0}.nav-label{flex:1}.nav-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#ef4444;color:#fff;font-size:.625rem;font-weight:700;margin-left:auto}.sidebar-footer{padding:10px 14px;border-top:1px solid color-mix(in srgb,var(--shell-text, #fff) 6%,transparent)}.user-info{display:flex;align-items:center;gap:10px}.user-avatar{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,#60a5fa38,#60a5fa14);border:1px solid rgba(96,165,250,.18);color:color-mix(in srgb,var(--shell-text, #fff) 88%,transparent);font-size:.75rem;font-weight:600;display:flex;align-items:center;justify-content:center;flex-shrink:0}.user-details{display:flex;flex-direction:column;min-width:0;flex:1}.user-name{font-size:.8125rem;font-weight:600;color:var(--shell-text, #fff);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-role{font-size:.6875rem;color:color-mix(in srgb,var(--shell-text, #fff) 80%,transparent);text-transform:uppercase;letter-spacing:.05em;font-weight:500}.btn-logout{background:none;border:none;cursor:pointer;color:color-mix(in srgb,var(--shell-text, #fff) 85%,transparent);padding:6px;border-radius:8px;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:color .15s,background .15s}.btn-logout:hover{color:#f87171;background:#f871711a}.btn-logout:focus-visible{outline:2px solid rgba(96,165,250,.5);outline-offset:2px}.brand-full{display:flex;align-items:center;min-width:0;flex:1}.brand-mark{display:none}.shell.collapsed .brand-mark{width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:1.125rem;color:var(--shell-text, #fff);background:color-mix(in srgb,var(--shell-text, #fff) 15%,transparent)}.rail-toggle{display:none;align-items:center;justify-content:center;width:32px;height:32px;margin-left:auto;flex-shrink:0;border:none;background:none;cursor:pointer;border-radius:8px;color:color-mix(in srgb,var(--shell-text, #fff) 85%,transparent);transition:background .15s,color .15s}.rail-toggle:hover{background:color-mix(in srgb,var(--shell-text, #fff) 12%,transparent);color:var(--shell-text, #fff)}.rail-toggle:focus-visible{outline:2px solid rgba(96,165,250,.5);outline-offset:2px}.rail-divider{display:none}@media(min-width:1025px){.rail-toggle{display:flex}.sidebar{transition:width .2s cubic-bezier(.4,0,.2,1)}.shell.collapsed .sidebar{width:68px}.shell.collapsed .sidebar-header{flex-direction:column;justify-content:center;gap:4px;padding:8px 0}.shell.collapsed .brand-full{flex:none;width:44px;height:44px;overflow:hidden;border-radius:10px;justify-content:center}.shell.collapsed .brand-text{display:none}.shell.collapsed .rail-toggle{margin-left:0}.shell.collapsed .nav-group-label{display:none}.shell.collapsed .rail-divider{display:block;height:1px;margin:8px 14px;background:color-mix(in srgb,var(--shell-text, #fff) 20%,transparent)}.shell.collapsed .nav-group:first-child .rail-divider{display:none}.shell.collapsed .sidebar-nav a{position:relative;justify-content:center;padding:10px 0;margin:0 8px 2px;border-left:none;border-radius:8px}.shell.collapsed .sidebar-nav a.active{box-shadow:inset 3px 0 #60a5fa}.shell.collapsed .nav-label{display:none}.shell.collapsed .nav-badge{position:absolute;top:2px;right:4px;min-width:16px;height:16px;padding:0 4px;font-size:.5625rem;margin:0}.shell.collapsed .sidebar-footer{padding:10px 8px}.shell.collapsed .user-info{flex-direction:column;gap:8px}.shell.collapsed .user-details{display:none}}.main-area{flex:1;display:flex;flex-direction:column;overflow:hidden;min-width:0}.top-header{display:flex;align-items:center;gap:8px;padding:0 24px;background:#fff;box-shadow:0 1px 3px #00000012,0 1px #0000000a;min-height:64px;box-sizing:border-box;position:relative;z-index:50}.hamburger{display:none;align-items:center;justify-content:center;width:36px;height:36px;border:none;background:none;cursor:pointer;color:#374151;border-radius:8px;flex-shrink:0;transition:background .15s,color .15s}.hamburger:hover{background:#f3f4f6}.hamburger:focus-visible{outline:2px solid rgba(59,130,246,.5);outline-offset:2px}.page-title{font-size:1.25rem;font-weight:700;color:#111827;margin:0;letter-spacing:-.02em}.page-title:focus{outline:none}.read-only-badge{display:inline-flex;align-items:center;flex-shrink:0;padding:2px 8px;border-radius:9999px;font-size:.6875rem;font-weight:600;letter-spacing:.02em;text-transform:uppercase;background:#fef9c3;color:#854d0e;border:1px solid #fde68a;white-space:nowrap}.header-start{display:flex;align-items:center;min-width:0;margin-left:8px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}.header-start:empty{display:none}.header-start::-webkit-scrollbar{display:none}.header-end{display:flex;align-items:center;margin-left:auto}.content:focus{outline:none}.content{--shell-content-padding: 24px;flex:1;overflow-y:auto;padding:var(--shell-content-padding);background:#f7f8f6;display:flex;flex-direction:column;box-sizing:border-box;min-height:0}.content>*{flex:1;min-height:0;display:flex;flex-direction:column}.skip-link{position:absolute;top:-48px;left:8px;z-index:300;padding:8px 14px;border-radius:6px;background:#fff;color:#1d4ed8;font-size:.875rem;font-weight:600;text-decoration:none;box-shadow:0 2px 10px #00000040}.skip-link:focus{top:8px;outline:2px solid #1d4ed8;outline-offset:2px}.nav-group-label--static{cursor:default}@media(max-width:1024px){.hamburger{display:flex}.sidebar{position:fixed;top:0;left:0;bottom:0;z-index:200;transform:translate(-100%);transition:transform .26s cubic-bezier(.4,0,.2,1),box-shadow .26s cubic-bezier(.4,0,.2,1),visibility 0s linear .26s;visibility:hidden;box-shadow:none}.shell.sidebar-open .sidebar{transform:translate(0);box-shadow:4px 0 32px #0000004d;visibility:visible;transition-delay:0s}.shell.sidebar-open .sidebar-backdrop{display:block}.main-area{width:100%}.top-header{padding:0 16px;gap:4px}.content{--shell-content-padding: 16px}}@media(max-width:480px){.page-title{font-size:1.0625rem}.content{--shell-content-padding: 12px}}@media(pointer:coarse),(max-width:480px){.sidebar-nav a,.nav-group-label{min-height:44px}.btn-logout,.hamburger,.rail-toggle{min-width:44px;min-height:44px}}@media(prefers-reduced-motion:reduce){.chevron,.sidebar-nav a,.sidebar{transition:none!important}}\n"]
|
|
908
|
+
styles: [":host{display:contents}.shell{display:flex;height:100vh;height:100dvh;overflow:hidden;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.sidebar-backdrop{display:none;position:fixed;inset:0;background:#00000080;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);z-index:199}.sidebar{width:256px;background:var(--shell-bg, linear-gradient(175deg, #0f172a 0%, #111827 100%));display:flex;flex-direction:column;flex-shrink:0;overflow:hidden}.sidebar-header{display:flex;align-items:center;padding:0 20px;min-height:64px;border-bottom:1px solid color-mix(in srgb,var(--shell-text, #fff) 6%,transparent);box-sizing:border-box}.brand-default{display:flex;align-items:center;gap:10px}.brand-text{font-size:1.125rem;font-weight:700;color:var(--shell-text, #fff);letter-spacing:-.01em}.sidebar-nav{padding:6px 0 8px;flex:1;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--shell-text, #fff) 8%,transparent) transparent}.sidebar-nav::-webkit-scrollbar{width:3px}.sidebar-nav::-webkit-scrollbar-track{background:transparent}.sidebar-nav::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--shell-text, #fff) 8%,transparent);border-radius:2px}.nav-group{margin-bottom:6px}.nav-group-links[hidden]{display:none}.nav-group-label{display:flex;align-items:center;gap:6px;width:100%;padding:8px 16px;font-size:.6875rem;font-weight:700;color:color-mix(in srgb,var(--shell-text, #fff) 80%,transparent);text-transform:uppercase;letter-spacing:.12em;background:none;border:none;cursor:pointer;transition:color .15s;text-align:left;border-radius:6px;background:color-mix(in srgb,var(--shell-text, #fff) 10%,transparent);margin:6px 4px 4px;width:calc(100% - 8px);box-sizing:border-box}.nav-section-label{padding:10px 16px 3px;font-size:.625rem;font-weight:600;color:color-mix(in srgb,var(--shell-text, #fff) 55%,transparent);text-transform:uppercase;letter-spacing:.1em;-webkit-user-select:none;user-select:none}.nav-section-label:first-child{padding-top:4px}.nav-group-label:hover{color:color-mix(in srgb,var(--shell-text, #fff) 100%,transparent)}.nav-group-label:focus-visible{outline:2px solid rgba(96,165,250,.5);outline-offset:-1px}.chevron{flex-shrink:0;transition:transform .2s cubic-bezier(.4,0,.2,1);opacity:.85}.chevron.collapsed{transform:rotate(-90deg)}.sidebar-nav a{display:flex;align-items:center;gap:10px;padding:8px 12px 8px 32px;color:color-mix(in srgb,var(--shell-text, #fff) 95%,transparent);font-size:.9375rem;font-weight:500;text-decoration:none;border-left:2px solid transparent;border-radius:0 8px 8px 0;margin-right:10px;transition:color .15s,background .15s,border-color .15s}.sidebar-nav a:hover{color:color-mix(in srgb,var(--shell-text, #fff) 100%,transparent);background:color-mix(in srgb,var(--shell-text, #fff) 6%,transparent)}.sidebar-nav a.active{color:var(--shell-text, #fff);background:#60a5fa21;border-left-color:#60a5fa;font-weight:600}.sidebar-nav a:focus-visible{outline:2px solid rgba(96,165,250,.5);outline-offset:-2px}.nav-icon{display:flex;align-items:center;flex-shrink:0}.nav-label{flex:1}.nav-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#ef4444;color:#fff;font-size:.625rem;font-weight:700;margin-left:auto}.sidebar-footer{padding:10px 14px;border-top:1px solid color-mix(in srgb,var(--shell-text, #fff) 6%,transparent)}.user-info{display:flex;align-items:center;gap:10px}.user-avatar{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,#60a5fa38,#60a5fa14);border:1px solid rgba(96,165,250,.18);color:color-mix(in srgb,var(--shell-text, #fff) 88%,transparent);font-size:.75rem;font-weight:600;display:flex;align-items:center;justify-content:center;flex-shrink:0}.user-details{display:flex;flex-direction:column;min-width:0;flex:1}.user-name{font-size:.8125rem;font-weight:600;color:var(--shell-text, #fff);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-role{font-size:.6875rem;color:color-mix(in srgb,var(--shell-text, #fff) 80%,transparent);text-transform:uppercase;letter-spacing:.05em;font-weight:500}.btn-logout{background:none;border:none;cursor:pointer;color:color-mix(in srgb,var(--shell-text, #fff) 85%,transparent);padding:6px;border-radius:8px;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:color .15s,background .15s}.btn-logout:hover{color:#f87171;background:#f871711a}.btn-logout:focus-visible{outline:2px solid rgba(96,165,250,.5);outline-offset:2px}.brand-full{display:flex;align-items:center;min-width:0;flex:1}.brand-mark{display:none}.shell.collapsed .brand-mark{width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:1.125rem;color:var(--shell-text, #fff);background:color-mix(in srgb,var(--shell-text, #fff) 15%,transparent)}.rail-toggle{display:none;align-items:center;justify-content:center;width:32px;height:32px;margin-left:auto;flex-shrink:0;border:none;background:none;cursor:pointer;border-radius:8px;color:color-mix(in srgb,var(--shell-text, #fff) 85%,transparent);transition:background .15s,color .15s}.rail-toggle:hover{background:color-mix(in srgb,var(--shell-text, #fff) 12%,transparent);color:var(--shell-text, #fff)}.rail-toggle:focus-visible{outline:2px solid rgba(96,165,250,.5);outline-offset:2px}.rail-divider{display:none}@media(min-width:1025px){.rail-toggle{display:flex}.sidebar{transition:width .2s cubic-bezier(.4,0,.2,1)}.shell.collapsed .sidebar{width:68px}.shell.collapsed .sidebar-header{flex-direction:column;justify-content:center;gap:4px;padding:8px 0}.shell.collapsed .brand-full{flex:none;width:44px;height:44px;overflow:hidden;border-radius:10px;justify-content:center}.shell.collapsed .brand-text{display:none}.shell.collapsed .rail-toggle{margin-left:0}.shell.collapsed .nav-group-label,.shell.collapsed .nav-section-label{display:none}.shell.collapsed .rail-divider{display:block;height:1px;margin:8px 14px;background:color-mix(in srgb,var(--shell-text, #fff) 20%,transparent)}.shell.collapsed .nav-group:first-child .rail-divider{display:none}.shell.collapsed .sidebar-nav a{position:relative;justify-content:center;padding:10px 0;margin:0 8px 2px;border-left:none;border-radius:8px}.shell.collapsed .sidebar-nav a.active{box-shadow:inset 3px 0 #60a5fa}.shell.collapsed .nav-label{display:none}.shell.collapsed .nav-badge{position:absolute;top:2px;right:4px;min-width:16px;height:16px;padding:0 4px;font-size:.5625rem;margin:0}.shell.collapsed .sidebar-footer{padding:10px 8px}.shell.collapsed .user-info{flex-direction:column;gap:8px}.shell.collapsed .user-details{display:none}}.main-area{flex:1;display:flex;flex-direction:column;overflow:hidden;min-width:0}.top-header{display:flex;align-items:center;gap:8px;padding:0 24px;background:#fff;box-shadow:0 1px 3px #00000012,0 1px #0000000a;min-height:64px;box-sizing:border-box;position:relative;z-index:50}.hamburger{display:none;align-items:center;justify-content:center;width:36px;height:36px;border:none;background:none;cursor:pointer;color:#374151;border-radius:8px;flex-shrink:0;transition:background .15s,color .15s}.hamburger:hover{background:#f3f4f6}.hamburger:focus-visible{outline:2px solid rgba(59,130,246,.5);outline-offset:2px}.page-title{font-size:1.25rem;font-weight:700;color:#111827;margin:0;letter-spacing:-.02em}.page-title:focus{outline:none}.read-only-badge{display:inline-flex;align-items:center;flex-shrink:0;padding:2px 8px;border-radius:9999px;font-size:.6875rem;font-weight:600;letter-spacing:.02em;text-transform:uppercase;background:#fef9c3;color:#854d0e;border:1px solid #fde68a;white-space:nowrap}.header-start{display:flex;align-items:center;min-width:0;margin-left:8px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}.header-start:empty{display:none}.header-start::-webkit-scrollbar{display:none}.header-end{display:flex;align-items:center;margin-left:auto}.content:focus{outline:none}.content{--shell-content-padding: 24px;flex:1;overflow-y:auto;padding:var(--shell-content-padding);background:#f7f8f6;display:flex;flex-direction:column;box-sizing:border-box;min-height:0}.content>*{flex:1;min-height:0;display:flex;flex-direction:column}.skip-link{position:absolute;top:-48px;left:8px;z-index:300;padding:8px 14px;border-radius:6px;background:#fff;color:#1d4ed8;font-size:.875rem;font-weight:600;text-decoration:none;box-shadow:0 2px 10px #00000040}.skip-link:focus{top:8px;outline:2px solid #1d4ed8;outline-offset:2px}.nav-group-label--static{cursor:default}@media(max-width:1024px){.hamburger{display:flex}.sidebar{position:fixed;top:0;left:0;bottom:0;z-index:200;transform:translate(-100%);transition:transform .26s cubic-bezier(.4,0,.2,1),box-shadow .26s cubic-bezier(.4,0,.2,1),visibility 0s linear .26s;visibility:hidden;box-shadow:none}.shell.sidebar-open .sidebar{transform:translate(0);box-shadow:4px 0 32px #0000004d;visibility:visible;transition-delay:0s}.shell.sidebar-open .sidebar-backdrop{display:block}.main-area{width:100%}.top-header{padding:0 16px;gap:4px}.content{--shell-content-padding: 16px}}@media(max-width:480px){.page-title{font-size:1.0625rem}.content{--shell-content-padding: 12px}}@media(pointer:coarse),(max-width:480px){.sidebar-nav a,.nav-group-label{min-height:44px}.btn-logout,.hamburger,.rail-toggle{min-width:44px;min-height:44px}}@media(prefers-reduced-motion:reduce){.chevron,.sidebar-nav a,.sidebar{transition:none!important}}\n"]
|
|
890
909
|
}]
|
|
891
910
|
}],
|
|
892
911
|
propDecorators: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgeroute-ui-shell.mjs","names":[],"sources":["../../../projects/forgeroute-ui/shell/src/lib/app-shell/shell-projected-styles.component.ts","../../../projects/forgeroute-ui/shell/src/lib/app-shell/app-shell.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\n/**\n * Styles for the two places where `ui-app-shell` shows markup it does not own: the nav icons (an `[innerHTML]` SVG string) and the projected\n * `[shell-brand]` logo. Angular's scoped styles cannot reach that markup, so these rules live in this style-only component, which is unscoped\n * (`ViewEncapsulation.None`) and renders nothing. Every selector starts with `ui-app-shell`, so nothing leaks to the app, and the shell's own\n * stylesheet stays scoped with no `::ng-deep`.\n */\n@Component({\n selector: 'ui-shell-projected-styles',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: '',\n styles: [`\n ui-shell-projected-styles { display: none; }\n\n ui-app-shell .nav-icon svg {\n width: 17px;\n height: 17px;\n stroke: color-mix(in srgb, var(--shell-text, #fff) 90%, transparent);\n transition: stroke 150ms;\n flex-shrink: 0;\n }\n ui-app-shell .sidebar-nav a:hover .nav-icon svg { stroke: color-mix(in srgb, var(--shell-text, #fff) 100%, transparent); }\n ui-app-shell .sidebar-nav a.active .nav-icon svg { stroke: #93c5fd; }\n\n @media (min-width: 1025px) {\n /* Rail: the projected brand is cropped to a centered square mark */\n ui-app-shell .shell.collapsed .brand-full img,\n ui-app-shell .shell.collapsed .brand-full svg {\n width: 44px; height: 44px; max-width: none; object-fit: cover; object-position: 50% 42%;\n }\n ui-app-shell .shell.collapsed .nav-icon svg { width: 20px; height: 20px; }\n }\n\n @media (prefers-reduced-motion: reduce) {\n ui-app-shell .nav-icon svg { transition: none !important; }\n }\n `],\n})\nexport class ShellProjectedStylesComponent {}\n","import {\n Component, input, output, signal, computed,\n inject, OnInit, OnDestroy, ChangeDetectionStrategy, ElementRef, Injector, afterNextRender,\n} from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { RouterLink, RouterLinkActive, Router, NavigationEnd, ActivatedRouteSnapshot } from '@angular/router';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { filter, Subscription } from 'rxjs';\nimport { ConfirmOutletComponent } from '@forgeroute/ui/core';\nimport { ToastComponent } from '@forgeroute/ui/toast';\nimport { ShellProjectedStylesComponent } from './shell-projected-styles.component';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\n// ── Public interfaces ────────────────────────────────────────────────────────\n\nexport interface NavLink {\n label: string;\n route: string;\n /** Full <svg>…</svg> HTML string used as the icon. */\n icon?: string;\n /** Require an exact URL match for routerLinkActive. Default false. */\n exact?: boolean;\n /** Red badge count shown on the link (e.g. unread messages). */\n badge?: number;\n /** Hide this link. Default true (visible). */\n visible?: boolean;\n}\n\nexport interface NavGroup {\n key: string;\n label: string;\n /** Hide the entire group. Default true (visible). */\n visible?: boolean;\n /** Start collapsed. Default false. */\n defaultCollapsed?: boolean;\n links: NavLink[];\n}\n\nexport interface ShellUser {\n firstName?: string;\n lastName?: string;\n role?: string;\n}\n\n/** localStorage key the shell uses for a given `persistKey` (exported so apps can migrate an older key). */\nexport function appShellGroupsStorageKey(persistKey: string): string {\n return `ui-app-shell-groups:${persistKey}`;\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n\n@Component({\n selector: 'ui-app-shell',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [RouterLink, RouterLinkActive, ConfirmOutletComponent, ToastComponent, ShellProjectedStylesComponent],\n template: `\n <div\n class=\"shell\"\n [class.sidebar-open]=\"_sidebarOpen()\"\n [class.collapsed]=\"_isRail()\"\n (keydown)=\"onShellKeydown($event)\"\n [style.--shell-bg]=\"backgroundColor() || null\"\n [style.--shell-text]=\"textColor() || null\"\n >\n <ui-shell-projected-styles />\n\n <!-- Keyboard users jump past the navigation straight to the page content -->\n <a class=\"skip-link\" href=\"#main-content\" (click)=\"skipToContent($event)\">{{ labels.t('appShell.skipToMainContent') }}</a>\n\n <!-- Mobile backdrop -->\n <div\n class=\"sidebar-backdrop\"\n (click)=\"closeSidebar()\"\n aria-hidden=\"true\"\n ></div>\n\n <!-- ── Sidebar ────────────────────────────────────────────── -->\n <aside class=\"sidebar\" id=\"main-sidebar\" [attr.aria-label]=\"labels.t('appShell.mainNavigation')\">\n\n <!-- Brand slot (project custom brand or fallback to appName) -->\n <div class=\"sidebar-header\">\n <div class=\"brand-full\">\n <ng-content select=\"[shell-brand]\">\n <div class=\"brand-default\">\n <span class=\"brand-mark\" aria-hidden=\"true\">{{ appName().charAt(0) }}</span>\n <span class=\"brand-text\">{{ appName() }}</span>\n </div>\n </ng-content>\n </div>\n @if (collapsible()) {\n <button\n class=\"rail-toggle\"\n type=\"button\"\n [attr.aria-label]=\"_collapsed() ? labels.t('appShell.expandSidebar') : labels.t('appShell.collapseSidebar')\"\n [attr.aria-pressed]=\"_collapsed()\"\n [attr.title]=\"_collapsed() ? labels.t('appShell.expandSidebar') : labels.t('appShell.collapseSidebar')\"\n (click)=\"toggleCollapsed()\"\n >\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n @if (_collapsed()) {\n <path d=\"M13 5l7 7-7 7M5 5l7 7-7 7\"/>\n } @else {\n <path d=\"M11 19l-7-7 7-7m8 14l-7-7 7-7\"/>\n }\n </svg>\n </button>\n }\n </div>\n\n <!-- Nav groups -->\n <nav class=\"sidebar-nav\" [attr.aria-label]=\"labels.t('appShell.siteNavigation')\">\n @for (group of _visibleGroups(); track group.key) {\n <div class=\"nav-group\">\n @if (_isRail()) { <div class=\"rail-divider\" aria-hidden=\"true\"></div> }\n @if (_canCollapseGroups()) {\n <button\n class=\"nav-group-label\"\n type=\"button\"\n [attr.aria-expanded]=\"!_isCollapsed(group.key)\"\n [attr.aria-controls]=\"'navg-' + group.key\"\n (click)=\"toggleGroup(group.key)\"\n >\n <svg\n class=\"chevron\"\n [class.collapsed]=\"_isCollapsed(group.key)\"\n width=\"12\" height=\"12\" viewBox=\"0 0 24 24\"\n fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\"\n aria-hidden=\"true\"\n >\n <polyline points=\"6 9 12 15 18 9\"/>\n </svg>\n {{ group.label }}\n </button>\n } @else {\n <!-- A single group can't be collapsed: hiding it would remove the whole navigation -->\n <div class=\"nav-group-label nav-group-label--static\" [id]=\"'navg-label-' + group.key\">{{ group.label }}</div>\n }\n\n <!-- Always rendered so the toggle's aria-controls resolves; [hidden] (plus display:none in the CSS) removes the links of a collapsed group from view and from the tab order -->\n <div\n class=\"nav-group-links\"\n [id]=\"'navg-' + group.key\"\n [hidden]=\"!_isRail() && _isCollapsed(group.key)\"\n >\n @for (link of _visibleLinks(group); track link.route) {\n <a\n [routerLink]=\"link.route\"\n routerLinkActive=\"active\"\n [routerLinkActiveOptions]=\"{ exact: !!link.exact }\"\n #rla=\"routerLinkActive\"\n [attr.aria-current]=\"rla.isActive ? 'page' : null\"\n [attr.title]=\"_isRail() ? link.label : null\"\n [attr.aria-label]=\"_isRail() ? link.label : null\"\n >\n @if (link.icon) {\n <span\n class=\"nav-icon\"\n [innerHTML]=\"_safeIcon(link.icon)\"\n aria-hidden=\"true\"\n ></span>\n }\n <span class=\"nav-label\">{{ link.label }}</span>\n @if (link.badge && link.badge > 0) {\n <span\n class=\"nav-badge\"\n [attr.aria-label]=\"labels.t('appShell.unreadCount', { count: link.badge })\"\n >{{ link.badge }}</span>\n }\n </a>\n }\n </div>\n </div>\n }\n </nav>\n\n <!-- User footer -->\n <div class=\"sidebar-footer\">\n <div class=\"user-info\">\n <div class=\"user-avatar\" aria-hidden=\"true\">{{ _userInitials() }}</div>\n <div class=\"user-details\">\n <span class=\"user-name\">{{ _userName() }}</span>\n @if (user()?.role) {\n <span class=\"user-role\">{{ user()!.role }}</span>\n }\n </div>\n <button\n class=\"btn-logout\"\n type=\"button\"\n [attr.aria-label]=\"labels.t('appShell.logOut')\"\n (click)=\"logoutClick.emit()\"\n >\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\n stroke=\"currentColor\" stroke-width=\"1.8\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <path d=\"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4\"/>\n <polyline points=\"16 17 21 12 16 7\"/>\n <line x1=\"21\" y1=\"12\" x2=\"9\" y2=\"12\"/>\n </svg>\n </button>\n </div>\n </div>\n </aside>\n\n <!-- ── Main area ──────────────────────────────────────────── -->\n <div class=\"main-area\">\n\n <!-- Top header -->\n <header class=\"top-header\" role=\"banner\">\n <button\n class=\"hamburger\"\n type=\"button\"\n [attr.aria-expanded]=\"_sidebarOpen()\"\n aria-controls=\"main-sidebar\"\n [attr.aria-label]=\"labels.t('appShell.toggleNavigation')\"\n (click)=\"toggleSidebar()\"\n >\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\"\n stroke=\"currentColor\" stroke-width=\"2\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <line x1=\"3\" y1=\"6\" x2=\"21\" y2=\"6\"/>\n <line x1=\"3\" y1=\"12\" x2=\"21\" y2=\"12\"/>\n <line x1=\"3\" y1=\"18\" x2=\"21\" y2=\"18\"/>\n </svg>\n </button>\n\n @if (_title()) {\n <h1 class=\"page-title\" id=\"shell-page-title\" tabindex=\"-1\">{{ _title() }}</h1>\n }\n\n @if (readOnly()) {\n <span\n class=\"read-only-badge\"\n role=\"status\"\n [attr.aria-label]=\"labels.t('appShell.thisPageIsReadOnly')\"\n >{{ labels.t('appShell.readOnly') }}</span>\n }\n\n <!-- Optional page-level navigation next to the title (e.g. a <ui-pill-tabs> of the page's views) -->\n <div class=\"header-start\"><ng-content select=\"[shell-header-start]\" /></div>\n\n <!-- Right-side header content (search, notifications, etc.) -->\n <div class=\"header-end\">\n <ng-content select=\"[shell-header-end]\" />\n </div>\n </header>\n\n <!-- Banners / toasts above content -->\n <ng-content select=\"[shell-banners]\" />\n\n <!-- Page content -->\n <main class=\"content\" id=\"main-content\" role=\"main\" tabindex=\"-1\" [attr.aria-labelledby]=\"_title() ? 'shell-page-title' : null\">\n <ng-content />\n </main>\n </div>\n </div>\n\n <!-- Global confirm overlay — position:fixed so it overlays without affecting layout -->\n <ui-confirm-outlet />\n\n @if (showToast()) {\n <ui-toast />\n }\n `,\n styles: [`\n :host { display: contents; }\n\n /* ── Shell frame ────────────────────────────────────────────── */\n .shell {\n display: flex;\n height: 100vh; /* fallback for browsers without dvh */\n height: 100dvh; /* excludes the mobile browser's collapsing URL bar */\n overflow: hidden;\n font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n }\n\n /* ── Backdrop ────────────────────────────────────────────────── */\n .sidebar-backdrop {\n display: none;\n position: fixed;\n inset: 0;\n background: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(2px);\n -webkit-backdrop-filter: blur(2px);\n z-index: 199;\n }\n\n /* ── Sidebar ─────────────────────────────────────────────────── */\n .sidebar {\n width: 256px;\n background: var(--shell-bg, linear-gradient(175deg, #0f172a 0%, #111827 100%));\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n overflow: hidden;\n }\n\n .sidebar-header {\n display: flex;\n align-items: center;\n padding: 0 20px;\n min-height: 64px;\n border-bottom: 1px solid color-mix(in srgb, var(--shell-text, #fff) 6%, transparent);\n box-sizing: border-box;\n }\n\n .brand-default {\n display: flex;\n align-items: center;\n gap: 10px;\n }\n .brand-text {\n font-size: 1.125rem;\n font-weight: 700;\n color: var(--shell-text, #fff);\n letter-spacing: -0.01em;\n }\n\n /* ── Nav ──────────────────────────────────────────────────────── */\n .sidebar-nav {\n padding: 6px 0 8px;\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-width: thin;\n scrollbar-color: color-mix(in srgb, var(--shell-text, #fff) 8%, transparent) transparent;\n }\n .sidebar-nav::-webkit-scrollbar { width: 3px; }\n .sidebar-nav::-webkit-scrollbar-track { background: transparent; }\n .sidebar-nav::-webkit-scrollbar-thumb {\n background: color-mix(in srgb, var(--shell-text, #fff) 8%, transparent);\n border-radius: 2px;\n }\n\n .nav-group { margin-bottom: 6px; }\n /* A collapsed group's links stay in the DOM (aria-controls target) but must not be visible or focusable */\n .nav-group-links[hidden] { display: none; }\n\n .nav-group-label {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 8px 16px;\n font-size: 0.6875rem;\n font-weight: 700;\n color: color-mix(in srgb, var(--shell-text, #fff) 80%, transparent);\n text-transform: uppercase;\n letter-spacing: 0.12em;\n background: none;\n border: none;\n cursor: pointer;\n transition: color 150ms;\n text-align: left;\n border-radius: 6px;\n background: color-mix(in srgb, var(--shell-text, #fff) 10%, transparent);\n margin: 6px 4px 4px;\n width: calc(100% - 8px);\n box-sizing: border-box;\n }\n .nav-group-label:hover { color: color-mix(in srgb, var(--shell-text, #fff) 100%, transparent); }\n .nav-group-label:focus-visible {\n outline: 2px solid rgba(96, 165, 250, 0.5);\n outline-offset: -1px;\n }\n\n .chevron {\n flex-shrink: 0;\n transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);\n opacity: 0.85;\n }\n .chevron.collapsed { transform: rotate(-90deg); }\n\n /* Nav links */\n .sidebar-nav a {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 8px 12px 8px 32px;\n color: color-mix(in srgb, var(--shell-text, #fff) 95%, transparent);\n font-size: 0.9375rem;\n font-weight: 500;\n text-decoration: none;\n border-left: 2px solid transparent;\n border-radius: 0 8px 8px 0;\n margin-right: 10px;\n transition: color 150ms, background 150ms, border-color 150ms;\n }\n .sidebar-nav a:hover {\n color: color-mix(in srgb, var(--shell-text, #fff) 100%, transparent);\n background: color-mix(in srgb, var(--shell-text, #fff) 6%, transparent);\n }\n .sidebar-nav a.active {\n color: var(--shell-text, #fff);\n background: rgba(96, 165, 250, 0.13);\n border-left-color: #60a5fa;\n font-weight: 600;\n }\n .sidebar-nav a:focus-visible {\n outline: 2px solid rgba(96, 165, 250, 0.5);\n outline-offset: -2px;\n }\n\n /* Icons */\n .nav-icon {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n }\n\n .nav-label { flex: 1; }\n\n .nav-badge {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 18px;\n height: 18px;\n padding: 0 5px;\n border-radius: 9px;\n background: #ef4444;\n color: #fff;\n font-size: 0.625rem;\n font-weight: 700;\n margin-left: auto;\n }\n\n /* ── User footer ──────────────────────────────────────────────── */\n .sidebar-footer {\n padding: 10px 14px;\n border-top: 1px solid color-mix(in srgb, var(--shell-text, #fff) 6%, transparent);\n }\n .user-info {\n display: flex;\n align-items: center;\n gap: 10px;\n }\n .user-avatar {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n background: linear-gradient(135deg, rgba(96, 165, 250, 0.22), rgba(96, 165, 250, 0.08));\n border: 1px solid rgba(96, 165, 250, 0.18);\n color: color-mix(in srgb, var(--shell-text, #fff) 88%, transparent);\n font-size: 0.75rem;\n font-weight: 600;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n .user-details {\n display: flex;\n flex-direction: column;\n min-width: 0;\n flex: 1;\n }\n .user-name {\n font-size: 0.8125rem;\n font-weight: 600;\n color: var(--shell-text, #fff);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .user-role {\n font-size: 0.6875rem;\n color: color-mix(in srgb, var(--shell-text, #fff) 80%, transparent);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n font-weight: 500;\n }\n .btn-logout {\n background: none;\n border: none;\n cursor: pointer;\n color: color-mix(in srgb, var(--shell-text, #fff) 85%, transparent);\n padding: 6px;\n border-radius: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n transition: color 150ms, background 150ms;\n }\n .btn-logout:hover { color: #f87171; background: rgba(248, 113, 113, 0.1); }\n .btn-logout:focus-visible {\n outline: 2px solid rgba(96, 165, 250, 0.5);\n outline-offset: 2px;\n }\n\n\n /* ── Collapsed rail (desktop only) ────────────────────────────── */\n .brand-full { display: flex; align-items: center; min-width: 0; flex: 1; }\n .brand-mark { display: none; }\n .shell.collapsed .brand-mark {\n width: 36px; height: 36px; border-radius: 10px;\n display: flex; align-items: center; justify-content: center;\n font-weight: 700; font-size: 1.125rem;\n color: var(--shell-text, #fff);\n background: color-mix(in srgb, var(--shell-text, #fff) 15%, transparent);\n }\n .rail-toggle {\n display: none;\n align-items: center; justify-content: center;\n width: 32px; height: 32px; margin-left: auto; flex-shrink: 0;\n border: none; background: none; cursor: pointer; border-radius: 8px;\n color: color-mix(in srgb, var(--shell-text, #fff) 85%, transparent);\n transition: background 150ms, color 150ms;\n }\n .rail-toggle:hover {\n background: color-mix(in srgb, var(--shell-text, #fff) 12%, transparent);\n color: var(--shell-text, #fff);\n }\n .rail-toggle:focus-visible { outline: 2px solid rgba(96, 165, 250, 0.5); outline-offset: 2px; }\n .rail-divider { display: none; }\n\n @media (min-width: 1025px) {\n .rail-toggle { display: flex; }\n .sidebar { transition: width 200ms cubic-bezier(0.4, 0, 0.2, 1); }\n .shell.collapsed .sidebar { width: 68px; }\n .shell.collapsed .sidebar-header { padding: 0; flex-direction: column; justify-content: center; gap: 4px; padding: 8px 0; }\n /* Rail: the projected brand is cropped to a centered square mark; default text brand shows its initial */\n .shell.collapsed .brand-full {\n flex: none; width: 44px; height: 44px; overflow: hidden; border-radius: 10px;\n justify-content: center;\n }\n .shell.collapsed .brand-text { display: none; }\n .shell.collapsed .rail-toggle { margin-left: 0; }\n .shell.collapsed .nav-group-label { display: none; }\n .shell.collapsed .rail-divider {\n display: block; height: 1px; margin: 8px 14px;\n background: color-mix(in srgb, var(--shell-text, #fff) 20%, transparent);\n }\n .shell.collapsed .nav-group:first-child .rail-divider { display: none; }\n .shell.collapsed .sidebar-nav a {\n position: relative; justify-content: center;\n padding: 10px 0; margin: 0 8px 2px; border-left: none; border-radius: 8px;\n }\n .shell.collapsed .sidebar-nav a.active { box-shadow: inset 3px 0 0 #60a5fa; }\n .shell.collapsed .nav-label { display: none; }\n .shell.collapsed .nav-badge {\n position: absolute; top: 2px; right: 4px; min-width: 16px; height: 16px;\n padding: 0 4px; font-size: 0.5625rem; margin: 0;\n }\n .shell.collapsed .sidebar-footer { padding: 10px 8px; }\n .shell.collapsed .user-info { flex-direction: column; gap: 8px; }\n .shell.collapsed .user-details { display: none; }\n }\n\n /* ── Main area ────────────────────────────────────────────────── */\n .main-area {\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n min-width: 0;\n }\n\n /* ── Header ───────────────────────────────────────────────────── */\n .top-header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 0 24px;\n background: #fff;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 1px 0 rgba(0, 0, 0, 0.04);\n min-height: 64px;\n box-sizing: border-box;\n position: relative;\n z-index: 50;\n }\n\n .hamburger {\n display: none;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 36px;\n border: none;\n background: none;\n cursor: pointer;\n color: #374151;\n border-radius: 8px;\n flex-shrink: 0;\n transition: background 150ms, color 150ms;\n }\n .hamburger:hover { background: #f3f4f6; }\n .hamburger:focus-visible {\n outline: 2px solid rgba(59, 130, 246, 0.5);\n outline-offset: 2px;\n }\n\n .page-title {\n font-size: 1.25rem;\n font-weight: 700;\n color: #111827;\n margin: 0;\n letter-spacing: -0.02em;\n }\n /* focusable only by script (tabindex -1) so an app can move focus to the heading after navigation; no ring on a non-interactive heading */\n .page-title:focus { outline: none; }\n\n .read-only-badge {\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n padding: 2px 8px;\n border-radius: 9999px;\n font-size: 0.6875rem;\n font-weight: 600;\n letter-spacing: 0.02em;\n text-transform: uppercase;\n background: #fef9c3;\n color: #854d0e;\n border: 1px solid #fde68a;\n white-space: nowrap;\n }\n\n /* Optional slot: hidden while nothing is projected; otherwise it takes the free space between the title and header-end and scrolls sideways instead of wrapping the bar */\n .header-start { display: flex; align-items: center; min-width: 0; margin-left: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }\n .header-start:empty { display: none; }\n .header-start::-webkit-scrollbar { display: none; }\n\n .header-end {\n display: flex;\n align-items: center;\n margin-left: auto;\n }\n\n /* ── Content ──────────────────────────────────────────────────── */\n .content:focus { outline: none; }\n .content {\n /* The content area's padding, published for children that must reach the viewport edges (ui-fixed-footer). */\n --shell-content-padding: 24px;\n flex: 1;\n overflow-y: auto;\n padding: var(--shell-content-padding);\n background: #F7F8F6;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n min-height: 0;\n }\n .content > * {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n }\n\n /* Skip link: off screen until it receives keyboard focus */\n .skip-link {\n position: absolute; top: -48px; left: 8px; z-index: 300;\n padding: 8px 14px; border-radius: 6px;\n background: #fff; color: #1d4ed8; font-size: 0.875rem; font-weight: 600; text-decoration: none;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);\n }\n .skip-link:focus { top: 8px; outline: 2px solid #1d4ed8; outline-offset: 2px; }\n\n /* A lone group is a plain heading, not a toggle */\n .nav-group-label--static { cursor: default; }\n\n /* ── Tablet / Mobile ≤ 1024px ─────────────────────────────────── */\n @media (max-width: 1024px) {\n .hamburger { display: flex; }\n\n .sidebar {\n position: fixed;\n top: 0; left: 0; bottom: 0;\n z-index: 200;\n transform: translateX(-100%);\n transition: transform 260ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 260ms cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 260ms;\n /* A closed drawer is only off screen: hide it from the tab order and the accessibility tree once the slide-out finishes. */\n visibility: hidden;\n /* No shadow while the drawer is closed: its 32px blur would leak in from the left edge of the page. */\n box-shadow: none;\n }\n .shell.sidebar-open .sidebar { transform: translateX(0); box-shadow: 4px 0 32px rgba(0, 0, 0, 0.3); visibility: visible; transition-delay: 0s; }\n .shell.sidebar-open .sidebar-backdrop { display: block; }\n\n .main-area { width: 100%; }\n .top-header { padding: 0 16px; gap: 4px; }\n .content { --shell-content-padding: 16px; }\n }\n\n /* ── Small mobile ≤ 480px ─────────────────────────────────────── */\n @media (max-width: 480px) {\n .page-title { font-size: 1.0625rem; }\n .content { --shell-content-padding: 12px; }\n }\n\n /* ── Touch targets: every interactive control is at least 44px tall on touch screens (tablets included) and phones ── */\n @media (pointer: coarse), (max-width: 480px) {\n .sidebar-nav a { min-height: 44px; }\n .nav-group-label { min-height: 44px; }\n .btn-logout { min-width: 44px; min-height: 44px; }\n .hamburger { min-width: 44px; min-height: 44px; }\n .rail-toggle { min-width: 44px; min-height: 44px; }\n }\n\n /* ── Reduced motion ──────────────────────────────────────────── */\n @media (prefers-reduced-motion: reduce) {\n .chevron, .sidebar-nav a, .sidebar { transition: none !important; }\n }\n `],\n})\nexport class AppShellComponent implements OnInit, OnDestroy {\n protected readonly labels = inject(UiLabelsService);\n private readonly sanitizer = inject(DomSanitizer);\n private readonly router = inject(Router);\n private _routerSub?: Subscription;\n\n // ── Inputs ────────────────────────────────────────────────────\n readonly navGroups = input<NavGroup[]>([]);\n /**\n * The page's title, rendered in the top bar as the page's single `<h1>` (id `shell-page-title`, `tabindex=\"-1\"` so an app can\n * focus it after navigation) and used as the accessible name of `<main>`. A page that has no title here keeps its own heading.\n * A page shown with a title MUST NOT also render its own `<h1>` (that would be two h1s); give it a visually hidden one only\n * when the title is not set.\n */\n readonly pageTitle = input('');\n /**\n * Show the app's toasts (renders one `<ui-toast />` for the whole shell). Default false so an app that already renders its own `<ui-toast />`\n * is unchanged; an app that sets this removes its own.\n */\n readonly showToast = input(false);\n readonly appNameInput = input<string | null>(null, { alias: 'appName' });\n readonly appName = computed(() => this.appNameInput() ?? this.labels.t('appShell.appName'));\n readonly user = input<ShellUser | null>(null);\n readonly readOnly = input(false);\n /** Sidebar background — any CSS background value (color or gradient). Falls back to the default dark gradient. */\n readonly backgroundColor = input<string>('');\n /** Sidebar text/icon color — any CSS color. Hover/muted shades are derived from it. Falls back to white. */\n readonly textColor = input<string>('');\n /** Show a desktop toggle that shrinks the sidebar to icons only. The choice is remembered per browser. */\n readonly collapsible = input(false);\n /**\n * When set, which nav groups the user opened/closed is saved to localStorage under this key\n * and restored on load (plain per-browser storage). Include a user id in the key for per-user state.\n * Unset = nothing is stored.\n */\n readonly persistKey = input<string>('');\n\n // ── Outputs ───────────────────────────────────────────────────\n readonly logoutClick = output<void>();\n\n // ── Internal state ────────────────────────────────────────────\n protected readonly _sidebarOpen = signal(false);\n /** `data.pageTitle` of the deepest activated route that sets one ('' when none does). Updated on every NavigationEnd. */\n protected readonly _routeTitle = signal('');\n /** The title shown in the top bar: the `pageTitle` input when the app sets one (it wins), else the route's `data.pageTitle`. */\n protected readonly _title = computed(() => this.pageTitle() || this._routeTitle());\n protected readonly _collapsed = signal(AppShellComponent._loadCollapsed());\n /** The rail (icons-only sidebar) only exists on the desktop layout; on the drawer layout (≤1024px) a saved rail choice is ignored. */\n protected readonly _drawerLayout = signal(false);\n protected readonly _isRail = computed(() => this.collapsible() && this._collapsed() && !this._drawerLayout());\n private readonly _collapsedGroups = signal<Record<string, boolean>>({});\n\n // ── Computed ──────────────────────────────────────────────────\n protected readonly _visibleGroups = computed(() =>\n this.navGroups().filter(g => g.visible !== false)\n );\n\n protected readonly _userInitials = computed(() => {\n const u = this.user();\n return `${u?.firstName?.charAt(0) ?? ''}${u?.lastName?.charAt(0) ?? ''}`;\n });\n\n protected readonly _userName = computed(() => {\n const u = this.user();\n return [u?.firstName, u?.lastName].filter(Boolean).join(' ');\n });\n\n // ── Icon cache (avoids repeated DomSanitizer calls) ───────────\n private readonly _iconCache = new Map<string, SafeHtml>();\n\n _safeIcon(svg: string): SafeHtml {\n let safe = this._iconCache.get(svg);\n if (!safe) {\n safe = this.sanitizer.bypassSecurityTrustHtml(svg);\n this._iconCache.set(svg, safe);\n }\n return safe;\n }\n\n _visibleLinks(group: NavGroup): NavLink[] {\n return group.links.filter(l => l.visible !== false);\n }\n\n // ── Group collapse ────────────────────────────────────────────\n /** Groups can only be collapsed when there is more than one: a lone group stays open so the navigation can never be hidden. */\n protected _canCollapseGroups(): boolean { return this._visibleGroups().length > 1; }\n\n _isCollapsed(key: string): boolean {\n return this._canCollapseGroups() && !!this._collapsedGroups()[key];\n }\n\n toggleGroup(key: string): void {\n const collapsed = !this._collapsedGroups()[key];\n this._collapsedGroups.update(g => ({ ...g, [key]: collapsed }));\n this._saveGroup(key, collapsed);\n }\n\n private _readSavedGroups(): Record<string, boolean> {\n const pk = this.persistKey();\n if (!pk) return {};\n try {\n const raw = JSON.parse(localStorage.getItem(appShellGroupsStorageKey(pk)) ?? 'null');\n if (!raw || typeof raw !== 'object' || Array.isArray(raw)) return {};\n return Object.fromEntries(Object.entries(raw).filter(([, v]) => typeof v === 'boolean')) as Record<string, boolean>;\n } catch { return {}; }\n }\n\n /** Only groups the user toggled are stored, so groups added later keep their defaults. */\n private _saveGroup(key: string, collapsed: boolean): void {\n const pk = this.persistKey();\n if (!pk) return;\n try {\n const saved = { ...this._readSavedGroups(), [key]: collapsed };\n localStorage.setItem(appShellGroupsStorageKey(pk), JSON.stringify(saved));\n } catch { /* storage unavailable */ }\n }\n\n toggleCollapsed(): void {\n const next = !this._collapsed();\n this._collapsed.set(next);\n try { localStorage.setItem(AppShellComponent._COLLAPSE_KEY, String(next)); } catch { /* storage unavailable */ }\n }\n\n private static readonly _COLLAPSE_KEY = 'ui-app-shell-collapsed';\n private static _loadCollapsed(): boolean {\n try { return localStorage.getItem(AppShellComponent._COLLAPSE_KEY) === 'true'; } catch { return false; }\n }\n\n private readonly _host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly _injector = inject(Injector);\n private readonly _document = inject(DOCUMENT, { optional: true });\n\n /** The drawer layout is exactly the complement of the desktop layout the CSS rail rules use (min-width: 1025px): no viewport width falls in between. */\n private static readonly _DRAWER_MQ = 'not all and (min-width: 1025px)';\n\n private static readonly _FOCUSABLE = 'a[href]:not([tabindex=\"-1\"]), button:not([disabled]):not([tabindex=\"-1\"]), input:not([disabled]):not([type=\"hidden\"]):not([tabindex=\"-1\"]), select:not([disabled]):not([tabindex=\"-1\"]), textarea:not([disabled]):not([tabindex=\"-1\"]), [tabindex]:not([tabindex=\"-1\"]), summary:not([tabindex=\"-1\"]), [contenteditable]:not([contenteditable=\"false\"]):not([tabindex=\"-1\"]), iframe:not([tabindex=\"-1\"]), audio[controls]:not([tabindex=\"-1\"]), video[controls]:not([tabindex=\"-1\"])';\n\n private _sidebarFocusables(): HTMLElement[] {\n const aside = this._host.nativeElement.querySelector('.sidebar');\n // Only controls that are actually rendered: e.g. the rail toggle is display:none on the drawer layout and can't take focus.\n return aside\n ? Array.from(aside.querySelectorAll<HTMLElement>(AppShellComponent._FOCUSABLE)).filter(el => !el.hidden && el.getClientRects().length > 0)\n : [];\n }\n\n private _hamburger(): HTMLElement | null { return this._host.nativeElement.querySelector('.hamburger'); }\n\n toggleSidebar(): void {\n if (this._sidebarOpen()) this.closeSidebar(true);\n else this.openSidebar();\n }\n\n /** Opens the drawer (drawer layout only; a no-op on desktop) and moves keyboard focus into it, so the links behind the backdrop are not reachable until it closes. */\n openSidebar(): void {\n // The drawer only exists on the drawer layout: an open state on desktop would reopen the drawer when the window shrinks.\n if (!this._drawerLayout()) return;\n this._sidebarOpen.set(true);\n afterNextRender(() => this._sidebarFocusables()[0]?.focus(), { injector: this._injector });\n }\n\n /** Closes the drawer; `returnFocus` puts focus back on the hamburger that opened it (keyboard users keep their place). */\n closeSidebar(returnFocus = false): void {\n const wasOpen = this._sidebarOpen();\n this._sidebarOpen.set(false);\n if (!wasOpen) return;\n const active = this._document?.activeElement ?? null;\n const focusInSidebar = !!active && !!this._host.nativeElement.querySelector('.sidebar')?.contains(active);\n if (returnFocus) this._hamburger()?.focus();\n // The closing drawer is hidden once its slide-out ends: a link that was just clicked inside it would drop focus to <body>.\n else if (focusInSidebar) this._host.nativeElement.querySelector<HTMLElement>('#main-content')?.focus();\n }\n\n /** Escape closes an open drawer; Tab stays inside it while it is open. */\n onShellKeydown(e: KeyboardEvent): void {\n // Something inside the page (a modal, a dropdown, a confirm) already handled this key: leave it alone.\n if (e.defaultPrevented || !this._sidebarOpen() || !this._drawerLayout()) return;\n if (e.key === 'Escape') {\n e.preventDefault();\n this.closeSidebar(true);\n return;\n }\n // Browser / OS shortcuts (Ctrl+Tab, Alt+Tab, Cmd+Tab) are not focus moves inside the page.\n if (e.key !== 'Tab' || e.ctrlKey || e.altKey || e.metaKey) return;\n const items = this._sidebarFocusables();\n if (!items.length) return;\n const first = items[0];\n const last = items[items.length - 1];\n const active = this._document?.activeElement ?? null;\n // A control inside an item (or the item itself) counts as that item.\n const owner = active ? items.find(el => el === active || el.contains(active)) : undefined;\n if (owner) {\n if (e.shiftKey && owner === first) { e.preventDefault(); last.focus(); }\n else if (!e.shiftKey && owner === last) { e.preventDefault(); first.focus(); }\n return;\n }\n // A shadow-DOM host inside the sidebar: its inner controls are not in `items`. Let the browser move focus inside it and wrap only\n // when focus is on the host's last (first, with Shift) inner control and the host sits after the last (before the first) item.\n const host = active && active.shadowRoot && this._host.nativeElement.querySelector('.sidebar')?.contains(active) ? active : null;\n if (host) {\n const inner = Array.from(host.shadowRoot!.querySelectorAll<HTMLElement>(AppShellComponent._FOCUSABLE)).filter(el => !el.hidden && el.getClientRects().length > 0);\n const innerActive = host.shadowRoot!.activeElement;\n const atInnerEdge = !innerActive || !inner.length || innerActive === (e.shiftKey ? inner[0] : inner[inner.length - 1]);\n const afterAll = items.every(el => !!(el.compareDocumentPosition(host) & Node.DOCUMENT_POSITION_FOLLOWING));\n const beforeAll = items.every(el => !!(el.compareDocumentPosition(host) & Node.DOCUMENT_POSITION_PRECEDING));\n if (atInnerEdge && !e.shiftKey && afterAll) { e.preventDefault(); first.focus(); }\n else if (atInnerEdge && e.shiftKey && beforeAll) { e.preventDefault(); last.focus(); }\n return;\n }\n // Focus is outside the sidebar (or on something the trap cannot place): pull it in.\n e.preventDefault();\n (e.shiftKey ? last : first).focus();\n }\n\n /** Skip link: focuses the main content (`tabindex=\"-1\"`) without changing the URL (the app uses the router). */\n skipToContent(e: Event): void {\n e.preventDefault();\n this._host.nativeElement.querySelector<HTMLElement>('#main-content')?.focus();\n }\n\n // ── Lifecycle ─────────────────────────────────────────────────\n ngOnInit(): void {\n // Seed collapse state from group defaults\n const initial: Record<string, boolean> = {};\n this.navGroups().forEach(g => { if (g.defaultCollapsed) initial[g.key] = true; });\n this._collapsedGroups.set({ ...initial, ...this._readSavedGroups() });\n\n // Expand the group containing the active route; also close mobile sidebar\n this._routerSub = this.router.events.pipe(\n filter((e): e is NavigationEnd => e instanceof NavigationEnd),\n ).subscribe(e => {\n this.closeSidebar();\n this._expandActiveGroup(e.urlAfterRedirects);\n this._routeTitle.set(this._titleOfRoute());\n });\n\n // Growing past the drawer breakpoint while the drawer is open must not leave it \"open\" (it would reappear when the window shrinks again).\n if (typeof matchMedia === 'function') {\n this._drawerMq = matchMedia(AppShellComponent._DRAWER_MQ);\n this._drawerLayout.set(!!this._drawerMq?.matches);\n this._drawerMq?.addEventListener?.('change', this._onDrawerMqChange);\n }\n\n this._expandActiveGroup(this.router.url);\n this._routeTitle.set(this._titleOfRoute());\n }\n\n private _drawerMq?: MediaQueryList;\n private readonly _onDrawerMqChange = (e: MediaQueryListEvent): void => {\n this._drawerLayout.set(e.matches);\n if (!e.matches) this._sidebarOpen.set(false);\n };\n\n /** The `data.pageTitle` of the deepest activated route that has a non-empty string one (a child route's title wins over its parent's). */\n private _titleOfRoute(): string {\n // Optional chaining: an app spec that stubs Router with only `events` and `url` must keep working.\n let route: ActivatedRouteSnapshot | null = this.router.routerState?.snapshot?.root ?? null;\n let title = '';\n while (route) {\n const t = route.data?.['pageTitle'];\n if (typeof t === 'string' && t) title = t;\n route = route.firstChild;\n }\n return title;\n }\n\n ngOnDestroy(): void {\n this._routerSub?.unsubscribe();\n this._drawerMq?.removeEventListener?.('change', this._onDrawerMqChange);\n this._iconCache.clear();\n }\n\n private _expandActiveGroup(url: string): void {\n const path = url.split('?')[0].replace(/^\\//, '');\n for (const group of this.navGroups()) {\n const hasActive = group.links.some(l => {\n if (l.visible === false) return false;\n const route = l.route.replace(/^\\//, '');\n return l.exact ? route === path : path === route || path.startsWith(route + '/');\n });\n if (hasActive) {\n this._collapsedGroups.update(g => ({ ...g, [group.key]: false }));\n return;\n }\n }\n }\n}\n"],"mappings":";;;;;;;;AAyCA,IAAa,gCAAb,MAAa,8BAA6B;CAA7B;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA6B,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAA7B;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAA6B,cAAA;GAAA,UAAA;GAAA,UAAA;GAAA,UA5B9B;GAAE,UAAA;GAAA,QAAA,CAAA,2tBAAA;GAAA,iBAAA,GAAA,wBAAA;GAAA,eAAA,GAAA,kBAAA;EAAA,CAAA;CAAA;;AA4BD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA6B,YAAA,CAAA;EAjCzC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAA2B,YACzB;GAAI,iBACC,wBAAwB;GAAM,eAChC,kBAAkB;GAAI,UAC3B;GAAE,QAAA,CAAA,2tBAAA;EAAA,CAAA;;;ACgCd,SAAgB,yBAAyB,YAAkB;CACzD,OAAO,uBAAuB;AAChC;AAupBA,I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js","names":[],"sources":["../../../projects/forgeroute-ui/shell/src/lib/app-shell/shell-projected-styles.component.ts","../../../projects/forgeroute-ui/shell/src/lib/app-shell/app-shell.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\n/**\n * Styles for the two places where `ui-app-shell` shows markup it does not own: the nav icons (an `[innerHTML]` SVG string) and the projected\n * `[shell-brand]` logo. Angular's scoped styles cannot reach that markup, so these rules live in this style-only component, which is unscoped\n * (`ViewEncapsulation.None`) and renders nothing. Every selector starts with `ui-app-shell`, so nothing leaks to the app, and the shell's own\n * stylesheet stays scoped with no `::ng-deep`.\n */\n@Component({\n selector: 'ui-shell-projected-styles',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: '',\n styles: [`\n ui-shell-projected-styles { display: none; }\n\n ui-app-shell .nav-icon svg {\n width: 17px;\n height: 17px;\n stroke: color-mix(in srgb, var(--shell-text, #fff) 90%, transparent);\n transition: stroke 150ms;\n flex-shrink: 0;\n }\n ui-app-shell .sidebar-nav a:hover .nav-icon svg { stroke: color-mix(in srgb, var(--shell-text, #fff) 100%, transparent); }\n ui-app-shell .sidebar-nav a.active .nav-icon svg { stroke: #93c5fd; }\n\n @media (min-width: 1025px) {\n /* Rail: the projected brand is cropped to a centered square mark */\n ui-app-shell .shell.collapsed .brand-full img,\n ui-app-shell .shell.collapsed .brand-full svg {\n width: 44px; height: 44px; max-width: none; object-fit: cover; object-position: 50% 42%;\n }\n ui-app-shell .shell.collapsed .nav-icon svg { width: 20px; height: 20px; }\n }\n\n @media (prefers-reduced-motion: reduce) {\n ui-app-shell .nav-icon svg { transition: none !important; }\n }\n `],\n})\nexport class ShellProjectedStylesComponent {}\n","import {\n Component, input, output, signal, computed,\n inject, OnInit, OnDestroy, ChangeDetectionStrategy, ElementRef, Injector, afterNextRender,\n} from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { RouterLink, RouterLinkActive, Router, NavigationEnd, ActivatedRouteSnapshot } from '@angular/router';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { filter, Subscription } from 'rxjs';\nimport { ConfirmOutletComponent } from '@forgeroute/ui/core';\nimport { ToastComponent } from '@forgeroute/ui/toast';\nimport { ShellProjectedStylesComponent } from './shell-projected-styles.component';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\n// ── Public interfaces ────────────────────────────────────────────────────────\n\nexport interface NavLink {\n label: string;\n route: string;\n /** Full <svg>…</svg> HTML string used as the icon. */\n icon?: string;\n /** Require an exact URL match for routerLinkActive. Default false. */\n exact?: boolean;\n /** Red badge count shown on the link (e.g. unread messages). */\n badge?: number;\n /** Hide this link. Default true (visible). */\n visible?: boolean;\n /**\n * Sub-section of the group this link belongs to. A small sub-heading with this text is drawn above the first visible link of each run of links\n * that share it (list a section's links next to each other). Links without a section stay under the group label (or under the previous run's heading\n * when they follow one: give every link of a group a section, or none). Hidden in the collapsed rail.\n */\n section?: string;\n}\n\nexport interface NavGroup {\n key: string;\n label: string;\n /** Hide the entire group. Default true (visible). */\n visible?: boolean;\n /** Start collapsed. Default false. */\n defaultCollapsed?: boolean;\n links: NavLink[];\n}\n\nexport interface ShellUser {\n firstName?: string;\n lastName?: string;\n role?: string;\n}\n\n/** localStorage key the shell uses for a given `persistKey` (exported so apps can migrate an older key). */\nexport function appShellGroupsStorageKey(persistKey: string): string {\n return `ui-app-shell-groups:${persistKey}`;\n}\n\n// ─────────────────────────────────────────────────────────────────────────────\n\n@Component({\n selector: 'ui-app-shell',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [RouterLink, RouterLinkActive, ConfirmOutletComponent, ToastComponent, ShellProjectedStylesComponent],\n template: `\n <div\n class=\"shell\"\n [class.sidebar-open]=\"_sidebarOpen()\"\n [class.collapsed]=\"_isRail()\"\n (keydown)=\"onShellKeydown($event)\"\n [style.--shell-bg]=\"backgroundColor() || null\"\n [style.--shell-text]=\"textColor() || null\"\n >\n <ui-shell-projected-styles />\n\n <!-- Keyboard users jump past the navigation straight to the page content -->\n <a class=\"skip-link\" href=\"#main-content\" (click)=\"skipToContent($event)\">{{ labels.t('appShell.skipToMainContent') }}</a>\n\n <!-- Mobile backdrop -->\n <div\n class=\"sidebar-backdrop\"\n (click)=\"closeSidebar()\"\n aria-hidden=\"true\"\n ></div>\n\n <!-- ── Sidebar ────────────────────────────────────────────── -->\n <aside class=\"sidebar\" id=\"main-sidebar\" [attr.aria-label]=\"labels.t('appShell.mainNavigation')\">\n\n <!-- Brand slot (project custom brand or fallback to appName) -->\n <div class=\"sidebar-header\">\n <div class=\"brand-full\">\n <ng-content select=\"[shell-brand]\">\n <div class=\"brand-default\">\n <span class=\"brand-mark\" aria-hidden=\"true\">{{ appName().charAt(0) }}</span>\n <span class=\"brand-text\">{{ appName() }}</span>\n </div>\n </ng-content>\n </div>\n @if (collapsible()) {\n <button\n class=\"rail-toggle\"\n type=\"button\"\n [attr.aria-label]=\"_collapsed() ? labels.t('appShell.expandSidebar') : labels.t('appShell.collapseSidebar')\"\n [attr.aria-pressed]=\"_collapsed()\"\n [attr.title]=\"_collapsed() ? labels.t('appShell.expandSidebar') : labels.t('appShell.collapseSidebar')\"\n (click)=\"toggleCollapsed()\"\n >\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n @if (_collapsed()) {\n <path d=\"M13 5l7 7-7 7M5 5l7 7-7 7\"/>\n } @else {\n <path d=\"M11 19l-7-7 7-7m8 14l-7-7 7-7\"/>\n }\n </svg>\n </button>\n }\n </div>\n\n <!-- Nav groups -->\n <nav class=\"sidebar-nav\" [attr.aria-label]=\"labels.t('appShell.siteNavigation')\">\n @for (group of _visibleGroups(); track group.key) {\n <div class=\"nav-group\">\n @if (_isRail()) { <div class=\"rail-divider\" aria-hidden=\"true\"></div> }\n @if (_canCollapseGroups()) {\n <button\n class=\"nav-group-label\"\n type=\"button\"\n [attr.aria-expanded]=\"!_isCollapsed(group.key)\"\n [attr.aria-controls]=\"'navg-' + group.key\"\n (click)=\"toggleGroup(group.key)\"\n >\n <svg\n class=\"chevron\"\n [class.collapsed]=\"_isCollapsed(group.key)\"\n width=\"12\" height=\"12\" viewBox=\"0 0 24 24\"\n fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\"\n aria-hidden=\"true\"\n >\n <polyline points=\"6 9 12 15 18 9\"/>\n </svg>\n {{ group.label }}\n </button>\n } @else {\n <!-- A single group can't be collapsed: hiding it would remove the whole navigation -->\n <div class=\"nav-group-label nav-group-label--static\" [id]=\"'navg-label-' + group.key\">{{ group.label }}</div>\n }\n\n <!-- Always rendered so the toggle's aria-controls resolves; [hidden] (plus display:none in the CSS) removes the links of a collapsed group from view and from the tab order -->\n <div\n class=\"nav-group-links\"\n [id]=\"'navg-' + group.key\"\n [hidden]=\"!_isRail() && _isCollapsed(group.key)\"\n >\n @for (row of _linkRows(group); track row.link.route) {\n @let link = row.link;\n @if (row.heading) {\n <div class=\"nav-section-label\" role=\"presentation\" [attr.data-testid]=\"'nav-section-' + group.key\">{{ row.heading }}</div>\n }\n <a\n [routerLink]=\"link.route\"\n routerLinkActive=\"active\"\n [routerLinkActiveOptions]=\"{ exact: !!link.exact }\"\n #rla=\"routerLinkActive\"\n [attr.aria-current]=\"rla.isActive ? 'page' : null\"\n [attr.title]=\"_isRail() ? link.label : null\"\n [attr.aria-label]=\"_isRail() ? link.label : null\"\n >\n @if (link.icon) {\n <span\n class=\"nav-icon\"\n [innerHTML]=\"_safeIcon(link.icon)\"\n aria-hidden=\"true\"\n ></span>\n }\n <span class=\"nav-label\">{{ link.label }}</span>\n @if (link.badge && link.badge > 0) {\n <span\n class=\"nav-badge\"\n [attr.aria-label]=\"labels.t('appShell.unreadCount', { count: link.badge })\"\n >{{ link.badge }}</span>\n }\n </a>\n }\n </div>\n </div>\n }\n </nav>\n\n <!-- User footer -->\n <div class=\"sidebar-footer\">\n <div class=\"user-info\">\n <div class=\"user-avatar\" aria-hidden=\"true\">{{ _userInitials() }}</div>\n <div class=\"user-details\">\n <span class=\"user-name\">{{ _userName() }}</span>\n @if (user()?.role) {\n <span class=\"user-role\">{{ user()!.role }}</span>\n }\n </div>\n <button\n class=\"btn-logout\"\n type=\"button\"\n [attr.aria-label]=\"labels.t('appShell.logOut')\"\n (click)=\"logoutClick.emit()\"\n >\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\"\n stroke=\"currentColor\" stroke-width=\"1.8\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <path d=\"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4\"/>\n <polyline points=\"16 17 21 12 16 7\"/>\n <line x1=\"21\" y1=\"12\" x2=\"9\" y2=\"12\"/>\n </svg>\n </button>\n </div>\n </div>\n </aside>\n\n <!-- ── Main area ──────────────────────────────────────────── -->\n <div class=\"main-area\">\n\n <!-- Top header -->\n <header class=\"top-header\" role=\"banner\">\n <button\n class=\"hamburger\"\n type=\"button\"\n [attr.aria-expanded]=\"_sidebarOpen()\"\n aria-controls=\"main-sidebar\"\n [attr.aria-label]=\"labels.t('appShell.toggleNavigation')\"\n (click)=\"toggleSidebar()\"\n >\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\"\n stroke=\"currentColor\" stroke-width=\"2\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"\n aria-hidden=\"true\">\n <line x1=\"3\" y1=\"6\" x2=\"21\" y2=\"6\"/>\n <line x1=\"3\" y1=\"12\" x2=\"21\" y2=\"12\"/>\n <line x1=\"3\" y1=\"18\" x2=\"21\" y2=\"18\"/>\n </svg>\n </button>\n\n @if (_title()) {\n <h1 class=\"page-title\" id=\"shell-page-title\" tabindex=\"-1\">{{ _title() }}</h1>\n }\n\n @if (readOnly()) {\n <span\n class=\"read-only-badge\"\n role=\"status\"\n [attr.aria-label]=\"labels.t('appShell.thisPageIsReadOnly')\"\n >{{ labels.t('appShell.readOnly') }}</span>\n }\n\n <!-- Optional page-level navigation next to the title (e.g. a <ui-pill-tabs> of the page's views) -->\n <div class=\"header-start\"><ng-content select=\"[shell-header-start]\" /></div>\n\n <!-- Right-side header content (search, notifications, etc.) -->\n <div class=\"header-end\">\n <ng-content select=\"[shell-header-end]\" />\n </div>\n </header>\n\n <!-- Banners / toasts above content -->\n <ng-content select=\"[shell-banners]\" />\n\n <!-- Page content -->\n <main class=\"content\" id=\"main-content\" role=\"main\" tabindex=\"-1\" [attr.aria-labelledby]=\"_title() ? 'shell-page-title' : null\">\n <ng-content />\n </main>\n </div>\n </div>\n\n <!-- Global confirm overlay — position:fixed so it overlays without affecting layout -->\n <ui-confirm-outlet />\n\n @if (showToast()) {\n <ui-toast />\n }\n `,\n styles: [`\n :host { display: contents; }\n\n /* ── Shell frame ────────────────────────────────────────────── */\n .shell {\n display: flex;\n height: 100vh; /* fallback for browsers without dvh */\n height: 100dvh; /* excludes the mobile browser's collapsing URL bar */\n overflow: hidden;\n font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n }\n\n /* ── Backdrop ────────────────────────────────────────────────── */\n .sidebar-backdrop {\n display: none;\n position: fixed;\n inset: 0;\n background: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(2px);\n -webkit-backdrop-filter: blur(2px);\n z-index: 199;\n }\n\n /* ── Sidebar ─────────────────────────────────────────────────── */\n .sidebar {\n width: 256px;\n background: var(--shell-bg, linear-gradient(175deg, #0f172a 0%, #111827 100%));\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n overflow: hidden;\n }\n\n .sidebar-header {\n display: flex;\n align-items: center;\n padding: 0 20px;\n min-height: 64px;\n border-bottom: 1px solid color-mix(in srgb, var(--shell-text, #fff) 6%, transparent);\n box-sizing: border-box;\n }\n\n .brand-default {\n display: flex;\n align-items: center;\n gap: 10px;\n }\n .brand-text {\n font-size: 1.125rem;\n font-weight: 700;\n color: var(--shell-text, #fff);\n letter-spacing: -0.01em;\n }\n\n /* ── Nav ──────────────────────────────────────────────────────── */\n .sidebar-nav {\n padding: 6px 0 8px;\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-width: thin;\n scrollbar-color: color-mix(in srgb, var(--shell-text, #fff) 8%, transparent) transparent;\n }\n .sidebar-nav::-webkit-scrollbar { width: 3px; }\n .sidebar-nav::-webkit-scrollbar-track { background: transparent; }\n .sidebar-nav::-webkit-scrollbar-thumb {\n background: color-mix(in srgb, var(--shell-text, #fff) 8%, transparent);\n border-radius: 2px;\n }\n\n .nav-group { margin-bottom: 6px; }\n /* A collapsed group's links stay in the DOM (aria-controls target) but must not be visible or focusable */\n .nav-group-links[hidden] { display: none; }\n\n .nav-group-label {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 8px 16px;\n font-size: 0.6875rem;\n font-weight: 700;\n color: color-mix(in srgb, var(--shell-text, #fff) 80%, transparent);\n text-transform: uppercase;\n letter-spacing: 0.12em;\n background: none;\n border: none;\n cursor: pointer;\n transition: color 150ms;\n text-align: left;\n border-radius: 6px;\n background: color-mix(in srgb, var(--shell-text, #fff) 10%, transparent);\n margin: 6px 4px 4px;\n width: calc(100% - 8px);\n box-sizing: border-box;\n }\n /* Sub-section heading inside a group: quieter than the group label (no fill, no chevron), not interactive. */\n .nav-section-label {\n padding: 10px 16px 3px;\n font-size: 0.625rem;\n font-weight: 600;\n color: color-mix(in srgb, var(--shell-text, #fff) 55%, transparent);\n text-transform: uppercase;\n letter-spacing: 0.1em;\n -webkit-user-select: none;\n user-select: none;\n }\n .nav-section-label:first-child { padding-top: 4px; }\n .nav-group-label:hover { color: color-mix(in srgb, var(--shell-text, #fff) 100%, transparent); }\n .nav-group-label:focus-visible {\n outline: 2px solid rgba(96, 165, 250, 0.5);\n outline-offset: -1px;\n }\n\n .chevron {\n flex-shrink: 0;\n transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);\n opacity: 0.85;\n }\n .chevron.collapsed { transform: rotate(-90deg); }\n\n /* Nav links */\n .sidebar-nav a {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 8px 12px 8px 32px;\n color: color-mix(in srgb, var(--shell-text, #fff) 95%, transparent);\n font-size: 0.9375rem;\n font-weight: 500;\n text-decoration: none;\n border-left: 2px solid transparent;\n border-radius: 0 8px 8px 0;\n margin-right: 10px;\n transition: color 150ms, background 150ms, border-color 150ms;\n }\n .sidebar-nav a:hover {\n color: color-mix(in srgb, var(--shell-text, #fff) 100%, transparent);\n background: color-mix(in srgb, var(--shell-text, #fff) 6%, transparent);\n }\n .sidebar-nav a.active {\n color: var(--shell-text, #fff);\n background: rgba(96, 165, 250, 0.13);\n border-left-color: #60a5fa;\n font-weight: 600;\n }\n .sidebar-nav a:focus-visible {\n outline: 2px solid rgba(96, 165, 250, 0.5);\n outline-offset: -2px;\n }\n\n /* Icons */\n .nav-icon {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n }\n\n .nav-label { flex: 1; }\n\n .nav-badge {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 18px;\n height: 18px;\n padding: 0 5px;\n border-radius: 9px;\n background: #ef4444;\n color: #fff;\n font-size: 0.625rem;\n font-weight: 700;\n margin-left: auto;\n }\n\n /* ── User footer ──────────────────────────────────────────────── */\n .sidebar-footer {\n padding: 10px 14px;\n border-top: 1px solid color-mix(in srgb, var(--shell-text, #fff) 6%, transparent);\n }\n .user-info {\n display: flex;\n align-items: center;\n gap: 10px;\n }\n .user-avatar {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n background: linear-gradient(135deg, rgba(96, 165, 250, 0.22), rgba(96, 165, 250, 0.08));\n border: 1px solid rgba(96, 165, 250, 0.18);\n color: color-mix(in srgb, var(--shell-text, #fff) 88%, transparent);\n font-size: 0.75rem;\n font-weight: 600;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n .user-details {\n display: flex;\n flex-direction: column;\n min-width: 0;\n flex: 1;\n }\n .user-name {\n font-size: 0.8125rem;\n font-weight: 600;\n color: var(--shell-text, #fff);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .user-role {\n font-size: 0.6875rem;\n color: color-mix(in srgb, var(--shell-text, #fff) 80%, transparent);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n font-weight: 500;\n }\n .btn-logout {\n background: none;\n border: none;\n cursor: pointer;\n color: color-mix(in srgb, var(--shell-text, #fff) 85%, transparent);\n padding: 6px;\n border-radius: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n transition: color 150ms, background 150ms;\n }\n .btn-logout:hover { color: #f87171; background: rgba(248, 113, 113, 0.1); }\n .btn-logout:focus-visible {\n outline: 2px solid rgba(96, 165, 250, 0.5);\n outline-offset: 2px;\n }\n\n\n /* ── Collapsed rail (desktop only) ────────────────────────────── */\n .brand-full { display: flex; align-items: center; min-width: 0; flex: 1; }\n .brand-mark { display: none; }\n .shell.collapsed .brand-mark {\n width: 36px; height: 36px; border-radius: 10px;\n display: flex; align-items: center; justify-content: center;\n font-weight: 700; font-size: 1.125rem;\n color: var(--shell-text, #fff);\n background: color-mix(in srgb, var(--shell-text, #fff) 15%, transparent);\n }\n .rail-toggle {\n display: none;\n align-items: center; justify-content: center;\n width: 32px; height: 32px; margin-left: auto; flex-shrink: 0;\n border: none; background: none; cursor: pointer; border-radius: 8px;\n color: color-mix(in srgb, var(--shell-text, #fff) 85%, transparent);\n transition: background 150ms, color 150ms;\n }\n .rail-toggle:hover {\n background: color-mix(in srgb, var(--shell-text, #fff) 12%, transparent);\n color: var(--shell-text, #fff);\n }\n .rail-toggle:focus-visible { outline: 2px solid rgba(96, 165, 250, 0.5); outline-offset: 2px; }\n .rail-divider { display: none; }\n\n @media (min-width: 1025px) {\n .rail-toggle { display: flex; }\n .sidebar { transition: width 200ms cubic-bezier(0.4, 0, 0.2, 1); }\n .shell.collapsed .sidebar { width: 68px; }\n .shell.collapsed .sidebar-header { padding: 0; flex-direction: column; justify-content: center; gap: 4px; padding: 8px 0; }\n /* Rail: the projected brand is cropped to a centered square mark; default text brand shows its initial */\n .shell.collapsed .brand-full {\n flex: none; width: 44px; height: 44px; overflow: hidden; border-radius: 10px;\n justify-content: center;\n }\n .shell.collapsed .brand-text { display: none; }\n .shell.collapsed .rail-toggle { margin-left: 0; }\n .shell.collapsed .nav-group-label { display: none; }\n .shell.collapsed .nav-section-label { display: none; }\n .shell.collapsed .rail-divider {\n display: block; height: 1px; margin: 8px 14px;\n background: color-mix(in srgb, var(--shell-text, #fff) 20%, transparent);\n }\n .shell.collapsed .nav-group:first-child .rail-divider { display: none; }\n .shell.collapsed .sidebar-nav a {\n position: relative; justify-content: center;\n padding: 10px 0; margin: 0 8px 2px; border-left: none; border-radius: 8px;\n }\n .shell.collapsed .sidebar-nav a.active { box-shadow: inset 3px 0 0 #60a5fa; }\n .shell.collapsed .nav-label { display: none; }\n .shell.collapsed .nav-badge {\n position: absolute; top: 2px; right: 4px; min-width: 16px; height: 16px;\n padding: 0 4px; font-size: 0.5625rem; margin: 0;\n }\n .shell.collapsed .sidebar-footer { padding: 10px 8px; }\n .shell.collapsed .user-info { flex-direction: column; gap: 8px; }\n .shell.collapsed .user-details { display: none; }\n }\n\n /* ── Main area ────────────────────────────────────────────────── */\n .main-area {\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n min-width: 0;\n }\n\n /* ── Header ───────────────────────────────────────────────────── */\n .top-header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 0 24px;\n background: #fff;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 1px 0 rgba(0, 0, 0, 0.04);\n min-height: 64px;\n box-sizing: border-box;\n position: relative;\n z-index: 50;\n }\n\n .hamburger {\n display: none;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 36px;\n border: none;\n background: none;\n cursor: pointer;\n color: #374151;\n border-radius: 8px;\n flex-shrink: 0;\n transition: background 150ms, color 150ms;\n }\n .hamburger:hover { background: #f3f4f6; }\n .hamburger:focus-visible {\n outline: 2px solid rgba(59, 130, 246, 0.5);\n outline-offset: 2px;\n }\n\n .page-title {\n font-size: 1.25rem;\n font-weight: 700;\n color: #111827;\n margin: 0;\n letter-spacing: -0.02em;\n }\n /* focusable only by script (tabindex -1) so an app can move focus to the heading after navigation; no ring on a non-interactive heading */\n .page-title:focus { outline: none; }\n\n .read-only-badge {\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n padding: 2px 8px;\n border-radius: 9999px;\n font-size: 0.6875rem;\n font-weight: 600;\n letter-spacing: 0.02em;\n text-transform: uppercase;\n background: #fef9c3;\n color: #854d0e;\n border: 1px solid #fde68a;\n white-space: nowrap;\n }\n\n /* Optional slot: hidden while nothing is projected; otherwise it takes the free space between the title and header-end and scrolls sideways instead of wrapping the bar */\n .header-start { display: flex; align-items: center; min-width: 0; margin-left: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }\n .header-start:empty { display: none; }\n .header-start::-webkit-scrollbar { display: none; }\n\n .header-end {\n display: flex;\n align-items: center;\n margin-left: auto;\n }\n\n /* ── Content ──────────────────────────────────────────────────── */\n .content:focus { outline: none; }\n .content {\n /* The content area's padding, published for children that must reach the viewport edges (ui-fixed-footer). */\n --shell-content-padding: 24px;\n flex: 1;\n overflow-y: auto;\n padding: var(--shell-content-padding);\n background: #F7F8F6;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n min-height: 0;\n }\n .content > * {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n }\n\n /* Skip link: off screen until it receives keyboard focus */\n .skip-link {\n position: absolute; top: -48px; left: 8px; z-index: 300;\n padding: 8px 14px; border-radius: 6px;\n background: #fff; color: #1d4ed8; font-size: 0.875rem; font-weight: 600; text-decoration: none;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);\n }\n .skip-link:focus { top: 8px; outline: 2px solid #1d4ed8; outline-offset: 2px; }\n\n /* A lone group is a plain heading, not a toggle */\n .nav-group-label--static { cursor: default; }\n\n /* ── Tablet / Mobile ≤ 1024px ─────────────────────────────────── */\n @media (max-width: 1024px) {\n .hamburger { display: flex; }\n\n .sidebar {\n position: fixed;\n top: 0; left: 0; bottom: 0;\n z-index: 200;\n transform: translateX(-100%);\n transition: transform 260ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 260ms cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 260ms;\n /* A closed drawer is only off screen: hide it from the tab order and the accessibility tree once the slide-out finishes. */\n visibility: hidden;\n /* No shadow while the drawer is closed: its 32px blur would leak in from the left edge of the page. */\n box-shadow: none;\n }\n .shell.sidebar-open .sidebar { transform: translateX(0); box-shadow: 4px 0 32px rgba(0, 0, 0, 0.3); visibility: visible; transition-delay: 0s; }\n .shell.sidebar-open .sidebar-backdrop { display: block; }\n\n .main-area { width: 100%; }\n .top-header { padding: 0 16px; gap: 4px; }\n .content { --shell-content-padding: 16px; }\n }\n\n /* ── Small mobile ≤ 480px ─────────────────────────────────────── */\n @media (max-width: 480px) {\n .page-title { font-size: 1.0625rem; }\n .content { --shell-content-padding: 12px; }\n }\n\n /* ── Touch targets: every interactive control is at least 44px tall on touch screens (tablets included) and phones ── */\n @media (pointer: coarse), (max-width: 480px) {\n .sidebar-nav a { min-height: 44px; }\n .nav-group-label { min-height: 44px; }\n .btn-logout { min-width: 44px; min-height: 44px; }\n .hamburger { min-width: 44px; min-height: 44px; }\n .rail-toggle { min-width: 44px; min-height: 44px; }\n }\n\n /* ── Reduced motion ──────────────────────────────────────────── */\n @media (prefers-reduced-motion: reduce) {\n .chevron, .sidebar-nav a, .sidebar { transition: none !important; }\n }\n `],\n})\nexport class AppShellComponent implements OnInit, OnDestroy {\n protected readonly labels = inject(UiLabelsService);\n private readonly sanitizer = inject(DomSanitizer);\n private readonly router = inject(Router);\n private _routerSub?: Subscription;\n\n // ── Inputs ────────────────────────────────────────────────────\n readonly navGroups = input<NavGroup[]>([]);\n /**\n * The page's title, rendered in the top bar as the page's single `<h1>` (id `shell-page-title`, `tabindex=\"-1\"` so an app can\n * focus it after navigation) and used as the accessible name of `<main>`. A page that has no title here keeps its own heading.\n * A page shown with a title MUST NOT also render its own `<h1>` (that would be two h1s); give it a visually hidden one only\n * when the title is not set.\n */\n readonly pageTitle = input('');\n /**\n * Show the app's toasts (renders one `<ui-toast />` for the whole shell). Default false so an app that already renders its own `<ui-toast />`\n * is unchanged; an app that sets this removes its own.\n */\n readonly showToast = input(false);\n readonly appNameInput = input<string | null>(null, { alias: 'appName' });\n readonly appName = computed(() => this.appNameInput() ?? this.labels.t('appShell.appName'));\n readonly user = input<ShellUser | null>(null);\n readonly readOnly = input(false);\n /** Sidebar background — any CSS background value (color or gradient). Falls back to the default dark gradient. */\n readonly backgroundColor = input<string>('');\n /** Sidebar text/icon color — any CSS color. Hover/muted shades are derived from it. Falls back to white. */\n readonly textColor = input<string>('');\n /** Show a desktop toggle that shrinks the sidebar to icons only. The choice is remembered per browser. */\n readonly collapsible = input(false);\n /**\n * When set, which nav groups the user opened/closed is saved to localStorage under this key\n * and restored on load (plain per-browser storage). Include a user id in the key for per-user state.\n * Unset = nothing is stored.\n */\n readonly persistKey = input<string>('');\n\n // ── Outputs ───────────────────────────────────────────────────\n readonly logoutClick = output<void>();\n\n // ── Internal state ────────────────────────────────────────────\n protected readonly _sidebarOpen = signal(false);\n /** `data.pageTitle` of the deepest activated route that sets one ('' when none does). Updated on every NavigationEnd. */\n protected readonly _routeTitle = signal('');\n /** The title shown in the top bar: the `pageTitle` input when the app sets one (it wins), else the route's `data.pageTitle`. */\n protected readonly _title = computed(() => this.pageTitle() || this._routeTitle());\n protected readonly _collapsed = signal(AppShellComponent._loadCollapsed());\n /** The rail (icons-only sidebar) only exists on the desktop layout; on the drawer layout (≤1024px) a saved rail choice is ignored. */\n protected readonly _drawerLayout = signal(false);\n protected readonly _isRail = computed(() => this.collapsible() && this._collapsed() && !this._drawerLayout());\n private readonly _collapsedGroups = signal<Record<string, boolean>>({});\n\n // ── Computed ──────────────────────────────────────────────────\n protected readonly _visibleGroups = computed(() =>\n this.navGroups().filter(g => g.visible !== false)\n );\n\n protected readonly _userInitials = computed(() => {\n const u = this.user();\n return `${u?.firstName?.charAt(0) ?? ''}${u?.lastName?.charAt(0) ?? ''}`;\n });\n\n protected readonly _userName = computed(() => {\n const u = this.user();\n return [u?.firstName, u?.lastName].filter(Boolean).join(' ');\n });\n\n // ── Icon cache (avoids repeated DomSanitizer calls) ───────────\n private readonly _iconCache = new Map<string, SafeHtml>();\n\n _safeIcon(svg: string): SafeHtml {\n let safe = this._iconCache.get(svg);\n if (!safe) {\n safe = this.sanitizer.bypassSecurityTrustHtml(svg);\n this._iconCache.set(svg, safe);\n }\n return safe;\n }\n\n _visibleLinks(group: NavGroup): NavLink[] {\n return group.links.filter(l => l.visible !== false);\n }\n\n /** The visible links with the sub-section heading to draw above each (set on the first visible link of a run that shares a `section`). */\n _linkRows(group: NavGroup): { link: NavLink; heading: string | null }[] {\n let previous: string | undefined;\n return this._visibleLinks(group).map(link => {\n const heading = link.section && link.section !== previous ? link.section : null;\n previous = link.section;\n return { link, heading };\n });\n }\n\n // ── Group collapse ────────────────────────────────────────────\n /** Groups can only be collapsed when there is more than one: a lone group stays open so the navigation can never be hidden. */\n protected _canCollapseGroups(): boolean { return this._visibleGroups().length > 1; }\n\n _isCollapsed(key: string): boolean {\n return this._canCollapseGroups() && !!this._collapsedGroups()[key];\n }\n\n toggleGroup(key: string): void {\n const collapsed = !this._collapsedGroups()[key];\n this._collapsedGroups.update(g => ({ ...g, [key]: collapsed }));\n this._saveGroup(key, collapsed);\n }\n\n private _readSavedGroups(): Record<string, boolean> {\n const pk = this.persistKey();\n if (!pk) return {};\n try {\n const raw = JSON.parse(localStorage.getItem(appShellGroupsStorageKey(pk)) ?? 'null');\n if (!raw || typeof raw !== 'object' || Array.isArray(raw)) return {};\n return Object.fromEntries(Object.entries(raw).filter(([, v]) => typeof v === 'boolean')) as Record<string, boolean>;\n } catch { return {}; }\n }\n\n /** Only groups the user toggled are stored, so groups added later keep their defaults. */\n private _saveGroup(key: string, collapsed: boolean): void {\n const pk = this.persistKey();\n if (!pk) return;\n try {\n const saved = { ...this._readSavedGroups(), [key]: collapsed };\n localStorage.setItem(appShellGroupsStorageKey(pk), JSON.stringify(saved));\n } catch { /* storage unavailable */ }\n }\n\n toggleCollapsed(): void {\n const next = !this._collapsed();\n this._collapsed.set(next);\n try { localStorage.setItem(AppShellComponent._COLLAPSE_KEY, String(next)); } catch { /* storage unavailable */ }\n }\n\n private static readonly _COLLAPSE_KEY = 'ui-app-shell-collapsed';\n private static _loadCollapsed(): boolean {\n try { return localStorage.getItem(AppShellComponent._COLLAPSE_KEY) === 'true'; } catch { return false; }\n }\n\n private readonly _host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly _injector = inject(Injector);\n private readonly _document = inject(DOCUMENT, { optional: true });\n\n /** The drawer layout is exactly the complement of the desktop layout the CSS rail rules use (min-width: 1025px): no viewport width falls in between. */\n private static readonly _DRAWER_MQ = 'not all and (min-width: 1025px)';\n\n private static readonly _FOCUSABLE = 'a[href]:not([tabindex=\"-1\"]), button:not([disabled]):not([tabindex=\"-1\"]), input:not([disabled]):not([type=\"hidden\"]):not([tabindex=\"-1\"]), select:not([disabled]):not([tabindex=\"-1\"]), textarea:not([disabled]):not([tabindex=\"-1\"]), [tabindex]:not([tabindex=\"-1\"]), summary:not([tabindex=\"-1\"]), [contenteditable]:not([contenteditable=\"false\"]):not([tabindex=\"-1\"]), iframe:not([tabindex=\"-1\"]), audio[controls]:not([tabindex=\"-1\"]), video[controls]:not([tabindex=\"-1\"])';\n\n private _sidebarFocusables(): HTMLElement[] {\n const aside = this._host.nativeElement.querySelector('.sidebar');\n // Only controls that are actually rendered: e.g. the rail toggle is display:none on the drawer layout and can't take focus.\n return aside\n ? Array.from(aside.querySelectorAll<HTMLElement>(AppShellComponent._FOCUSABLE)).filter(el => !el.hidden && el.getClientRects().length > 0)\n : [];\n }\n\n private _hamburger(): HTMLElement | null { return this._host.nativeElement.querySelector('.hamburger'); }\n\n toggleSidebar(): void {\n if (this._sidebarOpen()) this.closeSidebar(true);\n else this.openSidebar();\n }\n\n /** Opens the drawer (drawer layout only; a no-op on desktop) and moves keyboard focus into it, so the links behind the backdrop are not reachable until it closes. */\n openSidebar(): void {\n // The drawer only exists on the drawer layout: an open state on desktop would reopen the drawer when the window shrinks.\n if (!this._drawerLayout()) return;\n this._sidebarOpen.set(true);\n afterNextRender(() => this._sidebarFocusables()[0]?.focus(), { injector: this._injector });\n }\n\n /** Closes the drawer; `returnFocus` puts focus back on the hamburger that opened it (keyboard users keep their place). */\n closeSidebar(returnFocus = false): void {\n const wasOpen = this._sidebarOpen();\n this._sidebarOpen.set(false);\n if (!wasOpen) return;\n const active = this._document?.activeElement ?? null;\n const focusInSidebar = !!active && !!this._host.nativeElement.querySelector('.sidebar')?.contains(active);\n if (returnFocus) this._hamburger()?.focus();\n // The closing drawer is hidden once its slide-out ends: a link that was just clicked inside it would drop focus to <body>.\n else if (focusInSidebar) this._host.nativeElement.querySelector<HTMLElement>('#main-content')?.focus();\n }\n\n /** Escape closes an open drawer; Tab stays inside it while it is open. */\n onShellKeydown(e: KeyboardEvent): void {\n // Something inside the page (a modal, a dropdown, a confirm) already handled this key: leave it alone.\n if (e.defaultPrevented || !this._sidebarOpen() || !this._drawerLayout()) return;\n if (e.key === 'Escape') {\n e.preventDefault();\n this.closeSidebar(true);\n return;\n }\n // Browser / OS shortcuts (Ctrl+Tab, Alt+Tab, Cmd+Tab) are not focus moves inside the page.\n if (e.key !== 'Tab' || e.ctrlKey || e.altKey || e.metaKey) return;\n const items = this._sidebarFocusables();\n if (!items.length) return;\n const first = items[0];\n const last = items[items.length - 1];\n const active = this._document?.activeElement ?? null;\n // A control inside an item (or the item itself) counts as that item.\n const owner = active ? items.find(el => el === active || el.contains(active)) : undefined;\n if (owner) {\n if (e.shiftKey && owner === first) { e.preventDefault(); last.focus(); }\n else if (!e.shiftKey && owner === last) { e.preventDefault(); first.focus(); }\n return;\n }\n // A shadow-DOM host inside the sidebar: its inner controls are not in `items`. Let the browser move focus inside it and wrap only\n // when focus is on the host's last (first, with Shift) inner control and the host sits after the last (before the first) item.\n const host = active && active.shadowRoot && this._host.nativeElement.querySelector('.sidebar')?.contains(active) ? active : null;\n if (host) {\n const inner = Array.from(host.shadowRoot!.querySelectorAll<HTMLElement>(AppShellComponent._FOCUSABLE)).filter(el => !el.hidden && el.getClientRects().length > 0);\n const innerActive = host.shadowRoot!.activeElement;\n const atInnerEdge = !innerActive || !inner.length || innerActive === (e.shiftKey ? inner[0] : inner[inner.length - 1]);\n const afterAll = items.every(el => !!(el.compareDocumentPosition(host) & Node.DOCUMENT_POSITION_FOLLOWING));\n const beforeAll = items.every(el => !!(el.compareDocumentPosition(host) & Node.DOCUMENT_POSITION_PRECEDING));\n if (atInnerEdge && !e.shiftKey && afterAll) { e.preventDefault(); first.focus(); }\n else if (atInnerEdge && e.shiftKey && beforeAll) { e.preventDefault(); last.focus(); }\n return;\n }\n // Focus is outside the sidebar (or on something the trap cannot place): pull it in.\n e.preventDefault();\n (e.shiftKey ? last : first).focus();\n }\n\n /** Skip link: focuses the main content (`tabindex=\"-1\"`) without changing the URL (the app uses the router). */\n skipToContent(e: Event): void {\n e.preventDefault();\n this._host.nativeElement.querySelector<HTMLElement>('#main-content')?.focus();\n }\n\n // ── Lifecycle ─────────────────────────────────────────────────\n ngOnInit(): void {\n // Seed collapse state from group defaults\n const initial: Record<string, boolean> = {};\n this.navGroups().forEach(g => { if (g.defaultCollapsed) initial[g.key] = true; });\n this._collapsedGroups.set({ ...initial, ...this._readSavedGroups() });\n\n // Expand the group containing the active route; also close mobile sidebar\n this._routerSub = this.router.events.pipe(\n filter((e): e is NavigationEnd => e instanceof NavigationEnd),\n ).subscribe(e => {\n this.closeSidebar();\n this._expandActiveGroup(e.urlAfterRedirects);\n this._routeTitle.set(this._titleOfRoute());\n });\n\n // Growing past the drawer breakpoint while the drawer is open must not leave it \"open\" (it would reappear when the window shrinks again).\n if (typeof matchMedia === 'function') {\n this._drawerMq = matchMedia(AppShellComponent._DRAWER_MQ);\n this._drawerLayout.set(!!this._drawerMq?.matches);\n this._drawerMq?.addEventListener?.('change', this._onDrawerMqChange);\n }\n\n this._expandActiveGroup(this.router.url);\n this._routeTitle.set(this._titleOfRoute());\n }\n\n private _drawerMq?: MediaQueryList;\n private readonly _onDrawerMqChange = (e: MediaQueryListEvent): void => {\n this._drawerLayout.set(e.matches);\n if (!e.matches) this._sidebarOpen.set(false);\n };\n\n /** The `data.pageTitle` of the deepest activated route that has a non-empty string one (a child route's title wins over its parent's). */\n private _titleOfRoute(): string {\n // Optional chaining: an app spec that stubs Router with only `events` and `url` must keep working.\n let route: ActivatedRouteSnapshot | null = this.router.routerState?.snapshot?.root ?? null;\n let title = '';\n while (route) {\n const t = route.data?.['pageTitle'];\n if (typeof t === 'string' && t) title = t;\n route = route.firstChild;\n }\n return title;\n }\n\n ngOnDestroy(): void {\n this._routerSub?.unsubscribe();\n this._drawerMq?.removeEventListener?.('change', this._onDrawerMqChange);\n this._iconCache.clear();\n }\n\n private _expandActiveGroup(url: string): void {\n const path = url.split('?')[0].replace(/^\\//, '');\n for (const group of this.navGroups()) {\n const hasActive = group.links.some(l => {\n if (l.visible === false) return false;\n const route = l.route.replace(/^\\//, '');\n return l.exact ? route === path : path === route || path.startsWith(route + '/');\n });\n if (hasActive) {\n this._collapsedGroups.update(g => ({ ...g, [group.key]: false }));\n return;\n }\n }\n }\n}\n"],"mappings":";;;;;;;;AAyCA,IAAa,gCAAb,MAAa,8BAA6B;CAA7B;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA6B,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;C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