@byuhbll/components 5.0.5-beta.1 → 5.1.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- import { EventEmitter, Signal, OnInit, OnDestroy } from '@angular/core';
1
+ import { EventEmitter, Signal } from '@angular/core';
2
2
  import { TokenPayload } from '../models/token-payload';
3
3
  import { JwtPayload } from 'jwt-decode';
4
4
  import * as i0 from "@angular/core";
5
- export declare class HeaderWithImpersonationComponent implements OnInit, OnDestroy {
5
+ export declare class HeaderWithImpersonationComponent {
6
6
  accessTokenPayload: import("@angular/core").InputSignal<TokenPayload>;
7
7
  oidcBaseUri: import("@angular/core").InputSignal<string>;
8
8
  oidcDefaultIdp: import("@angular/core").InputSignal<string>;
@@ -17,23 +17,6 @@ export declare class HeaderWithImpersonationComponent implements OnInit, OnDestr
17
17
  protected showImpersonateButton: Signal<boolean>;
18
18
  protected showImpersonationModal: boolean;
19
19
  private isImpersonating;
20
- private activityEvents;
21
- private inactivityTimerId;
22
- private inactivityTimeoutMs;
23
- private debounceTimerId;
24
- private debounceDelayMs;
25
- private trackingActive;
26
- private injector;
27
- ngOnInit(): void;
28
- ngOnDestroy(): void;
29
- /** Begin listening and start countdown */
30
- private startInactivityTracking;
31
- /** Remove listeners and clear timers */
32
- private stopInactivityTracking;
33
- /** Reset the inactivity countdown (no-op if not impersonating) */
34
- private resetInactivityTimer;
35
- /** Debounce activity to avoid hammering resets during event storms */
36
- private debouncedResetTimer;
37
20
  static ɵfac: i0.ɵɵFactoryDeclaration<HeaderWithImpersonationComponent, never>;
38
21
  static ɵcmp: i0.ɵɵComponentDeclaration<HeaderWithImpersonationComponent, "lib-header-with-impersonation", never, { "accessTokenPayload": { "alias": "accessTokenPayload"; "required": true; "isSignal": true; }; "oidcBaseUri": { "alias": "oidcBaseUri"; "required": false; "isSignal": true; }; "oidcDefaultIdp": { "alias": "oidcDefaultIdp"; "required": false; "isSignal": true; }; "mainSiteBaseUrl": { "alias": "mainSiteBaseUrl"; "required": false; "isSignal": true; }; "personBaseUri": { "alias": "personBaseUri"; "required": false; "isSignal": true; }; "myAccountApiBaseUri": { "alias": "myAccountApiBaseUri"; "required": false; "isSignal": true; }; }, { "login": "login"; "logout": "logout"; "endImpersonation": "endImpersonation"; }, never, never, true, never>;
39
22
  }
@@ -6,6 +6,7 @@ export interface SearchConfig {
6
6
  showAdvancedSearchAsText: boolean;
7
7
  scope: SearchScope;
8
8
  q: string;
9
+ isSuggestion: boolean;
9
10
  advancedSearchQueryRows: AdvancedSearchQueryRow[];
10
11
  localAdvancedSearch: {
11
12
  creationDate: Date;
@@ -10,19 +10,28 @@ export declare class SimpleSearchComponent implements OnInit, OnDestroy {
10
10
  private _config;
11
11
  set config(config: SearchConfig);
12
12
  get config(): SearchConfig;
13
+ suggestions: string[];
13
14
  simpleSearch: EventEmitter<SearchConfig>;
14
15
  clearSimpleSearch: EventEmitter<void>;
16
+ suggest: EventEmitter<SearchConfig>;
15
17
  protected isSubmitted: boolean;
18
+ protected showSuggestions: boolean;
19
+ protected selectedSuggestionIndex: number;
20
+ private skipNextSuggest;
16
21
  protected searchForm: import("@angular/forms").FormGroup<{
17
22
  simpleQuery: FormControl<string>;
18
23
  }>;
19
24
  get simpleQuery(): FormControl<any>;
20
25
  ngOnInit(): void;
21
26
  ngOnDestroy(): void;
22
- protected emitSimpleSearch: () => void;
27
+ protected emitSimpleSearch: (isSuggestion?: boolean) => void;
23
28
  protected clearQuery: () => void;
29
+ protected selectSuggestion: (suggestion: string) => void;
30
+ protected onInputKeydown: (event: KeyboardEvent) => void;
31
+ onDocumentClick(event: MouseEvent): void;
24
32
  private setupForm;
25
33
  private showSearchValidationToolTip;
34
+ private hideSuggestions;
26
35
  static ɵfac: i0.ɵɵFactoryDeclaration<SimpleSearchComponent, never>;
27
- static ɵcmp: i0.ɵɵComponentDeclaration<SimpleSearchComponent, "lib-ss-simple-search", never, { "config": { "alias": "config"; "required": true; }; }, { "simpleSearch": "simpleSearch"; "clearSimpleSearch": "clearSimpleSearch"; }, never, never, true, never>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<SimpleSearchComponent, "lib-ss-simple-search", never, { "config": { "alias": "config"; "required": true; }; "suggestions": { "alias": "suggestions"; "required": false; }; }, { "simpleSearch": "simpleSearch"; "clearSimpleSearch": "clearSimpleSearch"; "suggest": "suggest"; }, never, never, true, never>;
28
37
  }
@@ -6,12 +6,14 @@ export declare class SsSearchBarComponent {
6
6
  private _config;
7
7
  set config(config: string);
8
8
  get config(): SearchConfig;
9
+ suggestions: string[];
9
10
  simpleSearch: EventEmitter<SearchConfig>;
10
11
  clearSimpleSearch: EventEmitter<SearchConfig>;
11
12
  advancedSearch: EventEmitter<SearchConfig>;
12
13
  advancedSearchClosed: EventEmitter<SearchConfig>;
13
14
  advancedSearchOpen: EventEmitter<SearchConfig>;
14
15
  tabChange: EventEmitter<SearchConfig>;
16
+ suggest: EventEmitter<SearchConfig>;
15
17
  private barWrapperRef;
16
18
  protected heightOfContainer: number;
17
19
  protected emitClearSimpleSearch: () => void;
@@ -21,5 +23,5 @@ export declare class SsSearchBarComponent {
21
23
  protected emitAdvancedSearchOpen: () => void;
22
24
  protected emitTabChange: (newScope: SearchScope) => void;
23
25
  static ɵfac: i0.ɵɵFactoryDeclaration<SsSearchBarComponent, never>;
24
- static ɵcmp: i0.ɵɵComponentDeclaration<SsSearchBarComponent, "lib-ss-search-bar", never, { "config": { "alias": "config"; "required": true; }; }, { "simpleSearch": "simpleSearch"; "clearSimpleSearch": "clearSimpleSearch"; "advancedSearch": "advancedSearch"; "advancedSearchClosed": "advancedSearchClosed"; "advancedSearchOpen": "advancedSearchOpen"; "tabChange": "tabChange"; }, never, never, true, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<SsSearchBarComponent, "lib-ss-search-bar", never, { "config": { "alias": "config"; "required": true; }; "suggestions": { "alias": "suggestions"; "required": false; }; }, { "simpleSearch": "simpleSearch"; "clearSimpleSearch": "clearSimpleSearch"; "advancedSearch": "advancedSearch"; "advancedSearchClosed": "advancedSearchClosed"; "advancedSearchOpen": "advancedSearchOpen"; "tabChange": "tabChange"; "suggest": "suggest"; }, never, never, true, never>;
25
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byuhbll/components",
3
- "version": "5.0.5-beta.1",
3
+ "version": "5.1.0-beta.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.0.0",
6
6
  "@angular/core": "^18.0.0"
package/public-api.d.ts CHANGED
@@ -10,7 +10,6 @@ export * from './lib/ss-search-bar/models/search-scope.model';
10
10
  export * from './lib/ss-search-bar/models/search-config.model';
11
11
  export * from './lib/snackbar/snackbar.service';
12
12
  export * from './lib/snackbar/snackbar.component';
13
- export * from './lib/page-not-found/page-not-found.component';
14
13
  export { getUserStatusFromRoles } from './lib/contact-utils';
15
14
  export { ADVANCED_SEARCH_QUALIFIER_MAP, ADVANCED_SEARCH_FIELD_MAP, ADVANCED_SEARCH_OPTIONS, } from './lib/ss-search-bar/constants';
16
15
  export * from './lib/status-button/status-button.component';
@@ -1,11 +0,0 @@
1
- import { Component } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export class PageNotFoundComponent {
4
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: PageNotFoundComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: PageNotFoundComponent, isStandalone: true, selector: "lib-page-not-found", ngImport: i0, template: "<div class=\"not-found\">\n <div class=\"not-found__text\">\n <h1>Page not found</h1>\n\n <p>\n We're sorry, but that page doesn't seem to be here.\n If you think it should be, please let us know via the feedback link.\n You may also want to try looking in the\n <a href=\"https://lib.byu.edu/site-index/\">site index</a>.\n </p>\n </div>\n\n <div class=\"not-found__image\">\n <!-- Replace this with your actual image path -->\n <img src=\"https://media.lib.byu.edu/assets/images/error/1.0/failquail.png\" alt=\"Quail illustration\" />\n </div>\n</div>\n", styles: [".not-found{min-height:40vh;padding:4rem 12vw;display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;background:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}.not-found__text{max-width:70rem}.not-found__text h1{margin:0 0 1rem;font-size:2rem;font-weight:500;color:#404040}.not-found__text p{margin:0 0 .6rem;line-height:1.5;color:#555;font-size:1rem}.not-found__text a{text-decoration:none}.not-found__text a:hover{text-decoration:underline}.not-found__image img{max-width:6rem;height:auto;display:block;margin:2rem}@media (max-width: 768px){.not-found{flex-direction:column;align-items:flex-start;justify-content:center}.not-found__image{margin-top:2rem}}\n"] }); }
6
- }
7
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: PageNotFoundComponent, decorators: [{
8
- type: Component,
9
- args: [{ selector: 'lib-page-not-found', standalone: true, imports: [], template: "<div class=\"not-found\">\n <div class=\"not-found__text\">\n <h1>Page not found</h1>\n\n <p>\n We're sorry, but that page doesn't seem to be here.\n If you think it should be, please let us know via the feedback link.\n You may also want to try looking in the\n <a href=\"https://lib.byu.edu/site-index/\">site index</a>.\n </p>\n </div>\n\n <div class=\"not-found__image\">\n <!-- Replace this with your actual image path -->\n <img src=\"https://media.lib.byu.edu/assets/images/error/1.0/failquail.png\" alt=\"Quail illustration\" />\n </div>\n</div>\n", styles: [".not-found{min-height:40vh;padding:4rem 12vw;display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;background:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}.not-found__text{max-width:70rem}.not-found__text h1{margin:0 0 1rem;font-size:2rem;font-weight:500;color:#404040}.not-found__text p{margin:0 0 .6rem;line-height:1.5;color:#555;font-size:1rem}.not-found__text a{text-decoration:none}.not-found__text a:hover{text-decoration:underline}.not-found__image img{max-width:6rem;height:auto;display:block;margin:2rem}@media (max-width: 768px){.not-found{flex-direction:column;align-items:flex-start;justify-content:center}.not-found__image{margin-top:2rem}}\n"] }]
10
- }] });
11
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFnZS1ub3QtZm91bmQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29tcG9uZW50cy9zcmMvbGliL3BhZ2Utbm90LWZvdW5kL3BhZ2Utbm90LWZvdW5kLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvbXBvbmVudHMvc3JjL2xpYi9wYWdlLW5vdC1mb3VuZC9wYWdlLW5vdC1mb3VuZC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQVMxQyxNQUFNLE9BQU8scUJBQXFCOzhHQUFyQixxQkFBcUI7a0dBQXJCLHFCQUFxQiw4RUNUbEMsb2xCQWlCQTs7MkZEUmEscUJBQXFCO2tCQVBqQyxTQUFTOytCQUNJLG9CQUFvQixjQUNsQixJQUFJLFdBQ1AsRUFBRSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbXBvbmVudCB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5AQ29tcG9uZW50KHtcbiAgICBzZWxlY3RvcjogJ2xpYi1wYWdlLW5vdC1mb3VuZCcsXG4gICAgc3RhbmRhbG9uZTogdHJ1ZSxcbiAgICBpbXBvcnRzOiBbXSxcbiAgICB0ZW1wbGF0ZVVybDogJy4vcGFnZS1ub3QtZm91bmQuY29tcG9uZW50Lmh0bWwnLFxuICAgIHN0eWxlVXJsOiAnLi9wYWdlLW5vdC1mb3VuZC5jb21wb25lbnQuc2NzcycsXG59KVxuZXhwb3J0IGNsYXNzIFBhZ2VOb3RGb3VuZENvbXBvbmVudCB7fVxuIiwiPGRpdiBjbGFzcz1cIm5vdC1mb3VuZFwiPlxuICA8ZGl2IGNsYXNzPVwibm90LWZvdW5kX190ZXh0XCI+XG4gICAgPGgxPlBhZ2Ugbm90IGZvdW5kPC9oMT5cblxuICAgIDxwPlxuICAgICAgV2UncmUgc29ycnksIGJ1dCB0aGF0IHBhZ2UgZG9lc24ndCBzZWVtIHRvIGJlIGhlcmUuXG4gICAgICBJZiB5b3UgdGhpbmsgaXQgc2hvdWxkIGJlLCBwbGVhc2UgbGV0IHVzIGtub3cgdmlhIHRoZSBmZWVkYmFjayBsaW5rLlxuICAgICAgWW91IG1heSBhbHNvIHdhbnQgdG8gdHJ5IGxvb2tpbmcgaW4gdGhlXG4gICAgICA8YSBocmVmPVwiaHR0cHM6Ly9saWIuYnl1LmVkdS9zaXRlLWluZGV4L1wiPnNpdGUgaW5kZXg8L2E+LlxuICAgIDwvcD5cbiAgPC9kaXY+XG5cbiAgPGRpdiBjbGFzcz1cIm5vdC1mb3VuZF9faW1hZ2VcIj5cbiAgICA8IS0tIFJlcGxhY2UgdGhpcyB3aXRoIHlvdXIgYWN0dWFsIGltYWdlIHBhdGggLS0+XG4gICAgPGltZyBzcmM9XCJodHRwczovL21lZGlhLmxpYi5ieXUuZWR1L2Fzc2V0cy9pbWFnZXMvZXJyb3IvMS4wL2ZhaWxxdWFpbC5wbmdcIiBhbHQ9XCJRdWFpbCBpbGx1c3RyYXRpb25cIiAvPlxuICA8L2Rpdj5cbjwvZGl2PlxuIl19
@@ -1,5 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class PageNotFoundComponent {
3
- static ɵfac: i0.ɵɵFactoryDeclaration<PageNotFoundComponent, never>;
4
- static ɵcmp: i0.ɵɵComponentDeclaration<PageNotFoundComponent, "lib-page-not-found", never, {}, {}, never, never, true, never>;
5
- }