@byuhbll/components 4.6.2 → 4.7.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.
- package/esm2022/lib/animations/animations.mjs +19 -1
- package/esm2022/lib/button/button.mjs +95 -0
- package/esm2022/lib/button-group/button-group.component.mjs +63 -0
- package/esm2022/lib/contact-utils.mjs +2 -2
- package/esm2022/lib/expand-collapse/expand-collapse.component.mjs +4 -4
- package/esm2022/lib/hbll-footer/hbll-footer.component.mjs +10 -9
- package/esm2022/lib/hbll-header/hbll-header.component.mjs +11 -24
- package/esm2022/lib/hbll-header/nav-bar-dropdown/nav-bar-dropdown.component.mjs +3 -3
- package/esm2022/lib/header-with-impersonation/header-with-impersonation.component.mjs +3 -5
- package/esm2022/lib/impersonation-banner/impersonation-banner.component.mjs +4 -4
- package/esm2022/lib/subatomic-components/button-group-item/button-group-item.component.mjs +29 -0
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/byuhbll-components.mjs +225 -44
- package/fesm2022/byuhbll-components.mjs.map +1 -1
- package/lib/animations/animations.d.ts +1 -0
- package/lib/button/button.d.ts +139 -0
- package/lib/button-group/button-group.component.d.ts +17 -0
- package/lib/contact-utils.d.ts +1 -1
- package/lib/hbll-footer/hbll-footer.component.d.ts +3 -3
- package/lib/hbll-header/hbll-header.component.d.ts +0 -2
- package/lib/header-with-impersonation/header-with-impersonation.component.d.ts +1 -3
- package/lib/impersonation-banner/impersonation-banner.component.d.ts +2 -2
- package/lib/subatomic-components/button-group-item/button-group-item.component.d.ts +18 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -2,3 +2,4 @@ export declare const libHbllExpandCollapse: import("@angular/animations").Animat
|
|
|
2
2
|
export declare const libHbllFadeInOut: import("@angular/animations").AnimationTriggerMetadata;
|
|
3
3
|
export declare const libHbllFadeIn: import("@angular/animations").AnimationTriggerMetadata;
|
|
4
4
|
export declare const libHbllFadeOut: import("@angular/animations").AnimationTriggerMetadata;
|
|
5
|
+
export declare const libHbllSlideInOutRightLeft: import("@angular/animations").AnimationTriggerMetadata;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export type ButtonType = 'primary' | 'secondary' | 'transparent';
|
|
4
|
+
/**
|
|
5
|
+
* Interface representing all input properties for the ButtonComponent.
|
|
6
|
+
* Use this when a parent component needs to accept button configuration as a parameter.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* export class ParentComponent {
|
|
11
|
+
* @Input() buttonConfig: ButtonInputs = {
|
|
12
|
+
* buttonType: 'primary',
|
|
13
|
+
* title: 'Click Me',
|
|
14
|
+
* disabled: false
|
|
15
|
+
* };
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export interface ButtonInputs {
|
|
20
|
+
/**
|
|
21
|
+
* The visual style of the button
|
|
22
|
+
* @default 'primary'
|
|
23
|
+
*/
|
|
24
|
+
buttonType?: ButtonType;
|
|
25
|
+
/**
|
|
26
|
+
* The text content displayed on the button
|
|
27
|
+
* @optional
|
|
28
|
+
*/
|
|
29
|
+
title?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Path to an icon image displayed before the title
|
|
32
|
+
* @optional
|
|
33
|
+
*/
|
|
34
|
+
iconBefore?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Path to an icon image displayed after the title
|
|
37
|
+
* @optional
|
|
38
|
+
*/
|
|
39
|
+
iconAfter?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Alternative text for icon accessibility
|
|
42
|
+
* @optional
|
|
43
|
+
*/
|
|
44
|
+
iconAlt?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the button is disabled
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
49
|
+
disabled?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Whether the button should have thin padding
|
|
52
|
+
* @default false
|
|
53
|
+
*/
|
|
54
|
+
isThin?: boolean;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* A flexible, reusable button component that supports multiple button types
|
|
58
|
+
* and various content combinations (icon before, title, icon after).
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```html
|
|
62
|
+
* <!-- Primary button with icon and title -->
|
|
63
|
+
* <app-hbll-button-custom-component
|
|
64
|
+
* buttonType="primary"
|
|
65
|
+
* title="Copy Citation"
|
|
66
|
+
* iconBefore="../../assets/copy.svg"
|
|
67
|
+
* iconAlt="Copy icon"
|
|
68
|
+
* (buttonClick)="copyCitation()">
|
|
69
|
+
* </app-hbll-button-custom-component>
|
|
70
|
+
*
|
|
71
|
+
* <!-- Secondary button with title only -->
|
|
72
|
+
* <app-hbll-button-custom-component
|
|
73
|
+
* buttonType="secondary"
|
|
74
|
+
* title="Cancel"
|
|
75
|
+
* (buttonClick)="cancelAction()">
|
|
76
|
+
* </app-hbll-button-custom-component>
|
|
77
|
+
*
|
|
78
|
+
* <!-- Transparent button with icon after title -->
|
|
79
|
+
* <app-hbll-button-custom-component
|
|
80
|
+
* buttonType="transparent"
|
|
81
|
+
* title="Download"
|
|
82
|
+
* iconAfter="../../assets/download.svg"
|
|
83
|
+
* iconAlt="Download icon"
|
|
84
|
+
* (buttonClick)="downloadFile()">
|
|
85
|
+
* </app-hbll-button-custom-component>
|
|
86
|
+
*
|
|
87
|
+
* <!-- Thin button with reduced padding -->
|
|
88
|
+
* <app-hbll-button-custom-component
|
|
89
|
+
* buttonType="primary"
|
|
90
|
+
* title="Submit"
|
|
91
|
+
* [isThin]="true"
|
|
92
|
+
* (buttonClick)="submitForm()">
|
|
93
|
+
* </app-hbll-button-custom-component>
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
export declare class ButtonComponent {
|
|
97
|
+
/**
|
|
98
|
+
* The visual style of the button
|
|
99
|
+
* @default 'primary'
|
|
100
|
+
*/
|
|
101
|
+
buttonType: ButtonType;
|
|
102
|
+
/**
|
|
103
|
+
* The text content displayed on the button
|
|
104
|
+
* @optional
|
|
105
|
+
*/
|
|
106
|
+
title?: string;
|
|
107
|
+
/**
|
|
108
|
+
* Path to an icon image displayed before the title
|
|
109
|
+
* @optional
|
|
110
|
+
*/
|
|
111
|
+
iconBefore?: string;
|
|
112
|
+
/**
|
|
113
|
+
* Path to an icon image displayed after the title
|
|
114
|
+
* @optional
|
|
115
|
+
*/
|
|
116
|
+
iconAfter?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Alternative text for icon accessibility
|
|
119
|
+
* @optional
|
|
120
|
+
*/
|
|
121
|
+
iconAlt?: string;
|
|
122
|
+
/**
|
|
123
|
+
* Whether the button is disabled
|
|
124
|
+
* @default false
|
|
125
|
+
*/
|
|
126
|
+
disabled: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Whether the button should have thin padding
|
|
129
|
+
* @default false
|
|
130
|
+
*/
|
|
131
|
+
isThin: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Event emitted when the button is clicked or activated via keyboard
|
|
134
|
+
*/
|
|
135
|
+
buttonClick: EventEmitter<void>;
|
|
136
|
+
onButtonClick(): void;
|
|
137
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
138
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "lib-button", never, { "buttonType": { "alias": "buttonType"; "required": false; }; "title": { "alias": "title"; "required": false; }; "iconBefore": { "alias": "iconBefore"; "required": false; }; "iconAfter": { "alias": "iconAfter"; "required": false; }; "iconAlt": { "alias": "iconAlt"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "isThin": { "alias": "isThin"; "required": false; }; }, { "buttonClick": "buttonClick"; }, never, never, true, never>;
|
|
139
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { ButtonConfig } from '../subatomic-components/button-group-item/button-group-item.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ButtonGroupComponent implements OnInit, OnChanges {
|
|
5
|
+
buttons: ButtonConfig[];
|
|
6
|
+
initialActiveId?: string;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
activeButtonChange: EventEmitter<string>;
|
|
9
|
+
activeButtonId: import("@angular/core").WritableSignal<string>;
|
|
10
|
+
ngOnInit(): void;
|
|
11
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
12
|
+
private initializeActiveButton;
|
|
13
|
+
onButtonClick(buttonId: string): void;
|
|
14
|
+
isButtonActive(buttonId: string): boolean;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonGroupComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonGroupComponent, "lib-button-group", never, { "buttons": { "alias": "buttons"; "required": true; }; "initialActiveId": { "alias": "initialActiveId"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "activeButtonChange": "activeButtonChange"; }, never, never, true, never>;
|
|
17
|
+
}
|
package/lib/contact-utils.d.ts
CHANGED
|
@@ -14,6 +14,6 @@ export declare const createContactForm: (fb: FormBuilder) => import("@angular/fo
|
|
|
14
14
|
message: import("@angular/forms").FormControl<string>;
|
|
15
15
|
status: import("@angular/forms").FormControl<"" | "Other" | "Undergraduate" | "Graduate" | "Faculty" | "Staff" | "Library Employee" | undefined>;
|
|
16
16
|
}>;
|
|
17
|
-
export declare const submitEmail: (payload: ContactPayload,
|
|
17
|
+
export declare const submitEmail: (payload: ContactPayload, http: HttpClient, apiBaseUrl: string) => import("rxjs").Observable<unknown>;
|
|
18
18
|
export declare const submitFeedback: (payload: ContactPayload, http: HttpClient, apiBaseUrl: string) => import("rxjs").Observable<unknown>;
|
|
19
19
|
export declare const getUserStatusFromRoles: (roles: string[]) => UserStatus;
|
|
@@ -6,8 +6,7 @@ export declare class HbllFooterComponent {
|
|
|
6
6
|
private readonly footerSkipTargetId;
|
|
7
7
|
private emailDialog;
|
|
8
8
|
mainsitebaseurl: string;
|
|
9
|
-
|
|
10
|
-
byuid: string;
|
|
9
|
+
libraryapibaseuri: string;
|
|
11
10
|
set emailname(name: string);
|
|
12
11
|
set emailemail(email: string);
|
|
13
12
|
set emailmessage(message: string);
|
|
@@ -28,6 +27,7 @@ export declare class HbllFooterComponent {
|
|
|
28
27
|
protected handleClose: () => void;
|
|
29
28
|
openEmailForm: (formValues?: typeof this.emailForm.value) => void;
|
|
30
29
|
skipFooter(): void;
|
|
30
|
+
protected setSessionCookie(): void;
|
|
31
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<HbllFooterComponent, never>;
|
|
32
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<HbllFooterComponent, "lib-hbll-footer", never, { "mainsitebaseurl": { "alias": "mainsitebaseurl"; "required": false; }; "
|
|
32
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HbllFooterComponent, "lib-hbll-footer", never, { "mainsitebaseurl": { "alias": "mainsitebaseurl"; "required": false; }; "libraryapibaseuri": { "alias": "libraryapibaseuri"; "required": false; }; "emailname": { "alias": "emailname"; "required": false; }; "emailemail": { "alias": "emailemail"; "required": false; }; "emailmessage": { "alias": "emailmessage"; "required": false; }; "emailstatus": { "alias": "emailstatus"; "required": false; }; }, {}, never, never, true, never>;
|
|
33
33
|
}
|
|
@@ -8,8 +8,6 @@ export declare class HbllHeaderComponent implements AfterViewInit {
|
|
|
8
8
|
private readonly bo;
|
|
9
9
|
private doc;
|
|
10
10
|
header: ElementRef;
|
|
11
|
-
navWrapper: ElementRef<HTMLElement>;
|
|
12
|
-
backdrop: ElementRef<HTMLElement>;
|
|
13
11
|
name: string;
|
|
14
12
|
mainsitebaseurl: string;
|
|
15
13
|
showImpersonateButton: import("@angular/core").InputSignal<boolean>;
|
|
@@ -7,8 +7,6 @@ export declare class HeaderWithImpersonationComponent {
|
|
|
7
7
|
oidcBaseUri: import("@angular/core").InputSignal<string>;
|
|
8
8
|
oidcDefaultIdp: import("@angular/core").InputSignal<string>;
|
|
9
9
|
mainSiteBaseUrl: import("@angular/core").InputSignal<string>;
|
|
10
|
-
personBaseUri: import("@angular/core").InputSignal<string>;
|
|
11
|
-
myAccountApiBaseUri: import("@angular/core").InputSignal<string>;
|
|
12
10
|
login: EventEmitter<void>;
|
|
13
11
|
logout: EventEmitter<void>;
|
|
14
12
|
endImpersonation: EventEmitter<void>;
|
|
@@ -18,5 +16,5 @@ export declare class HeaderWithImpersonationComponent {
|
|
|
18
16
|
protected showImpersonationModal: boolean;
|
|
19
17
|
private isImpersonating;
|
|
20
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<HeaderWithImpersonationComponent, never>;
|
|
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; };
|
|
19
|
+
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; }; }, { "login": "login"; "logout": "logout"; "endImpersonation": "endImpersonation"; }, never, never, true, never>;
|
|
22
20
|
}
|
|
@@ -29,7 +29,7 @@ export declare class ImpersonationBannerComponent {
|
|
|
29
29
|
private http;
|
|
30
30
|
accessTokenPayload: import("@angular/core").InputSignal<TokenPayload>;
|
|
31
31
|
personBaseUri: import("@angular/core").InputSignal<string>;
|
|
32
|
-
|
|
32
|
+
libraryApiBaseUri: import("@angular/core").InputSignal<string>;
|
|
33
33
|
endImpersonation: EventEmitter<void>;
|
|
34
34
|
protected parsedToken: Signal<JwtPayload & Record<string, any>>;
|
|
35
35
|
protected isImpersonating: Signal<boolean>;
|
|
@@ -48,5 +48,5 @@ export declare class ImpersonationBannerComponent {
|
|
|
48
48
|
none: ApplicationAccess[];
|
|
49
49
|
} | null | undefined>;
|
|
50
50
|
static ɵfac: i0.ɵɵFactoryDeclaration<ImpersonationBannerComponent, never>;
|
|
51
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ImpersonationBannerComponent, "lib-impersonation-banner", never, { "accessTokenPayload": { "alias": "accessTokenPayload"; "required": true; "isSignal": true; }; "personBaseUri": { "alias": "personBaseUri"; "required": false; "isSignal": true; }; "
|
|
51
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ImpersonationBannerComponent, "lib-impersonation-banner", never, { "accessTokenPayload": { "alias": "accessTokenPayload"; "required": true; "isSignal": true; }; "personBaseUri": { "alias": "personBaseUri"; "required": false; "isSignal": true; }; "libraryApiBaseUri": { "alias": "libraryApiBaseUri"; "required": false; "isSignal": true; }; }, { "endImpersonation": "endImpersonation"; }, never, never, true, never>;
|
|
52
52
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export interface ButtonConfig {
|
|
4
|
+
id: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
isActive: boolean;
|
|
7
|
+
icon?: string;
|
|
8
|
+
iconAlt?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class ButtonGroupItemComponent {
|
|
11
|
+
button: ButtonConfig;
|
|
12
|
+
isActive: boolean;
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
buttonClick: EventEmitter<string>;
|
|
15
|
+
onClick(): void;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonGroupItemComponent, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonGroupItemComponent, "lib-button-group-item", never, { "button": { "alias": "button"; "required": true; }; "isActive": { "alias": "isActive"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "buttonClick": "buttonClick"; }, never, never, true, never>;
|
|
18
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -13,3 +13,5 @@ export * from './lib/snackbar/snackbar.component';
|
|
|
13
13
|
export { getUserStatusFromRoles } from './lib/contact-utils';
|
|
14
14
|
export { ADVANCED_SEARCH_QUALIFIER_MAP, ADVANCED_SEARCH_FIELD_MAP, ADVANCED_SEARCH_OPTIONS, } from './lib/ss-search-bar/constants';
|
|
15
15
|
export * from './lib/status-button/status-button.component';
|
|
16
|
+
export * from './lib/button/button';
|
|
17
|
+
export * from './lib/button-group/button-group.component';
|