@byuhbll/components 4.0.0-alpha.5 → 4.0.0-alpha.7

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.
@@ -0,0 +1,12 @@
1
+ import { MatTooltip, TooltipPosition } from '@angular/material/tooltip';
2
+ import * as i0 from "@angular/core";
3
+ export declare class CopyTooltipComponent {
4
+ position: TooltipPosition;
5
+ copyText?: string;
6
+ tooltip: MatTooltip;
7
+ clipboardCopyMessage: string;
8
+ copyToClipboard: (text?: string) => Promise<void>;
9
+ handleMouseLeave: () => void;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<CopyTooltipComponent, never>;
11
+ static ɵcmp: i0.ɵɵComponentDeclaration<CopyTooltipComponent, "lib-copy-tooltip", never, { "position": { "alias": "position"; "required": false; }; "copyText": { "alias": "copyText"; "required": false; }; }, {}, never, ["*"], true, never>;
12
+ }
@@ -1,25 +1,15 @@
1
- import { AfterViewInit, ElementRef, EventEmitter } from '@angular/core';
1
+ import { AfterViewInit, ElementRef, EventEmitter, Signal } from '@angular/core';
2
2
  import { JwtPayload } from 'jwt-decode';
3
+ import { TokenPayload } from './models/token-payload';
4
+ import { LibraryHours } from './models/library-hours';
3
5
  import * as i0 from "@angular/core";
4
6
  export declare const LIBRARY_HOURS_API_URL = "https://apps.lib.byu.edu/libraryhours/api/hours";
