@byuhbll/components 4.5.0 → 4.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/animations/animations.mjs +1 -19
- package/esm2022/lib/expand-collapse/expand-collapse.component.mjs +4 -4
- package/esm2022/lib/hbll-header/hbll-header.component.mjs +23 -7
- package/esm2022/lib/hbll-header/nav-bar-dropdown/nav-bar-dropdown.component.mjs +3 -3
- package/fesm2022/byuhbll-components.mjs +25 -27
- package/fesm2022/byuhbll-components.mjs.map +1 -1
- package/lib/animations/animations.d.ts +0 -1
- package/lib/hbll-header/hbll-header.component.d.ts +2 -0
- package/package.json +1 -1
|
@@ -44,24 +44,6 @@ const libHbllFadeIn = trigger('libHbllFadeIn', [
|
|
|
44
44
|
const libHbllFadeOut = trigger('libHbllFadeOut', [
|
|
45
45
|
transition(':leave', [animate('.15s ease-out', style({ opacity: '0' }))]),
|
|
46
46
|
]);
|
|
47
|
-
const libHbllSlideInOutRightLeft = trigger('libHbllSlideInOutRightLeft', [
|
|
48
|
-
transition(':enter', [
|
|
49
|
-
style({
|
|
50
|
-
transform: 'translateX({{xOffset}})',
|
|
51
|
-
}),
|
|
52
|
-
animate('200ms ease-in-out', style({
|
|
53
|
-
transform: 'translateX(0)',
|
|
54
|
-
})),
|
|
55
|
-
], { params: { xOffset: '100%' } }),
|
|
56
|
-
transition(':leave', [
|
|
57
|
-
style({
|
|
58
|
-
transform: 'translateX(0)',
|
|
59
|
-
}),
|
|
60
|
-
animate('200ms ease-in-out', style({
|
|
61
|
-
transform: 'translateX({{xOffset}})',
|
|
62
|
-
})),
|
|
63
|
-
], { params: { xOffset: '100%' } }),
|
|
64
|
-
]);
|
|
65
47
|
|
|
66
48
|
class ExpandCollapseComponent {
|
|
67
49
|
constructor() {
|
|
@@ -76,11 +58,11 @@ class ExpandCollapseComponent {
|
|
|
76
58
|
return this._isExpanded;
|
|
77
59
|
}
|
|
78
60
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ExpandCollapseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
79
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: ExpandCollapseComponent, isStandalone: true, selector: "lib-expand-collapse", inputs: { isExpanded: "isExpanded" }, viewQueries: [{ propertyName: "contentRef", first: true, predicate: ["contentRef"], descendants: true }], ngImport: i0, template: "<div\n #contentRef\n [@libHbllExpandCollapse]=\"{\n value: isExpanded,\n params: { startHeight: heightOfContent },\n }\"\n class=\"hbll-expand-collapse-content-wrapper\"\n [ngClass]=\"{ 'hbll-expand-collapse-collapsed': !isExpanded }\"\n>\n <div
|
|
61
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: ExpandCollapseComponent, isStandalone: true, selector: "lib-expand-collapse", inputs: { isExpanded: "isExpanded" }, viewQueries: [{ propertyName: "contentRef", first: true, predicate: ["contentRef"], descendants: true }], ngImport: i0, template: "<div\n #contentRef\n data-testid=\"contentRef\"\n [@libHbllExpandCollapse]=\"{\n value: isExpanded,\n params: { startHeight: heightOfContent },\n }\"\n class=\"hbll-expand-collapse-content-wrapper\"\n [ngClass]=\"{ 'hbll-expand-collapse-collapsed': !isExpanded }\"\n>\n <div data-testid=\"content\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".hbll-expand-collapse-collapsed{height:0}.hbll-expand-collapse-content-wrapper{overflow:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [libHbllExpandCollapse], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
80
62
|
}
|
|
81
63
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ExpandCollapseComponent, decorators: [{
|
|
82
64
|
type: Component,
|
|
83
|
-
args: [{ selector: 'lib-expand-collapse', changeDetection: ChangeDetectionStrategy.OnPush, animations: [libHbllExpandCollapse
|
|
65
|
+
args: [{ selector: 'lib-expand-collapse', changeDetection: ChangeDetectionStrategy.OnPush, animations: [libHbllExpandCollapse], standalone: true, imports: [CommonModule], template: "<div\n #contentRef\n data-testid=\"contentRef\"\n [@libHbllExpandCollapse]=\"{\n value: isExpanded,\n params: { startHeight: heightOfContent },\n }\"\n class=\"hbll-expand-collapse-content-wrapper\"\n [ngClass]=\"{ 'hbll-expand-collapse-collapsed': !isExpanded }\"\n>\n <div data-testid=\"content\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".hbll-expand-collapse-collapsed{height:0}.hbll-expand-collapse-content-wrapper{overflow:hidden}\n"] }]
|
|
84
66
|
}], propDecorators: { contentRef: [{
|
|
85
67
|
type: ViewChild,
|
|
86
68
|
args: ['contentRef']
|
|
@@ -128,11 +110,11 @@ class NavBarDropdownComponent {
|
|
|
128
110
|
this.isOpen = false;
|
|
129
111
|
}
|
|
130
112
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NavBarDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
131
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: NavBarDropdownComponent, isStandalone: true, selector: "lib-nav-bar-dropdown", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, isSmallScreen: { classPropertyName: "isSmallScreen", publicName: "isSmallScreen", isSignal: true, isRequired: false, transformFunction: null }, isInteracting: { classPropertyName: "isInteracting", publicName: "isInteracting", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { openEvent: "openEvent", hoverStarted: "hoverStarted" }, ngImport: i0, template: "<span\n class=\"hbll-header-dropdown-wrapper\"\n data-testid=\"wrapper\"\n [ngClass]=\"{ 'hbll-header-desktop': !isSmallScreen() }\"\n (mouseenter)=\"handleMouseEnter()\"\n (mouseleave)=\"handleMouseLeave()\"\n>\n <button (click)=\"handleClick()\" data-testid=\"btn\" aria-haspopup=\"true\">\n {{ title() }}\n <span class=\"material-symbols-outlined hbll-header-icon\">\n {{ 'keyboard_arrow_' + (isOpen ? 'up' : 'down') }}\n </span>\n </button>\n @if (!isSmallScreen()) {\n
|
|
113
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: NavBarDropdownComponent, isStandalone: true, selector: "lib-nav-bar-dropdown", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, isSmallScreen: { classPropertyName: "isSmallScreen", publicName: "isSmallScreen", isSignal: true, isRequired: false, transformFunction: null }, isInteracting: { classPropertyName: "isInteracting", publicName: "isInteracting", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { openEvent: "openEvent", hoverStarted: "hoverStarted" }, ngImport: i0, template: "<span\n class=\"hbll-header-dropdown-wrapper\"\n data-testid=\"wrapper\"\n [ngClass]=\"{ 'hbll-header-desktop': !isSmallScreen() }\"\n (mouseenter)=\"handleMouseEnter()\"\n (mouseleave)=\"handleMouseLeave()\"\n>\n <button (click)=\"handleClick()\" data-testid=\"btn\" aria-haspopup=\"true\">\n {{ title() }}\n <span class=\"material-symbols-outlined hbll-header-icon\">\n {{ 'keyboard_arrow_' + (isOpen ? 'up' : 'down') }}\n </span>\n </button>\n @if (!isSmallScreen()) {\n <div [class.collapsed]=\"!isOpen\" [attr.inert]=\"!isOpen ? true : null\" class=\"hbll-header-dropdown\" data-testid=\"dropdown\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </div>\n } @else {\n <lib-expand-collapse [isExpanded]=\"isOpen\" [attr.inert]=\"!isOpen ? true : null\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </lib-expand-collapse>\n }\n</span>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n", styles: [".hbll-header-dropdown-wrapper.hbll-header-desktop button{color:#002e5d;background-color:#fff;display:flex;justify-content:center;align-items:center;font-size:1.1em;font-weight:500;border:none;padding:.4em 1em;line-height:1.4em}.hbll-header-dropdown-wrapper.hbll-header-desktop button .hbll-header-icon{font-size:1.3em;margin-bottom:-.1em}.hbll-header-dropdown-wrapper.hbll-header-desktop button:hover{background-color:#0047ba;color:#fff}*{box-sizing:border-box;text-decoration:none;font-size:1em}*:not(.material-symbols-outlined){font-family:inherit}.hbll-header-dropdown-wrapper button{justify-content:flex-end;font-size:1.3em;color:#fff;display:flex;align-items:center;background-color:#0047ba;width:100%;padding:.6em;border-bottom:1px solid rgba(255,255,255,.3);border-left:none;border-right:none;border-top:none;white-space:nowrap;cursor:pointer}.hbll-header-dropdown-wrapper button .hbll-header-icon{margin-left:.2em}.hbll-header-dropdown-wrapper.hbll-header-desktop:hover button{background-color:#0047ba;color:#fff}.hbll-header-dropdown-wrapper.hbll-header-desktop .hbll-header-dropdown{position:absolute;z-index:11;width:100%;min-width:10em;top:100%;left:0;height:auto;overflow:visible;background-color:#0047ba}.hbll-header-dropdown-wrapper.hbll-header-desktop .hbll-header-dropdown.collapsed{left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}\n"], dependencies: [{ kind: "component", type: ExpandCollapseComponent, selector: "lib-expand-collapse", inputs: ["isExpanded"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
132
114
|
}
|
|
133
115
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NavBarDropdownComponent, decorators: [{
|
|
134
116
|
type: Component,
|
|
135
|
-
args: [{ selector: 'lib-nav-bar-dropdown', standalone: true, imports: [ExpandCollapseComponent, CommonModule], template: "<span\n class=\"hbll-header-dropdown-wrapper\"\n data-testid=\"wrapper\"\n [ngClass]=\"{ 'hbll-header-desktop': !isSmallScreen() }\"\n (mouseenter)=\"handleMouseEnter()\"\n (mouseleave)=\"handleMouseLeave()\"\n>\n <button (click)=\"handleClick()\" data-testid=\"btn\" aria-haspopup=\"true\">\n {{ title() }}\n <span class=\"material-symbols-outlined hbll-header-icon\">\n {{ 'keyboard_arrow_' + (isOpen ? 'up' : 'down') }}\n </span>\n </button>\n @if (!isSmallScreen()) {\n
|
|
117
|
+
args: [{ selector: 'lib-nav-bar-dropdown', standalone: true, imports: [ExpandCollapseComponent, CommonModule], template: "<span\n class=\"hbll-header-dropdown-wrapper\"\n data-testid=\"wrapper\"\n [ngClass]=\"{ 'hbll-header-desktop': !isSmallScreen() }\"\n (mouseenter)=\"handleMouseEnter()\"\n (mouseleave)=\"handleMouseLeave()\"\n>\n <button (click)=\"handleClick()\" data-testid=\"btn\" aria-haspopup=\"true\">\n {{ title() }}\n <span class=\"material-symbols-outlined hbll-header-icon\">\n {{ 'keyboard_arrow_' + (isOpen ? 'up' : 'down') }}\n </span>\n </button>\n @if (!isSmallScreen()) {\n <div [class.collapsed]=\"!isOpen\" [attr.inert]=\"!isOpen ? true : null\" class=\"hbll-header-dropdown\" data-testid=\"dropdown\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </div>\n } @else {\n <lib-expand-collapse [isExpanded]=\"isOpen\" [attr.inert]=\"!isOpen ? true : null\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </lib-expand-collapse>\n }\n</span>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>\n", styles: [".hbll-header-dropdown-wrapper.hbll-header-desktop button{color:#002e5d;background-color:#fff;display:flex;justify-content:center;align-items:center;font-size:1.1em;font-weight:500;border:none;padding:.4em 1em;line-height:1.4em}.hbll-header-dropdown-wrapper.hbll-header-desktop button .hbll-header-icon{font-size:1.3em;margin-bottom:-.1em}.hbll-header-dropdown-wrapper.hbll-header-desktop button:hover{background-color:#0047ba;color:#fff}*{box-sizing:border-box;text-decoration:none;font-size:1em}*:not(.material-symbols-outlined){font-family:inherit}.hbll-header-dropdown-wrapper button{justify-content:flex-end;font-size:1.3em;color:#fff;display:flex;align-items:center;background-color:#0047ba;width:100%;padding:.6em;border-bottom:1px solid rgba(255,255,255,.3);border-left:none;border-right:none;border-top:none;white-space:nowrap;cursor:pointer}.hbll-header-dropdown-wrapper button .hbll-header-icon{margin-left:.2em}.hbll-header-dropdown-wrapper.hbll-header-desktop:hover button{background-color:#0047ba;color:#fff}.hbll-header-dropdown-wrapper.hbll-header-desktop .hbll-header-dropdown{position:absolute;z-index:11;width:100%;min-width:10em;top:100%;left:0;height:auto;overflow:visible;background-color:#0047ba}.hbll-header-dropdown-wrapper.hbll-header-desktop .hbll-header-dropdown.collapsed{left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}\n"] }]
|
|
136
118
|
}], propDecorators: { openEvent: [{
|
|
137
119
|
type: Output
|
|
138
120
|
}], hoverStarted: [{
|
|
@@ -579,8 +561,18 @@ class HbllHeaderComponent {
|
|
|
579
561
|
this.r2.setStyle(this.doc.body, 'overflow', 'hidden');
|
|
580
562
|
};
|
|
581
563
|
this.closeSidebarNav = () => {
|
|
582
|
-
|
|
583
|
-
this.
|
|
564
|
+
const navWrapper = this.navWrapper?.nativeElement;
|
|
565
|
+
const backdrop = this.backdrop?.nativeElement;
|
|
566
|
+
if (navWrapper) {
|
|
567
|
+
this.r2.addClass(navWrapper, 'is-closing');
|
|
568
|
+
this.r2.addClass(backdrop, 'is-closing');
|
|
569
|
+
navWrapper.addEventListener('animationend', () => {
|
|
570
|
+
this.showNavBar = false;
|
|
571
|
+
this.r2.removeClass(navWrapper, 'is-closing');
|
|
572
|
+
this.r2.removeClass(backdrop, 'is-closing');
|
|
573
|
+
this.r2.removeStyle(this.doc.body, 'overflow');
|
|
574
|
+
}, { once: true });
|
|
575
|
+
}
|
|
584
576
|
};
|
|
585
577
|
this.setMobileSidebarHeight = () => {
|
|
586
578
|
const headerHeight = this.header.nativeElement.getBoundingClientRect().height;
|
|
@@ -597,7 +589,7 @@ class HbllHeaderComponent {
|
|
|
597
589
|
if (!this.hoursEl()?.nativeElement.contains(e.target))
|
|
598
590
|
this.showLibraryHours = false;
|
|
599
591
|
});
|
|
600
|
-
this.setMobileSidebarHeight();
|
|
592
|
+
Promise.resolve().then(() => this.setMobileSidebarHeight());
|
|
601
593
|
}
|
|
602
594
|
onResize() {
|
|
603
595
|
this.setMobileSidebarHeight();
|
|
@@ -615,7 +607,7 @@ class HbllHeaderComponent {
|
|
|
615
607
|
}
|
|
616
608
|
}
|
|
617
609
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: HbllHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
618
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: HbllHeaderComponent, isStandalone: true, selector: "lib-hbll-header", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, mainsitebaseurl: { classPropertyName: "mainsitebaseurl", publicName: "mainsitebaseurl", isSignal: false, isRequired: false, transformFunction: null }, showImpersonateButton: { classPropertyName: "showImpersonateButton", publicName: "showImpersonateButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openImpersonationModal: "openImpersonationModal", login: "login", logout: "logout" }, host: { listeners: { "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "accountInfoEl", first: true, predicate: ["accountInfo"], descendants: true, isSignal: true }, { propertyName: "hoursEl", first: true, predicate: ["hours"], descendants: true, isSignal: true }, { propertyName: "header", first: true, predicate: ["header"], descendants: true }], ngImport: i0, template: "<header\n role=\"banner\"\n class=\"hbll-header-wrapper\"\n #header\n [ngClass]=\"{ 'hbll-header-desktop': !isScreenSmall() }\"\n>\n <a [href]=\"mainsitebaseurl\">\n <h1>\n <img\n src=\"https://media.lib.byu.edu/web-assets/images/2.0.0/byu-hbll-logo-full.svg\"\n alt=\"BYU Library Logo\"\n />\n </h1>\n </a>\n <button (click)=\"focusMainContent()\" class=\"skip-link\">Skip to main content</button>\n <div id=\"libraryInfo\" class=\"hbll-header-wrapper\">\n @if (!isScreenSmall()) {\n <div #hours id=\"mainLibraryHours\" data-testid=\"desktopHours\">\n <button\n (click)=\"showLibraryHours = !showLibraryHours\"\n class=\"hbll-header-wrapper\"\n data-testid=\"hoursBtn\"\n >\n <ng-container *ngTemplateOutlet=\"hoursTextBlock\"></ng-container>\n </button>\n @if (!isScreenSmall() && showLibraryHours) {\n <div\n @libHbllFadeInOut\n id=\"libraryHoursDropdown\"\n data-testid=\"libraryHoursDropdown\"\n >\n <section class=\"hbll-header-section\">\n <h2 class=\"hbll-header-header\">Regular Hours</h2>\n <div class=\"hbll-header-detail\">\n <h3 class=\"hbll-header-item\">Monday - Friday</h3>\n <h3 class=\"hbll-header-item\">Saturday</h3>\n <h3 class=\"hbll-header-item\">Sunday</h3>\n </div>\n <div class=\"hbll-header-hours\">\n <div class=\"hbll-header-item\">7:00 a.m. - 11:45 p.m.</div>\n <div class=\"hbll-header-item\">8:00 a.m. - 11:45 p.m.</div>\n <div class=\"hbll-header-item\">Closed*</div>\n </div>\n <div class=\"hbll-header-hours-note\">\n * Family history ONLY 4:00 p.m. - 8:00 p.m\n <ul>\n <li><span>No checkouts after 11:45 p.m.</span></li>\n <li>\n <span>All services closed 10:45 to noon on Tuesdays</span>\n </li>\n </ul>\n </div>\n </section>\n <section class=\"hbll-header-section\">\n <h2 class=\"hbll-header-header\">Upcoming Exceptions</h2>\n @if (hoursExceptions$ | async; as exceptions) {\n <div class=\"hbll-header-detail\" data-testid=\"exceptionsDetail\">\n @for (exception of exceptions; track exception.date) {\n <h3 class=\"hbll-header-item\">\n {{ exception.date | date: 'MMM. d, YYYY' }}\n </h3>\n } @empty {\n No upcoming exceptions\n }\n </div>\n <div class=\"hbll-header-hours\" data-testid=\"exceptionsHours\">\n @for (exception of exceptions; track exception.date) {\n <div class=\"hbll-header-item\"\n [attr.title]=\"exception.exception_title\"\n [attr.aria-label]=\"exception.exception_title\">\n {{ exception.exception_title | truncate:32:'...' }}\n </div>\n }\n </div>\n } @else {\n <div class=\"lib-spinner\" data-testid=\"exceptionsSpinner\"></div>\n }\n </section>\n <section class=\"hbll-header-section\">\n <h2 class=\"hbll-header-header\">Library Cafe</h2>\n <div class=\"hbll-header-detail\">\n <h3 class=\"hbll-header-item\">Bagel Bubble</h3>\n <h3 class=\"hbll-header-item\">Provecho</h3>\n </div>\n <div class=\"hbll-header-hours\">\n <div class=\"hbll-header-item\">7:00 a.m. - 11:00 p.m.</div>\n <div class=\"hbll-header-item\">10:30 a.m. - 2:00 p.m.</div>\n </div>\n </section>\n <a [href]=\"mainsitebaseurl + '/about/hours'\"\n >See all hours\n <span class=\"material-symbols-outlined\"> chevron_right </span></a\n >\n </div>\n }\n </div>\n }\n <div id=\"accountInfo\" #accountInfo>\n <button\n (click)=\"isLoggedIn ? (showAccountDropdown = !showAccountDropdown) : login.emit()\"\n class=\"hbll-header-wrapper\"\n id=\"accountBtn\"\n data-testid=\"accountBtn\"\n >\n <span class=\"material-symbols-outlined hbll-header-left-icon\"> person </span>\n @if (!isScreenSmall()) {\n <span class=\"hbll-header-name\" data-testid=\"name\">{{\n isLoggedIn ? ' ' + name : 'Login'\n }}</span>\n }\n @if (isLoggedIn) {\n <span class=\"material-symbols-outlined\" data-testid=\"loginDropdown\">\n arrow_drop_down\n </span>\n }\n </button>\n @if (isLoggedIn && showAccountDropdown) {\n <div @libHbllFadeInOut id=\"accountDropdown\" data-testid=\"accountDropdown\">\n <a [href]=\"mainsitebaseurl + '/account'\">My Account</a>\n <a [href]=\"mainsitebaseurl + '/account'\">My Items</a>\n <a [href]=\"mainsitebaseurl + '/account/request'\">Request an item</a>\n <a [href]=\"mainsitebaseurl + '/account/saved'\">Saved</a>\n <a [href]=\"mainsitebaseurl + '/account/course'\">Courses</a>\n <a [href]=\"mainsitebaseurl + '/account/rooms'\">Rooms</a>\n <a [href]=\"mainsitebaseurl + '/account/preferences'\">Preferences</a>\n @if (showImpersonateButton()) {\n <button\n (click)=\"openImpersonationModal.emit(); showAccountDropdown = false\"\n class=\"hbll-header-impersonate-btn\"\n >\n Impersonate\n </button>\n }\n <button (click)=\"logout.emit()\" data-testid=\"logout\">Logout</button>\n </div>\n }\n </div>\n @if (isScreenSmall()) {\n <div id=\"mobileNav\">\n <button\n class=\"hbll-header-wrapper\"\n data-testid=\"mobileNavBtn\"\n (click)=\"openSidebarNav()\"\n >\n <span class=\"material-symbols-outlined hbll-header-icon\"> menu </span>\n </button>\n @if (showNavBar) {\n <div\n id=\"navWrapper\"\n data-testid=\"mobileNav\"\n [@libHbllSlideInOutRightLeft]=\"{\n value: '',\n params: { xOffset: '400px' },\n }\"\n >\n <button\n id=\"closeMobileNavBtn\"\n class=\"hbll-header-wrapper\"\n data-testid=\"closeMobileNavBtn\"\n (click)=\"closeSidebarNav()\"\n >\n <span class=\"material-symbols-outlined hbll-header-icon\"> close </span>\n </button>\n <lib-nav-bar\n [mainSiteBaseUrl]=\"mainsitebaseurl\"\n [height]=\"mobileSidebarHeight\"\n />\n </div>\n <div\n @libHbllFadeInOut\n (click)=\"showNavBar = false\"\n class=\"hbll-nav-backdrop\"\n data-testid=\"mobileNavBackdrop\"\n ></div>\n }\n </div>\n }\n </div>\n</header>\n\n@if (!isScreenSmall()) {\n <div id=\"mainNav\">\n <lib-nav-bar [mainSiteBaseUrl]=\"mainsitebaseurl\" />\n </div>\n}\n@if (isScreenSmall()) {\n <a\n id=\"mobileLibraryHours\"\n [href]=\"mainsitebaseurl + '/about/hours'\"\n class=\"hbll-header-wrapper\"\n data-testid=\"mobileHours\"\n >\n <ng-container *ngTemplateOutlet=\"hoursTextBlock\"></ng-container>\n </a>\n}\n\n<ng-template #hoursTextBlock>\n @if (libraryHours()) {\n <span class=\"material-symbols-outlined hbll-header-left-icon\"> schedule </span>\n {{\n libraryHours()?.is_closed\n ? 'CLOSED'\n : \"Today's hours: \" +\n (libraryHours()!.date | libraryHours: libraryHours()!.open_time) +\n ' - ' +\n (libraryHours()!.date | libraryHours: libraryHours()!.close_time)\n }}\n }\n</ng-template>\n", styles: [".lib-spinner{border:.3em solid #dfe9f7;border-top:.3em solid #4070b0;border-radius:100%;width:30px;height:30px;animation:loadingSpinnerAnimate 1s ease infinite;position:relative}@keyframes loadingSpinnerAnimate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}*{box-sizing:border-box;text-decoration:none;font-size:1em}*:not(.material-symbols-outlined){font-family:inherit}.hbll-header-wrapper{display:flex;align-items:center;font-size:1em}.skip-link{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}.skip-link:focus{position:static;width:auto;height:auto;overflow:visible;margin-left:1rem;background:#fff;color:#00285b;font-size:1.5rem;font-weight:580;padding:.5rem 1rem;z-index:1000;text-decoration:none;border:.1875rem solid #0050b7;border-radius:.25rem;cursor:pointer}.skip-link:hover{color:#00285b;background-color:#e3edf8;border:.1875rem solid #e3edf8}.hbll-nav-backdrop{background-color:#000;opacity:.3;height:100vh;width:100vw;left:0;top:0;transform:translate(-100vw);position:absolute;z-index:-1}#mobileLibraryHours{color:#141414;background-color:#e6e6e6;font-size:1em;min-height:2em}#mobileLibraryHours.hbll-header-wrapper{width:100%;justify-content:center;padding:.2em}.hbll-header-icon,.hbll-header-left-icon{font-size:1.2em}.hbll-header-left-icon{margin-right:.2em}header{background-color:#002e5d;display:flex;align-items:center}header a h1{font-size:100%;margin:0;height:1.8em}header a h1 img{height:100%;padding:0 0 0 .6em}header #libraryInfo{margin-left:auto;color:#fff}header #libraryInfo a,header #libraryInfo button{transition:color .2s ease-in-out;color:#fffc}header #libraryInfo a:hover,header #libraryInfo button:hover{color:#fff}header #libraryInfo #accountInfo button,header #libraryInfo #mobileNav button{padding:.8em .6em}header #libraryInfo #accountBtn .name{margin-left:.4em}header #libraryInfo #mobileNav{position:relative;z-index:11}header #libraryInfo #mobileNav #navWrapper{color:#fff;position:absolute;top:0;right:0}header #libraryInfo #mobileNav #navWrapper #closeMobileNavBtn{background-color:#0047ba;margin-left:auto;padding-left:.9em}header #libraryInfo :last-child button{padding-right:1em!important}header #libraryInfo .hbll-header-icon,header #libraryInfo .hbll-header-left-icon{font-size:1.6em}header #libraryInfo #accountInfo{position:relative}header #libraryInfo #accountInfo #accountDropdown{font-size:1em;text-wrap:nowrap;position:absolute;background-color:#002e5d;top:100%;right:-32px;z-index:11;background-color:#233753}header #libraryInfo #accountInfo #accountDropdown .hbll-header-impersonate-btn{color:#ca7ad1cc}header #libraryInfo #accountInfo #accountDropdown .hbll-header-impersonate-btn:hover{color:#ca7ad1}header #libraryInfo #accountInfo #accountDropdown a,header #libraryInfo #accountInfo #accountDropdown button{display:block;width:100%;text-align:left;padding:.4em 1.2em;font-size:1.1em}header #libraryInfo #accountInfo #accountDropdown a:first-child,header #libraryInfo #accountInfo #accountDropdown button:first-child{margin-bottom:.4em;padding-top:.6em;padding-bottom:.6em;border-bottom:1px solid rgba(255,255,255,.3)}header #libraryInfo #accountInfo #accountDropdown a:last-child,header #libraryInfo #accountInfo #accountDropdown button:last-child{margin-top:.4em;border-top:1px solid rgba(255,255,255,.3);padding-top:.6em;padding-bottom:.6em}header #libraryInfo #accountInfo #accountDropdown:before{content:\"\";width:0;height:0;border-style:solid;border-width:0 .6em .6em .6em;border-color:transparent transparent hsl(214,41%,23%) transparent;position:absolute;bottom:100%;right:50%;transform:translate(50%);z-index:inherit}header.hbll-header-desktop{padding:0 2em}header.hbll-header-desktop #libraryInfo #mainLibraryHours{position:relative;margin-right:1em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown{z-index:12;background-color:#fff;border-radius:4px;border:1px solid #d2d2d2;position:absolute;color:#000;padding:2em;top:100%;max-width:400%;right:50%;transform:translate(50%);margin-top:.6em;margin-right:2rem}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section{display:grid;grid-template-columns:repeat(4,7.5em);grid-template-rows:1fr;grid-column-gap:0px;grid-row-gap:0px;margin-bottom:1em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section h2{margin:0}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours-note{grid-column:2/-1;font-size:.8em;margin-top:1em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours-note ul{list-style-type:disc;list-style-position:inside;margin-left:.8em;padding:0}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours-note ul li span{position:relative}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-header{font-weight:600;font-size:1em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-detail,header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours{margin-top:.2em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-detail .hbll-header-item+.hbll-header-item,header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours .hbll-header-item+.hbll-header-item{margin-top:.3em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-detail h3,header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours h3{margin:0;font-size:inherit}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-detail{font-weight:600;white-space:nowrap}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours{white-space:nowrap}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown a{color:#4070b0;display:flex;align-items:center;float:right}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown a:hover{color:#6892ca}header.hbll-header-desktop #libraryInfo #accountInfo #accountDropdown{right:auto;left:50%;transform:translate(-50%)}button{background-color:transparent;border:none;cursor:pointer;font-family:inherit;font-size:inherit;color:inherit;padding:0}\n"], dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: LibraryHoursPipe, name: "libraryHours" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: NavBarComponent, selector: "lib-nav-bar", inputs: ["mainSiteBaseUrl", "height"] }, { kind: "pipe", type: TruncatePipe, name: "truncate" }], animations: [libHbllSlideInOutRightLeft, libHbllFadeInOut] }); }
|
|
610
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: HbllHeaderComponent, isStandalone: true, selector: "lib-hbll-header", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, mainsitebaseurl: { classPropertyName: "mainsitebaseurl", publicName: "mainsitebaseurl", isSignal: false, isRequired: false, transformFunction: null }, showImpersonateButton: { classPropertyName: "showImpersonateButton", publicName: "showImpersonateButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openImpersonationModal: "openImpersonationModal", login: "login", logout: "logout" }, host: { listeners: { "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "accountInfoEl", first: true, predicate: ["accountInfo"], descendants: true, isSignal: true }, { propertyName: "hoursEl", first: true, predicate: ["hours"], descendants: true, isSignal: true }, { propertyName: "header", first: true, predicate: ["header"], descendants: true }, { propertyName: "navWrapper", first: true, predicate: ["navWrapper"], descendants: true }, { propertyName: "backdrop", first: true, predicate: ["backdrop"], descendants: true }], ngImport: i0, template: "<header\n role=\"banner\"\n class=\"hbll-header-wrapper\"\n #header\n [ngClass]=\"{ 'hbll-header-desktop': !isScreenSmall() }\"\n>\n <a [href]=\"mainsitebaseurl\">\n <h1>\n <img\n src=\"https://media.lib.byu.edu/web-assets/images/2.0.0/byu-hbll-logo-full.svg\"\n alt=\"BYU Library Logo\"\n />\n </h1>\n </a>\n <button (click)=\"focusMainContent()\" class=\"skip-link\">Skip to main content</button>\n <div id=\"libraryInfo\" class=\"hbll-header-wrapper\">\n @if (!isScreenSmall()) {\n <div #hours id=\"mainLibraryHours\" data-testid=\"desktopHours\">\n <button\n (click)=\"showLibraryHours = !showLibraryHours\"\n class=\"hbll-header-wrapper\"\n data-testid=\"hoursBtn\"\n >\n <ng-container *ngTemplateOutlet=\"hoursTextBlock\"></ng-container>\n </button>\n @if (!isScreenSmall() && showLibraryHours) {\n <div\n @libHbllFadeInOut\n id=\"libraryHoursDropdown\"\n data-testid=\"libraryHoursDropdown\"\n >\n <section class=\"hbll-header-section\">\n <h2 class=\"hbll-header-header\">Regular Hours</h2>\n <div class=\"hbll-header-detail\">\n <h3 class=\"hbll-header-item\">Monday - Friday</h3>\n <h3 class=\"hbll-header-item\">Saturday</h3>\n <h3 class=\"hbll-header-item\">Sunday</h3>\n </div>\n <div class=\"hbll-header-hours\">\n <div class=\"hbll-header-item\">7:00 a.m. - 11:45 p.m.</div>\n <div class=\"hbll-header-item\">8:00 a.m. - 11:45 p.m.</div>\n <div class=\"hbll-header-item\">Closed*</div>\n </div>\n <div class=\"hbll-header-hours-note\">\n * Family history ONLY 4:00 p.m. - 8:00 p.m\n <ul>\n <li><span>No checkouts after 11:45 p.m.</span></li>\n <li>\n <span>All services closed 10:45 to noon on Tuesdays</span>\n </li>\n </ul>\n </div>\n </section>\n <section class=\"hbll-header-section\">\n <h2 class=\"hbll-header-header\">Upcoming Exceptions</h2>\n @if (hoursExceptions$ | async; as exceptions) {\n <div class=\"hbll-header-detail\" data-testid=\"exceptionsDetail\">\n @for (exception of exceptions; track exception.date) {\n <h3 class=\"hbll-header-item\">\n {{ exception.date | date: 'MMM. d, YYYY' }}\n </h3>\n } @empty {\n No upcoming exceptions\n }\n </div>\n <div class=\"hbll-header-hours\" data-testid=\"exceptionsHours\">\n @for (exception of exceptions; track exception.date) {\n <div class=\"hbll-header-item\"\n [attr.title]=\"exception.exception_title\"\n [attr.aria-label]=\"exception.exception_title\">\n {{ exception.exception_title | truncate:32:'...' }}\n </div>\n }\n </div>\n } @else {\n <div class=\"lib-spinner\" data-testid=\"exceptionsSpinner\"></div>\n }\n </section>\n <section class=\"hbll-header-section\">\n <h2 class=\"hbll-header-header\">Library Cafe</h2>\n <div class=\"hbll-header-detail\">\n <h3 class=\"hbll-header-item\">Bagel Bubble</h3>\n <h3 class=\"hbll-header-item\">Provecho</h3>\n </div>\n <div class=\"hbll-header-hours\">\n <div class=\"hbll-header-item\">7:00 a.m. - 11:00 p.m.</div>\n <div class=\"hbll-header-item\">10:30 a.m. - 2:00 p.m.</div>\n </div>\n </section>\n <a [href]=\"mainsitebaseurl + '/about/hours'\"\n >See all hours\n <span class=\"material-symbols-outlined\"> chevron_right </span></a\n >\n </div>\n }\n </div>\n }\n <div id=\"accountInfo\" #accountInfo>\n <button\n (click)=\"isLoggedIn ? (showAccountDropdown = !showAccountDropdown) : login.emit()\"\n class=\"hbll-header-wrapper\"\n id=\"accountBtn\"\n data-testid=\"accountBtn\"\n >\n <span class=\"material-symbols-outlined hbll-header-left-icon\"> person </span>\n @if (!isScreenSmall()) {\n <span class=\"hbll-header-name\" data-testid=\"name\">{{\n isLoggedIn ? ' ' + name : 'Login'\n }}</span>\n }\n @if (isLoggedIn) {\n <span class=\"material-symbols-outlined\" data-testid=\"loginDropdown\">\n arrow_drop_down\n </span>\n }\n </button>\n @if (isLoggedIn && showAccountDropdown) {\n <div @libHbllFadeInOut id=\"accountDropdown\" data-testid=\"accountDropdown\">\n <a [href]=\"mainsitebaseurl + '/account'\">My Account</a>\n <a [href]=\"mainsitebaseurl + '/account'\">My Items</a>\n <a [href]=\"mainsitebaseurl + '/account/request'\">Request an item</a>\n <a [href]=\"mainsitebaseurl + '/account/saved'\">Saved</a>\n <a [href]=\"mainsitebaseurl + '/account/course'\">Courses</a>\n <a [href]=\"mainsitebaseurl + '/account/rooms'\">Rooms</a>\n <a [href]=\"mainsitebaseurl + '/account/preferences'\">Preferences</a>\n @if (showImpersonateButton()) {\n <button\n (click)=\"openImpersonationModal.emit(); showAccountDropdown = false\"\n class=\"hbll-header-impersonate-btn\"\n >\n Impersonate\n </button>\n }\n <button (click)=\"logout.emit()\" data-testid=\"logout\">Logout</button>\n </div>\n }\n </div>\n @if (isScreenSmall()) {\n <div id=\"mobileNav\" [class.collapsed]=\"!showNavBar\">\n <button\n class=\"hbll-header-wrapper\"\n data-testid=\"mobileNavBtn\"\n (click)=\"openSidebarNav()\"\n >\n <span class=\"material-symbols-outlined hbll-header-icon\"> menu </span>\n </button>\n <div\n #navWrapper\n id=\"navWrapper\"\n data-testid=\"mobileNav\"\n [class.open]=\"showNavBar\"\n [attr.inert]=\"!showNavBar ? true : null\"\n >\n <button\n id=\"closeMobileNavBtn\"\n class=\"hbll-header-wrapper\"\n data-testid=\"closeMobileNavBtn\"\n (click)=\"closeSidebarNav()\"\n >\n <span class=\"material-symbols-outlined hbll-header-icon\"> close </span>\n </button>\n <lib-nav-bar\n [mainSiteBaseUrl]=\"mainsitebaseurl\"\n [height]=\"mobileSidebarHeight\"\n />\n </div>\n <div\n #backdrop\n (click)=\"closeSidebarNav()\"\n class=\"hbll-nav-backdrop\"\n [class.open]=\"showNavBar\"\n data-testid=\"mobileNavBackdrop\"\n ></div>\n </div>\n }\n </div>\n</header>\n\n@if (!isScreenSmall()) {\n <div id=\"mainNav\">\n <lib-nav-bar [mainSiteBaseUrl]=\"mainsitebaseurl\" />\n </div>\n}\n@if (isScreenSmall()) {\n <a\n id=\"mobileLibraryHours\"\n [href]=\"mainsitebaseurl + '/about/hours'\"\n class=\"hbll-header-wrapper\"\n data-testid=\"mobileHours\"\n >\n <ng-container *ngTemplateOutlet=\"hoursTextBlock\"></ng-container>\n </a>\n}\n\n<ng-template #hoursTextBlock>\n @if (libraryHours()) {\n <span class=\"material-symbols-outlined hbll-header-left-icon\"> schedule </span>\n {{\n libraryHours()?.is_closed\n ? 'CLOSED'\n : \"Today's hours: \" +\n (libraryHours()!.date | libraryHours: libraryHours()!.open_time) +\n ' - ' +\n (libraryHours()!.date | libraryHours: libraryHours()!.close_time)\n }}\n }\n</ng-template>\n", styles: [".lib-spinner{border:.3em solid #dfe9f7;border-top:.3em solid #4070b0;border-radius:100%;width:30px;height:30px;animation:loadingSpinnerAnimate 1s ease infinite;position:relative}@keyframes loadingSpinnerAnimate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}*{box-sizing:border-box;text-decoration:none;font-size:1em}*:not(.material-symbols-outlined){font-family:inherit}.hbll-header-wrapper{display:flex;align-items:center;font-size:1em}.skip-link{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}.skip-link:focus{position:static;width:auto;height:auto;overflow:visible;margin-left:1rem;background:#fff;color:#00285b;font-size:1.5rem;font-weight:580;padding:.5rem 1rem;z-index:1000;text-decoration:none;border:.1875rem solid #0050b7;border-radius:.25rem;cursor:pointer}.skip-link:hover{color:#00285b;background-color:#e3edf8;border:.1875rem solid #e3edf8}.hbll-nav-backdrop{background-color:#000;opacity:.3;height:100vh;width:100vw;left:0;top:0;transform:translate(-100vw);position:absolute;z-index:-1}.hbll-nav-backdrop.open{animation-name:fadeIn;animation-duration:.15s;animation-timing-function:ease-in;animation-fill-mode:forwards}.hbll-nav-backdrop.is-closing{animation-name:fadeOut;animation-duration:.15s;animation-timing-function:ease-out;animation-fill-mode:forwards}#mobileLibraryHours{color:#141414;background-color:#e6e6e6;font-size:1em;min-height:2em}#mobileLibraryHours.hbll-header-wrapper{width:100%;justify-content:center;padding:.2em}.hbll-header-icon,.hbll-header-left-icon{font-size:1.2em}.hbll-header-left-icon{margin-right:.2em}header{background-color:#002e5d;display:flex;align-items:center}header a h1{font-size:100%;margin:0;height:1.8em}header a h1 img{height:100%;padding:0 0 0 .6em}header #libraryInfo{margin-left:auto;color:#fff}header #libraryInfo a,header #libraryInfo button{transition:color .2s ease-in-out;color:#fffc}header #libraryInfo a:hover,header #libraryInfo button:hover{color:#fff}header #libraryInfo #accountInfo button,header #libraryInfo #mobileNav button{padding:.8em .6em}header #libraryInfo #accountBtn .name{margin-left:.4em}header #libraryInfo #mobileNav{position:relative;z-index:11}header #libraryInfo #mobileNav.collapsed #navWrapper{left:-9999px;top:auto;overflow:hidden;width:1px;height:1px}header #libraryInfo #mobileNav.collapsed .hbll-nav-backdrop{display:none}header #libraryInfo #mobileNav.collapsed nav{left:-9999px;top:auto;overflow:hidden;width:1px;height:1px}header #libraryInfo #mobileNav #navWrapper{color:#fff;position:absolute;top:0;transform:translate(calc(min(100vw,400px) - 55px))}header #libraryInfo #mobileNav #navWrapper.open{animation-name:slideInFromRight;animation-duration:.2s;animation-timing-function:ease-in-out;animation-fill-mode:forwards}header #libraryInfo #mobileNav #navWrapper.is-closing{animation-name:slideOutToRight;animation-duration:.2s;animation-timing-function:ease-in-out;animation-fill-mode:forwards}header #libraryInfo #mobileNav #navWrapper #closeMobileNavBtn{background-color:#0047ba;margin-left:auto;padding-left:.9em}header #libraryInfo :last-child button{padding-right:1em!important}header #libraryInfo .hbll-header-icon,header #libraryInfo .hbll-header-left-icon{font-size:1.6em}header #libraryInfo #accountInfo{position:relative}header #libraryInfo #accountInfo #accountDropdown{font-size:1em;text-wrap:nowrap;position:absolute;background-color:#002e5d;top:100%;right:-32px;z-index:11;background-color:#233753}header #libraryInfo #accountInfo #accountDropdown .hbll-header-impersonate-btn{color:#ca7ad1cc}header #libraryInfo #accountInfo #accountDropdown .hbll-header-impersonate-btn:hover{color:#ca7ad1}header #libraryInfo #accountInfo #accountDropdown a,header #libraryInfo #accountInfo #accountDropdown button{display:block;width:100%;text-align:left;padding:.4em 1.2em;font-size:1.1em}header #libraryInfo #accountInfo #accountDropdown a:first-child,header #libraryInfo #accountInfo #accountDropdown button:first-child{margin-bottom:.4em;padding-top:.6em;padding-bottom:.6em;border-bottom:1px solid rgba(255,255,255,.3)}header #libraryInfo #accountInfo #accountDropdown a:last-child,header #libraryInfo #accountInfo #accountDropdown button:last-child{margin-top:.4em;border-top:1px solid rgba(255,255,255,.3);padding-top:.6em;padding-bottom:.6em}header #libraryInfo #accountInfo #accountDropdown:before{content:\"\";width:0;height:0;border-style:solid;border-width:0 .6em .6em .6em;border-color:transparent transparent hsl(214,41%,23%) transparent;position:absolute;bottom:100%;right:50%;transform:translate(50%);z-index:inherit}header.hbll-header-desktop{padding:0 2em}header.hbll-header-desktop #libraryInfo #mainLibraryHours{position:relative;margin-right:1em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown{z-index:12;background-color:#fff;border-radius:4px;border:1px solid #d2d2d2;position:absolute;color:#000;padding:2em;top:100%;max-width:400%;right:50%;transform:translate(50%);margin-top:.6em;margin-right:2rem}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section{display:grid;grid-template-columns:repeat(4,7.5em);grid-template-rows:1fr;grid-column-gap:0px;grid-row-gap:0px;margin-bottom:1em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section h2{margin:0}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours-note{grid-column:2/-1;font-size:.8em;margin-top:1em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours-note ul{list-style-type:disc;list-style-position:inside;margin-left:.8em;padding:0}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours-note ul li span{position:relative}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-header{font-weight:600;font-size:1em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-detail,header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours{margin-top:.2em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-detail .hbll-header-item+.hbll-header-item,header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours .hbll-header-item+.hbll-header-item{margin-top:.3em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-detail h3,header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours h3{margin:0;font-size:inherit}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-detail{font-weight:600;white-space:nowrap}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours{white-space:nowrap}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown a{color:#4070b0;display:flex;align-items:center;float:right}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown a:hover{color:#6892ca}header.hbll-header-desktop #libraryInfo #accountInfo #accountDropdown{right:auto;left:50%;transform:translate(-50%)}button{background-color:transparent;border:none;cursor:pointer;font-family:inherit;font-size:inherit;color:inherit;padding:0}@keyframes slideInFromRight{0%{transform:translate(calc(min(100vw,400px) - 55px))}to{transform:translate(0)}}@keyframes slideOutToRight{0%{transform:translate(0)}to{transform:translate(min(100vw,400px))}}@keyframes fadeIn{0%{opacity:0}to{opacity:.3}}@keyframes fadeOut{0%{opacity:.3}to{opacity:0}}\n"], dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: LibraryHoursPipe, name: "libraryHours" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: NavBarComponent, selector: "lib-nav-bar", inputs: ["mainSiteBaseUrl", "height"] }, { kind: "pipe", type: TruncatePipe, name: "truncate" }], animations: [libHbllFadeInOut] }); }
|
|
619
611
|
}
|
|
620
612
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: HbllHeaderComponent, decorators: [{
|
|
621
613
|
type: Component,
|
|
@@ -627,10 +619,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImpor
|
|
|
627
619
|
NavBarComponent,
|
|
628
620
|
ExpandCollapseComponent,
|
|
629
621
|
TruncatePipe,
|
|
630
|
-
], animations: [libHbllSlideInOutRightLeft, libHbllFadeInOut], template: "<header\n role=\"banner\"\n class=\"hbll-header-wrapper\"\n #header\n [ngClass]=\"{ 'hbll-header-desktop': !isScreenSmall() }\"\n>\n <a [href]=\"mainsitebaseurl\">\n <h1>\n <img\n src=\"https://media.lib.byu.edu/web-assets/images/2.0.0/byu-hbll-logo-full.svg\"\n alt=\"BYU Library Logo\"\n />\n </h1>\n </a>\n <button (click)=\"focusMainContent()\" class=\"skip-link\">Skip to main content</button>\n <div id=\"libraryInfo\" class=\"hbll-header-wrapper\">\n @if (!isScreenSmall()) {\n <div #hours id=\"mainLibraryHours\" data-testid=\"desktopHours\">\n <button\n (click)=\"showLibraryHours = !showLibraryHours\"\n class=\"hbll-header-wrapper\"\n data-testid=\"hoursBtn\"\n >\n <ng-container *ngTemplateOutlet=\"hoursTextBlock\"></ng-container>\n </button>\n @if (!isScreenSmall() && showLibraryHours) {\n <div\n @libHbllFadeInOut\n id=\"libraryHoursDropdown\"\n data-testid=\"libraryHoursDropdown\"\n >\n <section class=\"hbll-header-section\">\n <h2 class=\"hbll-header-header\">Regular Hours</h2>\n <div class=\"hbll-header-detail\">\n <h3 class=\"hbll-header-item\">Monday - Friday</h3>\n <h3 class=\"hbll-header-item\">Saturday</h3>\n <h3 class=\"hbll-header-item\">Sunday</h3>\n </div>\n <div class=\"hbll-header-hours\">\n <div class=\"hbll-header-item\">7:00 a.m. - 11:45 p.m.</div>\n <div class=\"hbll-header-item\">8:00 a.m. - 11:45 p.m.</div>\n <div class=\"hbll-header-item\">Closed*</div>\n </div>\n <div class=\"hbll-header-hours-note\">\n * Family history ONLY 4:00 p.m. - 8:00 p.m\n <ul>\n <li><span>No checkouts after 11:45 p.m.</span></li>\n <li>\n <span>All services closed 10:45 to noon on Tuesdays</span>\n </li>\n </ul>\n </div>\n </section>\n <section class=\"hbll-header-section\">\n <h2 class=\"hbll-header-header\">Upcoming Exceptions</h2>\n @if (hoursExceptions$ | async; as exceptions) {\n <div class=\"hbll-header-detail\" data-testid=\"exceptionsDetail\">\n @for (exception of exceptions; track exception.date) {\n <h3 class=\"hbll-header-item\">\n {{ exception.date | date: 'MMM. d, YYYY' }}\n </h3>\n } @empty {\n No upcoming exceptions\n }\n </div>\n <div class=\"hbll-header-hours\" data-testid=\"exceptionsHours\">\n @for (exception of exceptions; track exception.date) {\n <div class=\"hbll-header-item\"\n [attr.title]=\"exception.exception_title\"\n [attr.aria-label]=\"exception.exception_title\">\n {{ exception.exception_title | truncate:32:'...' }}\n </div>\n }\n </div>\n } @else {\n <div class=\"lib-spinner\" data-testid=\"exceptionsSpinner\"></div>\n }\n </section>\n <section class=\"hbll-header-section\">\n <h2 class=\"hbll-header-header\">Library Cafe</h2>\n <div class=\"hbll-header-detail\">\n <h3 class=\"hbll-header-item\">Bagel Bubble</h3>\n <h3 class=\"hbll-header-item\">Provecho</h3>\n </div>\n <div class=\"hbll-header-hours\">\n <div class=\"hbll-header-item\">7:00 a.m. - 11:00 p.m.</div>\n <div class=\"hbll-header-item\">10:30 a.m. - 2:00 p.m.</div>\n </div>\n </section>\n <a [href]=\"mainsitebaseurl + '/about/hours'\"\n >See all hours\n <span class=\"material-symbols-outlined\"> chevron_right </span></a\n >\n </div>\n }\n </div>\n }\n <div id=\"accountInfo\" #accountInfo>\n <button\n (click)=\"isLoggedIn ? (showAccountDropdown = !showAccountDropdown) : login.emit()\"\n class=\"hbll-header-wrapper\"\n id=\"accountBtn\"\n data-testid=\"accountBtn\"\n >\n <span class=\"material-symbols-outlined hbll-header-left-icon\"> person </span>\n @if (!isScreenSmall()) {\n <span class=\"hbll-header-name\" data-testid=\"name\">{{\n isLoggedIn ? ' ' + name : 'Login'\n }}</span>\n }\n @if (isLoggedIn) {\n <span class=\"material-symbols-outlined\" data-testid=\"loginDropdown\">\n arrow_drop_down\n </span>\n }\n </button>\n @if (isLoggedIn && showAccountDropdown) {\n <div @libHbllFadeInOut id=\"accountDropdown\" data-testid=\"accountDropdown\">\n <a [href]=\"mainsitebaseurl + '/account'\">My Account</a>\n <a [href]=\"mainsitebaseurl + '/account'\">My Items</a>\n <a [href]=\"mainsitebaseurl + '/account/request'\">Request an item</a>\n <a [href]=\"mainsitebaseurl + '/account/saved'\">Saved</a>\n <a [href]=\"mainsitebaseurl + '/account/course'\">Courses</a>\n <a [href]=\"mainsitebaseurl + '/account/rooms'\">Rooms</a>\n <a [href]=\"mainsitebaseurl + '/account/preferences'\">Preferences</a>\n @if (showImpersonateButton()) {\n <button\n (click)=\"openImpersonationModal.emit(); showAccountDropdown = false\"\n class=\"hbll-header-impersonate-btn\"\n >\n Impersonate\n </button>\n }\n <button (click)=\"logout.emit()\" data-testid=\"logout\">Logout</button>\n </div>\n }\n </div>\n @if (isScreenSmall()) {\n <div id=\"mobileNav\">\n <button\n class=\"hbll-header-wrapper\"\n data-testid=\"mobileNavBtn\"\n (click)=\"openSidebarNav()\"\n >\n <span class=\"material-symbols-outlined hbll-header-icon\"> menu </span>\n </button>\n @if (showNavBar) {\n <div\n id=\"navWrapper\"\n data-testid=\"mobileNav\"\n [@libHbllSlideInOutRightLeft]=\"{\n value: '',\n params: { xOffset: '400px' },\n }\"\n >\n <button\n id=\"closeMobileNavBtn\"\n class=\"hbll-header-wrapper\"\n data-testid=\"closeMobileNavBtn\"\n (click)=\"closeSidebarNav()\"\n >\n <span class=\"material-symbols-outlined hbll-header-icon\"> close </span>\n </button>\n <lib-nav-bar\n [mainSiteBaseUrl]=\"mainsitebaseurl\"\n [height]=\"mobileSidebarHeight\"\n />\n </div>\n <div\n @libHbllFadeInOut\n (click)=\"showNavBar = false\"\n class=\"hbll-nav-backdrop\"\n data-testid=\"mobileNavBackdrop\"\n ></div>\n }\n </div>\n }\n </div>\n</header>\n\n@if (!isScreenSmall()) {\n <div id=\"mainNav\">\n <lib-nav-bar [mainSiteBaseUrl]=\"mainsitebaseurl\" />\n </div>\n}\n@if (isScreenSmall()) {\n <a\n id=\"mobileLibraryHours\"\n [href]=\"mainsitebaseurl + '/about/hours'\"\n class=\"hbll-header-wrapper\"\n data-testid=\"mobileHours\"\n >\n <ng-container *ngTemplateOutlet=\"hoursTextBlock\"></ng-container>\n </a>\n}\n\n<ng-template #hoursTextBlock>\n @if (libraryHours()) {\n <span class=\"material-symbols-outlined hbll-header-left-icon\"> schedule </span>\n {{\n libraryHours()?.is_closed\n ? 'CLOSED'\n : \"Today's hours: \" +\n (libraryHours()!.date | libraryHours: libraryHours()!.open_time) +\n ' - ' +\n (libraryHours()!.date | libraryHours: libraryHours()!.close_time)\n }}\n }\n</ng-template>\n", styles: [".lib-spinner{border:.3em solid #dfe9f7;border-top:.3em solid #4070b0;border-radius:100%;width:30px;height:30px;animation:loadingSpinnerAnimate 1s ease infinite;position:relative}@keyframes loadingSpinnerAnimate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}*{box-sizing:border-box;text-decoration:none;font-size:1em}*:not(.material-symbols-outlined){font-family:inherit}.hbll-header-wrapper{display:flex;align-items:center;font-size:1em}.skip-link{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}.skip-link:focus{position:static;width:auto;height:auto;overflow:visible;margin-left:1rem;background:#fff;color:#00285b;font-size:1.5rem;font-weight:580;padding:.5rem 1rem;z-index:1000;text-decoration:none;border:.1875rem solid #0050b7;border-radius:.25rem;cursor:pointer}.skip-link:hover{color:#00285b;background-color:#e3edf8;border:.1875rem solid #e3edf8}.hbll-nav-backdrop{background-color:#000;opacity:.3;height:100vh;width:100vw;left:0;top:0;transform:translate(-100vw);position:absolute;z-index:-1}#mobileLibraryHours{color:#141414;background-color:#e6e6e6;font-size:1em;min-height:2em}#mobileLibraryHours.hbll-header-wrapper{width:100%;justify-content:center;padding:.2em}.hbll-header-icon,.hbll-header-left-icon{font-size:1.2em}.hbll-header-left-icon{margin-right:.2em}header{background-color:#002e5d;display:flex;align-items:center}header a h1{font-size:100%;margin:0;height:1.8em}header a h1 img{height:100%;padding:0 0 0 .6em}header #libraryInfo{margin-left:auto;color:#fff}header #libraryInfo a,header #libraryInfo button{transition:color .2s ease-in-out;color:#fffc}header #libraryInfo a:hover,header #libraryInfo button:hover{color:#fff}header #libraryInfo #accountInfo button,header #libraryInfo #mobileNav button{padding:.8em .6em}header #libraryInfo #accountBtn .name{margin-left:.4em}header #libraryInfo #mobileNav{position:relative;z-index:11}header #libraryInfo #mobileNav #navWrapper{color:#fff;position:absolute;top:0;right:0}header #libraryInfo #mobileNav #navWrapper #closeMobileNavBtn{background-color:#0047ba;margin-left:auto;padding-left:.9em}header #libraryInfo :last-child button{padding-right:1em!important}header #libraryInfo .hbll-header-icon,header #libraryInfo .hbll-header-left-icon{font-size:1.6em}header #libraryInfo #accountInfo{position:relative}header #libraryInfo #accountInfo #accountDropdown{font-size:1em;text-wrap:nowrap;position:absolute;background-color:#002e5d;top:100%;right:-32px;z-index:11;background-color:#233753}header #libraryInfo #accountInfo #accountDropdown .hbll-header-impersonate-btn{color:#ca7ad1cc}header #libraryInfo #accountInfo #accountDropdown .hbll-header-impersonate-btn:hover{color:#ca7ad1}header #libraryInfo #accountInfo #accountDropdown a,header #libraryInfo #accountInfo #accountDropdown button{display:block;width:100%;text-align:left;padding:.4em 1.2em;font-size:1.1em}header #libraryInfo #accountInfo #accountDropdown a:first-child,header #libraryInfo #accountInfo #accountDropdown button:first-child{margin-bottom:.4em;padding-top:.6em;padding-bottom:.6em;border-bottom:1px solid rgba(255,255,255,.3)}header #libraryInfo #accountInfo #accountDropdown a:last-child,header #libraryInfo #accountInfo #accountDropdown button:last-child{margin-top:.4em;border-top:1px solid rgba(255,255,255,.3);padding-top:.6em;padding-bottom:.6em}header #libraryInfo #accountInfo #accountDropdown:before{content:\"\";width:0;height:0;border-style:solid;border-width:0 .6em .6em .6em;border-color:transparent transparent hsl(214,41%,23%) transparent;position:absolute;bottom:100%;right:50%;transform:translate(50%);z-index:inherit}header.hbll-header-desktop{padding:0 2em}header.hbll-header-desktop #libraryInfo #mainLibraryHours{position:relative;margin-right:1em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown{z-index:12;background-color:#fff;border-radius:4px;border:1px solid #d2d2d2;position:absolute;color:#000;padding:2em;top:100%;max-width:400%;right:50%;transform:translate(50%);margin-top:.6em;margin-right:2rem}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section{display:grid;grid-template-columns:repeat(4,7.5em);grid-template-rows:1fr;grid-column-gap:0px;grid-row-gap:0px;margin-bottom:1em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section h2{margin:0}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours-note{grid-column:2/-1;font-size:.8em;margin-top:1em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours-note ul{list-style-type:disc;list-style-position:inside;margin-left:.8em;padding:0}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours-note ul li span{position:relative}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-header{font-weight:600;font-size:1em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-detail,header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours{margin-top:.2em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-detail .hbll-header-item+.hbll-header-item,header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours .hbll-header-item+.hbll-header-item{margin-top:.3em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-detail h3,header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours h3{margin:0;font-size:inherit}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-detail{font-weight:600;white-space:nowrap}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours{white-space:nowrap}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown a{color:#4070b0;display:flex;align-items:center;float:right}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown a:hover{color:#6892ca}header.hbll-header-desktop #libraryInfo #accountInfo #accountDropdown{right:auto;left:50%;transform:translate(-50%)}button{background-color:transparent;border:none;cursor:pointer;font-family:inherit;font-size:inherit;color:inherit;padding:0}\n"] }]
|
|
622
|
+
], animations: [libHbllFadeInOut], template: "<header\n role=\"banner\"\n class=\"hbll-header-wrapper\"\n #header\n [ngClass]=\"{ 'hbll-header-desktop': !isScreenSmall() }\"\n>\n <a [href]=\"mainsitebaseurl\">\n <h1>\n <img\n src=\"https://media.lib.byu.edu/web-assets/images/2.0.0/byu-hbll-logo-full.svg\"\n alt=\"BYU Library Logo\"\n />\n </h1>\n </a>\n <button (click)=\"focusMainContent()\" class=\"skip-link\">Skip to main content</button>\n <div id=\"libraryInfo\" class=\"hbll-header-wrapper\">\n @if (!isScreenSmall()) {\n <div #hours id=\"mainLibraryHours\" data-testid=\"desktopHours\">\n <button\n (click)=\"showLibraryHours = !showLibraryHours\"\n class=\"hbll-header-wrapper\"\n data-testid=\"hoursBtn\"\n >\n <ng-container *ngTemplateOutlet=\"hoursTextBlock\"></ng-container>\n </button>\n @if (!isScreenSmall() && showLibraryHours) {\n <div\n @libHbllFadeInOut\n id=\"libraryHoursDropdown\"\n data-testid=\"libraryHoursDropdown\"\n >\n <section class=\"hbll-header-section\">\n <h2 class=\"hbll-header-header\">Regular Hours</h2>\n <div class=\"hbll-header-detail\">\n <h3 class=\"hbll-header-item\">Monday - Friday</h3>\n <h3 class=\"hbll-header-item\">Saturday</h3>\n <h3 class=\"hbll-header-item\">Sunday</h3>\n </div>\n <div class=\"hbll-header-hours\">\n <div class=\"hbll-header-item\">7:00 a.m. - 11:45 p.m.</div>\n <div class=\"hbll-header-item\">8:00 a.m. - 11:45 p.m.</div>\n <div class=\"hbll-header-item\">Closed*</div>\n </div>\n <div class=\"hbll-header-hours-note\">\n * Family history ONLY 4:00 p.m. - 8:00 p.m\n <ul>\n <li><span>No checkouts after 11:45 p.m.</span></li>\n <li>\n <span>All services closed 10:45 to noon on Tuesdays</span>\n </li>\n </ul>\n </div>\n </section>\n <section class=\"hbll-header-section\">\n <h2 class=\"hbll-header-header\">Upcoming Exceptions</h2>\n @if (hoursExceptions$ | async; as exceptions) {\n <div class=\"hbll-header-detail\" data-testid=\"exceptionsDetail\">\n @for (exception of exceptions; track exception.date) {\n <h3 class=\"hbll-header-item\">\n {{ exception.date | date: 'MMM. d, YYYY' }}\n </h3>\n } @empty {\n No upcoming exceptions\n }\n </div>\n <div class=\"hbll-header-hours\" data-testid=\"exceptionsHours\">\n @for (exception of exceptions; track exception.date) {\n <div class=\"hbll-header-item\"\n [attr.title]=\"exception.exception_title\"\n [attr.aria-label]=\"exception.exception_title\">\n {{ exception.exception_title | truncate:32:'...' }}\n </div>\n }\n </div>\n } @else {\n <div class=\"lib-spinner\" data-testid=\"exceptionsSpinner\"></div>\n }\n </section>\n <section class=\"hbll-header-section\">\n <h2 class=\"hbll-header-header\">Library Cafe</h2>\n <div class=\"hbll-header-detail\">\n <h3 class=\"hbll-header-item\">Bagel Bubble</h3>\n <h3 class=\"hbll-header-item\">Provecho</h3>\n </div>\n <div class=\"hbll-header-hours\">\n <div class=\"hbll-header-item\">7:00 a.m. - 11:00 p.m.</div>\n <div class=\"hbll-header-item\">10:30 a.m. - 2:00 p.m.</div>\n </div>\n </section>\n <a [href]=\"mainsitebaseurl + '/about/hours'\"\n >See all hours\n <span class=\"material-symbols-outlined\"> chevron_right </span></a\n >\n </div>\n }\n </div>\n }\n <div id=\"accountInfo\" #accountInfo>\n <button\n (click)=\"isLoggedIn ? (showAccountDropdown = !showAccountDropdown) : login.emit()\"\n class=\"hbll-header-wrapper\"\n id=\"accountBtn\"\n data-testid=\"accountBtn\"\n >\n <span class=\"material-symbols-outlined hbll-header-left-icon\"> person </span>\n @if (!isScreenSmall()) {\n <span class=\"hbll-header-name\" data-testid=\"name\">{{\n isLoggedIn ? ' ' + name : 'Login'\n }}</span>\n }\n @if (isLoggedIn) {\n <span class=\"material-symbols-outlined\" data-testid=\"loginDropdown\">\n arrow_drop_down\n </span>\n }\n </button>\n @if (isLoggedIn && showAccountDropdown) {\n <div @libHbllFadeInOut id=\"accountDropdown\" data-testid=\"accountDropdown\">\n <a [href]=\"mainsitebaseurl + '/account'\">My Account</a>\n <a [href]=\"mainsitebaseurl + '/account'\">My Items</a>\n <a [href]=\"mainsitebaseurl + '/account/request'\">Request an item</a>\n <a [href]=\"mainsitebaseurl + '/account/saved'\">Saved</a>\n <a [href]=\"mainsitebaseurl + '/account/course'\">Courses</a>\n <a [href]=\"mainsitebaseurl + '/account/rooms'\">Rooms</a>\n <a [href]=\"mainsitebaseurl + '/account/preferences'\">Preferences</a>\n @if (showImpersonateButton()) {\n <button\n (click)=\"openImpersonationModal.emit(); showAccountDropdown = false\"\n class=\"hbll-header-impersonate-btn\"\n >\n Impersonate\n </button>\n }\n <button (click)=\"logout.emit()\" data-testid=\"logout\">Logout</button>\n </div>\n }\n </div>\n @if (isScreenSmall()) {\n <div id=\"mobileNav\" [class.collapsed]=\"!showNavBar\">\n <button\n class=\"hbll-header-wrapper\"\n data-testid=\"mobileNavBtn\"\n (click)=\"openSidebarNav()\"\n >\n <span class=\"material-symbols-outlined hbll-header-icon\"> menu </span>\n </button>\n <div\n #navWrapper\n id=\"navWrapper\"\n data-testid=\"mobileNav\"\n [class.open]=\"showNavBar\"\n [attr.inert]=\"!showNavBar ? true : null\"\n >\n <button\n id=\"closeMobileNavBtn\"\n class=\"hbll-header-wrapper\"\n data-testid=\"closeMobileNavBtn\"\n (click)=\"closeSidebarNav()\"\n >\n <span class=\"material-symbols-outlined hbll-header-icon\"> close </span>\n </button>\n <lib-nav-bar\n [mainSiteBaseUrl]=\"mainsitebaseurl\"\n [height]=\"mobileSidebarHeight\"\n />\n </div>\n <div\n #backdrop\n (click)=\"closeSidebarNav()\"\n class=\"hbll-nav-backdrop\"\n [class.open]=\"showNavBar\"\n data-testid=\"mobileNavBackdrop\"\n ></div>\n </div>\n }\n </div>\n</header>\n\n@if (!isScreenSmall()) {\n <div id=\"mainNav\">\n <lib-nav-bar [mainSiteBaseUrl]=\"mainsitebaseurl\" />\n </div>\n}\n@if (isScreenSmall()) {\n <a\n id=\"mobileLibraryHours\"\n [href]=\"mainsitebaseurl + '/about/hours'\"\n class=\"hbll-header-wrapper\"\n data-testid=\"mobileHours\"\n >\n <ng-container *ngTemplateOutlet=\"hoursTextBlock\"></ng-container>\n </a>\n}\n\n<ng-template #hoursTextBlock>\n @if (libraryHours()) {\n <span class=\"material-symbols-outlined hbll-header-left-icon\"> schedule </span>\n {{\n libraryHours()?.is_closed\n ? 'CLOSED'\n : \"Today's hours: \" +\n (libraryHours()!.date | libraryHours: libraryHours()!.open_time) +\n ' - ' +\n (libraryHours()!.date | libraryHours: libraryHours()!.close_time)\n }}\n }\n</ng-template>\n", styles: [".lib-spinner{border:.3em solid #dfe9f7;border-top:.3em solid #4070b0;border-radius:100%;width:30px;height:30px;animation:loadingSpinnerAnimate 1s ease infinite;position:relative}@keyframes loadingSpinnerAnimate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}*{box-sizing:border-box;text-decoration:none;font-size:1em}*:not(.material-symbols-outlined){font-family:inherit}.hbll-header-wrapper{display:flex;align-items:center;font-size:1em}.skip-link{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}.skip-link:focus{position:static;width:auto;height:auto;overflow:visible;margin-left:1rem;background:#fff;color:#00285b;font-size:1.5rem;font-weight:580;padding:.5rem 1rem;z-index:1000;text-decoration:none;border:.1875rem solid #0050b7;border-radius:.25rem;cursor:pointer}.skip-link:hover{color:#00285b;background-color:#e3edf8;border:.1875rem solid #e3edf8}.hbll-nav-backdrop{background-color:#000;opacity:.3;height:100vh;width:100vw;left:0;top:0;transform:translate(-100vw);position:absolute;z-index:-1}.hbll-nav-backdrop.open{animation-name:fadeIn;animation-duration:.15s;animation-timing-function:ease-in;animation-fill-mode:forwards}.hbll-nav-backdrop.is-closing{animation-name:fadeOut;animation-duration:.15s;animation-timing-function:ease-out;animation-fill-mode:forwards}#mobileLibraryHours{color:#141414;background-color:#e6e6e6;font-size:1em;min-height:2em}#mobileLibraryHours.hbll-header-wrapper{width:100%;justify-content:center;padding:.2em}.hbll-header-icon,.hbll-header-left-icon{font-size:1.2em}.hbll-header-left-icon{margin-right:.2em}header{background-color:#002e5d;display:flex;align-items:center}header a h1{font-size:100%;margin:0;height:1.8em}header a h1 img{height:100%;padding:0 0 0 .6em}header #libraryInfo{margin-left:auto;color:#fff}header #libraryInfo a,header #libraryInfo button{transition:color .2s ease-in-out;color:#fffc}header #libraryInfo a:hover,header #libraryInfo button:hover{color:#fff}header #libraryInfo #accountInfo button,header #libraryInfo #mobileNav button{padding:.8em .6em}header #libraryInfo #accountBtn .name{margin-left:.4em}header #libraryInfo #mobileNav{position:relative;z-index:11}header #libraryInfo #mobileNav.collapsed #navWrapper{left:-9999px;top:auto;overflow:hidden;width:1px;height:1px}header #libraryInfo #mobileNav.collapsed .hbll-nav-backdrop{display:none}header #libraryInfo #mobileNav.collapsed nav{left:-9999px;top:auto;overflow:hidden;width:1px;height:1px}header #libraryInfo #mobileNav #navWrapper{color:#fff;position:absolute;top:0;transform:translate(calc(min(100vw,400px) - 55px))}header #libraryInfo #mobileNav #navWrapper.open{animation-name:slideInFromRight;animation-duration:.2s;animation-timing-function:ease-in-out;animation-fill-mode:forwards}header #libraryInfo #mobileNav #navWrapper.is-closing{animation-name:slideOutToRight;animation-duration:.2s;animation-timing-function:ease-in-out;animation-fill-mode:forwards}header #libraryInfo #mobileNav #navWrapper #closeMobileNavBtn{background-color:#0047ba;margin-left:auto;padding-left:.9em}header #libraryInfo :last-child button{padding-right:1em!important}header #libraryInfo .hbll-header-icon,header #libraryInfo .hbll-header-left-icon{font-size:1.6em}header #libraryInfo #accountInfo{position:relative}header #libraryInfo #accountInfo #accountDropdown{font-size:1em;text-wrap:nowrap;position:absolute;background-color:#002e5d;top:100%;right:-32px;z-index:11;background-color:#233753}header #libraryInfo #accountInfo #accountDropdown .hbll-header-impersonate-btn{color:#ca7ad1cc}header #libraryInfo #accountInfo #accountDropdown .hbll-header-impersonate-btn:hover{color:#ca7ad1}header #libraryInfo #accountInfo #accountDropdown a,header #libraryInfo #accountInfo #accountDropdown button{display:block;width:100%;text-align:left;padding:.4em 1.2em;font-size:1.1em}header #libraryInfo #accountInfo #accountDropdown a:first-child,header #libraryInfo #accountInfo #accountDropdown button:first-child{margin-bottom:.4em;padding-top:.6em;padding-bottom:.6em;border-bottom:1px solid rgba(255,255,255,.3)}header #libraryInfo #accountInfo #accountDropdown a:last-child,header #libraryInfo #accountInfo #accountDropdown button:last-child{margin-top:.4em;border-top:1px solid rgba(255,255,255,.3);padding-top:.6em;padding-bottom:.6em}header #libraryInfo #accountInfo #accountDropdown:before{content:\"\";width:0;height:0;border-style:solid;border-width:0 .6em .6em .6em;border-color:transparent transparent hsl(214,41%,23%) transparent;position:absolute;bottom:100%;right:50%;transform:translate(50%);z-index:inherit}header.hbll-header-desktop{padding:0 2em}header.hbll-header-desktop #libraryInfo #mainLibraryHours{position:relative;margin-right:1em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown{z-index:12;background-color:#fff;border-radius:4px;border:1px solid #d2d2d2;position:absolute;color:#000;padding:2em;top:100%;max-width:400%;right:50%;transform:translate(50%);margin-top:.6em;margin-right:2rem}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section{display:grid;grid-template-columns:repeat(4,7.5em);grid-template-rows:1fr;grid-column-gap:0px;grid-row-gap:0px;margin-bottom:1em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section h2{margin:0}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours-note{grid-column:2/-1;font-size:.8em;margin-top:1em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours-note ul{list-style-type:disc;list-style-position:inside;margin-left:.8em;padding:0}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours-note ul li span{position:relative}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-header{font-weight:600;font-size:1em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-detail,header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours{margin-top:.2em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-detail .hbll-header-item+.hbll-header-item,header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours .hbll-header-item+.hbll-header-item{margin-top:.3em}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-detail h3,header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours h3{margin:0;font-size:inherit}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-detail{font-weight:600;white-space:nowrap}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown .hbll-header-section .hbll-header-hours{white-space:nowrap}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown a{color:#4070b0;display:flex;align-items:center;float:right}header.hbll-header-desktop #libraryInfo #mainLibraryHours #libraryHoursDropdown a:hover{color:#6892ca}header.hbll-header-desktop #libraryInfo #accountInfo #accountDropdown{right:auto;left:50%;transform:translate(-50%)}button{background-color:transparent;border:none;cursor:pointer;font-family:inherit;font-size:inherit;color:inherit;padding:0}@keyframes slideInFromRight{0%{transform:translate(calc(min(100vw,400px) - 55px))}to{transform:translate(0)}}@keyframes slideOutToRight{0%{transform:translate(0)}to{transform:translate(min(100vw,400px))}}@keyframes fadeIn{0%{opacity:0}to{opacity:.3}}@keyframes fadeOut{0%{opacity:.3}to{opacity:0}}\n"] }]
|
|
631
623
|
}], propDecorators: { header: [{
|
|
632
624
|
type: ViewChild,
|
|
633
625
|
args: ['header']
|
|
626
|
+
}], navWrapper: [{
|
|
627
|
+
type: ViewChild,
|
|
628
|
+
args: ['navWrapper']
|
|
629
|
+
}], backdrop: [{
|
|
630
|
+
type: ViewChild,
|
|
631
|
+
args: ['backdrop']
|
|
634
632
|
}], name: [{
|
|
635
633
|
type: Input
|
|
636
634
|
}], mainsitebaseurl: [{
|