@byuhbll/components 6.2.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/byuhbll-components.mjs +1224 -119
- package/fesm2022/byuhbll-components.mjs.map +1 -1
- package/index.d.ts +604 -8
- package/package.json +4 -4
- package/styles/scss/_sr-only.scss +21 -0
- package/styles/scss/_vars.scss +1 -1
- package/styles/scss/hbll-foundation.scss +4 -38
|
@@ -3,12 +3,12 @@ import { CommonModule, DatePipe, NgIf, NgClass } from '@angular/common';
|
|
|
3
3
|
import { toSignal, toObservable } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { HttpClient } from '@angular/common/http';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { Input, ViewChild, ChangeDetectionStrategy, Component, input, EventEmitter, Output, inject, computed, ViewChildren, Pipe, Renderer2, DOCUMENT, viewChild, HostListener, ElementRef, Injector, runInInjectionContext, effect, ViewEncapsulation, model,
|
|
6
|
+
import { Input, ViewChild, ChangeDetectionStrategy, Component, input, EventEmitter, Output, inject, computed, ViewChildren, Pipe, Renderer2, DOCUMENT, viewChild, HostListener, booleanAttribute, ElementRef, Injector, runInInjectionContext, effect, ViewEncapsulation, model, ApplicationRef, EnvironmentInjector, createComponent, Injectable, signal, ContentChildren, forwardRef, ChangeDetectorRef } from '@angular/core';
|
|
7
7
|
import { trigger, transition, group, style, query, animate, animateChild } from '@angular/animations';
|
|
8
8
|
import { map, of, switchMap, shareReplay, combineLatest, Subject, Subscription } from 'rxjs';
|
|
9
9
|
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
10
10
|
import * as i1$1 from '@angular/forms';
|
|
11
|
-
import { Validators, FormBuilder, ReactiveFormsModule, FormControl, NonNullableFormBuilder } from '@angular/forms';
|
|
11
|
+
import { Validators, FormBuilder, ReactiveFormsModule, FormControl, NonNullableFormBuilder, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
12
12
|
import { switchMap as switchMap$1, map as map$1, catchError, startWith, tap, filter, debounceTime, distinctUntilChanged } from 'rxjs/operators';
|
|
13
13
|
import { jwtDecode } from 'jwt-decode';
|
|
14
14
|
import urlcat from 'urlcat';
|
|
@@ -22,6 +22,7 @@ import { MatFormFieldModule } from '@angular/material/form-field';
|
|
|
22
22
|
import * as i1$3 from '@angular/material/chips';
|
|
23
23
|
import { MatChipsModule } from '@angular/material/chips';
|
|
24
24
|
import { ENTER, COMMA } from '@angular/cdk/keycodes';
|
|
25
|
+
import { RouterLink, RouterLinkActive } from '@angular/router';
|
|
25
26
|
|
|
26
27
|
const libHbllExpandCollapse = trigger('libHbllExpandCollapse', [
|
|
27
28
|
transition('void <=> *', []),
|
|
@@ -109,11 +110,11 @@ class NavBarDropdownComponent {
|
|
|
109
110
|
this.isOpen = false;
|
|
110
111
|
}
|
|
111
112
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: NavBarDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
112
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", 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"] }] }); }
|
|
113
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", 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}.hbll-header-dropdown-wrapper.hbll-header-desktop button:focus-visible{outline:.1875rem solid #b967c7;outline-offset:-.1875rem;border-radius:.25rem}*{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 button:focus-visible{outline:.1875rem solid #b967c7;outline-offset:-.1875rem;border-radius:.25rem}.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"] }] }); }
|
|
113
114
|
}
|
|
114
115
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: NavBarDropdownComponent, decorators: [{
|
|
115
116
|
type: Component,
|
|
116
|
-
args: [{ selector: 'lib-nav-bar-dropdown', 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"] }]
|
|
117
|
+
args: [{ selector: 'lib-nav-bar-dropdown', 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}.hbll-header-dropdown-wrapper.hbll-header-desktop button:focus-visible{outline:.1875rem solid #b967c7;outline-offset:-.1875rem;border-radius:.25rem}*{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 button:focus-visible{outline:.1875rem solid #b967c7;outline-offset:-.1875rem;border-radius:.25rem}.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"] }]
|
|
117
118
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], isSmallScreen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isSmallScreen", required: false }] }], openEvent: [{
|
|
118
119
|
type: Output
|
|
119
120
|
}], hoverStarted: [{
|
|
@@ -462,11 +463,11 @@ class NavBarComponent {
|
|
|
462
463
|
this.isInteractingWithNavbar = false;
|
|
463
464
|
}
|
|
464
465
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: NavBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
465
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: NavBarComponent, isStandalone: true, selector: "lib-nav-bar", inputs: { mainSiteBaseUrl: { classPropertyName: "mainSiteBaseUrl", publicName: "mainSiteBaseUrl", isSignal: true, isRequired: true, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "dropdownComps", predicate: NavBarDropdownComponent, descendants: true }], ngImport: i0, template: "<nav\n [style]=\"{ height: height() ? height() + 'px' : 'auto' }\"\n [ngClass]=\"{ 'hbll-header-desktop': !isScreenSmall() }\"\n data-testid=\"nav\"\n (mouseleave)=\"handleNavbarMouseLeave()\"\n>\n <ul class=\"hbll-header-nav-bar\">\n <li id=\"navHome\">\n <a [href]=\"mainSiteBaseUrl()\">\n @if (isScreenSmall()) {\n <span class=\"material-symbols-outlined hbll-header-icon\"> home </span>\n }\n Home\n </a>\n </li>\n @for (navInfo of navInfos(); track navInfo.title) {\n <li>\n <lib-nav-bar-dropdown\n [title]=\"navInfo.title\"\n [isSmallScreen]=\"isScreenSmall() ?? true\"\n [isInteracting]=\"isInteractingWithNavbar\"\n (openEvent)=\"handleDropdownOpenEvent($event)\"\n (hoverStarted)=\"handleHoverStarted()\"\n >\n <div\n class=\"hbll-header-content\"\n [ngStyle]=\"{\n 'background-color': isScreenSmall() ? '#336cc8' : 'inherit',\n }\"\n >\n @if (navInfo.mainSection) {\n <section>\n <h2 tabindex=\"0\">{{ navInfo.mainSection.title }}</h2>\n <div class=\"hbll-header-main hbll-header-links\">\n @for (link of navInfo.mainSection.links; track link.label) {\n <a [href]=\"link.url\">\n {{ link.label }}\n </a>\n }\n </div>\n @if (navInfo.mainSection.auxiliaryLink) {\n <a\n class=\"hbll-header-see-all\"\n [href]=\"navInfo.mainSection.auxiliaryLink.url\"\n >\n {{ navInfo.mainSection.auxiliaryLink.label }}\n <span class=\"material-symbols-outlined hbll-header-icon\">\n chevron_right\n </span>\n </a>\n }\n </section>\n }\n @for (section of navInfo.otherSections; track section.title) {\n <section>\n <h3 tabindex=\"0\">{{ section.title }}</h3>\n <div class=\"hbll-header-links\">\n @for (link of section.links; track link.label) {\n <a [href]=\"link.url\">\n {{ link.label }}\n @if (link.icon) {\n <span\n class=\"material-symbols-outlined hbll-header-icon-right\"\n >\n {{ link.icon }}\n </span>\n }\n </a>\n }\n </div>\n @if (section.auxiliaryLink) {\n <a\n class=\"hbll-header-see-all\"\n [href]=\"section.auxiliaryLink.url\"\n >\n {{ section.auxiliaryLink.label }}\n <span class=\"material-symbols-outlined hbll-header-icon\">\n chevron_right\n </span>\n </a>\n }\n </section>\n }\n </div>\n </lib-nav-bar-dropdown>\n </li>\n }\n <li>\n <a id=\"navSearch\" [href]=\"mainSiteBaseUrl() + '/search'\">\n @if (isScreenSmall()) {\n Search\n }\n <span\n class=\"material-symbols-outlined\"\n [ngClass]=\"{ 'hbll-header-icon': isScreenSmall() }\"\n >\n search\n </span>\n </a>\n </li>\n </ul>\n</nav>\n", styles: ["nav.hbll-header-desktop .hbll-header-nav-bar li#navHome a,nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch{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}nav.hbll-header-desktop .hbll-header-nav-bar li#navHome a .hbll-header-icon,nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch .hbll-header-icon{font-size:1.3em;margin-bottom:-.1em}nav.hbll-header-desktop .hbll-header-nav-bar li#navHome a:hover,nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch: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-icon-right{margin-left:.4em;font-size:1.2em}nav{background-color:#0047ba;position:absolute;overflow-y:scroll;overflow-x:hidden;scrollbar-width:none;width:100vw;max-width:400px;right:0}nav li{list-style-type:none}nav ::-webkit-scrollbar{display:none}nav .hbll-header-nav-bar{display:flex;flex-direction:column;align-items:flex-end;margin:0;padding:0}nav .hbll-header-nav-bar .hbll-header-links{padding:0}nav .hbll-header-nav-bar li{width:100%}nav .hbll-header-nav-bar li#navHome .hbll-header-icon{margin-right:.2em}nav .hbll-header-nav-bar li a{color:#fff;display:flex;align-items:center;width:100%;padding:.6em;transition:background-color .1s ease-in-out}nav .hbll-header-nav-bar li a:hover{background-color:#fff3}nav .hbll-header-nav-bar li #navSearch{justify-content:flex-end;font-size:1.3em}nav .hbll-header-nav-bar li #navSearch .hbll-header-icon{margin-left:.2em}nav .hbll-header-nav-bar li .hbll-header-content{border-bottom:1px solid rgba(255,255,255,.3);padding-bottom:1.4em}nav .hbll-header-nav-bar li .hbll-header-content section{padding-left:3em}nav .hbll-header-nav-bar li .hbll-header-content section:first-of-type{padding-top:1em}nav .hbll-header-nav-bar li .hbll-header-content section h2,nav .hbll-header-nav-bar li .hbll-header-content section h3{font-weight:600;font-size:1.4em;margin-bottom:.4em}nav .hbll-header-nav-bar li .hbll-header-content section+section{margin-top:1.8em}nav .hbll-header-nav-bar li .hbll-header-content section li a{padding:.6em .8em;margin:.2em 0}nav .hbll-header-nav-bar li .hbll-header-content section .hbll-header-see-all{border-top:1px solid rgba(255,255,255,.3);justify-content:flex-end}nav .hbll-header-nav-bar li .hbll-header-content section .hbll-header-no-see-all{margin-bottom:1em}nav .hbll-header-nav-bar li .hbll-header-content section .hbll-header-main{padding-bottom:.4em}nav.hbll-header-desktop{overflow:initial;background-color:#fff;padding:0 2em;position:relative;max-width:100%}nav.hbll-header-desktop .hbll-header-nav-bar{flex-direction:row;align-items:center}nav.hbll-header-desktop .hbll-header-nav-bar .hbll-header-links{background-color:#0047ba;display:flex;flex-direction:column;align-items:flex-start}nav.hbll-header-desktop .hbll-header-nav-bar .hbll-header-links li{width:100%}nav.hbll-header-desktop .hbll-header-nav-bar .hbll-header-links li a{transition:background-color .1s ease-in-out}nav.hbll-header-desktop .hbll-header-nav-bar .hbll-header-links li a:hover{background-color:#fff3;width:100%}nav.hbll-header-desktop .hbll-header-nav-bar li{width:auto;height:100%}nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch{transition:all .2s ease-in-out;font-size:1.2em;background-color:transparent}nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch:hover{background-color:transparent;transform:scale(115%);color:#0047ba}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content{display:flex;justify-content:center;padding-top:1.4em;padding-right:10%;padding-left:10%}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content section{padding-top:0;padding-left:5%;width:30em}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content section+section{border-left:1px solid rgba(255,255,255,.3);margin-top:0}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content section .hbll-header-see-all{margin-right:1em;transition:color .1s ease-in-out;width:auto}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content section .hbll-header-see-all:hover{color:#ffffffd9}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content h2,nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content h3{color:#fff}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: NavBarDropdownComponent, selector: "lib-nav-bar-dropdown", inputs: ["title", "isSmallScreen", "isInteracting"], outputs: ["openEvent", "hoverStarted"] }] }); }
|
|
466
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: NavBarComponent, isStandalone: true, selector: "lib-nav-bar", inputs: { mainSiteBaseUrl: { classPropertyName: "mainSiteBaseUrl", publicName: "mainSiteBaseUrl", isSignal: true, isRequired: true, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "dropdownComps", predicate: NavBarDropdownComponent, descendants: true }], ngImport: i0, template: "<nav\n [style]=\"{ height: height() ? height() + 'px' : 'auto' }\"\n [ngClass]=\"{ 'hbll-header-desktop': !isScreenSmall() }\"\n data-testid=\"nav\"\n (mouseleave)=\"handleNavbarMouseLeave()\"\n>\n <ul class=\"hbll-header-nav-bar\">\n <li id=\"navHome\">\n <a [href]=\"mainSiteBaseUrl()\">\n @if (isScreenSmall()) {\n <span class=\"material-symbols-outlined hbll-header-icon\"> home </span>\n }\n Home\n </a>\n </li>\n @for (navInfo of navInfos(); track navInfo.title) {\n <li>\n <lib-nav-bar-dropdown\n [title]=\"navInfo.title\"\n [isSmallScreen]=\"isScreenSmall() ?? true\"\n [isInteracting]=\"isInteractingWithNavbar\"\n (openEvent)=\"handleDropdownOpenEvent($event)\"\n (hoverStarted)=\"handleHoverStarted()\"\n >\n <div\n class=\"hbll-header-content\"\n [ngStyle]=\"{\n 'background-color': isScreenSmall() ? '#336cc8' : 'inherit',\n }\"\n >\n @if (navInfo.mainSection) {\n <section>\n <h2 tabindex=\"0\">{{ navInfo.mainSection.title }}</h2>\n <div class=\"hbll-header-main hbll-header-links\">\n @for (link of navInfo.mainSection.links; track link.label) {\n <a [href]=\"link.url\">\n {{ link.label }}\n </a>\n }\n </div>\n @if (navInfo.mainSection.auxiliaryLink) {\n <a\n class=\"hbll-header-see-all\"\n [href]=\"navInfo.mainSection.auxiliaryLink.url\"\n >\n {{ navInfo.mainSection.auxiliaryLink.label }}\n <span class=\"material-symbols-outlined hbll-header-icon\">\n chevron_right\n </span>\n </a>\n }\n </section>\n }\n @for (section of navInfo.otherSections; track section.title) {\n <section>\n <h3 tabindex=\"0\">{{ section.title }}</h3>\n <div class=\"hbll-header-links\">\n @for (link of section.links; track link.label) {\n <a [href]=\"link.url\">\n {{ link.label }}\n @if (link.icon) {\n <span\n class=\"material-symbols-outlined hbll-header-icon-right\"\n >\n {{ link.icon }}\n </span>\n }\n </a>\n }\n </div>\n @if (section.auxiliaryLink) {\n <a\n class=\"hbll-header-see-all\"\n [href]=\"section.auxiliaryLink.url\"\n >\n {{ section.auxiliaryLink.label }}\n <span class=\"material-symbols-outlined hbll-header-icon\">\n chevron_right\n </span>\n </a>\n }\n </section>\n }\n </div>\n </lib-nav-bar-dropdown>\n </li>\n }\n <li>\n <a id=\"navSearch\" [href]=\"mainSiteBaseUrl() + '/search'\">\n @if (isScreenSmall()) {\n Search\n }\n <span\n class=\"material-symbols-outlined\"\n [ngClass]=\"{ 'hbll-header-icon': isScreenSmall() }\"\n >\n search\n </span>\n </a>\n </li>\n </ul>\n</nav>\n", styles: ["nav.hbll-header-desktop .hbll-header-nav-bar li#navHome a,nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch{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}nav.hbll-header-desktop .hbll-header-nav-bar li#navHome a .hbll-header-icon,nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch .hbll-header-icon{font-size:1.3em;margin-bottom:-.1em}nav.hbll-header-desktop .hbll-header-nav-bar li#navHome a:hover,nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch:hover{background-color:#0047ba;color:#fff}nav.hbll-header-desktop .hbll-header-nav-bar li#navHome a:focus-visible,nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch:focus-visible{outline:.1875rem solid #b967c7;outline-offset:-.1875rem;border-radius:.25rem}*{box-sizing:border-box;text-decoration:none;font-size:1em}*:not(.material-symbols-outlined){font-family:inherit}.hbll-header-icon-right{margin-left:.4em;font-size:1.2em}nav{background-color:#0047ba;position:absolute;overflow-y:scroll;overflow-x:hidden;scrollbar-width:none;width:100vw;max-width:400px;right:0}nav li{list-style-type:none}nav ::-webkit-scrollbar{display:none}nav .hbll-header-nav-bar{display:flex;flex-direction:column;align-items:flex-end;margin:0;padding:0}nav .hbll-header-nav-bar .hbll-header-links{padding:0}nav .hbll-header-nav-bar li{width:100%}nav .hbll-header-nav-bar li#navHome .hbll-header-icon{margin-right:.2em}nav .hbll-header-nav-bar li a{color:#fff;display:flex;align-items:center;width:100%;padding:.6em;transition:background-color .1s ease-in-out}nav .hbll-header-nav-bar li a:hover{background-color:#fff3}nav .hbll-header-nav-bar li a:focus-visible{outline:.1875rem solid #b967c7;outline-offset:-.1875rem;border-radius:.25rem}nav .hbll-header-nav-bar li #navSearch{justify-content:flex-end;font-size:1.3em}nav .hbll-header-nav-bar li #navSearch .hbll-header-icon{margin-left:.2em}nav .hbll-header-nav-bar li #navSearch:focus-visible{outline:.1875rem solid #b967c7;outline-offset:-.1875rem;border-radius:.25rem}nav .hbll-header-nav-bar li .hbll-header-content{border-bottom:1px solid rgba(255,255,255,.3);padding-bottom:1.4em}nav .hbll-header-nav-bar li .hbll-header-content section{padding-left:3em}nav .hbll-header-nav-bar li .hbll-header-content section:first-of-type{padding-top:1em}nav .hbll-header-nav-bar li .hbll-header-content section h2,nav .hbll-header-nav-bar li .hbll-header-content section h3{font-weight:600;font-size:1.4em;margin-bottom:.4em}nav .hbll-header-nav-bar li .hbll-header-content section h2:focus-visible,nav .hbll-header-nav-bar li .hbll-header-content section h3:focus-visible{outline:.1875rem solid #b967c7;outline-offset:-.1875rem;border-radius:.25rem}nav .hbll-header-nav-bar li .hbll-header-content section+section{margin-top:1.8em}nav .hbll-header-nav-bar li .hbll-header-content section li a{padding:.6em .8em;margin:.2em 0}nav .hbll-header-nav-bar li .hbll-header-content section li a:focus-visible{outline:.1875rem solid #b967c7;outline-offset:-.1875rem;border-radius:.25rem}nav .hbll-header-nav-bar li .hbll-header-content section .hbll-header-see-all{border-top:1px solid rgba(255,255,255,.3);justify-content:flex-end}nav .hbll-header-nav-bar li .hbll-header-content section .hbll-header-no-see-all{margin-bottom:1em}nav .hbll-header-nav-bar li .hbll-header-content section .hbll-header-main{padding-bottom:.4em}nav.hbll-header-desktop{overflow:initial;background-color:#fff;padding:0 2em;position:relative;max-width:100%}nav.hbll-header-desktop .hbll-header-nav-bar{flex-direction:row;align-items:center}nav.hbll-header-desktop .hbll-header-nav-bar .hbll-header-links{background-color:#0047ba;display:flex;flex-direction:column;align-items:flex-start}nav.hbll-header-desktop .hbll-header-nav-bar .hbll-header-links li{width:100%}nav.hbll-header-desktop .hbll-header-nav-bar .hbll-header-links li a{transition:background-color .1s ease-in-out}nav.hbll-header-desktop .hbll-header-nav-bar .hbll-header-links li a:hover{background-color:#fff3;width:100%}nav.hbll-header-desktop .hbll-header-nav-bar li{width:auto;height:100%}nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch{transition:all .2s ease-in-out;font-size:1.2em;background-color:transparent}nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch:hover{background-color:transparent;transform:scale(115%);color:#0047ba}nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch:focus-visible{outline:.1875rem solid #b967c7;outline-offset:-.1875rem;border-radius:.25rem}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content{display:flex;justify-content:center;padding-top:1.4em;padding-right:10%;padding-left:10%}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content section{padding-top:0;padding-left:5%;width:30em}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content section+section{border-left:1px solid rgba(255,255,255,.3);margin-top:0}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content section .hbll-header-see-all{margin-right:1em;transition:color .1s ease-in-out;width:auto}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content section .hbll-header-see-all:hover{color:#ffffffd9}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content h2,nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content h3{color:#fff}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: NavBarDropdownComponent, selector: "lib-nav-bar-dropdown", inputs: ["title", "isSmallScreen", "isInteracting"], outputs: ["openEvent", "hoverStarted"] }] }); }
|
|
466
467
|
}
|
|
467
468
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: NavBarComponent, decorators: [{
|
|
468
469
|
type: Component,
|
|
469
|
-
args: [{ selector: 'lib-nav-bar', imports: [CommonModule, NavBarDropdownComponent], template: "<nav\n [style]=\"{ height: height() ? height() + 'px' : 'auto' }\"\n [ngClass]=\"{ 'hbll-header-desktop': !isScreenSmall() }\"\n data-testid=\"nav\"\n (mouseleave)=\"handleNavbarMouseLeave()\"\n>\n <ul class=\"hbll-header-nav-bar\">\n <li id=\"navHome\">\n <a [href]=\"mainSiteBaseUrl()\">\n @if (isScreenSmall()) {\n <span class=\"material-symbols-outlined hbll-header-icon\"> home </span>\n }\n Home\n </a>\n </li>\n @for (navInfo of navInfos(); track navInfo.title) {\n <li>\n <lib-nav-bar-dropdown\n [title]=\"navInfo.title\"\n [isSmallScreen]=\"isScreenSmall() ?? true\"\n [isInteracting]=\"isInteractingWithNavbar\"\n (openEvent)=\"handleDropdownOpenEvent($event)\"\n (hoverStarted)=\"handleHoverStarted()\"\n >\n <div\n class=\"hbll-header-content\"\n [ngStyle]=\"{\n 'background-color': isScreenSmall() ? '#336cc8' : 'inherit',\n }\"\n >\n @if (navInfo.mainSection) {\n <section>\n <h2 tabindex=\"0\">{{ navInfo.mainSection.title }}</h2>\n <div class=\"hbll-header-main hbll-header-links\">\n @for (link of navInfo.mainSection.links; track link.label) {\n <a [href]=\"link.url\">\n {{ link.label }}\n </a>\n }\n </div>\n @if (navInfo.mainSection.auxiliaryLink) {\n <a\n class=\"hbll-header-see-all\"\n [href]=\"navInfo.mainSection.auxiliaryLink.url\"\n >\n {{ navInfo.mainSection.auxiliaryLink.label }}\n <span class=\"material-symbols-outlined hbll-header-icon\">\n chevron_right\n </span>\n </a>\n }\n </section>\n }\n @for (section of navInfo.otherSections; track section.title) {\n <section>\n <h3 tabindex=\"0\">{{ section.title }}</h3>\n <div class=\"hbll-header-links\">\n @for (link of section.links; track link.label) {\n <a [href]=\"link.url\">\n {{ link.label }}\n @if (link.icon) {\n <span\n class=\"material-symbols-outlined hbll-header-icon-right\"\n >\n {{ link.icon }}\n </span>\n }\n </a>\n }\n </div>\n @if (section.auxiliaryLink) {\n <a\n class=\"hbll-header-see-all\"\n [href]=\"section.auxiliaryLink.url\"\n >\n {{ section.auxiliaryLink.label }}\n <span class=\"material-symbols-outlined hbll-header-icon\">\n chevron_right\n </span>\n </a>\n }\n </section>\n }\n </div>\n </lib-nav-bar-dropdown>\n </li>\n }\n <li>\n <a id=\"navSearch\" [href]=\"mainSiteBaseUrl() + '/search'\">\n @if (isScreenSmall()) {\n Search\n }\n <span\n class=\"material-symbols-outlined\"\n [ngClass]=\"{ 'hbll-header-icon': isScreenSmall() }\"\n >\n search\n </span>\n </a>\n </li>\n </ul>\n</nav>\n", styles: ["nav.hbll-header-desktop .hbll-header-nav-bar li#navHome a,nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch{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}nav.hbll-header-desktop .hbll-header-nav-bar li#navHome a .hbll-header-icon,nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch .hbll-header-icon{font-size:1.3em;margin-bottom:-.1em}nav.hbll-header-desktop .hbll-header-nav-bar li#navHome a:hover,nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch: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-icon-right{margin-left:.4em;font-size:1.2em}nav{background-color:#0047ba;position:absolute;overflow-y:scroll;overflow-x:hidden;scrollbar-width:none;width:100vw;max-width:400px;right:0}nav li{list-style-type:none}nav ::-webkit-scrollbar{display:none}nav .hbll-header-nav-bar{display:flex;flex-direction:column;align-items:flex-end;margin:0;padding:0}nav .hbll-header-nav-bar .hbll-header-links{padding:0}nav .hbll-header-nav-bar li{width:100%}nav .hbll-header-nav-bar li#navHome .hbll-header-icon{margin-right:.2em}nav .hbll-header-nav-bar li a{color:#fff;display:flex;align-items:center;width:100%;padding:.6em;transition:background-color .1s ease-in-out}nav .hbll-header-nav-bar li a:hover{background-color:#fff3}nav .hbll-header-nav-bar li #navSearch{justify-content:flex-end;font-size:1.3em}nav .hbll-header-nav-bar li #navSearch .hbll-header-icon{margin-left:.2em}nav .hbll-header-nav-bar li .hbll-header-content{border-bottom:1px solid rgba(255,255,255,.3);padding-bottom:1.4em}nav .hbll-header-nav-bar li .hbll-header-content section{padding-left:3em}nav .hbll-header-nav-bar li .hbll-header-content section:first-of-type{padding-top:1em}nav .hbll-header-nav-bar li .hbll-header-content section h2,nav .hbll-header-nav-bar li .hbll-header-content section h3{font-weight:600;font-size:1.4em;margin-bottom:.4em}nav .hbll-header-nav-bar li .hbll-header-content section+section{margin-top:1.8em}nav .hbll-header-nav-bar li .hbll-header-content section li a{padding:.6em .8em;margin:.2em 0}nav .hbll-header-nav-bar li .hbll-header-content section .hbll-header-see-all{border-top:1px solid rgba(255,255,255,.3);justify-content:flex-end}nav .hbll-header-nav-bar li .hbll-header-content section .hbll-header-no-see-all{margin-bottom:1em}nav .hbll-header-nav-bar li .hbll-header-content section .hbll-header-main{padding-bottom:.4em}nav.hbll-header-desktop{overflow:initial;background-color:#fff;padding:0 2em;position:relative;max-width:100%}nav.hbll-header-desktop .hbll-header-nav-bar{flex-direction:row;align-items:center}nav.hbll-header-desktop .hbll-header-nav-bar .hbll-header-links{background-color:#0047ba;display:flex;flex-direction:column;align-items:flex-start}nav.hbll-header-desktop .hbll-header-nav-bar .hbll-header-links li{width:100%}nav.hbll-header-desktop .hbll-header-nav-bar .hbll-header-links li a{transition:background-color .1s ease-in-out}nav.hbll-header-desktop .hbll-header-nav-bar .hbll-header-links li a:hover{background-color:#fff3;width:100%}nav.hbll-header-desktop .hbll-header-nav-bar li{width:auto;height:100%}nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch{transition:all .2s ease-in-out;font-size:1.2em;background-color:transparent}nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch:hover{background-color:transparent;transform:scale(115%);color:#0047ba}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content{display:flex;justify-content:center;padding-top:1.4em;padding-right:10%;padding-left:10%}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content section{padding-top:0;padding-left:5%;width:30em}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content section+section{border-left:1px solid rgba(255,255,255,.3);margin-top:0}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content section .hbll-header-see-all{margin-right:1em;transition:color .1s ease-in-out;width:auto}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content section .hbll-header-see-all:hover{color:#ffffffd9}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content h2,nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content h3{color:#fff}\n"] }]
|
|
470
|
+
args: [{ selector: 'lib-nav-bar', imports: [CommonModule, NavBarDropdownComponent], template: "<nav\n [style]=\"{ height: height() ? height() + 'px' : 'auto' }\"\n [ngClass]=\"{ 'hbll-header-desktop': !isScreenSmall() }\"\n data-testid=\"nav\"\n (mouseleave)=\"handleNavbarMouseLeave()\"\n>\n <ul class=\"hbll-header-nav-bar\">\n <li id=\"navHome\">\n <a [href]=\"mainSiteBaseUrl()\">\n @if (isScreenSmall()) {\n <span class=\"material-symbols-outlined hbll-header-icon\"> home </span>\n }\n Home\n </a>\n </li>\n @for (navInfo of navInfos(); track navInfo.title) {\n <li>\n <lib-nav-bar-dropdown\n [title]=\"navInfo.title\"\n [isSmallScreen]=\"isScreenSmall() ?? true\"\n [isInteracting]=\"isInteractingWithNavbar\"\n (openEvent)=\"handleDropdownOpenEvent($event)\"\n (hoverStarted)=\"handleHoverStarted()\"\n >\n <div\n class=\"hbll-header-content\"\n [ngStyle]=\"{\n 'background-color': isScreenSmall() ? '#336cc8' : 'inherit',\n }\"\n >\n @if (navInfo.mainSection) {\n <section>\n <h2 tabindex=\"0\">{{ navInfo.mainSection.title }}</h2>\n <div class=\"hbll-header-main hbll-header-links\">\n @for (link of navInfo.mainSection.links; track link.label) {\n <a [href]=\"link.url\">\n {{ link.label }}\n </a>\n }\n </div>\n @if (navInfo.mainSection.auxiliaryLink) {\n <a\n class=\"hbll-header-see-all\"\n [href]=\"navInfo.mainSection.auxiliaryLink.url\"\n >\n {{ navInfo.mainSection.auxiliaryLink.label }}\n <span class=\"material-symbols-outlined hbll-header-icon\">\n chevron_right\n </span>\n </a>\n }\n </section>\n }\n @for (section of navInfo.otherSections; track section.title) {\n <section>\n <h3 tabindex=\"0\">{{ section.title }}</h3>\n <div class=\"hbll-header-links\">\n @for (link of section.links; track link.label) {\n <a [href]=\"link.url\">\n {{ link.label }}\n @if (link.icon) {\n <span\n class=\"material-symbols-outlined hbll-header-icon-right\"\n >\n {{ link.icon }}\n </span>\n }\n </a>\n }\n </div>\n @if (section.auxiliaryLink) {\n <a\n class=\"hbll-header-see-all\"\n [href]=\"section.auxiliaryLink.url\"\n >\n {{ section.auxiliaryLink.label }}\n <span class=\"material-symbols-outlined hbll-header-icon\">\n chevron_right\n </span>\n </a>\n }\n </section>\n }\n </div>\n </lib-nav-bar-dropdown>\n </li>\n }\n <li>\n <a id=\"navSearch\" [href]=\"mainSiteBaseUrl() + '/search'\">\n @if (isScreenSmall()) {\n Search\n }\n <span\n class=\"material-symbols-outlined\"\n [ngClass]=\"{ 'hbll-header-icon': isScreenSmall() }\"\n >\n search\n </span>\n </a>\n </li>\n </ul>\n</nav>\n", styles: ["nav.hbll-header-desktop .hbll-header-nav-bar li#navHome a,nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch{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}nav.hbll-header-desktop .hbll-header-nav-bar li#navHome a .hbll-header-icon,nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch .hbll-header-icon{font-size:1.3em;margin-bottom:-.1em}nav.hbll-header-desktop .hbll-header-nav-bar li#navHome a:hover,nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch:hover{background-color:#0047ba;color:#fff}nav.hbll-header-desktop .hbll-header-nav-bar li#navHome a:focus-visible,nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch:focus-visible{outline:.1875rem solid #b967c7;outline-offset:-.1875rem;border-radius:.25rem}*{box-sizing:border-box;text-decoration:none;font-size:1em}*:not(.material-symbols-outlined){font-family:inherit}.hbll-header-icon-right{margin-left:.4em;font-size:1.2em}nav{background-color:#0047ba;position:absolute;overflow-y:scroll;overflow-x:hidden;scrollbar-width:none;width:100vw;max-width:400px;right:0}nav li{list-style-type:none}nav ::-webkit-scrollbar{display:none}nav .hbll-header-nav-bar{display:flex;flex-direction:column;align-items:flex-end;margin:0;padding:0}nav .hbll-header-nav-bar .hbll-header-links{padding:0}nav .hbll-header-nav-bar li{width:100%}nav .hbll-header-nav-bar li#navHome .hbll-header-icon{margin-right:.2em}nav .hbll-header-nav-bar li a{color:#fff;display:flex;align-items:center;width:100%;padding:.6em;transition:background-color .1s ease-in-out}nav .hbll-header-nav-bar li a:hover{background-color:#fff3}nav .hbll-header-nav-bar li a:focus-visible{outline:.1875rem solid #b967c7;outline-offset:-.1875rem;border-radius:.25rem}nav .hbll-header-nav-bar li #navSearch{justify-content:flex-end;font-size:1.3em}nav .hbll-header-nav-bar li #navSearch .hbll-header-icon{margin-left:.2em}nav .hbll-header-nav-bar li #navSearch:focus-visible{outline:.1875rem solid #b967c7;outline-offset:-.1875rem;border-radius:.25rem}nav .hbll-header-nav-bar li .hbll-header-content{border-bottom:1px solid rgba(255,255,255,.3);padding-bottom:1.4em}nav .hbll-header-nav-bar li .hbll-header-content section{padding-left:3em}nav .hbll-header-nav-bar li .hbll-header-content section:first-of-type{padding-top:1em}nav .hbll-header-nav-bar li .hbll-header-content section h2,nav .hbll-header-nav-bar li .hbll-header-content section h3{font-weight:600;font-size:1.4em;margin-bottom:.4em}nav .hbll-header-nav-bar li .hbll-header-content section h2:focus-visible,nav .hbll-header-nav-bar li .hbll-header-content section h3:focus-visible{outline:.1875rem solid #b967c7;outline-offset:-.1875rem;border-radius:.25rem}nav .hbll-header-nav-bar li .hbll-header-content section+section{margin-top:1.8em}nav .hbll-header-nav-bar li .hbll-header-content section li a{padding:.6em .8em;margin:.2em 0}nav .hbll-header-nav-bar li .hbll-header-content section li a:focus-visible{outline:.1875rem solid #b967c7;outline-offset:-.1875rem;border-radius:.25rem}nav .hbll-header-nav-bar li .hbll-header-content section .hbll-header-see-all{border-top:1px solid rgba(255,255,255,.3);justify-content:flex-end}nav .hbll-header-nav-bar li .hbll-header-content section .hbll-header-no-see-all{margin-bottom:1em}nav .hbll-header-nav-bar li .hbll-header-content section .hbll-header-main{padding-bottom:.4em}nav.hbll-header-desktop{overflow:initial;background-color:#fff;padding:0 2em;position:relative;max-width:100%}nav.hbll-header-desktop .hbll-header-nav-bar{flex-direction:row;align-items:center}nav.hbll-header-desktop .hbll-header-nav-bar .hbll-header-links{background-color:#0047ba;display:flex;flex-direction:column;align-items:flex-start}nav.hbll-header-desktop .hbll-header-nav-bar .hbll-header-links li{width:100%}nav.hbll-header-desktop .hbll-header-nav-bar .hbll-header-links li a{transition:background-color .1s ease-in-out}nav.hbll-header-desktop .hbll-header-nav-bar .hbll-header-links li a:hover{background-color:#fff3;width:100%}nav.hbll-header-desktop .hbll-header-nav-bar li{width:auto;height:100%}nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch{transition:all .2s ease-in-out;font-size:1.2em;background-color:transparent}nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch:hover{background-color:transparent;transform:scale(115%);color:#0047ba}nav.hbll-header-desktop .hbll-header-nav-bar li #navSearch:focus-visible{outline:.1875rem solid #b967c7;outline-offset:-.1875rem;border-radius:.25rem}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content{display:flex;justify-content:center;padding-top:1.4em;padding-right:10%;padding-left:10%}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content section{padding-top:0;padding-left:5%;width:30em}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content section+section{border-left:1px solid rgba(255,255,255,.3);margin-top:0}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content section .hbll-header-see-all{margin-right:1em;transition:color .1s ease-in-out;width:auto}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content section .hbll-header-see-all:hover{color:#ffffffd9}nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content h2,nav.hbll-header-desktop .hbll-header-nav-bar li .hbll-header-content h3{color:#fff}\n"] }]
|
|
470
471
|
}], propDecorators: { mainSiteBaseUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "mainSiteBaseUrl", required: true }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], dropdownComps: [{
|
|
471
472
|
type: ViewChildren,
|
|
472
473
|
args: [NavBarDropdownComponent]
|
|
@@ -573,10 +574,6 @@ class HbllHeaderComponent {
|
|
|
573
574
|
}, { once: true });
|
|
574
575
|
}
|
|
575
576
|
};
|
|
576
|
-
this.setMobileSidebarHeight = () => {
|
|
577
|
-
const headerHeight = this.header.nativeElement.getBoundingClientRect().height;
|
|
578
|
-
this.mobileSidebarHeight = window.innerHeight - headerHeight;
|
|
579
|
-
};
|
|
580
577
|
}
|
|
581
578
|
get isLoggedIn() {
|
|
582
579
|
return !!this.name;
|
|
@@ -590,8 +587,9 @@ class HbllHeaderComponent {
|
|
|
590
587
|
});
|
|
591
588
|
Promise.resolve().then(() => this.setMobileSidebarHeight());
|
|
592
589
|
}
|
|
593
|
-
|
|
594
|
-
this.
|
|
590
|
+
setMobileSidebarHeight() {
|
|
591
|
+
const headerHeight = this.header.nativeElement.getBoundingClientRect().height;
|
|
592
|
+
this.mobileSidebarHeight = window.innerHeight - headerHeight;
|
|
595
593
|
}
|
|
596
594
|
focusMainContent() {
|
|
597
595
|
const mainContent = document.querySelector('.main-content');
|
|
@@ -606,11 +604,11 @@ class HbllHeaderComponent {
|
|
|
606
604
|
}
|
|
607
605
|
}
|
|
608
606
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HbllHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
609
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", 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, y' }}\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:.625rem;background:#fff;color:#00285b;font-size:.9375rem;font-weight:580;padding:.3125rem .625rem;z-index:1000;text-decoration:none;border:.1171875rem solid #0050b7;border-radius:.15625rem;cursor:pointer}.skip-link:hover{color:#00285b;background-color:#e3edf8;border:.1171875rem 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:fixed;top:0}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:1.25rem}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: "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: "component", type: NavBarComponent, selector: "lib-nav-bar", inputs: ["mainSiteBaseUrl", "height"] }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: LibraryHoursPipe, name: "libraryHours" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: TruncatePipe, name: "truncate" }], animations: [libHbllFadeInOut] }); }
|
|
607
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", 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": "setMobileSidebarHeight()" } }, 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=\"sr-only sr-only-focusable 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, y' }}\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}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.hbll-header-wrapper{display:flex;align-items:center;font-size:1em}.skip-link{margin-left:.625rem;background:#fff;color:#00285b;font-size:.9375rem;font-weight:580;padding:.3125rem .625rem;text-decoration:none;border:.1171875rem solid #0050b7;border-radius:.15625rem;cursor:pointer;outline:.1875rem solid #b967c7;outline-offset:-.1875rem;border-radius:.25rem}.skip-link:hover{color:#00285b;background-color:#e3edf8;border:.1171875rem 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:fixed;top:0}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:1.25rem}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}button:focus-visible{outline:.1875rem solid #b967c7;outline-offset:-.1875rem;border-radius:.25rem}a:focus-visible{outline:.1875rem solid #b967c7;outline-offset:-.1875rem;border-radius:.25rem}@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: "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: "component", type: NavBarComponent, selector: "lib-nav-bar", inputs: ["mainSiteBaseUrl", "height"] }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: LibraryHoursPipe, name: "libraryHours" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: TruncatePipe, name: "truncate" }], animations: [libHbllFadeInOut] }); }
|
|
610
608
|
}
|
|
611
609
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HbllHeaderComponent, decorators: [{
|
|
612
610
|
type: Component,
|
|
613
|
-
args: [{ selector: 'lib-hbll-header', imports: [DatePipe, LibraryHoursPipe, CommonModule, NavBarComponent, TruncatePipe], 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, y' }}\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:.625rem;background:#fff;color:#00285b;font-size:.9375rem;font-weight:580;padding:.3125rem .625rem;z-index:1000;text-decoration:none;border:.1171875rem solid #0050b7;border-radius:.15625rem;cursor:pointer}.skip-link:hover{color:#00285b;background-color:#e3edf8;border:.1171875rem 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:fixed;top:0}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:1.25rem}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"] }]
|
|
611
|
+
args: [{ selector: 'lib-hbll-header', imports: [DatePipe, LibraryHoursPipe, CommonModule, NavBarComponent, TruncatePipe], 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=\"sr-only sr-only-focusable 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, y' }}\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}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.hbll-header-wrapper{display:flex;align-items:center;font-size:1em}.skip-link{margin-left:.625rem;background:#fff;color:#00285b;font-size:.9375rem;font-weight:580;padding:.3125rem .625rem;text-decoration:none;border:.1171875rem solid #0050b7;border-radius:.15625rem;cursor:pointer;outline:.1875rem solid #b967c7;outline-offset:-.1875rem;border-radius:.25rem}.skip-link:hover{color:#00285b;background-color:#e3edf8;border:.1171875rem 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:fixed;top:0}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:1.25rem}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}button:focus-visible{outline:.1875rem solid #b967c7;outline-offset:-.1875rem;border-radius:.25rem}a:focus-visible{outline:.1875rem solid #b967c7;outline-offset:-.1875rem;border-radius:.25rem}@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"] }]
|
|
614
612
|
}], propDecorators: { header: [{
|
|
615
613
|
type: ViewChild,
|
|
616
614
|
args: ['header']
|
|
@@ -630,9 +628,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
630
628
|
type: Output
|
|
631
629
|
}], logout: [{
|
|
632
630
|
type: Output
|
|
633
|
-
}], accountInfoEl: [{ type: i0.ViewChild, args: ['accountInfo', { isSignal: true }] }], hoursEl: [{ type: i0.ViewChild, args: ['hours', { isSignal: true }] }],
|
|
631
|
+
}], accountInfoEl: [{ type: i0.ViewChild, args: ['accountInfo', { isSignal: true }] }], hoursEl: [{ type: i0.ViewChild, args: ['hours', { isSignal: true }] }], setMobileSidebarHeight: [{
|
|
634
632
|
type: HostListener,
|
|
635
|
-
args: ['window:resize'
|
|
633
|
+
args: ['window:resize']
|
|
636
634
|
}] } });
|
|
637
635
|
|
|
638
636
|
const typeToIconMap = {
|
|
@@ -801,6 +799,250 @@ const getUserStatusFromRoles = (roles) => {
|
|
|
801
799
|
return userStatus;
|
|
802
800
|
};
|
|
803
801
|
|
|
802
|
+
/**
|
|
803
|
+
* A flexible, reusable button component that supports multiple button types
|
|
804
|
+
* and various content combinations (icon before, title, icon after).
|
|
805
|
+
*
|
|
806
|
+
* @example
|
|
807
|
+
* ```html
|
|
808
|
+
* <!-- Primary button with icon and title -->
|
|
809
|
+
* <lib-button
|
|
810
|
+
* buttonType="primary"
|
|
811
|
+
* title="Copy Citation"
|
|
812
|
+
* iconBefore="content_copy"
|
|
813
|
+
* (buttonClick)="copyCitation()">
|
|
814
|
+
* </lib-button>
|
|
815
|
+
*
|
|
816
|
+
* <!-- Secondary button with title only -->
|
|
817
|
+
* <lib-button
|
|
818
|
+
* buttonType="secondary"
|
|
819
|
+
* title="Cancel"
|
|
820
|
+
* (buttonClick)="cancelAction()">
|
|
821
|
+
* </lib-button>
|
|
822
|
+
*
|
|
823
|
+
* <!-- Transparent button with icon after title -->
|
|
824
|
+
* <lib-button
|
|
825
|
+
* buttonType="transparent"
|
|
826
|
+
* title="Download"
|
|
827
|
+
* iconAfter="download"
|
|
828
|
+
* (buttonClick)="downloadFile()">
|
|
829
|
+
* </lib-button>
|
|
830
|
+
*
|
|
831
|
+
* <!-- Thin button -->
|
|
832
|
+
* <lib-button
|
|
833
|
+
* buttonType="primary"
|
|
834
|
+
* title="Submit"
|
|
835
|
+
* [isThin]="true"
|
|
836
|
+
* (buttonClick)="submitForm()">
|
|
837
|
+
* </lib-button>
|
|
838
|
+
* ```
|
|
839
|
+
*/
|
|
840
|
+
class ButtonComponent {
|
|
841
|
+
constructor() {
|
|
842
|
+
this.buttonType = 'primary';
|
|
843
|
+
this.disabled = false;
|
|
844
|
+
this.isThin = false;
|
|
845
|
+
this.buttonClick = new EventEmitter();
|
|
846
|
+
// Recognized named colors that map to foundation SCSS/CSS variables.
|
|
847
|
+
// If the project exposes CSS variables like `--color-red-300`, `--color-green-300`,
|
|
848
|
+
// these will be used. Otherwise pass a raw color string (hex, rgb, etc.).
|
|
849
|
+
this.namedColors = [
|
|
850
|
+
'red',
|
|
851
|
+
'green',
|
|
852
|
+
'teal',
|
|
853
|
+
'purple',
|
|
854
|
+
'blue',
|
|
855
|
+
'orange',
|
|
856
|
+
'yellow',
|
|
857
|
+
'gray',
|
|
858
|
+
'pink',
|
|
859
|
+
'indigo',
|
|
860
|
+
'lime',
|
|
861
|
+
];
|
|
862
|
+
}
|
|
863
|
+
get computedBg() {
|
|
864
|
+
if (!this.color)
|
|
865
|
+
return null;
|
|
866
|
+
const name = this.color.trim().toLowerCase();
|
|
867
|
+
if (this.namedColors.includes(name)) {
|
|
868
|
+
// Try common CSS variable names first, then fall back to the raw color name.
|
|
869
|
+
return `var(--color-${name}-300, var(--color-${name}, ${name}))`;
|
|
870
|
+
}
|
|
871
|
+
return this.color;
|
|
872
|
+
}
|
|
873
|
+
get computedBgHover() {
|
|
874
|
+
if (!this.color)
|
|
875
|
+
return null;
|
|
876
|
+
const name = this.color.trim().toLowerCase();
|
|
877
|
+
if (this.namedColors.includes(name)) {
|
|
878
|
+
return `var(--color-${name}-400, var(--color-${name}, ${name}))`;
|
|
879
|
+
}
|
|
880
|
+
return this.color;
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* Handles button click events and emits the buttonClick event if the button is not disabled.
|
|
884
|
+
*/
|
|
885
|
+
onButtonClick() {
|
|
886
|
+
if (!this.disabled) {
|
|
887
|
+
this.buttonClick.emit();
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
891
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ButtonComponent, isStandalone: true, selector: "lib-button", inputs: { buttonType: "buttonType", title: "title", iconBefore: "iconBefore", iconAfter: "iconAfter", disabled: "disabled", isThin: "isThin", ariaLabel: "ariaLabel", minWidth: "minWidth", pill: "pill", color: "color" }, outputs: { buttonClick: "buttonClick" }, host: { properties: { "style.--min-width": "minWidth", "style.--btn-bg": "computedBg", "style.--btn-bg-hover": "computedBgHover" } }, ngImport: i0, template: "<button\n type=\"button\"\n [class]=\"\n 'btn btn-' + buttonType + \n (isThin ? ' btn-thin' : '') + \n (title ? '' : ' btn-icon-only') + \n (pill ? ' btn-pill' : '')\"\n [disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\n (click)=\"onButtonClick()\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n>\n @if (iconBefore) {\n <span class=\"icon material-symbols-outlined\" [ngClass]=\"{ 'icon-before': title }\">{{ iconBefore }}</span>\n }\n\n @if (title) {\n <span class=\"button-title\">{{ title }}</span>\n }\n\n @if (iconAfter) {\n <span class=\"icon icon-after material-symbols-outlined\">{{ iconAfter }}</span>\n }\n</button>\n", styles: [".btn{min-width:var(--min-width, auto);padding:.75rem 1.5rem;border-radius:.25rem;font-size:1rem;font-weight:600;cursor:pointer;transition:all .2s ease;border:none;display:inline-flex;align-items:center;justify-content:center;outline:none;line-height:1.5rem}.btn.btn-thin{padding:.25rem 1.25rem;border-radius:.5rem;font-weight:400}.btn.btn-thin .icon img{height:1.25rem}.btn:disabled{cursor:not-allowed;color:#737373}.btn:disabled:not(.btn-transparent){background-color:#e7e7e7;border:.0625rem solid #737373}.btn:focus-visible{outline:.125rem solid #b967c7;outline-offset:.125rem}.btn .icon{display:flex;align-items:center;justify-content:center}.btn .icon img{height:1.5rem;width:auto}.btn .icon.icon-before{margin-right:.25rem}.btn .icon.icon-after{margin-left:.25rem}.btn .button-title{white-space:normal;word-break:break-word}.btn-icon-only{padding:.75rem}.btn-primary{background-color:var(--btn-bg, #0047ba);color:#fff;border:.0625rem solid var(--btn-bg, #0047ba)}.btn-primary:hover:not(:disabled){background-color:var(--btn-bg-hover, #003995)}.btn-secondary{background-color:#fff;color:#00245d;border:.0625rem solid #0047ba}.btn-secondary:hover:not(:disabled){background-color:#e5edf8}.btn-transparent{background-color:transparent;color:#00245d}.btn-transparent:hover:not(:disabled){background-color:#e5edf8}.btn.btn-pill{border-radius:62.5rem;display:inline-flex;vertical-align:middle}.btn.btn-pill.btn-icon-only{height:1.5rem;width:1.5rem;padding:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
892
|
+
}
|
|
893
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
894
|
+
type: Component,
|
|
895
|
+
args: [{ selector: 'lib-button', standalone: true, imports: [CommonModule], host: {
|
|
896
|
+
'[style.--min-width]': 'minWidth',
|
|
897
|
+
'[style.--btn-bg]': 'computedBg',
|
|
898
|
+
'[style.--btn-bg-hover]': 'computedBgHover',
|
|
899
|
+
}, template: "<button\n type=\"button\"\n [class]=\"\n 'btn btn-' + buttonType + \n (isThin ? ' btn-thin' : '') + \n (title ? '' : ' btn-icon-only') + \n (pill ? ' btn-pill' : '')\"\n [disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\n (click)=\"onButtonClick()\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n>\n @if (iconBefore) {\n <span class=\"icon material-symbols-outlined\" [ngClass]=\"{ 'icon-before': title }\">{{ iconBefore }}</span>\n }\n\n @if (title) {\n <span class=\"button-title\">{{ title }}</span>\n }\n\n @if (iconAfter) {\n <span class=\"icon icon-after material-symbols-outlined\">{{ iconAfter }}</span>\n }\n</button>\n", styles: [".btn{min-width:var(--min-width, auto);padding:.75rem 1.5rem;border-radius:.25rem;font-size:1rem;font-weight:600;cursor:pointer;transition:all .2s ease;border:none;display:inline-flex;align-items:center;justify-content:center;outline:none;line-height:1.5rem}.btn.btn-thin{padding:.25rem 1.25rem;border-radius:.5rem;font-weight:400}.btn.btn-thin .icon img{height:1.25rem}.btn:disabled{cursor:not-allowed;color:#737373}.btn:disabled:not(.btn-transparent){background-color:#e7e7e7;border:.0625rem solid #737373}.btn:focus-visible{outline:.125rem solid #b967c7;outline-offset:.125rem}.btn .icon{display:flex;align-items:center;justify-content:center}.btn .icon img{height:1.5rem;width:auto}.btn .icon.icon-before{margin-right:.25rem}.btn .icon.icon-after{margin-left:.25rem}.btn .button-title{white-space:normal;word-break:break-word}.btn-icon-only{padding:.75rem}.btn-primary{background-color:var(--btn-bg, #0047ba);color:#fff;border:.0625rem solid var(--btn-bg, #0047ba)}.btn-primary:hover:not(:disabled){background-color:var(--btn-bg-hover, #003995)}.btn-secondary{background-color:#fff;color:#00245d;border:.0625rem solid #0047ba}.btn-secondary:hover:not(:disabled){background-color:#e5edf8}.btn-transparent{background-color:transparent;color:#00245d}.btn-transparent:hover:not(:disabled){background-color:#e5edf8}.btn.btn-pill{border-radius:62.5rem;display:inline-flex;vertical-align:middle}.btn.btn-pill.btn-icon-only{height:1.5rem;width:1.5rem;padding:0}\n"] }]
|
|
900
|
+
}], propDecorators: { buttonType: [{
|
|
901
|
+
type: Input
|
|
902
|
+
}], title: [{
|
|
903
|
+
type: Input
|
|
904
|
+
}], iconBefore: [{
|
|
905
|
+
type: Input
|
|
906
|
+
}], iconAfter: [{
|
|
907
|
+
type: Input
|
|
908
|
+
}], disabled: [{
|
|
909
|
+
type: Input
|
|
910
|
+
}], isThin: [{
|
|
911
|
+
type: Input
|
|
912
|
+
}], ariaLabel: [{
|
|
913
|
+
type: Input
|
|
914
|
+
}], minWidth: [{
|
|
915
|
+
type: Input
|
|
916
|
+
}], pill: [{
|
|
917
|
+
type: Input
|
|
918
|
+
}], color: [{
|
|
919
|
+
type: Input
|
|
920
|
+
}], buttonClick: [{
|
|
921
|
+
type: Output
|
|
922
|
+
}] } });
|
|
923
|
+
|
|
924
|
+
/**
|
|
925
|
+
* A link component that supports basic and inline variants
|
|
926
|
+
* with optional left and right icons.
|
|
927
|
+
*
|
|
928
|
+
* @example
|
|
929
|
+
* ```html
|
|
930
|
+
* <lib-link text="Link item" href="/details"></lib-link>
|
|
931
|
+
*
|
|
932
|
+
* <lib-link
|
|
933
|
+
* text="Inline link"
|
|
934
|
+
* type="inline"
|
|
935
|
+
* href="/details">
|
|
936
|
+
* </lib-link>
|
|
937
|
+
*
|
|
938
|
+
* <lib-link
|
|
939
|
+
* text="Disabled link"
|
|
940
|
+
* [disabled]="true">
|
|
941
|
+
* </lib-link>
|
|
942
|
+
* ```
|
|
943
|
+
*/
|
|
944
|
+
class LinkComponent {
|
|
945
|
+
constructor() {
|
|
946
|
+
this.text = '';
|
|
947
|
+
this.type = 'basic';
|
|
948
|
+
this.state = 'default';
|
|
949
|
+
this.disabled = false;
|
|
950
|
+
this.linkClick = new EventEmitter();
|
|
951
|
+
}
|
|
952
|
+
get computedState() {
|
|
953
|
+
return this.disabled ? 'disabled' : this.state;
|
|
954
|
+
}
|
|
955
|
+
get hasLeftIcon() {
|
|
956
|
+
return this.leftIcon !== undefined;
|
|
957
|
+
}
|
|
958
|
+
get hasRightIcon() {
|
|
959
|
+
return this.rightIcon !== undefined;
|
|
960
|
+
}
|
|
961
|
+
get computedLeftIcon() {
|
|
962
|
+
return this.leftIcon || '';
|
|
963
|
+
}
|
|
964
|
+
get computedRightIcon() {
|
|
965
|
+
return this.rightIcon || '';
|
|
966
|
+
}
|
|
967
|
+
get computedHref() {
|
|
968
|
+
if (this.computedState === 'disabled') {
|
|
969
|
+
return null;
|
|
970
|
+
}
|
|
971
|
+
return this.href ?? null;
|
|
972
|
+
}
|
|
973
|
+
get computedRel() {
|
|
974
|
+
if (this.rel) {
|
|
975
|
+
return this.rel;
|
|
976
|
+
}
|
|
977
|
+
if (this.target === '_blank') {
|
|
978
|
+
return 'noopener noreferrer';
|
|
979
|
+
}
|
|
980
|
+
return null;
|
|
981
|
+
}
|
|
982
|
+
get computedAriaLabel() {
|
|
983
|
+
if (this.ariaLabel) {
|
|
984
|
+
return this.ariaLabel;
|
|
985
|
+
}
|
|
986
|
+
if (this.text) {
|
|
987
|
+
return this.text;
|
|
988
|
+
}
|
|
989
|
+
if (this.textHtml) {
|
|
990
|
+
return this.textHtml.replace(/<[^>]*>/g, '').trim();
|
|
991
|
+
}
|
|
992
|
+
if (this.imageAlt) {
|
|
993
|
+
return this.imageAlt;
|
|
994
|
+
}
|
|
995
|
+
return '';
|
|
996
|
+
}
|
|
997
|
+
onClick(event) {
|
|
998
|
+
if (this.computedState === 'disabled') {
|
|
999
|
+
event.preventDefault();
|
|
1000
|
+
event.stopImmediatePropagation();
|
|
1001
|
+
return;
|
|
1002
|
+
}
|
|
1003
|
+
this.linkClick.emit(event);
|
|
1004
|
+
}
|
|
1005
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: LinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1006
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.3.15", type: LinkComponent, isStandalone: true, selector: "lib-link", inputs: { text: "text", textHtml: "textHtml", imageSrc: "imageSrc", imageAlt: "imageAlt", imageTitle: "imageTitle", imageClass: "imageClass", href: "href", target: "target", rel: "rel", type: "type", state: "state", disabled: ["disabled", "disabled", booleanAttribute], leftIcon: "leftIcon", rightIcon: "rightIcon", ariaLabel: "ariaLabel" }, outputs: { linkClick: "linkClick" }, ngImport: i0, template: "<a\n class=\"link\"\n [ngClass]=\"[\n 'link--' + type,\n 'link--state-' + computedState,\n computedState === 'disabled' ? 'link--disabled' : ''\n ]\"\n [attr.href]=\"computedHref\"\n [attr.target]=\"target\"\n [attr.rel]=\"computedRel\"\n [attr.aria-disabled]=\"computedState === 'disabled'\"\n [attr.aria-label]=\"computedAriaLabel\"\n [attr.tabindex]=\"computedState === 'disabled' ? -1 : 0\"\n (click)=\"onClick($event)\"\n>\n <span\n *ngIf=\"hasLeftIcon\"\n class=\"material-symbols-outlined link__icon link__icon--left\"\n aria-hidden=\"true\"\n >\n {{ computedLeftIcon }}\n </span>\n <ng-container *ngIf=\"imageSrc; else textContent\">\n <img\n [src]=\"imageSrc\"\n [attr.alt]=\"imageAlt || ''\"\n [attr.title]=\"imageTitle || null\"\n [class]=\"imageClass || null\"\n />\n </ng-container>\n <ng-template #textContent>\n <span class=\"link__text\" *ngIf=\"textHtml; else plainText\" [innerHTML]=\"textHtml\"></span>\n <ng-template #plainText>\n <span class=\"link__text\">{{ text }}</span>\n </ng-template>\n </ng-template>\n <span\n *ngIf=\"hasRightIcon\"\n class=\"material-symbols-outlined link__icon link__icon--right\"\n aria-hidden=\"true\"\n >\n {{ computedRightIcon }}\n </span>\n</a>\n", styles: ["html{border:0;margin:0;padding:0;-webkit-text-size-adjust:100%}body{margin:0;padding:0}*,*:before,*:after{box-sizing:border-box}:root{--color-navy: #00245d;--color-royal: #0047ba;--color-white: #ffffff;--color-blue-500: #00245d;--color-blue-400: #003995;--color-blue-300: #0047ba;--color-blue-200: #336cc8;--color-blue-150: #ccdaf1;--color-blue-100: #e5edf8;--color-gray-500: #141414;--color-gray-400: #737373;--color-gray-300: #8f8f8f;--color-gray-200: #d0d0d0;--color-gray-100: #e7e7e7;--color-gray-50: #f9f9f9;--color-gray-brand-400: #737373;--color-green-500: #1d562e;--color-green-400: #2e8545;--color-green-300: #3ba35a;--color-green-200: #9dd1ac;--color-green-100: #ebf6ee;--color-teal-500: #26485f;--color-teal-400: #3e7295;--color-teal-300: #457fa6;--color-teal-200: #a2bfd3;--color-teal-100: #ecf2f6;--color-red-500: #702121;--color-red-400: #b33837;--color-red-300: #c73e3d;--color-red-200: #e39e9e;--color-red-100: #f9ecec;--color-yellow-500: #635f04;--color-yellow-400: #928c30;--color-yellow-300: #d1c844;--color-yellow-200: #e8e3a1;--color-yellow-100: #f2f0e9;--color-purple-focus: #b967c7;--text-heading: #002e5d;--text-secondary-heading: #737373;--text-body: #141414;--text-disabled: #737373;--text-link: #336cc8;--text-on-action: #ffffff;--text-success: #1d562e;--text-info: #26485f;--text-error: #702121;--text-warning: #635f04;--surface-success: #ebf6ee;--surface-info: #ecf2f6;--surface-error: #f9ecec;--surface-warning: #f2f0e9;--focus-ring-color: #b967c7}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Light.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Regular.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Semibold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Bold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-LightItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Italic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-SemiboldItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-BoldItalic.ttf) format(\"truetype\");font-display:swap}h1,h2,h3,h4,h5,h6,span:not(.material-symbols-outlined),a,p{font-family:Source Sans Pro}h1{font-weight:300;font-style:normal;color:var(--text-heading)}h2{font-weight:400;font-style:normal;color:var(--text-heading)}h3{font-weight:700;font-style:normal;color:var(--text-heading)}h4,h5,h6{font-weight:600;font-style:normal;color:var(--text-secondary-heading)}.hbll-default-body{font-weight:400;font-style:normal;max-width:35rem;min-width:22.25rem;color:var(--text-body)}.hbll-caption{font-weight:400;font-style:normal;max-width:25.25rem;min-width:17.5rem;color:var(--text-body)}.hbll-large{font-weight:400;font-style:normal;max-width:41.25rem;min-width:26.5rem;color:var(--text-body)}a{color:var(--text-link);text-decoration:underline}.hbll-emphasis{font-weight:600}h1{font-size:2rem;line-height:2.5rem}h2{font-size:1.75rem;line-height:2.25rem}h3,h4{font-size:1.5rem;line-height:2rem}h5,h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:.875rem;line-height:1.25rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1rem;line-height:1.5rem}@media screen and (min-width: 52.125em){h1{font-size:3rem;line-height:3.5rem}h2{font-size:2.5rem;line-height:3rem}h3{font-size:2rem;line-height:3rem}h4{font-size:1.75rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}@media screen and (min-width: 90em){h1{font-size:3.75rem;line-height:4.25rem}h2{font-size:3rem;line-height:3.5rem}h3{font-size:2.5rem;line-height:3rem}h4{font-size:2rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.link{--link-color-default: #0047ba;--link-color-hover-inline: #00245d;--link-background-hover-basic: #e5edf8;--link-color-disabled: #737373;--link-icon-disabled: #737373;--link-background-disabled: #f9f9f9;align-items:center;background-color:transparent;border-radius:.25rem;color:var(--link-color-default);cursor:pointer;display:inline-flex;font-weight:400;gap:.25rem;padding:.25rem;position:relative;text-decoration:none}.link:after{border:.125rem solid #b967c7;border-radius:.25rem;content:\"\";inset:-.25rem;opacity:0;position:absolute;transition:opacity .15s ease-in-out;pointer-events:none}.link:focus-visible:after{opacity:1}.link:focus-visible{outline:none}.link.link--basic:hover:not(.link--disabled){background-color:#e5edf880}.link.link--inline:hover:not(.link--disabled){color:var(--link-color-hover-inline)}.link.link--state-hover.link--basic{background-color:#e5edf880}.link.link--state-hover.link--inline{color:var(--link-color-hover-inline)}.link.link--disabled,.link.link--state-disabled{background-color:#f9f9f980;color:var(--link-color-disabled);cursor:default;pointer-events:none}.link--inline{padding-top:0;padding-bottom:0}.link--inline a{padding:0}.link--inline:hover:not(.link--disabled) .link__text,.link--inline.link--state-hover .link__text{text-decoration:underline}.link__icon{align-items:center;color:inherit;display:inline-flex;justify-content:center;height:1.25rem}.link--disabled .link__icon,.link--state-disabled .link__icon{color:var(--link-icon-disabled)}.link__text{align-items:center;display:inline-flex}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
1007
|
+
}
|
|
1008
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: LinkComponent, decorators: [{
|
|
1009
|
+
type: Component,
|
|
1010
|
+
args: [{ selector: 'lib-link', standalone: true, imports: [CommonModule], template: "<a\n class=\"link\"\n [ngClass]=\"[\n 'link--' + type,\n 'link--state-' + computedState,\n computedState === 'disabled' ? 'link--disabled' : ''\n ]\"\n [attr.href]=\"computedHref\"\n [attr.target]=\"target\"\n [attr.rel]=\"computedRel\"\n [attr.aria-disabled]=\"computedState === 'disabled'\"\n [attr.aria-label]=\"computedAriaLabel\"\n [attr.tabindex]=\"computedState === 'disabled' ? -1 : 0\"\n (click)=\"onClick($event)\"\n>\n <span\n *ngIf=\"hasLeftIcon\"\n class=\"material-symbols-outlined link__icon link__icon--left\"\n aria-hidden=\"true\"\n >\n {{ computedLeftIcon }}\n </span>\n <ng-container *ngIf=\"imageSrc; else textContent\">\n <img\n [src]=\"imageSrc\"\n [attr.alt]=\"imageAlt || ''\"\n [attr.title]=\"imageTitle || null\"\n [class]=\"imageClass || null\"\n />\n </ng-container>\n <ng-template #textContent>\n <span class=\"link__text\" *ngIf=\"textHtml; else plainText\" [innerHTML]=\"textHtml\"></span>\n <ng-template #plainText>\n <span class=\"link__text\">{{ text }}</span>\n </ng-template>\n </ng-template>\n <span\n *ngIf=\"hasRightIcon\"\n class=\"material-symbols-outlined link__icon link__icon--right\"\n aria-hidden=\"true\"\n >\n {{ computedRightIcon }}\n </span>\n</a>\n", styles: ["html{border:0;margin:0;padding:0;-webkit-text-size-adjust:100%}body{margin:0;padding:0}*,*:before,*:after{box-sizing:border-box}:root{--color-navy: #00245d;--color-royal: #0047ba;--color-white: #ffffff;--color-blue-500: #00245d;--color-blue-400: #003995;--color-blue-300: #0047ba;--color-blue-200: #336cc8;--color-blue-150: #ccdaf1;--color-blue-100: #e5edf8;--color-gray-500: #141414;--color-gray-400: #737373;--color-gray-300: #8f8f8f;--color-gray-200: #d0d0d0;--color-gray-100: #e7e7e7;--color-gray-50: #f9f9f9;--color-gray-brand-400: #737373;--color-green-500: #1d562e;--color-green-400: #2e8545;--color-green-300: #3ba35a;--color-green-200: #9dd1ac;--color-green-100: #ebf6ee;--color-teal-500: #26485f;--color-teal-400: #3e7295;--color-teal-300: #457fa6;--color-teal-200: #a2bfd3;--color-teal-100: #ecf2f6;--color-red-500: #702121;--color-red-400: #b33837;--color-red-300: #c73e3d;--color-red-200: #e39e9e;--color-red-100: #f9ecec;--color-yellow-500: #635f04;--color-yellow-400: #928c30;--color-yellow-300: #d1c844;--color-yellow-200: #e8e3a1;--color-yellow-100: #f2f0e9;--color-purple-focus: #b967c7;--text-heading: #002e5d;--text-secondary-heading: #737373;--text-body: #141414;--text-disabled: #737373;--text-link: #336cc8;--text-on-action: #ffffff;--text-success: #1d562e;--text-info: #26485f;--text-error: #702121;--text-warning: #635f04;--surface-success: #ebf6ee;--surface-info: #ecf2f6;--surface-error: #f9ecec;--surface-warning: #f2f0e9;--focus-ring-color: #b967c7}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Light.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Regular.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Semibold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Bold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-LightItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Italic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-SemiboldItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-BoldItalic.ttf) format(\"truetype\");font-display:swap}h1,h2,h3,h4,h5,h6,span:not(.material-symbols-outlined),a,p{font-family:Source Sans Pro}h1{font-weight:300;font-style:normal;color:var(--text-heading)}h2{font-weight:400;font-style:normal;color:var(--text-heading)}h3{font-weight:700;font-style:normal;color:var(--text-heading)}h4,h5,h6{font-weight:600;font-style:normal;color:var(--text-secondary-heading)}.hbll-default-body{font-weight:400;font-style:normal;max-width:35rem;min-width:22.25rem;color:var(--text-body)}.hbll-caption{font-weight:400;font-style:normal;max-width:25.25rem;min-width:17.5rem;color:var(--text-body)}.hbll-large{font-weight:400;font-style:normal;max-width:41.25rem;min-width:26.5rem;color:var(--text-body)}a{color:var(--text-link);text-decoration:underline}.hbll-emphasis{font-weight:600}h1{font-size:2rem;line-height:2.5rem}h2{font-size:1.75rem;line-height:2.25rem}h3,h4{font-size:1.5rem;line-height:2rem}h5,h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:.875rem;line-height:1.25rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1rem;line-height:1.5rem}@media screen and (min-width: 52.125em){h1{font-size:3rem;line-height:3.5rem}h2{font-size:2.5rem;line-height:3rem}h3{font-size:2rem;line-height:3rem}h4{font-size:1.75rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}@media screen and (min-width: 90em){h1{font-size:3.75rem;line-height:4.25rem}h2{font-size:3rem;line-height:3.5rem}h3{font-size:2.5rem;line-height:3rem}h4{font-size:2rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.link{--link-color-default: #0047ba;--link-color-hover-inline: #00245d;--link-background-hover-basic: #e5edf8;--link-color-disabled: #737373;--link-icon-disabled: #737373;--link-background-disabled: #f9f9f9;align-items:center;background-color:transparent;border-radius:.25rem;color:var(--link-color-default);cursor:pointer;display:inline-flex;font-weight:400;gap:.25rem;padding:.25rem;position:relative;text-decoration:none}.link:after{border:.125rem solid #b967c7;border-radius:.25rem;content:\"\";inset:-.25rem;opacity:0;position:absolute;transition:opacity .15s ease-in-out;pointer-events:none}.link:focus-visible:after{opacity:1}.link:focus-visible{outline:none}.link.link--basic:hover:not(.link--disabled){background-color:#e5edf880}.link.link--inline:hover:not(.link--disabled){color:var(--link-color-hover-inline)}.link.link--state-hover.link--basic{background-color:#e5edf880}.link.link--state-hover.link--inline{color:var(--link-color-hover-inline)}.link.link--disabled,.link.link--state-disabled{background-color:#f9f9f980;color:var(--link-color-disabled);cursor:default;pointer-events:none}.link--inline{padding-top:0;padding-bottom:0}.link--inline a{padding:0}.link--inline:hover:not(.link--disabled) .link__text,.link--inline.link--state-hover .link__text{text-decoration:underline}.link__icon{align-items:center;color:inherit;display:inline-flex;justify-content:center;height:1.25rem}.link--disabled .link__icon,.link--state-disabled .link__icon{color:var(--link-icon-disabled)}.link__text{align-items:center;display:inline-flex}\n"] }]
|
|
1011
|
+
}], propDecorators: { text: [{
|
|
1012
|
+
type: Input
|
|
1013
|
+
}], textHtml: [{
|
|
1014
|
+
type: Input
|
|
1015
|
+
}], imageSrc: [{
|
|
1016
|
+
type: Input
|
|
1017
|
+
}], imageAlt: [{
|
|
1018
|
+
type: Input
|
|
1019
|
+
}], imageTitle: [{
|
|
1020
|
+
type: Input
|
|
1021
|
+
}], imageClass: [{
|
|
1022
|
+
type: Input
|
|
1023
|
+
}], href: [{
|
|
1024
|
+
type: Input
|
|
1025
|
+
}], target: [{
|
|
1026
|
+
type: Input
|
|
1027
|
+
}], rel: [{
|
|
1028
|
+
type: Input
|
|
1029
|
+
}], type: [{
|
|
1030
|
+
type: Input
|
|
1031
|
+
}], state: [{
|
|
1032
|
+
type: Input
|
|
1033
|
+
}], disabled: [{
|
|
1034
|
+
type: Input,
|
|
1035
|
+
args: [{ transform: booleanAttribute }]
|
|
1036
|
+
}], leftIcon: [{
|
|
1037
|
+
type: Input
|
|
1038
|
+
}], rightIcon: [{
|
|
1039
|
+
type: Input
|
|
1040
|
+
}], ariaLabel: [{
|
|
1041
|
+
type: Input
|
|
1042
|
+
}], linkClick: [{
|
|
1043
|
+
type: Output
|
|
1044
|
+
}] } });
|
|
1045
|
+
|
|
804
1046
|
class HbllFooterComponent {
|
|
805
1047
|
constructor() {
|
|
806
1048
|
this.fb = inject(FormBuilder);
|
|
@@ -880,11 +1122,11 @@ class HbllFooterComponent {
|
|
|
880
1122
|
}
|
|
881
1123
|
}
|
|
882
1124
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HbllFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
883
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: HbllFooterComponent, isStandalone: true, selector: "lib-hbll-footer", inputs: { mainsitebaseurl: "mainsitebaseurl", myaccountapibaseuri: "myaccountapibaseuri", byuid: "byuid", emailname: "emailname", emailemail: "emailemail", emailmessage: "emailmessage", emailstatus: "emailstatus" }, viewQueries: [{ propertyName: "emailDialog", first: true, predicate: ["emailDialog"], descendants: true }], ngImport: i0, template: "<footer>\n <div class=\"hbll-footer-wrapper\">\n <button class=\"skip-link-footer\" (click)=\"skipFooter()\">Skip footer</button>\n <div class=\"hbll-footer-links\">\n <section aria-labelledby=\"footerContactHeading\">\n <h3 id=\"footerContactHeading\">Contact</h3>\n <ul>\n <li>\n <address>\n P.O. Box 26800<br />\n Provo, UT 84602-6800\n </address>\n </li>\n <li>\n <a href=\"tel:801-422-6061\">\n <span class=\"material-symbols-outlined hbll-footer-icon\">\n phone_in_talk </span\n > <strong>Call</strong> (801) 422-6061\n </a>\n </li>\n <li>\n <a href=\"sms:801-623-6838\">\n <span class=\"material-symbols-outlined hbll-footer-icon\"> sms </span\n > <strong>Text</strong> (801) 623-6838\n </a>\n </li>\n <li>\n <button\n (click)=\"emailDialog.showModal()\"\n data-testid=\"emailUsBtn\"\n style=\"padding: 4px\"\n >\n <span class=\"material-symbols-outlined hbll-footer-icon\"> mail </span\n > \n <strong>Email us</strong>\n </button>\n </li>\n </ul>\n </section>\n <section aria-labelledby=\"footerResourcesHeading\">\n <h3 id=\"footerResourcesHeading\">Resources</h3>\n <ul>\n <li>\n <a target=\"_blank\" href=\"{{ mainsitebaseurl }}/site-index/\"\n >A-Z Site Index</a\n >\n </li>\n <li>\n <a target=\"_blank\" href=\"{{ mainsitebaseurl }}/about/policies/\">Policies</a>\n </li>\n <li>\n <a target=\"_blank\" href=\"{{ mainsitebaseurl }}/about/location/\"\n >Parking & Directions</a\n >\n </li>\n <li>\n <a target=\"_blank\" href=\"https://uac.byu.edu/accessibility-lab\"\n >Accessibility Resources</a\n >\n </li>\n <li>\n <a target=\"_blank\" href=\"https://hr.lib.byu.edu/byu-library-jobs\"\n >Employment Opportunities</a\n >\n </li>\n </ul>\n </section>\n <section aria-labelledby=\"footerFriendsHeading\">\n <h3 id=\"footerFriendsHeading\">Friends in the Library</h3>\n <ul>\n <li>\n <a target=\"_blank\" href=\"https://ctl.byu.edu\"\n >Center for Teaching and Learning</a\n >\n </li>\n <li>\n <a target=\"_blank\" href=\"https://copyright.byu.edu\"\n >Copyright Licensing Office</a\n >\n </li>\n <li>\n <a target=\"_blank\" href=\"https://facultycenter.byu.edu/aboutus\"\n >Faculty Center</a\n >\n </li>\n <li>\n <a target=\"_blank\" href=\"https://dining.byu.edu/library-cafe\"\n >Library Cafe</a\n >\n </li>\n </ul>\n </section>\n <section aria-labelledby=\"footerConnectHeading\">\n <h3 id=\"footerConnectHeading\">Connect</h3>\n <ul class=\"hbll-footer-social-list\">\n <li>\n <a target=\"_blank\" href=\"https://www.facebook.com/byuhbll\">\n <img\n class=\"hbll-footer-social\"\n src=\"https://media.lib.byu.edu/web-assets/images/1.0.0/facebook-color-round.svg\"\n alt=\"Facebook\"\n title=\"Facebook\"\n />\n </a>\n </li>\n <li>\n <a target=\"_blank\" href=\"https://www.instagram.com/byu_hbll/\">\n <img\n class=\"hbll-footer-social\"\n src=\"https://media.lib.byu.edu/web-assets/images/1.0.0/instagram-color.svg\"\n alt=\"Instagram\"\n title=\"Instagram\"\n />\n </a>\n </li>\n </ul>\n <ul>\n <li>\n <a href=\"https://lib.byu.edu/announcements\"\n ><span class=\"material-symbols-outlined social-icon\"> featured_seasonal_and_gifts</span\n > Explore what\u2019s new\n </a>\n </li>\n </ul>\n </section>\n </div>\n <section class=\"hbll-footer-bottom\" aria-label=\"Bottom-most part of the footer\">\n <div class=\"hbll-footer-title\">\n <a href=\"https://byu.edu\" target=\"_blank\">BRIGHAM YOUNG UNIVERSITY</a>\n </div>\n <br />\n PROVO, UT 84602, USA | <a href=\"sms:801-422-6061\">(801) 422-6061</a>\n <br />© {{ date | date: 'yyyy' }}\n ALL RIGHTS RESERVED\n <div class=\"hbll-footer-privacy\">\n <a href=\"https://privacy.byu.edu/\" target=\"_blank\">Privacy Notice</a>\n |\n <span id=\"teconsent\"></span>\n </div>\n </section>\n </div>\n <div id=\"consent-banner\"></div>\n</footer>\n\n<dialog\n #emailDialog\n onmousedown=\"event.target === this && this.close()\"\n (close)=\"handleClose()\"\n data-testid=\"dialog\"\n>\n @if (!isEmailSent) {\n <form [formGroup]=\"emailForm\" (submit)=\"sendEmail()\" data-testid=\"form\">\n <div class=\"hbll-footer-email-top\">\n <h1>Email Us</h1>\n <button (click)=\"emailDialog.close()\" type=\"button\" data-testid=\"closeBtn\">\n <span class=\"material-symbols-outlined\"> close </span>\n </button>\n </div>\n <label for=\"hbllFooterEmailName\">Name</label>\n <input\n id=\"hbllFooterEmailName\"\n type=\"text\"\n formControlName=\"name\"\n data-testid=\"emailNameInput\"\n />\n <label for=\"hbllFooterEmailEmail\">\n Email (please provide if you would like a response)</label\n >\n <input\n id=\"hbllFooterEmailEmail\"\n type=\"text\"\n formControlName=\"email\"\n data-testid=\"emailEmailInput\"\n />\n <label for=\"hbllFooterEmailQuestionComment\">\n Question or comment <span class=\"hbll-footer-email-required\">*</span>\n </label>\n <textarea\n id=\"hbllFooterEmailQuestionComment\"\n type=\"text\"\n formControlName=\"message\"\n data-testid=\"emailMessageInput\"\n ></textarea>\n @if (isSubmitted && emailForm.controls.message.invalid) {\n <div\n class=\"hbll-footer-email-required hbll-footer-email-error\"\n data-testid=\"commentError\"\n >\n <span class=\"material-symbols-outlined hbll-footer-email-error-icon\">\n warning\n </span>\n <strong>Please fill out this field</strong>\n </div>\n }\n <label for=\"hbllFooterEmailStatus\">Role</label>\n <span class=\"hbll-footer-select-wrapper\">\n <select\n id=\"hbllFooterEmailStatus\"\n formControlName=\"status\"\n data-testid=\"emailStatusInput\"\n >\n <option selected value=\"\"></option>\n @for (status of userStatuses | slice: 1; track status) {\n <option [value]=\"status\">{{ status }}</option>\n }\n </select>\n </span>\n <div class=\"hbll-footer-email-bottom-bar\">\n @if (hasConnectionError) {\n <p class=\"hbll-footer-connection-error\" data-testid=\"connectionError\">\n <i>There was an error sending your email. Please try again later.</i>\n </p>\n }\n <button\n class=\"pill-btn--components\"\n type=\"submit\"\n [disabled]=\"isLoading\"\n data-testid=\"sendEmailBtn\"\n >\n Send\n </button>\n </div>\n </form>\n } @else {\n <div class=\"hbll-footer-email-success\" data-testid=\"successMessage\">\n <p>\n Your email was sent successfully. If you supplied your email address, we will get\n back to you shortly.<br />Thank you!\n </p>\n <button class=\"pill-btn--components\" (click)=\"emailDialog.close()\" type=\"button\">\n Close\n </button>\n </div>\n }\n</dialog>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&display=swap\";dialog form input,dialog form textarea,dialog form select{appearance:none;font-family:inherit;padding:.38em;border:solid 1px #707070;border-radius:4px;font-size:1em;background-color:#fff}dialog form input:focus,dialog form textarea:focus,dialog form select:focus{outline-color:#3a6093}dialog form .hbll-footer-select-wrapper{position:relative}dialog form .hbll-footer-select-wrapper select{cursor:pointer;padding-right:2em}dialog form .hbll-footer-select-wrapper:after{font-family:Material Symbols Outlined;content:\"arrow_drop_down\";pointer-events:none;top:0;font-size:1.5em;right:.2em;height:100%;position:absolute;display:flex;align-items:center;opacity:70%}.pill-btn--components{background-color:#4070b0;font-size:1em;transition:all .15s;color:#fff;cursor:pointer;font-weight:600;text-align:center}.pill-btn--components:disabled{color:#707070;background-color:#e6e6e6;pointer-events:none}.pill-btn--components:hover{background-color:#6892ca;color:#fff}.destructive.pill-btn--components{background-color:#b04940}.destructive.pill-btn--components:hover{background-color:#c7574d}*{box-sizing:border-box;text-decoration:none;font-size:1em}*:not(.material-symbols-outlined){font-family:inherit}.pill-btn--components{border-radius:100em;padding:.4em 1.3em}button{border:none;background-color:transparent;font-size:1em}button :hover{cursor:pointer}.skip-link-footer{position:absolute;top:30px;left:30px;background:#fff;color:#00285b;font-size:1em;font-weight:580;padding:8px 16px;border:3px solid #0050b7;border-radius:4px;cursor:pointer;z-index:10;opacity:0;pointer-events:none;transition:opacity .2s ease,transform .2s ease}.skip-link-footer:focus{opacity:1;pointer-events:auto;transform:none}.skip-link-footer:hover{color:#00285b;background-color:#e3edf8;border-color:#e3edf8}footer{line-height:1.2em;background-color:#e6e6e6}footer a{padding:4px}footer ::ng-deep #consent-banner{z-index:11;position:fixed}footer .hbll-footer-wrapper{display:flex;flex-direction:column;align-items:center;position:relative}footer .hbll-footer-wrapper .hbll-footer-links{max-width:90em;display:flex;align-items:flex-start;justify-content:flex-start;flex-wrap:wrap;padding-bottom:2em;white-space:nowrap}footer .hbll-footer-wrapper .hbll-footer-links strong{font-weight:600}footer .hbll-footer-wrapper .hbll-footer-links address{font-style:normal}footer .hbll-footer-wrapper .hbll-footer-links .hbll-footer-icon{font-size:1.25rem!important;margin-right:.2em;color:#002e5d}footer .hbll-footer-wrapper .hbll-footer-links section{padding:2em 1.8em 0;background-color:#e6e6e6;flex:1}footer .hbll-footer-wrapper .hbll-footer-links .hbll-footer-social-list{display:flex}footer .hbll-footer-wrapper .hbll-footer-links .hbll-footer-social-list .hbll-footer-social{height:1.5em;margin-right:1em}footer .hbll-footer-wrapper .hbll-footer-links .hbll-footer-social-list li{margin-bottom:0}footer .hbll-footer-wrapper .hbll-footer-links .social-icon{font-size:20px;padding:2px}footer .hbll-footer-wrapper h3{font-weight:600;color:#002e5d;font-size:1.4em;margin-bottom:1em;margin-top:0}footer .hbll-footer-wrapper ul{list-style:none;margin:.4em 0 0;padding:0}footer .hbll-footer-wrapper ul li{display:flex;align-items:center}footer .hbll-footer-wrapper ul li a,footer .hbll-footer-wrapper ul li button{display:inline-flex;align-items:center;color:#305f9c}footer .hbll-footer-wrapper ul li a:hover,footer .hbll-footer-wrapper ul li button:hover{color:#6892ca}footer .hbll-footer-wrapper ul li:not(:last-of-type){margin-bottom:.6em}footer .hbll-footer-wrapper .hbll-footer-bottom{text-align:center;background-color:#002e5d;color:#fff;font-family:IBM Plex Sans,sans-serif;font-optical-sizing:auto;font-weight:300;font-style:normal;font-size:.9em;line-height:1.6em;padding:1.8em;width:100%}footer .hbll-footer-wrapper .hbll-footer-bottom a{color:#fff}footer .hbll-footer-wrapper .hbll-footer-bottom .hbll-footer-title{font-size:2em;font-weight:400;line-height:1em}footer .hbll-footer-wrapper .hbll-footer-bottom .hbll-footer-privacy{margin-top:.4em;display:flex;align-items:center;justify-content:center;gap:5px}footer .hbll-footer-wrapper .hbll-footer-bottom .hbll-footer-privacy a{text-decoration:underline}footer .hbll-footer-wrapper .hbll-footer-bottom .hbll-footer-privacy ::ng-deep #teconsent a{color:#fff;text-decoration:underline;padding:4px}footer .hbll-footer-wrapper .hbll-footer-bottom .hbll-footer-privacy ::ng-deep #teconsent a:hover{color:#fff}@media screen and (max-width: 40em){.hbll-footer-links{flex-direction:column;justify-content:flex-start;width:100%}}dialog{border:solid 1px #888;border-radius:4px;width:90%;max-width:50em;padding:0;transition:all 5s ease-in-out}dialog .hbll-footer-email-success,dialog form{padding:1.6em 2em}dialog .hbll-footer-email-success p,dialog form p{text-align:center;line-height:1.4em}dialog .hbll-footer-email-success{display:flex;justify-content:center;align-items:center;flex-direction:column}dialog .hbll-footer-email-success button{margin-top:1em}dialog form{display:flex;flex-direction:column;position:relative}dialog form textarea{min-height:100px;resize:vertical}dialog form input,dialog form textarea,dialog form .hbll-footer-select-wrapper{margin-bottom:.6em}dialog form .hbll-footer-email-bottom-bar{display:flex;align-items:center;justify-content:flex-end}dialog form .hbll-footer-email-bottom-bar .hbll-footer-connection-error{text-align:right;flex-grow:1;margin:0 1em 0 0}dialog form label{margin-bottom:.4em;margin-top:.4em}dialog form .hbll-footer-email-error{display:flex;justify-content:center;align-items:center;margin-right:auto;margin-bottom:.6em;font-size:.8em}dialog form .hbll-footer-email-error .hbll-footer-email-error-icon{font-size:1.2em;margin-right:.2em}dialog form .hbll-footer-email-top{width:100%;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;align-items:center;margin-bottom:1em}dialog form .hbll-footer-email-top h1{font-size:1.4em;margin:0}dialog form .hbll-footer-email-required-message{float:right}dialog form .hbll-footer-select-wrapper{margin-right:auto}dialog form .hbll-footer-email-required{color:#d03a3a}dialog form button:not([type=submit]){color:#333}dialog form button:not([type=submit]):hover{color:#696969}dialog form button[type=submit]{margin-left:auto}dialog::backdrop{background-color:#000;opacity:.75}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "pipe", type: i1.DatePipe, name: "date" }] }); }
|
|
1125
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: HbllFooterComponent, isStandalone: true, selector: "lib-hbll-footer", inputs: { mainsitebaseurl: "mainsitebaseurl", myaccountapibaseuri: "myaccountapibaseuri", byuid: "byuid", emailname: "emailname", emailemail: "emailemail", emailmessage: "emailmessage", emailstatus: "emailstatus" }, viewQueries: [{ propertyName: "emailDialog", first: true, predicate: ["emailDialog"], descendants: true }], ngImport: i0, template: "<footer>\n <div class=\"hbll-footer-wrapper\">\n <div class=\"skip-link-footer\">\n <lib-button\n class=\"skip-link-footer sr-only sr-only-focusable\"\n buttonType=\"secondary\"\n [isThin]=\"true\"\n title=\"Skip footer\"\n (buttonClick)=\"skipFooter()\"\n ></lib-button>\n </div>\n <div class=\"hbll-footer-links\">\n <section aria-labelledby=\"footerContactHeading\">\n <h3 id=\"footerContactHeading\">Contact</h3>\n <ul>\n <li>\n <address>\n P.O. Box 26800<br />\n Provo, UT 84602-6800\n </address>\n </li>\n <li>\n <lib-link\n href=\"tel:801-422-6061\"\n textHtml=\"<strong>Call</strong> (801) 422-6061\"\n ariaLabel=\"Call (801) 422-6061\"\n leftIcon=\"phone_in_talk\"\n >\n </lib-link>\n </li>\n <li>\n <lib-link\n href=\"sms:801-623-6838\"\n textHtml=\"<strong>Text</strong> (801) 623-6838\"\n ariaLabel=\"Text (801) 623-6838\"\n leftIcon=\"sms\"\n ></lib-link>\n </li>\n <li>\n <lib-link\n href=\"javascript:void(0)\"\n textHtml=\"<strong>Email us</strong>\"\n ariaLabel=\"Email us\"\n leftIcon=\"mail\"\n (linkClick)=\"emailDialog.showModal()\"\n data-testid=\"emailUsBtn\"\n ></lib-link>\n </li>\n </ul>\n </section>\n <section aria-labelledby=\"footerResourcesHeading\">\n <h3 id=\"footerResourcesHeading\">Resources</h3>\n <ul>\n <li>\n <lib-link\n href=\"{{ mainsitebaseurl }}/site-index/\"\n target=\"_blank\"\n text=\"A-Z Site Index\"\n ></lib-link>\n </li>\n <li>\n <lib-link\n href=\"{{ mainsitebaseurl }}/about/policies/\"\n target=\"_blank\"\n text=\"Policies\"\n ></lib-link>\n </li>\n <li>\n <lib-link\n href=\"{{ mainsitebaseurl }}/about/location/\"\n target=\"_blank\"\n text=\"Parking & Directions\"\n ></lib-link>\n </li>\n <li>\n <lib-link\n href=\"https://uac.byu.edu/accessibility-lab\"\n target=\"_blank\"\n text=\"Accessibility Resources\"\n ></lib-link>\n </li>\n <li>\n <lib-link\n href=\"https://hr.lib.byu.edu/byu-library-jobs\"\n target=\"_blank\"\n text=\"Employment Opportunities\"\n ></lib-link>\n </li>\n </ul>\n </section>\n <section aria-labelledby=\"footerFriendsHeading\">\n <h3 id=\"footerFriendsHeading\">Friends in the Library</h3>\n <ul>\n <li>\n <lib-link\n href=\"https://ctl.byu.edu\"\n target=\"_blank\"\n text=\"Center for Teaching and Learning\"\n ></lib-link>\n </li>\n <li>\n <lib-link\n href=\"https://copyright.byu.edu\"\n target=\"_blank\"\n text=\"Copyright Licensing Office\"\n ></lib-link>\n </li>\n <li>\n <lib-link\n href=\"https://facultycenter.byu.edu/aboutus\"\n target=\"_blank\"\n text=\"Faculty Center\"\n ></lib-link>\n </li>\n <li>\n <lib-link\n href=\"https://dining.byu.edu/library-cafe\"\n target=\"_blank\"\n text=\"Library Cafe\"\n ></lib-link>\n </li>\n </ul>\n </section>\n <section aria-labelledby=\"footerConnectHeading\">\n <h3 id=\"footerConnectHeading\">Connect</h3>\n <ul class=\"hbll-footer-social-list\">\n <li>\n <a target=\"_blank\" href=\"https://www.facebook.com/byuhbll\">\n <img\n class=\"hbll-footer-social\"\n src=\"https://media.lib.byu.edu/web-assets/images/1.0.0/facebook-color-round.svg\"\n alt=\"Facebook\"\n title=\"Facebook\"\n />\n </a>\n </li>\n <li>\n <a target=\"_blank\" href=\"https://www.instagram.com/byu_hbll/\">\n <img\n class=\"hbll-footer-social\"\n src=\"https://media.lib.byu.edu/web-assets/images/1.0.0/instagram-color.svg\"\n alt=\"Instagram\"\n title=\"Instagram\"\n />\n </a>\n </li>\n </ul>\n <ul>\n <li>\n <lib-link\n href=\"https://lib.byu.edu/announcements\"\n leftIcon=\"featured_seasonal_and_gifts\"\n text=\"Explore what\u2019s new\"\n ></lib-link>\n </li>\n </ul>\n </section>\n </div>\n <section class=\"hbll-footer-bottom\" aria-label=\"Bottom-most part of the footer\">\n <div class=\"hbll-footer-title\">\n <lib-link\n href=\"https://byu.edu\"\n target=\"_blank\"\n text=\"BRIGHAM YOUNG UNIVERSITY\"\n ></lib-link>\n </div>\n <br />\n PROVO, UT 84602, USA |\n <lib-link href=\"sms:801-422-6061\" text=\"(801) 422-6061\"></lib-link>\n <br />© {{ date | date: 'yyyy' }}\n ALL RIGHTS RESERVED\n <div class=\"hbll-footer-privacy\">\n <lib-link\n href=\"https://privacy.byu.edu/\"\n target=\"_blank\"\n text=\"Privacy Notice\"\n ></lib-link>\n |\n <span id=\"teconsent\"></span>\n </div>\n </section>\n </div>\n <div id=\"consent-banner\"></div>\n</footer>\n\n<dialog\n #emailDialog\n onmousedown=\"event.target === this && this.close()\"\n (close)=\"handleClose()\"\n data-testid=\"dialog\"\n>\n @if (!isEmailSent) {\n <form [formGroup]=\"emailForm\" (submit)=\"sendEmail()\" data-testid=\"form\">\n <div class=\"hbll-footer-email-top\">\n <h1>Email Us</h1>\n <button (click)=\"emailDialog.close()\" type=\"button\" data-testid=\"closeBtn\">\n <span class=\"material-symbols-outlined\"> close </span>\n </button>\n </div>\n <label for=\"hbllFooterEmailName\">Name</label>\n <input\n id=\"hbllFooterEmailName\"\n type=\"text\"\n formControlName=\"name\"\n data-testid=\"emailNameInput\"\n />\n <label for=\"hbllFooterEmailEmail\">\n Email (please provide if you would like a response)</label\n >\n <input\n id=\"hbllFooterEmailEmail\"\n type=\"text\"\n formControlName=\"email\"\n data-testid=\"emailEmailInput\"\n />\n <label for=\"hbllFooterEmailQuestionComment\">\n Question or comment <span class=\"hbll-footer-email-required\">*</span>\n </label>\n <textarea\n id=\"hbllFooterEmailQuestionComment\"\n type=\"text\"\n formControlName=\"message\"\n data-testid=\"emailMessageInput\"\n ></textarea>\n @if (isSubmitted && emailForm.controls.message.invalid) {\n <div\n class=\"hbll-footer-email-required hbll-footer-email-error\"\n data-testid=\"commentError\"\n >\n <span class=\"material-symbols-outlined hbll-footer-email-error-icon\">\n warning\n </span>\n <strong>Please fill out this field</strong>\n </div>\n }\n <label for=\"hbllFooterEmailStatus\">Role</label>\n <span class=\"hbll-footer-select-wrapper\">\n <select\n id=\"hbllFooterEmailStatus\"\n formControlName=\"status\"\n data-testid=\"emailStatusInput\"\n >\n <option selected value=\"\"></option>\n @for (status of userStatuses | slice: 1; track status) {\n <option [value]=\"status\">{{ status }}</option>\n }\n </select>\n </span>\n <div class=\"hbll-footer-email-bottom-bar\">\n @if (hasConnectionError) {\n <p class=\"hbll-footer-connection-error\" data-testid=\"connectionError\">\n <i>There was an error sending your email. Please try again later.</i>\n </p>\n }\n <button\n class=\"pill-btn--components\"\n type=\"submit\"\n [disabled]=\"isLoading\"\n data-testid=\"sendEmailBtn\"\n >\n Send\n </button>\n </div>\n </form>\n } @else {\n <div class=\"hbll-footer-email-success\" data-testid=\"successMessage\">\n <p>\n Your email was sent successfully. If you supplied your email address, we will get\n back to you shortly.<br />Thank you!\n </p>\n <button class=\"pill-btn--components\" (click)=\"emailDialog.close()\" type=\"button\">\n Close\n </button>\n </div>\n }\n</dialog>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&display=swap\";dialog form input,dialog form textarea,dialog form select{appearance:none;font-family:inherit;padding:.38em;border:solid 1px #707070;border-radius:4px;font-size:1em;background-color:#fff}dialog form input:focus,dialog form textarea:focus,dialog form select:focus{outline-color:#3a6093}dialog form .hbll-footer-select-wrapper{position:relative}dialog form .hbll-footer-select-wrapper select{cursor:pointer;padding-right:2em}dialog form .hbll-footer-select-wrapper:after{font-family:Material Symbols Outlined;content:\"arrow_drop_down\";pointer-events:none;top:0;font-size:1.5em;right:.2em;height:100%;position:absolute;display:flex;align-items:center;opacity:70%}.pill-btn--components{background-color:#4070b0;font-size:1em;transition:all .15s;color:#fff;cursor:pointer;font-weight:600;text-align:center}.pill-btn--components:disabled{color:#707070;background-color:#e6e6e6;pointer-events:none}.pill-btn--components:hover{background-color:#6892ca;color:#fff}.destructive.pill-btn--components{background-color:#b04940}.destructive.pill-btn--components:hover{background-color:#c7574d}*{box-sizing:border-box;text-decoration:none;font-size:1em}*:not(.material-symbols-outlined){font-family:inherit}.pill-btn--components{border-radius:100em;padding:.4em 1.3em}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}button{border:none;background-color:transparent;font-size:1em}button :hover{cursor:pointer}.skip-link-footer{position:absolute;top:30px;left:30px}footer{line-height:1.2em;background-color:#e6e6e6}footer a{padding:4px}footer ::ng-deep #consent-banner{z-index:11;position:fixed}footer .hbll-footer-wrapper{display:flex;flex-direction:column;align-items:center;position:relative}footer .hbll-footer-wrapper .hbll-footer-links{max-width:90em;display:flex;align-items:flex-start;justify-content:flex-start;flex-wrap:wrap;padding-bottom:2em;white-space:nowrap}footer .hbll-footer-wrapper .hbll-footer-links strong{font-weight:600}footer .hbll-footer-wrapper .hbll-footer-links address{font-style:normal}footer .hbll-footer-wrapper .hbll-footer-links .hbll-footer-icon{font-size:1.25rem!important;margin-right:.2em;color:#002e5d}footer .hbll-footer-wrapper .hbll-footer-links section{padding:2em 1.8em 0;background-color:#e6e6e6;flex:1}footer .hbll-footer-wrapper .hbll-footer-links .hbll-footer-social-list{display:flex}footer .hbll-footer-wrapper .hbll-footer-links .hbll-footer-social-list a{border-radius:.25rem;display:inline-flex;outline:none}footer .hbll-footer-wrapper .hbll-footer-links .hbll-footer-social-list a:focus-visible{outline:2px solid var(--color-purple-focus, #b967c7);outline-offset:2px}footer .hbll-footer-wrapper .hbll-footer-links .hbll-footer-social-list .hbll-footer-social{height:1.5em;margin-right:1em}footer .hbll-footer-wrapper .hbll-footer-links .hbll-footer-social-list li{margin-bottom:0}footer .hbll-footer-wrapper .hbll-footer-links .social-icon{font-size:20px;padding:2px}footer .hbll-footer-wrapper h3{font-weight:600;color:#002e5d;font-size:1.4em;margin-bottom:1em;margin-top:0}footer .hbll-footer-wrapper ul{list-style:none;margin:.4em 0 0;padding:0}footer .hbll-footer-wrapper ul li{display:flex;align-items:center}footer .hbll-footer-wrapper ul li a,footer .hbll-footer-wrapper ul li button{display:inline-flex;align-items:center;color:#305f9c}footer .hbll-footer-wrapper ul li a:hover,footer .hbll-footer-wrapper ul li button:hover{color:#6892ca}footer .hbll-footer-wrapper ul li:not(:last-of-type){margin-bottom:.6em}footer .hbll-footer-wrapper .hbll-footer-bottom{text-align:center;background-color:#002e5d;color:#fff;font-family:IBM Plex Sans,sans-serif;font-optical-sizing:auto;font-weight:300;font-style:normal;font-size:.9em;line-height:1.6em;padding:1.8em;width:100%}footer .hbll-footer-wrapper .hbll-footer-bottom a{color:#fff}footer .hbll-footer-wrapper .hbll-footer-bottom ::ng-deep lib-link .link{color:#fff}footer .hbll-footer-wrapper .hbll-footer-bottom ::ng-deep lib-link .link:hover,footer .hbll-footer-wrapper .hbll-footer-bottom ::ng-deep lib-link .link:focus-visible{color:#fff}footer .hbll-footer-wrapper .hbll-footer-bottom .hbll-footer-title{font-size:2em;font-weight:400;line-height:1em}footer .hbll-footer-wrapper .hbll-footer-bottom .hbll-footer-privacy{margin-top:.4em;display:flex;align-items:center;justify-content:center;gap:5px}footer .hbll-footer-wrapper .hbll-footer-bottom .hbll-footer-privacy a{text-decoration:underline}footer .hbll-footer-wrapper .hbll-footer-bottom .hbll-footer-privacy ::ng-deep lib-link .link__text{text-decoration:underline}footer .hbll-footer-wrapper .hbll-footer-bottom .hbll-footer-privacy ::ng-deep #teconsent a{color:#fff;text-decoration:underline;padding:4px}footer .hbll-footer-wrapper .hbll-footer-bottom .hbll-footer-privacy ::ng-deep #teconsent a:hover{color:#fff}@media screen and (max-width: 40em){.hbll-footer-links{flex-direction:column;justify-content:flex-start;width:100%}}dialog{border:solid 1px #888;border-radius:4px;width:90%;max-width:50em;padding:0;transition:all 5s ease-in-out}dialog .hbll-footer-email-success,dialog form{padding:1.6em 2em}dialog .hbll-footer-email-success p,dialog form p{text-align:center;line-height:1.4em}dialog .hbll-footer-email-success{display:flex;justify-content:center;align-items:center;flex-direction:column}dialog .hbll-footer-email-success button{margin-top:1em}dialog form{display:flex;flex-direction:column;position:relative}dialog form textarea{min-height:100px;resize:vertical}dialog form input,dialog form textarea,dialog form .hbll-footer-select-wrapper{margin-bottom:.6em}dialog form .hbll-footer-email-bottom-bar{display:flex;align-items:center;justify-content:flex-end}dialog form .hbll-footer-email-bottom-bar .hbll-footer-connection-error{text-align:right;flex-grow:1;margin:0 1em 0 0}dialog form label{margin-bottom:.4em;margin-top:.4em}dialog form .hbll-footer-email-error{display:flex;justify-content:center;align-items:center;margin-right:auto;margin-bottom:.6em;font-size:.8em}dialog form .hbll-footer-email-error .hbll-footer-email-error-icon{font-size:1.2em;margin-right:.2em}dialog form .hbll-footer-email-top{width:100%;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;align-items:center;margin-bottom:1em}dialog form .hbll-footer-email-top h1{font-size:1.4em;margin:0}dialog form .hbll-footer-email-required-message{float:right}dialog form .hbll-footer-select-wrapper{margin-right:auto}dialog form .hbll-footer-email-required{color:#d03a3a}dialog form button:not([type=submit]){color:#333}dialog form button:not([type=submit]):hover{color:#696969}dialog form button[type=submit]{margin-left:auto}dialog::backdrop{background-color:#000;opacity:.75}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ButtonComponent, selector: "lib-button", inputs: ["buttonType", "title", "iconBefore", "iconAfter", "disabled", "isThin", "ariaLabel", "minWidth", "pill", "color"], outputs: ["buttonClick"] }, { kind: "component", type: LinkComponent, selector: "lib-link", inputs: ["text", "textHtml", "imageSrc", "imageAlt", "imageTitle", "imageClass", "href", "target", "rel", "type", "state", "disabled", "leftIcon", "rightIcon", "ariaLabel"], outputs: ["linkClick"] }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "pipe", type: i1.DatePipe, name: "date" }] }); }
|
|
884
1126
|
}
|
|
885
1127
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HbllFooterComponent, decorators: [{
|
|
886
1128
|
type: Component,
|
|
887
|
-
args: [{ selector: 'lib-hbll-footer', imports: [CommonModule, ReactiveFormsModule], template: "<footer>\n <div class=\"hbll-footer-wrapper\">\n <button class=\"skip-link-footer\" (click)=\"skipFooter()\">Skip footer</button>\n <div class=\"hbll-footer-links\">\n <section aria-labelledby=\"footerContactHeading\">\n <h3 id=\"footerContactHeading\">Contact</h3>\n <ul>\n <li>\n <address>\n P.O. Box 26800<br />\n Provo, UT 84602-6800\n </address>\n </li>\n <li>\n <a href=\"tel:801-422-6061\">\n <span class=\"material-symbols-outlined hbll-footer-icon\">\n phone_in_talk </span\n > <strong>Call</strong> (801) 422-6061\n </a>\n </li>\n <li>\n <a href=\"sms:801-623-6838\">\n <span class=\"material-symbols-outlined hbll-footer-icon\"> sms </span\n > <strong>Text</strong> (801) 623-6838\n </a>\n </li>\n <li>\n <button\n (click)=\"emailDialog.showModal()\"\n data-testid=\"emailUsBtn\"\n style=\"padding: 4px\"\n >\n <span class=\"material-symbols-outlined hbll-footer-icon\"> mail </span\n > \n <strong>Email us</strong>\n </button>\n </li>\n </ul>\n </section>\n <section aria-labelledby=\"footerResourcesHeading\">\n <h3 id=\"footerResourcesHeading\">Resources</h3>\n <ul>\n <li>\n <a target=\"_blank\" href=\"{{ mainsitebaseurl }}/site-index/\"\n >A-Z Site Index</a\n >\n </li>\n <li>\n <a target=\"_blank\" href=\"{{ mainsitebaseurl }}/about/policies/\">Policies</a>\n </li>\n <li>\n <a target=\"_blank\" href=\"{{ mainsitebaseurl }}/about/location/\"\n >Parking & Directions</a\n >\n </li>\n <li>\n <a target=\"_blank\" href=\"https://uac.byu.edu/accessibility-lab\"\n >Accessibility Resources</a\n >\n </li>\n <li>\n <a target=\"_blank\" href=\"https://hr.lib.byu.edu/byu-library-jobs\"\n >Employment Opportunities</a\n >\n </li>\n </ul>\n </section>\n <section aria-labelledby=\"footerFriendsHeading\">\n <h3 id=\"footerFriendsHeading\">Friends in the Library</h3>\n <ul>\n <li>\n <a target=\"_blank\" href=\"https://ctl.byu.edu\"\n >Center for Teaching and Learning</a\n >\n </li>\n <li>\n <a target=\"_blank\" href=\"https://copyright.byu.edu\"\n >Copyright Licensing Office</a\n >\n </li>\n <li>\n <a target=\"_blank\" href=\"https://facultycenter.byu.edu/aboutus\"\n >Faculty Center</a\n >\n </li>\n <li>\n <a target=\"_blank\" href=\"https://dining.byu.edu/library-cafe\"\n >Library Cafe</a\n >\n </li>\n </ul>\n </section>\n <section aria-labelledby=\"footerConnectHeading\">\n <h3 id=\"footerConnectHeading\">Connect</h3>\n <ul class=\"hbll-footer-social-list\">\n <li>\n <a target=\"_blank\" href=\"https://www.facebook.com/byuhbll\">\n <img\n class=\"hbll-footer-social\"\n src=\"https://media.lib.byu.edu/web-assets/images/1.0.0/facebook-color-round.svg\"\n alt=\"Facebook\"\n title=\"Facebook\"\n />\n </a>\n </li>\n <li>\n <a target=\"_blank\" href=\"https://www.instagram.com/byu_hbll/\">\n <img\n class=\"hbll-footer-social\"\n src=\"https://media.lib.byu.edu/web-assets/images/1.0.0/instagram-color.svg\"\n alt=\"Instagram\"\n title=\"Instagram\"\n />\n </a>\n </li>\n </ul>\n <ul>\n <li>\n <a href=\"https://lib.byu.edu/announcements\"\n ><span class=\"material-symbols-outlined social-icon\"> featured_seasonal_and_gifts</span\n > Explore what\u2019s new\n </a>\n </li>\n </ul>\n </section>\n </div>\n <section class=\"hbll-footer-bottom\" aria-label=\"Bottom-most part of the footer\">\n <div class=\"hbll-footer-title\">\n <a href=\"https://byu.edu\" target=\"_blank\">BRIGHAM YOUNG UNIVERSITY</a>\n </div>\n <br />\n PROVO, UT 84602, USA | <a href=\"sms:801-422-6061\">(801) 422-6061</a>\n <br />© {{ date | date: 'yyyy' }}\n ALL RIGHTS RESERVED\n <div class=\"hbll-footer-privacy\">\n <a href=\"https://privacy.byu.edu/\" target=\"_blank\">Privacy Notice</a>\n |\n <span id=\"teconsent\"></span>\n </div>\n </section>\n </div>\n <div id=\"consent-banner\"></div>\n</footer>\n\n<dialog\n #emailDialog\n onmousedown=\"event.target === this && this.close()\"\n (close)=\"handleClose()\"\n data-testid=\"dialog\"\n>\n @if (!isEmailSent) {\n <form [formGroup]=\"emailForm\" (submit)=\"sendEmail()\" data-testid=\"form\">\n <div class=\"hbll-footer-email-top\">\n <h1>Email Us</h1>\n <button (click)=\"emailDialog.close()\" type=\"button\" data-testid=\"closeBtn\">\n <span class=\"material-symbols-outlined\"> close </span>\n </button>\n </div>\n <label for=\"hbllFooterEmailName\">Name</label>\n <input\n id=\"hbllFooterEmailName\"\n type=\"text\"\n formControlName=\"name\"\n data-testid=\"emailNameInput\"\n />\n <label for=\"hbllFooterEmailEmail\">\n Email (please provide if you would like a response)</label\n >\n <input\n id=\"hbllFooterEmailEmail\"\n type=\"text\"\n formControlName=\"email\"\n data-testid=\"emailEmailInput\"\n />\n <label for=\"hbllFooterEmailQuestionComment\">\n Question or comment <span class=\"hbll-footer-email-required\">*</span>\n </label>\n <textarea\n id=\"hbllFooterEmailQuestionComment\"\n type=\"text\"\n formControlName=\"message\"\n data-testid=\"emailMessageInput\"\n ></textarea>\n @if (isSubmitted && emailForm.controls.message.invalid) {\n <div\n class=\"hbll-footer-email-required hbll-footer-email-error\"\n data-testid=\"commentError\"\n >\n <span class=\"material-symbols-outlined hbll-footer-email-error-icon\">\n warning\n </span>\n <strong>Please fill out this field</strong>\n </div>\n }\n <label for=\"hbllFooterEmailStatus\">Role</label>\n <span class=\"hbll-footer-select-wrapper\">\n <select\n id=\"hbllFooterEmailStatus\"\n formControlName=\"status\"\n data-testid=\"emailStatusInput\"\n >\n <option selected value=\"\"></option>\n @for (status of userStatuses | slice: 1; track status) {\n <option [value]=\"status\">{{ status }}</option>\n }\n </select>\n </span>\n <div class=\"hbll-footer-email-bottom-bar\">\n @if (hasConnectionError) {\n <p class=\"hbll-footer-connection-error\" data-testid=\"connectionError\">\n <i>There was an error sending your email. Please try again later.</i>\n </p>\n }\n <button\n class=\"pill-btn--components\"\n type=\"submit\"\n [disabled]=\"isLoading\"\n data-testid=\"sendEmailBtn\"\n >\n Send\n </button>\n </div>\n </form>\n } @else {\n <div class=\"hbll-footer-email-success\" data-testid=\"successMessage\">\n <p>\n Your email was sent successfully. If you supplied your email address, we will get\n back to you shortly.<br />Thank you!\n </p>\n <button class=\"pill-btn--components\" (click)=\"emailDialog.close()\" type=\"button\">\n Close\n </button>\n </div>\n }\n</dialog>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&display=swap\";dialog form input,dialog form textarea,dialog form select{appearance:none;font-family:inherit;padding:.38em;border:solid 1px #707070;border-radius:4px;font-size:1em;background-color:#fff}dialog form input:focus,dialog form textarea:focus,dialog form select:focus{outline-color:#3a6093}dialog form .hbll-footer-select-wrapper{position:relative}dialog form .hbll-footer-select-wrapper select{cursor:pointer;padding-right:2em}dialog form .hbll-footer-select-wrapper:after{font-family:Material Symbols Outlined;content:\"arrow_drop_down\";pointer-events:none;top:0;font-size:1.5em;right:.2em;height:100%;position:absolute;display:flex;align-items:center;opacity:70%}.pill-btn--components{background-color:#4070b0;font-size:1em;transition:all .15s;color:#fff;cursor:pointer;font-weight:600;text-align:center}.pill-btn--components:disabled{color:#707070;background-color:#e6e6e6;pointer-events:none}.pill-btn--components:hover{background-color:#6892ca;color:#fff}.destructive.pill-btn--components{background-color:#b04940}.destructive.pill-btn--components:hover{background-color:#c7574d}*{box-sizing:border-box;text-decoration:none;font-size:1em}*:not(.material-symbols-outlined){font-family:inherit}.pill-btn--components{border-radius:100em;padding:.4em 1.3em}button{border:none;background-color:transparent;font-size:1em}button :hover{cursor:pointer}.skip-link-footer{position:absolute;top:30px;left:30px;background:#fff;color:#00285b;font-size:1em;font-weight:580;padding:8px 16px;border:3px solid #0050b7;border-radius:4px;cursor:pointer;z-index:10;opacity:0;pointer-events:none;transition:opacity .2s ease,transform .2s ease}.skip-link-footer:focus{opacity:1;pointer-events:auto;transform:none}.skip-link-footer:hover{color:#00285b;background-color:#e3edf8;border-color:#e3edf8}footer{line-height:1.2em;background-color:#e6e6e6}footer a{padding:4px}footer ::ng-deep #consent-banner{z-index:11;position:fixed}footer .hbll-footer-wrapper{display:flex;flex-direction:column;align-items:center;position:relative}footer .hbll-footer-wrapper .hbll-footer-links{max-width:90em;display:flex;align-items:flex-start;justify-content:flex-start;flex-wrap:wrap;padding-bottom:2em;white-space:nowrap}footer .hbll-footer-wrapper .hbll-footer-links strong{font-weight:600}footer .hbll-footer-wrapper .hbll-footer-links address{font-style:normal}footer .hbll-footer-wrapper .hbll-footer-links .hbll-footer-icon{font-size:1.25rem!important;margin-right:.2em;color:#002e5d}footer .hbll-footer-wrapper .hbll-footer-links section{padding:2em 1.8em 0;background-color:#e6e6e6;flex:1}footer .hbll-footer-wrapper .hbll-footer-links .hbll-footer-social-list{display:flex}footer .hbll-footer-wrapper .hbll-footer-links .hbll-footer-social-list .hbll-footer-social{height:1.5em;margin-right:1em}footer .hbll-footer-wrapper .hbll-footer-links .hbll-footer-social-list li{margin-bottom:0}footer .hbll-footer-wrapper .hbll-footer-links .social-icon{font-size:20px;padding:2px}footer .hbll-footer-wrapper h3{font-weight:600;color:#002e5d;font-size:1.4em;margin-bottom:1em;margin-top:0}footer .hbll-footer-wrapper ul{list-style:none;margin:.4em 0 0;padding:0}footer .hbll-footer-wrapper ul li{display:flex;align-items:center}footer .hbll-footer-wrapper ul li a,footer .hbll-footer-wrapper ul li button{display:inline-flex;align-items:center;color:#305f9c}footer .hbll-footer-wrapper ul li a:hover,footer .hbll-footer-wrapper ul li button:hover{color:#6892ca}footer .hbll-footer-wrapper ul li:not(:last-of-type){margin-bottom:.6em}footer .hbll-footer-wrapper .hbll-footer-bottom{text-align:center;background-color:#002e5d;color:#fff;font-family:IBM Plex Sans,sans-serif;font-optical-sizing:auto;font-weight:300;font-style:normal;font-size:.9em;line-height:1.6em;padding:1.8em;width:100%}footer .hbll-footer-wrapper .hbll-footer-bottom a{color:#fff}footer .hbll-footer-wrapper .hbll-footer-bottom .hbll-footer-title{font-size:2em;font-weight:400;line-height:1em}footer .hbll-footer-wrapper .hbll-footer-bottom .hbll-footer-privacy{margin-top:.4em;display:flex;align-items:center;justify-content:center;gap:5px}footer .hbll-footer-wrapper .hbll-footer-bottom .hbll-footer-privacy a{text-decoration:underline}footer .hbll-footer-wrapper .hbll-footer-bottom .hbll-footer-privacy ::ng-deep #teconsent a{color:#fff;text-decoration:underline;padding:4px}footer .hbll-footer-wrapper .hbll-footer-bottom .hbll-footer-privacy ::ng-deep #teconsent a:hover{color:#fff}@media screen and (max-width: 40em){.hbll-footer-links{flex-direction:column;justify-content:flex-start;width:100%}}dialog{border:solid 1px #888;border-radius:4px;width:90%;max-width:50em;padding:0;transition:all 5s ease-in-out}dialog .hbll-footer-email-success,dialog form{padding:1.6em 2em}dialog .hbll-footer-email-success p,dialog form p{text-align:center;line-height:1.4em}dialog .hbll-footer-email-success{display:flex;justify-content:center;align-items:center;flex-direction:column}dialog .hbll-footer-email-success button{margin-top:1em}dialog form{display:flex;flex-direction:column;position:relative}dialog form textarea{min-height:100px;resize:vertical}dialog form input,dialog form textarea,dialog form .hbll-footer-select-wrapper{margin-bottom:.6em}dialog form .hbll-footer-email-bottom-bar{display:flex;align-items:center;justify-content:flex-end}dialog form .hbll-footer-email-bottom-bar .hbll-footer-connection-error{text-align:right;flex-grow:1;margin:0 1em 0 0}dialog form label{margin-bottom:.4em;margin-top:.4em}dialog form .hbll-footer-email-error{display:flex;justify-content:center;align-items:center;margin-right:auto;margin-bottom:.6em;font-size:.8em}dialog form .hbll-footer-email-error .hbll-footer-email-error-icon{font-size:1.2em;margin-right:.2em}dialog form .hbll-footer-email-top{width:100%;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;align-items:center;margin-bottom:1em}dialog form .hbll-footer-email-top h1{font-size:1.4em;margin:0}dialog form .hbll-footer-email-required-message{float:right}dialog form .hbll-footer-select-wrapper{margin-right:auto}dialog form .hbll-footer-email-required{color:#d03a3a}dialog form button:not([type=submit]){color:#333}dialog form button:not([type=submit]):hover{color:#696969}dialog form button[type=submit]{margin-left:auto}dialog::backdrop{background-color:#000;opacity:.75}\n"] }]
|
|
1129
|
+
args: [{ selector: 'lib-hbll-footer', imports: [CommonModule, ReactiveFormsModule, ButtonComponent, LinkComponent], template: "<footer>\n <div class=\"hbll-footer-wrapper\">\n <div class=\"skip-link-footer\">\n <lib-button\n class=\"skip-link-footer sr-only sr-only-focusable\"\n buttonType=\"secondary\"\n [isThin]=\"true\"\n title=\"Skip footer\"\n (buttonClick)=\"skipFooter()\"\n ></lib-button>\n </div>\n <div class=\"hbll-footer-links\">\n <section aria-labelledby=\"footerContactHeading\">\n <h3 id=\"footerContactHeading\">Contact</h3>\n <ul>\n <li>\n <address>\n P.O. Box 26800<br />\n Provo, UT 84602-6800\n </address>\n </li>\n <li>\n <lib-link\n href=\"tel:801-422-6061\"\n textHtml=\"<strong>Call</strong> (801) 422-6061\"\n ariaLabel=\"Call (801) 422-6061\"\n leftIcon=\"phone_in_talk\"\n >\n </lib-link>\n </li>\n <li>\n <lib-link\n href=\"sms:801-623-6838\"\n textHtml=\"<strong>Text</strong> (801) 623-6838\"\n ariaLabel=\"Text (801) 623-6838\"\n leftIcon=\"sms\"\n ></lib-link>\n </li>\n <li>\n <lib-link\n href=\"javascript:void(0)\"\n textHtml=\"<strong>Email us</strong>\"\n ariaLabel=\"Email us\"\n leftIcon=\"mail\"\n (linkClick)=\"emailDialog.showModal()\"\n data-testid=\"emailUsBtn\"\n ></lib-link>\n </li>\n </ul>\n </section>\n <section aria-labelledby=\"footerResourcesHeading\">\n <h3 id=\"footerResourcesHeading\">Resources</h3>\n <ul>\n <li>\n <lib-link\n href=\"{{ mainsitebaseurl }}/site-index/\"\n target=\"_blank\"\n text=\"A-Z Site Index\"\n ></lib-link>\n </li>\n <li>\n <lib-link\n href=\"{{ mainsitebaseurl }}/about/policies/\"\n target=\"_blank\"\n text=\"Policies\"\n ></lib-link>\n </li>\n <li>\n <lib-link\n href=\"{{ mainsitebaseurl }}/about/location/\"\n target=\"_blank\"\n text=\"Parking & Directions\"\n ></lib-link>\n </li>\n <li>\n <lib-link\n href=\"https://uac.byu.edu/accessibility-lab\"\n target=\"_blank\"\n text=\"Accessibility Resources\"\n ></lib-link>\n </li>\n <li>\n <lib-link\n href=\"https://hr.lib.byu.edu/byu-library-jobs\"\n target=\"_blank\"\n text=\"Employment Opportunities\"\n ></lib-link>\n </li>\n </ul>\n </section>\n <section aria-labelledby=\"footerFriendsHeading\">\n <h3 id=\"footerFriendsHeading\">Friends in the Library</h3>\n <ul>\n <li>\n <lib-link\n href=\"https://ctl.byu.edu\"\n target=\"_blank\"\n text=\"Center for Teaching and Learning\"\n ></lib-link>\n </li>\n <li>\n <lib-link\n href=\"https://copyright.byu.edu\"\n target=\"_blank\"\n text=\"Copyright Licensing Office\"\n ></lib-link>\n </li>\n <li>\n <lib-link\n href=\"https://facultycenter.byu.edu/aboutus\"\n target=\"_blank\"\n text=\"Faculty Center\"\n ></lib-link>\n </li>\n <li>\n <lib-link\n href=\"https://dining.byu.edu/library-cafe\"\n target=\"_blank\"\n text=\"Library Cafe\"\n ></lib-link>\n </li>\n </ul>\n </section>\n <section aria-labelledby=\"footerConnectHeading\">\n <h3 id=\"footerConnectHeading\">Connect</h3>\n <ul class=\"hbll-footer-social-list\">\n <li>\n <a target=\"_blank\" href=\"https://www.facebook.com/byuhbll\">\n <img\n class=\"hbll-footer-social\"\n src=\"https://media.lib.byu.edu/web-assets/images/1.0.0/facebook-color-round.svg\"\n alt=\"Facebook\"\n title=\"Facebook\"\n />\n </a>\n </li>\n <li>\n <a target=\"_blank\" href=\"https://www.instagram.com/byu_hbll/\">\n <img\n class=\"hbll-footer-social\"\n src=\"https://media.lib.byu.edu/web-assets/images/1.0.0/instagram-color.svg\"\n alt=\"Instagram\"\n title=\"Instagram\"\n />\n </a>\n </li>\n </ul>\n <ul>\n <li>\n <lib-link\n href=\"https://lib.byu.edu/announcements\"\n leftIcon=\"featured_seasonal_and_gifts\"\n text=\"Explore what\u2019s new\"\n ></lib-link>\n </li>\n </ul>\n </section>\n </div>\n <section class=\"hbll-footer-bottom\" aria-label=\"Bottom-most part of the footer\">\n <div class=\"hbll-footer-title\">\n <lib-link\n href=\"https://byu.edu\"\n target=\"_blank\"\n text=\"BRIGHAM YOUNG UNIVERSITY\"\n ></lib-link>\n </div>\n <br />\n PROVO, UT 84602, USA |\n <lib-link href=\"sms:801-422-6061\" text=\"(801) 422-6061\"></lib-link>\n <br />© {{ date | date: 'yyyy' }}\n ALL RIGHTS RESERVED\n <div class=\"hbll-footer-privacy\">\n <lib-link\n href=\"https://privacy.byu.edu/\"\n target=\"_blank\"\n text=\"Privacy Notice\"\n ></lib-link>\n |\n <span id=\"teconsent\"></span>\n </div>\n </section>\n </div>\n <div id=\"consent-banner\"></div>\n</footer>\n\n<dialog\n #emailDialog\n onmousedown=\"event.target === this && this.close()\"\n (close)=\"handleClose()\"\n data-testid=\"dialog\"\n>\n @if (!isEmailSent) {\n <form [formGroup]=\"emailForm\" (submit)=\"sendEmail()\" data-testid=\"form\">\n <div class=\"hbll-footer-email-top\">\n <h1>Email Us</h1>\n <button (click)=\"emailDialog.close()\" type=\"button\" data-testid=\"closeBtn\">\n <span class=\"material-symbols-outlined\"> close </span>\n </button>\n </div>\n <label for=\"hbllFooterEmailName\">Name</label>\n <input\n id=\"hbllFooterEmailName\"\n type=\"text\"\n formControlName=\"name\"\n data-testid=\"emailNameInput\"\n />\n <label for=\"hbllFooterEmailEmail\">\n Email (please provide if you would like a response)</label\n >\n <input\n id=\"hbllFooterEmailEmail\"\n type=\"text\"\n formControlName=\"email\"\n data-testid=\"emailEmailInput\"\n />\n <label for=\"hbllFooterEmailQuestionComment\">\n Question or comment <span class=\"hbll-footer-email-required\">*</span>\n </label>\n <textarea\n id=\"hbllFooterEmailQuestionComment\"\n type=\"text\"\n formControlName=\"message\"\n data-testid=\"emailMessageInput\"\n ></textarea>\n @if (isSubmitted && emailForm.controls.message.invalid) {\n <div\n class=\"hbll-footer-email-required hbll-footer-email-error\"\n data-testid=\"commentError\"\n >\n <span class=\"material-symbols-outlined hbll-footer-email-error-icon\">\n warning\n </span>\n <strong>Please fill out this field</strong>\n </div>\n }\n <label for=\"hbllFooterEmailStatus\">Role</label>\n <span class=\"hbll-footer-select-wrapper\">\n <select\n id=\"hbllFooterEmailStatus\"\n formControlName=\"status\"\n data-testid=\"emailStatusInput\"\n >\n <option selected value=\"\"></option>\n @for (status of userStatuses | slice: 1; track status) {\n <option [value]=\"status\">{{ status }}</option>\n }\n </select>\n </span>\n <div class=\"hbll-footer-email-bottom-bar\">\n @if (hasConnectionError) {\n <p class=\"hbll-footer-connection-error\" data-testid=\"connectionError\">\n <i>There was an error sending your email. Please try again later.</i>\n </p>\n }\n <button\n class=\"pill-btn--components\"\n type=\"submit\"\n [disabled]=\"isLoading\"\n data-testid=\"sendEmailBtn\"\n >\n Send\n </button>\n </div>\n </form>\n } @else {\n <div class=\"hbll-footer-email-success\" data-testid=\"successMessage\">\n <p>\n Your email was sent successfully. If you supplied your email address, we will get\n back to you shortly.<br />Thank you!\n </p>\n <button class=\"pill-btn--components\" (click)=\"emailDialog.close()\" type=\"button\">\n Close\n </button>\n </div>\n }\n</dialog>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&display=swap\";dialog form input,dialog form textarea,dialog form select{appearance:none;font-family:inherit;padding:.38em;border:solid 1px #707070;border-radius:4px;font-size:1em;background-color:#fff}dialog form input:focus,dialog form textarea:focus,dialog form select:focus{outline-color:#3a6093}dialog form .hbll-footer-select-wrapper{position:relative}dialog form .hbll-footer-select-wrapper select{cursor:pointer;padding-right:2em}dialog form .hbll-footer-select-wrapper:after{font-family:Material Symbols Outlined;content:\"arrow_drop_down\";pointer-events:none;top:0;font-size:1.5em;right:.2em;height:100%;position:absolute;display:flex;align-items:center;opacity:70%}.pill-btn--components{background-color:#4070b0;font-size:1em;transition:all .15s;color:#fff;cursor:pointer;font-weight:600;text-align:center}.pill-btn--components:disabled{color:#707070;background-color:#e6e6e6;pointer-events:none}.pill-btn--components:hover{background-color:#6892ca;color:#fff}.destructive.pill-btn--components{background-color:#b04940}.destructive.pill-btn--components:hover{background-color:#c7574d}*{box-sizing:border-box;text-decoration:none;font-size:1em}*:not(.material-symbols-outlined){font-family:inherit}.pill-btn--components{border-radius:100em;padding:.4em 1.3em}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}button{border:none;background-color:transparent;font-size:1em}button :hover{cursor:pointer}.skip-link-footer{position:absolute;top:30px;left:30px}footer{line-height:1.2em;background-color:#e6e6e6}footer a{padding:4px}footer ::ng-deep #consent-banner{z-index:11;position:fixed}footer .hbll-footer-wrapper{display:flex;flex-direction:column;align-items:center;position:relative}footer .hbll-footer-wrapper .hbll-footer-links{max-width:90em;display:flex;align-items:flex-start;justify-content:flex-start;flex-wrap:wrap;padding-bottom:2em;white-space:nowrap}footer .hbll-footer-wrapper .hbll-footer-links strong{font-weight:600}footer .hbll-footer-wrapper .hbll-footer-links address{font-style:normal}footer .hbll-footer-wrapper .hbll-footer-links .hbll-footer-icon{font-size:1.25rem!important;margin-right:.2em;color:#002e5d}footer .hbll-footer-wrapper .hbll-footer-links section{padding:2em 1.8em 0;background-color:#e6e6e6;flex:1}footer .hbll-footer-wrapper .hbll-footer-links .hbll-footer-social-list{display:flex}footer .hbll-footer-wrapper .hbll-footer-links .hbll-footer-social-list a{border-radius:.25rem;display:inline-flex;outline:none}footer .hbll-footer-wrapper .hbll-footer-links .hbll-footer-social-list a:focus-visible{outline:2px solid var(--color-purple-focus, #b967c7);outline-offset:2px}footer .hbll-footer-wrapper .hbll-footer-links .hbll-footer-social-list .hbll-footer-social{height:1.5em;margin-right:1em}footer .hbll-footer-wrapper .hbll-footer-links .hbll-footer-social-list li{margin-bottom:0}footer .hbll-footer-wrapper .hbll-footer-links .social-icon{font-size:20px;padding:2px}footer .hbll-footer-wrapper h3{font-weight:600;color:#002e5d;font-size:1.4em;margin-bottom:1em;margin-top:0}footer .hbll-footer-wrapper ul{list-style:none;margin:.4em 0 0;padding:0}footer .hbll-footer-wrapper ul li{display:flex;align-items:center}footer .hbll-footer-wrapper ul li a,footer .hbll-footer-wrapper ul li button{display:inline-flex;align-items:center;color:#305f9c}footer .hbll-footer-wrapper ul li a:hover,footer .hbll-footer-wrapper ul li button:hover{color:#6892ca}footer .hbll-footer-wrapper ul li:not(:last-of-type){margin-bottom:.6em}footer .hbll-footer-wrapper .hbll-footer-bottom{text-align:center;background-color:#002e5d;color:#fff;font-family:IBM Plex Sans,sans-serif;font-optical-sizing:auto;font-weight:300;font-style:normal;font-size:.9em;line-height:1.6em;padding:1.8em;width:100%}footer .hbll-footer-wrapper .hbll-footer-bottom a{color:#fff}footer .hbll-footer-wrapper .hbll-footer-bottom ::ng-deep lib-link .link{color:#fff}footer .hbll-footer-wrapper .hbll-footer-bottom ::ng-deep lib-link .link:hover,footer .hbll-footer-wrapper .hbll-footer-bottom ::ng-deep lib-link .link:focus-visible{color:#fff}footer .hbll-footer-wrapper .hbll-footer-bottom .hbll-footer-title{font-size:2em;font-weight:400;line-height:1em}footer .hbll-footer-wrapper .hbll-footer-bottom .hbll-footer-privacy{margin-top:.4em;display:flex;align-items:center;justify-content:center;gap:5px}footer .hbll-footer-wrapper .hbll-footer-bottom .hbll-footer-privacy a{text-decoration:underline}footer .hbll-footer-wrapper .hbll-footer-bottom .hbll-footer-privacy ::ng-deep lib-link .link__text{text-decoration:underline}footer .hbll-footer-wrapper .hbll-footer-bottom .hbll-footer-privacy ::ng-deep #teconsent a{color:#fff;text-decoration:underline;padding:4px}footer .hbll-footer-wrapper .hbll-footer-bottom .hbll-footer-privacy ::ng-deep #teconsent a:hover{color:#fff}@media screen and (max-width: 40em){.hbll-footer-links{flex-direction:column;justify-content:flex-start;width:100%}}dialog{border:solid 1px #888;border-radius:4px;width:90%;max-width:50em;padding:0;transition:all 5s ease-in-out}dialog .hbll-footer-email-success,dialog form{padding:1.6em 2em}dialog .hbll-footer-email-success p,dialog form p{text-align:center;line-height:1.4em}dialog .hbll-footer-email-success{display:flex;justify-content:center;align-items:center;flex-direction:column}dialog .hbll-footer-email-success button{margin-top:1em}dialog form{display:flex;flex-direction:column;position:relative}dialog form textarea{min-height:100px;resize:vertical}dialog form input,dialog form textarea,dialog form .hbll-footer-select-wrapper{margin-bottom:.6em}dialog form .hbll-footer-email-bottom-bar{display:flex;align-items:center;justify-content:flex-end}dialog form .hbll-footer-email-bottom-bar .hbll-footer-connection-error{text-align:right;flex-grow:1;margin:0 1em 0 0}dialog form label{margin-bottom:.4em;margin-top:.4em}dialog form .hbll-footer-email-error{display:flex;justify-content:center;align-items:center;margin-right:auto;margin-bottom:.6em;font-size:.8em}dialog form .hbll-footer-email-error .hbll-footer-email-error-icon{font-size:1.2em;margin-right:.2em}dialog form .hbll-footer-email-top{width:100%;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;align-items:center;margin-bottom:1em}dialog form .hbll-footer-email-top h1{font-size:1.4em;margin:0}dialog form .hbll-footer-email-required-message{float:right}dialog form .hbll-footer-select-wrapper{margin-right:auto}dialog form .hbll-footer-email-required{color:#d03a3a}dialog form button:not([type=submit]){color:#333}dialog form button:not([type=submit]):hover{color:#696969}dialog form button[type=submit]{margin-left:auto}dialog::backdrop{background-color:#000;opacity:.75}\n"] }]
|
|
888
1130
|
}], propDecorators: { emailDialog: [{
|
|
889
1131
|
type: ViewChild,
|
|
890
1132
|
args: ['emailDialog']
|
|
@@ -1717,17 +1959,104 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
1717
1959
|
type: Output
|
|
1718
1960
|
}] } });
|
|
1719
1961
|
|
|
1720
|
-
|
|
1962
|
+
/**
|
|
1963
|
+
* A flexible, reusable checkbox component that supports multiple states (error, disabled, indeterminate, default, and checked)
|
|
1964
|
+
*
|
|
1965
|
+
* @example
|
|
1966
|
+
* ```html
|
|
1967
|
+
* <!-- Default checkbox with label (toggleable) -->
|
|
1968
|
+
* <lib-label text="Normal Checkbox 1" [for]="'checkbox1'"></lib-label>
|
|
1969
|
+
* <lib-checkbox
|
|
1970
|
+
* inputId="checkbox1"
|
|
1971
|
+
* [isChecked]="normalInfo()"
|
|
1972
|
+
* (checkedChange)="normalInfo.set($event)"
|
|
1973
|
+
* ></lib-checkbox>
|
|
1974
|
+
*
|
|
1975
|
+
* <!-- Disabled checkbox checked -->
|
|
1976
|
+
* <lib-label text="Disabled Checked" [for]="'disabled-checkbox'"></lib-label>
|
|
1977
|
+
* <lib-checkbox
|
|
1978
|
+
* inputId="disabled-checkbox"
|
|
1979
|
+
* [isChecked]="true"
|
|
1980
|
+
* [disabled]="true"
|
|
1981
|
+
* ></lib-checkbox>
|
|
1982
|
+
*
|
|
1983
|
+
* <!-- Small checkbox toggleable -->
|
|
1984
|
+
* <lib-label text="Small Checkbox 1" [for]="'small-checkbox'"></lib-label>
|
|
1985
|
+
* <lib-checkbox
|
|
1986
|
+
* inputId="small-checkbox"
|
|
1987
|
+
* [isChecked]="smallInfo()"
|
|
1988
|
+
* (checkedChange)="smallInfo.set($event)"
|
|
1989
|
+
* [isSmall]="true"
|
|
1990
|
+
* ></lib-checkbox>
|
|
1991
|
+
*
|
|
1992
|
+
* <!-- Error checkbox toggleable -->
|
|
1993
|
+
* <lib-label text="Error Checkbox 1" [for]="'error-checkbox'"></lib-label>
|
|
1994
|
+
* <lib-checkbox
|
|
1995
|
+
* inputId="error-checkbox"
|
|
1996
|
+
* [isChecked]="errorInfo()"
|
|
1997
|
+
* (checkedChange)="errorInfo.set($event)"
|
|
1998
|
+
* [isError]="true"
|
|
1999
|
+
* ></lib-checkbox>
|
|
2000
|
+
*
|
|
2001
|
+
* <!-- Indeterminate parent with children example -->
|
|
2002
|
+
* <div style="display: flex; flex-direction: column; gap: 8px;">
|
|
2003
|
+
* <!-- Parent -->
|
|
2004
|
+
* <div style="display: flex; align-items: center; gap: 8px">
|
|
2005
|
+
* <lib-label text="Select All" [for]="'parent-checkbox'"></lib-label>
|
|
2006
|
+
* <lib-checkbox
|
|
2007
|
+
* inputId="parent-checkbox"
|
|
2008
|
+
* [isChecked]="parentChecked()"
|
|
2009
|
+
* [isIndeterminate]="parentIndeterminate()"
|
|
2010
|
+
* (checkedChange)="toggleParent($event)"
|
|
2011
|
+
* ></lib-checkbox>
|
|
2012
|
+
* </div>
|
|
2013
|
+
* <!-- Children -->
|
|
2014
|
+
* <div style="margin-left: 24px;">
|
|
2015
|
+
* <lib-label text="Option 1" [for]="'child-1'"></lib-label>
|
|
2016
|
+
* <lib-checkbox
|
|
2017
|
+
* inputId="child-1"
|
|
2018
|
+
* [isChecked]="child1()"
|
|
2019
|
+
* (checkedChange)="child1.set($event)"
|
|
2020
|
+
* ></lib-checkbox>
|
|
2021
|
+
* </div>
|
|
2022
|
+
* </div>
|
|
2023
|
+
* ```
|
|
2024
|
+
*/
|
|
2025
|
+
class CheckboxComponent {
|
|
1721
2026
|
constructor() {
|
|
1722
|
-
this.isChecked =
|
|
2027
|
+
this.isChecked = false;
|
|
2028
|
+
this.isIndeterminate = false;
|
|
2029
|
+
this.isSmall = false;
|
|
2030
|
+
this.disabled = false;
|
|
2031
|
+
this.isError = false;
|
|
2032
|
+
this.inputId = '';
|
|
2033
|
+
this.checkedChange = new EventEmitter();
|
|
2034
|
+
}
|
|
2035
|
+
onCheckBoxChange(event) {
|
|
2036
|
+
const checkbox = event.target;
|
|
2037
|
+
this.checkedChange.emit(checkbox.checked);
|
|
1723
2038
|
}
|
|
1724
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type:
|
|
1725
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2039
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2040
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: CheckboxComponent, isStandalone: true, selector: "lib-checkbox", inputs: { isChecked: "isChecked", isIndeterminate: "isIndeterminate", isSmall: "isSmall", disabled: "disabled", isError: "isError", inputId: "inputId" }, outputs: { checkedChange: "checkedChange" }, ngImport: i0, template: "<input\n [id]=\"inputId\"\n type=\"checkbox\"\n class=\"checkbox\"\n [class.checkbox-small]=\"isSmall\"\n [class.checkbox-error]=\"isError\"\n [checked]=\"isChecked\"\n [indeterminate]=\"isIndeterminate\"\n [disabled]=\"disabled\"\n (change)=\"onCheckBoxChange($event)\"\n/>\n", styles: ["html{border:0;margin:0;padding:0;-webkit-text-size-adjust:100%}body{margin:0;padding:0}*,*:before,*:after{box-sizing:border-box}:root{--color-navy: #00245d;--color-royal: #0047ba;--color-white: #ffffff;--color-blue-500: #00245d;--color-blue-400: #003995;--color-blue-300: #0047ba;--color-blue-200: #336cc8;--color-blue-150: #ccdaf1;--color-blue-100: #e5edf8;--color-gray-500: #141414;--color-gray-400: #737373;--color-gray-300: #8f8f8f;--color-gray-200: #d0d0d0;--color-gray-100: #e7e7e7;--color-gray-50: #f9f9f9;--color-gray-brand-400: #737373;--color-green-500: #1d562e;--color-green-400: #2e8545;--color-green-300: #3ba35a;--color-green-200: #9dd1ac;--color-green-100: #ebf6ee;--color-teal-500: #26485f;--color-teal-400: #3e7295;--color-teal-300: #457fa6;--color-teal-200: #a2bfd3;--color-teal-100: #ecf2f6;--color-red-500: #702121;--color-red-400: #b33837;--color-red-300: #c73e3d;--color-red-200: #e39e9e;--color-red-100: #f9ecec;--color-yellow-500: #635f04;--color-yellow-400: #928c30;--color-yellow-300: #d1c844;--color-yellow-200: #e8e3a1;--color-yellow-100: #f2f0e9;--color-purple-focus: #b967c7;--text-heading: #002e5d;--text-secondary-heading: #737373;--text-body: #141414;--text-disabled: #737373;--text-link: #336cc8;--text-on-action: #ffffff;--text-success: #1d562e;--text-info: #26485f;--text-error: #702121;--text-warning: #635f04;--surface-success: #ebf6ee;--surface-info: #ecf2f6;--surface-error: #f9ecec;--surface-warning: #f2f0e9;--focus-ring-color: #b967c7}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Light.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Regular.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Semibold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Bold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-LightItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Italic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-SemiboldItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-BoldItalic.ttf) format(\"truetype\");font-display:swap}h1,h2,h3,h4,h5,h6,span:not(.material-symbols-outlined),a,p{font-family:Source Sans Pro}h1{font-weight:300;font-style:normal;color:var(--text-heading)}h2{font-weight:400;font-style:normal;color:var(--text-heading)}h3{font-weight:700;font-style:normal;color:var(--text-heading)}h4,h5,h6{font-weight:600;font-style:normal;color:var(--text-secondary-heading)}.hbll-default-body{font-weight:400;font-style:normal;max-width:35rem;min-width:22.25rem;color:var(--text-body)}.hbll-caption{font-weight:400;font-style:normal;max-width:25.25rem;min-width:17.5rem;color:var(--text-body)}.hbll-large{font-weight:400;font-style:normal;max-width:41.25rem;min-width:26.5rem;color:var(--text-body)}a{color:var(--text-link);text-decoration:underline}.hbll-emphasis{font-weight:600}h1{font-size:2rem;line-height:2.5rem}h2{font-size:1.75rem;line-height:2.25rem}h3,h4{font-size:1.5rem;line-height:2rem}h5,h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:.875rem;line-height:1.25rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1rem;line-height:1.5rem}@media screen and (min-width: 52.125em){h1{font-size:3rem;line-height:3.5rem}h2{font-size:2.5rem;line-height:3rem}h3{font-size:2rem;line-height:3rem}h4{font-size:1.75rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}@media screen and (min-width: 90em){h1{font-size:3.75rem;line-height:4.25rem}h2{font-size:3rem;line-height:3.5rem}h3{font-size:2.5rem;line-height:3rem}h4{font-size:2rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.checkbox{appearance:none;-webkit-appearance:none;height:1.25rem;width:1.25rem;display:inline-flex;align-items:center;justify-content:center;border:solid 2px #737373;border-radius:4px;background-color:transparent;box-sizing:border-box;cursor:pointer;margin:0}.checkbox.checkbox-error{border-color:#c73e3d}.checkbox.checkbox-error:checked,.checkbox.checkbox-error:indeterminate{border-color:#c73e3d;background-color:#c73e3d}.checkbox:checked,.checkbox:indeterminate{border-color:#0047ba;background-color:#0047ba;background-position:center;background-repeat:no-repeat}.checkbox:checked{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E\")}.checkbox:indeterminate{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cline x1='5' y1='12' x2='19' y2='12' /%3E%3C/svg%3E\")}.checkbox.checkbox-small{height:.75rem;width:.75rem;border-radius:4px}.checkbox:disabled{cursor:not-allowed;border-color:#737373;background-color:#e7e7e7;opacity:.5}.checkbox:disabled:hover{outline:none}.checkbox:disabled:checked,.checkbox:disabled:indeterminate{background-color:#e7e7e7;border-color:#737373}.checkbox:disabled:checked{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f8f8f' stroke-width='3' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E\")}.checkbox:disabled:indeterminate{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f8f8f' stroke-width='3' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cline x1='5' y1='12' x2='19' y2='12' /%3E%3C/svg%3E\")}.checkbox:focus-visible{outline:2px solid #b967c7;outline-offset:1px}.checkbox:hover{outline:2px solid #ccdaf1;outline-offset:1px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
1726
2041
|
}
|
|
1727
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type:
|
|
2042
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
1728
2043
|
type: Component,
|
|
1729
|
-
args: [{ selector: 'lib-checkbox', imports: [CommonModule], template: "<
|
|
1730
|
-
}], propDecorators: { isChecked: [{
|
|
2044
|
+
args: [{ selector: 'lib-checkbox', standalone: true, imports: [CommonModule], template: "<input\n [id]=\"inputId\"\n type=\"checkbox\"\n class=\"checkbox\"\n [class.checkbox-small]=\"isSmall\"\n [class.checkbox-error]=\"isError\"\n [checked]=\"isChecked\"\n [indeterminate]=\"isIndeterminate\"\n [disabled]=\"disabled\"\n (change)=\"onCheckBoxChange($event)\"\n/>\n", styles: ["html{border:0;margin:0;padding:0;-webkit-text-size-adjust:100%}body{margin:0;padding:0}*,*:before,*:after{box-sizing:border-box}:root{--color-navy: #00245d;--color-royal: #0047ba;--color-white: #ffffff;--color-blue-500: #00245d;--color-blue-400: #003995;--color-blue-300: #0047ba;--color-blue-200: #336cc8;--color-blue-150: #ccdaf1;--color-blue-100: #e5edf8;--color-gray-500: #141414;--color-gray-400: #737373;--color-gray-300: #8f8f8f;--color-gray-200: #d0d0d0;--color-gray-100: #e7e7e7;--color-gray-50: #f9f9f9;--color-gray-brand-400: #737373;--color-green-500: #1d562e;--color-green-400: #2e8545;--color-green-300: #3ba35a;--color-green-200: #9dd1ac;--color-green-100: #ebf6ee;--color-teal-500: #26485f;--color-teal-400: #3e7295;--color-teal-300: #457fa6;--color-teal-200: #a2bfd3;--color-teal-100: #ecf2f6;--color-red-500: #702121;--color-red-400: #b33837;--color-red-300: #c73e3d;--color-red-200: #e39e9e;--color-red-100: #f9ecec;--color-yellow-500: #635f04;--color-yellow-400: #928c30;--color-yellow-300: #d1c844;--color-yellow-200: #e8e3a1;--color-yellow-100: #f2f0e9;--color-purple-focus: #b967c7;--text-heading: #002e5d;--text-secondary-heading: #737373;--text-body: #141414;--text-disabled: #737373;--text-link: #336cc8;--text-on-action: #ffffff;--text-success: #1d562e;--text-info: #26485f;--text-error: #702121;--text-warning: #635f04;--surface-success: #ebf6ee;--surface-info: #ecf2f6;--surface-error: #f9ecec;--surface-warning: #f2f0e9;--focus-ring-color: #b967c7}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Light.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Regular.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Semibold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Bold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-LightItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Italic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-SemiboldItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-BoldItalic.ttf) format(\"truetype\");font-display:swap}h1,h2,h3,h4,h5,h6,span:not(.material-symbols-outlined),a,p{font-family:Source Sans Pro}h1{font-weight:300;font-style:normal;color:var(--text-heading)}h2{font-weight:400;font-style:normal;color:var(--text-heading)}h3{font-weight:700;font-style:normal;color:var(--text-heading)}h4,h5,h6{font-weight:600;font-style:normal;color:var(--text-secondary-heading)}.hbll-default-body{font-weight:400;font-style:normal;max-width:35rem;min-width:22.25rem;color:var(--text-body)}.hbll-caption{font-weight:400;font-style:normal;max-width:25.25rem;min-width:17.5rem;color:var(--text-body)}.hbll-large{font-weight:400;font-style:normal;max-width:41.25rem;min-width:26.5rem;color:var(--text-body)}a{color:var(--text-link);text-decoration:underline}.hbll-emphasis{font-weight:600}h1{font-size:2rem;line-height:2.5rem}h2{font-size:1.75rem;line-height:2.25rem}h3,h4{font-size:1.5rem;line-height:2rem}h5,h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:.875rem;line-height:1.25rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1rem;line-height:1.5rem}@media screen and (min-width: 52.125em){h1{font-size:3rem;line-height:3.5rem}h2{font-size:2.5rem;line-height:3rem}h3{font-size:2rem;line-height:3rem}h4{font-size:1.75rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}@media screen and (min-width: 90em){h1{font-size:3.75rem;line-height:4.25rem}h2{font-size:3rem;line-height:3.5rem}h3{font-size:2.5rem;line-height:3rem}h4{font-size:2rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.checkbox{appearance:none;-webkit-appearance:none;height:1.25rem;width:1.25rem;display:inline-flex;align-items:center;justify-content:center;border:solid 2px #737373;border-radius:4px;background-color:transparent;box-sizing:border-box;cursor:pointer;margin:0}.checkbox.checkbox-error{border-color:#c73e3d}.checkbox.checkbox-error:checked,.checkbox.checkbox-error:indeterminate{border-color:#c73e3d;background-color:#c73e3d}.checkbox:checked,.checkbox:indeterminate{border-color:#0047ba;background-color:#0047ba;background-position:center;background-repeat:no-repeat}.checkbox:checked{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E\")}.checkbox:indeterminate{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cline x1='5' y1='12' x2='19' y2='12' /%3E%3C/svg%3E\")}.checkbox.checkbox-small{height:.75rem;width:.75rem;border-radius:4px}.checkbox:disabled{cursor:not-allowed;border-color:#737373;background-color:#e7e7e7;opacity:.5}.checkbox:disabled:hover{outline:none}.checkbox:disabled:checked,.checkbox:disabled:indeterminate{background-color:#e7e7e7;border-color:#737373}.checkbox:disabled:checked{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f8f8f' stroke-width='3' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E\")}.checkbox:disabled:indeterminate{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f8f8f' stroke-width='3' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cline x1='5' y1='12' x2='19' y2='12' /%3E%3C/svg%3E\")}.checkbox:focus-visible{outline:2px solid #b967c7;outline-offset:1px}.checkbox:hover{outline:2px solid #ccdaf1;outline-offset:1px}\n"] }]
|
|
2045
|
+
}], propDecorators: { isChecked: [{
|
|
2046
|
+
type: Input
|
|
2047
|
+
}], isIndeterminate: [{
|
|
2048
|
+
type: Input
|
|
2049
|
+
}], isSmall: [{
|
|
2050
|
+
type: Input
|
|
2051
|
+
}], disabled: [{
|
|
2052
|
+
type: Input
|
|
2053
|
+
}], isError: [{
|
|
2054
|
+
type: Input
|
|
2055
|
+
}], inputId: [{
|
|
2056
|
+
type: Input
|
|
2057
|
+
}], checkedChange: [{
|
|
2058
|
+
type: Output
|
|
2059
|
+
}] } });
|
|
1731
2060
|
|
|
1732
2061
|
class DateRangeComponent {
|
|
1733
2062
|
constructor() {
|
|
@@ -2023,7 +2352,7 @@ class AdvancedSearchComponent {
|
|
|
2023
2352
|
return this.advancedSearchForm.controls.expandResults.controls.applyEquivalentSubjects;
|
|
2024
2353
|
}
|
|
2025
2354
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AdvancedSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2026
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AdvancedSearchComponent, isStandalone: true, selector: "lib-ss-advanced-search", inputs: { config: "config" }, outputs: { advancedSearch: "advancedSearch" }, viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "inputTooltip", first: true, predicate: MatTooltip, descendants: true }], ngImport: i0, template: "<form\n data-testid=\"advancedSearchForm\"\n (submit)=\"config.scope === 'local' ? doLocalAdvancedSearch() : doExternalAdvancedSearch()\"\n [formGroup]=\"advancedSearchForm\"\n class=\"ss-adv-search-wrapper\"\n>\n <h3>Advanced Search</h3>\n <!-- Queries -->\n @for (query of queries.controls; track $index; let queryIndex = $index) {\n <div class=\"ss-adv-search-row\" [formGroup]=\"query\">\n <!-- Boolean operator -->\n <!-- Add boolean for each row except for first -->\n @if (!$first) {\n <div class=\"ss-select-wrapper\">\n <select\n [id]=\"'boolean' + queryIndex\"\n [formControlName]=\"'boolean'\"\n [attr.data-testid]=\"'boolean' + queryIndex\"\n >\n @for (boolean of advancedSearchOptions.boolean; track boolean) {\n <option [ngValue]=\"boolean\">\n {{ boolean }}\n </option>\n }\n </select>\n </div>\n }\n <!-- Field -->\n <label [for]=\"'field' + queryIndex\" class=\"ss-hidden\">Field {{ queryIndex }}</label>\n <div class=\"ss-select-wrapper\">\n <select\n [id]=\"'field' + queryIndex\"\n [formControlName]=\"'field'\"\n [attr.data-testid]=\"'field' + queryIndex\"\n >\n @for (field of advancedSearchOptions.fields; track field) {\n <option [ngValue]=\"field\">\n {{ advancedSearchFieldMap[field] }}\n </option>\n }\n <optgroup\n [label]=\"(config.scope === 'external' ? 'Online' : 'Library') + ' Specific'\"\n >\n @for (\n field of config.scope === 'external'\n ? advancedSearchOptions.externalFields\n : advancedSearchOptions.localFields;\n track field\n ) {\n <option [ngValue]=\"field\">\n {{ advancedSearchFieldMap[field] }}\n </option>\n }\n </optgroup>\n </select>\n </div>\n <!-- Qualifiers are only available for local searches -->\n @if (config.scope === 'local') {\n <label [for]=\"'qualifier' + queryIndex\" class=\"ss-hidden\"\n >Match Criteria {{ queryIndex }}</label\n >\n <div class=\"ss-select-wrapper\">\n <select\n [id]=\"'qualifier' + queryIndex\"\n [formControlName]=\"'qualifier'\"\n [attr.data-testid]=\"'qualifier' + queryIndex\"\n >\n <!-- $any because a field can technically be local or external, though this block is scoped strictly to local fields -->\n @for (\n qualifier of $any(advancedSearchOptions.qualifiers)[\n query.controls.field.value\n ];\n track qualifier;\n let optionIndex = $index\n ) {\n <option\n [ngValue]=\"qualifier\"\n [attr.data-testid]=\"\n 'qualifier' + queryIndex + '-option' + optionIndex\n \"\n >\n {{ $any(advancedSearchQualifierMap)[qualifier] }}\n </option>\n }\n </select>\n </div>\n }\n <!-- Query -->\n <label [for]=\"'query' + queryIndex\" class=\"ss-hidden\">Query {{ queryIndex }}</label>\n <div class=\"ss-query-input\">\n <input\n #searchInput\n [id]=\"'query' + queryIndex\"\n [formControlName]=\"'query'\"\n [attr.data-testid]=\"'query' + queryIndex\"\n required\n aria-required=\"true\"\n matTooltip=\"Fill out this field\"\n [matTooltipPosition]=\"'above'\"\n [matTooltipDisabled]=\"true\"\n [attr.aria-invalid]=\"isSubmitted && queries.at(0).controls.query.invalid\"\n aria-describedby=\"invalidInputDesc\"\n />\n </div>\n @if (!$first) {\n <button\n class=\"ss-row-cancel\"\n type=\"button\"\n (click)=\"removeQuery(queryIndex)\"\n [attr.data-testid]=\"'cancelRow' + queryIndex\"\n >\n <span class=\"material-symbols-outlined ss-icon\"> cancel </span>\n </button>\n }\n </div>\n }\n <button\n type=\"button\"\n (click)=\"addQuery()\"\n id=\"addQueryBtn\"\n data-testid=\"addQuery\"\n [disabled]=\"queries.length > 11\"\n >\n <span class=\"material-symbols-outlined ss-icon\"> add </span>\n Add a row\n </button>\n <!-- OTHER OPTIONS -->\n <div class=\"ss-other-options\">\n <!-- LOCAL -->\n @if (config.scope === 'local') {\n <!-- Type -->\n <div data-testid=\"resourceType\">\n <h4>Resource Type</h4>\n <div class=\"ss-multi-select-wrapper\">\n <lib-multi-select\n [label]=\"'Resource Type'\"\n [allOptions]=\"advancedSearchOptions.types[config.institution]\"\n [selectedKeys]=\"types.value\"\n (selectedKeysChange)=\"types.setValue($event)\"\n ></lib-multi-select>\n </div>\n </div>\n <!-- Collection -->\n <div data-testid=\"collection\">\n <h4>Collection</h4>\n <div class=\"ss-multi-select-wrapper\">\n <lib-multi-select\n [label]=\"'Collection'\"\n [allOptions]=\"advancedSearchOptions.collections[config.institution]\"\n [selectedKeys]=\"collections.value\"\n (selectedKeysChange)=\"collections.setValue($event)\"\n ></lib-multi-select>\n </div>\n </div>\n <!-- Language -->\n <ng-container *ngTemplateOutlet=\"languageBlock\"></ng-container>\n <!-- Date -->\n <ng-container\n *ngTemplateOutlet=\"dateBlock; context: { header: 'Creation Date' }\"\n ></ng-container>\n }\n <!-- EXTERNAL -->\n @if (config.scope === 'external') {\n <div formGroupName=\"limitResults\" class=\"ss-checkbox-section\">\n <h4>For Fewer Results Try</h4>\n <!-- Peer reviewed -->\n <label class=\"ss-checkbox-label\" for=\"peerReviewed\" tabindex=\"0\">\n <input\n class=\"ss-hidden\"\n id=\"peerReviewed\"\n type=\"checkbox\"\n [formControlName]=\"'peerReviewed'\"\n data-testid=\"peerReviewed\"\n />\n <lib-checkbox [isChecked]=\"peerReviewed.value\"></lib-checkbox>\n <span class=\"ss-label-text\">Peer reviewed journal articles</span>\n </label>\n </div>\n <div formGroupName=\"expandResults\" class=\"ss-checkbox-section\">\n <h4>For More Results Try</h4>\n <!-- Apply equivalent subjects -->\n <label class=\"ss-checkbox-label\" for=\"applyEquivalentSubjects\" tabindex=\"0\">\n <input\n class=\"ss-hidden\"\n id=\"applyEquivalentSubjects\"\n type=\"checkbox\"\n [formControlName]=\"'applyEquivalentSubjects'\"\n data-testid=\"applyEquivalentSubjects\"\n />\n <lib-checkbox [isChecked]=\"applyEquivalentSubjects.value\"></lib-checkbox>\n <span class=\"ss-label-text\">Apply equivalent subjects</span>\n </label>\n <!-- Full text -->\n <label class=\"ss-checkbox-label\" for=\"fullText\" tabindex=\"0\">\n <input\n class=\"ss-hidden\"\n id=\"fullText\"\n type=\"checkbox\"\n [formControlName]=\"'fullText'\"\n data-testid=\"fullText\"\n />\n <lib-checkbox [isChecked]=\"fullText.value\"></lib-checkbox>\n <span class=\"ss-label-text\"\n >Include results the library doesn't have access to</span\n >\n </label>\n </div>\n <!-- Date -->\n <ng-container\n *ngTemplateOutlet=\"dateBlock; context: { header: 'Date Published' }\"\n ></ng-container>\n <!-- Language -->\n <ng-container *ngTemplateOutlet=\"languageBlock\"></ng-container>\n }\n </div>\n <div id=\"advSearchFooter\">\n <a [href]=\"'https://lib.byu.edu/browse/' + config.institution\">Alphabetic Browse</a>\n <button\n class=\"pill-btn--components\"\n [ngClass]=\"{\n ensign: config.institution === 'ensign',\n }\"\n type=\"submit\"\n data-testid=\"advSearchSubmitButton\"\n >\n Search\n </button>\n </div>\n</form>\n\n<ng-template #languageBlock>\n <div>\n <h4>Language</h4>\n <lib-multi-select\n [label]=\"'language'\"\n [allOptions]=\"advancedSearchOptions.languages\"\n [selectedKeys]=\"languages.value\"\n (selectedKeysChange)=\"languages.setValue($any($event))\"\n ></lib-multi-select>\n </div>\n</ng-template>\n<ng-template #dateBlock let-header=\"header\">\n <div id=\"dateOptions\" class=\"external\">\n <h4>{{ header }}</h4>\n <lib-date-range\n [from]=\"from.value\"\n [to]=\"to.value\"\n (fromChange)=\"from.setValue($event)\"\n (toChange)=\"to.setValue($event)\"\n ></lib-date-range>\n </div>\n</ng-template>\n", styles: ["select,textarea,input{appearance:none;font-family:inherit;padding:.38em;border:solid 1px #707070;border-radius:4px;font-size:1em;background-color:#fff}select:focus,textarea:focus,input:focus{outline-color:#3a6093}.ss-select-wrapper{position:relative}.ss-select-wrapper select{cursor:pointer;padding-right:2em}.ss-select-wrapper:after{font-family:Material Symbols Outlined;content:\"arrow_drop_down\";pointer-events:none;top:0;font-size:1.5em;right:.2em;height:100%;position:absolute;display:flex;align-items:center;opacity:70%}.pill-btn--components{background-color:#4070b0;font-size:1em;transition:all .15s;color:#fff;cursor:pointer;font-weight:600;text-align:center}.pill-btn--components:disabled{color:#707070;background-color:#e6e6e6;pointer-events:none}.pill-btn--components:hover{background-color:#6892ca;color:#fff}.destructive.pill-btn--components{background-color:#b04940}.destructive.pill-btn--components:hover{background-color:#c7574d}button.ensign{background-color:#2b6042!important;border-color:#2a6142}button.ensign:hover{background-color:#357551!important}a,button{border:none;background:none;font-family:inherit;padding:0;margin:0;font-size:inherit;color:#1c7ec9;text-decoration:none;cursor:pointer}a:hover,button:hover{color:#8ab6f0}.pill-btn--components{border-radius:100em;padding:.4em 1.3em}:host{box-sizing:border-box}:host *{box-sizing:inherit}.ss-select-wrapper{margin-right:.3em}.ss-row-cancel{color:#aaa;margin-left:.4em;margin-top:.4em}.ss-row-cancel:hover{color:#666}.ss-row-cancel .ss-icon{font-size:1em}.ss-hidden{display:none}#addQueryBtn{display:flex;align-items:center}#addQueryBtn:disabled{color:#999;pointer-events:none}#addQueryBtn .icon{font-size:1em}.ss-adv-search-wrapper{width:100%}h3{font-size:1.13em;font-weight:300;margin-bottom:.7em;margin-top:0}h4{margin-bottom:.3em;font-weight:600}#dateOptions h4{margin-bottom:.8em}.ss-adv-search-row{display:flex;flex-wrap:wrap;width:100%;margin-bottom:.6em}.ss-query-input{display:inline-block;width:100%;margin-top:.25rem}.ss-query-input input{width:100%}.ss-other-options{display:grid;grid-template-columns:repeat(1,1fr);gap:.6em 1.6em;grid-auto-rows:minmax(1em,auto);margin-top:1.4em}.ss-other-options label{margin-right:.625rem}.ss-checkbox-label{display:inline-flex;align-items:flex-start;cursor:pointer}.ss-checkbox-label:not(:last-of-type){margin-bottom:.75em}.ss-checkbox-label .ss-label-text{margin-top:-.1em;margin-left:.45em}.ss-checkbox-section{margin-bottom:.8em}#advSearchFooter{margin-bottom:.5em;display:flex;justify-content:space-between;align-items:center;font-size:1.2em}#advSearchFooter a{font-size:.8em}@media screen and (min-width: 615px){.ss-adv-search-row{flex-wrap:nowrap}.ss-other-options{grid-template-columns:repeat(2,1fr)}.ss-query-input{margin-top:0}#dateOptions .external{grid-column:span 2}}\n"], dependencies: [{ 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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: HbllMultiSelectComponent, selector: "lib-multi-select", inputs: ["allOptions", "label", "selectedKeys"], outputs: ["selectedKeysChange"] }, { kind: "component", type: HbllCheckboxComponent, selector: "lib-checkbox", inputs: ["isChecked"] }, { kind: "component", type: DateRangeComponent, selector: "lib-date-range", inputs: ["from", "to"], outputs: ["validDateChange", "fromChange", "toChange"] }] }); }
|
|
2355
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AdvancedSearchComponent, isStandalone: true, selector: "lib-ss-advanced-search", inputs: { config: "config" }, outputs: { advancedSearch: "advancedSearch" }, viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "inputTooltip", first: true, predicate: MatTooltip, descendants: true }], ngImport: i0, template: "<form\n data-testid=\"advancedSearchForm\"\n (submit)=\"config.scope === 'local' ? doLocalAdvancedSearch() : doExternalAdvancedSearch()\"\n [formGroup]=\"advancedSearchForm\"\n class=\"ss-adv-search-wrapper\"\n>\n <h3>Advanced Search</h3>\n <!-- Queries -->\n @for (query of queries.controls; track $index; let queryIndex = $index) {\n <div class=\"ss-adv-search-row\" [formGroup]=\"query\">\n <!-- Boolean operator -->\n <!-- Add boolean for each row except for first -->\n @if (!$first) {\n <div class=\"ss-select-wrapper\">\n <select\n [id]=\"'boolean' + queryIndex\"\n [formControlName]=\"'boolean'\"\n [attr.data-testid]=\"'boolean' + queryIndex\"\n >\n @for (boolean of advancedSearchOptions.boolean; track boolean) {\n <option [ngValue]=\"boolean\">\n {{ boolean }}\n </option>\n }\n </select>\n </div>\n }\n <!-- Field -->\n <label [for]=\"'field' + queryIndex\" class=\"ss-hidden\">Field {{ queryIndex }}</label>\n <div class=\"ss-select-wrapper\">\n <select\n [id]=\"'field' + queryIndex\"\n [formControlName]=\"'field'\"\n [attr.data-testid]=\"'field' + queryIndex\"\n >\n @for (field of advancedSearchOptions.fields; track field) {\n <option [ngValue]=\"field\">\n {{ advancedSearchFieldMap[field] }}\n </option>\n }\n <optgroup\n [label]=\"(config.scope === 'external' ? 'Online' : 'Library') + ' Specific'\"\n >\n @for (\n field of config.scope === 'external'\n ? advancedSearchOptions.externalFields\n : advancedSearchOptions.localFields;\n track field\n ) {\n <option [ngValue]=\"field\">\n {{ advancedSearchFieldMap[field] }}\n </option>\n }\n </optgroup>\n </select>\n </div>\n <!-- Qualifiers are only available for local searches -->\n @if (config.scope === 'local') {\n <label [for]=\"'qualifier' + queryIndex\" class=\"ss-hidden\"\n >Match Criteria {{ queryIndex }}</label\n >\n <div class=\"ss-select-wrapper\">\n <select\n [id]=\"'qualifier' + queryIndex\"\n [formControlName]=\"'qualifier'\"\n [attr.data-testid]=\"'qualifier' + queryIndex\"\n >\n <!-- $any because a field can technically be local or external, though this block is scoped strictly to local fields -->\n @for (\n qualifier of $any(advancedSearchOptions.qualifiers)[\n query.controls.field.value\n ];\n track qualifier;\n let optionIndex = $index\n ) {\n <option\n [ngValue]=\"qualifier\"\n [attr.data-testid]=\"\n 'qualifier' + queryIndex + '-option' + optionIndex\n \"\n >\n {{ $any(advancedSearchQualifierMap)[qualifier] }}\n </option>\n }\n </select>\n </div>\n }\n <!-- Query -->\n <label [for]=\"'query' + queryIndex\" class=\"ss-hidden\">Query {{ queryIndex }}</label>\n <div class=\"ss-query-input\">\n <input\n #searchInput\n [id]=\"'query' + queryIndex\"\n [formControlName]=\"'query'\"\n [attr.data-testid]=\"'query' + queryIndex\"\n required\n aria-required=\"true\"\n matTooltip=\"Fill out this field\"\n [matTooltipPosition]=\"'above'\"\n [matTooltipDisabled]=\"true\"\n [attr.aria-invalid]=\"isSubmitted && queries.at(0).controls.query.invalid\"\n aria-describedby=\"invalidInputDesc\"\n />\n </div>\n @if (!$first) {\n <button\n class=\"ss-row-cancel\"\n type=\"button\"\n (click)=\"removeQuery(queryIndex)\"\n [attr.data-testid]=\"'cancelRow' + queryIndex\"\n >\n <span class=\"material-symbols-outlined ss-icon\"> cancel </span>\n </button>\n }\n </div>\n }\n <button\n type=\"button\"\n (click)=\"addQuery()\"\n id=\"addQueryBtn\"\n data-testid=\"addQuery\"\n [disabled]=\"queries.length > 11\"\n >\n <span class=\"material-symbols-outlined ss-icon\"> add </span>\n Add a row\n </button>\n <!-- OTHER OPTIONS -->\n <div class=\"ss-other-options\">\n <!-- LOCAL -->\n @if (config.scope === 'local') {\n <!-- Type -->\n <div data-testid=\"resourceType\">\n <h4>Resource Type</h4>\n <div class=\"ss-multi-select-wrapper\">\n <lib-multi-select\n [label]=\"'Resource Type'\"\n [allOptions]=\"advancedSearchOptions.types[config.institution]\"\n [selectedKeys]=\"types.value\"\n (selectedKeysChange)=\"types.setValue($event)\"\n ></lib-multi-select>\n </div>\n </div>\n <!-- Collection -->\n <div data-testid=\"collection\">\n <h4>Collection</h4>\n <div class=\"ss-multi-select-wrapper\">\n <lib-multi-select\n [label]=\"'Collection'\"\n [allOptions]=\"advancedSearchOptions.collections[config.institution]\"\n [selectedKeys]=\"collections.value\"\n (selectedKeysChange)=\"collections.setValue($event)\"\n ></lib-multi-select>\n </div>\n </div>\n <!-- Language -->\n <ng-container *ngTemplateOutlet=\"languageBlock\"></ng-container>\n <!-- Date -->\n <ng-container\n *ngTemplateOutlet=\"dateBlock; context: { header: 'Creation Date' }\"\n ></ng-container>\n }\n <!-- EXTERNAL -->\n @if (config.scope === 'external') {\n <div formGroupName=\"limitResults\" class=\"ss-checkbox-section\">\n <h4>For Fewer Results Try</h4>\n <!-- Peer reviewed -->\n <label class=\"ss-checkbox-label\" for=\"peerReviewed\" tabindex=\"0\">\n <input\n class=\"ss-hidden\"\n id=\"peerReviewed\"\n type=\"checkbox\"\n [formControlName]=\"'peerReviewed'\"\n data-testid=\"peerReviewed\"\n />\n <lib-checkbox [isChecked]=\"peerReviewed.value\"></lib-checkbox>\n <span class=\"ss-label-text\">Peer reviewed journal articles</span>\n </label>\n </div>\n <div formGroupName=\"expandResults\" class=\"ss-checkbox-section\">\n <h4>For More Results Try</h4>\n <!-- Apply equivalent subjects -->\n <label class=\"ss-checkbox-label\" for=\"applyEquivalentSubjects\" tabindex=\"0\">\n <input\n class=\"ss-hidden\"\n id=\"applyEquivalentSubjects\"\n type=\"checkbox\"\n [formControlName]=\"'applyEquivalentSubjects'\"\n data-testid=\"applyEquivalentSubjects\"\n />\n <lib-checkbox [isChecked]=\"applyEquivalentSubjects.value\"></lib-checkbox>\n <span class=\"ss-label-text\">Apply equivalent subjects</span>\n </label>\n <!-- Full text -->\n <label class=\"ss-checkbox-label\" for=\"fullText\" tabindex=\"0\">\n <input\n class=\"ss-hidden\"\n id=\"fullText\"\n type=\"checkbox\"\n [formControlName]=\"'fullText'\"\n data-testid=\"fullText\"\n />\n <lib-checkbox [isChecked]=\"fullText.value\"></lib-checkbox>\n <span class=\"ss-label-text\"\n >Include results the library doesn't have access to</span\n >\n </label>\n </div>\n <!-- Date -->\n <ng-container\n *ngTemplateOutlet=\"dateBlock; context: { header: 'Date Published' }\"\n ></ng-container>\n <!-- Language -->\n <ng-container *ngTemplateOutlet=\"languageBlock\"></ng-container>\n }\n </div>\n <div id=\"advSearchFooter\">\n <a [href]=\"'https://lib.byu.edu/browse/' + config.institution\">Alphabetic Browse</a>\n <button\n class=\"pill-btn--components\"\n [ngClass]=\"{\n ensign: config.institution === 'ensign',\n }\"\n type=\"submit\"\n data-testid=\"advSearchSubmitButton\"\n >\n Search\n </button>\n </div>\n</form>\n\n<ng-template #languageBlock>\n <div>\n <h4>Language</h4>\n <lib-multi-select\n [label]=\"'language'\"\n [allOptions]=\"advancedSearchOptions.languages\"\n [selectedKeys]=\"languages.value\"\n (selectedKeysChange)=\"languages.setValue($any($event))\"\n ></lib-multi-select>\n </div>\n</ng-template>\n<ng-template #dateBlock let-header=\"header\">\n <div id=\"dateOptions\" class=\"external\">\n <h4>{{ header }}</h4>\n <lib-date-range\n [from]=\"from.value\"\n [to]=\"to.value\"\n (fromChange)=\"from.setValue($event)\"\n (toChange)=\"to.setValue($event)\"\n ></lib-date-range>\n </div>\n</ng-template>\n", styles: ["select,textarea,input{appearance:none;font-family:inherit;padding:.38em;border:solid 1px #707070;border-radius:4px;font-size:1em;background-color:#fff}select:focus,textarea:focus,input:focus{outline-color:#3a6093}.ss-select-wrapper{position:relative}.ss-select-wrapper select{cursor:pointer;padding-right:2em}.ss-select-wrapper:after{font-family:Material Symbols Outlined;content:\"arrow_drop_down\";pointer-events:none;top:0;font-size:1.5em;right:.2em;height:100%;position:absolute;display:flex;align-items:center;opacity:70%}.pill-btn--components{background-color:#4070b0;font-size:1em;transition:all .15s;color:#fff;cursor:pointer;font-weight:600;text-align:center}.pill-btn--components:disabled{color:#707070;background-color:#e6e6e6;pointer-events:none}.pill-btn--components:hover{background-color:#6892ca;color:#fff}.destructive.pill-btn--components{background-color:#b04940}.destructive.pill-btn--components:hover{background-color:#c7574d}button.ensign{background-color:#2b6042!important;border-color:#2a6142}button.ensign:hover{background-color:#357551!important}html{border:0;margin:0;padding:0;-webkit-text-size-adjust:100%}body{margin:0;padding:0}*,*:before,*:after{box-sizing:border-box}:root{--color-navy: #00245d;--color-royal: #0047ba;--color-white: #ffffff;--color-blue-500: #00245d;--color-blue-400: #003995;--color-blue-300: #0047ba;--color-blue-200: #336cc8;--color-blue-150: #ccdaf1;--color-blue-100: #e5edf8;--color-gray-500: #141414;--color-gray-400: #737373;--color-gray-300: #8f8f8f;--color-gray-200: #d0d0d0;--color-gray-100: #e7e7e7;--color-gray-50: #f9f9f9;--color-gray-brand-400: #737373;--color-green-500: #1d562e;--color-green-400: #2e8545;--color-green-300: #3ba35a;--color-green-200: #9dd1ac;--color-green-100: #ebf6ee;--color-teal-500: #26485f;--color-teal-400: #3e7295;--color-teal-300: #457fa6;--color-teal-200: #a2bfd3;--color-teal-100: #ecf2f6;--color-red-500: #702121;--color-red-400: #b33837;--color-red-300: #c73e3d;--color-red-200: #e39e9e;--color-red-100: #f9ecec;--color-yellow-500: #635f04;--color-yellow-400: #928c30;--color-yellow-300: #d1c844;--color-yellow-200: #e8e3a1;--color-yellow-100: #f2f0e9;--color-purple-focus: #b967c7;--text-heading: #002e5d;--text-secondary-heading: #737373;--text-body: #141414;--text-disabled: #737373;--text-link: #336cc8;--text-on-action: #ffffff;--text-success: #1d562e;--text-info: #26485f;--text-error: #702121;--text-warning: #635f04;--surface-success: #ebf6ee;--surface-info: #ecf2f6;--surface-error: #f9ecec;--surface-warning: #f2f0e9;--focus-ring-color: #b967c7}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Light.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Regular.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Semibold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Bold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-LightItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Italic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-SemiboldItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-BoldItalic.ttf) format(\"truetype\");font-display:swap}h1,h2,h3,h4,h5,h6,span:not(.material-symbols-outlined),a,p{font-family:Source Sans Pro}h1{font-weight:300;font-style:normal;color:var(--text-heading)}h2{font-weight:400;font-style:normal;color:var(--text-heading)}h3{font-weight:700;font-style:normal;color:var(--text-heading)}h4,h5,h6{font-weight:600;font-style:normal;color:var(--text-secondary-heading)}.hbll-default-body{font-weight:400;font-style:normal;max-width:35rem;min-width:22.25rem;color:var(--text-body)}.hbll-caption{font-weight:400;font-style:normal;max-width:25.25rem;min-width:17.5rem;color:var(--text-body)}.hbll-large{font-weight:400;font-style:normal;max-width:41.25rem;min-width:26.5rem;color:var(--text-body)}a{color:var(--text-link);text-decoration:underline}.hbll-emphasis{font-weight:600}h1{font-size:2rem;line-height:2.5rem}h2{font-size:1.75rem;line-height:2.25rem}h3,h4{font-size:1.5rem;line-height:2rem}h5,h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:.875rem;line-height:1.25rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1rem;line-height:1.5rem}@media screen and (min-width: 52.125em){h1{font-size:3rem;line-height:3.5rem}h2{font-size:2.5rem;line-height:3rem}h3{font-size:2rem;line-height:3rem}h4{font-size:1.75rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}@media screen and (min-width: 90em){h1{font-size:3.75rem;line-height:4.25rem}h2{font-size:3rem;line-height:3.5rem}h3{font-size:2.5rem;line-height:3rem}h4{font-size:2rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}a,button{border:none;background:none;font-family:inherit;padding:0;margin:0;font-size:inherit;color:#0047ba;text-decoration:none;cursor:pointer}a:hover,button:hover{color:#003995}.pill-btn--components{border-radius:100em;padding:.4em 1.3em}:host{box-sizing:border-box}:host *{box-sizing:inherit}.ss-select-wrapper{margin-right:.3em}.ss-row-cancel{color:#aaa;margin-left:.4em;margin-top:.4em}.ss-row-cancel:hover{color:#666}.ss-row-cancel .ss-icon{font-size:1em}.ss-hidden{display:none}#addQueryBtn{display:flex;align-items:center}#addQueryBtn:disabled{color:#999;pointer-events:none}#addQueryBtn .icon{font-size:1em}.ss-adv-search-wrapper{width:100%}h3{font-size:1.13em;font-weight:300;margin-bottom:.7em;margin-top:0}h4{margin-bottom:.3em;font-weight:600}#dateOptions h4{margin-bottom:.8em}.ss-adv-search-row{display:flex;flex-wrap:wrap;width:100%;margin-bottom:.6em}.ss-query-input{display:inline-block;width:100%;margin-top:.25rem}.ss-query-input input{width:100%}.ss-other-options{display:grid;grid-template-columns:repeat(1,1fr);gap:.6em 1.6em;grid-auto-rows:minmax(1em,auto);margin-top:1.4em}.ss-other-options label{margin-right:.625rem}.ss-checkbox-label{display:inline-flex;align-items:flex-start;cursor:pointer}.ss-checkbox-label:not(:last-of-type){margin-bottom:.75em}.ss-checkbox-label .ss-label-text{margin-top:-.1em;margin-left:.45em}.ss-checkbox-section{margin-bottom:.8em}#advSearchFooter{margin-bottom:.5em;display:flex;justify-content:space-between;align-items:center;font-size:1.2em}#advSearchFooter a{font-size:.8em}@media screen and (min-width: 615px){.ss-adv-search-row{flex-wrap:nowrap}.ss-other-options{grid-template-columns:repeat(2,1fr)}.ss-query-input{margin-top:0}#dateOptions .external{grid-column:span 2}}\n"], dependencies: [{ 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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: HbllMultiSelectComponent, selector: "lib-multi-select", inputs: ["allOptions", "label", "selectedKeys"], outputs: ["selectedKeysChange"] }, { kind: "component", type: CheckboxComponent, selector: "lib-checkbox", inputs: ["isChecked", "isIndeterminate", "isSmall", "disabled", "isError", "inputId"], outputs: ["checkedChange"] }, { kind: "component", type: DateRangeComponent, selector: "lib-date-range", inputs: ["from", "to"], outputs: ["validDateChange", "fromChange", "toChange"] }] }); }
|
|
2027
2356
|
}
|
|
2028
2357
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AdvancedSearchComponent, decorators: [{
|
|
2029
2358
|
type: Component,
|
|
@@ -2033,9 +2362,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
2033
2362
|
MatTooltipModule,
|
|
2034
2363
|
MatIconModule,
|
|
2035
2364
|
HbllMultiSelectComponent,
|
|
2036
|
-
|
|
2365
|
+
CheckboxComponent,
|
|
2037
2366
|
DateRangeComponent,
|
|
2038
|
-
], template: "<form\n data-testid=\"advancedSearchForm\"\n (submit)=\"config.scope === 'local' ? doLocalAdvancedSearch() : doExternalAdvancedSearch()\"\n [formGroup]=\"advancedSearchForm\"\n class=\"ss-adv-search-wrapper\"\n>\n <h3>Advanced Search</h3>\n <!-- Queries -->\n @for (query of queries.controls; track $index; let queryIndex = $index) {\n <div class=\"ss-adv-search-row\" [formGroup]=\"query\">\n <!-- Boolean operator -->\n <!-- Add boolean for each row except for first -->\n @if (!$first) {\n <div class=\"ss-select-wrapper\">\n <select\n [id]=\"'boolean' + queryIndex\"\n [formControlName]=\"'boolean'\"\n [attr.data-testid]=\"'boolean' + queryIndex\"\n >\n @for (boolean of advancedSearchOptions.boolean; track boolean) {\n <option [ngValue]=\"boolean\">\n {{ boolean }}\n </option>\n }\n </select>\n </div>\n }\n <!-- Field -->\n <label [for]=\"'field' + queryIndex\" class=\"ss-hidden\">Field {{ queryIndex }}</label>\n <div class=\"ss-select-wrapper\">\n <select\n [id]=\"'field' + queryIndex\"\n [formControlName]=\"'field'\"\n [attr.data-testid]=\"'field' + queryIndex\"\n >\n @for (field of advancedSearchOptions.fields; track field) {\n <option [ngValue]=\"field\">\n {{ advancedSearchFieldMap[field] }}\n </option>\n }\n <optgroup\n [label]=\"(config.scope === 'external' ? 'Online' : 'Library') + ' Specific'\"\n >\n @for (\n field of config.scope === 'external'\n ? advancedSearchOptions.externalFields\n : advancedSearchOptions.localFields;\n track field\n ) {\n <option [ngValue]=\"field\">\n {{ advancedSearchFieldMap[field] }}\n </option>\n }\n </optgroup>\n </select>\n </div>\n <!-- Qualifiers are only available for local searches -->\n @if (config.scope === 'local') {\n <label [for]=\"'qualifier' + queryIndex\" class=\"ss-hidden\"\n >Match Criteria {{ queryIndex }}</label\n >\n <div class=\"ss-select-wrapper\">\n <select\n [id]=\"'qualifier' + queryIndex\"\n [formControlName]=\"'qualifier'\"\n [attr.data-testid]=\"'qualifier' + queryIndex\"\n >\n <!-- $any because a field can technically be local or external, though this block is scoped strictly to local fields -->\n @for (\n qualifier of $any(advancedSearchOptions.qualifiers)[\n query.controls.field.value\n ];\n track qualifier;\n let optionIndex = $index\n ) {\n <option\n [ngValue]=\"qualifier\"\n [attr.data-testid]=\"\n 'qualifier' + queryIndex + '-option' + optionIndex\n \"\n >\n {{ $any(advancedSearchQualifierMap)[qualifier] }}\n </option>\n }\n </select>\n </div>\n }\n <!-- Query -->\n <label [for]=\"'query' + queryIndex\" class=\"ss-hidden\">Query {{ queryIndex }}</label>\n <div class=\"ss-query-input\">\n <input\n #searchInput\n [id]=\"'query' + queryIndex\"\n [formControlName]=\"'query'\"\n [attr.data-testid]=\"'query' + queryIndex\"\n required\n aria-required=\"true\"\n matTooltip=\"Fill out this field\"\n [matTooltipPosition]=\"'above'\"\n [matTooltipDisabled]=\"true\"\n [attr.aria-invalid]=\"isSubmitted && queries.at(0).controls.query.invalid\"\n aria-describedby=\"invalidInputDesc\"\n />\n </div>\n @if (!$first) {\n <button\n class=\"ss-row-cancel\"\n type=\"button\"\n (click)=\"removeQuery(queryIndex)\"\n [attr.data-testid]=\"'cancelRow' + queryIndex\"\n >\n <span class=\"material-symbols-outlined ss-icon\"> cancel </span>\n </button>\n }\n </div>\n }\n <button\n type=\"button\"\n (click)=\"addQuery()\"\n id=\"addQueryBtn\"\n data-testid=\"addQuery\"\n [disabled]=\"queries.length > 11\"\n >\n <span class=\"material-symbols-outlined ss-icon\"> add </span>\n Add a row\n </button>\n <!-- OTHER OPTIONS -->\n <div class=\"ss-other-options\">\n <!-- LOCAL -->\n @if (config.scope === 'local') {\n <!-- Type -->\n <div data-testid=\"resourceType\">\n <h4>Resource Type</h4>\n <div class=\"ss-multi-select-wrapper\">\n <lib-multi-select\n [label]=\"'Resource Type'\"\n [allOptions]=\"advancedSearchOptions.types[config.institution]\"\n [selectedKeys]=\"types.value\"\n (selectedKeysChange)=\"types.setValue($event)\"\n ></lib-multi-select>\n </div>\n </div>\n <!-- Collection -->\n <div data-testid=\"collection\">\n <h4>Collection</h4>\n <div class=\"ss-multi-select-wrapper\">\n <lib-multi-select\n [label]=\"'Collection'\"\n [allOptions]=\"advancedSearchOptions.collections[config.institution]\"\n [selectedKeys]=\"collections.value\"\n (selectedKeysChange)=\"collections.setValue($event)\"\n ></lib-multi-select>\n </div>\n </div>\n <!-- Language -->\n <ng-container *ngTemplateOutlet=\"languageBlock\"></ng-container>\n <!-- Date -->\n <ng-container\n *ngTemplateOutlet=\"dateBlock; context: { header: 'Creation Date' }\"\n ></ng-container>\n }\n <!-- EXTERNAL -->\n @if (config.scope === 'external') {\n <div formGroupName=\"limitResults\" class=\"ss-checkbox-section\">\n <h4>For Fewer Results Try</h4>\n <!-- Peer reviewed -->\n <label class=\"ss-checkbox-label\" for=\"peerReviewed\" tabindex=\"0\">\n <input\n class=\"ss-hidden\"\n id=\"peerReviewed\"\n type=\"checkbox\"\n [formControlName]=\"'peerReviewed'\"\n data-testid=\"peerReviewed\"\n />\n <lib-checkbox [isChecked]=\"peerReviewed.value\"></lib-checkbox>\n <span class=\"ss-label-text\">Peer reviewed journal articles</span>\n </label>\n </div>\n <div formGroupName=\"expandResults\" class=\"ss-checkbox-section\">\n <h4>For More Results Try</h4>\n <!-- Apply equivalent subjects -->\n <label class=\"ss-checkbox-label\" for=\"applyEquivalentSubjects\" tabindex=\"0\">\n <input\n class=\"ss-hidden\"\n id=\"applyEquivalentSubjects\"\n type=\"checkbox\"\n [formControlName]=\"'applyEquivalentSubjects'\"\n data-testid=\"applyEquivalentSubjects\"\n />\n <lib-checkbox [isChecked]=\"applyEquivalentSubjects.value\"></lib-checkbox>\n <span class=\"ss-label-text\">Apply equivalent subjects</span>\n </label>\n <!-- Full text -->\n <label class=\"ss-checkbox-label\" for=\"fullText\" tabindex=\"0\">\n <input\n class=\"ss-hidden\"\n id=\"fullText\"\n type=\"checkbox\"\n [formControlName]=\"'fullText'\"\n data-testid=\"fullText\"\n />\n <lib-checkbox [isChecked]=\"fullText.value\"></lib-checkbox>\n <span class=\"ss-label-text\"\n >Include results the library doesn't have access to</span\n >\n </label>\n </div>\n <!-- Date -->\n <ng-container\n *ngTemplateOutlet=\"dateBlock; context: { header: 'Date Published' }\"\n ></ng-container>\n <!-- Language -->\n <ng-container *ngTemplateOutlet=\"languageBlock\"></ng-container>\n }\n </div>\n <div id=\"advSearchFooter\">\n <a [href]=\"'https://lib.byu.edu/browse/' + config.institution\">Alphabetic Browse</a>\n <button\n class=\"pill-btn--components\"\n [ngClass]=\"{\n ensign: config.institution === 'ensign',\n }\"\n type=\"submit\"\n data-testid=\"advSearchSubmitButton\"\n >\n Search\n </button>\n </div>\n</form>\n\n<ng-template #languageBlock>\n <div>\n <h4>Language</h4>\n <lib-multi-select\n [label]=\"'language'\"\n [allOptions]=\"advancedSearchOptions.languages\"\n [selectedKeys]=\"languages.value\"\n (selectedKeysChange)=\"languages.setValue($any($event))\"\n ></lib-multi-select>\n </div>\n</ng-template>\n<ng-template #dateBlock let-header=\"header\">\n <div id=\"dateOptions\" class=\"external\">\n <h4>{{ header }}</h4>\n <lib-date-range\n [from]=\"from.value\"\n [to]=\"to.value\"\n (fromChange)=\"from.setValue($event)\"\n (toChange)=\"to.setValue($event)\"\n ></lib-date-range>\n </div>\n</ng-template>\n", styles: ["select,textarea,input{appearance:none;font-family:inherit;padding:.38em;border:solid 1px #707070;border-radius:4px;font-size:1em;background-color:#fff}select:focus,textarea:focus,input:focus{outline-color:#3a6093}.ss-select-wrapper{position:relative}.ss-select-wrapper select{cursor:pointer;padding-right:2em}.ss-select-wrapper:after{font-family:Material Symbols Outlined;content:\"arrow_drop_down\";pointer-events:none;top:0;font-size:1.5em;right:.2em;height:100%;position:absolute;display:flex;align-items:center;opacity:70%}.pill-btn--components{background-color:#4070b0;font-size:1em;transition:all .15s;color:#fff;cursor:pointer;font-weight:600;text-align:center}.pill-btn--components:disabled{color:#707070;background-color:#e6e6e6;pointer-events:none}.pill-btn--components:hover{background-color:#6892ca;color:#fff}.destructive.pill-btn--components{background-color:#b04940}.destructive.pill-btn--components:hover{background-color:#c7574d}button.ensign{background-color:#2b6042!important;border-color:#2a6142}button.ensign:hover{background-color:#357551!important}a,button{border:none;background:none;font-family:inherit;padding:0;margin:0;font-size:inherit;color:#1c7ec9;text-decoration:none;cursor:pointer}a:hover,button:hover{color:#8ab6f0}.pill-btn--components{border-radius:100em;padding:.4em 1.3em}:host{box-sizing:border-box}:host *{box-sizing:inherit}.ss-select-wrapper{margin-right:.3em}.ss-row-cancel{color:#aaa;margin-left:.4em;margin-top:.4em}.ss-row-cancel:hover{color:#666}.ss-row-cancel .ss-icon{font-size:1em}.ss-hidden{display:none}#addQueryBtn{display:flex;align-items:center}#addQueryBtn:disabled{color:#999;pointer-events:none}#addQueryBtn .icon{font-size:1em}.ss-adv-search-wrapper{width:100%}h3{font-size:1.13em;font-weight:300;margin-bottom:.7em;margin-top:0}h4{margin-bottom:.3em;font-weight:600}#dateOptions h4{margin-bottom:.8em}.ss-adv-search-row{display:flex;flex-wrap:wrap;width:100%;margin-bottom:.6em}.ss-query-input{display:inline-block;width:100%;margin-top:.25rem}.ss-query-input input{width:100%}.ss-other-options{display:grid;grid-template-columns:repeat(1,1fr);gap:.6em 1.6em;grid-auto-rows:minmax(1em,auto);margin-top:1.4em}.ss-other-options label{margin-right:.625rem}.ss-checkbox-label{display:inline-flex;align-items:flex-start;cursor:pointer}.ss-checkbox-label:not(:last-of-type){margin-bottom:.75em}.ss-checkbox-label .ss-label-text{margin-top:-.1em;margin-left:.45em}.ss-checkbox-section{margin-bottom:.8em}#advSearchFooter{margin-bottom:.5em;display:flex;justify-content:space-between;align-items:center;font-size:1.2em}#advSearchFooter a{font-size:.8em}@media screen and (min-width: 615px){.ss-adv-search-row{flex-wrap:nowrap}.ss-other-options{grid-template-columns:repeat(2,1fr)}.ss-query-input{margin-top:0}#dateOptions .external{grid-column:span 2}}\n"] }]
|
|
2367
|
+
], template: "<form\n data-testid=\"advancedSearchForm\"\n (submit)=\"config.scope === 'local' ? doLocalAdvancedSearch() : doExternalAdvancedSearch()\"\n [formGroup]=\"advancedSearchForm\"\n class=\"ss-adv-search-wrapper\"\n>\n <h3>Advanced Search</h3>\n <!-- Queries -->\n @for (query of queries.controls; track $index; let queryIndex = $index) {\n <div class=\"ss-adv-search-row\" [formGroup]=\"query\">\n <!-- Boolean operator -->\n <!-- Add boolean for each row except for first -->\n @if (!$first) {\n <div class=\"ss-select-wrapper\">\n <select\n [id]=\"'boolean' + queryIndex\"\n [formControlName]=\"'boolean'\"\n [attr.data-testid]=\"'boolean' + queryIndex\"\n >\n @for (boolean of advancedSearchOptions.boolean; track boolean) {\n <option [ngValue]=\"boolean\">\n {{ boolean }}\n </option>\n }\n </select>\n </div>\n }\n <!-- Field -->\n <label [for]=\"'field' + queryIndex\" class=\"ss-hidden\">Field {{ queryIndex }}</label>\n <div class=\"ss-select-wrapper\">\n <select\n [id]=\"'field' + queryIndex\"\n [formControlName]=\"'field'\"\n [attr.data-testid]=\"'field' + queryIndex\"\n >\n @for (field of advancedSearchOptions.fields; track field) {\n <option [ngValue]=\"field\">\n {{ advancedSearchFieldMap[field] }}\n </option>\n }\n <optgroup\n [label]=\"(config.scope === 'external' ? 'Online' : 'Library') + ' Specific'\"\n >\n @for (\n field of config.scope === 'external'\n ? advancedSearchOptions.externalFields\n : advancedSearchOptions.localFields;\n track field\n ) {\n <option [ngValue]=\"field\">\n {{ advancedSearchFieldMap[field] }}\n </option>\n }\n </optgroup>\n </select>\n </div>\n <!-- Qualifiers are only available for local searches -->\n @if (config.scope === 'local') {\n <label [for]=\"'qualifier' + queryIndex\" class=\"ss-hidden\"\n >Match Criteria {{ queryIndex }}</label\n >\n <div class=\"ss-select-wrapper\">\n <select\n [id]=\"'qualifier' + queryIndex\"\n [formControlName]=\"'qualifier'\"\n [attr.data-testid]=\"'qualifier' + queryIndex\"\n >\n <!-- $any because a field can technically be local or external, though this block is scoped strictly to local fields -->\n @for (\n qualifier of $any(advancedSearchOptions.qualifiers)[\n query.controls.field.value\n ];\n track qualifier;\n let optionIndex = $index\n ) {\n <option\n [ngValue]=\"qualifier\"\n [attr.data-testid]=\"\n 'qualifier' + queryIndex + '-option' + optionIndex\n \"\n >\n {{ $any(advancedSearchQualifierMap)[qualifier] }}\n </option>\n }\n </select>\n </div>\n }\n <!-- Query -->\n <label [for]=\"'query' + queryIndex\" class=\"ss-hidden\">Query {{ queryIndex }}</label>\n <div class=\"ss-query-input\">\n <input\n #searchInput\n [id]=\"'query' + queryIndex\"\n [formControlName]=\"'query'\"\n [attr.data-testid]=\"'query' + queryIndex\"\n required\n aria-required=\"true\"\n matTooltip=\"Fill out this field\"\n [matTooltipPosition]=\"'above'\"\n [matTooltipDisabled]=\"true\"\n [attr.aria-invalid]=\"isSubmitted && queries.at(0).controls.query.invalid\"\n aria-describedby=\"invalidInputDesc\"\n />\n </div>\n @if (!$first) {\n <button\n class=\"ss-row-cancel\"\n type=\"button\"\n (click)=\"removeQuery(queryIndex)\"\n [attr.data-testid]=\"'cancelRow' + queryIndex\"\n >\n <span class=\"material-symbols-outlined ss-icon\"> cancel </span>\n </button>\n }\n </div>\n }\n <button\n type=\"button\"\n (click)=\"addQuery()\"\n id=\"addQueryBtn\"\n data-testid=\"addQuery\"\n [disabled]=\"queries.length > 11\"\n >\n <span class=\"material-symbols-outlined ss-icon\"> add </span>\n Add a row\n </button>\n <!-- OTHER OPTIONS -->\n <div class=\"ss-other-options\">\n <!-- LOCAL -->\n @if (config.scope === 'local') {\n <!-- Type -->\n <div data-testid=\"resourceType\">\n <h4>Resource Type</h4>\n <div class=\"ss-multi-select-wrapper\">\n <lib-multi-select\n [label]=\"'Resource Type'\"\n [allOptions]=\"advancedSearchOptions.types[config.institution]\"\n [selectedKeys]=\"types.value\"\n (selectedKeysChange)=\"types.setValue($event)\"\n ></lib-multi-select>\n </div>\n </div>\n <!-- Collection -->\n <div data-testid=\"collection\">\n <h4>Collection</h4>\n <div class=\"ss-multi-select-wrapper\">\n <lib-multi-select\n [label]=\"'Collection'\"\n [allOptions]=\"advancedSearchOptions.collections[config.institution]\"\n [selectedKeys]=\"collections.value\"\n (selectedKeysChange)=\"collections.setValue($event)\"\n ></lib-multi-select>\n </div>\n </div>\n <!-- Language -->\n <ng-container *ngTemplateOutlet=\"languageBlock\"></ng-container>\n <!-- Date -->\n <ng-container\n *ngTemplateOutlet=\"dateBlock; context: { header: 'Creation Date' }\"\n ></ng-container>\n }\n <!-- EXTERNAL -->\n @if (config.scope === 'external') {\n <div formGroupName=\"limitResults\" class=\"ss-checkbox-section\">\n <h4>For Fewer Results Try</h4>\n <!-- Peer reviewed -->\n <label class=\"ss-checkbox-label\" for=\"peerReviewed\" tabindex=\"0\">\n <input\n class=\"ss-hidden\"\n id=\"peerReviewed\"\n type=\"checkbox\"\n [formControlName]=\"'peerReviewed'\"\n data-testid=\"peerReviewed\"\n />\n <lib-checkbox [isChecked]=\"peerReviewed.value\"></lib-checkbox>\n <span class=\"ss-label-text\">Peer reviewed journal articles</span>\n </label>\n </div>\n <div formGroupName=\"expandResults\" class=\"ss-checkbox-section\">\n <h4>For More Results Try</h4>\n <!-- Apply equivalent subjects -->\n <label class=\"ss-checkbox-label\" for=\"applyEquivalentSubjects\" tabindex=\"0\">\n <input\n class=\"ss-hidden\"\n id=\"applyEquivalentSubjects\"\n type=\"checkbox\"\n [formControlName]=\"'applyEquivalentSubjects'\"\n data-testid=\"applyEquivalentSubjects\"\n />\n <lib-checkbox [isChecked]=\"applyEquivalentSubjects.value\"></lib-checkbox>\n <span class=\"ss-label-text\">Apply equivalent subjects</span>\n </label>\n <!-- Full text -->\n <label class=\"ss-checkbox-label\" for=\"fullText\" tabindex=\"0\">\n <input\n class=\"ss-hidden\"\n id=\"fullText\"\n type=\"checkbox\"\n [formControlName]=\"'fullText'\"\n data-testid=\"fullText\"\n />\n <lib-checkbox [isChecked]=\"fullText.value\"></lib-checkbox>\n <span class=\"ss-label-text\"\n >Include results the library doesn't have access to</span\n >\n </label>\n </div>\n <!-- Date -->\n <ng-container\n *ngTemplateOutlet=\"dateBlock; context: { header: 'Date Published' }\"\n ></ng-container>\n <!-- Language -->\n <ng-container *ngTemplateOutlet=\"languageBlock\"></ng-container>\n }\n </div>\n <div id=\"advSearchFooter\">\n <a [href]=\"'https://lib.byu.edu/browse/' + config.institution\">Alphabetic Browse</a>\n <button\n class=\"pill-btn--components\"\n [ngClass]=\"{\n ensign: config.institution === 'ensign',\n }\"\n type=\"submit\"\n data-testid=\"advSearchSubmitButton\"\n >\n Search\n </button>\n </div>\n</form>\n\n<ng-template #languageBlock>\n <div>\n <h4>Language</h4>\n <lib-multi-select\n [label]=\"'language'\"\n [allOptions]=\"advancedSearchOptions.languages\"\n [selectedKeys]=\"languages.value\"\n (selectedKeysChange)=\"languages.setValue($any($event))\"\n ></lib-multi-select>\n </div>\n</ng-template>\n<ng-template #dateBlock let-header=\"header\">\n <div id=\"dateOptions\" class=\"external\">\n <h4>{{ header }}</h4>\n <lib-date-range\n [from]=\"from.value\"\n [to]=\"to.value\"\n (fromChange)=\"from.setValue($event)\"\n (toChange)=\"to.setValue($event)\"\n ></lib-date-range>\n </div>\n</ng-template>\n", styles: ["select,textarea,input{appearance:none;font-family:inherit;padding:.38em;border:solid 1px #707070;border-radius:4px;font-size:1em;background-color:#fff}select:focus,textarea:focus,input:focus{outline-color:#3a6093}.ss-select-wrapper{position:relative}.ss-select-wrapper select{cursor:pointer;padding-right:2em}.ss-select-wrapper:after{font-family:Material Symbols Outlined;content:\"arrow_drop_down\";pointer-events:none;top:0;font-size:1.5em;right:.2em;height:100%;position:absolute;display:flex;align-items:center;opacity:70%}.pill-btn--components{background-color:#4070b0;font-size:1em;transition:all .15s;color:#fff;cursor:pointer;font-weight:600;text-align:center}.pill-btn--components:disabled{color:#707070;background-color:#e6e6e6;pointer-events:none}.pill-btn--components:hover{background-color:#6892ca;color:#fff}.destructive.pill-btn--components{background-color:#b04940}.destructive.pill-btn--components:hover{background-color:#c7574d}button.ensign{background-color:#2b6042!important;border-color:#2a6142}button.ensign:hover{background-color:#357551!important}html{border:0;margin:0;padding:0;-webkit-text-size-adjust:100%}body{margin:0;padding:0}*,*:before,*:after{box-sizing:border-box}:root{--color-navy: #00245d;--color-royal: #0047ba;--color-white: #ffffff;--color-blue-500: #00245d;--color-blue-400: #003995;--color-blue-300: #0047ba;--color-blue-200: #336cc8;--color-blue-150: #ccdaf1;--color-blue-100: #e5edf8;--color-gray-500: #141414;--color-gray-400: #737373;--color-gray-300: #8f8f8f;--color-gray-200: #d0d0d0;--color-gray-100: #e7e7e7;--color-gray-50: #f9f9f9;--color-gray-brand-400: #737373;--color-green-500: #1d562e;--color-green-400: #2e8545;--color-green-300: #3ba35a;--color-green-200: #9dd1ac;--color-green-100: #ebf6ee;--color-teal-500: #26485f;--color-teal-400: #3e7295;--color-teal-300: #457fa6;--color-teal-200: #a2bfd3;--color-teal-100: #ecf2f6;--color-red-500: #702121;--color-red-400: #b33837;--color-red-300: #c73e3d;--color-red-200: #e39e9e;--color-red-100: #f9ecec;--color-yellow-500: #635f04;--color-yellow-400: #928c30;--color-yellow-300: #d1c844;--color-yellow-200: #e8e3a1;--color-yellow-100: #f2f0e9;--color-purple-focus: #b967c7;--text-heading: #002e5d;--text-secondary-heading: #737373;--text-body: #141414;--text-disabled: #737373;--text-link: #336cc8;--text-on-action: #ffffff;--text-success: #1d562e;--text-info: #26485f;--text-error: #702121;--text-warning: #635f04;--surface-success: #ebf6ee;--surface-info: #ecf2f6;--surface-error: #f9ecec;--surface-warning: #f2f0e9;--focus-ring-color: #b967c7}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Light.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Regular.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Semibold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Bold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-LightItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Italic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-SemiboldItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-BoldItalic.ttf) format(\"truetype\");font-display:swap}h1,h2,h3,h4,h5,h6,span:not(.material-symbols-outlined),a,p{font-family:Source Sans Pro}h1{font-weight:300;font-style:normal;color:var(--text-heading)}h2{font-weight:400;font-style:normal;color:var(--text-heading)}h3{font-weight:700;font-style:normal;color:var(--text-heading)}h4,h5,h6{font-weight:600;font-style:normal;color:var(--text-secondary-heading)}.hbll-default-body{font-weight:400;font-style:normal;max-width:35rem;min-width:22.25rem;color:var(--text-body)}.hbll-caption{font-weight:400;font-style:normal;max-width:25.25rem;min-width:17.5rem;color:var(--text-body)}.hbll-large{font-weight:400;font-style:normal;max-width:41.25rem;min-width:26.5rem;color:var(--text-body)}a{color:var(--text-link);text-decoration:underline}.hbll-emphasis{font-weight:600}h1{font-size:2rem;line-height:2.5rem}h2{font-size:1.75rem;line-height:2.25rem}h3,h4{font-size:1.5rem;line-height:2rem}h5,h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:.875rem;line-height:1.25rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1rem;line-height:1.5rem}@media screen and (min-width: 52.125em){h1{font-size:3rem;line-height:3.5rem}h2{font-size:2.5rem;line-height:3rem}h3{font-size:2rem;line-height:3rem}h4{font-size:1.75rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}@media screen and (min-width: 90em){h1{font-size:3.75rem;line-height:4.25rem}h2{font-size:3rem;line-height:3.5rem}h3{font-size:2.5rem;line-height:3rem}h4{font-size:2rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}a,button{border:none;background:none;font-family:inherit;padding:0;margin:0;font-size:inherit;color:#0047ba;text-decoration:none;cursor:pointer}a:hover,button:hover{color:#003995}.pill-btn--components{border-radius:100em;padding:.4em 1.3em}:host{box-sizing:border-box}:host *{box-sizing:inherit}.ss-select-wrapper{margin-right:.3em}.ss-row-cancel{color:#aaa;margin-left:.4em;margin-top:.4em}.ss-row-cancel:hover{color:#666}.ss-row-cancel .ss-icon{font-size:1em}.ss-hidden{display:none}#addQueryBtn{display:flex;align-items:center}#addQueryBtn:disabled{color:#999;pointer-events:none}#addQueryBtn .icon{font-size:1em}.ss-adv-search-wrapper{width:100%}h3{font-size:1.13em;font-weight:300;margin-bottom:.7em;margin-top:0}h4{margin-bottom:.3em;font-weight:600}#dateOptions h4{margin-bottom:.8em}.ss-adv-search-row{display:flex;flex-wrap:wrap;width:100%;margin-bottom:.6em}.ss-query-input{display:inline-block;width:100%;margin-top:.25rem}.ss-query-input input{width:100%}.ss-other-options{display:grid;grid-template-columns:repeat(1,1fr);gap:.6em 1.6em;grid-auto-rows:minmax(1em,auto);margin-top:1.4em}.ss-other-options label{margin-right:.625rem}.ss-checkbox-label{display:inline-flex;align-items:flex-start;cursor:pointer}.ss-checkbox-label:not(:last-of-type){margin-bottom:.75em}.ss-checkbox-label .ss-label-text{margin-top:-.1em;margin-left:.45em}.ss-checkbox-section{margin-bottom:.8em}#advSearchFooter{margin-bottom:.5em;display:flex;justify-content:space-between;align-items:center;font-size:1.2em}#advSearchFooter a{font-size:.8em}@media screen and (min-width: 615px){.ss-adv-search-row{flex-wrap:nowrap}.ss-other-options{grid-template-columns:repeat(2,1fr)}.ss-query-input{margin-top:0}#dateOptions .external{grid-column:span 2}}\n"] }]
|
|
2039
2368
|
}], propDecorators: { config: [{
|
|
2040
2369
|
type: Input,
|
|
2041
2370
|
args: [{ required: true }]
|
|
@@ -2213,11 +2542,11 @@ class SimpleSearchComponent {
|
|
|
2213
2542
|
}
|
|
2214
2543
|
}
|
|
2215
2544
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SimpleSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2216
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: SimpleSearchComponent, isStandalone: true, selector: "lib-ss-simple-search", inputs: { searchText: { classPropertyName: "searchText", publicName: "searchText", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: false, isRequired: true, transformFunction: null }, supportedSuggestionScopes: { classPropertyName: "supportedSuggestionScopes", publicName: "supportedSuggestionScopes", isSignal: false, isRequired: false, transformFunction: null }, suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { searchText: "searchTextChange", simpleSearch: "simpleSearch", clearSimpleSearch: "clearSimpleSearch", suggest: "suggest" }, host: { listeners: { "document:click": "onDocumentClick($event)", "focusout": "onFocusOut($event)" } }, viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "inputTooltip", first: true, predicate: MatTooltip, descendants: true }, { propertyName: "suggestionItems", predicate: ["suggestionItem"], descendants: true }], ngImport: i0, template: "<div class=\"ss-container\">\n <form [formGroup]=\"searchForm\" (submit)=\"emitSimpleSearch()\" data-testid=\"searchForm\">\n <input\n #searchInput\n data-testid=\"searchInput\"\n id=\"q\"\n name=\"q\"\n type=\"text\"\n autocomplete=\"off\"\n required\n aria-required=\"true\"\n aria-label=\"search input\"\n autocapitalize=\"off\"\n formControlName=\"simpleQuery\"\n matTooltip=\"Fill out this field\"\n [matTooltipPosition]=\"'above'\"\n [matTooltipDisabled]=\"true\"\n [attr.aria-invalid]=\"isSubmitted && simpleQuery.invalid\"\n (keydown)=\"onInputKeydown($event)\"\n />\n <label for=\"q\" data-testid=\"label\">{{\n config.scope === 'local'\n ? 'Books, media, special collections and more'\n : 'Ebooks, articles, journals, databases, streaming media and more'\n }}</label>\n <button\n type=\"submit\"\n aria-label=\"search\"\n data-testid=\"searchBtn\"\n [ngClass]=\"{ ensign: config.institution === 'ensign' }\"\n >\n <span class=\"material-symbols-outlined ss-icon\"> search </span>\n </button>\n </form>\n\n @if (simpleQuery.value) {\n <button id=\"clear\" (click)=\"clearQuery()\" data-testid=\"clearBtn\">\n <span class=\"material-symbols-outlined ss-icon\"> cancel </span>\n </button>\n }\n\n @if (showSuggestions && suggestions.length > 0) {\n <ul class=\"suggestions-list\" role=\"listbox\" data-testid=\"suggestionsList\">\n @for (suggestion of suggestions; track $index; let i = $index) {\n <li\n #suggestionItem\n class=\"suggestion-item\"\n [class.selected]=\"i === selectedSuggestionIndex\"\n (click)=\"selectSuggestion(suggestion)\"\n (keydown.enter)=\"selectSuggestion(suggestion)\"\n (keydown.space)=\"selectSuggestion(suggestion); $event.preventDefault()\"\n role=\"option\"\n tabindex=\"0\"\n [attr.aria-selected]=\"i === selectedSuggestionIndex\"\n data-testid=\"suggestionItem\"\n >\n <span class=\"suggestion-text\" [title]=\"suggestion\">\n {{\n expandedSuggestions.has(i) || suggestion.length <= 500\n ? suggestion\n : (suggestion | slice: 0 : 500) + '...'\n }}\n </span>\n @if (suggestion.length > 500) {\n <button\n class=\"expand-btn\"\n (click)=\"toggleExpand(i, $event)\"\n [attr.aria-label]=\"\n expandedSuggestions.has(i) ? 'Collapse' : 'Expand suggestion'\n \"\n >\n <span class=\"material-symbols-outlined\">\n {{ expandedSuggestions.has(i) ? 'expand_less' : 'expand_more' }}\n </span>\n </button>\n }\n </li>\n }\n </ul>\n }\n</div>\n", styles: ["a,button{border:none;background:none;font-family:inherit;padding:0;margin:0;font-size:inherit;color:#1c7ec9;text-decoration:none;cursor:pointer}a:hover,button:hover{color:#8ab6f0}.ss-container{position:relative}form{display:flex}.ss-icon{font-size:1em}button[type=submit]{background:#fff;border-radius:0 4px 4px 0;margin:0;width:3em;cursor:pointer;display:flex;justify-content:center;align-items:center;transition:color .2s,background-color .2s}button[type=submit] .ss-icon{color:#0047ba;font-size:1.7em}button[type=submit]:hover .ss-icon{color:#6892ca}button[type=submit].ensign .ss-icon{color:#2b6042}button[type=submit].ensign .ss-icon:hover{color:#357551}#clear{position:absolute;right:3em;top:0%;height:100%;display:flex;justify-content:center;align-items:center;padding:0 0 0 .375rem}#clear .ss-icon{height:auto;color:#acacac;transition:color ease-in-out .05s}#clear:hover .ss-icon{color:#666}input[type=text]{background-color:#fff;color:#000;font-family:inherit;border:none;font-weight:600;margin:0;overflow:hidden;cursor:text;width:calc(100% - 3em);font-size:1em;border-radius:4px 0 0 4px;padding:.56em 2em .56em .56em}input[type=text]:focus{outline:none}input[type=text]:valid+label,input[type=text]:focus+label{font-size:.75em;top:-.8em;padding-top:0;padding-bottom:0;pointer-events:none;margin-top:0;margin-left:.56em;cursor:default}input[type=text]:valid+label:before,input[type=text]:focus+label:before{opacity:1}label{cursor:text;transition:all .1s ease-in-out;position:absolute;padding:.5em .28em;margin-left:.28em;left:0;color:#707070;z-index:1;max-width:calc(100% - 3.4em);white-space:nowrap;line-height:normal;overflow:hidden;text-overflow:ellipsis;border-radius:4px}label:before{transition:all .1s ease-in-out;background-color:#fff;content:\"\";position:absolute;inset:0;opacity:0;z-index:-1}.suggestions-list{position:absolute;top:100%;left:0;right:0;background:#fff;border:1px solid #d0d0d0;border-top:none;border-radius:0 0 4px 4px;list-style:none;margin:0;padding:0;max-height:300px;overflow-y:auto;box-shadow:0 4px 6px #0000001a;z-index:1000}.suggestion-item{padding:.75em 1em;cursor:pointer;transition:background-color .15s ease;color:#333;font-size:1em;display:flex;align-items:center;gap:.5em}.suggestion-item:hover,.suggestion-item.selected{background-color:#f0f0f0}.suggestion-item.selected{background-color:#e6f2ff}.suggestion-item:last-child{border-radius:0 0 4px 4px}.suggestion-text{flex:1;overflow-wrap:break-word}.expand-btn{background:none;border:none;cursor:pointer;padding:2px;display:flex;align-items:center;justify-content:center;color:#707070;border-radius:50%;transition:background-color .2s}.expand-btn:hover{background-color:#0000000d;color:#0047ba}.expand-btn .material-symbols-outlined{font-size:1.25em}\n"], dependencies: [{ kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }] }); }
|
|
2545
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: SimpleSearchComponent, isStandalone: true, selector: "lib-ss-simple-search", inputs: { searchText: { classPropertyName: "searchText", publicName: "searchText", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: false, isRequired: true, transformFunction: null }, supportedSuggestionScopes: { classPropertyName: "supportedSuggestionScopes", publicName: "supportedSuggestionScopes", isSignal: false, isRequired: false, transformFunction: null }, suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { searchText: "searchTextChange", simpleSearch: "simpleSearch", clearSimpleSearch: "clearSimpleSearch", suggest: "suggest" }, host: { listeners: { "document:click": "onDocumentClick($event)", "focusout": "onFocusOut($event)" } }, viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "inputTooltip", first: true, predicate: MatTooltip, descendants: true }, { propertyName: "suggestionItems", predicate: ["suggestionItem"], descendants: true }], ngImport: i0, template: "<div class=\"ss-container\">\n <form [formGroup]=\"searchForm\" (submit)=\"emitSimpleSearch()\" data-testid=\"searchForm\">\n <input\n #searchInput\n data-testid=\"searchInput\"\n id=\"q\"\n name=\"q\"\n type=\"text\"\n autocomplete=\"off\"\n required\n aria-required=\"true\"\n aria-label=\"search input\"\n autocapitalize=\"off\"\n formControlName=\"simpleQuery\"\n matTooltip=\"Fill out this field\"\n [matTooltipPosition]=\"'above'\"\n [matTooltipDisabled]=\"true\"\n [attr.aria-invalid]=\"isSubmitted && simpleQuery.invalid\"\n (keydown)=\"onInputKeydown($event)\"\n />\n <label for=\"q\" data-testid=\"label\">{{\n config.scope === 'local'\n ? 'Books, media, special collections and more'\n : 'Ebooks, articles, journals, databases, streaming media and more'\n }}</label>\n <button\n type=\"submit\"\n aria-label=\"search\"\n data-testid=\"searchBtn\"\n [ngClass]=\"{ ensign: config.institution === 'ensign' }\"\n >\n <span class=\"material-symbols-outlined ss-icon\"> search </span>\n </button>\n </form>\n\n @if (simpleQuery.value) {\n <button id=\"clear\" (click)=\"clearQuery()\" data-testid=\"clearBtn\">\n <span class=\"material-symbols-outlined ss-icon\"> cancel </span>\n </button>\n }\n\n @if (showSuggestions && suggestions.length > 0) {\n <ul class=\"suggestions-list\" role=\"listbox\" data-testid=\"suggestionsList\">\n @for (suggestion of suggestions; track $index; let i = $index) {\n <li\n #suggestionItem\n class=\"suggestion-item\"\n [class.selected]=\"i === selectedSuggestionIndex\"\n (click)=\"selectSuggestion(suggestion)\"\n (keydown.enter)=\"selectSuggestion(suggestion)\"\n (keydown.space)=\"selectSuggestion(suggestion); $event.preventDefault()\"\n role=\"option\"\n tabindex=\"0\"\n [attr.aria-selected]=\"i === selectedSuggestionIndex\"\n data-testid=\"suggestionItem\"\n >\n <span class=\"suggestion-text\" [title]=\"suggestion\">\n {{\n expandedSuggestions.has(i) || suggestion.length <= 500\n ? suggestion\n : (suggestion | slice: 0 : 500) + '...'\n }}\n </span>\n @if (suggestion.length > 500) {\n <button\n class=\"expand-btn\"\n (click)=\"toggleExpand(i, $event)\"\n [attr.aria-label]=\"\n expandedSuggestions.has(i) ? 'Collapse' : 'Expand suggestion'\n \"\n >\n <span class=\"material-symbols-outlined\">\n {{ expandedSuggestions.has(i) ? 'expand_less' : 'expand_more' }}\n </span>\n </button>\n }\n </li>\n }\n </ul>\n }\n</div>\n", styles: ["html{border:0;margin:0;padding:0;-webkit-text-size-adjust:100%}body{margin:0;padding:0}*,*:before,*:after{box-sizing:border-box}:root{--color-navy: #00245d;--color-royal: #0047ba;--color-white: #ffffff;--color-blue-500: #00245d;--color-blue-400: #003995;--color-blue-300: #0047ba;--color-blue-200: #336cc8;--color-blue-150: #ccdaf1;--color-blue-100: #e5edf8;--color-gray-500: #141414;--color-gray-400: #737373;--color-gray-300: #8f8f8f;--color-gray-200: #d0d0d0;--color-gray-100: #e7e7e7;--color-gray-50: #f9f9f9;--color-gray-brand-400: #737373;--color-green-500: #1d562e;--color-green-400: #2e8545;--color-green-300: #3ba35a;--color-green-200: #9dd1ac;--color-green-100: #ebf6ee;--color-teal-500: #26485f;--color-teal-400: #3e7295;--color-teal-300: #457fa6;--color-teal-200: #a2bfd3;--color-teal-100: #ecf2f6;--color-red-500: #702121;--color-red-400: #b33837;--color-red-300: #c73e3d;--color-red-200: #e39e9e;--color-red-100: #f9ecec;--color-yellow-500: #635f04;--color-yellow-400: #928c30;--color-yellow-300: #d1c844;--color-yellow-200: #e8e3a1;--color-yellow-100: #f2f0e9;--color-purple-focus: #b967c7;--text-heading: #002e5d;--text-secondary-heading: #737373;--text-body: #141414;--text-disabled: #737373;--text-link: #336cc8;--text-on-action: #ffffff;--text-success: #1d562e;--text-info: #26485f;--text-error: #702121;--text-warning: #635f04;--surface-success: #ebf6ee;--surface-info: #ecf2f6;--surface-error: #f9ecec;--surface-warning: #f2f0e9;--focus-ring-color: #b967c7}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Light.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Regular.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Semibold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Bold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-LightItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Italic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-SemiboldItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-BoldItalic.ttf) format(\"truetype\");font-display:swap}h1,h2,h3,h4,h5,h6,span:not(.material-symbols-outlined),a,p{font-family:Source Sans Pro}h1{font-weight:300;font-style:normal;color:var(--text-heading)}h2{font-weight:400;font-style:normal;color:var(--text-heading)}h3{font-weight:700;font-style:normal;color:var(--text-heading)}h4,h5,h6{font-weight:600;font-style:normal;color:var(--text-secondary-heading)}.hbll-default-body{font-weight:400;font-style:normal;max-width:35rem;min-width:22.25rem;color:var(--text-body)}.hbll-caption{font-weight:400;font-style:normal;max-width:25.25rem;min-width:17.5rem;color:var(--text-body)}.hbll-large{font-weight:400;font-style:normal;max-width:41.25rem;min-width:26.5rem;color:var(--text-body)}a{color:var(--text-link);text-decoration:underline}.hbll-emphasis{font-weight:600}h1{font-size:2rem;line-height:2.5rem}h2{font-size:1.75rem;line-height:2.25rem}h3,h4{font-size:1.5rem;line-height:2rem}h5,h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:.875rem;line-height:1.25rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1rem;line-height:1.5rem}@media screen and (min-width: 52.125em){h1{font-size:3rem;line-height:3.5rem}h2{font-size:2.5rem;line-height:3rem}h3{font-size:2rem;line-height:3rem}h4{font-size:1.75rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}@media screen and (min-width: 90em){h1{font-size:3.75rem;line-height:4.25rem}h2{font-size:3rem;line-height:3.5rem}h3{font-size:2.5rem;line-height:3rem}h4{font-size:2rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}a,button{border:none;background:none;font-family:inherit;padding:0;margin:0;font-size:inherit;color:#0047ba;text-decoration:none;cursor:pointer}a:hover,button:hover{color:#003995}.ss-container{position:relative}form{display:flex}.ss-icon{font-size:1em}button[type=submit]{background:#fff;border-radius:0 4px 4px 0;margin:0;width:3em;cursor:pointer;display:flex;justify-content:center;align-items:center;transition:color .2s,background-color .2s}button[type=submit] .ss-icon{color:#0047ba;font-size:1.7em}button[type=submit]:hover .ss-icon{color:#6892ca}button[type=submit].ensign .ss-icon{color:#2b6042}button[type=submit].ensign .ss-icon:hover{color:#357551}#clear{position:absolute;right:3em;top:0%;height:100%;display:flex;justify-content:center;align-items:center;padding:0 0 0 .375rem}#clear .ss-icon{height:auto;color:#acacac;transition:color ease-in-out .05s}#clear:hover .ss-icon{color:#666}input[type=text]{background-color:#fff;color:#000;font-family:inherit;border:none;font-weight:600;margin:0;overflow:hidden;cursor:text;width:calc(100% - 3em);font-size:1em;border-radius:4px 0 0 4px;padding:.56em 2em .56em .56em}input[type=text]:focus{outline:none}input[type=text]:valid+label,input[type=text]:focus+label{font-size:.75em;top:-.8em;padding-top:0;padding-bottom:0;pointer-events:none;margin-top:0;margin-left:.56em;cursor:default}input[type=text]:valid+label:before,input[type=text]:focus+label:before{opacity:1}label{cursor:text;transition:all .1s ease-in-out;position:absolute;padding:.5em .28em;margin-left:.28em;left:0;color:#707070;z-index:1;max-width:calc(100% - 3.4em);white-space:nowrap;line-height:normal;overflow:hidden;text-overflow:ellipsis;border-radius:4px}label:before{transition:all .1s ease-in-out;background-color:#fff;content:\"\";position:absolute;inset:0;opacity:0;z-index:-1}.suggestions-list{position:absolute;top:100%;left:0;right:0;background:#fff;border:1px solid #d0d0d0;border-top:none;border-radius:0 0 4px 4px;list-style:none;margin:0;padding:0;max-height:300px;overflow-y:auto;box-shadow:0 4px 6px #0000001a;z-index:1000}.suggestion-item{padding:.75em 1em;cursor:pointer;transition:background-color .15s ease;color:#333;font-size:1em;display:flex;align-items:center;gap:.5em}.suggestion-item:hover,.suggestion-item.selected{background-color:#f0f0f0}.suggestion-item.selected{background-color:#e6f2ff}.suggestion-item:last-child{border-radius:0 0 4px 4px}.suggestion-text{flex:1;overflow-wrap:break-word}.expand-btn{background:none;border:none;cursor:pointer;padding:2px;display:flex;align-items:center;justify-content:center;color:#707070;border-radius:50%;transition:background-color .2s}.expand-btn:hover{background-color:#0000000d;color:#0047ba}.expand-btn .material-symbols-outlined{font-size:1.25em}\n"], dependencies: [{ kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }] }); }
|
|
2217
2546
|
}
|
|
2218
2547
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SimpleSearchComponent, decorators: [{
|
|
2219
2548
|
type: Component,
|
|
2220
|
-
args: [{ selector: 'lib-ss-simple-search', imports: [MatTooltipModule, MatIconModule, ReactiveFormsModule, CommonModule], template: "<div class=\"ss-container\">\n <form [formGroup]=\"searchForm\" (submit)=\"emitSimpleSearch()\" data-testid=\"searchForm\">\n <input\n #searchInput\n data-testid=\"searchInput\"\n id=\"q\"\n name=\"q\"\n type=\"text\"\n autocomplete=\"off\"\n required\n aria-required=\"true\"\n aria-label=\"search input\"\n autocapitalize=\"off\"\n formControlName=\"simpleQuery\"\n matTooltip=\"Fill out this field\"\n [matTooltipPosition]=\"'above'\"\n [matTooltipDisabled]=\"true\"\n [attr.aria-invalid]=\"isSubmitted && simpleQuery.invalid\"\n (keydown)=\"onInputKeydown($event)\"\n />\n <label for=\"q\" data-testid=\"label\">{{\n config.scope === 'local'\n ? 'Books, media, special collections and more'\n : 'Ebooks, articles, journals, databases, streaming media and more'\n }}</label>\n <button\n type=\"submit\"\n aria-label=\"search\"\n data-testid=\"searchBtn\"\n [ngClass]=\"{ ensign: config.institution === 'ensign' }\"\n >\n <span class=\"material-symbols-outlined ss-icon\"> search </span>\n </button>\n </form>\n\n @if (simpleQuery.value) {\n <button id=\"clear\" (click)=\"clearQuery()\" data-testid=\"clearBtn\">\n <span class=\"material-symbols-outlined ss-icon\"> cancel </span>\n </button>\n }\n\n @if (showSuggestions && suggestions.length > 0) {\n <ul class=\"suggestions-list\" role=\"listbox\" data-testid=\"suggestionsList\">\n @for (suggestion of suggestions; track $index; let i = $index) {\n <li\n #suggestionItem\n class=\"suggestion-item\"\n [class.selected]=\"i === selectedSuggestionIndex\"\n (click)=\"selectSuggestion(suggestion)\"\n (keydown.enter)=\"selectSuggestion(suggestion)\"\n (keydown.space)=\"selectSuggestion(suggestion); $event.preventDefault()\"\n role=\"option\"\n tabindex=\"0\"\n [attr.aria-selected]=\"i === selectedSuggestionIndex\"\n data-testid=\"suggestionItem\"\n >\n <span class=\"suggestion-text\" [title]=\"suggestion\">\n {{\n expandedSuggestions.has(i) || suggestion.length <= 500\n ? suggestion\n : (suggestion | slice: 0 : 500) + '...'\n }}\n </span>\n @if (suggestion.length > 500) {\n <button\n class=\"expand-btn\"\n (click)=\"toggleExpand(i, $event)\"\n [attr.aria-label]=\"\n expandedSuggestions.has(i) ? 'Collapse' : 'Expand suggestion'\n \"\n >\n <span class=\"material-symbols-outlined\">\n {{ expandedSuggestions.has(i) ? 'expand_less' : 'expand_more' }}\n </span>\n </button>\n }\n </li>\n }\n </ul>\n }\n</div>\n", styles: ["a,button{border:none;background:none;font-family:inherit;padding:0;margin:0;font-size:inherit;color:#1c7ec9;text-decoration:none;cursor:pointer}a:hover,button:hover{color:#8ab6f0}.ss-container{position:relative}form{display:flex}.ss-icon{font-size:1em}button[type=submit]{background:#fff;border-radius:0 4px 4px 0;margin:0;width:3em;cursor:pointer;display:flex;justify-content:center;align-items:center;transition:color .2s,background-color .2s}button[type=submit] .ss-icon{color:#0047ba;font-size:1.7em}button[type=submit]:hover .ss-icon{color:#6892ca}button[type=submit].ensign .ss-icon{color:#2b6042}button[type=submit].ensign .ss-icon:hover{color:#357551}#clear{position:absolute;right:3em;top:0%;height:100%;display:flex;justify-content:center;align-items:center;padding:0 0 0 .375rem}#clear .ss-icon{height:auto;color:#acacac;transition:color ease-in-out .05s}#clear:hover .ss-icon{color:#666}input[type=text]{background-color:#fff;color:#000;font-family:inherit;border:none;font-weight:600;margin:0;overflow:hidden;cursor:text;width:calc(100% - 3em);font-size:1em;border-radius:4px 0 0 4px;padding:.56em 2em .56em .56em}input[type=text]:focus{outline:none}input[type=text]:valid+label,input[type=text]:focus+label{font-size:.75em;top:-.8em;padding-top:0;padding-bottom:0;pointer-events:none;margin-top:0;margin-left:.56em;cursor:default}input[type=text]:valid+label:before,input[type=text]:focus+label:before{opacity:1}label{cursor:text;transition:all .1s ease-in-out;position:absolute;padding:.5em .28em;margin-left:.28em;left:0;color:#707070;z-index:1;max-width:calc(100% - 3.4em);white-space:nowrap;line-height:normal;overflow:hidden;text-overflow:ellipsis;border-radius:4px}label:before{transition:all .1s ease-in-out;background-color:#fff;content:\"\";position:absolute;inset:0;opacity:0;z-index:-1}.suggestions-list{position:absolute;top:100%;left:0;right:0;background:#fff;border:1px solid #d0d0d0;border-top:none;border-radius:0 0 4px 4px;list-style:none;margin:0;padding:0;max-height:300px;overflow-y:auto;box-shadow:0 4px 6px #0000001a;z-index:1000}.suggestion-item{padding:.75em 1em;cursor:pointer;transition:background-color .15s ease;color:#333;font-size:1em;display:flex;align-items:center;gap:.5em}.suggestion-item:hover,.suggestion-item.selected{background-color:#f0f0f0}.suggestion-item.selected{background-color:#e6f2ff}.suggestion-item:last-child{border-radius:0 0 4px 4px}.suggestion-text{flex:1;overflow-wrap:break-word}.expand-btn{background:none;border:none;cursor:pointer;padding:2px;display:flex;align-items:center;justify-content:center;color:#707070;border-radius:50%;transition:background-color .2s}.expand-btn:hover{background-color:#0000000d;color:#0047ba}.expand-btn .material-symbols-outlined{font-size:1.25em}\n"] }]
|
|
2549
|
+
args: [{ selector: 'lib-ss-simple-search', imports: [MatTooltipModule, MatIconModule, ReactiveFormsModule, CommonModule], template: "<div class=\"ss-container\">\n <form [formGroup]=\"searchForm\" (submit)=\"emitSimpleSearch()\" data-testid=\"searchForm\">\n <input\n #searchInput\n data-testid=\"searchInput\"\n id=\"q\"\n name=\"q\"\n type=\"text\"\n autocomplete=\"off\"\n required\n aria-required=\"true\"\n aria-label=\"search input\"\n autocapitalize=\"off\"\n formControlName=\"simpleQuery\"\n matTooltip=\"Fill out this field\"\n [matTooltipPosition]=\"'above'\"\n [matTooltipDisabled]=\"true\"\n [attr.aria-invalid]=\"isSubmitted && simpleQuery.invalid\"\n (keydown)=\"onInputKeydown($event)\"\n />\n <label for=\"q\" data-testid=\"label\">{{\n config.scope === 'local'\n ? 'Books, media, special collections and more'\n : 'Ebooks, articles, journals, databases, streaming media and more'\n }}</label>\n <button\n type=\"submit\"\n aria-label=\"search\"\n data-testid=\"searchBtn\"\n [ngClass]=\"{ ensign: config.institution === 'ensign' }\"\n >\n <span class=\"material-symbols-outlined ss-icon\"> search </span>\n </button>\n </form>\n\n @if (simpleQuery.value) {\n <button id=\"clear\" (click)=\"clearQuery()\" data-testid=\"clearBtn\">\n <span class=\"material-symbols-outlined ss-icon\"> cancel </span>\n </button>\n }\n\n @if (showSuggestions && suggestions.length > 0) {\n <ul class=\"suggestions-list\" role=\"listbox\" data-testid=\"suggestionsList\">\n @for (suggestion of suggestions; track $index; let i = $index) {\n <li\n #suggestionItem\n class=\"suggestion-item\"\n [class.selected]=\"i === selectedSuggestionIndex\"\n (click)=\"selectSuggestion(suggestion)\"\n (keydown.enter)=\"selectSuggestion(suggestion)\"\n (keydown.space)=\"selectSuggestion(suggestion); $event.preventDefault()\"\n role=\"option\"\n tabindex=\"0\"\n [attr.aria-selected]=\"i === selectedSuggestionIndex\"\n data-testid=\"suggestionItem\"\n >\n <span class=\"suggestion-text\" [title]=\"suggestion\">\n {{\n expandedSuggestions.has(i) || suggestion.length <= 500\n ? suggestion\n : (suggestion | slice: 0 : 500) + '...'\n }}\n </span>\n @if (suggestion.length > 500) {\n <button\n class=\"expand-btn\"\n (click)=\"toggleExpand(i, $event)\"\n [attr.aria-label]=\"\n expandedSuggestions.has(i) ? 'Collapse' : 'Expand suggestion'\n \"\n >\n <span class=\"material-symbols-outlined\">\n {{ expandedSuggestions.has(i) ? 'expand_less' : 'expand_more' }}\n </span>\n </button>\n }\n </li>\n }\n </ul>\n }\n</div>\n", styles: ["html{border:0;margin:0;padding:0;-webkit-text-size-adjust:100%}body{margin:0;padding:0}*,*:before,*:after{box-sizing:border-box}:root{--color-navy: #00245d;--color-royal: #0047ba;--color-white: #ffffff;--color-blue-500: #00245d;--color-blue-400: #003995;--color-blue-300: #0047ba;--color-blue-200: #336cc8;--color-blue-150: #ccdaf1;--color-blue-100: #e5edf8;--color-gray-500: #141414;--color-gray-400: #737373;--color-gray-300: #8f8f8f;--color-gray-200: #d0d0d0;--color-gray-100: #e7e7e7;--color-gray-50: #f9f9f9;--color-gray-brand-400: #737373;--color-green-500: #1d562e;--color-green-400: #2e8545;--color-green-300: #3ba35a;--color-green-200: #9dd1ac;--color-green-100: #ebf6ee;--color-teal-500: #26485f;--color-teal-400: #3e7295;--color-teal-300: #457fa6;--color-teal-200: #a2bfd3;--color-teal-100: #ecf2f6;--color-red-500: #702121;--color-red-400: #b33837;--color-red-300: #c73e3d;--color-red-200: #e39e9e;--color-red-100: #f9ecec;--color-yellow-500: #635f04;--color-yellow-400: #928c30;--color-yellow-300: #d1c844;--color-yellow-200: #e8e3a1;--color-yellow-100: #f2f0e9;--color-purple-focus: #b967c7;--text-heading: #002e5d;--text-secondary-heading: #737373;--text-body: #141414;--text-disabled: #737373;--text-link: #336cc8;--text-on-action: #ffffff;--text-success: #1d562e;--text-info: #26485f;--text-error: #702121;--text-warning: #635f04;--surface-success: #ebf6ee;--surface-info: #ecf2f6;--surface-error: #f9ecec;--surface-warning: #f2f0e9;--focus-ring-color: #b967c7}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Light.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Regular.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Semibold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Bold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-LightItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Italic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-SemiboldItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-BoldItalic.ttf) format(\"truetype\");font-display:swap}h1,h2,h3,h4,h5,h6,span:not(.material-symbols-outlined),a,p{font-family:Source Sans Pro}h1{font-weight:300;font-style:normal;color:var(--text-heading)}h2{font-weight:400;font-style:normal;color:var(--text-heading)}h3{font-weight:700;font-style:normal;color:var(--text-heading)}h4,h5,h6{font-weight:600;font-style:normal;color:var(--text-secondary-heading)}.hbll-default-body{font-weight:400;font-style:normal;max-width:35rem;min-width:22.25rem;color:var(--text-body)}.hbll-caption{font-weight:400;font-style:normal;max-width:25.25rem;min-width:17.5rem;color:var(--text-body)}.hbll-large{font-weight:400;font-style:normal;max-width:41.25rem;min-width:26.5rem;color:var(--text-body)}a{color:var(--text-link);text-decoration:underline}.hbll-emphasis{font-weight:600}h1{font-size:2rem;line-height:2.5rem}h2{font-size:1.75rem;line-height:2.25rem}h3,h4{font-size:1.5rem;line-height:2rem}h5,h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:.875rem;line-height:1.25rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1rem;line-height:1.5rem}@media screen and (min-width: 52.125em){h1{font-size:3rem;line-height:3.5rem}h2{font-size:2.5rem;line-height:3rem}h3{font-size:2rem;line-height:3rem}h4{font-size:1.75rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}@media screen and (min-width: 90em){h1{font-size:3.75rem;line-height:4.25rem}h2{font-size:3rem;line-height:3.5rem}h3{font-size:2.5rem;line-height:3rem}h4{font-size:2rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}a,button{border:none;background:none;font-family:inherit;padding:0;margin:0;font-size:inherit;color:#0047ba;text-decoration:none;cursor:pointer}a:hover,button:hover{color:#003995}.ss-container{position:relative}form{display:flex}.ss-icon{font-size:1em}button[type=submit]{background:#fff;border-radius:0 4px 4px 0;margin:0;width:3em;cursor:pointer;display:flex;justify-content:center;align-items:center;transition:color .2s,background-color .2s}button[type=submit] .ss-icon{color:#0047ba;font-size:1.7em}button[type=submit]:hover .ss-icon{color:#6892ca}button[type=submit].ensign .ss-icon{color:#2b6042}button[type=submit].ensign .ss-icon:hover{color:#357551}#clear{position:absolute;right:3em;top:0%;height:100%;display:flex;justify-content:center;align-items:center;padding:0 0 0 .375rem}#clear .ss-icon{height:auto;color:#acacac;transition:color ease-in-out .05s}#clear:hover .ss-icon{color:#666}input[type=text]{background-color:#fff;color:#000;font-family:inherit;border:none;font-weight:600;margin:0;overflow:hidden;cursor:text;width:calc(100% - 3em);font-size:1em;border-radius:4px 0 0 4px;padding:.56em 2em .56em .56em}input[type=text]:focus{outline:none}input[type=text]:valid+label,input[type=text]:focus+label{font-size:.75em;top:-.8em;padding-top:0;padding-bottom:0;pointer-events:none;margin-top:0;margin-left:.56em;cursor:default}input[type=text]:valid+label:before,input[type=text]:focus+label:before{opacity:1}label{cursor:text;transition:all .1s ease-in-out;position:absolute;padding:.5em .28em;margin-left:.28em;left:0;color:#707070;z-index:1;max-width:calc(100% - 3.4em);white-space:nowrap;line-height:normal;overflow:hidden;text-overflow:ellipsis;border-radius:4px}label:before{transition:all .1s ease-in-out;background-color:#fff;content:\"\";position:absolute;inset:0;opacity:0;z-index:-1}.suggestions-list{position:absolute;top:100%;left:0;right:0;background:#fff;border:1px solid #d0d0d0;border-top:none;border-radius:0 0 4px 4px;list-style:none;margin:0;padding:0;max-height:300px;overflow-y:auto;box-shadow:0 4px 6px #0000001a;z-index:1000}.suggestion-item{padding:.75em 1em;cursor:pointer;transition:background-color .15s ease;color:#333;font-size:1em;display:flex;align-items:center;gap:.5em}.suggestion-item:hover,.suggestion-item.selected{background-color:#f0f0f0}.suggestion-item.selected{background-color:#e6f2ff}.suggestion-item:last-child{border-radius:0 0 4px 4px}.suggestion-text{flex:1;overflow-wrap:break-word}.expand-btn{background:none;border:none;cursor:pointer;padding:2px;display:flex;align-items:center;justify-content:center;color:#707070;border-radius:50%;transition:background-color .2s}.expand-btn:hover{background-color:#0000000d;color:#0047ba}.expand-btn .material-symbols-outlined{font-size:1.25em}\n"] }]
|
|
2221
2550
|
}], ctorParameters: () => [], propDecorators: { searchText: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchText", required: false }] }, { type: i0.Output, args: ["searchTextChange"] }], searchInput: [{
|
|
2222
2551
|
type: ViewChild,
|
|
2223
2552
|
args: ['searchInput']
|
|
@@ -2291,6 +2620,7 @@ class SsSearchBarComponent {
|
|
|
2291
2620
|
this.tabChange = new EventEmitter();
|
|
2292
2621
|
this.suggest = new EventEmitter();
|
|
2293
2622
|
this.heightOfContainer = 0;
|
|
2623
|
+
this.shouldFocusAdvClose = false;
|
|
2294
2624
|
this.emitClearSimpleSearch = () => {
|
|
2295
2625
|
this.clearSimpleSearch.emit({
|
|
2296
2626
|
...this.config,
|
|
@@ -2327,6 +2657,7 @@ class SsSearchBarComponent {
|
|
|
2327
2657
|
showAdvancedSearchAsText: false,
|
|
2328
2658
|
showAdvancedSearch: true,
|
|
2329
2659
|
});
|
|
2660
|
+
this.shouldFocusAdvClose = true;
|
|
2330
2661
|
};
|
|
2331
2662
|
this.emitTabChange = (newScope) => {
|
|
2332
2663
|
this.tabChange.emit({ ...this.config, scope: newScope });
|
|
@@ -2338,8 +2669,18 @@ class SsSearchBarComponent {
|
|
|
2338
2669
|
get config() {
|
|
2339
2670
|
return this._config;
|
|
2340
2671
|
}
|
|
2672
|
+
// focus keyboard to advanced search close button, otherwise focus skips entire advanced search component
|
|
2673
|
+
ngAfterViewChecked() {
|
|
2674
|
+
if (!this.shouldFocusAdvClose)
|
|
2675
|
+
return;
|
|
2676
|
+
const btn = this.advSearchCloseBtn?.nativeElement;
|
|
2677
|
+
if (btn) {
|
|
2678
|
+
btn.focus();
|
|
2679
|
+
this.shouldFocusAdvClose = false;
|
|
2680
|
+
}
|
|
2681
|
+
}
|
|
2341
2682
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SsSearchBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2342
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: SsSearchBarComponent, isStandalone: true, selector: "lib-ss-search-bar", inputs: { searchText: { classPropertyName: "searchText", publicName: "searchText", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: false, isRequired: true, transformFunction: null }, supportedSuggestionScopes: { classPropertyName: "supportedSuggestionScopes", publicName: "supportedSuggestionScopes", isSignal: false, isRequired: false, transformFunction: null }, suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { searchText: "searchTextChange", simpleSearch: "simpleSearch", clearSimpleSearch: "clearSimpleSearch", advancedSearch: "advancedSearch", advancedSearchClosed: "advancedSearchClosed", advancedSearchOpen: "advancedSearchOpen", tabChange: "tabChange", suggest: "suggest" }, providers: [FieldByScopePipe], viewQueries: [{ propertyName: "barWrapperRef", first: true, predicate: ["barWrapperRef"], descendants: true }], ngImport: i0, template: "<div id=\"ssSearchBar\">\n <div class=\"tabs\">\n <button\n (click)=\"emitTabChange('local')\"\n class=\"ss-tab\"\n id=\"localTab\"\n [ngClass]=\"{\n 'ss-active': config.scope === 'local',\n ensign: config.institution === 'ensign' && config.scope !== 'local',\n }\"\n data-testid=\"localTab\"\n [disabled]=\"config.scope === 'local'\"\n >\n In the Library\n </button>\n @if (config.institution !== 'law') {\n <div class=\"tab-spacer\"></div>\n <button\n (click)=\"emitTabChange('external')\"\n class=\"ss-tab\"\n id=\"externalTab\"\n [ngClass]=\"{\n 'ss-active': config.scope === 'external',\n ensign: config.institution === 'ensign' && config.scope !== 'external',\n }\"\n data-testid=\"externalTab\"\n [disabled]=\"config.scope === 'external'\"\n >\n Available Online\n </button>\n }\n <div class=\"tab-spacer full\"></div>\n </div>\n <div\n class=\"ss-bar-wrapper\"\n #barWrapperRef\n [@libHbllExpandCollapse]=\"{\n value: config.showAdvancedSearch ? (!config.showAdvancedSearchAsText ? 1 : 2) : 3,\n params: { startHeight: heightOfContainer },\n }\"\n >\n <div class=\"ss-bar-content\" data-testid=\"searchForm\">\n @if (!config.showAdvancedSearch) {\n <div class=\"ss-search-bar\">\n <lib-ss-simple-search\n [config]=\"config\"\n [supportedSuggestionScopes]=\"supportedSuggestionScopes\"\n [suggestions]=\"suggestions\"\n (simpleSearch)=\"emitSimpleSearch($event)\"\n (clearSimpleSearch)=\"emitClearSimpleSearch()\"\n (suggest)=\"suggest.emit($event)\"\n [(searchText)]=\"searchText\"\n ></lib-ss-simple-search>\n </div>\n } @else {\n <button\n id=\"advSearchCloseBtn\"\n (click)=\"emitAdvancedSearchClosed()\"\n data-testid=\"advSearchCloseBtn\"\n >\n <span class=\"material-symbols-outlined ss-icon\"> close </span>\n </button>\n <div id=\"advSearchWrapper\">\n @if (config.showAdvancedSearch && !config.showAdvancedSearchAsText) {\n <div>\n <lib-ss-advanced-search\n [config]=\"config\"\n (advancedSearch)=\"emitAdvancedSearch($event)\"\n ></lib-ss-advanced-search>\n </div>\n } @else {\n <div\n class=\"ss-adv-search-text\"\n data-testid=\"advancedSearchText\"\n [innerHTML]=\"\n config.advancedSearchQueryRows | ssAdvancedQueries: config.scope\n \"\n ></div>\n <div\n [innerHTML]=\"\n config.advancedSearchQueryRows | advancedFieldWarning: config.scope\n \"\n ></div>\n }\n </div>\n }\n </div>\n @if (!config.showAdvancedSearch || config.showAdvancedSearchAsText) {\n <button\n data-testid=\"toggleAdvSearchButton\"\n class=\"ss-adv-search-btn\"\n id=\"advSearchBtn\"\n (click)=\"emitAdvancedSearchOpen()\"\n >\n Advanced\n <span class=\"material-symbols-outlined ss-icon\"> keyboard_arrow_down </span>\n </button>\n }\n </div>\n</div>\n", styles: ["#ssSearchBar .tabs .ss-tab.ensign{background-color:#2b6042!important;border-color:#2a6142}#ssSearchBar .tabs .ss-tab.ensign:hover{background-color:#357551!important}a,button{border:none;background:none;font-family:inherit;padding:0;margin:0;font-size:inherit;color:#1c7ec9;text-decoration:none;cursor:pointer}a:hover,button:hover{color:#8ab6f0}.mat-mdc-tooltip-surface{background-color:#333!important;border-radius:3px!important;color:#fff!important;font:inherit!important;font-size:.8em!important}#ssSearchBar{display:flex;align-items:flex-start;flex-wrap:wrap;position:relative;color:#444}#ssSearchBar .tabs{display:flex;width:100%;margin-bottom:-1px;z-index:10;pointer-events:none}#ssSearchBar .tabs .ss-tab{border-radius:4px 4px 0 0;border:#b7b7b7 solid 1px;border-color:#1967e5;border-bottom:none;padding:.3em 1.4em;font-size:.94em;letter-spacing:.4px;font-weight:600;background-color:#0047ba;color:#fff;white-space:nowrap;position:relative;pointer-events:auto}#ssSearchBar .tabs .ss-tab:after{content:\"\";height:1px;width:calc(100% + 2px);position:absolute;bottom:0;left:-1px;background-color:#b7b7b7}#ssSearchBar .tabs .ss-tab:hover{background-color:#1967e5}#ssSearchBar .tabs .ss-tab.ss-active{color:#002e5d;margin-bottom:1px;border-color:#b7b7b7;background-color:#fffffff2}#ssSearchBar .tabs .ss-tab.ss-active:after{display:none}#ssSearchBar .tabs .ss-tab:disabled{cursor:auto}#ssSearchBar .tabs .tab-spacer{width:.3em;border-bottom:#b7b7b7 solid 1px;position:relative}#ssSearchBar .tabs .tab-spacer:before{content:\"\";position:absolute;left:-1px;bottom:-1px;width:1px;height:1px;background-color:#b7b7b7}#ssSearchBar .tabs .tab-spacer:after{content:\"\";position:absolute;right:-1px;bottom:-1px;width:1px;height:1px;background-color:#b7b7b7}#ssSearchBar .tabs .tab-spacer.full{width:100%;margin-right:4px;position:relative}#ssSearchBar .ss-adv-search-text{padding-bottom:1em;padding-right:1.25rem;pointer-events:none}#ssSearchBar .ss-bar-wrapper{padding:1em 1em .25em;border-right:#b7b7b7 solid 1px;border-left:#b7b7b7 solid 1px;border-bottom:#b7b7b7 solid 1px;width:100%;display:flex;align-items:center;flex-wrap:wrap;position:relative;background-color:#fffffff2;border-radius:0 4px 4px}#ssSearchBar .ss-bar-wrapper:after{content:\"\";position:absolute;top:0;right:-1px;background-color:transparent;border-radius:0 4px 0 0;width:4px;height:4px;border-top:#b7b7b7 solid 1px;border-right:#b7b7b7 solid 1px}#ssSearchBar .ss-bar-content{position:relative;width:100%;height:initial}#ssSearchBar .ss-search-bar{border-radius:4px;border:#b7b7b7 solid 1px;width:100%}#ssSearchBar #advSearchCloseBtn{float:right;padding:.4em;margin:-.4em 0;color:#666;transition:all .1s}#ssSearchBar #advSearchCloseBtn:hover{color:#292929}#ssSearchBar #advSearchCloseBtn .ss-icon{font-size:1.2em;font-weight:600}#ssSearchBar .ss-adv-search-btn{font-size:.9em;color:#4070b0;margin:.2em 4em 0 auto;padding-right:.25rem;padding-top:2px;padding-bottom:2px;display:flex;justify-content:center;align-items:center}#ssSearchBar .ss-adv-search-btn .ss-icon{font-size:1.4em;opacity:.75;margin-top:.125rem}#ssSearchBar .ss-adv-search-btn:hover{color:#6892ca}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: AdvancedSearchComponent, selector: "lib-ss-advanced-search", inputs: ["config"], outputs: ["advancedSearch"] }, { kind: "component", type: SimpleSearchComponent, selector: "lib-ss-simple-search", inputs: ["searchText", "config", "supportedSuggestionScopes", "suggestions"], outputs: ["searchTextChange", "simpleSearch", "clearSimpleSearch", "suggest"] }, { kind: "pipe", type: SsAdvancedQueriesPipe, name: "ssAdvancedQueries" }, { kind: "pipe", type: AdvancedFieldWarningPipe, name: "advancedFieldWarning" }], animations: [libHbllExpandCollapse], encapsulation: i0.ViewEncapsulation.None }); }
|
|
2683
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: SsSearchBarComponent, isStandalone: true, selector: "lib-ss-search-bar", inputs: { searchText: { classPropertyName: "searchText", publicName: "searchText", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: false, isRequired: true, transformFunction: null }, supportedSuggestionScopes: { classPropertyName: "supportedSuggestionScopes", publicName: "supportedSuggestionScopes", isSignal: false, isRequired: false, transformFunction: null }, suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { searchText: "searchTextChange", simpleSearch: "simpleSearch", clearSimpleSearch: "clearSimpleSearch", advancedSearch: "advancedSearch", advancedSearchClosed: "advancedSearchClosed", advancedSearchOpen: "advancedSearchOpen", tabChange: "tabChange", suggest: "suggest" }, providers: [FieldByScopePipe], viewQueries: [{ propertyName: "barWrapperRef", first: true, predicate: ["barWrapperRef"], descendants: true }, { propertyName: "advSearchCloseBtn", first: true, predicate: ["advSearchCloseBtn"], descendants: true }], ngImport: i0, template: "<div id=\"ssSearchBar\">\n <div class=\"tabs\">\n <button\n (click)=\"emitTabChange('local')\"\n class=\"ss-tab\"\n id=\"localTab\"\n [ngClass]=\"{\n 'ss-active': config.scope === 'local',\n ensign: config.institution === 'ensign' && config.scope !== 'local',\n }\"\n data-testid=\"localTab\"\n [disabled]=\"config.scope === 'local'\"\n >\n In the Library\n </button>\n @if (config.institution !== 'law') {\n <div class=\"tab-spacer\"></div>\n <button\n (click)=\"emitTabChange('external')\"\n class=\"ss-tab\"\n id=\"externalTab\"\n [ngClass]=\"{\n 'ss-active': config.scope === 'external',\n ensign: config.institution === 'ensign' && config.scope !== 'external',\n }\"\n data-testid=\"externalTab\"\n [disabled]=\"config.scope === 'external'\"\n >\n Available Online\n </button>\n }\n <div class=\"tab-spacer full\"></div>\n </div>\n <div\n class=\"ss-bar-wrapper\"\n #barWrapperRef\n [@libHbllExpandCollapse]=\"{\n value: config.showAdvancedSearch ? (!config.showAdvancedSearchAsText ? 1 : 2) : 3,\n params: { startHeight: heightOfContainer },\n }\"\n >\n <div class=\"ss-bar-content\" data-testid=\"searchForm\">\n @if (!config.showAdvancedSearch) {\n <div class=\"ss-search-bar\">\n <lib-ss-simple-search\n [config]=\"config\"\n [supportedSuggestionScopes]=\"supportedSuggestionScopes\"\n [suggestions]=\"suggestions\"\n (simpleSearch)=\"emitSimpleSearch($event)\"\n (clearSimpleSearch)=\"emitClearSimpleSearch()\"\n (suggest)=\"suggest.emit($event)\"\n [(searchText)]=\"searchText\"\n ></lib-ss-simple-search>\n </div>\n } @else {\n <button\n #advSearchCloseBtn\n id=\"advSearchCloseBtn\"\n (click)=\"emitAdvancedSearchClosed()\"\n data-testid=\"advSearchCloseBtn\"\n >\n <span class=\"material-symbols-outlined ss-icon\"> close </span>\n </button>\n <div id=\"advSearchWrapper\">\n @if (config.showAdvancedSearch && !config.showAdvancedSearchAsText) {\n <div>\n <lib-ss-advanced-search\n [config]=\"config\"\n (advancedSearch)=\"emitAdvancedSearch($event)\"\n ></lib-ss-advanced-search>\n </div>\n } @else {\n <div\n class=\"ss-adv-search-text\"\n data-testid=\"advancedSearchText\"\n [innerHTML]=\"\n config.advancedSearchQueryRows | ssAdvancedQueries: config.scope\n \"\n ></div>\n <div\n [innerHTML]=\"\n config.advancedSearchQueryRows | advancedFieldWarning: config.scope\n \"\n ></div>\n }\n </div>\n }\n </div>\n @if (!config.showAdvancedSearch || config.showAdvancedSearchAsText) {\n <button\n data-testid=\"toggleAdvSearchButton\"\n class=\"ss-adv-search-btn\"\n id=\"advSearchBtn\"\n (click)=\"emitAdvancedSearchOpen()\"\n >\n Advanced\n <span class=\"material-symbols-outlined ss-icon\"> keyboard_arrow_down </span>\n </button>\n }\n </div>\n</div>\n", styles: ["#ssSearchBar .tabs .ss-tab.ensign{background-color:#2b6042!important;border-color:#2a6142}#ssSearchBar .tabs .ss-tab.ensign:hover{background-color:#357551!important}html{border:0;margin:0;padding:0;-webkit-text-size-adjust:100%}body{margin:0;padding:0}*,*:before,*:after{box-sizing:border-box}:root{--color-navy: #00245d;--color-royal: #0047ba;--color-white: #ffffff;--color-blue-500: #00245d;--color-blue-400: #003995;--color-blue-300: #0047ba;--color-blue-200: #336cc8;--color-blue-150: #ccdaf1;--color-blue-100: #e5edf8;--color-gray-500: #141414;--color-gray-400: #737373;--color-gray-300: #8f8f8f;--color-gray-200: #d0d0d0;--color-gray-100: #e7e7e7;--color-gray-50: #f9f9f9;--color-gray-brand-400: #737373;--color-green-500: #1d562e;--color-green-400: #2e8545;--color-green-300: #3ba35a;--color-green-200: #9dd1ac;--color-green-100: #ebf6ee;--color-teal-500: #26485f;--color-teal-400: #3e7295;--color-teal-300: #457fa6;--color-teal-200: #a2bfd3;--color-teal-100: #ecf2f6;--color-red-500: #702121;--color-red-400: #b33837;--color-red-300: #c73e3d;--color-red-200: #e39e9e;--color-red-100: #f9ecec;--color-yellow-500: #635f04;--color-yellow-400: #928c30;--color-yellow-300: #d1c844;--color-yellow-200: #e8e3a1;--color-yellow-100: #f2f0e9;--color-purple-focus: #b967c7;--text-heading: #002e5d;--text-secondary-heading: #737373;--text-body: #141414;--text-disabled: #737373;--text-link: #336cc8;--text-on-action: #ffffff;--text-success: #1d562e;--text-info: #26485f;--text-error: #702121;--text-warning: #635f04;--surface-success: #ebf6ee;--surface-info: #ecf2f6;--surface-error: #f9ecec;--surface-warning: #f2f0e9;--focus-ring-color: #b967c7}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Light.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Regular.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Semibold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Bold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-LightItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Italic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-SemiboldItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-BoldItalic.ttf) format(\"truetype\");font-display:swap}h1,h2,h3,h4,h5,h6,span:not(.material-symbols-outlined),a,p{font-family:Source Sans Pro}h1{font-weight:300;font-style:normal;color:var(--text-heading)}h2{font-weight:400;font-style:normal;color:var(--text-heading)}h3{font-weight:700;font-style:normal;color:var(--text-heading)}h4,h5,h6{font-weight:600;font-style:normal;color:var(--text-secondary-heading)}.hbll-default-body{font-weight:400;font-style:normal;max-width:35rem;min-width:22.25rem;color:var(--text-body)}.hbll-caption{font-weight:400;font-style:normal;max-width:25.25rem;min-width:17.5rem;color:var(--text-body)}.hbll-large{font-weight:400;font-style:normal;max-width:41.25rem;min-width:26.5rem;color:var(--text-body)}a{color:var(--text-link);text-decoration:underline}.hbll-emphasis{font-weight:600}h1{font-size:2rem;line-height:2.5rem}h2{font-size:1.75rem;line-height:2.25rem}h3,h4{font-size:1.5rem;line-height:2rem}h5,h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:.875rem;line-height:1.25rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1rem;line-height:1.5rem}@media screen and (min-width: 52.125em){h1{font-size:3rem;line-height:3.5rem}h2{font-size:2.5rem;line-height:3rem}h3{font-size:2rem;line-height:3rem}h4{font-size:1.75rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}@media screen and (min-width: 90em){h1{font-size:3.75rem;line-height:4.25rem}h2{font-size:3rem;line-height:3.5rem}h3{font-size:2.5rem;line-height:3rem}h4{font-size:2rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}a,button{border:none;background:none;font-family:inherit;padding:0;margin:0;font-size:inherit;color:#0047ba;text-decoration:none;cursor:pointer}a:hover,button:hover{color:#003995}.mat-mdc-tooltip-surface{background-color:#333!important;border-radius:3px!important;color:#fff!important;font:inherit!important;font-size:.8em!important}#ssSearchBar{display:flex;align-items:flex-start;flex-wrap:wrap;position:relative;color:#444}#ssSearchBar .tabs{display:flex;width:100%;margin-bottom:-1px;z-index:10;pointer-events:none}#ssSearchBar .tabs .ss-tab{border-radius:4px 4px 0 0;border:#b7b7b7 solid 1px;border-color:#1967e5;border-bottom:none;padding:.3em 1.4em;font-size:.94em;letter-spacing:.4px;font-weight:600;background-color:#0047ba;color:#fff;white-space:nowrap;position:relative;pointer-events:auto}#ssSearchBar .tabs .ss-tab:after{content:\"\";height:1px;width:calc(100% + 2px);position:absolute;bottom:0;left:-1px;background-color:#b7b7b7}#ssSearchBar .tabs .ss-tab:hover{background-color:#1967e5}#ssSearchBar .tabs .ss-tab.ss-active{color:#002e5d;margin-bottom:1px;border-color:#b7b7b7;background-color:#fffffff2}#ssSearchBar .tabs .ss-tab.ss-active:after{display:none}#ssSearchBar .tabs .ss-tab:disabled{cursor:auto}#ssSearchBar .tabs .tab-spacer{width:.3em;border-bottom:#b7b7b7 solid 1px;position:relative}#ssSearchBar .tabs .tab-spacer:before{content:\"\";position:absolute;left:-1px;bottom:-1px;width:1px;height:1px;background-color:#b7b7b7}#ssSearchBar .tabs .tab-spacer:after{content:\"\";position:absolute;right:-1px;bottom:-1px;width:1px;height:1px;background-color:#b7b7b7}#ssSearchBar .tabs .tab-spacer.full{width:100%;margin-right:4px;position:relative}#ssSearchBar .ss-adv-search-text{padding-bottom:1em;padding-right:1.25rem;pointer-events:none}#ssSearchBar .ss-bar-wrapper{padding:1em 1em .25em;border-right:#b7b7b7 solid 1px;border-left:#b7b7b7 solid 1px;border-bottom:#b7b7b7 solid 1px;width:100%;display:flex;align-items:center;flex-wrap:wrap;position:relative;background-color:#fffffff2;border-radius:0 4px 4px}#ssSearchBar .ss-bar-wrapper:after{content:\"\";position:absolute;top:0;right:-1px;background-color:transparent;border-radius:0 4px 0 0;width:4px;height:4px;border-top:#b7b7b7 solid 1px;border-right:#b7b7b7 solid 1px}#ssSearchBar .ss-bar-content{position:relative;width:100%;height:initial}#ssSearchBar .ss-search-bar{border-radius:4px;border:#b7b7b7 solid 1px;width:100%}#ssSearchBar #advSearchCloseBtn{float:right;padding:.4em;margin:-.4em 0;color:#666;transition:all .1s}#ssSearchBar #advSearchCloseBtn:hover{color:#292929}#ssSearchBar #advSearchCloseBtn .ss-icon{font-size:1.2em;font-weight:600}#ssSearchBar .ss-adv-search-btn{font-size:.9em;color:#4070b0;margin:.2em 4em 0 auto;padding-right:.25rem;padding-top:2px;padding-bottom:2px;display:flex;justify-content:center;align-items:center}#ssSearchBar .ss-adv-search-btn .ss-icon{font-size:1.4em;opacity:.75;margin-top:.125rem}#ssSearchBar .ss-adv-search-btn:hover{color:#6892ca}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: AdvancedSearchComponent, selector: "lib-ss-advanced-search", inputs: ["config"], outputs: ["advancedSearch"] }, { kind: "component", type: SimpleSearchComponent, selector: "lib-ss-simple-search", inputs: ["searchText", "config", "supportedSuggestionScopes", "suggestions"], outputs: ["searchTextChange", "simpleSearch", "clearSimpleSearch", "suggest"] }, { kind: "pipe", type: SsAdvancedQueriesPipe, name: "ssAdvancedQueries" }, { kind: "pipe", type: AdvancedFieldWarningPipe, name: "advancedFieldWarning" }], animations: [libHbllExpandCollapse], encapsulation: i0.ViewEncapsulation.None }); }
|
|
2343
2684
|
}
|
|
2344
2685
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SsSearchBarComponent, decorators: [{
|
|
2345
2686
|
type: Component,
|
|
@@ -2349,7 +2690,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
2349
2690
|
AdvancedSearchComponent,
|
|
2350
2691
|
SimpleSearchComponent,
|
|
2351
2692
|
AdvancedFieldWarningPipe,
|
|
2352
|
-
], providers: [FieldByScopePipe], animations: [libHbllExpandCollapse], encapsulation: ViewEncapsulation.None, template: "<div id=\"ssSearchBar\">\n <div class=\"tabs\">\n <button\n (click)=\"emitTabChange('local')\"\n class=\"ss-tab\"\n id=\"localTab\"\n [ngClass]=\"{\n 'ss-active': config.scope === 'local',\n ensign: config.institution === 'ensign' && config.scope !== 'local',\n }\"\n data-testid=\"localTab\"\n [disabled]=\"config.scope === 'local'\"\n >\n In the Library\n </button>\n @if (config.institution !== 'law') {\n <div class=\"tab-spacer\"></div>\n <button\n (click)=\"emitTabChange('external')\"\n class=\"ss-tab\"\n id=\"externalTab\"\n [ngClass]=\"{\n 'ss-active': config.scope === 'external',\n ensign: config.institution === 'ensign' && config.scope !== 'external',\n }\"\n data-testid=\"externalTab\"\n [disabled]=\"config.scope === 'external'\"\n >\n Available Online\n </button>\n }\n <div class=\"tab-spacer full\"></div>\n </div>\n <div\n class=\"ss-bar-wrapper\"\n #barWrapperRef\n [@libHbllExpandCollapse]=\"{\n value: config.showAdvancedSearch ? (!config.showAdvancedSearchAsText ? 1 : 2) : 3,\n params: { startHeight: heightOfContainer },\n }\"\n >\n <div class=\"ss-bar-content\" data-testid=\"searchForm\">\n @if (!config.showAdvancedSearch) {\n <div class=\"ss-search-bar\">\n <lib-ss-simple-search\n [config]=\"config\"\n [supportedSuggestionScopes]=\"supportedSuggestionScopes\"\n [suggestions]=\"suggestions\"\n (simpleSearch)=\"emitSimpleSearch($event)\"\n (clearSimpleSearch)=\"emitClearSimpleSearch()\"\n (suggest)=\"suggest.emit($event)\"\n [(searchText)]=\"searchText\"\n ></lib-ss-simple-search>\n </div>\n } @else {\n <button\n id=\"advSearchCloseBtn\"\n (click)=\"emitAdvancedSearchClosed()\"\n data-testid=\"advSearchCloseBtn\"\n >\n <span class=\"material-symbols-outlined ss-icon\"> close </span>\n </button>\n <div id=\"advSearchWrapper\">\n @if (config.showAdvancedSearch && !config.showAdvancedSearchAsText) {\n <div>\n <lib-ss-advanced-search\n [config]=\"config\"\n (advancedSearch)=\"emitAdvancedSearch($event)\"\n ></lib-ss-advanced-search>\n </div>\n } @else {\n <div\n class=\"ss-adv-search-text\"\n data-testid=\"advancedSearchText\"\n [innerHTML]=\"\n config.advancedSearchQueryRows | ssAdvancedQueries: config.scope\n \"\n ></div>\n <div\n [innerHTML]=\"\n config.advancedSearchQueryRows | advancedFieldWarning: config.scope\n \"\n ></div>\n }\n </div>\n }\n </div>\n @if (!config.showAdvancedSearch || config.showAdvancedSearchAsText) {\n <button\n data-testid=\"toggleAdvSearchButton\"\n class=\"ss-adv-search-btn\"\n id=\"advSearchBtn\"\n (click)=\"emitAdvancedSearchOpen()\"\n >\n Advanced\n <span class=\"material-symbols-outlined ss-icon\"> keyboard_arrow_down </span>\n </button>\n }\n </div>\n</div>\n", styles: ["#ssSearchBar .tabs .ss-tab.ensign{background-color:#2b6042!important;border-color:#2a6142}#ssSearchBar .tabs .ss-tab.ensign:hover{background-color:#357551!important}a,button{border:none;background:none;font-family:inherit;padding:0;margin:0;font-size:inherit;color:#1c7ec9;text-decoration:none;cursor:pointer}a:hover,button:hover{color:#8ab6f0}.mat-mdc-tooltip-surface{background-color:#333!important;border-radius:3px!important;color:#fff!important;font:inherit!important;font-size:.8em!important}#ssSearchBar{display:flex;align-items:flex-start;flex-wrap:wrap;position:relative;color:#444}#ssSearchBar .tabs{display:flex;width:100%;margin-bottom:-1px;z-index:10;pointer-events:none}#ssSearchBar .tabs .ss-tab{border-radius:4px 4px 0 0;border:#b7b7b7 solid 1px;border-color:#1967e5;border-bottom:none;padding:.3em 1.4em;font-size:.94em;letter-spacing:.4px;font-weight:600;background-color:#0047ba;color:#fff;white-space:nowrap;position:relative;pointer-events:auto}#ssSearchBar .tabs .ss-tab:after{content:\"\";height:1px;width:calc(100% + 2px);position:absolute;bottom:0;left:-1px;background-color:#b7b7b7}#ssSearchBar .tabs .ss-tab:hover{background-color:#1967e5}#ssSearchBar .tabs .ss-tab.ss-active{color:#002e5d;margin-bottom:1px;border-color:#b7b7b7;background-color:#fffffff2}#ssSearchBar .tabs .ss-tab.ss-active:after{display:none}#ssSearchBar .tabs .ss-tab:disabled{cursor:auto}#ssSearchBar .tabs .tab-spacer{width:.3em;border-bottom:#b7b7b7 solid 1px;position:relative}#ssSearchBar .tabs .tab-spacer:before{content:\"\";position:absolute;left:-1px;bottom:-1px;width:1px;height:1px;background-color:#b7b7b7}#ssSearchBar .tabs .tab-spacer:after{content:\"\";position:absolute;right:-1px;bottom:-1px;width:1px;height:1px;background-color:#b7b7b7}#ssSearchBar .tabs .tab-spacer.full{width:100%;margin-right:4px;position:relative}#ssSearchBar .ss-adv-search-text{padding-bottom:1em;padding-right:1.25rem;pointer-events:none}#ssSearchBar .ss-bar-wrapper{padding:1em 1em .25em;border-right:#b7b7b7 solid 1px;border-left:#b7b7b7 solid 1px;border-bottom:#b7b7b7 solid 1px;width:100%;display:flex;align-items:center;flex-wrap:wrap;position:relative;background-color:#fffffff2;border-radius:0 4px 4px}#ssSearchBar .ss-bar-wrapper:after{content:\"\";position:absolute;top:0;right:-1px;background-color:transparent;border-radius:0 4px 0 0;width:4px;height:4px;border-top:#b7b7b7 solid 1px;border-right:#b7b7b7 solid 1px}#ssSearchBar .ss-bar-content{position:relative;width:100%;height:initial}#ssSearchBar .ss-search-bar{border-radius:4px;border:#b7b7b7 solid 1px;width:100%}#ssSearchBar #advSearchCloseBtn{float:right;padding:.4em;margin:-.4em 0;color:#666;transition:all .1s}#ssSearchBar #advSearchCloseBtn:hover{color:#292929}#ssSearchBar #advSearchCloseBtn .ss-icon{font-size:1.2em;font-weight:600}#ssSearchBar .ss-adv-search-btn{font-size:.9em;color:#4070b0;margin:.2em 4em 0 auto;padding-right:.25rem;padding-top:2px;padding-bottom:2px;display:flex;justify-content:center;align-items:center}#ssSearchBar .ss-adv-search-btn .ss-icon{font-size:1.4em;opacity:.75;margin-top:.125rem}#ssSearchBar .ss-adv-search-btn:hover{color:#6892ca}\n"] }]
|
|
2693
|
+
], providers: [FieldByScopePipe], animations: [libHbllExpandCollapse], encapsulation: ViewEncapsulation.None, template: "<div id=\"ssSearchBar\">\n <div class=\"tabs\">\n <button\n (click)=\"emitTabChange('local')\"\n class=\"ss-tab\"\n id=\"localTab\"\n [ngClass]=\"{\n 'ss-active': config.scope === 'local',\n ensign: config.institution === 'ensign' && config.scope !== 'local',\n }\"\n data-testid=\"localTab\"\n [disabled]=\"config.scope === 'local'\"\n >\n In the Library\n </button>\n @if (config.institution !== 'law') {\n <div class=\"tab-spacer\"></div>\n <button\n (click)=\"emitTabChange('external')\"\n class=\"ss-tab\"\n id=\"externalTab\"\n [ngClass]=\"{\n 'ss-active': config.scope === 'external',\n ensign: config.institution === 'ensign' && config.scope !== 'external',\n }\"\n data-testid=\"externalTab\"\n [disabled]=\"config.scope === 'external'\"\n >\n Available Online\n </button>\n }\n <div class=\"tab-spacer full\"></div>\n </div>\n <div\n class=\"ss-bar-wrapper\"\n #barWrapperRef\n [@libHbllExpandCollapse]=\"{\n value: config.showAdvancedSearch ? (!config.showAdvancedSearchAsText ? 1 : 2) : 3,\n params: { startHeight: heightOfContainer },\n }\"\n >\n <div class=\"ss-bar-content\" data-testid=\"searchForm\">\n @if (!config.showAdvancedSearch) {\n <div class=\"ss-search-bar\">\n <lib-ss-simple-search\n [config]=\"config\"\n [supportedSuggestionScopes]=\"supportedSuggestionScopes\"\n [suggestions]=\"suggestions\"\n (simpleSearch)=\"emitSimpleSearch($event)\"\n (clearSimpleSearch)=\"emitClearSimpleSearch()\"\n (suggest)=\"suggest.emit($event)\"\n [(searchText)]=\"searchText\"\n ></lib-ss-simple-search>\n </div>\n } @else {\n <button\n #advSearchCloseBtn\n id=\"advSearchCloseBtn\"\n (click)=\"emitAdvancedSearchClosed()\"\n data-testid=\"advSearchCloseBtn\"\n >\n <span class=\"material-symbols-outlined ss-icon\"> close </span>\n </button>\n <div id=\"advSearchWrapper\">\n @if (config.showAdvancedSearch && !config.showAdvancedSearchAsText) {\n <div>\n <lib-ss-advanced-search\n [config]=\"config\"\n (advancedSearch)=\"emitAdvancedSearch($event)\"\n ></lib-ss-advanced-search>\n </div>\n } @else {\n <div\n class=\"ss-adv-search-text\"\n data-testid=\"advancedSearchText\"\n [innerHTML]=\"\n config.advancedSearchQueryRows | ssAdvancedQueries: config.scope\n \"\n ></div>\n <div\n [innerHTML]=\"\n config.advancedSearchQueryRows | advancedFieldWarning: config.scope\n \"\n ></div>\n }\n </div>\n }\n </div>\n @if (!config.showAdvancedSearch || config.showAdvancedSearchAsText) {\n <button\n data-testid=\"toggleAdvSearchButton\"\n class=\"ss-adv-search-btn\"\n id=\"advSearchBtn\"\n (click)=\"emitAdvancedSearchOpen()\"\n >\n Advanced\n <span class=\"material-symbols-outlined ss-icon\"> keyboard_arrow_down </span>\n </button>\n }\n </div>\n</div>\n", styles: ["#ssSearchBar .tabs .ss-tab.ensign{background-color:#2b6042!important;border-color:#2a6142}#ssSearchBar .tabs .ss-tab.ensign:hover{background-color:#357551!important}html{border:0;margin:0;padding:0;-webkit-text-size-adjust:100%}body{margin:0;padding:0}*,*:before,*:after{box-sizing:border-box}:root{--color-navy: #00245d;--color-royal: #0047ba;--color-white: #ffffff;--color-blue-500: #00245d;--color-blue-400: #003995;--color-blue-300: #0047ba;--color-blue-200: #336cc8;--color-blue-150: #ccdaf1;--color-blue-100: #e5edf8;--color-gray-500: #141414;--color-gray-400: #737373;--color-gray-300: #8f8f8f;--color-gray-200: #d0d0d0;--color-gray-100: #e7e7e7;--color-gray-50: #f9f9f9;--color-gray-brand-400: #737373;--color-green-500: #1d562e;--color-green-400: #2e8545;--color-green-300: #3ba35a;--color-green-200: #9dd1ac;--color-green-100: #ebf6ee;--color-teal-500: #26485f;--color-teal-400: #3e7295;--color-teal-300: #457fa6;--color-teal-200: #a2bfd3;--color-teal-100: #ecf2f6;--color-red-500: #702121;--color-red-400: #b33837;--color-red-300: #c73e3d;--color-red-200: #e39e9e;--color-red-100: #f9ecec;--color-yellow-500: #635f04;--color-yellow-400: #928c30;--color-yellow-300: #d1c844;--color-yellow-200: #e8e3a1;--color-yellow-100: #f2f0e9;--color-purple-focus: #b967c7;--text-heading: #002e5d;--text-secondary-heading: #737373;--text-body: #141414;--text-disabled: #737373;--text-link: #336cc8;--text-on-action: #ffffff;--text-success: #1d562e;--text-info: #26485f;--text-error: #702121;--text-warning: #635f04;--surface-success: #ebf6ee;--surface-info: #ecf2f6;--surface-error: #f9ecec;--surface-warning: #f2f0e9;--focus-ring-color: #b967c7}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Light.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Regular.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Semibold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Bold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-LightItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Italic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-SemiboldItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-BoldItalic.ttf) format(\"truetype\");font-display:swap}h1,h2,h3,h4,h5,h6,span:not(.material-symbols-outlined),a,p{font-family:Source Sans Pro}h1{font-weight:300;font-style:normal;color:var(--text-heading)}h2{font-weight:400;font-style:normal;color:var(--text-heading)}h3{font-weight:700;font-style:normal;color:var(--text-heading)}h4,h5,h6{font-weight:600;font-style:normal;color:var(--text-secondary-heading)}.hbll-default-body{font-weight:400;font-style:normal;max-width:35rem;min-width:22.25rem;color:var(--text-body)}.hbll-caption{font-weight:400;font-style:normal;max-width:25.25rem;min-width:17.5rem;color:var(--text-body)}.hbll-large{font-weight:400;font-style:normal;max-width:41.25rem;min-width:26.5rem;color:var(--text-body)}a{color:var(--text-link);text-decoration:underline}.hbll-emphasis{font-weight:600}h1{font-size:2rem;line-height:2.5rem}h2{font-size:1.75rem;line-height:2.25rem}h3,h4{font-size:1.5rem;line-height:2rem}h5,h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:.875rem;line-height:1.25rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1rem;line-height:1.5rem}@media screen and (min-width: 52.125em){h1{font-size:3rem;line-height:3.5rem}h2{font-size:2.5rem;line-height:3rem}h3{font-size:2rem;line-height:3rem}h4{font-size:1.75rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}@media screen and (min-width: 90em){h1{font-size:3.75rem;line-height:4.25rem}h2{font-size:3rem;line-height:3.5rem}h3{font-size:2.5rem;line-height:3rem}h4{font-size:2rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}a,button{border:none;background:none;font-family:inherit;padding:0;margin:0;font-size:inherit;color:#0047ba;text-decoration:none;cursor:pointer}a:hover,button:hover{color:#003995}.mat-mdc-tooltip-surface{background-color:#333!important;border-radius:3px!important;color:#fff!important;font:inherit!important;font-size:.8em!important}#ssSearchBar{display:flex;align-items:flex-start;flex-wrap:wrap;position:relative;color:#444}#ssSearchBar .tabs{display:flex;width:100%;margin-bottom:-1px;z-index:10;pointer-events:none}#ssSearchBar .tabs .ss-tab{border-radius:4px 4px 0 0;border:#b7b7b7 solid 1px;border-color:#1967e5;border-bottom:none;padding:.3em 1.4em;font-size:.94em;letter-spacing:.4px;font-weight:600;background-color:#0047ba;color:#fff;white-space:nowrap;position:relative;pointer-events:auto}#ssSearchBar .tabs .ss-tab:after{content:\"\";height:1px;width:calc(100% + 2px);position:absolute;bottom:0;left:-1px;background-color:#b7b7b7}#ssSearchBar .tabs .ss-tab:hover{background-color:#1967e5}#ssSearchBar .tabs .ss-tab.ss-active{color:#002e5d;margin-bottom:1px;border-color:#b7b7b7;background-color:#fffffff2}#ssSearchBar .tabs .ss-tab.ss-active:after{display:none}#ssSearchBar .tabs .ss-tab:disabled{cursor:auto}#ssSearchBar .tabs .tab-spacer{width:.3em;border-bottom:#b7b7b7 solid 1px;position:relative}#ssSearchBar .tabs .tab-spacer:before{content:\"\";position:absolute;left:-1px;bottom:-1px;width:1px;height:1px;background-color:#b7b7b7}#ssSearchBar .tabs .tab-spacer:after{content:\"\";position:absolute;right:-1px;bottom:-1px;width:1px;height:1px;background-color:#b7b7b7}#ssSearchBar .tabs .tab-spacer.full{width:100%;margin-right:4px;position:relative}#ssSearchBar .ss-adv-search-text{padding-bottom:1em;padding-right:1.25rem;pointer-events:none}#ssSearchBar .ss-bar-wrapper{padding:1em 1em .25em;border-right:#b7b7b7 solid 1px;border-left:#b7b7b7 solid 1px;border-bottom:#b7b7b7 solid 1px;width:100%;display:flex;align-items:center;flex-wrap:wrap;position:relative;background-color:#fffffff2;border-radius:0 4px 4px}#ssSearchBar .ss-bar-wrapper:after{content:\"\";position:absolute;top:0;right:-1px;background-color:transparent;border-radius:0 4px 0 0;width:4px;height:4px;border-top:#b7b7b7 solid 1px;border-right:#b7b7b7 solid 1px}#ssSearchBar .ss-bar-content{position:relative;width:100%;height:initial}#ssSearchBar .ss-search-bar{border-radius:4px;border:#b7b7b7 solid 1px;width:100%}#ssSearchBar #advSearchCloseBtn{float:right;padding:.4em;margin:-.4em 0;color:#666;transition:all .1s}#ssSearchBar #advSearchCloseBtn:hover{color:#292929}#ssSearchBar #advSearchCloseBtn .ss-icon{font-size:1.2em;font-weight:600}#ssSearchBar .ss-adv-search-btn{font-size:.9em;color:#4070b0;margin:.2em 4em 0 auto;padding-right:.25rem;padding-top:2px;padding-bottom:2px;display:flex;justify-content:center;align-items:center}#ssSearchBar .ss-adv-search-btn .ss-icon{font-size:1.4em;opacity:.75;margin-top:.125rem}#ssSearchBar .ss-adv-search-btn:hover{color:#6892ca}\n"] }]
|
|
2353
2694
|
}], propDecorators: { searchText: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchText", required: false }] }, { type: i0.Output, args: ["searchTextChange"] }], config: [{
|
|
2354
2695
|
type: Input,
|
|
2355
2696
|
args: [{ required: true }]
|
|
@@ -2374,6 +2715,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
2374
2715
|
}], barWrapperRef: [{
|
|
2375
2716
|
type: ViewChild,
|
|
2376
2717
|
args: ['barWrapperRef']
|
|
2718
|
+
}], advSearchCloseBtn: [{
|
|
2719
|
+
type: ViewChild,
|
|
2720
|
+
args: ['advSearchCloseBtn']
|
|
2377
2721
|
}] } });
|
|
2378
2722
|
|
|
2379
2723
|
const searchScopeValues = ['local', 'external'];
|
|
@@ -2454,11 +2798,11 @@ class StatusButtonComponent {
|
|
|
2454
2798
|
}
|
|
2455
2799
|
}
|
|
2456
2800
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: StatusButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2457
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.3.15", type: StatusButtonComponent, isStandalone: true, selector: "lib-status-button", inputs: { label: "label", status: "status", leftIcon: "leftIcon", rightIcon: "rightIcon", hideLeftIcon: ["hideLeftIcon", "hideLeftIcon", booleanAttribute], hideRightIcon: ["hideRightIcon", "hideRightIcon", booleanAttribute], clearVariant: ["clearVariant", "clearVariant", booleanAttribute] }, ngImport: i0, template: "<button\n type=\"button\"\n [ngClass]=\"[\n status,\n clearVariant ? 'strokeless transparent-bg' : ''\n ]\"\n>\n <span *ngIf=\"leftIcon\" class=\"icon material-symbols-outlined\">{{ leftIcon }}</span>\n {{ label }}\n <span *ngIf=\"rightIcon\" class=\"icon material-symbols-outlined\">{{ rightIcon }}</span>\n</button>\n", styles: ["button{align-items:center;background-color:#ecf2f6;border:1px solid #457fa6;border-radius:4px;color:#3e7295;display:inline-flex;flex-shrink:0;font-size:1em;font-weight:400;gap:.5em;height:2.25em;justify-content:center;padding:var(--status-button-padding, .25em .5em)}button .icon{font-size:1.25em}button:focus{outline:2px solid #b967c7;outline-offset:2px}button:hover{background-color:#a2bfd3;color:#26485f;cursor:pointer}button.success{background-color:#ebf6ee;border:1px solid #3ba35a;color:#1d562e}button.success:hover{background-color:#9dd1ac;color:#1d562e}button.info{background-color:#ecf2f6;border:1px solid #457fa6;color:#3e7295}button.info:hover{background-color:#a2bfd3;color:#26485f}button.warning{background-color:#faf9ec;border:1px solid #d1c844;color:#635f04}button.warning:hover{background-color:#e8e3a1;color:#635f04}button.error{background-color:#f9ecec;border:1px solid #c73e3d;color:#702121}button.error:hover{background-color:#e39e9e;color:#702121}button.disabled{background-color:#e7e7e7;border:1px solid #8f8f8f;color:#
|
|
2801
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.3.15", type: StatusButtonComponent, isStandalone: true, selector: "lib-status-button", inputs: { label: "label", status: "status", leftIcon: "leftIcon", rightIcon: "rightIcon", hideLeftIcon: ["hideLeftIcon", "hideLeftIcon", booleanAttribute], hideRightIcon: ["hideRightIcon", "hideRightIcon", booleanAttribute], clearVariant: ["clearVariant", "clearVariant", booleanAttribute] }, ngImport: i0, template: "<button\n type=\"button\"\n [ngClass]=\"[\n status,\n clearVariant ? 'strokeless transparent-bg' : ''\n ]\"\n>\n <span *ngIf=\"leftIcon\" class=\"icon material-symbols-outlined\">{{ leftIcon }}</span>\n {{ label }}\n <span *ngIf=\"rightIcon\" class=\"icon material-symbols-outlined\">{{ rightIcon }}</span>\n</button>\n", styles: ["button{align-items:center;background-color:#ecf2f6;border:1px solid #457fa6;border-radius:4px;color:#3e7295;display:inline-flex;flex-shrink:0;font-size:1em;font-weight:400;gap:.5em;height:2.25em;justify-content:center;padding:var(--status-button-padding, .25em .5em)}button .icon{font-size:1.25em}button:focus{outline:2px solid #b967c7;outline-offset:2px}button:hover{background-color:#a2bfd3;color:#26485f;cursor:pointer}button.success{background-color:#ebf6ee;border:1px solid #3ba35a;color:#1d562e}button.success:hover{background-color:#9dd1ac;color:#1d562e}button.info{background-color:#ecf2f6;border:1px solid #457fa6;color:#3e7295}button.info:hover{background-color:#a2bfd3;color:#26485f}button.warning{background-color:#faf9ec;border:1px solid #d1c844;color:#635f04}button.warning:hover{background-color:#e8e3a1;color:#635f04}button.error{background-color:#f9ecec;border:1px solid #c73e3d;color:#702121}button.error:hover{background-color:#e39e9e;color:#702121}button.disabled{background-color:#e7e7e7;border:1px solid #8f8f8f;color:#737373}button.disabled:hover{background-color:#d0d0d0;color:#141414}button.strokeless{border:0px}button.transparent-bg{background:transparent}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
2458
2802
|
}
|
|
2459
2803
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: StatusButtonComponent, decorators: [{
|
|
2460
2804
|
type: Component,
|
|
2461
|
-
args: [{ selector: 'lib-status-button', imports: [CommonModule, NgIf], template: "<button\n type=\"button\"\n [ngClass]=\"[\n status,\n clearVariant ? 'strokeless transparent-bg' : ''\n ]\"\n>\n <span *ngIf=\"leftIcon\" class=\"icon material-symbols-outlined\">{{ leftIcon }}</span>\n {{ label }}\n <span *ngIf=\"rightIcon\" class=\"icon material-symbols-outlined\">{{ rightIcon }}</span>\n</button>\n", styles: ["button{align-items:center;background-color:#ecf2f6;border:1px solid #457fa6;border-radius:4px;color:#3e7295;display:inline-flex;flex-shrink:0;font-size:1em;font-weight:400;gap:.5em;height:2.25em;justify-content:center;padding:var(--status-button-padding, .25em .5em)}button .icon{font-size:1.25em}button:focus{outline:2px solid #b967c7;outline-offset:2px}button:hover{background-color:#a2bfd3;color:#26485f;cursor:pointer}button.success{background-color:#ebf6ee;border:1px solid #3ba35a;color:#1d562e}button.success:hover{background-color:#9dd1ac;color:#1d562e}button.info{background-color:#ecf2f6;border:1px solid #457fa6;color:#3e7295}button.info:hover{background-color:#a2bfd3;color:#26485f}button.warning{background-color:#faf9ec;border:1px solid #d1c844;color:#635f04}button.warning:hover{background-color:#e8e3a1;color:#635f04}button.error{background-color:#f9ecec;border:1px solid #c73e3d;color:#702121}button.error:hover{background-color:#e39e9e;color:#702121}button.disabled{background-color:#e7e7e7;border:1px solid #8f8f8f;color:#
|
|
2805
|
+
args: [{ selector: 'lib-status-button', imports: [CommonModule, NgIf], template: "<button\n type=\"button\"\n [ngClass]=\"[\n status,\n clearVariant ? 'strokeless transparent-bg' : ''\n ]\"\n>\n <span *ngIf=\"leftIcon\" class=\"icon material-symbols-outlined\">{{ leftIcon }}</span>\n {{ label }}\n <span *ngIf=\"rightIcon\" class=\"icon material-symbols-outlined\">{{ rightIcon }}</span>\n</button>\n", styles: ["button{align-items:center;background-color:#ecf2f6;border:1px solid #457fa6;border-radius:4px;color:#3e7295;display:inline-flex;flex-shrink:0;font-size:1em;font-weight:400;gap:.5em;height:2.25em;justify-content:center;padding:var(--status-button-padding, .25em .5em)}button .icon{font-size:1.25em}button:focus{outline:2px solid #b967c7;outline-offset:2px}button:hover{background-color:#a2bfd3;color:#26485f;cursor:pointer}button.success{background-color:#ebf6ee;border:1px solid #3ba35a;color:#1d562e}button.success:hover{background-color:#9dd1ac;color:#1d562e}button.info{background-color:#ecf2f6;border:1px solid #457fa6;color:#3e7295}button.info:hover{background-color:#a2bfd3;color:#26485f}button.warning{background-color:#faf9ec;border:1px solid #d1c844;color:#635f04}button.warning:hover{background-color:#e8e3a1;color:#635f04}button.error{background-color:#f9ecec;border:1px solid #c73e3d;color:#702121}button.error:hover{background-color:#e39e9e;color:#702121}button.disabled{background-color:#e7e7e7;border:1px solid #8f8f8f;color:#737373}button.disabled:hover{background-color:#d0d0d0;color:#141414}button.strokeless{border:0px}button.transparent-bg{background:transparent}\n"] }]
|
|
2462
2806
|
}], propDecorators: { label: [{
|
|
2463
2807
|
type: Input,
|
|
2464
2808
|
args: [{ required: true }]
|
|
@@ -2627,9 +2971,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
2627
2971
|
}] } });
|
|
2628
2972
|
|
|
2629
2973
|
class SnackbarService {
|
|
2630
|
-
constructor(
|
|
2631
|
-
this.appRef =
|
|
2632
|
-
this.env =
|
|
2974
|
+
constructor() {
|
|
2975
|
+
this.appRef = inject(ApplicationRef);
|
|
2976
|
+
this.env = inject(EnvironmentInjector);
|
|
2633
2977
|
}
|
|
2634
2978
|
/**
|
|
2635
2979
|
* This open method is what consuming code will use to create a snackbar
|
|
@@ -2705,90 +3049,13 @@ class SnackbarService {
|
|
|
2705
3049
|
buttonClicked: compRef.instance.buttonClicked,
|
|
2706
3050
|
};
|
|
2707
3051
|
}
|
|
2708
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SnackbarService, deps: [
|
|
3052
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SnackbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2709
3053
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SnackbarService, providedIn: 'root' }); }
|
|
2710
3054
|
}
|
|
2711
3055
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SnackbarService, decorators: [{
|
|
2712
3056
|
type: Injectable,
|
|
2713
3057
|
args: [{ providedIn: 'root' }]
|
|
2714
|
-
}]
|
|
2715
|
-
|
|
2716
|
-
/**
|
|
2717
|
-
* A flexible, reusable button component that supports multiple button types
|
|
2718
|
-
* and various content combinations (icon before, title, icon after).
|
|
2719
|
-
*
|
|
2720
|
-
* @example
|
|
2721
|
-
* ```html
|
|
2722
|
-
* <!-- Primary button with icon and title -->
|
|
2723
|
-
* <lib-button
|
|
2724
|
-
* buttonType="primary"
|
|
2725
|
-
* title="Copy Citation"
|
|
2726
|
-
* iconBefore="content_copy"
|
|
2727
|
-
* (buttonClick)="copyCitation()">
|
|
2728
|
-
* </lib-button>
|
|
2729
|
-
*
|
|
2730
|
-
* <!-- Secondary button with title only -->
|
|
2731
|
-
* <lib-button
|
|
2732
|
-
* buttonType="secondary"
|
|
2733
|
-
* title="Cancel"
|
|
2734
|
-
* (buttonClick)="cancelAction()">
|
|
2735
|
-
* </lib-button>
|
|
2736
|
-
*
|
|
2737
|
-
* <!-- Transparent button with icon after title -->
|
|
2738
|
-
* <lib-button
|
|
2739
|
-
* buttonType="transparent"
|
|
2740
|
-
* title="Download"
|
|
2741
|
-
* iconAfter="download"
|
|
2742
|
-
* (buttonClick)="downloadFile()">
|
|
2743
|
-
* </lib-button>
|
|
2744
|
-
*
|
|
2745
|
-
* <!-- Thin button -->
|
|
2746
|
-
* <lib-button
|
|
2747
|
-
* buttonType="primary"
|
|
2748
|
-
* title="Submit"
|
|
2749
|
-
* [isThin]="true"
|
|
2750
|
-
* (buttonClick)="submitForm()">
|
|
2751
|
-
* </lib-button>
|
|
2752
|
-
* ```
|
|
2753
|
-
*/
|
|
2754
|
-
class ButtonComponent {
|
|
2755
|
-
constructor() {
|
|
2756
|
-
this.buttonType = 'primary';
|
|
2757
|
-
this.disabled = false;
|
|
2758
|
-
this.isThin = false;
|
|
2759
|
-
this.buttonClick = new EventEmitter();
|
|
2760
|
-
}
|
|
2761
|
-
/**
|
|
2762
|
-
* Handles button click events and emits the buttonClick event if the button is not disabled.
|
|
2763
|
-
*/
|
|
2764
|
-
onButtonClick() {
|
|
2765
|
-
if (!this.disabled) {
|
|
2766
|
-
this.buttonClick.emit();
|
|
2767
|
-
}
|
|
2768
|
-
}
|
|
2769
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2770
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ButtonComponent, isStandalone: true, selector: "lib-button", inputs: { buttonType: "buttonType", title: "title", iconBefore: "iconBefore", iconAfter: "iconAfter", disabled: "disabled", isThin: "isThin", ariaLabel: "ariaLabel" }, outputs: { buttonClick: "buttonClick" }, ngImport: i0, template: "<button\n type=\"button\"\n [class]=\"'btn btn-' + buttonType + (isThin ? ' btn-thin' : '') + (title ? '' : ' btn-icon-only')\"\n [disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\n (click)=\"onButtonClick()\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n>\n @if (iconBefore) {\n <span class=\"icon material-symbols-outlined\" [ngClass]=\"{ 'icon-before': title }\">{{ iconBefore }}</span>\n }\n\n @if (title) {\n <span class=\"button-title\">{{ title }}</span>\n }\n\n @if (iconAfter) {\n <span class=\"icon icon-after material-symbols-outlined\">{{ iconAfter }}</span>\n }\n</button>\n", styles: [".btn{padding:.75rem 1.5rem;border-radius:.25rem;font-size:1rem;font-weight:600;cursor:pointer;transition:all .2s ease;border:none;display:inline-flex;align-items:center;outline:none;line-height:1.5rem}.btn.btn-thin{padding:.25rem 2.25rem;border-radius:.5rem;font-weight:400}.btn.btn-thin .icon img{height:1.25rem}.btn:disabled{cursor:not-allowed;color:#767676}.btn:disabled:not(.btn-transparent){background-color:#e7e7e7;border:.0625rem solid #767676}.btn:focus-visible{outline:.125rem solid #b967c7;outline-offset:.125rem}.btn .icon{display:flex;align-items:center;justify-content:center}.btn .icon img{height:1.5rem;width:auto}.btn .icon.icon-before{margin-right:.25rem}.btn .icon.icon-after{margin-left:.25rem}.btn .button-title{flex-shrink:0}.btn-icon-only{padding:.75rem}.btn-primary{background-color:#0047ba;color:#fff;border:.0625rem solid #0047ba}.btn-primary:hover:not(:disabled){background-color:#003995}.btn-secondary{background-color:#fff;color:#00245d;border:.0625rem solid #0047ba}.btn-secondary:hover:not(:disabled){background-color:#e5edf8}.btn-transparent{background-color:transparent;color:#00245d}.btn-transparent:hover:not(:disabled){background-color:#e5edf8}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
2771
|
-
}
|
|
2772
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
2773
|
-
type: Component,
|
|
2774
|
-
args: [{ selector: 'lib-button', standalone: true, imports: [CommonModule], template: "<button\n type=\"button\"\n [class]=\"'btn btn-' + buttonType + (isThin ? ' btn-thin' : '') + (title ? '' : ' btn-icon-only')\"\n [disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\n (click)=\"onButtonClick()\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n>\n @if (iconBefore) {\n <span class=\"icon material-symbols-outlined\" [ngClass]=\"{ 'icon-before': title }\">{{ iconBefore }}</span>\n }\n\n @if (title) {\n <span class=\"button-title\">{{ title }}</span>\n }\n\n @if (iconAfter) {\n <span class=\"icon icon-after material-symbols-outlined\">{{ iconAfter }}</span>\n }\n</button>\n", styles: [".btn{padding:.75rem 1.5rem;border-radius:.25rem;font-size:1rem;font-weight:600;cursor:pointer;transition:all .2s ease;border:none;display:inline-flex;align-items:center;outline:none;line-height:1.5rem}.btn.btn-thin{padding:.25rem 2.25rem;border-radius:.5rem;font-weight:400}.btn.btn-thin .icon img{height:1.25rem}.btn:disabled{cursor:not-allowed;color:#767676}.btn:disabled:not(.btn-transparent){background-color:#e7e7e7;border:.0625rem solid #767676}.btn:focus-visible{outline:.125rem solid #b967c7;outline-offset:.125rem}.btn .icon{display:flex;align-items:center;justify-content:center}.btn .icon img{height:1.5rem;width:auto}.btn .icon.icon-before{margin-right:.25rem}.btn .icon.icon-after{margin-left:.25rem}.btn .button-title{flex-shrink:0}.btn-icon-only{padding:.75rem}.btn-primary{background-color:#0047ba;color:#fff;border:.0625rem solid #0047ba}.btn-primary:hover:not(:disabled){background-color:#003995}.btn-secondary{background-color:#fff;color:#00245d;border:.0625rem solid #0047ba}.btn-secondary:hover:not(:disabled){background-color:#e5edf8}.btn-transparent{background-color:transparent;color:#00245d}.btn-transparent:hover:not(:disabled){background-color:#e5edf8}\n"] }]
|
|
2775
|
-
}], propDecorators: { buttonType: [{
|
|
2776
|
-
type: Input
|
|
2777
|
-
}], title: [{
|
|
2778
|
-
type: Input
|
|
2779
|
-
}], iconBefore: [{
|
|
2780
|
-
type: Input
|
|
2781
|
-
}], iconAfter: [{
|
|
2782
|
-
type: Input
|
|
2783
|
-
}], disabled: [{
|
|
2784
|
-
type: Input
|
|
2785
|
-
}], isThin: [{
|
|
2786
|
-
type: Input
|
|
2787
|
-
}], ariaLabel: [{
|
|
2788
|
-
type: Input
|
|
2789
|
-
}], buttonClick: [{
|
|
2790
|
-
type: Output
|
|
2791
|
-
}] } });
|
|
3058
|
+
}] });
|
|
2792
3059
|
|
|
2793
3060
|
class ButtonGroupItemComponent {
|
|
2794
3061
|
constructor() {
|
|
@@ -2804,11 +3071,11 @@ class ButtonGroupItemComponent {
|
|
|
2804
3071
|
this.buttonClick.emit(this.id);
|
|
2805
3072
|
}
|
|
2806
3073
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ButtonGroupItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2807
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ButtonGroupItemComponent, isStandalone: true, selector: "lib-button-group-item", inputs: { id: "id", title: "title", icon: "icon", ariaLabel: "ariaLabel", disabled: "disabled", position: "position" }, outputs: { buttonClick: "buttonClick" }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"tab-btn\"\n [class.first]=\"position === 'first'\"\n [class.last]=\"position === 'last'\"\n [class.active]=\"isActive\"\n [disabled]=\"disabled\"\n (click)=\"onClick()\"\n role=\"tab\"\n [attr.aria-pressed]=\"isActive\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n>\n @if (icon) {\n <span class=\"icon material-symbols-outlined\">{{ icon }}</span>\n }\n\n @if (title) {\n <span class=\"button-title\">{{ title }}</span>\n }\n</button>\n", styles: [".tab-btn{padding:.5rem 1rem;font-size:1rem;font-weight:400;line-height:1.5rem;color:#00245d;background-color:#fff;cursor:pointer;position:relative;border:.0625rem solid #d0d0d0;border-left:none;border-radius:0;transition:all .2s ease;display:inline-flex;align-items:center;justify-content:center;height:2.5rem}.tab-btn:not(:disabled):hover{background-color:#e5edf8}.tab-btn.active{background-color:#0047ba;color:#fff;z-index:2}.tab-btn.active:not(:disabled):hover{background-color:#003995}.tab-btn:focus-visible{outline:.125rem solid #b967c7;outline-offset:.125rem;z-index:3}.tab-btn:disabled{cursor:not-allowed;color:#
|
|
3074
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ButtonGroupItemComponent, isStandalone: true, selector: "lib-button-group-item", inputs: { id: "id", title: "title", icon: "icon", ariaLabel: "ariaLabel", disabled: "disabled", position: "position" }, outputs: { buttonClick: "buttonClick" }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"tab-btn\"\n [class.first]=\"position === 'first'\"\n [class.last]=\"position === 'last'\"\n [class.active]=\"isActive\"\n [disabled]=\"disabled\"\n (click)=\"onClick()\"\n role=\"tab\"\n [attr.aria-pressed]=\"isActive\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n>\n @if (icon) {\n <span class=\"icon material-symbols-outlined\">{{ icon }}</span>\n }\n\n @if (title) {\n <span class=\"button-title\">{{ title }}</span>\n }\n</button>\n", styles: ["html{border:0;margin:0;padding:0;-webkit-text-size-adjust:100%}body{margin:0;padding:0}*,*:before,*:after{box-sizing:border-box}:root{--color-navy: #00245d;--color-royal: #0047ba;--color-white: #ffffff;--color-blue-500: #00245d;--color-blue-400: #003995;--color-blue-300: #0047ba;--color-blue-200: #336cc8;--color-blue-150: #ccdaf1;--color-blue-100: #e5edf8;--color-gray-500: #141414;--color-gray-400: #737373;--color-gray-300: #8f8f8f;--color-gray-200: #d0d0d0;--color-gray-100: #e7e7e7;--color-gray-50: #f9f9f9;--color-gray-brand-400: #737373;--color-green-500: #1d562e;--color-green-400: #2e8545;--color-green-300: #3ba35a;--color-green-200: #9dd1ac;--color-green-100: #ebf6ee;--color-teal-500: #26485f;--color-teal-400: #3e7295;--color-teal-300: #457fa6;--color-teal-200: #a2bfd3;--color-teal-100: #ecf2f6;--color-red-500: #702121;--color-red-400: #b33837;--color-red-300: #c73e3d;--color-red-200: #e39e9e;--color-red-100: #f9ecec;--color-yellow-500: #635f04;--color-yellow-400: #928c30;--color-yellow-300: #d1c844;--color-yellow-200: #e8e3a1;--color-yellow-100: #f2f0e9;--color-purple-focus: #b967c7;--text-heading: #002e5d;--text-secondary-heading: #737373;--text-body: #141414;--text-disabled: #737373;--text-link: #336cc8;--text-on-action: #ffffff;--text-success: #1d562e;--text-info: #26485f;--text-error: #702121;--text-warning: #635f04;--surface-success: #ebf6ee;--surface-info: #ecf2f6;--surface-error: #f9ecec;--surface-warning: #f2f0e9;--focus-ring-color: #b967c7}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Light.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Regular.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Semibold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Bold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-LightItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Italic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-SemiboldItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-BoldItalic.ttf) format(\"truetype\");font-display:swap}h1,h2,h3,h4,h5,h6,span:not(.material-symbols-outlined),a,p{font-family:Source Sans Pro}h1{font-weight:300;font-style:normal;color:var(--text-heading)}h2{font-weight:400;font-style:normal;color:var(--text-heading)}h3{font-weight:700;font-style:normal;color:var(--text-heading)}h4,h5,h6{font-weight:600;font-style:normal;color:var(--text-secondary-heading)}.hbll-default-body{font-weight:400;font-style:normal;max-width:35rem;min-width:22.25rem;color:var(--text-body)}.hbll-caption{font-weight:400;font-style:normal;max-width:25.25rem;min-width:17.5rem;color:var(--text-body)}.hbll-large{font-weight:400;font-style:normal;max-width:41.25rem;min-width:26.5rem;color:var(--text-body)}a{color:var(--text-link);text-decoration:underline}.hbll-emphasis{font-weight:600}h1{font-size:2rem;line-height:2.5rem}h2{font-size:1.75rem;line-height:2.25rem}h3,h4{font-size:1.5rem;line-height:2rem}h5,h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:.875rem;line-height:1.25rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1rem;line-height:1.5rem}@media screen and (min-width: 52.125em){h1{font-size:3rem;line-height:3.5rem}h2{font-size:2.5rem;line-height:3rem}h3{font-size:2rem;line-height:3rem}h4{font-size:1.75rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}@media screen and (min-width: 90em){h1{font-size:3.75rem;line-height:4.25rem}h2{font-size:3rem;line-height:3.5rem}h3{font-size:2.5rem;line-height:3rem}h4{font-size:2rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.tab-btn{padding:.5rem 1rem;font-size:1rem;font-weight:400;line-height:1.5rem;color:#00245d;background-color:#fff;cursor:pointer;position:relative;border:.0625rem solid #d0d0d0;border-left:none;border-radius:0;transition:all .2s ease;display:inline-flex;align-items:center;justify-content:center;height:2.5rem}.tab-btn:not(:disabled):hover{background-color:#e5edf8}.tab-btn.active{background-color:#0047ba;color:#fff;z-index:2}.tab-btn.active:not(:disabled):hover{background-color:#003995}.tab-btn:focus-visible{outline:.125rem solid #b967c7;outline-offset:.125rem;z-index:3}.tab-btn:disabled{cursor:not-allowed;color:#737373;background-color:#e7e7e7;border-color:#737373}.tab-btn .icon{display:flex;align-items:center;justify-content:center}.tab-btn .icon img{height:1.5rem;width:auto}.tab-btn .button-title{flex-shrink:0}.tab-btn.first{border-radius:.25rem 0 0 .25rem;border-left:.0625rem solid #d0d0d0}.tab-btn.first:disabled{border-left:.0625rem solid #737373}.tab-btn.last{border-radius:0 .25rem .25rem 0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
2808
3075
|
}
|
|
2809
3076
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ButtonGroupItemComponent, decorators: [{
|
|
2810
3077
|
type: Component,
|
|
2811
|
-
args: [{ selector: 'lib-button-group-item', standalone: true, imports: [CommonModule], template: "<button\n type=\"button\"\n class=\"tab-btn\"\n [class.first]=\"position === 'first'\"\n [class.last]=\"position === 'last'\"\n [class.active]=\"isActive\"\n [disabled]=\"disabled\"\n (click)=\"onClick()\"\n role=\"tab\"\n [attr.aria-pressed]=\"isActive\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n>\n @if (icon) {\n <span class=\"icon material-symbols-outlined\">{{ icon }}</span>\n }\n\n @if (title) {\n <span class=\"button-title\">{{ title }}</span>\n }\n</button>\n", styles: [".tab-btn{padding:.5rem 1rem;font-size:1rem;font-weight:400;line-height:1.5rem;color:#00245d;background-color:#fff;cursor:pointer;position:relative;border:.0625rem solid #d0d0d0;border-left:none;border-radius:0;transition:all .2s ease;display:inline-flex;align-items:center;justify-content:center;height:2.5rem}.tab-btn:not(:disabled):hover{background-color:#e5edf8}.tab-btn.active{background-color:#0047ba;color:#fff;z-index:2}.tab-btn.active:not(:disabled):hover{background-color:#003995}.tab-btn:focus-visible{outline:.125rem solid #b967c7;outline-offset:.125rem;z-index:3}.tab-btn:disabled{cursor:not-allowed;color:#
|
|
3078
|
+
args: [{ selector: 'lib-button-group-item', standalone: true, imports: [CommonModule], template: "<button\n type=\"button\"\n class=\"tab-btn\"\n [class.first]=\"position === 'first'\"\n [class.last]=\"position === 'last'\"\n [class.active]=\"isActive\"\n [disabled]=\"disabled\"\n (click)=\"onClick()\"\n role=\"tab\"\n [attr.aria-pressed]=\"isActive\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n>\n @if (icon) {\n <span class=\"icon material-symbols-outlined\">{{ icon }}</span>\n }\n\n @if (title) {\n <span class=\"button-title\">{{ title }}</span>\n }\n</button>\n", styles: ["html{border:0;margin:0;padding:0;-webkit-text-size-adjust:100%}body{margin:0;padding:0}*,*:before,*:after{box-sizing:border-box}:root{--color-navy: #00245d;--color-royal: #0047ba;--color-white: #ffffff;--color-blue-500: #00245d;--color-blue-400: #003995;--color-blue-300: #0047ba;--color-blue-200: #336cc8;--color-blue-150: #ccdaf1;--color-blue-100: #e5edf8;--color-gray-500: #141414;--color-gray-400: #737373;--color-gray-300: #8f8f8f;--color-gray-200: #d0d0d0;--color-gray-100: #e7e7e7;--color-gray-50: #f9f9f9;--color-gray-brand-400: #737373;--color-green-500: #1d562e;--color-green-400: #2e8545;--color-green-300: #3ba35a;--color-green-200: #9dd1ac;--color-green-100: #ebf6ee;--color-teal-500: #26485f;--color-teal-400: #3e7295;--color-teal-300: #457fa6;--color-teal-200: #a2bfd3;--color-teal-100: #ecf2f6;--color-red-500: #702121;--color-red-400: #b33837;--color-red-300: #c73e3d;--color-red-200: #e39e9e;--color-red-100: #f9ecec;--color-yellow-500: #635f04;--color-yellow-400: #928c30;--color-yellow-300: #d1c844;--color-yellow-200: #e8e3a1;--color-yellow-100: #f2f0e9;--color-purple-focus: #b967c7;--text-heading: #002e5d;--text-secondary-heading: #737373;--text-body: #141414;--text-disabled: #737373;--text-link: #336cc8;--text-on-action: #ffffff;--text-success: #1d562e;--text-info: #26485f;--text-error: #702121;--text-warning: #635f04;--surface-success: #ebf6ee;--surface-info: #ecf2f6;--surface-error: #f9ecec;--surface-warning: #f2f0e9;--focus-ring-color: #b967c7}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Light.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Regular.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Semibold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Bold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-LightItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Italic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-SemiboldItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-BoldItalic.ttf) format(\"truetype\");font-display:swap}h1,h2,h3,h4,h5,h6,span:not(.material-symbols-outlined),a,p{font-family:Source Sans Pro}h1{font-weight:300;font-style:normal;color:var(--text-heading)}h2{font-weight:400;font-style:normal;color:var(--text-heading)}h3{font-weight:700;font-style:normal;color:var(--text-heading)}h4,h5,h6{font-weight:600;font-style:normal;color:var(--text-secondary-heading)}.hbll-default-body{font-weight:400;font-style:normal;max-width:35rem;min-width:22.25rem;color:var(--text-body)}.hbll-caption{font-weight:400;font-style:normal;max-width:25.25rem;min-width:17.5rem;color:var(--text-body)}.hbll-large{font-weight:400;font-style:normal;max-width:41.25rem;min-width:26.5rem;color:var(--text-body)}a{color:var(--text-link);text-decoration:underline}.hbll-emphasis{font-weight:600}h1{font-size:2rem;line-height:2.5rem}h2{font-size:1.75rem;line-height:2.25rem}h3,h4{font-size:1.5rem;line-height:2rem}h5,h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:.875rem;line-height:1.25rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1rem;line-height:1.5rem}@media screen and (min-width: 52.125em){h1{font-size:3rem;line-height:3.5rem}h2{font-size:2.5rem;line-height:3rem}h3{font-size:2rem;line-height:3rem}h4{font-size:1.75rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}@media screen and (min-width: 90em){h1{font-size:3.75rem;line-height:4.25rem}h2{font-size:3rem;line-height:3.5rem}h3{font-size:2.5rem;line-height:3rem}h4{font-size:2rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.tab-btn{padding:.5rem 1rem;font-size:1rem;font-weight:400;line-height:1.5rem;color:#00245d;background-color:#fff;cursor:pointer;position:relative;border:.0625rem solid #d0d0d0;border-left:none;border-radius:0;transition:all .2s ease;display:inline-flex;align-items:center;justify-content:center;height:2.5rem}.tab-btn:not(:disabled):hover{background-color:#e5edf8}.tab-btn.active{background-color:#0047ba;color:#fff;z-index:2}.tab-btn.active:not(:disabled):hover{background-color:#003995}.tab-btn:focus-visible{outline:.125rem solid #b967c7;outline-offset:.125rem;z-index:3}.tab-btn:disabled{cursor:not-allowed;color:#737373;background-color:#e7e7e7;border-color:#737373}.tab-btn .icon{display:flex;align-items:center;justify-content:center}.tab-btn .icon img{height:1.5rem;width:auto}.tab-btn .button-title{flex-shrink:0}.tab-btn.first{border-radius:.25rem 0 0 .25rem;border-left:.0625rem solid #d0d0d0}.tab-btn.first:disabled{border-left:.0625rem solid #737373}.tab-btn.last{border-radius:0 .25rem .25rem 0}\n"] }]
|
|
2812
3079
|
}], propDecorators: { id: [{
|
|
2813
3080
|
type: Input,
|
|
2814
3081
|
args: [{ required: true }]
|
|
@@ -2978,6 +3245,844 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
2978
3245
|
args: [ButtonGroupItemComponent]
|
|
2979
3246
|
}] } });
|
|
2980
3247
|
|
|
3248
|
+
class TabItemComponent {
|
|
3249
|
+
constructor() {
|
|
3250
|
+
this.disabled = false;
|
|
3251
|
+
this.itemClick = new EventEmitter();
|
|
3252
|
+
// Set by parent tab bar after content projection
|
|
3253
|
+
this.isActive = false;
|
|
3254
|
+
}
|
|
3255
|
+
/**
|
|
3256
|
+
* Handles the tab item click event and emits the tab's ID to the parent component.
|
|
3257
|
+
*/
|
|
3258
|
+
onClick() {
|
|
3259
|
+
this.itemClick.emit(this.id);
|
|
3260
|
+
}
|
|
3261
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TabItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3262
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: TabItemComponent, isStandalone: true, selector: "lib-tab-item", inputs: { id: "id", title: "title", icon: "icon", ariaLabel: "ariaLabel", disabled: "disabled", routerLink: "routerLink" }, outputs: { itemClick: "itemClick" }, ngImport: i0, template: "@if (routerLink) {\n <a\n class=\"tab-item\"\n [routerLink]=\"routerLink\"\n routerLinkActive=\"active\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n role=\"tab\"\n >\n @if (icon) {\n <span class=\"icon material-symbols-outlined\">{{ icon }}</span>\n }\n\n @if (title) {\n <span class=\"title\">{{ title }}</span>\n }\n </a>\n} @else {\n <button\n type=\"button\"\n class=\"tab-item\"\n [class.active]=\"isActive\"\n [disabled]=\"disabled\"\n (click)=\"onClick()\"\n role=\"tab\"\n [attr.aria-selected]=\"isActive\"\n [attr.aria-disabled]=\"disabled ? true : null\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n >\n @if (icon) {\n <span class=\"icon material-symbols-outlined\">{{ icon }}</span>\n }\n\n @if (title) {\n <span class=\"title\">{{ title }}</span>\n }\n </button>\n}\n", styles: ["html{border:0;margin:0;padding:0;-webkit-text-size-adjust:100%}body{margin:0;padding:0}*,*:before,*:after{box-sizing:border-box}:root{--color-navy: #00245d;--color-royal: #0047ba;--color-white: #ffffff;--color-blue-500: #00245d;--color-blue-400: #003995;--color-blue-300: #0047ba;--color-blue-200: #336cc8;--color-blue-150: #ccdaf1;--color-blue-100: #e5edf8;--color-gray-500: #141414;--color-gray-400: #737373;--color-gray-300: #8f8f8f;--color-gray-200: #d0d0d0;--color-gray-100: #e7e7e7;--color-gray-50: #f9f9f9;--color-gray-brand-400: #737373;--color-green-500: #1d562e;--color-green-400: #2e8545;--color-green-300: #3ba35a;--color-green-200: #9dd1ac;--color-green-100: #ebf6ee;--color-teal-500: #26485f;--color-teal-400: #3e7295;--color-teal-300: #457fa6;--color-teal-200: #a2bfd3;--color-teal-100: #ecf2f6;--color-red-500: #702121;--color-red-400: #b33837;--color-red-300: #c73e3d;--color-red-200: #e39e9e;--color-red-100: #f9ecec;--color-yellow-500: #635f04;--color-yellow-400: #928c30;--color-yellow-300: #d1c844;--color-yellow-200: #e8e3a1;--color-yellow-100: #f2f0e9;--color-purple-focus: #b967c7;--text-heading: #002e5d;--text-secondary-heading: #737373;--text-body: #141414;--text-disabled: #737373;--text-link: #336cc8;--text-on-action: #ffffff;--text-success: #1d562e;--text-info: #26485f;--text-error: #702121;--text-warning: #635f04;--surface-success: #ebf6ee;--surface-info: #ecf2f6;--surface-error: #f9ecec;--surface-warning: #f2f0e9;--focus-ring-color: #b967c7}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Light.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Regular.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Semibold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Bold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-LightItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Italic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-SemiboldItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-BoldItalic.ttf) format(\"truetype\");font-display:swap}h1,h2,h3,h4,h5,h6,span:not(.material-symbols-outlined),a,p{font-family:Source Sans Pro}h1{font-weight:300;font-style:normal;color:var(--text-heading)}h2{font-weight:400;font-style:normal;color:var(--text-heading)}h3{font-weight:700;font-style:normal;color:var(--text-heading)}h4,h5,h6{font-weight:600;font-style:normal;color:var(--text-secondary-heading)}.hbll-default-body{font-weight:400;font-style:normal;max-width:35rem;min-width:22.25rem;color:var(--text-body)}.hbll-caption{font-weight:400;font-style:normal;max-width:25.25rem;min-width:17.5rem;color:var(--text-body)}.hbll-large{font-weight:400;font-style:normal;max-width:41.25rem;min-width:26.5rem;color:var(--text-body)}a{color:var(--text-link);text-decoration:underline}.hbll-emphasis{font-weight:600}h1{font-size:2rem;line-height:2.5rem}h2{font-size:1.75rem;line-height:2.25rem}h3,h4{font-size:1.5rem;line-height:2rem}h5,h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:.875rem;line-height:1.25rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1rem;line-height:1.5rem}@media screen and (min-width: 52.125em){h1{font-size:3rem;line-height:3.5rem}h2{font-size:2.5rem;line-height:3rem}h3{font-size:2rem;line-height:3rem}h4{font-size:1.75rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}@media screen and (min-width: 90em){h1{font-size:3.75rem;line-height:4.25rem}h2{font-size:3rem;line-height:3.5rem}h3{font-size:2.5rem;line-height:3rem}h4{font-size:2rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}:host{display:contents}.title{margin:0;font-size:1.25rem;color:#141414}.tab-item{display:flex;flex-direction:row;justify-content:center;align-items:center;padding:.75rem;gap:.5rem;font-size:1rem;height:4rem;min-width:114px;color:#002e5d;cursor:pointer;border:none;border-radius:0;border-bottom:2px solid transparent;transition:all .05s ease;position:relative;background-color:transparent;text-decoration:none}.tab-item:not(:disabled):hover{background-color:#e5edf8}.tab-item.active{border-bottom-color:#0047ba;border-bottom-width:.2rem;z-index:1}.tab-item.active:not(:disabled):hover{background-color:#fff}.tab-item:focus-visible{outline:.125rem solid #b967c7;outline-offset:.125rem;z-index:2}.tab-item:disabled,.tab-item[aria-disabled=true]{cursor:not-allowed;color:#141414;background-color:#fff;opacity:.6;pointer-events:none}.tab-item .icon{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;font-size:1.5rem;flex-shrink:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] }); }
|
|
3263
|
+
}
|
|
3264
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TabItemComponent, decorators: [{
|
|
3265
|
+
type: Component,
|
|
3266
|
+
args: [{ selector: 'lib-tab-item', standalone: true, imports: [CommonModule, RouterLink, RouterLinkActive], template: "@if (routerLink) {\n <a\n class=\"tab-item\"\n [routerLink]=\"routerLink\"\n routerLinkActive=\"active\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n role=\"tab\"\n >\n @if (icon) {\n <span class=\"icon material-symbols-outlined\">{{ icon }}</span>\n }\n\n @if (title) {\n <span class=\"title\">{{ title }}</span>\n }\n </a>\n} @else {\n <button\n type=\"button\"\n class=\"tab-item\"\n [class.active]=\"isActive\"\n [disabled]=\"disabled\"\n (click)=\"onClick()\"\n role=\"tab\"\n [attr.aria-selected]=\"isActive\"\n [attr.aria-disabled]=\"disabled ? true : null\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n >\n @if (icon) {\n <span class=\"icon material-symbols-outlined\">{{ icon }}</span>\n }\n\n @if (title) {\n <span class=\"title\">{{ title }}</span>\n }\n </button>\n}\n", styles: ["html{border:0;margin:0;padding:0;-webkit-text-size-adjust:100%}body{margin:0;padding:0}*,*:before,*:after{box-sizing:border-box}:root{--color-navy: #00245d;--color-royal: #0047ba;--color-white: #ffffff;--color-blue-500: #00245d;--color-blue-400: #003995;--color-blue-300: #0047ba;--color-blue-200: #336cc8;--color-blue-150: #ccdaf1;--color-blue-100: #e5edf8;--color-gray-500: #141414;--color-gray-400: #737373;--color-gray-300: #8f8f8f;--color-gray-200: #d0d0d0;--color-gray-100: #e7e7e7;--color-gray-50: #f9f9f9;--color-gray-brand-400: #737373;--color-green-500: #1d562e;--color-green-400: #2e8545;--color-green-300: #3ba35a;--color-green-200: #9dd1ac;--color-green-100: #ebf6ee;--color-teal-500: #26485f;--color-teal-400: #3e7295;--color-teal-300: #457fa6;--color-teal-200: #a2bfd3;--color-teal-100: #ecf2f6;--color-red-500: #702121;--color-red-400: #b33837;--color-red-300: #c73e3d;--color-red-200: #e39e9e;--color-red-100: #f9ecec;--color-yellow-500: #635f04;--color-yellow-400: #928c30;--color-yellow-300: #d1c844;--color-yellow-200: #e8e3a1;--color-yellow-100: #f2f0e9;--color-purple-focus: #b967c7;--text-heading: #002e5d;--text-secondary-heading: #737373;--text-body: #141414;--text-disabled: #737373;--text-link: #336cc8;--text-on-action: #ffffff;--text-success: #1d562e;--text-info: #26485f;--text-error: #702121;--text-warning: #635f04;--surface-success: #ebf6ee;--surface-info: #ecf2f6;--surface-error: #f9ecec;--surface-warning: #f2f0e9;--focus-ring-color: #b967c7}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Light.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Regular.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Semibold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Bold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-LightItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Italic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-SemiboldItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-BoldItalic.ttf) format(\"truetype\");font-display:swap}h1,h2,h3,h4,h5,h6,span:not(.material-symbols-outlined),a,p{font-family:Source Sans Pro}h1{font-weight:300;font-style:normal;color:var(--text-heading)}h2{font-weight:400;font-style:normal;color:var(--text-heading)}h3{font-weight:700;font-style:normal;color:var(--text-heading)}h4,h5,h6{font-weight:600;font-style:normal;color:var(--text-secondary-heading)}.hbll-default-body{font-weight:400;font-style:normal;max-width:35rem;min-width:22.25rem;color:var(--text-body)}.hbll-caption{font-weight:400;font-style:normal;max-width:25.25rem;min-width:17.5rem;color:var(--text-body)}.hbll-large{font-weight:400;font-style:normal;max-width:41.25rem;min-width:26.5rem;color:var(--text-body)}a{color:var(--text-link);text-decoration:underline}.hbll-emphasis{font-weight:600}h1{font-size:2rem;line-height:2.5rem}h2{font-size:1.75rem;line-height:2.25rem}h3,h4{font-size:1.5rem;line-height:2rem}h5,h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:.875rem;line-height:1.25rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1rem;line-height:1.5rem}@media screen and (min-width: 52.125em){h1{font-size:3rem;line-height:3.5rem}h2{font-size:2.5rem;line-height:3rem}h3{font-size:2rem;line-height:3rem}h4{font-size:1.75rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}@media screen and (min-width: 90em){h1{font-size:3.75rem;line-height:4.25rem}h2{font-size:3rem;line-height:3.5rem}h3{font-size:2.5rem;line-height:3rem}h4{font-size:2rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}:host{display:contents}.title{margin:0;font-size:1.25rem;color:#141414}.tab-item{display:flex;flex-direction:row;justify-content:center;align-items:center;padding:.75rem;gap:.5rem;font-size:1rem;height:4rem;min-width:114px;color:#002e5d;cursor:pointer;border:none;border-radius:0;border-bottom:2px solid transparent;transition:all .05s ease;position:relative;background-color:transparent;text-decoration:none}.tab-item:not(:disabled):hover{background-color:#e5edf8}.tab-item.active{border-bottom-color:#0047ba;border-bottom-width:.2rem;z-index:1}.tab-item.active:not(:disabled):hover{background-color:#fff}.tab-item:focus-visible{outline:.125rem solid #b967c7;outline-offset:.125rem;z-index:2}.tab-item:disabled,.tab-item[aria-disabled=true]{cursor:not-allowed;color:#141414;background-color:#fff;opacity:.6;pointer-events:none}.tab-item .icon{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;font-size:1.5rem;flex-shrink:0}\n"] }]
|
|
3267
|
+
}], propDecorators: { id: [{
|
|
3268
|
+
type: Input,
|
|
3269
|
+
args: [{ required: true }]
|
|
3270
|
+
}], title: [{
|
|
3271
|
+
type: Input
|
|
3272
|
+
}], icon: [{
|
|
3273
|
+
type: Input
|
|
3274
|
+
}], ariaLabel: [{
|
|
3275
|
+
type: Input
|
|
3276
|
+
}], disabled: [{
|
|
3277
|
+
type: Input
|
|
3278
|
+
}], routerLink: [{
|
|
3279
|
+
type: Input
|
|
3280
|
+
}], itemClick: [{
|
|
3281
|
+
type: Output
|
|
3282
|
+
}] } });
|
|
3283
|
+
|
|
3284
|
+
class TabBarComponent {
|
|
3285
|
+
constructor() {
|
|
3286
|
+
this.activeTabChange = new EventEmitter();
|
|
3287
|
+
this.elementRef = inject(ElementRef);
|
|
3288
|
+
this.activeTabId = '';
|
|
3289
|
+
this.subscriptions = [];
|
|
3290
|
+
}
|
|
3291
|
+
/**
|
|
3292
|
+
* Angular lifecycle hook called after content projection is initialized.
|
|
3293
|
+
* Sets up the initial active tab and subscribes to tab click events from all tab items.
|
|
3294
|
+
*/
|
|
3295
|
+
ngAfterContentInit() {
|
|
3296
|
+
// Handle both Angular components (via ContentChildren) and custom elements (via DOM)
|
|
3297
|
+
if (this.tabItems.length > 0) {
|
|
3298
|
+
// Angular component usage
|
|
3299
|
+
this.initializeActiveTab();
|
|
3300
|
+
this.tabItems.forEach((item) => {
|
|
3301
|
+
const sub = item.itemClick.subscribe((id) => this.onTabClick(id));
|
|
3302
|
+
this.subscriptions.push(sub);
|
|
3303
|
+
});
|
|
3304
|
+
}
|
|
3305
|
+
else {
|
|
3306
|
+
// Custom element usage - delay slightly to ensure custom elements are fully initialized
|
|
3307
|
+
setTimeout(() => {
|
|
3308
|
+
this.initializeCustomElements();
|
|
3309
|
+
}, 0);
|
|
3310
|
+
}
|
|
3311
|
+
}
|
|
3312
|
+
/**
|
|
3313
|
+
* Initializes custom element children when used as web components.
|
|
3314
|
+
*/
|
|
3315
|
+
initializeCustomElements() {
|
|
3316
|
+
const hostElement = this.elementRef.nativeElement;
|
|
3317
|
+
const customElementChildren = Array.from(hostElement.querySelectorAll('hbll-tab-item, lib-tab-item'));
|
|
3318
|
+
if (customElementChildren.length > 0) {
|
|
3319
|
+
const initialId = this.initialActiveId;
|
|
3320
|
+
if (initialId) {
|
|
3321
|
+
this.activeTabId = initialId;
|
|
3322
|
+
customElementChildren.forEach((item) => {
|
|
3323
|
+
const itemId = item.getAttribute('id');
|
|
3324
|
+
if (itemId === initialId) {
|
|
3325
|
+
this.setActiveState(item, true);
|
|
3326
|
+
}
|
|
3327
|
+
else {
|
|
3328
|
+
this.setActiveState(item, false);
|
|
3329
|
+
}
|
|
3330
|
+
});
|
|
3331
|
+
}
|
|
3332
|
+
// Listen to clicks on custom elements
|
|
3333
|
+
customElementChildren.forEach((item) => {
|
|
3334
|
+
item.addEventListener('click', () => {
|
|
3335
|
+
const itemId = item.getAttribute('id');
|
|
3336
|
+
if (itemId && !item.hasAttribute('disabled')) {
|
|
3337
|
+
this.handleCustomElementClick(itemId, customElementChildren);
|
|
3338
|
+
}
|
|
3339
|
+
});
|
|
3340
|
+
});
|
|
3341
|
+
}
|
|
3342
|
+
}
|
|
3343
|
+
/**
|
|
3344
|
+
* Sets the active state on a custom element by toggling the active class on its button.
|
|
3345
|
+
*/
|
|
3346
|
+
setActiveState(element, isActive) {
|
|
3347
|
+
const button = element.querySelector('.tab-item');
|
|
3348
|
+
if (button) {
|
|
3349
|
+
if (isActive) {
|
|
3350
|
+
button.classList.add('active');
|
|
3351
|
+
}
|
|
3352
|
+
else {
|
|
3353
|
+
button.classList.remove('active');
|
|
3354
|
+
}
|
|
3355
|
+
}
|
|
3356
|
+
}
|
|
3357
|
+
/**
|
|
3358
|
+
* Handles click events for custom element children.
|
|
3359
|
+
*/
|
|
3360
|
+
handleCustomElementClick(tabId, children) {
|
|
3361
|
+
this.activeTabId = tabId;
|
|
3362
|
+
this.activeTabChange.emit(tabId);
|
|
3363
|
+
children.forEach((item) => {
|
|
3364
|
+
const itemId = item.getAttribute('id');
|
|
3365
|
+
const isActive = itemId === tabId;
|
|
3366
|
+
this.setActiveState(item, isActive);
|
|
3367
|
+
});
|
|
3368
|
+
}
|
|
3369
|
+
/**
|
|
3370
|
+
* Angular lifecycle hook called when the component is destroyed.
|
|
3371
|
+
* Cleans up all subscriptions to prevent memory leaks.
|
|
3372
|
+
*/
|
|
3373
|
+
ngOnDestroy() {
|
|
3374
|
+
this.subscriptions.forEach((sub) => sub.unsubscribe());
|
|
3375
|
+
}
|
|
3376
|
+
/**
|
|
3377
|
+
* Initializes the active tab state based on the initialActiveId input.
|
|
3378
|
+
* Sets the active state on the matching tab item if an initial ID is provided.
|
|
3379
|
+
*/
|
|
3380
|
+
initializeActiveTab() {
|
|
3381
|
+
const items = this.tabItems.toArray();
|
|
3382
|
+
const initialId = this.initialActiveId;
|
|
3383
|
+
// Set active state
|
|
3384
|
+
if (initialId) {
|
|
3385
|
+
items.forEach((item) => {
|
|
3386
|
+
item.isActive = item.id === initialId;
|
|
3387
|
+
});
|
|
3388
|
+
this.activeTabId = initialId;
|
|
3389
|
+
}
|
|
3390
|
+
}
|
|
3391
|
+
/**
|
|
3392
|
+
* Handles tab click events from child tab items.
|
|
3393
|
+
* Updates the active tab state and emits the activeTabChange event.
|
|
3394
|
+
* @param tabId - The ID of the clicked tab
|
|
3395
|
+
*/
|
|
3396
|
+
onTabClick(tabId) {
|
|
3397
|
+
this.activeTabId = tabId;
|
|
3398
|
+
this.activeTabChange.emit(tabId);
|
|
3399
|
+
this.tabItems.forEach((item) => {
|
|
3400
|
+
item.isActive = item.id === tabId;
|
|
3401
|
+
});
|
|
3402
|
+
}
|
|
3403
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TabBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3404
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: TabBarComponent, isStandalone: true, selector: "lib-tab-bar", inputs: { initialActiveId: "initialActiveId" }, outputs: { activeTabChange: "activeTabChange" }, queries: [{ propertyName: "tabItems", predicate: TabItemComponent }], ngImport: i0, template: "<div class=\"tab-bar\" role=\"tablist\">\n <ng-content></ng-content>\n</div>\n", styles: [".tab-bar{display:flex;white-space:nowrap;overflow-x:auto}\n"] }); }
|
|
3405
|
+
}
|
|
3406
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TabBarComponent, decorators: [{
|
|
3407
|
+
type: Component,
|
|
3408
|
+
args: [{ selector: 'lib-tab-bar', standalone: true, template: "<div class=\"tab-bar\" role=\"tablist\">\n <ng-content></ng-content>\n</div>\n", styles: [".tab-bar{display:flex;white-space:nowrap;overflow-x:auto}\n"] }]
|
|
3409
|
+
}], propDecorators: { initialActiveId: [{
|
|
3410
|
+
type: Input
|
|
3411
|
+
}], activeTabChange: [{
|
|
3412
|
+
type: Output
|
|
3413
|
+
}], tabItems: [{
|
|
3414
|
+
type: ContentChildren,
|
|
3415
|
+
args: [TabItemComponent]
|
|
3416
|
+
}] } });
|
|
3417
|
+
|
|
3418
|
+
/**
|
|
3419
|
+
* A flexible, reusable field (input) component that supports multiple states
|
|
3420
|
+
* and optional icons on left and right.
|
|
3421
|
+
*
|
|
3422
|
+
* @example
|
|
3423
|
+
* ```html
|
|
3424
|
+
* <!-- Basic text input -->
|
|
3425
|
+
* <lib-field
|
|
3426
|
+
* placeholder="Enter your name"
|
|
3427
|
+
* (valueChange)="onInputChange($event)">
|
|
3428
|
+
* </lib-field>
|
|
3429
|
+
*
|
|
3430
|
+
* <!-- Password input with icons -->
|
|
3431
|
+
* <lib-field
|
|
3432
|
+
* [inputType]="'password'"
|
|
3433
|
+
* placeholder="Enter password"
|
|
3434
|
+
* iconBefore="lock"
|
|
3435
|
+
* iconAfter="visibility"
|
|
3436
|
+
* (iconAfterClick)="togglePasswordVisibility()">
|
|
3437
|
+
* </lib-field>
|
|
3438
|
+
*
|
|
3439
|
+
* <!-- Error state with icon -->
|
|
3440
|
+
* <lib-field
|
|
3441
|
+
* placeholder="Email"
|
|
3442
|
+
* state="error"
|
|
3443
|
+
* iconBefore="person"
|
|
3444
|
+
* (valueChange)="onEmailChange($event)">
|
|
3445
|
+
* </lib-field>
|
|
3446
|
+
*
|
|
3447
|
+
* <!-- Full text (textarea) field -->
|
|
3448
|
+
* <lib-field
|
|
3449
|
+
* [isFullText]="true"
|
|
3450
|
+
* [rows]="4"
|
|
3451
|
+
* placeholder="Enter your message"
|
|
3452
|
+
* (valueChange)="onMessageChange($event)">
|
|
3453
|
+
* </lib-field>
|
|
3454
|
+
*
|
|
3455
|
+
* <!-- Field with custom dimensions -->
|
|
3456
|
+
* <lib-field
|
|
3457
|
+
* placeholder="Custom sized field"
|
|
3458
|
+
* minWidth="200px"
|
|
3459
|
+
* maxWidth="400px"
|
|
3460
|
+
* minHeight="40px"
|
|
3461
|
+
* maxHeight="60px">
|
|
3462
|
+
* </lib-field>
|
|
3463
|
+
* ```
|
|
3464
|
+
*/
|
|
3465
|
+
class FieldComponent {
|
|
3466
|
+
constructor() {
|
|
3467
|
+
this.inputType = 'text';
|
|
3468
|
+
this.placeholder = '';
|
|
3469
|
+
this.state = 'default';
|
|
3470
|
+
this.status = 'not-filled';
|
|
3471
|
+
this.iconBeforeClickable = false;
|
|
3472
|
+
this.iconAfterClickable = false;
|
|
3473
|
+
this.disabled = false;
|
|
3474
|
+
this.value = '';
|
|
3475
|
+
this.isFullText = false;
|
|
3476
|
+
this.rows = 4;
|
|
3477
|
+
this.valueChange = new EventEmitter();
|
|
3478
|
+
this.iconBeforeClick = new EventEmitter();
|
|
3479
|
+
this.iconAfterClick = new EventEmitter();
|
|
3480
|
+
this.fieldFocus = new EventEmitter();
|
|
3481
|
+
this.fieldBlur = new EventEmitter();
|
|
3482
|
+
this.onChange = () => { };
|
|
3483
|
+
this.onTouched = () => { };
|
|
3484
|
+
this.isFocused = false;
|
|
3485
|
+
this.isKeyboardFocus = false;
|
|
3486
|
+
}
|
|
3487
|
+
onDocumentKeydown(event) {
|
|
3488
|
+
if (event.key === 'Tab') {
|
|
3489
|
+
this.isKeyboardFocus = true;
|
|
3490
|
+
}
|
|
3491
|
+
}
|
|
3492
|
+
onDocumentMousedown() {
|
|
3493
|
+
this.isKeyboardFocus = false;
|
|
3494
|
+
}
|
|
3495
|
+
onDocumentPointerdown() {
|
|
3496
|
+
this.isKeyboardFocus = false;
|
|
3497
|
+
}
|
|
3498
|
+
/**
|
|
3499
|
+
* Handles input value changes and updates status based on content.
|
|
3500
|
+
*/
|
|
3501
|
+
onValueChange(event) {
|
|
3502
|
+
const target = event.target;
|
|
3503
|
+
this.value = target.value;
|
|
3504
|
+
this.status = target.value ? 'filled' : 'not-filled';
|
|
3505
|
+
this.valueChange.emit(this.value);
|
|
3506
|
+
this.onChange(this.value);
|
|
3507
|
+
}
|
|
3508
|
+
/**
|
|
3509
|
+
* Handles focus event and updates state.
|
|
3510
|
+
*/
|
|
3511
|
+
onFocus() {
|
|
3512
|
+
this.isFocused = this.isKeyboardFocus;
|
|
3513
|
+
if (this.state !== 'disabled' && this.state !== 'error' && this.state !== 'success') {
|
|
3514
|
+
this.state = 'focused';
|
|
3515
|
+
}
|
|
3516
|
+
this.fieldFocus.emit();
|
|
3517
|
+
}
|
|
3518
|
+
/**
|
|
3519
|
+
* Handles blur event and updates state.
|
|
3520
|
+
*/
|
|
3521
|
+
onBlur() {
|
|
3522
|
+
this.isFocused = false;
|
|
3523
|
+
if (this.state === 'focused') {
|
|
3524
|
+
this.state = 'default';
|
|
3525
|
+
}
|
|
3526
|
+
this.fieldBlur.emit();
|
|
3527
|
+
this.onTouched();
|
|
3528
|
+
}
|
|
3529
|
+
/**
|
|
3530
|
+
* Handles left icon click.
|
|
3531
|
+
*/
|
|
3532
|
+
onIconBeforeClick() {
|
|
3533
|
+
if (this.iconBeforeClickable && !this.disabled) {
|
|
3534
|
+
if (this.iconBeforeAction) {
|
|
3535
|
+
this.iconBeforeAction();
|
|
3536
|
+
}
|
|
3537
|
+
this.iconBeforeClick.emit();
|
|
3538
|
+
}
|
|
3539
|
+
}
|
|
3540
|
+
/**
|
|
3541
|
+
* Handles right icon click.
|
|
3542
|
+
*/
|
|
3543
|
+
onIconAfterClick() {
|
|
3544
|
+
if (this.iconAfterClickable && !this.disabled) {
|
|
3545
|
+
if (this.iconAfterAction) {
|
|
3546
|
+
this.iconAfterAction();
|
|
3547
|
+
}
|
|
3548
|
+
this.iconAfterClick.emit();
|
|
3549
|
+
}
|
|
3550
|
+
}
|
|
3551
|
+
// ControlValueAccessor implementation
|
|
3552
|
+
writeValue(value) {
|
|
3553
|
+
if (value) {
|
|
3554
|
+
this.value = value;
|
|
3555
|
+
this.status = 'filled';
|
|
3556
|
+
}
|
|
3557
|
+
}
|
|
3558
|
+
registerOnChange(fn) {
|
|
3559
|
+
this.onChange = fn;
|
|
3560
|
+
}
|
|
3561
|
+
registerOnTouched(fn) {
|
|
3562
|
+
this.onTouched = fn;
|
|
3563
|
+
}
|
|
3564
|
+
setDisabledState(isDisabled) {
|
|
3565
|
+
this.disabled = isDisabled;
|
|
3566
|
+
if (isDisabled) {
|
|
3567
|
+
this.state = 'disabled';
|
|
3568
|
+
}
|
|
3569
|
+
}
|
|
3570
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3571
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: FieldComponent, isStandalone: true, selector: "lib-field", inputs: { inputType: "inputType", inputId: "inputId", placeholder: "placeholder", state: "state", status: "status", iconBefore: "iconBefore", iconAfter: "iconAfter", iconBeforeClickable: "iconBeforeClickable", iconAfterClickable: "iconAfterClickable", iconBeforeAction: "iconBeforeAction", iconAfterAction: "iconAfterAction", disabled: "disabled", ariaLabel: "ariaLabel", value: "value", isFullText: "isFullText", rows: "rows", minWidth: "minWidth", maxWidth: "maxWidth", minHeight: "minHeight", maxHeight: "maxHeight" }, outputs: { valueChange: "valueChange", iconBeforeClick: "iconBeforeClick", iconAfterClick: "iconAfterClick", fieldFocus: "fieldFocus", fieldBlur: "fieldBlur" }, host: { listeners: { "document:keydown": "onDocumentKeydown($event)", "document:mousedown": "onDocumentMousedown()", "document:pointerdown": "onDocumentPointerdown()" } }, providers: [
|
|
3572
|
+
{
|
|
3573
|
+
provide: NG_VALUE_ACCESSOR,
|
|
3574
|
+
useExisting: forwardRef(() => FieldComponent),
|
|
3575
|
+
multi: true,
|
|
3576
|
+
},
|
|
3577
|
+
], ngImport: i0, template: "<div\n class=\"field-wrapper\"\n [ngClass]=\"'field-' + state + ' field-' + status + (isFocused ? ' is-focused' : '')\"\n [style.min-width]=\"minWidth\"\n [style.max-width]=\"maxWidth\"\n [style.min-height]=\"minHeight\"\n [style.max-height]=\"maxHeight\"\n>\n @if (iconBefore) {\n <span\n class=\"icon icon-before material-symbols-outlined\"\n (click)=\"onIconBeforeClick()\"\n [ngClass]=\"{ clickable: iconBeforeClickable, disabled: disabled }\"\n >\n {{ iconBefore }}\n </span>\n }\n\n @if (isFullText) {\n <textarea\n class=\"field-input field-textarea\"\n [id]=\"inputId\"\n [placeholder]=\"placeholder ? placeholder : ''\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n [rows]=\"rows\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\n (input)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n ></textarea>\n } @else {\n <input\n [type]=\"inputType\"\n [id]=\"inputId\"\n class=\"field-input\"\n [placeholder]=\"placeholder ? placeholder : ''\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\n (input)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n }\n\n @if (iconAfter) {\n <span\n class=\"icon icon-after material-symbols-outlined\"\n (click)=\"onIconAfterClick()\"\n [ngClass]=\"{ clickable: iconAfterClickable, disabled: disabled }\"\n >\n {{ iconAfter }}\n </span>\n }\n</div>\n", styles: ["*{box-sizing:border-box;text-decoration:none;font-size:1em}*:not(.material-symbols-outlined){font-family:inherit}html{border:0;margin:0;padding:0;-webkit-text-size-adjust:100%}body{margin:0;padding:0}*,*:before,*:after{box-sizing:border-box}:root{--color-navy: #00245d;--color-royal: #0047ba;--color-white: #ffffff;--color-blue-500: #00245d;--color-blue-400: #003995;--color-blue-300: #0047ba;--color-blue-200: #336cc8;--color-blue-150: #ccdaf1;--color-blue-100: #e5edf8;--color-gray-500: #141414;--color-gray-400: #737373;--color-gray-300: #8f8f8f;--color-gray-200: #d0d0d0;--color-gray-100: #e7e7e7;--color-gray-50: #f9f9f9;--color-gray-brand-400: #737373;--color-green-500: #1d562e;--color-green-400: #2e8545;--color-green-300: #3ba35a;--color-green-200: #9dd1ac;--color-green-100: #ebf6ee;--color-teal-500: #26485f;--color-teal-400: #3e7295;--color-teal-300: #457fa6;--color-teal-200: #a2bfd3;--color-teal-100: #ecf2f6;--color-red-500: #702121;--color-red-400: #b33837;--color-red-300: #c73e3d;--color-red-200: #e39e9e;--color-red-100: #f9ecec;--color-yellow-500: #635f04;--color-yellow-400: #928c30;--color-yellow-300: #d1c844;--color-yellow-200: #e8e3a1;--color-yellow-100: #f2f0e9;--color-purple-focus: #b967c7;--text-heading: #002e5d;--text-secondary-heading: #737373;--text-body: #141414;--text-disabled: #737373;--text-link: #336cc8;--text-on-action: #ffffff;--text-success: #1d562e;--text-info: #26485f;--text-error: #702121;--text-warning: #635f04;--surface-success: #ebf6ee;--surface-info: #ecf2f6;--surface-error: #f9ecec;--surface-warning: #f2f0e9;--focus-ring-color: #b967c7}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Light.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Regular.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Semibold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Bold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-LightItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Italic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-SemiboldItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-BoldItalic.ttf) format(\"truetype\");font-display:swap}h1,h2,h3,h4,h5,h6,span:not(.material-symbols-outlined),a,p{font-family:Source Sans Pro}h1{font-weight:300;font-style:normal;color:var(--text-heading)}h2{font-weight:400;font-style:normal;color:var(--text-heading)}h3{font-weight:700;font-style:normal;color:var(--text-heading)}h4,h5,h6{font-weight:600;font-style:normal;color:var(--text-secondary-heading)}.hbll-default-body{font-weight:400;font-style:normal;max-width:35rem;min-width:22.25rem;color:var(--text-body)}.hbll-caption{font-weight:400;font-style:normal;max-width:25.25rem;min-width:17.5rem;color:var(--text-body)}.hbll-large{font-weight:400;font-style:normal;max-width:41.25rem;min-width:26.5rem;color:var(--text-body)}a{color:var(--text-link);text-decoration:underline}.hbll-emphasis{font-weight:600}h1{font-size:2rem;line-height:2.5rem}h2{font-size:1.75rem;line-height:2.25rem}h3,h4{font-size:1.5rem;line-height:2rem}h5,h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:.875rem;line-height:1.25rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1rem;line-height:1.5rem}@media screen and (min-width: 52.125em){h1{font-size:3rem;line-height:3.5rem}h2{font-size:2.5rem;line-height:3rem}h3{font-size:2rem;line-height:3rem}h4{font-size:1.75rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}@media screen and (min-width: 90em){h1{font-size:3.75rem;line-height:4.25rem}h2{font-size:3rem;line-height:3.5rem}h3{font-size:2.5rem;line-height:3rem}h4{font-size:2rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.field-wrapper{display:flex;flex-direction:row;align-items:center;padding:.25rem .75rem;gap:.5rem;box-sizing:border-box;border-radius:.25rem;width:100%;min-height:2rem;transition:all .2s ease}.field-wrapper .field-input{flex:1;flex-grow:1;min-width:0;border:none;outline:none;padding:0;resize:none;font-family:Source Sans Pro,sans-serif;font-size:1rem;background:inherit}.field-wrapper .field-input:disabled{cursor:not-allowed}.field-wrapper .field-input.field-textarea{align-self:flex-start;padding:.5rem 0}.field-wrapper .icon{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;flex-shrink:0;font-size:1.5rem;color:inherit}.field-wrapper .icon.clickable{cursor:pointer;transition:color .2s ease}.field-wrapper .icon.clickable:hover:not(.disabled){color:#0047ba}.field-wrapper .icon.icon-before{order:0}.field-wrapper .icon.icon-after{order:2}.field-wrapper.field-default{background:#fff;border:1px solid #d0d0d0;color:#141414}.field-wrapper.field-hover{background:#fff;border:1px solid #0047ba;color:#141414}.field-wrapper.field-focused{background:#fff;border:1px solid #d0d0d0;color:#141414}.field-wrapper.is-focused{outline:.125rem solid #b967c7;outline-offset:.125rem}.field-wrapper.field-error.field-not-filled{background:#fff;border:1px solid #c73e3d;color:#737373}.field-wrapper.field-error.field-not-filled .icon{color:#b33837}.field-wrapper.field-error.field-filled{background:#f9ecec;border:1px solid #c73e3d;color:#141414}.field-wrapper.field-error.field-filled .icon{color:#b33837}.field-wrapper.field-success.field-not-filled{background:#fff;border:1px solid #3ba35a;color:#737373}.field-wrapper.field-success.field-not-filled .icon{color:#2e8545}.field-wrapper.field-success.field-filled{background:#ebf6ee;border:1px solid #3ba35a;color:#141414}.field-wrapper.field-success.field-filled .icon{color:#2e8545}.field-wrapper.field-disabled{background:#f9f9f9;border:1px solid #737373;color:#737373;cursor:not-allowed}.field-wrapper.field-disabled .icon{color:#8f8f8f}.field-wrapper.field-disabled .icon.clickable{cursor:not-allowed}.field-wrapper.field-disabled .icon.clickable:hover{color:inherit}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
3578
|
+
}
|
|
3579
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FieldComponent, decorators: [{
|
|
3580
|
+
type: Component,
|
|
3581
|
+
args: [{ selector: 'lib-field', standalone: true, imports: [CommonModule], providers: [
|
|
3582
|
+
{
|
|
3583
|
+
provide: NG_VALUE_ACCESSOR,
|
|
3584
|
+
useExisting: forwardRef(() => FieldComponent),
|
|
3585
|
+
multi: true,
|
|
3586
|
+
},
|
|
3587
|
+
], template: "<div\n class=\"field-wrapper\"\n [ngClass]=\"'field-' + state + ' field-' + status + (isFocused ? ' is-focused' : '')\"\n [style.min-width]=\"minWidth\"\n [style.max-width]=\"maxWidth\"\n [style.min-height]=\"minHeight\"\n [style.max-height]=\"maxHeight\"\n>\n @if (iconBefore) {\n <span\n class=\"icon icon-before material-symbols-outlined\"\n (click)=\"onIconBeforeClick()\"\n [ngClass]=\"{ clickable: iconBeforeClickable, disabled: disabled }\"\n >\n {{ iconBefore }}\n </span>\n }\n\n @if (isFullText) {\n <textarea\n class=\"field-input field-textarea\"\n [id]=\"inputId\"\n [placeholder]=\"placeholder ? placeholder : ''\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n [rows]=\"rows\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\n (input)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n ></textarea>\n } @else {\n <input\n [type]=\"inputType\"\n [id]=\"inputId\"\n class=\"field-input\"\n [placeholder]=\"placeholder ? placeholder : ''\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\n (input)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n }\n\n @if (iconAfter) {\n <span\n class=\"icon icon-after material-symbols-outlined\"\n (click)=\"onIconAfterClick()\"\n [ngClass]=\"{ clickable: iconAfterClickable, disabled: disabled }\"\n >\n {{ iconAfter }}\n </span>\n }\n</div>\n", styles: ["*{box-sizing:border-box;text-decoration:none;font-size:1em}*:not(.material-symbols-outlined){font-family:inherit}html{border:0;margin:0;padding:0;-webkit-text-size-adjust:100%}body{margin:0;padding:0}*,*:before,*:after{box-sizing:border-box}:root{--color-navy: #00245d;--color-royal: #0047ba;--color-white: #ffffff;--color-blue-500: #00245d;--color-blue-400: #003995;--color-blue-300: #0047ba;--color-blue-200: #336cc8;--color-blue-150: #ccdaf1;--color-blue-100: #e5edf8;--color-gray-500: #141414;--color-gray-400: #737373;--color-gray-300: #8f8f8f;--color-gray-200: #d0d0d0;--color-gray-100: #e7e7e7;--color-gray-50: #f9f9f9;--color-gray-brand-400: #737373;--color-green-500: #1d562e;--color-green-400: #2e8545;--color-green-300: #3ba35a;--color-green-200: #9dd1ac;--color-green-100: #ebf6ee;--color-teal-500: #26485f;--color-teal-400: #3e7295;--color-teal-300: #457fa6;--color-teal-200: #a2bfd3;--color-teal-100: #ecf2f6;--color-red-500: #702121;--color-red-400: #b33837;--color-red-300: #c73e3d;--color-red-200: #e39e9e;--color-red-100: #f9ecec;--color-yellow-500: #635f04;--color-yellow-400: #928c30;--color-yellow-300: #d1c844;--color-yellow-200: #e8e3a1;--color-yellow-100: #f2f0e9;--color-purple-focus: #b967c7;--text-heading: #002e5d;--text-secondary-heading: #737373;--text-body: #141414;--text-disabled: #737373;--text-link: #336cc8;--text-on-action: #ffffff;--text-success: #1d562e;--text-info: #26485f;--text-error: #702121;--text-warning: #635f04;--surface-success: #ebf6ee;--surface-info: #ecf2f6;--surface-error: #f9ecec;--surface-warning: #f2f0e9;--focus-ring-color: #b967c7}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Light.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Regular.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Semibold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Bold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-LightItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Italic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-SemiboldItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-BoldItalic.ttf) format(\"truetype\");font-display:swap}h1,h2,h3,h4,h5,h6,span:not(.material-symbols-outlined),a,p{font-family:Source Sans Pro}h1{font-weight:300;font-style:normal;color:var(--text-heading)}h2{font-weight:400;font-style:normal;color:var(--text-heading)}h3{font-weight:700;font-style:normal;color:var(--text-heading)}h4,h5,h6{font-weight:600;font-style:normal;color:var(--text-secondary-heading)}.hbll-default-body{font-weight:400;font-style:normal;max-width:35rem;min-width:22.25rem;color:var(--text-body)}.hbll-caption{font-weight:400;font-style:normal;max-width:25.25rem;min-width:17.5rem;color:var(--text-body)}.hbll-large{font-weight:400;font-style:normal;max-width:41.25rem;min-width:26.5rem;color:var(--text-body)}a{color:var(--text-link);text-decoration:underline}.hbll-emphasis{font-weight:600}h1{font-size:2rem;line-height:2.5rem}h2{font-size:1.75rem;line-height:2.25rem}h3,h4{font-size:1.5rem;line-height:2rem}h5,h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:.875rem;line-height:1.25rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1rem;line-height:1.5rem}@media screen and (min-width: 52.125em){h1{font-size:3rem;line-height:3.5rem}h2{font-size:2.5rem;line-height:3rem}h3{font-size:2rem;line-height:3rem}h4{font-size:1.75rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}@media screen and (min-width: 90em){h1{font-size:3.75rem;line-height:4.25rem}h2{font-size:3rem;line-height:3.5rem}h3{font-size:2.5rem;line-height:3rem}h4{font-size:2rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.field-wrapper{display:flex;flex-direction:row;align-items:center;padding:.25rem .75rem;gap:.5rem;box-sizing:border-box;border-radius:.25rem;width:100%;min-height:2rem;transition:all .2s ease}.field-wrapper .field-input{flex:1;flex-grow:1;min-width:0;border:none;outline:none;padding:0;resize:none;font-family:Source Sans Pro,sans-serif;font-size:1rem;background:inherit}.field-wrapper .field-input:disabled{cursor:not-allowed}.field-wrapper .field-input.field-textarea{align-self:flex-start;padding:.5rem 0}.field-wrapper .icon{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;flex-shrink:0;font-size:1.5rem;color:inherit}.field-wrapper .icon.clickable{cursor:pointer;transition:color .2s ease}.field-wrapper .icon.clickable:hover:not(.disabled){color:#0047ba}.field-wrapper .icon.icon-before{order:0}.field-wrapper .icon.icon-after{order:2}.field-wrapper.field-default{background:#fff;border:1px solid #d0d0d0;color:#141414}.field-wrapper.field-hover{background:#fff;border:1px solid #0047ba;color:#141414}.field-wrapper.field-focused{background:#fff;border:1px solid #d0d0d0;color:#141414}.field-wrapper.is-focused{outline:.125rem solid #b967c7;outline-offset:.125rem}.field-wrapper.field-error.field-not-filled{background:#fff;border:1px solid #c73e3d;color:#737373}.field-wrapper.field-error.field-not-filled .icon{color:#b33837}.field-wrapper.field-error.field-filled{background:#f9ecec;border:1px solid #c73e3d;color:#141414}.field-wrapper.field-error.field-filled .icon{color:#b33837}.field-wrapper.field-success.field-not-filled{background:#fff;border:1px solid #3ba35a;color:#737373}.field-wrapper.field-success.field-not-filled .icon{color:#2e8545}.field-wrapper.field-success.field-filled{background:#ebf6ee;border:1px solid #3ba35a;color:#141414}.field-wrapper.field-success.field-filled .icon{color:#2e8545}.field-wrapper.field-disabled{background:#f9f9f9;border:1px solid #737373;color:#737373;cursor:not-allowed}.field-wrapper.field-disabled .icon{color:#8f8f8f}.field-wrapper.field-disabled .icon.clickable{cursor:not-allowed}.field-wrapper.field-disabled .icon.clickable:hover{color:inherit}\n"] }]
|
|
3588
|
+
}], propDecorators: { inputType: [{
|
|
3589
|
+
type: Input
|
|
3590
|
+
}], inputId: [{
|
|
3591
|
+
type: Input
|
|
3592
|
+
}], placeholder: [{
|
|
3593
|
+
type: Input
|
|
3594
|
+
}], state: [{
|
|
3595
|
+
type: Input
|
|
3596
|
+
}], status: [{
|
|
3597
|
+
type: Input
|
|
3598
|
+
}], iconBefore: [{
|
|
3599
|
+
type: Input
|
|
3600
|
+
}], iconAfter: [{
|
|
3601
|
+
type: Input
|
|
3602
|
+
}], iconBeforeClickable: [{
|
|
3603
|
+
type: Input
|
|
3604
|
+
}], iconAfterClickable: [{
|
|
3605
|
+
type: Input
|
|
3606
|
+
}], iconBeforeAction: [{
|
|
3607
|
+
type: Input
|
|
3608
|
+
}], iconAfterAction: [{
|
|
3609
|
+
type: Input
|
|
3610
|
+
}], disabled: [{
|
|
3611
|
+
type: Input
|
|
3612
|
+
}], ariaLabel: [{
|
|
3613
|
+
type: Input
|
|
3614
|
+
}], value: [{
|
|
3615
|
+
type: Input
|
|
3616
|
+
}], isFullText: [{
|
|
3617
|
+
type: Input
|
|
3618
|
+
}], rows: [{
|
|
3619
|
+
type: Input
|
|
3620
|
+
}], minWidth: [{
|
|
3621
|
+
type: Input
|
|
3622
|
+
}], maxWidth: [{
|
|
3623
|
+
type: Input
|
|
3624
|
+
}], minHeight: [{
|
|
3625
|
+
type: Input
|
|
3626
|
+
}], maxHeight: [{
|
|
3627
|
+
type: Input
|
|
3628
|
+
}], valueChange: [{
|
|
3629
|
+
type: Output
|
|
3630
|
+
}], iconBeforeClick: [{
|
|
3631
|
+
type: Output
|
|
3632
|
+
}], iconAfterClick: [{
|
|
3633
|
+
type: Output
|
|
3634
|
+
}], fieldFocus: [{
|
|
3635
|
+
type: Output
|
|
3636
|
+
}], fieldBlur: [{
|
|
3637
|
+
type: Output
|
|
3638
|
+
}], onDocumentKeydown: [{
|
|
3639
|
+
type: HostListener,
|
|
3640
|
+
args: ['document:keydown', ['$event']]
|
|
3641
|
+
}], onDocumentMousedown: [{
|
|
3642
|
+
type: HostListener,
|
|
3643
|
+
args: ['document:mousedown']
|
|
3644
|
+
}], onDocumentPointerdown: [{
|
|
3645
|
+
type: HostListener,
|
|
3646
|
+
args: ['document:pointerdown']
|
|
3647
|
+
}] } });
|
|
3648
|
+
|
|
3649
|
+
/**
|
|
3650
|
+
* A flexible label component that supports different label types
|
|
3651
|
+
* with optional help icon and required/optional indicators.
|
|
3652
|
+
*
|
|
3653
|
+
* @example
|
|
3654
|
+
* ```html
|
|
3655
|
+
* <!-- Basic label -->
|
|
3656
|
+
* <lib-label
|
|
3657
|
+
* text="Email"
|
|
3658
|
+
* type="none">
|
|
3659
|
+
* </lib-label>
|
|
3660
|
+
*
|
|
3661
|
+
* <!-- Required label with help icon -->
|
|
3662
|
+
* <lib-label
|
|
3663
|
+
* text="Password"
|
|
3664
|
+
* type="required"
|
|
3665
|
+
* [showHelpIcon]="true"
|
|
3666
|
+
* (helpIconClick)="showHelp()">
|
|
3667
|
+
* </lib-label>
|
|
3668
|
+
*
|
|
3669
|
+
* <!-- Optional label -->
|
|
3670
|
+
* <lib-label
|
|
3671
|
+
* text="Phone"
|
|
3672
|
+
* type="optional"
|
|
3673
|
+
* [showHelpIcon]="true">
|
|
3674
|
+
* </lib-label>
|
|
3675
|
+
*
|
|
3676
|
+
* <!-- Label positioned to the left of field -->
|
|
3677
|
+
* <lib-label
|
|
3678
|
+
* text="Email"
|
|
3679
|
+
* position="left">
|
|
3680
|
+
* </lib-label>
|
|
3681
|
+
* ```
|
|
3682
|
+
*/
|
|
3683
|
+
class LabelComponent {
|
|
3684
|
+
constructor() {
|
|
3685
|
+
this.text = '';
|
|
3686
|
+
this.type = 'none';
|
|
3687
|
+
this.showHelpIcon = false;
|
|
3688
|
+
this.position = 'above';
|
|
3689
|
+
this.isRequired = false;
|
|
3690
|
+
this.helpIconClick = new EventEmitter();
|
|
3691
|
+
}
|
|
3692
|
+
/**
|
|
3693
|
+
* Handles help icon click event.
|
|
3694
|
+
*/
|
|
3695
|
+
onHelpIconClick() {
|
|
3696
|
+
this.helpIconClick.emit();
|
|
3697
|
+
}
|
|
3698
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: LabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3699
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: LabelComponent, isStandalone: true, selector: "lib-label", inputs: { text: "text", type: "type", showHelpIcon: "showHelpIcon", ariaLabel: "ariaLabel", position: "position", isRequired: "isRequired", for: "for", subtext: "subtext" }, outputs: { helpIconClick: "helpIconClick" }, ngImport: i0, template: "<label class=\"label-wrapper\" [attr.for]=\"for\" [ngClass]=\"['label-' + type, 'label-position-' + position]\">\n <div class=\"label-frame\">\n @if (type === 'required' || isRequired) {\n <span class=\"required-indicator\" aria-label=\"required\">*</span>\n }\n <span class=\"label-text\">{{ text }}</span>\n\n @if (showHelpIcon) {\n <span\n class=\"icon help-icon material-symbols-outlined\"\n (click)=\"onHelpIconClick()\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : 'Help'\"\n >\n help\n </span>\n }\n\n @if (type === 'optional') {\n <span class=\"optional-text\">(optional)</span>\n }\n </div>\n @if (subtext) {\n <span class=\"label-subtext\">{{ subtext }}</span>\n }\n</label>\n", styles: ["*{box-sizing:border-box;text-decoration:none;font-size:1em}*:not(.material-symbols-outlined){font-family:inherit}html{border:0;margin:0;padding:0;-webkit-text-size-adjust:100%}body{margin:0;padding:0}*,*:before,*:after{box-sizing:border-box}:root{--color-navy: #00245d;--color-royal: #0047ba;--color-white: #ffffff;--color-blue-500: #00245d;--color-blue-400: #003995;--color-blue-300: #0047ba;--color-blue-200: #336cc8;--color-blue-150: #ccdaf1;--color-blue-100: #e5edf8;--color-gray-500: #141414;--color-gray-400: #737373;--color-gray-300: #8f8f8f;--color-gray-200: #d0d0d0;--color-gray-100: #e7e7e7;--color-gray-50: #f9f9f9;--color-gray-brand-400: #737373;--color-green-500: #1d562e;--color-green-400: #2e8545;--color-green-300: #3ba35a;--color-green-200: #9dd1ac;--color-green-100: #ebf6ee;--color-teal-500: #26485f;--color-teal-400: #3e7295;--color-teal-300: #457fa6;--color-teal-200: #a2bfd3;--color-teal-100: #ecf2f6;--color-red-500: #702121;--color-red-400: #b33837;--color-red-300: #c73e3d;--color-red-200: #e39e9e;--color-red-100: #f9ecec;--color-yellow-500: #635f04;--color-yellow-400: #928c30;--color-yellow-300: #d1c844;--color-yellow-200: #e8e3a1;--color-yellow-100: #f2f0e9;--color-purple-focus: #b967c7;--text-heading: #002e5d;--text-secondary-heading: #737373;--text-body: #141414;--text-disabled: #737373;--text-link: #336cc8;--text-on-action: #ffffff;--text-success: #1d562e;--text-info: #26485f;--text-error: #702121;--text-warning: #635f04;--surface-success: #ebf6ee;--surface-info: #ecf2f6;--surface-error: #f9ecec;--surface-warning: #f2f0e9;--focus-ring-color: #b967c7}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Light.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Regular.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Semibold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Bold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-LightItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Italic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-SemiboldItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-BoldItalic.ttf) format(\"truetype\");font-display:swap}h1,h2,h3,h4,h5,h6,span:not(.material-symbols-outlined),a,p{font-family:Source Sans Pro}h1{font-weight:300;font-style:normal;color:var(--text-heading)}h2{font-weight:400;font-style:normal;color:var(--text-heading)}h3{font-weight:700;font-style:normal;color:var(--text-heading)}h4,h5,h6{font-weight:600;font-style:normal;color:var(--text-secondary-heading)}.hbll-default-body{font-weight:400;font-style:normal;max-width:35rem;min-width:22.25rem;color:var(--text-body)}.hbll-caption{font-weight:400;font-style:normal;max-width:25.25rem;min-width:17.5rem;color:var(--text-body)}.hbll-large{font-weight:400;font-style:normal;max-width:41.25rem;min-width:26.5rem;color:var(--text-body)}a{color:var(--text-link);text-decoration:underline}.hbll-emphasis{font-weight:600}h1{font-size:2rem;line-height:2.5rem}h2{font-size:1.75rem;line-height:2.25rem}h3,h4{font-size:1.5rem;line-height:2rem}h5,h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:.875rem;line-height:1.25rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1rem;line-height:1.5rem}@media screen and (min-width: 52.125em){h1{font-size:3rem;line-height:3.5rem}h2{font-size:2.5rem;line-height:3rem}h3{font-size:2rem;line-height:3rem}h4{font-size:1.75rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}@media screen and (min-width: 90em){h1{font-size:3.75rem;line-height:4.25rem}h2{font-size:3rem;line-height:3.5rem}h3{font-size:2.5rem;line-height:3rem}h4{font-size:2rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.label-wrapper{display:flex;flex-direction:row;align-items:center;padding:0;gap:.5rem}.label-wrapper.label-position-above{flex-direction:column;align-items:flex-start;gap:.25rem}.label-wrapper.label-position-left{flex-direction:row;align-items:center;gap:.5rem}.label-wrapper .label-frame{display:flex;flex-direction:row;align-items:flex-start;padding:0;gap:.5rem}.label-wrapper .label-text{color:#00245d;white-space:nowrap}.label-wrapper .help-icon{display:flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;flex-shrink:0;font-size:1.25rem;color:#00245d;cursor:pointer;transition:color .2s ease,transform .2s ease}.label-wrapper .help-icon:hover{color:#0047ba;transform:scale(1.1)}.label-wrapper .required-indicator{color:#c73e3d;margin-right:-.5rem}.label-wrapper .optional-text{color:#737373}.label-wrapper.label-none .label-frame{gap:.5rem}.label-wrapper.label-required{position:relative;isolation:isolate}.label-wrapper.label-required .label-frame{gap:.75rem;position:relative;z-index:0}.label-wrapper.label-required .required-indicator{position:relative;z-index:1}.label-wrapper.label-optional .label-frame{gap:.5rem}.label-wrapper.label-optional .optional-text{margin-left:.25rem}.label-wrapper .label-subtext{font-style:italic;color:#737373;margin-top:-.25rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
3700
|
+
}
|
|
3701
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: LabelComponent, decorators: [{
|
|
3702
|
+
type: Component,
|
|
3703
|
+
args: [{ selector: 'lib-label', standalone: true, imports: [CommonModule], template: "<label class=\"label-wrapper\" [attr.for]=\"for\" [ngClass]=\"['label-' + type, 'label-position-' + position]\">\n <div class=\"label-frame\">\n @if (type === 'required' || isRequired) {\n <span class=\"required-indicator\" aria-label=\"required\">*</span>\n }\n <span class=\"label-text\">{{ text }}</span>\n\n @if (showHelpIcon) {\n <span\n class=\"icon help-icon material-symbols-outlined\"\n (click)=\"onHelpIconClick()\"\n [attr.aria-label]=\"ariaLabel ? ariaLabel : 'Help'\"\n >\n help\n </span>\n }\n\n @if (type === 'optional') {\n <span class=\"optional-text\">(optional)</span>\n }\n </div>\n @if (subtext) {\n <span class=\"label-subtext\">{{ subtext }}</span>\n }\n</label>\n", styles: ["*{box-sizing:border-box;text-decoration:none;font-size:1em}*:not(.material-symbols-outlined){font-family:inherit}html{border:0;margin:0;padding:0;-webkit-text-size-adjust:100%}body{margin:0;padding:0}*,*:before,*:after{box-sizing:border-box}:root{--color-navy: #00245d;--color-royal: #0047ba;--color-white: #ffffff;--color-blue-500: #00245d;--color-blue-400: #003995;--color-blue-300: #0047ba;--color-blue-200: #336cc8;--color-blue-150: #ccdaf1;--color-blue-100: #e5edf8;--color-gray-500: #141414;--color-gray-400: #737373;--color-gray-300: #8f8f8f;--color-gray-200: #d0d0d0;--color-gray-100: #e7e7e7;--color-gray-50: #f9f9f9;--color-gray-brand-400: #737373;--color-green-500: #1d562e;--color-green-400: #2e8545;--color-green-300: #3ba35a;--color-green-200: #9dd1ac;--color-green-100: #ebf6ee;--color-teal-500: #26485f;--color-teal-400: #3e7295;--color-teal-300: #457fa6;--color-teal-200: #a2bfd3;--color-teal-100: #ecf2f6;--color-red-500: #702121;--color-red-400: #b33837;--color-red-300: #c73e3d;--color-red-200: #e39e9e;--color-red-100: #f9ecec;--color-yellow-500: #635f04;--color-yellow-400: #928c30;--color-yellow-300: #d1c844;--color-yellow-200: #e8e3a1;--color-yellow-100: #f2f0e9;--color-purple-focus: #b967c7;--text-heading: #002e5d;--text-secondary-heading: #737373;--text-body: #141414;--text-disabled: #737373;--text-link: #336cc8;--text-on-action: #ffffff;--text-success: #1d562e;--text-info: #26485f;--text-error: #702121;--text-warning: #635f04;--surface-success: #ebf6ee;--surface-info: #ecf2f6;--surface-error: #f9ecec;--surface-warning: #f2f0e9;--focus-ring-color: #b967c7}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Light.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Regular.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Semibold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Bold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-LightItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Italic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-SemiboldItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-BoldItalic.ttf) format(\"truetype\");font-display:swap}h1,h2,h3,h4,h5,h6,span:not(.material-symbols-outlined),a,p{font-family:Source Sans Pro}h1{font-weight:300;font-style:normal;color:var(--text-heading)}h2{font-weight:400;font-style:normal;color:var(--text-heading)}h3{font-weight:700;font-style:normal;color:var(--text-heading)}h4,h5,h6{font-weight:600;font-style:normal;color:var(--text-secondary-heading)}.hbll-default-body{font-weight:400;font-style:normal;max-width:35rem;min-width:22.25rem;color:var(--text-body)}.hbll-caption{font-weight:400;font-style:normal;max-width:25.25rem;min-width:17.5rem;color:var(--text-body)}.hbll-large{font-weight:400;font-style:normal;max-width:41.25rem;min-width:26.5rem;color:var(--text-body)}a{color:var(--text-link);text-decoration:underline}.hbll-emphasis{font-weight:600}h1{font-size:2rem;line-height:2.5rem}h2{font-size:1.75rem;line-height:2.25rem}h3,h4{font-size:1.5rem;line-height:2rem}h5,h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:.875rem;line-height:1.25rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1rem;line-height:1.5rem}@media screen and (min-width: 52.125em){h1{font-size:3rem;line-height:3.5rem}h2{font-size:2.5rem;line-height:3rem}h3{font-size:2rem;line-height:3rem}h4{font-size:1.75rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}@media screen and (min-width: 90em){h1{font-size:3.75rem;line-height:4.25rem}h2{font-size:3rem;line-height:3.5rem}h3{font-size:2.5rem;line-height:3rem}h4{font-size:2rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.label-wrapper{display:flex;flex-direction:row;align-items:center;padding:0;gap:.5rem}.label-wrapper.label-position-above{flex-direction:column;align-items:flex-start;gap:.25rem}.label-wrapper.label-position-left{flex-direction:row;align-items:center;gap:.5rem}.label-wrapper .label-frame{display:flex;flex-direction:row;align-items:flex-start;padding:0;gap:.5rem}.label-wrapper .label-text{color:#00245d;white-space:nowrap}.label-wrapper .help-icon{display:flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;flex-shrink:0;font-size:1.25rem;color:#00245d;cursor:pointer;transition:color .2s ease,transform .2s ease}.label-wrapper .help-icon:hover{color:#0047ba;transform:scale(1.1)}.label-wrapper .required-indicator{color:#c73e3d;margin-right:-.5rem}.label-wrapper .optional-text{color:#737373}.label-wrapper.label-none .label-frame{gap:.5rem}.label-wrapper.label-required{position:relative;isolation:isolate}.label-wrapper.label-required .label-frame{gap:.75rem;position:relative;z-index:0}.label-wrapper.label-required .required-indicator{position:relative;z-index:1}.label-wrapper.label-optional .label-frame{gap:.5rem}.label-wrapper.label-optional .optional-text{margin-left:.25rem}.label-wrapper .label-subtext{font-style:italic;color:#737373;margin-top:-.25rem}\n"] }]
|
|
3704
|
+
}], propDecorators: { text: [{
|
|
3705
|
+
type: Input
|
|
3706
|
+
}], type: [{
|
|
3707
|
+
type: Input
|
|
3708
|
+
}], showHelpIcon: [{
|
|
3709
|
+
type: Input
|
|
3710
|
+
}], ariaLabel: [{
|
|
3711
|
+
type: Input
|
|
3712
|
+
}], position: [{
|
|
3713
|
+
type: Input
|
|
3714
|
+
}], isRequired: [{
|
|
3715
|
+
type: Input
|
|
3716
|
+
}], for: [{
|
|
3717
|
+
type: Input
|
|
3718
|
+
}], subtext: [{
|
|
3719
|
+
type: Input
|
|
3720
|
+
}], helpIconClick: [{
|
|
3721
|
+
type: Output
|
|
3722
|
+
}] } });
|
|
3723
|
+
|
|
3724
|
+
let radioUniqueId = 0;
|
|
3725
|
+
/**
|
|
3726
|
+
* Accessible replacement for a native `<input type="radio">` that can live
|
|
3727
|
+
* inside Angular forms or be used as a standalone control. The component
|
|
3728
|
+
* exposes color, name, disabled, and value inputs plus a `checkedChange`
|
|
3729
|
+
* output so parent views can respond to state transitions or drive a custom
|
|
3730
|
+
* radio group.
|
|
3731
|
+
*
|
|
3732
|
+
* Features:
|
|
3733
|
+
* - Standalone + OnPush component that keeps templates lean.
|
|
3734
|
+
* - Implements ControlValueAccessor so it works with `ngModel` and reactive forms.
|
|
3735
|
+
* - Emits the original DOM event, checked state, and configured value for analytics.
|
|
3736
|
+
* - Auto-generates a unique `inputId` so external `<lib-label>` elements can bind via `for`.
|
|
3737
|
+
*
|
|
3738
|
+
* @example
|
|
3739
|
+
* ```html
|
|
3740
|
+
* <lib-radio-button
|
|
3741
|
+
* #flighting
|
|
3742
|
+
* name="experiment"
|
|
3743
|
+
* value="flighting"
|
|
3744
|
+
* color="#7c3aed"
|
|
3745
|
+
* [(ngModel)]="selectedValue"
|
|
3746
|
+
* (checkedChange)="logRadio($event)">
|
|
3747
|
+
* </lib-radio-button>
|
|
3748
|
+
* <lib-label position="left" [for]="flighting.inputId" text="Flighting"></lib-label>
|
|
3749
|
+
* ```
|
|
3750
|
+
*/
|
|
3751
|
+
class RadioButtonComponent {
|
|
3752
|
+
constructor() {
|
|
3753
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
3754
|
+
this.inputUid = `hbll-radio-${radioUniqueId++}`;
|
|
3755
|
+
this.disabled = false;
|
|
3756
|
+
this.checked = false;
|
|
3757
|
+
this.checkedChange = new EventEmitter();
|
|
3758
|
+
this.onChange = () => { };
|
|
3759
|
+
this.onTouched = () => { };
|
|
3760
|
+
}
|
|
3761
|
+
writeValue(formValue) {
|
|
3762
|
+
this.checked = formValue === this.value;
|
|
3763
|
+
this.cdr.markForCheck();
|
|
3764
|
+
}
|
|
3765
|
+
registerOnChange(fn) {
|
|
3766
|
+
this.onChange = fn;
|
|
3767
|
+
}
|
|
3768
|
+
registerOnTouched(fn) {
|
|
3769
|
+
this.onTouched = fn;
|
|
3770
|
+
}
|
|
3771
|
+
setDisabledState(isDisabled) {
|
|
3772
|
+
this.disabled = isDisabled;
|
|
3773
|
+
this.cdr.markForCheck();
|
|
3774
|
+
}
|
|
3775
|
+
onInputChange(event) {
|
|
3776
|
+
if (this.disabled)
|
|
3777
|
+
return;
|
|
3778
|
+
const input = event.target;
|
|
3779
|
+
this.checked = input.checked;
|
|
3780
|
+
if (this.checked) {
|
|
3781
|
+
this.onChange(this.value);
|
|
3782
|
+
}
|
|
3783
|
+
this.checkedChange.emit({
|
|
3784
|
+
checked: this.checked,
|
|
3785
|
+
value: this.value,
|
|
3786
|
+
originalEvent: event,
|
|
3787
|
+
});
|
|
3788
|
+
}
|
|
3789
|
+
onBlur() {
|
|
3790
|
+
this.onTouched();
|
|
3791
|
+
}
|
|
3792
|
+
get inputId() {
|
|
3793
|
+
return this.inputUid;
|
|
3794
|
+
}
|
|
3795
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: RadioButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3796
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.3.15", type: RadioButtonComponent, isStandalone: true, selector: "lib-radio-button", inputs: { color: "color", disabled: ["disabled", "disabled", booleanAttribute], name: "name", value: "value" }, outputs: { checkedChange: "checkedChange" }, providers: [
|
|
3797
|
+
{
|
|
3798
|
+
provide: NG_VALUE_ACCESSOR,
|
|
3799
|
+
useExisting: forwardRef(() => RadioButtonComponent),
|
|
3800
|
+
multi: true,
|
|
3801
|
+
},
|
|
3802
|
+
], ngImport: i0, template: "<div\n class=\"radio\"\n [class.radio--disabled]=\"disabled\"\n [style.--hbll-radio-color]=\"color ?? null\"\n>\n <input\n type=\"radio\"\n class=\"radio-btn\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [attr.name]=\"name ?? null\"\n [attr.value]=\"value\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onBlur()\"\n />\n\n</div>\n", styles: ["html{border:0;margin:0;padding:0;-webkit-text-size-adjust:100%}body{margin:0;padding:0}*,*:before,*:after{box-sizing:border-box}:root{--color-navy: #00245d;--color-royal: #0047ba;--color-white: #ffffff;--color-blue-500: #00245d;--color-blue-400: #003995;--color-blue-300: #0047ba;--color-blue-200: #336cc8;--color-blue-150: #ccdaf1;--color-blue-100: #e5edf8;--color-gray-500: #141414;--color-gray-400: #737373;--color-gray-300: #8f8f8f;--color-gray-200: #d0d0d0;--color-gray-100: #e7e7e7;--color-gray-50: #f9f9f9;--color-gray-brand-400: #737373;--color-green-500: #1d562e;--color-green-400: #2e8545;--color-green-300: #3ba35a;--color-green-200: #9dd1ac;--color-green-100: #ebf6ee;--color-teal-500: #26485f;--color-teal-400: #3e7295;--color-teal-300: #457fa6;--color-teal-200: #a2bfd3;--color-teal-100: #ecf2f6;--color-red-500: #702121;--color-red-400: #b33837;--color-red-300: #c73e3d;--color-red-200: #e39e9e;--color-red-100: #f9ecec;--color-yellow-500: #635f04;--color-yellow-400: #928c30;--color-yellow-300: #d1c844;--color-yellow-200: #e8e3a1;--color-yellow-100: #f2f0e9;--color-purple-focus: #b967c7;--text-heading: #002e5d;--text-secondary-heading: #737373;--text-body: #141414;--text-disabled: #737373;--text-link: #336cc8;--text-on-action: #ffffff;--text-success: #1d562e;--text-info: #26485f;--text-error: #702121;--text-warning: #635f04;--surface-success: #ebf6ee;--surface-info: #ecf2f6;--surface-error: #f9ecec;--surface-warning: #f2f0e9;--focus-ring-color: #b967c7}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Light.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Regular.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Semibold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Bold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-LightItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Italic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-SemiboldItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-BoldItalic.ttf) format(\"truetype\");font-display:swap}h1,h2,h3,h4,h5,h6,span:not(.material-symbols-outlined),a,p{font-family:Source Sans Pro}h1{font-weight:300;font-style:normal;color:var(--text-heading)}h2{font-weight:400;font-style:normal;color:var(--text-heading)}h3{font-weight:700;font-style:normal;color:var(--text-heading)}h4,h5,h6{font-weight:600;font-style:normal;color:var(--text-secondary-heading)}.hbll-default-body{font-weight:400;font-style:normal;max-width:35rem;min-width:22.25rem;color:var(--text-body)}.hbll-caption{font-weight:400;font-style:normal;max-width:25.25rem;min-width:17.5rem;color:var(--text-body)}.hbll-large{font-weight:400;font-style:normal;max-width:41.25rem;min-width:26.5rem;color:var(--text-body)}a{color:var(--text-link);text-decoration:underline}.hbll-emphasis{font-weight:600}h1{font-size:2rem;line-height:2.5rem}h2{font-size:1.75rem;line-height:2.25rem}h3,h4{font-size:1.5rem;line-height:2rem}h5,h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:.875rem;line-height:1.25rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1rem;line-height:1.5rem}@media screen and (min-width: 52.125em){h1{font-size:3rem;line-height:3.5rem}h2{font-size:2.5rem;line-height:3rem}h3{font-size:2rem;line-height:3rem}h4{font-size:1.75rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}@media screen and (min-width: 90em){h1{font-size:3.75rem;line-height:4.25rem}h2{font-size:3rem;line-height:3.5rem}h3{font-size:2.5rem;line-height:3rem}h4{font-size:2rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.radio{display:inline-flex;align-items:center;gap:.5rem;cursor:pointer;padding:.375rem .5rem .375rem .375rem;border-radius:999rem}.radio.radio--disabled{cursor:not-allowed}.radio-btn{appearance:none;-webkit-appearance:none;width:1.5rem;height:1.5rem;border-radius:50%;border:.125rem solid var(--hbll-radio-color, #d0d0d0);box-sizing:border-box;background-color:var(--hbll-radio-color, #ffffff);display:inline-grid;place-items:center;position:relative;margin:0;padding:0;cursor:pointer;outline:none;transition:border-color .15s ease,background-color .15s ease}.radio-btn:before{content:\"\";width:.75rem;height:.75rem;border-radius:50%;background-color:var(--hbll-radio-color, #0047ba);transform:scale(0);transition:transform .12s ease-in-out,background-color .12s ease-in-out}.radio-btn:after{content:\"\";position:absolute;width:2.25rem;height:2.25rem;border-radius:50%;top:50%;left:50%;transform:translate(-50%,-50%);border:.125rem solid transparent;background-color:transparent;opacity:0;transition:background-color .12s ease,border-color .12s ease,opacity .12s ease;pointer-events:none;box-sizing:border-box}.radio-btn:not(:disabled):not(:checked):hover:after{background-color:#8f8f8f1a;background-color:color-mix(in srgb,var(--hbll-radio-color, #8f8f8f) 10%,transparent);border-color:transparent;opacity:1}.radio-btn:not(:disabled):not(:checked):focus-visible:after{background-color:transparent;border-color:#b967c7;opacity:1}.radio-btn:checked{border-color:var(--hbll-radio-color, #0047ba);background-color:#fff}.radio-btn:checked:before{transform:scale(1)}.radio-btn:not(:disabled):checked:hover:after{background-color:#0047ba1a;background-color:color-mix(in srgb,var(--hbll-radio-color, #0047ba) 10%,transparent);border-color:transparent;opacity:1}.radio-btn:not(:disabled):checked:focus-visible:after{background-color:transparent;border-color:#b967c7;opacity:1}.radio-btn:disabled{cursor:not-allowed;background-color:#e7e7e7;border-color:var(--hbll-radio-color, #d0d0d0)}.radio-btn:disabled:after{opacity:0}.radio-btn:disabled:checked{background-color:#e7e7e7;border-color:#737373}.radio-btn:disabled:checked:before{background-color:#737373;transform:scale(1)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3803
|
+
}
|
|
3804
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: RadioButtonComponent, decorators: [{
|
|
3805
|
+
type: Component,
|
|
3806
|
+
args: [{ selector: 'lib-radio-button', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
3807
|
+
{
|
|
3808
|
+
provide: NG_VALUE_ACCESSOR,
|
|
3809
|
+
useExisting: forwardRef(() => RadioButtonComponent),
|
|
3810
|
+
multi: true,
|
|
3811
|
+
},
|
|
3812
|
+
], template: "<div\n class=\"radio\"\n [class.radio--disabled]=\"disabled\"\n [style.--hbll-radio-color]=\"color ?? null\"\n>\n <input\n type=\"radio\"\n class=\"radio-btn\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [attr.name]=\"name ?? null\"\n [attr.value]=\"value\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onBlur()\"\n />\n\n</div>\n", styles: ["html{border:0;margin:0;padding:0;-webkit-text-size-adjust:100%}body{margin:0;padding:0}*,*:before,*:after{box-sizing:border-box}:root{--color-navy: #00245d;--color-royal: #0047ba;--color-white: #ffffff;--color-blue-500: #00245d;--color-blue-400: #003995;--color-blue-300: #0047ba;--color-blue-200: #336cc8;--color-blue-150: #ccdaf1;--color-blue-100: #e5edf8;--color-gray-500: #141414;--color-gray-400: #737373;--color-gray-300: #8f8f8f;--color-gray-200: #d0d0d0;--color-gray-100: #e7e7e7;--color-gray-50: #f9f9f9;--color-gray-brand-400: #737373;--color-green-500: #1d562e;--color-green-400: #2e8545;--color-green-300: #3ba35a;--color-green-200: #9dd1ac;--color-green-100: #ebf6ee;--color-teal-500: #26485f;--color-teal-400: #3e7295;--color-teal-300: #457fa6;--color-teal-200: #a2bfd3;--color-teal-100: #ecf2f6;--color-red-500: #702121;--color-red-400: #b33837;--color-red-300: #c73e3d;--color-red-200: #e39e9e;--color-red-100: #f9ecec;--color-yellow-500: #635f04;--color-yellow-400: #928c30;--color-yellow-300: #d1c844;--color-yellow-200: #e8e3a1;--color-yellow-100: #f2f0e9;--color-purple-focus: #b967c7;--text-heading: #002e5d;--text-secondary-heading: #737373;--text-body: #141414;--text-disabled: #737373;--text-link: #336cc8;--text-on-action: #ffffff;--text-success: #1d562e;--text-info: #26485f;--text-error: #702121;--text-warning: #635f04;--surface-success: #ebf6ee;--surface-info: #ecf2f6;--surface-error: #f9ecec;--surface-warning: #f2f0e9;--focus-ring-color: #b967c7}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Light.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Regular.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Semibold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Bold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-LightItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Italic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-SemiboldItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-BoldItalic.ttf) format(\"truetype\");font-display:swap}h1,h2,h3,h4,h5,h6,span:not(.material-symbols-outlined),a,p{font-family:Source Sans Pro}h1{font-weight:300;font-style:normal;color:var(--text-heading)}h2{font-weight:400;font-style:normal;color:var(--text-heading)}h3{font-weight:700;font-style:normal;color:var(--text-heading)}h4,h5,h6{font-weight:600;font-style:normal;color:var(--text-secondary-heading)}.hbll-default-body{font-weight:400;font-style:normal;max-width:35rem;min-width:22.25rem;color:var(--text-body)}.hbll-caption{font-weight:400;font-style:normal;max-width:25.25rem;min-width:17.5rem;color:var(--text-body)}.hbll-large{font-weight:400;font-style:normal;max-width:41.25rem;min-width:26.5rem;color:var(--text-body)}a{color:var(--text-link);text-decoration:underline}.hbll-emphasis{font-weight:600}h1{font-size:2rem;line-height:2.5rem}h2{font-size:1.75rem;line-height:2.25rem}h3,h4{font-size:1.5rem;line-height:2rem}h5,h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:.875rem;line-height:1.25rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1rem;line-height:1.5rem}@media screen and (min-width: 52.125em){h1{font-size:3rem;line-height:3.5rem}h2{font-size:2.5rem;line-height:3rem}h3{font-size:2rem;line-height:3rem}h4{font-size:1.75rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}@media screen and (min-width: 90em){h1{font-size:3.75rem;line-height:4.25rem}h2{font-size:3rem;line-height:3.5rem}h3{font-size:2.5rem;line-height:3rem}h4{font-size:2rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.radio{display:inline-flex;align-items:center;gap:.5rem;cursor:pointer;padding:.375rem .5rem .375rem .375rem;border-radius:999rem}.radio.radio--disabled{cursor:not-allowed}.radio-btn{appearance:none;-webkit-appearance:none;width:1.5rem;height:1.5rem;border-radius:50%;border:.125rem solid var(--hbll-radio-color, #d0d0d0);box-sizing:border-box;background-color:var(--hbll-radio-color, #ffffff);display:inline-grid;place-items:center;position:relative;margin:0;padding:0;cursor:pointer;outline:none;transition:border-color .15s ease,background-color .15s ease}.radio-btn:before{content:\"\";width:.75rem;height:.75rem;border-radius:50%;background-color:var(--hbll-radio-color, #0047ba);transform:scale(0);transition:transform .12s ease-in-out,background-color .12s ease-in-out}.radio-btn:after{content:\"\";position:absolute;width:2.25rem;height:2.25rem;border-radius:50%;top:50%;left:50%;transform:translate(-50%,-50%);border:.125rem solid transparent;background-color:transparent;opacity:0;transition:background-color .12s ease,border-color .12s ease,opacity .12s ease;pointer-events:none;box-sizing:border-box}.radio-btn:not(:disabled):not(:checked):hover:after{background-color:#8f8f8f1a;background-color:color-mix(in srgb,var(--hbll-radio-color, #8f8f8f) 10%,transparent);border-color:transparent;opacity:1}.radio-btn:not(:disabled):not(:checked):focus-visible:after{background-color:transparent;border-color:#b967c7;opacity:1}.radio-btn:checked{border-color:var(--hbll-radio-color, #0047ba);background-color:#fff}.radio-btn:checked:before{transform:scale(1)}.radio-btn:not(:disabled):checked:hover:after{background-color:#0047ba1a;background-color:color-mix(in srgb,var(--hbll-radio-color, #0047ba) 10%,transparent);border-color:transparent;opacity:1}.radio-btn:not(:disabled):checked:focus-visible:after{background-color:transparent;border-color:#b967c7;opacity:1}.radio-btn:disabled{cursor:not-allowed;background-color:#e7e7e7;border-color:var(--hbll-radio-color, #d0d0d0)}.radio-btn:disabled:after{opacity:0}.radio-btn:disabled:checked{background-color:#e7e7e7;border-color:#737373}.radio-btn:disabled:checked:before{background-color:#737373;transform:scale(1)}\n"] }]
|
|
3813
|
+
}], propDecorators: { color: [{
|
|
3814
|
+
type: Input
|
|
3815
|
+
}], disabled: [{
|
|
3816
|
+
type: Input,
|
|
3817
|
+
args: [{ transform: booleanAttribute }]
|
|
3818
|
+
}], name: [{
|
|
3819
|
+
type: Input
|
|
3820
|
+
}], value: [{
|
|
3821
|
+
type: Input,
|
|
3822
|
+
args: [{ required: true }]
|
|
3823
|
+
}], checkedChange: [{
|
|
3824
|
+
type: Output
|
|
3825
|
+
}] } });
|
|
3826
|
+
|
|
3827
|
+
/**
|
|
3828
|
+
* A dropdown component that combines a label and a searchable select field.
|
|
3829
|
+
* Features include:
|
|
3830
|
+
* - Searchable input to filter options
|
|
3831
|
+
* - Keyboard navigation support
|
|
3832
|
+
* - Optional label with help icon
|
|
3833
|
+
* - Multiple states (default, focused, error, etc.)
|
|
3834
|
+
*
|
|
3835
|
+
* @example
|
|
3836
|
+
* ```html
|
|
3837
|
+
* <!-- Basic dropdown -->
|
|
3838
|
+
* <lib-dropdown
|
|
3839
|
+
* label="Select an option"
|
|
3840
|
+
* [options]="myOptions"
|
|
3841
|
+
* (valueChange)="onSelectionChange($event)">
|
|
3842
|
+
* </lib-dropdown>
|
|
3843
|
+
*
|
|
3844
|
+
* <!-- Required dropdown with help icon -->
|
|
3845
|
+
* <lib-dropdown
|
|
3846
|
+
* label="Category"
|
|
3847
|
+
* labelType="required"
|
|
3848
|
+
* [showHelpIcon]="true"
|
|
3849
|
+
* [options]="categories"
|
|
3850
|
+
* placeholder="Choose a category"
|
|
3851
|
+
* (valueChange)="onCategoryChange($event)">
|
|
3852
|
+
* </lib-dropdown>
|
|
3853
|
+
*
|
|
3854
|
+
* <!-- Dropdown with error state -->
|
|
3855
|
+
* <lib-dropdown
|
|
3856
|
+
* label="Status"
|
|
3857
|
+
* [options]="statuses"
|
|
3858
|
+
* state="error"
|
|
3859
|
+
* subtext="Please select a status"
|
|
3860
|
+
* (valueChange)="onStatusChange($event)">
|
|
3861
|
+
* </lib-dropdown>
|
|
3862
|
+
* ```
|
|
3863
|
+
*/
|
|
3864
|
+
class DropdownComponent {
|
|
3865
|
+
constructor() {
|
|
3866
|
+
this.labelType = 'none';
|
|
3867
|
+
this.showHelpIcon = false;
|
|
3868
|
+
this.placeholder = 'Select an option';
|
|
3869
|
+
this.options = [];
|
|
3870
|
+
this.state = 'default';
|
|
3871
|
+
this.disabled = false;
|
|
3872
|
+
this.searchable = true;
|
|
3873
|
+
this.valueChange = new EventEmitter();
|
|
3874
|
+
this.helpIconClick = new EventEmitter();
|
|
3875
|
+
this.value = '';
|
|
3876
|
+
this.searchText = '';
|
|
3877
|
+
this.isOpen = false;
|
|
3878
|
+
this.selectedIndex = -1;
|
|
3879
|
+
this.filteredOptions = [];
|
|
3880
|
+
this.elementRef = inject(ElementRef);
|
|
3881
|
+
this.onChange = () => { };
|
|
3882
|
+
this.onTouched = () => { };
|
|
3883
|
+
}
|
|
3884
|
+
ngOnInit() {
|
|
3885
|
+
this.filteredOptions = this.options;
|
|
3886
|
+
}
|
|
3887
|
+
/**
|
|
3888
|
+
* Gets the display text for the selected value
|
|
3889
|
+
*/
|
|
3890
|
+
get displayText() {
|
|
3891
|
+
if (!this.value && !this.searchText) {
|
|
3892
|
+
return '';
|
|
3893
|
+
}
|
|
3894
|
+
if (this.searchText) {
|
|
3895
|
+
return this.searchText;
|
|
3896
|
+
}
|
|
3897
|
+
const selectedOption = this.options.find((opt) => opt.value === this.value);
|
|
3898
|
+
return selectedOption ? selectedOption.label : '';
|
|
3899
|
+
}
|
|
3900
|
+
/**
|
|
3901
|
+
* Toggles dropdown open/closed state
|
|
3902
|
+
*/
|
|
3903
|
+
toggleDropdown() {
|
|
3904
|
+
if (this.disabled)
|
|
3905
|
+
return;
|
|
3906
|
+
this.isOpen = !this.isOpen;
|
|
3907
|
+
if (this.isOpen) {
|
|
3908
|
+
this.filteredOptions = this.options;
|
|
3909
|
+
this.selectedIndex = this.options.findIndex((opt) => opt.value === this.value);
|
|
3910
|
+
}
|
|
3911
|
+
}
|
|
3912
|
+
/**
|
|
3913
|
+
* Handles input changes for search functionality
|
|
3914
|
+
*/
|
|
3915
|
+
onSearchInput(event) {
|
|
3916
|
+
const input = event.target;
|
|
3917
|
+
this.searchText = input.value;
|
|
3918
|
+
this.filterOptions();
|
|
3919
|
+
if (!this.isOpen) {
|
|
3920
|
+
this.isOpen = true;
|
|
3921
|
+
}
|
|
3922
|
+
}
|
|
3923
|
+
/**
|
|
3924
|
+
* Filters options based on search text
|
|
3925
|
+
*/
|
|
3926
|
+
filterOptions() {
|
|
3927
|
+
if (!this.searchText) {
|
|
3928
|
+
this.filteredOptions = this.options;
|
|
3929
|
+
}
|
|
3930
|
+
else {
|
|
3931
|
+
this.filteredOptions = this.options.filter((option) => option.label.toLowerCase().includes(this.searchText.toLowerCase()));
|
|
3932
|
+
}
|
|
3933
|
+
this.selectedIndex = 0;
|
|
3934
|
+
}
|
|
3935
|
+
/**
|
|
3936
|
+
* Selects an option from the dropdown
|
|
3937
|
+
*/
|
|
3938
|
+
selectOption(option) {
|
|
3939
|
+
if (option.disabled)
|
|
3940
|
+
return;
|
|
3941
|
+
this.value = option.value;
|
|
3942
|
+
this.searchText = '';
|
|
3943
|
+
this.isOpen = false;
|
|
3944
|
+
this.onChange(this.value);
|
|
3945
|
+
this.valueChange.emit(this.value);
|
|
3946
|
+
}
|
|
3947
|
+
/**
|
|
3948
|
+
* Handles keyboard navigation
|
|
3949
|
+
*/
|
|
3950
|
+
onKeyDown(event) {
|
|
3951
|
+
if (this.disabled)
|
|
3952
|
+
return;
|
|
3953
|
+
switch (event.key) {
|
|
3954
|
+
case 'ArrowDown':
|
|
3955
|
+
event.preventDefault();
|
|
3956
|
+
if (!this.isOpen) {
|
|
3957
|
+
this.isOpen = true;
|
|
3958
|
+
}
|
|
3959
|
+
else {
|
|
3960
|
+
this.selectedIndex = Math.min(this.selectedIndex + 1, this.filteredOptions.length - 1);
|
|
3961
|
+
}
|
|
3962
|
+
break;
|
|
3963
|
+
case 'ArrowUp':
|
|
3964
|
+
event.preventDefault();
|
|
3965
|
+
if (this.isOpen) {
|
|
3966
|
+
this.selectedIndex = Math.max(this.selectedIndex - 1, 0);
|
|
3967
|
+
}
|
|
3968
|
+
break;
|
|
3969
|
+
case 'Enter':
|
|
3970
|
+
event.preventDefault();
|
|
3971
|
+
if (this.isOpen && this.selectedIndex >= 0) {
|
|
3972
|
+
this.selectOption(this.filteredOptions[this.selectedIndex]);
|
|
3973
|
+
}
|
|
3974
|
+
else {
|
|
3975
|
+
this.toggleDropdown();
|
|
3976
|
+
}
|
|
3977
|
+
break;
|
|
3978
|
+
case 'Escape':
|
|
3979
|
+
event.preventDefault();
|
|
3980
|
+
this.isOpen = false;
|
|
3981
|
+
this.searchText = '';
|
|
3982
|
+
this.filteredOptions = this.options;
|
|
3983
|
+
break;
|
|
3984
|
+
case 'Tab':
|
|
3985
|
+
if (this.isOpen) {
|
|
3986
|
+
this.isOpen = false;
|
|
3987
|
+
this.searchText = '';
|
|
3988
|
+
this.filteredOptions = this.options;
|
|
3989
|
+
}
|
|
3990
|
+
break;
|
|
3991
|
+
}
|
|
3992
|
+
}
|
|
3993
|
+
/**
|
|
3994
|
+
* Handles blur event
|
|
3995
|
+
*/
|
|
3996
|
+
onBlur() {
|
|
3997
|
+
setTimeout(() => {
|
|
3998
|
+
if (!this.elementRef.nativeElement.contains(document.activeElement)) {
|
|
3999
|
+
this.isOpen = false;
|
|
4000
|
+
this.searchText = '';
|
|
4001
|
+
this.filteredOptions = this.options;
|
|
4002
|
+
}
|
|
4003
|
+
}, 200);
|
|
4004
|
+
}
|
|
4005
|
+
/**
|
|
4006
|
+
* Handles help icon click event
|
|
4007
|
+
*/
|
|
4008
|
+
onHelpIconClick() {
|
|
4009
|
+
this.helpIconClick.emit();
|
|
4010
|
+
}
|
|
4011
|
+
/**
|
|
4012
|
+
* Closes dropdown when clicking outside
|
|
4013
|
+
*/
|
|
4014
|
+
onDocumentClick(event) {
|
|
4015
|
+
if (!this.elementRef.nativeElement.contains(event.target)) {
|
|
4016
|
+
this.isOpen = false;
|
|
4017
|
+
this.searchText = '';
|
|
4018
|
+
this.filteredOptions = this.options;
|
|
4019
|
+
}
|
|
4020
|
+
}
|
|
4021
|
+
// ControlValueAccessor implementation
|
|
4022
|
+
writeValue(value) {
|
|
4023
|
+
this.value = value || '';
|
|
4024
|
+
}
|
|
4025
|
+
registerOnChange(fn) {
|
|
4026
|
+
this.onChange = fn;
|
|
4027
|
+
}
|
|
4028
|
+
registerOnTouched(fn) {
|
|
4029
|
+
this.onTouched = fn;
|
|
4030
|
+
}
|
|
4031
|
+
setDisabledState(isDisabled) {
|
|
4032
|
+
this.disabled = isDisabled;
|
|
4033
|
+
}
|
|
4034
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4035
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: DropdownComponent, isStandalone: true, selector: "lib-dropdown", inputs: { label: "label", inputId: "inputId", labelType: "labelType", showHelpIcon: "showHelpIcon", subtext: "subtext", placeholder: "placeholder", options: "options", state: "state", disabled: "disabled", ariaLabel: "ariaLabel", searchable: "searchable" }, outputs: { valueChange: "valueChange", helpIconClick: "helpIconClick" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, providers: [
|
|
4036
|
+
{
|
|
4037
|
+
provide: NG_VALUE_ACCESSOR,
|
|
4038
|
+
useExisting: forwardRef(() => DropdownComponent),
|
|
4039
|
+
multi: true,
|
|
4040
|
+
},
|
|
4041
|
+
], viewQueries: [{ propertyName: "dropdownInput", first: true, predicate: ["dropdownInput"], descendants: true }], ngImport: i0, template: "<div class=\"dropdown-wrapper\">\n @if (label) {\n <lib-label\n [for]=\"inputId\"\n [text]=\"label\"\n [type]=\"labelType\"\n [showHelpIcon]=\"showHelpIcon\"\n [subtext]=\"subtext\"\n (helpIconClick)=\"onHelpIconClick()\"\n ></lib-label>\n }\n\n <div\n class=\"dropdown-field-container\"\n [ngClass]=\"'dropdown-' + state\"\n >\n <div class=\"dropdown-field-wrapper\" (click)=\"toggleDropdown()\">\n <lib-field\n #dropdownInput\n [inputId]=\"inputId\"\n [placeholder]=\"placeholder\"\n [value]=\"displayText\"\n [disabled]=\"disabled\"\n [state]=\"state\"\n [ariaLabel]=\"ariaLabel ? ariaLabel : label\"\n [iconAfter]=\"isOpen ? 'expand_less' : 'expand_more'\"\n [attr.readonly]=\"!searchable\"\n (input)=\"onSearchInput($event)\"\n (keydown)=\"onKeyDown($event)\"\n >\n </lib-field>\n </div>\n\n @if (isOpen) {\n <div class=\"dropdown-menu\">\n <div class=\"dropdown-menu-items\">\n @if (filteredOptions.length === 0) {\n <div class=\"dropdown-menu-item no-results\">No results found</div>\n }\n @for (option of filteredOptions; track option.value; let i = $index) {\n <div\n class=\"dropdown-menu-item\"\n [ngClass]=\"{\n selected: option.value === value,\n highlighted: i === selectedIndex,\n disabled: option.disabled\n }\"\n (click)=\"selectOption(option)\"\n (mouseenter)=\"selectedIndex = i\"\n >\n {{ option.label }}\n </div>\n }\n </div>\n </div>\n }\n </div>\n</div>\n", styles: ["*{box-sizing:border-box;text-decoration:none;font-size:1em}*:not(.material-symbols-outlined){font-family:inherit}html{border:0;margin:0;padding:0;-webkit-text-size-adjust:100%}body{margin:0;padding:0}*,*:before,*:after{box-sizing:border-box}:root{--color-navy: #00245d;--color-royal: #0047ba;--color-white: #ffffff;--color-blue-500: #00245d;--color-blue-400: #003995;--color-blue-300: #0047ba;--color-blue-200: #336cc8;--color-blue-150: #ccdaf1;--color-blue-100: #e5edf8;--color-gray-500: #141414;--color-gray-400: #737373;--color-gray-300: #8f8f8f;--color-gray-200: #d0d0d0;--color-gray-100: #e7e7e7;--color-gray-50: #f9f9f9;--color-gray-brand-400: #737373;--color-green-500: #1d562e;--color-green-400: #2e8545;--color-green-300: #3ba35a;--color-green-200: #9dd1ac;--color-green-100: #ebf6ee;--color-teal-500: #26485f;--color-teal-400: #3e7295;--color-teal-300: #457fa6;--color-teal-200: #a2bfd3;--color-teal-100: #ecf2f6;--color-red-500: #702121;--color-red-400: #b33837;--color-red-300: #c73e3d;--color-red-200: #e39e9e;--color-red-100: #f9ecec;--color-yellow-500: #635f04;--color-yellow-400: #928c30;--color-yellow-300: #d1c844;--color-yellow-200: #e8e3a1;--color-yellow-100: #f2f0e9;--color-purple-focus: #b967c7;--text-heading: #002e5d;--text-secondary-heading: #737373;--text-body: #141414;--text-disabled: #737373;--text-link: #336cc8;--text-on-action: #ffffff;--text-success: #1d562e;--text-info: #26485f;--text-error: #702121;--text-warning: #635f04;--surface-success: #ebf6ee;--surface-info: #ecf2f6;--surface-error: #f9ecec;--surface-warning: #f2f0e9;--focus-ring-color: #b967c7}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Light.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Regular.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Semibold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Bold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-LightItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Italic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-SemiboldItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-BoldItalic.ttf) format(\"truetype\");font-display:swap}h1,h2,h3,h4,h5,h6,span:not(.material-symbols-outlined),a,p{font-family:Source Sans Pro}h1{font-weight:300;font-style:normal;color:var(--text-heading)}h2{font-weight:400;font-style:normal;color:var(--text-heading)}h3{font-weight:700;font-style:normal;color:var(--text-heading)}h4,h5,h6{font-weight:600;font-style:normal;color:var(--text-secondary-heading)}.hbll-default-body{font-weight:400;font-style:normal;max-width:35rem;min-width:22.25rem;color:var(--text-body)}.hbll-caption{font-weight:400;font-style:normal;max-width:25.25rem;min-width:17.5rem;color:var(--text-body)}.hbll-large{font-weight:400;font-style:normal;max-width:41.25rem;min-width:26.5rem;color:var(--text-body)}a{color:var(--text-link);text-decoration:underline}.hbll-emphasis{font-weight:600}h1{font-size:2rem;line-height:2.5rem}h2{font-size:1.75rem;line-height:2.25rem}h3,h4{font-size:1.5rem;line-height:2rem}h5,h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:.875rem;line-height:1.25rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1rem;line-height:1.5rem}@media screen and (min-width: 52.125em){h1{font-size:3rem;line-height:3.5rem}h2{font-size:2.5rem;line-height:3rem}h3{font-size:2rem;line-height:3rem}h4{font-size:1.75rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}@media screen and (min-width: 90em){h1{font-size:3.75rem;line-height:4.25rem}h2{font-size:3rem;line-height:3.5rem}h3{font-size:2.5rem;line-height:3rem}h4{font-size:2rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.dropdown-wrapper{display:flex;flex-direction:column;align-items:flex-start;padding:0;gap:.5rem;width:100%}.dropdown-field-container{position:relative;width:100%}.dropdown-field-container .dropdown-field-wrapper{cursor:pointer}.dropdown-field-container .dropdown-field-wrapper lib-field{cursor:pointer;pointer-events:none}.dropdown-field-container .dropdown-field-wrapper lib-field ::ng-deep .field-wrapper{cursor:pointer}.dropdown-field-container .dropdown-field-wrapper lib-field ::ng-deep .field-wrapper .field-input{cursor:pointer;pointer-events:auto}.dropdown-field-container .dropdown-field-wrapper lib-field ::ng-deep .field-wrapper .field-input:not([readonly]){cursor:text}.dropdown-field-container .dropdown-field-wrapper lib-field ::ng-deep .field-wrapper .icon-after{pointer-events:none}.dropdown-field-container .dropdown-menu{position:absolute;top:100%;left:0;width:100%;max-height:15rem;background:#fff;border:1px solid #d0d0d0;border-radius:0 0 .25rem .25rem;z-index:1000;overflow:hidden;box-shadow:0 2px 8px #0000001a}.dropdown-field-container .dropdown-menu .dropdown-menu-items{max-height:15rem;overflow-y:auto;overflow-x:hidden}.dropdown-field-container .dropdown-menu .dropdown-menu-items::-webkit-scrollbar{width:.5625rem}.dropdown-field-container .dropdown-menu .dropdown-menu-items::-webkit-scrollbar-track{background:#fff}.dropdown-field-container .dropdown-menu .dropdown-menu-items::-webkit-scrollbar-thumb{background:#8f8f8f;border-radius:16rem}.dropdown-field-container .dropdown-menu .dropdown-menu-items::-webkit-scrollbar-thumb:hover{background:#737373}.dropdown-field-container .dropdown-menu .dropdown-menu-items .dropdown-menu-item{display:flex;flex-direction:row;align-items:flex-end;padding:.5rem 1rem;gap:.5rem;font-family:Source Sans Pro,sans-serif;font-size:1rem;line-height:1.5rem;color:#141414;cursor:pointer;transition:background-color .2s ease}.dropdown-field-container .dropdown-menu .dropdown-menu-items .dropdown-menu-item:hover:not(.disabled):not(.no-results){background:#f9f9f9}.dropdown-field-container .dropdown-menu .dropdown-menu-items .dropdown-menu-item.highlighted:not(.disabled):not(.no-results){background:#f9f9f9}.dropdown-field-container .dropdown-menu .dropdown-menu-items .dropdown-menu-item.selected{background:#e5edf8;font-weight:600}.dropdown-field-container .dropdown-menu .dropdown-menu-items .dropdown-menu-item.disabled{color:#737373;cursor:not-allowed;opacity:.6}.dropdown-field-container .dropdown-menu .dropdown-menu-items .dropdown-menu-item.no-results{color:#737373;cursor:default;font-style:italic}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: LabelComponent, selector: "lib-label", inputs: ["text", "type", "showHelpIcon", "ariaLabel", "position", "isRequired", "for", "subtext"], outputs: ["helpIconClick"] }, { kind: "component", type: FieldComponent, selector: "lib-field", inputs: ["inputType", "inputId", "placeholder", "state", "status", "iconBefore", "iconAfter", "iconBeforeClickable", "iconAfterClickable", "iconBeforeAction", "iconAfterAction", "disabled", "ariaLabel", "value", "isFullText", "rows", "minWidth", "maxWidth", "minHeight", "maxHeight"], outputs: ["valueChange", "iconBeforeClick", "iconAfterClick", "fieldFocus", "fieldBlur"] }] }); }
|
|
4042
|
+
}
|
|
4043
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
4044
|
+
type: Component,
|
|
4045
|
+
args: [{ selector: 'lib-dropdown', standalone: true, imports: [CommonModule, LabelComponent, FieldComponent], providers: [
|
|
4046
|
+
{
|
|
4047
|
+
provide: NG_VALUE_ACCESSOR,
|
|
4048
|
+
useExisting: forwardRef(() => DropdownComponent),
|
|
4049
|
+
multi: true,
|
|
4050
|
+
},
|
|
4051
|
+
], template: "<div class=\"dropdown-wrapper\">\n @if (label) {\n <lib-label\n [for]=\"inputId\"\n [text]=\"label\"\n [type]=\"labelType\"\n [showHelpIcon]=\"showHelpIcon\"\n [subtext]=\"subtext\"\n (helpIconClick)=\"onHelpIconClick()\"\n ></lib-label>\n }\n\n <div\n class=\"dropdown-field-container\"\n [ngClass]=\"'dropdown-' + state\"\n >\n <div class=\"dropdown-field-wrapper\" (click)=\"toggleDropdown()\">\n <lib-field\n #dropdownInput\n [inputId]=\"inputId\"\n [placeholder]=\"placeholder\"\n [value]=\"displayText\"\n [disabled]=\"disabled\"\n [state]=\"state\"\n [ariaLabel]=\"ariaLabel ? ariaLabel : label\"\n [iconAfter]=\"isOpen ? 'expand_less' : 'expand_more'\"\n [attr.readonly]=\"!searchable\"\n (input)=\"onSearchInput($event)\"\n (keydown)=\"onKeyDown($event)\"\n >\n </lib-field>\n </div>\n\n @if (isOpen) {\n <div class=\"dropdown-menu\">\n <div class=\"dropdown-menu-items\">\n @if (filteredOptions.length === 0) {\n <div class=\"dropdown-menu-item no-results\">No results found</div>\n }\n @for (option of filteredOptions; track option.value; let i = $index) {\n <div\n class=\"dropdown-menu-item\"\n [ngClass]=\"{\n selected: option.value === value,\n highlighted: i === selectedIndex,\n disabled: option.disabled\n }\"\n (click)=\"selectOption(option)\"\n (mouseenter)=\"selectedIndex = i\"\n >\n {{ option.label }}\n </div>\n }\n </div>\n </div>\n }\n </div>\n</div>\n", styles: ["*{box-sizing:border-box;text-decoration:none;font-size:1em}*:not(.material-symbols-outlined){font-family:inherit}html{border:0;margin:0;padding:0;-webkit-text-size-adjust:100%}body{margin:0;padding:0}*,*:before,*:after{box-sizing:border-box}:root{--color-navy: #00245d;--color-royal: #0047ba;--color-white: #ffffff;--color-blue-500: #00245d;--color-blue-400: #003995;--color-blue-300: #0047ba;--color-blue-200: #336cc8;--color-blue-150: #ccdaf1;--color-blue-100: #e5edf8;--color-gray-500: #141414;--color-gray-400: #737373;--color-gray-300: #8f8f8f;--color-gray-200: #d0d0d0;--color-gray-100: #e7e7e7;--color-gray-50: #f9f9f9;--color-gray-brand-400: #737373;--color-green-500: #1d562e;--color-green-400: #2e8545;--color-green-300: #3ba35a;--color-green-200: #9dd1ac;--color-green-100: #ebf6ee;--color-teal-500: #26485f;--color-teal-400: #3e7295;--color-teal-300: #457fa6;--color-teal-200: #a2bfd3;--color-teal-100: #ecf2f6;--color-red-500: #702121;--color-red-400: #b33837;--color-red-300: #c73e3d;--color-red-200: #e39e9e;--color-red-100: #f9ecec;--color-yellow-500: #635f04;--color-yellow-400: #928c30;--color-yellow-300: #d1c844;--color-yellow-200: #e8e3a1;--color-yellow-100: #f2f0e9;--color-purple-focus: #b967c7;--text-heading: #002e5d;--text-secondary-heading: #737373;--text-body: #141414;--text-disabled: #737373;--text-link: #336cc8;--text-on-action: #ffffff;--text-success: #1d562e;--text-info: #26485f;--text-error: #702121;--text-warning: #635f04;--surface-success: #ebf6ee;--surface-info: #ecf2f6;--surface-error: #f9ecec;--surface-warning: #f2f0e9;--focus-ring-color: #b967c7}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Light.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Regular.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Semibold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Bold.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:300;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-LightItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-Italic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-SemiboldItalic.ttf) format(\"truetype\");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:url(https://media.lib.byu.edu/web-assets/fonts/sourcesanspro/1.0.0/SourceSansPro-BoldItalic.ttf) format(\"truetype\");font-display:swap}h1,h2,h3,h4,h5,h6,span:not(.material-symbols-outlined),a,p{font-family:Source Sans Pro}h1{font-weight:300;font-style:normal;color:var(--text-heading)}h2{font-weight:400;font-style:normal;color:var(--text-heading)}h3{font-weight:700;font-style:normal;color:var(--text-heading)}h4,h5,h6{font-weight:600;font-style:normal;color:var(--text-secondary-heading)}.hbll-default-body{font-weight:400;font-style:normal;max-width:35rem;min-width:22.25rem;color:var(--text-body)}.hbll-caption{font-weight:400;font-style:normal;max-width:25.25rem;min-width:17.5rem;color:var(--text-body)}.hbll-large{font-weight:400;font-style:normal;max-width:41.25rem;min-width:26.5rem;color:var(--text-body)}a{color:var(--text-link);text-decoration:underline}.hbll-emphasis{font-weight:600}h1{font-size:2rem;line-height:2.5rem}h2{font-size:1.75rem;line-height:2.25rem}h3,h4{font-size:1.5rem;line-height:2rem}h5,h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:.875rem;line-height:1.25rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1rem;line-height:1.5rem}@media screen and (min-width: 52.125em){h1{font-size:3rem;line-height:3.5rem}h2{font-size:2.5rem;line-height:3rem}h3{font-size:2rem;line-height:3rem}h4{font-size:1.75rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}@media screen and (min-width: 90em){h1{font-size:3.75rem;line-height:4.25rem}h2{font-size:3rem;line-height:3.5rem}h3{font-size:2.5rem;line-height:3rem}h4{font-size:2rem;line-height:2.5rem}h5{font-size:1.5rem;line-height:2rem}h6{font-size:1.25rem;line-height:1.75rem}.hbll-default-body{font-size:1rem;line-height:1.5rem}.hbll-caption{font-size:.75rem;line-height:1rem}.hbll-large{font-size:1.25rem;line-height:1.75rem}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only.sr-only-focusable:focus,.sr-only.sr-only-focusable:focus-within,.sr-only.sr-only-focusable:active{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.dropdown-wrapper{display:flex;flex-direction:column;align-items:flex-start;padding:0;gap:.5rem;width:100%}.dropdown-field-container{position:relative;width:100%}.dropdown-field-container .dropdown-field-wrapper{cursor:pointer}.dropdown-field-container .dropdown-field-wrapper lib-field{cursor:pointer;pointer-events:none}.dropdown-field-container .dropdown-field-wrapper lib-field ::ng-deep .field-wrapper{cursor:pointer}.dropdown-field-container .dropdown-field-wrapper lib-field ::ng-deep .field-wrapper .field-input{cursor:pointer;pointer-events:auto}.dropdown-field-container .dropdown-field-wrapper lib-field ::ng-deep .field-wrapper .field-input:not([readonly]){cursor:text}.dropdown-field-container .dropdown-field-wrapper lib-field ::ng-deep .field-wrapper .icon-after{pointer-events:none}.dropdown-field-container .dropdown-menu{position:absolute;top:100%;left:0;width:100%;max-height:15rem;background:#fff;border:1px solid #d0d0d0;border-radius:0 0 .25rem .25rem;z-index:1000;overflow:hidden;box-shadow:0 2px 8px #0000001a}.dropdown-field-container .dropdown-menu .dropdown-menu-items{max-height:15rem;overflow-y:auto;overflow-x:hidden}.dropdown-field-container .dropdown-menu .dropdown-menu-items::-webkit-scrollbar{width:.5625rem}.dropdown-field-container .dropdown-menu .dropdown-menu-items::-webkit-scrollbar-track{background:#fff}.dropdown-field-container .dropdown-menu .dropdown-menu-items::-webkit-scrollbar-thumb{background:#8f8f8f;border-radius:16rem}.dropdown-field-container .dropdown-menu .dropdown-menu-items::-webkit-scrollbar-thumb:hover{background:#737373}.dropdown-field-container .dropdown-menu .dropdown-menu-items .dropdown-menu-item{display:flex;flex-direction:row;align-items:flex-end;padding:.5rem 1rem;gap:.5rem;font-family:Source Sans Pro,sans-serif;font-size:1rem;line-height:1.5rem;color:#141414;cursor:pointer;transition:background-color .2s ease}.dropdown-field-container .dropdown-menu .dropdown-menu-items .dropdown-menu-item:hover:not(.disabled):not(.no-results){background:#f9f9f9}.dropdown-field-container .dropdown-menu .dropdown-menu-items .dropdown-menu-item.highlighted:not(.disabled):not(.no-results){background:#f9f9f9}.dropdown-field-container .dropdown-menu .dropdown-menu-items .dropdown-menu-item.selected{background:#e5edf8;font-weight:600}.dropdown-field-container .dropdown-menu .dropdown-menu-items .dropdown-menu-item.disabled{color:#737373;cursor:not-allowed;opacity:.6}.dropdown-field-container .dropdown-menu .dropdown-menu-items .dropdown-menu-item.no-results{color:#737373;cursor:default;font-style:italic}\n"] }]
|
|
4052
|
+
}], propDecorators: { label: [{
|
|
4053
|
+
type: Input
|
|
4054
|
+
}], inputId: [{
|
|
4055
|
+
type: Input
|
|
4056
|
+
}], labelType: [{
|
|
4057
|
+
type: Input
|
|
4058
|
+
}], showHelpIcon: [{
|
|
4059
|
+
type: Input
|
|
4060
|
+
}], subtext: [{
|
|
4061
|
+
type: Input
|
|
4062
|
+
}], placeholder: [{
|
|
4063
|
+
type: Input
|
|
4064
|
+
}], options: [{
|
|
4065
|
+
type: Input
|
|
4066
|
+
}], state: [{
|
|
4067
|
+
type: Input
|
|
4068
|
+
}], disabled: [{
|
|
4069
|
+
type: Input
|
|
4070
|
+
}], ariaLabel: [{
|
|
4071
|
+
type: Input
|
|
4072
|
+
}], searchable: [{
|
|
4073
|
+
type: Input
|
|
4074
|
+
}], valueChange: [{
|
|
4075
|
+
type: Output
|
|
4076
|
+
}], helpIconClick: [{
|
|
4077
|
+
type: Output
|
|
4078
|
+
}], dropdownInput: [{
|
|
4079
|
+
type: ViewChild,
|
|
4080
|
+
args: ['dropdownInput']
|
|
4081
|
+
}], onDocumentClick: [{
|
|
4082
|
+
type: HostListener,
|
|
4083
|
+
args: ['document:click', ['$event']]
|
|
4084
|
+
}] } });
|
|
4085
|
+
|
|
2981
4086
|
/*
|
|
2982
4087
|
* Public API Surface of components
|
|
2983
4088
|
*/
|
|
@@ -2986,5 +4091,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
2986
4091
|
* Generated bundle index. Do not edit.
|
|
2987
4092
|
*/
|
|
2988
4093
|
|
|
2989
|
-
export { ADVANCED_SEARCH_FIELD_MAP, ADVANCED_SEARCH_OPTIONS, ADVANCED_SEARCH_QUALIFIER_MAP, ButtonComponent, ButtonGroupComponent, ButtonGroupItemComponent, HbllFooterComponent, HbllHeaderComponent, HbllItemTypeIconPipe, HeaderWithImpersonationComponent, ImpersonateModalComponent, ImpersonateUserPipe, ImpersonationBannerComponent, LIBRARY_HOURS_API_URL, SnackbarComponent, SnackbarService, SsSearchBarComponent, StatusButtonComponent, defaultOidcBaseUri, defaultOidcDefaultIdp, getUserStatusFromRoles, isAdvancedSearchExternalFieldOption, isAdvancedSearchFieldOption, isAdvancedSearchLocalFieldOption, isSearchScope };
|
|
4094
|
+
export { ADVANCED_SEARCH_FIELD_MAP, ADVANCED_SEARCH_OPTIONS, ADVANCED_SEARCH_QUALIFIER_MAP, ButtonComponent, ButtonGroupComponent, ButtonGroupItemComponent, CheckboxComponent, DropdownComponent, FieldComponent, HbllFooterComponent, HbllHeaderComponent, HbllItemTypeIconPipe, HeaderWithImpersonationComponent, ImpersonateModalComponent, ImpersonateUserPipe, ImpersonationBannerComponent, LIBRARY_HOURS_API_URL, LabelComponent, LinkComponent, RadioButtonComponent, SnackbarComponent, SnackbarService, SsSearchBarComponent, StatusButtonComponent, TabBarComponent, TabItemComponent, defaultOidcBaseUri, defaultOidcDefaultIdp, getUserStatusFromRoles, isAdvancedSearchExternalFieldOption, isAdvancedSearchFieldOption, isAdvancedSearchLocalFieldOption, isSearchScope };
|
|
2990
4095
|
//# sourceMappingURL=byuhbll-components.mjs.map
|