5
- interface LibraryHours {
6
- date: string;
7
- is_closed: boolean;
8
- open_time: string;
9
- close_time: string;
10
- has_exception: boolean;
11
- exception_title: string;
12
- exception_message: string;
13
- is_currently_open: boolean;
14
- }
15
7
  export declare class HbllHeaderComponent implements AfterViewInit {
16
8
  private readonly r2;
17
9
  private readonly http;
18
10
  private readonly bo;
19
- private _accessToken;
20
11
  header: ElementRef;
21
- set accessToken(token: string);
22
- get accessToken(): string;
12
+ accessTokenPayload: import("@angular/core").InputSignal<TokenPayload>;
23
13
  oidcBaseUri: import("@angular/core").InputSignal<string>;
24
14
  oidcDefaultIdp: import("@angular/core").InputSignal<string>;
25
15
  login: EventEmitter<void>;
@@ -28,23 +18,22 @@ export declare class HbllHeaderComponent implements AfterViewInit {
28
18
  private formatDateForHours;
29
19
  private accountInfoEl;
30
20
  private hoursEl;
31
- protected parsedToken: JwtPayload & Record<string, any>;
32
- protected isLoggedIn: boolean;
33
- protected isImpersonating: boolean;
34
- protected showImpersonateButton: boolean;
35
- protected name: string;
36
- protected libraryHours: import("@angular/core").Signal<LibraryHours | undefined>;
21
+ protected parsedToken: Signal<JwtPayload & Record<string, any>>;
22
+ protected isLoggedIn: Signal<boolean>;
23
+ protected isImpersonating: Signal<boolean>;
24
+ protected showImpersonateButton: Signal<any>;
25
+ protected name: Signal<any>;
26
+ protected libraryHours: Signal<LibraryHours | undefined>;
37
27
  protected hoursExceptions$: import("rxjs").Observable<LibraryHours[]>;
38
28
  protected showAccountDropdown: boolean;
39
29
  protected showLibraryHours: boolean;
40
30
  protected mobileSidebarHeight: number;
41
31
  protected showNavBar: boolean;
42
32
  protected showImpersonationModal: boolean;
43
- protected isScreenSmall: import("@angular/core").Signal<boolean | undefined>;
33
+ protected isScreenSmall: Signal<boolean | undefined>;
44
34
  ngAfterViewInit(): void;
45
35
  private onResize;
46
36
  private setMobileSidebarHeight;
47
37
  static ɵfac: i0.ɵɵFactoryDeclaration<HbllHeaderComponent, never>;
48
- static ɵcmp: i0.ɵɵComponentDeclaration<HbllHeaderComponent, "lib-hbll-header", never, { "accessToken": { "alias": "accessToken"; "required": false; }; "oidcBaseUri": { "alias": "oidcBaseUri"; "required": false; "isSignal": true; }; "oidcDefaultIdp": { "alias": "oidcDefaultIdp"; "required": false; "isSignal": true; }; }, { "login": "login"; "logout": "logout"; "endImpersonation": "endImpersonation"; }, never, never, true, never>;
38
+ static ɵcmp: i0.ɵɵComponentDeclaration<HbllHeaderComponent, "lib-hbll-header", never, { "accessTokenPayload": { "alias": "accessTokenPayload"; "required": false; "isSignal": true; }; "oidcBaseUri": { "alias": "oidcBaseUri"; "required": false; "isSignal": true; }; "oidcDefaultIdp": { "alias": "oidcDefaultIdp"; "required": false; "isSignal": true; }; }, { "login": "login"; "logout": "logout"; "endImpersonation": "endImpersonation"; }, never, never, true, never>;
49
39
  }
50
- export {};
@@ -1,5 +1,6 @@
1
1
  import { EventEmitter, OnDestroy, PipeTransform } from '@angular/core';
2
2
  import { Subject } from 'rxjs';
3
+ import { TokenPayload } from '../models/token-payload';
3
4
  import * as i0 from "@angular/core";
4
5
  export declare class ImpersonateUserPipe implements PipeTransform {
5
6
  transform(user: ImpersonateSearchResult): string;
@@ -23,7 +24,7 @@ export declare class ImpersonateModalComponent implements OnDestroy {
23
24
  set showModal(open: boolean);
24
25
  oidcBaseUri: import("@angular/core").InputSignal<string>;
25
26
  oidcDefaultIdp: import("@angular/core").InputSignal<string>;
26
- accessToken: import("@angular/core").InputSignal<string>;
27
+ accessTokenPayload: import("@angular/core").InputSignal<TokenPayload>;
27
28
  dismiss: EventEmitter<void>;
28
29
  init: EventEmitter<void>;
29
30
  protected isOpen: boolean;
@@ -53,5 +54,5 @@ export declare class ImpersonateModalComponent implements OnDestroy {
53
54
  private searchUsers;
54
55
  private replaceUrl;
55
56
  static ɵfac: i0.ɵɵFactoryDeclaration<ImpersonateModalComponent, never>;
56
- static ɵcmp: i0.ɵɵComponentDeclaration<ImpersonateModalComponent, "lib-impersonate-modal", never, { "showModal": { "alias": "showModal"; "required": false; }; "oidcBaseUri": { "alias": "oidcBaseUri"; "required": true; "isSignal": true; }; "oidcDefaultIdp": { "alias": "oidcDefaultIdp"; "required": true; "isSignal": true; }; "accessToken": { "alias": "accessToken"; "required": true; "isSignal": true; }; }, { "dismiss": "dismiss"; "init": "init"; }, never, never, true, never>;
57
+ static ɵcmp: i0.ɵɵComponentDeclaration<ImpersonateModalComponent, "lib-impersonate-modal", never, { "showModal": { "alias": "showModal"; "required": false; }; "oidcBaseUri": { "alias": "oidcBaseUri"; "required": true; "isSignal": true; }; "oidcDefaultIdp": { "alias": "oidcDefaultIdp"; "required": true; "isSignal": true; }; "accessTokenPayload": { "alias": "accessTokenPayload"; "required": true; "isSignal": true; }; }, { "dismiss": "dismiss"; "init": "init"; }, never, never, true, never>;
57
58
  }
@@ -0,0 +1,15 @@
1
+ export declare enum AccessStatus {
2
+ OK = "ok",
3
+ BLOCKED = "blocked",
4
+ NONE = "none"
5
+ }
6
+ export interface ApplicationAccess {
7
+ label: string;
8
+ access: AccessStatus;
9
+ code?: string;
10
+ detail?: string;
11
+ }
12
+ export interface AccountsResponse {
13
+ netId: string;
14
+ applications: Record<string, ApplicationAccess>;
15
+ }
@@ -0,0 +1,10 @@
1
+ export interface LibraryHours {
2
+ date: string;
3
+ is_closed: boolean;
4
+ open_time: string;
5
+ close_time: string;
6
+ has_exception: boolean;
7
+ exception_title: string;
8
+ exception_message: string;
9
+ is_currently_open: boolean;
10
+ }
@@ -0,0 +1,33 @@
1
+ export declare enum EmployeePositionType {
2
+ STD = "std",
3
+ SNL = "snl",
4
+ FAC = "fac",
5
+ STF = "stf",
6
+ TMP = "tmp",
7
+ FTC = "ftc"
8
+ }
9
+ export declare enum UndergradGraduateStatus {
10
+ UNDERGRAD = "undergrad",
11
+ GRADUATE = "graduate"
12
+ }
13
+ export interface IndependentStudyResponse {
14
+ library_id: string;
15
+ is_enrolled: boolean;
16
+ }
17
+ export interface PersonSummary {
18
+ byu_id?: string;
19
+ email_address?: string;
20
+ first_name: string;
21
+ is_affiliate: boolean;
22
+ is_employee: boolean;
23
+ is_retired?: boolean;
24
+ primary_position_type?: EmployeePositionType;
25
+ primary_position_type_display?: string;
26
+ is_student: boolean;
27
+ undergrad_graduate_status?: UndergradGraduateStatus;
28
+ last_name: string;
29
+ library_id: string;
30
+ preferred_first_name: string;
31
+ restricted: boolean;
32
+ worker_id?: string;
33
+ }
@@ -0,0 +1,3 @@
1
+ export interface TokenPayload {
2
+ token: string;
3
+ }
@@ -0,0 +1,30 @@
1
+ import { EventEmitter, Signal } from '@angular/core';
2
+ import { AccessStatus, type ApplicationAccess } from '../hbll-header/models/application-access';
3
+ import { TokenPayload } from '../hbll-header/models/token-payload';
4
+ import { JwtPayload } from 'jwt-decode';
5
+ import { PersonSummary } from '../hbll-header/models/person-summary';
6
+ import * as i0 from "@angular/core";
7
+ export declare class ImpersonationBannerComponent {
8
+ private http;
9
+ accessTokenPayload: import("@angular/core").InputSignal<TokenPayload>;
10
+ endImpersonation: EventEmitter<void>;
11
+ protected parsedToken: Signal<JwtPayload & Record<string, any>>;
12
+ protected isImpersonating: Signal<boolean>;
13
+ protected libraryId: Signal<any>;
14
+ protected user: Signal<PersonSummary | null | undefined>;
15
+ protected userFullName: Signal<string>;
16
+ protected isRestricted: Signal<boolean | undefined>;
17
+ protected userInfoTabs: Signal<Map<string, any>>;
18
+ protected userPhotoUrl: Signal<string>;
19
+ protected activityStatus: Signal<"retired" | "active" | "inactive" | null>;
20
+ protected employeeStatusDescription: Signal<string | null>;
21
+ protected independentStudyStatus: Signal<boolean | null | undefined>;
22
+ protected accountStatuses: Signal<{
23
+ ok: ApplicationAccess[];
24
+ blocked: ApplicationAccess[];
25
+ none: ApplicationAccess[];
26
+ } | null | undefined>;
27
+ protected STATUSES: typeof AccessStatus;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<ImpersonationBannerComponent, never>;
29
+ static ɵcmp: i0.ɵɵComponentDeclaration<ImpersonationBannerComponent, "lib-impersonation-banner", never, { "accessTokenPayload": { "alias": "accessTokenPayload"; "required": true; "isSignal": true; }; }, { "endImpersonation": "endImpersonation"; }, never, never, true, never>;
30
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byuhbll/components",
3
- "version": "4.0.0-alpha.5",
3
+ "version": "4.0.0-alpha.7",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.0.0",
6
6
  "@angular/core": "^18.0.0"
package/public-api.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './lib/hbll-header/hbll-header.component';
2
+ export * from './lib/impersonation-banner/impersonation-banner.component';
2
3
  export * from './lib/ss-search-bar/ss-search-bar.component';
3
4
  export * from './lib/ss-search-bar/models/advanced-search.model';
4
5
  export * from './lib/ss-search-bar/models/search-scope.model';